From 2f660dfab2b271f3405caae4dbfc577e774915fb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 10 Dec 2013 18:54:08 +0100 Subject: [PATCH 001/741] add easyconfigs for Mono, MyMediaLite and IronPython --- .../IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb | 17 +++++++++++ .../m/Mono/Mono-2.10.6-ictce-4.1.13.eb | 30 +++++++++++++++++++ .../MyMediaLite-3.10-ictce-4.1.13.eb | 14 +++++++++ 3 files changed, 61 insertions(+) create mode 100644 easybuild/easyconfigs/i/IronPython/IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb create mode 100644 easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb create mode 100644 easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/i/IronPython/IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb b/easybuild/easyconfigs/i/IronPython/IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb new file mode 100644 index 0000000000..fb3ff7bded --- /dev/null +++ b/easybuild/easyconfigs/i/IronPython/IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb @@ -0,0 +1,17 @@ +name = 'IronPython' +version = '2.7-0' +versionsuffix = '-g4fb2552' + +homepage = 'http://ironpython.net/' +description = """IronPython is an open-source implementation of the Python programming language + which is tightly integrated with the .NET Framework. IronPython can use the .NET Framework and +Python libraries, and other .NET languages can use Python code just as easily.""" + +toolchain = {'name': 'ictce', 'version': '4.1.13'} + +# download via https://github.com/IronLanguages/main/releases +sources = ['IronLanguages-main-ipy-%(version)s%(versionsuffix)s.tar.gz'] + +dependencies = [('Mono', '2.10.6')] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb b/easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb new file mode 100644 index 0000000000..05e81f5396 --- /dev/null +++ b/easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb @@ -0,0 +1,30 @@ +name = 'Mono' +version = '2.10.6' + +homepage = 'http://mono-framework.com' +description = """An open source, cross-platform, implementation of C# and the CLR that is + binary compatible with Microsoft.NET.""" + +toolchain = {'name': 'ictce', 'version': '4.1.13'} + +# Mono required Mono to build, so there are a couple of options: +# 1) provide Mono RPMs in sources, the Mono easyblock will use them to make a tmp Mono install +# 2) assume a Mono version is available system-wide (assert using e.g. "osdependencies = ['mono-core']") +# 3) specify an already available Mono module as build dep, e.g. "builddependencies = [('Mono', '2.10.6')] + +source_urls = ['http://download.mono-project.com/sources/mono/'] +sources = [ + SOURCELOWER_TAR_BZ2, + # Mono requires Mono to build, so provide RPMs so Mono can be bootstrapped + 'libgdiplus-2.4.2-2.el5.kb.x86_64.rpm', + 'mono-core-2.4.2.3-2.el5.kb.x86_64.rpm', +] + +builddependencies = [ + ('Bison', '2.6.5'), + ('gettext', '0.18.2'), +] + +parallel = 1 + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb b/easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb new file mode 100644 index 0000000000..21917e5c28 --- /dev/null +++ b/easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb @@ -0,0 +1,14 @@ +name = 'MyMediaLite' +version = '3.10' + +homepage = 'http://www.ismll.uni-hildesheim.de/mymedialite/' +description = """MyMediaLite is a lightweight, multi-purpose library of recommender system algorithms.""" + +toolchain = {'name': 'ictce', 'version': '4.1.13'} + +source_urls = ['http://www.mymedialite.net/download/'] +sources = ['%(name)s-%(version)s.src.tar.gz'] + +dependencies = [('Mono', '2.10.6')] + +moduleclass = 'lib' -- GitLab From 4137050e516053e1e78dd8c9c16d10744e04ecec Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 10 Oct 2014 18:47:42 +0200 Subject: [PATCH 002/741] add easyconfig for FFindex --- .../f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 easybuild/easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb diff --git a/easybuild/easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb b/easybuild/easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb new file mode 100755 index 0000000000..3218a6e11d --- /dev/null +++ b/easybuild/easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb @@ -0,0 +1,30 @@ +name = "FFindex" +version = "0.9.9" + +homepage = 'http://www.splashground.de/~andy/programs/FFindex/' +description = """simple index/database for huge amounts of small files""" + +toolchain = {'name': 'goolf', 'version': '1.4.10'} +toolchainopts = {'usempi': True} + +source_urls = ['http://www.splashground.de/~andy/programs/FFindex/'] +sources = [SOURCELOWER_TAR_GZ] + +skipsteps = ['configure'] + +start_dir = 'src' + +makeopts = 'USEMPI=1' +installopts = "USEMPI=1 INSTALL_DIR=%(installdir)s" + +runtest = 'test' + +parallel = 1 + +sanity_check_paths = { + 'files': ['bin/ffindex_%s' % x for x in ['apply', 'build', 'from_fasta', 'get', 'modify', 'unpack']] + + ['lib64/libffindex.a', 'lib64/libffindex.so'], + 'dirs': [], +} + +moduleclass = 'tools' -- GitLab From 12638f1690a6140bbd4fca39077f553d614ef6a6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 10 Oct 2014 18:49:14 +0200 Subject: [PATCH 003/741] add easyconfig for CFITSIO v3.300 --- .../c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb diff --git a/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb b/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb new file mode 100755 index 0000000000..06ebf30047 --- /dev/null +++ b/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb @@ -0,0 +1,20 @@ +name = 'CFITSIO' +version = '3.300' + +homepage = 'http://heasarc.gsfc.nasa.gov/fitsio/' +description = """CFITSIO is a library of C and Fortran subroutines for reading and writing data files in +FITS (Flexible Image Transport System) data format.""" + +toolchain = {'name': 'ictce', 'version': '5.5.0'} +toolchainopts = {'optarch': True, 'pic': True} + +srcversion = '%s0' % version.replace('.', '') +source_urls = ['ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/'] +sources = ['%%(namelower)s%s.tar.gz' % srcversion] + +sanity_check_paths = { + 'files':["lib/libcfitsio.a"], + 'dirs':["include"], +} + +moduleclass = 'lib' -- GitLab From 2e771de754ede797c44db85db7c763c7daaabfb3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 10 Oct 2014 18:54:07 +0200 Subject: [PATCH 004/741] add easyconfigs for log4cplus --- .../log4cplus-1.0.4.3-ictce-5.5.0.eb | 19 +++++++++++++++++++ .../log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100755 easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb create mode 100755 easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb diff --git a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb new file mode 100755 index 0000000000..e88e8c2f72 --- /dev/null +++ b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb @@ -0,0 +1,19 @@ +name = 'log4cplus' +version = '1.0.4.3' + +homepage = 'http://sourceforge.net/p/log4cplus' +description = """log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily +granular control over log management and configuration. It is modelled after the Java log4j API.""" + +toolchain = {'name': 'ictce', 'version': '5.5.0'} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCE_TAR_GZ] + +# make sure the gzip, gunzip and compress binaries are available after installation +sanity_check_paths = { + 'files': ["lib/liblog4cplus.a", "lib/liblog4cplus.so"], + 'dirs': ["include/log4cplus"], +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb new file mode 100755 index 0000000000..f5511eacf6 --- /dev/null +++ b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb @@ -0,0 +1,19 @@ +name = 'log4cplus' +version = '1.1.2' + +homepage = 'http://sourceforge.net/p/log4cplus' +description = """log4cplus is a simple to use C++ logging API providing thread-safe, flexible, and arbitrarily +granular control over log management and configuration. It is modelled after the Java log4j API.""" + +toolchain = {'name': 'ictce', 'version': '5.5.0'} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCE_TAR_GZ] + +# make sure the gzip, gunzip and compress binaries are available after installation +sanity_check_paths = { + 'files': ["lib/liblog4cplus.a", "lib/liblog4cplus.so"], + 'dirs': ["include/log4cplus"], +} + +moduleclass = 'lang' -- GitLab From 0b80f86d10777c4124bb3505523540952ad8d333 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 10 Oct 2014 18:54:54 +0200 Subject: [PATCH 005/741] add easyconfig for RDMC --- .../r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 easybuild/easyconfigs/r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb diff --git a/easybuild/easyconfigs/r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb b/easybuild/easyconfigs/r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb new file mode 100755 index 0000000000..b6cf4c64fb --- /dev/null +++ b/easybuild/easyconfigs/r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb @@ -0,0 +1,22 @@ +name = 'RDMC' +version = '2.9.5' + +homepage = 'http://code.icecube.wisc.edu/' +description = "The AMANDA-era RDMC physics library" + +toolchain = {'name': 'ictce', 'version': '5.5.0'} + +source_urls = ['http://code.icecube.wisc.edu/tools/distfiles/%(namelower)s/'] +sources = [SOURCELOWER_TAR_BZ2] + +builddependencies = [('texinfo', '5.2')] + +modextrapaths = {'LD_LIBRARY_PATH': 'lib/rdmc'} + +sanity_check_paths = { + 'files': ["bin/cpfeil", "include/rdmc/rdmc.h", "include/rdmc/rdmc.inc", + "lib/rdmc/librdmc.a", "lib/rdmc/librdmc.so"], + 'dirs': [], +} + +moduleclass = 'phys' -- GitLab From 72f490ad08421b7cb0f23974841eae70d262d305 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 10 Oct 2014 18:57:00 +0200 Subject: [PATCH 006/741] add missing texinfo easyconfig --- .../t/texinfo/texinfo-5.2-ictce-5.5.0.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 easybuild/easyconfigs/t/texinfo/texinfo-5.2-ictce-5.5.0.eb diff --git a/easybuild/easyconfigs/t/texinfo/texinfo-5.2-ictce-5.5.0.eb b/easybuild/easyconfigs/t/texinfo/texinfo-5.2-ictce-5.5.0.eb new file mode 100755 index 0000000000..dc542d4583 --- /dev/null +++ b/easybuild/easyconfigs/t/texinfo/texinfo-5.2-ictce-5.5.0.eb @@ -0,0 +1,18 @@ +name = 'texinfo' +version = '5.2' + +homepage = 'http://www.gnu.org/software/texinfo/' +description = "Texinfo is the official documentation format of the GNU project." + +toolchain = {'name': 'ictce', 'version': '5.5.0'} + +source_urls = ['http://ftpmirror.gnu.org/texinfo'] +sources = [SOURCE_TAR_GZ] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ['info', 'infokey', 'install-info', 'makeinfo', 'pdftexi2dvi', 'pod2texi', + 'texi2any', 'texi2dvi', 'texi2pdf', 'texindex']], + 'dirs': ["bin", "share"], +} + +moduleclass = 'tools' -- GitLab From 6bab96d03354a5d2bed8d5920cdfa01e028a4279 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 11 Oct 2014 12:57:32 +0200 Subject: [PATCH 007/741] fix srcversion for CFITSIO v3.300 --- easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb b/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb index 06ebf30047..e2fd327b03 100755 --- a/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb @@ -8,7 +8,7 @@ FITS (Flexible Image Transport System) data format.""" toolchain = {'name': 'ictce', 'version': '5.5.0'} toolchainopts = {'optarch': True, 'pic': True} -srcversion = '%s0' % version.replace('.', '') +srcversion = version.replace('.', '') source_urls = ['ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/'] sources = ['%%(namelower)s%s.tar.gz' % srcversion] -- GitLab From ef2c2773eb43f32bd3ea3702377e5ad46db01eee Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Mon, 10 Nov 2014 11:36:01 +1300 Subject: [PATCH 008/741] Use Binary easyblock --- .../i/IMOD/IMOD-4.7.12-RHEL6-64.eb | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb diff --git a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb new file mode 100644 index 0000000000..e39a5d8ef3 --- /dev/null +++ b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb @@ -0,0 +1,39 @@ +easyblock = 'Binary' + +name = 'IMOD' +version = '4.7.12_RHEL6-64' + +homepage = 'http://bio3d.colorado.edu/imod/' +description = """IMOD is a set of image processing, modeling and display +programs used for tomographic reconstruction and for 3D reconstruction of EM +serial sections and optical sections. The package contains tools for assembling +and aligning data within multiple types and sizes of image stacks, viewing 3-D +data from any orientation, and modeling and display of the image files. IMOD +was developed primarily by David Mastronarde, Rick Gaudette, Sue Held, Jim +Kremer, Quanren Xiong, and John Heumann at the University of Colorado.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} +toolchainopts = {'openmp': True} + +source_urls = ['http://bio3d.colorado.edu/imod/AMD64-RHEL5/'] +sources = ['%(namelower)s_%(version)s.csh'] + +install_cmd = "tcsh %(namelower)s_%(version)s.csh" + +# -dir: Choose location of installation directory +# -skip: do not attempt to deploy resource files in /etc +# -yes: do not prompt for confirmation +installopts = "-dir %(installdir)s -skip -yes" + +# The assumption by the install script is that installdir will be something +# like /usr/local. So it prefixes the install location with a lot of specific +# directories that are surplus to requirements. +postinstallcmds = ["mv %(installdir)s/%(name)s/* %(installdir)s/."] + +sanity_check_paths = { + 'files': ['IMOD-linux.sh', 'IMOD-linux.csh', 'installIMOD'], + 'dirs': ['bin', 'lib'] +} + +moduleclass = 'vis' + -- GitLab From fe42be6c71aeea35500030e32b81d6e3bdd3a7eb Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Mon, 10 Nov 2014 16:29:05 +1300 Subject: [PATCH 009/741] Updates to IMOD installation, including module file --- .../i/IMOD/IMOD-4.7.12-RHEL6-64.eb | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb index e39a5d8ef3..cfe2281f3e 100644 --- a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb +++ b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb @@ -28,12 +28,34 @@ installopts = "-dir %(installdir)s -skip -yes" # The assumption by the install script is that installdir will be something # like /usr/local. So it prefixes the install location with a lot of specific # directories that are surplus to requirements. -postinstallcmds = ["mv %(installdir)s/%(name)s/* %(installdir)s/."] +postinstallcmds = [ "mv %(installdir)s/%(name)s/* %(installdir)s/.", + "rm -r %(installdir)s/%(name)s %(installdir)s/%(namelower)s_" + ] +# "rm -r %(installdir)s/%(name)s-linux.*" sanity_check_paths = { 'files': ['IMOD-linux.sh', 'IMOD-linux.csh', 'installIMOD'], 'dirs': ['bin', 'lib'] } +# Assuming the system java /usr/java can be used. If not, we can +# cross that bridge. moduleclass = 'vis' - +modextravars = {'IMOD_DIR' : "$root", + 'IMOD_JAVADIR' : "/usr/java", + 'IMOD_PLUGIN_DIR' : "$root/lib/imodplug", + 'FOR_DISABLE_STACK_TRACE' : 1, + 'IMOD_QTLIBDIR' : "$root/qtlib"} +modaliases = {'subm' : "submfg $* &"} +modloadmsg = """Please set the environment variable IMOD_CALIB_DIR if appropriate.""" + +#MODULES +#------- +#include_modpath_extensions:Include $MODULEPATH extensions specified by module naming scheme. (default: True) +#modaliases: Aliases to be defined in module file (default: {}) +#modextrapaths: Extra paths to be prepended in module file (default: {}) +#modextravars: Extra environment variables to be added to module file (default: {}) +#modloadmsg: Message that should be printed when generated module is loaded (default: {}) +#modtclfooter: Footer to include in generated module file (Tcl syntax) (default: ) +#moduleforceunload: Force unload of all modules when loading the extension (default: False) +#moduleloadnoconflict: Don't check for conflicts, unload other versions instead (default: False) -- GitLab From 17cab7e752d01bb744015e90fd81ac5013023294 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 20 Nov 2014 19:23:05 +0100 Subject: [PATCH 010/741] add easyconfig for FragGeneScan --- .../FragGeneScan-1.9-intel-2014b.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/f/FragGeneScan/FragGeneScan-1.9-intel-2014b.eb diff --git a/easybuild/easyconfigs/f/FragGeneScan/FragGeneScan-1.9-intel-2014b.eb b/easybuild/easyconfigs/f/FragGeneScan/FragGeneScan-1.9-intel-2014b.eb new file mode 100644 index 0000000000..807f2d8eb8 --- /dev/null +++ b/easybuild/easyconfigs/f/FragGeneScan/FragGeneScan-1.9-intel-2014b.eb @@ -0,0 +1,25 @@ +easyblock = 'MakeCp' + +name = 'FragGeneScan' +version = '1.19' + +homepage = 'http://omics.informatics.indiana.edu/FragGeneScan/' +description = "FragGeneScan is an application for finding (fragmented) genes in short reads." + +toolchain = {'name': 'intel', 'version': '2014b'} + +source_urls = [SOURCEFORGE_SOURCE] +sources = ['%(name)s%(version)s.tar.gz'] + +buildopts = 'CC="$CC" CFLAG="$CFLAGS" fgs && chmod -R go+rx *.py *.pl train example' + +files_to_copy = ['FragGeneScan', 'FGS_gff.py', 'post_process.pl', 'run_FragGeneScan.pl', 'example', 'train'] + +modextrapaths = {'PATH': ['']} + +sanity_check_paths = { + 'files': ['FGS_gff.py', 'FragGeneScan', 'post_process.pl', 'run_FragGeneScan.pl'], + 'dirs': ['example', 'train'], +} + +moduleclass = 'bio' -- GitLab From 7d2d728ae5264cb4fa089323f558ad597235b1c1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 20 Nov 2014 20:42:57 +0100 Subject: [PATCH 011/741] fix FragGeneScan filename --- ...neScan-1.9-intel-2014b.eb => FragGeneScan-1.19-intel-2014b.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/f/FragGeneScan/{FragGeneScan-1.9-intel-2014b.eb => FragGeneScan-1.19-intel-2014b.eb} (100%) diff --git a/easybuild/easyconfigs/f/FragGeneScan/FragGeneScan-1.9-intel-2014b.eb b/easybuild/easyconfigs/f/FragGeneScan/FragGeneScan-1.19-intel-2014b.eb similarity index 100% rename from easybuild/easyconfigs/f/FragGeneScan/FragGeneScan-1.9-intel-2014b.eb rename to easybuild/easyconfigs/f/FragGeneScan/FragGeneScan-1.19-intel-2014b.eb -- GitLab From 020fe80f5034e5af678bfa304b816042eaa4e937 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 17:09:23 +0100 Subject: [PATCH 012/741] Libint 2.0.5 for intel/2015a --- .../l/Libint/Libint-2.0.5-intel-2015a.eb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb new file mode 100644 index 0000000000..3e31d41c43 --- /dev/null +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb @@ -0,0 +1,14 @@ +name = 'Libint' +version = '2.0.5' + +homepage = 'https://github.com/evaleev/libint' +description = """Libint library is used to evaluate the traditional (electron repulsion) and certain novel two-body + matrix elements (integrals) over Cartesian Gaussian functions used in modern atomic and molecular theory.""" + +toolchain = {'name': 'intel', 'version': '2015a'} +toolchainopts = {'pic': True} + +sources = ['release-2-0-5.tar.gz'] +source_urls = ['https://github.com/evaleev/libint/archive/'] + +moduleclass = 'chem' -- GitLab From a408bf8a8b61d5ae228248d44d0509f670fdebb6 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 17:15:04 +0100 Subject: [PATCH 013/741] Added autogen to libint-2.0.5 --- easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb index 3e31d41c43..c9f9fb6f34 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb @@ -11,4 +11,8 @@ toolchainopts = {'pic': True} sources = ['release-2-0-5.tar.gz'] source_urls = ['https://github.com/evaleev/libint/archive/'] +preconfigopts = './autogen.sh && ' + +builddependencies = [('Autotools', '20150119', '-GCC-4.9.2')] + moduleclass = 'chem' -- GitLab From 1f135d8d0400a645b961aeff8e289822fedd649b Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 17:17:41 +0100 Subject: [PATCH 014/741] libint: correct toolchain spec for build deps --- easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb index c9f9fb6f34..e05864fab6 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb @@ -13,6 +13,6 @@ source_urls = ['https://github.com/evaleev/libint/archive/'] preconfigopts = './autogen.sh && ' -builddependencies = [('Autotools', '20150119', '-GCC-4.9.2')] +builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))] moduleclass = 'chem' -- GitLab From 75da2a27442abbd52d79f049c775485c54eb881b Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 17:19:28 +0100 Subject: [PATCH 015/741] libint: work around incorrect permisions --- easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb index e05864fab6..4a2c6ac340 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb @@ -11,7 +11,7 @@ toolchainopts = {'pic': True} sources = ['release-2-0-5.tar.gz'] source_urls = ['https://github.com/evaleev/libint/archive/'] -preconfigopts = './autogen.sh && ' +preconfigopts = 'sh autogen.sh && ' builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))] -- GitLab From a51b7feb1d06b30aaabb930fa6210465f16978a3 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 17:30:56 +0100 Subject: [PATCH 016/741] Added GMP-6 for intel/2015a --- .../g/GMP/GMP-6.0.0a-intel-2015a.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb new file mode 100644 index 0000000000..b9c870dbee --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'GMP' +version = '6.0.0a' + +homepage = 'http://gmplib.org/' +description = """GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + +toolchain = {'name': 'intel', 'version': '2015a'} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://ftp.gnu.org/gnu/gmp'] + +# enable C++ interface +configopts = '--enable-cxx' + +runtest = 'check' + +sanity_check_paths = { + 'files': ['lib/libgmp.%s' % SHLIB_EXT, 'include/gmp.h'], + 'dirs': [], +} + +moduleclass = 'math' -- GitLab From 871d1105e8bc91d8940de02e1a77f1bbaabe395d Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 17:31:13 +0100 Subject: [PATCH 017/741] Libint: use new deps --- easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb index 4a2c6ac340..b558f56bed 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb @@ -11,6 +11,11 @@ toolchainopts = {'pic': True} sources = ['release-2-0-5.tar.gz'] source_urls = ['https://github.com/evaleev/libint/archive/'] +dependencies = [ + ('GMP', '6.0.0a'), + ('Boost', '1.57.0', '-Python-2.7.9'), +] + preconfigopts = 'sh autogen.sh && ' builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))] -- GitLab From eb7feca830c49a4a1700fa19740bae0ca0e8b53e Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 21:05:44 +0100 Subject: [PATCH 018/741] Libint: fix remarks --- easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb index b558f56bed..25c976800b 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb @@ -8,7 +8,7 @@ description = """Libint library is used to evaluate the traditional (electron re toolchain = {'name': 'intel', 'version': '2015a'} toolchainopts = {'pic': True} -sources = ['release-2-0-5.tar.gz'] +sources = ['release-%s.tar.gz' % '-'.join(version.split('.'))] source_urls = ['https://github.com/evaleev/libint/archive/'] dependencies = [ @@ -16,8 +16,8 @@ dependencies = [ ('Boost', '1.57.0', '-Python-2.7.9'), ] -preconfigopts = 'sh autogen.sh && ' - builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))] +preconfigopts = 'sh autogen.sh && ' + moduleclass = 'chem' -- GitLab From 6da23c633530ece4f990404efa862d8e0375695b Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 21:07:41 +0100 Subject: [PATCH 019/741] Libint: fix remarks part 2 --- easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb index 25c976800b..71dd5e8235 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb @@ -18,6 +18,7 @@ dependencies = [ builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))] +# no exec perm on the autogen.sh script preconfigopts = 'sh autogen.sh && ' moduleclass = 'chem' -- GitLab From 908e17076fd7b1d777cac4fd7da56bfa65b8a310 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 21:44:33 +0100 Subject: [PATCH 020/741] Add versionsuffix for Libint. I don't like this, but there seems to be no solution for the moment. --- ...ntel-2015a.eb => Libint-2.0.5-intel-2015a-Python-2.7.9.eb} | 4 ++++ 1 file changed, 4 insertions(+) rename easybuild/easyconfigs/l/Libint/{Libint-2.0.5-intel-2015a.eb => Libint-2.0.5-intel-2015a-Python-2.7.9.eb} (74%) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb similarity index 74% rename from easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb rename to easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb index 71dd5e8235..5fecdd649f 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb @@ -1,5 +1,9 @@ name = 'Libint' version = '2.0.5' +# I'm really really not happy about this. It shouldn't be here. But PSI needs Boost-Python, +# so this also uses Boost-Python, so we add a Python suffix. This needs a better solution. +# Just to be clear: Libint doesn't need python. +versionsuffix = '-Python-2.7.9' homepage = 'https://github.com/evaleev/libint' description = """Libint library is used to evaluate the traditional (electron repulsion) and certain novel two-body -- GitLab From c62a6922633260960144dac36e5aa83285a8b0b6 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 21:54:05 +0100 Subject: [PATCH 021/741] Libint: Use versionsuffix everywhere --- .../l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb index 5fecdd649f..8a3e779142 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb @@ -17,7 +17,7 @@ source_urls = ['https://github.com/evaleev/libint/archive/'] dependencies = [ ('GMP', '6.0.0a'), - ('Boost', '1.57.0', '-Python-2.7.9'), + ('Boost', '1.57.0', versionsuffix), ] builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))] -- GitLab From b97c3f271b1641ccbc54e0f326fb4eae22e3b906 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 23 Feb 2015 22:04:01 +0100 Subject: [PATCH 022/741] Libint: less dramatic comment --- .../l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb index 8a3e779142..7280d68ec2 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb @@ -1,8 +1,6 @@ name = 'Libint' version = '2.0.5' -# I'm really really not happy about this. It shouldn't be here. But PSI needs Boost-Python, -# so this also uses Boost-Python, so we add a Python suffix. This needs a better solution. -# Just to be clear: Libint doesn't need python. +# Some stuff that uses Libint (PSI) needs Boost-Python, so we inherit the versionsuffix here: #1421 versionsuffix = '-Python-2.7.9' homepage = 'https://github.com/evaleev/libint' -- GitLab From 125cf5c07cd12de0d8d87139fbf52f6e9e6c1162 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 24 Feb 2015 12:02:29 +0100 Subject: [PATCH 023/741] Let icc be more strict with fp for GMP --- easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb index b9c870dbee..83eeacce00 100644 --- a/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb +++ b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb @@ -14,6 +14,7 @@ source_urls = ['http://ftp.gnu.org/gnu/gmp'] # enable C++ interface configopts = '--enable-cxx' +preconfigopts = 'CFLAGS="-O2 -xHost -ftz -fp-speculation=strict -fp-model precise" CFLAGS="$CFLAGS" ' runtest = 'check' -- GitLab From 006586a083e7fe72edd64064d1cc116e9c68243f Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 24 Feb 2015 12:11:46 +0100 Subject: [PATCH 024/741] GMP: use toolchainopts --- easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb index 83eeacce00..70c2a1cb32 100644 --- a/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb +++ b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb @@ -8,13 +8,13 @@ description = """GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. """ toolchain = {'name': 'intel', 'version': '2015a'} +toolchainopts = {'precise': True} sources = [SOURCELOWER_TAR_BZ2] source_urls = ['http://ftp.gnu.org/gnu/gmp'] # enable C++ interface configopts = '--enable-cxx' -preconfigopts = 'CFLAGS="-O2 -xHost -ftz -fp-speculation=strict -fp-model precise" CFLAGS="$CFLAGS" ' runtest = 'check' -- GitLab From a8e4451ca23a1d9d288226e61fdb81a6e2511997 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 24 Feb 2015 12:25:51 +0100 Subject: [PATCH 025/741] Libint: parrallel to 1 --- .../l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb index 7280d68ec2..af61a2e991 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb @@ -23,4 +23,6 @@ builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))] # no exec perm on the autogen.sh script preconfigopts = 'sh autogen.sh && ' +parallel = 1 + moduleclass = 'chem' -- GitLab From ad4c0ddb3dae90b7ab08f8236c17f398cf4c511a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 3 Jun 2015 10:02:45 +0200 Subject: [PATCH 026/741] use GCC GMP as intel and GMP don't get along --- .../l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb index af61a2e991..91014bdb21 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb @@ -14,7 +14,7 @@ sources = ['release-%s.tar.gz' % '-'.join(version.split('.'))] source_urls = ['https://github.com/evaleev/libint/archive/'] dependencies = [ - ('GMP', '6.0.0a'), + ('GMP', '6.0.0a', '', ('GCC', '4.9.2')), ('Boost', '1.57.0', versionsuffix), ] -- GitLab From 6e3352cf605895a127b60538ea57584635d1fd6e Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Mon, 8 Jun 2015 11:29:16 +1200 Subject: [PATCH 027/741] Removed some unnecessary comments --- easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb index cfe2281f3e..1bf6bb89e6 100644 --- a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb +++ b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb @@ -31,7 +31,6 @@ installopts = "-dir %(installdir)s -skip -yes" postinstallcmds = [ "mv %(installdir)s/%(name)s/* %(installdir)s/.", "rm -r %(installdir)s/%(name)s %(installdir)s/%(namelower)s_" ] -# "rm -r %(installdir)s/%(name)s-linux.*" sanity_check_paths = { 'files': ['IMOD-linux.sh', 'IMOD-linux.csh', 'installIMOD'], @@ -48,14 +47,3 @@ modextravars = {'IMOD_DIR' : "$root", 'IMOD_QTLIBDIR' : "$root/qtlib"} modaliases = {'subm' : "submfg $* &"} modloadmsg = """Please set the environment variable IMOD_CALIB_DIR if appropriate.""" - -#MODULES -#------- -#include_modpath_extensions:Include $MODULEPATH extensions specified by module naming scheme. (default: True) -#modaliases: Aliases to be defined in module file (default: {}) -#modextrapaths: Extra paths to be prepended in module file (default: {}) -#modextravars: Extra environment variables to be added to module file (default: {}) -#modloadmsg: Message that should be printed when generated module is loaded (default: {}) -#modtclfooter: Footer to include in generated module file (Tcl syntax) (default: ) -#moduleforceunload: Force unload of all modules when loading the extension (default: False) -#moduleloadnoconflict: Don't check for conflicts, unload other versions instead (default: False) -- GitLab From e8b5561e40f275e54b631ee27d2b79603cb844bc Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Mon, 8 Jun 2015 11:31:03 +1200 Subject: [PATCH 028/741] Renamed dash to underscore in the hope that fixes an assertion --- .../i/IMOD/{IMOD-4.7.12-RHEL6-64.eb => IMOD-4.7.12_RHEL6-64.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/i/IMOD/{IMOD-4.7.12-RHEL6-64.eb => IMOD-4.7.12_RHEL6-64.eb} (100%) diff --git a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12_RHEL6-64.eb similarity index 100% rename from easybuild/easyconfigs/i/IMOD/IMOD-4.7.12-RHEL6-64.eb rename to easybuild/easyconfigs/i/IMOD/IMOD-4.7.12_RHEL6-64.eb -- GitLab From 767f0cd2afc2a621e7d2df61ee933c2fefdbe54c Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Thu, 8 Oct 2015 08:17:16 +1300 Subject: [PATCH 029/741] Updated configuration file for new release of IMOD 4.7 --- ....12_RHEL6-64.eb => IMOD-4.7.15_RHEL6-64_CUDA6.0.eb} | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) rename easybuild/easyconfigs/i/IMOD/{IMOD-4.7.12_RHEL6-64.eb => IMOD-4.7.15_RHEL6-64_CUDA6.0.eb} (86%) diff --git a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12_RHEL6-64.eb b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb similarity index 86% rename from easybuild/easyconfigs/i/IMOD/IMOD-4.7.12_RHEL6-64.eb rename to easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb index 1bf6bb89e6..7ada1695f6 100644 --- a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.12_RHEL6-64.eb +++ b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb @@ -1,7 +1,8 @@ easyblock = 'Binary' name = 'IMOD' -version = '4.7.12_RHEL6-64' +version = '4.7.15' +versionsuffix = '_RHEL6-64_CUDA6.0' homepage = 'http://bio3d.colorado.edu/imod/' description = """IMOD is a set of image processing, modeling and display @@ -14,11 +15,12 @@ Kremer, Quanren Xiong, and John Heumann at the University of Colorado.""" toolchain = {'name': 'dummy', 'version': 'dummy'} toolchainopts = {'openmp': True} +dependencies = [('CUDA', '6.0.37')] source_urls = ['http://bio3d.colorado.edu/imod/AMD64-RHEL5/'] -sources = ['%(namelower)s_%(version)s.csh'] +sources = ['%(namelower)s_%(version)s%(versionsuffix)s.csh'] -install_cmd = "tcsh %(namelower)s_%(version)s.csh" +install_cmd = "tcsh %(namelower)s_%(version)s%(versionsuffix)s.csh" # -dir: Choose location of installation directory # -skip: do not attempt to deploy resource files in /etc @@ -29,7 +31,7 @@ installopts = "-dir %(installdir)s -skip -yes" # like /usr/local. So it prefixes the install location with a lot of specific # directories that are surplus to requirements. postinstallcmds = [ "mv %(installdir)s/%(name)s/* %(installdir)s/.", - "rm -r %(installdir)s/%(name)s %(installdir)s/%(namelower)s_" + "rm -r %(installdir)s/%(name)s %(installdir)s/%(namelower)s_%(version)s" ] sanity_check_paths = { -- GitLab From 1437dcce851173ae1c8ccdfe00f17e31ead4c50b Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Tue, 27 Oct 2015 09:45:39 +1300 Subject: [PATCH 030/741] EasyConfig for installing Molcas from precompiled binaries. Note that the BinariesTarball Easyblock must be upgraded before testing this EasyConfig. --- .../Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb diff --git a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb new file mode 100644 index 0000000000..dc29993f79 --- /dev/null +++ b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb @@ -0,0 +1,27 @@ +easyblock = 'BinariesTarball' + +name = 'Molcas' +version = '8.0-15.06.18' +versionsuffix = '_CentOS_6.6_x86_64' + +homepage = 'http://www.molcas.org' +description = """Molcas is an ab initio quantum chemistry software package +developed by scientists to be used by scientists. The basic philosophy is is to +be able to treat general electronic structures for molecules consisting of +atoms from most of the periodic table. As such, the primary focus of the +package is on multiconfigurational methods with applications typically +connected to the treatment of highly degenerate states.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +source_urls = ['http://www.kvant.kemi.uu.se/molcas/'] +sources = ['%(namelower)s-%(version)s%(versionsuffix)s.tgz'] + +files_to_copy = [('sbin/molcas.driver', 'molcas')] + +sanity_check_paths = { + 'files': ['bin/molcas'], + 'dirs': ['bin'], +} + +moduleclass = 'chem' -- GitLab From 0cfd5555d9ff67108597e58dc909ffb83302f951 Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Tue, 27 Oct 2015 15:27:03 +1300 Subject: [PATCH 031/741] Changes to the Molcas easyconfig to reflect that the contents of the tarball must be present with the installation, not just a copy of molcas.driver --- .../Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb index dc29993f79..2a6849dfa3 100644 --- a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb +++ b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb @@ -1,4 +1,4 @@ -easyblock = 'BinariesTarball' +easyblock = 'PackedBinary' name = 'Molcas' version = '8.0-15.06.18' @@ -16,8 +16,17 @@ toolchain = {'name': 'dummy', 'version': 'dummy'} source_urls = ['http://www.kvant.kemi.uu.se/molcas/'] sources = ['%(namelower)s-%(version)s%(versionsuffix)s.tgz'] +unpack_options = "--transform='s,^%(namelower)s-%(version)s%(versionsuffix)s,%(namelower)s_files,'" -files_to_copy = [('sbin/molcas.driver', 'molcas')] +buildininstalldir = True +skipsteps = ['install'] + +postinstallcmds = [ + 'mkdir -p %(installdir)s/bin', + 'cp %(installdir)s/%(namelower)s_files/sbin/molcas.driver %(installdir)s/bin/molcas', +] + +#files_to_copy = [('sbin/molcas.driver', 'molcas')] sanity_check_paths = { 'files': ['bin/molcas'], @@ -25,3 +34,4 @@ sanity_check_paths = { } moduleclass = 'chem' +modextravars = {'MOLCAS': '%(installdir)s/%(namelower)s_files'} -- GitLab From 721d754e6506b788be520a2e3f7def6527f2594e Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Tue, 27 Oct 2015 17:02:15 +1300 Subject: [PATCH 032/741] Remove unnecessary comment --- .../m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb index 2a6849dfa3..213b10dd3a 100644 --- a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb +++ b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb @@ -26,8 +26,6 @@ postinstallcmds = [ 'cp %(installdir)s/%(namelower)s_files/sbin/molcas.driver %(installdir)s/bin/molcas', ] -#files_to_copy = [('sbin/molcas.driver', 'molcas')] - sanity_check_paths = { 'files': ['bin/molcas'], 'dirs': ['bin'], -- GitLab From 32b45df226ff531865587b3eecec0052f31aa491 Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Mon, 2 Nov 2015 11:31:07 +1300 Subject: [PATCH 033/741] Reformatted --- .../i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb index 7ada1695f6..100020fb13 100644 --- a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb +++ b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb @@ -41,11 +41,13 @@ sanity_check_paths = { # Assuming the system java /usr/java can be used. If not, we can # cross that bridge. -moduleclass = 'vis' -modextravars = {'IMOD_DIR' : "$root", - 'IMOD_JAVADIR' : "/usr/java", - 'IMOD_PLUGIN_DIR' : "$root/lib/imodplug", - 'FOR_DISABLE_STACK_TRACE' : 1, - 'IMOD_QTLIBDIR' : "$root/qtlib"} +modextravars = { + 'IMOD_DIR' : "$root", + 'IMOD_JAVADIR' : "/usr/java", + 'IMOD_PLUGIN_DIR' : "$root/lib/imodplug", + 'FOR_DISABLE_STACK_TRACE' : 1, + 'IMOD_QTLIBDIR' : "$root/qtlib" +} modaliases = {'subm' : "submfg $* &"} modloadmsg = """Please set the environment variable IMOD_CALIB_DIR if appropriate.""" +moduleclass = 'vis' -- GitLab From 35b1c9a76a787ccf9bf8b51e5c7ba23e2f18e2ee Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 9 Nov 2015 11:31:44 +0100 Subject: [PATCH 034/741] libmatheval 1.1.11 with intel/2015b --- .../b/byacc/byacc-20150711-intel-2015b.eb | 22 +++++++++++++ .../g/guile/guile-1.8.8-intel-2015b.eb | 31 +++++++++++++++++ .../l/libffi/libffi-3.0.13-intel-2015b.eb | 25 ++++++++++++++ .../libmatheval-1.1.11-intel-2015b.eb | 33 +++++++++++++++++++ .../libunistring-0.9.3-intel-2015b.eb | 26 +++++++++++++++ .../pkg-config-0.27.1-intel-2015b.eb | 27 +++++++++++++++ 6 files changed, 164 insertions(+) create mode 100644 easybuild/easyconfigs/b/byacc/byacc-20150711-intel-2015b.eb create mode 100644 easybuild/easyconfigs/g/guile/guile-1.8.8-intel-2015b.eb create mode 100644 easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb create mode 100644 easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.11-intel-2015b.eb create mode 100644 easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-intel-2015b.eb create mode 100644 easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-intel-2015b.eb diff --git a/easybuild/easyconfigs/b/byacc/byacc-20150711-intel-2015b.eb b/easybuild/easyconfigs/b/byacc/byacc-20150711-intel-2015b.eb new file mode 100644 index 0000000000..1578ff69e4 --- /dev/null +++ b/easybuild/easyconfigs/b/byacc/byacc-20150711-intel-2015b.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'byacc' +version = '20150711' + +homepage = 'http://invisible-island.net/byacc/byacc.html' +description = """Berkeley Yacc (byacc) is generally conceded to be the best yacc variant available. + In contrast to bison, it is written to avoid dependencies upon a particular compiler.""" + +toolchain = {'name': 'intel', 'version': '2015b'} + +sources = [SOURCELOWER_TGZ] +source_urls = ['ftp://invisible-island.net/byacc'] + +checksums = ['2700401030583c4e9169ac7ea7d08de8'] + +sanity_check_paths = { + 'files': ["bin/yacc"], + 'dirs': [] +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/g/guile/guile-1.8.8-intel-2015b.eb b/easybuild/easyconfigs/g/guile/guile-1.8.8-intel-2015b.eb new file mode 100644 index 0000000000..766148f244 --- /dev/null +++ b/easybuild/easyconfigs/g/guile/guile-1.8.8-intel-2015b.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'guile' +version = '1.8.8' + +homepage = 'http://www.gnu.org/software/guile' +description = """Guile is the GNU Ubiquitous Intelligent Language for Extensions, + the official extension language for the GNU operating system.""" + +toolchain = {'name': 'intel', 'version': '2015b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [ + ('libtool', '2.4.6', '', ('GNU', '4.9.3-2.25')), + ('GMP', '6.0.0a'), + ('libunistring', '0.9.3'), + ('pkg-config', '0.27.1'), + ('libffi', '3.0.13'), + ('libreadline', '6.3'), +] + +configopts = " --enable-error-on-warning=no" + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["guile", 'guile-config', 'guile-snarf', 'guile-tools']] + ["lib/libguile.a", "include/libguile.h"], + 'dirs': [] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb b/easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb new file mode 100644 index 0000000000..535d967631 --- /dev/null +++ b/easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'libffi' +version = '3.0.13' + +homepage = 'http://sourceware.org/libffi/' +description = """The libffi library provides a portable, high level programming interface to various calling +conventions. This allows a programmer to call any function specified by a call interface description at run-time.""" + +toolchain = {'name': 'intel', 'version': '2015b'} + +source_urls = [ + 'ftp://sourceware.org/pub/libffi/', + 'http://www.mirrorservice.org/sites/sourceware.org/pub/libffi/', +] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['libffi-%(version)s_include-xmmintrin.patch'] + +sanity_check_paths = { + 'files': ['lib/libffi.%s' % SHLIB_EXT, 'lib/libffi.a'], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.11-intel-2015b.eb b/easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.11-intel-2015b.eb new file mode 100644 index 0000000000..5c07ab422c --- /dev/null +++ b/easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.11-intel-2015b.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'libmatheval' +version = '1.1.11' + +homepage = 'http://www.gnu.org/software/libmatheval/' +description = """GNU libmatheval is a library (callable from C and Fortran) to parse + and evaluate symbolic expressions input as text.""" + +toolchain = {'name': 'intel', 'version': '2015b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [ + ('flex', '2.5.39'), + ('Bison', '3.0.4'), + ('byacc', '20150711'), + ('guile', '1.8.8'), +] + +configopts = '--with-pic ' + +# fix for guile-config being broken because shebang line contains full path to bin/guile +configopts += 'GUILE_CONFIG="$EBROOTGUILE/bin/guile -e main -s $EBROOTGUILE/bin/guile-config"' + +sanity_check_paths = { + 'files': ['lib/libmatheval.a', 'include/matheval.h'], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-intel-2015b.eb b/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-intel-2015b.eb new file mode 100644 index 0000000000..0555900e19 --- /dev/null +++ b/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-intel-2015b.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'libunistring' +version = '0.9.3' + +homepage = 'http://www.gnu.org/software/libunistring/' +description = """This library provides functions for manipulating Unicode strings and for manipulating C strings + according to the Unicode standard.""" + +toolchain = {'name': 'intel', 'version': '2015b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +patches = ['libunistring_icc_builtin_nan-inf.patch'] + +parallel = 1 + +sanity_check_paths = { + 'files' : ['lib/libunistring.a', 'lib/libunistring.so'] + + ['include/uni%s.h' % x for x in ['case', 'conv', 'ctype', 'lbrk', 'name', 'norm', + 'stdio', 'str', 'types', 'wbrk', 'width']], + 'dirs' : ['include/unistring'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-intel-2015b.eb b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-intel-2015b.eb new file mode 100644 index 0000000000..f271d1a673 --- /dev/null +++ b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-intel-2015b.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'pkg-config' +version = '0.27.1' + +homepage = 'http://www.freedesktop.org/wiki/Software/pkg-config/' +description = """pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the + correct compiler options on the command line so an application can use + gcc -o test test.c `pkg-config --libs --cflags glib-2.0` + for instance, rather than hard-coding values on where to find glib (or other libraries).""" + +# don't use PAX, it might break. +tar_config_opts = True + +toolchain = {'name': 'intel', 'version': '2015b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://pkgconfig.freedesktop.org/releases/'] + +configopts = " --with-internal-glib" + +sanity_check_paths = { + 'files': ['bin/pkg-config'], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From 3c206f28aadea26acb01280e4f526ef95d8e8e0e Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 9 Nov 2015 15:48:06 +0100 Subject: [PATCH 035/741] Plumed 2.2 with intel/2015b --- .../p/PLUMED/PLUMED-2.2.0-intel-2015b.eb | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 easybuild/easyconfigs/p/PLUMED/PLUMED-2.2.0-intel-2015b.eb diff --git a/easybuild/easyconfigs/p/PLUMED/PLUMED-2.2.0-intel-2015b.eb b/easybuild/easyconfigs/p/PLUMED/PLUMED-2.2.0-intel-2015b.eb new file mode 100644 index 0000000000..62ef96b466 --- /dev/null +++ b/easybuild/easyconfigs/p/PLUMED/PLUMED-2.2.0-intel-2015b.eb @@ -0,0 +1,42 @@ +# by Ward Poelmans + +easyblock = 'ConfigureMake' + +name = 'PLUMED' +version = '2.2.0' + +homepage = 'http://www.plumed-code.org' +description = """PLUMED is an open source library for free energy calculations in molecular systems which + works together with some of the most popular molecular dynamics engines. Free energy calculations can be + performed as a function of many order parameters with a particular focus on biological problems, using + state of the art methods such as metadynamics, umbrella sampling and Jarzynski-equation based steered MD. + The software, written in C++, can be easily interfaced with both fortran and C/C++ codes. +""" + +toolchain = {'name': 'intel', 'version': '2015b'} +toolchainopts = {'usempi': 'True'} + +source_urls = ['https://github.com/plumed/plumed2/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), + ('GSL', '1.16'), + ('libmatheval', '1.1.11'), +] + +preconfigopts = 'FC=$MPIF90 LIBS="$LIBLAPACK $LIBS" ' +configopts = ' --exec-prefix=%(installdir)s --enable-gsl' +prebuildopts = 'source sourceme.sh && ' + +sanity_check_paths = { + 'files': ['bin/plumed', 'lib/libplumedKernel.so', 'lib/libplumed.so'], + 'dirs': ['lib/plumed'] +} + +modextrapaths = { + 'PLUMED_KERNEL': 'lib/libplumedKernel.so', + 'PLUMED_ROOT': 'lib/plumed', +} + +moduleclass = 'chem' -- GitLab From b04b9aa721e202e6944765e3e25be3ec656a40ad Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 9 Nov 2015 16:59:29 +0100 Subject: [PATCH 036/741] Added DL_POLY with plumed 2.2 --- ...DL_POLY_Classic-1.9-intel-2015b-plumed2.eb | 35 + .../d/DL_POLY_Classic/plumed-2.2.patch | 93945 ++++++++++++++++ 2 files changed, 93980 insertions(+) create mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb create mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/plumed-2.2.patch diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb new file mode 100644 index 0000000000..fa6e102be0 --- /dev/null +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb @@ -0,0 +1,35 @@ +easyblock = 'MakeCp' + +name = 'DL_POLY_Classic' +version = '1.9' +versionsuffix = '-plumed2' + +homepage = 'http://ccpforge.cse.rl.ac.uk/gf/project/dl_poly_classic/' +description = """DL_POLY Classic is a freely available molecular dynamics program developed + from the DL_POLY_2 package. This version does not install the java gui.""" + +toolchain = {'name': 'intel', 'version': '2015b'} + +sources = ['dl_class_%(version)s.tar.gz'] +source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] + +builddependencies = [('PLUMED', '2.2')] + +patches = [('plumed-2.2.patch', 1)] + +prebuildopts = 'cd srcmod && ' +buildopts = 'gfortran' + +files_to_copy = [(["execute/cleanup", "execute/copy", "execute/DLPOLY.X", + "execute/gopoly", "execute/gui", "execute/select", + "execute/store", "execute/supa"], 'bin')] + +sanity_check_paths = { + 'files': ['bin/DLPOLY.X'], + 'dirs': [] +} + +# parallel build tends to break +parallel = 1 + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/plumed-2.2.patch b/easybuild/easyconfigs/d/DL_POLY_Classic/plumed-2.2.patch new file mode 100644 index 0000000000..9e8fe4cde6 --- /dev/null +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/plumed-2.2.patch @@ -0,0 +1,93945 @@ +# This patch allows to use Plumed 2.2 with DL_POLY. It is autogenerated with the help +# of Plumed and https://groups.google.com/forum/#!topic/plumed-users/cWaIDU5F6Bw +# Follow the instructions on that forum and you can generate the patch below +# The makefile is also adjust to use the EB set values for building +# Ward Poelmans +diff -urN dl_class_1.9.orig/Plumed.cmake dl_class_1.9/Plumed.cmake +--- dl_class_1.9.orig/Plumed.cmake 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/Plumed.cmake 2015-11-09 14:26:25.657769545 +0100 +@@ -0,0 +1,3 @@ ++# PLUMED: runtime installation ++set(PLUMED_LOAD "$ENV{EBROOTPLUMED}/lib/plumed/obj/Plumed.o" -ldl ) ++set(PLUMED_DEPENDENCIES ) +diff -urN dl_class_1.9.orig/Plumed.h dl_class_1.9/Plumed.h +--- dl_class_1.9.orig/Plumed.h 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/Plumed.h 2015-11-09 14:26:31.797805893 +0100 +@@ -0,0 +1,500 @@ ++/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++ Copyright (c) 2011-2015 The plumed team ++ (see the PEOPLE file at the root of the distribution for a list of names) ++ ++ See http://www.plumed-code.org for more information. ++ ++ This file is part of plumed, version 2. ++ ++ plumed is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or ++ (at your option) any later version. ++ ++ plumed is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with plumed. If not, see . +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ ++#ifndef __PLUMED_wrapper_Plumed_h ++#define __PLUMED_wrapper_Plumed_h ++ ++/** ++\page ReferencePlumedH Reference for interfacing MD codes with PLUMED ++ ++ Plumed.h and Plumed.c contain the external plumed interface, which is used to ++ integrate it with MD engines. This interface is very general, and is expected ++ not to change across plumed versions. Plumed.c also implements a dummy version ++ of the interface, so as to allow a code to be fully linked even if the plumed ++ library is not available yet. These files could be directly included in the official ++ host MD distribution. In this manner, it will be sufficient to link the plumed ++ library at link time (on all systems) or directly at runtime (on system where ++ dynamic loading is enabled) to include plumed features. ++ ++ Why is Plumed.c written in C and not C++? The reason is that the resulting Plumed.o ++ needs to be linked with the host MD code immediately (whereas the rest of plumed ++ could be linked a posteriori). Imagine the MD code is written in FORTRAN: when we ++ link the Plumed.o file we would like not to need any C++ library linked. In this ++ manner, we do not need to know which C++ compiler will be used to compile plumed. ++ The C++ library is only linked to the "rest" of plumed, which actually use it. ++ Anyway, Plumed.c is written in such a manner to allow its compilation also in C++ ++ (C++ is a bit stricter than C; compatibility is checked when PlumedStatic.cpp, ++ which basically includes Plumed.c, is compiled with the C++ compiler). This will ++ allow e.g. MD codes written in C++ to just incorporate Plumed.c (maybe renamed into ++ Plumed.cpp), without the need of configuring a plain C compiler. ++ ++ Plumed interface can be used from C, C++ and FORTRAN. Everything concerning plumed ++ is hidden inside a single object type, which is described in C by a structure ++ (struct \ref plumed), in C++ by a class (PLMD::Plumed) and in FORTRAN by a ++ fixed-length string (CHARACTER(LEN=32)). Obviously C++ can use both struct ++ and class interfaces, but the first should be preferred. The reference interface ++ is the C one, whereas FORTRAN and C++ interfaces are implemented as wrappers ++ around it. ++ ++ In the C++ interface, all the routines are implemented as methods of PLMD::Plumed. ++ In the C and FORTRAN interfaces, all the routines are named plumed_*, to ++ avoid potential name clashes. Notice that the entire plumed library ++ is implemented in C++, and it is hidden inside the PLMD namespace. ++ ++ Handlers to the plumed object can be converted among different representations, ++ to allow inter-operability among languages. In C, there are tools to convert ++ to/from FORTRAN, whereas in C++ there are tools to convert to/from FORTRAN and C. ++ ++ These handlers only contain a pointer to the real structure, so that ++ when a plumed object is brought from one language to another, ++ it brings a reference to the same environment. ++ ++ Moreover, to simplify life in all cases where a single Plumed object is ++ required for the entire simulation (which covers most of the practical ++ applications with conventional MD codes) it is possible to take advantage ++ of a global interface, which is implicitly referring to a unique global instance. ++ The global object should still be initialized and finalized properly. ++ ++ The basic method to send a message to plumed is ++\verbatim ++ (C) plumed_cmd ++ (C++) PLMD::Plumed::cmd ++ (FORTRAN) PLUMED_F_CMD ++\endverbatim ++ ++ To initialize a plumed object, use: ++\verbatim ++ (C) plumed_create ++ (C++) (constructor of PLMD::Plumed) ++ (FORTRAN) PLUMED_F_CREATE ++\endverbatim ++ ++ To finalize it, use ++\verbatim ++ (C) plumed_finalize ++ (C++) (destructor of PLMD::Plumed) ++ (FORTRAN) PLUMED_F_FINALIZE ++\endverbatim ++ ++ To access to the global-object, use ++\verbatim ++ (C) plumed_gcreate, plumed_gfinalize, plumed_gcmd ++ (C++) PLMD::Plumed::gcreate, PLMD::Plumed::gfinalize, PLMD::Plumed::gcmd ++ (FORTRAN) PLUMED_F_GCREATE, PLUMED_F_GFINALIZE, PLUMED_F_GCMD ++\endverbatim ++ ++ To check if the global object has been initialized, use ++\verbatim ++ (C) plumed_ginitialized ++ (C++) PLMD::Plumed::ginitialized ++ (FORTRAN) PLUMED_F_GINITIALIZED ++\endverbatim ++ ++ To check if plumed library is available (this is useful for runtime linking), use ++\verbatim ++ (C) plumed_installed ++ (C++) PLMD::Plumed::installed ++ (FORTRAN) PLUMED_F_INSTALLED ++\endverbatim ++ ++ To convert handlers use ++\verbatim ++ (C) plumed_c2f (C to FORTRAN) ++ (C) plumed_f2c (FORTRAN to C) ++ (C++) Plumed(plumed) constructor (C to C++) ++ (C++) operator plumed() cast (C++ to C) ++ (C++) Plumed(char*) constructor (FORTRAN to C++) ++ (C++) toFortran(char*) (C++ to FORTRAN) ++\endverbatim ++ ++\verbatim ++ FORTRAN interface ++ SUBROUTINE PLUMED_F_INSTALLED(i) ++ INTEGER, INTENT(OUT) :: i ++ SUBROUTINE PLUMED_F_GINITIALIZED(i) ++ INTEGER, INTENT(OUT) :: i ++ SUBROUTINE PLUMED_F_GCREATE() ++ SUBROUTINE PLUMED_F_GCMD(key,val) ++ CHARACTER(LEN=*), INTENT(IN) :: key ++ UNSPECIFIED_TYPE, INTENT(INOUT) :: val(*) ++ SUBROUTINE PLUMED_F_GFINALIZE() ++ SUBROUTINE PLUMED_F_GLOBAL(p) ++ CHARACTER(LEN=32), INTENT(OUT) :: p ++ SUBROUTINE PLUMED_F_CREATE(p) ++ CHARACTER(LEN=32), INTENT(OUT) :: p ++ SUBROUTINE PLUMED_F_CMD(p,key,val) ++ CHARACTER(LEN=32), INTENT(IN) :: p ++ CHARACTER(LEN=*), INTENT(IN) :: key ++ UNSPECIFIED_TYPE, INTENT(INOUT) :: val(*) ++ SUBROUTINE PLUMED_F_FINALIZE(p) ++ CHARACTER(LEN=32), INTENT(IN) :: p ++\endverbatim ++ ++ The main routine is "cmd", which accepts two arguments: ++ key is a string containing the name of the command ++ val is the argument. it is declared const so as to use allow passing const objects, but in practice plumed ++ is going to modify val in several cases (using a const_cast). ++ In some cases val can be omitted: just pass a NULL pointer (in C++, val is optional and can be omitted). ++ The set of possible keys is the real API of the plumed library, and will be expanded with time. ++ New commands will be added, but backward compatibility will be retained as long as possible. ++ ++ To pass plumed a callback function use the following syntax (not available in FORTRAN yet) ++\verbatim ++ plumed_function_holder ff; ++ ff.p=your_function; ++ plumed_cmd(plumed,"xxxx",&ff); ++\endverbatim ++ (this is passing the your_function() function to the "xxxx" command) ++*/ ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++/* Generic function pointer */ ++typedef void (*plumed_function_pointer)(void); ++ ++/** ++ \brief Holder for function pointer. ++ ++ To pass plumed a callback function use the following syntax: ++\verbatim ++ plumed_function_holder ff; ++ ff.p=your_function; ++ plumed_cmd(plumed,"xxxx",&ff); ++\endverbatim ++ (this is going to pass the your_function() function to the "xxxx" command) ++*/ ++ ++typedef struct { ++ plumed_function_pointer p; ++} plumed_function_holder; ++ ++/** ++ \brief Main plumed object ++ ++ This is an object containing a Plumed instance, which should be used in ++ the MD engine. It should first be initialized with plumed_create(), ++ then it communicates with the MD engine using plumed_cmd(). Finally, ++ before the termination, it should be deallocated with plumed_finalize(). ++ Its interface is very simple and general, and is expected ++ not to change across plumed versions. See \ref ReferencePlumedH. ++*/ ++typedef struct { ++/** ++ \private ++ \brief Void pointer holding the real PlumedMain structure ++*/ ++ void*p; ++} plumed; ++ ++/** \relates plumed ++ \brief Constructor ++ ++ \return The constructed plumed object ++*/ ++plumed plumed_create(void); ++ ++/** \relates plumed ++ \brief Tells p to execute a command ++ ++ \param p The plumed object on which command is acting ++ \param key The name of the command to be executed ++ \param val The argument. It is declared as const to allow calls like plumed_cmd(p,"A","B"), ++ but for some choice of key it can change the content ++*/ ++void plumed_cmd(plumed p,const char*key,const void*val); ++ ++/** \relates plumed ++ \brief Destructor ++ ++ \param p The plumed object to be deallocated ++*/ ++void plumed_finalize(plumed p); ++ ++/** \relates plumed ++ \brief Check if plumed is installed (for runtime binding) ++ ++ \return 1 if plumed is installed, to 0 otherwise ++*/ ++int plumed_installed(void); ++ ++/** \relates plumed ++ \brief Retrieves an handler to the global structure. ++*/ ++plumed plumed_global(void); ++ ++/** \relates plumed ++ \brief Check if the global interface has been initialized ++ ++ \return 1 if plumed has been initialized, 0 otherwise ++*/ ++int plumed_ginitialized(void); ++ ++/* global C interface, working on a global object */ ++ ++/** \relates plumed ++ \brief Constructor for the global interface. ++ ++ \note Equivalent to plumed_create(), but initialize a static global plumed object ++*/ ++void plumed_gcreate(void); ++ ++/** \relates plumed ++ \brief Tells to the global interface to execute a command. ++ ++ \param key The name of the command to be executed ++ \param val The argument. It is declared as const to allow calls like plumed_gcmd("A","B"), ++ but for some choice of key it can change the content ++ ++ \note Equivalent to plumed_cmd(), but skipping the plumed argument ++*/ ++void plumed_gcmd(const char* key,const void* val); ++ ++/** \relates plumed ++ \brief Destructor for the global interface. ++ ++ \note Equivalent to plumed_finalize(), but skipping the plumed argument ++*/ ++void plumed_gfinalize(void); ++ ++/* routines to convert char handler from/to plumed objects */ ++ ++/** \related plumed ++ \brief Converts a C handler to a FORTRAN handler ++ ++ \param p The C handler ++ \param c The FORTRAN handler (a char[32]) ++*/ ++void plumed_c2f(plumed p,char* c); ++ ++/** \related plumed ++ \brief Converts a FORTRAN handler to a C handler ++ \param c The FORTRAN handler (a char[32]) ++ \return The C handler ++*/ ++plumed plumed_f2c(const char* c); ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#ifdef __cplusplus ++ ++/* this is to include the NULL pointer */ ++#include ++ ++/* C++ interface is hidden in PLMD namespace (same as plumed library) */ ++namespace PLMD { ++ ++/** ++ C++ wrapper for \ref plumed. ++ ++ This class provides a C++ interface to PLUMED. ++*/ ++ ++class Plumed{ ++ plumed main; ++/** ++ keeps track if the object was created from scratch using ++ the defaults destructor (reference=false) or if it was imported ++ from C or FORTRAN (reference=true). In the latter case, the ++ plumed_finalize() method is not called when destructing the object, ++ since it is expected to be finalized in the C/FORTRAN code ++*/ ++ bool reference; ++public: ++/** ++ Check if plumed is installed (for runtime binding) ++ \return true if plumed is installed, false otherwise ++*/ ++ static bool installed(); ++/** ++ Check if global-plumed has been initialized ++ \return true if global plumed object (see global()) is initialized (i.e. if gcreate() has been ++ called), false otherwise. ++*/ ++ static bool ginitialized(); ++/** ++ Initialize global-plumed ++*/ ++ static void gcreate(); ++/** ++ Send a command to global-plumed ++ \param key The name of the command to be executed ++ \param val The argument. It is declared as const to allow calls like gcmd("A","B"), ++ but for some choice of key it can change the content ++*/ ++ static void gcmd(const char* key,const void* val); ++/** ++ Finalize global-plumed ++*/ ++ static void gfinalize(); ++/** ++ Returns the Plumed global object ++ \return The Plumed global object ++*/ ++ static Plumed global(); ++/** ++ Constructor ++*/ ++ Plumed(); ++/** ++ Clone a Plumed object from a FORTRAN char* handler ++ \param c The FORTRAN handler (a char[32]). ++ ++ \attention The Plumed object created in this manner ++ will not finalize the corresponding plumed structure. ++ It is expected that the FORTRAN code calls plumed_c_finalize for it ++*/ ++// to have maximum portability of this file I do not use the explicit keyword here ++// I thus add a suppress command for cppcheck ++// cppcheck-suppress noExplicitConstructor ++ Plumed(const char*c); ++/** ++ Clone a Plumed object from a C plumed structure ++ \param p The C plumed structure. ++ ++ \attention The Plumed object created in this manner ++ will not finalize the corresponding plumed structure. ++ It is expected that the C code calls plumed_finalize for it ++*/ ++// to have maximum portability of this file I do not use the explicit keyword here ++// I thus add a suppress command for cppcheck ++// cppcheck-suppress noExplicitConstructor ++ Plumed(plumed p); ++private: ++/** Copy constructor is disabled (private and unimplemented) ++ The problem here is that after copying it will not be clear who is ++ going to finalize the corresponding plumed structure. ++*/ ++ Plumed(const Plumed&); ++/** Assignment operator is disabled (private and unimplemented) ++ The problem here is that after copying it will not be clear who is ++ going to finalize the corresponding plumed structure. ++*/ ++ Plumed&operator=(const Plumed&); ++public: ++/** ++ Retrieve the C plumed structure for this object ++*/ ++ operator plumed()const; ++/** ++ Retrieve a FORTRAN handler for this object ++ \param c The FORTRAN handler (a char[32]). ++*/ ++ void toFortran(char*c)const; ++/** ++ Send a command to this plumed object ++ \param key The name of the command to be executed ++ \param val The argument. It is declared as const to allow calls like p.cmd("A","B"), ++ but for some choice of key it can change the content ++*/ ++ void cmd(const char*key,const void*val=NULL); ++/** ++ Destructor ++ ++ Destructor is virtual so as to allow correct inheritance from Plumed object. ++ To avoid linking problems with g++, I specify "inline" also here (in principle ++ it should be enough to specify it down in the definition of the function, but ++ for some reason that I do not understand g++ does not inline it properly in that ++ case and complains when Plumed.h is included but Plumed.o is not linked. Anyway, the ++ way it is done here seems to work properly). ++*/ ++ inline virtual ~Plumed(); ++}; ++ ++/* All methods are inlined so as to avoid the compilation of an extra c++ file */ ++ ++inline ++bool Plumed::installed(){ ++ return plumed_installed(); ++} ++ ++inline ++Plumed::Plumed(): ++ main(plumed_create()), ++ reference(false) ++{} ++ ++inline ++Plumed::Plumed(const char*c): ++ main(plumed_f2c(c)), ++ reference(true) ++{} ++ ++inline ++Plumed::Plumed(plumed p): ++ main(p), ++ reference(true) ++{} ++ ++inline ++Plumed::operator plumed()const{ ++ return main; ++} ++ ++inline ++void Plumed::toFortran(char*c)const{ ++ plumed_c2f(main,c); ++} ++ ++inline ++void Plumed::cmd(const char*key,const void*val){ ++ plumed_cmd(main,key,val); ++} ++ ++inline ++Plumed::~Plumed(){ ++ if(!reference)plumed_finalize(main); ++} ++ ++inline ++bool Plumed::ginitialized(){ ++ return plumed_ginitialized(); ++} ++ ++inline ++void Plumed::gcreate(){ ++ plumed_gcreate(); ++} ++ ++inline ++void Plumed::gcmd(const char* key,const void* val){ ++ plumed_gcmd(key,val); ++} ++ ++inline ++void Plumed::gfinalize(){ ++ plumed_gfinalize(); ++} ++ ++inline ++Plumed Plumed::global(){ ++ return plumed_global(); ++} ++ ++} ++ ++#endif ++ ++ ++#endif +diff -urN dl_class_1.9.orig/Plumed.inc dl_class_1.9/Plumed.inc +--- dl_class_1.9.orig/Plumed.inc 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/Plumed.inc 2015-11-09 14:26:16.827714651 +0100 +@@ -0,0 +1,3 @@ ++# PLUMED: runtime installation ++PLUMED_LOAD= "$(EBROOTPLUMED)/lib/plumed/obj/Plumed.o" -ldl ++PLUMED_DEPENDENCIES= +diff -urN dl_class_1.9.orig/srcmod/angles_module.f dl_class_1.9/srcmod/angles_module.f +--- dl_class_1.9.orig/srcmod/angles_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/angles_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,741 @@ ++ module angles_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining valence angle potentials ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c modified - p.-a.cazade oct 2007 : solvation etc. ++c modified - d. quigley 2010 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmang(:,:) ++ integer, allocatable :: listang(:,:) ++ integer, allocatable :: numang(:),keyang(:),lstang(:,:) ++ ++ save prmang,listang,numang,keyang,lstang ++ ++ contains ++ ++ subroutine alloc_ang_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining valence angle potential arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(5) ++ ++ do i=1,5 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmang(mxtang,mxpang),stat=fail(1)) ++ allocate (numang(mxtmls),stat=fail(2)) ++ allocate (keyang(mxtang),stat=fail(3)) ++ allocate (lstang(mxtang,3),stat=fail(4)) ++ allocate (listang(mxangl,4),stat=fail(5)) ++ ++ do i=1,5 ++ if(fail(i).gt.0)call error(idnode,1010) ++ enddo ++ ++ do i=1,mxtmls ++ numang(i)=0 ++ enddo ++ ++ end subroutine alloc_ang_arrays ++ ++ subroutine define_angles ++ x (safe,idnode,itmols,nangle,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining bond angles ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,itmols,nangle,nsite,ntmp,i,iang,iang1 ++ integer idum,iatm1,iatm2,iatm3,isite1,isite2,isite3,ia,ja ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numang(itmols)=numang(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of bond angles', ++ x 10x,i10)")ntmp ++ write(nrite,"(/,/,1x,'bond angle details:', ++ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, ++ x 'index',5x,'f-const',7x,'angle',/)") ++ endif ++ ++ iang1=numang(itmols) ++ do iang=1,iang1 ++ ++c read bond angle potential parameters ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ iatm3=intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ isite3=nsite-numsit(itmols)+iatm3 ++ ++ if(lfzsit(isite1)*lfzsit(isite2)* ++ x lfzsit(isite3).ne.0)then ++ ++ numang(itmols)=numang(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ nangle=nangle+1 ++ ++ if(nangle.gt.mxtang)call error(idnode,50) ++ ++ if(keyword(1:4).eq.'harm')then ++ keyang(nangle)=1 ++ elseif(keyword(1:4).eq.'-hrm')then ++ keyang(nangle)=-1 ++ elseif(keyword(1:4).eq.'quar')then ++ keyang(nangle)=2 ++ elseif(keyword(1:4).eq.'-qur')then ++ keyang(nangle)=-2 ++ elseif(keyword(1:4).eq.'thrm')then ++ keyang(nangle)=3 ++ elseif(keyword(1:4).eq.'-thm')then ++ keyang(nangle)=-3 ++ elseif(keyword(1:4).eq.'shrm')then ++ keyang(nangle)=4 ++ elseif(keyword(1:4).eq.'-shm')then ++ keyang(nangle)=-4 ++ elseif(keyword(1:4).eq.'bvs1')then ++ keyang(nangle)=5 ++ elseif(keyword(1:4).eq.'-bv1')then ++ keyang(nangle)=-5 ++ elseif(keyword(1:4).eq.'bvs2')then ++ keyang(nangle)=6 ++ elseif(keyword(1:4).eq.'-bv2')then ++ keyang(nangle)=-6 ++ elseif(keyword(1:4).eq.'hcos')then ++ keyang(nangle)=7 ++ elseif(keyword(1:4).eq.'-hcs')then ++ keyang(nangle)=-7 ++ elseif(keyword(1:4).eq.'cos ')then ++ keyang(nangle)=8 ++ elseif(keyword(1:4).eq.'-cos')then ++ keyang(nangle)=-8 ++ elseif(keyword(1:4).eq.'mmsb')then ++ keyang(nangle)=9 ++ elseif(keyword(1:4).eq.'-msb')then ++ keyang(nangle)=-9 ++ elseif(keyword(1:4).eq.'stst') then ++ keyang(nangle)=10 ++ elseif(keyword(1:4).eq.'-sts') then ++ keyang(nangle)=-10 ++ elseif(keyword(1:4).eq.'stbe') then ++ keyang(nangle)=11 ++ elseif(keyword(1:4).eq.'-stb') then ++ keyang(nangle)=-11 ++ elseif(keyword(1:4).eq.'cmps') then ++ keyang(nangle)=12 ++ elseif(keyword(1:4).eq.'-cmp') then ++ keyang(nangle)=-12 ++ else ++ if(idnode.eq.0)write(nrite,*)message ++ call error(idnode,440) ++ endif ++ ++ lstang(nangle,1)=iatm1 ++ lstang(nangle,2)=iatm2 ++ lstang(nangle,3)=iatm3 ++ prmang(nangle,1)=dblstr(record,lenrec,idum) ++ prmang(nangle,2)=dblstr(record,lenrec,idum) ++ prmang(nangle,3)=dblstr(record,lenrec,idum) ++ prmang(nangle,4)=dblstr(record,lenrec,idum) ++ prmang(nangle,5)=dblstr(record,lenrec,idum) ++ prmang(nangle,6)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,3i10,1p,e12.4,0p,9f12.6)") ++ x keyword(1:4),(lstang(nangle,ia),ia=1,3), ++ x (prmang(nangle,ja),ja=1,mxpang) ++ ++c convert energies to internal units ++ ++ prmang(nangle,1)=prmang(nangle,1)*engunit ++ if(abs(keyang(nangle)).eq.2)then ++ prmang(nangle,3)=prmang(nangle,3)*engunit ++ prmang(nangle,4)=prmang(nangle,4)*engunit ++ elseif(abs(keyang(nangle)).eq.12)then ++ prmang(nangle,2)=prmang(nangle,2)*engunit ++ prmang(nangle,3)=prmang(nangle,3)*engunit ++ endif ++ ++c convert angles to radians ++ ++ if(abs(keyang(nangle)).eq.12)then ++ prmang(nangle,4)=prmang(nangle,4)*(pi/180.d0) ++ elseif(abs(keyang(nangle)).ne.10)then ++ prmang(nangle,2)=prmang(nangle,2)*(pi/180.d0) ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_angles ++ ++ subroutine angfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntangl,engang,virang) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating bond angle energy and ++c force terms in molecular dynamics. ++c ++c replicated data - blocked version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith may 1992 ++c modified - t. forester feb 1993 ++c modified - t. forester nov 1994 : block data ++c modified - t. forester may 1995 : stress tensor ++c modified - p.-a.cazade oct 2007 : solvation etc. ++c modified - d. quigley nov 2010 : metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect ++ logical idrive,jdrive,kdrive ++ integer idnode,mxnode,imcon,ntangl,fail1,fail2 ++ integer ii,iang1,iang2,i,ia,ib,ic,kk,keya ++ real(8) engang,virang,theta,fxc,fyc,fzc,rab,xab ++ real(8) yab,zab,rbc,xbc,ybc,zbc,sint,cost,pterm,vterm ++ real(8) gamma,gamsa,gamsc,rrbc,rrab,fxa,fya,fza ++ real(8) strs(6),strs_loc(6) ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ real(8), allocatable :: xdbc(:),ydbc(:),zdbc(:) ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) ++ allocate (xdbc(msbad),ydbc(msbad),zdbc(msbad),stat=fail2) ++ if(fail1.ne.fail2)call error(idnode,1020) ++ ++c flag for undefined potentials ++ ++ safe=.true. ++ ++c check size of work arrays ++ ++ if((ntangl-mxnode+1)/mxnode.gt.msbad)call error(idnode,419) ++ ++c block indices ++ ++ iang1=(idnode*ntangl)/mxnode+1 ++ iang2=((idnode+1)*ntangl)/mxnode ++ ++c zero accumulators ++ ++ engang=0.d0 ++ virang=0.d0 ++ ang_fre=0.d0 ++ ang_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(2)=.true. ++ ang_sol(:)=0.d0 ++ if(lexcite)ang_exc(:)=0.d0 ++ ++ endif ++ ++c calculate atom separation vectors ++ ++ ii=0 ++ do i=iang1,iang2 ++ ++ ii=ii+1 ++ ++c indices of bonded atoms ++ ++ ia=listang(ii,2) ++ ib=listang(ii,3) ++ ic=listang(ii,4) ++ ++c components of first bond vector ++ ++ xdab(ii)=xxx(ia)-xxx(ib) ++ ydab(ii)=yyy(ia)-yyy(ib) ++ zdab(ii)=zzz(ia)-zzz(ib) ++ ++c components of second bond vector ++ ++ xdbc(ii)=xxx(ic)-xxx(ib) ++ ydbc(ii)=yyy(ic)-yyy(ib) ++ zdbc(ii)=zzz(ic)-zzz(ib) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ call images(imcon,0,1,ii,cell,xdbc,ydbc,zdbc) ++ ++c loop over all specified angle potentials ++ ++ ii=0 ++ do i=iang1,iang2 ++ ++ ii=ii+1 ++ ++c define components of first bond vector ++ ++ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) ++ rrab=1.d0/rab ++ ++ xab=xdab(ii)*rrab ++ yab=ydab(ii)*rrab ++ zab=zdab(ii)*rrab ++ ++c define components of second bond vector ++ ++ rbc=sqrt(xdbc(ii)**2+ydbc(ii)**2+zdbc(ii)**2) ++ rrbc=1.d0/rbc ++ ++ xbc=xdbc(ii)*rrbc ++ ybc=ydbc(ii)*rrbc ++ zbc=zdbc(ii)*rrbc ++ ++c index of potential function parameters ++ ++ kk=listang(ii,1) ++ ++c determine bond angle and calculate potential energy ++ ++ cost=(xab*xbc+yab*ybc+zab*zbc) ++ theta=acos(cost) ++ sint=max(1.d-8,sqrt(1.d0-cost**2)) ++ ++ keya=abs(keyang(kk)) ++ ++ if(keya.eq.1)then ++ ++c harmonic potential ++ ++ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2 ++ gamma=prmang(kk,1)*(theta-prmang(kk,2))/sint ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ elseif(keya.eq.2)then ++ ++c quartic potential ++ ++ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2+ ++ x 1.d0/3.d0*prmang(kk,3)*(theta-prmang(kk,2))**3+ ++ x 0.25d0*prmang(kk,4)*(theta-prmang(kk,2))**4 ++ gamma=(prmang(kk,1)*(theta-prmang(kk,2))+ ++ x prmang(kk,3)*(theta-prmang(kk,2))**2+ ++ x prmang(kk,4)*(theta-prmang(kk,2))**3)/sint ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ elseif(keya.eq.3)then ++ ++c truncated harmonic potential ++ ++ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2* ++ x exp(-(rab**8+rbc**8)/prmang(kk,3)**8) ++ gamma=prmang(kk,1)*(theta-prmang(kk,2))* ++ x exp(-(rab**8+rbc**8)/prmang(kk,3)**8)/sint ++ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmang(kk,3)**8 ++ gamsa=(8.d0*pterm/prmang(kk,3)**8)*rab**7 ++ gamsc=(8.d0*pterm/prmang(kk,3)**8)*rbc**7 ++ ++ elseif(keya.eq.4)then ++ ++c screened harmonic potential ++ ++ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2* ++ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4))) ++ gamma=prmang(kk,1)*(theta-prmang(kk,2))* ++ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4)))/sint ++ vterm=-pterm*(rab/prmang(kk,3)+rbc/prmang(kk,4)) ++ gamsa=(pterm/prmang(kk,3)) ++ gamsc=(pterm/prmang(kk,4)) ++ ++ elseif(keya.eq.5)then ++ ++c screened vessal potential (type 1) ++ ++ pterm=(prmang(kk,1)/(8.d0*(prmang(kk,2)-pi)**2)* ++ x (((prmang(kk,2)-pi)**2-(theta-pi)**2)**2))* ++ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4))) ++ gamma=(prmang(kk,1)/(2.d0*(prmang(kk,2)-pi)**2)* ++ x ((prmang(kk,2)-pi)**2-(theta-pi)**2)*(theta-pi))* ++ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4)))/sint ++ vterm=-pterm*(rab/prmang(kk,3)+rbc/prmang(kk,4)) ++ gamsa=(pterm/prmang(kk,3)) ++ gamsc=(pterm/prmang(kk,4)) ++ ++ elseif(keya.eq.6)then ++ ++c truncated vessal potential (type 2) ++ ++ pterm=prmang(kk,1)*(theta**prmang(kk,3)*(theta-prmang(kk,2)) ++ x **2*(theta+prmang(kk,2)-2.d0*pi)**2-0.5d0*prmang(kk,3)*pi ++ x **(prmang(kk,3)-1.d0)*(theta-prmang(kk,2))**2*(pi-prmang(kk, ++ x 2))**3)*exp(-(rab**8+rbc**8)/prmang(kk,4)**8) ++ gamma=prmang(kk,1)*(theta**(prmang(kk,3)-1.d0)*(theta-prmang ++ x (kk,2))*(theta+prmang(kk,2)-2.d0*pi)*((prmang(kk,3)+4.d0)* ++ x theta**2-2.d0*pi*(prmang(kk,3)+2.d0)*theta+prmang(kk,3)* ++ x prmang(kk,2)*(2.d0*pi-prmang(kk,2)))-prmang(kk,3)*pi** ++ x (prmang(kk,3)-1.d0)*(theta-prmang(kk,2))*(pi-prmang(kk,2)) ++ x **3)*exp(-(rab**8+rbc**8)/prmang(kk,4)**8)/sint ++ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmang(kk,4)**8 ++ gamsa=(8.d0*pterm/prmang(kk,4)**8)*rab**7 ++ gamsc=(8.d0*pterm/prmang(kk,4)**8)*rbc**7 ++ ++ elseif(keya.eq.7)then ++ ++c harmonic cosine potential ++ ++ pterm=0.5d0*prmang(kk,1)*(cos(theta)-cos(prmang(kk,2)))**2 ++ gamma=-prmang(kk,1)*(cos(theta)-cos(prmang(kk,2))) ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ elseif(keya.eq.8)then ++ ++c ordinary cosine potential ++ ++ pterm=prmang(kk,1)*(1+cos(prmang(kk,3)*theta-prmang(kk,2))) ++ gamma=-prmang(kk,1)*prmang(kk,3)*sin(prmang(kk,3)*theta- ++ x prmang(kk,2))/sint ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ elseif(keya.eq.9)then ++ ++c mm3 stretch-bend potential ++ ++ pterm=prmang(kk,1)*(theta-prmang(kk,2))* ++ x (rab-prmang(kk,3))*(rbc-prmang(kk,4)) ++ gamma=prmang(kk,1)*(rab-prmang(kk,3))*(rbc- ++ x prmang(kk,4))/sint ++ gamsa=-prmang(kk,1)*(theta-prmang(kk,2))*(rbc-prmang(kk,4)) ++ gamsc=-prmang(kk,1)*(theta-prmang(kk,2))*(rab-prmang(kk,3)) ++ vterm=-(gamsa*rab+gamsc*rbc) ++ ++ elseif(keya.eq.10)then ++ ++c compass stretch-stretch potential ++ ++ pterm=prmang(kk,1)*(rab-prmang(kk,2))*(rbc-prmang(kk,3)) ++ gamma=0.d0 ++ gamsa=-prmang(kk,1)*(rbc-prmang(kk,3)) ++ gamsc=-prmang(kk,1)*(rab-prmang(kk,2)) ++ vterm=-(gamsa*rab+gamsc*rbc) ++ ++ elseif(keya.eq.11)then ++ ++c compass stretch-bend potential ++ ++ pterm=prmang(kk,1)*(theta-prmang(kk,2))*(rab-prmang(kk,3)) ++ gamma=prmang(kk,1)*(rab-prmang(kk,3))/sint ++ gamsa=-prmang(kk,1)*(theta-prmang(kk,2)) ++ gamsc=0.d0 ++ vterm=-gamsa*rab ++ ++ elseif(keya.eq.12)then ++ ++c combined compass angle potential with 3 coupling terms ++ ++ pterm=prmang(kk,1)*(rab-prmang(kk,5))*(rbc-prmang(kk,6))+ ++ x (theta-prmang(kk,4))*(prmang(kk,2)*(rab-prmang(kk,5))+ ++ x prmang(kk,3)*(rbc-prmang(kk,6))) ++ gamma=(prmang(kk,2)*(rab-prmang(kk,5))+ ++ x prmang(kk,3)*(rbc-prmang(kk,6)))/sint ++ gamsa=-prmang(kk,2)*(theta-prmang(kk,4))- ++ x prmang(kk,1)*(rbc-prmang(kk,6)) ++ gamsc=-prmang(kk,3)*(theta-prmang(kk,4))- ++ x prmang(kk,1)*(rab-prmang(kk,5)) ++ vterm=-(gamsa*rab+gamsc*rbc) ++ ++ else ++ ++c undefined potential ++ ++ safe=.false. ++ pterm=0.d0 ++ vterm=0.d0 ++ gamma=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ endif ++ ++c indices of bonded atoms ++ ++ ia=listang(ii,2) ++ ib=listang(ii,3) ++ ic=listang(ii,4) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ kdrive=driven(ltype(ic)) ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. ++ x (atm_fre(ic).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic).eq.0) ++ ++ if(lsolva)then ++ ang_exc(atmolt(ia))=ang_exc(atmolt(ia))+pterm ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. ++ x (atm_fre(ic).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ ang_fre=ang_fre-pterm ++ ang_vir=ang_vir-vterm ++ pterm=lambda1*pterm ++ vterm=lambda1*vterm ++ gamma=lambda1*gamma ++ gamsa=lambda1*gamsa ++ gamsc=lambda1*gamsc ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. ++ x (atm_fre(ic).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ ang_fre=ang_fre+pterm ++ ang_vir=ang_vir+vterm ++ pterm=lambda2*pterm ++ vterm=lambda2*vterm ++ gamma=lambda2*gamma ++ gamsa=lambda2*gamsa ++ gamsc=lambda2*gamsc ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c sum potential energy and virial ++ ++ engang=engang+pterm ++ virang=virang+vterm ++ ++c calculate solvation energy ++ ++ if(lsolva)then ++ ang_sol(atmolt(ia))=ang_sol(atmolt(ia))+pterm ++ endif ++ ++c calculate atomic forces ++ ++ fxa=gamma*(xbc-xab*cost)*rrab+gamsa*xab ++ fya=gamma*(ybc-yab*cost)*rrab+gamsa*yab ++ fza=gamma*(zbc-zab*cost)*rrab+gamsa*zab ++ ++ fxc=gamma*(xab-xbc*cost)*rrbc+gamsc*xbc ++ fyc=gamma*(yab-ybc*cost)*rrbc+gamsc*ybc ++ fzc=gamma*(zab-zbc*cost)*rrbc+gamsc*zbc ++ ++c sum atomic forces ++ ++ fxx(ia)=fxx(ia)+fxa ++ fyy(ia)=fyy(ia)+fya ++ fzz(ia)=fzz(ia)+fza ++ ++ fxx(ib)=fxx(ib)-fxa-fxc ++ fyy(ib)=fyy(ib)-fya-fyc ++ fzz(ib)=fzz(ib)-fza-fzc ++ ++ fxx(ic)=fxx(ic)+fxc ++ fyy(ic)=fyy(ic)+fyc ++ fzz(ic)=fzz(ic)+fzc ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+rab*xab*fxa+rbc*xbc*fxc ++ strs(2)=strs(2)+rab*xab*fya+rbc*xbc*fyc ++ strs(3)=strs(3)+rab*xab*fza+rbc*xbc*fzc ++ strs(4)=strs(4)+rab*yab*fya+rbc*ybc*fyc ++ strs(5)=strs(5)+rab*yab*fza+rbc*ybc*fzc ++ strs(6)=strs(6)+rab*zab*fza+rbc*zbc*fzc ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+pterm ++ vir_loc=vir_loc+vterm ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fxa ++ fyy_loc(ia)=fyy_loc(ia)+fya ++ fzz_loc(ia)=fzz_loc(ia)+fza ++ ++ fxx_loc(ib)=fxx_loc(ib)-fxa-fxc ++ fyy_loc(ib)=fyy_loc(ib)-fya-fyc ++ fzz_loc(ib)=fzz_loc(ib)-fza-fzc ++ ++ fxx_loc(ic)=fxx_loc(ic)+fxc ++ fyy_loc(ic)=fyy_loc(ic)+fyc ++ fzz_loc(ic)=fzz_loc(ic)+fzc ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+rab*xab*fxa+rbc*xbc*fxc ++ strs_loc(2)=strs_loc(2)+rab*xab*fya+rbc*xbc*fyc ++ strs_loc(3)=strs_loc(3)+rab*xab*fza+rbc*xbc*fzc ++ strs_loc(4)=strs_loc(4)+rab*yab*fya+rbc*ybc*fyc ++ strs_loc(5)=strs_loc(5)+rab*yab*fza+rbc*ybc*fzc ++ strs_loc(6)=strs_loc(6)+rab*zab*fza+rbc*zbc*fzc ++ ++ endif ++ ++ enddo ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,440) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c sum up contributions to potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engang ++ buffer(2)=virang ++ buffer(3)=ang_fre ++ buffer(4)=ang_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engang=buffer(1) ++ virang=buffer(2) ++ ang_fre=buffer(3) ++ ang_vir=buffer(4) ++ ++c sum up solvation energies ++ ++ if(lsolva)then ++ ++ call gdsum(ang_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(ang_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ deallocate (xdab,ydab,zdab,stat=fail1) ++ deallocate (xdbc,ydbc,zdbc,stat=fail2) ++ ++ return ++ end subroutine angfrc ++ ++ end module angles_module +diff -urN dl_class_1.9.orig/srcmod/basic_comms.f dl_class_1.9/srcmod/basic_comms.f +--- dl_class_1.9.orig/srcmod/basic_comms.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/basic_comms.f 2015-11-09 14:52:08.086294333 +0100 +@@ -0,0 +1,389 @@ ++ subroutine initcomms() ++ ++c********************************************************************* ++c ++c communication harness initialisation ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_init MPI_init_ ++ ++ call MPI_init(ierr) ++ ++ return ++ end ++ ++c PLUMED ++ integer*8 function get_comms() ++ ++c********************************************************************* ++c ++c dl_poly subroutine for obtaining the communicator ++c this is used by plumed ++c ++c author - G. Tribello ++c ++c********************************************************************* ++ ++ get_comms=MPI_COMM_WORLD ++ end ++ ++ subroutine machine(idnode,mxnode) ++c PLUMED ++ ++c********************************************************************* ++c ++c dl_poly subroutine for obtaining charcteristics of ++c the computer on which the program is being run ++c ++c copyright daresbury laboratory 1992 ++c author - w.smith july 1992 ++c ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,mynode,numnodes ++ ++ idnode=mynode() ++ mxnode=numnodes() ++ ++ return ++ end ++ ++ integer function mynode() ++ ++c********************************************************************* ++c ++c routine to determine identity of processing node ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_COMM_RANK MPI_COMM_RANK_ ++ ++ call MPI_COMM_RANK(MPI_COMM_WORLD, mynode ,ierr) ++ ++ return ++ end ++ ++ integer function nodedim() ++ ++c********************************************************************* ++c ++c calculate dimension of hypercube ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer i,n,ierr,mxnode ++ ++CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ ++ ++ call MPI_COMM_SIZE(MPI_COMM_WORLD, mxnode ,ierr) ++ n=1 ++ nodedim = -1 ++ do i=0,16 ++ ++ if(n.eq.mxnode)nodedim=i ++ n=2*n ++ ++ enddo ++ ++ return ++ end ++ ++ integer function numnodes() ++ ++c********************************************************************* ++c ++c calculate number of nodes ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ ++ ++ call MPI_COMM_SIZE(MPI_COMM_WORLD, numnodes, ierr) ++ ++ return ++ end ++ ++ subroutine csend(tagmsg,buf,length,pe,idum) ++ ++c********************************************************************* ++c ++c Intel-like csend (double precision) ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer tagmsg,length,pe,idum ++ ++ integer ierr ++ real(8) buf(*) ++ ++CMPIU define MPI_send MPI_send_ ++ ++ call MPI_send(buf,length,MPI_DOUBLE_PRECISION,pe,tagmsg, ++ x MPI_COMM_WORLD,ierr) ++ ++ return ++ end ++ ++ subroutine crecv(tagmsg,buf,length) ++ ++c********************************************************************* ++c ++c Intel-like crecv (double precision) ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer tagmsg,length ++ ++ integer ierr ++ integer status(MPI_STATUS_SIZE) ++ real(8) buf(*) ++ ++CMPIU define MPI_RECV MPI_RECV_ ++ ++ call MPI_RECV(buf,length,MPI_DOUBLE_PRECISION,MPI_ANY_SOURCE, ++ x tagmsg,MPI_COMM_WORLD,status,ierr) ++ ++ return ++ end ++ ++ subroutine gisum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global summation subroutine for hypercube - MPI version ++c integer version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ integer nnn,i,ierror,iii,kk,k,k0,k1,k2,msg1,msg2 ++ integer aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++ ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, ++ x MPI_SUM,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gdsum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global summation subroutine for MPI - hypercube assumed ++c double precision version ++c ++c copyright - daresbury laboratory 1995 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn,i,iii,kk,k1,k2,ierror ++ real(8) aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++ ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_DOUBLE_PRECISION, ++ x MPI_SUM,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gimax(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global maximum subroutine for hypercube - MPI version ++c integer version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ integer nnn,i,iii,kk,k1,k2,k,k0msg1,msg2,ierror ++ integer aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, ++ x MPI_MAX,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gstate(check) ++ ++c*********************************************************************** ++c ++c dl_poly global status subroutine : gisum version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992 ++c MPI version - t. forester may 1995 ++c ++c*********************************************************************** ++ ++ ++ implicit none ++ ++ logical check ++ integer i,idum ++ ++ i = 0 ++ if(.not.check) i = 1 ++ ++ call gisum(i,1,idum) ++ ++ check = (i.eq.0) ++ ++ return ++ end ++ ++ subroutine gsync() ++ ++c********************************************************************* ++c ++c barrier / synchronization routine ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ierr ++ ++ include "comms.inc" ++ ++CMPIU define MPI_BARRIER MPI_BARRIER_ ++ ++ call MPI_BARRIER(MPI_COMM_WORLD,ierr) ++ ++ return ++ end ++ ++ subroutine exitcomms() ++ ++c********************************************************************* ++c ++c exitcomms: exit from communication harness ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++CMPIU define MPI_FINALIZE MPI_FINALIZE_ ++ ++ call MPI_FINALIZE(ierr) ++ call exit(0) ++ ++ return ++ end +diff -urN dl_class_1.9.orig/srcmod/basic_comms.f.preplumed dl_class_1.9/srcmod/basic_comms.f.preplumed +--- dl_class_1.9.orig/srcmod/basic_comms.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/basic_comms.f.preplumed 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,373 @@ ++ subroutine initcomms() ++ ++c********************************************************************* ++c ++c communication harness initialisation ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_init MPI_init_ ++ ++ call MPI_init(ierr) ++ ++ return ++ end ++ ++ subroutine machine(idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for obtaining charcteristics of ++c the computer on which the program is being run ++c ++c copyright daresbury laboratory 1992 ++c author - w.smith july 1992 ++c ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,mynode,numnodes ++ ++ idnode=mynode() ++ mxnode=numnodes() ++ ++ return ++ end ++ ++ integer function mynode() ++ ++c********************************************************************* ++c ++c routine to determine identity of processing node ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_COMM_RANK MPI_COMM_RANK_ ++ ++ call MPI_COMM_RANK(MPI_COMM_WORLD, mynode ,ierr) ++ ++ return ++ end ++ ++ integer function nodedim() ++ ++c********************************************************************* ++c ++c calculate dimension of hypercube ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer i,n,ierr,mxnode ++ ++CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ ++ ++ call MPI_COMM_SIZE(MPI_COMM_WORLD, mxnode ,ierr) ++ n=1 ++ nodedim = -1 ++ do i=0,16 ++ ++ if(n.eq.mxnode)nodedim=i ++ n=2*n ++ ++ enddo ++ ++ return ++ end ++ ++ integer function numnodes() ++ ++c********************************************************************* ++c ++c calculate number of nodes ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ ++ ++ call MPI_COMM_SIZE(MPI_COMM_WORLD, numnodes, ierr) ++ ++ return ++ end ++ ++ subroutine csend(tagmsg,buf,length,pe,idum) ++ ++c********************************************************************* ++c ++c Intel-like csend (double precision) ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer tagmsg,length,pe,idum ++ ++ integer ierr ++ real(8) buf(*) ++ ++CMPIU define MPI_send MPI_send_ ++ ++ call MPI_send(buf,length,MPI_DOUBLE_PRECISION,pe,tagmsg, ++ x MPI_COMM_WORLD,ierr) ++ ++ return ++ end ++ ++ subroutine crecv(tagmsg,buf,length) ++ ++c********************************************************************* ++c ++c Intel-like crecv (double precision) ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer tagmsg,length ++ ++ integer ierr ++ integer status(MPI_STATUS_SIZE) ++ real(8) buf(*) ++ ++CMPIU define MPI_RECV MPI_RECV_ ++ ++ call MPI_RECV(buf,length,MPI_DOUBLE_PRECISION,MPI_ANY_SOURCE, ++ x tagmsg,MPI_COMM_WORLD,status,ierr) ++ ++ return ++ end ++ ++ subroutine gisum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global summation subroutine for hypercube - MPI version ++c integer version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ integer nnn,i,ierror,iii,kk,k,k0,k1,k2,msg1,msg2 ++ integer aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++ ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, ++ x MPI_SUM,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gdsum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global summation subroutine for MPI - hypercube assumed ++c double precision version ++c ++c copyright - daresbury laboratory 1995 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn,i,iii,kk,k1,k2,ierror ++ real(8) aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++ ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_DOUBLE_PRECISION, ++ x MPI_SUM,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gimax(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global maximum subroutine for hypercube - MPI version ++c integer version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ integer nnn,i,iii,kk,k1,k2,k,k0msg1,msg2,ierror ++ integer aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, ++ x MPI_MAX,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gstate(check) ++ ++c*********************************************************************** ++c ++c dl_poly global status subroutine : gisum version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992 ++c MPI version - t. forester may 1995 ++c ++c*********************************************************************** ++ ++ ++ implicit none ++ ++ logical check ++ integer i,idum ++ ++ i = 0 ++ if(.not.check) i = 1 ++ ++ call gisum(i,1,idum) ++ ++ check = (i.eq.0) ++ ++ return ++ end ++ ++ subroutine gsync() ++ ++c********************************************************************* ++c ++c barrier / synchronization routine ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ierr ++ ++ include "comms.inc" ++ ++CMPIU define MPI_BARRIER MPI_BARRIER_ ++ ++ call MPI_BARRIER(MPI_COMM_WORLD,ierr) ++ ++ return ++ end ++ ++ subroutine exitcomms() ++ ++c********************************************************************* ++c ++c exitcomms: exit from communication harness ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++CMPIU define MPI_FINALIZE MPI_FINALIZE_ ++ ++ call MPI_FINALIZE(ierr) ++ call exit(0) ++ ++ return ++ end +diff -urN dl_class_1.9.orig/srcmod/bonds_module.f dl_class_1.9/srcmod/bonds_module.f +--- dl_class_1.9.orig/srcmod/bonds_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/bonds_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,579 @@ ++ module bonds_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining bond potential arrays ++c copyright - daresbury laboratory ++c ++c author - w. smith sep 2003 ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c adapted for metadynamics ++c - d. quigley 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmbnd(:,:) ++ integer, allocatable :: listbnd(:,:) ++ integer, allocatable :: numbonds(:),keybnd(:),lstbnd(:,:) ++ ++ save prmbnd,listbnd,numbonds,keybnd,lstbnd ++ ++ contains ++ ++ subroutine alloc_bnd_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(5) ++ ++ do i=1,5 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmbnd(mxtbnd,mxpbnd),stat=fail(1)) ++ allocate (numbonds(mxtmls),stat=fail(2)) ++ allocate (keybnd(mxtbnd),stat=fail(3)) ++ allocate (lstbnd(mxtbnd,3),stat=fail(4)) ++ allocate (listbnd(mxbond,4),stat=fail(5)) ++ ++ do i=1,5 ++ if(fail(i).gt.0)call error(idnode,1030) ++ enddo ++ ++ do i=1,mxtmls ++ numbonds(i)=0 ++ enddo ++ ++ end subroutine alloc_bnd_arrays ++ ++ subroutine define_bonds ++ x (safe,idnode,itmols,nbonds,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining bonds ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,itmols,nbonds,nsite,ntmp,ibond,ibond1 ++ integer iatm1,iatm2,isite1,isite2,idum,i,j ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numbonds(itmols)=numbonds(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of chemical bonds', ++ x 7x,i10)")ntmp ++ write(nrite,"(/,/,1x,'chemical bond details:', ++ x /,/,21x,7x,'key',5x,'index',5x,'index',28x, ++ x 'parameters', /)") ++ endif ++ ++ ibond1=numbonds(itmols) ++ do ibond=1,ibond1 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ ++ if(lfzsit(isite1)*lfzsit(isite2).ne.0)then ++ ++ numbonds(itmols)=numbonds(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(12x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ nbonds=nbonds+1 ++ if(nbonds.gt.mxtbnd)call error(idnode,30) ++ ++ if(keyword(1:4).eq.'harm')then ++ keybnd(nbonds)=1 ++ elseif(keyword(1:4).eq.'-hrm')then ++ keybnd(nbonds)=-1 ++ elseif(keyword(1:4).eq.'mors')then ++ keybnd(nbonds)=2 ++ elseif(keyword(1:4).eq.'-mrs')then ++ keybnd(nbonds)=-2 ++ elseif(keyword(1:4).eq.'12-6')then ++ keybnd(nbonds)=3 ++ elseif(keyword(1:4).eq.'-126')then ++ keybnd(nbonds)=-3 ++ elseif(keyword(1:4).eq.'rhrm')then ++ keybnd(nbonds)=4 ++ elseif(keyword(1:4).eq.'-rhm')then ++ keybnd(nbonds)=-4 ++ elseif(keyword(1:4).eq.'quar')then ++ keybnd(nbonds)=5 ++ elseif(keyword(1:4).eq.'-qur')then ++ keybnd(nbonds)=-5 ++ elseif(keyword(1:4).eq.'buck')then ++ keybnd(nbonds)=6 ++ elseif(keyword(1:4).eq.'-bck')then ++ keybnd(nbonds)=-6 ++ elseif(keyword(1:4).eq.'fene')then ++ keybnd(nbonds)=7 ++ elseif(keyword(1:4).eq.'-fen')then ++ keybnd(nbonds)=-7 ++ elseif(keyword(1:4).eq.'coul')then ++ keybnd(nbonds)=8 ++ elseif(keyword(1:4).eq.'-cou')then ++ keybnd(nbonds)=-8 ++ else ++ if(idnode.eq.0)write(nrite,*)message ++ call error(idnode,444) ++ endif ++ ++ lstbnd(nbonds,1)=iatm1 ++ lstbnd(nbonds,2)=iatm2 ++ prmbnd(nbonds,1)=dblstr(record,lenrec,idum) ++ prmbnd(nbonds,2)=dblstr(record,lenrec,idum) ++ prmbnd(nbonds,3)=dblstr(record,lenrec,idum) ++ prmbnd(nbonds,4)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,2i10,2x,1p,10e15.6)") ++ x keyword(1:4),lstbnd(nbonds,1), ++ x lstbnd(nbonds,2),(prmbnd(nbonds,j),j=1,mxpbnd) ++c ++c convert energy units to internal units ++ ++ if(abs(keybnd(nbonds)).eq.3)then ++ prmbnd(nbonds,2)=prmbnd(nbonds,2)*engunit ++ endif ++ if(abs(keybnd(nbonds)).eq.5)then ++ prmbnd(nbonds,3)=prmbnd(nbonds,3)*engunit ++ prmbnd(nbonds,4)=prmbnd(nbonds,4)*engunit ++ endif ++ if(abs(keybnd(nbonds)).eq.6)then ++ prmbnd(nbonds,3)=prmbnd(nbonds,3)*engunit ++ endif ++ ++ if(abs(keybnd(nbonds)).ne.8) ++ x prmbnd(nbonds,1)=prmbnd(nbonds,1)*engunit ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_bonds ++ ++ subroutine bndfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntbond,epsq, ++ x engbnd,virbnd) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating chemical bond energy and ++c force terms in molecular dynamics. ++c ++c replicated data - blocked data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992 ++c modified - t. forester march 1993 ++c modified - t. forester march 1994 ++c modified - t. forester may 1994 ++c modified - t. forester nov 1994 ++c modified - w. smith nov 2006 ++c modified - p.-a. cazade oct 2007, solvation etc. ++c modified - d. quigley 2007, metdynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect ++ logical idrive,jdrive ++ integer i,fail,ibnd1,ibnd2,idnode,mxnode,ii,ia,ib,imcon ++ integer keyb,kk,ntbond ++ real(8) strs(6),strs_loc(6) ++ real(8) rab,rrab,omega,gamma,fx,fy,fz,engbnd,virbnd,epsq ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail) ++ if(fail.ne.0)call error(idnode,1040) ++ ++c flag for undefined potential ++ ++ safe=.true. ++ ++c check size of work arrays ++ ++ if((ntbond-mxnode+1)/mxnode.gt.msbad)call error(idnode,418) ++ ++c block indices ++ ++ ibnd1=(idnode*ntbond)/mxnode+1 ++ ibnd2=((idnode+1)*ntbond)/mxnode ++ ++c initialise accumulators ++ ++ engbnd=0.d0 ++ virbnd=0.d0 ++ bnd_fre=0.d0 ++ bnd_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(1)=.true. ++ bnd_sol(:)=0.d0 ++ if(lexcite)bnd_exc(:)=0.d0 ++ ++ endif ++ ++c calculate atom separation vectors ++ ++ ii=0 ++ do i=ibnd1,ibnd2 ++ ++ ii=ii+1 ++ ++c indices of bonded atoms ++ ++ ia=listbnd(ii,2) ++ ib=listbnd(ii,3) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ ++ endif ++ ++c components of bond vector ++ ++ xdab(ii)=xxx(ia)-xxx(ib) ++ ydab(ii)=yyy(ia)-yyy(ib) ++ zdab(ii)=zzz(ia)-zzz(ib) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ ++c loop over all specified chemical bond potentials ++ ++ ii=0 ++ do i=ibnd1,ibnd2 ++ ++ ii=ii+1 ++ ++c define components of bond vector ++ ++ rrab=0.d0 ++ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) ++ if(rab.gt.1.d-6)rrab=1.d0/rab ++ ++c index of potential function parameters ++ ++ kk=listbnd(ii,1) ++ keyb=abs(keybnd(kk)) ++ ++c calculate scalar constant terms ++ ++ if(keyb.eq.0)then ++ ++c null interaction ++ ++ omega=0.d0 ++ gamma=0.d0 ++ ++ elseif(keyb.eq.1)then ++ ++c harmonic potential ++ ++ omega=0.5d0*prmbnd(kk,1)*(rab-prmbnd(kk,2))**2 ++ gamma=prmbnd(kk,1)*(rab-prmbnd(kk,2))*rrab ++ ++ else if(keyb.eq.2)then ++ ++c morse potential ++ ++ omega=prmbnd(kk,1)*((1.d0-exp(-prmbnd(kk,3)* ++ x (rab-prmbnd(kk,2))))**2-1.d0) ++ gamma=2.d0*prmbnd(kk,1)*prmbnd(kk,3)*(1.d0- ++ x exp(-prmbnd(kk,3)*(rab-prmbnd(kk,2))))* ++ x exp(-prmbnd(kk,3)*(rab-prmbnd(kk,2)))*rrab ++ ++ else if(keyb.eq.3)then ++ ++c 12-6 potential ++ ++ omega=(prmbnd(kk,1)*rrab**6-prmbnd(kk,2))*rrab**6 ++ gamma=(6.d0*prmbnd(kk,2)-12.d0*prmbnd(kk,1)*rrab**6)* ++ x rrab**8 ++ ++ elseif(keyb.eq.4)then ++ ++c restrained harmonic ++ ++ rab=rab-prmbnd(kk,2) ++ omega=0.5d0*prmbnd(kk,1)*(min(abs(rab),prmbnd(kk,3)))**2 ++ x +prmbnd(kk,1)*prmbnd(kk,3)*max(abs(rab)-prmbnd(kk,3),0.d0) ++ gamma=rrab*prmbnd(kk,1)*(sign(min(abs(rab),prmbnd(kk,3)),rab)) ++ ++ elseif(keyb.eq.5)then ++ ++c quartic potential ++ ++ omega=0.5d0*prmbnd(kk,1)*(rab-prmbnd(kk,2))**2+ ++ x 1.d0/3.d0*prmbnd(kk,3)*(rab-prmbnd(kk,2))**3+ ++ x 0.25d0*prmbnd(kk,4)*(rab-prmbnd(kk,2))**4 ++ gamma=rrab*(prmbnd(kk,1)*(rab-prmbnd(kk,2))+ ++ x prmbnd(kk,3)*(rab-prmbnd(kk,2))**2+ ++ x prmbnd(kk,4)*(rab-prmbnd(kk,2))**3) ++ ++ else if(keyb.eq.6)then ++ ++c buckingham exp-6 potential ++ ++ omega=prmbnd(kk,1)*exp(-rab/prmbnd(kk,2))-prmbnd(kk,3)* ++ x rrab**6 ++ gamma=-rrab*prmbnd(kk,1)*exp(-rab/prmbnd(kk,2))/prmbnd(kk,2)+ ++ x 6.d0*prmbnd(kk,3)*rrab**8 ++ ++ else if(keyb.eq.7)then ++ ++c FENE bond potential ++ ++ omega=-0.5d0*prmbnd(kk,1)*prmbnd(kk,2)**2*log(1.d0- ++ x ((rab-prmbnd(kk,3))/prmbnd(kk,2))**2) ++ gamma=rrab*prmbnd(kk,1)*(rab-prmbnd(kk,3))/ ++ x (1.d0-((rab-prmbnd(kk,3))/prmbnd(kk,2))**2) ++ ++ else if(keyb.eq.8)then ++ ++c coulomb bond potential ++ ++ omega=prmbnd(kk,1)*prmbnd(kk,2)*rrab*r4pie0/epsq ++ gamma=-omega*rrab*rrab ++ ++ else ++ ++c undefined potential ++ ++ omega=0.d0 ++ gamma=0.d0 ++ safe=.false. ++ ++ endif ++ ++c indices of bonded atoms ++ ++ ia=listbnd(ii,2) ++ ib=listbnd(ii,3) ++ ++c set selection control ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib).eq.0) ++ ++ if(lsolva)then ++ bnd_exc(atmolt(ia))=bnd_exc(atmolt(ia))+omega ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ bnd_fre=bnd_fre-omega ++ bnd_vir=bnd_vir-gamma*rab*rab ++ omega=lambda1*omega ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ bnd_fre=bnd_fre+omega ++ bnd_vir=bnd_vir+gamma*rab*rab ++ omega=lambda2*omega ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate bond energy and virial ++ ++ engbnd=engbnd+omega ++ virbnd=virbnd+gamma*rab*rab ++ ++c calculate solvation energy ++ ++ if(lsolva)then ++ bnd_sol(atmolt(ia))=bnd_sol(atmolt(ia))+omega ++ endif ++ ++c calculate forces ++ ++ fx=-gamma*xdab(ii) ++ fy=-gamma*ydab(ii) ++ fz=-gamma*zdab(ii) ++ ++ fxx(ia)=fxx(ia)+fx ++ fyy(ia)=fyy(ia)+fy ++ fzz(ia)=fzz(ia)+fz ++ ++ fxx(ib)=fxx(ib)-fx ++ fyy(ib)=fyy(ib)-fy ++ fzz(ib)=fzz(ib)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdab(ii)*fx ++ strs(2)=strs(2)+xdab(ii)*fy ++ strs(3)=strs(3)+xdab(ii)*fz ++ strs(4)=strs(4)+ydab(ii)*fy ++ strs(5)=strs(5)+ydab(ii)*fz ++ strs(6)=strs(6)+zdab(ii)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc+gamma*rab*rab ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fx ++ fyy_loc(ia)=fyy_loc(ia)+fy ++ fzz_loc(ia)=fzz_loc(ia)+fz ++ ++ fxx_loc(ib)=fxx_loc(ib)-fx ++ fyy_loc(ib)=fyy_loc(ib)-fy ++ fzz_loc(ib)=fzz_loc(ib)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdab(ii)*fx ++ strs_loc(2)=strs_loc(2)+xdab(ii)*fy ++ strs_loc(3)=strs_loc(3)+xdab(ii)*fz ++ strs_loc(4)=strs_loc(4)+ydab(ii)*fy ++ strs_loc(5)=strs_loc(5)+ydab(ii)*fz ++ strs_loc(6)=strs_loc(6)+zdab(ii)*fz ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,444) ++ ++c sum contributions to potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engbnd ++ buffer(2)=virbnd ++ buffer(3)=bnd_fre ++ buffer(4)=bnd_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engbnd=buffer(1) ++ virbnd=buffer(2) ++ bnd_fre=buffer(3) ++ bnd_vir=buffer(4) ++ ++ if(lsolva)then ++ ++ call gdsum(bnd_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(bnd_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ deallocate (xdab,ydab,zdab,stat=fail) ++ ++ return ++ end subroutine bndfrc ++ ++ end module bonds_module +diff -urN dl_class_1.9.orig/srcmod/comms.inc dl_class_1.9/srcmod/comms.inc +--- dl_class_1.9.orig/srcmod/comms.inc 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/comms.inc 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,42 @@ ++c********************************************************************* ++c ++c dl_poly include file for MPI, PVM and SHMEM ++c copyright - daresbury laboratory ++c ++c********************************************************************* ++ ++CMPIU define mpipriv mpipriv_ ++ ++ include "mpif.h" ++ ++c parameters for message tags ++ ++ integer Xgcopy_tag, Merge1_tag ++ integer Dgsum_tag1, Dgsum_tag2 ++ integer Igmax_tag1, Igmax_tag2 ++ integer Igsum_tag1, Igsum_tag2 ++ integer Shmove_tag, Merge_tag ++ integer Merge4_tag, Shell_tag ++ integer Gstate_tag1, Gstate_tag2 ++ integer Passcon_tag, Msgtag ++ ++c MPI tagsizes ++ ++ parameter( ++ $ Xgcopy_tag = 105, ++ $ Dgsum_tag1 = 6001, ++ $ Dgsum_tag2 = 9001, ++ $ Igsum_tag1 = 12001, ++ $ Igsum_tag2 = 15001, ++ $ Shmove_tag = 18001, ++ $ Merge_tag = 6001, ++ $ Merge1_tag = 9001, ++ $ Merge4_tag = 12001, ++ $ Gstate_tag1 = 15001, ++ $ Gstate_tag2 = 18001, ++ $ Shell_tag = 21001, ++ $ Passcon_tag = 3001, ++ $ Igmax_tag1 = 24001, ++ $ Igmax_tag2 = 27001, ++ $ Msgtag = 30000) ++ +diff -urN dl_class_1.9.orig/srcmod/config_module.f dl_class_1.9/srcmod/config_module.f +--- dl_class_1.9.orig/srcmod/config_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/config_module.f 2015-11-09 14:15:45.054258793 +0100 +@@ -0,0 +1,103 @@ ++ module config_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining simulation configuration data ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ character*1 cfgname(80) ++ character*1 sysname(80) ++ real(8) cell(9),rcell(9),celprp(10) ++ real(8) eta(9),stress(9),stresl(9),strcns(9),strbod(9) ++ ++ character*8, allocatable :: atmnam(:) ++ real(8), allocatable :: xxx(:),yyy(:),zzz(:) ++ real(8), allocatable :: vxx(:),vyy(:),vzz(:) ++ real(8), allocatable :: fxx(:),fyy(:),fzz(:) ++ real(8), allocatable :: flx(:),fly(:),flz(:) ++ real(8), allocatable :: chge(:),weight(:),rmass(:) ++ integer, allocatable :: ltype(:),lstfrz(:) ++ integer, allocatable :: neulst(:),lstneu(:) ++ integer, allocatable :: lentry(:),list(:,:) ++ integer, allocatable :: lstout(:),link(:) ++ integer, allocatable :: lct(:),lst(:) ++ ++ real(8), allocatable :: buffer(:) ++ ++c PLUMED variables ++ logical, save :: lplumed ++c PLUMED variables ++ ++ save atmnam,neulst,lstneu,cfgname,sysname ++ save cell,xxx,yyy,zzz,vxx,vyy,vzz,fxx,fyy,fzz ++ save buffer,weight,chge,ltype,lstfrz,flx,fly,flz ++ save lentry,list,lstout,link,lct,lst,celprp,rmass ++ save eta,stress,stresl,strcns,rcell ++ ++ contains ++ ++ subroutine alloc_config_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining simulation configuration arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ integer, parameter :: nnn=27 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (xxx(mxatms),stat=fail(1)) ++ allocate (yyy(mxatms),stat=fail(2)) ++ allocate (zzz(mxatms),stat=fail(3)) ++ allocate (vxx(mxatms),stat=fail(4)) ++ allocate (vyy(mxatms),stat=fail(5)) ++ allocate (vzz(mxatms),stat=fail(6)) ++ allocate (fxx(mxatms),stat=fail(7)) ++ allocate (fyy(mxatms),stat=fail(8)) ++ allocate (fzz(mxatms),stat=fail(9)) ++ allocate (weight(mxatms),stat=fail(11)) ++ allocate (chge(mxatms),stat=fail(12)) ++ allocate (ltype(mxatms),stat=fail(13)) ++ allocate (lstfrz(mxatms),stat=fail(14)) ++ allocate (flx(mxatms),stat=fail(15)) ++ allocate (fly(mxatms),stat=fail(16)) ++ allocate (flz(mxatms),stat=fail(17)) ++ allocate (atmnam(mxatms),stat=fail(18)) ++ allocate (neulst(mxneut),stat=fail(19)) ++ allocate (lstneu(mxatms),stat=fail(20)) ++ allocate (lstout(mxatms),stat=fail(21)) ++ allocate (lentry(msatms),stat=fail(22)) ++ allocate (list(msatms,mxlist),stat=fail(23)) ++ allocate (link(mxatms),stat=fail(24)) ++ allocate (lct(mxcell),stat=fail(25)) ++ allocate (lst(mxcell),stat=fail(26)) ++ allocate (rmass(mxatms),stat=fail(27)) ++ allocate (buffer(mxbuff),stat=fail(10)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)then ++ if(idnode.eq.0)write(nrite,'(10i5)')fail ++ call error(idnode,1000) ++ endif ++ enddo ++ ++ end subroutine alloc_config_arrays ++ ++ end module config_module +diff -urN dl_class_1.9.orig/srcmod/config_module.f.preplumed dl_class_1.9/srcmod/config_module.f.preplumed +--- dl_class_1.9.orig/srcmod/config_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/config_module.f.preplumed 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,99 @@ ++ module config_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining simulation configuration data ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ character*1 cfgname(80) ++ character*1 sysname(80) ++ real(8) cell(9),rcell(9),celprp(10) ++ real(8) eta(9),stress(9),stresl(9),strcns(9),strbod(9) ++ ++ character*8, allocatable :: atmnam(:) ++ real(8), allocatable :: xxx(:),yyy(:),zzz(:) ++ real(8), allocatable :: vxx(:),vyy(:),vzz(:) ++ real(8), allocatable :: fxx(:),fyy(:),fzz(:) ++ real(8), allocatable :: flx(:),fly(:),flz(:) ++ real(8), allocatable :: chge(:),weight(:),rmass(:) ++ integer, allocatable :: ltype(:),lstfrz(:) ++ integer, allocatable :: neulst(:),lstneu(:) ++ integer, allocatable :: lentry(:),list(:,:) ++ integer, allocatable :: lstout(:),link(:) ++ integer, allocatable :: lct(:),lst(:) ++ ++ real(8), allocatable :: buffer(:) ++ ++ save atmnam,neulst,lstneu,cfgname,sysname ++ save cell,xxx,yyy,zzz,vxx,vyy,vzz,fxx,fyy,fzz ++ save buffer,weight,chge,ltype,lstfrz,flx,fly,flz ++ save lentry,list,lstout,link,lct,lst,celprp,rmass ++ save eta,stress,stresl,strcns,rcell ++ ++ contains ++ ++ subroutine alloc_config_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining simulation configuration arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ integer, parameter :: nnn=27 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (xxx(mxatms),stat=fail(1)) ++ allocate (yyy(mxatms),stat=fail(2)) ++ allocate (zzz(mxatms),stat=fail(3)) ++ allocate (vxx(mxatms),stat=fail(4)) ++ allocate (vyy(mxatms),stat=fail(5)) ++ allocate (vzz(mxatms),stat=fail(6)) ++ allocate (fxx(mxatms),stat=fail(7)) ++ allocate (fyy(mxatms),stat=fail(8)) ++ allocate (fzz(mxatms),stat=fail(9)) ++ allocate (weight(mxatms),stat=fail(11)) ++ allocate (chge(mxatms),stat=fail(12)) ++ allocate (ltype(mxatms),stat=fail(13)) ++ allocate (lstfrz(mxatms),stat=fail(14)) ++ allocate (flx(mxatms),stat=fail(15)) ++ allocate (fly(mxatms),stat=fail(16)) ++ allocate (flz(mxatms),stat=fail(17)) ++ allocate (atmnam(mxatms),stat=fail(18)) ++ allocate (neulst(mxneut),stat=fail(19)) ++ allocate (lstneu(mxatms),stat=fail(20)) ++ allocate (lstout(mxatms),stat=fail(21)) ++ allocate (lentry(msatms),stat=fail(22)) ++ allocate (list(msatms,mxlist),stat=fail(23)) ++ allocate (link(mxatms),stat=fail(24)) ++ allocate (lct(mxcell),stat=fail(25)) ++ allocate (lst(mxcell),stat=fail(26)) ++ allocate (rmass(mxatms),stat=fail(27)) ++ allocate (buffer(mxbuff),stat=fail(10)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)then ++ if(idnode.eq.0)write(nrite,'(10i5)')fail ++ call error(idnode,1000) ++ endif ++ enddo ++ ++ end subroutine alloc_config_arrays ++ ++ end module config_module +diff -urN dl_class_1.9.orig/srcmod/core_shell_module.f dl_class_1.9/srcmod/core_shell_module.f +--- dl_class_1.9.orig/srcmod/core_shell_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/core_shell_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,826 @@ ++ module core_shell_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining core_shell arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use pair_module ++ use parse_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use site_module ++ use solvation_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmshl(:,:) ++ integer, allocatable :: listshl(:,:) ++ integer, allocatable :: numshl(:),lstshl(:,:) ++ ++ save prmshl,listshl,numshl,lstshl ++ ++ contains ++ ++ subroutine alloc_csh_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining core_shell arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(4) ++ ++ do i=1,4 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmshl(mxtshl,2),stat=fail(1)) ++ allocate (numshl(mxtmls),stat=fail(2)) ++ allocate (lstshl(mxtshl,2),stat=fail(3)) ++ allocate (listshl(mxshl,3),stat=fail(4)) ++ ++ do i=1,4 ++ if(fail(i).gt.0)call error(idnode,1100) ++ enddo ++ ++ do i=1,mxtmls ++ numshl(i)=0 ++ enddo ++ ++ end subroutine alloc_csh_arrays ++ ++ subroutine define_core_shell ++ x (safe,idnode,itmols,nshels,nsite,keyshl,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining core-shell units ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ logical safe ++ integer idnode,itmols,nshels,nsite,ntmp,ishls ++ integer iatm1,iatm2,isite1,isite2,keyshl,kshl,idum ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numshl(itmols)=numshl(itmols)+ntmp ++ kshl=intstr(record,lenrec,idum) ++ if(keyshl.eq.0)then ++ keyshl=kshl ++ elseif(kshl.ne.keyshl)then ++ call error(idnode,1960) ++ endif ++ if(idnode.eq.0) then ++ ++ write(nrite, ++ x "(/,1x,'number of core-shell units',5x,i10)") ++ x ntmp ++ if(keyshl.eq.1)then ++ ++ write(nrite, ++ x "(/,/,1x,'core-shell details:',/,/,21x, ++ x 5x,'index',5x,'index',6x,'parameter')") ++ ++ else ++ ++ write(nrite, ++ x "(/,/,1x,'core-shell details:',/,/,21x, ++ x 6x,'core',5x,'shell',6x,'parameter')") ++ ++ endif ++ ++ endif ++ ++ do ishls=1,numshl(itmols) ++ ++ nshels=nshels+1 ++ if(nshels.gt.mxtshl) call error(idnode,57) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ lstshl(nshels,1)=iatm1 ++ lstshl(nshels,2)=iatm2 ++ prmshl(nshels,1)=dblstr(record,lenrec,idum) ++ prmshl(nshels,2)=dblstr(record,lenrec,idum) ++ if(idnode.eq.0) write(nrite, ++ x "(21x,2i10,2f15.4)") ++ x lstshl(nshels,1),lstshl(nshels,2), ++ x prmshl(nshels,1),prmshl(nshels,2) ++ ++c test for frozen cores or shells ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ if(lfzsit(isite1)*lfzsit(isite2).ne.0) ++ x call error(idnode,49) ++ ++c convert energy units to internal units ++ ++ prmshl(nshels,1)=prmshl(nshels,1)*engunit ++ prmshl(nshels,2)=prmshl(nshels,2)*engunit ++ ++ enddo ++ ++ return ++ end subroutine define_core_shell ++ ++ subroutine corshl(idnode,mxnode,ntshl,shlke) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating the internal kinetic ++c energy of core-shell units in the shell polarisation model ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith july 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m ++ real(8) shlke,ppp,ccc,sss ++ ++ shlke=0.d0 ++ ++c block indices ++ ++ ishl1=(idnode*ntshl)/mxnode+1 ++ ishl2=((idnode+1)*ntshl)/mxnode ++ ++c loop over all specified core-shell pairs ++ ++ m=0 ++ ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c indices of atoms involved ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++c calculate atom translational kinetic energy ++ ++ ppp=((weight(i)*vxx(i)+weight(j)*vxx(j))**2 ++ x +(weight(i)*vyy(i)+weight(j)*vyy(j))**2 ++ x +(weight(i)*vzz(i)+weight(j)*vzz(j))**2) ++ x /(weight(i)+weight(j)) ++ ++c calculate individual core and shell kinetic energies ++ ++ ccc=weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ sss=weight(j)*(vxx(j)**2+vyy(j)**2+vzz(j)**2) ++ ++c calculate core-shell internal kinetic energy ++ ++ shlke=shlke+0.5d0*(ccc+sss-ppp) ++ ++ enddo ++ ++c global average of core-shell internal kinetic energy ++ ++ if(mxnode.gt.1)then ++ buffer(1)=shlke ++ call gdsum(buffer(1),1,buffer(2)) ++ shlke=buffer(1) ++ endif ++ ++ return ++ end subroutine corshl ++ ++ subroutine put_shells_on_cores(idnode,mxnode,ntshl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for placing shells on top of cores in the ++c shell model at the start of a simulation ++c ++c copyright - daresbury laboratory ++c author - w. smith feb 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, allocatable :: ltop(:) ++ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m,fail ++ ++c allocate ltop array ++ ++ allocate(ltop(ntshl),stat=fail) ++ ++c block indices ++ ++ ishl1=(idnode*ntshl)/mxnode+1 ++ ishl2=((idnode+1)*ntshl)/mxnode ++ ++c zero ltop array ++ ++ do i=1,ntshl ++ ltop(i)=0 ++ enddo ++ ++c loop over all specified core-shell pairs ++ ++ m=0 ++ ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c indices of atoms involved ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++c set shell and core positions equal ++ ++ ltop(m)=j ++ xxx(j)=xxx(i) ++ yyy(j)=yyy(i) ++ zzz(j)=zzz(i) ++ ++ enddo ++ ++c merge data on different processors ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,ntshl,ltop,xxx,yyy,zzz,buffer) ++ ++c deallocate ltop array ++ ++ deallocate(ltop,stat=fail) ++ ++ return ++ end subroutine put_shells_on_cores ++ ++ subroutine shlfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntshl,engshl,virshl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating shell model spring energy and ++c force terms in molecular dynamics. ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith july 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lexcite,lselect ++ integer idnode,imcon,mxnode,ntshl,ishl1,ishl2,i,j,k,m,kk ++ real(8) engshl,virshl,rij2,omega,gamma,ffx,ffy,ffz,strs ++ ++ dimension strs(6) ++ ++c check adequate workspace is available ++ ++ if(mxxdf.lt.mxshl)call error(idnode,423) ++ ++c block indices ++ ++ ishl1=(idnode*ntshl)/mxnode+1 ++ ishl2=((idnode+1)*ntshl)/mxnode ++ ++c initialise accumulators ++ ++ engshl=0.d0 ++ virshl=0.d0 ++ shl_fre=0.d0 ++ shl_vir=0.d0 ++ ++ do i=1,6 ++ strs(i)=0.d0 ++ enddo ++ ++ if(lsolva)then ++ ++ lcomp(5)=.true. ++ shl_sol(:)=0.d0 ++ if(lexcite)shl_exc(:)=0.d0 ++ ++ endif ++ ++c calculate core-shell separation vectors ++ ++ m=0 ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c indices of core and shell ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++c components of bond vector ++ ++ xdf(m)=xxx(i)-xxx(j) ++ ydf(m)=yyy(i)-yyy(j) ++ zdf(m)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,m,cell,xdf,ydf,zdf) ++ ++c loop over all specified core-shell units ++ ++ m=0 ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c index of potential parameters ++ ++ kk=listshl(m,1) ++ ++c core-shell separation ++ ++ rij2=xdf(m)**2+ydf(m)**2+zdf(m)**2 ++ ++c calculate scalar constant terms ++ ++ omega=(0.5d0*prmshl(kk,1)+0.25d0*prmshl(kk,2)*rij2)*rij2 ++ gamma=prmshl(kk,1)+prmshl(kk,2)*rij2 ++ ++c indices of core and shell ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++c set selection control ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(i).ne.1).and.(atm_fre(j).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(i)+atm_fre(i).eq.0) ++ ++ if(lsolva)then ++ shl_exc(atmolt(i))=shl_exc(atmolt(i))+omega ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(i).eq.1).or.(atm_fre(j).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ shl_fre=shl_fre-omega ++ shl_vir=shl_vir-gamma*rij2 ++ omega=lambda1*omega ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(i).eq.2).or.(atm_fre(j).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ shl_fre=shl_fre+omega ++ shl_vir=shl_vir+gamma*rij2 ++ omega=lambda2*omega ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate spring energy and virial ++ ++ engshl=engshl+omega ++ virshl=virshl+gamma*rij2 ++ ++ if(lsolva)then ++ shl_sol(atmolt(i))=shl_sol(atmolt(i))+omega ++ endif ++ ++c calculate spring forces ++ ++ ffx=-gamma*xdf(m) ++ ffy=-gamma*ydf(m) ++ ffz=-gamma*zdf(m) ++ ++ fxx(i)=fxx(i)+ffx ++ fyy(i)=fyy(i)+ffy ++ fzz(i)=fzz(i)+ffz ++ ++ fxx(j)=fxx(j)-ffx ++ fyy(j)=fyy(j)-ffy ++ fzz(j)=fzz(j)-ffz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*ffx ++ strs(2)=strs(2)+xdf(m)*ffy ++ strs(3)=strs(3)+xdf(m)*ffz ++ strs(4)=strs(4)+ydf(m)*ffy ++ strs(5)=strs(5)+ydf(m)*ffz ++ strs(6)=strs(6)+zdf(m)*ffz ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++c sum contributions to potential and virial ++ ++ if(mxnode.gt.1) then ++ ++ buffer(1)=engshl ++ buffer(2)=virshl ++ buffer(3)=shl_fre ++ buffer(4)=shl_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engshl=buffer(1) ++ virshl=buffer(2) ++ shl_fre=buffer(3) ++ shl_vir=buffer(4) ++ ++c sum up solvation energies ++ ++ if(lsolva)then ++ ++ call gdsum(shl_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(shl_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine shlfrc ++ ++ subroutine check_shells(idnode,itmols,nshels,ngrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to check no core-shell units are in ++c rigid bodies ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,itmols,nshels,ngrp,k1,ia,ib,kk ++ integer id,jj,ia1,jk,ib1 ++ ++ nshels=nshels-numshl(itmols) ++ do k1=1,numshl(itmols) ++ ++ nshels=nshels+1 ++ ia=lstshl(nshels,1) ++ ib=lstshl(nshels,2) ++ ++ ngrp=ngrp-numgrp(itmols) ++ ++ do kk=1,numgrp(itmols) ++ ++ ngrp=ngrp+1 ++ id=listyp(ngrp) ++ ++ do jj=1,numgsit(id)-1 ++ ++ ia1=lstgst(ngrp,jj) ++ if(ia1.eq.ia) then ++ ++ do jk=jj,numgsit(id) ++ ++ ib1=lstgst(ngrp,jk) ++ if(ib1.eq.ib) then ++ ++ if(idnode.eq.0)write(nrite,'(/,13x,a,2i10)') ++ x 'error: sites ',ia,ib ++ call error(idnode,456) ++ ++ endif ++ ++ enddo ++ ++ elseif(ia1.eq.ib) then ++ ++ do jk=jj,numgsit(id) ++ ++ ib1=lstgst(ngrp,jk) ++ if(ib1.eq.ia) then ++ ++ if(idnode.eq.0)write(nrite,'(/,13x,a,2i10)') ++ x 'error: sites ',ia,ib ++ call error(idnode,456) ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ enddo ++ enddo ++ ++ return ++ end subroutine check_shells ++ ++ subroutine relax_shells ++ x (relaxed,keyrlx,idnode,mxnode,natms,ntpmls,tstep,rlxtol) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for relaxing shells to zero force ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical relaxed,newjob ++ integer keyrlx,idnode,mxnode,natms,i,j,itmols,imols ++ integer iatm1,iatm2,fail,numopt,isite,ishls,jshls,lshls,ntpmls ++ integer nbuff ++ real(8) hnorm,grad0,grad1,grad2,stride,tstep,step ++ real(8) ggg,gam2,sgn,rlxtol ++ ++ dimension fail(4) ++ ++ integer, allocatable :: lstopt(:) ++ real(8), allocatable :: ggx(:),ggy(:),ggz(:) ++ real(8), allocatable :: hhx(:),hhy(:),hhz(:) ++ real(8), allocatable :: oxx(:),oyy(:),ozz(:) ++ ++ save hnorm,grad0,grad1,grad2,stride,lstopt ++ save ggx,ggy,ggz,hhx,hhy,hhz,oxx,oyy,ozz,numopt,nbuff,sgn ++ ++ data newjob/.true./,fail/0,0,0,0/ ++ ++c define initial data ++ ++ if(newjob)then ++ ++ newjob=.false. ++ allocate(lstopt(mxatms),stat=fail(1)) ++ allocate(ggx(mxatms),ggy(mxatms),ggz(mxatms),stat=fail(2)) ++ allocate(hhx(mxatms),hhy(mxatms),hhz(mxatms),stat=fail(3)) ++ allocate(oxx(mxatms),oyy(mxatms),ozz(mxatms),stat=fail(4)) ++ do i=1,4 ++ if(fail(i).ne.0)call error(idnode,1970) ++ enddo ++ ++c identify the shells ++ ++ isite=0 ++ ishls=0 ++ jshls=0 ++ do i=1,natms ++ ++ lstopt(i)=0 ++ ++ enddo ++ do itmols=1,ntpmls ++ ++ do imols=1,nummols(itmols) ++ ++ do lshls=1,numshl(itmols) ++ ++ ishls=ishls+1 ++ lstopt(lstshl(lshls+jshls,2)+isite)=1 ++ ++ enddo ++ ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ jshls=jshls+numshl(itmols) ++ ++ enddo ++ ++ numopt=ishls ++ ++ endif ++ ++c load coordinates of shells ++ ++ j=0 ++ do i=1,natms ++ ++ if(lstopt(i).gt.0)then ++ ++ j=j+1 ++ oxx(j)=xxx(i) ++ oyy(j)=yyy(i) ++ ozz(j)=zzz(i) ++ ggx(j)=fxx(i) ++ ggy(j)=fyy(i) ++ ggz(j)=fzz(i) ++ ++ endif ++ ++ enddo ++ ++c step length for relaxation ++ ++ step=tstep**2 ++ ++c define atoms for this nodes ++ ++ iatm1=(idnode*numopt)/mxnode+1 ++ iatm2=((idnode+1)*numopt)/mxnode ++ ++ ggg=0.d0 ++ do i=iatm1,iatm2 ++ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 ++ enddo ++ if(mxnode.gt.1)then ++ buffer(1)=ggg ++ call gdsum(buffer(1),1,buffer(2)) ++ ggg=buffer(1) ++ endif ++ ggg=sqrt(ggg) ++ ++c check convergence ++ ++ if(abs(ggg)/dble(numopt).lt.rlxtol)then ++ ++ relaxed=.true. ++ return ++ ++ endif ++ ++ if(keyrlx.eq.0) then ++ ++c set original search direction ++ ++ hnorm=ggg ++ grad0=ggg ++ grad2=ggg ++ do i=iatm1,iatm2 ++ ++ hhx(i)=ggx(i) ++ hhy(i)=ggy(i) ++ hhz(i)=ggz(i) ++ oxx(i)=oxx(i)+step*hhx(i) ++ oyy(i)=oyy(i)+step*hhy(i) ++ ozz(i)=ozz(i)+step*hhz(i) ++ ++ enddo ++ keyrlx=1 ++ sgn=1.d0 ++ ++ elseif(keyrlx.eq.1)then ++ ++c line search along chosen direction ++ ++ grad1=grad2 ++ grad2=0.d0 ++ do i=iatm1,iatm2 ++ grad2=grad2+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) ++ enddo ++ if(mxnode.gt.1)then ++ buffer(1)=grad2 ++ call gdsum(buffer(1),1,buffer(2)) ++ grad2=buffer(1) ++ endif ++ grad2=sgn*grad2/hnorm ++ ++c linear extrapolation to minimum ++ ++ stride=sgn*step ++ if(grad2.lt.0.d0)then ++ ++ keyrlx=2 ++ stride=sgn*step*grad2/(grad1-grad2) ++ ++ endif ++ ++ do i=iatm1,iatm2 ++ ++ oxx(i)=oxx(i)+stride*hhx(i) ++ oyy(i)=oyy(i)+stride*hhy(i) ++ ozz(i)=ozz(i)+stride*hhz(i) ++ ++ enddo ++ ++ elseif(keyrlx.eq.2)then ++ ++c construct conjugate search vector ++ ++ gam2=(ggg/grad0)**2 ++ hnorm=0.d0 ++ grad0=ggg ++ grad2=0.d0 ++ do i=iatm1,iatm2 ++ ++ hhx(i)=ggx(i)+gam2*hhx(i) ++ hhy(i)=ggy(i)+gam2*hhy(i) ++ hhz(i)=ggz(i)+gam2*hhz(i) ++ hnorm=hnorm+hhx(i)**2+hhy(i)**2+hhz(i)**2 ++ grad2=grad2+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) ++ ++ enddo ++ if(mxnode.gt.1)then ++ ++ buffer(1)=hnorm ++ buffer(2)=grad2 ++ call gdsum(buffer(1),2,buffer(3)) ++ hnorm=buffer(1) ++ grad2=buffer(2) ++ ++ endif ++ hnorm=sqrt(hnorm) ++ grad2=grad2/hnorm ++ sgn=sign(1.d0,grad2) ++ grad2=sgn*grad2 ++ ++ do i=iatm1,iatm2 ++ ++ oxx(i)=oxx(i)+sgn*step*hhx(i) ++ oyy(i)=oyy(i)+sgn*step*hhy(i) ++ ozz(i)=ozz(i)+sgn*step*hhz(i) ++ ++ enddo ++ ++ keyrlx=1 ++ ++ endif ++ ++c merge coordinate arrays ++ ++ if(mxnode.gt.1)then ++ ++ nbuff=6*(numopt+mxnode-1)/mxnode ++ call merge(idnode,mxnode,numopt,nbuff,oxx,oyy,ozz,buffer) ++ ++ endif ++ ++c unload coordinates of shells ++ ++ j=0 ++ do i=1,natms ++ ++ if(lstopt(i).gt.0)then ++ ++ j=j+1 ++ xxx(i)=oxx(j) ++ yyy(i)=oyy(j) ++ zzz(i)=ozz(j) ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine relax_shells ++ ++ end module core_shell_module +diff -urN dl_class_1.9.orig/srcmod/coulomb_module.f dl_class_1.9/srcmod/coulomb_module.f +--- dl_class_1.9.orig/srcmod/coulomb_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/coulomb_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1542 @@ ++ module coulomb_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining coulomb terms ++c copyright - daresbury laboratory ++c ++c author - w. smith sep 2003 ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ewald_module ++ use metafreeze_module ++ use pair_module ++ use property_module ++ use setup_module ++ use solvation_module ++ ++ implicit none ++ ++ contains ++ ++ subroutine coul0 ++ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic force. ++c 1/r potential, no truncation or damping ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester february 1993 ++c stress tensor - t.forester may 1994 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,kkk ++ real(8) rcsq,chgea,rsq,chgprd,rrr,coul,fcoul,fi,fx,fy,fz ++ real(8) engcpe,vircpe,rcut,epsq,strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ chgea=chge(iatm)/epsq*r4pie0 ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ ++c coulomb potential and force ++ ++ coul=chgprd/rrr ++ fcoul=coul/rsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+coul ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-coul ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate forces ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-coul ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul0 ++ ++ subroutine coul1 ++ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces ++c assuming a standard coulomb potential truncated at rcut ++c and shifted to zero at rcut. ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith december 1992. ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c stress tensor t.forester may 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,kkk ++ real(8) engcpe,vircpe,rcut,epsq,rcsq,chgea,rsq ++ real(8) fi,chgprd,omega,egamma,fx,fy,fz,rrr ++ real(8) strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++ chgea=chge(iatm)*r4pie0/epsq ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++c start of primary loop for forces evaluation ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10) then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ ++c calculate potential energy and virial ++ ++ omega=chgprd*(rcut-rrr)/(rrr*rcut) ++ egamma=chgprd/(rrr*rsq) ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+omega ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-omega ++ cou_vir=cou_vir+egamma*rsq ++ omega=lambda1*omega ++ egamma=lambda1*egamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+omega ++ cou_vir=cou_vir-egamma*rsq ++ omega=lambda2*omega ++ egamma=lambda2*egamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engcpe=engcpe+omega ++ vircpe=vircpe-egamma*rsq ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+omega ++ ++c calculate forces ++ ++ fx=egamma*xdf(m) ++ fy=egamma*ydf(m) ++ fz=egamma*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc-egamma*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul1 ++ ++ subroutine coul2 ++ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces ++c assuming a distance dependant dielectric `constant'. ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester april 1993 ++c stress tensor added - t.forester may 1994 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,kkk ++ real(8) engcpe,vircpe,rcut,epsq ++ real(8) fi,rcsq,chgea,chgprd,rsq,rrsq,coul,egamma,fx,fy,fz ++ real(8) strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++ chgea=chge(iatm)/epsq*r4pie0 ++ if(abs(chgea).gt.1.d-10)then ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++c calculate potential energy and Virial ++ ++ rrsq=1.d0/rsq ++ coul=chgprd*rrsq ++ egamma=2.d0*coul*rrsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+2.d0*coul ++ coul=lambda1*coul ++ egamma=lambda1*egamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-2.d0*coul ++ coul=lambda2*coul ++ egamma=lambda2*egamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and Virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-2.d0*coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate forces ++ ++ fx=egamma*xdf(m) ++ fy=egamma*ydf(m) ++ fz=egamma*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-2.d0*coul ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul2 ++ ++ subroutine coul3 ++ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic force. ++c reaction field potential ++c Ref: M Neumann, J Chem Phys, 82, 5633, (1985) ++c adapted for fennell-gezelter coulombic model ++c by w.smith june 2007 ++c Ref: CJ Fennell and JD Gezelter, J Chem Phys, ++c 124, 234104, (2006) ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1995 ++c author - t. forester february 1995 ++c stress tensor - t.forester feb 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,l,kkk ++ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,fi,rcsq ++ real(8) b0,rfld0,rfld1,rfld2,chgea,chgprd,rsq,coul,omega ++ real(8) fx,fy,fz,fcoul,rrr,vk0,vk1,vk2,gk0,gk1,gk2,t1,t2 ++ real(8) strs(6),strs_loc(6) ++ dimension fi(3) ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c reaction field terms ++ ++ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) ++ rfld0=b0/rcut**3 ++ rfld1=(1.d0+b0*0.5d0)/rcut ++ rfld2=rfld0*0.5d0 ++ ++c screened coulomb terms ++ ++ vcon=erc(mxegrd-4)+rfld2*rcut**2-rfld1 ++ fcon=rcut*fer(mxegrd-4)-rfld0*rcut ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ rdr=dble(mxegrd-4)/rcut ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ chgea=chge(iatm)*r4pie0 ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ ++c calculate potential energy using 3-point interpolation ++ ++ vk0=erc(l) ++ vk1=erc(l+1) ++ vk2=erc(l+2) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ omega=t1+(t2-t1)*ppp*0.5d0-vcon+fcon*(rrr-rcut) ++ coul=chgprd*(omega+rfld2*rsq-rfld1) ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=fer(l) ++ gk1=fer(l+1) ++ gk2=fer(l+2) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ fcoul=chgprd*((t1+(t2-t1)*ppp*0.5d0)-fcon/rrr-rfld0) ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+fcoul*rsq ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-fcoul*rsq ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate coulombic energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-fcoul*rsq ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate coulombic force ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-fcoul*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul3 ++ ++ subroutine coul4 ++ X (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces ++c assuming a force shifted coulomb potential. ++c adapted for fennell-gezelter coulombic model ++c by w.smith may 2007 ++c Ref: CJ Fennell and JD Gezelter, J Chem Phys, ++c 124, 234104, (2006) ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1995 ++c author - t.forester october 1995 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,l,kkk ++ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,fi,rcsq,coul ++ real(8) strs9,chgea,chgprd,rsq,rrr,omega,fcoul,fx,fy,fz ++ real(8) vk0,vk1,vk2,gk0,gk1,gk2,t1,t2 ++ real(8) strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c screened coulomb terms ++ ++ vcon=erc(mxegrd-4) ++ fcon=rcut*fer(mxegrd-4) ++ rdr=dble(mxegrd-4)/rcut ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++ chgea=chge(iatm)*r4pie0/epsq ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++c start of primary loop for forces evaluation ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ ++c calculate potential energy using 3-point interpolation ++ ++ vk0=erc(l) ++ vk1=erc(l+1) ++ vk2=erc(l+2) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ omega=t1+(t2-t1)*ppp*0.5d0 ++ coul=chgprd*(omega-vcon+fcon*(rrr-rcut)) ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=fer(l) ++ gk1=fer(l+1) ++ gk2=fer(l+2) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ fcoul=chgprd*((t1+(t2-t1)*ppp*0.5d0)-fcon/rrr) ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+fcoul*rsq ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-fcoul*rsq ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate the coulombic energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-fcoul*rsq ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate coulombic forces ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-fcoul*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul4 ++ ++ subroutine coul_nsq ++ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, ++ x engcpe,vircpe) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic potential and forces ++c for the all-pairs algorithm beyond the range of the normal cutoff ++c i.e. the 'tertiary' forces. frozen atom option included ++c ++c to be used with multiple_nsq ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w.smith august 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip ++ integer natms,idnode,mxnode,imcon,ibig,i,last,mpm2 ++ integer npm2,m,ii,j,idum,kkk ++ real(8) engcpe,epsq,rcut,vircpe,rsq,rrr,chgprd,fcoul,coul,rct2 ++ ++ lskip=(lfree.or.lghost) ++ ++c zero energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c zero force arrays ++ ++ do i=1,natms ++ ++ flx(i)=0.d0 ++ fly(i)=0.d0 ++ flz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stresl(i)=0.d0 ++ enddo ++ ++c zero solvation and excitation accumulators ++ ++ if(lsolva)then ++ ++ cou_sol_lng(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc_lng(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c set control variables ++ ++ last=natms ++ mpm2=natms/2 ++ npm2=(natms-1)/2 ++ ++c set cutoff radius ++ ++ rct2=rcut**2 ++ ++c outer loop over atoms ++ ++ do m=1,mpm2 ++ ++ if(m.gt.npm2)last=mpm2 ++ ++c inner loop over atoms ++ ++ ii=0 ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ if(lskip)then ++ if(atm_fre(i)*atm_fre(j).eq.2)cycle ++ endif ++ ++c calculate interatomic displacements ++ ++ ii=ii+1 ++ xdf(ii)=xxx(i)-xxx(j) ++ ydf(ii)=yyy(i)-yyy(j) ++ zdf(ii)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c apply minimum image convention ++ ++ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) ++ ++c calculate coulomb terms ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ if(lskip)then ++ if(atm_fre(i)*atm_fre(j).eq.2)cycle ++ endif ++ ++ ii=ii+1 ++ if(lstfrz(i).eq.0.or.lstfrz(j).eq.0)then ++ ++c reject frozen atoms and calculate interatomic distance ++ ++ rsq=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ ++c running check of neighbour list array capacity ++ ++ if(rsq.ge.rct2)then ++ ++ chgprd=chge(i)*chge(j)*r4pie0/epsq ++ rrr=sqrt(rsq) ++ ++c calculate potential energy and force ++ ++ coul=chgprd/rrr ++ fcoul=coul/rsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(i),atmolt(j)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(i).ne.1).and.(atm_fre(j).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(i)+atm_fre(j).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc_lng(kkk)=cou_exc_lng(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(i).eq.1).or.(atm_fre(j).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+coul ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(i).eq.2).or.(atm_fre(j).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-coul ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol_lng(kkk)=cou_sol_lng(kkk)+coul ++ ++c calculate forces ++ ++ flx(i)=flx(i)+fcoul*xdf(ii) ++ fly(i)=fly(i)+fcoul*ydf(ii) ++ flz(i)=flz(i)+fcoul*zdf(ii) ++ ++ flx(j)=flx(j)-fcoul*xdf(ii) ++ fly(j)=fly(j)-fcoul*ydf(ii) ++ flz(j)=flz(j)-fcoul*zdf(ii) ++ ++c stress tensor ++ ++ stresl(1)=stresl(1)+xdf(ii)*fcoul*xdf(ii) ++ stresl(2)=stresl(2)+xdf(ii)*fcoul*ydf(ii) ++ stresl(3)=stresl(3)+xdf(ii)*fcoul*zdf(ii) ++ stresl(5)=stresl(5)+ydf(ii)*fcoul*ydf(ii) ++ stresl(6)=stresl(6)+ydf(ii)*fcoul*zdf(ii) ++ stresl(9)=stresl(9)+zdf(ii)*fcoul*zdf(ii) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c complete stress tensor ++ ++ stresl(4)=stresl(2) ++ stresl(7)=stresl(3) ++ stresl(8)=stresl(6) ++ ++ return ++ end subroutine coul_nsq ++ ++ end module coulomb_module +diff -urN dl_class_1.9.orig/srcmod/define_system_module.f dl_class_1.9/srcmod/define_system_module.f +--- dl_class_1.9.orig/srcmod/define_system_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/define_system_module.f 2015-11-09 14:15:45.054258793 +0100 +@@ -0,0 +1,6004 @@ ++ module define_system_module ++ ++c*********************************************************************** ++c ++c dl_poly module for utility subroutines and functions ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - p.-a. cazade oct 2007, solvation, free energy ++c and excitation ++c adapted - d. quigley nov 2010, metadynamics ++c ++c*********************************************************************** ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use dihedral_module ++ use ensemble_tools_module ++ use error_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use inversion_module ++ use metafreeze_module ++ use metal_module ++ use parse_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use vdw_module ++ ++ contains ++ ++ subroutine simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading in the simulation control ++c parameters ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992. ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c modified ++c author - t.forester may 1993 ++c amended - t.forester sept 1994 - dl_poly_1.1 ++c amended - t.forester nov 1994 - macro version ++c amended - w.smith dec 1994 - t3d adaptation ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit,seek ++ character*1 hms ++ character*1 directive(lenrec) ++ logical lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,lpsoc ++ logical ltscal,lzeql,loptim,ltraj,lfcap,lgofr,lpgr,lpres,safe ++ logical lstep,ltemp,lcut,ldelr,lprim,lforc,lens,lvdw,lrvdw,kill ++ logical lnsq,lzden,lewald,lspme,lhke,loop,lzero,nolink,newgau ++ logical lminim,lminopt,ltad,lneb,lhit,lbpd,prechk,tadall,nebgo ++ integer idnode,intsta,istraj,keyens,keyfce,keyres,nstbpo,nsbzdn ++ integer keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,khit,nhit ++ integer nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,ntrack ++ integer idum,imcon,keyver,keytol,nblock,blkout,numgau ++ integer minstp,numneb,i,keybpd,mode,nsolva,isolva,nofic ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,rlxtol,opttol ++ real(8) eps,tol,fm,densvar,delrdf,delzdn,zlen,ehit,hyp_units ++ real(8) catchrad,sprneb,deltad,tlow,xhit,yhit,zhit,ebias,vmin ++ real(8) prntim ++ ++CSGIC real(8) dummy ++CCRAY real(8) dummy ++CFFTWc FFTW instruction codes ++CFFTW ++CFFTW integer FFTW_FORWARD,FFTW_BACKWARD ++CFFTW parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) ++CFFTW ++CFFTW integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL ++CFFTW parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) ++CFFTW ++CFFTW integer FFTW_ESTIMATE,FFTW_MEASURE ++CFFTW parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) ++CFFTW ++CFFTW integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM ++CFFTW parameter (FFTW_OUT_OF_PLACE=0) ++CFFTW parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) ++CFFTW ++CFFTW integer FFTW_THREADSAFE ++CFFTW parameter (FFTW_THREADSAFE=128) ++CFFTW ++ ++c intitialize system variables: temperature,pressure,ensemble key ++c force key, cutoff, primary cutoff, verlet shell width, relative ++c dielectric constant,timestep,temperature scaling flag, ++c temp scaling interval ++ ++ mode=0 ++ nhko=0 ++ nlatt=0 ++ nsteql=0 ++ nstrun=0 ++ minstp=0 ++ keybpd=0 ++ keyres=0 ++ keyens=0 ++ keyver=0 ++ taut=0.d0 ++ nstbts=0 ++ nstbgr=0 ++ nsbzdn=0 ++ nstbpo=100 ++ nstack=mxstak ++ intsta=0 ++ nstraj=0 ++ istraj=1 ++ keytrj=0 ++ numgau=1 ++ alpha=0.d0 ++ kmax1=0 ++ kmax2=0 ++ kmax3=0 ++ nospl=min(8,mxspl) ++ isolva=1 ++ nsolva=0 ++ niswitch=0 ++ nswitch=0 ++ nofic=1000 ++ ++ fmax=1000.d0 ++ keyfce=0 ++ multt=1 ++ keytol=0 ++ tstep=0.d0 ++ temp=0.d0 ++ press=0.d0 ++ rcut=0.d0 ++ rprim=0.d0 ++ rvdw=0.d0 ++ delr=0.d0 ++ epsq=1.d0 ++ rlxtol=1.d0 ++ opttol=1.d0 ++ tolnce=1.d-8 ++ quattol=1.d-8 ++ timjob=0.d0 ++ timcls=0.d0 ++ delrdf=0.d0 ++ delzdn=0.d0 ++ zlen=0.d0 ++ ehit=0.d0 ++ xhit=0.d0 ++ yhit=0.d0 ++ zhit=0.d0 ++ vmin=0.d0 ++ ebias=0.d0 ++ catchrad=0.d0 ++ pfree=0.d0 ++ ++ lhit=.false. ++ lbpd=.false. ++ ltad=.false. ++ lneb=.false. ++ loop=.true. ++ lnfic=.false. ++ lpsoc=.false. ++ lzero=.false. ++ ltscal=.false. ++ lewald=.false. ++ lspme=.false. ++ lhke=.false. ++ lgofr=.false. ++ lpgr=.false. ++ lzeql=.true. ++ loptim=.false. ++ lminim=.false. ++ lminopt=.false. ++ ltraj=.false. ++ lfcap=.false. ++ ltemp=.false. ++ lstep=.false. ++ lcut=.false. ++ ldelr=.false. ++ lprim=.false. ++ lforc=.false. ++ lens=.false. ++ lvdw=.false. ++ lrvdw=.false. ++ lpres=.false. ++ kill=.false. ++ lnsq=.false. ++ lzden=.false. ++ nolink=.false. ++ newgau=.false. ++ prechk=.false. ++ tadall=.false. ++ lsolva=.false. ++ lfree=.false. ++ lfrmas=.false. ++ lexcite=.false. ++ lswitch=.false. ++ lghost=.false. ++ nebgo=.true. ++ seek='all ' ++ ++c open the simulation input file ++ ++ if(idnode.eq.0)open(nread,file='CONTROL',status='old') ++ ++ ++c PlUMED defaults ++ lplumed=.false. ++c PLUMED defaults ++c read job title ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ ++ call copystring(record,sysname,80) ++ if(idnode.eq.0)then ++ ++ write(nrite,"(3(1x,120('*'),/),1x,15('*'),5x,80a1,5x,15('*'),/, ++ x 3(1x,120('*'),/),/,/,1x,'SIMULATION CONTROL PARAMETERS',/)") ++ x sysname ++ ++ endif ++ ++c read and process directives from CONTROL file ++ ++ do while(loop) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ ++c convert to lowercase and strip out leading blanks ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.' ')then ++ ++c record is commented out ++ cycle ++ ++ elseif(findstring('redirect',directive,idum))then ++ ++c ignore this option in this context ++ ++c PLUMED modifications ++ elseif(findstring('plumed',directive,idum))then ++ if(findstring('on',directive,idum)) lplumed=.true. ++ if(findstring('off',directive,idum)) lplumed=.false. ++c PLUMED modifications ++ cycle ++ ++ elseif(findstring('steps',directive,idum))then ++ ++c number of timesteps ++ ++ nstrun=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'selected number of timesteps',3x,i10)")nstrun ++ ++ elseif(findstring('integ',directive,idum))then ++ ++c choice of integration algorithm ++ ++ if(findstring('leapfrog',directive,idum))then ++ ++ keyver=0 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'leapfrog verlet integration selected')") ++ ++ elseif(findstring('velocity',directive,idum))then ++ ++ keyver=1 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'velocity verlet integration selected')") ++ ++ endif ++ ++ elseif(findstring('no fic',directive,idum))then ++ ++c cancel possible "flying ice cube" in Berendsen thermostats ++ ++ lnfic=.true. ++ nofic=intstr(directive,lenrec,idum) ++ ++ elseif(findstring('shells',directive,idum).and. ++ x findstring('on',directive,idum).and. ++ x findstring('cores',directive,idum))then ++ ++c put shells on cores at start - shell model only (else null) ++ ++ lpsoc=.true. ++ ++ elseif(findstring('densvar',directive,idum))then ++ ++c specify allowed density variation ++ ++ densvar=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'allowed density variation ',3x,1p,e12.4)") ++ x densvar ++ ++ elseif(findstring('no link',directive,idum))then ++ ++c switch off link cell option ++ ++ nolink=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'link cells option deactivated')") ++ ++ elseif(findstring('equil',directive,idum))then ++ ++c number of equilibration timesteps ++ ++ nsteql=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'equilibration period ',3x,i10)")nsteql ++ ++ elseif(findstring('restart',directive,idum))then ++ ++c restart control ++ ++ if(findstring('noscale',directive,idum))then ++ ++ keyres=3 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'noscale restart requested')") ++ ++ elseif(findstring('scale',directive,idum))then ++ ++ keyres=2 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'scaled restart requested')") ++ ++ else ++ ++ keyres=1 ++ if(idnode.eq.0)write(nrite,"(/,1x,'restart requested')") ++ ++ endif ++ ++ elseif(findstring('ensemble',directive,idum))then ++ ++c ensemble selection ++ ++ call ensemble_selection(directive,lens,kill,idnode,keyens, ++ x mode,taut,taup) ++ ++ elseif(findstring('regauss',directive,idum))then ++ ++c re-initialise velocities option (regaussing) ++ ++ newgau=.true. ++ numgau=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'regaussing option activated', ++ x /,1x,'regaussing interval set to ',3x,i10)") ++ x numgau ++ ++ elseif(findstring('scale',directive,idum))then ++ ++ nstbts=intstr(directive,lenrec,idum) ++ if(nstbts.gt.0)then ++ ltscal=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'temperature scaling on' ++ x /,1x,'temperature scaling interval',3x,i10)") ++ x nstbts ++ ++ endif ++ ++ elseif(findstring('rdf',directive,idum))then ++ ++ if(findstring('print',directive,idum))then ++ ++ lpgr=.true. ++ lpgr=(lgofr.and.lpgr) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'g(r) printing option on ')") ++ ++ else ++ ++ lgofr=.true. ++ nstbgr=intstr(directive,lenrec,idum) ++ delrdf=dblstr(directive,lenrec,idum) ++ if(nstbgr.eq.0)nstbgr=10 ++ if(delrdf.lt.1.d-8)delrdf=0.05d0 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'radial distribution functions on ', ++ x /,1x,'g(r) collection interval ',3x,i10)")nstbgr ++ write(nrite, ++ x "(1x,'g(r) bin width ',3x,1p,e12.4)") ++ x delrdf ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('zden',directive,idum))then ++ ++ lzden=.true. ++ nsbzdn=intstr(directive,lenrec,idum) ++ delzdn=dblstr(directive,lenrec,idum) ++ zlen=dblstr(directive,lenrec,idum) ++ if(nsbzdn.eq.0)nsbzdn=10 ++ if(delzdn.lt.1.d-8)then ++ zlen=0.1d0*dble(mxzdn) ++ delzdn=0.1d0 ++ elseif(zlen.lt.1.d-8)then ++ zlen=delzdn*dble(mxzdn) ++ endif ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'Z density profile requested', ++ x /,1x,'zdensity collection interval',3x,i10)")nsbzdn ++ write(nrite, ++ x "(1x,'zdensity bin width ',3x,1p,e12.4)") ++ x delzdn ++ write(nrite, ++ x "(1x,'zdensity range ',3x,1p,e12.4)") ++ x zlen ++ ++ endif ++ ++ elseif(findstring('collect',directive,idum))then ++ ++ lzeql=.false. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'equilibration included in overall averages')") ++ ++ elseif(findstring('neb',directive,idum))then ++ ++c activate nudged elastic band option ++ ++ call neb_option(directive,lneb,lminopt,idnode, ++ x numneb,keytol,sprneb,opttol,hyp_units) ++ ++ elseif(findstring('impact',directive,idum))then ++ ++c activate the impact option ++ ++ if(lhit)call error(idnode,516) ++ lhit=.true. ++ khit=intstr(directive,lenrec,idum) ++ nhit=intstr(directive,lenrec,idum) ++ ehit=dblstr(directive,lenrec,idum) ++ xhit=dblstr(directive,lenrec,idum) ++ yhit=dblstr(directive,lenrec,idum) ++ zhit=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,1x,'impact option selected')") ++ write(nrite,"( ++ x /,1x,'identity of impact atom ',i10, ++ x /,1x,'time step of impact ',i10, ++ x /,1x,'impact recoil energy (keV) ',1p,e12.4, ++ x /,1x,'impact direction (x component) ',1p,e12.4, ++ x /,1x,'impact direction (y component) ',1p,e12.4, ++ x /,1x,'impact direction (z component) ',1p,e12.4)") ++ x khit,nhit,ehit,xhit,yhit,zhit ++ ++ endif ++ ++c convert impact energy from keV to internal units ++ ++ ehit=ehit*9648530.821d0 ++ ++ elseif(findstring('bpd',directive,idum))then ++ ++c activate the BPD option ++ ++ call bpd_option(directive,seek,lbpd,ltad,lminopt,prechk, ++ x nebgo,keybpd,idnode,nblock,ntrack,keytol,ebias,vmin, ++ x catchrad,sprneb,opttol,hyp_units) ++ ++ elseif(findstring('tad',directive,idum))then ++ ++c activate temperature accelerated dynamics option ++ ++ call tad_option(directive,ltad,lbpd,lminopt,prechk,tadall, ++ x idnode,nblock,ntrack,blkout,keytol,catchrad,sprneb,tlow, ++ x deltad,opttol,hyp_units) ++ ++ elseif(findstring('minim',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ if(findstring('forc',directive,idum))keytol=0 ++ if(findstring('ener',directive,idum))keytol=1 ++ if(findstring('posi',directive,idum))keytol=2 ++ hyp_units=energy_unit() ++ minstp=intstr(directive,lenrec,idum) ++ opttol=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ lminim=.true. ++ loptim=.false. ++ lzero=.false. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'minimisation programme requested')") ++ write(nrite, ++ x "(1x,'structure minimisation interval ', ++ x 3x,i10)")minstp ++ call print_optim(keytol) ++ write(nrite, ++ x "(1x,'structure minimisation tolerance', ++ x 3x,1p,e12.4,1x,a8)")opttol,cunit ++ ++ endif ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ elseif(findstring('optim',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ if(findstring('forc',directive,idum))keytol=0 ++ if(findstring('ener',directive,idum))keytol=1 ++ if(findstring('posi',directive,idum))keytol=2 ++ hyp_units=energy_unit() ++ opttol=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ loptim=.true. ++ lminim=.false. ++ lzero=.false. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'structure optimisation requested')") ++ call print_optim(keytol) ++ write(nrite, ++ x "(1x,'tolerance for structure optimisation ', ++ x 3x,1p,e12.4,1x,a8)")opttol,cunit ++ ++ endif ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ elseif(findstring('zero',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ temp=1.d0 ++ lzero=.true. ++ loptim=.false. ++ lminim=.false. ++ ltemp=.true. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'zero K optimisation requested')") ++ write(nrite, ++ x "(' temperature reset to',1p,e12.4)")1.d0 ++ ++ endif ++ ++ else if(findstring('solva',directive,idum))then ++ ++ call solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++ else if(findstring('decomp',directive,idum))then ++ ++ call solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++ elseif(findstring('metafreeze',directive,idum).or. ++ x findstring('metadyn',directive,idum))then ++ ++c activate metadynamics option - d. quigley ++ ++ call metadyn_option ++ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, ++ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, ++ x locpe_scale,ref_W_aug,h_aug,wt_Dt) ++ ++ else if(findstring('free',directive,idum))then ++ ++ call free_energy_option(directive,lfree,lfrmas,idnode) ++ ++ else if(findstring('excite',directive,idum))then ++ ++ call excitation_option ++ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) ++ ++ else if(findstring('switch',directive,idum))then ++ ++ call switching_option ++ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) ++ ++ elseif(findstring('print',directive,idum))then ++ ++ nstbpo=intstr(directive,lenrec,idum) ++ nstbpo=max(nstbpo,1) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'data printing interval ',3x,i10)")nstbpo ++ ++ elseif(findstring('stack',directive,idum))then ++ ++ nstack=intstr(directive,lenrec,idum) ++ ++c reset stack limit if too large ++ ++ nstack=min(nstack,mxstak) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'data stacking interval ',3x,i10)")nstack ++ ++ elseif(findstring('stats',directive,idum))then ++ ++ intsta=intstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'statistics file interval ',3x,i10)")intsta ++ ++ elseif(findstring('traj',directive,idum))then ++ ++ ltraj=.true. ++ nstraj=intstr(directive,lenrec,idum) ++ istraj=max(intstr(directive,lenrec,idum),1) ++ keytrj=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'trajectory file option on ', ++ x /,1x,'trajectory file start ',3x,i10, ++ x /,1x,'trajectory file interval ',3x,i10 ++ x /,1x,'trajectory file info key ',3x,i10)") ++ x nstraj,istraj,keytrj ++ ++ elseif(findstring('ewald',directive,idum).or. ++ x findstring('spme',directive,idum).or. ++ x findstring('hke',directive,idum))then ++ ++c read Ewald or HK-Ewald or SPM-Ewald sum parameters ++ ++ call ewald_selection(directive,lhke,lspme,lewald,lcut, ++ x lforc,kill,idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2, ++ x kmax3,alpha,rcut) ++ ++ elseif(findstring('distan',directive,idum))then ++ ++ keyfce=4 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Distance dependent dielectric')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('coul',directive,idum))then ++ ++ keyfce=6 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Coulombic potential')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('shift',directive,idum))then ++ ++ keyfce=8 ++ alpha=0.d0 ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Shifted Coulombic potential')") ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(.not.lcut)then ++ call error(idnode,-435) ++ kill=.true. ++ else ++ ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(1x,'Specified precision parameter : ',1p, ++ x e12.4)")eps ++ write(nrite, ++ x "(1x,'Calculated damping parameter: ',1p, ++ x e12.4)")alpha ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('damp',directive,idum))then ++ ++ alpha=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(1x,'Specified damping parameter : ',1p,e12.4)") ++ x alpha ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('reaction',directive,idum))then ++ ++ keyfce=10 ++ alpha=0.d0 ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : reaction field')") ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(.not.lcut)then ++ call error(idnode,-435) ++ kill=.true. ++ else ++ ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(1x,'Specified precision parameter : ',1p, ++ x e12.4)")eps ++ write(nrite, ++ x "(1x,'Calculated damping parameter: ',1p, ++ x e12.4)")alpha ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('damp',directive,idum))then ++ ++ alpha=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(1x,'Specified damping parameter : ',1p,e12.4)") ++ x alpha ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('cap',directive,idum))then ++ ++ lfcap=.true. ++ fm=dblstr(directive,lenrec,idum) ++ if(fm.gt.0.d0)fmax=fm ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'force capping :',16x,1p,e12.4,' kT/A')")fmax ++ ++ elseif(findstring('no vdw',directive,idum))then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'short-range potential terms off')") ++ lvdw=.true. ++ ++ elseif(findstring('no elec',directive,idum))then ++ ++ keyfce=0 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'electrostatic potential terms off')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('mult',directive,idum))then ++ ++ multt=max(intstr(directive,lenrec,idum),1) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'multiple timestep interval ',3x,i10)")multt ++ ++ elseif(findstring('timestep',directive,idum))then ++ ++ lstep=.true. ++ tstep=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation timestep ',3x,1p,e12.4)")tstep ++ ++ elseif(findstring('temp',directive,idum))then ++ ++ ltemp=.true. ++ temp=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation temperature ',3x,1p,e12.4)")temp ++ ++ elseif(findstring('pres',directive,idum))then ++ ++ press=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation pressure (katm) ',3x,1p,e12.4)")press ++ ++c convert from katm to internal units of pressure ++ ++ press=press/prsunt ++ lpres=.true. ++ ++ elseif(findstring('prim',directive,idum))then ++ ++c primary cutoff ++ ++ lprim=.true. ++ rprim=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'primary neighbour cut off ',3x,1p,e12.4)")rprim ++ ++ elseif(findstring('rvdw',directive,idum))then ++ ++c cutoff for short range potentials ++ ++ rvdw=dblstr(directive,lenrec,idum) ++ lrvdw=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'real space cut off (vdw) ',3x,1p,e12.4)")rvdw ++ ++ elseif(findstring('delr',directive,idum))then ++ ++c Verlet shell width ++ ++ ldelr=.true. ++ delr=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'border width of Verlet shell',3x,1p,e12.4)")delr ++ ++ elseif(findstring('cut',directive,idum))then ++ ++c cutoff ++ ++ lcut=.true. ++ rcut=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'real space cut off ',3x,1p,e12.4)")rcut ++ ++ elseif(findstring('eps',directive,idum))then ++ ++c relative dielectric constant ++ ++ epsq=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'relative dielectric constant',3x,1p,e12.4)")epsq ++ ++ elseif(findstring('rlxtol',directive,idum))then ++ ++c force tolerance for shell relaxation ++ ++ rlxtol=max(rlxtol,dblstr(directive,lenrec,idum)) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for shell relaxn. ',3x,1p,e12.4)")rlxtol ++ ++ elseif(findstring('shake',directive,idum))then ++ ++c tolerance for shake ++ ++ tolnce=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for SHAKE ',3x,1p,e12.4)")tolnce ++ ++ elseif(findstring('quaternion',directive,idum))then ++ ++c tolerance for quaternion integration ++ ++ quattol=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for Quaternions ',3x,1p,e12.4)")quattol ++ ++ elseif(findstring('job time',directive,idum))then ++ ++c time for simulation (in seconds/minutes/hours/days or indefinite) ++ ++ if(findstring('indef',directive,idum))then ++ timjob=1.0d6*365.25d0*24.d0*60.d0*60.d0 ++ else ++ timjob=dblstr(directive,lenrec,idum) ++ if(findstring('m',directive,idum))then ++ timjob=6.0d1*timjob ++ elseif(findstring('h',directive,idum))then ++ timjob=3.6d3*timjob ++ elseif(findstring('d',directive,idum))then ++ timjob=8.64d4*timjob ++ endif ++ endif ++ ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'user allocated job time (',a1,') ',3x,f8.4)") ++ x hms,prntim ++ ++ elseif(findstring('close time',directive,idum))then ++ ++c time for winding up a job (in seconds) ++ ++ timcls=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'job closure time (s) ',3x,f8.3)")timcls ++ ++ elseif(findstring('all pairs',directive,idum))then ++ ++c full minimum image - N^2 interactions each timestep ++ ++ lnsq=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'All-pairs requested for electrostatics')") ++ ++ elseif(findstring('nospl',directive,idum))then ++ ++c set ewald_spme interpolation order ++ ++ nospl=intstr(directive,lenrec,idum) ++ ++ elseif(findstring('finish',directive,idum))then ++ ++c safe termination of reading CONTROL file ++ ++ loop=.false. ++ ++ else ++ ++c unrecognised directive in control file ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ enddo ++ ++c check on steps before temperature scaling ++ ++ if(nstbts.eq.0)nstbts=nstrun+1 ++ ++c conduct consistency checks on directives ++ ++ if(lminim)then ++ ++c ensure final configuration follows minimisation ++ ++ if(minstp.eq.0)minstp=nstrun ++ nstrun=minstp*(nstrun/minstp) ++ ++ endif ++ ++c check force activation options ++ ++ if(.not.lforc)then ++ ++c check if any forces are in operation ++ ++ if(.not.lvdw)then ++ ++ kill=.true. ++ call error(idnode,-383) ++ ++ endif ++ ++ else ++ ++c turn on short range forces ++ ++ if(lvdw)then ++ ++ if(keyfce.eq.0)then ++ ++ lcut=.true. ++ ldelr=.true. ++ ++ endif ++ ++ else ++ ++ keyfce=keyfce+1 ++ ++ endif ++ ++ endif ++ ++c if tad selected use only leap frog ++ ++ if(ltad.and.keyver.eq.1)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'switching to leapfrog for TAD dynamics')") ++ keyver=0 ++ ++ endif ++ ++c error checking ++ ++ if(lmetadyn.and.keyens.ne.3.and.keyens.ne.5.and.keyens.ne.7)then ++ ++ kill=.true. ++ call error(idnode,-2360) ++ ++ endif ++ ++ if(lsolva.or.lfree.or.lexcite.or.lswitch)then ++ ++ if(lspme)then ++ ++ kill=.true. ++ call error(idnode,-601) ++ ++ endif ++ ++ if(lhke)then ++ ++ kill=.true. ++ call error(idnode,-602) ++ ++ endif ++ ++ endif ++ ++ if(lghost.and.nstbgr.ne.isolva)then ++ ++ call warning(idnode,130,dble(isolva),0.d0,0.d0) ++ nstbgr=isolva ++ ++ endif ++ if(lfree.and.lgofr)then ++ ++ call warning(idnode,140,0.d0,0.d0,0.d0) ++ lgofr=.false. ++ lpgr=.false. ++ ++ endif ++ if(loptim)then ++ ++ temp=0.d0 ++ ++ elseif(.not.ltemp)then ++ ++ kill=.true. ++ call error(idnode,-380) ++ ++ endif ++ ++ if(.not.lstep)then ++ ++ kill=.true. ++ call error(idnode,-381) ++ ++ endif ++ ++ if(.not.lcut)then ++ ++ kill=.true. ++ call error(idnode,-382) ++ ++ endif ++ ++c check if van der Waals cutoff set ++ ++ if(.not.lrvdw.and.mod(keyfce,2).eq.1)then ++ ++ if(rcut.gt.0.d0)then ++ ++ rvdw=rcut ++ ++ else ++ ++ kill=.true. ++ call error(idnode,-402) ++ ++ endif ++ ++ endif ++ ++ if(.not.ldelr)then ++ ++ kill=.true. ++ call error(idnode,-384) ++ ++ endif ++ ++ if(multt.gt.1)then ++ ++ if(.not.lprim)then ++ ++ kill=.true. ++ call error(idnode,-385) ++ ++ elseif(rprim.gt.rcut)then ++ ++ kill=.true. ++ call error(idnode,-386) ++ ++ endif ++ ++ endif ++ ++c check settings in nvt ensemble ++ ++ if(keyens.ge.2.and.keyens.le.3)then ++ ++ if(taut.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-464) ++ ++ endif ++ ++ endif ++ ++c check settings in npt ensemble ++ ++ if(keyens.ge.4.and.keyens.le.7)then ++ ++ if(.not.lpres)then ++ ++ kill=.true. ++ call error(idnode,-387) ++ ++ endif ++ ++c check barostat and thermostat rates non zero ++ ++ if(taut.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-464) ++ ++ endif ++ if(taup.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-466) ++ ++ endif ++ ++ endif ++ ++c check multiple timestep cutoffs are sensible ++ ++ if(multt.gt.1)then ++ if(rcut-rprim.lt.delr)then ++ ++ kill=.true. ++ call error(idnode,-398) ++ ++ endif ++ endif ++ ++c check rcut > rvdw (for verlet list constructor) ++ ++ if(rcut.lt.rvdw)then ++ ++ kill=.true. ++ call error(idnode,-400) ++ ++ endif ++ ++c check spme is not being used with incorrect pbc ++ ++ if(lspme)then ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++ kill=.true. ++ call error(idnode,-513) ++ ++ endif ++ ++ endif ++ ++c check on all-pairs calculation request ++ ++ if(lnsq)then ++ ++ if(multt.eq.1)then ++ ++ kill=.true. ++ call error(idnode,-422) ++ ++ endif ++ ++ if(keyfce/2.lt.2.or.keyfce/2.gt.3)then ++ ++ kill=.true. ++ call error(idnode,-424) ++ ++ endif ++ ++ endif ++ ++c cancel rdf option if no vdw or coulombic forces ++ ++ if(lgofr.and.keyfce.eq.0)then ++ ++ lgofr=.false. ++ call warning(idnode,120,0.d0,0.d0,0.d0) ++ ++ endif ++ ++ if(kill)call abort_control_read(2,idnode,nread) ++ ++c close CONTROL file ++ ++ if(idnode.eq.0)close(nread) ++ ++ return ++ end subroutine simdef ++ ++ subroutine sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading in the molecular specifications ++c of the system to be simulated ++c version for rigid unit data and neutral groups ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith may 1992. ++c amended - w.smith march 1994 ++c amended - t.forester april 1994 ++c amended - w.smith dec 1994 - getrec etc ++c amended - a.smondyrev may 2000 - keydih=5 for ++c ryckaert-bellemans potential in dihedrals ++c amended - a.smondyrev may 2000 - keydih=6 for ++c fluorinated ryckaert-bellemans potential in dihedrals ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lunits,lmols,lneut,ltable,lnsq,lshl,safe,lpmf ++ logical loop1,loop2,lsolva,lfree,lexcite,lswitch,lghost ++ ++ integer idnode,keyfce,keyfld,natms,ngrp,ntpatm,ntpmls ++ integer ntpvdw,ntptbp,ntpmet,ntpfbp,nshels,ksite ++ integer nsite,nconst,nangle,ndihed,ninver,nbonds ++ integer nteth,nspmf,itmols,i,idum,keyver ++ integer ntpter,keyshl,iatm,natmsr,ntghost ++ ++ real(8) dlrpot,engunit,rvdw,rcuttb,rctter,rcutfb ++ real(8) sumchg ++ ++ data loop1/.true./,loop2/.true./ ++ ++c initialise system counters: atomic site index, number of ++c constraints, bond angles, dihedrals, inversions, chemical bonds, ++c unique atom types, total number of atoms, ++c total number of rigid groups, number of tethered atoms, ++c number of three body potentials ++ ++ nsite=0 ++ nconst=0 ++ nangle=0 ++ ndihed=0 ++ ninver=0 ++ nbonds=0 ++ ntpatm=0 ++ natms=0 ++ ngrp=0 ++ nteth=0 ++ ntptbp=0 ++ ntpter=0 ++ ntpmet=0 ++ ntpvdw=0 ++ ntpfbp=0 ++ nshels=0 ++ nspmf=0 ++ keyfld=0 ++ keyshl=0 ++ ntghost=0 ++ natmsr=0 ++ ntcons_ghost=0 ++ ++ lunits=.false. ++ lmols=.false. ++ lneut=.false. ++ ltable=.false. ++ lmetab=.false. ++ lshl=.false. ++ lpmf=.false. ++ engunit=1.d0 ++ ++ numbonds(:)=0 ++ numpmf(:)=0 ++ numcon(:)=0 ++ numdih(:)=0 ++ numinv(:)=0 ++ numgrp(:)=0 ++ numsit(:)=0 ++ numteth(:)=0 ++ numshl(:)=0 ++ npmf(:)=0 ++ indpmf(:)=0 ++ ++c open force field data file ++ ++ if(idnode.eq.0)open (nfield,file='FIELD',status='old') ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,'SYSTEM SPECIFICATION')") ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read and process directives from field file ++ ++ do while(loop1) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c convert to lowercase and remove leading blanks ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.' ')then ++ ++c record is commented out ++ cycle ++ ++ elseif(findstring('units',record,idum))then ++ ++c identify energy unit for input/output ++ ++ lunits=.true. ++ call define_units(idnode,engunit) ++ ++c neutral group control option ++ ++ elseif(findstring('neut',record,idum))then ++ ++ lneut=.true. ++ if(idnode.eq.0) ++ x write(nrite,"(/,' neutral group implementation in use')") ++ ++c can't have neutral groups with all-pairs ++ ++ if(lnsq)call error(idnode,426) ++ ++c specify molecular species ++ ++ elseif(findstring('molecu',record,idum))then ++ ++c number of molecular types ++ ++ if(lmols)call error(idnode,11) ++ lmols=.true. ++ ntpmls=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,1x,'number of molecular types',6x,i10)") ++ x ntpmls ++ ++ if(ntpmls.gt.mxtmls)call error(idnode,10) ++ ++c initialise total system charge ++ ++ sumchg=0.d0 ++ ++c read in molecular characteristics ++ ++ do itmols=1,ntpmls ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'molecular species type',9x,i10)") ++ x itmols ++ ++c name of molecular species ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++ call copystring(record,molnam(1,itmols),40) ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,1x,'name of species:',13x,40a1)") ++ x (molnam(i,itmols),i=1,40) ++ ++c stop processing if energy unit has not been specified ++ ++ if(.not.lunits)call error(idnode,6) ++ ++c read molecular data ++ ++ loop2=.true. ++ ++ do while(loop2) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ ++ ksite=0 ++ ++ if(findstring('nummol',record,idum))then ++ ++ nummols(itmols)=intstr(record,lenrec,idum) ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'number of molecules ', ++ x 10x,i10)")nummols(itmols) ++ ++ elseif(findstring('atoms',record,idum))then ++ ++c read in atomic details ++ ++ call define_atoms ++ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read core - shell spring parameters ++ ++ elseif(findstring('shell',record,idum))then ++ ++ lshl=.true. ++ call define_core_shell ++ x (safe,idnode,itmols,nshels,nsite,keyshl, ++ x engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read chemical bond force constant and bondlength ++ ++ elseif(findstring('bonds',record,idum))then ++ ++ call define_bonds ++ x (safe,idnode,itmols,nbonds,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read bond atom indices and constraint bondlength ++ ++ elseif(findstring('constr',record,idum))then ++ ++ call define_constraints ++ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read pmf bond atom indices, weights and constraint bondlength ++ ++ elseif(findstring('pmf',record,idum))then ++ ++ if(lpmf)call error(idnode,484) ++ lpmf=.true. ++ call define_pmf(safe,idnode,itmols,nspmf) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular angular potential parameters ++ ++ elseif(findstring('angles',record,idum))then ++ ++ call define_angles ++ x (safe,idnode,itmols,nangle,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular dihedral potential parameters ++ ++ elseif(findstring('dihedr',record,idum))then ++ ++ call define_dihedrals ++ x (safe,idnode,itmols,ndihed,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular inversion potential parameters ++ ++ elseif(findstring('invers',record,idum))then ++ ++ call define_inversions ++ x (safe,idnode,itmols,ninver,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read rigid body data ++ ++ elseif(findstring('rigid',record,idum))then ++ ++ call define_rigid_body ++ x (safe,lghost,idnode,itmols,ngrp,natmsr) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read tethered atom indices and tethering parameters ++ ++ elseif(findstring('teth',record,idum))then ++ ++ call define_tethers ++ x (safe,idnode,itmols,nteth,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c finish of data for one molecular type ++ ++ elseif(findstring('finish',record,idum))then ++ ++c running total of number of atoms in system ++ ++ natms=natms+nummols(itmols)*numsit(itmols) ++ if(natms.gt.mxatms)call error(idnode,75) ++ ++c check core-shell units are not both in same rigid body unit ++ ++ call check_shells(idnode,itmols,nshels,ngrp) ++ ++ loop2=.false. ++ ++ else ++ ++c error exit for unidentified directive in molecular data ++ ++ if(idnode.eq.0)write(nrite,'(12x,a)')record ++ call error(idnode,12) ++ ++ endif ++ ++ enddo ++ ++c construction of atmolt table for solvation calculation ++ ++ if(lsolva)then ++ ++ do iatm=natmsr+1,natms ++ atmolt(iatm)=itmols ++ enddo ++ natmsr=natms ++ ++ endif ++ ++ enddo ++ ++c construction of atm_fre table for free energy or excitation ++ ++ if(lfree.or.lexcite.or.lswitch)then ++ ++ atm_fre(:)=0 ++ if((ind_fre(1).ne.0).and.(ind_fre(2).ne.0))then ++ ++ do iatm=ind_fre(1),ind_fre(2) ++ atm_fre(iatm)=1 ++ enddo ++ ++ endif ++ ++ if((ind_fre(3).ne.0).and.(ind_fre(4).ne.0))then ++ ++ do iatm=ind_fre(3),ind_fre(4) ++ ++ atm_fre(iatm)=2 ++ if(lghost)ntghost=ntghost+1 ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c calculate system charge ++ ++ call check_syschg(idnode,ntpmls,sumchg) ++ ++c read in the nonbonded potential energy parameters ++ ++ elseif(findstring('vdw',record,idum))then ++ ++ call define_van_der_waals ++ x (safe,ltable,lunits,lmols,idnode,ntpvdw, ++ x ntpatm,keyfce,dlrpot,rvdw,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read in the metal potential energy parameters ++ ++ elseif(findstring('met',record,idum))then ++ ++ call define_metals ++ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rvdw,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read the three body potential energy parameters ++ ++ elseif(findstring('tbp',record,idum))then ++ ++ call define_three_body ++ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read the tersoff potential energy parameters ++ ++ elseif(findstring('tersoff',record,idum))then ++ ++ call define_tersoff ++ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read in the four body potential energy parameters ++ ++ elseif(findstring('fbp',record,idum))then ++ ++ call define_four_body ++ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, ++ x rcutfb,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read external field data ++ ++ elseif(findstring('extern',record,idum))then ++ ++ call define_external_field ++ x (safe,lunits,idnode,keyfld,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c normal end of FIELD file ++ ++ elseif(findstring('close',record,idum))then ++ ++ loop1=.false. ++ if(ntpvdw.eq.0.and.ntpmet.eq.0.and. ++ x mod(keyfce,2).eq.1)call error(idnode,145) ++ ++c error exit for unidentified directive ++ ++ else ++ ++ if(idnode.eq.0)write(nrite,'(100a)')record ++ call abort_field_read(2,idnode,nfield) ++ ++ endif ++ ++ enddo ++ ++c close force field file ++ ++ if(idnode.eq.0)close (nfield) ++ ++ ++ if(lshl.and.idnode.eq.0)then ++ ++ if(keyshl.eq.1)write(nrite, ++ x "(/,/,'adiabatic shell model in operation')") ++ ++ if(keyshl.eq.2)write(nrite, ++ x "(/,/,'relaxed shell model in operation')") ++ ++ endif ++ ++ if(lshl.and.keyshl.eq.0)call error(idnode,1951) ++ ++c if metadynamics and shell selected use only velocity verlet ++ ++ if(lshl.and.lmetadyn.and.keyver.eq.0)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'switching to velocity verlet for metadynamics')") ++ keyver=1 ++ ++ endif ++ ++ return ++ end subroutine sysdef ++ ++ subroutine sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading the configuration data file ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 atname(8) ++ ++ logical loglnk,safe,lneut,nolink,lfree,lfrmas ++ integer idnode,imcon,keyens,keyfce,keyres,levcfg,multt ++ integer ntpmls,i,indatm,indnam,indneu,k,ilx,ily,ilz ++ integer m,l,ncells,idum,mxnode ++ real(8) delr,rcut,volm,xcoord,ycoord,zcoord,totmas,xveloc ++ real(8) yveloc,zveloc,xforce,yforce,zforce,axx,rt3,xhi,yhi,zhi ++ real(8) width,dum1,dum2,test,com(3) ++ ++c open the system input file ++ ++ if(idnode.eq.0)open (nconf,file='CONFIG') ++ ++c read the CONFIG file header ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ ++ call copystring(record,cfgname,80) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'configuration file name: ',/,/,10x,80a1)")cfgname ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ ++ levcfg=intstr(record,lenrec,idum) ++ imcon=intstr(record,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'selected image convention',6x,i10)")imcon ++ ++c check config file contents for consistent data ++ ++ if((imcon.eq.0.or.imcon.eq.6).and. ++ x (keyfce/2.eq.1.or.keyfce/2.eq.6)) ++ x call error(idnode,180) ++ ++ if(imcon.eq.0.and.(.not.lneut).and.(keyfce.gt.1) ++ x .and.(multt.eq.1))call warning(idnode,30,0.d0,0.d0,0.d0) ++ ++ if(imcon.eq.0.and.(keyens.ge.4.and.keyens.le.7)) ++ x call error(idnode,390) ++ if(imcon.le.2.and.(keyens.eq.6.or.keyens.eq.7))imcon=3 ++ if(keyres.gt.0.and.levcfg.lt.1)call error(idnode,85) ++ ++c specify molecular dynamics simulation cell ++ ++ if(imcon.eq.0)then ++ ++c if no periodic boundaries - set zero values for cell ++c vectors and cell volume ++ ++ cell(:)=0.d0 ++ volm=0.d0 ++ ++ else ++ ++c read cell vectors ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(1)=dblstr(record,lenrec,idum) ++ cell(2)=dblstr(record,lenrec,idum) ++ cell(3)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(4)=dblstr(record,lenrec,idum) ++ cell(5)=dblstr(record,lenrec,idum) ++ cell(6)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(7)=dblstr(record,lenrec,idum) ++ cell(8)=dblstr(record,lenrec,idum) ++ cell(9)=dblstr(record,lenrec,idum) ++ ++ endif ++ ++c read the atomic coordinates ++ ++ indatm=0 ++ indnam=0 ++ indneu=0 ++ safe=.true. ++ ++ do k=1,ntpmls ++ ++ do l=1,nummols(k) ++ ++ do m=1,numsit(k) ++ ++ indatm=indatm+1 ++ ++ if(indatm.gt.mxatms)call error(idnode,45) ++ ++ xxx(indatm)=0.d0 ++ yyy(indatm)=0.d0 ++ zzz(indatm)=0.d0 ++ vxx(indatm)=0.d0 ++ vyy(indatm)=0.d0 ++ vzz(indatm)=0.d0 ++ fxx(indatm)=0.d0 ++ fyy(indatm)=0.d0 ++ fzz(indatm)=0.d0 ++ ++ if(idnode.eq.0)then ++ ++ if(levcfg.eq.0)then ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ ++ elseif(levcfg.eq.1)then ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc ++ ++ else ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc ++ read(nconf,'(3f20.0)',end=100)xforce,yforce,zforce ++ ++ endif ++ ++c strip blanks off atom name ++ ++ call strip(atname,8) ++ ++ if(sitnam(indnam+m).eq.mkwd8(atname))then ++ ++ xxx(indatm)=xcoord ++ yyy(indatm)=ycoord ++ zzz(indatm)=zcoord ++ ++ if(levcfg.gt.0)then ++ ++ vxx(indatm)=xveloc ++ vyy(indatm)=yveloc ++ vzz(indatm)=zveloc ++ ++ endif ++ ++ if(levcfg.gt.1)then ++ ++ fxx(indatm)=xforce ++ fyy(indatm)=yforce ++ fzz(indatm)=zforce ++ ++ endif ++ ++ else ++ ++ write(nrite,"(/,/,'unidentified atom label :',8a1, ++ x ': atom number ',i5)")atname,indatm ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ call gstate(safe) ++ if(.not.safe)call error(idnode,25) ++ ++ ltype(indatm)=ltpsit(indnam+m) ++ weight(indatm)=wgtsit(indnam+m) ++ chge(indatm)=chgsit(indnam+m) ++ atmnam(indatm)=sitnam(indnam+m) ++ lstfrz(indatm)=lfzsit(indnam+m) ++ if(lneut)lstneu(indatm)=nugrp(indnam+m)+indneu ++ ++c reset atomic masses according to free energy definitions ++ ++ if(lfree)then ++ ++ weight_sav(indatm)=weight(indatm) ++ ++ if(lfrmas)then ++ ++ if(indatm.ge.ind_fre(1).and.indatm.le.ind_fre(2))then ++ weight(indatm)=lambda1*weight(indatm) ++ elseif(indatm.ge.ind_fre(3).and.indatm.le.ind_fre(4)) ++ x then ++ weight(indatm)=lambda2*weight(indatm) ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ indneu=indneu+nugrp(indnam+numsit(k)) ++ ++ enddo ++ ++ indnam=indnam+numsit(k) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ call gdsum(xxx,indatm,buffer) ++ call gdsum(yyy,indatm,buffer) ++ call gdsum(zzz,indatm,buffer) ++ ++ if(levcfg.gt.0)then ++ ++ call gdsum(vxx,indatm,buffer) ++ call gdsum(vyy,indatm,buffer) ++ call gdsum(vzz,indatm,buffer) ++ ++ endif ++ ++ if(levcfg.gt.1)then ++ ++ call gdsum(fxx,indatm,buffer) ++ call gdsum(fyy,indatm,buffer) ++ call gdsum(fzz,indatm,buffer) ++ ++ endif ++ ++ endif ++ ++c check integrity of cell vectors : for cubic, TO and RD cases ++c ie. cell(1)=cell(5)=cell(9) (or cell(9)/sqrt(2) for RD) ++ ++ if((imcon.eq.1).or.(imcon.eq.4).or.(imcon.eq.5))then ++ ++ axx=(abs(cell(1))+abs(cell(5)))/2.d0 ++ test=1.d-8*axx ++ if(abs(cell(1)-axx).gt.test)call error(idnode,410) ++ if(abs(cell(5)-axx).gt.test)call error(idnode,410) ++ if(imcon.eq.5)then ++ if(abs(cell(9)-axx*sqrt(2.d0)).gt.test) ++ x call error(idnode,410) ++ else ++ if(abs(cell(9)-axx).gt.test)call error(idnode,410) ++ endif ++ ++ endif ++ ++c check integrity of hexagonal prism cell vectors ++ ++ if(imcon.eq.7)then ++ ++ rt3=sqrt(3.d0) ++ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) ++ x call error(idnode,410) ++ ++ endif ++ ++c check 2D PBC for imcon=6 ++ ++ if(imcon.eq.6)then ++ ++ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) ++ ++ endif ++ ++c check for diagonal cell matrix if appropriate ++ ++ if((imcon.eq.1).or.(imcon.eq.2).or.(imcon.eq.4).or. ++ x (imcon.eq.5).or.(imcon.eq.7))then ++ ++ if(abs(cell(2)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(4)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) ++ ++ endif ++ ++c put centre of mass at centre of coordinates if imcon=0 ++ ++ if(imcon.eq.0)then ++ ++ totmas=getmass(indatm,idnode,mxnode) ++ call getcom(indatm,idnode,mxnode,totmas,com) ++ ++ do i=1,indatm ++ ++ xxx(i)=xxx(i)-com(1) ++ yyy(i)=yyy(i)-com(2) ++ zzz(i)=zzz(i)-com(3) ++ ++ enddo ++ ++ endif ++ ++c set widths if unset - needed for check on link cells below ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++ xhi=abs(xxx(1)) ++ yhi=abs(yyy(1)) ++ zhi=abs(zzz(1)) ++ do i=2,indatm ++ ++ xhi=max(xhi,abs(xxx(i))) ++ yhi=max(yhi,abs(yyy(i))) ++ zhi=max(zhi,abs(zzz(i))) ++ ++ enddo ++ if(imcon.eq.0)then ++ ++ cell(1)=max(2.d0*xhi+rcut+delr,3.d0*(rcut+delr)) ++ cell(5)=max(2.d0*yhi+rcut+delr,3.d0*(rcut+delr)) ++ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) ++ ++ endif ++ ++ if(imcon.eq.6.and.cell(9).lt.1.d-6)then ++ ++ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) ++ ++ endif ++ ++ endif ++ ++c calculate dimensional properties of simulation cell ++ ++ call dcell(cell,celprp) ++ ++ if(imcon.eq.0)then ++ ++ volm=0.d0 ++ ++ elseif(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ else ++ ++ volm=celprp(10) ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,/,1x,'simulation cell vectors'/,/)") ++ write(nrite,"(21x,3f12.6)")cell ++ ++ write(nrite, ++ x "(/,/,1x,'system volume ',2x,1p,g22.12)")volm ++ ++ endif ++ ++c check value of cutoff and reset if necessary ++ ++ if(imcon.gt.0)then ++ ++ width=min(celprp(7),celprp(8),celprp(9))/2.d0 ++ if(imcon.eq.4)width=sqrt(3.d0)*cell(1)/4.d0 ++ if(imcon.eq.5)width=cell(1)/2.d0 ++ if(imcon.eq.6)width=min(celprp(7),celprp(8))/2.d0 ++ ++c halt program if potential cutoff exceeds cell width ++ ++ if(rcut.gt.width)call error(idnode,95) ++ ++ endif ++ ++c decide on whether to use link cells for verlet list constructor ++ ++ if(nolink)then ++ ++ loglnk=.false. ++ ++ else ++ ++ loglnk=.true. ++ ++ ilx=int(celprp(7)/(rcut+delr)) ++ ily=int(celprp(8)/(rcut+delr)) ++ ilz=int(celprp(9)/(rcut+delr)) ++ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. ++ ncells=ilx*ily*ilz ++ if(lneut.and.ncells.le.36)loglnk=.false. ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. ++ if(loglnk.and.ncells.gt.mxcell)then ++ ++ dum1=dble(ncells) ++ dum2=dble(mxcell) ++ call warning(idnode,90,dum1,dum2,dum2) ++ loglnk=.false. ++ ++ endif ++ ++ endif ++ ++ if(loglnk.and.idnode.eq.0) ++ x write(nrite,"(/,/,' link cell algorithm in use')") ++ ++ if(idnode.eq.0)close (nconf) ++ ++c ensure PBC compliance of starting structure ++ ++ if(keyres.eq.0.and.imcon.gt.0)then ++ ++ call images(imcon,idnode,mxnode,indatm,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,indatm,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ return ++ ++c error exit for config file read ++ ++ 100 call abort_config_read(2,idnode,nconf) ++ ++ end subroutine sysgen ++ ++ subroutine sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading the REVIVE file data and ++c defining the initial thermodynamic and structural accumulators. ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c adapted - d. quigley nov 2010, metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzden,lfree,lsolva,lghost,lpsoc ++ integer idnode,imcon,keyfce,keyres,mxnode,natms,nstep,numacc ++ integer numrdf,ntpatm,nzden,i,j,k,ntpmet,ntshl,ntpvdw ++ real(8) chip,chit,conint,elrc,engunit,virlrc,rvdw,volm ++ real(8) dnumrd,dnstep,dnumac,dnzden,virtot,vircom,tboost ++ real(8) chit_shl ++ ++c read or initialise accumulator arrays ++ ++ if(keyres.eq.1.and.idnode.eq.0)then ++ ++c read accumulator data from dump file ++ ++ open(nrest,file='REVOLD',form='unformatted') ++ ++ read(nrest) dnstep,dnumac,dnumrd,chit,chip,conint,dnzden, ++ x tboost,chit_shl ++ read(nrest) virtot,vircom,eta,strcns,strbod ++ read(nrest) stpval ++ read(nrest) sumval ++ read(nrest) ssqval ++ read(nrest) zumval ++ read(nrest) ravval ++ read(nrest) stkval ++ read(nrest) xx0,yy0,zz0 ++ read(nrest) xxs,yys,zzs ++ ++ if(lgofr) read(nrest)rdf ++ if(lzden) read(nrest)zdens ++ ++ nstep=nint(dnstep) ++ numacc=nint(dnumac) ++ numrdf=nint(dnumrd) ++ nzden=nint(dnzden) ++ close (nrest) ++ ++ else ++ ++c initialise step counters ++ ++ nstep=0 ++ numacc=0 ++ numrdf=0 ++ nzden=0 ++ ++c initialise temperature and pressure coupling parameters ++c and integral for conserved quantity ++ ++ chit=0.d0 ++ chip=0.d0 ++ conint=0.d0 ++ virtot=0.d0 ++ vircom=0.d0 ++ chit_shl=0.d0 ++ do i=1,9 ++ ++ eta(i)=0.d0 ++ strcns(i)=0.d0 ++ strbod(i)=0.d0 ++ ++ enddo ++ ++c initialise accumulator arrays ++ ++ do i=1,mxnstk ++ ++ stpval(i)=0.d0 ++ sumval(i)=0.d0 ++ ssqval(i)=0.d0 ++ zumval(i)=0.d0 ++ ravval(i)=0.d0 ++ ++ enddo ++ ++ do i=1,mxatms ++ ++ xx0(i)=0.d0 ++ yy0(i)=0.d0 ++ zz0(i)=0.d0 ++ xxs(i)=0.d0 ++ yys(i)=0.d0 ++ zzs(i)=0.d0 ++ ++ enddo ++ ++ do j=1,mxnstk ++ ++ do i=1,mxstak ++ ++ stkval(i,j)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ if(lgofr)then ++ ++ do i=1,mxxtyp ++ ++ do j=1,mxrdf ++ ++ rdf(j,i)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(lzden)then ++ ++ do i=1,mxatyp ++ ++ do j=1,mxzdn ++ zdens(j,i)=0.d0 ++ enddo ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c put shells on cores at start ++ ++ if(lpsoc.and.keyres.ne.1.and.ntshl.gt.0) ++ x call put_shells_on_cores(idnode,mxnode,ntshl) ++ ++c if restart then broadcast stored variables via a global sum ++ ++ if(keyres.eq.1.and.mxnode.gt.1)then ++ ++ if(mxbuff.lt.natms.or.mxbuff.lt.mxnstk*mxstak) ++ x call error(idnode,186) ++ ++ buffer(1)=chit ++ buffer(2)=chip ++ buffer(3)=conint ++ buffer(4)=dble(nstep) ++ buffer(5)=dble(numacc) ++ buffer(6)=dble(numrdf) ++ buffer(7)=dble(nzden) ++ buffer(8)=tboost ++ buffer(9)=virtot ++ buffer(10)=vircom ++ buffer(11)=chit_shl ++ call gdsum(buffer(1),11,buffer(12)) ++ chit=buffer(1) ++ chip=buffer(2) ++ conint=buffer(3) ++ nstep=nint(buffer(4)) ++ numacc=nint(buffer(5)) ++ numrdf=nint(buffer(6)) ++ nzden=nint(buffer(7)) ++ tboost=buffer(8) ++ virtot=buffer(9) ++ vircom=buffer(10) ++ chit_shl=buffer(11) ++ ++ call gdsum(eta,9,buffer) ++ call gdsum(strcns,9,buffer) ++ call gdsum(strbod,9,buffer) ++ call gdsum(stpval,mxnstk,buffer) ++ call gdsum(sumval,mxnstk,buffer) ++ call gdsum(ssqval,mxnstk,buffer) ++ call gdsum(zumval,mxnstk,buffer) ++ call gdsum(ravval,mxnstk,buffer) ++ call gdsum(stkval,mxnstk*mxstak,buffer) ++ call gdsum(xx0,natms,buffer) ++ call gdsum(yy0,natms,buffer) ++ call gdsum(zz0,natms,buffer) ++ call gdsum(xxs,natms,buffer) ++ call gdsum(yys,natms,buffer) ++ call gdsum(zzs,natms,buffer) ++ ++c for rdf table - broadcast and normalise ++ ++ if(lgofr)then ++ ++ do k=1,mxxtyp ++ ++ call gdsum(rdf(1,k),mxrdf,buffer) ++ ++ do j=1,mxrdf ++ rdf(j,k)=rdf(j,k)/dble(mxnode) ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(lzden)then ++ ++ do k=1,mxatyp ++ ++ call gdsum(zdens(1,k),mxzdn,buffer) ++ ++ do j=1,mxzdn ++ zdens(j,k)=zdens(j,k)/dble(mxnode) ++ enddo ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c number densities and long-range corrections ++ ++ elrc=0.d0 ++ virlrc=0.d0 ++ ++ if(imcon.eq.0.or.imcon.eq.6)volm=4.d0*pi/3.d0*rvdw**3 ++ ++ call lrcorrect ++ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, ++ x ntpatm,ntpvdw,elrc,engunit,virlrc,rvdw,volm) ++ ++ if(lmetab.or.ntpmet.eq.0)then ++ ++ elrcm(0)=0.d0 ++ vlrcm(0)=0.d0 ++ ++ else ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++ if(imcon.eq.0.or.imcon.eq.6)volm=0.d0 ++ ++ return ++ end subroutine sysinit ++ ++ subroutine systemp ++ x (idnode,imcon,keyres,mxnode,natms,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for setting the initial system temperature ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,keyres,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,ntshl,levcfg,i,io,k,keyshl ++ real(8) degfre,degshl,degrot,temp,tolnce,sigma,rsq ++ ++c number of degrees of freedom ++c 3 for com translation ++c 3 for angular momentum about origin (non-periodic systems only) ++ ++ degfre=dble(3*(ntfree-ntshl)-3-ntcons)+degfre ++ if(imcon.eq.0.or.imcon.eq.6)degfre=degfre-3.0d0 ++ if(imcon.eq.0.or.imcon.eq.6)degrot=max(0.d0,degrot-3.0d0) ++ degshl=dble(3*ntshl) ++ ++c lose one degree of freedom if temperature constrained ++c gaussian constraints ++ ++c if(keyens.eq.1)degfre=degfre-1.d0 ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,' total degrees of freedom ',f20.0,/, ++ x ' rotational degrees of freedom ',f20.0,/, ++ x ' shell pseudo degrees of freedom',f20.0)") ++ x degfre,degrot,degshl ++ if(degfre.lt.1.d0)call error(idnode,350) ++ ++c define reciprocal masses of atoms ++ ++ do i=1,natms ++ ++ if(lstfrz(i).ne.0.or.weight(i).lt.1.d-6)then ++ ++ rmass(i)=0.d0 ++ weight(i)=0.d0 ++ ++ else ++ ++ rmass(i)=1.d0/weight(i) ++ ++ endif ++ ++ enddo ++ ++c generate starting velocities ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++ if(keyres.eq.0)then ++ ++ call gauss(natms,vxx,vyy,vzz) ++ ++ do i=1,natms ++ ++ rsq=sqrt(rmass(i)) ++ vxx(i)=vxx(i)*rsq ++ vyy(i)=vyy(i)*rsq ++ vzz(i)=vzz(i)*rsq ++ ++ enddo ++ ++ if(ntcons.gt.0)call quench ++ x (imcon,idnode,mxnode,natms,nscons,tolnce) ++ ++ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ if(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ elseif(keyres.eq.1.or.keyres.eq.3)then ++ ++ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ elseif(keyres.eq.2)then ++ ++ if(ngrp.gt.0)then ++ ++ call vscaleg ++ x (idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ elseif(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c print out sample of initial configuration ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'sample of starting configuration',/)") ++ ++ io=(natms+19)/20 ++ if((levcfg.le.1).and.(idnode.eq.0)) ++ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',/,/)") ++ if((levcfg.eq.2).and.(idnode.eq.0)) ++ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)', ++ x 7x,'fx(i)',7x,'fy(i)',7x,'fz(i)',/,/)") ++ ++ do i=1,natms,io ++ ++ if(levcfg.le.1)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i) ++ ++ elseif(levcfg.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i), ++ x vxx(i),vyy(i),vzz(i),fxx(i),fyy(i),fzz(i) ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine systemp ++ ++ subroutine sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine defining global bookkeeping ++c arrays ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical loglnk,lneut,lshmov,lcnb,lsolva,lghost ++ integer idnode,imcon,mxnode,natms,nneut,ngrp,nscons,ntangl,i ++ integer ntbond,ntcons,ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,ii,isol,itmols,igsol,iggsol,natmsf,natmsl ++ integer ntghost,natms2 ++ real(8) degfre,degrot ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c neutral group bookkeeping ++ ++ call neutbook(lneut,idnode,natms,nneut) ++ ++c rigid body bookkeeping ++ ++ call quatbook ++ x (lsolva,idnode,imcon,mxnode,natms2,ngrp,ntpmls, ++ x ntfree,degfre,degrot) ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ ++ numcon(mxtmls)=numcon(mxtmls)+ntcons_ghost ++ numgrp(mxtmls)=numgrp(mxtmls)+ngrp_ghost ++ ++ endif ++ ++c construct list of excluded pair interactions ++ ++ if(lneut)then ++ ++ call exclude(idnode,mxnode,natms,ntpmls) ++ call excludeneu(idnode,mxnode,nneut) ++ ++ elseif(.not.lneut)then ++ ++ call exclude(idnode,mxnode,natms,ntpmls) ++ ++ if(loglnk)then ++ ++ call exclude_link(idnode,mxnode,ntpmls) ++ ++ else ++ ++ call exclude_atom(idnode,mxnode,natms,ntpmls) ++ ++ endif ++ ++ endif ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ ++ numcon(mxtmls)=numcon(mxtmls)-ntcons_ghost ++ numgrp(mxtmls)=numgrp(mxtmls)-ngrp_ghost ++ ++ endif ++ ++c construct interaction lists for bonded forces ++ ++ call intlist ++ x (lshmov,lcnb,idnode,mxnode,natms2,nscons,ntangl,ntbond, ++ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) ++ ++c adaptations for solvation and excitation simulations ++ ++ if(lsolva.or.lghost)then ++ ++ natmsf=0 ++ natmsl=0 ++ natm_sol(:)=0 ++ const_sol(:)=numcon(:)*nummols(:) ++ rigid_sol(:)=numgrp(:)*nummols(:) ++ ++ if(ngrp.eq.0)then ++ ++ do itmols=1,mxtmls ++ ++ natmsl=natmsl+numsit(itmols)*nummols(itmols) ++ ++ do isol=natmsf+1,natmsl ++ ++ if(lstfrz(isol).eq.0)then ++ natm_sol(itmols)=natm_sol(itmols)+1 ++ endif ++ ++ enddo ++ ++ natmsf=natmsl ++ ++ enddo ++ ++ else ++ ++ ii=1 ++ ++ do itmols=1,mxtmls ++ ++ natmsl=natmsl+numsit(itmols)*nummols(itmols) ++ ++ do isol=natmsf+1,natmsl ++ ++ if(lstgot_sol(ii).eq.isol)then ++ ii=ii+1 ++ else ++ ++ if(lstfrz(isol).eq.0)then ++ natm_sol(itmols)=natm_sol(itmols)+1 ++ endif ++ ++ endif ++ ++ enddo ++ ++ natmsf=natmsl ++ ++ enddo ++ ++ degrot_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 ++ degfre_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 ++ ++ endif ++ ++ if(lghost)natm_sol(mxtmls)=natm_sol(mxtmls)-ntghost ++ degfre_sol(:)=dble(3*(natm_sol(:))-const_sol(:))+degfre_sol(:) ++ ++ endif ++ ++ return ++ end subroutine sysbook ++ ++ subroutine define_units(idnode,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting energy units ++c ++c copyright - daresbury laboratory ++c author - w. smith august 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,idum,i ++ real(8) engunit ++ logical blank ++ ++ blank=.true. ++ ++ do i=6,lenrec ++ if(record(i).ne.' ')blank=.false. ++ enddo ++ ++ if(blank)then ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=dl_poly internal ', ++ x 'units ')") ++ ++ elseif(findstring('ev',record,idum))then ++ ++ engunit=9648.530821d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=electron volts ')") ++ ++ elseif(findstring('kev',record,idum))then ++ ++ engunit=9648530.821d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kilo electron volts ')") ++ ++ elseif(findstring('kcal',record,idum))then ++ ++ engunit=418.4d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kcal/ mol ')") ++ ++ elseif(findstring('kj',record,idum))then ++ ++ engunit=1.d2 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kjoule/mol ')") ++ ++ elseif(findstring('k',record,idum))then ++ ++ engunit=boltz ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kelvin ')") ++ ++ elseif(findstring('internal',record,idum))then ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=dl_poly internal', ++ x ' units ')") ++ ++ else ++ ++ if(idnode.eq.0)write(nrite,'(a)')record ++ call error(idnode,5) ++ ++ endif ++ ++ return ++ end subroutine define_units ++ ++ subroutine quatbook ++ x (lsolva,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree, ++ x degfre,degrot) ++ ++c************************************************************************** ++c ++c dl_poly subroutine for setting up bookkeeping for rigid bodies ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c************************************************************************* ++ ++ implicit none ++ ++ logical safe,pass1,pass2,linear,lsolva ++ integer fail,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree ++ integer i,igrp,jgrp,kgrp,jr,jt,igrp1,igrp2,itmols,imols,lgrp,id ++ integer ii,jj,isite,k,kk,ill,i1,i2,i3,j,ngp,ifre1,ifre2,ig,ij ++ integer fngrp,lngrp ++ real(8) degfre,degrot,dnorm,a1,rtall,rotall,rot,aa,rotinr,bb,rot1 ++ real(8) rsq,det,dettest,aq,bq,cq,dq,eq,fq,gq,hq,rnorm,tol,rotxyz ++ real(8) rotlim,rrr ++ ++ integer, allocatable :: ind(:,:),lstgot(:) ++ real(8), allocatable :: gaxs(:,:),rotmin(:),accum(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ dimension rot(9),aa(9),rotinr(3,3),bb(9),rot1(3,3),fail(5) ++ ++ data fail/0,0,0,0,0/ ++ ++c allocate working arrays ++ ++ allocate (ind(mxgrp,3),lstgot(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) ++ allocate (gaxs(mxungp,9),rotmin(mxungp),stat=fail(4)) ++ allocate (accum(mxungp),stat=fail(5)) ++ do i=1,5 ++ if(fail(i).ne.0)call error(idnode,1790) ++ enddo ++ ++c initialise bookkeeping indices ++ ++ igrp=0 ++ jgrp=0 ++ kgrp=0 ++ isite=0 ++ jr=0 ++ jt=0 ++ safe=.true. ++ degfre=0.d0 ++ degrot=0.d0 ++ ++c rigid body identifier ++ ++ do i=1,natms ++ lstbod(i)=0 ++ enddo ++ ++c number of rigid groups in system ++ ++ ngrp=0 ++ do itmols=1,ntpmls ++ ngrp=ngrp+nummols(itmols)*numgrp(itmols) ++ enddo ++ ++c block indices for groups ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c loop over molecule types ++ ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if(igrp.le.mxgrp)then ++ ++ lstgtp(igrp)=listyp(lgrp+kgrp) ++ id=listyp(lgrp+kgrp) ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2))then ++ ++ jgrp=jgrp+1 ++ ++ do jj=1,numgsit(id) ++ ++ jr=jr+1 ++ jt=jt+1 ++ ++ if(jr.le.mxatms.and.jt.le.mxatms)then ++ ++ lstrgd(jr)=lstgst(id,jj)+isite ++ lstgot(jt)=lstgst(id,jj)+isite ++ lstbod(lstgst(id,jj)+isite)=igrp ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ else ++ ++ do jj=1,numgsit(id) ++ ++ jt=jt+1 ++ if(jt.le.mxatms)then ++ ++ lstgot(jt)=lstgst(id,jj)+isite ++ lstbod(lstgst(id,jj)+isite)=igrp ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,304) ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ kgrp=kgrp+numgrp(itmols) ++ ++ enddo ++ ++ if(ngrp.eq.0)then ++ ++ j=0 ++ do i=1,natms ++ ++ if(lstfrz(i).eq.0)then ++ ++ j=j+1 ++ lstfre(j)=i ++ ++ endif ++ ++ enddo ++ ntfree=j ++ ++ else ++ ++c centre of mass of groups ++c assumes group dimensions are smaller than half box width ++ ++ do i=1,natms ++ lstme(i)=0 ++ enddo ++ ++ do id=1,mxungp ++ gmass(id)=0.d0 ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c working com is first site in group ++ ++ i=lstrgd(jr+1) ++ txx(ig)=xxx(i) ++ tyy(ig)=yyy(i) ++ tzz(ig)=zzz(i) ++ ++ id=lstgtp(ig) ++ safe=.false. ++ if(abs(gmass(id)).lt.1.d-10)safe=.true. ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ xxt(jr)=xxx(i)-txx(ig) ++ yyt(jr)=yyy(i)-tyy(ig) ++ zzt(jr)=zzz(i)-tzz(ig) ++ if(safe)gmass(id)=gmass(id)+weight(i) ++ ++ enddo ++ ++ enddo ++ ++c minimum image from working com ++ ++ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=0.d0 ++ gcmy(ig)=0.d0 ++ gcmz(ig)=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ gcmx(ig)=gcmx(ig)+weight(i)*xxt(jr) ++ gcmy(ig)=gcmy(ig)+weight(i)*yyt(jr) ++ gcmz(ig)=gcmz(ig)+weight(i)*zzt(jr) ++ ++ enddo ++ ++ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) ++ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) ++ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) ++ ++ enddo ++ ++c global communications ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++c make sure all nodes have same copy of gmass ++ ++ if(mxnode.gt.1)then ++ ++ do id=1,mxungp ++ ++ accum(id)=0.d0 ++ if(gmass(id).gt.0.d0)accum(id)=1.d0 ++ ++ enddo ++ ++ call gdsum(gmass(1),mxungp,buffer(1)) ++ call gdsum(accum(1),mxungp,buffer(1)) ++ ++ do id=1,mxungp ++ ++ dnorm=max(1.d0,accum(id)) ++ gmass(id)=gmass(id)/dnorm ++ ++ enddo ++ ++ endif ++ ++c find a group of each type on this node to ++c find principal axis system of the group type ++ ++ do id=1,mxungp ++ ++ jr=0 ++ ij=0 ++ safe=.false. ++ ++ do while(.not.safe.and.ij.lt.ngrp) ++ ++ ij=ij+1 ++ jr=jr+numgsit(lstgtp(ij)) ++ if(lstgtp(ij).eq.id)safe=.true. ++ ++ enddo ++ ++ if(safe)then ++ ++c rotational inertia accumulator ++ ++ do k=1,3 ++ ++ do kk=1,3 ++ ++ rotinr(k,kk)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstgot(jr) ++ ++ xxt(jr)=xxx(i)-gcmx(ij) ++ yyt(jr)=yyy(i)-gcmy(ij) ++ zzt(jr)=zzz(i)-gcmz(ij) ++ ++ call images(imcon,0,1,1,cell,xxt(jr),yyt(jr),zzt(jr)) ++ ++ rotinr(1,1)=rotinr(1,1)+weight(i)*(xxt(jr)**2) ++ rotinr(1,2)=rotinr(1,2)+weight(i)*xxt(jr)*yyt(jr) ++ rotinr(1,3)=rotinr(1,3)+weight(i)*xxt(jr)*zzt(jr) ++ rotinr(2,2)=rotinr(2,2)+weight(i)*(yyt(jr)**2) ++ rotinr(2,3)=rotinr(2,3)+weight(i)*yyt(jr)*zzt(jr) ++ rotinr(3,3)=rotinr(3,3)+weight(i)*(zzt(jr)**2) ++ ++ enddo ++ ++ rotinr(2,1)=rotinr(1,2) ++ rotinr(3,1)=rotinr(1,3) ++ rotinr(3,2)=rotinr(2,3) ++ ++ call jacobi(rotinr,rot1,3) ++ ++ rot(1)=rot1(1,1) ++ rot(4)=rot1(2,1) ++ rot(7)=rot1(3,1) ++ rot(2)=rot1(1,2) ++ rot(5)=rot1(2,2) ++ rot(8)=rot1(3,2) ++ rot(3)=rot1(1,3) ++ rot(6)=rot1(2,3) ++ rot(9)=rot1(3,3) ++ ++c rotational inertia accumulators ++ ++ rotinx(id,1)=0.d0 ++ rotiny(id,1)=0.d0 ++ rotinz(id,1)=0.d0 ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstgot(jr) ++ ++c site positions in principal axis system ++ ++ gxx(id,j)=rot(1)*xxt(jr)+rot(4)*yyt(jr)+rot(7)*zzt(jr) ++ gyy(id,j)=rot(2)*xxt(jr)+rot(5)*yyt(jr)+rot(8)*zzt(jr) ++ gzz(id,j)=rot(3)*xxt(jr)+rot(6)*yyt(jr)+rot(9)*zzt(jr) ++ ++c impose rounding ++ ++ if(abs(gxx(id,j)).lt.1.d-8)gxx(id,j)=0.d0 ++ if(abs(gyy(id,j)).lt.1.d-8)gyy(id,j)=0.d0 ++ if(abs(gzz(id,j)).lt.1.d-8)gzz(id,j)=0.d0 ++ ++c rotational inertia tensor of group type ++ ++ rotinx(id,1)=rotinx(id,1)+ ++ x weight(i)*(gyy(id,j)**2+gzz(id,j)**2) ++ rotiny(id,1)=rotiny(id,1)+ ++ x weight(i)*(gzz(id,j)**2+gxx(id,j)**2) ++ rotinz(id,1)=rotinz(id,1)+ ++ x weight(i)*(gxx(id,j)**2+gyy(id,j)**2) ++ ++ enddo ++ ++c set axis system such that: Ixx >=Iyy >=Izz ++ ++ rotxyz=max(rotinx(id,1),rotiny(id,1),rotinz(id,1)) ++ ++ if(rotxyz.ge.rotinx(id,1))then ++ ++ if(rotiny(id,1).ge.rotxyz)then ++ ++ do j=1,numgsit(id) ++ ++ a1=gxx(id,j) ++ gxx(id,j)=gyy(id,j) ++ gyy(id,j)=-a1 ++ ++ enddo ++ ++ rotiny(id,1)=rotinx(id,1) ++ rotinx(id,1)=rotxyz ++ ++ elseif(rotinz(id,1).ge.rotxyz)then ++ ++ do j=1,numgsit(id) ++ ++ a1=gxx(id,j) ++ gxx(id,j)=gzz(id,j) ++ gzz(id,j)=-a1 ++ ++ enddo ++ ++ rotinz(id,1)=rotinx(id,1) ++ rotinx(id,1)=rotxyz ++ ++ endif ++ ++ endif ++ ++ if(rotinz(id,1).gt.rotiny(id,1))then ++ ++ do j=1,numgsit(id) ++ ++ a1=gyy(id,j) ++ gyy(id,j)=gzz(id,j) ++ gzz(id,j)=-a1 ++ ++ enddo ++ ++ a1=rotinz(id,1) ++ rotinz(id,1)=rotiny(id,1) ++ rotiny(id,1)=a1 ++ ++ endif ++ ++c set up principal axis system in terms of site positions ++ ++c test for (near) linear unit ++ ++ ill=0 ++ rtall=(rotinx(id,1)+rotiny(id,1)+rotinz(id,1)) ++ ++ if(rtall.gt.1.d-5)then ++ rotall=rtall ++ else ++ rotall=1.d0 ++ endif ++ ++ rotmin(id)=min(rotinx(id,1),rotiny(id,1)) ++ rotmin(id)=min(rotmin(id),rotinz(id,1))/rotall ++ ++ if((rotinx(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ if((rotiny(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ if((rotinz(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ ++ if(ill.ge.2)then ++ ++c point particle only ++ ++ ind(id,1)=1 ++ ind(id,2)=1 ++ ind(id,3)=1 ++ ++ do jj=1,9 ++ gaxs(id,jj)=0.d0 ++ enddo ++ ++ elseif(ill.eq.1)then ++ ++c linear molecule ++ ++ ind(id,1)=1 ++ ind(id,2)=2 ++ ind(id,3)=1 ++ ++ aa(1)=gxx(id,1)-gxx(id,2) ++ aa(4)=gyy(id,1)-gyy(id,2) ++ aa(7)=gzz(id,1)-gzz(id,2) ++ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) ++ ++ if(abs(aa(7)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(7)**2) ++ aa(2)=0.d0 ++ aa(5)=aa(7)/rsq ++ aa(8)=-aa(4)/rsq ++ ++ elseif(abs(aa(4)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(1)**2) ++ aa(2)=-aa(4)/rsq ++ aa(5)=aa(1)/rsq ++ aa(8)=0.d0 ++ ++ elseif(abs(aa(1)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(1)**2+aa(7)**2) ++ aa(2)=-aa(7)/rsq ++ aa(5)=0.d0 ++ aa(8)=aa(1)/rsq ++ ++ endif ++ ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++ call invert(aa,bb,det) ++ ++ if(abs(det).lt.1.d-5)call error(idnode,306) ++ ++ do j=1,9 ++ gaxs(id,j)=bb(j) ++ enddo ++ ++ elseif(ill.eq.0)then ++ ++c non-linear molecule ++ ++ i1=1 ++ i2=1 ++ i3=1 ++ pass1=.true. ++ dettest=1.d-1 ++ ++ do while(pass1.and.i2.lt.numgsit(id)-1) ++ ++ i2=i2+1 ++ i3=i2 ++ pass2=.true. ++ ++ do while(pass2.and.i3.lt.numgsit(id)) ++ ++ i3=i3+1 ++ ++ aa(1)=gxx(id,i1)-gxx(id,i2) ++ aa(4)=gyy(id,i1)-gyy(id,i2) ++ aa(7)=gzz(id,i1)-gzz(id,i2) ++ aa(2)=gxx(id,i1)-gxx(id,i3) ++ aa(5)=gyy(id,i1)-gyy(id,i3) ++ aa(8)=gzz(id,i1)-gzz(id,i3) ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++c invert matrix ++ ++ call invert(aa,bb,det) ++ ++c check on size of determinant - to see if the 3 sites are ++c too close to being linear for safety. ++ ++ pass2=abs(det).lt.dettest ++ ++ enddo ++ ++ pass1=abs(det).lt.dettest ++ ++ enddo ++ ++ if(abs(det).lt.dettest)call error(idnode,306) ++ ++c store indices used ++ ++ ind(id,1)=i1 ++ ind(id,2)=i2 ++ ind(id,3)=i3 ++ ++c store coefficients ++ ++ do j=1,9 ++ ++ gaxs(id,j)=bb(j) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c check that rigid unit does not contain frozen atoms ++ ++ safe=.true. ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ if(lstfrz(i).ne.0)safe=.false. ++ ++ enddo ++ ++ enddo ++ ++c global check on error condition ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,360) ++ ++c quaternions for all rigid groups in system ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ i1=lstrgd(jr+ind(id,1)) ++ i2=lstrgd(jr+ind(id,2)) ++ i3=lstrgd(jr+ind(id,3)) ++ ++ jr=jr+numgsit(id) ++ ++c group basis vectors ++ ++ aa(1)=xxx(i1)-xxx(i2) ++ aa(4)=yyy(i1)-yyy(i2) ++ aa(7)=zzz(i1)-zzz(i2) ++ ++ call images(imcon,0,1,1,cell,aa(1),aa(4),aa(7)) ++ ++ if(rotmin(id).gt.1.d-5)then ++ ++ aa(2)=xxx(i1)-xxx(i3) ++ aa(5)=yyy(i1)-yyy(i3) ++ aa(8)=zzz(i1)-zzz(i3) ++ ++ else ++ ++ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) ++ ++ if(abs(aa(7)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(7)**2) ++ aa(2)=0.d0 ++ aa(5)=aa(7)/rsq ++ aa(8)=-aa(4)/rsq ++ ++ elseif(abs(aa(4)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(1)**2) ++ aa(2)=-aa(4)/rsq ++ aa(5)=aa(1)/rsq ++ aa(8)=0.d0 ++ ++ elseif(abs(aa(1)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(1)**2+aa(7)**2) ++ aa(2)=-aa(7)/rsq ++ aa(5)=0.d0 ++ aa(8)=aa(1)/rsq ++ ++ endif ++ ++ endif ++ ++ call images(imcon,0,1,1,cell,aa(2),aa(5),aa(8)) ++ ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++c group rotational matrix ++ ++ rot(1)=gaxs(id,1)*aa(1)+gaxs(id,4)*aa(2)+gaxs(id,7)*aa(3) ++ rot(2)=gaxs(id,2)*aa(1)+gaxs(id,5)*aa(2)+gaxs(id,8)*aa(3) ++ rot(3)=gaxs(id,3)*aa(1)+gaxs(id,6)*aa(2)+gaxs(id,9)*aa(3) ++ rot(4)=gaxs(id,1)*aa(4)+gaxs(id,4)*aa(5)+gaxs(id,7)*aa(6) ++ rot(5)=gaxs(id,2)*aa(4)+gaxs(id,5)*aa(5)+gaxs(id,8)*aa(6) ++ rot(6)=gaxs(id,3)*aa(4)+gaxs(id,6)*aa(5)+gaxs(id,9)*aa(6) ++ rot(7)=gaxs(id,1)*aa(7)+gaxs(id,4)*aa(8)+gaxs(id,7)*aa(9) ++ rot(8)=gaxs(id,2)*aa(7)+gaxs(id,5)*aa(8)+gaxs(id,8)*aa(9) ++ rot(9)=gaxs(id,3)*aa(7)+gaxs(id,6)*aa(8)+gaxs(id,9)*aa(9) ++ ++c determine quaternions from rotational matrix ++ ++ aq=rot(1)+rot(5) ++ bq=rot(2)-rot(4) ++ cq=rot(6)-rot(8) ++ dq=rot(2)+rot(4) ++ eq=rot(3)+rot(7) ++ fq=rot(6)+rot(8) ++ gq=rot(3)-rot(7) ++ hq=rot(1)-rot(5) ++ ++ q0(ig)=0.5d0*sqrt(aq+sqrt(aq*aq+bq*bq)) ++ ++ if(q0(ig).gt.1.d-4)then ++ ++ q1(ig)=-0.25d0*cq/q0(ig) ++ q2(ig)=0.25d0*gq/q0(ig) ++ q3(ig)=-0.25d0*bq/q0(ig) ++ ++ else ++ ++ q1(ig)=0.5d0*sqrt(hq+sqrt(hq*hq+dq*dq)) ++ ++ if(q1(ig).gt.1.d-4)then ++ ++ q2(ig)=0.25d0*dq/q1(ig) ++ q3(ig)=0.25d0*eq/q1(ig) ++ ++ else ++ ++ q2(ig)=0.5d0*sqrt(-hq+sqrt(hq*hq+dq*dq)) ++ ++ if(q2(ig).gt.1.d-4)then ++ ++ q3(ig)=0.25d0*fq/q2(ig) ++ ++ else ++ ++ q3(ig)=1.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c normalise quaternions ++ ++ rnorm=1.d0/sqrt(q0(ig)**2+q1(ig)**2+q2(ig)**2+q3(ig)**2) ++ q0(ig)=rnorm*q0(ig) ++ q1(ig)=rnorm*q1(ig) ++ q2(ig)=rnorm*q2(ig) ++ q3(ig)=rnorm*q3(ig) ++ ++ enddo ++ ++c test for redundant degrees of freedom ++c and ensure rotational inertias are non-zero ++ ++ degrot=0.d0 ++ ++ if(lsolva)then ++ degrot_sol(:)=0.d0 ++ endif ++ ++ do ig=1,ngrp ++ ++ id=lstgtp(ig) ++ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1)) ++ ++ if(rotall*rotinx(id,1).lt.1.d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ if(rotall*rotiny(id,1).lt.1.d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ if(rotall*rotinz(id,1).lt.1d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ enddo ++ ++c rotational degrees of freedom and rigid body contribution ++c to total degrees of freedom ++ ++ degrot=degrot+dble(ngrp)*3.d0 ++ degfre=degrot+dble(ngrp)*3.d0 ++ ++ if(lsolva)then ++ ++ fngrp=1 ++ lngrp=0 ++ ++ do itmols=1,mxtmls ++ ++ lngrp=lngrp+nummols(itmols)*numgrp(itmols) ++ ++ do ig=fngrp,lngrp ++ ++ id=lstgtp(ig) ++ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1)) ++ ++ if(rotall*rotinx(id,1).lt.1.d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ if(rotall*rotiny(id,1).lt.1.d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ if(rotall*rotinz(id,1).lt.1d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ enddo ++ ++ fngrp=lngrp+1 ++ ++ enddo ++ ++ endif ++ ++c summarise results ++ ++ if(idnode.eq.0)then ++ ++ if(gmass(1).gt.0.d0)then ++ ++ write(nrite,'(/,/,12x,a)')' summary of rigid body set up' ++ ++ do id=1,mxungp ++ ++ if(gmass(id).gt.0.d0)then ++ ++ write(nrite,'(/,a,i10)')' group of type ',id ++ write(nrite,'(12x,a,f20.10)')' total mass ', ++ x gmass(id) ++ write(nrite,'(12x,a,3f20.10)')' rot. inertia ', ++ x rotinx(id,1),rotiny(id,1),rotinz(id,1) ++ write(nrite,'(/,12x,a,3(8x,a7))')' site','a coord', ++ x 'b coord','c coord' ++ do j=1,numgsit(id) ++ write(nrite,'(12x,i5,1p,3e15.5)')j,gxx(id,j), ++ x gyy(id,j),gzz(id,j) ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c find number of unique groups ++ ++ ngp=0 ++ do ig=1,ngrp ++ ngp=max(ngp,lstgtp(ig)) ++ enddo ++ ++c calculate reciprocal of rotational inertias ++ ++ do id=1,ngp ++ ++ rotlim=max(1.d-2,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1))*1.d-5 ++ ++ if(rotinx(id,1).lt.rotlim)then ++ rotinx(id,2)=0.d0 ++ else ++ rotinx(id,2)=1.d0/rotinx(id,1) ++ endif ++ ++ if(rotiny(id,1).lt.rotlim)then ++ rotiny(id,2)=0.d0 ++ else ++ rotiny(id,2)=1.d0/rotiny(id,1) ++ endif ++ ++ if(rotinz(id,1).lt.rotlim)then ++ rotinz(id,2)=0.d0 ++ else ++ rotinz(id,2)=1.d0/rotinz(id,1) ++ endif ++ ++ enddo ++ ++c Check of quaternion set up with atomic positions ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c group type ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 ++ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) ++ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) ++ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) ++ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 ++ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) ++ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) ++ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) ++ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxt(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyt(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzt(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ ++ txx(jr)=xxx(i)-xxt(i) ++ tyy(jr)=yyy(i)-yyt(i) ++ tzz(jr)=zzz(i)-zzt(i) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,jr,cell,txx,tyy,tzz) ++ ++c set tolerance for testing quaternion setup. ++ ++ rsq=0.d0 ++ tol=1.d-2 ++ ++ do i=1,jr ++ ++ rrr=txx(i)**2+tyy(i)**2+tzz(i)**2 ++ if(rrr.gt.tol)then ++ ++ rsq=rrr ++ ++ endif ++ ++ enddo ++ ++c exit if error in set up ++ ++ safe=.true. ++ if(rsq.gt.tol)safe=.false. ++ if(mxnode.gt.1)call gstate(safe) ++ ++ if(.not.safe)call error(idnode,310) ++ ++c sort lstgot into ascending order ++ ++ call shellsort(jt,lstgot) ++ ++c check that no site is in more than 1 rigid group ++ ++ i=1 ++ safe=.true. ++ do while(i.lt.jt) ++ ++ i=i+1 ++ linear=.true. ++ do while(linear) ++ ++ linear=.false. ++ ++ if(lstgot(i).eq.lstgot(i-1))then ++ ++ linear=.true. ++ safe=.false. ++ jt=jt-1 ++ ++ do j=i,jt ++ lstgot(j)=lstgot(j+1) ++ enddo ++ ++ endif ++ ++ if(i.ge.jt)linear=.false. ++ ++ enddo ++ ++ enddo ++ ++ if(.not.safe)call error(idnode,320) ++ ++c list of 'free' sites ++ ++ ii=1 ++ jj=0 ++ do i=1,natms ++ ++ if(lstgot(ii).eq.i)then ++ ++ ii=ii+1 ++ ++ else ++ ++ if(lstfrz(i).eq.0)then ++ jj=jj+1 ++ lstfre(jj)=i ++ endif ++ ++ endif ++ ++ enddo ++ ++c number of free sites ++ ++ ntfree=jj ++ ++c list of atoms integrated on this node ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ jr=jr+numgsit(id) ++ ++ enddo ++ ++ do i=1,jr ++ lstme(i)=lstrgd(i) ++ enddo ++ ++c block parameters for free atoms ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++ do i=ifre1,ifre2 ++ ++ jr=jr+1 ++ lstme(jr)=lstfre(i) ++ ++ enddo ++ ++c exchange quaternion data with other nodes ++ ++ if(mxnode.gt.1)call merge4 ++ x (idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++ if(lsolva)lstgot_sol(:)=lstgot(:) ++ ++c deallocate work arrays ++ ++ deallocate (ind,lstgot,stat=fail(1)) ++ deallocate (txx,tyy,tzz,stat=fail(2)) ++ deallocate (xxt,yyt,zzt,stat=fail(3)) ++ deallocate (gaxs,rotmin,stat=fail(4)) ++ deallocate (accum,stat=fail(5)) ++ ++ return ++ end subroutine quatbook ++ ++ subroutine abort_field_read(kode,idnode,nfield) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting FIELD file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nfield ++ ++ if(idnode.eq.0)close (nfield) ++ ++ if(kode.eq.1)then ++ ++c end of field file error exit ++ ++ call error(idnode,52) ++ ++ elseif(kode.eq.2)then ++ ++c unrecognised directive in field file ++ ++ call error(idnode,4) ++ ++ endif ++ ++ return ++ end subroutine abort_field_read ++ ++ subroutine abort_control_read(kode,idnode,nread) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting CONTROL file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nread ++ ++ if(idnode.eq.0)close (nread) ++ ++ if(kode.eq.1)then ++ ++c end of control file error exit ++ ++ call error(idnode,53) ++ ++ elseif(kode.eq.2)then ++ ++c general error exit from field file processing ++ ++ call error(idnode,0) ++ ++ endif ++ ++ return ++ end subroutine abort_control_read ++ ++ subroutine abort_config_read(kode,idnode,nconf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting CONTROL file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nconf ++ ++ if(idnode.eq.0)close (nconf) ++ ++ if(kode.eq.1)then ++ ++c general error exit from field file processing ++ ++ call error(idnode,54) ++ ++ elseif(kode.eq.2)then ++ ++c end of config file error exit ++ ++ call error(idnode,55) ++ ++ endif ++ ++ return ++ end subroutine abort_config_read ++ ++ subroutine neutbook(lneut,idnode,natms,nneut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for neutral group bookkeeping ++c ++c copyright - daresbury laboratory ++c author - w. smith nov 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lneut,safe ++ integer idnode,natms,nneut,i ++ ++ safe=.true. ++ ++c neutral group bookkeeping: sites must be listed consecutively ++ ++ if(lneut)then ++ ++ if(lstneu(1).ne.1)call error(idnode,230) ++ ++ neulst(1)=1 ++ nneut=1 ++ ++ do i=2,natms ++ ++ safe=.false. ++ if(lstneu(i).eq.lstneu(i-1))safe=.true. ++ if(lstneu(i).eq.lstneu(i-1)+1)then ++ ++ safe=.true. ++ nneut=nneut+1 ++ if(nneut.gt.mxneut)call error(idnode,220) ++ neulst(nneut)=i ++ ++ endif ++ ++ if(.not.safe)call error(idnode,230) ++ ++ enddo ++ ++ neulst(nneut+1)=natms+1 ++ ++ endif ++ ++ return ++ ++ end subroutine neutbook ++ ++ subroutine intlist ++ x (lshmov,lcnb,idnode,mxnode,natms,nscons,ntangl,ntbond, ++ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the interaction lists ++c for the entire simulated system ++c ++c parallel replicated dat version : block data ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992 ++c amended - t.forester oct 1993 ++c amended - t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,safe1,lcnb,lchk,lfail ++ integer idnode,mxnode,natms,nscons,ntangl,ntbond,ntcons ++ integer ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf ++ integer ibonds,jbonds,kbonds,ipmf,jpmf,iangle,jangle,kangle ++ integer idihed,jdihed,kdihed,iinver,jinver,kinver,iteths ++ integer jteths,kteths,ishels,jshels,kshels,ntbon0,ntpmf0 ++ integer ntang0,ntdih0,ntinv0,nttet0,ntshl0,ntcon0,idum ++ integer itmols,isite,iconst,jconst,kconst,ibnd1,ibnd2,ipmf1 ++ integer ipmf2,iang1,iang2,idih1,idih2,iinv1,iinv2,itet1 ++ integer itet2,ishl1,ishl2,imols,lbonds,lpmf,jj,nnn,langle ++ integer ldihed,linver,lteths,lshels,i,ii,ntmp,klo,khi,ngrp ++ integer klo0,ifail,iloop,nnode,nscons0,nscons1,icon,fail ++ integer kcons,id,jdnode,lconst,itry,iatom,jatom,j,nfail ++ real(8) tol ++ ++ integer, allocatable :: itest(:),index(:),kscons(:) ++ integer, allocatable :: msite(:),mconst(:),listin(:) ++ ++ dimension fail(4) ++ ++ data fail/0,0,0,0/ ++ ++c allocate work arrays ++ ++ allocate (itest(mxtmls),index(mxtmls),stat=fail(1)) ++ allocate (msite(mxtmls),mconst(mxtmls),stat=fail(2)) ++ allocate (listin(mxatms),stat=fail(3)) ++ allocate (kscons(0:mxproc-1),stat=fail(4)) ++ do i=1,4 ++ if(fail(i).ne.0)call error(idnode,1800) ++ enddo ++ ++c initialise bookkeeping indices ++ ++ ibonds=0 ++ jbonds=0 ++ kbonds=0 ++ ipmf=0 ++ jpmf=0 ++ iangle=0 ++ jangle=0 ++ kangle=0 ++ idihed=0 ++ jdihed=0 ++ kdihed=0 ++ iinver=0 ++ jinver=0 ++ kinver=0 ++ iteths=0 ++ jteths=0 ++ kteths=0 ++ ishels=0 ++ jshels=0 ++ kshels=0 ++ safe=.true. ++ safe1=.true. ++ ++c find total number of bonds,pmf constraints,bond constraints, ++c angles,dihedrals,inversions, tethers,core-shells, in system ++c - ignoring frozen atoms ++ ++ ntbon0=0 ++ ntpmf0=0 ++ ntcon0=0 ++ ntang0=0 ++ ntdih0=0 ++ ntinv0=0 ++ nttet0=0 ++ ntshl0=0 ++ nscons=0 ++ ntcons=0 ++ ++ do itmols=1,ntpmls ++ ++ ntbon0=ntbon0+nummols(itmols)*numbonds(itmols) ++ ntpmf0=ntpmf0+nummols(itmols)*numpmf(itmols) ++ ntcon0=ntcon0+nummols(itmols)*numcon(itmols) ++ ntang0=ntang0+nummols(itmols)*numang(itmols) ++ ntdih0=ntdih0+nummols(itmols)*numdih(itmols) ++ ntinv0=ntinv0+nummols(itmols)*numinv(itmols) ++ nttet0=nttet0+nummols(itmols)*numteth(itmols) ++ ntshl0=ntshl0+nummols(itmols)*numshl(itmols) ++ ++ enddo ++ ++ isite=0 ++ iconst=0 ++ jconst=0 ++ kconst=0 ++ ++c first and last index of bonds, angles etc for this node ++ ++ ibnd1=(idnode*ntbon0)/mxnode+1 ++ ibnd2=((idnode+1)*ntbon0)/mxnode ++ ++ ipmf1=(idnode*ntpmf0)/mxnode+1 ++ ipmf2=((idnode+1)*ntpmf0)/mxnode ++ ntpmf=ntpmf0 ++ nspmf=ipmf2+1-ipmf1 ++ ++ iang1=(idnode*ntang0)/mxnode+1 ++ iang2=((idnode+1)*ntang0)/mxnode ++ ++ idih1=(idnode*ntdih0)/mxnode+1 ++ idih2=((idnode+1)*ntdih0)/mxnode ++ ++ iinv1=(idnode*ntinv0)/mxnode+1 ++ iinv2=((idnode+1)*ntinv0)/mxnode ++ ++ itet1=(idnode*nttet0)/mxnode+1 ++ itet2=((idnode+1)*nttet0)/mxnode ++ ++ ishl1=(idnode*ntshl0)/mxnode+1 ++ ishl2=((idnode+1)*ntshl0)/mxnode ++ ++c loop over molecule types ++ ++ do itmols=1,ntpmls ++ ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct bond constraint list later ++c construct chemical bond interaction list ++ ++ do lbonds=1,numbonds(itmols) ++ ++ ibonds=ibonds+1 ++ ++ if(ibonds.ge.ibnd1.and.ibonds.le.ibnd2)then ++ ++ jbonds=jbonds+1 ++ if(jbonds.le.mxbond)then ++ ++ listbnd(jbonds,1)=lbonds+kbonds ++ listbnd(jbonds,2)=lstbnd(lbonds+kbonds,1) ++ x +isite ++ listbnd(jbonds,3)=lstbnd(lbonds+kbonds,2) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,31) ++ ++c construct pmf site lists - no exclusions ++ ++ do lpmf=1,numpmf(itmols) ++ ++ ipmf=ipmf+1 ++ ++ if(ipmf.ge.ipmf1.and.ipmf.le.ipmf2)then ++ ++ jpmf=jpmf+1 ++ if(jpmf.le.mspmf)then ++ ++ nnn=npmf(1)+npmf(2) ++ if(nnn.le.mxspmf)then ++ ++ do jj=1,npmf(1)+npmf(2) ++ lstpmf(jj,jpmf)=indpmf(jj)+isite ++ enddo ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ else ++ ++ safe1=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe1) ++ if(.not.safe1)call error(idnode,458) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,460) ++ ++c construct valence angle interaction list ++ ++ do langle=1,numang(itmols) ++ ++ iangle=iangle+1 ++ ++ if(iangle.ge.iang1.and.iangle.le.iang2)then ++ ++ jangle=jangle+1 ++ if(jangle.le.mxangl)then ++ ++ listang(jangle,1)=langle+kangle ++ listang(jangle,2)=lstang(langle+kangle,1) ++ x +isite ++ listang(jangle,3)=lstang(langle+kangle,2) ++ x +isite ++ listang(jangle,4)=lstang(langle+kangle,3) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,51) ++ ++c construct dihedral angle interaction list ++ ++ do ldihed=1,numdih(itmols) ++ ++ idihed=idihed+1 ++ ++ if(idihed.ge.idih1.and.idihed.le.idih2)then ++ ++ jdihed=jdihed+1 ++ if(jdihed.le.mxdihd)then ++ ++ listdih(jdihed,1)=ldihed+kdihed ++ listdih(jdihed,2)=lstdih(ldihed+kdihed,1) ++ x +isite ++ listdih(jdihed,3)=lstdih(ldihed+kdihed,2) ++ x +isite ++ listdih(jdihed,4)=lstdih(ldihed+kdihed,3) ++ x +isite ++ listdih(jdihed,5)=lstdih(ldihed+kdihed,4) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,61) ++ ++c construct inversion potential list ++ ++ do linver=1,numinv(itmols) ++ ++ iinver=iinver+1 ++ ++ if(iinver.ge.iinv1.and.iinver.le.iinv2)then ++ ++ jinver=jinver+1 ++ if(jinver.le.mxinv)then ++ ++ listinv(jinver,1)=linver+kinver ++ listinv(jinver,2)=lstinv(linver+kinver,1) ++ x +isite ++ listinv(jinver,3)=lstinv(linver+kinver,2) ++ x +isite ++ listinv(jinver,4)=lstinv(linver+kinver,3) ++ x +isite ++ listinv(jinver,5)=lstinv(linver+kinver,4) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,77) ++ ++c construct tethered atoms interaction list ++ ++ do lteths=1,numteth(itmols) ++ ++ iteths=iteths+1 ++ ++ if(iteths.ge.itet1.and.iteths.le.itet2)then ++ ++ jteths=jteths+1 ++ if(jteths.le.msteth)then ++ ++ listtet(jteths,1)=lteths+kteths ++ listtet(jteths,2)=lsttet(lteths+kteths)+isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,63) ++ ++c construct core-shell list ++ ++ do lshels=1,numshl(itmols) ++ ++ ishels=ishels+1 ++ ++ if(ishels.ge.ishl1.and.ishels.le.ishl2)then ++ ++ jshels=jshels+1 ++ if(jshels.le.mxshl)then ++ ++ listshl(jshels,1)=lshels+kshels ++ listshl(jshels,2)=lstshl(lshels+kshels,1) ++ x +isite ++ listshl(jshels,3)=lstshl(lshels+kshels,2) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,59) ++ ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ kbonds=kbonds+numbonds(itmols) ++ kangle=kangle+numang(itmols) ++ kdihed=kdihed+numdih(itmols) ++ kinver=kinver+numinv(itmols) ++ kteths=kteths+numteth(itmols) ++ kshels=kshels+numshl(itmols) ++ ++ enddo ++ ++c store array counters for bookkeeping ++ ++ ntbond=ibonds ++ ntangl=iangle ++ ntdihd=idihed ++ ntinv=iinver ++ ntteth=iteths ++ ntshl=ishels ++ ++c pass bond constraint information to other nodes ++ ++ if(ntcon0.gt.0)then ++ ++ ntcons=ntcon0 ++ ++c find starting site no. and constraint no. for each molec. type ++ ++ msite(1)=0 ++ mconst(1)=0 ++ ++ do itmols=2,ntpmls ++ ++ msite(itmols)=msite(itmols-1)+numsit(itmols-1)* ++ x nummols(itmols-1) ++ mconst(itmols)=mconst(itmols-1)+numcon(itmols-1) ++ ++ enddo ++ ++c sort molecules into ascending order of number of constraints ++ ++ do i=1,ntpmls ++ ++ itest(i)=numcon(i) ++ index(i)=0 ++ ++ enddo ++ ++ call shellsort(ntpmls,itest) ++ ++ do i=1,ntpmls ++ ++ lchk=.true. ++ do j=1,ntpmls ++ ++ if(itest(i).eq.numcon(j))then ++ ++ if(lchk)then ++ index(i)=j ++ lchk=.false. ++ ++ endif ++ ++ do ii=1,i-1 ++ if(index(ii).eq.j)lchk=.true. ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c load balance to within 10% ++ ++ tol=1.0d0+(0.10d0)/2.d0 ++ kcons=(ntcons)/mxnode ++ ntmp=0 ++ ++c find smallest constrained molecule to allocate to a node ++ ++ do i=1,ntpmls ++ ++ if(ntmp.le.mxnode)then ++ ++ if(numcon(index(i)).gt.0)then ++ ntmp=ntmp+nummols(index(i)) ++ klo=max(0,kcons-numcon(index(i))/2) ++ khi=klo+numcon(index(i))+1 ++ endif ++ ++ endif ++ ++ enddo ++ ++c reset hi/lo limits if molecules contain too many constraints ++ ++ if(dble(khi)/dble(max(1,klo)).gt.tol)then ++ klo=nint(dble(kcons)/tol) ++ khi=nint(dble(kcons)*tol)+1 ++ endif ++ ++c store lo value for later ++ ++ klo0=klo ++ ++c begin assignment of constraints ---------------------------------- ++ ++ ifail=-1 ++ lfail=.true. ++ do while(lfail) ++ ++ ifail=ifail+1 ++ ++ if(ifail.gt.ntpmls)then ++ call error(idnode,432) ++ endif ++ ++ iconst=0 ++ jconst=0 ++ kconst=0 ++ lconst=0 ++ ++c zero running totals of constraints on each processor ++ ++ do id=0,mxnode-1 ++ kscons(id)=0 ++ enddo ++ ++ iloop=0 ++ lfail=.false. ++ iconst=0 ++ jconst=0 ++ nnode=0 ++ ++c assign difficult molecules in blocks ++ ++ if(ifail.gt.0)then ++ ++ nfail=0 ++ do i=1,ifail ++ ++ ii=ntpmls+1-i ++ nfail=nfail+nummols(index(ii))*numcon(index(ii)) ++ ++ enddo ++ ++c decide on number of processors to split over ++ ++ nnode=int(dble(nfail)/dble(max(kcons,1))+1.d0/tol) ++ nnode=max(2,nnode) ++ nnode=min(nnode,mxnode) ++ ++c assign to processors 0..nnode-1 ++ ++ do id=0,nnode-1 ++ ++ nscons0=(id*nfail)/nnode+1 ++ nscons1=((id+1)*nfail)/nnode ++ ++ kscons(id)=nscons1+1-nscons0 ++ ++ enddo ++ ++c this processors block ++ ++ nscons0=(idnode*nfail)/nnode+1 ++ nscons1=((idnode+1)*nfail)/nnode ++ ++c assign in blocks ++ ++ do itmols=ntpmls,ntpmls-ifail+1,-1 ++ ++ ii=index(itmols) ++ icon=numcon(ii) ++ kconst=mconst(ii) ++ ++ do imols=1,nummols(ii) ++ ++ isite=msite(ii)+(imols-1)*numsit(ii) ++ ++c construct bond constraint list ++ ++ do lconst=1,numcon(ii) ++ ++ iconst=iconst+1 ++ ++ if(iconst.ge.nscons0.and.iconst.le.nscons1)then ++ ++ jconst=jconst+1 ++ ++ if(jconst.le.mxcons)then ++ ++ listcon(jconst,1)=lconst+kconst ++ iatom=lstcon(lconst+kconst,1)+isite ++ jatom=lstcon(lconst+kconst,2)+isite ++ ++ listcon(jconst,2)=iatom ++ listcon(jconst,3)=jatom ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c assign non-problematic molecules ++ ++ jdnode=mod(nnode+1,mxnode) ++ ++ do itmols=ntpmls-ifail,1,-1 ++ ++ ii=index(itmols) ++ icon=numcon(ii) ++ kconst=mconst(ii) ++ ++ do imols=1,nummols(ii) ++ ++ itry=0 ++ lchk=.true. ++ do while(lchk) ++ ++ if(kscons(jdnode)+icon.le.klo)then ++ ++ if(jdnode.ne.idnode)then ++ kscons(jdnode)=kscons(jdnode)+icon ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.false. ++ else ++ ++c construct bond constraint list ++ ++ isite=msite(ii)+(imols-1)*numsit(ii) ++ do lconst=1,numcon(ii) ++ ++ jconst=jconst+1 ++ ++ if(jconst.le.mxcons)then ++ ++ listcon(jconst,1)=lconst+kconst ++ iatom=lstcon(lconst+kconst,1)+isite ++ jatom=lstcon(lconst+kconst,2)+isite ++ listcon(jconst,2)=iatom ++ listcon(jconst,3)=jatom ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ kscons(jdnode)=kscons(jdnode)+icon ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.false. ++ ++ endif ++ ++ else ++ ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.true. ++ itry=itry+1 ++ ++ endif ++ ++ if(lchk.and.itry.gt.mxnode)then ++ ++ klo=kcons ++ kcons=khi ++ itry=0 ++ iloop=iloop+1 ++ ++ endif ++ ++c split molecule across nodes if have to ++ ++ if(iloop.gt.3)then ++ lfail=.true. ++ kcons=ntcons/mxnode ++ klo=klo0 ++ lchk=.false. ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c check no node has less than minimum number ++ ++ do id=0,mxnode-1 ++ if(kscons(id).lt.klo0)then ++ lfail=.true. ++ endif ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)then ++ ++ if(mxnode.gt.1)call gimax(jconst,1,idum) ++ if(idnode.eq.0)write(nrite,'(a,i10,a,i10)') ++ x 'Number of constraints found ',jconst,'Max allowed ',mxcons ++ ++ call error(idnode,41) ++ ++ endif ++ ++ nscons=kscons(idnode) ++ ++ call passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++ endif ++ ++ if(npmf(1).gt.0)then ++ ++ call passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++ endif ++ ++c pass rigid body data ++ ++ lcnb=.false. ++ if(ntcons.gt.0.and.ngrp.gt.0)then ++ ++ call passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp, ++ x numgsit) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(itest,index,msite,stat=fail(1)) ++ deallocate(mconst,kscons,listin,stat=fail(2)) ++ ++ return ++ end subroutine intlist ++ ++ subroutine ensemble_selection ++ x (directive,lens,kill,idnode,keyens,mode,taut,taup) ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the ensemble and reading ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical kill,lens ++ integer keyens,idnode,idum,mode ++ real(8) taut,taup ++ ++ if(findstring('nve',directive,idum))then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'microcanonical ensemble')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('nvt',directive,idum))then ++ ++ if(findstring('evans',directive,idum))then ++ ++ keyens=1 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Evans Gaussian temperature constraints', ++ x ' in use')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('ber',directive,idum))then ++ ++ keyens=2 ++ taut=dblstr(directive,69,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen thermostat', ++ x /,1x,'thermostat relaxation time ',1p,e12.4)") ++ x taut ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=3 ++ taut=dblstr(directive,69,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4)") ++ x taut ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ elseif(findstring('npt',directive,idum))then ++ ++ if(findstring('ber',directive,idum))then ++ ++ keyens=4 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen isotropic N-P-T', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=5 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover (Melchionna) isotropic N-P-T ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ elseif(findstring('nst',directive,idum))then ++ ++ mode=0 ++ if(findstring('block',directive,idum))mode=1 ++ if(findstring('surf',directive,idum))mode=2 ++ if(findstring('slab',directive,idum))mode=3 ++ ++ if(findstring('ber',directive,idum))then ++ ++ keyens=6 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen anisotropic N-P-T', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=7 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover (Melchionna) anisotropic N-P-T ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ if(mode.eq.0)then ++ write(nrite,"(/,1x,'NST mode 0 X<>Y<>Z')") ++ elseif(mode.eq.1)then ++ write(nrite, ++ x "(/,1x,'NST mode 1 X<>Y<>Z (rectangular block)')") ++ elseif(mode.eq.2)then ++ write(nrite, ++ x "(/,1x,'NST mode 2 X=Y<>Z (liquid surface)')") ++ elseif(mode.eq.3)then ++ write(nrite, ++ x "(/,1x,'NST mode 3 X<>Y<>Z (solid slab)')") ++ endif ++ ++ endif ++ ++ elseif(findstring('pmf',directive,idum))then ++ ++ keyens=8 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'potential of mean force calculation (NVE)')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ call error(idnode,-436) ++ kill=.true. ++ ++ endif ++ ++ return ++ end subroutine ensemble_selection ++ ++ subroutine neb_option ++ x (directive,lneb,lminopt,idnode,numneb,keytol,sprneb, ++ x opttol,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for NEB option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit ++ character*1 directive(lenrec) ++ logical lneb,lminopt,endneb,safe ++ integer numneb,idnode,keytol,i,idum ++ real(8) sprneb,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ lminopt=.true. ++ lneb=.true. ++ endneb=.false. ++ numneb=intstr(directive,lenrec,idum) ++ if(numneb.eq.0)numneb=1 ++ numneb=min(maxneb,numneb) ++ ++ hyp_units=1.d0 ++ do while(.not.endneb) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endneb',directive,idum))then ++ endneb=.true. ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('basin_1',directive,idum))then ++ call striptext(directive,lenrec,1) ++ do i=1,numneb ++ bsn_1(i)=intstr(directive,lenrec,idum) ++ enddo ++ elseif(findstring('basin_2',directive,idum))then ++ call striptext(directive,lenrec,1) ++ do i=1,numneb ++ bsn_2(i)=intstr(directive,lenrec,idum) ++ enddo ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,1x,'NEB calculation controls')") ++ write(nrite,"(/,1x,'identity of basin 1 ', ++ x 10i10)")(bsn_1(i),i=1,numneb) ++ write(nrite,"(1x,'identity of basin 2 ', ++ x 10i10)")(bsn_2(i),i=1,numneb) ++ write(nrite, ++ x "(1x,'NEB spring constant ',e12.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'energy units ',2x,a8)") ++ x sprneb,opttol,cunit ++ ++ call print_optim(keytol) ++ ++ endif ++ ++c units conversion ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ return ++ end subroutine neb_option ++ ++ subroutine bpd_option ++ x (directive,seek,lbpd,ltad,lminopt,prechk,nebgo,keybpd,idnode, ++ x nblock,ntrack,keytol,ebias,vmin,catchrad,sprneb,opttol, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for bias potential ++c dynamics option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit,seek ++ character*1 directive(lenrec) ++ logical lbpd,ltad,lminopt,prechk,endbpd,safe,nebgo ++ integer keybpd,idnode,nblock,ntrack,keytol,idum ++ real(8) ebias,vmin,catchrad,sprneb,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ if(ltad)call error(idnode,2355) ++ lminopt=.true. ++ lbpd=.true. ++ endbpd=.false. ++ cunit=" dl_poly" ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'bias potential dynamics controls')") ++ ++ if(findstring('dyn',directive,idum))then ++ ++ keybpd=1 ++ hyp_units=energy_unit() ++ ebias=dblstr(directive,lenrec,idum) ++ vmin=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ if(idnode.eq.0)write(nrite,"( ++ x 1x,'dynamics option selected ', ++ x /,1x,'bias potential E_bias (kelvin)',f10.4, ++ x /,1x,'bias potential V_min (kelvin)',f10.4 ++ x /,1x,'energy units ',2x,a8)") ++ x ebias,vmin,cunit ++ ++ elseif(findstring('path',directive,idum))then ++ ++ keybpd=2 ++ nebgo=.true. ++ hyp_units=1.d0 ++ do while(.not.endbpd) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endbpd',directive,idum))then ++ endbpd=.true. ++ elseif(findstring('pre',directive,idum))then ++ prechk=.true. ++ if(findstring('false',directive,idum))prechk=.false. ++ elseif(findstring('noneb',directive,idum))then ++ nebgo=.false. ++ elseif(findstring('target',directive,idum))then ++ call getword(seek,directive,8,lenrec) ++ call getword(seek,directive,8,lenrec) ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('ebias',directive,idum))then ++ ebias=dblstr(directive,lenrec,idum) ++ elseif(findstring('vmin',directive,idum))then ++ vmin=dblstr(directive,lenrec,idum) ++ elseif(findstring('num_block',directive,idum))then ++ nblock=intstr(directive,lenrec,idum) ++ elseif(findstring('num_track',directive,idum))then ++ ntrack=intstr(directive,lenrec,idum) ++ elseif(findstring('catch_radius',directive,idum))then ++ catchrad=dblstr(directive,lenrec,idum) ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"( ++ x 1x,'dynamics with path analysis selected', ++ x /,1x,'bias potential E_bias (kelvin)',f10.4, ++ x /,1x,'bias potential V_min (kelvin)',f10.4, ++ x /,1x,'steps per time block ',i10, ++ x /,1x,'steps per tracking block ',i10, ++ x /,1x,'configuration catch radius (A)',f10.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'atom type to be tracked ',2x,a8, ++ x /,1x,'energy units ',2x,a8)") ++ x ebias,vmin,nblock,ntrack,catchrad,opttol,seek,cunit ++ if(nebgo)write(nrite, ++ x "(1x,'NEB spring constant ',e12.4)")sprneb ++ if(prechk)write(nrite, ++ x "(1x,'transition prechecking option selected')") ++ call print_optim(keytol) ++ ++ endif ++ ++c energy unit conversions ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ endif ++ ++ return ++ end subroutine bpd_option ++ ++ subroutine tad_option ++ x (directive,ltad,lbpd,lminopt,prechk,tadall,idnode,nblock, ++ x ntrack,blkout,keytol,catchrad,sprneb,tlow,deltad,opttol, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for TAD option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit ++ character*1 directive(lenrec) ++ logical ltad,lbpd,lminopt,prechk,tadall,endtad,safe ++ integer idnode,nblock,ntrack,blkout,keytol,idum ++ real(8) catchrad,sprneb,deltad,tlow,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ if(lbpd)call error(idnode,2355) ++ lminopt=.true. ++ ltad=.true. ++ endtad=.false. ++ hyp_units=1.d0 ++ ++ do while(.not.endtad) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endtad',directive,idum))then ++ endtad=.true. ++ elseif(findstring('pre',directive,idum))then ++ prechk=.true. ++ if(findstring('false',directive,idum))prechk=.false. ++ elseif(findstring('all',directive,idum))then ++ tadall=.true. ++ if(findstring('false',directive,idum))tadall=.false. ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('num_block',directive,idum))then ++ nblock=intstr(directive,lenrec,idum) ++ elseif(findstring('num_track',directive,idum))then ++ ntrack=intstr(directive,lenrec,idum) ++ elseif(findstring('blackout',directive,idum))then ++ blkout=intstr(directive,lenrec,idum) ++ elseif(findstring('catch_radius',directive,idum))then ++ catchrad=dblstr(directive,lenrec,idum) ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('deltad',directive,idum))then ++ deltad=dblstr(directive,lenrec,idum) ++ elseif(findstring('low_temp',directive,idum))then ++ tlow=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'TAD dynamics controls' ++ x /,1x,'steps per time block ',i10, ++ x /,1x,'steps per tracking block ',i10, ++ x /,1x,'steps in blackout periods ',i10, ++ x /,1x,'configuration catch radius ',1p,e12.4, ++ x /,1x,'NEB spring constant ',e12.4, ++ x /,1x,'stopping parameter ',e12.4, ++ x /,1x,'target low temperature ',e12.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'energy units ',2x,a8)") ++ x nblock,ntrack,blkout,catchrad,sprneb,deltad, ++ x tlow,opttol,cunit ++ if(prechk)write(nrite, ++ x "(1x,'transition prechecking option selected')") ++ if(tadall)write(nrite, ++ x "(1x,'option for all basins analysis selected')") ++ call print_optim(keytol) ++ ++ endif ++ ++c energy unit conversions ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ return ++ end subroutine tad_option ++ ++ subroutine metadyn_option ++ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, ++ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, ++ x locpe_scale,ref_W_aug,h_aug,wt_Dt) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for metadynamics option ++c copyright - daresbury laboratory ++c author - w. smith jan 2011 ++c ++c note: default values are set in metafreeze_module ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lmetadyn,endmet,lstein,ltet,lglobpe,llocpe,safe ++ integer idnode,idum,ncolvar,nq4,nq6,ntet,hkey,meta_step_int ++ real(8) globpe_scale,locpe_scale,ref_W_aug,h_aug,wt_Dt ++ ++ lmetadyn=.true. ++ endmet=.false. ++ ++ do while(.not.endmet) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endmet',directive,idum))then ++ endmet=.true. ++ elseif(findstring('ncolvar',directive,idum))then ++ ncolvar=intstr(directive,lenrec,idum) ++ elseif(findstring('lstein',directive,idum))then ++ lstein=.true. ++ if(findstring('false',directive,idum))lstein=.false. ++ elseif(findstring('ltet',directive,idum))then ++ ltet=.true. ++ if(findstring('false',directive,idum))ltet=.false. ++ elseif(findstring('lglobpe',directive,idum))then ++ lglobpe=.true. ++ if(findstring('false',directive,idum))lglobpe=.false. ++ elseif(findstring('llocpe',directive,idum))then ++ llocpe=.true. ++ if(findstring('false',directive,idum))llocpe=.false. ++ elseif(findstring('globpe_scale',directive,idum))then ++ globpe_scale=dblstr(directive,lenrec,idum) ++ elseif(findstring('locpe_scale',directive,idum))then ++ locpe_scale=dblstr(directive,lenrec,idum) ++ elseif(findstring('nq4',directive,idum))then ++ nq4=intstr(directive,lenrec,idum) ++ nq4=intstr(directive,lenrec,idum) ! do twice - number in name! ++ elseif(findstring('nq6',directive,idum))then ++ nq6=intstr(directive,lenrec,idum) ++ nq6=intstr(directive,lenrec,idum) ! do twice - number in name! ++ elseif(findstring('ntet',directive,idum))then ++ ntet=intstr(directive,lenrec,idum) ++ elseif(findstring('meta_step_int',directive,idum))then ++ meta_step_int=intstr(directive,lenrec,idum) ++ elseif(findstring('ref_w_aug',directive,idum))then ++ ref_W_aug=dblstr(directive,lenrec,idum) ++ elseif(findstring('h_aug',directive,idum))then ++ h_aug=dblstr(directive,lenrec,idum) ++ elseif(findstring('hkey',directive,idum))then ++ hkey=intstr(directive,lenrec,idum) ++ elseif(findstring('wt_dt',directive,idum))then ++ wt_dt=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'metadynamics controls' ++ x /,1x,'total number of collective variables',i10, ++ x /,1x,'steinhardt parameters option (Q4/Q6)',l10, ++ x /,1x,'tetrahedral parameters option (zeta)',l10, ++ x /,1x,'global potential parameter option ',l10, ++ x /,1x,'local potential parameter option ',l10, ++ x /,1x,'global potential param. scale factor',e12.4, ++ x /,1x,'local potential param. scale factor ',e12.4)") ++ x ncolvar,lstein,ltet,lglobpe,llocpe,globpe_scale,locpe_scale ++ ++ write(nrite, ++ x "( 1x,'number of Q4 atom pair types ',i10, ++ x /,1x,'number of Q6 atom pair types ',i10, ++ x /,1x,'number of zeta atom triplet types ',i10)") ++ x nq4,nq6,ntet ++ ++ write(nrite, ++ x "( 1x,'gaussian deposition interval ',i10, ++ x /,1x,'reference gaussian height ',e12.4, ++ x /,1x,'gaussian width parameter ',e12.4, ++ x /,1x,'height control key ',i10, ++ x /,1x,'well-tempered control parameter ',e12.4)") ++ x meta_step_int,ref_W_aug,h_aug,hkey,wt_Dt ++ ++ endif ++ ++ return ++ end subroutine metadyn_option ++ ++ subroutine ewald_selection ++ x (directive,lhke,lspme,lewald,lcut,lforc,kill,idnode,keyfce, ++ x imcon,nhko,nlatt,kmax1,kmax2,kmax3,alpha,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the ewald method and reading ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lhke,lspme,lewald,lcut,lforc,kill,safe ++ integer idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2,kmax3,idum ++ integer kmaxpow2 ++ real(8) alpha,rcut,eps,tol,fac,tol1 ++ ++ lhke=findstring('hke',directive,idum) ++ lspme=findstring('spme',directive,idum) ++ lewald=findstring('ewald',directive,idum) ++ if(lewald)keyfce=2 ++ if(lspme)keyfce=12 ++ if(lhke)keyfce=14 ++ if(idnode.eq.0)open(nconf,file='CONFIG') ++ call getrec(safe,idnode,nconf) ++ call getrec(safe,idnode,nconf) ++ imcon=intstr(record,lenrec,idum) ++ imcon=intstr(record,lenrec,idum) ++ if(.not.lhke.and.(imcon.eq.0.or.imcon.eq.6))then ++ ++ call error(idnode,-180) ++ kill=.true. ++ ++ endif ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Ewald sum precision ',7x,1p,e12.4)")eps ++ ++ if(lhke)then ++ ++ nhko=min(intstr(directive,lenrec,idum),3) ++ nlatt=min(intstr(directive,lenrec,idum),2) ++ if(nlatt.eq.0)nlatt=1 ++ if(nhko.eq.0)nhko=1 ++ ++ endif ++ ++ if(.not.lcut)then ++ call error(idnode,-433) ++ kill=.true. ++ else ++ ++c retreive cell vectors ++ ++ call getrec(safe,idnode,nconf) ++ cell(1)=dblstr(record,lenrec,idum) ++ cell(2)=dblstr(record,lenrec,idum) ++ cell(3)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ cell(4)=dblstr(record,lenrec,idum) ++ cell(5)=dblstr(record,lenrec,idum) ++ cell(6)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ cell(7)=dblstr(record,lenrec,idum) ++ cell(8)=dblstr(record,lenrec,idum) ++ cell(9)=dblstr(record,lenrec,idum) ++ ++c compute alpha and the kmax ++ ++ if(lewald.or.lspme)then ++ ++ call dcell(cell,celprp) ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) ++ fac=1.d0 ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x fac=2.d0**(1.d0/3.d0) ++ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) ++ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) ++ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) ++ ++ elseif(lhke)then ++ ++ if(nhko.eq.0)then ++ if(eps.le.1.d-6)then ++ alpha=3.46d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=3.14d0/rcut ++ else ++ alpha=2.76d0/rcut ++ endif ++ elseif(nhko.eq.1)then ++ if(eps.le.1.d-6)then ++ alpha=4.37d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.08d0/rcut ++ else ++ alpha=3.75d0/rcut ++ endif ++ elseif(nhko.eq.2)then ++ if(eps.le.1.d-6)then ++ alpha=5.01d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.74d0/rcut ++ else ++ alpha=4.44d0/rcut ++ endif ++ elseif(nhko.eq.3)then ++ if(eps.le.1.d-6)then ++ alpha=5.55d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=5.28d0/rcut ++ else ++ alpha=5.00d0/rcut ++ endif ++ endif ++ alpha=alpha/dble(2*nlatt+1) ++ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 ++ call dcell(cell,celprp) ++ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) ++ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) ++ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) ++ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) ++ kmax3=1 ++ ++ endif ++ ++ endif ++ ++ else ++ ++ alpha=dblstr(directive,lenrec,idum) ++ kmax1=intstr(directive,lenrec,idum) ++ kmax2=intstr(directive,lenrec,idum) ++ ++ if(lhke)then ++ ++ kmax3=1 ++ nhko=min(intstr(directive,lenrec,idum),3) ++ nlatt=min(intstr(directive,lenrec,idum),2) ++ ++ else ++ ++ kmax3=intstr(directive,lenrec,idum) ++ ++ endif ++ ++ endif ++ ++c if spme double kmax and set to next power of 2, with current upper ++c limit of 512. ++ ++ if(lspme)then ++ ++ kmaxpow2=1 ++ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax1=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax2=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax3=2 * kmaxpow2 ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ close(nconf) ++ ++ if(lspme)then ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : SPME ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") ++ x alpha,kmax1/2,kmax2/2,kmax3/2 ++ ++ elseif(lhke)then ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : Hautman-Klein-Ewald sum ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 ',2i5)") ++ x alpha,kmax1,kmax2 ++ ++ write(nrite, ++ x "(1x,'HKE expansion order ',7x,i10, ++ x /,1x,'HKE lattice control ',7x,i10)")nhko,nlatt ++ ++ else ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : Ewald sum ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") ++ x alpha,kmax1,kmax2,kmax3 ++ ++ endif ++ ++ endif ++ ++ if(lspme)then ++ ++c Initialize fft tables ++ ++CFFTW call fftw3d_f77_create_plan ++CFFTW x (fplan,kmaxd,kmaxe,kmaxf, ++CFFTW x FFTW_FORWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) ++CFFTW ++CFFTW call fftw3d_f77_create_plan ++CFFTW x (bplan,kmaxd,kmaxe,kmaxf, ++CFFTW x FFTW_BACKWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) ++ ++CSGIC call zzfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, ++CSGIC x dummy,1,1,ffttable,dummy,dummy ) ++ ++CCRAY call ccfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, ++CCRAY x dummy,1,1,ffttable,dummy,dummy ) ++ ++ endif ++ ++ if(lspme)then ++ ++ if(kmax1.gt.kmaxd.or.kmax2.gt.kmaxe.or.kmax3.gt.kmaxf)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ elseif(lhke)then ++ ++ if(kmax2.gt.kmaxb)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ else ++ ++ if(kmax2.gt.kmaxb.or.kmax3.gt.kmaxc)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ lforc=.true. ++ ++ return ++ end subroutine ewald_selection ++ ++ subroutine print_optim(keytol) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for printing the optimisation option ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer keytol ++ ++ if(keytol.eq.0)then ++ write(nrite, ++ x "(1x,'convergence to minimum force selected')") ++ elseif(keytol.eq.1)then ++ write(nrite, ++ x "(1x,'convergence to minimum energy selected')") ++ else ++ write(nrite, ++ x "(1x,'convergence to minimum position selected')") ++ endif ++ ++ return ++ end subroutine print_optim ++ ++ function energy_unit() ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for assigning energy conversion factors ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idum ++ real(8) energy_unit ++ ++ energy_unit=1.d0 ++ if(findstring('ev',record,idum))then ++ energy_unit=9648.530821d0 ++ elseif(findstring('kev',record,idum))then ++ energy_unit=9648530.821d0 ++ elseif(findstring('kcal',record,idum))then ++ energy_unit=418.4d0 ++ elseif(findstring('kj',record,idum))then ++ energy_unit=1.d2 ++ elseif(findstring('k',record,idum))then ++ energy_unit=boltz ++ endif ++ ++ return ++ end function energy_unit ++ ++ subroutine solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for solvation option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,endsol,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ endsol=.false. ++ ++ nsolva=intstr(directive,lenrec,idum) ++ isolva=intstr(directive,lenrec,idum) ++ ++ if(nsolva.eq.0.and.isolva.eq.0)then ++ ++ do while(.not.endsol) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endsol',directive,idum))then ++ endsol=.true. ++ elseif(findstring('enddec',directive,idum))then ++ endsol=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=max(intstr(directive,lenrec,idum),1) ++ endif ++ ++ enddo ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'solvation calculation selected', ++ x /,1x,'start of solvation calculation ',i10, ++ x /,1x,'solvation calculation interval ',i10)") ++ x nsolva,isolva ++ ++ endif ++ ++ return ++ end subroutine solvation_option ++ ++ subroutine free_energy_option(directive,lfree,lfrmas,idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for free energy option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lfree,lfrmas,endfre,safe ++ integer idnode,idum ++ ++ mfree=1 ++ kfree=1 ++ lfree=.true. ++ lfrmas=.false. ++ endfre=.false. ++ ++ do while(.not.endfre) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endfre',directive,idum))then ++ endfre=.true. ++ elseif(findstring('start',directive,idum))then ++ nfrn=intstr(directive,lenrec,idum) ++ elseif(findstring('interval',directive,idum))then ++ ifrn=intstr(directive,lenrec,idum) ++ elseif(findstring('lambda',directive,idum))then ++ pfree=dblstr(directive,lenrec,idum) ++ elseif(findstring('mix',directive,idum))then ++ mfree=intstr(directive,lenrec,idum) ++ elseif(findstring('expo',directive,idum))then ++ kfree=intstr(directive,lenrec,idum) ++ elseif(findstring('reset_mass',directive,idum))then ++ lfrmas=.true. ++ if(findstring('false',directive,idum))lfrmas=.false. ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(mfree.eq.1)kfree=1 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'free energy option selected', ++ x /,1x,'start of free energy calculation ',i10, ++ x /,1x,'sampling interval ',i10, ++ x /,1x,'free energy parameter (lambda) ',f10.3, ++ x /,1x,'mixing rule selected ',i10, ++ x /,1x,'mixing rule exponent ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10, ++ x /,1x,'mass scaling option ',l10)") ++ x nfrn,ifrn,pfree,mfree,kfree,ind_fre,lfrmas ++ ++ endif ++ ++c define free energy scaling parameters ++ ++ call freegen() ++ ++ return ++ end subroutine free_energy_option ++ ++ subroutine excitation_option ++ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for excitation option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,lexcite,lghost,endexc,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ lghost=.true. ++ lexcite=.true. ++ endexc=.false. ++ ++ do while(.not.endexc) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endexc',directive,idum))then ++ endexc=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=intstr(directive,lenrec,idum) ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'excitation option selected', ++ x /,1x,'energy decomposition start ',i10, ++ x /,1x,'energy decomposition interval ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10)") ++ x nsolva,isolva,ind_fre ++ ++ endif ++ ++ return ++ end subroutine excitation_option ++ ++ subroutine switching_option ++ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for switching option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,lswitch,lghost,endswi,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ lghost=.true. ++ lswitch=.true. ++ endswi=.false. ++ niswitch=0 ++ ++ do while(.not.endswi) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endswi',directive,idum))then ++ endswi=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=intstr(directive,lenrec,idum) ++ elseif(findstring('period',directive,idum))then ++ niswitch=max(intstr(directive,lenrec,idum),2) ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(niswitch.eq.0)niswitch=nsolva ++ nswitch=nsolva ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'switching option selected', ++ x /,1x,'energy decomposition start ',i10, ++ x /,1x,'energy decomposition interval ',i10, ++ x /,1x,'switching period ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10)") ++ x nsolva,isolva,niswitch,ind_fre ++ ++ endif ++ ++ return ++ end subroutine switching_option ++ ++ end module define_system_module ++ +diff -urN dl_class_1.9.orig/srcmod/define_system_module.f.preplumed dl_class_1.9/srcmod/define_system_module.f.preplumed +--- dl_class_1.9.orig/srcmod/define_system_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/define_system_module.f.preplumed 2011-10-17 17:32:15.000000000 +0200 +@@ -0,0 +1,5994 @@ ++ module define_system_module ++ ++c*********************************************************************** ++c ++c dl_poly module for utility subroutines and functions ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - p.-a. cazade oct 2007, solvation, free energy ++c and excitation ++c adapted - d. quigley nov 2010, metadynamics ++c ++c*********************************************************************** ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use dihedral_module ++ use ensemble_tools_module ++ use error_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use inversion_module ++ use metafreeze_module ++ use metal_module ++ use parse_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use vdw_module ++ ++ contains ++ ++ subroutine simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading in the simulation control ++c parameters ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992. ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c modified ++c author - t.forester may 1993 ++c amended - t.forester sept 1994 - dl_poly_1.1 ++c amended - t.forester nov 1994 - macro version ++c amended - w.smith dec 1994 - t3d adaptation ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit,seek ++ character*1 hms ++ character*1 directive(lenrec) ++ logical lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,lpsoc ++ logical ltscal,lzeql,loptim,ltraj,lfcap,lgofr,lpgr,lpres,safe ++ logical lstep,ltemp,lcut,ldelr,lprim,lforc,lens,lvdw,lrvdw,kill ++ logical lnsq,lzden,lewald,lspme,lhke,loop,lzero,nolink,newgau ++ logical lminim,lminopt,ltad,lneb,lhit,lbpd,prechk,tadall,nebgo ++ integer idnode,intsta,istraj,keyens,keyfce,keyres,nstbpo,nsbzdn ++ integer keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,khit,nhit ++ integer nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,ntrack ++ integer idum,imcon,keyver,keytol,nblock,blkout,numgau ++ integer minstp,numneb,i,keybpd,mode,nsolva,isolva,nofic ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,rlxtol,opttol ++ real(8) eps,tol,fm,densvar,delrdf,delzdn,zlen,ehit,hyp_units ++ real(8) catchrad,sprneb,deltad,tlow,xhit,yhit,zhit,ebias,vmin ++ real(8) prntim ++ ++CSGIC real(8) dummy ++CCRAY real(8) dummy ++CFFTWc FFTW instruction codes ++CFFTW ++CFFTW integer FFTW_FORWARD,FFTW_BACKWARD ++CFFTW parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) ++CFFTW ++CFFTW integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL ++CFFTW parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) ++CFFTW ++CFFTW integer FFTW_ESTIMATE,FFTW_MEASURE ++CFFTW parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) ++CFFTW ++CFFTW integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM ++CFFTW parameter (FFTW_OUT_OF_PLACE=0) ++CFFTW parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) ++CFFTW ++CFFTW integer FFTW_THREADSAFE ++CFFTW parameter (FFTW_THREADSAFE=128) ++CFFTW ++ ++c intitialize system variables: temperature,pressure,ensemble key ++c force key, cutoff, primary cutoff, verlet shell width, relative ++c dielectric constant,timestep,temperature scaling flag, ++c temp scaling interval ++ ++ mode=0 ++ nhko=0 ++ nlatt=0 ++ nsteql=0 ++ nstrun=0 ++ minstp=0 ++ keybpd=0 ++ keyres=0 ++ keyens=0 ++ keyver=0 ++ taut=0.d0 ++ nstbts=0 ++ nstbgr=0 ++ nsbzdn=0 ++ nstbpo=100 ++ nstack=mxstak ++ intsta=0 ++ nstraj=0 ++ istraj=1 ++ keytrj=0 ++ numgau=1 ++ alpha=0.d0 ++ kmax1=0 ++ kmax2=0 ++ kmax3=0 ++ nospl=min(8,mxspl) ++ isolva=1 ++ nsolva=0 ++ niswitch=0 ++ nswitch=0 ++ nofic=1000 ++ ++ fmax=1000.d0 ++ keyfce=0 ++ multt=1 ++ keytol=0 ++ tstep=0.d0 ++ temp=0.d0 ++ press=0.d0 ++ rcut=0.d0 ++ rprim=0.d0 ++ rvdw=0.d0 ++ delr=0.d0 ++ epsq=1.d0 ++ rlxtol=1.d0 ++ opttol=1.d0 ++ tolnce=1.d-8 ++ quattol=1.d-8 ++ timjob=0.d0 ++ timcls=0.d0 ++ delrdf=0.d0 ++ delzdn=0.d0 ++ zlen=0.d0 ++ ehit=0.d0 ++ xhit=0.d0 ++ yhit=0.d0 ++ zhit=0.d0 ++ vmin=0.d0 ++ ebias=0.d0 ++ catchrad=0.d0 ++ pfree=0.d0 ++ ++ lhit=.false. ++ lbpd=.false. ++ ltad=.false. ++ lneb=.false. ++ loop=.true. ++ lnfic=.false. ++ lpsoc=.false. ++ lzero=.false. ++ ltscal=.false. ++ lewald=.false. ++ lspme=.false. ++ lhke=.false. ++ lgofr=.false. ++ lpgr=.false. ++ lzeql=.true. ++ loptim=.false. ++ lminim=.false. ++ lminopt=.false. ++ ltraj=.false. ++ lfcap=.false. ++ ltemp=.false. ++ lstep=.false. ++ lcut=.false. ++ ldelr=.false. ++ lprim=.false. ++ lforc=.false. ++ lens=.false. ++ lvdw=.false. ++ lrvdw=.false. ++ lpres=.false. ++ kill=.false. ++ lnsq=.false. ++ lzden=.false. ++ nolink=.false. ++ newgau=.false. ++ prechk=.false. ++ tadall=.false. ++ lsolva=.false. ++ lfree=.false. ++ lfrmas=.false. ++ lexcite=.false. ++ lswitch=.false. ++ lghost=.false. ++ nebgo=.true. ++ seek='all ' ++ ++c open the simulation input file ++ ++ if(idnode.eq.0)open(nread,file='CONTROL',status='old') ++ ++c read job title ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ ++ call copystring(record,sysname,80) ++ if(idnode.eq.0)then ++ ++ write(nrite,"(3(1x,120('*'),/),1x,15('*'),5x,80a1,5x,15('*'),/, ++ x 3(1x,120('*'),/),/,/,1x,'SIMULATION CONTROL PARAMETERS',/)") ++ x sysname ++ ++ endif ++ ++c read and process directives from CONTROL file ++ ++ do while(loop) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ ++c convert to lowercase and strip out leading blanks ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.' ')then ++ ++c record is commented out ++ cycle ++ ++ elseif(findstring('redirect',directive,idum))then ++ ++c ignore this option in this context ++ cycle ++ ++ elseif(findstring('steps',directive,idum))then ++ ++c number of timesteps ++ ++ nstrun=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'selected number of timesteps',3x,i10)")nstrun ++ ++ elseif(findstring('integ',directive,idum))then ++ ++c choice of integration algorithm ++ ++ if(findstring('leapfrog',directive,idum))then ++ ++ keyver=0 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'leapfrog verlet integration selected')") ++ ++ elseif(findstring('velocity',directive,idum))then ++ ++ keyver=1 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'velocity verlet integration selected')") ++ ++ endif ++ ++ elseif(findstring('no fic',directive,idum))then ++ ++c cancel possible "flying ice cube" in Berendsen thermostats ++ ++ lnfic=.true. ++ nofic=intstr(directive,lenrec,idum) ++ ++ elseif(findstring('shells',directive,idum).and. ++ x findstring('on',directive,idum).and. ++ x findstring('cores',directive,idum))then ++ ++c put shells on cores at start - shell model only (else null) ++ ++ lpsoc=.true. ++ ++ elseif(findstring('densvar',directive,idum))then ++ ++c specify allowed density variation ++ ++ densvar=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'allowed density variation ',3x,1p,e12.4)") ++ x densvar ++ ++ elseif(findstring('no link',directive,idum))then ++ ++c switch off link cell option ++ ++ nolink=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'link cells option deactivated')") ++ ++ elseif(findstring('equil',directive,idum))then ++ ++c number of equilibration timesteps ++ ++ nsteql=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'equilibration period ',3x,i10)")nsteql ++ ++ elseif(findstring('restart',directive,idum))then ++ ++c restart control ++ ++ if(findstring('noscale',directive,idum))then ++ ++ keyres=3 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'noscale restart requested')") ++ ++ elseif(findstring('scale',directive,idum))then ++ ++ keyres=2 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'scaled restart requested')") ++ ++ else ++ ++ keyres=1 ++ if(idnode.eq.0)write(nrite,"(/,1x,'restart requested')") ++ ++ endif ++ ++ elseif(findstring('ensemble',directive,idum))then ++ ++c ensemble selection ++ ++ call ensemble_selection(directive,lens,kill,idnode,keyens, ++ x mode,taut,taup) ++ ++ elseif(findstring('regauss',directive,idum))then ++ ++c re-initialise velocities option (regaussing) ++ ++ newgau=.true. ++ numgau=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'regaussing option activated', ++ x /,1x,'regaussing interval set to ',3x,i10)") ++ x numgau ++ ++ elseif(findstring('scale',directive,idum))then ++ ++ nstbts=intstr(directive,lenrec,idum) ++ if(nstbts.gt.0)then ++ ltscal=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'temperature scaling on' ++ x /,1x,'temperature scaling interval',3x,i10)") ++ x nstbts ++ ++ endif ++ ++ elseif(findstring('rdf',directive,idum))then ++ ++ if(findstring('print',directive,idum))then ++ ++ lpgr=.true. ++ lpgr=(lgofr.and.lpgr) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'g(r) printing option on ')") ++ ++ else ++ ++ lgofr=.true. ++ nstbgr=intstr(directive,lenrec,idum) ++ delrdf=dblstr(directive,lenrec,idum) ++ if(nstbgr.eq.0)nstbgr=10 ++ if(delrdf.lt.1.d-8)delrdf=0.05d0 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'radial distribution functions on ', ++ x /,1x,'g(r) collection interval ',3x,i10)")nstbgr ++ write(nrite, ++ x "(1x,'g(r) bin width ',3x,1p,e12.4)") ++ x delrdf ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('zden',directive,idum))then ++ ++ lzden=.true. ++ nsbzdn=intstr(directive,lenrec,idum) ++ delzdn=dblstr(directive,lenrec,idum) ++ zlen=dblstr(directive,lenrec,idum) ++ if(nsbzdn.eq.0)nsbzdn=10 ++ if(delzdn.lt.1.d-8)then ++ zlen=0.1d0*dble(mxzdn) ++ delzdn=0.1d0 ++ elseif(zlen.lt.1.d-8)then ++ zlen=delzdn*dble(mxzdn) ++ endif ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'Z density profile requested', ++ x /,1x,'zdensity collection interval',3x,i10)")nsbzdn ++ write(nrite, ++ x "(1x,'zdensity bin width ',3x,1p,e12.4)") ++ x delzdn ++ write(nrite, ++ x "(1x,'zdensity range ',3x,1p,e12.4)") ++ x zlen ++ ++ endif ++ ++ elseif(findstring('collect',directive,idum))then ++ ++ lzeql=.false. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'equilibration included in overall averages')") ++ ++ elseif(findstring('neb',directive,idum))then ++ ++c activate nudged elastic band option ++ ++ call neb_option(directive,lneb,lminopt,idnode, ++ x numneb,keytol,sprneb,opttol,hyp_units) ++ ++ elseif(findstring('impact',directive,idum))then ++ ++c activate the impact option ++ ++ if(lhit)call error(idnode,516) ++ lhit=.true. ++ khit=intstr(directive,lenrec,idum) ++ nhit=intstr(directive,lenrec,idum) ++ ehit=dblstr(directive,lenrec,idum) ++ xhit=dblstr(directive,lenrec,idum) ++ yhit=dblstr(directive,lenrec,idum) ++ zhit=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,1x,'impact option selected')") ++ write(nrite,"( ++ x /,1x,'identity of impact atom ',i10, ++ x /,1x,'time step of impact ',i10, ++ x /,1x,'impact recoil energy (keV) ',1p,e12.4, ++ x /,1x,'impact direction (x component) ',1p,e12.4, ++ x /,1x,'impact direction (y component) ',1p,e12.4, ++ x /,1x,'impact direction (z component) ',1p,e12.4)") ++ x khit,nhit,ehit,xhit,yhit,zhit ++ ++ endif ++ ++c convert impact energy from keV to internal units ++ ++ ehit=ehit*9648530.821d0 ++ ++ elseif(findstring('bpd',directive,idum))then ++ ++c activate the BPD option ++ ++ call bpd_option(directive,seek,lbpd,ltad,lminopt,prechk, ++ x nebgo,keybpd,idnode,nblock,ntrack,keytol,ebias,vmin, ++ x catchrad,sprneb,opttol,hyp_units) ++ ++ elseif(findstring('tad',directive,idum))then ++ ++c activate temperature accelerated dynamics option ++ ++ call tad_option(directive,ltad,lbpd,lminopt,prechk,tadall, ++ x idnode,nblock,ntrack,blkout,keytol,catchrad,sprneb,tlow, ++ x deltad,opttol,hyp_units) ++ ++ elseif(findstring('minim',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ if(findstring('forc',directive,idum))keytol=0 ++ if(findstring('ener',directive,idum))keytol=1 ++ if(findstring('posi',directive,idum))keytol=2 ++ hyp_units=energy_unit() ++ minstp=intstr(directive,lenrec,idum) ++ opttol=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ lminim=.true. ++ loptim=.false. ++ lzero=.false. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'minimisation programme requested')") ++ write(nrite, ++ x "(1x,'structure minimisation interval ', ++ x 3x,i10)")minstp ++ call print_optim(keytol) ++ write(nrite, ++ x "(1x,'structure minimisation tolerance', ++ x 3x,1p,e12.4,1x,a8)")opttol,cunit ++ ++ endif ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ elseif(findstring('optim',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ if(findstring('forc',directive,idum))keytol=0 ++ if(findstring('ener',directive,idum))keytol=1 ++ if(findstring('posi',directive,idum))keytol=2 ++ hyp_units=energy_unit() ++ opttol=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ loptim=.true. ++ lminim=.false. ++ lzero=.false. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'structure optimisation requested')") ++ call print_optim(keytol) ++ write(nrite, ++ x "(1x,'tolerance for structure optimisation ', ++ x 3x,1p,e12.4,1x,a8)")opttol,cunit ++ ++ endif ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ elseif(findstring('zero',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ temp=1.d0 ++ lzero=.true. ++ loptim=.false. ++ lminim=.false. ++ ltemp=.true. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'zero K optimisation requested')") ++ write(nrite, ++ x "(' temperature reset to',1p,e12.4)")1.d0 ++ ++ endif ++ ++ else if(findstring('solva',directive,idum))then ++ ++ call solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++ else if(findstring('decomp',directive,idum))then ++ ++ call solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++ elseif(findstring('metafreeze',directive,idum).or. ++ x findstring('metadyn',directive,idum))then ++ ++c activate metadynamics option - d. quigley ++ ++ call metadyn_option ++ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, ++ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, ++ x locpe_scale,ref_W_aug,h_aug,wt_Dt) ++ ++ else if(findstring('free',directive,idum))then ++ ++ call free_energy_option(directive,lfree,lfrmas,idnode) ++ ++ else if(findstring('excite',directive,idum))then ++ ++ call excitation_option ++ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) ++ ++ else if(findstring('switch',directive,idum))then ++ ++ call switching_option ++ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) ++ ++ elseif(findstring('print',directive,idum))then ++ ++ nstbpo=intstr(directive,lenrec,idum) ++ nstbpo=max(nstbpo,1) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'data printing interval ',3x,i10)")nstbpo ++ ++ elseif(findstring('stack',directive,idum))then ++ ++ nstack=intstr(directive,lenrec,idum) ++ ++c reset stack limit if too large ++ ++ nstack=min(nstack,mxstak) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'data stacking interval ',3x,i10)")nstack ++ ++ elseif(findstring('stats',directive,idum))then ++ ++ intsta=intstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'statistics file interval ',3x,i10)")intsta ++ ++ elseif(findstring('traj',directive,idum))then ++ ++ ltraj=.true. ++ nstraj=intstr(directive,lenrec,idum) ++ istraj=max(intstr(directive,lenrec,idum),1) ++ keytrj=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'trajectory file option on ', ++ x /,1x,'trajectory file start ',3x,i10, ++ x /,1x,'trajectory file interval ',3x,i10 ++ x /,1x,'trajectory file info key ',3x,i10)") ++ x nstraj,istraj,keytrj ++ ++ elseif(findstring('ewald',directive,idum).or. ++ x findstring('spme',directive,idum).or. ++ x findstring('hke',directive,idum))then ++ ++c read Ewald or HK-Ewald or SPM-Ewald sum parameters ++ ++ call ewald_selection(directive,lhke,lspme,lewald,lcut, ++ x lforc,kill,idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2, ++ x kmax3,alpha,rcut) ++ ++ elseif(findstring('distan',directive,idum))then ++ ++ keyfce=4 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Distance dependent dielectric')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('coul',directive,idum))then ++ ++ keyfce=6 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Coulombic potential')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('shift',directive,idum))then ++ ++ keyfce=8 ++ alpha=0.d0 ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Shifted Coulombic potential')") ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(.not.lcut)then ++ call error(idnode,-435) ++ kill=.true. ++ else ++ ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(1x,'Specified precision parameter : ',1p, ++ x e12.4)")eps ++ write(nrite, ++ x "(1x,'Calculated damping parameter: ',1p, ++ x e12.4)")alpha ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('damp',directive,idum))then ++ ++ alpha=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(1x,'Specified damping parameter : ',1p,e12.4)") ++ x alpha ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('reaction',directive,idum))then ++ ++ keyfce=10 ++ alpha=0.d0 ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : reaction field')") ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(.not.lcut)then ++ call error(idnode,-435) ++ kill=.true. ++ else ++ ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(1x,'Specified precision parameter : ',1p, ++ x e12.4)")eps ++ write(nrite, ++ x "(1x,'Calculated damping parameter: ',1p, ++ x e12.4)")alpha ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('damp',directive,idum))then ++ ++ alpha=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(1x,'Specified damping parameter : ',1p,e12.4)") ++ x alpha ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('cap',directive,idum))then ++ ++ lfcap=.true. ++ fm=dblstr(directive,lenrec,idum) ++ if(fm.gt.0.d0)fmax=fm ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'force capping :',16x,1p,e12.4,' kT/A')")fmax ++ ++ elseif(findstring('no vdw',directive,idum))then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'short-range potential terms off')") ++ lvdw=.true. ++ ++ elseif(findstring('no elec',directive,idum))then ++ ++ keyfce=0 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'electrostatic potential terms off')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('mult',directive,idum))then ++ ++ multt=max(intstr(directive,lenrec,idum),1) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'multiple timestep interval ',3x,i10)")multt ++ ++ elseif(findstring('timestep',directive,idum))then ++ ++ lstep=.true. ++ tstep=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation timestep ',3x,1p,e12.4)")tstep ++ ++ elseif(findstring('temp',directive,idum))then ++ ++ ltemp=.true. ++ temp=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation temperature ',3x,1p,e12.4)")temp ++ ++ elseif(findstring('pres',directive,idum))then ++ ++ press=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation pressure (katm) ',3x,1p,e12.4)")press ++ ++c convert from katm to internal units of pressure ++ ++ press=press/prsunt ++ lpres=.true. ++ ++ elseif(findstring('prim',directive,idum))then ++ ++c primary cutoff ++ ++ lprim=.true. ++ rprim=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'primary neighbour cut off ',3x,1p,e12.4)")rprim ++ ++ elseif(findstring('rvdw',directive,idum))then ++ ++c cutoff for short range potentials ++ ++ rvdw=dblstr(directive,lenrec,idum) ++ lrvdw=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'real space cut off (vdw) ',3x,1p,e12.4)")rvdw ++ ++ elseif(findstring('delr',directive,idum))then ++ ++c Verlet shell width ++ ++ ldelr=.true. ++ delr=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'border width of Verlet shell',3x,1p,e12.4)")delr ++ ++ elseif(findstring('cut',directive,idum))then ++ ++c cutoff ++ ++ lcut=.true. ++ rcut=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'real space cut off ',3x,1p,e12.4)")rcut ++ ++ elseif(findstring('eps',directive,idum))then ++ ++c relative dielectric constant ++ ++ epsq=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'relative dielectric constant',3x,1p,e12.4)")epsq ++ ++ elseif(findstring('rlxtol',directive,idum))then ++ ++c force tolerance for shell relaxation ++ ++ rlxtol=max(rlxtol,dblstr(directive,lenrec,idum)) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for shell relaxn. ',3x,1p,e12.4)")rlxtol ++ ++ elseif(findstring('shake',directive,idum))then ++ ++c tolerance for shake ++ ++ tolnce=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for SHAKE ',3x,1p,e12.4)")tolnce ++ ++ elseif(findstring('quaternion',directive,idum))then ++ ++c tolerance for quaternion integration ++ ++ quattol=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for Quaternions ',3x,1p,e12.4)")quattol ++ ++ elseif(findstring('job time',directive,idum))then ++ ++c time for simulation (in seconds/minutes/hours/days or indefinite) ++ ++ if(findstring('indef',directive,idum))then ++ timjob=1.0d6*365.25d0*24.d0*60.d0*60.d0 ++ else ++ timjob=dblstr(directive,lenrec,idum) ++ if(findstring('m',directive,idum))then ++ timjob=6.0d1*timjob ++ elseif(findstring('h',directive,idum))then ++ timjob=3.6d3*timjob ++ elseif(findstring('d',directive,idum))then ++ timjob=8.64d4*timjob ++ endif ++ endif ++ ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'user allocated job time (',a1,') ',3x,f8.4)") ++ x hms,prntim ++ ++ elseif(findstring('close time',directive,idum))then ++ ++c time for winding up a job (in seconds) ++ ++ timcls=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'job closure time (s) ',3x,f8.3)")timcls ++ ++ elseif(findstring('all pairs',directive,idum))then ++ ++c full minimum image - N^2 interactions each timestep ++ ++ lnsq=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'All-pairs requested for electrostatics')") ++ ++ elseif(findstring('nospl',directive,idum))then ++ ++c set ewald_spme interpolation order ++ ++ nospl=intstr(directive,lenrec,idum) ++ ++ elseif(findstring('finish',directive,idum))then ++ ++c safe termination of reading CONTROL file ++ ++ loop=.false. ++ ++ else ++ ++c unrecognised directive in control file ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ enddo ++ ++c check on steps before temperature scaling ++ ++ if(nstbts.eq.0)nstbts=nstrun+1 ++ ++c conduct consistency checks on directives ++ ++ if(lminim)then ++ ++c ensure final configuration follows minimisation ++ ++ if(minstp.eq.0)minstp=nstrun ++ nstrun=minstp*(nstrun/minstp) ++ ++ endif ++ ++c check force activation options ++ ++ if(.not.lforc)then ++ ++c check if any forces are in operation ++ ++ if(.not.lvdw)then ++ ++ kill=.true. ++ call error(idnode,-383) ++ ++ endif ++ ++ else ++ ++c turn on short range forces ++ ++ if(lvdw)then ++ ++ if(keyfce.eq.0)then ++ ++ lcut=.true. ++ ldelr=.true. ++ ++ endif ++ ++ else ++ ++ keyfce=keyfce+1 ++ ++ endif ++ ++ endif ++ ++c if tad selected use only leap frog ++ ++ if(ltad.and.keyver.eq.1)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'switching to leapfrog for TAD dynamics')") ++ keyver=0 ++ ++ endif ++ ++c error checking ++ ++ if(lmetadyn.and.keyens.ne.3.and.keyens.ne.5.and.keyens.ne.7)then ++ ++ kill=.true. ++ call error(idnode,-2360) ++ ++ endif ++ ++ if(lsolva.or.lfree.or.lexcite.or.lswitch)then ++ ++ if(lspme)then ++ ++ kill=.true. ++ call error(idnode,-601) ++ ++ endif ++ ++ if(lhke)then ++ ++ kill=.true. ++ call error(idnode,-602) ++ ++ endif ++ ++ endif ++ ++ if(lghost.and.nstbgr.ne.isolva)then ++ ++ call warning(idnode,130,dble(isolva),0.d0,0.d0) ++ nstbgr=isolva ++ ++ endif ++ if(lfree.and.lgofr)then ++ ++ call warning(idnode,140,0.d0,0.d0,0.d0) ++ lgofr=.false. ++ lpgr=.false. ++ ++ endif ++ if(loptim)then ++ ++ temp=0.d0 ++ ++ elseif(.not.ltemp)then ++ ++ kill=.true. ++ call error(idnode,-380) ++ ++ endif ++ ++ if(.not.lstep)then ++ ++ kill=.true. ++ call error(idnode,-381) ++ ++ endif ++ ++ if(.not.lcut)then ++ ++ kill=.true. ++ call error(idnode,-382) ++ ++ endif ++ ++c check if van der Waals cutoff set ++ ++ if(.not.lrvdw.and.mod(keyfce,2).eq.1)then ++ ++ if(rcut.gt.0.d0)then ++ ++ rvdw=rcut ++ ++ else ++ ++ kill=.true. ++ call error(idnode,-402) ++ ++ endif ++ ++ endif ++ ++ if(.not.ldelr)then ++ ++ kill=.true. ++ call error(idnode,-384) ++ ++ endif ++ ++ if(multt.gt.1)then ++ ++ if(.not.lprim)then ++ ++ kill=.true. ++ call error(idnode,-385) ++ ++ elseif(rprim.gt.rcut)then ++ ++ kill=.true. ++ call error(idnode,-386) ++ ++ endif ++ ++ endif ++ ++c check settings in nvt ensemble ++ ++ if(keyens.ge.2.and.keyens.le.3)then ++ ++ if(taut.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-464) ++ ++ endif ++ ++ endif ++ ++c check settings in npt ensemble ++ ++ if(keyens.ge.4.and.keyens.le.7)then ++ ++ if(.not.lpres)then ++ ++ kill=.true. ++ call error(idnode,-387) ++ ++ endif ++ ++c check barostat and thermostat rates non zero ++ ++ if(taut.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-464) ++ ++ endif ++ if(taup.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-466) ++ ++ endif ++ ++ endif ++ ++c check multiple timestep cutoffs are sensible ++ ++ if(multt.gt.1)then ++ if(rcut-rprim.lt.delr)then ++ ++ kill=.true. ++ call error(idnode,-398) ++ ++ endif ++ endif ++ ++c check rcut > rvdw (for verlet list constructor) ++ ++ if(rcut.lt.rvdw)then ++ ++ kill=.true. ++ call error(idnode,-400) ++ ++ endif ++ ++c check spme is not being used with incorrect pbc ++ ++ if(lspme)then ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++ kill=.true. ++ call error(idnode,-513) ++ ++ endif ++ ++ endif ++ ++c check on all-pairs calculation request ++ ++ if(lnsq)then ++ ++ if(multt.eq.1)then ++ ++ kill=.true. ++ call error(idnode,-422) ++ ++ endif ++ ++ if(keyfce/2.lt.2.or.keyfce/2.gt.3)then ++ ++ kill=.true. ++ call error(idnode,-424) ++ ++ endif ++ ++ endif ++ ++c cancel rdf option if no vdw or coulombic forces ++ ++ if(lgofr.and.keyfce.eq.0)then ++ ++ lgofr=.false. ++ call warning(idnode,120,0.d0,0.d0,0.d0) ++ ++ endif ++ ++ if(kill)call abort_control_read(2,idnode,nread) ++ ++c close CONTROL file ++ ++ if(idnode.eq.0)close(nread) ++ ++ return ++ end subroutine simdef ++ ++ subroutine sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading in the molecular specifications ++c of the system to be simulated ++c version for rigid unit data and neutral groups ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith may 1992. ++c amended - w.smith march 1994 ++c amended - t.forester april 1994 ++c amended - w.smith dec 1994 - getrec etc ++c amended - a.smondyrev may 2000 - keydih=5 for ++c ryckaert-bellemans potential in dihedrals ++c amended - a.smondyrev may 2000 - keydih=6 for ++c fluorinated ryckaert-bellemans potential in dihedrals ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lunits,lmols,lneut,ltable,lnsq,lshl,safe,lpmf ++ logical loop1,loop2,lsolva,lfree,lexcite,lswitch,lghost ++ ++ integer idnode,keyfce,keyfld,natms,ngrp,ntpatm,ntpmls ++ integer ntpvdw,ntptbp,ntpmet,ntpfbp,nshels,ksite ++ integer nsite,nconst,nangle,ndihed,ninver,nbonds ++ integer nteth,nspmf,itmols,i,idum,keyver ++ integer ntpter,keyshl,iatm,natmsr,ntghost ++ ++ real(8) dlrpot,engunit,rvdw,rcuttb,rctter,rcutfb ++ real(8) sumchg ++ ++ data loop1/.true./,loop2/.true./ ++ ++c initialise system counters: atomic site index, number of ++c constraints, bond angles, dihedrals, inversions, chemical bonds, ++c unique atom types, total number of atoms, ++c total number of rigid groups, number of tethered atoms, ++c number of three body potentials ++ ++ nsite=0 ++ nconst=0 ++ nangle=0 ++ ndihed=0 ++ ninver=0 ++ nbonds=0 ++ ntpatm=0 ++ natms=0 ++ ngrp=0 ++ nteth=0 ++ ntptbp=0 ++ ntpter=0 ++ ntpmet=0 ++ ntpvdw=0 ++ ntpfbp=0 ++ nshels=0 ++ nspmf=0 ++ keyfld=0 ++ keyshl=0 ++ ntghost=0 ++ natmsr=0 ++ ntcons_ghost=0 ++ ++ lunits=.false. ++ lmols=.false. ++ lneut=.false. ++ ltable=.false. ++ lmetab=.false. ++ lshl=.false. ++ lpmf=.false. ++ engunit=1.d0 ++ ++ numbonds(:)=0 ++ numpmf(:)=0 ++ numcon(:)=0 ++ numdih(:)=0 ++ numinv(:)=0 ++ numgrp(:)=0 ++ numsit(:)=0 ++ numteth(:)=0 ++ numshl(:)=0 ++ npmf(:)=0 ++ indpmf(:)=0 ++ ++c open force field data file ++ ++ if(idnode.eq.0)open (nfield,file='FIELD',status='old') ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,'SYSTEM SPECIFICATION')") ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read and process directives from field file ++ ++ do while(loop1) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c convert to lowercase and remove leading blanks ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.' ')then ++ ++c record is commented out ++ cycle ++ ++ elseif(findstring('units',record,idum))then ++ ++c identify energy unit for input/output ++ ++ lunits=.true. ++ call define_units(idnode,engunit) ++ ++c neutral group control option ++ ++ elseif(findstring('neut',record,idum))then ++ ++ lneut=.true. ++ if(idnode.eq.0) ++ x write(nrite,"(/,' neutral group implementation in use')") ++ ++c can't have neutral groups with all-pairs ++ ++ if(lnsq)call error(idnode,426) ++ ++c specify molecular species ++ ++ elseif(findstring('molecu',record,idum))then ++ ++c number of molecular types ++ ++ if(lmols)call error(idnode,11) ++ lmols=.true. ++ ntpmls=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,1x,'number of molecular types',6x,i10)") ++ x ntpmls ++ ++ if(ntpmls.gt.mxtmls)call error(idnode,10) ++ ++c initialise total system charge ++ ++ sumchg=0.d0 ++ ++c read in molecular characteristics ++ ++ do itmols=1,ntpmls ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'molecular species type',9x,i10)") ++ x itmols ++ ++c name of molecular species ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++ call copystring(record,molnam(1,itmols),40) ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,1x,'name of species:',13x,40a1)") ++ x (molnam(i,itmols),i=1,40) ++ ++c stop processing if energy unit has not been specified ++ ++ if(.not.lunits)call error(idnode,6) ++ ++c read molecular data ++ ++ loop2=.true. ++ ++ do while(loop2) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ ++ ksite=0 ++ ++ if(findstring('nummol',record,idum))then ++ ++ nummols(itmols)=intstr(record,lenrec,idum) ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'number of molecules ', ++ x 10x,i10)")nummols(itmols) ++ ++ elseif(findstring('atoms',record,idum))then ++ ++c read in atomic details ++ ++ call define_atoms ++ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read core - shell spring parameters ++ ++ elseif(findstring('shell',record,idum))then ++ ++ lshl=.true. ++ call define_core_shell ++ x (safe,idnode,itmols,nshels,nsite,keyshl, ++ x engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read chemical bond force constant and bondlength ++ ++ elseif(findstring('bonds',record,idum))then ++ ++ call define_bonds ++ x (safe,idnode,itmols,nbonds,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read bond atom indices and constraint bondlength ++ ++ elseif(findstring('constr',record,idum))then ++ ++ call define_constraints ++ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read pmf bond atom indices, weights and constraint bondlength ++ ++ elseif(findstring('pmf',record,idum))then ++ ++ if(lpmf)call error(idnode,484) ++ lpmf=.true. ++ call define_pmf(safe,idnode,itmols,nspmf) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular angular potential parameters ++ ++ elseif(findstring('angles',record,idum))then ++ ++ call define_angles ++ x (safe,idnode,itmols,nangle,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular dihedral potential parameters ++ ++ elseif(findstring('dihedr',record,idum))then ++ ++ call define_dihedrals ++ x (safe,idnode,itmols,ndihed,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular inversion potential parameters ++ ++ elseif(findstring('invers',record,idum))then ++ ++ call define_inversions ++ x (safe,idnode,itmols,ninver,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read rigid body data ++ ++ elseif(findstring('rigid',record,idum))then ++ ++ call define_rigid_body ++ x (safe,lghost,idnode,itmols,ngrp,natmsr) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read tethered atom indices and tethering parameters ++ ++ elseif(findstring('teth',record,idum))then ++ ++ call define_tethers ++ x (safe,idnode,itmols,nteth,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c finish of data for one molecular type ++ ++ elseif(findstring('finish',record,idum))then ++ ++c running total of number of atoms in system ++ ++ natms=natms+nummols(itmols)*numsit(itmols) ++ if(natms.gt.mxatms)call error(idnode,75) ++ ++c check core-shell units are not both in same rigid body unit ++ ++ call check_shells(idnode,itmols,nshels,ngrp) ++ ++ loop2=.false. ++ ++ else ++ ++c error exit for unidentified directive in molecular data ++ ++ if(idnode.eq.0)write(nrite,'(12x,a)')record ++ call error(idnode,12) ++ ++ endif ++ ++ enddo ++ ++c construction of atmolt table for solvation calculation ++ ++ if(lsolva)then ++ ++ do iatm=natmsr+1,natms ++ atmolt(iatm)=itmols ++ enddo ++ natmsr=natms ++ ++ endif ++ ++ enddo ++ ++c construction of atm_fre table for free energy or excitation ++ ++ if(lfree.or.lexcite.or.lswitch)then ++ ++ atm_fre(:)=0 ++ if((ind_fre(1).ne.0).and.(ind_fre(2).ne.0))then ++ ++ do iatm=ind_fre(1),ind_fre(2) ++ atm_fre(iatm)=1 ++ enddo ++ ++ endif ++ ++ if((ind_fre(3).ne.0).and.(ind_fre(4).ne.0))then ++ ++ do iatm=ind_fre(3),ind_fre(4) ++ ++ atm_fre(iatm)=2 ++ if(lghost)ntghost=ntghost+1 ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c calculate system charge ++ ++ call check_syschg(idnode,ntpmls,sumchg) ++ ++c read in the nonbonded potential energy parameters ++ ++ elseif(findstring('vdw',record,idum))then ++ ++ call define_van_der_waals ++ x (safe,ltable,lunits,lmols,idnode,ntpvdw, ++ x ntpatm,keyfce,dlrpot,rvdw,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read in the metal potential energy parameters ++ ++ elseif(findstring('met',record,idum))then ++ ++ call define_metals ++ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rvdw,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read the three body potential energy parameters ++ ++ elseif(findstring('tbp',record,idum))then ++ ++ call define_three_body ++ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read the tersoff potential energy parameters ++ ++ elseif(findstring('tersoff',record,idum))then ++ ++ call define_tersoff ++ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read in the four body potential energy parameters ++ ++ elseif(findstring('fbp',record,idum))then ++ ++ call define_four_body ++ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, ++ x rcutfb,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read external field data ++ ++ elseif(findstring('extern',record,idum))then ++ ++ call define_external_field ++ x (safe,lunits,idnode,keyfld,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c normal end of FIELD file ++ ++ elseif(findstring('close',record,idum))then ++ ++ loop1=.false. ++ if(ntpvdw.eq.0.and.ntpmet.eq.0.and. ++ x mod(keyfce,2).eq.1)call error(idnode,145) ++ ++c error exit for unidentified directive ++ ++ else ++ ++ if(idnode.eq.0)write(nrite,'(100a)')record ++ call abort_field_read(2,idnode,nfield) ++ ++ endif ++ ++ enddo ++ ++c close force field file ++ ++ if(idnode.eq.0)close (nfield) ++ ++ ++ if(lshl.and.idnode.eq.0)then ++ ++ if(keyshl.eq.1)write(nrite, ++ x "(/,/,'adiabatic shell model in operation')") ++ ++ if(keyshl.eq.2)write(nrite, ++ x "(/,/,'relaxed shell model in operation')") ++ ++ endif ++ ++ if(lshl.and.keyshl.eq.0)call error(idnode,1951) ++ ++c if metadynamics and shell selected use only velocity verlet ++ ++ if(lshl.and.lmetadyn.and.keyver.eq.0)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'switching to velocity verlet for metadynamics')") ++ keyver=1 ++ ++ endif ++ ++ return ++ end subroutine sysdef ++ ++ subroutine sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading the configuration data file ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 atname(8) ++ ++ logical loglnk,safe,lneut,nolink,lfree,lfrmas ++ integer idnode,imcon,keyens,keyfce,keyres,levcfg,multt ++ integer ntpmls,i,indatm,indnam,indneu,k,ilx,ily,ilz ++ integer m,l,ncells,idum,mxnode ++ real(8) delr,rcut,volm,xcoord,ycoord,zcoord,totmas,xveloc ++ real(8) yveloc,zveloc,xforce,yforce,zforce,axx,rt3,xhi,yhi,zhi ++ real(8) width,dum1,dum2,test,com(3) ++ ++c open the system input file ++ ++ if(idnode.eq.0)open (nconf,file='CONFIG') ++ ++c read the CONFIG file header ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ ++ call copystring(record,cfgname,80) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'configuration file name: ',/,/,10x,80a1)")cfgname ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ ++ levcfg=intstr(record,lenrec,idum) ++ imcon=intstr(record,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'selected image convention',6x,i10)")imcon ++ ++c check config file contents for consistent data ++ ++ if((imcon.eq.0.or.imcon.eq.6).and. ++ x (keyfce/2.eq.1.or.keyfce/2.eq.6)) ++ x call error(idnode,180) ++ ++ if(imcon.eq.0.and.(.not.lneut).and.(keyfce.gt.1) ++ x .and.(multt.eq.1))call warning(idnode,30,0.d0,0.d0,0.d0) ++ ++ if(imcon.eq.0.and.(keyens.ge.4.and.keyens.le.7)) ++ x call error(idnode,390) ++ if(imcon.le.2.and.(keyens.eq.6.or.keyens.eq.7))imcon=3 ++ if(keyres.gt.0.and.levcfg.lt.1)call error(idnode,85) ++ ++c specify molecular dynamics simulation cell ++ ++ if(imcon.eq.0)then ++ ++c if no periodic boundaries - set zero values for cell ++c vectors and cell volume ++ ++ cell(:)=0.d0 ++ volm=0.d0 ++ ++ else ++ ++c read cell vectors ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(1)=dblstr(record,lenrec,idum) ++ cell(2)=dblstr(record,lenrec,idum) ++ cell(3)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(4)=dblstr(record,lenrec,idum) ++ cell(5)=dblstr(record,lenrec,idum) ++ cell(6)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(7)=dblstr(record,lenrec,idum) ++ cell(8)=dblstr(record,lenrec,idum) ++ cell(9)=dblstr(record,lenrec,idum) ++ ++ endif ++ ++c read the atomic coordinates ++ ++ indatm=0 ++ indnam=0 ++ indneu=0 ++ safe=.true. ++ ++ do k=1,ntpmls ++ ++ do l=1,nummols(k) ++ ++ do m=1,numsit(k) ++ ++ indatm=indatm+1 ++ ++ if(indatm.gt.mxatms)call error(idnode,45) ++ ++ xxx(indatm)=0.d0 ++ yyy(indatm)=0.d0 ++ zzz(indatm)=0.d0 ++ vxx(indatm)=0.d0 ++ vyy(indatm)=0.d0 ++ vzz(indatm)=0.d0 ++ fxx(indatm)=0.d0 ++ fyy(indatm)=0.d0 ++ fzz(indatm)=0.d0 ++ ++ if(idnode.eq.0)then ++ ++ if(levcfg.eq.0)then ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ ++ elseif(levcfg.eq.1)then ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc ++ ++ else ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc ++ read(nconf,'(3f20.0)',end=100)xforce,yforce,zforce ++ ++ endif ++ ++c strip blanks off atom name ++ ++ call strip(atname,8) ++ ++ if(sitnam(indnam+m).eq.mkwd8(atname))then ++ ++ xxx(indatm)=xcoord ++ yyy(indatm)=ycoord ++ zzz(indatm)=zcoord ++ ++ if(levcfg.gt.0)then ++ ++ vxx(indatm)=xveloc ++ vyy(indatm)=yveloc ++ vzz(indatm)=zveloc ++ ++ endif ++ ++ if(levcfg.gt.1)then ++ ++ fxx(indatm)=xforce ++ fyy(indatm)=yforce ++ fzz(indatm)=zforce ++ ++ endif ++ ++ else ++ ++ write(nrite,"(/,/,'unidentified atom label :',8a1, ++ x ': atom number ',i5)")atname,indatm ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ call gstate(safe) ++ if(.not.safe)call error(idnode,25) ++ ++ ltype(indatm)=ltpsit(indnam+m) ++ weight(indatm)=wgtsit(indnam+m) ++ chge(indatm)=chgsit(indnam+m) ++ atmnam(indatm)=sitnam(indnam+m) ++ lstfrz(indatm)=lfzsit(indnam+m) ++ if(lneut)lstneu(indatm)=nugrp(indnam+m)+indneu ++ ++c reset atomic masses according to free energy definitions ++ ++ if(lfree)then ++ ++ weight_sav(indatm)=weight(indatm) ++ ++ if(lfrmas)then ++ ++ if(indatm.ge.ind_fre(1).and.indatm.le.ind_fre(2))then ++ weight(indatm)=lambda1*weight(indatm) ++ elseif(indatm.ge.ind_fre(3).and.indatm.le.ind_fre(4)) ++ x then ++ weight(indatm)=lambda2*weight(indatm) ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ indneu=indneu+nugrp(indnam+numsit(k)) ++ ++ enddo ++ ++ indnam=indnam+numsit(k) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ call gdsum(xxx,indatm,buffer) ++ call gdsum(yyy,indatm,buffer) ++ call gdsum(zzz,indatm,buffer) ++ ++ if(levcfg.gt.0)then ++ ++ call gdsum(vxx,indatm,buffer) ++ call gdsum(vyy,indatm,buffer) ++ call gdsum(vzz,indatm,buffer) ++ ++ endif ++ ++ if(levcfg.gt.1)then ++ ++ call gdsum(fxx,indatm,buffer) ++ call gdsum(fyy,indatm,buffer) ++ call gdsum(fzz,indatm,buffer) ++ ++ endif ++ ++ endif ++ ++c check integrity of cell vectors : for cubic, TO and RD cases ++c ie. cell(1)=cell(5)=cell(9) (or cell(9)/sqrt(2) for RD) ++ ++ if((imcon.eq.1).or.(imcon.eq.4).or.(imcon.eq.5))then ++ ++ axx=(abs(cell(1))+abs(cell(5)))/2.d0 ++ test=1.d-8*axx ++ if(abs(cell(1)-axx).gt.test)call error(idnode,410) ++ if(abs(cell(5)-axx).gt.test)call error(idnode,410) ++ if(imcon.eq.5)then ++ if(abs(cell(9)-axx*sqrt(2.d0)).gt.test) ++ x call error(idnode,410) ++ else ++ if(abs(cell(9)-axx).gt.test)call error(idnode,410) ++ endif ++ ++ endif ++ ++c check integrity of hexagonal prism cell vectors ++ ++ if(imcon.eq.7)then ++ ++ rt3=sqrt(3.d0) ++ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) ++ x call error(idnode,410) ++ ++ endif ++ ++c check 2D PBC for imcon=6 ++ ++ if(imcon.eq.6)then ++ ++ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) ++ ++ endif ++ ++c check for diagonal cell matrix if appropriate ++ ++ if((imcon.eq.1).or.(imcon.eq.2).or.(imcon.eq.4).or. ++ x (imcon.eq.5).or.(imcon.eq.7))then ++ ++ if(abs(cell(2)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(4)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) ++ ++ endif ++ ++c put centre of mass at centre of coordinates if imcon=0 ++ ++ if(imcon.eq.0)then ++ ++ totmas=getmass(indatm,idnode,mxnode) ++ call getcom(indatm,idnode,mxnode,totmas,com) ++ ++ do i=1,indatm ++ ++ xxx(i)=xxx(i)-com(1) ++ yyy(i)=yyy(i)-com(2) ++ zzz(i)=zzz(i)-com(3) ++ ++ enddo ++ ++ endif ++ ++c set widths if unset - needed for check on link cells below ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++ xhi=abs(xxx(1)) ++ yhi=abs(yyy(1)) ++ zhi=abs(zzz(1)) ++ do i=2,indatm ++ ++ xhi=max(xhi,abs(xxx(i))) ++ yhi=max(yhi,abs(yyy(i))) ++ zhi=max(zhi,abs(zzz(i))) ++ ++ enddo ++ if(imcon.eq.0)then ++ ++ cell(1)=max(2.d0*xhi+rcut+delr,3.d0*(rcut+delr)) ++ cell(5)=max(2.d0*yhi+rcut+delr,3.d0*(rcut+delr)) ++ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) ++ ++ endif ++ ++ if(imcon.eq.6.and.cell(9).lt.1.d-6)then ++ ++ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) ++ ++ endif ++ ++ endif ++ ++c calculate dimensional properties of simulation cell ++ ++ call dcell(cell,celprp) ++ ++ if(imcon.eq.0)then ++ ++ volm=0.d0 ++ ++ elseif(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ else ++ ++ volm=celprp(10) ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,/,1x,'simulation cell vectors'/,/)") ++ write(nrite,"(21x,3f12.6)")cell ++ ++ write(nrite, ++ x "(/,/,1x,'system volume ',2x,1p,g22.12)")volm ++ ++ endif ++ ++c check value of cutoff and reset if necessary ++ ++ if(imcon.gt.0)then ++ ++ width=min(celprp(7),celprp(8),celprp(9))/2.d0 ++ if(imcon.eq.4)width=sqrt(3.d0)*cell(1)/4.d0 ++ if(imcon.eq.5)width=cell(1)/2.d0 ++ if(imcon.eq.6)width=min(celprp(7),celprp(8))/2.d0 ++ ++c halt program if potential cutoff exceeds cell width ++ ++ if(rcut.gt.width)call error(idnode,95) ++ ++ endif ++ ++c decide on whether to use link cells for verlet list constructor ++ ++ if(nolink)then ++ ++ loglnk=.false. ++ ++ else ++ ++ loglnk=.true. ++ ++ ilx=int(celprp(7)/(rcut+delr)) ++ ily=int(celprp(8)/(rcut+delr)) ++ ilz=int(celprp(9)/(rcut+delr)) ++ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. ++ ncells=ilx*ily*ilz ++ if(lneut.and.ncells.le.36)loglnk=.false. ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. ++ if(loglnk.and.ncells.gt.mxcell)then ++ ++ dum1=dble(ncells) ++ dum2=dble(mxcell) ++ call warning(idnode,90,dum1,dum2,dum2) ++ loglnk=.false. ++ ++ endif ++ ++ endif ++ ++ if(loglnk.and.idnode.eq.0) ++ x write(nrite,"(/,/,' link cell algorithm in use')") ++ ++ if(idnode.eq.0)close (nconf) ++ ++c ensure PBC compliance of starting structure ++ ++ if(keyres.eq.0.and.imcon.gt.0)then ++ ++ call images(imcon,idnode,mxnode,indatm,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,indatm,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ return ++ ++c error exit for config file read ++ ++ 100 call abort_config_read(2,idnode,nconf) ++ ++ end subroutine sysgen ++ ++ subroutine sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading the REVIVE file data and ++c defining the initial thermodynamic and structural accumulators. ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c adapted - d. quigley nov 2010, metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzden,lfree,lsolva,lghost,lpsoc ++ integer idnode,imcon,keyfce,keyres,mxnode,natms,nstep,numacc ++ integer numrdf,ntpatm,nzden,i,j,k,ntpmet,ntshl,ntpvdw ++ real(8) chip,chit,conint,elrc,engunit,virlrc,rvdw,volm ++ real(8) dnumrd,dnstep,dnumac,dnzden,virtot,vircom,tboost ++ real(8) chit_shl ++ ++c read or initialise accumulator arrays ++ ++ if(keyres.eq.1.and.idnode.eq.0)then ++ ++c read accumulator data from dump file ++ ++ open(nrest,file='REVOLD',form='unformatted') ++ ++ read(nrest) dnstep,dnumac,dnumrd,chit,chip,conint,dnzden, ++ x tboost,chit_shl ++ read(nrest) virtot,vircom,eta,strcns,strbod ++ read(nrest) stpval ++ read(nrest) sumval ++ read(nrest) ssqval ++ read(nrest) zumval ++ read(nrest) ravval ++ read(nrest) stkval ++ read(nrest) xx0,yy0,zz0 ++ read(nrest) xxs,yys,zzs ++ ++ if(lgofr) read(nrest)rdf ++ if(lzden) read(nrest)zdens ++ ++ nstep=nint(dnstep) ++ numacc=nint(dnumac) ++ numrdf=nint(dnumrd) ++ nzden=nint(dnzden) ++ close (nrest) ++ ++ else ++ ++c initialise step counters ++ ++ nstep=0 ++ numacc=0 ++ numrdf=0 ++ nzden=0 ++ ++c initialise temperature and pressure coupling parameters ++c and integral for conserved quantity ++ ++ chit=0.d0 ++ chip=0.d0 ++ conint=0.d0 ++ virtot=0.d0 ++ vircom=0.d0 ++ chit_shl=0.d0 ++ do i=1,9 ++ ++ eta(i)=0.d0 ++ strcns(i)=0.d0 ++ strbod(i)=0.d0 ++ ++ enddo ++ ++c initialise accumulator arrays ++ ++ do i=1,mxnstk ++ ++ stpval(i)=0.d0 ++ sumval(i)=0.d0 ++ ssqval(i)=0.d0 ++ zumval(i)=0.d0 ++ ravval(i)=0.d0 ++ ++ enddo ++ ++ do i=1,mxatms ++ ++ xx0(i)=0.d0 ++ yy0(i)=0.d0 ++ zz0(i)=0.d0 ++ xxs(i)=0.d0 ++ yys(i)=0.d0 ++ zzs(i)=0.d0 ++ ++ enddo ++ ++ do j=1,mxnstk ++ ++ do i=1,mxstak ++ ++ stkval(i,j)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ if(lgofr)then ++ ++ do i=1,mxxtyp ++ ++ do j=1,mxrdf ++ ++ rdf(j,i)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(lzden)then ++ ++ do i=1,mxatyp ++ ++ do j=1,mxzdn ++ zdens(j,i)=0.d0 ++ enddo ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c put shells on cores at start ++ ++ if(lpsoc.and.keyres.ne.1.and.ntshl.gt.0) ++ x call put_shells_on_cores(idnode,mxnode,ntshl) ++ ++c if restart then broadcast stored variables via a global sum ++ ++ if(keyres.eq.1.and.mxnode.gt.1)then ++ ++ if(mxbuff.lt.natms.or.mxbuff.lt.mxnstk*mxstak) ++ x call error(idnode,186) ++ ++ buffer(1)=chit ++ buffer(2)=chip ++ buffer(3)=conint ++ buffer(4)=dble(nstep) ++ buffer(5)=dble(numacc) ++ buffer(6)=dble(numrdf) ++ buffer(7)=dble(nzden) ++ buffer(8)=tboost ++ buffer(9)=virtot ++ buffer(10)=vircom ++ buffer(11)=chit_shl ++ call gdsum(buffer(1),11,buffer(12)) ++ chit=buffer(1) ++ chip=buffer(2) ++ conint=buffer(3) ++ nstep=nint(buffer(4)) ++ numacc=nint(buffer(5)) ++ numrdf=nint(buffer(6)) ++ nzden=nint(buffer(7)) ++ tboost=buffer(8) ++ virtot=buffer(9) ++ vircom=buffer(10) ++ chit_shl=buffer(11) ++ ++ call gdsum(eta,9,buffer) ++ call gdsum(strcns,9,buffer) ++ call gdsum(strbod,9,buffer) ++ call gdsum(stpval,mxnstk,buffer) ++ call gdsum(sumval,mxnstk,buffer) ++ call gdsum(ssqval,mxnstk,buffer) ++ call gdsum(zumval,mxnstk,buffer) ++ call gdsum(ravval,mxnstk,buffer) ++ call gdsum(stkval,mxnstk*mxstak,buffer) ++ call gdsum(xx0,natms,buffer) ++ call gdsum(yy0,natms,buffer) ++ call gdsum(zz0,natms,buffer) ++ call gdsum(xxs,natms,buffer) ++ call gdsum(yys,natms,buffer) ++ call gdsum(zzs,natms,buffer) ++ ++c for rdf table - broadcast and normalise ++ ++ if(lgofr)then ++ ++ do k=1,mxxtyp ++ ++ call gdsum(rdf(1,k),mxrdf,buffer) ++ ++ do j=1,mxrdf ++ rdf(j,k)=rdf(j,k)/dble(mxnode) ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(lzden)then ++ ++ do k=1,mxatyp ++ ++ call gdsum(zdens(1,k),mxzdn,buffer) ++ ++ do j=1,mxzdn ++ zdens(j,k)=zdens(j,k)/dble(mxnode) ++ enddo ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c number densities and long-range corrections ++ ++ elrc=0.d0 ++ virlrc=0.d0 ++ ++ if(imcon.eq.0.or.imcon.eq.6)volm=4.d0*pi/3.d0*rvdw**3 ++ ++ call lrcorrect ++ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, ++ x ntpatm,ntpvdw,elrc,engunit,virlrc,rvdw,volm) ++ ++ if(lmetab.or.ntpmet.eq.0)then ++ ++ elrcm(0)=0.d0 ++ vlrcm(0)=0.d0 ++ ++ else ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++ if(imcon.eq.0.or.imcon.eq.6)volm=0.d0 ++ ++ return ++ end subroutine sysinit ++ ++ subroutine systemp ++ x (idnode,imcon,keyres,mxnode,natms,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for setting the initial system temperature ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,keyres,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,ntshl,levcfg,i,io,k,keyshl ++ real(8) degfre,degshl,degrot,temp,tolnce,sigma,rsq ++ ++c number of degrees of freedom ++c 3 for com translation ++c 3 for angular momentum about origin (non-periodic systems only) ++ ++ degfre=dble(3*(ntfree-ntshl)-3-ntcons)+degfre ++ if(imcon.eq.0.or.imcon.eq.6)degfre=degfre-3.0d0 ++ if(imcon.eq.0.or.imcon.eq.6)degrot=max(0.d0,degrot-3.0d0) ++ degshl=dble(3*ntshl) ++ ++c lose one degree of freedom if temperature constrained ++c gaussian constraints ++ ++c if(keyens.eq.1)degfre=degfre-1.d0 ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,' total degrees of freedom ',f20.0,/, ++ x ' rotational degrees of freedom ',f20.0,/, ++ x ' shell pseudo degrees of freedom',f20.0)") ++ x degfre,degrot,degshl ++ if(degfre.lt.1.d0)call error(idnode,350) ++ ++c define reciprocal masses of atoms ++ ++ do i=1,natms ++ ++ if(lstfrz(i).ne.0.or.weight(i).lt.1.d-6)then ++ ++ rmass(i)=0.d0 ++ weight(i)=0.d0 ++ ++ else ++ ++ rmass(i)=1.d0/weight(i) ++ ++ endif ++ ++ enddo ++ ++c generate starting velocities ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++ if(keyres.eq.0)then ++ ++ call gauss(natms,vxx,vyy,vzz) ++ ++ do i=1,natms ++ ++ rsq=sqrt(rmass(i)) ++ vxx(i)=vxx(i)*rsq ++ vyy(i)=vyy(i)*rsq ++ vzz(i)=vzz(i)*rsq ++ ++ enddo ++ ++ if(ntcons.gt.0)call quench ++ x (imcon,idnode,mxnode,natms,nscons,tolnce) ++ ++ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ if(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ elseif(keyres.eq.1.or.keyres.eq.3)then ++ ++ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ elseif(keyres.eq.2)then ++ ++ if(ngrp.gt.0)then ++ ++ call vscaleg ++ x (idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ elseif(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c print out sample of initial configuration ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'sample of starting configuration',/)") ++ ++ io=(natms+19)/20 ++ if((levcfg.le.1).and.(idnode.eq.0)) ++ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',/,/)") ++ if((levcfg.eq.2).and.(idnode.eq.0)) ++ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)', ++ x 7x,'fx(i)',7x,'fy(i)',7x,'fz(i)',/,/)") ++ ++ do i=1,natms,io ++ ++ if(levcfg.le.1)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i) ++ ++ elseif(levcfg.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i), ++ x vxx(i),vyy(i),vzz(i),fxx(i),fyy(i),fzz(i) ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine systemp ++ ++ subroutine sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine defining global bookkeeping ++c arrays ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical loglnk,lneut,lshmov,lcnb,lsolva,lghost ++ integer idnode,imcon,mxnode,natms,nneut,ngrp,nscons,ntangl,i ++ integer ntbond,ntcons,ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,ii,isol,itmols,igsol,iggsol,natmsf,natmsl ++ integer ntghost,natms2 ++ real(8) degfre,degrot ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c neutral group bookkeeping ++ ++ call neutbook(lneut,idnode,natms,nneut) ++ ++c rigid body bookkeeping ++ ++ call quatbook ++ x (lsolva,idnode,imcon,mxnode,natms2,ngrp,ntpmls, ++ x ntfree,degfre,degrot) ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ ++ numcon(mxtmls)=numcon(mxtmls)+ntcons_ghost ++ numgrp(mxtmls)=numgrp(mxtmls)+ngrp_ghost ++ ++ endif ++ ++c construct list of excluded pair interactions ++ ++ if(lneut)then ++ ++ call exclude(idnode,mxnode,natms,ntpmls) ++ call excludeneu(idnode,mxnode,nneut) ++ ++ elseif(.not.lneut)then ++ ++ call exclude(idnode,mxnode,natms,ntpmls) ++ ++ if(loglnk)then ++ ++ call exclude_link(idnode,mxnode,ntpmls) ++ ++ else ++ ++ call exclude_atom(idnode,mxnode,natms,ntpmls) ++ ++ endif ++ ++ endif ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ ++ numcon(mxtmls)=numcon(mxtmls)-ntcons_ghost ++ numgrp(mxtmls)=numgrp(mxtmls)-ngrp_ghost ++ ++ endif ++ ++c construct interaction lists for bonded forces ++ ++ call intlist ++ x (lshmov,lcnb,idnode,mxnode,natms2,nscons,ntangl,ntbond, ++ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) ++ ++c adaptations for solvation and excitation simulations ++ ++ if(lsolva.or.lghost)then ++ ++ natmsf=0 ++ natmsl=0 ++ natm_sol(:)=0 ++ const_sol(:)=numcon(:)*nummols(:) ++ rigid_sol(:)=numgrp(:)*nummols(:) ++ ++ if(ngrp.eq.0)then ++ ++ do itmols=1,mxtmls ++ ++ natmsl=natmsl+numsit(itmols)*nummols(itmols) ++ ++ do isol=natmsf+1,natmsl ++ ++ if(lstfrz(isol).eq.0)then ++ natm_sol(itmols)=natm_sol(itmols)+1 ++ endif ++ ++ enddo ++ ++ natmsf=natmsl ++ ++ enddo ++ ++ else ++ ++ ii=1 ++ ++ do itmols=1,mxtmls ++ ++ natmsl=natmsl+numsit(itmols)*nummols(itmols) ++ ++ do isol=natmsf+1,natmsl ++ ++ if(lstgot_sol(ii).eq.isol)then ++ ii=ii+1 ++ else ++ ++ if(lstfrz(isol).eq.0)then ++ natm_sol(itmols)=natm_sol(itmols)+1 ++ endif ++ ++ endif ++ ++ enddo ++ ++ natmsf=natmsl ++ ++ enddo ++ ++ degrot_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 ++ degfre_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 ++ ++ endif ++ ++ if(lghost)natm_sol(mxtmls)=natm_sol(mxtmls)-ntghost ++ degfre_sol(:)=dble(3*(natm_sol(:))-const_sol(:))+degfre_sol(:) ++ ++ endif ++ ++ return ++ end subroutine sysbook ++ ++ subroutine define_units(idnode,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting energy units ++c ++c copyright - daresbury laboratory ++c author - w. smith august 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,idum,i ++ real(8) engunit ++ logical blank ++ ++ blank=.true. ++ ++ do i=6,lenrec ++ if(record(i).ne.' ')blank=.false. ++ enddo ++ ++ if(blank)then ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=dl_poly internal ', ++ x 'units ')") ++ ++ elseif(findstring('ev',record,idum))then ++ ++ engunit=9648.530821d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=electron volts ')") ++ ++ elseif(findstring('kev',record,idum))then ++ ++ engunit=9648530.821d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kilo electron volts ')") ++ ++ elseif(findstring('kcal',record,idum))then ++ ++ engunit=418.4d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kcal/ mol ')") ++ ++ elseif(findstring('kj',record,idum))then ++ ++ engunit=1.d2 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kjoule/mol ')") ++ ++ elseif(findstring('k',record,idum))then ++ ++ engunit=boltz ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kelvin ')") ++ ++ elseif(findstring('internal',record,idum))then ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=dl_poly internal', ++ x ' units ')") ++ ++ else ++ ++ if(idnode.eq.0)write(nrite,'(a)')record ++ call error(idnode,5) ++ ++ endif ++ ++ return ++ end subroutine define_units ++ ++ subroutine quatbook ++ x (lsolva,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree, ++ x degfre,degrot) ++ ++c************************************************************************** ++c ++c dl_poly subroutine for setting up bookkeeping for rigid bodies ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c************************************************************************* ++ ++ implicit none ++ ++ logical safe,pass1,pass2,linear,lsolva ++ integer fail,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree ++ integer i,igrp,jgrp,kgrp,jr,jt,igrp1,igrp2,itmols,imols,lgrp,id ++ integer ii,jj,isite,k,kk,ill,i1,i2,i3,j,ngp,ifre1,ifre2,ig,ij ++ integer fngrp,lngrp ++ real(8) degfre,degrot,dnorm,a1,rtall,rotall,rot,aa,rotinr,bb,rot1 ++ real(8) rsq,det,dettest,aq,bq,cq,dq,eq,fq,gq,hq,rnorm,tol,rotxyz ++ real(8) rotlim,rrr ++ ++ integer, allocatable :: ind(:,:),lstgot(:) ++ real(8), allocatable :: gaxs(:,:),rotmin(:),accum(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ dimension rot(9),aa(9),rotinr(3,3),bb(9),rot1(3,3),fail(5) ++ ++ data fail/0,0,0,0,0/ ++ ++c allocate working arrays ++ ++ allocate (ind(mxgrp,3),lstgot(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) ++ allocate (gaxs(mxungp,9),rotmin(mxungp),stat=fail(4)) ++ allocate (accum(mxungp),stat=fail(5)) ++ do i=1,5 ++ if(fail(i).ne.0)call error(idnode,1790) ++ enddo ++ ++c initialise bookkeeping indices ++ ++ igrp=0 ++ jgrp=0 ++ kgrp=0 ++ isite=0 ++ jr=0 ++ jt=0 ++ safe=.true. ++ degfre=0.d0 ++ degrot=0.d0 ++ ++c rigid body identifier ++ ++ do i=1,natms ++ lstbod(i)=0 ++ enddo ++ ++c number of rigid groups in system ++ ++ ngrp=0 ++ do itmols=1,ntpmls ++ ngrp=ngrp+nummols(itmols)*numgrp(itmols) ++ enddo ++ ++c block indices for groups ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c loop over molecule types ++ ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if(igrp.le.mxgrp)then ++ ++ lstgtp(igrp)=listyp(lgrp+kgrp) ++ id=listyp(lgrp+kgrp) ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2))then ++ ++ jgrp=jgrp+1 ++ ++ do jj=1,numgsit(id) ++ ++ jr=jr+1 ++ jt=jt+1 ++ ++ if(jr.le.mxatms.and.jt.le.mxatms)then ++ ++ lstrgd(jr)=lstgst(id,jj)+isite ++ lstgot(jt)=lstgst(id,jj)+isite ++ lstbod(lstgst(id,jj)+isite)=igrp ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ else ++ ++ do jj=1,numgsit(id) ++ ++ jt=jt+1 ++ if(jt.le.mxatms)then ++ ++ lstgot(jt)=lstgst(id,jj)+isite ++ lstbod(lstgst(id,jj)+isite)=igrp ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,304) ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ kgrp=kgrp+numgrp(itmols) ++ ++ enddo ++ ++ if(ngrp.eq.0)then ++ ++ j=0 ++ do i=1,natms ++ ++ if(lstfrz(i).eq.0)then ++ ++ j=j+1 ++ lstfre(j)=i ++ ++ endif ++ ++ enddo ++ ntfree=j ++ ++ else ++ ++c centre of mass of groups ++c assumes group dimensions are smaller than half box width ++ ++ do i=1,natms ++ lstme(i)=0 ++ enddo ++ ++ do id=1,mxungp ++ gmass(id)=0.d0 ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c working com is first site in group ++ ++ i=lstrgd(jr+1) ++ txx(ig)=xxx(i) ++ tyy(ig)=yyy(i) ++ tzz(ig)=zzz(i) ++ ++ id=lstgtp(ig) ++ safe=.false. ++ if(abs(gmass(id)).lt.1.d-10)safe=.true. ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ xxt(jr)=xxx(i)-txx(ig) ++ yyt(jr)=yyy(i)-tyy(ig) ++ zzt(jr)=zzz(i)-tzz(ig) ++ if(safe)gmass(id)=gmass(id)+weight(i) ++ ++ enddo ++ ++ enddo ++ ++c minimum image from working com ++ ++ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=0.d0 ++ gcmy(ig)=0.d0 ++ gcmz(ig)=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ gcmx(ig)=gcmx(ig)+weight(i)*xxt(jr) ++ gcmy(ig)=gcmy(ig)+weight(i)*yyt(jr) ++ gcmz(ig)=gcmz(ig)+weight(i)*zzt(jr) ++ ++ enddo ++ ++ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) ++ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) ++ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) ++ ++ enddo ++ ++c global communications ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++c make sure all nodes have same copy of gmass ++ ++ if(mxnode.gt.1)then ++ ++ do id=1,mxungp ++ ++ accum(id)=0.d0 ++ if(gmass(id).gt.0.d0)accum(id)=1.d0 ++ ++ enddo ++ ++ call gdsum(gmass(1),mxungp,buffer(1)) ++ call gdsum(accum(1),mxungp,buffer(1)) ++ ++ do id=1,mxungp ++ ++ dnorm=max(1.d0,accum(id)) ++ gmass(id)=gmass(id)/dnorm ++ ++ enddo ++ ++ endif ++ ++c find a group of each type on this node to ++c find principal axis system of the group type ++ ++ do id=1,mxungp ++ ++ jr=0 ++ ij=0 ++ safe=.false. ++ ++ do while(.not.safe.and.ij.lt.ngrp) ++ ++ ij=ij+1 ++ jr=jr+numgsit(lstgtp(ij)) ++ if(lstgtp(ij).eq.id)safe=.true. ++ ++ enddo ++ ++ if(safe)then ++ ++c rotational inertia accumulator ++ ++ do k=1,3 ++ ++ do kk=1,3 ++ ++ rotinr(k,kk)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstgot(jr) ++ ++ xxt(jr)=xxx(i)-gcmx(ij) ++ yyt(jr)=yyy(i)-gcmy(ij) ++ zzt(jr)=zzz(i)-gcmz(ij) ++ ++ call images(imcon,0,1,1,cell,xxt(jr),yyt(jr),zzt(jr)) ++ ++ rotinr(1,1)=rotinr(1,1)+weight(i)*(xxt(jr)**2) ++ rotinr(1,2)=rotinr(1,2)+weight(i)*xxt(jr)*yyt(jr) ++ rotinr(1,3)=rotinr(1,3)+weight(i)*xxt(jr)*zzt(jr) ++ rotinr(2,2)=rotinr(2,2)+weight(i)*(yyt(jr)**2) ++ rotinr(2,3)=rotinr(2,3)+weight(i)*yyt(jr)*zzt(jr) ++ rotinr(3,3)=rotinr(3,3)+weight(i)*(zzt(jr)**2) ++ ++ enddo ++ ++ rotinr(2,1)=rotinr(1,2) ++ rotinr(3,1)=rotinr(1,3) ++ rotinr(3,2)=rotinr(2,3) ++ ++ call jacobi(rotinr,rot1,3) ++ ++ rot(1)=rot1(1,1) ++ rot(4)=rot1(2,1) ++ rot(7)=rot1(3,1) ++ rot(2)=rot1(1,2) ++ rot(5)=rot1(2,2) ++ rot(8)=rot1(3,2) ++ rot(3)=rot1(1,3) ++ rot(6)=rot1(2,3) ++ rot(9)=rot1(3,3) ++ ++c rotational inertia accumulators ++ ++ rotinx(id,1)=0.d0 ++ rotiny(id,1)=0.d0 ++ rotinz(id,1)=0.d0 ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstgot(jr) ++ ++c site positions in principal axis system ++ ++ gxx(id,j)=rot(1)*xxt(jr)+rot(4)*yyt(jr)+rot(7)*zzt(jr) ++ gyy(id,j)=rot(2)*xxt(jr)+rot(5)*yyt(jr)+rot(8)*zzt(jr) ++ gzz(id,j)=rot(3)*xxt(jr)+rot(6)*yyt(jr)+rot(9)*zzt(jr) ++ ++c impose rounding ++ ++ if(abs(gxx(id,j)).lt.1.d-8)gxx(id,j)=0.d0 ++ if(abs(gyy(id,j)).lt.1.d-8)gyy(id,j)=0.d0 ++ if(abs(gzz(id,j)).lt.1.d-8)gzz(id,j)=0.d0 ++ ++c rotational inertia tensor of group type ++ ++ rotinx(id,1)=rotinx(id,1)+ ++ x weight(i)*(gyy(id,j)**2+gzz(id,j)**2) ++ rotiny(id,1)=rotiny(id,1)+ ++ x weight(i)*(gzz(id,j)**2+gxx(id,j)**2) ++ rotinz(id,1)=rotinz(id,1)+ ++ x weight(i)*(gxx(id,j)**2+gyy(id,j)**2) ++ ++ enddo ++ ++c set axis system such that: Ixx >=Iyy >=Izz ++ ++ rotxyz=max(rotinx(id,1),rotiny(id,1),rotinz(id,1)) ++ ++ if(rotxyz.ge.rotinx(id,1))then ++ ++ if(rotiny(id,1).ge.rotxyz)then ++ ++ do j=1,numgsit(id) ++ ++ a1=gxx(id,j) ++ gxx(id,j)=gyy(id,j) ++ gyy(id,j)=-a1 ++ ++ enddo ++ ++ rotiny(id,1)=rotinx(id,1) ++ rotinx(id,1)=rotxyz ++ ++ elseif(rotinz(id,1).ge.rotxyz)then ++ ++ do j=1,numgsit(id) ++ ++ a1=gxx(id,j) ++ gxx(id,j)=gzz(id,j) ++ gzz(id,j)=-a1 ++ ++ enddo ++ ++ rotinz(id,1)=rotinx(id,1) ++ rotinx(id,1)=rotxyz ++ ++ endif ++ ++ endif ++ ++ if(rotinz(id,1).gt.rotiny(id,1))then ++ ++ do j=1,numgsit(id) ++ ++ a1=gyy(id,j) ++ gyy(id,j)=gzz(id,j) ++ gzz(id,j)=-a1 ++ ++ enddo ++ ++ a1=rotinz(id,1) ++ rotinz(id,1)=rotiny(id,1) ++ rotiny(id,1)=a1 ++ ++ endif ++ ++c set up principal axis system in terms of site positions ++ ++c test for (near) linear unit ++ ++ ill=0 ++ rtall=(rotinx(id,1)+rotiny(id,1)+rotinz(id,1)) ++ ++ if(rtall.gt.1.d-5)then ++ rotall=rtall ++ else ++ rotall=1.d0 ++ endif ++ ++ rotmin(id)=min(rotinx(id,1),rotiny(id,1)) ++ rotmin(id)=min(rotmin(id),rotinz(id,1))/rotall ++ ++ if((rotinx(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ if((rotiny(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ if((rotinz(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ ++ if(ill.ge.2)then ++ ++c point particle only ++ ++ ind(id,1)=1 ++ ind(id,2)=1 ++ ind(id,3)=1 ++ ++ do jj=1,9 ++ gaxs(id,jj)=0.d0 ++ enddo ++ ++ elseif(ill.eq.1)then ++ ++c linear molecule ++ ++ ind(id,1)=1 ++ ind(id,2)=2 ++ ind(id,3)=1 ++ ++ aa(1)=gxx(id,1)-gxx(id,2) ++ aa(4)=gyy(id,1)-gyy(id,2) ++ aa(7)=gzz(id,1)-gzz(id,2) ++ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) ++ ++ if(abs(aa(7)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(7)**2) ++ aa(2)=0.d0 ++ aa(5)=aa(7)/rsq ++ aa(8)=-aa(4)/rsq ++ ++ elseif(abs(aa(4)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(1)**2) ++ aa(2)=-aa(4)/rsq ++ aa(5)=aa(1)/rsq ++ aa(8)=0.d0 ++ ++ elseif(abs(aa(1)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(1)**2+aa(7)**2) ++ aa(2)=-aa(7)/rsq ++ aa(5)=0.d0 ++ aa(8)=aa(1)/rsq ++ ++ endif ++ ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++ call invert(aa,bb,det) ++ ++ if(abs(det).lt.1.d-5)call error(idnode,306) ++ ++ do j=1,9 ++ gaxs(id,j)=bb(j) ++ enddo ++ ++ elseif(ill.eq.0)then ++ ++c non-linear molecule ++ ++ i1=1 ++ i2=1 ++ i3=1 ++ pass1=.true. ++ dettest=1.d-1 ++ ++ do while(pass1.and.i2.lt.numgsit(id)-1) ++ ++ i2=i2+1 ++ i3=i2 ++ pass2=.true. ++ ++ do while(pass2.and.i3.lt.numgsit(id)) ++ ++ i3=i3+1 ++ ++ aa(1)=gxx(id,i1)-gxx(id,i2) ++ aa(4)=gyy(id,i1)-gyy(id,i2) ++ aa(7)=gzz(id,i1)-gzz(id,i2) ++ aa(2)=gxx(id,i1)-gxx(id,i3) ++ aa(5)=gyy(id,i1)-gyy(id,i3) ++ aa(8)=gzz(id,i1)-gzz(id,i3) ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++c invert matrix ++ ++ call invert(aa,bb,det) ++ ++c check on size of determinant - to see if the 3 sites are ++c too close to being linear for safety. ++ ++ pass2=abs(det).lt.dettest ++ ++ enddo ++ ++ pass1=abs(det).lt.dettest ++ ++ enddo ++ ++ if(abs(det).lt.dettest)call error(idnode,306) ++ ++c store indices used ++ ++ ind(id,1)=i1 ++ ind(id,2)=i2 ++ ind(id,3)=i3 ++ ++c store coefficients ++ ++ do j=1,9 ++ ++ gaxs(id,j)=bb(j) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c check that rigid unit does not contain frozen atoms ++ ++ safe=.true. ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ if(lstfrz(i).ne.0)safe=.false. ++ ++ enddo ++ ++ enddo ++ ++c global check on error condition ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,360) ++ ++c quaternions for all rigid groups in system ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ i1=lstrgd(jr+ind(id,1)) ++ i2=lstrgd(jr+ind(id,2)) ++ i3=lstrgd(jr+ind(id,3)) ++ ++ jr=jr+numgsit(id) ++ ++c group basis vectors ++ ++ aa(1)=xxx(i1)-xxx(i2) ++ aa(4)=yyy(i1)-yyy(i2) ++ aa(7)=zzz(i1)-zzz(i2) ++ ++ call images(imcon,0,1,1,cell,aa(1),aa(4),aa(7)) ++ ++ if(rotmin(id).gt.1.d-5)then ++ ++ aa(2)=xxx(i1)-xxx(i3) ++ aa(5)=yyy(i1)-yyy(i3) ++ aa(8)=zzz(i1)-zzz(i3) ++ ++ else ++ ++ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) ++ ++ if(abs(aa(7)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(7)**2) ++ aa(2)=0.d0 ++ aa(5)=aa(7)/rsq ++ aa(8)=-aa(4)/rsq ++ ++ elseif(abs(aa(4)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(1)**2) ++ aa(2)=-aa(4)/rsq ++ aa(5)=aa(1)/rsq ++ aa(8)=0.d0 ++ ++ elseif(abs(aa(1)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(1)**2+aa(7)**2) ++ aa(2)=-aa(7)/rsq ++ aa(5)=0.d0 ++ aa(8)=aa(1)/rsq ++ ++ endif ++ ++ endif ++ ++ call images(imcon,0,1,1,cell,aa(2),aa(5),aa(8)) ++ ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++c group rotational matrix ++ ++ rot(1)=gaxs(id,1)*aa(1)+gaxs(id,4)*aa(2)+gaxs(id,7)*aa(3) ++ rot(2)=gaxs(id,2)*aa(1)+gaxs(id,5)*aa(2)+gaxs(id,8)*aa(3) ++ rot(3)=gaxs(id,3)*aa(1)+gaxs(id,6)*aa(2)+gaxs(id,9)*aa(3) ++ rot(4)=gaxs(id,1)*aa(4)+gaxs(id,4)*aa(5)+gaxs(id,7)*aa(6) ++ rot(5)=gaxs(id,2)*aa(4)+gaxs(id,5)*aa(5)+gaxs(id,8)*aa(6) ++ rot(6)=gaxs(id,3)*aa(4)+gaxs(id,6)*aa(5)+gaxs(id,9)*aa(6) ++ rot(7)=gaxs(id,1)*aa(7)+gaxs(id,4)*aa(8)+gaxs(id,7)*aa(9) ++ rot(8)=gaxs(id,2)*aa(7)+gaxs(id,5)*aa(8)+gaxs(id,8)*aa(9) ++ rot(9)=gaxs(id,3)*aa(7)+gaxs(id,6)*aa(8)+gaxs(id,9)*aa(9) ++ ++c determine quaternions from rotational matrix ++ ++ aq=rot(1)+rot(5) ++ bq=rot(2)-rot(4) ++ cq=rot(6)-rot(8) ++ dq=rot(2)+rot(4) ++ eq=rot(3)+rot(7) ++ fq=rot(6)+rot(8) ++ gq=rot(3)-rot(7) ++ hq=rot(1)-rot(5) ++ ++ q0(ig)=0.5d0*sqrt(aq+sqrt(aq*aq+bq*bq)) ++ ++ if(q0(ig).gt.1.d-4)then ++ ++ q1(ig)=-0.25d0*cq/q0(ig) ++ q2(ig)=0.25d0*gq/q0(ig) ++ q3(ig)=-0.25d0*bq/q0(ig) ++ ++ else ++ ++ q1(ig)=0.5d0*sqrt(hq+sqrt(hq*hq+dq*dq)) ++ ++ if(q1(ig).gt.1.d-4)then ++ ++ q2(ig)=0.25d0*dq/q1(ig) ++ q3(ig)=0.25d0*eq/q1(ig) ++ ++ else ++ ++ q2(ig)=0.5d0*sqrt(-hq+sqrt(hq*hq+dq*dq)) ++ ++ if(q2(ig).gt.1.d-4)then ++ ++ q3(ig)=0.25d0*fq/q2(ig) ++ ++ else ++ ++ q3(ig)=1.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c normalise quaternions ++ ++ rnorm=1.d0/sqrt(q0(ig)**2+q1(ig)**2+q2(ig)**2+q3(ig)**2) ++ q0(ig)=rnorm*q0(ig) ++ q1(ig)=rnorm*q1(ig) ++ q2(ig)=rnorm*q2(ig) ++ q3(ig)=rnorm*q3(ig) ++ ++ enddo ++ ++c test for redundant degrees of freedom ++c and ensure rotational inertias are non-zero ++ ++ degrot=0.d0 ++ ++ if(lsolva)then ++ degrot_sol(:)=0.d0 ++ endif ++ ++ do ig=1,ngrp ++ ++ id=lstgtp(ig) ++ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1)) ++ ++ if(rotall*rotinx(id,1).lt.1.d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ if(rotall*rotiny(id,1).lt.1.d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ if(rotall*rotinz(id,1).lt.1d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ enddo ++ ++c rotational degrees of freedom and rigid body contribution ++c to total degrees of freedom ++ ++ degrot=degrot+dble(ngrp)*3.d0 ++ degfre=degrot+dble(ngrp)*3.d0 ++ ++ if(lsolva)then ++ ++ fngrp=1 ++ lngrp=0 ++ ++ do itmols=1,mxtmls ++ ++ lngrp=lngrp+nummols(itmols)*numgrp(itmols) ++ ++ do ig=fngrp,lngrp ++ ++ id=lstgtp(ig) ++ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1)) ++ ++ if(rotall*rotinx(id,1).lt.1.d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ if(rotall*rotiny(id,1).lt.1.d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ if(rotall*rotinz(id,1).lt.1d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ enddo ++ ++ fngrp=lngrp+1 ++ ++ enddo ++ ++ endif ++ ++c summarise results ++ ++ if(idnode.eq.0)then ++ ++ if(gmass(1).gt.0.d0)then ++ ++ write(nrite,'(/,/,12x,a)')' summary of rigid body set up' ++ ++ do id=1,mxungp ++ ++ if(gmass(id).gt.0.d0)then ++ ++ write(nrite,'(/,a,i10)')' group of type ',id ++ write(nrite,'(12x,a,f20.10)')' total mass ', ++ x gmass(id) ++ write(nrite,'(12x,a,3f20.10)')' rot. inertia ', ++ x rotinx(id,1),rotiny(id,1),rotinz(id,1) ++ write(nrite,'(/,12x,a,3(8x,a7))')' site','a coord', ++ x 'b coord','c coord' ++ do j=1,numgsit(id) ++ write(nrite,'(12x,i5,1p,3e15.5)')j,gxx(id,j), ++ x gyy(id,j),gzz(id,j) ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c find number of unique groups ++ ++ ngp=0 ++ do ig=1,ngrp ++ ngp=max(ngp,lstgtp(ig)) ++ enddo ++ ++c calculate reciprocal of rotational inertias ++ ++ do id=1,ngp ++ ++ rotlim=max(1.d-2,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1))*1.d-5 ++ ++ if(rotinx(id,1).lt.rotlim)then ++ rotinx(id,2)=0.d0 ++ else ++ rotinx(id,2)=1.d0/rotinx(id,1) ++ endif ++ ++ if(rotiny(id,1).lt.rotlim)then ++ rotiny(id,2)=0.d0 ++ else ++ rotiny(id,2)=1.d0/rotiny(id,1) ++ endif ++ ++ if(rotinz(id,1).lt.rotlim)then ++ rotinz(id,2)=0.d0 ++ else ++ rotinz(id,2)=1.d0/rotinz(id,1) ++ endif ++ ++ enddo ++ ++c Check of quaternion set up with atomic positions ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c group type ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 ++ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) ++ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) ++ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) ++ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 ++ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) ++ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) ++ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) ++ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxt(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyt(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzt(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ ++ txx(jr)=xxx(i)-xxt(i) ++ tyy(jr)=yyy(i)-yyt(i) ++ tzz(jr)=zzz(i)-zzt(i) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,jr,cell,txx,tyy,tzz) ++ ++c set tolerance for testing quaternion setup. ++ ++ rsq=0.d0 ++ tol=1.d-2 ++ ++ do i=1,jr ++ ++ rrr=txx(i)**2+tyy(i)**2+tzz(i)**2 ++ if(rrr.gt.tol)then ++ ++ rsq=rrr ++ ++ endif ++ ++ enddo ++ ++c exit if error in set up ++ ++ safe=.true. ++ if(rsq.gt.tol)safe=.false. ++ if(mxnode.gt.1)call gstate(safe) ++ ++ if(.not.safe)call error(idnode,310) ++ ++c sort lstgot into ascending order ++ ++ call shellsort(jt,lstgot) ++ ++c check that no site is in more than 1 rigid group ++ ++ i=1 ++ safe=.true. ++ do while(i.lt.jt) ++ ++ i=i+1 ++ linear=.true. ++ do while(linear) ++ ++ linear=.false. ++ ++ if(lstgot(i).eq.lstgot(i-1))then ++ ++ linear=.true. ++ safe=.false. ++ jt=jt-1 ++ ++ do j=i,jt ++ lstgot(j)=lstgot(j+1) ++ enddo ++ ++ endif ++ ++ if(i.ge.jt)linear=.false. ++ ++ enddo ++ ++ enddo ++ ++ if(.not.safe)call error(idnode,320) ++ ++c list of 'free' sites ++ ++ ii=1 ++ jj=0 ++ do i=1,natms ++ ++ if(lstgot(ii).eq.i)then ++ ++ ii=ii+1 ++ ++ else ++ ++ if(lstfrz(i).eq.0)then ++ jj=jj+1 ++ lstfre(jj)=i ++ endif ++ ++ endif ++ ++ enddo ++ ++c number of free sites ++ ++ ntfree=jj ++ ++c list of atoms integrated on this node ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ jr=jr+numgsit(id) ++ ++ enddo ++ ++ do i=1,jr ++ lstme(i)=lstrgd(i) ++ enddo ++ ++c block parameters for free atoms ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++ do i=ifre1,ifre2 ++ ++ jr=jr+1 ++ lstme(jr)=lstfre(i) ++ ++ enddo ++ ++c exchange quaternion data with other nodes ++ ++ if(mxnode.gt.1)call merge4 ++ x (idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++ if(lsolva)lstgot_sol(:)=lstgot(:) ++ ++c deallocate work arrays ++ ++ deallocate (ind,lstgot,stat=fail(1)) ++ deallocate (txx,tyy,tzz,stat=fail(2)) ++ deallocate (xxt,yyt,zzt,stat=fail(3)) ++ deallocate (gaxs,rotmin,stat=fail(4)) ++ deallocate (accum,stat=fail(5)) ++ ++ return ++ end subroutine quatbook ++ ++ subroutine abort_field_read(kode,idnode,nfield) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting FIELD file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nfield ++ ++ if(idnode.eq.0)close (nfield) ++ ++ if(kode.eq.1)then ++ ++c end of field file error exit ++ ++ call error(idnode,52) ++ ++ elseif(kode.eq.2)then ++ ++c unrecognised directive in field file ++ ++ call error(idnode,4) ++ ++ endif ++ ++ return ++ end subroutine abort_field_read ++ ++ subroutine abort_control_read(kode,idnode,nread) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting CONTROL file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nread ++ ++ if(idnode.eq.0)close (nread) ++ ++ if(kode.eq.1)then ++ ++c end of control file error exit ++ ++ call error(idnode,53) ++ ++ elseif(kode.eq.2)then ++ ++c general error exit from field file processing ++ ++ call error(idnode,0) ++ ++ endif ++ ++ return ++ end subroutine abort_control_read ++ ++ subroutine abort_config_read(kode,idnode,nconf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting CONTROL file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nconf ++ ++ if(idnode.eq.0)close (nconf) ++ ++ if(kode.eq.1)then ++ ++c general error exit from field file processing ++ ++ call error(idnode,54) ++ ++ elseif(kode.eq.2)then ++ ++c end of config file error exit ++ ++ call error(idnode,55) ++ ++ endif ++ ++ return ++ end subroutine abort_config_read ++ ++ subroutine neutbook(lneut,idnode,natms,nneut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for neutral group bookkeeping ++c ++c copyright - daresbury laboratory ++c author - w. smith nov 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lneut,safe ++ integer idnode,natms,nneut,i ++ ++ safe=.true. ++ ++c neutral group bookkeeping: sites must be listed consecutively ++ ++ if(lneut)then ++ ++ if(lstneu(1).ne.1)call error(idnode,230) ++ ++ neulst(1)=1 ++ nneut=1 ++ ++ do i=2,natms ++ ++ safe=.false. ++ if(lstneu(i).eq.lstneu(i-1))safe=.true. ++ if(lstneu(i).eq.lstneu(i-1)+1)then ++ ++ safe=.true. ++ nneut=nneut+1 ++ if(nneut.gt.mxneut)call error(idnode,220) ++ neulst(nneut)=i ++ ++ endif ++ ++ if(.not.safe)call error(idnode,230) ++ ++ enddo ++ ++ neulst(nneut+1)=natms+1 ++ ++ endif ++ ++ return ++ ++ end subroutine neutbook ++ ++ subroutine intlist ++ x (lshmov,lcnb,idnode,mxnode,natms,nscons,ntangl,ntbond, ++ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the interaction lists ++c for the entire simulated system ++c ++c parallel replicated dat version : block data ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992 ++c amended - t.forester oct 1993 ++c amended - t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,safe1,lcnb,lchk,lfail ++ integer idnode,mxnode,natms,nscons,ntangl,ntbond,ntcons ++ integer ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf ++ integer ibonds,jbonds,kbonds,ipmf,jpmf,iangle,jangle,kangle ++ integer idihed,jdihed,kdihed,iinver,jinver,kinver,iteths ++ integer jteths,kteths,ishels,jshels,kshels,ntbon0,ntpmf0 ++ integer ntang0,ntdih0,ntinv0,nttet0,ntshl0,ntcon0,idum ++ integer itmols,isite,iconst,jconst,kconst,ibnd1,ibnd2,ipmf1 ++ integer ipmf2,iang1,iang2,idih1,idih2,iinv1,iinv2,itet1 ++ integer itet2,ishl1,ishl2,imols,lbonds,lpmf,jj,nnn,langle ++ integer ldihed,linver,lteths,lshels,i,ii,ntmp,klo,khi,ngrp ++ integer klo0,ifail,iloop,nnode,nscons0,nscons1,icon,fail ++ integer kcons,id,jdnode,lconst,itry,iatom,jatom,j,nfail ++ real(8) tol ++ ++ integer, allocatable :: itest(:),index(:),kscons(:) ++ integer, allocatable :: msite(:),mconst(:),listin(:) ++ ++ dimension fail(4) ++ ++ data fail/0,0,0,0/ ++ ++c allocate work arrays ++ ++ allocate (itest(mxtmls),index(mxtmls),stat=fail(1)) ++ allocate (msite(mxtmls),mconst(mxtmls),stat=fail(2)) ++ allocate (listin(mxatms),stat=fail(3)) ++ allocate (kscons(0:mxproc-1),stat=fail(4)) ++ do i=1,4 ++ if(fail(i).ne.0)call error(idnode,1800) ++ enddo ++ ++c initialise bookkeeping indices ++ ++ ibonds=0 ++ jbonds=0 ++ kbonds=0 ++ ipmf=0 ++ jpmf=0 ++ iangle=0 ++ jangle=0 ++ kangle=0 ++ idihed=0 ++ jdihed=0 ++ kdihed=0 ++ iinver=0 ++ jinver=0 ++ kinver=0 ++ iteths=0 ++ jteths=0 ++ kteths=0 ++ ishels=0 ++ jshels=0 ++ kshels=0 ++ safe=.true. ++ safe1=.true. ++ ++c find total number of bonds,pmf constraints,bond constraints, ++c angles,dihedrals,inversions, tethers,core-shells, in system ++c - ignoring frozen atoms ++ ++ ntbon0=0 ++ ntpmf0=0 ++ ntcon0=0 ++ ntang0=0 ++ ntdih0=0 ++ ntinv0=0 ++ nttet0=0 ++ ntshl0=0 ++ nscons=0 ++ ntcons=0 ++ ++ do itmols=1,ntpmls ++ ++ ntbon0=ntbon0+nummols(itmols)*numbonds(itmols) ++ ntpmf0=ntpmf0+nummols(itmols)*numpmf(itmols) ++ ntcon0=ntcon0+nummols(itmols)*numcon(itmols) ++ ntang0=ntang0+nummols(itmols)*numang(itmols) ++ ntdih0=ntdih0+nummols(itmols)*numdih(itmols) ++ ntinv0=ntinv0+nummols(itmols)*numinv(itmols) ++ nttet0=nttet0+nummols(itmols)*numteth(itmols) ++ ntshl0=ntshl0+nummols(itmols)*numshl(itmols) ++ ++ enddo ++ ++ isite=0 ++ iconst=0 ++ jconst=0 ++ kconst=0 ++ ++c first and last index of bonds, angles etc for this node ++ ++ ibnd1=(idnode*ntbon0)/mxnode+1 ++ ibnd2=((idnode+1)*ntbon0)/mxnode ++ ++ ipmf1=(idnode*ntpmf0)/mxnode+1 ++ ipmf2=((idnode+1)*ntpmf0)/mxnode ++ ntpmf=ntpmf0 ++ nspmf=ipmf2+1-ipmf1 ++ ++ iang1=(idnode*ntang0)/mxnode+1 ++ iang2=((idnode+1)*ntang0)/mxnode ++ ++ idih1=(idnode*ntdih0)/mxnode+1 ++ idih2=((idnode+1)*ntdih0)/mxnode ++ ++ iinv1=(idnode*ntinv0)/mxnode+1 ++ iinv2=((idnode+1)*ntinv0)/mxnode ++ ++ itet1=(idnode*nttet0)/mxnode+1 ++ itet2=((idnode+1)*nttet0)/mxnode ++ ++ ishl1=(idnode*ntshl0)/mxnode+1 ++ ishl2=((idnode+1)*ntshl0)/mxnode ++ ++c loop over molecule types ++ ++ do itmols=1,ntpmls ++ ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct bond constraint list later ++c construct chemical bond interaction list ++ ++ do lbonds=1,numbonds(itmols) ++ ++ ibonds=ibonds+1 ++ ++ if(ibonds.ge.ibnd1.and.ibonds.le.ibnd2)then ++ ++ jbonds=jbonds+1 ++ if(jbonds.le.mxbond)then ++ ++ listbnd(jbonds,1)=lbonds+kbonds ++ listbnd(jbonds,2)=lstbnd(lbonds+kbonds,1) ++ x +isite ++ listbnd(jbonds,3)=lstbnd(lbonds+kbonds,2) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,31) ++ ++c construct pmf site lists - no exclusions ++ ++ do lpmf=1,numpmf(itmols) ++ ++ ipmf=ipmf+1 ++ ++ if(ipmf.ge.ipmf1.and.ipmf.le.ipmf2)then ++ ++ jpmf=jpmf+1 ++ if(jpmf.le.mspmf)then ++ ++ nnn=npmf(1)+npmf(2) ++ if(nnn.le.mxspmf)then ++ ++ do jj=1,npmf(1)+npmf(2) ++ lstpmf(jj,jpmf)=indpmf(jj)+isite ++ enddo ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ else ++ ++ safe1=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe1) ++ if(.not.safe1)call error(idnode,458) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,460) ++ ++c construct valence angle interaction list ++ ++ do langle=1,numang(itmols) ++ ++ iangle=iangle+1 ++ ++ if(iangle.ge.iang1.and.iangle.le.iang2)then ++ ++ jangle=jangle+1 ++ if(jangle.le.mxangl)then ++ ++ listang(jangle,1)=langle+kangle ++ listang(jangle,2)=lstang(langle+kangle,1) ++ x +isite ++ listang(jangle,3)=lstang(langle+kangle,2) ++ x +isite ++ listang(jangle,4)=lstang(langle+kangle,3) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,51) ++ ++c construct dihedral angle interaction list ++ ++ do ldihed=1,numdih(itmols) ++ ++ idihed=idihed+1 ++ ++ if(idihed.ge.idih1.and.idihed.le.idih2)then ++ ++ jdihed=jdihed+1 ++ if(jdihed.le.mxdihd)then ++ ++ listdih(jdihed,1)=ldihed+kdihed ++ listdih(jdihed,2)=lstdih(ldihed+kdihed,1) ++ x +isite ++ listdih(jdihed,3)=lstdih(ldihed+kdihed,2) ++ x +isite ++ listdih(jdihed,4)=lstdih(ldihed+kdihed,3) ++ x +isite ++ listdih(jdihed,5)=lstdih(ldihed+kdihed,4) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,61) ++ ++c construct inversion potential list ++ ++ do linver=1,numinv(itmols) ++ ++ iinver=iinver+1 ++ ++ if(iinver.ge.iinv1.and.iinver.le.iinv2)then ++ ++ jinver=jinver+1 ++ if(jinver.le.mxinv)then ++ ++ listinv(jinver,1)=linver+kinver ++ listinv(jinver,2)=lstinv(linver+kinver,1) ++ x +isite ++ listinv(jinver,3)=lstinv(linver+kinver,2) ++ x +isite ++ listinv(jinver,4)=lstinv(linver+kinver,3) ++ x +isite ++ listinv(jinver,5)=lstinv(linver+kinver,4) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,77) ++ ++c construct tethered atoms interaction list ++ ++ do lteths=1,numteth(itmols) ++ ++ iteths=iteths+1 ++ ++ if(iteths.ge.itet1.and.iteths.le.itet2)then ++ ++ jteths=jteths+1 ++ if(jteths.le.msteth)then ++ ++ listtet(jteths,1)=lteths+kteths ++ listtet(jteths,2)=lsttet(lteths+kteths)+isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,63) ++ ++c construct core-shell list ++ ++ do lshels=1,numshl(itmols) ++ ++ ishels=ishels+1 ++ ++ if(ishels.ge.ishl1.and.ishels.le.ishl2)then ++ ++ jshels=jshels+1 ++ if(jshels.le.mxshl)then ++ ++ listshl(jshels,1)=lshels+kshels ++ listshl(jshels,2)=lstshl(lshels+kshels,1) ++ x +isite ++ listshl(jshels,3)=lstshl(lshels+kshels,2) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,59) ++ ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ kbonds=kbonds+numbonds(itmols) ++ kangle=kangle+numang(itmols) ++ kdihed=kdihed+numdih(itmols) ++ kinver=kinver+numinv(itmols) ++ kteths=kteths+numteth(itmols) ++ kshels=kshels+numshl(itmols) ++ ++ enddo ++ ++c store array counters for bookkeeping ++ ++ ntbond=ibonds ++ ntangl=iangle ++ ntdihd=idihed ++ ntinv=iinver ++ ntteth=iteths ++ ntshl=ishels ++ ++c pass bond constraint information to other nodes ++ ++ if(ntcon0.gt.0)then ++ ++ ntcons=ntcon0 ++ ++c find starting site no. and constraint no. for each molec. type ++ ++ msite(1)=0 ++ mconst(1)=0 ++ ++ do itmols=2,ntpmls ++ ++ msite(itmols)=msite(itmols-1)+numsit(itmols-1)* ++ x nummols(itmols-1) ++ mconst(itmols)=mconst(itmols-1)+numcon(itmols-1) ++ ++ enddo ++ ++c sort molecules into ascending order of number of constraints ++ ++ do i=1,ntpmls ++ ++ itest(i)=numcon(i) ++ index(i)=0 ++ ++ enddo ++ ++ call shellsort(ntpmls,itest) ++ ++ do i=1,ntpmls ++ ++ lchk=.true. ++ do j=1,ntpmls ++ ++ if(itest(i).eq.numcon(j))then ++ ++ if(lchk)then ++ index(i)=j ++ lchk=.false. ++ ++ endif ++ ++ do ii=1,i-1 ++ if(index(ii).eq.j)lchk=.true. ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c load balance to within 10% ++ ++ tol=1.0d0+(0.10d0)/2.d0 ++ kcons=(ntcons)/mxnode ++ ntmp=0 ++ ++c find smallest constrained molecule to allocate to a node ++ ++ do i=1,ntpmls ++ ++ if(ntmp.le.mxnode)then ++ ++ if(numcon(index(i)).gt.0)then ++ ntmp=ntmp+nummols(index(i)) ++ klo=max(0,kcons-numcon(index(i))/2) ++ khi=klo+numcon(index(i))+1 ++ endif ++ ++ endif ++ ++ enddo ++ ++c reset hi/lo limits if molecules contain too many constraints ++ ++ if(dble(khi)/dble(max(1,klo)).gt.tol)then ++ klo=nint(dble(kcons)/tol) ++ khi=nint(dble(kcons)*tol)+1 ++ endif ++ ++c store lo value for later ++ ++ klo0=klo ++ ++c begin assignment of constraints ---------------------------------- ++ ++ ifail=-1 ++ lfail=.true. ++ do while(lfail) ++ ++ ifail=ifail+1 ++ ++ if(ifail.gt.ntpmls)then ++ call error(idnode,432) ++ endif ++ ++ iconst=0 ++ jconst=0 ++ kconst=0 ++ lconst=0 ++ ++c zero running totals of constraints on each processor ++ ++ do id=0,mxnode-1 ++ kscons(id)=0 ++ enddo ++ ++ iloop=0 ++ lfail=.false. ++ iconst=0 ++ jconst=0 ++ nnode=0 ++ ++c assign difficult molecules in blocks ++ ++ if(ifail.gt.0)then ++ ++ nfail=0 ++ do i=1,ifail ++ ++ ii=ntpmls+1-i ++ nfail=nfail+nummols(index(ii))*numcon(index(ii)) ++ ++ enddo ++ ++c decide on number of processors to split over ++ ++ nnode=int(dble(nfail)/dble(max(kcons,1))+1.d0/tol) ++ nnode=max(2,nnode) ++ nnode=min(nnode,mxnode) ++ ++c assign to processors 0..nnode-1 ++ ++ do id=0,nnode-1 ++ ++ nscons0=(id*nfail)/nnode+1 ++ nscons1=((id+1)*nfail)/nnode ++ ++ kscons(id)=nscons1+1-nscons0 ++ ++ enddo ++ ++c this processors block ++ ++ nscons0=(idnode*nfail)/nnode+1 ++ nscons1=((idnode+1)*nfail)/nnode ++ ++c assign in blocks ++ ++ do itmols=ntpmls,ntpmls-ifail+1,-1 ++ ++ ii=index(itmols) ++ icon=numcon(ii) ++ kconst=mconst(ii) ++ ++ do imols=1,nummols(ii) ++ ++ isite=msite(ii)+(imols-1)*numsit(ii) ++ ++c construct bond constraint list ++ ++ do lconst=1,numcon(ii) ++ ++ iconst=iconst+1 ++ ++ if(iconst.ge.nscons0.and.iconst.le.nscons1)then ++ ++ jconst=jconst+1 ++ ++ if(jconst.le.mxcons)then ++ ++ listcon(jconst,1)=lconst+kconst ++ iatom=lstcon(lconst+kconst,1)+isite ++ jatom=lstcon(lconst+kconst,2)+isite ++ ++ listcon(jconst,2)=iatom ++ listcon(jconst,3)=jatom ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c assign non-problematic molecules ++ ++ jdnode=mod(nnode+1,mxnode) ++ ++ do itmols=ntpmls-ifail,1,-1 ++ ++ ii=index(itmols) ++ icon=numcon(ii) ++ kconst=mconst(ii) ++ ++ do imols=1,nummols(ii) ++ ++ itry=0 ++ lchk=.true. ++ do while(lchk) ++ ++ if(kscons(jdnode)+icon.le.klo)then ++ ++ if(jdnode.ne.idnode)then ++ kscons(jdnode)=kscons(jdnode)+icon ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.false. ++ else ++ ++c construct bond constraint list ++ ++ isite=msite(ii)+(imols-1)*numsit(ii) ++ do lconst=1,numcon(ii) ++ ++ jconst=jconst+1 ++ ++ if(jconst.le.mxcons)then ++ ++ listcon(jconst,1)=lconst+kconst ++ iatom=lstcon(lconst+kconst,1)+isite ++ jatom=lstcon(lconst+kconst,2)+isite ++ listcon(jconst,2)=iatom ++ listcon(jconst,3)=jatom ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ kscons(jdnode)=kscons(jdnode)+icon ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.false. ++ ++ endif ++ ++ else ++ ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.true. ++ itry=itry+1 ++ ++ endif ++ ++ if(lchk.and.itry.gt.mxnode)then ++ ++ klo=kcons ++ kcons=khi ++ itry=0 ++ iloop=iloop+1 ++ ++ endif ++ ++c split molecule across nodes if have to ++ ++ if(iloop.gt.3)then ++ lfail=.true. ++ kcons=ntcons/mxnode ++ klo=klo0 ++ lchk=.false. ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c check no node has less than minimum number ++ ++ do id=0,mxnode-1 ++ if(kscons(id).lt.klo0)then ++ lfail=.true. ++ endif ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)then ++ ++ if(mxnode.gt.1)call gimax(jconst,1,idum) ++ if(idnode.eq.0)write(nrite,'(a,i10,a,i10)') ++ x 'Number of constraints found ',jconst,'Max allowed ',mxcons ++ ++ call error(idnode,41) ++ ++ endif ++ ++ nscons=kscons(idnode) ++ ++ call passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++ endif ++ ++ if(npmf(1).gt.0)then ++ ++ call passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++ endif ++ ++c pass rigid body data ++ ++ lcnb=.false. ++ if(ntcons.gt.0.and.ngrp.gt.0)then ++ ++ call passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp, ++ x numgsit) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(itest,index,msite,stat=fail(1)) ++ deallocate(mconst,kscons,listin,stat=fail(2)) ++ ++ return ++ end subroutine intlist ++ ++ subroutine ensemble_selection ++ x (directive,lens,kill,idnode,keyens,mode,taut,taup) ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the ensemble and reading ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical kill,lens ++ integer keyens,idnode,idum,mode ++ real(8) taut,taup ++ ++ if(findstring('nve',directive,idum))then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'microcanonical ensemble')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('nvt',directive,idum))then ++ ++ if(findstring('evans',directive,idum))then ++ ++ keyens=1 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Evans Gaussian temperature constraints', ++ x ' in use')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('ber',directive,idum))then ++ ++ keyens=2 ++ taut=dblstr(directive,69,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen thermostat', ++ x /,1x,'thermostat relaxation time ',1p,e12.4)") ++ x taut ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=3 ++ taut=dblstr(directive,69,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4)") ++ x taut ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ elseif(findstring('npt',directive,idum))then ++ ++ if(findstring('ber',directive,idum))then ++ ++ keyens=4 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen isotropic N-P-T', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=5 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover (Melchionna) isotropic N-P-T ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ elseif(findstring('nst',directive,idum))then ++ ++ mode=0 ++ if(findstring('block',directive,idum))mode=1 ++ if(findstring('surf',directive,idum))mode=2 ++ if(findstring('slab',directive,idum))mode=3 ++ ++ if(findstring('ber',directive,idum))then ++ ++ keyens=6 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen anisotropic N-P-T', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=7 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover (Melchionna) anisotropic N-P-T ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ if(mode.eq.0)then ++ write(nrite,"(/,1x,'NST mode 0 X<>Y<>Z')") ++ elseif(mode.eq.1)then ++ write(nrite, ++ x "(/,1x,'NST mode 1 X<>Y<>Z (rectangular block)')") ++ elseif(mode.eq.2)then ++ write(nrite, ++ x "(/,1x,'NST mode 2 X=Y<>Z (liquid surface)')") ++ elseif(mode.eq.3)then ++ write(nrite, ++ x "(/,1x,'NST mode 3 X<>Y<>Z (solid slab)')") ++ endif ++ ++ endif ++ ++ elseif(findstring('pmf',directive,idum))then ++ ++ keyens=8 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'potential of mean force calculation (NVE)')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ call error(idnode,-436) ++ kill=.true. ++ ++ endif ++ ++ return ++ end subroutine ensemble_selection ++ ++ subroutine neb_option ++ x (directive,lneb,lminopt,idnode,numneb,keytol,sprneb, ++ x opttol,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for NEB option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit ++ character*1 directive(lenrec) ++ logical lneb,lminopt,endneb,safe ++ integer numneb,idnode,keytol,i,idum ++ real(8) sprneb,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ lminopt=.true. ++ lneb=.true. ++ endneb=.false. ++ numneb=intstr(directive,lenrec,idum) ++ if(numneb.eq.0)numneb=1 ++ numneb=min(maxneb,numneb) ++ ++ hyp_units=1.d0 ++ do while(.not.endneb) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endneb',directive,idum))then ++ endneb=.true. ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('basin_1',directive,idum))then ++ call striptext(directive,lenrec,1) ++ do i=1,numneb ++ bsn_1(i)=intstr(directive,lenrec,idum) ++ enddo ++ elseif(findstring('basin_2',directive,idum))then ++ call striptext(directive,lenrec,1) ++ do i=1,numneb ++ bsn_2(i)=intstr(directive,lenrec,idum) ++ enddo ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,1x,'NEB calculation controls')") ++ write(nrite,"(/,1x,'identity of basin 1 ', ++ x 10i10)")(bsn_1(i),i=1,numneb) ++ write(nrite,"(1x,'identity of basin 2 ', ++ x 10i10)")(bsn_2(i),i=1,numneb) ++ write(nrite, ++ x "(1x,'NEB spring constant ',e12.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'energy units ',2x,a8)") ++ x sprneb,opttol,cunit ++ ++ call print_optim(keytol) ++ ++ endif ++ ++c units conversion ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ return ++ end subroutine neb_option ++ ++ subroutine bpd_option ++ x (directive,seek,lbpd,ltad,lminopt,prechk,nebgo,keybpd,idnode, ++ x nblock,ntrack,keytol,ebias,vmin,catchrad,sprneb,opttol, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for bias potential ++c dynamics option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit,seek ++ character*1 directive(lenrec) ++ logical lbpd,ltad,lminopt,prechk,endbpd,safe,nebgo ++ integer keybpd,idnode,nblock,ntrack,keytol,idum ++ real(8) ebias,vmin,catchrad,sprneb,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ if(ltad)call error(idnode,2355) ++ lminopt=.true. ++ lbpd=.true. ++ endbpd=.false. ++ cunit=" dl_poly" ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'bias potential dynamics controls')") ++ ++ if(findstring('dyn',directive,idum))then ++ ++ keybpd=1 ++ hyp_units=energy_unit() ++ ebias=dblstr(directive,lenrec,idum) ++ vmin=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ if(idnode.eq.0)write(nrite,"( ++ x 1x,'dynamics option selected ', ++ x /,1x,'bias potential E_bias (kelvin)',f10.4, ++ x /,1x,'bias potential V_min (kelvin)',f10.4 ++ x /,1x,'energy units ',2x,a8)") ++ x ebias,vmin,cunit ++ ++ elseif(findstring('path',directive,idum))then ++ ++ keybpd=2 ++ nebgo=.true. ++ hyp_units=1.d0 ++ do while(.not.endbpd) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endbpd',directive,idum))then ++ endbpd=.true. ++ elseif(findstring('pre',directive,idum))then ++ prechk=.true. ++ if(findstring('false',directive,idum))prechk=.false. ++ elseif(findstring('noneb',directive,idum))then ++ nebgo=.false. ++ elseif(findstring('target',directive,idum))then ++ call getword(seek,directive,8,lenrec) ++ call getword(seek,directive,8,lenrec) ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('ebias',directive,idum))then ++ ebias=dblstr(directive,lenrec,idum) ++ elseif(findstring('vmin',directive,idum))then ++ vmin=dblstr(directive,lenrec,idum) ++ elseif(findstring('num_block',directive,idum))then ++ nblock=intstr(directive,lenrec,idum) ++ elseif(findstring('num_track',directive,idum))then ++ ntrack=intstr(directive,lenrec,idum) ++ elseif(findstring('catch_radius',directive,idum))then ++ catchrad=dblstr(directive,lenrec,idum) ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"( ++ x 1x,'dynamics with path analysis selected', ++ x /,1x,'bias potential E_bias (kelvin)',f10.4, ++ x /,1x,'bias potential V_min (kelvin)',f10.4, ++ x /,1x,'steps per time block ',i10, ++ x /,1x,'steps per tracking block ',i10, ++ x /,1x,'configuration catch radius (A)',f10.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'atom type to be tracked ',2x,a8, ++ x /,1x,'energy units ',2x,a8)") ++ x ebias,vmin,nblock,ntrack,catchrad,opttol,seek,cunit ++ if(nebgo)write(nrite, ++ x "(1x,'NEB spring constant ',e12.4)")sprneb ++ if(prechk)write(nrite, ++ x "(1x,'transition prechecking option selected')") ++ call print_optim(keytol) ++ ++ endif ++ ++c energy unit conversions ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ endif ++ ++ return ++ end subroutine bpd_option ++ ++ subroutine tad_option ++ x (directive,ltad,lbpd,lminopt,prechk,tadall,idnode,nblock, ++ x ntrack,blkout,keytol,catchrad,sprneb,tlow,deltad,opttol, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for TAD option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit ++ character*1 directive(lenrec) ++ logical ltad,lbpd,lminopt,prechk,tadall,endtad,safe ++ integer idnode,nblock,ntrack,blkout,keytol,idum ++ real(8) catchrad,sprneb,deltad,tlow,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ if(lbpd)call error(idnode,2355) ++ lminopt=.true. ++ ltad=.true. ++ endtad=.false. ++ hyp_units=1.d0 ++ ++ do while(.not.endtad) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endtad',directive,idum))then ++ endtad=.true. ++ elseif(findstring('pre',directive,idum))then ++ prechk=.true. ++ if(findstring('false',directive,idum))prechk=.false. ++ elseif(findstring('all',directive,idum))then ++ tadall=.true. ++ if(findstring('false',directive,idum))tadall=.false. ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('num_block',directive,idum))then ++ nblock=intstr(directive,lenrec,idum) ++ elseif(findstring('num_track',directive,idum))then ++ ntrack=intstr(directive,lenrec,idum) ++ elseif(findstring('blackout',directive,idum))then ++ blkout=intstr(directive,lenrec,idum) ++ elseif(findstring('catch_radius',directive,idum))then ++ catchrad=dblstr(directive,lenrec,idum) ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('deltad',directive,idum))then ++ deltad=dblstr(directive,lenrec,idum) ++ elseif(findstring('low_temp',directive,idum))then ++ tlow=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'TAD dynamics controls' ++ x /,1x,'steps per time block ',i10, ++ x /,1x,'steps per tracking block ',i10, ++ x /,1x,'steps in blackout periods ',i10, ++ x /,1x,'configuration catch radius ',1p,e12.4, ++ x /,1x,'NEB spring constant ',e12.4, ++ x /,1x,'stopping parameter ',e12.4, ++ x /,1x,'target low temperature ',e12.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'energy units ',2x,a8)") ++ x nblock,ntrack,blkout,catchrad,sprneb,deltad, ++ x tlow,opttol,cunit ++ if(prechk)write(nrite, ++ x "(1x,'transition prechecking option selected')") ++ if(tadall)write(nrite, ++ x "(1x,'option for all basins analysis selected')") ++ call print_optim(keytol) ++ ++ endif ++ ++c energy unit conversions ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ return ++ end subroutine tad_option ++ ++ subroutine metadyn_option ++ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, ++ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, ++ x locpe_scale,ref_W_aug,h_aug,wt_Dt) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for metadynamics option ++c copyright - daresbury laboratory ++c author - w. smith jan 2011 ++c ++c note: default values are set in metafreeze_module ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lmetadyn,endmet,lstein,ltet,lglobpe,llocpe,safe ++ integer idnode,idum,ncolvar,nq4,nq6,ntet,hkey,meta_step_int ++ real(8) globpe_scale,locpe_scale,ref_W_aug,h_aug,wt_Dt ++ ++ lmetadyn=.true. ++ endmet=.false. ++ ++ do while(.not.endmet) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endmet',directive,idum))then ++ endmet=.true. ++ elseif(findstring('ncolvar',directive,idum))then ++ ncolvar=intstr(directive,lenrec,idum) ++ elseif(findstring('lstein',directive,idum))then ++ lstein=.true. ++ if(findstring('false',directive,idum))lstein=.false. ++ elseif(findstring('ltet',directive,idum))then ++ ltet=.true. ++ if(findstring('false',directive,idum))ltet=.false. ++ elseif(findstring('lglobpe',directive,idum))then ++ lglobpe=.true. ++ if(findstring('false',directive,idum))lglobpe=.false. ++ elseif(findstring('llocpe',directive,idum))then ++ llocpe=.true. ++ if(findstring('false',directive,idum))llocpe=.false. ++ elseif(findstring('globpe_scale',directive,idum))then ++ globpe_scale=dblstr(directive,lenrec,idum) ++ elseif(findstring('locpe_scale',directive,idum))then ++ locpe_scale=dblstr(directive,lenrec,idum) ++ elseif(findstring('nq4',directive,idum))then ++ nq4=intstr(directive,lenrec,idum) ++ nq4=intstr(directive,lenrec,idum) ! do twice - number in name! ++ elseif(findstring('nq6',directive,idum))then ++ nq6=intstr(directive,lenrec,idum) ++ nq6=intstr(directive,lenrec,idum) ! do twice - number in name! ++ elseif(findstring('ntet',directive,idum))then ++ ntet=intstr(directive,lenrec,idum) ++ elseif(findstring('meta_step_int',directive,idum))then ++ meta_step_int=intstr(directive,lenrec,idum) ++ elseif(findstring('ref_w_aug',directive,idum))then ++ ref_W_aug=dblstr(directive,lenrec,idum) ++ elseif(findstring('h_aug',directive,idum))then ++ h_aug=dblstr(directive,lenrec,idum) ++ elseif(findstring('hkey',directive,idum))then ++ hkey=intstr(directive,lenrec,idum) ++ elseif(findstring('wt_dt',directive,idum))then ++ wt_dt=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'metadynamics controls' ++ x /,1x,'total number of collective variables',i10, ++ x /,1x,'steinhardt parameters option (Q4/Q6)',l10, ++ x /,1x,'tetrahedral parameters option (zeta)',l10, ++ x /,1x,'global potential parameter option ',l10, ++ x /,1x,'local potential parameter option ',l10, ++ x /,1x,'global potential param. scale factor',e12.4, ++ x /,1x,'local potential param. scale factor ',e12.4)") ++ x ncolvar,lstein,ltet,lglobpe,llocpe,globpe_scale,locpe_scale ++ ++ write(nrite, ++ x "( 1x,'number of Q4 atom pair types ',i10, ++ x /,1x,'number of Q6 atom pair types ',i10, ++ x /,1x,'number of zeta atom triplet types ',i10)") ++ x nq4,nq6,ntet ++ ++ write(nrite, ++ x "( 1x,'gaussian deposition interval ',i10, ++ x /,1x,'reference gaussian height ',e12.4, ++ x /,1x,'gaussian width parameter ',e12.4, ++ x /,1x,'height control key ',i10, ++ x /,1x,'well-tempered control parameter ',e12.4)") ++ x meta_step_int,ref_W_aug,h_aug,hkey,wt_Dt ++ ++ endif ++ ++ return ++ end subroutine metadyn_option ++ ++ subroutine ewald_selection ++ x (directive,lhke,lspme,lewald,lcut,lforc,kill,idnode,keyfce, ++ x imcon,nhko,nlatt,kmax1,kmax2,kmax3,alpha,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the ewald method and reading ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lhke,lspme,lewald,lcut,lforc,kill,safe ++ integer idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2,kmax3,idum ++ integer kmaxpow2 ++ real(8) alpha,rcut,eps,tol,fac,tol1 ++ ++ lhke=findstring('hke',directive,idum) ++ lspme=findstring('spme',directive,idum) ++ lewald=findstring('ewald',directive,idum) ++ if(lewald)keyfce=2 ++ if(lspme)keyfce=12 ++ if(lhke)keyfce=14 ++ if(idnode.eq.0)open(nconf,file='CONFIG') ++ call getrec(safe,idnode,nconf) ++ call getrec(safe,idnode,nconf) ++ imcon=intstr(record,lenrec,idum) ++ imcon=intstr(record,lenrec,idum) ++ if(.not.lhke.and.(imcon.eq.0.or.imcon.eq.6))then ++ ++ call error(idnode,-180) ++ kill=.true. ++ ++ endif ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Ewald sum precision ',7x,1p,e12.4)")eps ++ ++ if(lhke)then ++ ++ nhko=min(intstr(directive,lenrec,idum),3) ++ nlatt=min(intstr(directive,lenrec,idum),2) ++ if(nlatt.eq.0)nlatt=1 ++ if(nhko.eq.0)nhko=1 ++ ++ endif ++ ++ if(.not.lcut)then ++ call error(idnode,-433) ++ kill=.true. ++ else ++ ++c retreive cell vectors ++ ++ call getrec(safe,idnode,nconf) ++ cell(1)=dblstr(record,lenrec,idum) ++ cell(2)=dblstr(record,lenrec,idum) ++ cell(3)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ cell(4)=dblstr(record,lenrec,idum) ++ cell(5)=dblstr(record,lenrec,idum) ++ cell(6)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ cell(7)=dblstr(record,lenrec,idum) ++ cell(8)=dblstr(record,lenrec,idum) ++ cell(9)=dblstr(record,lenrec,idum) ++ ++c compute alpha and the kmax ++ ++ if(lewald.or.lspme)then ++ ++ call dcell(cell,celprp) ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) ++ fac=1.d0 ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x fac=2.d0**(1.d0/3.d0) ++ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) ++ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) ++ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) ++ ++ elseif(lhke)then ++ ++ if(nhko.eq.0)then ++ if(eps.le.1.d-6)then ++ alpha=3.46d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=3.14d0/rcut ++ else ++ alpha=2.76d0/rcut ++ endif ++ elseif(nhko.eq.1)then ++ if(eps.le.1.d-6)then ++ alpha=4.37d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.08d0/rcut ++ else ++ alpha=3.75d0/rcut ++ endif ++ elseif(nhko.eq.2)then ++ if(eps.le.1.d-6)then ++ alpha=5.01d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.74d0/rcut ++ else ++ alpha=4.44d0/rcut ++ endif ++ elseif(nhko.eq.3)then ++ if(eps.le.1.d-6)then ++ alpha=5.55d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=5.28d0/rcut ++ else ++ alpha=5.00d0/rcut ++ endif ++ endif ++ alpha=alpha/dble(2*nlatt+1) ++ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 ++ call dcell(cell,celprp) ++ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) ++ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) ++ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) ++ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) ++ kmax3=1 ++ ++ endif ++ ++ endif ++ ++ else ++ ++ alpha=dblstr(directive,lenrec,idum) ++ kmax1=intstr(directive,lenrec,idum) ++ kmax2=intstr(directive,lenrec,idum) ++ ++ if(lhke)then ++ ++ kmax3=1 ++ nhko=min(intstr(directive,lenrec,idum),3) ++ nlatt=min(intstr(directive,lenrec,idum),2) ++ ++ else ++ ++ kmax3=intstr(directive,lenrec,idum) ++ ++ endif ++ ++ endif ++ ++c if spme double kmax and set to next power of 2, with current upper ++c limit of 512. ++ ++ if(lspme)then ++ ++ kmaxpow2=1 ++ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax1=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax2=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax3=2 * kmaxpow2 ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ close(nconf) ++ ++ if(lspme)then ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : SPME ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") ++ x alpha,kmax1/2,kmax2/2,kmax3/2 ++ ++ elseif(lhke)then ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : Hautman-Klein-Ewald sum ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 ',2i5)") ++ x alpha,kmax1,kmax2 ++ ++ write(nrite, ++ x "(1x,'HKE expansion order ',7x,i10, ++ x /,1x,'HKE lattice control ',7x,i10)")nhko,nlatt ++ ++ else ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : Ewald sum ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") ++ x alpha,kmax1,kmax2,kmax3 ++ ++ endif ++ ++ endif ++ ++ if(lspme)then ++ ++c Initialize fft tables ++ ++CFFTW call fftw3d_f77_create_plan ++CFFTW x (fplan,kmaxd,kmaxe,kmaxf, ++CFFTW x FFTW_FORWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) ++CFFTW ++CFFTW call fftw3d_f77_create_plan ++CFFTW x (bplan,kmaxd,kmaxe,kmaxf, ++CFFTW x FFTW_BACKWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) ++ ++CSGIC call zzfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, ++CSGIC x dummy,1,1,ffttable,dummy,dummy ) ++ ++CCRAY call ccfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, ++CCRAY x dummy,1,1,ffttable,dummy,dummy ) ++ ++ endif ++ ++ if(lspme)then ++ ++ if(kmax1.gt.kmaxd.or.kmax2.gt.kmaxe.or.kmax3.gt.kmaxf)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ elseif(lhke)then ++ ++ if(kmax2.gt.kmaxb)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ else ++ ++ if(kmax2.gt.kmaxb.or.kmax3.gt.kmaxc)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ lforc=.true. ++ ++ return ++ end subroutine ewald_selection ++ ++ subroutine print_optim(keytol) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for printing the optimisation option ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer keytol ++ ++ if(keytol.eq.0)then ++ write(nrite, ++ x "(1x,'convergence to minimum force selected')") ++ elseif(keytol.eq.1)then ++ write(nrite, ++ x "(1x,'convergence to minimum energy selected')") ++ else ++ write(nrite, ++ x "(1x,'convergence to minimum position selected')") ++ endif ++ ++ return ++ end subroutine print_optim ++ ++ function energy_unit() ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for assigning energy conversion factors ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idum ++ real(8) energy_unit ++ ++ energy_unit=1.d0 ++ if(findstring('ev',record,idum))then ++ energy_unit=9648.530821d0 ++ elseif(findstring('kev',record,idum))then ++ energy_unit=9648530.821d0 ++ elseif(findstring('kcal',record,idum))then ++ energy_unit=418.4d0 ++ elseif(findstring('kj',record,idum))then ++ energy_unit=1.d2 ++ elseif(findstring('k',record,idum))then ++ energy_unit=boltz ++ endif ++ ++ return ++ end function energy_unit ++ ++ subroutine solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for solvation option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,endsol,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ endsol=.false. ++ ++ nsolva=intstr(directive,lenrec,idum) ++ isolva=intstr(directive,lenrec,idum) ++ ++ if(nsolva.eq.0.and.isolva.eq.0)then ++ ++ do while(.not.endsol) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endsol',directive,idum))then ++ endsol=.true. ++ elseif(findstring('enddec',directive,idum))then ++ endsol=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=max(intstr(directive,lenrec,idum),1) ++ endif ++ ++ enddo ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'solvation calculation selected', ++ x /,1x,'start of solvation calculation ',i10, ++ x /,1x,'solvation calculation interval ',i10)") ++ x nsolva,isolva ++ ++ endif ++ ++ return ++ end subroutine solvation_option ++ ++ subroutine free_energy_option(directive,lfree,lfrmas,idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for free energy option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lfree,lfrmas,endfre,safe ++ integer idnode,idum ++ ++ mfree=1 ++ kfree=1 ++ lfree=.true. ++ lfrmas=.false. ++ endfre=.false. ++ ++ do while(.not.endfre) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endfre',directive,idum))then ++ endfre=.true. ++ elseif(findstring('start',directive,idum))then ++ nfrn=intstr(directive,lenrec,idum) ++ elseif(findstring('interval',directive,idum))then ++ ifrn=intstr(directive,lenrec,idum) ++ elseif(findstring('lambda',directive,idum))then ++ pfree=dblstr(directive,lenrec,idum) ++ elseif(findstring('mix',directive,idum))then ++ mfree=intstr(directive,lenrec,idum) ++ elseif(findstring('expo',directive,idum))then ++ kfree=intstr(directive,lenrec,idum) ++ elseif(findstring('reset_mass',directive,idum))then ++ lfrmas=.true. ++ if(findstring('false',directive,idum))lfrmas=.false. ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(mfree.eq.1)kfree=1 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'free energy option selected', ++ x /,1x,'start of free energy calculation ',i10, ++ x /,1x,'sampling interval ',i10, ++ x /,1x,'free energy parameter (lambda) ',f10.3, ++ x /,1x,'mixing rule selected ',i10, ++ x /,1x,'mixing rule exponent ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10, ++ x /,1x,'mass scaling option ',l10)") ++ x nfrn,ifrn,pfree,mfree,kfree,ind_fre,lfrmas ++ ++ endif ++ ++c define free energy scaling parameters ++ ++ call freegen() ++ ++ return ++ end subroutine free_energy_option ++ ++ subroutine excitation_option ++ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for excitation option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,lexcite,lghost,endexc,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ lghost=.true. ++ lexcite=.true. ++ endexc=.false. ++ ++ do while(.not.endexc) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endexc',directive,idum))then ++ endexc=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=intstr(directive,lenrec,idum) ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'excitation option selected', ++ x /,1x,'energy decomposition start ',i10, ++ x /,1x,'energy decomposition interval ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10)") ++ x nsolva,isolva,ind_fre ++ ++ endif ++ ++ return ++ end subroutine excitation_option ++ ++ subroutine switching_option ++ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for switching option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,lswitch,lghost,endswi,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ lghost=.true. ++ lswitch=.true. ++ endswi=.false. ++ niswitch=0 ++ ++ do while(.not.endswi) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endswi',directive,idum))then ++ endswi=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=intstr(directive,lenrec,idum) ++ elseif(findstring('period',directive,idum))then ++ niswitch=max(intstr(directive,lenrec,idum),2) ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(niswitch.eq.0)niswitch=nsolva ++ nswitch=nsolva ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'switching option selected', ++ x /,1x,'energy decomposition start ',i10, ++ x /,1x,'energy decomposition interval ',i10, ++ x /,1x,'switching period ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10)") ++ x nsolva,isolva,niswitch,ind_fre ++ ++ endif ++ ++ return ++ end subroutine switching_option ++ ++ end module define_system_module ++ +diff -urN dl_class_1.9.orig/srcmod/dihedral_module.f dl_class_1.9/srcmod/dihedral_module.f +--- dl_class_1.9.orig/srcmod/dihedral_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/dihedral_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1121 @@ ++ module dihedral_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining dihedral potential arrays ++c copyright - daresbury laboratory ++c ++c author - w. smith sep 2003 ++c adapted - p.-a. cazade oct 2007 : solvation, free energy, etc. ++c adapted - w.smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmdih(:,:) ++ integer, allocatable :: listdih(:,:) ++ integer, allocatable :: numdih(:),keydih(:),lstdih(:,:) ++ ++ save prmdih,listdih,numdih,keydih,lstdih ++ ++ contains ++ ++ subroutine alloc_dih_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(5) ++ ++ do i=1,5 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmdih(mxtdih,mxpdih),stat=fail(1)) ++ allocate (numdih(mxtmls),stat=fail(2)) ++ allocate (keydih(mxtdih),stat=fail(3)) ++ allocate (lstdih(mxtdih,4),stat=fail(4)) ++ allocate (listdih(mxdihd,5),stat=fail(5)) ++ ++ do i=1,5 ++ if(fail(i).gt.0)call error(idnode,1011) ++ enddo ++ ++ do i=1,mxtmls ++ numdih(i)=0 ++ enddo ++ ++ end subroutine alloc_dih_arrays ++ ++ subroutine define_dihedrals ++ x (safe,idnode,itmols,ndihed,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining dihedral angles ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,itmols,ndihed,nsite,ntmp,idih,idih1,i ++ integer iatm1,iatm2,iatm3,iatm4,idum,isite1,isite2,isite3 ++ integer isite4,ia,ja ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numdih(itmols)=numdih(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of dihedral angles', ++ x 6x,i10)")ntmp ++ write(nrite,"(/,/,1x,'dihedral angle details:', ++ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, ++ x 'index',5x,'index',5x,'f-const',7x,'angle', ++ x 8x,'trig',4x,'1-4 elec',5x,'1-4 vdw',/)") ++ endif ++ ++ idih1=numdih(itmols) ++ do idih=1,idih1 ++ ++c read dihedral bond angle potential parameters ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ iatm3=intstr(record,lenrec,idum) ++ iatm4=intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ isite3=nsite-numsit(itmols)+iatm3 ++ isite4=nsite-numsit(itmols)+iatm4 ++ ++ if(lfzsit(isite1)*lfzsit(isite2)* ++ x lfzsit(isite3)*lfzsit(isite4).ne.0)then ++ ++ numdih(itmols)=numdih(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ ndihed=ndihed+1 ++ ++ if(ndihed.gt.mxtdih)call error(idnode,60) ++ ++ if(keyword(1:4).eq.'cos ')then ++ keydih(ndihed)=1 ++ elseif(keyword(1:4).eq.'harm')then ++ keydih(ndihed)=2 ++ elseif(keyword(1:4).eq.'hcos')then ++ keydih(ndihed)=3 ++ elseif(keyword(1:4).eq.'cos3')then ++ keydih(ndihed)=4 ++ elseif(keyword(1:4).eq.'ryck')then ++ keydih(ndihed)=5 ++ elseif(keyword(1:4).eq.'rbf')then ++ keydih(ndihed)=6 ++ elseif(keyword(1:4).eq.'opls')then ++ keydih(ndihed)=7 ++ else ++ if(idnode.eq.0)write(nrite,*)message ++ call error(idnode,448) ++ endif ++ ++ lstdih(ndihed,1)=iatm1 ++ lstdih(ndihed,2)=iatm2 ++ lstdih(ndihed,3)=iatm3 ++ lstdih(ndihed,4)=iatm4 ++ prmdih(ndihed,1)=dblstr(record,lenrec,idum) ++ prmdih(ndihed,2)=dblstr(record,lenrec,idum) ++ prmdih(ndihed,3)=dblstr(record,lenrec,idum) ++ prmdih(ndihed,4)=dblstr(record,lenrec,idum) ++ prmdih(ndihed,5)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,4i10,1p,e12.4,0p,9f12.6)") ++ x keyword(1:4),(lstdih(ndihed,ia),ia=1,4), ++ x (prmdih(ndihed,ja),ja=1,mxpdih) ++ ++c convert energies to internal units and angles to radians ++ ++ prmdih(ndihed,1)=prmdih(ndihed,1)*engunit ++ ++ if(keydih(ndihed).eq.4)then ++ ++ prmdih(ndihed,2)=prmdih(ndihed,2)*engunit ++ prmdih(ndihed,3)=prmdih(ndihed,3)*engunit ++ ++ elseif(keydih(ndihed).eq.7)then ++ ++ prmdih(ndihed,2)=prmdih(ndihed,2)*engunit ++ prmdih(ndihed,3)=prmdih(ndihed,3)*engunit ++ prmdih(ndihed,4)=prmdih(ndihed,4)*engunit ++ prmdih(ndihed,5)=prmdih(ndihed,5)*(pi/180.d0) ++ ++ else ++ ++ prmdih(ndihed,2)=prmdih(ndihed,2)*(pi/180.d0) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_dihedrals ++ ++ subroutine dihfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntdihd,keyfce, ++ x dlrpot,epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe, ++ x virdih,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating dihedral energy and force ++c terms in molecular dynamics. ++c ++c version 3: scale factors for reduces electrostatic and vdw ++c 1-4 interactions. ++c ++c NOTE: assumes 1-4 interactions are in the exclude list ++c ++c block as opposed to stride version ++c ++c copyright - daresbury laboratory ++c author - w. smith mar 1992 ++c modified - t. forester dec 1993 ++c modified - t. forester jun 1995 - stress tensor added ++c modified - a. smondyrev may 2000 - ryckaert-bellemans potentials ++c modified - p.-a. cazade oct 2007 - solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect ++ logical idrive,jdrive,kdrive,ldrive ++ integer i,k,ii,kk,ntdihd,idnode,mxnode,idih1,idih2,ia,ib ++ integer ic,id,imcon,ka,kb,l,keyfce,fail1,fail2,fail3,kkk ++ real(8) phi,twopi,rtwopi,dterm,srpot ++ real(8) engdih,virdih,engc14,engs14,virs14,rrbc,xab,yab,erc,fer ++ real(8) zab,xbc,ybc,zbc,xcd,ycd,zcd,pbx,pby,pbz,pb2,rpb1,rpb2 ++ real(8) pcx,pcy,pcz,pc2,rpc1,rpc2,pbpc,cosp,sinp,rsinp,exp1 ++ real(8) gamma,fax,fay,faz,fcx,fcy,fcz,fb1x,fb1y,fb1z,fd1x,fd1y ++ real(8) fd1z,scale,xad,yad,zad,rad,chgprd,coul,fcoul,fx,fy,fz ++ real(8) ppp,dlrpot,t1,t2,vk0,vk1,vk2,gk0,gk1,gk2,epsq,engcpe ++ real(8) vircpe,rcut,rvdw,engsrp,virsrp,xac,yac,zac,vcon,fcon ++ real(8) virc14,b0,rfld0,rfld1,rfld2,alpha,a1,a2,a3,a4,a5,pp,tt ++ real(8) cou14_vir,vdw14_vir,strs(6),strs_loc(6) ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ real(8), allocatable :: xdbc(:),ydbc(:),zdbc(:) ++ real(8), allocatable :: xdcd(:),ydcd(:),zdcd(:) ++ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ ++ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ ++ data fail1,fail2,fail3/0,0,0/ ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) ++ allocate (xdbc(msbad),ydbc(msbad),zdbc(msbad),stat=fail2) ++ allocate (xdcd(msbad),ydcd(msbad),zdcd(msbad),stat=fail3) ++ if(fail1.ne.0.or.fail2.ne.0.or.fail3.ne.0) ++ x call error(idnode,1060) ++ ++ twopi=2.d0*pi ++ rtwopi=1.d0/twopi ++ safe=.true. ++ ++c check size of work arrays ++ ++ if((ntdihd-mxnode+1)/mxnode.gt.msbad) call error(idnode,421) ++ ++c block indices ++ ++ idih1=(idnode*ntdihd)/mxnode+1 ++ idih2=((idnode+1)*ntdihd)/mxnode ++ ++c initialise accumulators ++ ++ engdih=0.d0 ++ virdih=0.d0 ++ dih_fre=0.d0 ++ dih_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(3)=.true. ++ dih_sol(:)=0.d0 ++ if(lexcite)dih_exc(:)=0.d0 ++ ++ endif ++ ++ if(keyfce/2.eq.4)then ++ ++c constant terms for shifted coulombic potential ++ ++ tt=1.d0/(1.d0+pp*alpha*rcut) ++ exp1=exp(-(alpha*rcut)**2) ++ vcon=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut ++ fcon=(vcon+2.d0*(alpha/sqrpi)*exp1)/rcut ++ ++ elseif(keyfce/2.eq.5)then ++ ++c constant terms for reaction field potential ++ ++ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) ++ rfld0=b0/rcut**3 ++ rfld1=(1.d0+b0*0.5d0)/rcut ++ rfld2=rfld0*0.5d0 ++ tt=1.d0/(1.d0+pp*alpha*rcut) ++ exp1=exp(-(alpha*rcut)**2) ++ vcon=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut ++ fcon=(vcon+2.d0*(alpha/sqrpi)*exp1)/rcut-rfld0*rcut ++ vcon=vcon+rfld2*rcut**2-rfld1 ++ ++ endif ++ ++c calculate bond vectors ++ ++ ii=0 ++ do i=idih1,idih2 ++ ++ ii=ii+1 ++ ++c indices of bonded atoms ++ ++ ia=listdih(ii,2) ++ ib=listdih(ii,3) ++ ic=listdih(ii,4) ++ id=listdih(ii,5) ++ ++c define components of bond vectors ++ ++ xdab(ii)=xxx(ia)-xxx(ib) ++ ydab(ii)=yyy(ia)-yyy(ib) ++ zdab(ii)=zzz(ia)-zzz(ib) ++ ++ xdbc(ii)=xxx(ib)-xxx(ic) ++ ydbc(ii)=yyy(ib)-yyy(ic) ++ zdbc(ii)=zzz(ib)-zzz(ic) ++ ++ xdcd(ii)=xxx(ic)-xxx(id) ++ ydcd(ii)=yyy(ic)-yyy(id) ++ zdcd(ii)=zzz(ic)-zzz(id) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ call images(imcon,0,1,ii,cell,xdbc,ydbc,zdbc) ++ call images(imcon,0,1,ii,cell,xdcd,ydcd,zdcd) ++ ++c zero dihedral energy accumulator ++ ++ engdih=0.d0 ++ virdih=0.d0 ++ ++c zero scaled 1-4 electrostatic and short range potential accumulators ++ ++ engc14=0.d0 ++ virc14=0.d0 ++ engs14=0.d0 ++ virs14=0.d0 ++ vdw14_vir=0.d0 ++ cou14_vir=0.d0 ++ ++c loop over all specified dihedrals ++ ++ ii=0 ++ do i=idih1,idih2 ++ ++c define components of bond vectors ++ ++ ii=ii+1 ++ ++ xab=xdab(ii) ++ yab=ydab(ii) ++ zab=zdab(ii) ++ ++ xbc=xdbc(ii) ++ ybc=ydbc(ii) ++ zbc=zdbc(ii) ++ rrbc=1.d0/sqrt(xbc*xbc+ybc*ybc+zbc*zbc) ++ ++ xcd=xdcd(ii) ++ ycd=ydcd(ii) ++ zcd=zdcd(ii) ++ ++ xac=xab+xbc ++ yac=yab+ybc ++ zac=zab+zbc ++ ++c construct first dihedral vector ++ ++ pbx=yab*zbc-zab*ybc ++ pby=zab*xbc-xab*zbc ++ pbz=xab*ybc-yab*xbc ++ pb2=pbx*pbx+pby*pby+pbz*pbz ++ rpb1=1.d0/sqrt(pb2) ++ rpb2=rpb1*rpb1 ++ ++c construct second dihedral vector ++ ++ pcx=ybc*zcd-zbc*ycd ++ pcy=zbc*xcd-xbc*zcd ++ pcz=xbc*ycd-ybc*xcd ++ pc2=pcx*pcx+pcy*pcy+pcz*pcz ++ rpc1=1.d0/sqrt(pc2) ++ rpc2=rpc1*rpc1 ++ ++c determine dihedral angle ++ ++ pbpc=pbx*pcx+pby*pcy+pbz*pcz ++ cosp=pbpc*rpb1*rpc1 ++ sinp=(xbc*(pcy*pbz-pcz*pby)+ybc*(pbx*pcz-pbz*pcx)+ ++ x zbc*(pcx*pby-pcy*pbx))*(rpb1*rpc1*rrbc) ++ ++ phi=atan2(sinp,cosp) ++ ++c avoid singularity in sinp ++ ++ sinp=sign(max(1.d-8,abs(sinp)),sinp) ++ rsinp=1.d0/sinp ++ ++c selection of potential energy function type ++ ++ kk=listdih(ii,1) ++ ++c calculate potential energy and scalar force term ++ ++ if(keydih(kk).eq.1)then ++ ++c key=1 for torsion dihedral potential ++ ++ dterm=prmdih(kk,1)*(1.d0+cos(prmdih(kk,3)*phi- ++ x prmdih(kk,2))) ++ gamma=-rpb1*rpc1*rsinp*prmdih(kk,1)*prmdih(kk,3)* ++ x sin(prmdih(kk,3)*phi-prmdih(kk,2)) ++ ++ else if(keydih(kk).eq.2)then ++ ++c key=2 for harmonic improper dihedral ++ ++ phi=phi-prmdih(kk,2) ++ phi=phi-nint(phi*rtwopi)*twopi ++ dterm=0.5d0*prmdih(kk,1)*(phi*phi) ++ gamma=rpb1*rpc1*rsinp*prmdih(kk,1)*phi ++ ++ else if(keydih(kk).eq.3)then ++ ++c key=3 for harmonic cosine dihedral ++ ++ dterm=0.5d0*prmdih(kk,1)*(cos(phi)- ++ x cos(prmdih(kk,2)))**2 ++ gamma=-rpb1*rpc1*prmdih(kk,1)*(cos(phi)-cos(prmdih(kk,2))) ++ ++ else if(keydih(kk).eq.4)then ++ ++c key=4 for 3-term cosine dihedral ++ ++ dterm=0.5d0*(prmdih(kk,1)*(1.d0+cos(phi))+ ++ x prmdih(kk,2)*(1.d0-cos(2.d0*phi))+prmdih(kk,3)* ++ x (1.d0+cos(3.d0*phi))) ++ gamma=-rpb1*rpc1*rsinp*0.5d0*(prmdih(kk,1)*sin(phi)- ++ x 2.d0*prmdih(kk,2)*sin(2.d0*phi)+3.d0*prmdih(kk,3)* ++ x sin(3.d0*phi)) ++ ++ else if(keydih(kk).eq.5)then ++ ++c key=5 for ryckaert-bellemans potential ++c chem.phys.lett., vol.30, p.123, 1975. ++c ATTENTION !!! Modified to have trans configuration ++c correspond to phi=180 rather than ++c phi=0 as in original form. ++ ++ dterm=prmdih(kk,1)*(1.116d0-1.462d0*cos(phi)- ++ x 1.578d0*(cos(phi))**2+0.368d0*(cos(phi))**3+ ++ x 3.156d0*(cos(phi))**4+3.788d0*(cos(phi))**5) ++ gamma=prmdih(kk,1)*(1.462d0+3.156d0*cos(phi)- ++ x 1.104d0*(cos(phi))**2-12.624d0*(cos(phi))**3- ++ x 18.94d0*(cos(phi))**4)*rpb1*rpc1 ++ ++ else if(keydih(kk).eq.6)then ++ ++c key=6 for fluorinated ryckaert-bellemans potential ++c Rice at al., JCP 104, 2101, (1996). ++ ++ dterm=prmdih(kk,1)*(3.55d0-2.78d0*cos(phi)- ++ x 3.56d0*(cos(phi))**2-1.64d0*(cos(phi))**3+ ++ x 7.13d0*(cos(phi))**4+12.84d0*(cos(phi))**5+ ++ x 9.67d0*exp(-56.d0*(phi-pi)**2)) ++ gamma=(prmdih(kk,1)*(2.78d0+7.12d0*cos(phi)+ ++ x 4.92d0*(cos(phi))**2-28.52d0*(cos(phi))**3- ++ x 64.2d0*(cos(phi))**4)-1083.04d0*(phi-pi)* ++ x exp(-56.0*(phi-pi)**2))*rpb1*rpc1 ++ ++ else if(keydih(kk).eq.7)then ++ ++c key=7 for opls cosine dihedral ++ ++ phi=phi-prmdih(kk,5) ++ dterm=prmdih(kk,1)+0.5d0*(prmdih(kk,2)* ++ x (1.d0+cos(phi))+prmdih(kk,3)*(1.d0-cos(2.d0*phi))+ ++ x prmdih(kk,4)*(1.d0+cos(3.d0*phi))) ++ gamma=-0.5d0*(prmdih(kk,2)*sin(phi)-2.d0*prmdih(kk,3)* ++ x sin(2.d0*phi)+3.d0*prmdih(kk,4)*sin(3.d0*phi))*rpb1* ++ x rpc1*rsinp ++ ++ else ++ ++c undefined potential ++ ++ safe=.false. ++ dterm=0.d0 ++ gamma=0.d0 ++ ++ endif ++ ++c indices of bonded atoms ++ ++ ia=listdih(ii,2) ++ ib=listdih(ii,3) ++ ic=listdih(ii,4) ++ id=listdih(ii,5) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ kdrive=driven(ltype(ic)) ++ ldrive=driven(ltype(id)) ++ ++ endif ++ ++c set selection control for angle potential ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. ++ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ ++ x atm_fre(id).eq.0) ++ ++ if(lsolva)then ++ dih_exc(atmolt(ia))=dih_exc(atmolt(ia))+dterm ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. ++ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ dih_fre=dih_fre-dterm ++ dterm=lambda1*dterm ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. ++ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ dih_fre=dih_fre+dterm ++ dterm=lambda2*dterm ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy ++ ++ engdih=engdih+dterm ++ ++c calculate solvation energy for dihedral term ++ ++ if(lsolva)then ++ dih_sol(atmolt(ia))=dih_sol(atmolt(ia))+dterm ++ endif ++ ++c calculate atomic forces for dihedral term ++ ++ fax=gamma*((-pcy*zbc+pcz*ybc)-pbpc*rpb2*(-pby*zbc+pbz*ybc)) ++ fay=gamma*(( pcx*zbc-pcz*xbc)-pbpc*rpb2*( pbx*zbc-pbz*xbc)) ++ faz=gamma*((-pcx*ybc+pcy*xbc)-pbpc*rpb2*(-pbx*ybc+pby*xbc)) ++ ++ fcx=gamma*((-pcy*zab+pcz*yab)-pbpc*rpb2*(-pby*zab+pbz*yab)) ++ fcy=gamma*(( pcx*zab-pcz*xab)-pbpc*rpb2*( pbx*zab-pbz*xab)) ++ fcz=gamma*((-pcx*yab+pcy*xab)-pbpc*rpb2*(-pbx*yab+pby*xab)) ++ ++ fb1x=gamma*((-pby*zcd+pbz*ycd)-pbpc*rpc2*(-pcy*zcd+pcz*ycd)) ++ fb1y=gamma*(( pbx*zcd-pbz*xcd)-pbpc*rpc2*( pcx*zcd-pcz*xcd)) ++ fb1z=gamma*((-pbx*ycd+pby*xcd)-pbpc*rpc2*(-pcx*ycd+pcy*xcd)) ++ ++ fd1x=gamma*((-pby*zbc+pbz*ybc)-pbpc*rpc2*(-pcy*zbc+pcz*ybc)) ++ fd1y=gamma*(( pbx*zbc-pbz*xbc)-pbpc*rpc2*( pcx*zbc-pcz*xbc)) ++ fd1z=gamma*((-pbx*ybc+pby*xbc)-pbpc*rpc2*(-pcx*ybc+pcy*xbc)) ++ ++ fxx(ia)=fxx(ia)+fax ++ fyy(ia)=fyy(ia)+fay ++ fzz(ia)=fzz(ia)+faz ++ ++ fxx(ib)=fxx(ib)-fax-fcx+fb1x ++ fyy(ib)=fyy(ib)-fay-fcy+fb1y ++ fzz(ib)=fzz(ib)-faz-fcz+fb1z ++ ++ fxx(ic)=fxx(ic)+fcx-fb1x-fd1x ++ fyy(ic)=fyy(ic)+fcy-fb1y-fd1y ++ fzz(ic)=fzz(ic)+fcz-fb1z-fd1z ++ ++ fxx(id)=fxx(id)+fd1x ++ fyy(id)=fyy(id)+fd1y ++ fzz(id)=fzz(id)+fd1z ++ ++c stress tensor for dihedral term ++ ++ strs(1)=strs(1)+xab*fax+xbc*(fb1x-fcx)-xcd*fd1x ++ strs(2)=strs(2)+yab*fax+ybc*(fb1x-fcx)-ycd*fd1x ++ strs(3)=strs(3)+zab*fax+zbc*(fb1x-fcx)-zcd*fd1x ++ strs(4)=strs(4)+yab*fay+ybc*(fb1y-fcy)-ycd*fd1y ++ strs(5)=strs(5)+yab*faz+ybc*(fb1z-fcz)-ycd*fd1z ++ strs(6)=strs(6)+zab*faz+zbc*(fb1z-fcz)-zcd*fd1z ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then ++ ++c local energy (no virial) ++ ++ eng_loc=eng_loc+dterm ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fax ++ fyy_loc(ia)=fyy_loc(ia)+fay ++ fzz_loc(ia)=fzz_loc(ia)+faz ++ ++ fxx_loc(ib)=fxx_loc(ib)-fax-fcx+fb1x ++ fyy_loc(ib)=fyy_loc(ib)-fay-fcy+fb1y ++ fzz_loc(ib)=fzz_loc(ib)-faz-fcz+fb1z ++ ++ fxx_loc(ic)=fxx_loc(ic)+fcx-fb1x-fd1x ++ fyy_loc(ic)=fyy_loc(ic)+fcy-fb1y-fd1y ++ fzz_loc(ic)=fzz_loc(ic)+fcz-fb1z-fd1z ++ ++ fxx_loc(id)=fxx_loc(id)+fd1x ++ fyy_loc(id)=fyy_loc(id)+fd1y ++ fzz_loc(id)=fzz_loc(id)+fd1z ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xab*fax+xbc*(fb1x-fcx)-xcd*fd1x ++ strs_loc(2)=strs_loc(2)+yab*fax+ybc*(fb1x-fcx)-ycd*fd1x ++ strs_loc(3)=strs_loc(3)+zab*fax+zbc*(fb1x-fcx)-zcd*fd1x ++ strs_loc(4)=strs_loc(4)+yab*fay+ybc*(fb1y-fcy)-ycd*fd1y ++ strs_loc(5)=strs_loc(5)+yab*faz+ybc*(fb1z-fcz)-ycd*fd1z ++ strs_loc(6)=strs_loc(6)+zab*faz+zbc*(fb1z-fcz)-zcd*fd1z ++ ++ endif ++ ++c calculate 1-4 dihedral interactions (coulombic and short ranged) ++c assumes 1-4 interactions are in the exclude list ++ ++ kk=listdih(ii,1) ++ ++c bypass OPLS 1-4 terms (not present) ++ ++ if(keydih(kk).ne.7)then ++ ++c 1-4 electrostatics : adjust by weighting factor ++ ++ scale=prmdih(kk,4) ++ ++ xad=xac+xcd ++ yad=yac+ycd ++ zad=zac+zcd ++ ++ rad=sqrt(xad**2+yad**2+zad**2) ++ ++c scaled charge product*dielectric ++ ++ chgprd=scale*chge(ia)*chge(id)*r4pie0 ++ coul=0.d0 ++ fcoul=0.d0 ++ ++c truncation of potential for all schemes except ewald sum ++ ++ if(abs(chgprd).gt.1.d-10.and.keyfce.gt.0)then ++ ++c electrostatics by ewald sum ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6.or.keyfce/2.eq.7)then ++ ++ coul=chgprd/(epsq*rad) ++ fcoul=coul/(rad**2) ++ ++c distance dependent dielectric ++ ++ elseif(rcut.gt.rad)then ++ ++ if(keyfce/2.eq.2)then ++ ++ coul=chgprd/(epsq*rad**2) ++ fcoul=2.0d0*coul/(rad**2) ++ ++c unmodified coulombic ++ ++ else if(keyfce/2.eq.3)then ++ ++ coul=chgprd/(epsq*rad) ++ fcoul=coul/(rad**2) ++ ++c truncated and shifted coulombic ++ ++ else if(keyfce/2.eq.4)then ++ ++ tt=1.d0/(1.d0+pp*alpha*rad) ++ exp1=exp(-(alpha*rad)**2) ++ erc=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rad ++ fer=(erc+2.d0*(alpha/sqrpi)*exp1)/rad**2 ++ ++c calculate potential energy and forces ++ ++ coul=chgprd*(erc-vcon+fcon*(rad-rcut))/epsq ++ fcoul=chgprd*(fer-fcon/rad)/epsq ++ ++c reaction field ++ ++ else if(keyfce/2.eq.5)then ++ ++ tt=1.d0/(1.d0+pp*alpha*rad) ++ exp1=exp(-(alpha*rad)**2) ++ erc=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rad ++ fer=(erc+2.d0*(alpha/sqrpi)*exp1)/rad**2 ++ coul=chgprd*(erc-vcon+fcon*(rad-rcut)+ ++ x rfld2*rad*rad-rfld1) ++ fcoul=chgprd*(fer-fcon/rad-rfld0) ++ ++ elseif(keyfce/2.eq.0)then ++ ++ coul=0.d0 ++ fcoul=0.d0 ++ ++ else ++ ++ call error(idnode,446) ++ ++ endif ++ ++ endif ++ ++c set selection control for coulombic 1-4 terms ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(ia),atmolt(id)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(id).ne.1))then ++ ++c set selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(id).eq.0) ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou14_vir=cou14_vir+fcoul*rad**2 ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou14_vir=cou14_vir-fcoul*rad**2 ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c electrostatic energy and virial for 1-4 term ++ ++ engc14=engc14+coul ++ virc14=virc14-fcoul*rad**2 ++ ++c solvation energy for coulombic 1-4 term ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c coulombic force for 1-4 term ++ ++ fx=fcoul*xad ++ fy=fcoul*yad ++ fz=fcoul*zad ++ ++ fxx(ia)=fxx(ia)+fx ++ fyy(ia)=fyy(ia)+fy ++ fzz(ia)=fzz(ia)+fz ++ ++ fxx(id)=fxx(id)-fx ++ fyy(id)=fyy(id)-fy ++ fzz(id)=fzz(id)-fz ++ ++c stress tensor for coulombic 1-4 term ++ ++ strs(1)=strs(1)+xad*fx ++ strs(2)=strs(2)+xad*fy ++ strs(3)=strs(3)+xad*fz ++ strs(4)=strs(4)+yad*fy ++ strs(5)=strs(5)+yad*fz ++ strs(6)=strs(6)+zad*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.ldrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-fcoul*rad**2 ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fx ++ fyy_loc(ia)=fyy_loc(ia)+fy ++ fzz_loc(ia)=fzz_loc(ia)+fz ++ ++ fxx_loc(id)=fxx_loc(id)-fx ++ fyy_loc(id)=fyy_loc(id)-fy ++ fzz_loc(id)=fzz_loc(id)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xad*fx ++ strs_loc(2)=strs_loc(2)+xad*fy ++ strs_loc(3)=strs_loc(3)+xad*fz ++ strs_loc(4)=strs_loc(4)+yad*fy ++ strs_loc(5)=strs_loc(5)+yad*fz ++ strs_loc(6)=strs_loc(6)+zad*fz ++ ++ endif ++ ++ endif ++ ++c 1-4 short ranged : adjust by weighting factor ++ ++ scale=prmdih(kk,5) ++ gamma=0.d0 ++ ++ if(mod(keyfce,2).eq.1)then ++ ++c atomic and potential function indices ++ ++ ka=max(ltype(ia),ltype(id)) ++ kb=min(ltype(ia),ltype(id)) ++ k=lstvdw((ka*(ka-1))/2+kb) ++ ++ if(abs(scale*vvv(1,k)).gt.1.d-10)then ++ ++c apply truncation of potential ++ ++ if(rvdw.gt.rad)then ++ ++c determine interpolation panel for force arrays ++ ++ l=int(rad/dlrpot) ++ ppp=rad/dlrpot-dble(l) ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0=vvv(l,k) ++ vk1=vvv(l+1,k) ++ vk2=vvv(l+2,k) ++ ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ ++ srpot=scale*(t1+(t2-t1)*ppp*0.5d0) ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=ggg(l,k) ++ gk1=ggg(l+1,k) ++ gk2=ggg(l+2,k) ++ ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ ++ gamma=scale*(t1+(t2-t1)*ppp*0.5d0)/(rad**2) ++ ++c set selection control for short ranged 1-4 terms ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(ia),atmolt(id)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(id).ne.1))then ++ ++c set selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(id).eq.0) ++ ++ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+srpot ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ vdw_fre=vdw_fre-srpot ++ vdw14_vir=vdw14_vir+gamma*rad**2 ++ srpot=lambda1*srpot ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ vdw_fre=vdw_fre+srpot ++ vdw14_vir=vdw14_vir-gamma*rad**2 ++ srpot=lambda2*srpot ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c short ranged energy and virial for 1-4 term ++ ++ engs14=engs14+srpot ++ virs14=virs14-gamma*rad**2 ++ ++c solvation energy for short ranged 1-4 term ++ ++ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+srpot ++ ++c short ranged forces for 1-4 term ++ ++ fx=gamma*xad ++ fy=gamma*yad ++ fz=gamma*zad ++ ++ fxx(ia)=fxx(ia)+fx ++ fyy(ia)=fyy(ia)+fy ++ fzz(ia)=fzz(ia)+fz ++ ++ fxx(id)=fxx(id)-fx ++ fyy(id)=fyy(id)-fy ++ fzz(id)=fzz(id)-fz ++ ++c stress tensor for short ranged 1-4 term ++ ++ strs(1)=strs(1)+xad*fx ++ strs(2)=strs(2)+xad*fy ++ strs(3)=strs(3)+xad*fz ++ strs(4)=strs(4)+yad*fy ++ strs(5)=strs(5)+yad*fz ++ strs(6)=strs(6)+zad*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.ldrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+srpot ++ vir_loc=vir_loc-gamma*rad**2 ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fx ++ fyy_loc(ia)=fyy_loc(ia)+fy ++ fzz_loc(ia)=fzz_loc(ia)+fz ++ ++ fxx_loc(id)=fxx_loc(id)-fx ++ fyy_loc(id)=fyy_loc(id)-fy ++ fzz_loc(id)=fzz_loc(id)-fz ++ ++c stress tensor for short ranged 1-4 term ++ ++ strs_loc(1)=strs_loc(1)+xad*fx ++ strs_loc(2)=strs_loc(2)+xad*fy ++ strs_loc(3)=strs_loc(3)+xad*fz ++ strs_loc(4)=strs_loc(4)+yad*fy ++ strs_loc(5)=strs_loc(5)+yad*fz ++ strs_loc(6)=strs_loc(6)+zad*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c sum contributions to potentials ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engdih ++ buffer(2)=engc14 ++ buffer(3)=virc14 ++ buffer(4)=engs14 ++ buffer(5)=virs14 ++ buffer(6)=dih_fre ++ buffer(7)=dih_vir ++ buffer(8)=vdw14_vir ++ buffer(9)=cou14_vir ++ call gdsum(buffer(1),9,buffer(10)) ++ engdih=buffer(1) ++ engc14=buffer(2) ++ virc14=buffer(3) ++ engs14=buffer(4) ++ virs14=buffer(5) ++ dih_fre=buffer(6) ++ dih_vir=buffer(7) ++ vdw14_vir=buffer(8) ++ cou14_vir=buffer(9) ++ ++ if(lsolva)then ++ ++ call gdsum(dih_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(dih_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ engcpe=engcpe+engc14 ++ vircpe=vircpe+virc14 ++ engsrp=engsrp+engs14 ++ virsrp=virsrp+virs14 ++ vdw_vir=vdw_vir+vdw14_vir ++ cou_vir=cou_vir+cou14_vir ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,448) ++ ++ deallocate (xdab,ydab,zdab,stat=fail1) ++ deallocate (xdbc,ydbc,zdbc,stat=fail2) ++ deallocate (xdcd,ydcd,zdcd,stat=fail3) ++ ++ return ++ end subroutine dihfrc ++ ++ end module dihedral_module +diff -urN dl_class_1.9.orig/srcmod/dlpoly.f dl_class_1.9/srcmod/dlpoly.f +--- dl_class_1.9.orig/srcmod/dlpoly.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/dlpoly.f 2015-11-09 15:05:00.200575192 +0100 +@@ -0,0 +1,975 @@ ++ program dlpoly_classic ++ ++c*********************************************************************** ++c ++c dl_poly classic is an stfc/ccp5 program package for the ++c dynamical simulation of molecular systems. ++c ++c dl_poly is the copyright of the stfc daresbury laboratory, ++c daresbury, warrington wa4 4ad. ++c ++c neither the stfc, daresbury laboratory, ccp5 nor the authors ++c of this package claim that it is free from errors and do not ++c accept liability for any loss or damage that may arise from ++c its use. it is the users responsibility to verify that the ++c package dl_poly is fit for the purpose the user intends for ++c it. ++c ++c users of this package are recommended to consult the dl_poly ++c user manual for the full description of its use and purpose. ++c ++c authors: w.smith and t.r.forester 1995 ++c copyright daresbury laboratory 1995 ++c ++c DL_POLY CLASSIC VERSION 1.9 ++c ++c*********************************************************************** ++ ++c declare required modules ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use define_system_module ++ use dihedral_module ++ use driver_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use forces_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use integrator_module ++ use inversion_module ++ use metal_module ++ use metafreeze_module ++ use nlist_builders_module ++ use pair_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ character*1 hms,dec ++ character*8 seek ++ ++ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle ++ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb ++ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd ++ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch ++ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect ++ ++ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn ++ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt ++ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj ++ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw ++ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp ++ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k ++ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit ++ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode ++ integer natms2,ntghost,nsolva,isolva,nofic ++ ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd ++ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint ++ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter ++ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom ++ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf ++ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim ++ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen ++ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol ++ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit ++ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl ++ real(8) engord,virord ++c PLUMED modifications ++ real(8) energyUnits,lengthUnits,timeUnits ++ integer(8) get_comms ++c PLUMED modifications ++ ++ real(8), allocatable :: tbuffer(:) ++ integer :: plumedavaiable ++ ++ data timelp/0.d0/,lminnow/.false./,ntrack/10/ ++ data npage,lines/8,0/,recycle/.true./ ++ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ ++ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ ++ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ ++ ++c set up the communications ++ ++ call initcomms() ++ call gsync() ++ ++c determine processor identities ++ ++ call machine(idnode,mxnode) ++ ++c activate for limited-life executable ++ ++CBOMB call bomb(idnode,2008,6,30) ++ ++ allocate (tbuffer(10),stat=memr) ++ ++ call parset(redirect,idnode,mxnode,tbuffer) ++ ++c open main printing file ++ ++ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') ++ if(idnode.eq.0) write (nrite, ++ x "(/,20x,'DL_POLY Classic 1.9', ++ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode ++ ++c allocate arrays for each function ++ ++ call alloc_ang_arrays(idnode) ++ call alloc_bnd_arrays(idnode) ++ call alloc_config_arrays(idnode) ++ call alloc_csh_arrays(idnode) ++ call alloc_dih_arrays(idnode) ++ call alloc_ewald_arrays(idnode) ++ call alloc_exc_arrays(idnode) ++ call alloc_exi_arrays(idnode) ++ call alloc_fbp_arrays(idnode) ++ call alloc_fld_arrays(idnode) ++ call alloc_free_arrays(idnode) ++ call alloc_hke_arrays(idnode) ++ call alloc_hyper_arrays(idnode) ++ call alloc_inv_arrays(idnode) ++ call alloc_met_arrays(idnode) ++ call alloc_pair_arrays(idnode) ++ call alloc_pmf_arrays(idnode) ++ call alloc_prp_arrays(idnode) ++ call alloc_rgbdy_arrays(idnode) ++ call alloc_shake_arrays(idnode) ++ call alloc_site_arrays(idnode) ++ call alloc_sol_arrays(idnode) ++ call alloc_spme_arrays(idnode) ++ call alloc_tbp_arrays(idnode) ++ call alloc_ter_arrays(idnode) ++ call alloc_tet_arrays(idnode) ++ call alloc_vdw_arrays(idnode) ++ ++c start clock ++ ++ call timchk(0,tzero) ++ ++c input the control parameters defining the simulation ++ ++ call simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c input the system force field ++ ++ call sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) ++ ++c construct initial configuration of system ++ ++ call sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c construct initial bookkeeping arrays ++ ++ call sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c reset atom numbers for excitation simulation ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c set initial system temperature ++ ++ call systemp ++ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c read thermodynamic and structural data from restart file ++ ++ call sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c metadynamics by d. quigley ++ ++ if(lmetadyn) then ++ ++c make copy of excluded atom list for use by metadynamics ++ call exclude_copy_mtd(idnode) ++ ++c initialise metadynamics, read order parameter definitions etc. ++ call define_metadynamics(idnode,mxnode,natms,ntpatm,temp) ++ ++ end if ++ ++c synchronise LRC, SIC and system charge terms for switching ++ ++ llswitch=.false. ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod((nstep-nswitch)/niswitch,2).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.true. ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c PLUMED modifications ++ if(lplumed)then ++ ++ call plumed_f_installed(plumedavaiable) ++ ++ if (plumedavaiable<=0) then ++ if(idnode.eq.0) write(nrite,*)"PLUMED NOT AVAILABLE" ++ stop ++ else ++ call plumed_f_gcreate() ++ call plumed_f_gcmd("setMPIFComm"//char(0),get_comms()) ++ call plumed_f_gcmd("setRealPrecision"//char(0),8) ++ energyUnits=0.01 ++ lengthUnits=0.1 ++ timeUnits=1 ++ call plumed_f_gcmd("setMDEnergyUnits"//char(0),energyUnits) ++ call plumed_f_gcmd("setMDLengthUnits"//char(0),lengthUnits) ++ call plumed_f_gcmd("setMDTimeUnits"//char(0),timeUnits) ++ call plumed_f_gcmd("setPlumedDat"//char(0),"plumed.dat"//char(0)) ++ call plumed_f_gcmd("setLogFile"//char(0),"PLUMED.OUT"//char(0)) ++ call plumed_f_gcmd("setNatoms"//char(0),natms) ++ call plumed_f_gcmd("setMDEngine"//char(0),"dlpoly2.20"//char(0)) ++ call plumed_f_gcmd("setTimestep"//char(0),tstep) ++ call plumed_f_gcmd("init"//char(0),0) ++ end if ++ endif ++ ++c PLUMED modifications ++ ++c zero long range component of stress ++ ++ do i=1,9 ++ stresl(i)=0.d0 ++ enddo ++ ++c zero contraint terms ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ if(lminim.or.loptim.or.ntcons.eq.0)then ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c define target kinetic energy ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++c metadynamics by d. quigley ++ ++ sigma_shl=boltz*degshl*0.5d0 ++ ++c convert BPD parameters to internal units ++ ++ if(lbpd)then ++ ++ ebias=0.5d0*boltz*degfre*ebias ++ vmin=0.5d0*boltz*degfre*vmin ++ ++ endif ++ ++c time check ++ ++ call timchk(1,tzero) ++ ++c control variable for structure optimizer ++ ++ keystr=0 ++ stropt=.false. ++ ++ if(lminim)then ++ ++c first step of minimisation programme ++ ++ if(idnode.eq.0)write(nrite,"(1x,120('-'))") ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++c calculate initial conditions for velocity verlet ++ ++ elseif(keyver.eq.1.and.nstep.eq.0)then ++ ++c kinetic stress tensor at start ++ ++ call dcell(cell,celprp) ++ width=min(celprp(7),celprp(8),celprp(9)) ++ call kinstress(natms,idnode,mxnode,stress) ++ engke=0.5d0*(stress(1)+stress(5)+stress(9)) ++ do i=1,9 ++ stress(i)=stress(i)/dble(mxnode) ++ enddo ++ ++c calculate initial forces ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++ endif ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++c construct the first reference state ++ ++ call hyper_start ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, ++ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, ++ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, ++ x hyp_units) ++ ++ endif ++ ++c perform selected NEB calculation ++ ++ if(lneb)then ++ ++ do i=1,numneb ++ ++ call neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), ++ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++ call scan_profile(nturn,estar) ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(1x,120('-'))") ++ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') ++ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ enddo ++ ++c bypass the MD cycle for this option ++ ++ recycle=.false. ++ ++ endif ++ ++c*********************************************************************** ++c start of molecular dynamics calculations ++c*********************************************************************** ++ ++ do while(recycle) ++ ++c increase step counter ++ ++ nstep=nstep+1 ++ recycle=(nstep.lt.nstrun) ++ ++c store velocities for free energy or solvation simulation ++ ++ if(keyver.eq.0)then ++ ++ if(lsolva)then ++ ++ vxo_sol(:)=vxx(:) ++ vyo_sol(:)=vyy(:) ++ vzo_sol(:)=vzz(:) ++ ++ elseif(lfree)then ++ ++ vxo_fre(:)=vxx(:) ++ vyo_fre(:)=vyy(:) ++ vzo_fre(:)=vzz(:) ++ ++ endif ++ ++ endif ++ ++c molecular switching option for excitation ++ ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod(nstep-nswitch,niswitch).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.not.llswitch ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c switch on the minimiser ++ ++ if(lminim)then ++ ++ lminnow=(mod(nstep,minstp).eq.0) ++ ++ endif ++ ++c conserved quantity (other than K + U) ++ ++ consv=0.d0 ++ ++c energy accumulators ++ ++ if(.not.lminnow)then ++ ++ engke=0.d0 ++ engrot=0.d0 ++ ++ endif ++ ++c calculate volume of simulation cell ++ ++ if(imcon.ne.0.and.imcon.ne.6)then ++ ++ call dcell(cell,celprp) ++ volm=celprp(10) ++ if(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ endif ++ ++ else ++ ++ volm=0.d0 ++ ++ endif ++ ++c reset sutton chen long range corrections (constant pressure only) ++ ++ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++c activate the impact option at designated time step ++ ++ if(lhit.and.nstep.eq.nhit)call impact ++ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) ++ ++c integrate equations of motion stage 1 of velocity verlet ++ ++ if(keyver.gt.0)then ++ ++ isw=1 ++ if(.not.loptim)then ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++ call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++ endif ++ ++ if(lminnow)then ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++ elseif(loptim.or.keyshl.ne.2)then ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++ else ++ ++ call shell_relaxation ++ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, ++ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, ++ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, ++ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, ++ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, ++ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, ++ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, ++ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, ++ x pass1,pass2,engord,virord) ++ ++ endif ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++c switching option for excitation simulation ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++c integrate equations of motion ++ ++ if(keyver.eq.0)then ++ ++c integrate equations of motion by leapfrog verlet ++ ++ if(.not.(loptim.or.lminnow))call lf_integrate ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) ++ ++ else if(keyver.gt.0)then ++ ++c integrate equations of motion by velocity verlet (stage 2) ++ ++ isw=2 ++ if(.not.loptim)call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ endif ++ ++c update the atomic positions for the ghost molecule ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++c long range correction adjustment for free energy and solvation ++ ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++c application of transition analysis procedures ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++ engtke=engke+engrot ++ call hyper_driver ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, ++ x tolnce,hyp_units,ebias,vmin) ++ ++ endif ++ ++c reset average boost factor in BPD during equilibration ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numbpd=0 ++ tboost=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate shell kinetic energy ++ ++ if(keyshl.eq.1)then ++ ++ call corshl(idnode,mxnode,ntshl,shlke) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++c apply temperature scaling ++ ++ if((ltscal.and.nstep.le.nsteql).and. ++ x mod(nstep-nsteql,nstbts).eq.0)then ++ ++ chit=0.d0 ++ chit_shl=0.d0 ++ chip=0.d0 ++ do i=1,9 ++ eta(i)=0.d0 ++ enddo ++ ++ if(keyshl.eq.1) then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c reset atom velocities at intervals if required ++ ++ if(newgau)then ++ ++ if(mod(nstep,numgau).eq.0)call regauss ++ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++ endif ++ ++c calculate physical quantities ++ ++ if(nstep.gt.0)call static ++ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) ++ ++c z density calculation ++ ++ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then ++ ++ call zden0(idnode,natms,mxnode,nzden,zlen) ++ ++ endif ++ ++c terminate program if boundary conditions violated ++ ++ if(imcon.gt.0.and.rcut.gt.width)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ call error(idnode,95) ++ ++ endif ++ ++c line-printer output every nstbpo steps ++ ++ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then ++ ++ call timchk(0,timelp) ++ if(idnode.eq.0)then ++ ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) ++ if(mod(lines,npage).eq.0) ++ x write(nrite,"(1x,120('-'), ++ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, ++ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', ++ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, ++ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', ++ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', ++ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, ++ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', ++ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', ++ x 7x,'press',/,/, ++ x 1x,120('-'))") ++ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)") ++ x nstep,(stpval(i),i=1,9), ++ x simtim,dec,(stpval(i),i=10,18), ++ x prntim,hms,(stpval(i),i=19,27) ++ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', ++ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ lines=lines+1 ++ ++ endif ++ ++c report end of equilibration period ++ ++ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then ++ ++ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) ++ x write(nrite,"(/,/,1x,'switching off temperature ', ++ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep ++ ltscal=.false. ++ ++ endif ++ ++c write trajectory data ++ ++ if(ltraj.and.nstep.ge.nstraj) then ++ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then ++ ++ call traject ++ x (ltraj,idnode,imcon,istraj,keytrj,natms, ++ x nstraj,nstep,tstep) ++ ++ endif ++ ++ endif ++ ++c write solvation energy file ++ ++ if(lsolva.and.nstep.ge.nsolva)then ++ ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ call solva_temp(idnode,mxnode,natms2,keyver) ++ call solvation_write(lexcite,lswitch,idnode,natms, ++ x nstep,nsolva,isolva,tstep,engunit,elrc) ++ ++ endif ++ ++ endif ++ ++c write free energy file ++ ++ if(lfree.and.nstep.ge.nfrn)then ++ ++ if(mod(nstep-nfrn,ifrn).eq.0)then ++ ++ call free_kinetic(lfrmas,idnode,mxnode,keyver) ++ call free_energy_write(idnode,nstep,engunit) ++ ++ endif ++ ++ endif ++ ++c save restart data in event of system crash ++ ++ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++ endif ++ ++c cycle time check ++ ++ call timchk(0,timelp) ++ recycle=(recycle.and.timjob-timelp.gt.timcls) ++ ++ enddo ++ ++c*********************************************************************** ++c end of molecular dynamics calculations ++c*********************************************************************** ++ ++c last time check ++ ++ call timchk(0,timelp) ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, ++ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") ++ x timelp,prntim,hms,timcls ++ ++c shell relaxation convergence statistics ++ ++ if(.not.loptim.and.keyshl.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'shell relaxation statistics : average cycles = ', ++ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 ++ ++ endif ++ ++c produce summary of simulation ++ ++ levcfg=2 ++ if(loptim)levcfg=0 ++ if(.not.lneb)call result ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, ++ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, ++ x chit_shl) ++ ++c PLUMED ++ if(lplumed) call plumed_f_gcmd() ++c PLUMED ++ ++c write hyperdynamics restart file ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++c close output channels ++ ++ if(idnode.eq.0) then ++ ++ close (nrite) ++ close (nstats) ++ close (nhist) ++ close (nevnt) ++ ++ endif ++ ++c terminate job ++ ++ call exitcomms() ++ ++ end +diff -urN dl_class_1.9.orig/srcmod/dlpoly.f.preplumed dl_class_1.9/srcmod/dlpoly.f.preplumed +--- dl_class_1.9.orig/srcmod/dlpoly.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/dlpoly.f.preplumed 2012-04-24 18:30:31.000000000 +0200 +@@ -0,0 +1,936 @@ ++ program dlpoly_classic ++ ++c*********************************************************************** ++c ++c dl_poly classic is an stfc/ccp5 program package for the ++c dynamical simulation of molecular systems. ++c ++c dl_poly is the copyright of the stfc daresbury laboratory, ++c daresbury, warrington wa4 4ad. ++c ++c neither the stfc, daresbury laboratory, ccp5 nor the authors ++c of this package claim that it is free from errors and do not ++c accept liability for any loss or damage that may arise from ++c its use. it is the users responsibility to verify that the ++c package dl_poly is fit for the purpose the user intends for ++c it. ++c ++c users of this package are recommended to consult the dl_poly ++c user manual for the full description of its use and purpose. ++c ++c authors: w.smith and t.r.forester 1995 ++c copyright daresbury laboratory 1995 ++c ++c DL_POLY CLASSIC VERSION 1.9 ++c ++c*********************************************************************** ++ ++c declare required modules ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use define_system_module ++ use dihedral_module ++ use driver_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use forces_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use integrator_module ++ use inversion_module ++ use metal_module ++ use metafreeze_module ++ use nlist_builders_module ++ use pair_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ character*1 hms,dec ++ character*8 seek ++ ++ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle ++ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb ++ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd ++ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch ++ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect ++ ++ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn ++ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt ++ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj ++ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw ++ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp ++ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k ++ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit ++ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode ++ integer natms2,ntghost,nsolva,isolva,nofic ++ ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd ++ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint ++ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter ++ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom ++ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf ++ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim ++ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen ++ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol ++ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit ++ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl ++ real(8) engord,virord ++ real(8), allocatable :: tbuffer(:) ++ ++ data timelp/0.d0/,lminnow/.false./,ntrack/10/ ++ data npage,lines/8,0/,recycle/.true./ ++ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ ++ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ ++ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ ++ ++c set up the communications ++ ++ call initcomms() ++ call gsync() ++ ++c determine processor identities ++ ++ call machine(idnode,mxnode) ++ ++c activate for limited-life executable ++ ++CBOMB call bomb(idnode,2008,6,30) ++ ++ allocate (tbuffer(10),stat=memr) ++ ++ call parset(redirect,idnode,mxnode,tbuffer) ++ ++c open main printing file ++ ++ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') ++ if(idnode.eq.0) write (nrite, ++ x "(/,20x,'DL_POLY Classic 1.9', ++ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode ++ ++c allocate arrays for each function ++ ++ call alloc_ang_arrays(idnode) ++ call alloc_bnd_arrays(idnode) ++ call alloc_config_arrays(idnode) ++ call alloc_csh_arrays(idnode) ++ call alloc_dih_arrays(idnode) ++ call alloc_ewald_arrays(idnode) ++ call alloc_exc_arrays(idnode) ++ call alloc_exi_arrays(idnode) ++ call alloc_fbp_arrays(idnode) ++ call alloc_fld_arrays(idnode) ++ call alloc_free_arrays(idnode) ++ call alloc_hke_arrays(idnode) ++ call alloc_hyper_arrays(idnode) ++ call alloc_inv_arrays(idnode) ++ call alloc_met_arrays(idnode) ++ call alloc_pair_arrays(idnode) ++ call alloc_pmf_arrays(idnode) ++ call alloc_prp_arrays(idnode) ++ call alloc_rgbdy_arrays(idnode) ++ call alloc_shake_arrays(idnode) ++ call alloc_site_arrays(idnode) ++ call alloc_sol_arrays(idnode) ++ call alloc_spme_arrays(idnode) ++ call alloc_tbp_arrays(idnode) ++ call alloc_ter_arrays(idnode) ++ call alloc_tet_arrays(idnode) ++ call alloc_vdw_arrays(idnode) ++ ++c start clock ++ ++ call timchk(0,tzero) ++ ++c input the control parameters defining the simulation ++ ++ call simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c input the system force field ++ ++ call sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) ++ ++c construct initial configuration of system ++ ++ call sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c construct initial bookkeeping arrays ++ ++ call sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c reset atom numbers for excitation simulation ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c set initial system temperature ++ ++ call systemp ++ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c read thermodynamic and structural data from restart file ++ ++ call sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c metadynamics by d. quigley ++ ++ if(lmetadyn) then ++ ++c make copy of excluded atom list for use by metadynamics ++ call exclude_copy_mtd(idnode) ++ ++c initialise metadynamics, read order parameter definitions etc. ++ call define_metadynamics(idnode,mxnode,natms,ntpatm,temp) ++ ++ end if ++ ++c synchronise LRC, SIC and system charge terms for switching ++ ++ llswitch=.false. ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod((nstep-nswitch)/niswitch,2).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.true. ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c zero long range component of stress ++ ++ do i=1,9 ++ stresl(i)=0.d0 ++ enddo ++ ++c zero contraint terms ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ if(lminim.or.loptim.or.ntcons.eq.0)then ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c define target kinetic energy ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++c metadynamics by d. quigley ++ ++ sigma_shl=boltz*degshl*0.5d0 ++ ++c convert BPD parameters to internal units ++ ++ if(lbpd)then ++ ++ ebias=0.5d0*boltz*degfre*ebias ++ vmin=0.5d0*boltz*degfre*vmin ++ ++ endif ++ ++c time check ++ ++ call timchk(1,tzero) ++ ++c control variable for structure optimizer ++ ++ keystr=0 ++ stropt=.false. ++ ++ if(lminim)then ++ ++c first step of minimisation programme ++ ++ if(idnode.eq.0)write(nrite,"(1x,120('-'))") ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++c calculate initial conditions for velocity verlet ++ ++ elseif(keyver.eq.1.and.nstep.eq.0)then ++ ++c kinetic stress tensor at start ++ ++ call dcell(cell,celprp) ++ width=min(celprp(7),celprp(8),celprp(9)) ++ call kinstress(natms,idnode,mxnode,stress) ++ engke=0.5d0*(stress(1)+stress(5)+stress(9)) ++ do i=1,9 ++ stress(i)=stress(i)/dble(mxnode) ++ enddo ++ ++c calculate initial forces ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++ endif ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++c construct the first reference state ++ ++ call hyper_start ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, ++ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, ++ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, ++ x hyp_units) ++ ++ endif ++ ++c perform selected NEB calculation ++ ++ if(lneb)then ++ ++ do i=1,numneb ++ ++ call neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), ++ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++ call scan_profile(nturn,estar) ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(1x,120('-'))") ++ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') ++ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ enddo ++ ++c bypass the MD cycle for this option ++ ++ recycle=.false. ++ ++ endif ++ ++c*********************************************************************** ++c start of molecular dynamics calculations ++c*********************************************************************** ++ ++ do while(recycle) ++ ++c increase step counter ++ ++ nstep=nstep+1 ++ recycle=(nstep.lt.nstrun) ++ ++c store velocities for free energy or solvation simulation ++ ++ if(keyver.eq.0)then ++ ++ if(lsolva)then ++ ++ vxo_sol(:)=vxx(:) ++ vyo_sol(:)=vyy(:) ++ vzo_sol(:)=vzz(:) ++ ++ elseif(lfree)then ++ ++ vxo_fre(:)=vxx(:) ++ vyo_fre(:)=vyy(:) ++ vzo_fre(:)=vzz(:) ++ ++ endif ++ ++ endif ++ ++c molecular switching option for excitation ++ ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod(nstep-nswitch,niswitch).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.not.llswitch ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c switch on the minimiser ++ ++ if(lminim)then ++ ++ lminnow=(mod(nstep,minstp).eq.0) ++ ++ endif ++ ++c conserved quantity (other than K + U) ++ ++ consv=0.d0 ++ ++c energy accumulators ++ ++ if(.not.lminnow)then ++ ++ engke=0.d0 ++ engrot=0.d0 ++ ++ endif ++ ++c calculate volume of simulation cell ++ ++ if(imcon.ne.0.and.imcon.ne.6)then ++ ++ call dcell(cell,celprp) ++ volm=celprp(10) ++ if(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ endif ++ ++ else ++ ++ volm=0.d0 ++ ++ endif ++ ++c reset sutton chen long range corrections (constant pressure only) ++ ++ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++c activate the impact option at designated time step ++ ++ if(lhit.and.nstep.eq.nhit)call impact ++ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) ++ ++c integrate equations of motion stage 1 of velocity verlet ++ ++ if(keyver.gt.0)then ++ ++ isw=1 ++ if(.not.loptim)then ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++ call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++ endif ++ ++ if(lminnow)then ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++ elseif(loptim.or.keyshl.ne.2)then ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++ else ++ ++ call shell_relaxation ++ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, ++ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, ++ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, ++ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, ++ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, ++ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, ++ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, ++ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, ++ x pass1,pass2,engord,virord) ++ ++ endif ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++c switching option for excitation simulation ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++c integrate equations of motion ++ ++ if(keyver.eq.0)then ++ ++c integrate equations of motion by leapfrog verlet ++ ++ if(.not.(loptim.or.lminnow))call lf_integrate ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) ++ ++ else if(keyver.gt.0)then ++ ++c integrate equations of motion by velocity verlet (stage 2) ++ ++ isw=2 ++ if(.not.loptim)call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ endif ++ ++c update the atomic positions for the ghost molecule ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++c long range correction adjustment for free energy and solvation ++ ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++c application of transition analysis procedures ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++ engtke=engke+engrot ++ call hyper_driver ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, ++ x tolnce,hyp_units,ebias,vmin) ++ ++ endif ++ ++c reset average boost factor in BPD during equilibration ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numbpd=0 ++ tboost=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate shell kinetic energy ++ ++ if(keyshl.eq.1)then ++ ++ call corshl(idnode,mxnode,ntshl,shlke) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++c apply temperature scaling ++ ++ if((ltscal.and.nstep.le.nsteql).and. ++ x mod(nstep-nsteql,nstbts).eq.0)then ++ ++ chit=0.d0 ++ chit_shl=0.d0 ++ chip=0.d0 ++ do i=1,9 ++ eta(i)=0.d0 ++ enddo ++ ++ if(keyshl.eq.1) then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c reset atom velocities at intervals if required ++ ++ if(newgau)then ++ ++ if(mod(nstep,numgau).eq.0)call regauss ++ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++ endif ++ ++c calculate physical quantities ++ ++ if(nstep.gt.0)call static ++ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) ++ ++c z density calculation ++ ++ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then ++ ++ call zden0(idnode,natms,mxnode,nzden,zlen) ++ ++ endif ++ ++c terminate program if boundary conditions violated ++ ++ if(imcon.gt.0.and.rcut.gt.width)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ call error(idnode,95) ++ ++ endif ++ ++c line-printer output every nstbpo steps ++ ++ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then ++ ++ call timchk(0,timelp) ++ if(idnode.eq.0)then ++ ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) ++ if(mod(lines,npage).eq.0) ++ x write(nrite,"(1x,120('-'), ++ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, ++ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', ++ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, ++ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', ++ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', ++ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, ++ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', ++ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', ++ x 7x,'press',/,/, ++ x 1x,120('-'))") ++ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)") ++ x nstep,(stpval(i),i=1,9), ++ x simtim,dec,(stpval(i),i=10,18), ++ x prntim,hms,(stpval(i),i=19,27) ++ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', ++ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ lines=lines+1 ++ ++ endif ++ ++c report end of equilibration period ++ ++ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then ++ ++ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) ++ x write(nrite,"(/,/,1x,'switching off temperature ', ++ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep ++ ltscal=.false. ++ ++ endif ++ ++c write trajectory data ++ ++ if(ltraj.and.nstep.ge.nstraj) then ++ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then ++ ++ call traject ++ x (ltraj,idnode,imcon,istraj,keytrj,natms, ++ x nstraj,nstep,tstep) ++ ++ endif ++ ++ endif ++ ++c write solvation energy file ++ ++ if(lsolva.and.nstep.ge.nsolva)then ++ ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ call solva_temp(idnode,mxnode,natms2,keyver) ++ call solvation_write(lexcite,lswitch,idnode,natms, ++ x nstep,nsolva,isolva,tstep,engunit,elrc) ++ ++ endif ++ ++ endif ++ ++c write free energy file ++ ++ if(lfree.and.nstep.ge.nfrn)then ++ ++ if(mod(nstep-nfrn,ifrn).eq.0)then ++ ++ call free_kinetic(lfrmas,idnode,mxnode,keyver) ++ call free_energy_write(idnode,nstep,engunit) ++ ++ endif ++ ++ endif ++ ++c save restart data in event of system crash ++ ++ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++ endif ++ ++c cycle time check ++ ++ call timchk(0,timelp) ++ recycle=(recycle.and.timjob-timelp.gt.timcls) ++ ++ enddo ++ ++c*********************************************************************** ++c end of molecular dynamics calculations ++c*********************************************************************** ++ ++c last time check ++ ++ call timchk(0,timelp) ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, ++ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") ++ x timelp,prntim,hms,timcls ++ ++c shell relaxation convergence statistics ++ ++ if(.not.loptim.and.keyshl.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'shell relaxation statistics : average cycles = ', ++ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 ++ ++ endif ++ ++c produce summary of simulation ++ ++ levcfg=2 ++ if(loptim)levcfg=0 ++ if(.not.lneb)call result ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, ++ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, ++ x chit_shl) ++ ++c write hyperdynamics restart file ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++c close output channels ++ ++ if(idnode.eq.0) then ++ ++ close (nrite) ++ close (nstats) ++ close (nhist) ++ close (nevnt) ++ ++ endif ++ ++c terminate job ++ ++ call exitcomms() ++ ++ end +diff -urN dl_class_1.9.orig/srcmod/dlpoly.f.rej dl_class_1.9/srcmod/dlpoly.f.rej +--- dl_class_1.9.orig/srcmod/dlpoly.f.rej 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/dlpoly.f.rej 2015-11-09 14:15:45.054258793 +0100 +@@ -0,0 +1,20 @@ ++--- dlpoly.f.preplumed +++++ dlpoly.f ++@@ -103,12 +103,17 @@ ++ real(8) consv,engke,engrot,sigma,virtot,engcfg ++ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen ++ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol ++ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit ++ real(8) ebias,vmin,boost,heinc,tboost,hyp_units,estar +++c PLUMED modifications +++ real(8) energyUnits,lengthUnits,timeUnits +++ integer(8) get_comms +++c PLUMED modifications ++ ++ real(8), allocatable :: tbuffer(:) +++ integer :: plumedavaiable ++ ++ data timelp/0.d0/,lminnow/.false./,ntrack/10/ ++ data npage,lines/8,0/,recycle/.true./,boost/1.d0/ ++ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ ++ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ +diff -urN dl_class_1.9.orig/srcmod/driver_module.f dl_class_1.9/srcmod/driver_module.f +--- dl_class_1.9.orig/srcmod/driver_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/driver_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,498 @@ ++ module driver_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining simulation driver routines ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - d.quigley nov 2010 metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use forces_module ++ use nlist_builders_module ++ use optimiser_module ++ use temp_scalers_module ++ ++ implicit none ++ ++ integer, parameter :: mxpass=250 ++ ++ contains ++ ++ subroutine molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero,newlst, ++ x stropt,cycle,ltad,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,keyfld,keyshl,keystr,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp, ++ x ntpter,ntpvdw,ntshl,ntteth,ntcons,numrdf,nsolva,isolva, ++ x alpha,delr,dlrpot,drewd,elrc,engang,engbnd,engcpe,engdih, ++ x engfbp,engfld,enginv,engshl,engsrp,engtbp,engter,engtet, ++ x epsq,fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih,virfbp,virfld, ++ x virinv,virlrc,virmet,virshl,virsrp,virtbp,virter,virtet,volm, ++ x engmet,virtot,engord,virord) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling subroutine calls in a standard ++c molecular dynamics simulation ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d.quigley nov 2010 metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero ++ logical newlst,stropt,cycle,ltad,lsolva,lfree,lghost ++ ++ integer idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons ++ integer keystr,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp ++ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql ++ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet ++ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,nsolva ++ integer isolva ++ ++ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd ++ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp ++ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp ++ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp ++ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp ++ real(8) virtbp,virter,virtet,volm,engmet,virtot ++ real(8) engord,virord ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces ++ ++ call force_manager ++ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c structure optimisation ++ ++ if(loptim.or.lzero)then ++ ++ call optimisation_selector ++ x (loptim,stropt,lzero,idnode,mxnode,natms,imcon,ntcons, ++ x nscons,ngrp,ntfree,keystr,keytol,engcfg,tstep,opttol) ++ ++ if(stropt.and.idnode.eq.0) ++ x write(nrite,"(/,/,1x,'structure optimisation converged ', ++ x 'at step ',i6,/,/,/,1x,120('-'))") nstep ++ ++ cycle=(cycle.and.(.not.stropt)) ++ ++ endif ++ ++c total virial (excluding constraint virial and c.o.m virial) ++c for npt routines note: virsrp already includes virlrc ++ ++ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet+virord ++ ++ return ++ end subroutine molecular_dynamics ++ ++ subroutine shell_relaxation ++ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, ++ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, ++ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, ++ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, ++ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, ++ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, ++ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, ++ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, ++ x pass1,pass2,engord,virord) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling subroutine calls in a ++c relaxed shell molecular dynamics simulation ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d.quigley nov 2010 metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical,save :: lfirst = .true. ++ logical lfcap,lgofr,lneut,lnsq,loglnk,lzeql,ltad ++ logical newlst,relaxed,shgofr,lsolva,lfree,lghost ++ ++ integer idnode,imcon,keyfce,keyfld,keyshl ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms ++ integer nhko,nlatt,nneut,nospl,nstbgr,nstep,nsteql ++ integer ntangl,ntbond,ntdihd,ntinv,ntpfbp,ntpmet ++ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf ++ integer keyrlx,ntpmls,pass,nsolva,isolva,ia,ib,ishl ++ ++ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd ++ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp ++ real(8) engtbp,engter,engtet,epsq,fmax,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp ++ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp ++ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp ++ real(8) virtbp,virter,virtet,volm,engmet,virtot,rlxtol ++ real(8) pass0,pass1,pass2,engord,virord ++ ++ real(8),allocatable,dimension(:),save :: xdcs,ydcs,zdcs ++ ++ pass=0 ++ keyrlx=0 ++ shgofr=lgofr ++ relaxed=.false. ++ ++ if(lfirst)then ++ ++ allocate(xdcs(1:ntshl)) ++ allocate(ydcs(1:ntshl)) ++ allocate(zdcs(1:ntshl)) ++ lfirst = .false. ++ ++ else ++ ++ do ishl=1,ntshl ++ ++ ia=listshl(ishl,2) ++ ib=listshl(ishl,3) ++ xxx(ib)=xxx(ia)+xdcs(ishl) ++ yyy(ib)=yyy(ia)+ydcs(ishl) ++ zzz(ib)=zzz(ia)+zdcs(ishl) ++ ++ enddo ++ ++ endif ++ ++ do while(.not.relaxed.and.pass.le.mxpass) ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces ++ ++ call force_manager ++ x (newlst,lneut,lnsq,shgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c total virial (excluding constraint virial and c.o.m virial) ++c for npt routines note: virsrp already includes virlrc ++ ++ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet+virord ++ ++c relaxed shell option ++ ++ call relax_shells ++ x (relaxed,keyrlx,idnode,mxnode,natms,ntpmls,tstep, ++ x rlxtol) ++ ++ if(relaxed)then ++ ++ pass1=pass0*pass1 ++ pass0=pass0+1.d0 ++ pass1=pass1/pass0+pass/pass0 ++ pass2=max(dble(pass),pass2) ++c$$$ write(104,'("Relaxed shells before step: ",I5)')pass+1 ++ ++ endif ++ ++ pass=pass+1 ++ if(pass.gt.mxpass)call error(idnode,1950) ++ shgofr=.false. ++ ++c end of shell relaxation ++ ++ enddo ++ ++c store vector connecting the cores to the shells ++ ++ do ishl=1,ntshl ++ ++ ia=listshl(ishl,2) ++ ib=listshl(ishl,3) ++ xdcs(ishl)=xxx(ib)-xxx(ia) ++ ydcs(ishl)=yyy(ib)-yyy(ia) ++ zdcs(ishl)=zzz(ib)-zzz(ia) ++ ++ enddo ++ ++ call images(imcon,0,1,ntshl,cell,xdcs,ydcs,zdcs) ++ ++ return ++ end subroutine shell_relaxation ++ ++ subroutine minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling subroutine calls in a ++c minimisation simulation ++c ++c copyright - daresbury laboratory ++c author - w. smith may 2007 ++c adapted - d.quigley nov 2010 metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lfcap,lneut,lnsq,loglnk,lzeql,newlst,stropt,shgofr ++ logical conopt,newjob,ltad,lsolva,lfree,lghost ++ ++ integer idnode,imcon,keyfce,keyfld,keyshl,keystr,pass,i ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,keytol ++ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql ++ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet ++ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,ntcons ++ integer fail,nsolva,isolva ++ ++ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd ++ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp ++ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter,sigma ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp ++ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp ++ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp,tolnce ++ real(8) virtbp,virter,virtet,volm,engmet,virtot,engcon ++ real(8) cfgmin,engunit,hnorm,grad0,grad1,ff1,sgn ++ real(8) engord,virord ++ ++ real(8), allocatable :: sxx(:),syy(:),szz(:) ++ ++ save cfgmin,newjob ++ ++ data newjob/.true./ ++ ++ pass=0 ++ keystr=0 ++ shgofr=.false. ++ stropt=.false. ++ ++c dummy variables ++ ++ ltad=.false. ++ lsolva=.false. ++ lfree=.false. ++ lghost=.false. ++ nsolva=0 ++ isolva=1 ++ ++c$$$c diagnostic printing (not usually active) ++c$$$ ++c$$$ if(idnode.eq.0)then ++c$$$ ++c$$$ write(nrite,"(1x,120('-'), ++c$$$ x /,/,1x,' pass',5x,'eng_cfg',5x,'eng_vdw',5x,'eng_cou', ++c$$$ x 5x,'eng_bnd',5x,'eng_ang',5x,'eng_dih',5x,'eng_tet', ++c$$$ x 5x,'eng_met',/,1x,120('-'))") ++c$$$ ++c$$$ endif ++ ++ do while(.not.stropt.and.pass.lt.mxpass) ++ ++ pass=pass+1 ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces ++ ++ call force_manager ++ x (newlst,lneut,lnsq,shgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c total virial (excluding constraint virial and c.o.m virial) ++c for npt routines note: virsrp already includes virlrc ++ ++ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet+virord ++ ++c conjugate gradient structure optimisation ++ ++ call strucopt ++ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++c$$$c diagnostic printing (not usually active) ++c$$$ ++c$$$ if(idnode.eq.0)then ++c$$$ ++c$$$ write(nrite,"(1x,i8,1p,8e12.4)") ++c$$$ x pass,engcfg/engunit,engsrp/engunit,engcpe/engunit, ++c$$$ x engbnd/engunit,engang/engunit,engdih/engunit,engtet/ ++c$$$ x engunit,engmet/engunit ++c$$$ write(nrite,"(1x,120('-'))") ++c$$$ ++c$$$ endif ++ ++c end of structure minimisation ++ ++ enddo ++ ++c ensure constraints are satisfied ++ ++ if(stropt.and.ntcons.gt.0)then ++ ++ allocate(sxx(mxatms),syy(mxatms),szz(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,9999) ++ ++c store current forces ++ ++ do i=1,natms ++ ++ sxx(i)=fxx(i) ++ syy(i)=fyy(i) ++ szz(i)=fzz(i) ++ ++ enddo ++ ++ keystr=0 ++ conopt=.false. ++ ++ do while(.not.conopt.and.pass.lt.mxpass) ++ ++ pass=pass+1 ++ engcon=0.d0 ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c conjugate gradient structure optimisation of constraint bonds ++ ++ call strucopt ++ x (conopt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,engcon,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++ enddo ++ ++c restore current forces ++ ++ do i=1,natms ++ ++ fxx(i)=sxx(i) ++ fyy(i)=syy(i) ++ fzz(i)=szz(i) ++ ++ enddo ++ ++ deallocate(sxx,syy,szz,stat=fail) ++ ++ endif ++ ++c write data summary ++ ++ if(idnode.eq.0)then ++ ++ if(stropt)then ++ ++ write(nrite,'(1x,"minimisation converged after ",i6," cycles" ++ x ," energy minimum: ",1pe12.4)')pass,engcfg/engunit ++ ++ else ++ ++ write(nrite,'(1x,"minimisation NOT converged after ",i6, ++ x " cycles")')pass ++ ++ endif ++ ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++c reset velocities after structure optimisation ++ ++ call regauss(idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++c write out minimised structure if lowest obtained so far ++ ++ if(newjob.or.cfgmin.gt.engcfg)then ++ ++ if(idnode.eq.0)call config_write('CFGMIN',0,imcon,natms,engcfg) ++ cfgmin=engcfg ++ newjob=.false. ++ ++ endif ++ ++ return ++ end subroutine minimiser ++ ++ end module driver_module +diff -urN dl_class_1.9.orig/srcmod/ensemble_tools_module.f dl_class_1.9/srcmod/ensemble_tools_module.f +--- dl_class_1.9.orig/srcmod/ensemble_tools_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/ensemble_tools_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1934 @@ ++ module ensemble_tools_module ++ ++c*********************************************************************** ++c ++c dl_poly module defining tools for ensemble simulations ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use core_shell_module ++ use property_module ++ use rigid_body_module ++ use utility_module ++ ++ contains ++ ++ function getmass(natms,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate total system mass ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,i,iatm0,iatm1 ++ real(8) getmass ++ ++ iatm0 = (idnode*natms)/mxnode+1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++ getmass=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ getmass=getmass+weight(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=getmass ++ call gdsum(buffer(1),1,buffer(2)) ++ getmass=buffer(1) ++ ++ endif ++ ++ return ++ end function getmass ++ ++ subroutine getcom(natms,idnode,mxnode,totmas,com) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system centre of mass ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,i,iatm0,iatm1 ++ real(8) totmas ++ ++ real(8) com(3) ++ ++ iatm0 = (idnode*natms)/mxnode+1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++ com(1)=0.d0 ++ com(2)=0.d0 ++ com(3)=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ com(1)=com(1)+weight(i)*xxx(i) ++ com(2)=com(2)+weight(i)*yyy(i) ++ com(3)=com(3)+weight(i)*zzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1) call gdsum(com,3,buffer) ++ ++ com(1)=com(1)/totmas ++ com(2)=com(2)/totmas ++ com(3)=com(3)/totmas ++ ++ return ++ end subroutine getcom ++ ++ subroutine getvom(natms,idnode,mxnode,totmas,vom) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system centre of mass ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,i,iatm0,iatm1 ++ real(8) totmas ++ ++ real(8) vom(3) ++ ++ iatm0 = (idnode*natms)/mxnode+1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++ vom(1)=0.d0 ++ vom(2)=0.d0 ++ vom(3)=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ vom(1)=vom(1)+weight(i)*vxx(i) ++ vom(2)=vom(2)+weight(i)*vyy(i) ++ vom(3)=vom(3)+weight(i)*vzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1) call gdsum(vom,3,buffer) ++ ++ vom(1)=vom(1)/totmas ++ vom(2)=vom(2)/totmas ++ vom(3)=vom(3)/totmas ++ ++ return ++ end subroutine getvom ++ ++ subroutine nvtscale ++ x (idnode,mxnode,natms,engke,sigma,tstep,qmass,taut,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NVT thermostat ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,i,iatm0,iatm1 ++ real(8) engke,sigma,tstep,qmass,chit,conint,scale,taut ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c update chit to 1/2 step ++ ++ chit=chit+tstep*(engke-sigma)/qmass ++ ++c thermostat the velocities ++ ++ scale=exp(-tstep*chit) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ engke=engke*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*qmass/taut**2 ++ ++c update chit to full step ++ ++ chit=chit+tstep*(engke-sigma)/qmass ++ ++ return ++ end subroutine nvtscale ++ ++ subroutine nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,tstep,pmass,qmass,taut, ++ x chip,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT thermostat ++c ++c copyright daresbury laboratory ++c author - w.smith july 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,i,iatm0,iatm1 ++ real(8) engke,temp,sigma,tstep,pmass,qmass,chip,chit,conint,scale ++ real(8) taut ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c update chit to 1/2 step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip**2-boltz*temp)/qmass ++ ++c thermostat the velocities ++ ++ scale=exp(-tstep*chit) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ engke=engke*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp) ++ ++c update chit to full step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip**2-boltz*temp)/qmass ++ ++ return ++ end subroutine nptscale_t ++ ++ subroutine nptscale_p ++ x (idnode,mxnode,natms,engke,tstep,pmass,chip,chit, ++ x volm,press,vircon,virtot) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT barostat ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,i,iatm0,iatm1 ++ real(8) engke,tstep,pmass,chip,press,vircon,virtot ++ real(8) volm,scale,chit ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c propagate chip to 1/2 step ++ ++ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon)- ++ x 3.d0*press*volm)/pmass-chip*chit) ++ ++c barostat the velocities ++ ++ scale=exp(-tstep*chip) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ engke=engke*scale**2 ++ ++c update volume parameter to full step ++ ++ volm=volm*exp(3.d0*tstep*chip) ++ ++c update chip to full step ++ ++ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon)- ++ x 3.d0*press*volm)/pmass-chip*chit) ++ ++ return ++ end subroutine nptscale_p ++ ++ subroutine nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x tstep,qmass,taut,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NVT thermostat ++c to atomic, group and quaternion momenta ++c ++c copyright daresbury laboratory ++c author - w.smith april 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 ++ integer ig ++ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut ++ real(8) conint,scale ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn+engrot ++ ++c update chit to 1/2 step ++ ++ chit=chit+tstep*(engke-sigma)/qmass ++ ++c thermostat scale parameter ++ ++ scale=exp(-tstep*chit) ++ ++c thermostat free atoms ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=scale*omx(ig) ++ omy(ig)=scale*omy(ig) ++ omz(ig)=scale*omz(ig) ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ engrot=engrot*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*qmass/taut**2 ++ ++c update chit to full step ++ ++ engke=engfke+engtrn+engrot ++ chit=chit+tstep*(engke-sigma)/qmass ++ ++ return ++ end subroutine nvtqscl ++ ++ subroutine nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp,sigma, ++ x tstep,pmass,qmass,taut,chip,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT thermostat ++c to atomic, group and quaternion momenta ++c ++c copyright daresbury laboratory ++c author - w.smith april 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 ++ integer ig ++ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut ++ real(8) conint,scale,chip,pmass,temp ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn+engrot ++ ++c update chit to 1/2 tstep ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip**2-boltz*temp)/qmass ++ ++c thermostat scale parameter ++ ++ scale=exp(-tstep*chit) ++ ++c thermostat free atoms ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=scale*omx(ig) ++ omy(ig)=scale*omy(ig) ++ omz(ig)=scale*omz(ig) ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ engrot=engrot*scale**2 ++ ++c update chi to full tstep ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp) ++ ++c update chit to full tstep ++ ++ engke=engfke+engtrn+engrot ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip**2-boltz*temp)/qmass ++ ++ return ++ end subroutine nptqscl_t ++ ++ subroutine nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,tstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT barostat ++c for system with atomic sites and rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,i,ngrp,ntfree,igrp1,igrp2,ifre1,ifre2 ++ integer j,ig ++ real(8) engke,tstep,pmass,chip,press,vircon,virtot ++ real(8) vircom,volm,scale,engtrn,engfke,chit ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c propagate chip to 1/2 tstep ++ ++ engke=engfke+engtrn ++ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon-vircom)- ++ x 3.d0*press*volm)/pmass-chip*chit) ++ ++c barostat the free atom velocities ++ ++ scale=exp(-tstep*chip) ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c barostat the group translational velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ ++c update volume parameter to full tstep ++ ++ volm=volm*exp(3.d0*tstep*chip) ++ ++c update chip to full tstep ++ ++ engke=engfke+engtrn ++ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon-vircom)- ++ x 3.d0*press*volm)/pmass-chip*chit) ++ ++ return ++ end subroutine nptqscl_p ++ ++ subroutine nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,tstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NST thermostat ++c ++c copyright daresbury laboratory ++c author - w.smith july 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,mode,i,iatm0,iatm1 ++ real(8) engke,temp,sigma,tstep,pmass,qmass,chip2,chit,conint,scale ++ real(8) taut,fac(0:3) ++ data fac/9.d0,3.d0,2.d0,5.d0/ ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate kinetic energy ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ engke=getkin(natms,idnode,mxnode) ++ ++c update chit to 1/2 step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++c thermostat the velocities ++ ++ scale=exp(-tstep*chit) ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ engke=engke*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) ++ ++c update chit to full step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++ return ++ end subroutine nstscale_t ++ ++ subroutine nstscale_p ++ x (idnode,mxnode,natms,mode,tstep,pmass,chit,press,volm) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT anisotropic barostat ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,mode,i,iatm0,iatm1 ++ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit ++ real(8) strkin(9),uni(9),celp(10) ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c propagate barostat momentum to 1/2 step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c barostat the velocities ++ ++ do i=iatm0,iatm1 ++ ++ txx=vxx(i) ++ tyy=vyy(i) ++ tzz=vzz(i) ++ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c new cell vectors ++ ++ call cell_update(tstep,cell,eta) ++ ++c update volume to full time step ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++c calculate kinetic energy and contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c propagate barostat momentum to full step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ return ++ end subroutine nstscale_p ++ ++ subroutine nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,tstep,pmass,qmass,taut,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT thermostat ++c to atomic, group and quaternion momenta ++c ++c copyright daresbury laboratory ++c author - w.smith april 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 ++ integer ig,mode ++ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut ++ real(8) conint,scale,chip2,pmass,temp,fac(0:3) ++ data fac/9.d0,3.d0,2.d0,5.d0/ ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c calculate kinetic energy ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn+engrot ++ ++c update chit to 1/2 step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++c thermostat scale parameter ++ ++ scale=exp(-tstep*chit) ++ ++c thermostat free atoms ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=scale*omx(ig) ++ omy(ig)=scale*omy(ig) ++ omz(ig)=scale*omz(ig) ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ engrot=engrot*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) ++ ++c update chit to full step ++ ++ engke=engfke+engtrn+engrot ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++ return ++ end subroutine nstqscl_t ++ ++ subroutine nstqscl_p ++ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT anisotropic barostat ++c for system with atomic sites and rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith may 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j ++ integer mode ++ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit ++ real(8) strkin(9),strgrp(9),uni(9),celp(10) ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c propagate barostat momentum to 1/2 step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c subtract kinetic contribution from stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ do i=1,9 ++ stress(i)=stress(i)-strkin(i)-strgrp(i) ++ enddo ++ ++c barostat the free atom velocities ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ txx=vxx(i) ++ tyy=vyy(i) ++ tzz=vzz(i) ++ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c barostat the group translational velocities ++ ++ do ig=igrp1,igrp2 ++ ++ txx=gvxx(ig) ++ tyy=gvyy(ig) ++ tzz=gvzz(ig) ++ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c new cell vectors ++ ++ call cell_update(tstep,cell,eta) ++ ++c new system volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++c add new kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i) ++ enddo ++ ++c propagate barostat momentum to full step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ return ++ end subroutine nstqscl_p ++ ++ subroutine nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,tstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT thermostat ++c to atomic, group and quaternion momenta ++c ++c copyright daresbury laboratory ++c author - w.smith april 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 ++ integer ig,mode ++ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut ++ real(8) conint,scale,chip2,pmass,temp,fac(0:3) ++ real(8) strkin(9),strgrp(9) ++ data fac/9.d0,3.d0,2.d0,5.d0/ ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c remove old kinetic term from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strkin(i)-strgrp(i) ++ enddo ++ ++c calculate kinetic energy ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn+engrot ++ ++c update chit to 1/2 step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++c thermostat scale parameter ++ ++ scale=exp(-tstep*chit) ++ ++c thermostat free atoms ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=scale*omx(ig) ++ omy(ig)=scale*omy(ig) ++ omz(ig)=scale*omz(ig) ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ engrot=engrot*scale**2 ++ ++c scale kinetic energy tensors ++ ++ do i=1,9 ++ ++ strkin(i)=strkin(i)*scale**2 ++ strgrp(i)=strgrp(i)*scale**2 ++ ++ enddo ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) ++ ++c update chit to full step ++ ++ engke=engfke+engtrn+engrot ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++c add new kinetic terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ return ++ end subroutine nstqscl_t2 ++ ++ subroutine nstqscl_p2 ++ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm, ++ x strkin,strgrp) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT anisotropic barostat ++c for system with atomic sites and rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith may 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j ++ integer mode ++ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit ++ real(8) strkin(9),strgrp(9),uni(9),celp(10) ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c propagate barostat momentum to 1/2 step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c subtract kinetic contribution from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strkin(i)-strgrp(i) ++ enddo ++ ++c barostat the free atom velocities ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ txx=vxx(i) ++ tyy=vyy(i) ++ tzz=vzz(i) ++ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c barostat the group translational velocities ++ ++ do ig=igrp1,igrp2 ++ ++ txx=gvxx(ig) ++ tyy=gvyy(ig) ++ tzz=gvzz(ig) ++ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c new cell vectors ++ ++ call cell_update(tstep,cell,eta) ++ ++c new system volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++c add new kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i) ++ enddo ++ ++c propagate barostat momentum to full step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ return ++ end subroutine nstqscl_p2 ++ ++ subroutine cell_update(tstep,cell,eta) ++ ++c*********************************************************************** ++c ++c dlpoly utility to update the cell vectors in the hoover ++c nst algorithms (velocity verlet version) ++c ++c copyright daresbury laboratory ++c author w.smith july 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i ++ real(8) tstep,cell(9),eta(9),ctmp(9),uni(9) ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ do i=1,9 ++ ctmp(i)=uni(i)+tstep*eta(i) ++ enddo ++ ++ call mat_mul(ctmp,cell,cell) ++ ++ return ++ end subroutine cell_update ++ ++ subroutine cell_propagate(tstep,cell,eta) ++ ++c*********************************************************************** ++c ++c dlpoly utility to update the cell vectors in the hoover ++c nst algorithms (leapfrog version) ++c ++c copyright daresbury laboratory ++c author w.smith july 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i ++ real(8) tstep ++ real(8) cell(9),eta(9),aaa(9),bbb(9),uni(9) ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ do i=1,9 ++ aaa(i)=tstep*eta(i) ++ enddo ++ ++ call mat_mul(aaa,aaa,bbb) ++ ++ do i=1,9 ++ bbb(i)=uni(i)+aaa(i)+0.5d0*bbb(i) ++ enddo ++ ++ call mat_mul(bbb,cell,cell) ++ ++ return ++ end subroutine cell_propagate ++ ++ subroutine nstqmtk_p ++ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm, ++ x engfke,engtrn,engrot,temp,sigma) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT anisotropic barostat ++c of martyna tobias and klein to atomic, group and quaternion ++c system with atomic sites and rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith may 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j ++ integer mode ++ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit,temp,sigma,degfre ++ real(8) engtke,engfke,engtrn,engrot,trace ++ real(8) strkin(9),strgrp(9),uni(9),ctmp(9) ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ degfre=2.d0*sigma/(temp*boltz) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c calculate kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c propagate barostat momentum to 1/2 step ++ ++ call invert(cell,ctmp,volm) ++ volm=abs(volm) ++ engtke=2.d0*(engfke+engtrn+engrot)/degfre ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)+strgrp(i)+ ++ x (engtke-press*volm)*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c barostat the free atom velocities ++ ++ trace=(eta(1)+eta(5)+eta(9))/degfre ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ txx=vxx(i) ++ tyy=vyy(i) ++ tzz=vzz(i) ++ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz+trace) ++ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz+trace) ++ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz+trace) ++ ++ enddo ++ ++c barostat the group translational velocities ++ ++ do ig=igrp1,igrp2 ++ ++ txx=gvxx(ig) ++ tyy=gvyy(ig) ++ tzz=gvzz(ig) ++ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz+trace) ++ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz+trace) ++ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz+trace) ++ ++ enddo ++ ++c update volume to full time step ++ ++ volm=volm*exp(tstep*(eta(1)+eta(5)+eta(9))) ++ ++c calculate kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate new kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=2.d0*(engfke+engtrn+engrot)/degfre ++ ++c propagate barostat momentum to full step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)+strgrp(i)+ ++ x (engtke-press*volm)*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ return ++ end subroutine nstqmtk_p ++ ++ subroutine kinstr(idnode,mxnode,natms,tstep) ++ ++c*********************************************************************** ++c ++c dlpoly routine to calculate the kinetic energy contribution to ++c the stress tensor ++c ++c assumes velocities are half-timestep behind forces ++c ++c replicated data version / block data ++c ++c copyright daresbury laboratory 1994 ++c author t.forester may 1994 ++c amended t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,i,iatm1,iatm2 ++ real(8) tstep,vxt,vyt,vzt ++ ++c block indices ++ ++ iatm1 = (idnode*natms)/mxnode + 1 ++ iatm2 = ((idnode+1)*natms)/mxnode ++ ++ do i = iatm1,iatm2 ++ ++ if(rmass(i).gt.0.d0) then ++ ++ vxt = vxx(i)+fxx(i)*rmass(i)*tstep*0.5d0 ++ vyt = vyy(i)+fyy(i)*rmass(i)*tstep*0.5d0 ++ vzt = vzz(i)+fzz(i)*rmass(i)*tstep*0.5d0 ++ ++ stress(1)=stress(1)-weight(i)*vxt*vxt ++ stress(2)=stress(2)-weight(i)*vxt*vyt ++ stress(3)=stress(3)-weight(i)*vxt*vzt ++ stress(4)=stress(4)-weight(i)*vyt*vxt ++ stress(5)=stress(5)-weight(i)*vyt*vyt ++ stress(6)=stress(6)-weight(i)*vyt*vzt ++ stress(7)=stress(7)-weight(i)*vzt*vxt ++ stress(8)=stress(8)-weight(i)*vzt*vyt ++ stress(9)=stress(9)-weight(i)*vzt*vzt ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine kinstr ++ ++ function getkin(natms,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system kinetic energy ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,i,iatm0,iatm1 ++ real(8) getkin,engke ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ engke=0.d0 ++ ++ do i=iatm0,iatm1 ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ call gdsum(buffer(1),1,buffer(2)) ++ engke=buffer(1) ++ ++ endif ++ ++ getkin=0.5d0*engke ++ ++ return ++ end function getkin ++ ++ function getkinf(ntfree,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate kinetic energy of atoms not in ++c rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ntfree,idnode,mxnode,i,j,ifre0,ifre1 ++ real(8) getkinf,engke ++ ++ ifre0=(idnode*ntfree)/mxnode+1 ++ ifre1=((idnode+1)*ntfree)/mxnode ++ ++ engke=0.d0 ++ ++ do j=ifre0,ifre1 ++ ++ i=lstfre(j) ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ call gdsum(buffer(1),1,buffer(2)) ++ engke=buffer(1) ++ ++ endif ++ ++ getkinf=0.5d0*engke ++ ++ return ++ end function getkinf ++ ++ subroutine getking(ngrp,idnode,mxnode,engtrn,engrot) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system kinetic energy ++c for rigid groups only ++c ++c copyright daresbury laboratory ++c author - m.leslie february 2003 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id ++ real(8) engtrn,engrot ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ engtrn=0.d0 ++ engrot=0.d0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c group kinetic energy ++ ++ engtrn=engtrn+ ++ x gmass(id)*(gvxx(ig)**2+gvyy(ig)**2+gvzz(ig)**2) ++ ++c rotational kinetic energy ++ ++ engrot=engrot+(rotinx(id,1)*omx(ig)**2 ++ x +rotiny(id,1)*omy(ig)**2 ++ x +rotinz(id,1)*omz(ig)**2) ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++ buffer(5)=engtrn ++ buffer(6)=engrot ++ call gdsum(buffer(5),2,buffer(1)) ++ engtrn=buffer(5) ++ engrot=buffer(6) ++ ++ endif ++ ++ engtrn=0.5d0*engtrn ++ engrot=0.5d0*engrot ++ ++ return ++ end subroutine getking ++ ++ function getkint(ngrp,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate translational kinetic energy ++c for rigid groups only ++c ++c copyright daresbury laboratory ++c author - w.smith october 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id ++ real(8) engtrn,getkint ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ engtrn=0.d0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c group kinetic energy ++ ++ engtrn=engtrn+ ++ x gmass(id)*(gvxx(ig)**2+gvyy(ig)**2+gvzz(ig)**2) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engtrn ++ call gdsum(buffer(1),1,buffer(2)) ++ engtrn=buffer(1) ++ ++ endif ++ ++ getkint=0.5d0*engtrn ++ ++ return ++ end function getkint ++ ++ function getkinr(ngrp,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate rotational kinetic energy ++c for rigid groups only ++c ++c copyright daresbury laboratory ++c author - w.smith october 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id ++ real(8) engrot,getkinr ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ engrot=0.d0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c rotational kinetic energy ++ ++ engrot=engrot+(rotinx(id,1)*omx(ig)**2 ++ x +rotiny(id,1)*omy(ig)**2 ++ x +rotinz(id,1)*omz(ig)**2) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engrot ++ call gdsum(buffer(1),1,buffer(2)) ++ engrot=buffer(1) ++ ++ endif ++ ++ getkinr=0.5d0*engrot ++ ++ return ++ end function getkinr ++ ++ subroutine kinstress(natms,idnode,mxnode,stresh) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate kinetic contribution to the ++c stress tensor ++c ++c copyright daresbury laboratory ++c author - w.smith november 2002 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,iatm0,iatm1,i ++ real(8) stresh(9) ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise stress tensor ++ ++ do i=1,9 ++ stresh(i)=0.d0 ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ do i=iatm0,iatm1 ++ ++ stresh(1)=stresh(1)+weight(i)*vxx(i)*vxx(i) ++ stresh(2)=stresh(2)+weight(i)*vxx(i)*vyy(i) ++ stresh(3)=stresh(3)+weight(i)*vxx(i)*vzz(i) ++ stresh(5)=stresh(5)+weight(i)*vyy(i)*vyy(i) ++ stresh(6)=stresh(6)+weight(i)*vyy(i)*vzz(i) ++ stresh(9)=stresh(9)+weight(i)*vzz(i)*vzz(i) ++ ++ enddo ++ ++ stresh(4)=stresh(2) ++ stresh(7)=stresh(3) ++ stresh(8)=stresh(6) ++ ++c global sum of stress tensor ++ ++ if(mxnode.gt.1) call gdsum(stresh,9,buffer) ++ ++ return ++ end subroutine kinstress ++ ++ subroutine kinstressg(ngrp,idnode,mxnode,stresh) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate kinetic contribution to the ++c stress tensor ++c ++c copyright daresbury laboratory ++c author - m.leslie february 2003 ++c ++c********************************************************************* ++ ++ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id ++ real(8) stresh(9) ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c initialise stress tensor ++ ++ do i=1,9 ++ stresh(i)=0.d0 ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ stresh(1)=stresh(1)+gmass(id)*gvxx(ig)*gvxx(ig) ++ stresh(2)=stresh(2)+gmass(id)*gvxx(ig)*gvyy(ig) ++ stresh(3)=stresh(3)+gmass(id)*gvxx(ig)*gvzz(ig) ++ stresh(5)=stresh(5)+gmass(id)*gvyy(ig)*gvyy(ig) ++ stresh(6)=stresh(6)+gmass(id)*gvyy(ig)*gvzz(ig) ++ stresh(9)=stresh(9)+gmass(id)*gvzz(ig)*gvzz(ig) ++ ++ enddo ++ ++ stresh(4)=stresh(2) ++ stresh(7)=stresh(3) ++ stresh(8)=stresh(6) ++ ++c global sum of stress tensor ++ ++ if(mxnode.gt.1) call gdsum(stresh,9,buffer) ++ ++ return ++ end subroutine kinstressg ++ ++ subroutine getkins(natms,idnode,mxnode,getkin) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system kinetic energy ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005: f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,iatm0,iatm1,i ++ real(8) getkin,engke ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ engke=0.d0 ++ ++ do i=iatm0,iatm1 ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ call gdsum(buffer(1),1,buffer(2)) ++ engke=buffer(1) ++ ++ endif ++ ++ getkin=0.5d0*engke ++ ++ return ++ end subroutine getkins ++ ++ subroutine kinstressf(ntfree,idnode,mxnode,stresh) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate kinetic contribution to the ++c stress tensor for unconstrained atoms ++c ++c copyright daresbury laboratory ++c author - m.leslie february 2003 ++c amended - w.smith january 2005: f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ntfree,idnode,mxnode,i,ifre1,ifre2,ifre ++ real(8) stresh(9) ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c initialise stress tensor ++ ++ do i=1,9 ++ stresh(i)=0.d0 ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ stresh(1)=stresh(1)+weight(i)*vxx(i)*vxx(i) ++ stresh(2)=stresh(2)+weight(i)*vxx(i)*vyy(i) ++ stresh(3)=stresh(3)+weight(i)*vxx(i)*vzz(i) ++ stresh(5)=stresh(5)+weight(i)*vyy(i)*vyy(i) ++ stresh(6)=stresh(6)+weight(i)*vyy(i)*vzz(i) ++ stresh(9)=stresh(9)+weight(i)*vzz(i)*vzz(i) ++ ++ enddo ++ ++ stresh(4)=stresh(2) ++ stresh(7)=stresh(3) ++ stresh(8)=stresh(6) ++ ++c global sum of stress tensor ++ ++ if(mxnode.gt.1) call gdsum(stresh,9,buffer) ++ ++ return ++ end subroutine kinstressf ++ ++ subroutine nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,tstep,qmass_shl, ++ x taut,chit_shl,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NVT thermostat ++c thermostats the core-shell relative motion ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c adapted - d. quigley 2006 : core-shell motion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl,i,ishl1,ishl2,j,k,m ++ real(8) shlke,sigma_shl,tstep,qmass_shl,chit_shl,conint ++ real(8) dvx,dvy,dvz,tmx,tmy,tmz,rmu,scale,taut ++ ++ ishl1=(idnode*ntshl)/mxnode+1 ++ ishl2=((idnode+1)*ntshl)/mxnode ++ ++c calculate kinetic energy ++ ++ call corshl(idnode,mxnode,ntshl,shlke) ++ ++c update chit to 1/2 step ++ ++ chit_shl=chit_shl+tstep*(shlke-sigma_shl)/qmass_shl ++ ++c thermostat the velocities ++ ++ scale=exp(-tstep*chit_shl) ++ ++ m=0 ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++ rmu=(weight(i)*weight(j))/(weight(i)+weight(j)) ++ ++ if(rmu.gt.0.d0)then ++ ++ dvx=vxx(j)-vxx(i) ++ dvy=vyy(j)-vyy(i) ++ dvz=vzz(j)-vzz(i) ++ ++ tmx=weight(i)*vxx(i)+weight(j)*vxx(j) ++ tmy=weight(i)*vyy(i)+weight(j)*vyy(j) ++ tmz=weight(i)*vzz(i)+weight(j)*vzz(j) ++ ++ vxx(i)=tmx/(weight(i)+weight(j))-scale*rmu*dvx/weight(i) ++ vxx(j)=tmx/(weight(i)+weight(j))+scale*rmu*dvx/weight(j) ++ vyy(i)=tmy/(weight(i)+weight(j))-scale*rmu*dvy/weight(i) ++ vyy(j)=tmy/(weight(i)+weight(j))+scale*rmu*dvy/weight(j) ++ vzz(i)=tmz/(weight(i)+weight(j))-scale*rmu*dvz/weight(i) ++ vzz(j)=tmz/(weight(i)+weight(j))+scale*rmu*dvz/weight(j) ++ ++ endif ++ ++ enddo ++ ++ shlke=shlke*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit_shl*qmass_shl/taut**2 ++ ++c update chit to full step ++ ++ chit_shl=chit_shl+tstep*(shlke-sigma_shl)/qmass_shl ++ ++ if(mxnode.gt.1) call shlmerge(idnode,mxnode,ntshl) ++ ++ return ++ end subroutine nvtscale_shl ++ ++ end module ensemble_tools_module ++ +diff -urN dl_class_1.9.orig/srcmod/error_module.f dl_class_1.9/srcmod/error_module.f +--- dl_class_1.9.orig/srcmod/error_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/error_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1513 @@ ++ module error_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining bond potentials ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ contains ++ ++ subroutine error(idnode,iode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for printing error messages and bringing ++c about a controlled termination of the program ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c ++c warning - this routine terminates the job. user must ensure ++c that all nodes are informed of error condition before this ++c subroutine is called. e.g. using subroutine gstate(). ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ logical kill ++ integer idnode,iode,kode ++ ++ kill=(iode.ge.0) ++ kode = abs(iode) ++ ++ if(idnode.eq.0)then ++ ++ if(kill)then ++ write(nrite,'(/,/,1x,a,i5)') ++ x 'DL_POLY terminated due to error ', kode ++ ++ else ++ ++ write(nrite,'(/,/,1x,a,i5)') ++ x 'DL_POLY will terminate due to error ', kode ++ ++ endif ++ ++ if(kode.lt.50)then ++ ++ if(kode.eq. 0)then ++ ++c dummy entry ++ ++ elseif(kode.eq. 3)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown directive found in CONTROL file' ++ elseif(kode.eq. 4)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown directive found in FIELD file' ++ elseif(kode.eq. 5)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown energy unit requested' ++ elseif(kode.eq. 6)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - energy unit not specified' ++ elseif(kode.eq. 7)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - energy unit respecified' ++ elseif(kode.eq. 8)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - time step not specified' ++ elseif(kode.eq.10)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many molecule types specified' ++ elseif(kode.eq.11)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate molecule directive in FIELD file' ++ elseif(kode.eq.12)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown molecule directive in FIELD file' ++ elseif(kode.eq.13)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - molecular species not yet specified' ++ elseif(kode.eq.14)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many unique atom types specified' ++ elseif(kode.eq.15)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate pair potential specified' ++ elseif(kode.eq.16)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - strange exit from FIELD file processing' ++ elseif(kode.eq.17)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - strange exit from CONTROL file processing' ++ elseif(kode.eq.18)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate 3-body potential specified' ++ elseif(kode.eq.19)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate 4-body potential specified' ++ elseif(kode.eq.20)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many molecule sites specified' ++ elseif(kode.eq.21)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate tersoff potential specified' ++ elseif(kode.eq.22)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unsuitable radial increment in TABLE file' ++ elseif(kode.eq.23)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incompatible FIELD and TABLE file potentials' ++ elseif(kode.eq.24)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of file encountered in TABLE file' ++ elseif(kode.eq.25)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - wrong atom type found in CONFIG file' ++ elseif(kode.eq.26)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cutoff smaller than EAM potential range' ++ elseif(kode.eq.27)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incompatible FIELD and TABEAM file potentials' ++ elseif(kode.eq.28)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer too small in mettab' ++ elseif(kode.eq.29)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of file encountered in TABEAM file' ++ elseif(kode.eq.30)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many chemical bonds specified' ++ elseif(kode.eq.31)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many chemical bonds in system' ++ elseif(kode.eq.32)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - integer array memory allocation failure' ++ elseif(kode.eq.33)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - real array memory allocation failure' ++ elseif(kode.eq.34)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - character array memory allocation failure' ++ elseif(kode.eq.35)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - logical array memory allocation failure' ++ elseif(kode.eq.36)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - failed fmet array allocation in mettab' ++ elseif(kode.eq.40)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many bond constraints specified' ++ elseif(kode.eq.41)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many bond constraints in system' ++ elseif(kode.eq.42)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer too small in merge1' ++ elseif(kode.eq.45)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many atoms in CONFIG file' ++ elseif(kode.eq.46)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - ewlbuf array too small in ewald1' ++ elseif(kode.eq.47)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer too small in merge' ++ elseif(kode.eq.48)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer too small in fortab' ++ elseif(kode.eq.49)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - frozen core-shell unit specified' ++ endif ++ ++ elseif(kode.lt.100)then ++ ++ if(kode.eq.50)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many bond angles specified' ++ elseif(kode.eq.51)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many bond angles in system' ++ elseif(kode.eq.52)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of FIELD file encountered' ++ elseif(kode.eq.53)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of CONTROL file encountered' ++ elseif(kode.eq.54)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - problem reading CONFIG file' ++ elseif(kode.eq.55)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of CONFIG file encountered' ++ elseif(kode.eq.57)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many core-shell units specified' ++ elseif(kode.eq.59)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many core-shell units in system' ++ elseif(kode.eq.60)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many dihedral angles specified' ++ elseif(kode.eq.61)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many dihedral angles in system' ++ elseif(kode.eq.62)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many tethered atoms specified' ++ elseif(kode.eq.63)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many tethered atoms in system' ++ elseif(kode.eq.65)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many excluded pairs specified' ++ elseif(kode.eq.66)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect boundary condition for HK ewald' ++ elseif(kode.eq.67)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect boundary condition in thbfrc' ++ elseif(kode.eq.69)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many link cells required in thbfrc' ++ elseif(kode.eq.70)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - constraint bond quench failure' ++ elseif(kode.eq.71)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many metal potentials specified' ++ elseif(kode.eq.72)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - different metal potential types specified' ++ elseif(kode.eq.73)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many inversion potentials specified' ++ elseif(kode.eq.75)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many atoms in specified system' ++ elseif(kode.eq.77)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many inversion potentials in system' ++ elseif(kode.eq.79)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect boundary condition in fbpfrc' ++ elseif(kode.eq.80)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many pair potentials specified' ++ elseif(kode.eq.81)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in pair potential list' ++ elseif(kode.eq.82)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - calculated pair potential index too large' ++ elseif(kode.eq.83)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many three body potentials specified' ++ elseif(kode.eq.84)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in 3-body potential list' ++ elseif(kode.eq.85)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - required velocities not in CONFIG file' ++ elseif(kode.eq.86)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - calculated 3-body potential index too large' ++ elseif(kode.eq.87)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many link cells required in fbpfrc' ++ elseif(kode.eq.88)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many tersoff potentials specified' ++ elseif(kode.eq.89)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many four body potentials specified' ++ elseif(kode.eq.90)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - system total electric charge nonzero' ++ elseif(kode.eq.91)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in 4-body potential list' ++ elseif(kode.eq.92)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in tersoff potential list' ++ elseif(kode.eq.93)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cannot use shell model with rigid molecules' ++ elseif(kode.eq.95)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - potential cutoff exceeds half-cell width' ++ elseif(kode.eq.97)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cannot use shell model with neutral groups' ++ elseif(kode.eq.99)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cannot use shell model with constraints' ++ endif ++ ++ elseif(kode.lt.150)then ++ ++ if(kode.eq.100)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - forces working arrays too small' ++ elseif(kode.eq.101)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - calculated 4-body potential index too large' ++ elseif(kode.eq.102)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - parameter mxproc exceeded in shake arrays' ++ elseif(kode.eq.103)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - parameter mxlshp exceeded in shake arrays' ++ elseif(kode.eq.105)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - shake algorithm failed to converge' ++ elseif(kode.eq.106)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parlink ' ++ x //'subroutine' ++ elseif(kode.eq.107)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parlinkneu ' ++ x //'subroutine' ++ elseif(kode.eq.108)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parneulst ' ++ x //'subroutine' ++ elseif(kode.eq.109)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parlst_nsq ' ++ x //'subroutine' ++ elseif(kode.eq.110)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parlst ' ++ x //'subroutine' ++ elseif(kode.eq.112)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - vertest array too small' ++ elseif(kode.eq.120)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - invalid determinant in matrix inversion' ++ elseif(kode.eq.130)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect octahedral boundary condition' ++ elseif(kode.eq.135)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect hexagonal prism boundary condition' ++ elseif(kode.eq.140)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect dodecahedral boundary condition' ++ elseif(kode.eq.141)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate metal potential specified' ++ elseif(kode.eq.142)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - interpolation outside range of metal '// ++ x 'potential attempted' ++ elseif(kode.eq.145)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - no van der waals potentials defined' ++ endif ++ ++ elseif(kode.lt.200)then ++ ++ if(kode.eq.150)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown van der waals potential selected' ++ elseif(kode.eq.151)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown metal potential selected' ++ elseif(kode.eq.153)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - metals not permitted with multiple timestep' ++ elseif(kode.eq.160)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unaccounted for atoms in exclude list ' ++ elseif(kode.eq.170)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many variables for statistic array ' ++ elseif(kode.eq.180)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - Ewald sum requested in non-periodic system' ++ elseif(kode.eq.185)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many reciprocal space vectors' ++ elseif(kode.eq.186)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer array too small in sysgen' ++ elseif(kode.eq.190)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - buffer array too small in splice' ++ endif ++ ++ elseif(kode.lt.250)then ++ ++ if(kode.eq.200)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - rdf buffer array too small in revive' ++ elseif(kode.eq.220)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many neutral groups in system' ++ elseif(kode.eq.225)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - multiple selection of optimisation options' ++ elseif(kode.eq.230)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neutral groups improperly arranged' ++ endif ++ ++ elseif(kode.lt.300)then ++ ++ if(kode.eq.250)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - Ewald sum requested with neutral groups' ++ elseif(kode.eq.260)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - parameter mxexcl exceeded in excludeneu routine' ++ endif ++ ++ elseif(kode.lt.350)then ++ ++ if(kode.eq.300)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect boundary condition in parlink' ++ elseif(kode.eq.301)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many rigid body types ' ++ elseif(kode.eq.302)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many sites in rigid body ' ++ elseif(kode.eq.303)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many rigid bodies specified' ++ elseif(kode.eq.304)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many rigid body sites in system ' ++ elseif(kode.eq.305)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - box size too small for link cells' ++ elseif(kode.eq.306)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - failed to find principal axis system' ++ elseif(kode.eq.310)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - quaternion setup failed ' ++ elseif(kode.eq.320)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - site in multiple rigid bodies' ++ elseif(kode.eq.321)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - quaternion integrator failed' ++ elseif(kode.eq.330)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - mxewld parameter incorrect' ++ elseif(kode.eq.331)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - mxhke parameter incorrect' ++ elseif(kode.eq.332)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - mxhko parameter too small' ++ elseif(kode.eq.340)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - invalid integration option requested' ++ endif ++ ++ elseif(kode.lt.400)then ++ ++ if(kode.eq.350)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too few degrees of freedom' ++ elseif(kode.eq.360)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - frozen atom found in rigid body' ++ elseif(kode.eq.380)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - simulation temperature not specified' ++ elseif(kode.eq.381)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - simulation timestep not specified' ++ elseif(kode.eq.382)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - simulation cutoff not specified' ++ elseif(kode.eq.383)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - simulation forces option not specified' ++ elseif(kode.eq.384)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - verlet strip width not specified' ++ elseif(kode.eq.385)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - primary cutoff not specified' ++ elseif(kode.eq.386)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - primary cutoff larger than rcut' ++ elseif(kode.eq.387)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - system pressure not specified' ++ elseif(kode.eq.388)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - npt incompatible with multiple timestep' ++ elseif(kode.eq.389)then ++ write(nrite,'(/,/,1x,a)') ++ x 'number of pimd beads not specified in field file' ++ elseif(kode.eq.390)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - npt ensemble requested in non-periodic system' ++ elseif(kode.eq.391)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect number of pimd beads in config file' ++ elseif(kode.eq.392)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many link cells requested' ++ elseif(kode.eq.394)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - minimum image arrays exceeded' ++ elseif(kode.eq.396)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - interpolation array exceeded' ++ elseif(kode.eq.398)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cutoff too small for rprim and delr' ++ endif ++ ++ elseif(kode.lt.450)then ++ ++ if(kode.eq.400)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - rvdw greater than cutoff' ++ elseif(kode.eq.402)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - van der waals cutoff unset' ++ elseif(kode.eq.410)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cell not consistent with image convention' ++ elseif(kode.eq.412)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - mxxdf parameter too small for shake routine' ++ elseif(kode.eq.414)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - conflicting ensemble options in CONTROL file' ++ elseif(kode.eq.416)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - conflicting force options in CONTROL file' ++ elseif(kode.eq.418)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in bndfrc' ++ elseif(kode.eq.419)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in angfrc' ++ elseif(kode.eq.420)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in tethfrc' ++ elseif(kode.eq.421)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in dihfrc' ++ elseif(kode.eq.422)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - all-pairs must use multiple timestep' ++ elseif(kode.eq.423)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in shlfrc' ++ elseif(kode.eq.424)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - electrostatics incorrect for all-pairs' ++ elseif(kode.eq.425)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer array too small in shlmerge' ++ elseif(kode.eq.426)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neutral groups not permitted with all-pairs' ++ elseif(kode.eq.427)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in invfrc' ++ elseif(kode.eq.430)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - integration routine not available' ++ elseif(kode.eq.432)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - intlist failed to assign constraints ' ++ elseif(kode.eq.433)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - specify rcut before the Ewald sum precision' ++ elseif(kode.eq.434)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - illegal entry into STRESS related routine' ++ elseif(kode.eq.435)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - specify rcut before the coulomb precision' ++ elseif(kode.eq.436)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unrecognised ensemble ' ++ elseif(kode.eq.438)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - PMF constraints failed to converge' ++ elseif(kode.eq.440)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined angular potential' ++ elseif(kode.eq.442)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined three body potential' ++ elseif(kode.eq.443)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined four body potential' ++ elseif(kode.eq.444)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined bond potential' ++ elseif(kode.eq.445)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined many body potential' ++ elseif(kode.eq.446)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined electrostatic key in dihfrc' ++ elseif(kode.eq.447)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - 1-4 separation exceeds cutoff range' ++ elseif(kode.eq.448)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined dihedral potential' ++ elseif(kode.eq.449)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined inversion potential' ++ endif ++ ++ elseif(kode.lt.500)then ++ ++ if(kode.eq.450)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined tethering potential' ++ elseif(kode.eq.451)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - three body potential cutoff undefined' ++ elseif(kode.eq.452)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined pair potential' ++ elseif(kode.eq.453)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - four body potential cutoff undefined' ++ elseif(kode.eq.454)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined external field' ++ elseif(kode.eq.456)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - core and shell in same rigid unit' ++ elseif(kode.eq.458)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many PMF constraints - param. mspmf too ' ++ x //'small' ++ elseif(kode.eq.460)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many PMF sites - parameter mxspmf too small' ++ elseif(kode.eq.461)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined metal potential' ++ elseif(kode.eq.462)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - PMF UNIT record expected' ++ elseif(kode.eq.463)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in metal potential list' ++ elseif(kode.eq.464)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - thermostat time constant must be > 0.d0' ++ elseif(kode.eq.465)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - calculated pair potential index too large' ++ elseif(kode.eq.466)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - barostat time constant must be > 0.d0' ++ elseif(kode.eq.468)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - r0 too large for snm potential with current ' ++ x //'cutoff' ++ elseif(kode.eq.470)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - n= ',nsatms ++ call error(idnode,100) ++ ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++c variables for array bound checking ++ ++ ibig=0 ++ safe=.true. ++ ++c initialise excluded atom arrays ++ ++ do i=1,mxsite ++ ++ nexsit(i)=0 ++ ++ enddo ++ ++ do i=1,msatms ++ ++ nexatm(i)=0 ++ ++ enddo ++ ++ do j=1,mxexcl ++ ++ do i=1,mxsite ++ ++ lexsit(i,j)=0 ++ ++ enddo ++ ++ do i=1,msatms ++ ++ lexatm(i,j)=0 ++ ++ enddo ++ ++ enddo ++ ++ ++c loop over molecules in system ++ ++ ibonds=0 ++ iangle=0 ++ iconst=0 ++ idihdr=0 ++ invers=0 ++ igrp =0 ++ isite =0 ++ ishels=0 ++ ++ do itmols=1,ntpmls ++ ++c exclude sites on basis of chemical bonds ++ ++ do i=1,numbonds(itmols) ++ ++ ibonds=ibonds+1 ++ ++ if(keybnd(ibonds).gt.0)then ++ ++ ia=lstbnd(ibonds,1)+isite ++ ib=lstbnd(ibonds,2)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of bond constraints ++ ++ do i=1,numcon(itmols) ++ ++ iconst=iconst+1 ++ ia=lstcon(iconst,1)+isite ++ ib=lstcon(iconst,2)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++ enddo ++ ++c exclude sites on basis of bond angles ++ ++ do i=1,numang(itmols) ++ ++ iangle=iangle+1 ++ if(keyang(iangle).gt.0)then ++ ia=lstang(iangle,1)+isite ++ ib=lstang(iangle,2)+isite ++ ic=lstang(iangle,3)+isite ++ ++c check if already added to lists .. ++c ia - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++c ib - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib),mxexcl) ++ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib)=nexsit(ib)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ib,nexsit(ib))=ic-isite ++ lexsit(ic,nexsit(ic))=ib-isite ++ endif ++ endif ++ ++c ia - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ic-isite ++ lexsit(ic,nexsit(ic))=ia-isite ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude on basis of rigid groups ++ ++ do i=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ id=listyp(igrp) ++ ++ do jj=1,numgsit(id)-1 ++ ++ ia=lstgst(igrp,jj)+isite ++ ++ do jk=jj+1,numgsit(id) ++ ++ ib=lstgst(igrp,jk)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c exclude sites on basis of 1-4 dihedral angles ++ ++ do i=1,numdih(itmols) ++ ++ idihdr=idihdr+1 ++ ia=lstdih(idihdr,1)+isite ++ ib=lstdih(idihdr,2)+isite ++ ic=lstdih(idihdr,3)+isite ++ id=lstdih(idihdr,4)+isite ++ ++c check if already added to lists .. ++c ia - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++c ib - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib),mxexcl) ++ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib)=nexsit(ib)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ib,nexsit(ib))=ic-isite ++ lexsit(ic,nexsit(ic))=ib-isite ++ endif ++ endif ++ ++c ia - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ic-isite ++ lexsit(ic,nexsit(ic))=ia-isite ++ endif ++ endif ++ ++c id - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(id),mxexcl) ++ if(lexsit(id,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(id)=nexsit(id)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(id),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(id),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(id,nexsit(id))=ib-isite ++ lexsit(ib,nexsit(ib))=id-isite ++ endif ++ endif ++ ++c id - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(id),mxexcl) ++ if(lexsit(id,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(id)=nexsit(id)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(id),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(id),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(id,nexsit(id))=ic-isite ++ lexsit(ic,nexsit(ic))=id-isite ++ endif ++ endif ++ ++c ia - id interaction: may need to reset vdw and elec scale factors ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.id-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(id)=nexsit(id)+1 ++ if(max(nexsit(ia),nexsit(id)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(id)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=id-isite ++ lexsit(id,nexsit(id))=ia-isite ++ endif ++ ++ elseif(keydih(idihdr).ne.7)then ++ ++c if already excluded reset 1..4 vdw and coulombic scale factors ++ ++ check=((abs(prmdih(idihdr,4)).gt.1.d-10).or. ++ x (abs(prmdih(idihdr,5)).gt.1.d-10)) ++ ++ if(check)then ++ ++ a1=dble(itmols) ++ a2=dble(ia) ++ a3=dble(id) ++ call warning(idnode,20,a1,a2,a3) ++ ++ prmdih(idihdr,4)=0.d0 ++ prmdih(idihdr,5)=0.d0 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of inversion potentials ++ ++ do i=1,numinv(itmols) ++ ++ invers=invers+1 ++ ia=lstinv(invers,1)+isite ++ ib=lstinv(invers,2)+isite ++ ic=lstinv(invers,3)+isite ++ id=lstinv(invers,4)+isite ++ ++c check if already added to lists .. ++c ia - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++c ib - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib),mxexcl) ++ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib)=nexsit(ib)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ib,nexsit(ib))=ic-isite ++ lexsit(ic,nexsit(ic))=ib-isite ++ endif ++ endif ++ ++c ia - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ic-isite ++ lexsit(ic,nexsit(ic))=ia-isite ++ endif ++ endif ++ ++c id - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(id),mxexcl) ++ if(lexsit(id,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(id)=nexsit(id)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(id),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(id),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(id,nexsit(id))=ib-isite ++ lexsit(ib,nexsit(ib))=id-isite ++ endif ++ endif ++ ++c id - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(id),mxexcl) ++ if(lexsit(id,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(id)=nexsit(id)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(id),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(id),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(id,nexsit(id))=ic-isite ++ lexsit(ic,nexsit(ic))=id-isite ++ endif ++ endif ++ ++c ia - id interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.id-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(id)=nexsit(id)+1 ++ if(max(nexsit(ia),nexsit(id)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(id)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=id-isite ++ lexsit(id,nexsit(id))=ia-isite ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of core-shell units ++ ++ do i=1,numshl(itmols) ++ ++ ishels=ishels+1 ++ ++ ia=lstshl(ishels,1)+isite ++ ib=lstshl(ishels,2)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++c exclude sites on basis of bonds to core-shell units ++ ++ ibonds=ibonds-numbonds(itmols) ++ do kk=1,numbonds(itmols) ++ ++ ibonds=ibonds+1 ++ ++ if(keybnd(ibonds).gt.0)then ++ ++ ia1=lstbnd(ibonds,1)+isite ++ ib1=lstbnd(ibonds,2)+isite ++ ++ if(ia.eq.ia1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib1),mxexcl) ++ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib1)=nexsit(ib1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ib1,nexsit(ib1))=ib-isite ++ lexsit(ib,nexsit(ib))=ib1-isite ++ endif ++ endif ++ ++ endif ++ ++ if(ia.eq.ib1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia1),mxexcl) ++ if(lexsit(ia1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia1)=nexsit(ia1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia1,nexsit(ia1))=ib-isite ++ lexsit(ib,nexsit(ib))=ia1-isite ++ endif ++ endif ++ ++ endif ++ ++ if(ib.eq.ia1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib1)=nexsit(ib1)+1 ++ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib1-isite ++ lexsit(ib1,nexsit(ib1))=ia-isite ++ endif ++ endif ++ ++ endif ++ if(ib.eq.ib1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ia1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ia1)=nexsit(ia1)+1 ++ if(max(nexsit(ia),nexsit(ia1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ia1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ia1-isite ++ lexsit(ia1,nexsit(ia1))=ia-isite ++ endif ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of constraint bonds to core-shell units ++ ++ iconst=iconst-numcon(itmols) ++ do kk=1,numcon(itmols) ++ ++ iconst=iconst+1 ++ ++ ia1=lstcon(iconst,1)+isite ++ ib1=lstcon(iconst,2)+isite ++ ++ if(ia.eq.ia1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib1),mxexcl) ++ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib1)=nexsit(ib1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ib1,nexsit(ib1))=ib-isite ++ lexsit(ib,nexsit(ib))=ib1-isite ++ endif ++ endif ++ ++ endif ++ ++ if(ia.eq.ib1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia1),mxexcl) ++ if(lexsit(ia1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia1)=nexsit(ia1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia1,nexsit(ia1))=ib-isite ++ lexsit(ib,nexsit(ib))=ia1-isite ++ endif ++ endif ++ ++ endif ++ ++ if(ib.eq.ia1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib1)=nexsit(ib1)+1 ++ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib1-isite ++ lexsit(ib1,nexsit(ib1))=ia-isite ++ endif ++ endif ++ ++ endif ++ if(ib.eq.ib1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ia1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ia1)=nexsit(ia1)+1 ++ if(max(nexsit(ia),nexsit(ia1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ia1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ia1-isite ++ lexsit(ia1,nexsit(ia1))=ia-isite ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of rigid units involving core or shell ++ ++ igrp=igrp-numgrp(itmols) ++ do kk=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ id=listyp(igrp) ++ ++ do jj=1,numgsit(id) ++ ++ ia1=lstgst(igrp,jj)+isite ++ if(ia1.eq.ia)then ++ ++ do jk=1,numgsit(id) ++ ++ if(jk.ne.jj)then ++ ib1=lstgst(igrp,jk)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib1),mxexcl) ++ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib1)=nexsit(ib1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ib1,nexsit(ib1))=ib-isite ++ lexsit(ib,nexsit(ib))=ib1-isite ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ if(ia1.eq.ib)then ++ ++ do jk=1,numgsit(id) ++ ++ if(jk.ne.jj)then ++ ib1=lstgst(igrp,jk)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib1)=nexsit(ib1)+1 ++ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib1-isite ++ lexsit(ib1,nexsit(ib1))=ia-isite ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ ntpsit=isite ++ ++c check for exceeded array bounds ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)then ++ if(mxnode.gt.1)call gimax(ibig,1,jj) ++ if(idnode.eq.0)write(nrite,*)'mxexcl must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxexcl is currently ',mxexcl ++ call error(idnode,65) ++ endif ++ ++c remove redundant entries from exclusion list ++c (there shouldn't be any!) ++ ++ do i=1,ntpsit ++ ++ nlast=nexsit(i) ++ do j=1,nexsit(i)-1 ++ ++ if(j.lt.nlast)then ++ ++ kk=j ++ do k=j+1,nexsit(i) ++ ++ if(lexsit(i,j).eq.lexsit(i,k))then ++ ++ nlast=nlast-1 ++ lexsit(i,k)=0 ++ ++ else if(lexsit(i,k).gt.0)then ++ ++ kk=kk+1 ++ lexsav=lexsit(i,k) ++ lexsit(i,k)=0 ++ lexsit(i,kk)=lexsav ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ nexsit(i)=nlast ++ ++ enddo ++ ++ ++ return ++ end subroutine exclude ++ ++ subroutine excludeneu(idnode,mxnode,nneut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the excluded pair ++c interaction list of the system to be simulated ++c part 2 - neutral group implementation ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ implicit none ++ ++ logical lchk ++ integer idnode,mxnode,nneut,ibig,iatom,jatom,last,mpm2 ++ integer npm2,m,ii,im,itmols,inoff,isoff,isit,iolsit,jm,jtmols ++ integer jnoff,jsoff,jsit,jolsit,jn1,jno1,jsite,jsite0,in1,ino1 ++ integer jj0,isite,ij,idum,it ++ ++c construct excluded pair list for verlet neighbour correction ++ ++ ibig=0 ++ iatom=0 ++ jatom=0 ++ ++c generate all atomic pairs and check for exclusions ++c with Brode Ahlrichs ordering of groups ++ ++ last=nneut ++ lchk=.true. ++ mpm2=nneut/2+1 ++ npm2=(nneut-1)/2+1 ++ ++c outer loop over groups ++ ++ do m=1,mpm2 ++ ++ if(m.gt.npm2)last=mpm2-1 ++ ++c inner loop over groups - include intragroup interactions ++ ++ ii=0 ++ ++ do im=idnode+1,last,mxnode ++ ++ ii=ii+1 ++ ++c first site in neutral group ++ ++ itmols=1 ++ inoff=0 ++ isoff=0 ++ isit=numsit(itmols)*nummols(itmols) ++ iolsit=numsit(itmols) ++ ++c calculate j group indices ++ ++ jm=im+m-1 ++ if(jm.gt.nneut)jm=jm-nneut ++ ++c inner loop over neutral groups ++ ++ jtmols=1 ++ jnoff=0 ++ jsoff=0 ++ jsit=numsit(jtmols)*nummols(jtmols) ++ jolsit=numsit(jtmols) ++ ++c test first sites in neutral group ++ ++ jatom=neulst(jm) ++ ++c establish pointer to sets ++ ++ do while(jatom.gt.jsit) ++ ++ jtmols=jtmols+1 ++ jnoff=jsit ++ jsoff=jsoff+jolsit ++ jsit=jsit+nummols(jtmols)*numsit(jtmols) ++ jolsit=numsit(jtmols) ++ ++ enddo ++ ++ jn1=jatom-jnoff ++ jno1=(jn1/jolsit)*jolsit ++ jsite=jn1-jno1 ++ if(jsite.eq.0)then ++ jsite=jolsit ++ jno1=jno1-jolsit ++ endif ++ jsite=jsite+jsoff ++ jsite0=jsite-1 ++ ++ do iatom=neulst(im),neulst(im+1)-1 ++ ++c establish pointer to sets ++ ++ do while(iatom.gt.isit) ++ ++ itmols=itmols+1 ++ inoff=isit ++ isoff=isoff+iolsit ++ isit=isit+nummols(itmols)*numsit(itmols) ++ iolsit=numsit(itmols) ++ ++ enddo ++ ++ in1=iatom-inoff ++ ino1=(in1/iolsit)*iolsit ++ isite=in1-ino1 ++ if(isite.eq.0)then ++ isite=iolsit ++ ino1=ino1-iolsit ++ endif ++ isite=isite+isoff ++ ++c test im and jm are neutral groups on same molecule ++ ++ if((jnoff.eq.inoff).and.(ino1.eq.jno1))then ++ if(abs(im-jm).lt.iolsit)then ++ ++ jj0=neulst(jm) ++ jsite=jsite0 ++ ++c special case for im=jm (ie. same group) ++ ++ if(im.eq.jm)then ++ ++ jj0=iatom+1 ++ jsite=isite ++ ++ endif ++ ++c test for excluded interaction ++ ++ do jatom=jj0,neulst(jm+1)-1 ++ ++ jsite=jsite+1 ++ ++ do ij=1,nexsit(isite) ++ ++ if(lexsit(isite,ij).eq.jsite-jsoff)then ++ ++ it=nexatm(ii) ++ ++ if(it+2.gt.mxexcl)then ++ ++ ibig=max(it+2,ibig) ++ nexatm(ii)=it+2 ++ lchk=.false. ++ ++ else ++ ++ lexatm(ii,it+1)=iatom ++ lexatm(ii,it+2)=jatom ++ nexatm(ii)=nexatm(ii)+2 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ endif ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c global check ++ ++ call gstate(lchk) ++ if(.not.lchk)then ++ ++ if(mxnode.gt.1)call gimax(ibig,1,idum) ++ if(idnode.eq.0)write(nrite,*)'mxexcl must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxexcl is currently ',mxexcl ++ call error(idnode,260) ++ ++ endif ++ ++ return ++ end subroutine excludeneu ++ ++ subroutine exclude_link(idnode,mxnode,ntpmls) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the excluded pair ++c interaction list of the system to be simulated ++c ++c part 2 - link cell implementation ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith june 1992 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,ntpmls,iatom,jatom,lsite,ksite ++ integer itmols,imols,isite,kk,newatm,k ++ ++c construct excluded pair list for verlet neighbour correction ++ ++ iatom=0 ++ jatom=0 ++ lsite=0 ++ ksite=0 ++ ++ do itmols=1,ntpmls ++ ++ do imols=1,nummols(itmols) ++ ++ do isite=1,numsit(itmols) ++ ++ iatom=iatom+1 ++ ++ if(mod(iatom-1,mxnode).eq.idnode)then ++ ++ kk=0 ++ jatom=jatom+1 ++ ++ do k=1,nexsit(ksite+isite) ++ ++ newatm=lexsit(ksite+isite,k)+lsite ++ ++ kk=kk+1 ++ lexatm(jatom,kk)=newatm ++ ++ enddo ++ ++ nexatm(jatom)=kk ++ ++ endif ++ ++ enddo ++ ++ lsite=lsite+numsit(itmols) ++ ++ enddo ++ ++ ksite=ksite+numsit(itmols) ++ ++ enddo ++ ++ return ++ end subroutine exclude_link ++ ++ subroutine exclude_atom(idnode,mxnode,natms,ntpmls) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the excluded pair ++c interaction list of the system to be simulated ++c part 2 ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith june 1992 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,ntpmls,iatom,jatom,lsite ++ integer ksite,itmols,isite,imols,k,kk,newatm,j,latom,i,ii ++ ++c construct excluded pair list for verlet neighbour correction ++ ++ iatom=0 ++ jatom=0 ++ lsite=0 ++ ksite=0 ++ ++ do itmols=1,ntpmls ++ ++ do imols=1,nummols(itmols) ++ ++ do isite=1,numsit(itmols) ++ ++ iatom=iatom+1 ++ ++ if(mod(iatom-1,mxnode).eq.idnode)then ++ ++ kk=0 ++ jatom=jatom+1 ++ ++ do k=1,nexsit(ksite+isite) ++ ++ newatm=lexsit(ksite+isite,k)+lsite ++ ++c keep only brode-ahlrichs combinations of indices ++ ++ if(((newatm.gt.iatom).and. ++ x (newatm-iatom.le.natms/2)).or. ++ x ((newatm.lt.iatom).and. ++ x (newatm+natms-iatom.le.(natms-1)/2)))then ++ ++ kk=kk+1 ++ lexatm(jatom,kk)=newatm ++ ++ if(kk.gt.1)then ++ ++c sort the excluded atom list in ascending indices ++ ++ do j=kk,2,-1 ++ ++ if(lexatm(jatom,j).lt.lexatm(jatom,j-1)) ++ x then ++ latom=lexatm(jatom,j) ++ lexatm(jatom,j)=lexatm(jatom,j-1) ++ lexatm(jatom,j-1)=latom ++ endif ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ nexatm(jatom)=kk ++ ++ endif ++ ++ enddo ++ ++ lsite=lsite+numsit(itmols) ++ ++ enddo ++ ++ ksite=ksite+numsit(itmols) ++ ++ enddo ++ ++c final sort into brode-ahlrichs ordering ++ ++ ii=0 ++ do i=1+idnode,natms,mxnode ++ ++ ii=ii+1 ++ do j=1,nexatm(ii) ++ ++ if(lexatm(ii,1).lt.i)then ++ ++ latom=lexatm(ii,1) ++ ++ do k=1,nexatm(ii)-1 ++ ++ lexatm(ii,k)=lexatm(ii,k+1) ++ ++ enddo ++ ++ lexatm(ii,nexatm(ii))=latom ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine exclude_atom ++ ++ subroutine exclude_copy_mtd(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for copying excluded atom arrays into ++c the metadynamics module for use in computing order parameters ++c ++c author - d. quigley April 2012 ++c ++c*********************************************************************** ++ use metafreeze_module, only : mtd_lexatm,mtd_nexatm ++ implicit none ++ integer, parameter :: nnn=2 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c data needed by metadynamics module ++ allocate (mtd_lexatm(msatms,mxexcl),stat=fail(1)) ++ allocate (mtd_nexatm(msatms) ,stat=fail(2)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0) call error(idnode,1012) ++ enddo ++ ++ ++c copy exclude list into metafreeze module ++ mtd_nexatm = nexatm ++ mtd_lexatm = lexatm ++ ++ return ++ end subroutine exclude_copy_mtd ++ ++ end module exclude_module ++ +diff -urN dl_class_1.9.orig/srcmod/external_field_module.f dl_class_1.9/srcmod/external_field_module.f +--- dl_class_1.9.orig/srcmod/external_field_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/external_field_module.f 2014-02-27 13:49:34.000000000 +0100 +@@ -0,0 +1,347 @@ ++ module external_field_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining external field potential arrays ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use parse_module ++ use setup_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmfld(:) ++ ++ save prmfld ++ ++ contains ++ ++ subroutine alloc_fld_arrays(idnode) ++ ++ implicit none ++ ++ integer fail,idnode ++ ++ data fail/0/ ++ ++ allocate (prmfld(mxfld),stat=fail) ++ if(fail.ne.0)call error(idnode,1200) ++ ++ end subroutine alloc_fld_arrays ++ ++ subroutine define_external_field ++ x (safe,lunits,idnode,keyfld,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to define external fields ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c amended - p.-l. chau jun 2009 z-restraint option ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,keyfld,nfld,i,k,idum ++ real(8) engunit ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call strip(record,lenrec) ++ call lowcase(record,lenrec) ++ call copystring(record,message,80) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'elec') then ++ keyfld=1 ++ elseif(keyword(1:4).eq.'oshr') then ++ keyfld=2 ++ elseif(keyword(1:4).eq.'shrx') then ++ keyfld=3 ++ elseif(keyword(1:4).eq.'grav') then ++ keyfld=4 ++ elseif(keyword(1:4).eq.'magn') then ++ keyfld=5 ++ elseif(keyword(1:4).eq.'sphr') then ++ keyfld=6 ++ elseif(keyword(1:4).eq.'zbnd') then ++ keyfld=7 ++ elseif(keyword(1:4).eq.'zres') then ++ keyfld=9 ++ else ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,454) ++ endif ++ ++ do i=1,mxfld ++ prmfld(i)=0.d0 ++ enddo ++ ++ nfld=intstr(record,lenrec,idum) ++ if(nfld.eq.0)nfld=5 ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ do k=1,nfld ++ ++ prmfld(k)=dblstr(record,lenrec,idum) ++ if(idum.gt.lenrec.and.k.lt.nfld)then ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'external field key ',13x,a4, ++ x /,/,30x,'external field parameters')") keyword(1:4) ++ write(nrite,"(2(/,1x,1p,5e15.5))") prmfld ++ ++ endif ++ ++c convert to internal units ++ ++ if(keyfld.eq.1.or.keyfld.eq.4.or.keyfld.eq.5) then ++ ++ if(.not.lunits)call error(idnode,6) ++ ++ do i=1,3 ++ prmfld(i)=prmfld(i)*engunit ++ enddo ++ ++ elseif(keyfld.eq.2.or.keyfld.eq.6.or.keyfld.eq.7) then ++ ++ prmfld(1)=prmfld(1)*engunit ++ ++ elseif(keyfld.eq.9) then ++ ++ prmfld(3)=prmfld(3)*engunit ++ ++ endif ++ ++ return ++ end subroutine define_external_field ++ ++ subroutine extnfld ++ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) ++ ++c*********************************************************************** ++c ++c dl_poly routine for application of an external field ++c ++c replicated data version / block data ++c ++c copyright daresbury laboratory 1993 ++c author - t.forester october 1993 ++c amended - t.forester dec 1994 ++c amended - p.-l. chau jun 2009 z-restraint option ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,keyfld,mxnode,natms,iatm1,iatm2,i,j ++ integer istart,ifinish,numresat ++ real(8) engfld,virfld,rz,rrr,gamma,zdif,totwgt ++ real(8) com(3) ++ ++c energy and virial accumulators ++ ++ engfld=0.d0 ++ virfld=0.d0 ++ ++c block indices ++ ++ iatm1=(idnode*natms)/mxnode+1 ++ iatm2=((idnode+1)*natms)/mxnode ++ ++ if(keyfld.eq.1) then ++ ++c electric field: prmfld(1-3) are field components ++ ++ do i=iatm1,iatm2 ++ ++ fxx(i)=fxx(i)+chge(i)*prmfld(1) ++ fyy(i)=fyy(i)+chge(i)*prmfld(2) ++ fzz(i)=fzz(i)+chge(i)*prmfld(3) ++ ++ enddo ++ ++ elseif(keyfld.eq.2) then ++ ++c oscillating shear: orthorhombic box: Fx=a*cos(b.2.pi.z/L) ++ ++ rz=2.d0*pi/cell(9) ++ ++ do i=iatm1,iatm2 ++ ++ fxx(i)=fxx(i)+prmfld(1)*cos(prmfld(2)*zzz(i)*rz) ++ ++ enddo ++ ++ elseif(keyfld.eq.3.and.imcon.eq.6) then ++ ++c continuous shear of walls : 2D periodic box (imcon=6) ++c shear rate=prmfld(1) angstrom per ps for atoms at ++c abs(z) > prmfld(2) ++ ++ do i=iatm1,iatm2 ++ ++ if(abs(zzz(i)).gt.prmfld(2)) then ++ ++ vxx(i)=0.5d0*sign(prmfld(1),zzz(i)) ++ ++ endif ++ ++ enddo ++ ++ elseif(keyfld.eq.4) then ++ ++c gravitational field: field components given by prmfld(1-3) ++ ++ do i=iatm1,iatm2 ++ ++ fxx(i)=fxx(i)+prmfld(1)*weight(i) ++ fyy(i)=fyy(i)+prmfld(2)*weight(i) ++ fzz(i)=fzz(i)+prmfld(3)*weight(i) ++ ++ enddo ++ ++ elseif(keyfld.eq.5) then ++ ++c magnetic field: field components given by prmfld(1-3) ++ ++ do i=iatm1,iatm2 ++ ++ fxx(i)=fxx(i)+(vyy(i)*prmfld(3)-vzz(i)*prmfld(2)) ++ x *chge(i) ++ fyy(i)=fyy(i)+(vzz(i)*prmfld(1)-vxx(i)*prmfld(3)) ++ x *chge(i) ++ fzz(i)=fzz(i)+(vxx(i)*prmfld(2)-vyy(i)*prmfld(1)) ++ x *chge(i) ++ ++ enddo ++ ++ elseif(keyfld.eq.6) then ++ ++c containing sphere : r^(-n) potential ++ ++ do i=iatm1,iatm2 ++ ++ rrr=sqrt(xxx(i)**2+yyy(i)**2+zzz(i)**2) ++ if(rrr.gt.prmfld(4)) then ++ rrr=prmfld(2)-rrr ++ if(rrr.lt.0.d0) rrr=0.1d0 ++ ++ gamma =prmfld(1)*rrr**(-prmfld(3)) ++ engfld=engfld+gamma ++ ++ gamma=-prmfld(3)*gamma/((prmfld(2)-rrr)*rrr) ++ ++ fxx(i)=fxx(i)+gamma*xxx(i) ++ fyy(i)=fyy(i)+gamma*yyy(i) ++ fzz(i)=fzz(i)+gamma*zzz(i) ++ ++ endif ++ ++ enddo ++ ++ elseif(keyfld.eq.7) then ++ ++c repulsive wall (harmonic) starting at z0 ++ ++ do i=iatm1,iatm2 ++ ++ if(prmfld(3)*zzz(i).gt.prmfld(3)*prmfld(2)) then ++ ++ zdif=zzz(i)-prmfld(2) ++ gamma=-prmfld(1)*zdif ++ ++ fzz(i)=fzz(i)+gamma ++ engfld=engfld-gamma*zdif/2. ++ ++ endif ++ ++ enddo ++ ++ elseif(keyfld.eq.9) then ++ ++c keyfld=9. restrain molecule z-position ++c prmfld(1) is number of first atom of restrained molecule ++c prmfld(2) is number of last atom of restrained molecule ++c prmfld(3) is the restraining constant ++c prmfld(4) is z-min ++c prmfld(5) is z-max ++ ++ istart=nint(prmfld(1)) ++ ifinish=nint(prmfld(2)) ++ numresat=ifinish-istart+1 ++ ++c calculate the centre of mass of the molecule ++ ++ call getcom_mol(istart,ifinish,imcon,idnode,mxnode,totwgt,com) ++ ++c apply restraint force according to location ++ ++ if(com(3).lt.prmfld(4))then ++ ++c if centre of mass is below z-min, activate restraining force ++ ++ do i=istart,ifinish ++ ++ fzz(i)=fzz(i)-prmfld(3)*(weight(i)/totwgt)* ++ x (com(3)-prmfld(4))/mxnode ++ ++ enddo ++ ++ elseif(com(3).gt.prmfld(5))then ++ ++c if centre of mass if above z-max, activate restraining force ++ ++ do i=istart,ifinish ++ ++ fzz(i)=fzz(i)-prmfld(3)*(weight(i)/totwgt)* ++ x (com(3)-prmfld(5))/mxnode ++ ++ enddo ++ ++ endif ++ ++ else ++ ++c unidentified field potential error exit ++ ++ call error(idnode,454) ++ ++ endif ++ ++c global sum of external field potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engfld ++ buffer(2)=virfld ++ call gdsum(buffer(1),2,buffer(3)) ++ engfld=buffer(1) ++ virfld=buffer(2) ++ ++ endif ++ ++ return ++ end subroutine extnfld ++ ++ end module external_field_module +diff -urN dl_class_1.9.orig/srcmod/forces_module.f dl_class_1.9/srcmod/forces_module.f +--- dl_class_1.9.orig/srcmod/forces_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/forces_module.f 2015-11-09 14:15:45.064258843 +0100 +@@ -0,0 +1,2970 @@ ++ module forces_module ++ ++c*********************************************************************** ++c ++c dl_poly module for calculation of atomic forces ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - d. quigley : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use coulomb_module ++ use error_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use four_body_module ++ use hkewald_module ++ use metafreeze_module ++ use metal_module ++ use neu_coul_module ++ use nlist_builders_module ++ use pair_module ++ use property_module ++ use setup_module ++ use solvation_module ++ use spme_module ++ use tersoff_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ contains ++ ++ subroutine force_manager ++ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c********************************************************************* ++c ++c dl_poly subroutine to manage the calculation of the atomic forces ++c from all force field terms. ++c ++c copyright - daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva ++ logical lfree,lghost,llsolva ++ ++ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,numrdf ++ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ntpmet ++ integer i,nospl,multt,nneut,ntbond,ntangl,ntdihd,nsolva,isolva ++ integer ntinv,ntteth,ntshl,ntptbp,ntpfbp,ntpter,keyshl,keyfld ++ ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet ++ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp ++ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang,engdih ++ real(8) virdih,enginv,virinv,engtet,virtet,engshl,virshl,engfld ++ real(8) virfld,fmax,temp,shlke,engcfg,tmpeng,tmpvir,engord,virord ++ ++ llsolva=.false. ++ ++c initialize energy and virial accumulators ++ ++ engbnd=0.d0 ++ virbnd=0.d0 ++ engang=0.d0 ++ virang=0.d0 ++ engdih=0.d0 ++ virdih=0.d0 ++ enginv=0.d0 ++ virinv=0.d0 ++ engtbp=0.d0 ++ virtbp=0.d0 ++ engter=0.d0 ++ virter=0.d0 ++ engfbp=0.d0 ++ virfbp=0.d0 ++ engsrp=0.d0 ++ virsrp=0.d0 ++ engcpe=0.d0 ++ vircpe=0.d0 ++ engfld=0.d0 ++ virfld=0.d0 ++ engshl=0.d0 ++ virshl=0.d0 ++ shlke =0.d0 ++ engtet=0.d0 ++ virtet=0.d0 ++ engmet=0.d0 ++ virmet=0.d0 ++ virord=0.0d0 ++ engord=0.0d0 ++ ++ if(lmetadyn)then ++ ++ eng_loc=0.0d0 ++ vir_loc=0.0d0 ++ fxx_loc(:)=0.0d0 ++ fyy_loc(:)=0.0d0 ++ fzz_loc(:)=0.0d0 ++ stress_loc(:)=0.0d0 ++ ++ endif ++ ++c initialise free energy accumulators ++ ++ if(lfree)then ++ ++ ang_fre=0.d0 ++ bnd_fre=0.d0 ++ dih_fre=0.d0 ++ inv_fre=0.d0 ++ tbp_fre=0.d0 ++ fbp_fre=0.d0 ++ cou_fre=0.d0 ++ vdw_fre=0.d0 ++ shl_fre=0.d0 ++ ang_vir=0.d0 ++ bnd_vir=0.d0 ++ dih_vir=0.d0 ++ inv_vir=0.d0 ++ tbp_vir=0.d0 ++ fbp_vir=0.d0 ++ cou_vir=0.d0 ++ vdw_vir=0.d0 ++ shl_vir=0.d0 ++ eng_cfg_fre=0.d0 ++ vir_cfg_fre=0.d0 ++ ++ endif ++ ++c initialise solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ if(keyfce/2.gt.0)lcomp(6)=.true. ++ if(mod(keyfce,2).eq.1)lcomp(7)=.true. ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ llsolva=.true. ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c initialise the force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ if(nstep.gt.0)then ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++ endif ++ ++ if(keyfce.gt.0)then ++ ++c calculate pair forces, including coulombic forces ++ ++ if(lnsq)then ++ ++c multiple timestep - all-pairs ++ ++ call multiple_nsq ++ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp) ++ ++ elseif(.not.lneut)then ++ ++c single timestep ++ ++ if(multt.eq.1)then ++ ++ call forces ++ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw, ++ x ntpmet,natms,nstbgr,nstep,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw, ++ x vircpe,virsrp,volm,engmet,virmet) ++ ++ else ++ ++ call multiple ++ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, ++ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, ++ x rvdw,vircpe,virsrp,volm) ++ ++ endif ++ ++ elseif(lneut)then ++ ++c neutral groups ++ ++ if(multt.eq.1)then ++ ++ call forces_neu ++ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, ++ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, ++ x vircpe,virsrp) ++ ++ else ++ ++ call multiple_neu ++ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rprim,rcut,rvdw,alpha,vircpe,virsrp) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c add in long range corrections to energy and pressure ++ ++ engsrp=engsrp+elrc ++ virsrp=virsrp+virlrc ++ engmet=engmet+elrcm(0) ++ virmet=virmet+vlrcm(0) ++ if(lfree)then ++ vdw_fre=vdw_fre+elrc_fre ++ vdw_vir=vdw_vir+vlrc_fre ++ endif ++ ++c calculate three body forces ++ ++ if(ntptbp.gt.0)call thbfrc ++ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcuttb, ++ x engtbp,virtbp) ++ ++c calculate four body forces ++ ++ if(ntpfbp.gt.0)call fbpfrc ++ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcutfb, ++ x engfbp,virfbp) ++ ++c calculate tersoff potential forces ++ ++ if(ntpter.gt.0)call tersoff ++ x (idnode,mxnode,natms,imcon,rctter,engter,virter) ++ ++c calculate bond forces ++ ++ if(ntbond.gt.0)call bndfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntbond,epsq, ++ x engbnd,virbnd) ++ ++c calculate valence angle forces ++ ++ if(ntangl.gt.0)call angfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntangl,engang,virang) ++ ++c calculate dihedral forces ++ ++ if(ntdihd.gt.0)call dihfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntdihd,keyfce,dlrpot, ++ x epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe,virdih,virsrp) ++ ++c calculate inversion forces ++ ++ if(ntinv.gt.0)call invfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntinv,enginv,virinv) ++ ++c calculate tethered atom forces ++ ++ if(ntteth.gt.0)call tethfrc ++ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) ++ ++c calculate shell model forces ++ ++ if(keyshl.gt.0)call shlfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntshl,engshl,virshl) ++ ++c external field ++ ++ if(keyfld.gt.0)call extnfld ++ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) ++ ++c metadynamics option : use potential energy as order parameter ++ ++ if(lmetadyn)then ++ ++ tmpeng=engsrp+engcpe+engbnd+engang+engdih+engfld+ ++ x engtbp+engfbp+engshl+enginv+engter+engmet ++ ++ tmpvir=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet ++ ++ call metafreeze_driver ++ x (imcon,natms,temp,nstep,tmpeng,tmpvir,engord,virord) ++ ++ endif ++ ++c global summation of force arrays (basic replicated data strategy) ++ ++ call global_sum_forces(natms,mxnode,fxx,fyy,fzz) ++ ++c global sum of stress arrays ++ ++ if(mxnode.gt.1)call gdsum(stress,9,buffer) ++ ++c add long range correction to diagonal terms of stress tensor ++ ++ stress(1)=stress(1)-(virlrc+vlrcm(0))/3.d0 ++ stress(5)=stress(5)-(virlrc+vlrcm(0))/3.d0 ++ stress(9)=stress(9)-(virlrc+vlrcm(0))/3.d0 ++ ++c cap forces in equilibration mode ++ ++ if(nstep.le.nsteql.and.lfcap) ++ x call fcap(lfcap,natms,fmax,temp) ++ ++c total configuration energy ++ ++ engcfg=engsrp+engcpe+engbnd+engang+engdih+engfld+engtbp+ ++ x engfbp+engshl+enginv+engter+engmet ++ ++c PLUMED modifications ++ if(lplumed)then ++ call plumed_f_gcmd("setStep"//char(0),nstep) ++ call plumed_f_gcmd("setMasses"//char(0),weight) ++ call plumed_f_gcmd("setCharges"//char(0),chge) ++ call plumed_f_gcmd("setPositionsX"//char(0),xxx) ++ call plumed_f_gcmd("setPositionsY"//char(0),yyy) ++ call plumed_f_gcmd("setPositionsZ"//char(0),zzz) ++ call plumed_f_gcmd("setBox"//char(0),cell) ++ call plumed_f_gcmd("setEnergy"//char(0),engcfg) ++ call plumed_f_gcmd("setForcesX"//char(0),fxx) ++ call plumed_f_gcmd("setForcesY"//char(0),fyy) ++ call plumed_f_gcmd("setForcesZ"//char(0),fzz) ++ call plumed_f_gcmd("setVirial"//char(0),stress) ++ call plumed_f_gcmd("calc"//char(0) ) ++ endif ++c PLUMED modifications ++ ++c total derivative of the configurational free energy ++ ++ if(lfree)then ++ ++ eng_cfg_fre=dlambda*(ang_fre+bnd_fre+dih_fre+inv_fre+ ++ x tbp_fre+fbp_fre+cou_fre+vdw_fre+shl_fre) ++ vir_cfg_fre=dlambda*(ang_vir+bnd_vir+dih_vir+inv_vir+ ++ x tbp_vir+fbp_vir+cou_vir+vdw_vir+shl_vir) ++ ++ endif ++ ++c sum solvation and excitation energies for pair forces ++ ++ if(mxnode.gt.1)then ++ ++ if(llsolva)then ++ ++ call gdsum(vdw_sol,mxtmls_sol2,buffer) ++ call gdsum(cou_sol,mxtmls_sol2,buffer) ++ ++ if(lghost)then ++ ++ call gdsum(vdw_exc,mxtmls_exc2,buffer) ++ call gdsum(cou_exc,mxtmls_exc2,buffer) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c add long range corrections to solvation terms ++ ++ if(lsolva)then ++ ++ vdw_sol(:)=vdw_sol(:)+elrc_sol(:) ++ if(lghost)vdw_exc(:)=vdw_exc(:)+elrc_exc(:) ++ ++ endif ++ ++ return ++ end subroutine force_manager ++ ++ subroutine forces ++ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw,ntpmet,natms, ++ x nstbgr,nstep,nsteql,numrdf,nospl,nsolva,isolva,alpha,dlrpot, ++ x drewd,engcpe,engsrp,epsq,rcut,rvdw,vircpe,virsrp,volm,engmet, ++ x virmet) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c amended - t. forester sept 1994 ++c amended - w. smith june 1995 for metal potentials ++c ++c key: ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ Ewald sum : ewald1,2,3 ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ truncated and shifted coulombic : coul4 ++c = 10,11 ----- reaction field : coul3 ++c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3] ++c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzeql,loglnk,lewald,lspme,lhke,newjob,lcshft,safe ++ logical lsolva,lfree,lghost,llsolva ++ ++ integer idnode,imcon,keyfce,kmax1,kmax2,kmax3,nhko,nlatt ++ integer mxnode,ntpvdw,natms,nstbgr,nstep,nsteql,numrdf ++ integer ntpmet,nospl,nsolva,isolva,i,j,k,ii ++ ++ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw,eps ++ real(8) vircpe,virsrp,volm,engacc,engac1,viracc,engmet,virmet ++ ++ save newjob ++ ++ data newjob/.true./ ++ ++ safe=.true. ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ lhke=(keyfce/2.eq.7) ++ lspme=(keyfce/2.eq.6) ++ lewald=(keyfce/2.eq.1) ++ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) ++ ++c create ewald interpolation arrays ++ ++ if(newjob)then ++ ++ if(lhke)then ++ ++ call hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) ++ ++ else if(lewald.or.lspme.or.lcshft)then ++ ++ call erfcgen(alpha,drewd,rcut) ++ ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++c initialise force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c calculate local density in metals ++ ++ if(ntpmet.gt.0)then ++ ++ call metdens ++ x (idnode,imcon,mxnode,natms,engmet,virmet) ++ ++ stress(1)=stress(1)-virmet/3.d0 ++ stress(5)=stress(5)-virmet/3.d0 ++ stress(9)=stress(9)-virmet/3.d0 ++ ++ endif ++ ++c fourier contribution to coulombic forces in Ewald sum ++ ++ if(lewald)then ++ ++ call ewald1 ++ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, ++ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) ++ ++ engcpe=engcpe+engac1 ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c hautman-klein-ewald method ++ ++ if(lhke)then ++ ++c fourier terms of hk-ewald ++ ++ call hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engacc,viracc,alpha,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++c real space terms of hk-ewald ++ ++ call hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engacc,viracc, ++ x drewd,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c smoothed particle mesh ewald ++ ++ if(lspme)then ++ ++ call ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engac1,viracc,alpha,volm,epsq) ++ ++ engcpe=engcpe+engac1 ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c outer loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ilist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) ++ ++c square of distances ++ ++ do k=1,lentry(ii) ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c calculate metal forces and potential ++ ++ if(ntpmet.gt.0)then ++ ++ call metfrc(safe,i,lentry(ii),engacc,viracc) ++ ++ engmet=engmet+engacc ++ virmet=virmet+viracc ++ ++ endif ++ ++c calculate short range force and potential terms ++ ++ if(ntpvdw.gt.0.and.mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc, ++ x rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme)then ++ ++ call ewald2(llsolva,lfree,lghost,i,lentry(ii),engacc, ++ x viracc,drewd,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions ++ ++ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then ++ ++ if(mod(nstep,nstbgr).eq.0)then ++ ++ call rdf0(i,lentry(ii),rcut) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c check metal interpolation is safe ++ ++ if(ntpmet.gt.0)then ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,142) ++ ++ endif ++ ++c calculate corrections for intramolecular coulomb terms in ++c Ewald sum ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ eps=epsq ++ if(loglnk)eps=eps*2.0d0 ++ ++c outer loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,nexatm(ii) ++ ++ j=lexatm(ii,k) ++ jlist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) ++ ++c calculate correction terms ++ ++ if(lhke)then ++ ++ call hkewald3(i,ii,engacc,viracc,eps) ++ ++ else ++ ++ call ewald3 ++ x (llsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) ++ ++ endif ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ enddo ++ ++ endif ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then ++ ++ if(mod(nstep,nstbgr).eq.0)then ++ ++ numrdf=numrdf+1 ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=engmet ++ buffer(6)=virmet ++ buffer(7)=vdw_fre ++ buffer(8)=cou_fre ++ buffer(9)=vdw_vir ++ buffer(10)=cou_vir ++ call gdsum(buffer(1),10,buffer(11)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ engmet=buffer(5) ++ virmet=buffer(6) ++ vdw_fre=buffer(7) ++ cou_fre=buffer(8) ++ vdw_vir=buffer(9) ++ cou_vir=buffer(10) ++ ++ endif ++ ++ return ++ end subroutine forces ++ ++ subroutine forces_neu ++ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, ++ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, ++ x vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c neutral group implemenation - no Ewald sum option ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c ++c modified - t. forester april 1993 ++c key: ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ invalid ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ invalid ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzeql,newlst,lchk,lsolva,lfree,lghost,llsolva ++ ++ integer idnode,imcon,keyfce,mxnode,natms,nneut,nstbgr ++ integer nstep,nsteql,numrdf,i,fail,jneu,jj0,jj1,j ++ integer ibig,ia,ineu,isn,ik,nsolva,isolva ++ real(8) dlrpot,engcpe,engsrp,epsq,rcut,rvdw,vircpe ++ real(8) virsrp,engacc,viracc,anorm,alpha ++ ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ ++ dimension fail(2) ++ ++ data fail/0,0/ ++ ++c allocate working arrays ++ ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ do i=1,2 ++ if(fail(i).ne.0)call error(idnode,1820) ++ enddo ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c initialise force and stress arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c initialise energy and virial accumulators ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c intra group vectors com ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-xxx(jj0) ++ tyy(j)=yyy(j)-yyy(jj0) ++ tzz(j)=zzz(j)-zzz(jj0) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,natms,cell,txx,tyy,tzz) ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ xxx(j)=txx(j)+xxx(jj0) ++ yyy(j)=tyy(j)+yyy(jj0) ++ zzz(j)=tzz(j)+zzz(jj0) ++ ++ enddo ++ ++c centre of molecule ++ ++ uxx(jneu)=0.d0 ++ uyy(jneu)=0.d0 ++ uzz(jneu)=0.d0 ++ anorm=1.d0/dble(jj1-jj0+1) ++ ++ do j=jj0,jj1 ++ ++ uxx(jneu)=uxx(jneu)+xxx(j)*anorm ++ uyy(jneu)=uyy(jneu)+yyy(j)*anorm ++ uzz(jneu)=uzz(jneu)+zzz(j)*anorm ++ ++ enddo ++ ++c vector from site to geometric centre ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-uxx(jneu) ++ tyy(j)=yyy(j)-uyy(jneu) ++ tzz(j)=zzz(j)-uzz(jneu) ++ ++ enddo ++ ++ enddo ++ ++c outer loop over neutral groups ++ ++ lchk=.true. ++ ibig=0 ++ ia=0 ++ ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ newlst=.true. ++ ++ isn=1 ++ call neutlst ++ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrceneu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions ++ ++ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. ++ x mod(nstep,nstbgr).eq.0)then ++ ++ call rdf0neu(ik,rcut) ++ ++ endif ++ ++ enddo ++ ++c check on validity of call to neutlst ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ if(.not.lchk)then ++ call gimax(ibig,1,i) ++ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf ++ call error(idnode,478) ++ endif ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) ++ ++c counter for rdf statistics outside loop structure ++ ++ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. ++ x mod(nstep,nstbgr).eq.0)numrdf=numrdf+1 ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,stat=fail(2)) ++ ++ return ++ end subroutine forces_neu ++ ++ subroutine multiple ++ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, ++ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, ++ x rvdw,vircpe,virsrp,volm) ++c*************************************************************************** ++c ++c dl_poly subroutine for multiple time step algorithm ++c reciprocal space calculated on long time steps. ++c ++c copyright daresbury laboratory ++c ++c author t. forester, may 1993 ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ Ewald sum : ewald1,2,3,4 ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ truncated and shifted coulombic : coul4 ++c = 10,11 ----- reaction field : coul3 ++c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3,4] ++c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3,4 ++c ++c**************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=5 ++ ++ logical newplst,newlst,lgofr,lzeql,lgr,loglnk,lewald,lspme ++ logical lhke,newjob,lcshft,lsolva,lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt ++ integer mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,fail ++ integer numlsts,i,nstep0,nsolva,isolva,ii,k,j,ik ++ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,volm,stresp,engcpl,engacc,viracc,engac1 ++ real(8) vircpl,eps,ann,engsr1,viracl,engsrl,virsrl,virac2,engcp1 ++ real(8) vircp1,engacl,engac2,virsr1 ++ ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension stresp(9),fail(nnn) ++ ++ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 ++ save engsr1,virsr1,stresp,fpx,fpy,fpz,newjob ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data newjob/.true./ ++ data numlsts/-1/ ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ lhke=(keyfce/2.eq.7) ++ lspme=(keyfce/2.eq.6) ++ lewald=(keyfce/2.eq.1) ++ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) ++ if(newlst)nstep0=nstep ++ newplst=(newlst).or.(mod(nstep-nstep0,multt).eq.0) ++ ++c allocate working arrays ++ ++ if(newjob)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) ++ endif ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1840) ++ enddo ++ ++ endif ++ ++c create ewald interpolation arrays ++ ++ if(newjob)then ++ ++ if(lspme.or.lewald.or.lcshft)then ++ ++ call erfcgen(alpha,drewd,rcut) ++ ++ endif ++ ++ endif ++ ++ newjob=.false. ++ ++c divide neighbour list into primary and secondary neighbours ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call primlst(idnode,mxnode,natms,imcon,rprim) ++ ++ endif ++ ++c flag for accumulating rdfs ++ ++ lgr=.false. ++ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) ++ lgr=(lgr.and.(newplst.and.lgofr)) ++ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) ++ ++c zero force and stress arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c ********************PROCESS SECONDARY NEIGHBOURS****************** ++ ++ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then ++ ++c zero accumulators ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ engsrl=0.d0 ++ virsrl=0.d0 ++ llsolva=lsolva ++ if(lsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate fourier contribution to secondary coulombic forces ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ if(lewald)then ++ ++ call ewald1 ++ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, ++ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) ++ ++c hautman-klein-ewald method ++ ++ elseif(lhke)then ++ ++ call hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engac1,viracc,alpha,epsq) ++ ++c real space terms of hk-ewald ++ ++ call hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engac2, ++ x virac2,drewd,rcut,epsq) ++ ++ engac1=engac1+engac2 ++ viracc=viracc+virac2 ++ ++ elseif(lspme)then ++ ++c smoothed particle mesh ewald ++ ++ call ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engac1,viracc,alpha,volm,epsq) ++ ++ endif ++ ++ engcpl=engcpl+engac1 ++ vircpl=vircpl+viracc ++ ++c calculate corrections for intramolecular coulomb terms in ++c Ewald sum ++c note: if using link cells - have double counted excluded ++c interactions use temporary adjustment to relative dielectric ++c constant ++ ++ eps=epsq ++ if(loglnk)eps=epsq*2.0d0 ++ ++c calculate self interaction corrections for fourier contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,nexatm(ii) ++ ++ j=lexatm(ii,k) ++ jlist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) ++ ++c calculate correction terms ++ ++ if(lhke)then ++ ++ call hkewald3(i,ii,engacc,viracc,eps) ++ ++ else ++ ++ call ewald3 ++ x (lsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) ++ ++ endif ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ enddo ++ ++ endif ++ ++c calculate pair contributions to secondary neighbour forces ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of distance ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrl=engsrl+engacc ++ virsrl=virsrl+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme)then ++ ++ call ewald2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,drewd,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ endif ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ flx(i)=fxx(i) ++ fly(i)=fyy(i) ++ flz(i)=fzz(i) ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stress(i) ++ stress(i)=0.d0 ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol(:) ++ cou_sol_lng(:)=cou_sol(:) ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc(:) ++ cou_exc_lng(:)=cou_exc(:) ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c calculate pair force contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=-list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of distance ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ if(newplst.or. ++ x (mod(nstep-nstep0,multt).le.1))then ++ ++ if(lhke)then ++ ++ call hkewald4(i,ik,engacc,viracc,engacl,viracl,rcut,epsq) ++ ++ else ++ ++ call ewald4 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,engacl,viracl, ++ x drewd,rcut,epsq) ++ ++ endif ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ engcpl=engcpl+engacl ++ vircpl=vircpl+viracl ++ ++ else ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++ enddo ++ ++c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary neighbour contributions to force, energy etc ++ ++ if(newplst)then ++ ++ do i=1,natms ++ ++ fpx(i)=flx(i) ++ fpy(i)=fly(i) ++ fpz(i)=flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stresl(i) ++ enddo ++ ++ engsr1=engsrl ++ virsr1=virsrl ++ engcp1=engcpl ++ vircp1=vircpl ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol_lng(:) ++ cou_sol_put(:)=cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc_lng(:) ++ cou_exc_put(:)=cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c calculate force increments etc ++ ++ if(mod(nstep-nstep0,multt).eq.1)then ++ ++ do i=1,natms ++ ++ flx(i)=flx(i)-fpx(i) ++ fly(i)=fly(i)-fpy(i) ++ flz(i)=flz(i)-fpz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stresl(i)-stresp(i) ++ enddo ++ ++ virsrl=virsrl-virsr1 ++ engsrl=engsrl-engsr1 ++ vircpl=vircpl-vircp1 ++ engcpl=engcpl-engcp1 ++ ++c solvation and excitation increments ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) ++ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) ++ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c extrapolate long range terms ++ ++ ann=dble(mod(nstep-nstep0,multt)) ++ ++ do i=1,natms ++ ++ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) ++ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) ++ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresp(i)+stresl(i)*ann ++ enddo ++ ++ engsrp=engsr1+engsrl*ann+engsrp ++ virsrp=virsr1+virsrl*ann+virsrp ++ engcpe=engcp1+engcpl*ann+engcpe ++ vircpe=vircp1+vircpl*ann+vircpe ++ ++c solvation and excitation extrapolation ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) ++ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) ++ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++ return ++ end subroutine multiple ++ ++ subroutine multiple_neu ++ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rprim,rcut,rvdw,alpha,vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c neutral group implemenation - no Ewald sum option ++c multiple timestep option ++c ++c parallel replicated data version ++c ++c fpx,fpy,fpz : forces from electrostatics fron rprim < r <= rcut ++c fxx,fyy,fzz : total force ++c ++c copyright daresbury laboratory april 1994 ++c author - t. forester april 1993 ++c key: ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ invalid ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ invalid ++c = 10,11 ----- reaction field : coul3 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical lgofr,lzeql,newlst,newplst,lgr,lchk,newjob,lsolva ++ logical lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,multt,mxnode,natms,nneut,nstbgr ++ integer nstep,nsteql,numrdf,fail,i,numlsts,jneu,jj0,j ++ integer jj1,ineu,ia,isn,ibig,ik,nstep0,nsolva,isolva ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rprim,rcut,rvdw,vircpe ++ real(8) virsrp,engcpl,vircpl,engsrl,virsrl,anorm,ann,stresp ++ real(8) engacc,viracc,engsr1,virsr1,engcp1,vircp1,alpha ++ ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension fail(nnn),stresp(9) ++ ++ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 ++ save engsr1,virsr1,stresp,fpx,fpy,fpz ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data newjob/.true./ ++ data numlsts/-1/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ if(newjob)then ++ ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(3)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(4)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(5)) ++ ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(6)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(7)) ++ endif ++ ++ endif ++ newjob=.false. ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1850) ++ enddo ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c error if ewald sum requested ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) ++ ++c create list of primary and secondary neighbours ++ ++ if(newlst)nstep0=nstep ++ newplst=(mod(nstep-nstep0,multt).eq.0) ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) ++ ++ endif ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c zero force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress arrays ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c flag for accumulating rdfs ++ ++ lgr=.false. ++ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) ++ lgr=(lgr.and.(newplst.and.lgofr)) ++ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) ++ ++c intra group vectors com ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-xxx(jj0) ++ tyy(j)=yyy(j)-yyy(jj0) ++ tzz(j)=zzz(j)-zzz(jj0) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,natms,cell,txx,tyy,tzz) ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ xxx(j)=txx(j)+xxx(jj0) ++ yyy(j)=tyy(j)+yyy(jj0) ++ zzz(j)=tzz(j)+zzz(jj0) ++ ++ enddo ++ ++c centre of molecule ++ ++ uxx(jneu)=0.d0 ++ uyy(jneu)=0.d0 ++ uzz(jneu)=0.d0 ++ anorm=1.d0/dble(jj1-jj0+1) ++ ++ do j=jj0,jj1 ++ ++ uxx(jneu)=uxx(jneu)+xxx(j)*anorm ++ uyy(jneu)=uyy(jneu)+yyy(j)*anorm ++ uzz(jneu)=uzz(jneu)+zzz(j)*anorm ++ ++ enddo ++ ++c vector from site to geometric centre ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-uxx(jneu) ++ tyy(j)=yyy(j)-uyy(jneu) ++ tzz(j)=zzz(j)-uzz(jneu) ++ ++ enddo ++ ++ enddo ++ ++c ********************PROCESS SECONDARY NEIGHBOURS******************** ++ ++ lchk=.true. ++ ibig=0 ++ ia=0 ++ ++ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then ++ ++c zero accumulators for secondary neighbour energies and virial ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ engsrl=0.d0 ++ virsrl=0.d0 ++ ++c initialise solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c outer loop over neutral groups ++ ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ isn=-1 ++ call neutlst ++ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1.and.(rvdw.gt.rprim-delr))then ++ ++ call srfrceneu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrl=engsrl+engacc ++ virsrl=virsrl+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ else ++ ++ call error(idnode,250) ++ ++ endif ++ ++c accumulate radial distribution functions out to rcut ++ ++ if(lgr)then ++ call rdf0neu(ik,rcut) ++ endif ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ flx(i)=fxx(i) ++ fly(i)=fyy(i) ++ flz(i)=fzz(i) ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ ++ stresl(i)=stress(i) ++ stress(i)=0.d0 ++ ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol(:) ++ cou_sol_lng(:)=cou_sol(:) ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc(:) ++ cou_exc_lng(:)=cou_exc(:) ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++ ia=0 ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ isn=1 ++ call neutlst ++ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrceneu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions out to rcut ++ ++ if(lgr)then ++ call rdf0neu(ik,rcut) ++ endif ++ ++ enddo ++ ++c ******************END OF PRIMARY NEIGHBOUR PROCESSING************* ++ ++c check on validity of call to neutlst ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ if(.not.lchk)then ++ call gimax(ibig,1,i) ++ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf ++ call error(idnode,479) ++ endif ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary neighbour contributions to force, energy etc ++ ++ if(newplst)then ++ ++ do i=1,natms ++ ++ fpx(i)=flx(i) ++ fpy(i)=fly(i) ++ fpz(i)=flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stresl(i) ++ enddo ++ ++ engsr1=engsrl ++ virsr1=virsrl ++ engcp1=engcpl ++ vircp1=vircpl ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol_lng(:) ++ cou_sol_put(:)=cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc_lng(:) ++ cou_exc_put(:)=cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c calculate force increments etc ++ ++ if(mod(nstep-nstep0,multt).eq.1)then ++ ++ do i=1,natms ++ ++ flx(i)=flx(i)-fpx(i) ++ fly(i)=fly(i)-fpy(i) ++ flz(i)=flz(i)-fpz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stresl(i)-stresp(i) ++ enddo ++ ++ virsrl=virsrl-virsr1 ++ engsrl=engsrl-engsr1 ++ vircpl=vircpl-vircp1 ++ engcpl=engcpl-engcp1 ++ ++c solvation and excitation increments ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) ++ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) ++ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c extrapolate long range terms ++ ++ ann=dble(mod(nstep-nstep0,multt)) ++ ++ do i=1,natms ++ ++ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) ++ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) ++ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresl(i)*ann+stresp(i) ++ enddo ++ ++ engsrp=engsr1+engsrl*ann+engsrp ++ virsrp=virsr1+virsrl*ann+virsrp ++ engcpe=engcp1+engcpl*ann+engcpe ++ vircpe=vircp1+vircpl*ann+vircpe ++ ++c solvation and excitation extrapolation ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) ++ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) ++ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (txx,tyy,tzz,uxx,uyy,uzz,stat=fail(1)) ++ ++ return ++ end subroutine multiple_neu ++ ++ subroutine multiple_nsq ++ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for multiple time step algorithm ++c to be used with all-pairs option ++c ++c flx,fly,flz : forces from electrostatics from r > rcut ++c fpx,fpy,fpz : forces from electrostatics from rprim < r <= rcut ++c fxx,fyy,fzz : total force ++c ++c copyright daresbury laboratory 1993 ++c ++c author t. forester, may 1993 ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c Ewald sum --- not used ++c = 4,5 ------ Distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c truncated and shifted coulombic -- not used ++c reaction field - not used ++c ++c**************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=5 ++ logical newplst,newlst,lgofr,lzeql,lgr,lnsq,newjob,lsolva ++ logical lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,multt,mxnode,natms,nstep,nstbgr ++ integer nsteql,numrdf,fail,nstep0,ii,ik,k,numlsts,nsolva ++ integer isolva,i,j ++ real(8) delr,dlrpot,engcpe,engsrp,engcp3,epsq,rcut ++ real(8) rprim,rvdw,vircpe,virsrp,vircp3,rcut1,engcp2,vircp2 ++ real(8) engsr2,virsr2,stresp,engacc,viracc ++ ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension stresp(9),fail(nnn) ++ ++ save engsr2,virsr2,engcp2,vircp2,nstep0,numlsts,stresp,fpx,fpy,fpz ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data numlsts/-1/ ++ data newjob/.true./ ++ ++c allocate work arrays ++ ++ if(newjob)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) ++ endif ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1860) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++ if(lnsq)then ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c divide neighbour list into primary and secondary neighbours ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call primlst(idnode,mxnode,natms,imcon,rprim) ++ ++ endif ++ ++c flag for accumulating rdfs ++ ++ lgr=(lgofr.and.(.not.lzeql.or.(nstep-nsteql.gt.0))) ++ lgr=(lgr.and.newplst.and.(mod(numlsts,nstbgr).eq.0)) ++ ++c set extended cutoff for electrostatics - secondary shell ++ ++ rcut1=rcut+delr ++ ++ if(newlst)nstep0=nstep ++ newplst=(newlst.or.mod(nstep-nstep0,multt).eq.0) ++ ++c ********************PROCESS TERTIARY NEIGHBOURS********************* ++ ++ if(newplst)then ++ ++ call coul_nsq ++ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, ++ x engcp3,vircp3) ++ ++ endif ++ ++c ****************END OF TERTIARY NEIGHBOUR PROCESSING************** ++ ++c ********************PROCESS SECONDARY NEIGHBOURS******************** ++ ++ if(newplst)then ++ ++c zero accumulators for secondary neighbour energies and virial ++ ++ engcp2=0.d0 ++ vircp2=0.d0 ++ engsr2=0.d0 ++ virsr2=0.d0 ++ ++c zero secondary forces ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++ ii=0 ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic vectors ++ ++ ik=0 ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary condition only for interactions > rprim ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of interatomic distances ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c short range forces for secondary shell ++ ++ if((mod(keyfce,2).eq.1).and.(rvdw.gt.rprim-delr))then ++ ++ call srfrce ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsr2=engsr2+engacc ++ virsr2=virsr2+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then ++ ++ call error(idnode,424) ++ ++ elseif(keyfce/2.eq.2)then ++ ++c distance dependent dielectric ++ ++ call coul2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) ++ ++ engcp2=engcp2+engacc ++ vircp2=vircp2+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++c coulombic potential ++ ++ call coul0 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) ++ ++ engcp2=engcp2+engacc ++ vircp2=vircp2+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++c truncated shifted coulombic potential ++ ++ call error(idnode,424) ++ ++ endif ++ ++c accumulate radial distribution functions : out to rcut ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ fpx(i)=fxx(i) ++ fpy(i)=fyy(i) ++ fpz(i)=fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stress(i) ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol(:) ++ cou_sol_put(:)=cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc(:) ++ cou_exc_put(:)=cou_exc(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c zero primary forces ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c zero solvation and excitation arrays ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate primary pair force contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=-list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of interatomic distances ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions : out to rcut ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then ++ ++ call error(idnode,424) ++ ++ elseif(keyfce/2.eq.2)then ++ ++c distance dependent dielectric ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++c coulombic potential ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,424) ++ ++ endif ++ ++ enddo ++ ++c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary and tertiary neighbour contributions to ++c force, energy etc ++ ++ do i=1,natms ++ ++ fxx(i)=fxx(i)+fpx(i)+flx(i) ++ fyy(i)=fyy(i)+fpy(i)+fly(i) ++ fzz(i)=fzz(i)+fpz(i)+flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresp(i) ++ enddo ++ ++ engsrp=engsrp+engsr2 ++ virsrp=virsrp+virsr2 ++ ++ engcpe=engcpe+engcp2+engcp3 ++ vircpe=vircpe+vircp2+vircp3 ++ ++c calculate solvation and excitation arrays ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol(:)+vdw_sol_put(:)+vdw_sol_lng(:) ++ cou_sol(:)=cou_sol(:)+cou_sol_put(:)+cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc(:)+vdw_exc_put(:)+vdw_exc_lng(:) ++ cou_exc(:)=cou_exc(:)+cou_exc_put(:)+cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine multiple_nsq ++ ++ subroutine neutlst ++ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ll, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c*********************************************************************** ++c ++c dlpoly routine to create pair lists for neutral group ++c implementations. ++c loops over group ineu ++c ++c replicated data version ++c ++c copyright daresbury laboratory 1994 ++c author t.forester march 1994 ++c ++c isn = -1 => secondary neighbours ++c isn = 1 => primary neighbours - must contain excld interactions ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newlst,lchk,lexc ++ integer isn,imcon,idnode,ineu,ia,ll,i,jj,jj0,jj1 ++ integer fail,ibig,keyexc,lenia,j,jneu,in0,in1 ++ real(8) txx,tyy,tzz,uxx,uyy,uzz ++ ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1830) ++ ++ if(newlst)then ++ ++ ibig=0 ++ ++c set cutoff radius ++ ++ ll=0 ++ ++c number of excludes found ++ ++ if(isn.lt.0)then ++ keyexc=nexatm(ia)+2 ++ else ++ keyexc=1 ++ endif ++ ++c do centre - centre distances ++ ++ lenia=lentry(ia) ++ ++ do j=1,lenia ++ ++ jneu=abs(list(ia,j)) ++ xxt(j)=uxx(ineu)-uxx(jneu) ++ yyt(j)=uyy(ineu)-uyy(jneu) ++ zzt(j)=uzz(ineu)-uzz(jneu) ++ ++ enddo ++ ++ call images(imcon,0,1,lenia,cell,xxt,yyt,zzt) ++ ++c working intragroup vectors of central group ++c - for periodic boundaries ++ ++ in0=neulst(ineu) ++ in1=neulst(ineu+1)-1 ++ ++c loop over neutral groups sites of a ++ ++ ++c loop over groups in list ++ ++ do jj=1,lentry(ia) ++ ++ jneu=list(ia,jj)*isn ++ ++ if(jneu.gt.0)then ++ ++ do i=in0,in1 ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++ if(ineu.eq.jneu)jj0=i+1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++c reject atoms in excluded pair list ++ ++ lexc=.false. ++ ++ if(keyexc.lt.nexatm(ia))then ++ ++ if(lexatm(ia,keyexc).eq.i)then ++ if(lexatm(ia,keyexc+1).eq.j)then ++ lexc=.true. ++ keyexc=keyexc+2 ++ endif ++ endif ++ ++ endif ++ ++c reject frozen atom pairs ++ ++ if(lstfrz(i).ne.0)then ++ if(lstfrz(j).ne.0)lexc=.true. ++ endif ++ ++ if(.not.lexc)then ++ ++ ll=ll+1 ++ if(ll.le.mxxdf)then ++ ++ xdf(ll)=txx(i)+xxt(jj)-txx(j) ++ ydf(ll)=tyy(i)+yyt(jj)-tyy(j) ++ zdf(ll)=tzz(i)+zzt(jj)-tzz(j) ++ rsqdf(ll)=xdf(ll)**2+ydf(ll)**2+zdf(ll)**2 ++ ilist(ll)=i ++ jlist(ll)=j ++ ++ else ++ ++ lchk=.false. ++ ibig=max(ibig,ll) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail) ++ ++ return ++ end subroutine neutlst ++ ++ end module forces_module ++ +diff -urN dl_class_1.9.orig/srcmod/forces_module.f.preplumed dl_class_1.9/srcmod/forces_module.f.preplumed +--- dl_class_1.9.orig/srcmod/forces_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/forces_module.f.preplumed 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,2952 @@ ++ module forces_module ++ ++c*********************************************************************** ++c ++c dl_poly module for calculation of atomic forces ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - d. quigley : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use coulomb_module ++ use error_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use four_body_module ++ use hkewald_module ++ use metafreeze_module ++ use metal_module ++ use neu_coul_module ++ use nlist_builders_module ++ use pair_module ++ use property_module ++ use setup_module ++ use solvation_module ++ use spme_module ++ use tersoff_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ contains ++ ++ subroutine force_manager ++ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c********************************************************************* ++c ++c dl_poly subroutine to manage the calculation of the atomic forces ++c from all force field terms. ++c ++c copyright - daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva ++ logical lfree,lghost,llsolva ++ ++ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,numrdf ++ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ntpmet ++ integer i,nospl,multt,nneut,ntbond,ntangl,ntdihd,nsolva,isolva ++ integer ntinv,ntteth,ntshl,ntptbp,ntpfbp,ntpter,keyshl,keyfld ++ ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet ++ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp ++ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang,engdih ++ real(8) virdih,enginv,virinv,engtet,virtet,engshl,virshl,engfld ++ real(8) virfld,fmax,temp,shlke,engcfg,tmpeng,tmpvir,engord,virord ++ ++ llsolva=.false. ++ ++c initialize energy and virial accumulators ++ ++ engbnd=0.d0 ++ virbnd=0.d0 ++ engang=0.d0 ++ virang=0.d0 ++ engdih=0.d0 ++ virdih=0.d0 ++ enginv=0.d0 ++ virinv=0.d0 ++ engtbp=0.d0 ++ virtbp=0.d0 ++ engter=0.d0 ++ virter=0.d0 ++ engfbp=0.d0 ++ virfbp=0.d0 ++ engsrp=0.d0 ++ virsrp=0.d0 ++ engcpe=0.d0 ++ vircpe=0.d0 ++ engfld=0.d0 ++ virfld=0.d0 ++ engshl=0.d0 ++ virshl=0.d0 ++ shlke =0.d0 ++ engtet=0.d0 ++ virtet=0.d0 ++ engmet=0.d0 ++ virmet=0.d0 ++ virord=0.0d0 ++ engord=0.0d0 ++ ++ if(lmetadyn)then ++ ++ eng_loc=0.0d0 ++ vir_loc=0.0d0 ++ fxx_loc(:)=0.0d0 ++ fyy_loc(:)=0.0d0 ++ fzz_loc(:)=0.0d0 ++ stress_loc(:)=0.0d0 ++ ++ endif ++ ++c initialise free energy accumulators ++ ++ if(lfree)then ++ ++ ang_fre=0.d0 ++ bnd_fre=0.d0 ++ dih_fre=0.d0 ++ inv_fre=0.d0 ++ tbp_fre=0.d0 ++ fbp_fre=0.d0 ++ cou_fre=0.d0 ++ vdw_fre=0.d0 ++ shl_fre=0.d0 ++ ang_vir=0.d0 ++ bnd_vir=0.d0 ++ dih_vir=0.d0 ++ inv_vir=0.d0 ++ tbp_vir=0.d0 ++ fbp_vir=0.d0 ++ cou_vir=0.d0 ++ vdw_vir=0.d0 ++ shl_vir=0.d0 ++ eng_cfg_fre=0.d0 ++ vir_cfg_fre=0.d0 ++ ++ endif ++ ++c initialise solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ if(keyfce/2.gt.0)lcomp(6)=.true. ++ if(mod(keyfce,2).eq.1)lcomp(7)=.true. ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ llsolva=.true. ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c initialise the force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ if(nstep.gt.0)then ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++ endif ++ ++ if(keyfce.gt.0)then ++ ++c calculate pair forces, including coulombic forces ++ ++ if(lnsq)then ++ ++c multiple timestep - all-pairs ++ ++ call multiple_nsq ++ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp) ++ ++ elseif(.not.lneut)then ++ ++c single timestep ++ ++ if(multt.eq.1)then ++ ++ call forces ++ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw, ++ x ntpmet,natms,nstbgr,nstep,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw, ++ x vircpe,virsrp,volm,engmet,virmet) ++ ++ else ++ ++ call multiple ++ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, ++ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, ++ x rvdw,vircpe,virsrp,volm) ++ ++ endif ++ ++ elseif(lneut)then ++ ++c neutral groups ++ ++ if(multt.eq.1)then ++ ++ call forces_neu ++ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, ++ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, ++ x vircpe,virsrp) ++ ++ else ++ ++ call multiple_neu ++ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rprim,rcut,rvdw,alpha,vircpe,virsrp) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c add in long range corrections to energy and pressure ++ ++ engsrp=engsrp+elrc ++ virsrp=virsrp+virlrc ++ engmet=engmet+elrcm(0) ++ virmet=virmet+vlrcm(0) ++ if(lfree)then ++ vdw_fre=vdw_fre+elrc_fre ++ vdw_vir=vdw_vir+vlrc_fre ++ endif ++ ++c calculate three body forces ++ ++ if(ntptbp.gt.0)call thbfrc ++ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcuttb, ++ x engtbp,virtbp) ++ ++c calculate four body forces ++ ++ if(ntpfbp.gt.0)call fbpfrc ++ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcutfb, ++ x engfbp,virfbp) ++ ++c calculate tersoff potential forces ++ ++ if(ntpter.gt.0)call tersoff ++ x (idnode,mxnode,natms,imcon,rctter,engter,virter) ++ ++c calculate bond forces ++ ++ if(ntbond.gt.0)call bndfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntbond,epsq, ++ x engbnd,virbnd) ++ ++c calculate valence angle forces ++ ++ if(ntangl.gt.0)call angfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntangl,engang,virang) ++ ++c calculate dihedral forces ++ ++ if(ntdihd.gt.0)call dihfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntdihd,keyfce,dlrpot, ++ x epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe,virdih,virsrp) ++ ++c calculate inversion forces ++ ++ if(ntinv.gt.0)call invfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntinv,enginv,virinv) ++ ++c calculate tethered atom forces ++ ++ if(ntteth.gt.0)call tethfrc ++ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) ++ ++c calculate shell model forces ++ ++ if(keyshl.gt.0)call shlfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntshl,engshl,virshl) ++ ++c external field ++ ++ if(keyfld.gt.0)call extnfld ++ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) ++ ++c metadynamics option : use potential energy as order parameter ++ ++ if(lmetadyn)then ++ ++ tmpeng=engsrp+engcpe+engbnd+engang+engdih+engfld+ ++ x engtbp+engfbp+engshl+enginv+engter+engmet ++ ++ tmpvir=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet ++ ++ call metafreeze_driver ++ x (imcon,natms,temp,nstep,tmpeng,tmpvir,engord,virord) ++ ++ endif ++ ++c global summation of force arrays (basic replicated data strategy) ++ ++ call global_sum_forces(natms,mxnode,fxx,fyy,fzz) ++ ++c global sum of stress arrays ++ ++ if(mxnode.gt.1)call gdsum(stress,9,buffer) ++ ++c add long range correction to diagonal terms of stress tensor ++ ++ stress(1)=stress(1)-(virlrc+vlrcm(0))/3.d0 ++ stress(5)=stress(5)-(virlrc+vlrcm(0))/3.d0 ++ stress(9)=stress(9)-(virlrc+vlrcm(0))/3.d0 ++ ++c cap forces in equilibration mode ++ ++ if(nstep.le.nsteql.and.lfcap) ++ x call fcap(lfcap,natms,fmax,temp) ++ ++c total configuration energy ++ ++ engcfg=engsrp+engcpe+engbnd+engang+engdih+engfld+engtbp+ ++ x engfbp+engshl+enginv+engter+engmet ++ ++c total derivative of the configurational free energy ++ ++ if(lfree)then ++ ++ eng_cfg_fre=dlambda*(ang_fre+bnd_fre+dih_fre+inv_fre+ ++ x tbp_fre+fbp_fre+cou_fre+vdw_fre+shl_fre) ++ vir_cfg_fre=dlambda*(ang_vir+bnd_vir+dih_vir+inv_vir+ ++ x tbp_vir+fbp_vir+cou_vir+vdw_vir+shl_vir) ++ ++ endif ++ ++c sum solvation and excitation energies for pair forces ++ ++ if(mxnode.gt.1)then ++ ++ if(llsolva)then ++ ++ call gdsum(vdw_sol,mxtmls_sol2,buffer) ++ call gdsum(cou_sol,mxtmls_sol2,buffer) ++ ++ if(lghost)then ++ ++ call gdsum(vdw_exc,mxtmls_exc2,buffer) ++ call gdsum(cou_exc,mxtmls_exc2,buffer) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c add long range corrections to solvation terms ++ ++ if(lsolva)then ++ ++ vdw_sol(:)=vdw_sol(:)+elrc_sol(:) ++ if(lghost)vdw_exc(:)=vdw_exc(:)+elrc_exc(:) ++ ++ endif ++ ++ return ++ end subroutine force_manager ++ ++ subroutine forces ++ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw,ntpmet,natms, ++ x nstbgr,nstep,nsteql,numrdf,nospl,nsolva,isolva,alpha,dlrpot, ++ x drewd,engcpe,engsrp,epsq,rcut,rvdw,vircpe,virsrp,volm,engmet, ++ x virmet) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c amended - t. forester sept 1994 ++c amended - w. smith june 1995 for metal potentials ++c ++c key: ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ Ewald sum : ewald1,2,3 ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ truncated and shifted coulombic : coul4 ++c = 10,11 ----- reaction field : coul3 ++c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3] ++c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzeql,loglnk,lewald,lspme,lhke,newjob,lcshft,safe ++ logical lsolva,lfree,lghost,llsolva ++ ++ integer idnode,imcon,keyfce,kmax1,kmax2,kmax3,nhko,nlatt ++ integer mxnode,ntpvdw,natms,nstbgr,nstep,nsteql,numrdf ++ integer ntpmet,nospl,nsolva,isolva,i,j,k,ii ++ ++ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw,eps ++ real(8) vircpe,virsrp,volm,engacc,engac1,viracc,engmet,virmet ++ ++ save newjob ++ ++ data newjob/.true./ ++ ++ safe=.true. ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ lhke=(keyfce/2.eq.7) ++ lspme=(keyfce/2.eq.6) ++ lewald=(keyfce/2.eq.1) ++ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) ++ ++c create ewald interpolation arrays ++ ++ if(newjob)then ++ ++ if(lhke)then ++ ++ call hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) ++ ++ else if(lewald.or.lspme.or.lcshft)then ++ ++ call erfcgen(alpha,drewd,rcut) ++ ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++c initialise force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c calculate local density in metals ++ ++ if(ntpmet.gt.0)then ++ ++ call metdens ++ x (idnode,imcon,mxnode,natms,engmet,virmet) ++ ++ stress(1)=stress(1)-virmet/3.d0 ++ stress(5)=stress(5)-virmet/3.d0 ++ stress(9)=stress(9)-virmet/3.d0 ++ ++ endif ++ ++c fourier contribution to coulombic forces in Ewald sum ++ ++ if(lewald)then ++ ++ call ewald1 ++ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, ++ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) ++ ++ engcpe=engcpe+engac1 ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c hautman-klein-ewald method ++ ++ if(lhke)then ++ ++c fourier terms of hk-ewald ++ ++ call hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engacc,viracc,alpha,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++c real space terms of hk-ewald ++ ++ call hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engacc,viracc, ++ x drewd,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c smoothed particle mesh ewald ++ ++ if(lspme)then ++ ++ call ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engac1,viracc,alpha,volm,epsq) ++ ++ engcpe=engcpe+engac1 ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c outer loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ilist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) ++ ++c square of distances ++ ++ do k=1,lentry(ii) ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c calculate metal forces and potential ++ ++ if(ntpmet.gt.0)then ++ ++ call metfrc(safe,i,lentry(ii),engacc,viracc) ++ ++ engmet=engmet+engacc ++ virmet=virmet+viracc ++ ++ endif ++ ++c calculate short range force and potential terms ++ ++ if(ntpvdw.gt.0.and.mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc, ++ x rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme)then ++ ++ call ewald2(llsolva,lfree,lghost,i,lentry(ii),engacc, ++ x viracc,drewd,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions ++ ++ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then ++ ++ if(mod(nstep,nstbgr).eq.0)then ++ ++ call rdf0(i,lentry(ii),rcut) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c check metal interpolation is safe ++ ++ if(ntpmet.gt.0)then ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,142) ++ ++ endif ++ ++c calculate corrections for intramolecular coulomb terms in ++c Ewald sum ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ eps=epsq ++ if(loglnk)eps=eps*2.0d0 ++ ++c outer loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,nexatm(ii) ++ ++ j=lexatm(ii,k) ++ jlist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) ++ ++c calculate correction terms ++ ++ if(lhke)then ++ ++ call hkewald3(i,ii,engacc,viracc,eps) ++ ++ else ++ ++ call ewald3 ++ x (llsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) ++ ++ endif ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ enddo ++ ++ endif ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then ++ ++ if(mod(nstep,nstbgr).eq.0)then ++ ++ numrdf=numrdf+1 ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=engmet ++ buffer(6)=virmet ++ buffer(7)=vdw_fre ++ buffer(8)=cou_fre ++ buffer(9)=vdw_vir ++ buffer(10)=cou_vir ++ call gdsum(buffer(1),10,buffer(11)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ engmet=buffer(5) ++ virmet=buffer(6) ++ vdw_fre=buffer(7) ++ cou_fre=buffer(8) ++ vdw_vir=buffer(9) ++ cou_vir=buffer(10) ++ ++ endif ++ ++ return ++ end subroutine forces ++ ++ subroutine forces_neu ++ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, ++ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, ++ x vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c neutral group implemenation - no Ewald sum option ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c ++c modified - t. forester april 1993 ++c key: ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ invalid ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ invalid ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzeql,newlst,lchk,lsolva,lfree,lghost,llsolva ++ ++ integer idnode,imcon,keyfce,mxnode,natms,nneut,nstbgr ++ integer nstep,nsteql,numrdf,i,fail,jneu,jj0,jj1,j ++ integer ibig,ia,ineu,isn,ik,nsolva,isolva ++ real(8) dlrpot,engcpe,engsrp,epsq,rcut,rvdw,vircpe ++ real(8) virsrp,engacc,viracc,anorm,alpha ++ ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ ++ dimension fail(2) ++ ++ data fail/0,0/ ++ ++c allocate working arrays ++ ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ do i=1,2 ++ if(fail(i).ne.0)call error(idnode,1820) ++ enddo ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c initialise force and stress arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c initialise energy and virial accumulators ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c intra group vectors com ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-xxx(jj0) ++ tyy(j)=yyy(j)-yyy(jj0) ++ tzz(j)=zzz(j)-zzz(jj0) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,natms,cell,txx,tyy,tzz) ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ xxx(j)=txx(j)+xxx(jj0) ++ yyy(j)=tyy(j)+yyy(jj0) ++ zzz(j)=tzz(j)+zzz(jj0) ++ ++ enddo ++ ++c centre of molecule ++ ++ uxx(jneu)=0.d0 ++ uyy(jneu)=0.d0 ++ uzz(jneu)=0.d0 ++ anorm=1.d0/dble(jj1-jj0+1) ++ ++ do j=jj0,jj1 ++ ++ uxx(jneu)=uxx(jneu)+xxx(j)*anorm ++ uyy(jneu)=uyy(jneu)+yyy(j)*anorm ++ uzz(jneu)=uzz(jneu)+zzz(j)*anorm ++ ++ enddo ++ ++c vector from site to geometric centre ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-uxx(jneu) ++ tyy(j)=yyy(j)-uyy(jneu) ++ tzz(j)=zzz(j)-uzz(jneu) ++ ++ enddo ++ ++ enddo ++ ++c outer loop over neutral groups ++ ++ lchk=.true. ++ ibig=0 ++ ia=0 ++ ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ newlst=.true. ++ ++ isn=1 ++ call neutlst ++ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrceneu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions ++ ++ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. ++ x mod(nstep,nstbgr).eq.0)then ++ ++ call rdf0neu(ik,rcut) ++ ++ endif ++ ++ enddo ++ ++c check on validity of call to neutlst ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ if(.not.lchk)then ++ call gimax(ibig,1,i) ++ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf ++ call error(idnode,478) ++ endif ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) ++ ++c counter for rdf statistics outside loop structure ++ ++ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. ++ x mod(nstep,nstbgr).eq.0)numrdf=numrdf+1 ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,stat=fail(2)) ++ ++ return ++ end subroutine forces_neu ++ ++ subroutine multiple ++ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, ++ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, ++ x rvdw,vircpe,virsrp,volm) ++c*************************************************************************** ++c ++c dl_poly subroutine for multiple time step algorithm ++c reciprocal space calculated on long time steps. ++c ++c copyright daresbury laboratory ++c ++c author t. forester, may 1993 ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ Ewald sum : ewald1,2,3,4 ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ truncated and shifted coulombic : coul4 ++c = 10,11 ----- reaction field : coul3 ++c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3,4] ++c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3,4 ++c ++c**************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=5 ++ ++ logical newplst,newlst,lgofr,lzeql,lgr,loglnk,lewald,lspme ++ logical lhke,newjob,lcshft,lsolva,lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt ++ integer mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,fail ++ integer numlsts,i,nstep0,nsolva,isolva,ii,k,j,ik ++ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,volm,stresp,engcpl,engacc,viracc,engac1 ++ real(8) vircpl,eps,ann,engsr1,viracl,engsrl,virsrl,virac2,engcp1 ++ real(8) vircp1,engacl,engac2,virsr1 ++ ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension stresp(9),fail(nnn) ++ ++ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 ++ save engsr1,virsr1,stresp,fpx,fpy,fpz,newjob ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data newjob/.true./ ++ data numlsts/-1/ ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ lhke=(keyfce/2.eq.7) ++ lspme=(keyfce/2.eq.6) ++ lewald=(keyfce/2.eq.1) ++ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) ++ if(newlst)nstep0=nstep ++ newplst=(newlst).or.(mod(nstep-nstep0,multt).eq.0) ++ ++c allocate working arrays ++ ++ if(newjob)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) ++ endif ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1840) ++ enddo ++ ++ endif ++ ++c create ewald interpolation arrays ++ ++ if(newjob)then ++ ++ if(lspme.or.lewald.or.lcshft)then ++ ++ call erfcgen(alpha,drewd,rcut) ++ ++ endif ++ ++ endif ++ ++ newjob=.false. ++ ++c divide neighbour list into primary and secondary neighbours ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call primlst(idnode,mxnode,natms,imcon,rprim) ++ ++ endif ++ ++c flag for accumulating rdfs ++ ++ lgr=.false. ++ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) ++ lgr=(lgr.and.(newplst.and.lgofr)) ++ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) ++ ++c zero force and stress arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c ********************PROCESS SECONDARY NEIGHBOURS****************** ++ ++ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then ++ ++c zero accumulators ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ engsrl=0.d0 ++ virsrl=0.d0 ++ llsolva=lsolva ++ if(lsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate fourier contribution to secondary coulombic forces ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ if(lewald)then ++ ++ call ewald1 ++ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, ++ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) ++ ++c hautman-klein-ewald method ++ ++ elseif(lhke)then ++ ++ call hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engac1,viracc,alpha,epsq) ++ ++c real space terms of hk-ewald ++ ++ call hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engac2, ++ x virac2,drewd,rcut,epsq) ++ ++ engac1=engac1+engac2 ++ viracc=viracc+virac2 ++ ++ elseif(lspme)then ++ ++c smoothed particle mesh ewald ++ ++ call ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engac1,viracc,alpha,volm,epsq) ++ ++ endif ++ ++ engcpl=engcpl+engac1 ++ vircpl=vircpl+viracc ++ ++c calculate corrections for intramolecular coulomb terms in ++c Ewald sum ++c note: if using link cells - have double counted excluded ++c interactions use temporary adjustment to relative dielectric ++c constant ++ ++ eps=epsq ++ if(loglnk)eps=epsq*2.0d0 ++ ++c calculate self interaction corrections for fourier contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,nexatm(ii) ++ ++ j=lexatm(ii,k) ++ jlist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) ++ ++c calculate correction terms ++ ++ if(lhke)then ++ ++ call hkewald3(i,ii,engacc,viracc,eps) ++ ++ else ++ ++ call ewald3 ++ x (lsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) ++ ++ endif ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ enddo ++ ++ endif ++ ++c calculate pair contributions to secondary neighbour forces ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of distance ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrl=engsrl+engacc ++ virsrl=virsrl+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme)then ++ ++ call ewald2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,drewd,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ endif ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ flx(i)=fxx(i) ++ fly(i)=fyy(i) ++ flz(i)=fzz(i) ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stress(i) ++ stress(i)=0.d0 ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol(:) ++ cou_sol_lng(:)=cou_sol(:) ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc(:) ++ cou_exc_lng(:)=cou_exc(:) ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c calculate pair force contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=-list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of distance ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ if(newplst.or. ++ x (mod(nstep-nstep0,multt).le.1))then ++ ++ if(lhke)then ++ ++ call hkewald4(i,ik,engacc,viracc,engacl,viracl,rcut,epsq) ++ ++ else ++ ++ call ewald4 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,engacl,viracl, ++ x drewd,rcut,epsq) ++ ++ endif ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ engcpl=engcpl+engacl ++ vircpl=vircpl+viracl ++ ++ else ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++ enddo ++ ++c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary neighbour contributions to force, energy etc ++ ++ if(newplst)then ++ ++ do i=1,natms ++ ++ fpx(i)=flx(i) ++ fpy(i)=fly(i) ++ fpz(i)=flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stresl(i) ++ enddo ++ ++ engsr1=engsrl ++ virsr1=virsrl ++ engcp1=engcpl ++ vircp1=vircpl ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol_lng(:) ++ cou_sol_put(:)=cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc_lng(:) ++ cou_exc_put(:)=cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c calculate force increments etc ++ ++ if(mod(nstep-nstep0,multt).eq.1)then ++ ++ do i=1,natms ++ ++ flx(i)=flx(i)-fpx(i) ++ fly(i)=fly(i)-fpy(i) ++ flz(i)=flz(i)-fpz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stresl(i)-stresp(i) ++ enddo ++ ++ virsrl=virsrl-virsr1 ++ engsrl=engsrl-engsr1 ++ vircpl=vircpl-vircp1 ++ engcpl=engcpl-engcp1 ++ ++c solvation and excitation increments ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) ++ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) ++ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c extrapolate long range terms ++ ++ ann=dble(mod(nstep-nstep0,multt)) ++ ++ do i=1,natms ++ ++ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) ++ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) ++ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresp(i)+stresl(i)*ann ++ enddo ++ ++ engsrp=engsr1+engsrl*ann+engsrp ++ virsrp=virsr1+virsrl*ann+virsrp ++ engcpe=engcp1+engcpl*ann+engcpe ++ vircpe=vircp1+vircpl*ann+vircpe ++ ++c solvation and excitation extrapolation ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) ++ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) ++ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++ return ++ end subroutine multiple ++ ++ subroutine multiple_neu ++ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rprim,rcut,rvdw,alpha,vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c neutral group implemenation - no Ewald sum option ++c multiple timestep option ++c ++c parallel replicated data version ++c ++c fpx,fpy,fpz : forces from electrostatics fron rprim < r <= rcut ++c fxx,fyy,fzz : total force ++c ++c copyright daresbury laboratory april 1994 ++c author - t. forester april 1993 ++c key: ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ invalid ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ invalid ++c = 10,11 ----- reaction field : coul3 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical lgofr,lzeql,newlst,newplst,lgr,lchk,newjob,lsolva ++ logical lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,multt,mxnode,natms,nneut,nstbgr ++ integer nstep,nsteql,numrdf,fail,i,numlsts,jneu,jj0,j ++ integer jj1,ineu,ia,isn,ibig,ik,nstep0,nsolva,isolva ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rprim,rcut,rvdw,vircpe ++ real(8) virsrp,engcpl,vircpl,engsrl,virsrl,anorm,ann,stresp ++ real(8) engacc,viracc,engsr1,virsr1,engcp1,vircp1,alpha ++ ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension fail(nnn),stresp(9) ++ ++ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 ++ save engsr1,virsr1,stresp,fpx,fpy,fpz ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data newjob/.true./ ++ data numlsts/-1/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ if(newjob)then ++ ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(3)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(4)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(5)) ++ ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(6)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(7)) ++ endif ++ ++ endif ++ newjob=.false. ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1850) ++ enddo ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c error if ewald sum requested ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) ++ ++c create list of primary and secondary neighbours ++ ++ if(newlst)nstep0=nstep ++ newplst=(mod(nstep-nstep0,multt).eq.0) ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) ++ ++ endif ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c zero force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress arrays ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c flag for accumulating rdfs ++ ++ lgr=.false. ++ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) ++ lgr=(lgr.and.(newplst.and.lgofr)) ++ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) ++ ++c intra group vectors com ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-xxx(jj0) ++ tyy(j)=yyy(j)-yyy(jj0) ++ tzz(j)=zzz(j)-zzz(jj0) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,natms,cell,txx,tyy,tzz) ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ xxx(j)=txx(j)+xxx(jj0) ++ yyy(j)=tyy(j)+yyy(jj0) ++ zzz(j)=tzz(j)+zzz(jj0) ++ ++ enddo ++ ++c centre of molecule ++ ++ uxx(jneu)=0.d0 ++ uyy(jneu)=0.d0 ++ uzz(jneu)=0.d0 ++ anorm=1.d0/dble(jj1-jj0+1) ++ ++ do j=jj0,jj1 ++ ++ uxx(jneu)=uxx(jneu)+xxx(j)*anorm ++ uyy(jneu)=uyy(jneu)+yyy(j)*anorm ++ uzz(jneu)=uzz(jneu)+zzz(j)*anorm ++ ++ enddo ++ ++c vector from site to geometric centre ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-uxx(jneu) ++ tyy(j)=yyy(j)-uyy(jneu) ++ tzz(j)=zzz(j)-uzz(jneu) ++ ++ enddo ++ ++ enddo ++ ++c ********************PROCESS SECONDARY NEIGHBOURS******************** ++ ++ lchk=.true. ++ ibig=0 ++ ia=0 ++ ++ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then ++ ++c zero accumulators for secondary neighbour energies and virial ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ engsrl=0.d0 ++ virsrl=0.d0 ++ ++c initialise solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c outer loop over neutral groups ++ ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ isn=-1 ++ call neutlst ++ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1.and.(rvdw.gt.rprim-delr))then ++ ++ call srfrceneu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrl=engsrl+engacc ++ virsrl=virsrl+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ else ++ ++ call error(idnode,250) ++ ++ endif ++ ++c accumulate radial distribution functions out to rcut ++ ++ if(lgr)then ++ call rdf0neu(ik,rcut) ++ endif ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ flx(i)=fxx(i) ++ fly(i)=fyy(i) ++ flz(i)=fzz(i) ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ ++ stresl(i)=stress(i) ++ stress(i)=0.d0 ++ ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol(:) ++ cou_sol_lng(:)=cou_sol(:) ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc(:) ++ cou_exc_lng(:)=cou_exc(:) ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++ ia=0 ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ isn=1 ++ call neutlst ++ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrceneu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions out to rcut ++ ++ if(lgr)then ++ call rdf0neu(ik,rcut) ++ endif ++ ++ enddo ++ ++c ******************END OF PRIMARY NEIGHBOUR PROCESSING************* ++ ++c check on validity of call to neutlst ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ if(.not.lchk)then ++ call gimax(ibig,1,i) ++ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf ++ call error(idnode,479) ++ endif ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary neighbour contributions to force, energy etc ++ ++ if(newplst)then ++ ++ do i=1,natms ++ ++ fpx(i)=flx(i) ++ fpy(i)=fly(i) ++ fpz(i)=flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stresl(i) ++ enddo ++ ++ engsr1=engsrl ++ virsr1=virsrl ++ engcp1=engcpl ++ vircp1=vircpl ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol_lng(:) ++ cou_sol_put(:)=cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc_lng(:) ++ cou_exc_put(:)=cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c calculate force increments etc ++ ++ if(mod(nstep-nstep0,multt).eq.1)then ++ ++ do i=1,natms ++ ++ flx(i)=flx(i)-fpx(i) ++ fly(i)=fly(i)-fpy(i) ++ flz(i)=flz(i)-fpz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stresl(i)-stresp(i) ++ enddo ++ ++ virsrl=virsrl-virsr1 ++ engsrl=engsrl-engsr1 ++ vircpl=vircpl-vircp1 ++ engcpl=engcpl-engcp1 ++ ++c solvation and excitation increments ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) ++ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) ++ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c extrapolate long range terms ++ ++ ann=dble(mod(nstep-nstep0,multt)) ++ ++ do i=1,natms ++ ++ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) ++ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) ++ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresl(i)*ann+stresp(i) ++ enddo ++ ++ engsrp=engsr1+engsrl*ann+engsrp ++ virsrp=virsr1+virsrl*ann+virsrp ++ engcpe=engcp1+engcpl*ann+engcpe ++ vircpe=vircp1+vircpl*ann+vircpe ++ ++c solvation and excitation extrapolation ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) ++ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) ++ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (txx,tyy,tzz,uxx,uyy,uzz,stat=fail(1)) ++ ++ return ++ end subroutine multiple_neu ++ ++ subroutine multiple_nsq ++ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for multiple time step algorithm ++c to be used with all-pairs option ++c ++c flx,fly,flz : forces from electrostatics from r > rcut ++c fpx,fpy,fpz : forces from electrostatics from rprim < r <= rcut ++c fxx,fyy,fzz : total force ++c ++c copyright daresbury laboratory 1993 ++c ++c author t. forester, may 1993 ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c Ewald sum --- not used ++c = 4,5 ------ Distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c truncated and shifted coulombic -- not used ++c reaction field - not used ++c ++c**************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=5 ++ logical newplst,newlst,lgofr,lzeql,lgr,lnsq,newjob,lsolva ++ logical lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,multt,mxnode,natms,nstep,nstbgr ++ integer nsteql,numrdf,fail,nstep0,ii,ik,k,numlsts,nsolva ++ integer isolva,i,j ++ real(8) delr,dlrpot,engcpe,engsrp,engcp3,epsq,rcut ++ real(8) rprim,rvdw,vircpe,virsrp,vircp3,rcut1,engcp2,vircp2 ++ real(8) engsr2,virsr2,stresp,engacc,viracc ++ ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension stresp(9),fail(nnn) ++ ++ save engsr2,virsr2,engcp2,vircp2,nstep0,numlsts,stresp,fpx,fpy,fpz ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data numlsts/-1/ ++ data newjob/.true./ ++ ++c allocate work arrays ++ ++ if(newjob)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) ++ endif ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1860) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++ if(lnsq)then ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c divide neighbour list into primary and secondary neighbours ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call primlst(idnode,mxnode,natms,imcon,rprim) ++ ++ endif ++ ++c flag for accumulating rdfs ++ ++ lgr=(lgofr.and.(.not.lzeql.or.(nstep-nsteql.gt.0))) ++ lgr=(lgr.and.newplst.and.(mod(numlsts,nstbgr).eq.0)) ++ ++c set extended cutoff for electrostatics - secondary shell ++ ++ rcut1=rcut+delr ++ ++ if(newlst)nstep0=nstep ++ newplst=(newlst.or.mod(nstep-nstep0,multt).eq.0) ++ ++c ********************PROCESS TERTIARY NEIGHBOURS********************* ++ ++ if(newplst)then ++ ++ call coul_nsq ++ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, ++ x engcp3,vircp3) ++ ++ endif ++ ++c ****************END OF TERTIARY NEIGHBOUR PROCESSING************** ++ ++c ********************PROCESS SECONDARY NEIGHBOURS******************** ++ ++ if(newplst)then ++ ++c zero accumulators for secondary neighbour energies and virial ++ ++ engcp2=0.d0 ++ vircp2=0.d0 ++ engsr2=0.d0 ++ virsr2=0.d0 ++ ++c zero secondary forces ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++ ii=0 ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic vectors ++ ++ ik=0 ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary condition only for interactions > rprim ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of interatomic distances ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c short range forces for secondary shell ++ ++ if((mod(keyfce,2).eq.1).and.(rvdw.gt.rprim-delr))then ++ ++ call srfrce ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsr2=engsr2+engacc ++ virsr2=virsr2+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then ++ ++ call error(idnode,424) ++ ++ elseif(keyfce/2.eq.2)then ++ ++c distance dependent dielectric ++ ++ call coul2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) ++ ++ engcp2=engcp2+engacc ++ vircp2=vircp2+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++c coulombic potential ++ ++ call coul0 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) ++ ++ engcp2=engcp2+engacc ++ vircp2=vircp2+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++c truncated shifted coulombic potential ++ ++ call error(idnode,424) ++ ++ endif ++ ++c accumulate radial distribution functions : out to rcut ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ fpx(i)=fxx(i) ++ fpy(i)=fyy(i) ++ fpz(i)=fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stress(i) ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol(:) ++ cou_sol_put(:)=cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc(:) ++ cou_exc_put(:)=cou_exc(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c zero primary forces ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c zero solvation and excitation arrays ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate primary pair force contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=-list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of interatomic distances ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions : out to rcut ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then ++ ++ call error(idnode,424) ++ ++ elseif(keyfce/2.eq.2)then ++ ++c distance dependent dielectric ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++c coulombic potential ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,424) ++ ++ endif ++ ++ enddo ++ ++c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary and tertiary neighbour contributions to ++c force, energy etc ++ ++ do i=1,natms ++ ++ fxx(i)=fxx(i)+fpx(i)+flx(i) ++ fyy(i)=fyy(i)+fpy(i)+fly(i) ++ fzz(i)=fzz(i)+fpz(i)+flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresp(i) ++ enddo ++ ++ engsrp=engsrp+engsr2 ++ virsrp=virsrp+virsr2 ++ ++ engcpe=engcpe+engcp2+engcp3 ++ vircpe=vircpe+vircp2+vircp3 ++ ++c calculate solvation and excitation arrays ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol(:)+vdw_sol_put(:)+vdw_sol_lng(:) ++ cou_sol(:)=cou_sol(:)+cou_sol_put(:)+cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc(:)+vdw_exc_put(:)+vdw_exc_lng(:) ++ cou_exc(:)=cou_exc(:)+cou_exc_put(:)+cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine multiple_nsq ++ ++ subroutine neutlst ++ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ll, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c*********************************************************************** ++c ++c dlpoly routine to create pair lists for neutral group ++c implementations. ++c loops over group ineu ++c ++c replicated data version ++c ++c copyright daresbury laboratory 1994 ++c author t.forester march 1994 ++c ++c isn = -1 => secondary neighbours ++c isn = 1 => primary neighbours - must contain excld interactions ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newlst,lchk,lexc ++ integer isn,imcon,idnode,ineu,ia,ll,i,jj,jj0,jj1 ++ integer fail,ibig,keyexc,lenia,j,jneu,in0,in1 ++ real(8) txx,tyy,tzz,uxx,uyy,uzz ++ ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1830) ++ ++ if(newlst)then ++ ++ ibig=0 ++ ++c set cutoff radius ++ ++ ll=0 ++ ++c number of excludes found ++ ++ if(isn.lt.0)then ++ keyexc=nexatm(ia)+2 ++ else ++ keyexc=1 ++ endif ++ ++c do centre - centre distances ++ ++ lenia=lentry(ia) ++ ++ do j=1,lenia ++ ++ jneu=abs(list(ia,j)) ++ xxt(j)=uxx(ineu)-uxx(jneu) ++ yyt(j)=uyy(ineu)-uyy(jneu) ++ zzt(j)=uzz(ineu)-uzz(jneu) ++ ++ enddo ++ ++ call images(imcon,0,1,lenia,cell,xxt,yyt,zzt) ++ ++c working intragroup vectors of central group ++c - for periodic boundaries ++ ++ in0=neulst(ineu) ++ in1=neulst(ineu+1)-1 ++ ++c loop over neutral groups sites of a ++ ++ ++c loop over groups in list ++ ++ do jj=1,lentry(ia) ++ ++ jneu=list(ia,jj)*isn ++ ++ if(jneu.gt.0)then ++ ++ do i=in0,in1 ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++ if(ineu.eq.jneu)jj0=i+1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++c reject atoms in excluded pair list ++ ++ lexc=.false. ++ ++ if(keyexc.lt.nexatm(ia))then ++ ++ if(lexatm(ia,keyexc).eq.i)then ++ if(lexatm(ia,keyexc+1).eq.j)then ++ lexc=.true. ++ keyexc=keyexc+2 ++ endif ++ endif ++ ++ endif ++ ++c reject frozen atom pairs ++ ++ if(lstfrz(i).ne.0)then ++ if(lstfrz(j).ne.0)lexc=.true. ++ endif ++ ++ if(.not.lexc)then ++ ++ ll=ll+1 ++ if(ll.le.mxxdf)then ++ ++ xdf(ll)=txx(i)+xxt(jj)-txx(j) ++ ydf(ll)=tyy(i)+yyt(jj)-tyy(j) ++ zdf(ll)=tzz(i)+zzt(jj)-tzz(j) ++ rsqdf(ll)=xdf(ll)**2+ydf(ll)**2+zdf(ll)**2 ++ ilist(ll)=i ++ jlist(ll)=j ++ ++ else ++ ++ lchk=.false. ++ ibig=max(ibig,ll) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail) ++ ++ return ++ end subroutine neutlst ++ ++ end module forces_module ++ +diff -urN dl_class_1.9.orig/srcmod/four_body_module.f dl_class_1.9/srcmod/four_body_module.f +--- dl_class_1.9.orig/srcmod/four_body_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/four_body_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,979 @@ ++ module four_body_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining four-body potential arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - w. smith aug 2008 : solvation, free energy, excitation ++c adapted - w. smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ ++ implicit none ++ ++ logical, allocatable :: filter(:) ++ real(8), allocatable :: prmfbp(:,:),rcut4b(:) ++ integer, allocatable :: lstfbp(:),ltpfbp(:),latfbp(:) ++ ++ save prmfbp,rcut4b,lstfbp,ltpfbp,latfbp,filter ++ ++ contains ++ ++ subroutine alloc_fbp_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(6) ++ ++ do i=1,6 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmfbp(mxfbp,mxpfbp),stat=fail(1)) ++ allocate (rcut4b(mxfbp),stat=fail(2)) ++ allocate (lstfbp(mxfbp),stat=fail(3)) ++ allocate (ltpfbp(mxfbp),stat=fail(4)) ++ allocate (latfbp(mxatms),stat=fail(5)) ++ allocate (filter(mxsite),stat=fail(6)) ++ ++ do i=1,6 ++ if(fail(i).gt.0)call error(idnode,1140) ++ enddo ++ ++ end subroutine alloc_fbp_arrays ++ ++ subroutine define_four_body ++ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, ++ x rcutfb,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining four body potentials ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits,lmols ++ character*8 keyword ++ character*8 atom0,atom1,atom2,atom3 ++ character*1 message(80) ++ integer idnode,ntpfbp,ntpatm,ifbp,itpfbp,keypot,katm0 ++ integer i,katm1,katm2,katm3,jtpatm,ka1,ka2,ka3,keyfbp,kfbp ++ integer j,fail,idum ++ real(8) rcutfb,engunit ++ real(8), allocatable :: parpot(:) ++ ++ data fail/0/ ++ ++ allocate (parpot(mxpfbp),stat=fail) ++ if(fail.ne.0)call error(idnode,1150) ++ ++ ntpfbp=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'number of specified four ', ++ x 'body potentials',i10)") ntpfbp ++ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ','atom 3 ', ++ x 'atom 4 ',3x,' key',30x,'parameters'/,/)") ++ ++ endif ++ if(ntpfbp.gt.mxfbp) call error(idnode,89) ++ if(.not.lunits) call error(idnode,6) ++ if(.not.lmols) call error(idnode,13) ++ ++ do i=1,mxsite ++ filter(i)=.false. ++ enddo ++ ++ do ifbp=1,mxfbp ++ lstfbp(ifbp)=0 ++ enddo ++ ++ do ifbp=1,mxfbp,mx3fbp ++ lstfbp(ifbp)=-1 ++ enddo ++ ++ rcutfb=0.d0 ++ ++ do itpfbp=1,ntpfbp ++ ++ do i=1,mxpfbp ++ parpot(i)=0.d0 ++ enddo ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++c Note the order!! atom0 is the central atom ++ ++ call copystring(record,message,80) ++ call getword(atom0,record,8,lenrec) ++ call getword(atom1,record,8,lenrec) ++ call getword(atom2,record,8,lenrec) ++ call getword(atom3,record,8,lenrec) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'harm') then ++ keypot=1 ++ elseif(keyword(1:4).eq.'hcos') then ++ keypot=2 ++ elseif(keyword(1:4).eq.'plan') then ++ keypot=3 ++ else ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,443) ++ endif ++ ++ parpot(1)=dblstr(record,lenrec,idum) ++ parpot(2)=dblstr(record,lenrec,idum) ++ parpot(3)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(16x,4a8,4x,a4,1x,1p,9e13.5)") ++ x atom0,atom1,atom2,atom3,keyword(1:4),(parpot(j),j=1,mxpfbp) ++ ++ katm0=0 ++ katm1=0 ++ katm2=0 ++ katm3=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm ++ if(atom3.eq.unqatm(jtpatm))katm3=jtpatm ++ ++ enddo ++ ++ if(katm0.eq.0.or.katm1.eq.0.or.katm2.eq.0.or. ++ x katm3.eq.0) call error(idnode,91) ++ ++ filter(katm0)=.true. ++ filter(katm1)=.true. ++ filter(katm2)=.true. ++ filter(katm3)=.true. ++ ++ ka1=max(katm1,katm2,katm3) ++ ka3=min(katm1,katm2,katm3) ++ ka2=katm1+katm2+katm3-ka1-ka3 ++ keyfbp=ka3+(ka2*(ka2-1))/2+(ka1*(ka1**2-1))/6+ ++ x (katm0-1)*mx3fbp ++ ++ if(keyfbp.gt.mxfbp) call error(idnode,101) ++ ++c convert parameters to internal units ++ ++ parpot(1)=parpot(1)*engunit ++ parpot(2)=parpot(2)*(pi/180.d0) ++ ++ if(keypot.eq.2)then ++ ++ parpot(2)=cos(parpot(2)) ++ ++ endif ++ ++ if(lstfbp(keyfbp).gt.0) call error(idnode,19) ++ lstfbp(keyfbp)=itpfbp ++ ltpfbp(itpfbp)=keypot ++ kfbp=mx3fbp*((keyfbp-1)/mx3fbp)+1 ++ if(lstfbp(kfbp).lt.0)lstfbp(kfbp)=0 ++ ++c calculate max four body cutoff ++ ++ rcutfb=max(rcutfb,parpot(3)) ++ rcut4b(itpfbp)=parpot(3) ++ ++c store four body potential parameters ++ ++ do i=1,mxpfbp ++ prmfbp(itpfbp,i)=parpot(i) ++ enddo ++ ++ enddo ++ ++ if(rcutfb.lt.1.d-6)call error(idnode,453) ++ ++ deallocate (parpot,stat=fail) ++ ++ return ++ end subroutine define_four_body ++ ++ subroutine fbpfrc ++ x (lsolva,lfree,lexcite,idnode,mxnode,natms,imcon,rcutfb, ++ x engfbp,virfbp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating four body inversion forces ++c arising from the inversion angle between three atoms around a ++c nominated central atom ++c ++c Note: the subroutine converts coordinates to reduced units ++c to avoid a call to images.f. The link cell algorithm used ++c here necessitates a parallelepiped cell geometry ++c ++c copyright - daresbury laboratory 1996 ++c author - w.smith july 1996 ++c adapted - w.smith aug 2008 solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect,lskip ++ logical idrive,jdrive,kdrive,ldrive ++ integer idnode,mxnode,natms,imcon,nix,niy,niz ++ integer i,j,k,nbx,nby,nbz,ncells,ix,iy,iz,icell,jx,jy ++ integer jz,jj,kk,ia,ib,ifbp,jfbp,kfbp,jklbd,kkfbp,ktyp,ii ++ integer ic,ll,id,lfbp,l,limit,jcell,kkk ++ real(8) rcutfb,engfbp,virfbp,vbn,vcn,pterm,xm,ym,zm ++ real(8) strs,cprp,det,xdc,ydc,zdc,sxx,syy,szz,sxab,strs_loc ++ real(8) syab,szab,xab,yab,zab,rab2,sxac,syac,szac,xac,yac ++ real(8) zac,rac2,sxad,syad,szad,xad,yad,zad,rad2,rrab,rrac ++ real(8) rrad,rbc,rcd,rdb,ubx,uby,ubz,ubn,rub,vbx,vby,vbz ++ real(8) rvb,wwb,ucx,ucy,ucz,ucn,ruc,vcx,vcy,vcz,rvc,wwc ++ real(8) udx,udy,udz,udn,rud,vdx,vdy,vdz,vdn,rvd,wwd,cosb ++ real(8) cosc,cosd,thb,thc,thd,gamb,gamc,gamd,rubc,rubd ++ real(8) rucd,rucb,rudb,rudc,rvbc,rvbd,rvcd,rvcb,rvdb,rvdc ++ real(8) fax,fay,faz,fbx,fby,fbz,fcx,fcy,fcz,fdx,fdy,fdz ++ dimension cprp(10),strs(6),nix(27),niy(27),niz(27),strs_loc(6) ++ ++ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, ++ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ ++ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, ++ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ ++ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ++ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ ++ ++ lskip=(lfree.or.lexcite) ++ ++c flag for undefined potentials ++ ++ safe=.true. ++ ++c initialise accumulators ++ ++ engfbp=0.d0 ++ virfbp=0.d0 ++ fbp_fre=0.d0 ++ fbp_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(9)=.true. ++ en4_sol(:)=0.d0 ++ if(lexcite)en4_exc(:)=0.d0 ++ ++ endif ++ ++c create mock cell vectors for non-periodic system ++ ++ if(imcon.eq.0) then ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ do i=1,natms ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ enddo ++ ++ cell(1)=2.d0*xm+rcutfb ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(5)=2.d0*ym+rcutfb ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ cell(9)=2.d0*zm+rcutfb ++ ++ endif ++ ++c check for appropriate boundary conditions ++ ++ if(imcon.gt.3)call error(idnode,79) ++ call invert(cell,rcell,det) ++ call dcell(cell,cprp) ++ ++c calculate link cell numbers ++ ++ nbx=int(cprp(7)/(rcutfb+1.d-6)) ++ nby=int(cprp(8)/(rcutfb+1.d-6)) ++ nbz=int(cprp(9)/(rcutfb+1.d-6)) ++ ncells=nbx*nby*nbz ++ if(ncells.gt.mxcell) then ++ ++ if(idnode.eq.0) write(nrite,'(a,i6)') ++ x 'number of required link cells in routine fbpfrc is ',ncells ++ write(nrite,'(a,i6)') ++ x 'number of default link cells in routine fbpfrc is ',mxcell ++ call error(idnode,87) ++ ++ endif ++ ++c transform atomic coordinates and construct link cells ++ ++ do l=1,ncells ++ ++ lct(l)=0 ++ lst(l)=0 ++ ++ enddo ++ ++ xdc=dble(nbx) ++ ydc=dble(nby) ++ zdc=dble(nbz) ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ xxx(i)=sxx ++ yyy(i)=syy ++ zzz(i)=szz ++ ++ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) ++ iy=min(int(ydc*(syy+0.5d0)),nby-1) ++ iz=min(int(zdc*(szz+0.5d0)),nbz-1) ++ k=1+ix+nbx*(iy+nby*iz) ++ lst(k)=lst(k)+1 ++ link(i)=lct(k) ++ lct(k)=i ++ ++ endif ++ ++ enddo ++ ++c loop over central atoms of inversion ++ ++ ix=0 ++ iy=1 ++ iz=1 ++ do icell=1,ncells ++ ++ ix=ix+1 ++ if(ix.gt.nbx)then ++ ix=1 ++ iy=iy+1 ++ if(iy.gt.nby)then ++ iy=1 ++ iz=iz+1 ++ endif ++ endif ++ ++ k=0 ++ do kk=1,27 ++ ++ jx=ix+nix(kk) ++ jy=iy+niy(kk) ++ jz=iz+niz(kk) ++ ++ if(jx.gt.nbx)jx=1 ++ if(jy.gt.nby)jy=1 ++ if(jz.gt.nbz)jz=1 ++ if(jx.lt.1)jx=jx+nbx ++ if(jy.lt.1)jy=jy+nby ++ if(jz.lt.1)jz=jz+nbz ++ ++ jcell=jx+nbx*(jy-1+nby*(jz-1)) ++ j=lct(jcell) ++ ++ do ii=1,lst(jcell) ++ ++ k=k+1 ++ latfbp(k)=j ++ j=link(j) ++ ++ enddo ++ ++ enddo ++ ++ limit=k ++ ++ do ii=1,lst(icell) ++ ++ ia=latfbp(ii) ++ if(lmetadyn)idrive=driven(ltype(ia)) ++ ifbp=mx3fbp*(ltype(ia)-1) ++ if(mod(ia,mxnode).eq.idnode.and.lstfbp(ifbp+1).ge.0)then ++ ++ do jj=1,limit-2 ++ ++ ib=latfbp(jj) ++ if(lmetadyn)jdrive=driven(ltype(ib)) ++ ++ do kk=jj+1,limit-1 ++ ++ ic=latfbp(kk) ++ if(lmetadyn)kdrive=driven(ltype(ic)) ++ ++ do ll=kk+1,limit ++ ++ id=latfbp(ll) ++ if(lmetadyn)ldrive=driven(ltype(id)) ++ ++ if(lskip)then ++ ++ if((atm_fre(ia).eq.1.or.atm_fre(ib).eq.1.or. ++ x atm_fre(ic).eq.1.or.atm_fre(id).eq.1).and. ++ x (atm_fre(ia).eq.2.or.atm_fre(ib).eq.2.or. ++ x atm_fre(ic).eq.2.or.atm_fre(id).eq.2))cycle ++ ++ endif ++ ++ jfbp=max(ltype(ib),ltype(ic),ltype(id)) ++ lfbp=min(ltype(ib),ltype(ic),ltype(id)) ++ kfbp=ltype(ib)+ltype(ic)+ltype(id)-jfbp-lfbp ++ jklbd=ifbp+lfbp+(kfbp*(kfbp-1))/2+(jfbp*(jfbp**2-1))/6 ++ kkfbp=lstfbp(jklbd) ++ if(kkfbp.gt.0)then ++ ++ sxab=xxx(ib)-xxx(ia) ++ sxab=sxab-nint(sxab) ++ syab=yyy(ib)-yyy(ia) ++ syab=syab-nint(syab) ++ szab=zzz(ib)-zzz(ia) ++ szab=szab-nint(szab) ++ ++ xab=cell(1)*sxab+cell(4)*syab+cell(7)*szab ++ if(abs(xab).lt.rcutfb)then ++ ++ yab=cell(2)*sxab+cell(5)*syab+cell(8)*szab ++ if(abs(yab).lt.rcutfb)then ++ ++ zab=cell(3)*sxab+cell(6)*syab+cell(9)*szab ++ if(abs(zab).lt.rcutfb)then ++ ++ rab2=xab*xab+yab*yab+zab*zab ++ ++ sxac=xxx(ic)-xxx(ia) ++ sxac=sxac-nint(sxac) ++ syac=yyy(ic)-yyy(ia) ++ syac=syac-nint(syac) ++ szac=zzz(ic)-zzz(ia) ++ szac=szac-nint(szac) ++ ++ xac=cell(1)*sxac+cell(4)*syac+cell(7)*szac ++ if(abs(xac).lt.rcutfb)then ++ ++ yac=cell(2)*sxac+cell(5)*syac+cell(8)*szac ++ if(abs(yac).lt.rcutfb)then ++ ++ zac=cell(3)*sxac+cell(6)*syac+cell(9)*szac ++ if(abs(zac).lt.rcutfb)then ++ ++ rac2=xac*xac+yac*yac+zac*zac ++ ++ sxad=xxx(id)-xxx(ia) ++ sxad=sxad-nint(sxad) ++ syad=yyy(id)-yyy(ia) ++ syad=syad-nint(syad) ++ szad=zzz(id)-zzz(ia) ++ szad=szad-nint(szad) ++ ++ xad=cell(1)*sxad+cell(4)*syad+cell(7)*szad ++ if(abs(xad).lt.rcutfb)then ++ ++ yad=cell(2)*sxad+cell(5)*syad+cell(8)*szad ++ if(abs(yad).lt.rcutfb)then ++ ++ zad=cell(3)*sxad+cell(6)*syad+cell(9)*szad ++ if(abs(zad).lt.rcutfb)then ++ ++ rad2=xad*xad+yad*yad+zad*zad ++ ++ if(rcut4b(kkfbp)**2.ge.max(rab2,rac2,rad2))then ++ ++ rrab=1.d0/sqrt(rab2) ++ rrac=1.d0/sqrt(rac2) ++ rrad=1.d0/sqrt(rad2) ++ ++ rbc=xab*xac+yab*yac+zab*zac ++ rcd=xac*xad+yac*yad+zac*zad ++ rdb=xad*xab+yad*yab+zad*zab ++ ++c calculate bond-angle-plane vectors ++ ++ ubx=xac*rrac+xad*rrad ++ uby=yac*rrac+yad*rrad ++ ubz=zac*rrac+zad*rrad ++ ubn=1.d0/sqrt(ubx**2+uby**2+ubz**2) ++ ubx=ubn*ubx ++ uby=ubn*uby ++ ubz=ubn*ubz ++ rub=xab*ubx+yab*uby+zab*ubz ++ ++ vbx=xac*rrac-xad*rrad ++ vby=yac*rrac-yad*rrad ++ vbz=zac*rrac-zad*rrad ++ vbn=1.d0/sqrt(vbx**2+vby**2+vbz**2) ++ vbx=vbn*vbx ++ vby=vbn*vby ++ vbz=vbn*vbz ++ rvb=xab*vbx+yab*vby+zab*vbz ++ wwb=sqrt(rub**2+rvb**2) ++ ++ ucx=xad*rrad+xab*rrab ++ ucy=yad*rrad+yab*rrab ++ ucz=zad*rrad+zab*rrab ++ ucn=1.d0/sqrt(ucx**2+ucy**2+ucz**2) ++ ucx=ucn*ucx ++ ucy=ucn*ucy ++ ucz=ucn*ucz ++ ruc=xac*ucx+yac*ucy+zac*ucz ++ ++ vcx=xad*rrad-xab*rrab ++ vcy=yad*rrad-yab*rrab ++ vcz=zad*rrad-zab*rrab ++ vcn=1.d0/sqrt(vcx**2+vcy**2+vcz**2) ++ vcx=vcn*vcx ++ vcy=vcn*vcy ++ vcz=vcn*vcz ++ rvc=xac*vcx+yac*vcy+zac*vcz ++ wwc=sqrt(ruc**2+rvc**2) ++ ++ udx=xab*rrab+xac*rrac ++ udy=yab*rrab+yac*rrac ++ udz=zab*rrab+zac*rrac ++ udn=1.d0/sqrt(udx**2+udy**2+udz**2) ++ udx=udn*udx ++ udy=udn*udy ++ udz=udn*udz ++ rud=xad*udx+yad*udy+zad*udz ++ ++ vdx=xab*rrab-xac*rrac ++ vdy=yab*rrab-yac*rrac ++ vdz=zab*rrab-zac*rrac ++ vdn=1.d0/sqrt(vdx**2+vdy**2+vdz**2) ++ vdx=vdn*vdx ++ vdy=vdn*vdy ++ vdz=vdn*vdz ++ rvd=xad*vdx+yad*vdy+zad*vdz ++ wwd=sqrt(rud**2+rvd**2) ++ ++c calculate inversion angle cosines ++ ++ cosb=wwb*rrab ++ cosc=wwc*rrac ++ cosd=wwd*rrad ++ if(abs(cosb).gt.1.d0)cosb=sign(1.d0,cosb) ++ if(abs(cosc).gt.1.d0)cosc=sign(1.d0,cosc) ++ if(abs(cosd).gt.1.d0)cosd=sign(1.d0,cosd) ++ ++c select potential energy function type ++ ++ ktyp=ltpfbp(kkfbp) ++ ++c calculate potential energy and scalar force term ++ ++ if(ktyp.eq.1)then ++ ++c key=1 for harmonic potential ++ ++ thb=acos(cosb) ++ thc=acos(cosc) ++ thd=acos(cosd) ++ ++ pterm=0.5d0*prmfbp(kkfbp,1)* ++ x ((thb-prmfbp(kkfbp,2))**2+ ++ x (thc-prmfbp(kkfbp,2))**2+ ++ x (thd-prmfbp(kkfbp,2))**2)/3.d0 ++ ++ gamb=0.d0 ++ if(abs(thb).gt.1.d-12)gamb=prmfbp(kkfbp,1)* ++ x (thb-prmfbp(kkfbp,2))/(3.d0*sin(thb)) ++ gamc=0.d0 ++ if(abs(thc).gt.1.d-12)gamc=prmfbp(kkfbp,1)* ++ x (thc-prmfbp(kkfbp,2))/(3.d0*sin(thc)) ++ gamd=0.d0 ++ if(abs(thd).gt.1.d-12)gamd=prmfbp(kkfbp,1)* ++ x (thd-prmfbp(kkfbp,2))/(3.d0*sin(thd)) ++ ++ else if(ktyp.eq.2)then ++ ++c key=2 for harmonic cosine inversion potential ++ ++ pterm=0.5d0*prmfbp(kkfbp,1)* ++ x ((cosb-prmfbp(kkfbp,2))**2+ ++ x (cosc-prmfbp(kkfbp,2))**2+ ++ x (cosd-prmfbp(kkfbp,2))**2)/3.d0 ++ ++ gamb=-prmfbp(kkfbp,1)*(cosb-prmfbp(kkfbp,2))/3.d0 ++ gamc=-prmfbp(kkfbp,1)*(cosc-prmfbp(kkfbp,2))/3.d0 ++ gamd=-prmfbp(kkfbp,1)*(cosd-prmfbp(kkfbp,2))/3.d0 ++ ++ else if(ktyp.eq.3)then ++ ++c key=3 for planar inversion potentials ++ ++ pterm=prmfbp(kkfbp,1)* ++ x (3.d0-cosb-cosc-cosd)/3.d0 ++ ++ gamb=-prmfbp(kkfbp,1)/3.d0 ++ gamc=-prmfbp(kkfbp,1)/3.d0 ++ gamd=-prmfbp(kkfbp,1)/3.d0 ++ ++ else ++ ++c undefined potential ++ ++ safe=.false. ++ pterm=0.d0 ++ gamb=0.d0 ++ gamc=0.d0 ++ gamd=0.d0 ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set quadruple index ++ ++ if(lsolva) ++ x kkk=loc4(atmolt(ia),atmolt(ib),atmolt(ic),atmolt(id)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. ++ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ ++ x atm_fre(id).eq.0) ++ ++ if(lsolva)en4_exc(kkk)=en4_exc(kkk)+pterm ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. ++ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ fbp_fre=fbp_fre-pterm ++ pterm=lambda1*pterm ++ gamb=lambda1*gamb ++ gamc=lambda1*gamc ++ gamd=lambda1*gamd ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. ++ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ fbp_fre=fbp_fre+pterm ++ pterm=lambda2*pterm ++ gamb=lambda2*gamb ++ gamc=lambda2*gamc ++ gamd=lambda2*gamd ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential ++ ++ engfbp=engfbp+pterm ++ ++ if(lsolva)en4_sol(kkk)=en4_sol(kkk)+pterm ++ ++c calculate bond and u,v scalar products ++ ++ rubc=xab*ucx+yab*ucy+zab*ucz ++ rubd=xab*udx+yab*udy+zab*udz ++ rucd=xac*udx+yac*udy+zac*udz ++ rucb=xac*ubx+yac*uby+zac*ubz ++ rudb=xad*ubx+yad*uby+zad*ubz ++ rudc=xad*ucx+yad*ucy+zad*ucz ++ ++ rvbc=xab*vcx+yab*vcy+zab*vcz ++ rvbd=xab*vdx+yab*vdy+zab*vdz ++ rvcd=xac*vdx+yac*vdy+zac*vdz ++ rvcb=xac*vbx+yac*vby+zac*vbz ++ rvdb=xad*vbx+yad*vby+zad*vbz ++ rvdc=xad*vcx+yad*vcy+zad*vcz ++ ++c calculate atomic forces ++ ++ fbx=gamb*(-cosb*xab*rrab**2+rrab*(rub*ubx+rvb*vbx)/wwb) ++ x +(ruc*ucn*rrab*(xac-ruc*ucx-(rbc-ruc*rubc)*xab*rrab**2) ++ x - rvc*vcn*rrab*(xac-rvc*vcx-(rbc-rvc*rvbc)*xab*rrab**2)) ++ x * gamc*rrac/wwc ++ x +(rud*udn*rrab*(xad-rud*udx-(rdb-rud*rubd)*xab*rrab**2) ++ x + rvd*vdn*rrab*(xad-rvd*vdx-(rdb-rvd*rvbd)*xab*rrab**2)) ++ x * gamd*rrad/wwd ++ ++ fby=gamb*(-cosb*yab*rrab**2+rrab*(rub*uby+rvb*vby)/wwb) ++ x +(ruc*ucn*rrab*(yac-ruc*ucy-(rbc-ruc*rubc)*yab*rrab**2) ++ x - rvc*vcn*rrab*(yac-rvc*vcy-(rbc-rvc*rvbc)*yab*rrab**2)) ++ x * gamc*rrac/wwc ++ x +(rud*udn*rrab*(yad-rud*udy-(rdb-rud*rubd)*yab*rrab**2) ++ x + rvd*vdn*rrab*(yad-rvd*vdy-(rdb-rvd*rvbd)*yab*rrab**2)) ++ x * gamd*rrad/wwd ++ ++ fbz=gamb*(-cosb*zab*rrab**2+rrab*(rub*ubz+rvb*vbz)/wwb) ++ x +(ruc*ucn*rrab*(zac-ruc*ucz-(rbc-ruc*rubc)*zab*rrab**2) ++ x - rvc*vcn*rrab*(zac-rvc*vcz-(rbc-rvc*rvbc)*zab*rrab**2)) ++ x * gamc*rrac/wwc ++ x +(rud*udn*rrab*(zad-rud*udz-(rdb-rud*rubd)*zab*rrab**2) ++ x + rvd*vdn*rrab*(zad-rvd*vdz-(rdb-rvd*rvbd)*zab*rrab**2)) ++ x * gamd*rrad/wwd ++ ++ fcx=gamc*(-cosc*xac*rrac**2+rrac*(ruc*ucx+rvc*vcx)/wwc) ++ x +(rud*udn*rrac*(xad-rud*udx-(rcd-rud*rucd)*xac*rrac**2) ++ x - rvd*vdn*rrac*(xad-rvd*vdx-(rcd-rvd*rvcd)*xac*rrac**2)) ++ x * gamd*rrad/wwd ++ x +(rub*ubn*rrac*(xab-rub*ubx-(rbc-rub*rucb)*xac*rrac**2) ++ x + rvb*vbn*rrac*(xab-rvb*vbx-(rbc-rvb*rvcb)*xac*rrac**2)) ++ x * gamb*rrab/wwb ++ ++ fcy=gamc*(-cosc*yac*rrac**2+rrac*(ruc*ucy+rvc*vcy)/wwc) ++ x +(rud*udn*rrac*(yad-rud*udy-(rcd-rud*rucd)*yac*rrac**2) ++ x - rvd*vdn*rrac*(yad-rvd*vdy-(rcd-rvd*rvcd)*yac*rrac**2)) ++ x * gamd*rrad/wwd ++ x +(rub*ubn*rrac*(yab-rub*uby-(rbc-rub*rucb)*yac*rrac**2) ++ x + rvb*vbn*rrac*(yab-rvb*vby-(rbc-rvb*rvcb)*yac*rrac**2)) ++ x * gamb*rrab/wwb ++ ++ fcz=gamc*(-cosc*zac*rrac**2+rrac*(ruc*ucz+rvc*vcz)/wwc) ++ x +(rud*udn*rrac*(zad-rud*udz-(rcd-rud*rucd)*zac*rrac**2) ++ x - rvd*vdn*rrac*(zad-rvd*vdz-(rcd-rvd*rvcd)*zac*rrac**2)) ++ x * gamd*rrad/wwd ++ x +(rub*ubn*rrac*(zab-rub*ubz-(rbc-rub*rucb)*zac*rrac**2) ++ x + rvb*vbn*rrac*(zab-rvb*vbz-(rbc-rvb*rvcb)*zac*rrac**2)) ++ x * gamb*rrab/wwb ++ ++ fdx=gamd*(-cosd*xad*rrad**2+rrad*(rud*udx+rvd*vdx)/wwd) ++ x +(rub*ubn*rrad*(xab-rub*ubx-(rdb-rub*rudb)*xad*rrad**2) ++ x - rvb*vbn*rrad*(xab-rvb*vbx-(rdb-rvb*rvdb)*xad*rrad**2)) ++ x * gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(xac-ruc*ucx-(rcd-ruc*rudc)*xad*rrad**2) ++ x + rvc*vcn*rrad*(xac-rvc*vcx-(rcd-rvc*rvdc)*xad*rrad**2)) ++ x * gamc*rrac/wwc ++ ++ fdy=gamd*(-cosd*yad*rrad**2+rrad*(rud*udy+rvd*vdy)/wwd) ++ x +(rub*ubn*rrad*(yab-rub*uby-(rdb-rub*rudb)*yad*rrad**2) ++ x - rvb*vbn*rrad*(yab-rvb*vby-(rdb-rvb*rvdb)*yad*rrad**2)) ++ x * gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(yac-ruc*ucy-(rcd-ruc*rudc)*yad*rrad**2) ++ x + rvc*vcn*rrad*(yac-rvc*vcy-(rcd-rvc*rvdc)*yad*rrad**2)) ++ x * gamc*rrac/wwc ++ ++ fdz=gamd*(-cosd*zad*rrad**2+rrad*(rud*udz+rvd*vdz)/wwd) ++ x +(rub*ubn*rrad*(zab-rub*ubz-(rdb-rub*rudb)*zad*rrad**2) ++ x - rvb*vbn*rrad*(zab-rvb*vbz-(rdb-rvb*rvdb)*zad*rrad**2)) ++ x * gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(zac-ruc*ucz-(rcd-ruc*rudc)*zad*rrad**2) ++ x + rvc*vcn*rrad*(zac-rvc*vcz-(rcd-rvc*rvdc)*zad*rrad**2)) ++ x * gamc*rrac/wwc ++ ++ fax=-(fbx+fcx+fdx) ++ fay=-(fby+fcy+fdy) ++ faz=-(fbz+fcz+fdz) ++ ++ fxx(ia)=fxx(ia)+fax ++ fyy(ia)=fyy(ia)+fay ++ fzz(ia)=fzz(ia)+faz ++ ++ fxx(ib)=fxx(ib)+fbx ++ fyy(ib)=fyy(ib)+fby ++ fzz(ib)=fzz(ib)+fbz ++ ++ fxx(ic)=fxx(ic)+fcx ++ fyy(ic)=fyy(ic)+fcy ++ fzz(ic)=fzz(ic)+fcz ++ ++ fxx(id)=fxx(id)+fdx ++ fyy(id)=fyy(id)+fdy ++ fzz(id)=fzz(id)+fdz ++ ++c stress tensor calculation for inversion terms ++ ++ strs(1)=strs(1)+xab*fbx+xac*fcx+xad*fdx ++ strs(2)=strs(2)+yab*fbx+yac*fcx+yad*fdx ++ strs(3)=strs(3)+zab*fbx+zac*fcx+zad*fdx ++ strs(4)=strs(4)+yab*fby+yac*fcy+yad*fdy ++ strs(5)=strs(5)+yab*fbz+yac*fcz+yad*fdz ++ strs(6)=strs(6)+zab*fbz+zac*fcz+zad*fdz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then ++ ++c local energy (no virial) ++ ++ eng_loc=eng_loc+pterm ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fax ++ fyy_loc(ia)=fyy_loc(ia)+fay ++ fzz_loc(ia)=fzz_loc(ia)+faz ++ ++ fxx_loc(ib)=fxx_loc(ib)+fbx ++ fyy_loc(ib)=fyy_loc(ib)+fby ++ fzz_loc(ib)=fzz_loc(ib)+fbz ++ ++ fxx_loc(ic)=fxx_loc(ic)+fcx ++ fyy_loc(ic)=fyy_loc(ic)+fcy ++ fzz_loc(ic)=fzz_loc(ic)+fcz ++ ++ fxx_loc(id)=fxx_loc(id)+fdx ++ fyy_loc(id)=fyy_loc(id)+fdy ++ fzz_loc(id)=fzz_loc(id)+fdz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xab*fbx+xac*fcx+xad*fdx ++ strs_loc(2)=strs_loc(2)+yab*fbx+yac*fcx+yad*fdx ++ strs_loc(3)=strs_loc(3)+zab*fbx+zac*fcx+zad*fdx ++ strs_loc(4)=strs_loc(4)+yab*fby+yac*fcy+yad*fdy ++ strs_loc(5)=strs_loc(5)+yab*fbz+yac*fcz+yad*fdz ++ strs_loc(6)=strs_loc(6)+zab*fbz+zac*fcz+zad*fdz ++ ++ endif ++ ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ ++ enddo ++ enddo ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,443) ++ ++c global sum of four body potential and virial ++ ++ buffer(1)=engfbp ++ buffer(2)=virfbp ++ buffer(3)=fbp_fre ++ buffer(4)=fbp_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engfbp=buffer(1) ++ virfbp=buffer(2) ++ fbp_fre=buffer(3) ++ fbp_vir=buffer(4) ++ ++c sum up solvation energies ++ ++ if(lsolva)then ++ ++ call gdsum(en4_sol,mxtmls_sol4,buffer(1)) ++ if(lexcite)call gdsum(en4_exc,mxtmls_exc4,buffer(1)) ++ ++ endif ++ ++c restore coordinate array to original representation ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=xxx(i) ++ syy=yyy(i) ++ szz=zzz(i) ++ ++ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz ++ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz ++ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz ++ ++ endif ++ ++ enddo ++ ++c restore cell vector ++ ++ if(imcon.eq.0) then ++ cell(1)=0.d0 ++ cell(5)=0.d0 ++ cell(9)=0.d0 ++ endif ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine fbpfrc ++ ++ end module four_body_module +diff -urN dl_class_1.9.orig/srcmod/hkewald_module.f dl_class_1.9/srcmod/hkewald_module.f +--- dl_class_1.9.orig/srcmod/hkewald_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/hkewald_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1292 @@ ++ module hkewald_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining hautman-klein ewald sum arrays ++c copyright - daresbury laboratory ++c author - w. smith nov 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use exclude_module ++ use error_module ++ use pair_module ++ use property_module ++ use setup_module ++ ++ implicit none ++ ++ real(8), allocatable :: ahk(:),crn(:,:) ++ real(8), allocatable :: elc(:,:),els(:,:) ++ real(8), allocatable :: emc(:,:),ems(:,:) ++ real(8), allocatable :: zzn(:),zzd(:) ++ real(8), allocatable :: hon(:,:),znp(:,:) ++ real(8), allocatable :: dhn(:,:),zgs(:) ++ real(8), allocatable :: fon(:,:),zgc(:) ++ real(8), allocatable :: ckc(:),cks(:) ++ real(8), allocatable :: pp(:),sss(:) ++ ++ save ahk,crn,elc,els,emc,ems,zzn,zzd,hon,znp,dhn,zgs ++ save fon,zgc,ckc,cks,pp,sss ++ ++ contains ++ ++ subroutine alloc_hke_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=9 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (ahk(0:mxhko),crn(0:mxhko,0:mxhko),stat=fail(1)) ++ allocate (elc(mxewld,0:1),els(mxewld,0:1),stat=fail(2)) ++ allocate (emc(mxewld,0:kmaxb),ems(mxewld,0:kmaxb),stat=fail(3)) ++ allocate (zzn(mxxdf),zzd(mxxdf),stat=fail(4)) ++ allocate (hon(mxgrid,0:mxhko),znp(mxhke,0:2*mxhko),stat=fail(5)) ++ allocate (dhn(mxgrid,0:mxhko),zgs(0:2*mxhko),stat=fail(6)) ++ allocate (fon(mxegrd,0:7),zgc(0:2*mxhko),stat=fail(7)) ++ allocate (ckc(mxewld),cks(mxewld),stat=fail(8)) ++ allocate (pp(2*mxhko),sss(mxxdf),stat=fail(9)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1730) ++ enddo ++ ++ end subroutine alloc_hke_arrays ++ ++ subroutine hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for generating convergence function ++c arrays for hautman klein ewald method (up to order 3 only) ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith february 2000 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,idnode,nhko,nlatt,k ++ real(8) alpha,drewd,rcut,ecut,den,fac,ss1,aaa,ss2 ++ ++ if(nhko.gt.mxhko)call error(idnode,332) ++ ++c define effective cutoff ++ ++ ecut=rcut*dble(2*nlatt+1) ++ ++c define grid resolution for potential arrays ++ ++ drewd=ecut/dble(mxegrd-4) ++ ++c calculate HKE coefficients ++ ++ ahk(0)=1.d0 ++ ++ do i=1,nhko ++ ++ ahk(i)=-0.25d0*ahk(i-1)*dble(2*i*(2*i-1))/dble(i*i) ++ ++ enddo ++ ++c generate convergence function arrays ++ ++ do i=1,mxegrd ++ ++ hon(i,0)=0.d0 ++ hon(i,1)=dble(i-1)*drewd ++ hon(i,2)=(2.d0*alpha/sqrpi)*exp(-(alpha*hon(i,1))**2) ++ ++ enddo ++ ++c generate error function and derivatives by recursion ++ ++ do k=100,1,-1 ++ ++ den=1.d0/dble(2*k-1) ++ fac=(2.d0*alpha**2)**(k-1) ++ ++ do i=1,mxegrd ++ ++ hon(i,0)=den*(hon(i,0)*hon(i,1)**2+fac*hon(i,2)) ++ ++ enddo ++ ++ if(k.le.2*nhko+2)then ++ ++ do i=1,mxegrd ++ ++ fon(i,k-1)=hon(i,0) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c zeroth order function ++c note: hon(1,0)=2.d0*alpha/sqrpi ++ ++ do i=1,mxegrd ++ ++ hon(i,0)= fon(i,0) ++ dhn(i,0)=-fon(i,1) ++ ++ enddo ++ ++ if(nhko.eq.0)then ++ ++ ss1=dble(mxegrd-1)*drewd ++ aaa=abs(1.d0-hon(mxegrd,nhko)*ss1) ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,100,aaa,0.d0,0.d0) ++ ++ endif ++ ++ return ++ ++ endif ++ ++c first order function ++c note: hon(1,1)=8.d0*alpha**3/(3.d0*sqrpi) ++ ++ do i=1,mxegrd ++ ++ ss2=(dble(i-1)*drewd)**2 ++ ++ hon(i,1)=-(2.d0*fon(i,1)-fon(i,2)*ss2) ++ dhn(i,1)= (4.d0*fon(i,2)-fon(i,3)*ss2) ++ ++ enddo ++ ++ if(nhko.eq.1)then ++ ++ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,100,aaa,0.d0,0.d0) ++ ++ endif ++ ++ return ++ ++ endif ++ ++c second order function ++c note: hon(1,2)=64.d0*alpha**5/(45.d0*sqrpi) ++ ++ do i=1,mxegrd ++ ++ ss2=(dble(i-1)*drewd)**2 ++ ++ hon(i,2)=(8.d0*fon(i,2)+ss2*(-8.d0*fon(i,3)+ss2*fon(i,4)))/9.d0 ++ dhn(i,2)=(-24.d0*fon(i,3)+ss2*(12.d0*fon(i,4)-ss2*fon(i,5))) ++ x /9.d0 ++ ++ enddo ++ ++ if(nhko.eq.2)then ++ ++ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,100,aaa,0.d0,0.d0) ++ ++ endif ++ ++ return ++ ++ endif ++ ++c third order function (enough for anyone!) ++c note: hon(1,3)=768.d0*alpha**7/(14175.d0*sqrpi) ++ ++ do i=1,mxegrd ++ ++ ss2=(dble(i-1)*drewd)**2 ++ ++ hon(i,3)=-(48.d0*fon(i,3)+ss2*(-72.d0*fon(i,4)+ss2*( ++ x 18.d0*fon(i,5)-ss2*fon(i,6))))/225.d0 ++ dhn(i,3)= (192.d0*fon(i,4)+ss2*(-144.d0*fon(i,5)+ss2*( ++ x 24.d0*fon(i,6)-ss2*fon(i,7))))/225.d0 ++ ++ enddo ++ ++ if(nhko.eq.3)then ++ ++ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,100,aaa,0.d0,0.d0) ++ ++ endif ++ ++ return ++ ++ endif ++ ++ return ++ end subroutine hkgen ++ ++ subroutine hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engcpe,vircpe,alpha,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces in a ++c periodic system using Hautman Klein Ewald method ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith february 2000 ++c ++c part 1 - reciprocal space terms (fourier part) ++c ++c note - in loop over all k vectors k=2pi(ll/cl,mm/cl) ++c the values of ll and mm are selected so that the symmetry of ++c reciprocal lattice is taken into account i.e. the following ++c rules apply. ++c ++c ll ranges over the values 0 to kmax1 only. ++c ++c mm ranges over 1 to kmax2 when ll=0 and over ++c -kmax2 to kmax2 otherwise. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,mxnode,natms,imcon,nhko,kmax1,kmax2,i ++ integer iatm0,iatm1,j,k,limit,mmin,l,ll,m,mm,n ++ real(8) engcpe,vircpe,alpha,epsq,twopi,ralph,area,rarea ++ real(8) det,rcpcut,rcpct2,aaa,engsic,pm1,pm2,term,ssx,ssy ++ real(8) tmp,rkx1,rky1,rkx2,rky2,rksq,rkk,fac,eterm,fng,fn0,gaus ++ real(8) bkk,force0,forcez,pterm,scale,cprop,omg,cs ++c$$$ real(8) erfc ++ ++ dimension cprop(10),omg(9) ++ ++ save newjob,engsic ++ ++ data newjob/.true./ ++ ++c initialise coulombic potential energy ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ if(alpha.lt.1.d-8)return ++ ++c set working parameters ++ ++ twopi=2.d0*pi ++ ralph=0.5d0/alpha ++ call dcell(cell,cprop) ++ area=cprop(1)*cprop(2)*sqrt(1.d0-cprop(4)**2) ++ rarea=pi/area ++ ++c set up atoms numbers for nodes ++ ++ iatm0 = (idnode*natms)/mxnode + 1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++c initalize stress tensor working arrays ++ ++ do i = 1,9 ++ ++ omg(i) = 0.d0 ++ ++ enddo ++ ++c construct reciprocal lattice vectors and set k vector range ++ ++ call invert(cell,rcell,det) ++ if(abs(det).lt.1.d-6)call error(idnode,120) ++ call dcell(rcell,cprop) ++ rcpcut=min(dble(kmax1)*cprop(7),dble(kmax2)*cprop(8))* ++ x 1.05d0*twopi ++ rcpct2=rcpcut**2 ++ ++c compute quantities for first entry ++ ++ if(newjob)then ++ ++ newjob=.false. ++ ++c pbc check and array bound checks ++ ++ if(imcon.ne.6)call error(idnode,66) ++ if(mxhke.ne.msatms) call error(idnode,331) ++ if(mxewld.ne.msatms) call error(idnode,330) ++ ++c check hk screening function at cutoff ++ ++ aaa=cerfr(ralph,rcpcut) ++c$$$ aaa=erfc(ralph*rcpcut)/rcpcut ++ ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,105,aaa,0.d0,0.d0) ++c call error(idnode,487) ++ ++ endif ++ ++c calculate self interaction correction ++ ++ engsic=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ engsic=engsic+chge(i)**2 ++ ++ enddo ++ ++ engsic=-r4pie0*alpha*engsic/(sqrpi*epsq) ++ ++c binomial coefficients ++ ++ k=0 ++ crn(0,0)=0.5d0 ++ do i=1,2*nhko ++ ++ pp(i)=1.d0 ++ pm1=pp(1) ++ ++ do j=2,i ++ ++ pm2=pp(j) ++ pp(j)=pm2+pm1 ++ pm1=pm2 ++ ++ enddo ++ ++ if(mod(i,2).eq.0)then ++ ++ k=k+1 ++ do j=0,k ++ ++ term=pp(j+1)*(-1.d0)**j ++ crn(j,k)=term ++ crn(k,j)=term ++ ++ enddo ++ ++ crn(k,k)=0.5d0*crn(k,k) ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++c calculate and store powers of z_i ++ ++ i=0 ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ znp(i,0)=1.d0 ++ znp(i,1)=zzz(j) ++ ++ enddo ++ ++ limit=i ++ ++ do k=2,2*nhko ++ ++ do i=1,limit ++ ++ znp(i,k)=znp(i,k-1)*znp(i,1) ++ ++ enddo ++ ++ enddo ++ ++c calculate and store exponential factors ++ ++ i=0 ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ elc(i,0)=1.d0 ++ emc(i,0)=1.d0 ++ els(i,0)=0.d0 ++ ems(i,0)=0.d0 ++ ssx=rcell(1)*xxx(j)+rcell(4)*yyy(j) ++ ssy=rcell(2)*xxx(j)+rcell(5)*yyy(j) ++ elc(i,1)=cos(twopi*ssx) ++ emc(i,1)=cos(twopi*ssy) ++ els(i,1)=sin(twopi*ssx) ++ ems(i,1)=sin(twopi*ssy) ++ ++ enddo ++ ++ do l=2,kmax2 ++ ++ do i=1,limit ++ ++ emc(i,l)=emc(i,l-1)*emc(i,1)-ems(i,l-1)*ems(i,1) ++ ems(i,l)=ems(i,l-1)*emc(i,1)+emc(i,l-1)*ems(i,1) ++ ++ enddo ++ ++ enddo ++ ++c start of main loop over k vectors ++ ++ mmin=1 ++ ++ do ll=0,kmax1 ++ ++ l=ll ++ tmp = twopi*dble(ll) ++ rkx1=tmp*rcell(1) ++ rky1=tmp*rcell(4) ++ ++c put cos(i,L) terms into cos(i,0) array ++ ++ if(l.eq.1) then ++ ++ do i=1,limit ++ ++ elc(i,0)=elc(i,1) ++ els(i,0)=els(i,1) ++ ++ enddo ++ ++ elseif(l.gt.1) then ++ ++ do i=1,limit ++ ++ cs=elc(i,0) ++ elc(i,0)=cs*elc(i,1)-els(i,0)*els(i,1) ++ els(i,0)=els(i,0)*elc(i,1)+cs*els(i,1) ++ ++ enddo ++ ++ endif ++ ++ do mm=mmin,kmax2 ++ ++ m=iabs(mm) ++ tmp = twopi*dble(mm) ++ rkx2=rkx1+tmp*rcell(2) ++ rky2=rky1+tmp*rcell(5) ++ ++c test on magnitude of k vector ++ ++ rksq=rkx2*rkx2+rky2*rky2 ++ ++ if(rksq.le.rcpct2)then ++ ++c calculate exp(ikr) terms and product with charges ++ ++ i=0 ++ ++ if(mm.ge.0)then ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ ckc(i)=chge(j)*(elc(i,0)*emc(i,m)-els(i,0)*ems(i,m)) ++ cks(i)=chge(j)*(els(i,0)*emc(i,m)+ems(i,m)*elc(i,0)) ++ ++ enddo ++ ++ else ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ ++ ckc(i)=chge(j)*(elc(i,0)*emc(i,m)+els(i,0)*ems(i,m)) ++ cks(i)=chge(j)*(els(i,0)*emc(i,m)-ems(i,m)*elc(i,0)) ++ ++ enddo ++ ++ endif ++ ++c calculate sum of products of powers of z_i and q_i exp(ik.s_i) ++ ++ do k=0,2*nhko ++ ++ zgc(k)=0.d0 ++ zgs(k)=0.d0 ++ ++ do i=1,limit ++ ++ zgc(k)=zgc(k)+ckc(i)*znp(i,k) ++ zgs(k)=zgs(k)+cks(i)*znp(i,k) ++ ++ enddo ++ ++ enddo ++ ++c perform global summation of zgc and zgs arrays ++ ++ if(mxnode.gt.1)then ++ ++ call gdsum(zgc(0),2*nhko+1,buffer) ++ call gdsum(zgs(0),2*nhko+1,buffer) ++ ++ endif ++ ++c calculate 0th order screening function ++ ++ rkk=sqrt(rksq) ++ fn0=cerfr(ralph,rkk) ++c$$$ fn0=erfc(ralph*rkk)/rkk ++ gaus=exp(-(ralph*rkk)**2)/(alpha*sqrpi) ++ ++c sum terms for orders of the screening function ++ ++ fac=1.d0 ++ ++ do k=0,nhko ++ ++c sum over z_i binomial contributions ++ ++ eterm=0.d0 ++ fng=fac*fn0 ++ do m=0,k ++ ++ n=2*k-m ++ ++c sum energy terms ++ ++ eterm=eterm+crn(m,k)*(zgc(m)*zgc(n)+zgs(m)*zgs(n)) ++ ++c calculate force contribution to each site ++ ++ i=0 ++ bkk=-fng*crn(m,k) ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ force0=bkk*(znp(i,n)*(zgs(m)*ckc(i)-zgc(m)*cks(i))+ ++ x znp(i,m)*(zgs(n)*ckc(i)-zgc(n)*cks(i))) ++ fxx(j)=fxx(j)+rkx2*force0 ++ fyy(j)=fyy(j)+rky2*force0 ++ ++ omg(3)=omg(3)+rkx2*force0*zzz(j) ++ omg(6)=omg(6)+rky2*force0*zzz(j) ++ ++ if(k.gt.0)then ++ ++ if(m.eq.0)then ++ ++ forcez=bkk*dble(n)*znp(i,n-1)*(zgc(m)*ckc(i)+ ++ x zgs(m)*cks(i)) ++ ++ else ++ ++ forcez=bkk*(dble(m)*znp(i,m-1)*(zgc(n)*ckc(i)+ ++ x zgs(n)*cks(i))+dble(n)*znp(i,n-1)*(zgc(m)* ++ x ckc(i)+zgs(m)*cks(i))) ++ ++ endif ++ ++ omg(9)=omg(9)+forcez*zzz(j) ++ fzz(j)=fzz(j)+forcez ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c accumulate potential energy and stress tensor ++ ++ engcpe=engcpe+fng*eterm ++ pterm=(dble(2*k-1)*fng-fac*gaus)/rksq ++ omg(1)=omg(1)+eterm*(fng+pterm*rkx2*rkx2) ++ omg(5)=omg(5)+eterm*(fng+pterm*rky2*rky2) ++ omg(2)=omg(2)+eterm*pterm*rky2*rkx2 ++ fac=fac*rksq/(dble(2*(k+1))*dble(2*k+1)) ++ ++c end of loop over orders of screening function ++ ++ enddo ++ ++c end of if-block for rksq < rcpct2 ++ ++ endif ++ ++c end of inner loop over reciprocal lattice vectors ++ ++ enddo ++ ++ mmin=-kmax2 ++ ++c end of outer loop over reciprocal lattice vectors ++ ++ enddo ++ ++ engcpe=engcpe/dble(mxnode) ++ do i = 1,9 ++ ++ omg(i) = omg(i)/dble(mxnode) ++ ++ enddo ++ ++c add self interaction correction to potential ++ ++ scale=4.d0*rarea*r4pie0/epsq ++ engcpe=scale*engcpe+engsic ++ ++c virial term ++ ++ vircpe=vircpe-scale*(omg(1)+omg(5)+omg(9)) ++ ++c calculate final forces ++ ++ do i=iatm0,iatm1 ++ ++ fxx(i)=scale*fxx(i) ++ fyy(i)=scale*fyy(i) ++ fzz(i)=scale*fzz(i) ++ ++ enddo ++ ++c calculate stress tensor (symmetrical) ++ ++ stress(1) = stress(1)+scale*omg(1) ++ stress(2) = stress(2)+scale*omg(2) ++ stress(3) = stress(3)+scale*omg(3) ++ stress(4) = stress(4)+scale*omg(2) ++ stress(5) = stress(5)+scale*omg(5) ++ stress(6) = stress(6)+scale*omg(6) ++ stress(7) = stress(7)+scale*omg(3) ++ stress(8) = stress(8)+scale*omg(6) ++ stress(9) = stress(9)+scale*omg(9) ++ ++ return ++ end subroutine hkewald1 ++ ++ subroutine hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engcpe, ++ x vircpe,drewd,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating real-space contributions to ++c the hautman-klein-ewald electrostatic method ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith may 2000 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,nhko,nlatt,imcon,natms,nix,niy ++ integer nboxes,i,j,k,n,m,ma,mpm2,npm2,ii,l0,l1,l2,last ++ real(8) engcpe,vircpe,drewd,rcut,epsq ++ real(8) step,rcsq,rdrewd,strs1,strs2,strs3 ++ real(8) strs5,strs6,strs9,dcx,dcy,udx,udy,fac,chgea,chgprd ++ real(8) ddx,ddy,ssx,ssy,ssq,coul,fcoul,rrr,ppp,vk0,vk1,vk2 ++ real(8) eterm,t1,t2,egamma,fx,fy,fz,det ++ ++ dimension nix(25),niy(25) ++ ++ data nix/ 0, 1, 1, 0,-1,-1,-1, 0, 1, 2, 2, ++ x 2, 1, 0,-1,-2,-2,-2,-2,-2,-1, 0, 1, 2, 2/ ++ data niy/ 0, 0, 1, 1, 1, 0,-1,-1,-1, 0, 1, ++ x 2, 2, 2, 2, 2, 1, 0,-1,-2,-2,-2,-2,-2,-1/ ++ ++CDIR$ CACHE_ALIGN fi ++ ++c check boundary condition ++ ++ if(imcon.ne.6)call error(idnode,66) ++ ++c number of neighbouring real space cells ++ ++ if(nlatt.gt.2)call error(idnode,488) ++ step=dble(2*nlatt+1) ++ nboxes=(2*nlatt+1)**2 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c set cutoff condition for pair forces ++ ++ rcsq=(step*rcut)**2 ++ ++c reciprocal of interpolation interval ++ ++ rdrewd = 1.d0/drewd ++ ++c reciprocal cell ++ ++ call invert(cell,rcell,det) ++ do i=1,9 ++ ++ rcell(i)=rcell(i)/step ++ ++ enddo ++ ++c initialise stress tensor accumulators ++ strs3 = 0.d0 ++ strs6 = 0.d0 ++ strs9 = 0.d0 ++ strs1 = 0.d0 ++ strs2 = 0.d0 ++ strs5 = 0.d0 ++ ++c loop over image cells, starting with central cell ++ ++ ma=1 ++ mpm2=natms/2 ++ npm2=(natms-1)/2 ++ ++ do k=1,nboxes ++ ++ last=natms ++ dcx=dble(nix(k)) ++ dcy=dble(niy(k)) ++ udx=cell(1)*dcx+cell(4)*dcy ++ udy=cell(2)*dcx+cell(5)*dcy ++ ++c outer loop over atoms ++ ++ do m=ma,mpm2 ++ ++ fac=r4pie0/epsq ++ if(m.eq.0)fac=fac*0.5d0 ++ if(m.gt.npm2)last=mpm2 ++ ++c set initial array values ++ ++ ii=0 ++ do i=idnode+1,last,mxnode ++ ++ ii=ii+1 ++ chgea=fac*chge(i) ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ chgprd=chgea*chge(j) ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++ zzn(ii)=1.d0 ++ zzd(ii)=0.d0 ++ ++c calculate interatomic separation ++ ++ ddx=xxx(i)-xxx(j)+udx ++ ddy=yyy(i)-yyy(j)+udy ++ ssx=rcell(1)*ddx+rcell(4)*ddy ++ ssy=rcell(2)*ddx+rcell(5)*ddy ++ ssx=ssx-nint(ssx) ++ ssy=ssy-nint(ssy) ++ xdf(ii)=step*(ssx*cell(1)+ssy*cell(4)) ++ ydf(ii)=step*(ssx*cell(2)+ssy*cell(5)) ++ zdf(ii)=zzz(i)-zzz(j) ++ rsqdf(ii)=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c loop over HK orders ++ ++ do n=0,nhko ++ ++c inner loop over atoms ++ ++ ii=0 ++ do i=idnode+1,last,mxnode ++ ++ ii=ii+1 ++ chgea = fac*chge(i) ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ chgprd=chgea*chge(j) ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++c apply truncation of potential ++ ++ ssq=rsqdf(ii)-zdf(ii)*zdf(ii) ++ ++ if(rcsq.gt.ssq)then ++ ++c calculate potential energy and virial ++ ++ coul=0.d0 ++ fcoul=0.d0 ++ rrr = sqrt(rsqdf(ii)) ++ sss(ii)=sqrt(ssq) ++ ++ if(n.eq.0)then ++ ++ coul = chgprd/rrr ++ fcoul = coul/rsqdf(ii) ++ ++ endif ++ ++c interpolation parameters ++ ++ l0=int(sss(ii)*rdrewd) ++ ppp=sss(ii)*rdrewd-dble(l0) ++ l0=l0+1 ++ l1=l0+1 ++ l2=l0+2 ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0 = hon(l0,n) ++ vk1 = hon(l1,n) ++ vk2 = hon(l2,n) ++ t1 = vk0 + (vk1 - vk0)*ppp ++ t2 = vk1 + (vk2 - vk1)*(ppp - 1.0d0) ++ ++ eterm=(t1+(t2-t1)*ppp*0.5d0)*ahk(n)*chgprd ++ engcpe=engcpe+coul-eterm*zzn(ii) ++ ++c calculate forces using 3pt interpolation ++ ++ vk0 = dhn(l0,n) ++ vk1 = dhn(l1,n) ++ vk2 = dhn(l2,n) ++ ++ t1 = vk0 + (vk1 - vk0)*ppp ++ t2 = vk1 + (vk2 - vk1)*(ppp - 1.0d0) ++ ++c calculate in-plane forces ++ ++ egamma=fcoul+ ++ x (t1+(t2-t1)*ppp*0.5d0)*chgprd*zzn(ii)*ahk(n) ++ fx=egamma*xdf(ii) ++ fy=egamma*ydf(ii) ++ ++c calculate perpendicular forces ++ ++ fz=fcoul*zdf(ii)+2.d0*dble(n)*eterm*zzd(ii) ++ ++c add to force accumulators ++ ++ fxx(i)=fxx(i)+fx ++ fyy(i)=fyy(i)+fy ++ fzz(i)=fzz(i)+fz ++ ++ fxx(j)=fxx(j)-fx ++ fyy(j)=fyy(j)-fy ++ fzz(j)=fzz(j)-fz ++ ++c reset zzn array for next order of convergence function ++ ++ zzd(ii)=zzn(ii)*zdf(ii) ++ zzn(ii)=zzd(ii)*zdf(ii) ++ ++c calculate stress tensor ++ ++ strs1 = strs1 + xdf(ii)*fx ++ strs2 = strs2 + xdf(ii)*fy ++ strs3 = strs3 + xdf(ii)*fz ++ strs5 = strs5 + ydf(ii)*fy ++ strs6 = strs6 + ydf(ii)*fz ++ strs9 = strs9 + zdf(ii)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ ma=0 ++ ++ enddo ++ ++c calculate virial ++ ++ vircpe=vircpe-(strs1+strs5+strs9) ++ ++c complete stress tensor ++ ++ stress(1) = stress(1) + strs1 ++ stress(2) = stress(2) + strs2 ++ stress(3) = stress(3) + strs3 ++ stress(4) = stress(4) + strs2 ++ stress(5) = stress(5) + strs5 ++ stress(6) = stress(6) + strs6 ++ stress(7) = stress(7) + strs3 ++ stress(8) = stress(8) + strs6 ++ stress(9) = stress(9) + strs9 ++ ++ return ++ end subroutine hkewald2 ++ ++ subroutine hkewald3(iatm,ik,engcpe,vircpe,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating exclusion corrections to ++c the hautman-klein-ewald electrostatic method ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith may 2000 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer iatm,ik,m,jatm ++ real(8) engcpe,vircpe,epsq,fx,fy,fz,strs1,strs2,strs3 ++ real(8) strs5,strs6,strs9,chgea,chgprd,rrr,rsq,coul,fcoul ++ ++CDIR$ CACHE_ALIGN fi ++ ++c initialise stress tensor accumulators ++ ++ strs1 = 0.d0 ++ strs2 = 0.d0 ++ strs3 = 0.d0 ++ strs5 = 0.d0 ++ strs6 = 0.d0 ++ strs9 = 0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ chgea=chge(iatm)/epsq*r4pie0 ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ do m=1,nexatm(ik) ++ ++c atomic index and charge product ++ ++ jatm=lexatm(ik,m) ++ chgprd=chgea*chge(jatm) ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=xdf(m)**2+ydf(m)**2+zdf(m)**2 ++ rrr = sqrt(rsq) ++ ++c calculate potential energy and virial ++ ++ coul = chgprd/rrr ++ engcpe = engcpe - coul ++ ++c calculate forces ++ ++ fcoul = coul/rsq ++ fx = fcoul*xdf(m) ++ fy = fcoul*ydf(m) ++ fz = fcoul*zdf(m) ++ ++ fxx(iatm) = fxx(iatm) - fx ++ fyy(iatm) = fyy(iatm) - fy ++ fzz(iatm) = fzz(iatm) - fz ++ ++ fxx(jatm) = fxx(jatm) + fx ++ fyy(jatm) = fyy(jatm) + fy ++ fzz(jatm) = fzz(jatm) + fz ++ ++c calculate stress tensor ++ ++ strs1 = strs1 - xdf(m)*fx ++ strs2 = strs2 - xdf(m)*fy ++ strs3 = strs3 - xdf(m)*fz ++ strs5 = strs5 - ydf(m)*fy ++ strs6 = strs6 - ydf(m)*fz ++ strs9 = strs9 - zdf(m)*fz ++ ++ endif ++ ++ enddo ++ ++c virial ++ ++ vircpe=vircpe-engcpe ++ ++c complete stress tensor ++ ++ stress(1) = stress(1) + strs1 ++ stress(2) = stress(2) + strs2 ++ stress(3) = stress(3) + strs3 ++ stress(4) = stress(4) + strs2 ++ stress(5) = stress(5) + strs5 ++ stress(6) = stress(6) + strs6 ++ stress(7) = stress(7) + strs3 ++ stress(8) = stress(8) + strs6 ++ stress(9) = stress(9) + strs9 ++ ++ endif ++ ++ return ++ end subroutine hkewald3 ++ ++ subroutine hkewald4(iatm,ik,engcpe,vircpe,engcpl,vircpl,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces in a ++c periodic system using the hautman-klein-ewald method ++c ++c modified to allow direct calculation of primary (short-range) ++c interactions for multiple-time step corrections ++ ++c primary neighbours are taken out of the Ewald sum ++c electrostatics are evaluated directly instead ++c ++c parallel replicated data version - real space terms ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith july 2000 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer iatm,ik,m,jatm ++ real(8) engcpe,vircpe,engcpl,vircpl,rcut,epsq ++ real(8) fi,fli,rcsq,strs1,strs2,strs3,strs5,strs6 ++ real(8) strs9,strl1,strl2,strl3,strl5,strl6,strl9,chgea,chgprd ++ real(8) rsq,rrr,coul,egamma,fx,fy,fz ++ ++ dimension fi(3),fli(3) ++ ++CDIR$ CACHE_ALIGN fi ++CDIR$ CACHE_ALIGN fli ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ ++c initialise stress tensor accumulators ++ ++ strs1 = 0.d0 ++ strs2 = 0.d0 ++ strs3 = 0.d0 ++ strs5 = 0.d0 ++ strs6 = 0.d0 ++ strs9 = 0.d0 ++ strl1 = 0.d0 ++ strl2 = 0.d0 ++ strl3 = 0.d0 ++ strl5 = 0.d0 ++ strl6 = 0.d0 ++ strl9 = 0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ chgea=chge(iatm)/epsq*r4pie0 ++ if(abs(chgea).gt.1.d-10)then ++ ++c temporary arrays for cache aligning ++ ++ fi(1) = fxx(iatm) ++ fi(2) = fyy(iatm) ++ fi(3) = fzz(iatm) ++ ++ fli(1) = flx(iatm) ++ fli(2) = fly(iatm) ++ fli(3) = flz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ chgprd=chgea*chge(jatm) ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++ if(rcsq.gt.rsq)then ++ ++c coulombic energy ++ ++ rrr = sqrt(rsq) ++ coul = chgprd/rrr ++ ++c sum contributions to the totals ++ ++ engcpe = engcpe + coul ++ engcpl = engcpl - coul ++ vircpe = vircpe - coul ++ vircpl = vircpl + coul ++ ++c calculate coulombic forces ++ ++ egamma = coul/rsq ++ ++ fx = egamma*xdf(m) ++ fy = egamma*ydf(m) ++ fz = egamma*zdf(m) ++ ++c add in contributions to instantaneous force ++ ++ fi(1) = fi(1) + fx ++ fi(2) = fi(2) + fy ++ fi(3) = fi(3) + fz ++ ++ fxx(jatm) = fxx(jatm) - fx ++ fyy(jatm) = fyy(jatm) - fy ++ fzz(jatm) = fzz(jatm) - fz ++ ++c add in contributions to the long-range force ++ ++ fli(1) = fli(1) - fx ++ fli(2) = fli(2) - fy ++ fli(3) = fli(3) - fz ++ ++ flx(jatm) = flx(jatm) + fx ++ fly(jatm) = fly(jatm) + fy ++ flz(jatm) = flz(jatm) + fz ++ ++c calculate long and short range stress tensors ++ ++ strs1 = strs1 + xdf(m)*fx ++ strl1 = strl1 - xdf(m)*fx ++ strs2 = strs2 + xdf(m)*fy ++ strl2 = strl2 - xdf(m)*fy ++ strs3 = strs3 + xdf(m)*fz ++ strl3 = strl3 - xdf(m)*fz ++ strs5 = strs5 + ydf(m)*fy ++ strl5 = strl5 - ydf(m)*fy ++ strs6 = strs6 + ydf(m)*fz ++ strl6 = strl6 - ydf(m)*fz ++ strs9 = strs9 + zdf(m)*fz ++ strl9 = strl9 - zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c copy back temporaries ++ ++ fxx(iatm) = fi(1) ++ fyy(iatm) = fi(2) ++ fzz(iatm) = fi(3) ++ ++ flx(iatm) = fli(1) ++ fly(iatm) = fli(2) ++ flz(iatm) = fli(3) ++ ++c complete stress tensor ++ ++ stresl(1) = stresl(1) + strl1 ++ stresl(2) = stresl(2) + strl2 ++ stresl(3) = stresl(3) + strl3 ++ stresl(4) = stresl(4) + strl2 ++ stresl(5) = stresl(5) + strl5 ++ stresl(6) = stresl(6) + strl6 ++ stresl(7) = stresl(7) + strl3 ++ stresl(8) = stresl(8) + strl6 ++ stresl(9) = stresl(9) + strl9 ++ ++ stress(1) = stress(1) + strs1 ++ stress(2) = stress(2) + strs2 ++ stress(3) = stress(3) + strs3 ++ stress(4) = stress(4) + strs2 ++ stress(5) = stress(5) + strs5 ++ stress(6) = stress(6) + strs6 ++ stress(7) = stress(7) + strs3 ++ stress(8) = stress(8) + strs6 ++ stress(9) = stress(9) + strs9 ++ ++ endif ++ ++ return ++ end subroutine hkewald4 ++ ++ function cerfr(alpha,rrr) ++ ++c*********************************************************************** ++c ++c dl_poly function for generating complementary error function ++c divided by r ++c ++c copyright - daresbury laboratory 2001 ++c author - w. smith february 2001 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer k ++ real(8) cerfr,sqrpi,h0,h1,alpha,rrr,rr2,fac ++ ++ sqrpi=1.7724538509055159d0 ++ ++c starting values ++ ++ h0=0.d0 ++ h1=(2.d0*alpha/sqrpi)*exp(-(alpha*rrr)**2) ++ ++c generate function by recursion ++ ++ rr2=rrr*rrr ++ do k=100,1,-1 ++ ++ fac=(2.d0*alpha**2)**(k-1) ++ h0=(h0*rr2+fac*h1)/dble(2*k-1) ++ ++ enddo ++ ++ cerfr=1.d0/rrr-h0 ++ ++ return ++ end function cerfr ++ ++ end module hkewald_module ++ +diff -urN dl_class_1.9.orig/srcmod/hyper_dynamics_module.f dl_class_1.9/srcmod/hyper_dynamics_module.f +--- dl_class_1.9.orig/srcmod/hyper_dynamics_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/hyper_dynamics_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,2821 @@ ++ module hyper_dynamics_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining hyperdynamics routines ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use forces_module ++ use nlist_builders_module ++ use optimiser_module ++ use property_module ++ use setup_module ++ use shake_module ++ use temp_scalers_module ++ use vv_motion_module ++ ++ implicit none ++ ++ integer, parameter :: mxtrn=10 ++ integer, parameter :: mxbsn=1000 ++ integer, parameter :: mxneb=8 ++ integer, parameter :: mxdiffs=300 ++ integer, parameter :: hyper_tag=35000 ++ ++ integer numbsn,numpro,numtrk,ndiff,maxtrk,numdark,home_bsn,numbpd ++ integer nbsa(mxbsn),nbsb(mxbsn),ktrn(mxtrn) ++ real(8) xtrn(mxtrn),ytrn(mxtrn) ++ real(8) tstop,tkeres,timhyp,timres,tboost,boost,vbase ++ ++ integer, allocatable :: idabsn(:),keymin(:) ++ real(8), allocatable :: xbas(:),ybas(:),zbas(:) ++ real(8), allocatable :: xchk(:),ychk(:),zchk(:) ++ real(8), allocatable :: xres(:),yres(:),zres(:) ++ real(8), allocatable :: vxrs(:),vyrs(:),vzrs(:) ++ real(8), allocatable :: fxrs(:),fyrs(:),fzrs(:) ++ real(8), allocatable :: xhyp(:),yhyp(:),zhyp(:) ++ real(8), allocatable :: vxhp(:),vyhp(:),vzhp(:) ++ real(8), allocatable :: fxhp(:),fyhp(:),fzhp(:) ++ real(8), allocatable :: xdiffs(:),ydiffs(:),zdiffs(:) ++ real(8), allocatable :: celneb(:,:),path(:),optk(:,:) ++ real(8), allocatable :: xneb(:),yneb(:),zneb(:),engneb(:) ++ real(8), allocatable :: fxneb(:),fyneb(:),fzneb(:) ++ real(8), allocatable :: hxneb(:),hyneb(:),hzneb(:) ++ real(8), allocatable :: taux(:),tauy(:),tauz(:) ++ real(8), allocatable :: track(:) ++ ++ integer bsn_1(maxneb),bsn_2(maxneb) ++ real(8) strhyp(9),strres(9),engbsn(2) ++ real(8) celbas(9),celhyp(9),celchk(9),celres(9) ++ ++ save numbsn,numtrk,numpro,ndiff,numdark,timres ++ save xbas,ybas,zbas,xchk,ychk,zchk,timhyp,vbase ++ save xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs ++ save xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp ++ save celbas,celhyp,celres,celchk,strhyp,strres ++ save idabsn,nbsa,nbsb,xdiffs,ydiffs,zdiffs,tkeres ++ save xneb,yneb,zneb,engneb,taux,tauy,tauz,keymin ++ save fxneb,fyneb,fzneb,hxneb,hyneb,hzneb,path ++ save optk,tstop,tboost,boost,numbpd ++ ++ contains ++ ++ subroutine alloc_hyper_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining hyperdynamics arrays and ++c initialising control variables ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ ++ integer i,fail,idnode,nebmax ++ dimension fail(nnn) ++ ++ nebmax=msatms*(mxneb+1) ++ ++c initialise control variables ++ ++ numbpd=0 ++ numtrk=0 ++ numbsn=0 ++ numpro=0 ++ ndiff=0 ++ numdark=0 ++ home_bsn=0 ++ tkeres=0.d0 ++ tstop=1.d30 ++ timhyp=0.d0 ++ timres=0.d0 ++ boost=1.d0 ++ tboost=0.d0 ++ vbase=-huge(1.d0) ++ do i=1,maxneb ++ bsn_1(i)=0 ++ bsn_2(i)=0 ++ enddo ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (xbas(msatms),ybas(msatms),zbas(msatms),stat=fail(1)) ++ allocate (xchk(msatms),ychk(msatms),zchk(msatms),stat=fail(2)) ++ allocate (xres(msatms),yres(msatms),zres(msatms),stat=fail(3)) ++ allocate (vxrs(msatms),vyrs(msatms),vzrs(msatms),stat=fail(4)) ++ allocate (fxrs(msatms),fyrs(msatms),fzrs(msatms),stat=fail(5)) ++ allocate (xhyp(msatms),yhyp(msatms),zhyp(msatms),stat=fail(6)) ++ allocate (vxhp(msatms),vyhp(msatms),vzhp(msatms),stat=fail(7)) ++ allocate (fxhp(msatms),fyhp(msatms),fzhp(msatms),stat=fail(8)) ++ allocate (xdiffs(mxdiffs),ydiffs(mxdiffs),zdiffs(mxdiffs), ++ x stat=fail(9)) ++ allocate (idabsn(mxdiffs),keymin(0:mxneb),stat=fail(10)) ++ allocate (xneb(nebmax),yneb(nebmax),zneb(nebmax),stat=fail(11)) ++ allocate (fxneb(nebmax),fyneb(nebmax),fzneb(nebmax),stat=fail(12)) ++ allocate (taux(msatms),tauy(msatms),tauz(msatms),stat=fail(13)) ++ allocate (engneb(0:mxneb),celneb(9,0:mxneb),path(0:mxneb), ++ x stat=fail(14)) ++ allocate (hxneb(nebmax),hyneb(nebmax),hzneb(nebmax),stat=fail(15)) ++ allocate (optk(5,0:mxneb),stat=fail(16)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)then ++ if(idnode.eq.0)write(nrite,'(10i5)')fail ++ call error(idnode,1115) ++ endif ++ enddo ++ ++ end subroutine alloc_hyper_arrays ++ ++ subroutine hyper_start ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, ++ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, ++ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for starting a hyperdynamics simulation ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,savflg ++ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt ++ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond ++ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,i,j ++ integer ntpvdw,ntshl,ntteth,numblock,iatm0,iatm1,ntcons ++ integer ktol,pass,fail,ntrack ++ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,engcfg ++ real(8) virlrc,cvgerr,dum,otol,cgerr,sigma,hyp_units ++ ++c allocate track array for BPD ++ ++ if(lbpd)then ++ allocate (track(0:nblock/ntrack),stat=fail) ++ endif ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c current block number ++ ++ numblock=nstep/nblock ++ ++c open hyperdynamics journal file ++ ++ if(idnode.eq.0) ++ x open(nevnt,file="EVENTS",form='formatted',position='append') ++ ++c set up hyperdynamics for simulation start ++ ++ if(nstep.eq.0)then ++ ++c initialise bias potential boost factor ++ ++ numbpd=0 ++ boost=1.d0 ++ tboost=0.d0 ++ ++c set basin difference markers ++ ++ do i=1,mxbsn ++ ++ nbsa(i)=0 ++ nbsb(i)=0 ++ ++ enddo ++ ++c store the starting configuration ++ ++ savflg=.true. ++ tkeres=sigma ++ call store_config(savflg,idnode,mxnode,natms,strres,celres, ++ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) ++ ++c minimise starting structure ++ ++ call define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,engcfg,cvgerr) ++ ++c define zero energy for BPD dynamics mode ++ ++ vbase=engcfg ++ ++c write events entry for minimisation ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x engcfg/hyp_units,cvgerr/hyp_units ++ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x engcfg/hyp_units,cvgerr/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++c save minimised starting structure as basin file ++ ++ call write_reference_config ++ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode,engcfg) ++ ++c save details of starting home basin ++ ++ engbsn(1)=engcfg ++ ++ do i=1,9 ++ celbas(i)=cell(i) ++ enddo ++ ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ enddo ++ ++c restore the starting configuration ++ ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strres,celres, ++ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) ++ ++ else ++ ++c restore previous data from hyperdynamics backup file ++ ++ call hyper_open(ltad,idnode,mxnode,natms,nsteql) ++ ++c reset home basin for hyperdynamics (home basin is 0 for TAD) ++ ++ if(lbpd)home_bsn=numbsn-1 ++ ++c store the current configuration ++ ++ savflg=.true. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++c read minimised starting structure from home basin file ++ ++ call read_reference_config ++ x ('CFGBSN','BASINS',nbsn,home_bsn,natms,imcon,idnode,engcfg) ++ ++c save details of current home basin ++ ++ engbsn(1)=engcfg ++ ++ do i=1,9 ++ celbas(i)=cell(i) ++ enddo ++ ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ enddo ++ ++c restore the current configuration ++ ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++ endif ++ ++ return ++ end subroutine hyper_start ++ ++ subroutine hyper_driver ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, ++ x tolnce,hyp_units,ebias,vmin) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for implementing a hyperdynamics simulation ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 seek ++ logical lbpd,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb ++ logical lrefmin,same,savflg,recycle,scan,prechk,tadall,nebgo ++ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol,ntrack ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt ++ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond ++ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw ++ integer ntshl,ntteth,blkout,numblock,bsn1,bsn2,itrack ++ integer nturn,ntcons,mdiff,newbsn,iatm0,iatm1,pass,i,j,itrk ++ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,catchrad ++ real(8) cvgerr,estar,engcfg,cfgtmp,engcpe,engsrp,catch ++ real(8) vircpe,engmet,virmet,virlrc,engtbp,virtbp,dum ++ real(8) engfbp,virfbp,engter,virter,engbnd,virbnd,engang ++ real(8) virang,engdih,virdih,enginv,virinv,engtet,virtet ++ real(8) engshl,shlke,virshl,engfld,virfld,virsrp,sprneb ++ real(8) deltad,deltal,tlow,timhop,timlow,engtke,tolnce,hyp_units ++ real(8) ebias,vmin ++ ++ data bsn1,bsn2/0,0/ ++ ++c control variables ++ ++ lneb=.false. ++ numblock=nstep/nblock ++ maxtrk=nblock/ntrack ++ if(numdark.eq.0)numdark=nsteql ++ lrefmin=(mod(nstep,nblock).eq.0) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c BPD/TAD simulation time ++ ++ timhyp=timhyp+tstep ++ ++c track the tboost value ++ ++ if(mod(nstep,ntrack).eq.0)track(mod(numtrk,maxtrk))=tboost ++ ++c provisional check for transition - compare current config with ++c the reference state (not in dark period) ++ ++ same=.true. ++ scan=.false. ++ if(prechk.and.(mod(nstep,ntrack).eq.0).and. ++ x (lbpd.or.(ltad.and.(nstep.gt.numdark))))then ++ ++ catch=0.65d0*catchrad ++ call check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catch) ++ ++ if(.not.same.and.idnode.eq.0)then ++ ++ write(nevnt,'("PRE",i10)')nstep ++ write(nrite,'(1x,"PRE",i10)')nstep ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ endif ++ ++ if(.not.same.or.lrefmin)then ++ ++c store the current configuration ++ ++ savflg=.true. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++c minimise current structure ++ ++ call define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) ++ ++c write events entry for minimisation ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x cfgtmp/hyp_units,cvgerr/hyp_units ++ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x cfgtmp/hyp_units,cvgerr/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++c confirm any transition ++ ++ if(ltad)scan=.true. ++ call check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catchrad) ++ ++c transition detected - proceed with transition analysis ++ ++ if(.not.same)then ++ ++c store new basin energy ++ ++ engbsn(2)=cfgtmp ++ ++c save new minimised state (bias potential dynamics only) ++ ++ if(lbpd)then ++ ++ do i=1,9 ++ celres(i)=cell(i) ++ enddo ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xres(j)=xxx(i) ++ yres(j)=yyy(i) ++ zres(j)=zzz(i) ++ ++ enddo ++ ++ endif ++ ++c record transition (for TAD only if outside blackout period) ++ ++ if(lbpd.or.nstep.gt.numdark)then ++ ++c check if transition results in unique new basin (TAD only) ++ ++ if(ltad)call check_basins(newbsn,mdiff,mxnode) ++ ++c analysis of new basin ++ ++ if(lbpd.or.tadall.or.newbsn.eq.numbsn)then ++ ++c set difference counters and pointers (TAD only) ++ ++ if(ltad)then ++ ++ if(numbsn.gt.mxbsn)call error(idnode,2330) ++ ++ ndiff=mdiff ++ ++ if(numbsn.gt.1)then ++ nbsa(numbsn)=nbsb(numbsn-1)+1 ++ else ++ nbsa(numbsn)=1 ++ endif ++ ++ nbsb(numbsn)=mdiff ++ ++ endif ++ ++c save the basin file and store basin energy ++ ++ call write_reference_config ++ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode, ++ x cfgtmp) ++ ++c determine minimum (reaction) path and activation energy ++ ++ if(nebgo)call neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn1, ++ x bsn2,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,cfgtmp,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++c analyse the transition - determine e-star and destination state ++ ++ if(nebgo)call transition_properties ++ x (seek,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,nturn,numbsn,alpha,delr,dlrpot, ++ x drewd,elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr,estar, ++ x catchrad,hyp_units) ++ ++c estimate time of transition from past trajectory ++ ++ call transition_time ++ x (seek,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl, ++ x ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp, ++ x ntpter,ntrack,ntpvdw,ntshl,ntteth,ntcons,itrk, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,cfgtmp,cvgerr,catchrad,timhop,hyp_units) ++ ++c update TAD control variables ++ ++ if(ltad)then ++ ++c update blackout period ++ ++ numdark=nblock*((nstep+blkout)/nblock+1) ++ ++c calculate stopping time ++ ++ timlow=timhop*exp(-(estar/temp-estar/tlow)/boltz) ++ tstop=min(tstop,deltad*(timlow/deltad)**(tlow/temp)) ++ ++c write transition data for TAD only ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("TRA",i10,3i6,1p,4e14.5)') ++ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, ++ x timhop,timlow,tstop ++ write(nevnt,'("BLK",2i10)')nstep,numdark ++ write(nrite,'(1x,"TRA",i10,3i6,1p,4e14.5)') ++ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, ++ x timhop,timlow,tstop ++ write(nrite,'(1x,"BLK",2i10)')nstep,numdark ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ elseif(nebgo.and.idnode.eq.0)then ++ ++c write transition data for bias potential dynamics with NEB ++ ++ write(nevnt,'("TRA",i10,3i6,1p,3e14.5)') ++ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, ++ x timhop,timhop*tboost ++ write(nrite,'(1x,"TRA",i10,3i6,1p,3e14.5)') ++ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, ++ x timhop,timhop*tboost ++ write(nrite,"(1x,120('-'))") ++ ++ numbpd=0 ++ tboost=0.0 ++ ++ elseif(idnode.eq.0)then ++ ++c write transition data for bias potential dynamics without NEB ++ ++ write(nevnt,'("TRA",i10,2i6,1p,3e14.5)') ++ x nstep,home_bsn,numbsn-1,ebias/hyp_units, ++ x timhop,timhop*tboost ++ write(nrite,'(1x,"TRA",i10,2i6,1p,3e14.5)') ++ x nstep,home_bsn,numbsn-1,ebias/hyp_units, ++ x timhop,timhop*tboost ++ write(nrite,"(1x,120('-'))") ++ ++ numbpd=0 ++ tboost=0.0 ++ ++ endif ++ ++ else ++ ++c update blackout period when transition not unique (TAD only) ++ ++ numdark=nblock*((nstep+blkout)/nblock+1) ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("TRR",i10,3i6)')nstep,home_bsn,newbsn ++ write(nevnt,'("BLK",2i10)')nstep,numdark ++ write(nrite,'(1x,"TRR",i10,3i6)')nstep,home_bsn,newbsn ++ write(nrite,'(1x,"BLK",2i10)')nstep,numdark ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ endif ++ ++c actions when new basin has been visited before (TAD only) ++ ++ elseif(ltad)then ++ ++c ignore dark transition and extend blackout period (TAD only) ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("TRI",i10)')nstep ++ write(nrite,'(1x,"TRI",i10)')nstep ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ if(nstep.le.nsteql)then ++ ++ nsteql=nsteql+blkout ++ numdark=nsteql+blkout ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("EQL",2i10)')nstep,nsteql ++ write(nrite,'(1x,"EQL",2i10)')nstep,nsteql ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ else ++ ++ numdark=nblock*((nstep+blkout)/nblock+1) ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("BLK",3i10)')nstep,numdark ++ write(nrite,'(1x,"BLK",3i10)')nstep,numdark ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ if(ltad)then ++ ++c return to the block starting state after transition (TAD only) ++ ++ timhyp=timres ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strres,celres, ++ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) ++ ++c scramble the velocities (and conserve system energy) ++ ++ call regauss(idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, ++ x ntshl,keyshl,tkeres,temp,tolnce) ++ ++ elseif(lbpd)then ++ ++c reset reference state to new basin (bias potential dynamics only) ++ ++ home_bsn=home_bsn+1 ++ engbsn(1)=engbsn(2) ++ ++ do i=1,9 ++ celbas(i)=celres(i) ++ enddo ++ ++ call invert(celbas,rcell,dum) ++ ++ do i=1,iatm1-iatm0+1 ++ ++ xbas(i)=rcell(1)*xres(i)+rcell(4)*yres(i)+rcell(7)*zres(i) ++ ybas(i)=rcell(2)*xres(i)+rcell(5)*yres(i)+rcell(8)*zres(i) ++ zbas(i)=rcell(3)*xres(i)+rcell(6)*yres(i)+rcell(9)*zres(i) ++ ++ enddo ++ ++c restore current hyperdynamics configuration ++ ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++c reset boost factor ++ ++ numbpd=0 ++ tboost=0.d0 ++ ++ endif ++ ++c no transition detected so restore current trajectory ++ ++ else ++ ++c restore the current configuration ++ ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++c save the block configuration as reset state (TAD only) ++ ++ if(ltad.and.lrefmin)then ++ ++ savflg=.true. ++ tkeres=engtke ++ timres=timhyp ++ call store_config(savflg,idnode,mxnode,natms,strres,celres, ++ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c close down if TAD stopping time reached ++ ++ if(ltad.and.tstop.lt.timhyp)recycle=.false. ++ ++c write a tracking file ++ ++ if(mod(nstep,ntrack).eq.0)then ++ ++ itrack=mod(numtrk,maxtrk) ++ call write_reference_config ++ x ('CFGTRK','TRACKS',ntrk,itrack,natms,imcon,idnode,engcfg) ++ ++ numtrk=numtrk+1 ++ ++ endif ++ ++ return ++ end subroutine hyper_driver ++ ++ subroutine define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,engcfg,cvgerr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling subroutine calls for a ++c structural minimisation to define a minimum state for ++c hyperdynamics simulations ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lfcap,nogofr,lneut,lnsq,loglnk,stropt,lzeql ++ logical newlst,ltad,lsolva,lfree,lexcite ++ ++ integer idnode,imcon,keyfce,keyfld,keyshl,keytol ++ integer keystr,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp ++ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql ++ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet ++ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf ++ integer nblock,pass,mxpass,mstep,ntcons,nsolva,isolva ++ ++ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd ++ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp ++ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp ++ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp ++ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp ++ real(8) virtbp,virter,virtet,volm,engmet,cfgold,cvgerr ++ real(8) hnorm,grad0,grad1,ff1,sgn,engord,virord ++ ++ data mxpass/1000/ ++ ++c control variables ++ ++ pass=0 ++ keystr=0 ++ numrdf=0 ++ ltad=.true. ++ engcfg=1.d30 ++ stropt=.false. ++ nogofr=.false. ++ ++c dummy variables ++ ++ lsolva=.false. ++ lfree=.false. ++ lexcite=.false. ++ nsolva=0 ++ isolva=1 ++ engord=0.d0 ++ virord=0.d0 ++ ++c relax the current structure ++ ++ do while(.not.stropt.and.pass.lt.mxpass) ++ ++ pass=pass+1 ++ cfgold=engcfg ++ mstep=nstep+pass ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces ++ ++ call force_manager ++ x (newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lexcite,idnode,mxnode,natms,imcon,mstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c structure optimisation ++ ++ call strucopt ++ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++ cvgerr=abs(engcfg-cfgold) ++ ++ enddo ++ ++ return ++ end subroutine define_minimum_state ++ ++ subroutine write_reference_config ++ x (fnam,direct,nfil,nnn,natms,imcon,idnode,engcfg) ++ ++c*********************************************************************** ++c ++c dlpoly utility to write a minimum structure file in CONFIG ++c format ++c ++c copyright daresbury laboratory ++c author w.smith june 2006 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ character*6 fnam ++ character*4 tail ++ character*6 direct ++ integer nfil,nnn,i,natms,imcon,idnode,levcfg ++ real(8) engcfg ++ ++ levcfg=0 ++ ++c node zero handles i/o ++ ++ if(idnode.eq.0)then ++ ++c write configuration data to new configuration file ++ ++ write(tail,'(i4.4)')nnn ++ open(nfil,file=direct//'/'//fnam//tail,form='formatted') ++ ++ write(nfil,'(a10)')fnam//tail ++ write(nfil,'(3i10,g20.12)') levcfg,imcon,natms,engcfg ++ ++ if(imcon.gt.0) write(nfil,'(3f20.12)') cell ++ ++ do i=1,natms ++ ++ write(nfil,'(a8,i10)') atmnam(i),i ++ write(nfil,'(3g20.10)') xxx(i),yyy(i),zzz(i) ++ ++ enddo ++ ++ close (nfil) ++ ++ endif ++ ++ nnn=nnn+1 ++ ++ return ++ end subroutine write_reference_config ++ ++ subroutine read_reference_config ++ x (fnam,direct,nfil,nnn,natms,imcon,idnode,engcfg) ++ ++c*********************************************************************** ++c ++c dlpoly utility to read a reference structure file in CONFIG ++c format ++c ++c copyright daresbury laboratory ++c author w.smith february 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ character*6 fnam ++ character*4 tail ++ character*6 direct ++ integer nfil,nnn,i,natms,imcon,idnode,levcfg ++ real(8) engcfg ++ ++c node zero handles i/o ++ ++ if(idnode.eq.0)then ++ ++c read configuration data from configuration file on proc 0 ++ ++ write(tail,'(i4.4)')nnn ++ open(nfil,file=direct//'/'//fnam//tail,form='formatted') ++ ++ read(nfil,*) ++ read(nfil,'(3i10,g20.12)')levcfg,imcon,natms,engcfg ++ buffer(1)=dble(levcfg) ++ buffer(2)=dble(imcon) ++ buffer(3)=dble(natms) ++ buffer(4)=engcfg ++ if(imcon.gt.0) read(nfil,'(3f20.12)') cell ++ do i=1,9 ++ buffer(i+4)=cell(i) ++ enddo ++ call gdsum(buffer(1),13,buffer(14)) ++ ++ do i=1,natms ++ ++ read(nfil,'(a8)') atmnam(i) ++ read(nfil,'(3g20.10)') xxx(i),yyy(i),zzz(i) ++ ++ enddo ++ ++ close (nfil) ++ ++ else ++ ++c gather data from configuration file on procs > 0 ++ ++ do i=1,13 ++ buffer(i)=0.d0 ++ enddo ++ call gdsum(buffer(1),13,buffer(14)) ++ ++ levcfg=nint(buffer(1)) ++ imcon=nint(buffer(2)) ++ natms=nint(buffer(3)) ++ engcfg=buffer(4) ++ do i=1,9 ++ cell(i)=buffer(i+4) ++ enddo ++ do i=1,natms ++ xxx(i)=0.d0 ++ yyy(i)=0.d0 ++ zzz(i)=0.d0 ++ enddo ++ ++ endif ++ ++c global gather of atomic coordinates ++ ++ call gdsum(xxx,natms,buffer) ++ call gdsum(yyy,natms,buffer) ++ call gdsum(zzz,natms,buffer) ++ ++ return ++ end subroutine read_reference_config ++ ++ subroutine store_config(lsave,idnode,mxnode,natms,strold,celold, ++ x xold,yold,zold,vxold,vyold,vzold,fxold,fyold,fzold) ++ ++c*********************************************************************** ++c ++c dlpoly hyperdynamics routine for storing the current ++c configuration ++c ++c copyright daresbury laboratory ++c author w.smith sep 2006 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical lsave ++ integer idnode,mxnode,natms,iatm0,iatm1,i,j ++ ++ real(8) strold(9),celold(9) ++ real(8) xold(msatms),yold(msatms),zold(msatms) ++ real(8) vxold(msatms),vyold(msatms),vzold(msatms) ++ real(8) fxold(msatms),fyold(msatms),fzold(msatms) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ if(lsave)then ++ ++c save cell and stress tensors ++ ++ do i=1,9 ++ ++ celold(i)=cell(i) ++ strold(i)=stress(i) ++ ++ enddo ++ ++c save configuration ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xold(j)=xxx(i) ++ yold(j)=yyy(i) ++ zold(j)=zzz(i) ++ vxold(j)=vxx(i) ++ vyold(j)=vyy(i) ++ vzold(j)=vzz(i) ++ fxold(j)=fxx(i) ++ fyold(j)=fyy(i) ++ fzold(j)=fzz(i) ++ ++ enddo ++ ++ else ++ ++c restore cell and stress tensors ++ ++ do i=1,9 ++ ++ cell(i)=celold(i) ++ stress(i)=strold(i) ++ ++ enddo ++ ++c restore configuration ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxx(i)=xold(j) ++ yyy(i)=yold(j) ++ zzz(i)=zold(j) ++ vxx(i)=vxold(j) ++ vyy(i)=vyold(j) ++ vzz(i)=vzold(j) ++ fxx(i)=fxold(j) ++ fyy(i)=fyold(j) ++ fzz(i)=fzold(j) ++ ++ enddo ++ ++c replication of full configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine store_config ++ ++ subroutine check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catchrad) ++ ++c*********************************************************************** ++c ++c dlpoly hyperdynamics routine for checking when a transition ++c has occured in a configuration ++c ++c copyright daresbury laboratory ++c author w.smith sep 2006 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ character*8 seek ++ logical same,safe,scan,all ++ integer idnode,mxnode,natms,imcon,nblock,mdiff ++ integer iatm0,iatm1,i,j ++ real(8) catchrad,catch2,rr2,dum,sxx,syy,szz,txx,tyy,tzz,pp2 ++ ++ all=(seek.eq.'all ') ++ ++c flag for comparing structures ++ ++ same=.true. ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise search parameters ++ ++ catch2=catchrad**2 ++ ++c construct coordinate check arrays ++ ++ do i=1,9 ++ celchk(i)=cell(i) ++ enddo ++ ++c store structure in reduced coordinates (target atoms only) ++ ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ if(all.or.atmnam(i).eq.seek)then ++ ++ xchk(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ychk(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zchk(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ endif ++ ++ enddo ++ ++c compare current structure with reference basin ++ ++ j=0 ++ pp2=0.d0 ++ safe=.true. ++ mdiff=ndiff ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ if(all.or.atmnam(i).eq.seek)then ++ ++c calculate separations in reduced units ++ ++ sxx=xchk(j)-xbas(j) ++ syy=ychk(j)-ybas(j) ++ szz=zchk(j)-zbas(j) ++ ++c calculate minimum image separations ++ ++ sxx=sxx-nint(sxx) ++ syy=syy-nint(syy) ++ szz=szz-nint(szz) ++ ++c set trial structure at minimum displacements from reference ++ ++ xchk(j)=xbas(j)+sxx ++ ychk(j)=ybas(j)+syy ++ zchk(j)=zbas(j)+szz ++ ++c calculate atomic separations in real coordinates ++ ++ txx=(celchk(1)*xchk(j)+celchk(4)*ychk(j)+celchk(7)*zchk(j)) ++ x -(celbas(1)*xbas(j)+celbas(4)*ybas(j)+celbas(7)*zbas(j)) ++ tyy=(celchk(2)*xchk(j)+celchk(5)*ychk(j)+celchk(8)*zchk(j)) ++ x -(celbas(2)*xbas(j)+celbas(5)*ybas(j)+celbas(8)*zbas(j)) ++ tzz=(celchk(3)*xchk(j)+celchk(6)*ychk(j)+celchk(9)*zchk(j)) ++ x -(celbas(3)*xbas(j)+celbas(6)*ybas(j)+celbas(9)*zbas(j)) ++ ++c calculate total structural difference ++ ++ rr2=txx**2+tyy**2+tzz**2 ++ pp2=max(pp2,rr2) ++ ++c identify and store the displaced atoms ++ ++ if(scan.and.rr2.ge.catch2)then ++ ++ mdiff=mdiff+1 ++ ++ if(mdiff.le.mxdiffs)then ++ ++ idabsn(mdiff)=i ++ xdiffs(mdiff)=txx ++ ydiffs(mdiff)=tyy ++ zdiffs(mdiff)=tzz ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c global check on diffs arrays ++ ++ if(scan)then ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'number of current diffs',i10)")mdiff ++ call error(idnode,2340) ++ ++ endif ++ ++ endif ++ ++c global transition check ++ ++ same=(pp2.lt.catch2) ++ if(mxnode.gt.1)call gstate(same) ++ ++ return ++ end subroutine check_for_transition ++ ++ subroutine check_basins(newbsn,mdiff,mxnode) ++ ++c*********************************************************************** ++c ++c dlpoly hyperdynamics routine for checking that a new basin is not ++c one already known ++c ++c copyright daresbury laboratory ++c author w.smith jan 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical same ++ integer newbsn,ia,ib,ic,id,ibsn,i,j,k,mxnode,mdiff ++ ++ ibsn=1 ++ newbsn=0 ++ ib=mdiff ++ ia=ndiff+1 ++ same=.false. ++ do while(.not.same.and.ibsn.lt.numbsn) ++ ++ ic=nbsa(ibsn) ++ id=nbsb(ibsn) ++ ++ if(ib-ia.eq.id-ic)then ++ ++ same=.true. ++ ++ do k=0,ib-ia ++ ++ i=ia+k ++ j=ic+k ++ ++ if(.not.((idabsn(i).eq.idabsn(j)).and. ++ x (abs(xdiffs(i)-xdiffs(j)).lt.0.1d0).and. ++ x (abs(ydiffs(i)-ydiffs(j)).lt.0.1d0).and. ++ x (abs(zdiffs(i)-zdiffs(j)).lt.0.1d0)))same=.false. ++ ++ enddo ++ ++ endif ++ ++c check if same on all processors ++ ++ if(mxnode.gt.1)call gstate(same) ++ if(same)newbsn=ibsn ++ ++ ibsn=ibsn+1 ++ ++ enddo ++ ++c if not same - must be new basin! ++ ++ if(.not.same)newbsn=numbsn ++ ++ return ++ end subroutine check_basins ++ ++ subroutine neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn1, ++ x bsn2,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling a nudged elastic band ++c calculation ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lneb,newlst,lneut,lnsq,stropt ++ logical lzeql,loglnk,lfcap ++ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,mstep ++ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw ++ integer ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl ++ integer keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nscons ++ integer ngrp,keytol,ntfree,iatm0,iatm1,iatm2,ntcons ++ integer i,j,k,n,pass,mxpass,nkinks,bsn1,bsn2,itrk ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet ++ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp ++ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtet,virtet,engshl ++ real(8) shlke,virshl,engfld,virfld,engcfg,fmax,temp,tstep ++ real(8) sprneb,opttol,hyp_units,fac,xxn,yyn,zzn,tol,cvg,dum ++ ++ data mxpass/100/ ++ ++c control variables ++ ++ stropt=.false. ++ do n=0,mxneb ++ ++ keymin(n)=0 ++ do i=1,5 ++ optk(i,n)=0.d0 ++ enddo ++ ++ enddo ++ if(lneb)numpro=-(100*bsn1+bsn2) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++c read in the required start and end point configurations ++ ++ if(lneb)then ++ ++c read data for first reference structure ++ ++ call read_reference_config ++ x ('CFGBSN','BASINS',nbsn,bsn1,natms,imcon,idnode,engcfg) ++ ++ engbsn(1)=engcfg ++ ++ do i=1,9 ++ celbas(i)=cell(i) ++ enddo ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ enddo ++ ++c read data for second reference structure ++ ++ call read_reference_config ++ x ('CFGBSN','BASINS',nbsn,bsn2,natms,imcon,idnode,engcfg) ++ ++ engbsn(2)=engcfg ++ ++ do i=1,9 ++ celchk(i)=cell(i) ++ enddo ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xchk(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ychk(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zchk(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ enddo ++ ++ endif ++ ++c construct initial `bead' configurations in chain ++ ++ k=0 ++ do n=0,mxneb ++ ++ j=0 ++ fac=dble(n)/dble(mxneb) ++ ++c construct linear mix of cell vectors ++ ++ do i=1,9 ++ celneb(i,n)=(1.d0-fac)*celbas(i)+fac*celchk(i) ++ enddo ++ ++c construct beads by linear interpolation ++ ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ k=k+1 ++ ++ xxn=xbas(j)+fac*((xchk(j)-xbas(j))-nint(xchk(j)-xbas(j))) ++ yyn=ybas(j)+fac*((ychk(j)-ybas(j))-nint(ychk(j)-ybas(j))) ++ zzn=zbas(j)+fac*((zchk(j)-zbas(j))-nint(zchk(j)-zbas(j))) ++ xneb(k)=celneb(1,n)*xxn+celneb(4,n)*yyn+celneb(7,n)*zzn ++ yneb(k)=celneb(2,n)*xxn+celneb(5,n)*yyn+celneb(8,n)*zzn ++ zneb(k)=celneb(3,n)*xxn+celneb(6,n)*yyn+celneb(9,n)*zzn ++ ++ enddo ++ ++ enddo ++ ++c start of NEB optimisation ++ ++ pass=0 ++ safe=.false. ++ do while(.not.safe.and.pass.lt.mxpass) ++ ++ pass=pass+1 ++ safe=.true. ++ mstep=nstep+pass ++ ++c calculate system forces on all beads ++ ++ call neb_system_forces ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,mxnode, ++ x natms,mstep,imcon,nstbgr,nsteql,keyfce,kmax1,kmax2, ++ x kmax3,nhko,nlatt,ntpvdw,ntpmet,nospl,multt,nneut,ntptbp, ++ x ntpfbp,ntpter,keyshl,keyfld,ntbond,ntangl,ntdihd,ntinv, ++ x ntteth,ntshl,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep) ++ ++c calculate spring forces on all beads ++ ++ call neb_spring_forces(idnode,mxnode,natms,nkinks,sprneb) ++ ++c energy minimisation of each bead ++ ++ do n=0,mxneb ++ ++c construct cell vectors for nth bead ++ ++ do i=1,9 ++ cell(i)=celneb(i,n) ++ enddo ++ ++c construct coordinate and force arrays for nth bead ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ xxx(i)=xneb(k) ++ yyy(i)=yneb(k) ++ zzz(i)=zneb(k) ++ fxx(i)=fxneb(k) ++ fyy(i)=fyneb(k) ++ fzz(i)=fzneb(k) ++ ++ enddo ++ ++c restore search direction vector if keymin > 0 ++ ++ if(keymin(n).gt.0)then ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ hhx(i)=hxneb(k) ++ hhy(i)=hyneb(k) ++ hhz(i)=hzneb(k) ++ ++ enddo ++ ++ endif ++ ++c form complete global arrays ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ if(keymin(n).gt.0) ++ x call merge(idnode,mxnode,natms,mxbuff,hhx,hhy,hhz,buffer) ++ ++ endif ++ ++c structure optimisation ++ ++ call strucopt ++ x (stropt,keymin(n),keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,10.d0*opttol,engneb(n),optk(1,n), ++ x optk(2,n),optk(3,n),optk(4,n),optk(5,n)) ++ safe=safe.and.stropt ++ stropt=.false. ++ ++c update coordinate arrays for nth bead ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ xneb(k)=xxx(i) ++ yneb(k)=yyy(i) ++ zneb(k)=zzz(i) ++ hxneb(k)=hhx(i) ++ hyneb(k)=hhy(i) ++ hzneb(k)=hhz(i) ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c convergence check ++ ++c$$$ if(.not.safe)then ++c$$$ ++c$$$ call error(idnode,2320) ++c$$$ ++c$$$ else ++ ++c save neb profile ++ ++ call write_profile(idnode,mxnode,natms,hyp_units) ++ ++c write neb summary ++ ++ if(idnode.eq.0)then ++ ++ if(lneb)then ++ ++ write(nrite,'(/,1x,"summary of NEB calculation",/)') ++ write(nrite,'(1x,"path and energy for state",i4, ++ x " ---> state",i4," transition")')bsn1,bsn2 ++ write(nrite,'(1x,"convergence status :",l4)')safe ++ write(nrite,'(1x,"obtained after ",i4," iterations",/)')pass ++ ++ do n=0,mxneb ++ write(nrite,'(6x,1p,2e14.6)')path(n),engneb(n)/hyp_units ++ enddo ++ ++ else ++ ++ write(nevnt,'("NEB",i10,3i6,1p,2e14.5)') ++ x nstep,pass,mxpass,mxneb+1,engbsn(1)/hyp_units, ++ x engbsn(2)/hyp_units ++ write(nrite,'(1x,"NEB",i10,3i6,1p,2e14.5)') ++ x nstep,pass,mxpass,mxneb+1,engbsn(1)/hyp_units, ++ x engbsn(2)/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ endif ++ ++c$$$ endif ++ ++c end of NEB optimisation ++ ++ return ++ end subroutine neb_driver ++ ++ subroutine neb_system_forces ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,mxnode, ++ x natms,mstep,imcon,nstbgr,nsteql,keyfce,kmax1,kmax2, ++ x kmax3,nhko,nlatt,ntpvdw,ntpmet,nospl,multt,nneut,ntptbp, ++ x ntpfbp,ntpter,keyshl,keyfld,ntbond,ntangl,ntdihd,ntinv, ++ x ntteth,ntshl,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating system forces in a nudged ++c elastic band calculation ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,ltad ++ logical lsolva,lfree,lexcite ++ integer idnode,mxnode,natms,imcon,nstbgr,nsteql,mstep ++ integer numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw ++ integer ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl ++ integer keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl ++ integer iatm0,iatm1,iatm2,i,k,n,nsolva,isolva ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet ++ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp ++ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtet,virtet,engshl ++ real(8) shlke,virshl,engfld,virfld,engcfg,fmax,temp,tstep ++ real(8) engord,virord ++ ++ numrdf=0 ++ ltad=.true. ++ nogofr=.false. ++ ++c dummy variables ++ ++ lsolva=.false. ++ lfree=.false. ++ lexcite=.false. ++ nsolva=0 ++ isolva=1 ++ engord=0.d0 ++ virord=0.d0 ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++c calculate system forces for all beads ++ ++ do n=0,mxneb ++ ++c construct cell vectors for one bead ++ ++ do i=1,9 ++ cell(i)=celneb(i,n) ++ enddo ++ ++c construct coordinate array for one bead ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ xxx(i)=xneb(k) ++ yyy(i)=yneb(k) ++ zzz(i)=zneb(k) ++ ++ enddo ++ ++c form complete global arrays ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces for one bead ++ ++ call force_manager ++ x (newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lexcite,idnode,mxnode,natms,imcon,mstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c store configuration energy of bead ++ ++ engneb(n)=engcfg ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c allocate forces to bead atoms ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ fxneb(k)=fxx(i) ++ fyneb(k)=fyy(i) ++ fzneb(k)=fzz(i) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine neb_system_forces ++ ++ subroutine neb_spring_forces(idnode,mxnode,natms,nkinks,sprneb) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating spring forces in a nudged ++c elastic band calculation ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,j,k,n,kp,km,idnode,mxnode,natms,iatm0,iatm1,iatm2 ++ integer nkinks ++ real(8) rp2,rm2,tau2,fpar,vv0,vp1,vm1,aaa,bbb,txx,tyy,tzz ++ real(8) uxx,uyy,uzz,wxx,wyy,wzz,sxx,syy,szz,rxx,ryy,rzz ++ real(8) sprneb,fac,kink,det ++ real(8) rcella(9),rcellb(9),rcellc(9),cella(9),cellb(9),cellc(9) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++c energies of first and last basins ++ ++ engneb(0)=engbsn(1) ++ engneb(mxneb)=engbsn(2) ++ ++c calculate spring tangents for all beads ++ ++ nkinks=0 ++ do n=1,mxneb-1 ++ ++ rp2=0.d0 ++ rm2=0.d0 ++ tau2=0.d0 ++ fpar=0.d0 ++ kink=0.d0 ++ vv0=engneb(n) ++ vp1=engneb(n+1) ++ vm1=engneb(n-1) ++ ++c calculate tangent vector and scalar product with system force ++ ++ if(vp1.gt.vv0.and.vv0.gt.vm1)then ++ ++ aaa=1.d0 ++ bbb=0.d0 ++ ++ else if(vp1.lt.vv0.and.vv0.lt.vm1)then ++ ++ aaa=0.d0 ++ bbb=1.d0 ++ ++ else if(vp1.gt.vm1)then ++ ++ aaa=max(abs(vp1-vv0),abs(vv0-vm1)) ++ bbb=min(abs(vp1-vv0),abs(vv0-vm1)) ++ ++ else ++ ++ aaa=min(abs(vp1-vv0),abs(vv0-vm1)) ++ bbb=max(abs(vp1-vv0),abs(vv0-vm1)) ++ ++ endif ++ ++c invert cell matrices ++ ++ do i=1,9 ++ cella(i)=celneb(i,n-1) ++ cellb(i)=celneb(i,n) ++ cellc(i)=celneb(i,n+1) ++ enddo ++ call invert(cella,rcella,det) ++ call invert(cellb,rcellb,det) ++ call invert(cellc,rcellc,det) ++ ++ j=0 ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ k=k+1 ++ km=k-iatm2 ++ ++c calculate first spring vector (pbc corrected) ++ ++ sxx=rcellb(1)*xneb(k)+rcellb(4)*yneb(k)+rcellb(7)*zneb(k) ++ syy=rcellb(2)*xneb(k)+rcellb(5)*yneb(k)+rcellb(8)*zneb(k) ++ szz=rcellb(3)*xneb(k)+rcellb(6)*yneb(k)+rcellb(9)*zneb(k) ++ rxx=rcella(1)*xneb(km)+rcella(4)*yneb(km)+rcella(7)*zneb(km) ++ ryy=rcella(2)*xneb(km)+rcella(5)*yneb(km)+rcella(8)*zneb(km) ++ rzz=rcella(3)*xneb(km)+rcella(6)*yneb(km)+rcella(9)*zneb(km) ++ rxx=rxx-nint(rxx-sxx) ++ ryy=ryy-nint(ryy-syy) ++ rzz=rzz-nint(rzz-szz) ++ txx=xneb(k)- ++ x (rxx*celneb(1,n-1)+ryy*celneb(4,n-1)+rzz*celneb(7,n-1)) ++ tyy=yneb(k)- ++ x (rxx*celneb(2,n-1)+ryy*celneb(5,n-1)+rzz*celneb(8,n-1)) ++ tzz=zneb(k)- ++ x (rxx*celneb(3,n-1)+ryy*celneb(6,n-1)+rzz*celneb(9,n-1)) ++ ++c calculate second spring vector (pbc corrected) ++ ++ kp=k+iatm2 ++ rxx=rcellc(1)*xneb(kp)+rcellc(4)*yneb(kp)+rcellc(7)*zneb(kp) ++ ryy=rcellc(2)*xneb(kp)+rcellc(5)*yneb(kp)+rcellc(8)*zneb(kp) ++ rzz=rcellc(3)*xneb(kp)+rcellc(6)*yneb(kp)+rcellc(9)*zneb(kp) ++ rxx=rxx-nint(rxx-sxx) ++ ryy=ryy-nint(ryy-syy) ++ rzz=rzz-nint(rzz-szz) ++ uxx=-xneb(k)+ ++ x rxx*celneb(1,n+1)+ryy*celneb(4,n+1)+rzz*celneb(7,n+1) ++ uyy=-yneb(k)+ ++ x rxx*celneb(2,n+1)+ryy*celneb(5,n+1)+rzz*celneb(8,n+1) ++ uzz=-zneb(k)+ ++ x rxx*celneb(3,n+1)+ryy*celneb(6,n+1)+rzz*celneb(9,n+1) ++ ++ rp2=rp2+uxx*uxx+uyy*uyy+uzz*uzz ++ rm2=rm2+txx*txx+tyy*tyy+tzz*tzz ++ wxx=aaa*uxx+bbb*txx ++ wyy=aaa*uyy+bbb*tyy ++ wzz=aaa*uzz+bbb*tzz ++ taux(j)=wxx ++ tauy(j)=wyy ++ tauz(j)=wzz ++ tau2=tau2+wxx*wxx+wyy*wyy+wzz*wzz ++ fpar=fpar+wxx*fxneb(k)+wyy*fyneb(k)+wzz*fzneb(k) ++ kink=kink+txx*uxx+tyy*uyy+tzz*uzz ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=rp2 ++ buffer(2)=rm2 ++ buffer(3)=tau2 ++ buffer(4)=fpar ++ buffer(5)=kink ++ call gdsum(buffer(1),5,buffer(6)) ++ rp2=buffer(1) ++ rm2=buffer(2) ++ tau2=buffer(3) ++ fpar=buffer(4) ++ kink=buffer(5) ++ ++ endif ++ ++c check for kinking of NEB ++ ++ kink=cos(kink/sqrt(rp2*rm2)) ++ if(kink.lt.0.5d0)nkinks=nkinks+1 ++ ++c calculate final forces ++ ++ j=0 ++ k=n*iatm2 ++ tau2=sqrt(tau2) ++ fac=(sprneb*(sqrt(rp2)-sqrt(rm2))-fpar/tau2)/tau2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ k=k+1 ++ fxneb(k)=fxneb(k)+fac*taux(j) ++ fyneb(k)=fyneb(k)+fac*tauy(j) ++ fzneb(k)=fzneb(k)+fac*tauz(j) ++ ++ enddo ++ ++ enddo ++ ++c abort if kinks detected ++ ++ if(nkinks.gt.0)then ++ ++ if(idnode.eq.0) ++ x write(nrite,'(1x,"number of kinks detected ",i6)')nkinks ++ call error(idnode,2350) ++ ++ endif ++ ++ return ++ end subroutine neb_spring_forces ++ ++ subroutine transition_properties ++ x (seek,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut,nospl, ++ x nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree, ++ x ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth, ++ x nturn,numbsn,alpha,delr,dlrpot,drewd,elrc,virlrc,epsq, ++ x fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,cfgtmp,cvgerr,estar,catchrad,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for analysing the NEB path and determining ++c the destination state (if not end of chain). ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 seek ++ logical lfcap,lneut,lnsq,loglnk,lzeql,newlst,ltad,scan,same ++ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt ++ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond ++ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,pass ++ integer ntpvdw,ntshl,ntteth,nturn,i,k,n,iatm0,iatm1,iatm2 ++ integer numblock,numbsn,mdiff ++ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp ++ real(8) virlrc,cvgerr,estar,catchrad,hyp_units ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++c analyse neb profile ++ ++ call scan_profile(nturn,estar) ++ ++c determine true new state from first maximum ++ ++ if(nturn.gt.1)then ++ ++ i=1 ++ do while(ktrn(i).ge.0) ++ i=i+1 ++ enddo ++ n=-ktrn(i) ++ ++c construct cell vectors for nth bead ++ ++ do i=1,9 ++ cell(i)=celneb(i,n) ++ enddo ++ ++c construct coordinate force arrays for nth bead ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ xxx(i)=xneb(k) ++ yyy(i)=yneb(k) ++ zzz(i)=zneb(k) ++ ++ enddo ++ ++c now minimise structure - this is correct new state ++ ++ call define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) ++ ++c write events entry for minimisation ++ ++ numblock=nstep/nblock ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x cfgtmp/hyp_units,cvgerr/hyp_units ++ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x cfgtmp/hyp_units,cvgerr/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ if(ltad)then ++ ++c determine differences for new state (TAD only) ++ ++ scan=.true. ++ call check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catchrad) ++ ++c set difference counters and pointers ++ ++ if(numbsn.gt.mxbsn)call error(idnode,2330) ++ ++ ndiff=mdiff ++ ++ if(numbsn.gt.1)then ++ nbsa(numbsn)=nbsb(numbsn-1)+1 ++ else ++ nbsa(numbsn)=1 ++ endif ++ ++ nbsb(numbsn)=mdiff ++ ++c save minimised starting structure as basin file ++ ++ call write_reference_config ++ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode,cfgtmp) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine transition_properties ++ ++ subroutine write_profile(idnode,mxnode,natms,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing profile file for NEB path ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ character*4 tail ++ integer idnode,mxnode,natms,i,j,k,n,iatm0,iatm1,iatm2 ++ real(8) hyp_units ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++ if(idnode.eq.0)then ++ ++c open profile data file ++ ++ if(numpro.lt.0)then ++ ++ write(tail,'(i4.4)')iabs(numpro) ++ open(npro,file='PROFILES'//'/'//'PRX'//tail//'.XY', ++ x form='formatted') ++ ++ else ++ ++ write(tail,'(i4.4)')numpro ++ open(npro,file='PROFILES'//'/'//'PRO'//tail//'.XY', ++ x form='formatted') ++ ++ endif ++ ++ endif ++ ++c calculate path ++ ++ path(0)=0.d0 ++ if(idnode.eq.0)write(npro,'(1p,2e14.6)')path(0), ++ x engneb(0)/hyp_units ++ ++ do n=1,mxneb ++ ++ path(n)=0.d0 ++ k=n*iatm2 ++ j=(n-1)*iatm2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ k=k+1 ++ path(n)=(xneb(k)-xneb(j))**2+(yneb(k)-yneb(j))**2+ ++ x (zneb(k)-zneb(j))**2+path(n) ++ ++ enddo ++ ++ if(mxnode.gt.1)call gdsum(path(n),1,buffer(1)) ++ ++ path(n)=sqrt(path(n))+path(n-1) ++ if(idnode.eq.0)write(npro,'(1p,2e14.6)')path(n), ++ x engneb(n)/hyp_units ++ ++ enddo ++ ++ numpro=numpro+1 ++ ++ if(idnode.eq.0)close(npro) ++ ++ return ++ end subroutine write_profile ++ ++ subroutine scan_profile(nturn,estar) ++ ++c********************************************************************* ++c ++c dl_poly routine for analysing neb energy profile ++c ++c copyright - daresbury laboratory ++c author - w.smith january 2007 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer, parameter :: nscan=100 ++ ++ integer i,np,n1,n2,npnts,fail,nturn ++ real(8) di,dj,rpd,uu,vv,v0,ss,estar ++ real(8), allocatable :: aa(:),dd(:),gg(:),zz(:) ++ ++c allocate working arrays ++ ++ allocate (aa(0:mxneb),dd(0:mxneb),gg(0:mxneb),zz(0:mxneb), ++ x stat=fail) ++ ++ npnts=mxneb+1 ++ n1=npnts-1 ++ n2=npnts-2 ++ ++c calculate spline coefficients ++ ++ gg(0)=0.d0 ++ dd(0)=path(1)-path(0) ++ ++ do i=1,n1-1 ++ ++ dd(i)=path(i+1)-path(i) ++ gg(i)=2.d0*(path(i+1)-path(i-1)) ++ zz(i)=6.d0*((engneb(i+1)-engneb(i))/dd(i)- ++ x (engneb(i)-engneb(i-1))/dd(i-1)) ++ ++ enddo ++ ++ gg(n1)=0.d0 ++ dd(n1)=0.d0 ++ aa(0)=0.d0 ++ aa(1)=dd(1)/gg(1) ++ ++ do i=2,n2-1 ++ ++ gg(i)=gg(i)-dd(i-1)*aa(i-1) ++ aa(i)=dd(i)/gg(i) ++ ++ enddo ++ ++ gg(n1-1)=gg(n1-1)-dd(n2-1)*aa(n2-1) ++ gg(1)=zz(1)/gg(1) ++ ++ do i=2,n1-1 ++ gg(i)=(zz(i)-dd(i-1)*gg(i-1))/gg(i) ++ enddo ++ ++ do i=1,n2-1 ++ gg(n1-i)=gg(n1-i)-aa(n1-i)*gg(npnts-i) ++ enddo ++ ++c now scan across the profile locating maxima and minima ++ ++ np=1 ++ nturn=0 ++ ss=1.d0 ++ v0=engneb(0) ++ rpd=(path(npnts-1)-path(0))/dble(nscan) ++ ++ do i=2,nscan-1 ++ ++ uu=rpd*dble(i)+path(0) ++ ++ do while(np.lt.npnts.and.uu.gt.path(np)) ++ np=np+1 ++ enddo ++ ++ di=uu-path(np-1) ++ dj=path(np)-uu ++ vv=(di*engneb(np)+dj*engneb(np-1)-di*dj* ++ x ((dd(np-1)+dj)*gg(np-1)+(dd(np-1)+di)*gg(np))/6.d0)/dd(np-1) ++ ++ if(ss.gt.0.d0.and.vv.le.v0)then ++ ++ nturn=nturn+1 ++ xtrn(nturn)=uu ++ ytrn(nturn)=vv ++ ktrn(nturn)=np ++ ++ else if(ss.lt.0.d0.and.vv.gt.v0)then ++ ++ nturn=nturn+1 ++ xtrn(nturn)=uu ++ ytrn(nturn)=vv ++ ktrn(nturn)=-np ++ ++ endif ++ ++ ss=sign(1.d0,vv-v0) ++ v0=vv ++ ++ enddo ++ ++c estimated activation energy ++ ++ i=1 ++ do while(ktrn(i).lt.0) ++ i=i+1 ++ enddo ++ estar=ytrn(i)-engbsn(1) ++ ++c deallocate working arrays ++ ++ deallocate (aa,dd,gg,zz,stat=fail) ++ ++ return ++ end subroutine scan_profile ++ ++ subroutine transition_time ++ x (seek,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3, ++ x multt,mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntrack,ntpvdw,ntshl,ntteth, ++ x ntcons,itrk,alpha,delr,dlrpot,drewd,elrc,virlrc,epsq, ++ x fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,cfgtmp,cvgerr,catchrad,timhop,hyp_units) ++ ++c********************************************************************* ++c ++c dl_poly routine for estimating the time of a transition ++c from a backlog of previous configurations ++c ++c copyright - daresbury laboratory ++c author - w.smith february 2007 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ character*8 seek ++ logical same,minflg,lfcap,lneut,lnsq,loglnk,scan ++ logical lzeql,newlst ++ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt ++ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond ++ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter ++ integer ntpvdw,ntshl,ntteth,ntcons,ntrack,itrk,mdiff,pass ++ integer nback,ntry,numblock ++ real(8) alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol ++ real(8) rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep ++ real(8) volm,cfgtmp,cvgerr,eng,tol,catchrad,timhop,hyp_units ++ ++c determine starting tracking file ++ ++ nback=min(numtrk,maxtrk) ++ ++c search track files for transition ++ ++ itrk=0 ++ same=.false. ++ ++ do while(.not.same.and.itrk.le.nback) ++ ++ itrk=itrk+1 ++ ntry=mod(numtrk-itrk,maxtrk) ++ ++ call read_reference_config ++ x ('CFGTRK','TRACKS',ntrk,ntry,natms,imcon,idnode,eng) ++ ++ call define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) ++ ++c write events entry for minimisation (normally deactivated) ++ ++c$$$ if(idnode.eq.0)then ++c$$$ ++c$$$ numblock=nstep/nblock ++c$$$ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') ++c$$$ x nstep,pass,numblock,keytol,opttol/hyp_units, ++c$$$ x cfgtmp/hyp_units,cvgerr/hyp_units ++c$$$ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') ++c$$$ x nstep,pass,numblock,keytol,opttol/hyp_units, ++c$$$ x cfgtmp/hyp_units,cvgerr/hyp_units ++c$$$ write(nrite,"(1x,120('-'))") ++c$$$ ++c$$$ endif ++ ++c check if still in base state ++ ++ scan=.false. ++ call check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catchrad) ++ ++ enddo ++ ++ timhop=timhyp-tstep*dble(ntrack)*(dble(itrk)-0.5d0) ++ tboost=track(ntry) ++ ++ return ++ end subroutine transition_time ++ ++ subroutine scramble_velocities(idnode,natms) ++ ++c*********************************************************************** ++c ++c dlpoly hyperdynamics routine for randomising velocities after a ++c transition has occured (use with identical species only) ++c ++c copyright daresbury laboratory ++c author w.smith jan 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer idnode,natms,i,j,k,m,n ++ real(8) vvv ++ ++ do j=1,10 ++ ++ do i=1,natms ++ ++ k=int(natms*duni())+1 ++ vvv=vxx(i) ++ vxx(i)=vxx(k) ++ vxx(k)=vvv ++ m=int(natms*duni())+1 ++ vvv=vyy(i) ++ vyy(i)=vyy(m) ++ vyy(m)=vvv ++ n=int(natms*duni())+1 ++ vvv=vzz(i) ++ vzz(i)=vzz(n) ++ vzz(n)=vvv ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine scramble_velocities ++ ++ subroutine hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++c*********************************************************************** ++c ++c dlpoly routine for saving hyperdynamics restart data ++c ++c copyright daresbury laboratory ++c author w.smith dec 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical ltad ++ integer idnode,mxnode,natms,nsteql ++ integer iatm0,iatm1,i,j,k,n,last,ierr,netdif ++ real(8) buff(2) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c total number of atomic differences ++ ++ buff(1)=dble(ndiff) ++ call gdsum(buff(1),1,buff(2)) ++ netdif=nint(buff(1)) ++ ++ if(idnode.eq.0)then ++ ++c open hyperdynamics restart file ++ ++ open(nhrs,file="HYPREV",form="unformatted") ++ ++c write control variables ++ ++ write(nhrs)ltad,dble(numbsn),dble(numtrk),dble(numpro), ++ x dble(netdif),dble(numdark),dble(nsteql),dble(numbpd), ++ x timhyp,timres,tstop,tkeres,tboost,vbase,strres,celres ++ write(nhrs)track ++ endif ++ ++ if(ltad.and.numbsn.gt.1)then ++ ++c load basin difference data ++ ++ n=0 ++ do i=1,numbsn-1 ++ ++ do j=nbsa(i),nbsb(i) ++ ++ buffer(n+1)=dble(idabsn(j)) ++ buffer(n+2)=dble(i) ++ buffer(n+3)=xdiffs(j) ++ buffer(n+4)=ydiffs(j) ++ buffer(n+5)=zdiffs(j) ++ n=n+5 ++ ++ enddo ++ ++ enddo ++ last=n ++ ++c write basin difference data ++ ++ do k=1,mxnode-1 ++ ++ if(idnode.eq.0)then ++ ++ ++ call csend(hyper_tag+k,buff,1,k,ierr) ++ call crecv(2*hyper_tag+k,buff,1) ++ call crecv(3*hyper_tag+k,buffer(last+1),nint(buff(1))) ++ last=nint(buff(1))+last ++ ++ elseif(k.eq.idnode)then ++ ++ call crecv(hyper_tag+k,buff,1) ++ buff(1)=dble(last) ++ call csend(2*hyper_tag+k,buff,1,0,ierr) ++ call csend(3*hyper_tag+k,buffer,last,0,ierr) ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)write(nhrs)(buffer(i),i=1,last) ++ call gsync() ++ ++ endif ++ ++c load reference block configuration data ++ ++ j=0 ++ k=1 ++ do i=iatm0,iatm1 ++ ++ buffer(j+1)=xres(k) ++ buffer(j+2)=yres(k) ++ buffer(j+3)=zres(k) ++ j=j+3 ++ k=k+1 ++ ++ enddo ++ last=j ++ ++c write reference block configuration data ++ ++ do k=1,mxnode-1 ++ ++ if(idnode.eq.0)then ++ ++ call csend(hyper_tag+k,buff,1,k,ierr) ++ call crecv(2*hyper_tag+k,buff,1) ++ call crecv(3*hyper_tag+k,buffer(last+1),nint(buff(1))) ++ last=nint(buff(1))+last ++ ++ elseif(k.eq.idnode)then ++ ++ call crecv(hyper_tag+k,buff,1) ++ buff(1)=dble(last) ++ call csend(2*hyper_tag+k,buff,1,0,ierr) ++ call csend(3*hyper_tag+k,buffer,last,0,ierr) ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nhrs)(buffer(i),i=1,last) ++ close(nhrs) ++ ++ endif ++ call gsync() ++ ++ return ++ end subroutine hyper_close ++ ++ subroutine hyper_open(ltad,idnode,mxnode,natms,nsteql) ++ ++c*********************************************************************** ++c ++c dlpoly routine for reading hyperdynamics restart data ++c ++c copyright daresbury laboratory ++c author w.smith dec 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical ltad,mtad ++ integer idnode,mxnode,natms,nsteql ++ integer iatm0,iatm1,i,j,k,n,last,netdif,ierr ++ real(8) buff(1) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c restore control variables ++ ++ mtad=.true. ++ if(idnode.eq.0)then ++ ++c open hyperdynamics restart file ++ ++ open(nhrs,file="HYPOLD",form="unformatted") ++ ++ read(nhrs)mtad,(buffer(i),i=1,30) ++ read(nhrs)track ++ ++ else ++ ++ do i=1,30 ++ buffer(i)=0.d0 ++ enddo ++ track(:)=0.d0 ++ ++ endif ++ ++c check restart file is tad compatible ++ ++ call gstate(mtad) ++ if(ltad.and.(.not.mtad))call error(idnode,2341) ++ ++ call gdsum(buffer(1),31,buffer(32)) ++ ++ numbsn=nint(buffer(1)) ++ numtrk=nint(buffer(2)) ++ numpro=nint(buffer(3)) ++ netdif=nint(buffer(4)) ++ numdark=nint(buffer(5)) ++ nsteql=nint(buffer(6)) ++ numbpd=nint(buffer(7)) ++ timhyp=buffer(8) ++ timres=buffer(9) ++ tstop=buffer(10) ++ tkeres=buffer(11) ++ tboost=buffer(12) ++ vbase=buffer(13) ++ do i=1,9 ++ ++ strres(i)=buffer(i+13) ++ celres(i)=buffer(i+22) ++ ++ enddo ++ last=size(track) ++ call gdsum(track,last,buffer) ++ ++ if(ltad.and.numbsn.gt.1)then ++ ++c restore basin difference data ++ ++ last=5*netdif ++ if(idnode.eq.0)read(nhrs)(buffer(i),i=1,last) ++ ++ do k=1,mxnode-1 ++ ++ if(idnode.eq.0)then ++ ++ call csend(hyper_tag+k,buffer,last,k,ierr) ++ ++ elseif(k.eq.idnode)then ++ ++ call crecv(hyper_tag+k,buffer,last) ++ ++ endif ++ ++ enddo ++ ++c reject nonlocal basin difference data ++ ++ j=0 ++ do i=1,last,5 ++ ++ n=nint(buffer(i)) ++ if(n.ge.iatm0.and.n.le.iatm1)then ++ ++ buffer(j+1)=buffer(i) ++ buffer(j+2)=buffer(i+1) ++ buffer(j+3)=buffer(i+2) ++ buffer(j+4)=buffer(i+3) ++ buffer(j+5)=buffer(i+4) ++ j=j+5 ++ ++ endif ++ ++ enddo ++ last=j ++ ++c unload basin difference data ++ ++ n=0 ++ nbsa(1)=1 ++ do i=1,numbsn-1 ++ ++ if(i.gt.1)nbsa(i)=n+1 ++ ++ do j=1,last,5 ++ ++ if(nint(buffer(j+1)).eq.i)then ++ ++ n=n+1 ++ idabsn(n)=nint(buffer(j)) ++ xdiffs(n)=buffer(j+2) ++ ydiffs(n)=buffer(j+3) ++ zdiffs(n)=buffer(j+4) ++ ++ endif ++ ++ enddo ++ ++ nbsb(i)=n ++ ++ enddo ++ ndiff=n ++ call gsync() ++ ++ endif ++ ++c retrieve reference block configuration data ++ ++ last=3*natms ++ if(idnode.eq.0)read(nhrs)(buffer(i),i=1,last) ++ ++ do k=1,mxnode-1 ++ ++c read reference block configuration data ++ ++ if(idnode.eq.0)then ++ ++ call csend(hyper_tag+k,buffer,last,k,ierr) ++ ++ elseif(k.eq.idnode)then ++ ++ call crecv(hyper_tag+k,buffer,last) ++ ++ endif ++ ++ enddo ++ ++c unload reference block configuration data ++ ++ n=1 ++ j=3*(iatm0-1) ++ do i=iatm0,iatm1 ++ ++ xres(n)=buffer(j+1) ++ yres(n)=buffer(j+2) ++ zres(n)=buffer(j+3) ++ j=j+3 ++ n=n+1 ++ ++ enddo ++ ++ if(idnode.eq.0)close(nhrs) ++ call gsync() ++ ++ return ++ end subroutine hyper_open ++ ++ subroutine bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for scaling forces in a bias potential dynamics ++c simulation using hamelberg, mongan and mccammon factor ++c J. Chem. Phys. 120 (2004) 11919 ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2008 ++c ++c*********************************************************************** ++ ++ integer i,natms,mynode,keybpd ++ real(8) alpha,vmin,ebias,beta,temp,engcfg,eboost,hscale ++ real(8) engtmp ++ ++ boost=1.d0 ++ numbpd=numbpd+1 ++ ++c reset potential energy wrt base level ++ ++ if(keybpd.eq.1)then ++ engtmp=engcfg-vbase ++ else ++ engtmp=engcfg-engbsn(1) ++ endif ++ ++ if(ebias.gt.engtmp)then ++ ++c bias potental boost ++ ++ alpha=ebias*(ebias-vmin)/vmin ++ beta=1.d0/(boltz*temp*dble(natms)) ++ eboost=(ebias-engtmp)**2/(alpha+ebias-engtmp) ++ boost=exp(beta*eboost) ++ ++c bias potential forces scaling factor ++ ++ hscale=(alpha/(alpha+ebias-engtmp))**2 ++ ++c scale forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxx(i)*hscale ++ fyy(i)=fyy(i)*hscale ++ fzz(i)=fzz(i)*hscale ++ ++ enddo ++ ++ endif ++ ++c accumulative average of boost factor ++ ++ tboost=boost/dble(numbpd)+dble(numbpd-1)*tboost/dble(numbpd) ++ ++ return ++ end subroutine bpd_forces ++ ++ end module hyper_dynamics_module +diff -urN dl_class_1.9.orig/srcmod/integrator_module.f dl_class_1.9/srcmod/integrator_module.f +--- dl_class_1.9.orig/srcmod/integrator_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/integrator_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,624 @@ ++ module integrator_module ++ ++c*********************************************************************** ++c ++c dl_poly module for selecting verlet integration schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use error_module ++ use lf_motion_module ++ use lf_rotation1_module ++ use lf_rotation2_module ++ use pmf_module ++ use temp_scalers_module ++ use vv_motion_module ++ use vv_rotation1_module ++ use vv_rotation2_module ++ ++ contains ++ ++ subroutine lf_integrate ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the integration algorithm ++c to solve the the equations of motion. based on the leapfrog ++c verlet algorithm ++c ++c copyright - daresbury laboratory ++c author - w. smith december 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,safep,safeq,lcnb,lshmov,lnfic ++ integer idnode,mxnode,imcon,natms,ngrp,keyens,nscons,nofic ++ integer ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nstep ++ real(8) tstep,engke,engrot,tolnce,quattol,vircon,vircom ++ real(8) virtot,temp,press,volm,sigma,taut,taup,chit,chip ++ real(8) consv,conint,elrc,virlrc,virpmf ++ ++ safe=.true. ++ safeq=.true. ++ safep=.true. ++ ++ if(ngrp.eq.0) then ++ ++ if(keyens.eq.0) then ++ ++c verlet leapfrog ++ ++ call nve_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,tolnce,tstep,vircon) ++ ++ else if(keyens.eq.1) then ++ ++c Evans Gaussian Temperature constraints ++ ++ call nvt_e1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,tolnce,tstep,vircon) ++ ++ else if(keyens.eq.2) then ++ ++c Berendsen thermostat ++ ++ call nvt_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,taut,sigma,tolnce,tstep,vircon) ++ ++ else if(keyens.eq.3) then ++ ++c Nose-Hoover thermostat ++ ++ call nvt_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon) ++ ++ elseif(keyens.eq.4) then ++ ++c Berendsen thermostat and isotropic barostat ++ ++ call npt_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, ++ x tstep,virtot,vircon,volm) ++ ++ else if(keyens.eq.5) then ++ ++c Nose-Hoover thermostat and isotropic barostat ++ ++ call npt_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,chip,chit,conint,consv,elrc,engke,virlrc,press, ++ x taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm) ++ ++ else if(keyens.eq.6) then ++ ++c Berendsen thermostat and barostat (cell shape varying) ++ ++ call nst_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,mode,elrc,engke,virlrc,press,taup,taut,sigma, ++ x tolnce,tstep,vircon,volm) ++ ++ else if(keyens.eq.7) then ++ ++c Nose-Hoover thermostat and barostat (cell shape varying) ++ ++ call nst_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,mode,chit,conint,consv,elrc,engke,virlrc,press, ++ x taup,taut,sigma,temp,tolnce,tstep,vircon,volm) ++ ++ elseif(keyens.eq.8) then ++ ++c Potential of mean force in NVE ++ ++ call pmflf ++ x (safe,safep,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) ++ ++ endif ++ ++ elseif(ngrp.gt.0) then ++ ++c apply rigid body equations of motion ++ ++ if(keyens.eq.0) then ++ ++ if(.not.lcnb) then ++ ++ call nveq_1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon) ++ ++ else ++ ++ call nveq_2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon) ++ ++ endif ++ ++ elseif(keyens.eq.1) then ++ ++c invalid option ++ ++ call error(idnode,430) ++ ++ elseif(keyens.eq.2) then ++ ++ if(.not.lcnb) then ++ ++ call nvtq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, ++ x tstep,vircom,vircon) ++ ++ else ++ ++ call nvtq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, ++ x tstep,vircom,vircon) ++ ++ endif ++ ++ elseif(keyens.eq.3) then ++ ++ if(.not.lcnb) then ++ ++ call nvtq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,chit,consv,conint,engke,engrot,quattol, ++ x sigma,taut,tolnce,tstep,vircom,vircon) ++ ++ else ++ ++ call nvtq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,conint,consv,chit,engke,engrot,quattol, ++ x sigma,taut,tolnce,tstep,vircom,vircon) ++ ++ endif ++ ++ elseif(keyens.eq.4) then ++ ++ if(.not.lcnb) then ++ ++ call nptq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,virtot,vircom, ++ x vircon,volm) ++ ++ else ++ ++ call nptq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon, ++ x virtot,volm) ++ ++ endif ++ ++ elseif(keyens.eq.5) then ++ ++ if(.not.lcnb) then ++ ++ call nptq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,virtot,vircom,vircon,volm) ++ ++ else ++ ++ call nptq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,vircom,vircon,virtot,volm) ++ ++ endif ++ ++ elseif(keyens.eq.6) then ++ ++ if(.not.lcnb) then ++ ++ call nstq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) ++ ++ else ++ ++ call nstq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) ++ ++ endif ++ ++ elseif(keyens.eq.7) then ++ ++ if(.not.lcnb) then ++ ++ call nstq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,vircom,vircon,volm) ++ ++ else ++ ++ call nstq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,vircom,vircon,volm) ++ ++ endif ++ ++ else ++ ++c invalid option ++ ++ call error(idnode,430) ++ ++ endif ++ ++ endif ++ ++c check on convergence of pmf-shake ++ ++ if(ntpmf.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safep) ++ if(.not.safep) call error(idnode,438) ++ ++ endif ++ ++c check on convergence of shake ++ ++ if(ntcons.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,105) ++ ++ endif ++ ++c check on convergence of quaternion algorithm ++ ++ if(ngrp.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safeq) ++ if(.not.safeq) call error(idnode,321) ++ ++ endif ++ ++c eliminate "flying ice cube" in long simulations (Berendsen) ++ ++ if(lnfic.and.(keyens.eq.2.or.keyens.eq.4.or.keyens.eq.6))then ++ ++ if(mod(nstep,nofic).eq.0)then ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine lf_integrate ++ ++ subroutine vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint,elrc, ++ x virlrc,virpmf,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the integration algorithm ++c to solve the the equations of motion. based on the velocity ++c verlet algorithm ++c ++c copyright - daresbury laboratory ++c author - w. smith february 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,safep,lcnb,lshmov,lnfic ++ integer isw,idnode,mxnode,imcon,natms,ngrp,keyens,nscons ++ integer ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nstep,nofic ++ integer ntshl,keyshl ++ real(8) tstep,engke,engrot,tolnce,vircon,vircom ++ real(8) virtot,temp,press,volm,sigma,taut,taup,chit,chip ++ real(8) consv,conint,elrc,virlrc,virpmf,chit_shl,sigma_shl ++ ++ if(ngrp.eq.0) then ++ ++ if(keyens.eq.0) then ++ ++c verlet leapfrog ++ ++ call nvevv_1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,tstep,engke,tolnce,vircon) ++ ++ else if(keyens.eq.1) then ++ ++c Evans Gaussian Temperature constraints ++ ++ call nvtvv_e1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,tstep,engke,tolnce,vircon) ++ ++ else if(keyens.eq.2) then ++ ++c Berendsen thermostat ++ ++ call nvtvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,tstep,taut,sigma,engke,tolnce,vircon) ++ ++ else if(keyens.eq.3) then ++ ++c Nose-Hoover thermostat ++ ++ call nvtvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntshl,keyshl,tstep,taut,sigma,chit,consv, ++ x conint,engke,tolnce,vircon,chit_shl,sigma_shl) ++ ++ elseif(keyens.eq.4) then ++ ++c Berendsen thermostat and isotropic barostat ++ ++ call nptvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,tstep,taut,taup,sigma,engke,press,elrc, ++ x virlrc,tolnce,virtot,vircon,volm) ++ ++ else if(keyens.eq.5) then ++ ++c Nose-Hoover thermostat and isotropic barostat ++ ++ call nptvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,ntshl,keyshl,tstep,taut,taup,sigma,temp, ++ x chip,chit,consv,conint,engke,elrc,tolnce,vircon, ++ x virtot,virlrc,volm,press,chit_shl,sigma_shl) ++ ++ else if(keyens.eq.6) then ++ ++c Berendsen thermostat and barostat (cell shape varying) ++ ++ call nstvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,mode,tstep,taut,taup,sigma,engke,press, ++ x elrc,virlrc,tolnce,vircon,volm) ++ ++ else if(keyens.eq.7) then ++ ++c Nose-Hoover thermostat and barostat (cell shape varying) ++ ++ call nstvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,mode,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chit,consv,conint,engke,elrc,tolnce,vircon, ++ x virlrc,volm,press,chit_shl,sigma_shl) ++ ++ elseif(keyens.eq.8) then ++ ++c Potential of mean force in NVE ++ ++ call pmfvv ++ x (safe,safep,lshmov,isw,idnode,mxnode,imcon,natms,nscons, ++ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) ++ ++ endif ++ ++ elseif(ngrp.gt.0) then ++ ++c apply rigid body equations of motion ++ ++ if(keyens.eq.0) then ++ ++ if(.not.lcnb) then ++ ++ call nveqvv_1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) ++ ++ else ++ ++ call nveqvv_2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) ++ ++ endif ++ ++ elseif(keyens.eq.1) then ++ ++c invalid option ++ ++ call error(idnode,430) ++ ++ elseif(keyens.eq.2) then ++ ++ if(.not.lcnb) then ++ ++ call nvtqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, ++ x vircom,vircon) ++ ++ else ++ ++ call nvtqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, ++ x vircom,vircon) ++ ++ endif ++ ++ elseif(keyens.eq.3) then ++ ++ if(.not.lcnb) then ++ ++ call nvtqvv_h1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke, ++ x engrot,taut,sigma,tolnce,tstep,vircom,vircon,chit_shl, ++ x sigma_shl) ++ ++ else ++ ++ call nvtqvv_h2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke, ++ x engrot,taut,sigma,tolnce,tstep,vircom,vircon,chit_shl, ++ x sigma_shl) ++ ++ endif ++ ++ elseif(keyens.eq.4) then ++ ++ if(.not.lcnb) then ++ ++ call nptqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) ++ ++ else ++ ++ call nptqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) ++ ++ endif ++ ++ elseif(keyens.eq.5) then ++ ++ if(.not.lcnb) then ++ ++ call nptqvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircon,virtot,virlrc,vircom,volm,press,chit_shl, ++ x sigma_shl) ++ ++ else ++ ++ call nptqvv_h2 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircom,vircon,virtot,virlrc,volm,press,chit_shl, ++ x sigma_shl) ++ ++ endif ++ ++ elseif(keyens.eq.6) then ++ ++ if(.not.lcnb) then ++ ++ call nstqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup, ++ x sigma,tolnce,tstep,vircom,vircon,elrc,virlrc,volm) ++ ++ else ++ ++ call nstqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup, ++ x sigma,tolnce,tstep,vircom,vircon,elrc,virlrc,volm) ++ ++ endif ++ ++ elseif(keyens.eq.7) then ++ ++ if(.not.lcnb) then ++ ++ call nstqvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, ++ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircon,virlrc,vircom,volm,press,chit_shl,sigma_shl) ++ ++ else ++ ++ call nstqvv_h2 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, ++ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircom,vircon,virlrc,volm,press,chit_shl,sigma_shl) ++ ++ endif ++ ++ else ++ ++c invalid option ++ ++ call error(idnode,430) ++ ++ endif ++ ++ endif ++ ++c check on convergence of pmf-shake ++ ++ if(ntpmf.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safep) ++ if(.not.safep) call error(idnode,438) ++ ++ endif ++ ++c check on convergence of shake ++ ++ if(ntcons.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,105) ++ ++ endif ++ ++c eliminate "flying ice cube" in long simulations (Berendsen) ++ ++ if(lnfic.and.(keyens.eq.2.or.keyens.eq.4.or.keyens.eq.6))then ++ ++ if(mod(nstep,nofic).eq.0)then ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine vv_integrate ++ ++ end module integrator_module +diff -urN dl_class_1.9.orig/srcmod/inversion_module.f dl_class_1.9/srcmod/inversion_module.f +--- dl_class_1.9.orig/srcmod/inversion_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/inversion_module.f 2011-08-16 14:42:52.000000000 +0200 +@@ -0,0 +1,828 @@ ++ module inversion_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining inversion potential arrays ++c copyright - daresbury laboratory ++c ++c author - w. smith sep 2003 ++c adapted - w. smith jun 2008 : solvation, free energy, excitation ++c adapted - w. smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use solvation_module ++ ++ implicit none ++ ++ real(8), allocatable :: prminv(:,:) ++ integer, allocatable :: listinv(:,:) ++ integer, allocatable :: numinv(:),keyinv(:),lstinv(:,:) ++ ++ save prminv,listinv,numinv,keyinv,lstinv ++ ++ contains ++ ++ subroutine alloc_inv_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(5) ++ ++ do i=1,5 ++ fail(i)=0 ++ enddo ++ ++ allocate (prminv(mxtinv,mxpinv),stat=fail(1)) ++ allocate (numinv(mxtmls),stat=fail(2)) ++ allocate (keyinv(mxtinv),stat=fail(3)) ++ allocate (lstinv(mxtinv,4),stat=fail(4)) ++ allocate (listinv(mxinv,5),stat=fail(5)) ++ ++ do i=1,5 ++ if(fail(i).gt.0)call error(idnode,1120) ++ enddo ++ ++ do i=1,mxtmls ++ numinv(i)=0 ++ enddo ++ ++ end subroutine alloc_inv_arrays ++ ++ subroutine define_inversions ++ x (safe,idnode,itmols,ninver,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining inversion angle potentials ++c note: includes calcite planar potential which is not strictly ++c an inversion potential and is different in implementation ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,itmols,ninver,nsite,ntmp,inv,inv1,i ++ integer iatm1,iatm2,iatm3,iatm4,isite1,isite2,isite3,isite4 ++ integer ia,ja,idum ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numinv(itmols)=numinv(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of inversion terms', ++ x 6x,i10)")ntmp ++ write(nrite,"(/,/,1x,'inversion potential details:', ++ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, ++ x 'index',5x,'index',5x,'f-const',7x,'angle',/)") ++ endif ++ ++ inv1=numinv(itmols) ++ do inv=1,inv1 ++ ++c read inversion potential parameters ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ iatm3=intstr(record,lenrec,idum) ++ iatm4=intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ isite3=nsite-numsit(itmols)+iatm3 ++ isite4=nsite-numsit(itmols)+iatm4 ++ ++ if(lfzsit(isite1)*lfzsit(isite2)* ++ x lfzsit(isite3)*lfzsit(isite4).ne.0)then ++ ++ numinv(itmols)=numinv(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ ninver=ninver+1 ++ ++ if(ninver.gt.mxtinv)call error(idnode,73) ++ ++ if(keyword(1:4).eq.'harm')then ++ keyinv(ninver)=1 ++ elseif(keyword(1:4).eq.'hcos')then ++ keyinv(ninver)=2 ++ elseif(keyword(1:4).eq.'plan')then ++ keyinv(ninver)=3 ++ elseif(keyword(1:4).eq.'calc')then ++ keyinv(ninver)=4 ++ else ++ if(idnode.eq.0)write(nrite,*)record ++ call error(idnode,449) ++ endif ++ ++ lstinv(ninver,1)=iatm1 ++ lstinv(ninver,2)=iatm2 ++ lstinv(ninver,3)=iatm3 ++ lstinv(ninver,4)=iatm4 ++ prminv(ninver,1)=dblstr(record,lenrec,idum) ++ prminv(ninver,2)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,4i10,1p,e12.4,0p,9f12.6)") ++ x keyword(1:4),(lstinv(ninver,ia),ia=1,4), ++ x (prminv(ninver,ja),ja=1,mxpinv) ++ ++c convert energies to internal units and angles to radians ++ ++ prminv(ninver,1)=prminv(ninver,1)*engunit ++ ++ if(keyinv(ninver).eq.2)then ++ ++ prminv(ninver,2)=cos(prminv(ninver,2)*(pi/180.d0)) ++ ++ elseif(keyinv(ninver).eq.4)then ++ ++ prminv(ninver,2)=prminv(ninver,2)*engunit ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_inversions ++ ++ subroutine invfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntinv,enginv,virinv) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating inversion energy and force ++c terms in molecular dynamics. ++c ++c copyright - daresbury laboratory 1996 ++c author - w. smith may 1996 ++c modified - w.smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect,lcalcite ++ logical idrive,jdrive,kdrive,ldrive ++ integer idnode,imcon,mxnode,ntinv,fail1,fail2 ++ integer fail3,inv1,inv2,i,ii,ia,id,kk,ib,ic ++ real(8) strs(6),strs_loc(6) ++ real(8) xab,yab,zab,rab2,rrab,xac,yac,zac,rac2,rrac,xad,yad ++ real(8) zad,rad2,rrad,rbc,rcd,rdb,ubx,uby,ubz,ubn,rub,vbx ++ real(8) vby,vbz,rvb,wwb,ucx,ucy,ucz,ucn,vcx,vcy,vcz,rvc,wwc ++ real(8) udx,udy,udz,udn,vdx,vdy,vdz,vdn,rvd,wwd,cosb,cosc ++ real(8) cosd,thb,thc,thd,gamb,gamc,gamd,rubc,rubd,rucd,rucb ++ real(8) rudb,rudc,rvbc,rvbd,rvcd,rvcb,rvdb,rvdc,fax,fay,faz ++ real(8) fbx,fby,fbz,fcx,fcy,fcz,fdx,fdy,fdz,vbn,vcn,ruc,rud ++ real(8) uuu,uu2,uun,uux,uuy,uuz,enginv,virinv,omega,gamma ++ real(8) gamvir ++ ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ real(8), allocatable :: xdac(:),ydac(:),zdac(:) ++ real(8), allocatable :: xdad(:),ydad(:),zdad(:) ++ ++ data fail1,fail2,fail3/0,0,0/ ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) ++ allocate (xdac(msbad),ydac(msbad),zdac(msbad),stat=fail2) ++ allocate (xdad(msbad),ydad(msbad),zdad(msbad),stat=fail3) ++ if(fail1.ne.0.or.fail2.ne.0.or.fail3.ne.0) ++ x call error(idnode,1130) ++ ++c check size of work arrays ++ ++ if((ntinv-mxnode+1)/mxnode.gt.msbad)call error(idnode,427) ++ ++c block indices ++ ++ inv1=(idnode*ntinv)/mxnode+1 ++ inv2=((idnode+1)*ntinv)/mxnode ++ ++ safe=.true. ++ ++c initialise accumulators ++ ++ enginv=0.d0 ++ virinv=0.d0 ++ inv_fre=0.d0 ++ inv_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(4)=.true. ++ inv_sol(:)=0.d0 ++ if(lexcite)inv_exc(:)=0.d0 ++ ++ endif ++ ++c calculate bond vectors ++ ++ ii=0 ++ do i=inv1,inv2 ++ ++ ii=ii+1 ++ ++c potential energy function type ++ ++ kk=listinv(ii,1) ++ ++c indices of bonded atoms ++ ++ ia=listinv(ii,2) ++ ib=listinv(ii,3) ++ ic=listinv(ii,4) ++ id=listinv(ii,5) ++ ++c define components of bond vectors ++ ++ xdab(ii)=xxx(ib)-xxx(ia) ++ ydab(ii)=yyy(ib)-yyy(ia) ++ zdab(ii)=zzz(ib)-zzz(ia) ++ ++ if(keyinv(kk).eq.4)then ++ ++ xdac(ii)=xxx(ic)-xxx(ib) ++ ydac(ii)=yyy(ic)-yyy(ib) ++ zdac(ii)=zzz(ic)-zzz(ib) ++ ++ xdad(ii)=xxx(id)-xxx(ib) ++ ydad(ii)=yyy(id)-yyy(ib) ++ zdad(ii)=zzz(id)-zzz(ib) ++ ++ else ++ ++ xdac(ii)=xxx(ic)-xxx(ia) ++ ydac(ii)=yyy(ic)-yyy(ia) ++ zdac(ii)=zzz(ic)-zzz(ia) ++ ++ xdad(ii)=xxx(id)-xxx(ia) ++ ydad(ii)=yyy(id)-yyy(ia) ++ zdad(ii)=zzz(id)-zzz(ia) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ call images(imcon,0,1,ii,cell,xdac,ydac,zdac) ++ call images(imcon,0,1,ii,cell,xdad,ydad,zdad) ++ ++c loop over all specified inversions ++ ++ ii=0 ++ do i=inv1,inv2 ++ ++ ii=ii+1 ++ ++c select potential energy function type ++ ++ kk=listinv(ii,1) ++ lcalcite=(keyinv(kk).eq.4) ++ ++c define components of bond vectors ++ ++ xab=xdab(ii) ++ yab=ydab(ii) ++ zab=zdab(ii) ++ rab2=xab*xab+yab*yab+zab*zab ++ rrab=1.d0/sqrt(rab2) ++ ++ xac=xdac(ii) ++ yac=ydac(ii) ++ zac=zdac(ii) ++ rac2=xac*xac+yac*yac+zac*zac ++ rrac=1.d0/sqrt(rac2) ++ ++ xad=xdad(ii) ++ yad=ydad(ii) ++ zad=zdad(ii) ++ rad2=xad*xad+yad*yad+zad*zad ++ rrad=1.d0/sqrt(rad2) ++ ++ if(lcalcite)then ++ ++c calculate vector normal to plane ++ ++ uux=yac*zad-zac*yad ++ uuy=zac*xad-xac*zad ++ uuz=xac*yad-yac*xad ++ uun=1.d0/sqrt(uux**2+uuy**2+uuz**2) ++ uux=uun*uux ++ uuy=uun*uuy ++ uuz=uun*uuz ++ uuu=xab*uux+yab*uuy+zab*uuz ++ ++ else ++ ++c scalar products of bond vectors ++ ++ rbc=xab*xac+yab*yac+zab*zac ++ rcd=xac*xad+yac*yad+zac*zad ++ rdb=xad*xab+yad*yab+zad*zab ++ ++c calculate bond-angle-plane vectors ++ ++ ubx=xac*rrac+xad*rrad ++ uby=yac*rrac+yad*rrad ++ ubz=zac*rrac+zad*rrad ++ ubn=1.d0/sqrt(ubx**2+uby**2+ubz**2) ++ ubx=ubn*ubx ++ uby=ubn*uby ++ ubz=ubn*ubz ++ rub=xab*ubx+yab*uby+zab*ubz ++ ++ vbx=xac*rrac-xad*rrad ++ vby=yac*rrac-yad*rrad ++ vbz=zac*rrac-zad*rrad ++ vbn=1.d0/sqrt(vbx**2+vby**2+vbz**2) ++ vbx=vbn*vbx ++ vby=vbn*vby ++ vbz=vbn*vbz ++ rvb=xab*vbx+yab*vby+zab*vbz ++ wwb=sqrt(rub**2+rvb**2) ++ ++ ucx=xad*rrad+xab*rrab ++ ucy=yad*rrad+yab*rrab ++ ucz=zad*rrad+zab*rrab ++ ucn=1.d0/sqrt(ucx**2+ucy**2+ucz**2) ++ ucx=ucn*ucx ++ ucy=ucn*ucy ++ ucz=ucn*ucz ++ ruc=xac*ucx+yac*ucy+zac*ucz ++ ++ vcx=xad*rrad-xab*rrab ++ vcy=yad*rrad-yab*rrab ++ vcz=zad*rrad-zab*rrab ++ vcn=1.d0/sqrt(vcx**2+vcy**2+vcz**2) ++ vcx=vcn*vcx ++ vcy=vcn*vcy ++ vcz=vcn*vcz ++ rvc=xac*vcx+yac*vcy+zac*vcz ++ wwc=sqrt(ruc**2+rvc**2) ++ ++ udx=xab*rrab+xac*rrac ++ udy=yab*rrab+yac*rrac ++ udz=zab*rrab+zac*rrac ++ udn=1.d0/sqrt(udx**2+udy**2+udz**2) ++ udx=udn*udx ++ udy=udn*udy ++ udz=udn*udz ++ rud=xad*udx+yad*udy+zad*udz ++ ++ vdx=xab*rrab-xac*rrac ++ vdy=yab*rrab-yac*rrac ++ vdz=zab*rrab-zac*rrac ++ vdn=1.d0/sqrt(vdx**2+vdy**2+vdz**2) ++ vdx=vdn*vdx ++ vdy=vdn*vdy ++ vdz=vdn*vdz ++ rvd=xad*vdx+yad*vdy+zad*vdz ++ wwd=sqrt(rud**2+rvd**2) ++ ++c calculate inversion angle cosines ++ ++ cosb=wwb*rrab ++ cosc=wwc*rrac ++ cosd=wwd*rrad ++ ++ endif ++ ++c calculate potential energy and scalar force term ++ ++ if(keyinv(kk).eq.1)then ++ ++c key=1 for harmonic inversion potential ++ ++ thb=acos(cosb) ++ thc=acos(cosc) ++ thd=acos(cosd) ++ omega=0.5d0*prminv(kk,1)*((thb-prminv(kk,2))**2+ ++ x (thc-prminv(kk,2))**2+(thd-prminv(kk,2))**2)/3.d0 ++ gamvir=0.d0 ++ ++ gamb=0.d0 ++ if(abs(thb).gt.1.d-12) ++ x gamb=prminv(kk,1)*(thb-prminv(kk,2))/(3.d0*sin(thb)) ++ gamc=0.d0 ++ if(abs(thc).gt.1.d-12) ++ x gamc=prminv(kk,1)*(thc-prminv(kk,2))/(3.d0*sin(thc)) ++ gamd=0.d0 ++ if(abs(thd).gt.1.d-12) ++ x gamd=prminv(kk,1)*(thd-prminv(kk,2))/(3.d0*sin(thd)) ++ ++ else if(keyinv(kk).eq.2)then ++ ++c key=2 for harmonic cosine inversion potential ++ ++ omega=0.5d0*prminv(kk,1)*((cosb-prminv(kk,2))**2+ ++ x (cosc-prminv(kk,2))**2+(cosb-prminv(kk,2))**2)/3.d0 ++ gamvir=0.d0 ++ ++ gamb=-prminv(kk,1)*(cosb-prminv(kk,2))/3.d0 ++ gamc=-prminv(kk,1)*(cosc-prminv(kk,2))/3.d0 ++ gamd=-prminv(kk,1)*(cosd-prminv(kk,2))/3.d0 ++ ++ else if(keyinv(kk).eq.3)then ++ ++c key=3 for planar inversion potentials ++ ++ omega=prminv(kk,1)*((1.d0-cosb)+(1.d0-cosc)+(1.d0-cosd))/3.d0 ++ gamvir=0.d0 ++ ++ gamb=prminv(kk,1)/3.d0 ++ gamc=prminv(kk,1)/3.d0 ++ gamd=prminv(kk,1)/3.d0 ++ ++ else if(keyinv(kk).eq.4)then ++ ++c key=4 for planar calcite potential ++ ++ uu2=uuu*uuu ++ omega=uu2*(prminv(kk,1)+prminv(kk,2)*uu2) ++ gamvir=uu2*(2.d0*prminv(kk,1)+4.d0*prminv(kk,2)*uu2) ++ gamma=-uuu*(2.d0*prminv(kk,1)+4.d0*prminv(kk,2)*uu2) ++ ++ else ++ ++c undefined potential ++ ++ safe=.false. ++ gamvir=0.d0 ++ gamb=0.d0 ++ gamc=0.d0 ++ gamd=0.d0 ++ ++ endif ++ ++c indices of bonded atoms ++ ++ ia=listinv(ii,2) ++ ib=listinv(ii,3) ++ ic=listinv(ii,4) ++ id=listinv(ii,5) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ kdrive=driven(ltype(ic)) ++ ldrive=driven(ltype(id)) ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. ++ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ ++ x atm_fre(id).eq.0) ++ ++ if(lsolva)then ++ inv_exc(atmolt(ia))=inv_exc(atmolt(ia))+omega ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. ++ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ inv_fre=inv_fre-omega ++ omega=lambda1*omega ++ gamb=lambda1*gamb ++ gamc=lambda1*gamc ++ gamd=lambda1*gamd ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. ++ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ inv_fre=inv_fre+omega ++ omega=lambda2*omega ++ gamb=lambda2*gamb ++ gamc=lambda2*gamc ++ gamd=lambda2*gamd ++ ++ endif ++ ++ endif ++ ++c calculate bond and u,v scalar products ++ ++ if(.not.lcalcite)then ++ ++ rubc=xab*ucx+yab*ucy+zab*ucz ++ rubd=xab*udx+yab*udy+zab*udz ++ rucd=xac*udx+yac*udy+zac*udz ++ rucb=xac*ubx+yac*uby+zac*ubz ++ rudb=xad*ubx+yad*uby+zad*ubz ++ rudc=xad*ucx+yad*ucy+zad*ucz ++ ++ rvbc=xab*vcx+yab*vcy+zab*vcz ++ rvbd=xab*vdx+yab*vdy+zab*vdz ++ rvcd=xac*vdx+yac*vdy+zac*vdz ++ rvcb=xac*vbx+yac*vby+zac*vbz ++ rvdb=xad*vbx+yad*vby+zad*vbz ++ rvdc=xad*vcx+yad*vcy+zad*vcz ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ enginv=enginv+omega ++ virinv=virinv+gamvir ++ ++c calculate solvation energy ++ ++ if(lsolva)then ++ inv_sol(atmolt(ia))=inv_sol(atmolt(ia))+omega ++ endif ++ ++c calculate atomic forces ++ ++ if(lcalcite)then ++ ++ fax=-gamma*uux ++ fay=-gamma*uuy ++ faz=-gamma*uuz ++ ++ fcx=gamma*uun*((yad*zab-zad*yab)-uuu*(yad*uuz-zad*uuy)) ++ fcy=gamma*uun*((zad*xab-xad*zab)-uuu*(zad*uux-xad*uuz)) ++ fcz=gamma*uun*((xad*yab-yad*xab)-uuu*(xad*uuy-yad*uux)) ++ ++ fdx=gamma*uun*((yab*zac-zab*yac)-uuu*(zac*uuy-yac*uuz)) ++ fdy=gamma*uun*((zab*xac-xab*zac)-uuu*(xac*uuz-zac*uux)) ++ fdz=gamma*uun*((xab*yac-yab*xac)-uuu*(yac*uux-xac*uuy)) ++ ++ fbx=-(fax+fcx+fdx) ++ fby=-(fay+fcy+fdy) ++ fbz=-(faz+fcz+fdz) ++ ++c stress tensor calculation for calcite terms ++ ++ strs(1)=strs(1)+uuu*gamma*uux*uux ++ strs(2)=strs(2)+uuu*gamma*uux*uuy ++ strs(3)=strs(3)+uuu*gamma*uux*uuz ++ strs(4)=strs(4)+uuu*gamma*uuy*uuy ++ strs(5)=strs(5)+uuu*gamma*uuy*uuz ++ strs(6)=strs(6)+uuu*gamma*uuz*uuz ++ ++ else ++ ++ fbx=gamb*(-cosb*xab*rrab**2+rrab*(rub*ubx+rvb*vbx)/wwb) ++ x +(ruc*ucn*rrab*(xac-ruc*ucx-(rbc-ruc*rubc)*xab*rrab**2) ++ x -rvc*vcn*rrab*(xac-rvc*vcx-(rbc-rvc*rvbc)*xab*rrab**2)) ++ x *gamc*rrac/wwc ++ x +(rud*udn*rrab*(xad-rud*udx-(rdb-rud*rubd)*xab*rrab**2) ++ x +rvd*vdn*rrab*(xad-rvd*vdx-(rdb-rvd*rvbd)*xab*rrab**2)) ++ x *gamd*rrad/wwd ++ ++ fby=gamb*(-cosb*yab*rrab**2+rrab*(rub*uby+rvb*vby)/wwb) ++ x +(ruc*ucn*rrab*(yac-ruc*ucy-(rbc-ruc*rubc)*yab*rrab**2) ++ x -rvc*vcn*rrab*(yac-rvc*vcy-(rbc-rvc*rvbc)*yab*rrab**2)) ++ x *gamc*rrac/wwc ++ x +(rud*udn*rrab*(yad-rud*udy-(rdb-rud*rubd)*yab*rrab**2) ++ x +rvd*vdn*rrab*(yad-rvd*vdy-(rdb-rvd*rvbd)*yab*rrab**2)) ++ x *gamd*rrad/wwd ++ ++ fbz=gamb*(-cosb*zab*rrab**2+rrab*(rub*ubz+rvb*vbz)/wwb) ++ x +(ruc*ucn*rrab*(zac-ruc*ucz-(rbc-ruc*rubc)*zab*rrab**2) ++ x -rvc*vcn*rrab*(zac-rvc*vcz-(rbc-rvc*rvbc)*zab*rrab**2)) ++ x *gamc*rrac/wwc ++ x +(rud*udn*rrab*(zad-rud*udz-(rdb-rud*rubd)*zab*rrab**2) ++ x +rvd*vdn*rrab*(zad-rvd*vdz-(rdb-rvd*rvbd)*zab*rrab**2)) ++ x *gamd*rrad/wwd ++ ++ fcx=gamc*(-cosc*xac*rrac**2+rrac*(ruc*ucx+rvc*vcx)/wwc) ++ x +(rud*udn*rrac*(xad-rud*udx-(rcd-rud*rucd)*xac*rrac**2) ++ x -rvd*vdn*rrac*(xad-rvd*vdx-(rcd-rvd*rvcd)*xac*rrac**2)) ++ x *gamd*rrad/wwd ++ x +(rub*ubn*rrac*(xab-rub*ubx-(rbc-rub*rucb)*xac*rrac**2) ++ x +rvb*vbn*rrac*(xab-rvb*vbx-(rbc-rvb*rvcb)*xac*rrac**2)) ++ x *gamb*rrab/wwb ++ ++ fcy=gamc*(-cosc*yac*rrac**2+rrac*(ruc*ucy+rvc*vcy)/wwc) ++ x +(rud*udn*rrac*(yad-rud*udy-(rcd-rud*rucd)*yac*rrac**2) ++ x -rvd*vdn*rrac*(yad-rvd*vdy-(rcd-rvd*rvcd)*yac*rrac**2)) ++ x *gamd*rrad/wwd ++ x +(rub*ubn*rrac*(yab-rub*uby-(rbc-rub*rucb)*yac*rrac**2) ++ x +rvb*vbn*rrac*(yab-rvb*vby-(rbc-rvb*rvcb)*yac*rrac**2)) ++ x *gamb*rrab/wwb ++ ++ fcz=gamc*(-cosc*zac*rrac**2+rrac*(ruc*ucz+rvc*vcz)/wwc) ++ x +(rud*udn*rrac*(zad-rud*udz-(rcd-rud*rucd)*zac*rrac**2) ++ x -rvd*vdn*rrac*(zad-rvd*vdz-(rcd-rvd*rvcd)*zac*rrac**2)) ++ x *gamd*rrad/wwd ++ x +(rub*ubn*rrac*(zab-rub*ubz-(rbc-rub*rucb)*zac*rrac**2) ++ x +rvb*vbn*rrac*(zab-rvb*vbz-(rbc-rvb*rvcb)*zac*rrac**2)) ++ x *gamb*rrab/wwb ++ ++ fdx=gamd*(-cosd*xad*rrad**2+rrad*(rud*udx+rvd*vdx)/wwd) ++ x +(rub*ubn*rrad*(xab-rub*ubx-(rdb-rub*rudb)*xad*rrad**2) ++ x -rvb*vbn*rrad*(xab-rvb*vbx-(rdb-rvb*rvdb)*xad*rrad**2)) ++ x *gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(xac-ruc*ucx-(rcd-ruc*rudc)*xad*rrad**2) ++ x +rvc*vcn*rrad*(xac-rvc*vcx-(rcd-rvc*rvdc)*xad*rrad**2)) ++ x *gamc*rrac/wwc ++ ++ fdy=gamd*(-cosd*yad*rrad**2+rrad*(rud*udy+rvd*vdy)/wwd) ++ x +(rub*ubn*rrad*(yab-rub*uby-(rdb-rub*rudb)*yad*rrad**2) ++ x -rvb*vbn*rrad*(yab-rvb*vby-(rdb-rvb*rvdb)*yad*rrad**2)) ++ x *gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(yac-ruc*ucy-(rcd-ruc*rudc)*yad*rrad**2) ++ x +rvc*vcn*rrad*(yac-rvc*vcy-(rcd-rvc*rvdc)*yad*rrad**2)) ++ x *gamc*rrac/wwc ++ ++ fdz=gamd*(-cosd*zad*rrad**2+rrad*(rud*udz+rvd*vdz)/wwd) ++ x +(rub*ubn*rrad*(zab-rub*ubz-(rdb-rub*rudb)*zad*rrad**2) ++ x -rvb*vbn*rrad*(zab-rvb*vbz-(rdb-rvb*rvdb)*zad*rrad**2)) ++ x *gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(zac-ruc*ucz-(rcd-ruc*rudc)*zad*rrad**2) ++ x +rvc*vcn*rrad*(zac-rvc*vcz-(rcd-rvc*rvdc)*zad*rrad**2)) ++ x *gamc*rrac/wwc ++ ++ fax=-(fbx+fcx+fdx) ++ fay=-(fby+fcy+fdy) ++ faz=-(fbz+fcz+fdz) ++ ++c stress tensor calculation for inversion terms ++ ++ strs(1)=strs(1)+xab*fbx+xac*fcx+xad*fdx ++ strs(2)=strs(2)+yab*fbx+yac*fcx+yad*fdx ++ strs(3)=strs(3)+zab*fbx+zac*fcx+zad*fdx ++ strs(4)=strs(4)+yab*fby+yac*fcy+yad*fdy ++ strs(5)=strs(5)+yab*fbz+yac*fcz+yad*fdz ++ strs(6)=strs(6)+zab*fbz+zac*fcz+zad*fdz ++ ++ endif ++ ++ fxx(ia)=fxx(ia)+fax ++ fyy(ia)=fyy(ia)+fay ++ fzz(ia)=fzz(ia)+faz ++ ++ fxx(ib)=fxx(ib)+fbx ++ fyy(ib)=fyy(ib)+fby ++ fzz(ib)=fzz(ib)+fbz ++ ++ fxx(ic)=fxx(ic)+fcx ++ fyy(ic)=fyy(ic)+fcy ++ fzz(ic)=fzz(ic)+fcz ++ ++ fxx(id)=fxx(id)+fdx ++ fyy(id)=fyy(id)+fdy ++ fzz(id)=fzz(id)+fdz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc+gamvir ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fax ++ fyy_loc(ia)=fyy_loc(ia)+fay ++ fzz_loc(ia)=fzz_loc(ia)+faz ++ ++ fxx_loc(ib)=fxx_loc(ib)+fbx ++ fyy_loc(ib)=fyy_loc(ib)+fby ++ fzz_loc(ib)=fzz_loc(ib)+fbz ++ ++ fxx_loc(ic)=fxx_loc(ic)+fcx ++ fyy_loc(ic)=fyy_loc(ic)+fcy ++ fzz_loc(ic)=fzz_loc(ic)+fcz ++ ++ fxx_loc(id)=fxx_loc(id)+fdx ++ fyy_loc(id)=fyy_loc(id)+fdy ++ fzz_loc(id)=fzz_loc(id)+fdz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xab*fbx+xac*fcx+xad*fdx ++ strs_loc(2)=strs_loc(2)+yab*fbx+yac*fcx+yad*fdx ++ strs_loc(3)=strs_loc(3)+zab*fbx+zac*fcx+zad*fdx ++ strs_loc(4)=strs_loc(4)+yab*fby+yac*fcy+yad*fdy ++ strs_loc(5)=strs_loc(5)+yab*fbz+yac*fcz+yad*fdz ++ strs_loc(6)=strs_loc(6)+zab*fbz+zac*fcz+zad*fdz ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,449) ++ ++c sum contributions over all nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=enginv ++ buffer(2)=virinv ++ buffer(3)=inv_fre ++ buffer(4)=inv_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ enginv=buffer(1) ++ virinv=buffer(2) ++ inv_fre=buffer(3) ++ inv_vir=buffer(4) ++ ++ if(lsolva)then ++ ++ call gdsum(inv_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(inv_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ deallocate (xdab,ydab,zdab,stat=fail1) ++ deallocate (xdac,ydac,zdac,stat=fail2) ++ deallocate (xdad,ydad,zdad,stat=fail3) ++ ++ return ++ end subroutine invfrc ++ ++ end module inversion_module +diff -urN dl_class_1.9.orig/srcmod/lf_motion_module.f dl_class_1.9/srcmod/lf_motion_module.f +--- dl_class_1.9.orig/srcmod/lf_motion_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/lf_motion_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,2994 @@ ++ module lf_motion_module ++ ++c*********************************************************************** ++c ++c dl_poly module for verlet leap frog integration schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use property_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ contains ++ ++ subroutine rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,stresh) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for applying bond constraint corrections after ++c atomic integration. ++c Must be used in conjunction with integration algorithms ++c ++c assume bond vectors dxx,dyy,dzz are input ++c dxx =xxx(i) - xxx(j) etc ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith august 1992. ++c amended - t. forester march 1994. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,icyc,i,j,k ++ real(8) tolnce,tstep,vircon,stresh,dxx,dyy,dzz,strs1,strs2 ++ real(8) strs3,strs5,strs6,strs9,tstep2,esig,esig1 ++ real(8) dis,amti,amtj,omega2,gamma,gammi,gammj,dli,dlj ++ real(8) dxt,dyt,dzt,txx,tyy,tzz,xxt,yyt,zzt ++ ++ dimension stresh(9) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ ++c test size of work arrays ++ ++ safe=.true. ++ if(mxxdf.lt.nscons)safe=.false. ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,412) ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c accumulators for stress tensor ++ ++ vircon=0.d0 ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ safe=.false. ++ ++ do while(.not.safe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate temporary bond vector ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c calculate maximum error in bondlength ++ ++ esig=0.d0 ++ ++ do k=1,nscons ++ ++c set bond parameter ++ ++ dis=prmcon(listcon(k,1)) ++ esig1=abs(dxt(k)**2+dyt(k)**2+dzt(k)**2-dis**2)/dis ++ esig=max(esig,esig1) ++ ++ enddo ++ ++ esig=esig*0.5d0 ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++c bypass calculations if all tolerances satisfied ++ ++ if(.not.safe)then ++ ++c initialise increment arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint forces ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c set constraint parameters ++ ++ dis=prmcon(listcon(k,1)) ++ omega2=dis*dis ++ amti= tstep2/weight(i) ++ amtj=-tstep2/weight(j) ++ ++ if(lstfrz(i).ne.0) amti=0.d0 ++ if(lstfrz(j).ne.0) amtj=0.d0 ++ ++c constraint force parameter ++ ++ gamma=(omega2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/ ++ x (-2.d0*(amti-amtj)* ++ x (dxx(k)*dxt(k)+dyy(k)*dyt(k)+dzz(k)*dzt(k))) ++ ++c accumulate bond virial ++ ++ vircon=vircon+gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ ++ strs1=strs1-gamma*dxx(k)*dxx(k) ++ strs2=strs2-gamma*dxx(k)*dyy(k) ++ strs3=strs3-gamma*dxx(k)*dzz(k) ++ strs5=strs5-gamma*dyy(k)*dyy(k) ++ strs6=strs6-gamma*dyy(k)*dzz(k) ++ strs9=strs9-gamma*dzz(k)*dzz(k) ++ ++c improve approximate atomic positions ++ ++ gammi=-gamma*amti ++ xxt(i)=xxt(i)+dxx(k)*gammi ++ yyt(i)=yyt(i)+dyy(k)*gammi ++ zzt(i)=zzt(i)+dzz(k)*gammi ++ ++ gammj=-gamma*amtj ++ xxt(j)=xxt(j)+dxx(k)*gammj ++ yyt(j)=yyt(j)+dyy(k)*gammj ++ zzt(j)=zzt(j)+dzz(k)*gammj ++ ++ enddo ++ ++c transport temporary positions to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov) call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ dlj=1.d0/dble(listme(j)) ++ ++ xxx(i)=xxx(i)+xxt(i)*dli ++ yyy(i)=yyy(i)+yyt(i)*dli ++ zzz(i)=zzz(i)+zzt(i)*dli ++ xxx(j)=xxx(j)+xxt(j)*dlj ++ yyy(j)=yyy(j)+yyt(j)*dlj ++ zzz(j)=zzz(j)+zzt(j)*dlj ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c error exit for non-convergence ++ ++ if(.not.safe)return ++ ++c complete stress tensor ++ ++ stresh(1)=strs1 ++ stresh(2)=strs2 ++ stresh(3)=strs3 ++ stresh(4)=strs2 ++ stresh(5)=strs5 ++ stresh(6)=strs6 ++ stresh(7)=strs3 ++ stresh(8)=strs6 ++ stresh(9)=strs9 ++ ++c splice coordinate arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(stresh,9,buffer) ++ call splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ return ++ end subroutine rdshake_1 ++ ++ subroutine nve_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,tolnce,tstep,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics. Verlet leapfrog With RD-SHAKE ++c ++c parallel replicated data version : block data ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith august 1992. ++c amended - t.forester sept 1994 ++c amended - t.forester dec 1994 : block data ++c amended - w.smith oct 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,iatm0 ++ integer iatm1,i,j,k ++ real(8) engke,tolnce,tstep,vircon,strkin,rstep ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),fail(7) ++ ++c allocate working arrays ++ ++ do i=1,7 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(7)) ++ do i=1,7 ++ if(fail(i).ne.0)call error(idnode,1380) ++ enddo ++ ++ safe=.false. ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c move atoms by leapfrog algorithm ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c update velocities ++ ++ uxx(i)=vxx(i)+tstep*rmass(i)*fxx(i) ++ uyy(i)=vyy(i)+tstep*rmass(i)*fyy(i) ++ uzz(i)=vzz(i)+tstep*rmass(i)*fzz(i) ++ ++c update positions ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++c calculate velocity correction ++ ++ j=0 ++ rstep=1.d0/tstep ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=(xxx(i)-xxo(j))*rstep ++ uyy(i)=(yyy(i)-yyo(j))*rstep ++ uzz(i)=(zzz(i)-zzo(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=(uxx(i)-vxo(j))*weight(i)*rstep ++ fyy(i)=(uyy(i)-vyo(j))*weight(i)*rstep ++ fzz(i)=(uzz(i)-vzo(j))*weight(i)*rstep ++ ++ enddo ++ ++ endif ++ ++c calculate full timestep velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=0.5d0*(vxx(i)+uxx(i)) ++ vyy(i)=0.5d0*(vyy(i)+uyy(i)) ++ vzz(i)=0.5d0*(vzz(i)+uzz(i)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nve_1 ++ ++ subroutine nvt_e1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,tolnce,tstep,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Evans ++c thermostat. ++c Comp. Phys. reports 1, 299, (1984) ++c ++c parallel replicated data version : block data ++c ++c for systems using bond CONSTRAINTS. ++c ++c copyright - daresbury laboratory ++c author - t forester july 1993 ++c amended - w.smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,iatm0 ++ integer iatm1,i,j,k,iter,mxiter ++ real(8) engke,tolnce,tstep,vircon,strkin ++ real(8) rstep,chit,viracc,strcon,vdotf ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),strcon(9),fail(7) ++ ++c allocate working arrays ++ ++ do i=1,7 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(7)) ++ do i=1,7 ++ if(fail(i).ne.0)call error(idnode,1390) ++ enddo ++ ++ safe=.false. ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial positions and velocities ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c begin temperature control iteration ++ ++ mxiter=3 ++ if(ntcons.eq.0)mxiter=2 ++ chit=0.d0 ++ ++ do iter=1,mxiter ++ ++c move atoms by leapfrog algorithm ++ ++ j=0 ++ ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c update velocities ++ ++ uxx(i)=vxo(j)+tstep*(rmass(i)*fxx(i)-chit*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(rmass(i)*fyy(i)-chit*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(rmass(i)*fzz(i)-chit*vzz(i)) ++ ++c update positions ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c merge configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=(xxx(i)-xxo(j))*rstep ++ uyy(i)=(yyy(i)-yyo(j))*rstep ++ uzz(i)=(zzz(i)-zzo(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=(uxx(i)-vxo(j))*weight(i)*rstep ++ fyy(i)=(uyy(i)-vyo(j))*weight(i)*rstep ++ fzz(i)=(uzz(i)-vzo(j))*weight(i)*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy and evans thermostat parameter ++ ++ engke=0.d0 ++ vdotf=0.d0 ++ do i=iatm0,iatm1 ++ ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ buffer(2)=vdotf ++ call gdsum(buffer(1),2,buffer(3)) ++ engke=buffer(1) ++ vdotf=buffer(2) ++ ++ endif ++ chit=vdotf/engke ++ engke=0.5d0*engke ++ ++c end of thermal constraint iteration ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nvt_e1 ++ ++ subroutine nvt_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,taut,sigma,tolnce,tstep,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat. ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester may 1993 ++c amended : t.forester sept 1994 ++c amended : t.forester dec 1994 : block data ++c amended - w.smith oct 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail ++ integer iatm0,iatm1,i,j,k,maxit,iter ++ real(8) engke,taut,sigma,tolnce,tstep,vircon,strkin,viracc ++ real(8) rstep,rtsq,chit0,strcon ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),fail(8),strcon(9) ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1400) ++ enddo ++ ++ safe=.false. ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c estimate kinetic energy at full timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=3 ++ if(ntcons.eq.0) maxit=maxit-1 ++ do iter=1,maxit ++ ++c temperature scaling coefficient - taut is the decay constant ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++c unconstrained new positions with thermostat ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++c store uncorrected positions ++ ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0.and.iter.eq.1)then ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c calculate kinetic energy ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c estimate velocity at the full step ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nvt_b1 ++ ++ subroutine nvt_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat. ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c copyright - daresbury laboratory ++c author - t. forester may 1993 ++c amended - w.smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,i,j,k ++ integer iatm0,iatm1,maxit,iter ++ real(8) chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon ++ real(8) strkin,rstep,rtsq,qmass,chitp,chit0,viracc ++ real(8) chitnew,strcon ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),fail(8),strcon(9) ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1410) ++ enddo ++ ++ safe=.false. ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c estimate velocities at full time step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy at full time step ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c propagate chit ++ ++ chitp=2.d0*(engke-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=4 ++ if(ntcons.eq.0) maxit=maxit-1 ++ ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-chit0*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-chit0*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-chit0*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++c store uncorrected positions ++ ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0.and.iter.eq.1)then ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c improved prediction of chit ++ ++ chitp=2.d0*(engke-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c update thermostat ++ ++ chit=chitnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*qmass/taut**2 ++ consv=conint+0.5d0*qmass*chit0**2 ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nvt_h1 ++ ++ subroutine npt_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, ++ x tstep,virtot,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat and isotropic pressure control ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version ++c ++c for systems using bond CONSTRAINTS. Frozen atoms feb 1994 ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester dec 1993 ++c amended - w.smith oct 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons ++ integer fail,i,j,k,iatm0,iatm1,maxit,iter ++ real(8) elrc,engke,virlrc,press,taup,taut,sigma,tolnce,tstep ++ real(8) virtot,vircon,volm,strkin,beta,volm0,cell0 ++ real(8) elrc0,virlrc0,rstep,rtsq,psyst,chip0,scale ++ real(8) chit0,viracc,strcon ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),cell0(9),fail(8),strcon(9) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0 ++ ++ data newjob/.true./ ++ data beta/7.3728d-3/ ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1420) ++ enddo ++ ++ safe=.false. ++ ++c store initial values of volume and long range corrections ++ ++ if(newjob)then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1430) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise constraint virial terms ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial cell vectors ++ ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c estimate velocity at full timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy at current timestep ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c pressure control variable - taup is pressure relaxation time ++ ++ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ ++c temperature scaling coefficient - taut is temperature relaxation time ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=5 ++ if(ntcons.eq.0)maxit=maxit-1 ++ ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+scale*xxo(j) ++ yyy(i)=tstep*uyy(i)+scale*yyo(j) ++ zzz(i)=tstep*uzz(i)+scale*zzo(j) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c store integrated positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c estimate new cell tensor ++ ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c improved prediction of chip and chit ++ ++ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c update volume ++ ++ volm=volm*chip0 ++ ++c scale cell vectors - isotropic ++ ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c construct scaling tensor (for use with tethers) ++ ++ do i=2,8 ++ eta(i)=0.d0 ++ enddo ++ eta(1)=scale ++ eta(5)=scale ++ eta(9)=scale ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine npt_b1 ++ ++ subroutine npt_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,chip,chit,conint,consv,elrc,engke,virlrc,press, ++ x taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat+piston. ++c ++c reference: Melchionna, Ciccotti and Holian, ++c Mol Phys 1993, 78, p533 ++c ++c parallel replicated data version ++c ++c for systems using bond constraints (using atomic pressure) ++c ++c copyright daresbury laboratory 1995 ++c author - s. melchionna april 1995 ++c and - t. forester april 1995 ++c amended - w. smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons ++ integer i,j,k,iatm0,iatm1,fail,maxit,iter ++ real(8) chip,chit,conint,consv,elrc,engke,virlrc,press ++ real(8) taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm ++ real(8) strcon,volm0,elrc0,virlrc0,rstep,rtsq,qmass ++ real(8) chipnew,chitp,chitnew,chit0,volnew,scale,viracc,vold ++ real(8) cons1,cons2,cons3,strkin,cell0 ++ real(8) pmass,totmas,chipp,chip0,com,vom ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strcon(9),fail(8),strkin(9),com(3),vom(3),cell0(9) ++ ++ save newjob,volm0,elrc0,virlrc0,cell0,dens0 ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1440) ++ enddo ++ ++ safe=.false. ++ ++c store initial values of volume, long range corrections etc ++ ++ if(newjob)then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1450) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c estimate kinetic energy at current timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c estimate velocity at the full step ++ ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c propagate chip ++ ++ chipp=(2.d0*engke-virtot-vircon-3.d0*press*volm)/pmass- ++ x chit*chip ++ chipnew=chip+tstep*chipp ++ chip0=0.5d0*(chip+chipnew) ++ ++c propagate chit ++ ++ chitp=(2.d0*(engke-sigma)+pmass*chip**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=5 ++ if(ntcons.eq.0) maxit=maxit-1 ++ ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*(uxx(i)+ ++ x chipnew*((xxx(i)+xxo(j))*0.5d0-com(1))) ++ yyy(i)=yyo(j)+tstep*(uyy(i)+ ++ x chipnew*((yyy(i)+yyo(j))*0.5d0-com(2))) ++ zzz(i)=zzo(j)+tstep*(uzz(i)+ ++ x chipnew*((zzz(i)+zzo(j))*0.5d0-com(3))) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c store integrated positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c estimate new cell tensor ++ ++ volnew=volm*exp(3.d0*tstep*chipnew) ++ scale=(volnew/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c improved prediction of chip and chit ++ ++ chipp=(2.d0*engke-virtot-vircon-3.d0*press*volm)/pmass- ++ x chit0*chip0 ++ chipnew=chip+tstep*chipp ++ chip0=0.5d0*(chip+chipnew) ++ ++ chitp=(2.d0*(engke-sigma)+pmass*chip0**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c update volume ++ ++ vold=volm ++ volm=volm*exp(3.d0*tstep*chipnew) ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=2,8 ++ eta(i)=0.d0 ++ enddo ++ eta(1)=chipnew ++ eta(5)=chipnew ++ eta(9)=chipnew ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ chip=chipnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) ++ cons1=0.5d0*qmass*chit0**2 ++ cons2=press*vold ++ cons3=0.5d0*pmass*chip0**2 ++ consv=conint+cons1+cons2+cons3 ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine npt_h1 ++ ++ subroutine nst_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,mode,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, ++ x tstep,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat and anisotropic pressure control ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version ++c ++c for systems using bond CONSTRAINTS. Frozen atoms feb 1994 ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester december 1993 ++c amended - w. smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons,mode ++ integer fail,i,j,k,iatm0,iatm1,maxit,iter ++ real(8) elrc,engke,virlrc,press,taup,taut,sigma,tolnce,tstep ++ real(8) vircon,volm,beta,volm0,elrc0,virlrc0,rstep,rtsq,chit0 ++ real(8) viracc,strkin,strcon,cell0,stres0,uni ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),strcon(9),cell0(9),fail(8),stres0(9),uni(9) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data beta/7.3728d-3/ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1460) ++ enddo ++ ++ safe=.false. ++ ++c store initial values of volume, long range corrections etc ++ ++ if(newjob)then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1470) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store original cell vectors and stress tensor ++ ++ do i=1,9 ++ ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c estimate kinetic energy at current timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c current estimate of stres tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i) ++ enddo ++ ++c initial estimate of eta matrix and chit ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=5 ++ if(ntcons.eq.0)maxit=maxit-1 ++ ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+ ++ x eta(1)*xxo(j)+eta(4)*yyo(j)+eta(7)*zzo(j) ++ yyy(i)=tstep*uyy(i)+ ++ x eta(2)*xxo(j)+eta(5)*yyo(j)+eta(8)*zzo(j) ++ zzz(i)=tstep*uzz(i)+ ++ x eta(3)*xxo(j)+eta(6)*yyo(j)+eta(9)*zzo(j) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c store integrated positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c estimate new cell parameters ++ ++ call mat_mul(eta,cell0,cell) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strcns(i)+strkin(i) ++ enddo ++ ++c improved calculation of eta matrix and chit ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c end of thermostat and barostat iterations ++ ++ enddo ++ ++c update volume ++ ++ volm=volm*eta(1)*eta(5)*eta(9) ++ ++c adjust cell vectors - anisotropic ++ ++ call mat_mul(eta,cell0,cell) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c restore half step velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nst_b1 ++ ++ subroutine nst_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,mode,chit,conint,consv,elrc,engke,virlrc,press, ++ x taup,taut,sigma,temp,tolnce,tstep,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat+piston. ++c ++c Parrinello - Rahman type : changing cell shape. ++c ++c reference: Melchionna, Ciccotti and Holian, ++c Mol Phys 1993, 78, p533 ++c ++c parallel replicated data version ++c ++c for systems using bond constraints (using atomic pressure) ++c ++c copyright daresbury laboratory 1995 ++c author - t. forester june 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons ++ integer fail,i,j,k,iatm0,iatm1,maxit,iter,mode ++ real(8) chip,chit,conint,consv,elrc,engke,virlrc,press ++ real(8) taup,taut,sigma,temp,tolnce,tstep,vircon,volm ++ real(8) strcon,strkin,etanew,eta0,cell0,volm0,elrc0,virlrc0 ++ real(8) rstep,rtsq,pmass,qmass,totmas,com,vom,uni,fac ++ real(8) chitp,chitnew,chit0,xxa,yya,zza,etadot ++ real(8) viracc,cons1,cons2,cons3,vold,stres0 ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),strcon(9),fail(8),com(3),vom(3) ++ dimension etanew(9),eta0(9),cell0(9),stres0(9),uni(9) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0 ++ ++ data newjob/.true./,uni/1.d0,3*0.d0,1.d0,3*0.d0,1.d0/ ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1480) ++ enddo ++ ++ safe=.false. ++ ++c store initial values of volume, long range corrections etc ++ ++ if(newjob)then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1490) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store original cell vectors and stress tensor ++ ++ do i=1,9 ++ ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c estimate kinetic energy at current timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c estimate position at current time step ++ ++ xxx(i)=xxo(j)+tstep*(vxo(j)+tstep*rmass(i)*fxx(i)) ++ yyy(i)=yyo(j)+tstep*(vyo(j)+tstep*rmass(i)*fyy(i)) ++ zzz(i)=zzo(j)+tstep*(vzo(j)+tstep*rmass(i)*fzz(i)) ++ ++c estimate velocity at the full step ++ ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c initial estimate of stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i) ++ enddo ++ ++c propagation of eta ++ ++ fac=9.d0 ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ fac=5.d0 ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ fac=3.d0 ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ fac=2.d0 ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=0.5d0*(etanew(i)+eta(i)) ++ enddo ++ ++c propagate chit ++ ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ chitp=(2.d0*(engke-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=5 ++ if(ntcons.eq.0) maxit=maxit-1 ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(eta0(1)+chit0)*vxx(i)- ++ x eta0(4)*vyy(i)-eta0(7)*vzz(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(eta0(5)+chit0)*vyy(i)- ++ x eta0(2)*vxx(i)-eta0(8)*vzz(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(eta0(9)+chit0)*vzz(i)- ++ x eta0(3)*vxx(i)-eta0(6)*vyy(i)) ++ ++c advance positions using leapfrog ++ ++ xxa=(xxx(i)+xxo(j))*0.5d0-com(1) ++ yya=(yyy(i)+yyo(j))*0.5d0-com(2) ++ zza=(zzz(i)+zzo(j))*0.5d0-com(3) ++ ++ xxx(i)=xxo(j)+tstep*(uxx(i)+ ++ x etanew(1)*xxa+etanew(4)*yya+etanew(7)*zza) ++ yyy(i)=yyo(j)+tstep*(uyy(i)+ ++ x etanew(2)*xxa+etanew(5)*yya+etanew(8)*zza) ++ zzz(i)=zzo(j)+tstep*(uzz(i)+ ++ x etanew(3)*xxa+etanew(6)*yya+etanew(9)*zza) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c store integrated positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c estimate new cell parameters ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ call cell_propagate(tstep,cell,etanew) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strcns(i)+strkin(i) ++ enddo ++ ++c improved prediction of eta ++ ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit0*eta0(i)) ++ enddo ++ if(mode.gt.0)then ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=0.5d0*(etanew(i)+eta(i)) ++ enddo ++ ++c improved prediction of chit ++ ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ chitp=(2.d0*(engke-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ do i=1,9 ++ eta(i)=etanew(i) ++ enddo ++ ++c update volume ++ ++ chip=eta(1)+eta(5)+eta(9) ++ vold=volm ++ volm=volm*exp(tstep*chip) ++ ++c adjust cell vectors - anisotropic ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ call cell_propagate(tstep,cell,eta) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c conserved quantity less kinetic and potential energy ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) ++ cons1=0.5d0*qmass*chit0**2 ++ cons2=press*vold ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ cons3=0.5d0*pmass*etadot ++ consv=conint+cons1+cons2+cons3 ++ ++c restore half step velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nst_h1 ++ ++ end module lf_motion_module +diff -urN dl_class_1.9.orig/srcmod/lf_rotation1_module.f dl_class_1.9/srcmod/lf_rotation1_module.f +--- dl_class_1.9.orig/srcmod/lf_rotation1_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/lf_rotation1_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,5315 @@ ++ module lf_rotation1_module ++ ++c*********************************************************************** ++c ++c dl_poly module 1 for verlet leap frog rotational integration ++c schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use lf_motion_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ contains ++ ++ subroutine update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c*********************************************************************** ++c ++c dlpoly routine to update the quaternion arrays as part of ++c the leapfrog algorithm ++c ++c copyright daresbury laboratory ++c author - w.smith october 2005 ++c based on - t.forester oct. 1993 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safeq ++ integer igrp1,igrp2,jg,itq,ig ++ real(8) qn0,qn1,qn2,qn3,qn0a,qn1a,qn2a,qn3a,qn0b,qn1b,qn2b,qn3b ++ real(8) rnorm,tstep,quattol,eps ++ real(8) opx(msgrp),opy(msgrp),opz(msgrp) ++ real(8) oqx(msgrp),oqy(msgrp),oqz(msgrp) ++ ++ jg=0 ++ safeq=.true. ++ ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c first iteration of new quaternions (lab fixed) ++ ++ qn0=q0(ig)+(-q1(ig)*opx(jg)-q2(ig)*opy(jg)-q3(ig)*opz(jg)) ++ x *tstep*pt5 ++ qn1=q1(ig)+( q0(ig)*opx(jg)-q3(ig)*opy(jg)+q2(ig)*opz(jg)) ++ x *tstep*pt5 ++ qn2=q2(ig)+( q3(ig)*opx(jg)+q0(ig)*opy(jg)-q1(ig)*opz(jg)) ++ x *tstep*pt5 ++ qn3=q3(ig)+(-q2(ig)*opx(jg)+q1(ig)*opy(jg)+q0(ig)*opz(jg)) ++ x *tstep*pt5 ++ ++ qn0b=0.d0 ++ qn1b=0.d0 ++ qn2b=0.d0 ++ qn3b=0.d0 ++ ++ itq=0 ++ eps=1.0d9 ++ do while((itq.lt.mxquat).and.(eps.gt.quattol)) ++ ++ itq=itq+1 ++ ++ qn0a=pt5*(-q1(ig)*opx(jg)-q2(ig)*opy(jg)-q3(ig)*opz(jg)) ++ x +pt5*(-qn1*oqx(jg)-qn2*oqy(jg)-qn3*oqz(jg)) ++ qn1a=pt5*( q0(ig)*opx(jg)-q3(ig)*opy(jg)+q2(ig)*opz(jg)) ++ x + pt5*( qn0*oqx(jg)-qn3*oqy(jg)+qn2*oqz(jg)) ++ qn2a=pt5*( q3(ig)*opx(jg)+q0(ig)*opy(jg)-q1(ig)*opz(jg)) ++ x + pt5*( qn3*oqx(jg)+qn0*oqy(jg)-qn1*oqz(jg)) ++ qn3a=pt5*(-q2(ig)*opx(jg)+q1(ig)*opy(jg)+q0(ig)*opz(jg)) ++ x + pt5*(-qn2*oqx(jg)+qn1*oqy(jg)+qn0*oqz(jg)) ++ ++ qn0=q0(ig)+pt5*qn0a*tstep ++ qn1=q1(ig)+pt5*qn1a*tstep ++ qn2=q2(ig)+pt5*qn2a*tstep ++ qn3=q3(ig)+pt5*qn3a*tstep ++ ++ rnorm=1.d0/sqrt(qn0**2+qn1**2+qn2**2+qn3**2) ++ qn0=qn0*rnorm ++ qn1=qn1*rnorm ++ qn2=qn2*rnorm ++ qn3=qn3*rnorm ++ ++c convergence test ++ ++ eps=sqrt(((qn0a-qn0b)**2+(qn1a-qn1b)**2+(qn2a-qn2b)**2 ++ x +(qn3a-qn3b)**2)*tstep**2) ++ ++ qn0b=qn0a ++ qn1b=qn1a ++ qn2b=qn2a ++ qn3b=qn3a ++ ++ enddo ++ ++ if(itq.ge.mxquat) safeq=.false. ++ ++c store new quaternions ++ ++ q0(ig)=qn0 ++ q1(ig)=qn1 ++ q2(ig)=qn2 ++ q3(ig)=qn3 ++ ++ enddo ++ ++ return ++ end subroutine update_quaternions ++ ++ subroutine nveq_1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame ++c omx,omy,omz = angular velocity in body fixed frame (principal axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newjob ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer fail,i,igrp,igrp1,igrp2,idum,ifre1,ifre2,j,ifre ++ integer jg,ig,k,id,jr ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) strkin,rot,rstep,rtsq,engtrn,vaa,vbb,vcc ++ real(8) trx,try,trz,delx,dely,delz,engfke ++ real(8) strgrp,tqx,tqy,tqz,fmx,fmy,fmz ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension strkin(9),strgrp(9),rot(9),fail(nnn) ++ ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(12)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1500) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(i)=vxo(j)+tstep*rmass(i)*fxx(i) ++ uyy(i)=vyo(j)+tstep*rmass(i)*fyy(i) ++ uzz(i)=vzo(j)+tstep*rmass(i)*fzz(i) ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++c calculate force and velocity corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational rigid body motion ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) ++ uyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) ++ uzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcmx(ig)+tstep*uxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*uyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*uzz(ig) ++ ++c estimate velocity at full time step ++ ++ gvxx(ig)=0.5d0*(gvxx(ig)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyy(ig)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzz(ig)+uzz(ig)) ++ ++ enddo ++ ++c calculate rigid body translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c total translational kinetic energy ++ ++ engke=engtrn+engfke ++ ++c calculate rigid body kinetic stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore rigid body half timestep velocity ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx=0.d0 ++ tqy=0.d0 ++ tqz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx=tqx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy=tqy+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz=tqz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c store current angular velocity ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx*rot(1)+tqy*rot(4)+tqz*rot(7))*rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) ++ try=(tqx*rot(2)+tqy*rot(5)+tqz*rot(8))*rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) ++ trz=(tqx*rot(3)+tqy*rot(6)+tqz*rot(9))*rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+delx*pt5 ++ opy(jg)=omy(ig)+dely*pt5 ++ opz(jg)=omz(ig)+delz*pt5 ++ ++ enddo ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omx(ig)+delx ++ uyy(ig)=omy(ig)+dely ++ uzz(ig)=omz(ig)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omx(ig)+delx*1.5d0 ++ oqy(jg)=omy(ig)+dely*1.5d0 ++ oqz(jg)=omz(ig)+delz*1.5d0 ++ ++c angular velocity at timestep n ++ ++ omx(ig)=omx(ig)+pt5*delx ++ omy(ig)=omy(ig)+pt5*dely ++ omz(ig)=omz(ig)+pt5*delz ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies - relative to c.o.m ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate(opx,opy,opz,xxt,yyt,zzt,stat=fail(1)) ++ deallocate(oqx,oqy,oqz,dtx,dty,dtz,stat=fail(2)) ++ deallocate(dxx,dyy,dzz,uxx,uyy,uzz,stat=fail(3)) ++ deallocate(txx,tyy,tzz,dxt,dyt,dzt,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,xx1,yy1,zz1,stat=fail(5)) ++ deallocate(vxo,vyo,vzo,gcxo,gcyo,gczo,stat=fail(6)) ++ ++ return ++ end subroutine nveq_1 ++ ++ subroutine nvtq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, ++ x tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat. ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame ++c omx,omy,omz = angular velocity in body fixed frame (principle axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,safeq,newjob ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer i,fail,igrp,igrp1,igrp2,ifre,ifre1,ifre2,jg,ig ++ integer j,k,jr,id,mxiter,iter,idum ++ real(8) engke,engrot,quattol,sigma,taut,tolnce,tstep,vircom ++ real(8) vircon,strkin,strgrp,rot,rstep,rtsq ++ real(8) engtrn,trx,try,trz,chit0,rgmas,engfke ++ real(8) vaa,vbb,vcc,engtot,viracc,strcon ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++ dimension strkin(9),strgrp(9),strcon(9),rot(9),fail(nnn) ++ ++ save igrp1,igrp2,ifre1,ifre2,newjob ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1510) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c initialise constraint virial terms ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacements ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c estimate velocity and temperature at half-time step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate kinetic energy of rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translation kinetic energy of rigid bodies ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rigid body rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c temperature scaling coefficient - taut is the relaxation time ++ ++ engtot=engfke+engrot+engtrn ++ chit0= sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=2 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+xxo(j) ++ yyy(i)=tstep*vyy(i)+yyo(j) ++ zzz(i)=tstep*uzz(i)+zzo(j) ++ ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0.and.iter.eq.1) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate force and velocity corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ if(iter.eq.mxiter)call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ********: rigid body motion - thermostated :************ ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 ++ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 ++ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 ++ ++c update positions ++ ++ gcmx(ig)=gcxo(jg)+tstep*uxx(ig) ++ gcmy(ig)=gcyo(jg)+tstep*uyy(ig) ++ gcmz(ig)=gczo(jg)+tstep*uzz(ig) ++ ++c calculate full step velocities ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 ++ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 ++ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 ++ uyy(ig)=(omyo(jg)+tstep*try)*chit0 ++ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 ++ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 ++ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 ++ ++ enddo ++ ++c calculate rigid body rotational energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c total translational kinetic energy ++ ++ engke=engtrn+engfke ++ ++c total kinetic energy ++ ++ engtot=engke+engrot ++ ++c improved prediction of chit ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c end of thermostat/barostat iterations ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nvtq_b1 ++ ++ subroutine nvtq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,chit,consv,conint,engke,engrot,quattol, ++ x sigma,taut,tolnce,tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat. ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame ++c omx,omy,omz = angular velocity in body fixed frame (principle axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,safeq,newjob ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer fail,i,idum,igrp,igrp1,igrp2,ifre,ifre1,ifre2 ++ integer j,k,ig,jg,jr,id,iter,mxiter ++ real(8) chit,consv,conint,engke,engrot,quattol,sigma,taut ++ real(8) tolnce,tstep,vircom,vircon,strkin,strgrp,strcon,rot ++ real(8) rstep,rtsq,qmass,engtrn,cons1,engtot,vaa,vbb,vcc ++ real(8) chit0,chitnew,chitp,viracc,rgmas,trx,try,trz,delx ++ real(8) dely,delz,engfke ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension strkin(9),strgrp(9),strcon(9),rot(9),fail(nnn) ++ ++ save igrp1,igrp2,ifre1,ifre2,qmass,newjob ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1520) ++ enddo ++ ++ if(newjob)then ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c initialise constraint virial terms ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacements ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c estimate velocity and temperature at half-time step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate kinetic energy of rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translation kinetic energy of rigid bodies ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rigid body rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c propagate chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chitp=2.d0*(engtot-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=4 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-chit0*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-chit0*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-chit0*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0.and.iter.eq.1) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate force and velocity corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++ if(iter.eq.mxiter)then ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++ endif ++ ++c ********: rigid body motion - thermostated :************ ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas-chit0*gvxx(ig)) ++ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas-chit0*gvyy(ig)) ++ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas-chit0*gvzz(ig)) ++ ++c update positions ++ ++ gcmx(ig)=gcxo(jg)+tstep*uxx(ig) ++ gcmy(ig)=gcyo(jg)+tstep*uyy(ig) ++ gcmz(ig)=gczo(jg)+tstep*uzz(ig) ++ ++c calculate full step velocities ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ if(iter.eq.mxiter)then ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++ endif ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ safeq=.true. ++ engrot=0.d0 ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omxo(jg)+delx ++ uyy(ig)=omyo(jg)+dely ++ uzz(ig)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c calculate rigid body rotational energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c improved prediction of chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chitp=2.d0*(engtot-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update thermostat variable ++ ++ chit=chitnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*qmass/taut**2 ++ cons1=0.5d0*qmass*chit0**2 ++ consv=conint+cons1 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nvtq_h1 ++ ++ subroutine nptq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,virtot,vircom, ++ x vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat and barostat. ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principl axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob,safeq ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ntpatm,i,fail,igrp,igrp1,igrp2,idum,ifre,ifre1 ++ integer ifre2,j,jg,ig,jr,k,id,iter,mxiter ++ real(8) elrc,engke,engrot,virlrc,press,quattol,sigma,taup,taut ++ real(8) tolnce,tstep,virtot,vircom,vircon,volm,rot,engfke,uni ++ real(8) cell0,beta,volm0,elrc0,virlrc0,rstep,rtsq ++ real(8) engtrn,trx,try,trz,chip0,scale,engtot,chit0,viracc,czero ++ real(8) rgmas,vaa,vbb,vcc,strkin,strcon,strgrp,psyst ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension fail(nnn),rot(9),cell0(9),czero(9),uni(9) ++ dimension strcon(9),strgrp(9),strkin(9) ++ ++ save newjob,volm0,elrc0,virlrc0,cell0,dens0,igrp1,igrp2 ++ save ifre1,ifre2 ++ ++ data newjob/.true./,beta/7.3728d-3/ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1530) ++ enddo ++ ++ if(newjob) then ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1540) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c constraint stress tensor accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c current cell vectors ++ ++ do i=1,9 ++ czero(i)=cell(i) ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacements ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c estimate velocity and temperature at half-time step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate kinetic energy of rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translation kinetic energy of rigid bodies ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rigid body rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c pressure control variable - taup is the relaxation time ++ ++ engke=engfke+engtrn ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ ++c temperature scaling coefficient - taut is the relaxation time ++ ++ engtot=engke+engrot ++ chit0= sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=5 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+scale*xxo(j) ++ yyy(i)=tstep*uyy(i)+scale*yyo(j) ++ zzz(i)=tstep*uzz(i)+scale*zzo(j) ++ ++ enddo ++ ++c estimate new cell tensor ++ ++ do i=1,9 ++ cell(i)=scale*czero(i) ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate force correction ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ if(iter.eq.mxiter)call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ********: rigid body motion - thermostated :************ ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 ++ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 ++ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 ++ ++c update positions : ++ ++ gcmx(ig)=scale*gcxo(jg)+tstep*uxx(ig) ++ gcmy(ig)=scale*gcyo(jg)+tstep*uyy(ig) ++ gcmz(ig)=scale*gczo(jg)+tstep*uzz(ig) ++ ++c calculate full step velocities ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 ++ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 ++ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 ++ uyy(ig)=(omyo(jg)+tstep*try)*chit0 ++ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 ++ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 ++ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 ++ ++ enddo ++ ++c calculate rigid body rotational energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c total translational kinetic energy ++ ++ engke=engtrn+engfke ++ ++c total kinetic energy ++ ++ engtot=engke+engrot ++ ++c improved pressure control variable ++ ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ ++c improved temperature scaling coefficient ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c end of thermostat/barostat iterations ++ ++ enddo ++ ++c scale cell vectors ++ ++ scale=((chip0*volm)/volm0)**(1.d0/3.d0) ++ ++ do i=1,9 ++ cell(i)=scale*cell0(i) ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=1,9 ++ eta(i)=scale*uni(i) ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nptq_b1 ++ ++ subroutine nptq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,virtot,vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat and barostat (Melchionna et al variant) ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principl axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newjob ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ntpatm,fail,i,igrp,igrp1,igrp2,ifre,ifre1,ifre2 ++ integer j,k,ig,jg,jr,id,iter,mxiter,idum ++ real(8) chip,chit,consv,conint,elrc,engke,engrot,virlrc,press ++ real(8) quattol,sigma,taup,taut,temp,tolnce,tstep,virtot,vircom ++ real(8) vircon,volm,cell0,rot,volm0,elrc0,rtsq,uni ++ real(8) virlrc0,strkin,rstep,qmass,pmass,strgrp,strcon ++ real(8) trx,try,trz,chipp,chipnew,chip0,engtot,chitp ++ real(8) chitnew,chit0,volnew,scale,viracc,rgmas ++ real(8) vaa,vbb,vcc,vold,cons1,cons2,cons3,delx,dely,delz ++ real(8) engtrn,totmas,com,vom,engfke ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension fail(nnn),rot(9),cell0(9),uni(9) ++ dimension strkin(9),strcon(9),strgrp(9),com(3),vom(3) ++ ++ save newjob,volm0,elrc0,virlrc0,cell0,dens0,pmass,qmass ++ save igrp1,igrp2,ifre1,ifre2,totmas ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1550) ++ enddo ++ ++ if(newjob) then ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1560) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c temporary stress tensor accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++c correction to velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacements ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c estimate velocity at full step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate kinetic energy of rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translation kinetic energy of rigid bodies ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rigid body rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c propagate chip ++ ++ engke=engfke+engtrn ++ chipp=(2.d0*engke-virtot-vircon-vircom-3.d0*press*volm)/pmass- ++ x chit*chip ++ chipnew=chip+tstep*chipp ++ chip0=0.5d0*(chip+chipnew) ++ ++c propagate chit ++ ++ engtot=engke+engrot ++ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=5 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*(uxx(i)+ ++ x chipnew*((xxx(i)+xxo(j))*0.5d0-com(1))) ++ yyy(i)=yyo(j)+tstep*(uyy(i)+ ++ x chipnew*((yyy(i)+yyo(j))*0.5d0-com(2))) ++ zzz(i)=zzo(j)+tstep*(uzz(i)+ ++ x chipnew*((zzz(i)+zzo(j))*0.5d0-com(3))) ++ ++ enddo ++ ++c estimate new cell parameters ++ ++ volnew=volm*exp(3.d0*tstep*chipnew) ++ scale=(volnew/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate force correction ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ if(iter.eq.mxiter)then ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++ endif ++ ++c ********: rigid body motion - thermostated :*********** ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas-(chit0+chip0)* ++ x gvxx(ig)) ++ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas-(chit0+chip0)* ++ x gvyy(ig)) ++ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas-(chit0+chip0)* ++ x gvzz(ig)) ++ ++c advance positions using leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*(uxx(ig)+ ++ x chipnew*((gcmx(ig)+gcxo(jg))*0.5d0-com(1))) ++ gcmy(ig)=gcyo(jg)+tstep*(uyy(ig)+ ++ x chipnew*((gcmy(ig)+gcyo(jg))*0.5d0-com(2))) ++ gcmz(ig)=gczo(jg)+tstep*(uzz(ig)+ ++ x chipnew*((gcmz(ig)+gczo(jg))*0.5d0-com(3))) ++ ++c calculate full step velocities ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate kinetic energy and stress tensor ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omxo(jg)+delx ++ uyy(ig)=omyo(jg)+dely ++ uzz(ig)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c calculate rigid body rotational energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c improved prediction of chip ++ ++ engke=engfke+engtrn ++ chipp=(2.d0*engke-virtot-vircom-vircon-3.d0*press*volm)/pmass- ++ x chit0*chip0 ++ chipnew=chip+tstep*chipp ++ chip0=0.5d0*(chip+chipnew) ++ ++c improved prediction of chit ++ ++ engtot=engke+engrot ++ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update volume ++ ++ vold=volm ++ volm=volm*exp(3.d0*tstep*chipnew) ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=1,9 ++ eta(i)=chipnew*uni(i) ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ chip=chipnew ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) ++ cons1=0.5d0*qmass*chit0**2 ++ cons2=press*vold ++ cons3=0.5d0*pmass*chip0**2 ++ consv=conint+cons1+cons2+cons3 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nptq_h1 ++ ++ subroutine nstq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat and barostat. (cell may change shape). ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principl axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob,safeq ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ntpatm,fail,i,idum,igrp,igrp1,igrp2,ifre,ifre1,mode ++ integer ifre2,j,k,ig,jg,jr,id,iter,mxiter ++ real(8) elrc,engke,engrot,virlrc,press,quattol,sigma,taup,taut ++ real(8) tolnce,tstep,vircom,vircon,volm,beta,uni,cell0 ++ real(8) volm0,elrc0,virlrc0,rot,rstep,rtsq,engfke ++ real(8) engtrn,trx,try,trz,engtot,chit0,rgmas ++ real(8) vaa,vbb,vcc,viracc,strkin,strcon,strgrp,stres0 ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension strkin(9),strcon(9),strgrp(9),stres0(9),rot(9) ++ dimension fail(nnn),uni(9),cell0(9) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0 ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./, beta/7.3728d-3/ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxxdf),yyo(mxxdf),zzo(mxxdf),stat=fail(9)) ++ allocate (xx1(mxxdf),yy1(mxxdf),zz1(mxxdf),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1570) ++ enddo ++ ++ if(newjob) then ++ ++c store initial values of volume, long range corrections etc ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1580) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe= (igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c temporary stress tensor accumulators and new cell ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++c construct current bond vectors - required by shake ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from coms ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c estimate velocity at half-time step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c estimate kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c stress tensor of free atoms ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c estimate translational kinetic energy of rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c forces on centre of mass ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translational kinetic energy of rigid body ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c stress tensor of rigid body ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c calculate rotational kinetic energy of rigid bodies ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c find eta - taup is the relaxation time ++ ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c temperature scaling coefficient - taut is the relaxation time ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=5 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+eta(1)*xxo(j)+eta(4)*yyo(j)+eta(7)*zzo(j) ++ yyy(i)=tstep*uyy(i)+eta(2)*xxo(j)+eta(5)*yyo(j)+eta(8)*zzo(j) ++ zzz(i)=tstep*uzz(i)+eta(3)*xxo(j)+eta(6)*yyo(j)+eta(9)*zzo(j) ++ ++ enddo ++ ++c estimate new cell tensor ++ ++ call mat_mul(eta,cell0,cell) ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate current stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ if(iter.eq.mxiter)then ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++ endif ++ ++c ********: rigid body motion - thermostated :*********** ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 ++ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 ++ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 ++ ++c update positions : ++ ++ gcmx(ig)=tstep*uxx(ig)+eta(1)*gcxo(jg)+eta(4)*gcyo(jg)+ ++ x eta(7)*gczo(jg) ++ gcmy(ig)=tstep*uyy(ig)+eta(2)*gcxo(jg)+eta(5)*gcyo(jg)+ ++ x eta(8)*gczo(jg) ++ gcmz(ig)=tstep*uzz(ig)+eta(3)*gcxo(jg)+eta(6)*gcyo(jg)+ ++ x eta(9)*gczo(jg) ++ ++c full step com velocity ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate rigid body kinetic energy and stress tensor ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 ++ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 ++ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 ++ uyy(ig)=(omyo(jg)+tstep*try)*chit0 ++ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 ++ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 ++ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c complete stress tensor - add all contributions ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) ++ enddo ++ ++c improved prediction of eta and chit ++ ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c end of thermostat/barostat iterations ++ ++ enddo ++ ++c update cell vectors ++ ++ call mat_mul(eta,cell0,cell) ++ ++c update volume ++ ++ volm=volm*eta(1)*eta(5)*eta(9) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nstq_b1 ++ ++ subroutine nstq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke,engrot, ++ x virlrc,press,quattol,sigma,taup,taut,temp,tolnce,tstep, ++ x vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover like ++c thermostat and barostat. (cell may change shape). ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principle axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob,safeq ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ntpatm,fail,i,igrp,igrp1,igrp2,ifre,ifre1,ifre2 ++ integer j,k,ig,jg,jr,id,iter,mxiter,idum,mode ++ real(8) chit,conint,consv,elrc,engke,engrot,virlrc,press,quattol ++ real(8) sigma,taup,taut,temp,tolnce,tstep,vircom,vircon,volm ++ real(8) strkin,strcon,strgrp,eta0,etanew,rot,cell0,volm0,stres0 ++ real(8) elrc0,virlrc0,rstep,rtsq,qmass,pmass,totmas ++ real(8) engtrn,trx,try,trz,engtot,engfke,fac,etadot ++ real(8) chitp,chitnew,chit0,xxa,yya,zza,viracc,rgmas,uni ++ real(8) delx,dely,delz,vold,cons1,cons2,cons3 ++ real(8) vaa,vbb,vcc,chip,com,vom ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension eta0(9),etanew(9),rot(9),cell0(9),fail(nnn),uni(9) ++ dimension strkin(9),strcon(9),strgrp(9),stres0(9),com(3),vom(3) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0,pmass,qmass,totmas ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1590) ++ enddo ++ ++ if(newjob) then ++ ++c store initial values of volume, long range corrections etc ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1600) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c calculate total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c initialise stress tensor accumulators ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++c correction to velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c estimate velocity at full step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c estimate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c estimate rigid body translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep/gmass(id)*fmx(jg) ++ gvyy(ig)=gvyo(jg)+pt5*tstep/gmass(id)*fmy(jg) ++ gvzz(ig)=gvzo(jg)+pt5*tstep/gmass(id)*fmz(jg) ++ ++ enddo ++ ++c rigid body translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c rigid body stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate rgid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velcoity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c calculate rotational kinetic energy of rigid bodies ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c propagate eta ++ ++ fac=9.d0 ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ fac=5.d0 ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ fac=3.d0 ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ fac=2.d0 ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=0.5d0*(etanew(i)+eta(i)) ++ enddo ++ ++c propagate chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=5 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)- ++ x (chit0+eta0(1))*vxx(i)-eta0(4)*vyy(i)-eta0(7)*vzz(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)- ++ x eta0(2)*vxx(i)-(eta0(5)+chit0)*vyy(i)-eta0(8)*vzz(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)- ++ x eta0(3)*vxx(i)-eta0(6)*vyy(i)-(eta0(9)+chit0)*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxa=(xxx(i)+xxo(j))*0.5d0-com(1) ++ yya=(yyy(i)+yyo(j))*0.5d0-com(2) ++ zza=(zzz(i)+zzo(j))*0.5d0-com(3) ++ ++ xxx(i)=xxo(j)+tstep*(uxx(i)+ ++ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) ++ yyy(i)=yyo(j)+tstep*(uyy(i)+ ++ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) ++ zzz(i)=zzo(j)+tstep*(uzz(i)+ ++ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) ++ ++ enddo ++ ++c estimate new cell parameters ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ call cell_propagate(tstep,cell,etanew) ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free half step velocity ++ ++ if(iter.eq.mxiter)then ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++ endif ++ ++c ********: rigid body motion - thermostated :*********** ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas- ++ x (chit0+eta0(1))*gvxx(ig)-eta0(4)*gvyy(ig)-eta0(7)*gvzz(ig)) ++ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas- ++ x eta0(2)*gvxx(ig)-(eta0(5)+chit0)*gvyy(ig)-eta0(8)*gvzz(ig)) ++ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas- ++ x eta0(3)*gvxx(ig)-eta0(6)*gvyy(ig)-(eta0(9)+chit0)*gvzz(ig)) ++ ++c advance positions using leapfrog ++ ++ xxa=(gcmx(ig)+gcxo(jg))*0.5d0-com(1) ++ yya=(gcmy(ig)+gcyo(jg))*0.5d0-com(2) ++ zza=(gcmz(ig)+gczo(jg))*0.5d0-com(3) ++ ++ gcmx(ig)=gcxo(jg)+tstep*(uxx(ig)+ ++ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) ++ gcmy(ig)=gcyo(jg)+tstep*(uyy(ig)+ ++ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) ++ gcmz(ig)=gczo(jg)+tstep*(uzz(ig)+ ++ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) ++ ++c full step com velocity ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate rigid body kinetic energy and stress tensor ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ if(iter.eq.mxiter)then ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++ endif ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omxo(jg)+delx ++ uyy(ig)=omyo(jg)+dely ++ uzz(ig)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c complete stress tensor - add all contributions ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) ++ enddo ++ ++c improved prediction of eta and chit ++ ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit0*eta0(i)) ++ enddo ++ if(mode.gt.0)then ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=0.5d0*(etanew(i)+eta(i)) ++ enddo ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat/barostat iterations ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ do i=1,9 ++ eta(i)=etanew(i) ++ enddo ++ ++c update volume ++ ++ chip=eta(1)+eta(5)+eta(9) ++ vold=volm ++ volm=volm*exp(tstep*chip) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c conserved quantity less kinetic and potential energy ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) ++ cons1=0.5d0*qmass*chit0**2 ++ cons2=press*vold ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ cons3=0.5d0*pmass*etadot ++ consv=conint+cons1+cons2+cons3 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nstq_h1 ++ ++ end module lf_rotation1_module +diff -urN dl_class_1.9.orig/srcmod/lf_rotation2_module.f dl_class_1.9/srcmod/lf_rotation2_module.f +--- dl_class_1.9.orig/srcmod/lf_rotation2_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/lf_rotation2_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,5007 @@ ++ module lf_rotation2_module ++ ++c*********************************************************************** ++c ++c dl_poly module 2 for verlet leap frog rotational integration ++c schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use lf_rotation1_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ contains ++ ++ subroutine nveq_2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principal axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) rot,strkin,strcon,strgrp,engfke,engtrn ++ real(8) delx,dely,delz,trx,try,trz,vaa,vbb,vcc,viracc ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ ++ save newjob,igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1620) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c accumulators for constraint and virial stress tensor ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c start of shake cycle ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=1 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(j)=vxo(j)+tstep*rmass(i)*fxx(i) ++ uyy(j)=vyo(j)+tstep*rmass(i)*fyy(i) ++ uzz(j)=vzo(j)+tstep*rmass(i)*fzz(i) ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(i)+tstep*uxx(j) ++ yyy(i)=yyo(i)+tstep*uyy(j) ++ zzz(i)=zzo(i)+tstep*uzz(j) ++ ++c estimate full step velocities ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(jg)=gvxo(jg)+tstep/gmass(id)*fmx(jg) ++ uyy(jg)=gvyo(jg)+tstep/gmass(id)*fmy(jg) ++ uzz(jg)=gvzo(jg)+tstep/gmass(id)*fmz(jg) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*uxx(jg) ++ gcmy(ig)=gcyo(jg)+tstep*uyy(jg) ++ gcmz(ig)=gczo(jg)+tstep*uzz(jg) ++ ++c centre of mass velocities at full step ++ ++ gvxx(ig)=pt5*(uxx(jg)+gvxo(jg)) ++ gvyy(ig)=pt5*(uyy(jg)+gvyo(jg)) ++ gvzz(ig)=pt5*(uzz(jg)+gvzo(jg)) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++ opx(jg)=omxo(jg)+delx*pt5 ++ opy(jg)=omyo(jg)+dely*pt5 ++ opz(jg)=omzo(jg)+delz*pt5 ++ ++ enddo ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=omxo(jg)+delx ++ uyy(jg)=omyo(jg)+dely ++ uzz(jg)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++c angular velocity at time step n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c total kinetic energy ++ ++ engke=engfke+engtrn ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,fmx,fmy,fmz,stat=fail(5)) ++ deallocate (tqx,tqy,tqz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nveq_2 ++ ++ subroutine nvtq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, ++ x tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Berendsen thermostat. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,engfke ++ real(8) rot,strkin,strgrp,strcon,engtrn,trx,try,trz ++ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,engtot,chit0 ++ real(8) sigma,taut ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ ++ save chit0,igrp1,igrp2,ifre1,ifre2,newjob ++ ++ data chit0/1.d0/,newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1630) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c accumulators for constraint stress and virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c shake and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=2 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(i)+tstep*uxx(j) ++ yyy(i)=yyo(i)+tstep*uyy(j) ++ zzz(i)=zzo(i)+tstep*uzz(j) ++ ++c calculate full time velocity ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c update centre of mass velocities ++ ++ gvxx(ig)=gvxo(jg)+tstep/gmass(id)*fmx(jg) ++ gvyy(ig)=gvyo(jg)+tstep/gmass(id)*fmy(jg) ++ gvzz(ig)=gvzo(jg)+tstep/gmass(id)*fmz(jg) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c advance velocity by leapfrog ++ ++ gvxx(ig)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 ++ gvyy(ig)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 ++ gvzz(ig)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=gcyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=gczo(jg)+tstep*gvzz(ig) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++ opx(jg)=(omxo(jg)+delx*pt5) ++ opy(jg)=(omyo(jg)+dely*pt5) ++ opz(jg)=(omzo(jg)+delz*pt5) ++ ++ enddo ++ ++c scaled angular velocity at timestep n ++ ++ omx(ig)=opx(jg)*chit0 ++ omy(ig)=opy(jg)*chit0 ++ omz(ig)=opz(jg)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 ++ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 ++ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 ++ ++c angular velocity at full time step ++ ++ uxx(jg)=(omxo(jg)+delx)*chit0 ++ uyy(jg)=(omyo(jg)+dely)*chit0 ++ uzz(jg)=(omzo(jg)+delz)*chit0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c new estimate of chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nvtq_b2 ++ ++ subroutine nvtq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,conint,consv,chit,engke,engrot,quattol, ++ x sigma,taut,tolnce,tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Hoover thermostat. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principal axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,engtot ++ real(8) rot,strkin,strcon,strgrp,engtrn,engfke,trx,try,trz ++ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,sigma,taut,chit0 ++ real(8) chitnew,chitp,conint,consv,chit,qmass ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ ++ save newjob,igrp1,igrp2,ifre1,ifre2,qmass ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1640) ++ enddo ++ ++ if(newjob)then ++ ++c mass parameters for thermostat ++ ++ qmass=2.d0*sigma*taut**2 ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atoms displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c initial thermostat variable ++ ++ chit0=chit ++ ++c accumulators for constraint stress and virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c shake iterations and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=3 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0)* ++ x pt5*(vxx(i)+vxo(j))) ++ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0)* ++ x pt5*(vyy(i)+vyo(j))) ++ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0)* ++ x pt5*(vzz(i)+vzo(j))) ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(i)+tstep*uxx(j) ++ yyy(i)=yyo(i)+tstep*uyy(j) ++ zzz(i)=zzo(i)+tstep*uzz(j) ++ ++c estimate full step velocities ++ ++ vxx(i)=pt5*(vxo(j)+uxx(j)) ++ vyy(i)=pt5*(vyo(j)+uyy(j)) ++ vzz(i)=pt5*(vzo(j)+uzz(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)-chit0* ++ x pt5*(gvxx(ig)+gvxo(jg))) ++ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)-chit0* ++ x pt5*(gvyy(ig)+gvyo(jg))) ++ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)-chit0* ++ x pt5*(gvzz(ig)+gvzo(jg))) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*uxx(jg) ++ gcmy(ig)=gcyo(jg)+tstep*uyy(jg) ++ gcmz(ig)=gczo(jg)+tstep*uzz(jg) ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omxo(jg)+pt5*tstep*trx ++ opy(jg)=omyo(jg)+pt5*tstep*try ++ opz(jg)=omzo(jg)+pt5*tstep*trz ++ ++ enddo ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=omxo(jg)+delx ++ uyy(jg)=omyo(jg)+dely ++ uzz(jg)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c new estimate of chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chitp=2.d0*(engtot-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=pt5*(chit+chitnew) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10.and.icyc.gt.3)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c update thermostat variable ++ ++ chit=chitnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*qmass/taut**2 ++ consv=conint+pt5*qmass*chit0**2 ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nvtq_h2 ++ ++ subroutine nptq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon, ++ x virtot,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Berendsen thermostat and barostat. ++c (cell may change volume) ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith sep 1999 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) rot,strkin,strgrp,strcon,engtrn,engfke,trx,try,trz ++ real(8) delx,dely,delz,czero ++ real(8) vaa,vbb,vcc,viracc,beta,elrc,virlrc,press,engtot ++ real(8) sigma,taup,taut,virtot,volm,cell0,elrc0,virlrc0 ++ real(8) chit0,volm0,chip0,psyst,scale ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ dimension cell0(9),czero(9) ++ ++ save newjob,volm0,elrc0,virlrc0,czero,chit0,chip0,dens0 ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./ ++ data beta/7.3728d-3/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1670) ++ enddo ++ ++c store initial values of volume and long range corrections ++ ++ if(newjob) then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1660) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ do i=1,9 ++ czero(i)=cell(i) ++ enddo ++ newjob=.false. ++ ++ chit0=1.d0 ++ chip0=1.d0 ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c set constraint stress and virial and inital cell vectors ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c length scaling parameter ++ ++ scale=chip0**(1.d0/3.d0) ++ ++c shake iterations and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=3 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore cell vectors ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(i)*scale+tstep*uxx(j) ++ yyy(i)=yyo(i)*scale+tstep*uyy(j) ++ zzz(i)=zzo(i)*scale+tstep*uzz(j) ++ ++c estimate full step velocity ++ ++ vxx(i)=pt5*(vxo(j)+uxx(j)) ++ vyy(i)=pt5*(vyo(j)+uyy(j)) ++ vzz(i)=pt5*(vzo(j)+uzz(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(jg)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 ++ uyy(jg)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 ++ uzz(jg)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)*scale+tstep*uxx(jg) ++ gcmy(ig)=gcyo(jg)*scale+tstep*uyy(jg) ++ gcmz(ig)=gczo(jg)*scale+tstep*uzz(jg) ++ ++c centre of mass velocities at full step ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=(omxo(jg)+pt5*delx) ++ opy(jg)=(omyo(jg)+pt5*dely) ++ opz(jg)=(omzo(jg)+pt5*delz) ++ ++ enddo ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=opx(jg)*chit0 ++ omy(ig)=opy(jg)*chit0 ++ omz(ig)=opz(jg)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 ++ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 ++ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=(omxo(jg)+delx)*chit0 ++ uyy(jg)=(omyo(jg)+dely)*chit0 ++ uzz(jg)=(omzo(jg)+delz)*chit0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c pressure control variable ++ ++ engke=engfke+engtrn ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ ++c new estimate of chit ++ ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++c new cell parameters ++ ++ do i=1,9 ++ cell(i)=scale*cell0(i) ++ enddo ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c scale cell vectors ++ ++ scale=((chip0*volm)/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=scale*czero(i) ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=2,8 ++ eta(i)=0.d0 ++ enddo ++ eta(1)=scale ++ eta(5)=scale ++ eta(9)=scale ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nptq_b2 ++ ++ subroutine nptq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,vircom,vircon,virtot,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Hoover thermostat and barostat. ++c (cell may change volume) ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,com ++ real(8) rot,strkin,strcon,strgrp,vom,engtrn,trx,try,trz ++ real(8) delx,dely,delz,engfke ++ real(8) vaa,vbb,vcc,viracc,pmass,qmass,totmas,czero ++ real(8) chip,chit,consv,conint,elrc,virlrc,press,sigma,taup,taut ++ real(8) temp,virtot,cell0,volm0,elrc0,virlrc0 ++ real(8) chit0,chip0,chipnew,chipp,engtot,chitnew,chitp,volnew ++ real(8) scale,volm,vold,cons1,cons2,cons3 ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ dimension czero(9),cell0(9),com(3),vom(3) ++ ++ save newjob,volm0,elrc0,virlrc0,czero,dens0,pmass,qmass ++ save igrp1,igrp2,ifre1,ifre2,totmas ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1670) ++ enddo ++ ++ if(newjob) then ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1680) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ do i=1,9 ++ czero(i)=cell(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++c calculate system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c initial thermostat and barostat variables ++ ++ chit0=chit ++ chip0=chip ++ chipnew=chip ++ ++c initialise constraint stress and virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ ++ enddo ++ ++c shake iterations and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=4 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore cell vectors ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)* ++ x pt5*(vxx(i)+vxo(j))) ++ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)* ++ x pt5*(vyy(i)+vyo(j))) ++ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)* ++ x pt5*(vzz(i)+vzo(j))) ++ ++c advance position using leapfrog ++ ++ xxx(i)=xxo(i)+tstep*(uxx(j)+ ++ x chipnew*((xxx(i)+xxo(i))*pt5-com(1))) ++ yyy(i)=yyo(i)+tstep*(uyy(j)+ ++ x chipnew*((yyy(i)+yyo(i))*pt5-com(2))) ++ zzz(i)=zzo(i)+tstep*(uzz(j)+ ++ x chipnew*((zzz(i)+zzo(i))*pt5-com(3))) ++ ++c estimate full step velocity ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)-(chit0+chip0)* ++ x pt5*(gvxx(ig)+gvxo(jg))) ++ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)-(chit0+chip0)* ++ x pt5*(gvyy(ig)+gvyo(jg))) ++ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)-(chit0+chip0)* ++ x pt5*(gvzz(ig)+gvzo(jg))) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*(uxx(jg)+ ++ x chipnew*((gcxo(jg)+gcmx(ig))*pt5-com(1))) ++ gcmy(ig)=gcyo(jg)+tstep*(uyy(jg)+ ++ x chipnew*((gcyo(jg)+gcmy(ig))*pt5-com(2))) ++ gcmz(ig)=gczo(jg)+tstep*(uzz(jg)+ ++ x chipnew*((gczo(jg)+gcmz(ig))*pt5-com(3))) ++ ++c estimate full step velocities ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omxo(jg)+pt5*tstep*trx ++ opy(jg)=omyo(jg)+pt5*tstep*try ++ opz(jg)=omzo(jg)+pt5*tstep*trz ++ ++ enddo ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=omxo(jg)+delx ++ uyy(jg)=omyo(jg)+dely ++ uzz(jg)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c new estimate of chip and chit ++ ++ engke=engfke+engtrn ++ chipp=(2.d0*engke-virtot-vircom-vircon-3.d0*press*volm)/pmass- ++ x chit0*chip0 ++ chipnew=chip+tstep*chipp ++ chip0=pt5*(chip+chipnew) ++ ++ engtot=engke+engrot ++ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=pt5*(chit+chitnew) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++c estimate new cell tensor ++ ++ volnew=volm*exp(3.d0*tstep*chipnew) ++ scale=(volnew/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=czero(i)*scale ++ enddo ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c update volume ++ ++ vold=volm ++ volm=volm*exp(3.d0*tstep*chipnew) ++ ++c scale cell vectors-isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=czero(i)*scale ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=2,8 ++ eta(i)=0.d0 ++ enddo ++ eta(1)=chipnew ++ eta(5)=chipnew ++ eta(9)=chipnew ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ chip=chipnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) ++ cons1=pt5*qmass*chit0**2 ++ cons2=press*vold ++ cons3=pt5*pmass*chip0**2 ++ consv=conint+cons1+cons2+cons3 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nptq_h2 ++ ++ subroutine nstq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints. Rigid body sites and constraint sites may ++c coincide. ++c ++c verlet leapfrog with Berendsen thermostat and barostat. ++c (cell may change shape) ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob,safeq,newstep,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons,mode ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) rot,strkin,strcon,strgrp,engtrn,trx,try,trz ++ real(8) delx,dely,delz,engfke ++ real(8) vaa,vbb,vcc,viracc,elrc,virlrc,press,sigma ++ real(8) taup,taut,volm,cell0,volm0,elrc0,chit0,uni ++ real(8) beta,stres0,engtot,virlrc0 ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ dimension cell0(9),uni(9),stres0(9) ++ ++ save newjob,volm0,elrc0,virlrc0,chit0,dens0 ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ data beta/7.3728d-3/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1690) ++ enddo ++ ++c store initial values of volume, long range corrections etc ++ ++ if(newjob) then ++ ++ chit0=1.d0 ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1700) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c set virial, strain and stress tensors ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ eta(i)=uni(i) ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c shake iterations and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=4 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(j)+eta(1)*xxo(i)+eta(4)*yyo(i)+eta(7)*zzo(i) ++ yyy(i)=tstep*uyy(j)+eta(2)*xxo(i)+eta(5)*yyo(i)+eta(8)*zzo(i) ++ zzz(i)=tstep*uzz(j)+eta(3)*xxo(i)+eta(6)*yyo(i)+eta(9)*zzo(i) ++ ++c calculate velocity at full time step ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ********: rigid body motion - thermostated :*********** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c calculate thermostated velocities ++ ++ uxx(jg)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 ++ uyy(jg)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 ++ uzz(jg)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 ++ ++c update positions ++ ++ gcmx(ig)=tstep*uxx(jg)+ ++ x eta(1)*gcxo(jg)+eta(4)*gcyo(jg)+eta(7)*gczo(jg) ++ gcmy(ig)=tstep*uyy(jg)+ ++ x eta(2)*gcxo(jg)+eta(5)*gcyo(jg)+eta(8)*gczo(jg) ++ gcmz(ig)=tstep*uzz(jg)+ ++ x eta(3)*gcxo(jg)+eta(6)*gcyo(jg)+eta(9)*gczo(jg) ++ ++c centre of mass velocities at full step ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=(omxo(jg)+pt5*delx) ++ opy(jg)=(omyo(jg)+pt5*dely) ++ opz(jg)=(omzo(jg)+pt5*delz) ++ ++ enddo ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=opx(jg)*chit0 ++ omy(ig)=opy(jg)*chit0 ++ omz(ig)=opz(jg)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 ++ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 ++ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=(omxo(jg)+delx)*chit0 ++ uyy(jg)=(omyo(jg)+dely)*chit0 ++ uzz(jg)=(omzo(jg)+delz)*chit0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c calculate total stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c calculate new cell tensor ++ ++ call mat_mul(eta,cell0,cell) ++ ++c calculate eta tensor ++ ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c new estimate of chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c update volume ++ ++ volm=volm*eta(1)*eta(5)*eta(9) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nstq_b2 ++ ++ subroutine nstq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke,engrot, ++ x virlrc,press,quattol,sigma,taup,taut,temp,tolnce,tstep, ++ x vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints- rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Hoover like thermostat and barostat. ++c (cell may change shape) ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm,mode ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) rot,strkin,strcon,strgrp,engtrn,vxt,vyt,vzt,trx,try,trz ++ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,com,fac,etadot ++ real(8) chit,conint,consv,virlrc,elrc,press,sigma,taut,taup ++ real(8) volm,eta0,etanew,cell0,volm0,elrc0,virlrc0,pmass,qmass ++ real(8) totmas,chit0,xxa,yya,zza,chip,chitp,vom,engfke ++ real(8) chitnew,vold,cons1,cons2,cons3,temp,uni ++ real(8) stres0,engtot ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn),vom(3) ++ dimension cell0(9),eta0(9),etanew(9),stres0(9),uni(9),com(3) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0,pmass,qmass ++ save igrp1,igrp2,ifre1,ifre2,totmas ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1710) ++ enddo ++ ++ if(newjob) then ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c store initial values of volume, long range corrections etc ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1720) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++c system total mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++c correction to velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c initial thermostat and barostat variables and new cell ++ ++ chit0=chit ++ do i=1,9 ++ ++ eta0(i)=eta(i) ++ cell0(i)=cell(i) ++ ++ enddo ++ ++c initialise constraint stress and virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c shake and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=4 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore cell vectors ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ vxt=pt5*(vxx(i)+vxo(j)) ++ vyt=pt5*(vyy(i)+vyo(j)) ++ vzt=pt5*(vzz(i)+vzo(j)) ++ ++ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)- ++ x (eta0(1)+chit0)*vxt-eta0(4)*vyt-eta0(7)*vzt) ++ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)- ++ x eta0(2)*vxt-(eta0(5)+chit0)*vyt-eta0(8)*vzt) ++ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)- ++ x eta0(3)*vxt-eta0(6)*vyt-(eta0(9)+chit0)*vzt) ++ ++c advance positions using leapfrog ++ ++ xxa=(xxx(i)+xxo(i))*pt5-com(1) ++ yya=(yyy(i)+yyo(i))*pt5-com(2) ++ zza=(zzz(i)+zzo(i))*pt5-com(3) ++ ++ xxx(i)=xxo(i)+tstep*(uxx(j)+ ++ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) ++ yyy(i)=yyo(i)+tstep*(uyy(j)+ ++ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) ++ zzz(i)=zzo(i)+tstep*(uzz(j)+ ++ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) ++ ++c estimate full step velocities ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ********: rigid body motion - thermostated :************ ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c calculate thermostated velocities ++ ++ vxt=pt5*(gvxx(ig)+gvxo(jg)) ++ vyt=pt5*(gvyy(ig)+gvyo(jg)) ++ vzt=pt5*(gvzz(ig)+gvzo(jg)) ++ ++ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)- ++ x (chit0+eta0(1))*vxt-eta0(4)*vyt-eta0(7)*vzt) ++ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)- ++ x eta0(2)*vxt-(eta0(5)+chit0)*vyt-eta0(8)*vzt) ++ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)- ++ x eta0(3)*vxt-eta0(6)*vyt-(eta0(9)+chit0)*vzt) ++ ++c advance positions using leapfrog ++ ++ xxa=(gcmx(ig)+gcxo(jg))*pt5-com(1) ++ yya=(gcmy(ig)+gcyo(jg))*pt5-com(2) ++ zza=(gcmz(ig)+gczo(jg))*pt5-com(3) ++ ++ gcmx(ig)=gcxo(jg)+tstep*(uxx(jg)+ ++ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) ++ gcmy(ig)=gcyo(jg)+tstep*(uyy(jg)+ ++ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) ++ gcmz(ig)=gczo(jg)+tstep*(uzz(jg)+ ++ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) ++ ++c estimate full step velocities ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omxo(jg)+pt5*tstep*trx ++ opy(jg)=omyo(jg)+pt5*tstep*try ++ opz(jg)=omzo(jg)+pt5*tstep*trz ++ ++ enddo ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=omxo(jg)+delx ++ uyy(jg)=omyo(jg)+dely ++ uzz(jg)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c calculate total stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c propagate eta ++ ++ fac=9.d0 ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit0*eta0(i)) ++ enddo ++ if(mode.gt.0)then ++ fac=5.d0 ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ fac=3.d0 ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ fac=2.d0 ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=pt5*(etanew(i)+eta(i)) ++ enddo ++ ++c propagate chit ++ ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=pt5*(chit+chitnew) ++ ++c estimate new cell parameters ++ ++ call cell_propagate(tstep,cell,etanew) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ do i=1,9 ++ eta(i)=etanew(i) ++ enddo ++ ++c update volume ++ ++ chip=eta(1)+eta(5)+eta(9) ++ vold=volm ++ volm=volm*exp(tstep*chip) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c conserved quantity less kinetic and potential energy ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) ++ cons1=pt5*qmass*chit0**2 ++ cons2=press*vold ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ cons3=pt5*pmass*etadot ++ consv=conint+cons1+cons2+cons3 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nstq_h2 ++ ++ subroutine qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,stresh) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for appling bond constraint corrections after ++c atomic integration. Assumes rigid bodies connected by constraints ++c If this is not so use rdshake_1 instead ++c Must be used in conjunction with leapfrog integration algorithms ++c ++c copyright - daresbury laboratory 1995 ++c author - t. forester june 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newstep,newjob ++ integer fail,idnode,imcon,mxnode,natms,nscons,i,j,k ++ integer ik,ig,id,jj ++ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,txx,tyy ++ real(8) tzz,xxt,yyt,zzt,stresh,tstep2,esig,dis,dis2 ++ real(8) xxa,yya,zza,tax,tay,taz,doti,amti,amtj ++ real(8) trx,try,trz,vix,viy,viz,vxi,vyi,vzi ++ real(8) vjx,vjy,vjz,vxj,vyj,vzj,gamma,dli,dlj,rot ++ ++ real(8), allocatable :: redmass(:),esig1(:) ++ ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ dimension stresh(9),rot(9) ++ ++ save newjob,esig1,redmass ++ ++ data newjob/.true./,fail/0/ ++ ++ if(newjob)then ++ ++ allocate (redmass(mxcons),esig1(mxcons),stat=fail) ++ if(fail.ne.0)call error(idnode,1610) ++ newjob=.false. ++ ++ endif ++ ++c constraint virial ++ ++ vircon=0.d0 ++ ++c accumulators for stress tensor ++ ++ do i=1,9 ++ stresh(i)=0.d0 ++ enddo ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c one iteration of constraint (shake) algorithm ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate temporary bond vector ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c calculate maximum error in bondlength ++ ++ esig=0.d0 ++ do k=1,nscons ++ ++c set bond parameter ++ ++ dis=prmcon(listcon(k,1)) ++ dis2=dis*dis ++ esig1(k)=0.5d0*(dis2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/dis2 ++ esig=max(esig,abs(esig1(k))) ++ ++ enddo ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++c terminate iteration if all tolerances satisfied ++ ++ if (.not.safe) then ++ ++c initialise force increment arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint forces ++ ++ ik=0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c assign effective reduced mass ++ ++ if(newstep) then ++ ++ ig=lstbod(i) ++ ++ if(ig.eq.0) then ++ ++ amti=rmass(i) ++ ++ else ++ ++ ik=ik+1 ++ id=lstgtp(ig) ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ jj=lstcsit(ik) ++ ++c site to com in lab frame ++ ++ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+ ++ x gzz(id,jj)*rot(3)) ++ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+ ++ x gzz(id,jj)*rot(6)) ++ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+ ++ x gzz(id,jj)*rot(9)) ++ ++c find cross product between interatomic vector and vector to com ++ ++ tax=yya*dzz(k)-zza*dyy(k) ++ tay=zza*dxx(k)-xxa*dzz(k) ++ taz=xxa*dyy(k)-yya*dxx(k) ++ ++c transform to body fixed frame ++ ++ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) ++ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) ++ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) ++ ++c direction of induced velocites in body frame ++ ++ vix=try*gzz(id,jj)-trz*gyy(id,jj) ++ viy=trz*gxx(id,jj)-trx*gzz(id,jj) ++ viz=trx*gyy(id,jj)-try*gxx(id,jj) ++ ++c transform to lab frame ++ ++ vxi=vix*rot(1)+viy*rot(2)+viz*rot(3) ++ vyi=vix*rot(4)+viy*rot(5)+viz*rot(6) ++ vzi=vix*rot(7)+viy*rot(8)+viz*rot(9) ++ ++c find dot product between induced translational and rotational velocities ++ ++ doti=abs(vxi*dxx(k)+vyi*dyy(k)+vzi*dzz(k)) ++ doti=doti/dis2 ++ ++ amti=(1.d0/gmass(id)+doti) ++ ++ endif ++ ++ ig=lstbod(j) ++ if(ig.eq.0) then ++ ++ amtj=rmass(j) ++ ++ else ++ ++ ik=ik+1 ++ id=lstgtp(ig) ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ jj=lstcsit(ik) ++ ++c site to com in lab frame ++ ++ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+ ++ x gzz(id,jj)*rot(3)) ++ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+ ++ x gzz(id,jj)*rot(6)) ++ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+ ++ x gzz(id,jj)*rot(9)) ++ ++c find cross product between interatomic vector and vector to com ++ ++ tax =yya*dzz(k)-zza*dyy(k) ++ tay =zza*dxx(k)-xxa*dzz(k) ++ taz =xxa*dyy(k)-yya*dxx(k) ++ ++c transform to body fixed frame ++ ++ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) ++ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) ++ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) ++ ++c direction of induced velocites in body frame ++ ++ vjx=try*gzz(id,jj)-trz*gyy(id,jj) ++ vjy=trz*gxx(id,jj)-trx*gzz(id,jj) ++ vjz=trx*gyy(id,jj)-try*gxx(id,jj) ++ ++c transform to lab frame ++ ++ vxj=vjx*rot(1)+vjy*rot(2)+vjz*rot(3) ++ vyj=vjx*rot(4)+vjy*rot(5)+vjz*rot(6) ++ vzj=vjx*rot(7)+vjy*rot(8)+vjz*rot(9) ++ ++c find dot product between induced translational and rotational velocities ++ ++ doti=abs(vxj*dxx(k)+vyj*dyy(k)+vzj*dzz(k)) ++ doti=doti/dis2 ++ ++ amtj=(1.d0/gmass(id)+doti) ++ ++ endif ++ ++ redmass(k)=1.d0/(amti+amtj)/tstep2 ++ ++ endif ++ ++c constraint force parameter ++ ++ gamma=esig1(k)*redmass(k) ++ ++c accumulate bond virial ++ ++ vircon=vircon-gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ ++ stresh(1)=stresh(1)+gamma*dxx(k)*dxx(k) ++ stresh(2)=stresh(2)+gamma*dxx(k)*dyy(k) ++ stresh(3)=stresh(3)+gamma*dxx(k)*dzz(k) ++ stresh(5)=stresh(5)+gamma*dyy(k)*dyy(k) ++ stresh(6)=stresh(6)+gamma*dyy(k)*dzz(k) ++ stresh(9)=stresh(9)+gamma*dzz(k)*dzz(k) ++ ++c improved atomic force ++ ++ xxt(i)=xxt(i)+dxx(k)*gamma ++ yyt(i)=yyt(i)+dyy(k)*gamma ++ zzt(i)=zzt(i)+dzz(k)*gamma ++ ++ xxt(j)=xxt(j)-dxx(k)*gamma ++ yyt(j)=yyt(j)-dyy(k)*gamma ++ zzt(j)=zzt(j)-dzz(k)*gamma ++ ++ enddo ++ ++c transport temporary positions to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov) call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ dlj=1.d0/dble(listme(j)) ++ ++ fxx(i)=fxx(i)+xxt(i)*dli ++ fyy(i)=fyy(i)+yyt(i)*dli ++ fzz(i)=fzz(i)+zzt(i)*dli ++ fxx(j)=fxx(j)+xxt(j)*dlj ++ fyy(j)=fyy(j)+yyt(j)*dlj ++ fzz(j)=fzz(j)+zzt(j)*dlj ++ ++ enddo ++ ++c complete (symmetrical) stress tensor ++ ++ stresh(4)=stresh(2) ++ stresh(7)=stresh(3) ++ stresh(8)=stresh(6) ++ ++c splice force arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(stresh,9,buffer) ++ call splice ++ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine qshake ++ ++ end module lf_rotation2_module +diff -urN dl_class_1.9.orig/srcmod/Makefile dl_class_1.9/srcmod/Makefile +--- dl_class_1.9.orig/srcmod/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/Makefile 2015-11-09 14:32:49.349871999 +0100 +@@ -0,0 +1,101 @@ ++# Master makefile for DL_POLY Classic ++# Author: W. Smith January Dec 2010 ++# ++#======================================================================= ++# Define default settings ++#======================================================================= ++ ++include ../Plumed.inc ++ ++ ++BINROOT = ../execute ++CC := $(CC) ++EX = DLPOLY.X ++EXE = $(BINROOT)/$(EX) ++FC=undefined ++SHELL=/bin/sh ++TYPE=par ++ ++#===================================================================== ++# Define object files ++ ++OBJ_MOD = parse_module.o setup_module.o error_module.o \ ++ site_module.o config_module.o pair_module.o utility_module.o \ ++ metafreeze_module.o solvation_module.o tether_module.o \ ++ vdw_module.o property_module.o rigid_body_module.o \ ++ angles_module.o bonds_module.o shake_module.o \ ++ inversion_module.o dihedral_module.o core_shell_module.o \ ++ exclude_module.o ewald_module.o coulomb_module.o\ ++ external_field_module.o four_body_module.o \ ++ hkewald_module.o metal_module.o ensemble_tools_module.o \ ++ temp_scalers_module.o three_body_module.o spme_module.o \ ++ tersoff_module.o neu_coul_module.o \ ++ nlist_builders_module.o forces_module.o \ ++ lf_motion_module.o lf_rotation1_module.o \ ++ lf_rotation2_module.o vv_motion_module.o \ ++ vv_rotation1_module.o vv_rotation2_module.o \ ++ pmf_module.o integrator_module.o optimiser_module.o \ ++ hyper_dynamics_module.o driver_module.o \ ++ define_system_module.o ++ ++OBJ_SRC = dlpoly.o ++ ++OBJ_PAR = basic_comms.o merge_tools.o pass_tools.o ++ ++#===================================================================== ++# Define targets ++all: ++ @echo "Error - please specify a target machine!" ++ @echo "Permissible targets for this Makefile are:" ++ @echo " " ++ @echo "gfortran (parallel)" ++ @echo "woodcrest (parallel)" ++ @echo " " ++ @echo "Please examine Makefile for details" ++ ++# system specific targets follow : ++ ++#================== GNU Fortran, MPI version ============================== ++gfortran: ++ $(MAKE) FC="$(MPIF90)" LD="$(MPIF90) -o" \ ++ LDFLAGS="$(LDFLAGS)" \ ++ FFLAGS="-c $(FFLAGS)" \ ++ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) ++ ++#================= Woodcrest ========================================= ++woodcrest: ++ $(MAKE) LD="mpif90 -o" LDFLAGS="" \ ++ FC=mpif90 FFLAGS="-c -O3" \ ++ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) ++ ++#===================================================================== ++# Default code for parallel (MPI) execution ++ ++par: check $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) $(PLUMED_DEPENDENCIES) ++ $(LD) $(EX) $(LDFLAGS) $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) $(PLUMED_LOAD) ++ mv $(EX) $(EXE) ++ ++#===================================================================== ++# Check that a machine has been specified ++check: ++ @if test $(FC) = "undefined";\ ++ then echo "You must specify a target machine!"; \ ++ exit 99;\ ++ fi ++ ++#===================================================================== ++# Clean up the source directory ++clean: ++ rm -f $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) *.mod ++ ++#===================================================================== ++# Declare dependencies ++.f.o: ++ $(FC) $(FFLAGS) $*.f ++.c.o: ++ $(CC) -c $*.c ++ ++#===================================================================== ++# Declare dependency on module files ++ ++$(OBJ_SRC): $(OBJ_MOD) +diff -urN dl_class_1.9.orig/srcmod/Makefile.plumedbck dl_class_1.9/srcmod/Makefile.plumedbck +--- dl_class_1.9.orig/srcmod/Makefile.plumedbck 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/Makefile.plumedbck 2011-02-22 12:46:11.000000000 +0100 +@@ -0,0 +1,98 @@ ++# Master makefile for DL_POLY Classic ++# Author: W. Smith January Dec 2010 ++# ++#======================================================================= ++# Define default settings ++#======================================================================= ++ ++BINROOT = ../execute ++CC = gcc ++EX = DLPOLY.X ++EXE = $(BINROOT)/$(EX) ++FC=undefined ++SHELL=/bin/sh ++TYPE=par ++ ++#===================================================================== ++# Define object files ++ ++OBJ_MOD = parse_module.o setup_module.o error_module.o \ ++ site_module.o config_module.o pair_module.o utility_module.o \ ++ metafreeze_module.o solvation_module.o tether_module.o \ ++ vdw_module.o property_module.o rigid_body_module.o \ ++ angles_module.o bonds_module.o shake_module.o \ ++ inversion_module.o dihedral_module.o core_shell_module.o \ ++ exclude_module.o ewald_module.o coulomb_module.o\ ++ external_field_module.o four_body_module.o \ ++ hkewald_module.o metal_module.o ensemble_tools_module.o \ ++ temp_scalers_module.o three_body_module.o spme_module.o \ ++ tersoff_module.o neu_coul_module.o \ ++ nlist_builders_module.o forces_module.o \ ++ lf_motion_module.o lf_rotation1_module.o \ ++ lf_rotation2_module.o vv_motion_module.o \ ++ vv_rotation1_module.o vv_rotation2_module.o \ ++ pmf_module.o integrator_module.o optimiser_module.o \ ++ hyper_dynamics_module.o driver_module.o \ ++ define_system_module.o ++ ++OBJ_SRC = dlpoly.o ++ ++OBJ_PAR = basic_comms.o merge_tools.o pass_tools.o ++ ++#===================================================================== ++# Define targets ++all: ++ @echo "Error - please specify a target machine!" ++ @echo "Permissible targets for this Makefile are:" ++ @echo " " ++ @echo "gfortran (parallel)" ++ @echo "woodcrest (parallel)" ++ @echo " " ++ @echo "Please examine Makefile for details" ++ ++# system specific targets follow : ++ ++#================== GNU Fortran, MPI version ============================== ++gfortran: ++ $(MAKE) FC="mpif90" LD="mpif90 -o" \ ++ LDFLAGS="-O2 -ffast-math" \ ++ FFLAGS="-c -O2 -ffast-math" \ ++ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) ++ ++#================= Woodcrest ========================================= ++woodcrest: ++ $(MAKE) LD="mpif90 -o" LDFLAGS="" \ ++ FC=mpif90 FFLAGS="-c -O3" \ ++ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) ++ ++#===================================================================== ++# Default code for parallel (MPI) execution ++ ++par: check $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) ++ $(LD) $(EX) $(LDFLAGS) $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) ++ mv $(EX) $(EXE) ++ ++#===================================================================== ++# Check that a machine has been specified ++check: ++ @if test $(FC) = "undefined";\ ++ then echo "You must specify a target machine!"; \ ++ exit 99;\ ++ fi ++ ++#===================================================================== ++# Clean up the source directory ++clean: ++ rm -f $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) *.mod ++ ++#===================================================================== ++# Declare dependencies ++.f.o: ++ $(FC) $(FFLAGS) $*.f ++.c.o: ++ $(CC) -c $*.c ++ ++#===================================================================== ++# Declare dependency on module files ++ ++$(OBJ_SRC): $(OBJ_MOD) +diff -urN dl_class_1.9.orig/srcmod/merge_tools.f dl_class_1.9/srcmod/merge_tools.f +--- dl_class_1.9.orig/srcmod/merge_tools.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/merge_tools.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,670 @@ ++ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for merging coordinate arrays across ++c a number of processors ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith november 1992. ++c MPI version - t. forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ use error_module ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nbuff,nsize,ierr,iatm1,iatm2 ++ integer j,i,k,jdnode,kdnode,katm1,katm2,iatm,katm ++ real*8 xxx(natms),yyy(natms),zzz(natms),buffer(nbuff) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++c check that buffer is large enough ++ ++ nsize=(natms+mxnode-1)/mxnode ++ if(nbuff.lt.6*nsize)call error(idnode,47) ++ ++c load initial transfer buffer ++ ++ j=0 ++ ++c set up this nodes atoms ++ ++ iatm1 = (idnode*natms)/mxnode + 1 ++ iatm2 = ((idnode+1)*natms)/mxnode ++ ++ iatm = iatm2-iatm1+1 ++ ++ do i=iatm1,iatm2 ++ ++ buffer(j+1)=xxx(i) ++ buffer(j+2)=yyy(i) ++ buffer(j+3)=zzz(i) ++ j=j+3 ++ ++ enddo ++ ++ ++ call gsync() ++ ++c identity of neighbour node for systolic transfer ++ ++ jdnode=mod(idnode+1,mxnode) ++ ++ do k=1,mxnode-1 ++ ++c identity of node of origin of incoming data ++ ++ kdnode=mod(idnode+mxnode-k,mxnode) ++ ++c identity of incoming atoms ++ ++ katm1 = (kdnode*natms)/mxnode + 1 ++ katm2 = ((kdnode+1)*natms)/mxnode ++ katm = katm2-katm1 + 1 ++ ++c systolic data pulse to transfer data ++ ++ call MPI_IRECV(buffer(3*nsize+1),3*nsize,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Merge_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(buffer(1),3*nsize,MPI_DOUBLE_PRECISION,jdnode, ++ x Merge_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++c merge the incoming data into current arrays ++ ++ j=3*nsize ++ ++ do i=katm1,katm2 ++ ++ xxx(i)=buffer(j+1) ++ yyy(i)=buffer(j+2) ++ zzz(i)=buffer(j+3) ++ j=j+3 ++ ++ enddo ++ ++c shift new data to start of buffer ++ ++ do i=1,3*nsize ++ ++ buffer(i)=buffer(3*nsize+i) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for merging together coordinate arrays ++c across a number of processors during rigid body algorithm ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - t.forester november 1993 ++c systolic pulse version. T3D t.forester sept 1994 ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ logical safe ++ integer idnode,mxnode,natms,ierr,i,j,k,l,mxb,nout,nin ++ integer nin1,jdnode,j1,kdnode ++ integer lstme(natms) ++ real*8 xxx(mxatms),yyy(mxatms),zzz(mxatms),buffer(mxbuff) ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++ ++ safe =.true. ++ ++c load up buffers ++ ++ j=1 ++ l=1 ++ do while(lstme(l).gt.0.and.l.le.natms) ++ ++ i=lstme(l) ++ buffer(j+1)=dble(i) ++ buffer(j+2)=xxx(i) ++ buffer(j+3)=yyy(i) ++ buffer(j+4)=zzz(i) ++ j=j+4 ++ l=l+1 ++ ++ enddo ++ ++c length of message ++ ++ buffer(1) = dble(j) ++ ++c array position for incoming messages ++ ++ mxb = mxbuff/2 ++ ++c load initial transfer buffer ++ ++ call gsync() ++ ++c identity of neighbour node for systolic transfer ++ ++ jdnode=mod(idnode+1,mxnode) ++ ++ do k=1,mxnode-1 ++ ++c identity of node of origin of incoming data ++ ++ kdnode=mod(idnode+mxnode-k,mxnode) ++ ++c out going message size ++ ++ nout = nint(buffer(1)) ++ ++ call MPI_IRECV(nin,1,MPI_INTEGER, ++ x MPI_ANY_SOURCE,Merge1_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(nout,1,MPI_INTEGER,jdnode, ++ x Merge1_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++ call MPI_IRECV(buffer(mxb),nin,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Merge1_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(buffer(1),nout,MPI_DOUBLE_PRECISION,jdnode, ++ x Merge1_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++c check buffer array not exceeded ++ ++ if(nin.gt.mxbuff-mxb) safe =.false. ++ ++c position of first data element in incoming array ++ ++ nin1 = (nin-1)/4 ++ j = mxb+1 ++ ++ do j1=1,nin1 ++ ++ i = nint(buffer(j)) ++ xxx(i)=buffer(j+1) ++ yyy(i)=buffer(j+2) ++ zzz(i)=buffer(j+3) ++ j=j+4 ++ ++ enddo ++ ++c shift new data to start of buffer ++ ++ do i=1,nin ++ ++ buffer(i)=buffer(mxb-1+i) ++ ++ enddo ++ ++ enddo ++ ++c global check ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,47) ++ ++ return ++ end ++ ++ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for merging coordinate arrays across ++c a number of processors ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t.forester february 1994 ++c T3D version - sept 1994 t.forester ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ use error_module ++ ++ implicit none ++ ++ integer idnode,mxnode,ngrp,nbuff,ierr,nsize,i,j,igrp1,igrp2 ++ integer k,jdnode,kdnode,kgrp1,kgrp2 ++ real*8 q0(ngrp),q1(ngrp),q2(ngrp),q3(ngrp),buffer(nbuff) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++ ++c check that buffer is large enough ++ ++ nsize=(ngrp+mxnode-1)/mxnode ++ if(nbuff.lt.8*nsize)call error(idnode,47) ++ ++c load initial transfer buffer ++ ++ j=0 ++ ++ igrp1 = (idnode*ngrp)/mxnode+1 ++ igrp2 = ((idnode+1)*ngrp)/mxnode ++ ++ do i=igrp1,igrp2 ++ ++ buffer(j+1)=q0(i) ++ buffer(j+2)=q1(i) ++ buffer(j+3)=q2(i) ++ buffer(j+4)=q3(i) ++ j=j+4 ++ ++ enddo ++ ++ call gsync() ++ ++c identity of neighbour node for systolic transfer ++ ++ jdnode=mod(idnode+1,mxnode) ++ ++ do k=1,mxnode-1 ++ ++c identity of node of origin of incoming data ++ ++ kdnode=mod(idnode+mxnode-k,mxnode) ++ ++c identity of incoming groups ++ ++ kgrp1 = (kdnode*ngrp)/mxnode+1 ++ kgrp2 = ((kdnode+1)*ngrp)/mxnode ++ ++ call MPI_IRECV(buffer(4*nsize+1),4*nsize,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Merge4_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(buffer(1),4*nsize,MPI_DOUBLE_PRECISION,jdnode, ++ x Merge4_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++c merge the incoming data into current arrays ++ ++ j=4*nsize ++ ++ do i=kgrp1,kgrp2 ++ ++ q0(i)=buffer(j+1) ++ q1(i)=buffer(j+2) ++ q2(i)=buffer(j+3) ++ q3(i)=buffer(j+4) ++ j=j+4 ++ ++ enddo ++ ++c shift new data to start of buffer ++ ++ do i=1,4*nsize ++ ++ buffer(i)=buffer(4*nsize+i) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine shlmerge(idnode,mxnode,ntshl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for merging core-shell velocity data ++c to restore data replication on all nodes ++c ++c copyright - daresbury laboratory 1993 ++c author - w. smith february 1993 ++c MPI version - w. smith june 1995 ++c CPP version - w. smith june 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use config_module ++ use core_shell_module ++ use error_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer idnode,mxnode,ntshl,ierr,i,j,k,n,m,ishl1,ishl2,nsize ++ integer jdnode,kshl1,kshl2,kdnode ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++c check that buffer is large enough ++ ++ nsize=8*((ntshl+mxnode-1)/mxnode) ++ ++ if(mxbuff.lt.2*nsize)call error(idnode,425) ++ ++c block indices ++ ++ ishl1 = (idnode*ntshl)/mxnode+1 ++ ishl2 = ((idnode+1)*ntshl)/mxnode ++ ++c load initial transfer buffer ++ ++ n=0 ++ m=0 ++ ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c indices of core and shell ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ buffer(n+1)=dble(i) ++ buffer(n+2)=dble(j) ++ buffer(n+3)=vxx(i) ++ buffer(n+4)=vyy(i) ++ buffer(n+5)=vzz(i) ++ buffer(n+6)=vxx(j) ++ buffer(n+7)=vyy(j) ++ buffer(n+8)=vzz(j) ++ n=n+8 ++ ++ enddo ++ ++ call gsync() ++ ++c identity of neighbour node for systolic transfer ++ ++ jdnode=mod(idnode+1,mxnode) ++ ++ do k=1,mxnode-1 ++ ++c identity of node of origin of incoming data ++ ++ kdnode=mod(idnode+mxnode-k,mxnode) ++ ++c systolic data pulse to transfer data ++ ++ call MPI_IRECV(buffer(nsize+1),nsize,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Shell_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(buffer(1),nsize,MPI_DOUBLE_PRECISION,jdnode, ++ x Shell_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++c merge the incoming data into current arrays ++ ++ n=nsize ++ ++c block indices ++ ++ kshl1 = (kdnode*ntshl)/mxnode+1 ++ kshl2 = ((kdnode+1)*ntshl)/mxnode ++ ++ do m=kshl1,kshl2 ++ ++ i=nint(buffer(n+1)) ++ j=nint(buffer(n+2)) ++ ++ vxx(i)=buffer(n+3) ++ vyy(i)=buffer(n+4) ++ vzz(i)=buffer(n+5) ++ vxx(j)=buffer(n+6) ++ vyy(j)=buffer(n+7) ++ vzz(j)=buffer(n+8) ++ ++ n=n+8 ++ ++ enddo ++ ++c shift new data to start of buffer ++ ++ do i=1,nsize ++ ++ buffer(i)=buffer(nsize+i) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for passing coordinate updates between ++c nodes during the shake iteration cycle ++c ++c parallel replicated data algorithm ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith august 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer idnode, mxnode, natms,ierr,i,k,j0,k0,n,jdnode,j ++ integer lishap(mxlshp),lashap(mxproc) ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++ real*8 xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ real*8 txx(mxatms),tyy(mxatms),tzz(mxatms) ++ real*8 buffer(mxbuff) ++ ++c store increments to be transferred ++ ++ do i=1,natms ++ ++ txx(i)=xxt(i) ++ tyy(i)=yyt(i) ++ tzz(i)=zzt(i) ++ ++ enddo ++ ++c transfer coordinate data to all nodes ++ ++ call gsync() ++ ++ do k=1,mxnode-1 ++ ++ i=0 ++ j0=0 ++ if(k.gt.1)j0=lashap(k-1) ++ ++ do j=j0+1,lashap(k) ++ ++ buffer(i+1)=txx(lishap(j)) ++ buffer(i+2)=tyy(lishap(j)) ++ buffer(i+3)=tzz(lishap(j)) ++ i=i+3 ++ ++ enddo ++ ++c inter node communication ++ ++ k0=0 ++ ++ if(k+1.lt.mxnode)k0=lashap(mxnode-k-1) ++ n=3*(lashap(mxnode-k)-k0) ++ jdnode=mod(idnode+k,mxnode) ++ ++c check for zero length messages ++ ++ if(n.gt.0) call MPI_IRECV(buffer(i+1),n,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Shmove_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ if(i.gt.0) call MPI_SEND(buffer(1),i,MPI_DOUBLE_PRECISION, ++ x jdnode,Shmove_tag+k,MPI_COMM_WORLD,ierr) ++ ++ if(n.gt.0) call MPI_WAIT(request,status,ierr) ++ ++c consolidate transferred data ++ ++ do j=k0+1,lashap(mxnode-k) ++ ++ xxt(lishap(j))=xxt(lishap(j))+buffer(i+1) ++ yyt(lishap(j))=yyt(lishap(j))+buffer(i+2) ++ zzt(lishap(j))=zzt(lishap(j))+buffer(i+3) ++ i=i+3 ++ ++ enddo ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for splicing together coordinate arrays ++c across a number of processors during shake algorithm ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - w. smith march 1993 ++c ++c second version of splice ++c ++c********************************************************************* ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ integer idnode,natms,listme,listot,j,n3,i,lastot ++ real*8 xxx,yyy,zzz,buffer ++ ++ dimension listme(mxatms),listot(mxatms) ++ dimension xxx(natms),yyy(natms),zzz(natms) ++ dimension buffer(mxbuff) ++ ++c check buffer size ++ ++ if(mxbuff.lt.6*natms) call error(idnode,190) ++ ++c load initial transfer buffers ++ ++ j=3*natms ++ n3=3*natms ++ ++ do i=1,natms ++ ++ if(listot(i).gt.0)then ++ ++ if(listme(i).gt.0)then ++ ++ buffer(j+1)=xxx(i) ++ buffer(j+2)=yyy(i) ++ buffer(j+3)=zzz(i) ++ ++ else ++ ++ buffer(j+1)=0.d0 ++ buffer(j+2)=0.d0 ++ buffer(j+3)=0.d0 ++ ++ endif ++ ++ j=j+3 ++ ++ endif ++ ++ enddo ++ ++ lastot=j-n3 ++ ++c splice constraint coordinates ++ ++ if(lastot.gt.0) call gdsum(buffer(n3+1),lastot,buffer(1)) ++ ++c reconstitute coordinate arrays ++ ++ j=n3 ++ ++ do i=1,natms ++ ++ if(listot(i).gt.0)then ++ ++ xxx(i)=buffer(j+1)/dble(listot(i)) ++ yyy(i)=buffer(j+2)/dble(listot(i)) ++ zzz(i)=buffer(j+3)/dble(listot(i)) ++ ++ j=j+3 ++ ++ endif ++ ++ enddo ++ ++ return ++ end +diff -urN dl_class_1.9.orig/srcmod/metafreeze_module.f dl_class_1.9/srcmod/metafreeze_module.f +--- dl_class_1.9.orig/srcmod/metafreeze_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/metafreeze_module.f 2012-04-24 18:30:31.000000000 +0200 +@@ -0,0 +1,3539 @@ ++ module metafreeze_module ++ ++c--------------------------------------------------------------------- ++c ++c Metafreeze module for metadynamics ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c Adapted for dl_poly classic w. smith dec 2010 ++c ++c--------------------------------------------------------------------- ++ ++ implicit none ++ ++c Minimise usage by making everything private ++ ++ private ++ ++c--------------------------------------------------------------------- ++c P u b l i c R o u t i n e s ++c ... unless exposed here. ++c--------------------------------------------------------------------- ++ ++ public :: define_metadynamics ! Called to intitialise this module ++ public :: metafreeze_driver ! Called at every MD time-step ++ ++c--------------------------------------------------------------------- ++c P u b l i c V a r i a b l e s ++c--------------------------------------------------------------------- ++ ++ public :: lmetadyn ! Is this a metadynamics calculation? ++ public :: driven ! Is this atom site involved in metadynamics ++ public :: lstein,ltet,lglobpe,llocpe,ncolvar,nq4,nq6,ntet,hkey ++ public :: meta_step_int,globpe_scale,locpe_scale,ref_W_aug ++ public :: h_aug,wt_Dt ++ ++c Local copies of exluded atom arrays note that these are ++c not indexed by atom number, but by an index which loops ++c over the atoms handles by each MPI rank. ++ public :: mtd_nexatm,mtd_lexatm ++ ++c------------------------------------ ++c Populated from CONTROL file ++c------------------------------------ ++ ++ logical,save :: lmetadyn =.false. ! Master metadynamics flag ++ ++c------------------------------------------------------- ++c Energy, virial, stress and forces from 'local' pe ++c Populated by dlpoly energy routines ++c------------------------------------------------------- ++ ++ ++ public :: eng_loc,vir_loc,stress_loc ++ public :: fxx_loc,fyy_loc,fzz_loc ++ ++c---------------------------------------------------------------------- ++c Data accumulated for local potential energy (computed elsewhere) ++c---------------------------------------------------------------------- ++ ++ real(8),save :: eng_loc,vir_loc ++ real(8),dimension(9),save :: stress_loc ++ real(8),allocatable,dimension(:),save :: fxx_loc,fyy_loc,fzz_loc ++ ++c---------------------------------------------------------------------- ++c Arrays holding information on excluded interactions. Replicated ++c here to avoid a compilation dependency loop which would occur ++c if simply using the arrays already in exclude_module.f ++c---------------------------------------------------------------------- ++ integer,allocatable,dimension(:),save :: mtd_nexatm ++ integer,allocatable,dimension(:,:),save :: mtd_lexatm ++ ++c--------------------------------------------------------------------- ++c P r i v a t e V a r i a b l e s ++c--------------------------------------------------------------------- ++ ++c---------------------------------------------------------------- ++c Collective variables and derivatives of v_aug w.r.t colvars ++c---------------------------------------------------------------- ++ ++ integer,parameter :: maxhis = 150000 ! Size of history arrays ++ real(8),allocatable,dimension(:),save :: colvar,dcolvar ++ real(8),allocatable,dimension(:),save :: colvar_scale ++ ++c---------------------------------------------------------------- ++c Positions and heights of previous Gaussians in colvar space ++c---------------------------------------------------------------- ++ ++ real(8),allocatable,dimension(:,:),save :: colvar_his ++ real(8),allocatable,dimension(:),save :: w_aug ++ ++c------------------------------ ++c Read from CONTROL file ++c------------------------------ ++ ++ integer,save :: ncolvar = 0 ! Total number of collvars ++ logical,save :: lstein =.false. ! Q4/Q6 collective variables ++ logical,save :: ltet =.false. ! Tetrahedral order parameter ++ logical,save :: lglobpe =.false. ! Global potential energy ++ logical,save :: llocpe =.false. ! Local potential energy ++ ++ integer,save :: nq4 = 0 ! Number of Q4 pair types ++ integer,save :: nq6 = 0 ! Number of Q6 pair types ++ integer,save :: ntet = 0 ! Number of zeta triplets ++ ++ real(8),save :: globpe_scale = 1.0d0 ! Scaling factors for local ++ real(8),save :: locpe_scale = 1.0d0 ! and global pe colvars ++ ++ real(8),save :: ref_W_aug=1.0d0 ! Reference Gaussian height ++ real(8),save :: h_aug=1.0d0 ! Gaussian width ++ integer,save :: hkey=0 ! Height control scheme ++ real(8),save :: wt_Dt=100.0d0 ! "Well-tempered" parameter ++ integer,save :: meta_step_int=5 ! interval between depositions ++ ++c---------------------------------------- ++c Read from STEINHARDT or TETRAHEDRAL ++c---------------------------------------- ++ ++c Global Steinhardt order parameters ++ ++ real(8),allocatable,dimension(:),save :: q4_global ++ real(8),allocatable,dimension(:),save :: q6_global ++ ++c Global Tetrahedral order parameters ++ ++ real(8),allocatable,dimension(:),save :: zeta_global ++ ++c Bookkeeping arrays for order parameter computation ++ ++ character(8),allocatable,dimension(:,:),save :: q4label ++ character(8),allocatable,dimension(:,:),save :: q6label ++ character(8),allocatable,dimension(:),save :: zetalabel ++ ++c Inner and outer cutoffs ++ ++ real(8),allocatable,dimension(:,:),save :: q4cutoff ++ real(8),allocatable,dimension(:,:),save :: q6cutoff ++ real(8),allocatable,dimension(:,:),save :: zetacutoff ++ ++c Scaling factors for q4 and q6 ++ ++ real(8),allocatable,dimension(:),save :: q4scale ++ real(8),allocatable,dimension(:),save :: q6scale ++ real(8),allocatable,dimension(:),save :: zetascale ++ ++c Number of nearest neighbours for q4, q6 and zeta ++ ++ integer,allocatable,dimension(:),save :: q4nn,q6nn ++ integer,allocatable,dimension(:),save :: zetann ++ ++c------------------------------------------------------------ ++c Arrays holding data for computation of order parameters ++c------------------------------------------------------------ ++ ++c Steinhardt site-site interaction arrays ++ ++ integer,allocatable,dimension(:,:),save :: q4site ++ integer,allocatable,dimension(:,:),save :: q6site ++ integer,allocatable,dimension(:) ,save :: zetasite ++ ++c Number of included sites ++ ++ integer,allocatable,dimension(:),save :: q4ninc ++ integer,allocatable,dimension(:),save :: q6ninc ++ integer,allocatable,dimension(:),save :: zetaninc ++ ++c Real and imaginary parts of q4bar and q6bar ++ ++ real(8),allocatable,dimension(:,:),save :: ReQ6bar,ImQ6bar ++ real(8),allocatable,dimension(:,:),save :: ReQ4bar,ImQ4bar ++ ++c Max number of entries in co-ordination shell ++ ++ integer,parameter :: mxflist = 50 ++ integer :: mxninc ++ ++c Full neighbour list for Tetrahedral order parameter ++ ++ integer,allocatable,dimension(:) ,save :: nflist ++ integer,allocatable,dimension(:,:),save :: flist ++ ++c------------------------------------- ++c Internal bookkeeping ++c------------------------------------- ++ ++ logical,allocatable,dimension(:),save :: driven ! Metadynamics option ++ integer,save :: meta_step=1 ! Current metadynamics step number ++ real(8),save :: meta_energy ! Value of metadynamics bias potential ++ ++ integer,save :: wl_nbins=30 ! Number of bins for WL recursion ++ integer,save :: wl_cycle=0 ! Current WL cycle ++ real(8),save :: wl_range=0.175 ! range of WL ++ real(8),allocatable,dimension(:),save :: wl_bin ! WL bins ++ ++c-------------------------------------- ++c Miscellaneous internal variables ++c-------------------------------------- ++ ++ integer,allocatable,dimension(:) :: buff ! Comms buffer ++ ++c File units ++ ++ integer,save :: stn = 91 ! STEINHARDT ++ integer,save :: mtd = 92 ! METADYNAMICS ++ integer,save :: zta = 93 ! ZETA ++ integer,save :: wlb = 94 ! WL_BINS.DAT ++ ++c Error flag ++ ++ integer,dimension(100) :: ierr = 0 ++ ++c Local store of comms variables ++c Assuming no task farming, comms will require changing if farmed ++ ++ integer, save :: myrank,commsize ++ logical, save :: onroot ++ real(8),save :: kt ++ ++ contains ++ ++ Subroutine Metafreeze_Driver ++ x (imcon,natms,temp,nstep,engcfg,virtot,engord,virord) ++ ++c--------------------------------------------------------------------- ++c Top level metadynamics routine called after evaluation of all ++c other energetic and force terms within the main molecular ++c dynamics loop. ++c ++c 1. Computes the ncolvar order parameters ++c 2. Deposits a new Gaussian at the current collective variables ++c as the current number of steps reaches meta_step_int ++c 3. Computed the bias potential and its derivative w.r.t. the ++c ncolvar collective variables. ++c 4. Computes the forces stresses and virial resulting from the ++c bias ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ use setup_module, only : boltz ++ use config_module, only : fxx,fyy,fzz,stress ++ ++ implicit none ++ ++ integer,intent(in) :: nstep,imcon,natms ++ real(8),intent(in) :: engcfg,virtot,temp ++ real(8),intent(out) :: engord,virord ++ ++c Local variables ++ ++ integer :: k,iq,itet,ibin,nfail,my_meta_step ++ integer,save :: nlastg = 0 ++ real(8) :: height,buff1,wl_mean ++ logical :: flat,safe ++ ++c------------------------------------------------------ ++c Compute order parameters / collective variables ++c------------------------------------------------------ ++ ++c Steinhardt order parameters ++ ++ if ( nq4>0.or.nq6>0 ) call compute_steinhardt(imcon,natms) ++ ++ k = 1 ++ do iq = 1,nq4 ++ colvar(k) = q4_global(iq) ++ k = k + 1 ++ end do ++ do iq = 1,nq6 ++ colvar(k) = q6_global(iq) ++ k = k + 1 ++ end do ++ ++c Tetrahedral order parameters ++ ++ if ( ntet > 0 ) then ++ call compute_tet_nlist(imcon,natms) ++ call compute_tetrahedral(imcon,natms) ++ end if ++ ++ do itet = 1,ntet ++ colvar(k) = zeta_global(itet) ++ k = k + 1 ++ end do ++ ++c Energy order parameters ++ ++ if (lglobpe) then ++ colvar(k) = engcfg ++ k = k + 1 ++ end if ++ if (llocpe) then ++ ++c Global reduction of local virial and energy ++ ++ if ( commsize > 1 ) call gdsum(eng_loc,1,buff1) ++ if ( commsize > 1 ) call gdsum(vir_loc,1,buff1) ++ colvar(k) = eng_loc ++ k = k + 1 ++ end if ++ ++ if ( k-1/=ncolvar ) call Mfrz_Error(2500,0.d0) ++ ++ if ( hkey==1 ) then ++ k = int(dble(wl_nbins)*colvar(1)/wl_range) + 1 ++ if ( k < wl_nbins) wl_bin(k) = wl_bin(k) + 1.0d0 ++ end if ++ ++c-------------------------------------------------------- ++c Deposit a new Gaussian if now is the correct time ++c-------------------------------------------------------- ++ ++ if ( (mod(nstep,meta_step_int)==0).and.(nstep>nlastg) ) then ++ nlastg = nstep ! Avoid multiple depositions at the ++ ! same timestep (relaxed shell model) ++ ++ select case (hkey) ++ ++ case(0) ++ ++c Always deposit Gaussians of the same height ++ ++ height = ref_W_aug ++ ++ case(1) ++ ++c Wang-Landau style recursion ++ ++ open(unit=wlb,file='WL_BINS.DAT',status='replace') ++ ++ do ibin = 1,wl_nbins ++ write(wlb,*)ibin,wl_bin(ibin) ++ end do ++ ++ close(wlb) ++ ++ if ( ncolvar/=1 ) then ++ call Mfrz_Error(2501,0.d0) ++ else ++ ++ height = ref_W_aug*(0.5d0**dble(wl_cycle)) ++ ++ nfail = 0 ++ wl_mean = 0.d0 ++ do ibin = 6,wl_nbins-5 ++ wl_mean = wl_mean + wl_bin(ibin) ++ nfail = nfail + 1 ++ end do ++ wl_mean = wl_mean/dble(nfail) ++ ++ nfail = 0 ++ flat = .true. ++ do ibin = 6,wl_nbins-5 ++ if ( wl_bin(ibin) < 0.8d0*wl_mean ) then ++ if ( nfail > 2 ) flat = .false. ++ nfail = nfail + 1 ++ end if ++ end do ++ ++ if ( flat.and.(sum(wl_bin)>50.0d0) ) then ++ wl_cycle = wl_cycle + 1 ++ wl_bin = 0.0d0 ++ end if ++ ++ height = ref_W_aug*(0.5d0**dble(wl_cycle)) ++ ++ end if ++ ++ case(2) ++ ++c Well-tempered metadynamics ++ ++ meta_energy = 0.0d0 ++ call compute_bias_potential() ++ ++ height = ref_W_aug*exp(-meta_energy/wt_Dt) ++ ++ case default ++ ++ call Mfrz_Error(2502,0.d0) ++ ++ end select ++ ++ call deposit_gaussian(height,temp) ++ my_meta_step = (meta_step-1)/commsize + 1 ++ safe = ( maxhis >= my_meta_step ) ++ call gstate(safe) ++ if ( .not.safe ) call Mfrz_Error(2503,0.d0) ++ ++ end if ++ ++c----------------------------------------------------------- ++c Compute the bias potential and its derivatives w.r.t. ++c to the ncolvar collective variables. ++c----------------------------------------------------------- ++ ++ call compute_bias_potential() ++ ++c----------------------------------------------------------- ++c Add in the forces, stresses and virial contributions ++c from this derivative. ++c----------------------------------------------------------- ++ ++ virord = 0.0d0 ! Zero the virial ++ ++c Must compute contributions from pe order parameters ++c first before we change any forces. ++ ++ k = nq4+nq6+ntet+1 ++ ++c Energy order parameters ++ ++ if (lglobpe) then ++ ++ fxx(:) = fxx(:)*(1.0d0+dcolvar(k)) ++ fyy(:) = fyy(:)*(1.0d0+dcolvar(k)) ++ fzz(:) = fzz(:)*(1.0d0+dcolvar(k)) ++ ++c correct for later summation: ++ ++ virord = virord+dcolvar(k)*virtot/dble(commsize) ++ stress = stress*(1.0d0+dcolvar(k)) ++ ++ end if ++ if (llocpe) then ++ ++ fxx(:) = fxx(:) + fxx_loc(:)*dcolvar(k) ++ fyy(:) = fyy(:) + fyy_loc(:)*dcolvar(k) ++ fzz(:) = fzz(:) + fzz_loc(:)*dcolvar(k) ++ ++c correct for later summation: ++ ++ virord = virord + dcolvar(k)*vir_loc/dble(commsize) ++ stress = stress + stress_loc*dcolvar(k) ++ ++ end if ++ ++c Steinhardt order parameters ++ ++ if ( nq4>0.or.nq6>0 ) call ++ x compute_steinhardt_forces(imcon,natms,engord,virord) ++ ++c Tetrahedral order parameters ++ ++ if ( ntet > 0 ) call ++ x compute_tetrahedral_forces(imcon,natms,engord,virord) ++ ++c global reduction of virord ++ ++ if ( commsize > 1 ) call gdsum(virord,1,buff1) ++ ++ engord = meta_energy ++ ++c write(0,'("DEBUG : engord = ",F12.6)')engord/(temp*boltz) ++ ++ return ++ ++ end Subroutine Metafreeze_Driver ++ ++ Subroutine Deposit_Gaussian(height,temp) ++ ++c--------------------------------------------------------------------- ++c ++c Deposits a new Gaussian at the current collective variables and ++c appends to the METADYNAMICs file. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ use setup_module, only : boltz ++ ++ implicit none ++ ++ real(8),intent(in) :: height,temp ++ integer :: my_meta_step ++ character(11) :: fmtstring ++ ++c store current order parameters and Gaussian height ++ ++ if ( mod(meta_step-1,commsize) == myrank ) then ++ ++ my_meta_step = (meta_step-1)/commsize + 1 ++ w_aug(my_meta_step) = height ++ colvar_his(:,my_meta_step) = colvar(:) ++ ++ end if ++ ++ if (onroot) then ++ ++c Create format string ++ ++ write(fmtstring,'("(I8,",I1,"E15.6)")')ncolvar+1 ++ ++c write METADYNAMICS file ++ ++ open(unit=mtd,file='METADYNAMICS',status='old',position= ++ x 'append',iostat=ierr(1)) ++ write(unit=mtd,fmt=fmtstring)meta_step,colvar(:), ++ x height/(temp*boltz) ++ close(unit=mtd) ++ ++ end if ++ ++ meta_step = meta_step+1 ++ ++ return ++ ++ end Subroutine Deposit_Gaussian ++ ++ Subroutine Compute_Bias_Potential() ++ ++c--------------------------------------------------------------------- ++c ++c Computes the augmenting bias potential as a function of the ++c collective variables. Also computes the derivative of the bias ++c potential w.r.t. the collective variables required to compute ++c the metadynamics forces. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ implicit none ++ ++ integer :: istep,ic,k,my_meta_step ++ real(8) :: vsq,exp1,dWpsq ++ real(8),allocatable,dimension(:) :: buff1,buff2 ++ ++ allocate(buff1(1:2*(ncolvar+1)),stat=ierr(1)) ++ allocate(buff2(1:2*(ncolvar+1)),stat=ierr(2)) ++ ++ if (any(ierr/=0)) call Mfrz_Error(2504,0.d0) ++ ++c Set squared-width of gaussians ++ ++ dWpsq = 1.0d0/h_aug**2 ++ meta_energy = 0.0d0 ++ ++c Zero accumulators of derivative w.r.t. each order parameter ++ ++ dcolvar(:) = 0.0d0 ++ my_meta_step = (meta_step-1)/commsize + 1 ++ do istep=1,my_meta_step ++ ++ vsq = 0.0d0 ++ do ic = 1,ncolvar ++ vsq = vsq + ( colvar_scale(ic)*(colvar(ic) - ++ x colvar_his(ic,istep)) )**2 ++ end do ++ exp1 = w_aug(istep)*exp(-0.5d0*vsq*dWpsq) ++ do ic = 1,ncolvar ++ dcolvar(ic) = dcolvar(ic) - (colvar_scale(ic)**2)*exp1* ++ x (colvar(ic) - colvar_his(ic,istep))*dWpsq ++ end do ++ ++ meta_energy = meta_energy + exp1 ++ ++ end do ++ ++ buff1(1) = meta_energy ++ k = 2 ++ do ic = 1,ncolvar ++ buff1(k) = dcolvar(ic) ++ k = k + 1 ++ end do ++ ++ if ( commsize > 1 ) then ++ call gdsum(buff1,ncolvar+1,buff2) ++ end if ++ ++ meta_energy = buff1(1) ++ ++ k = 2 ++ do ic=1,ncolvar ++ dcolvar(ic) = buff1(k) ++ k = k + 1 ++ end do ++ ++c write(0,'("DEBUG : CV derivs = ",6F15.6)')dcolvar ++ ++ deallocate(buff1,buff2,stat=ierr(1)) ++ ++ return ++ ++ end Subroutine Compute_Bias_Potential ++ ++ Subroutine Define_Metadynamics(tm,ts,natms,ntpatm,temp) ++ ++c--------------------------------------------------------------------- ++c Processes the metadynamics input file. This is done in several ++c stages. ++c 1. Process the metadynamics control data read from the CONTROL ++c file, which defines the number of collective variables and ++c indicates if we need to read from auxilliary input files ++c (e.g. STEINHARDT or ZETA) which define order parameters. ++c 2. Read and process these auxilliary files. ++c 3. Process the information obtained from the CONTROL file which ++c controls the properties of the Gaussians used to build the ++c bias potential. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c Adapted w. smith - jan 2011 ++c ++c--------------------------------------------------------------------- ++ ++ use site_module ++ use config_module, only : ltype ++ use parse_module ++ ++ implicit none ++ ++ integer,intent(in) :: tm,ts,natms,ntpatm ++ real(8),intent(in) :: temp ++ ++c Local variables ++ ++ integer :: isite,jsite,ilin,i,iq,iatm0,iatm1,istrd,iatm,k,n,idum ++ logical :: lexist,go,safe ++ real(8) :: waug,dummy(1) ++ ++c Allocate the driven list. Modifications elsewhere in DLPOLY always ++c check if sites are driven (for accumulation of local PE) and hence ++c this should be allocated if this is a metadynamics run or not. ++ ++ allocate(driven(1:size(unqatm)),stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2505,0.d0) ++ driven = .false. ++ ++c Do nothing else if the metafreeze flag has not been set in CONTROL ++ ++ if (.not.lmetadyn) then ++ return ++ end if ++ ++ myrank=tm ++ commsize = ts ++ onroot = (myrank==0) ++ ++ ++c$$$ DEBUG ++cc$$$ if (onroot) write(0,'("================================")') ++cc$$$ if (onroot) write(0,'("Available sites from site module")') ++cc$$$ if (onroot) write(0,'("================================")') ++cc$$$ if (onroot) then ++cc$$$ do isite = 1,size(unqatm) ++cc$$$ write(0,'("Site index ",i4,": ",a8)')isite,unqatm(isite) ++cc$$$ end do ++cc$$$ end if ++ ++c Cannot bias the global and local PE in the same run. ++ ++ if ( lglobpe.and.llocpe ) call Mfrz_Error(2509,0.d0) ++ ++c Allocate local force arrays if anything is driven. ++ ++ allocate(fxx_loc(1:mxatms),stat=ierr(1)) ++ allocate(fyy_loc(1:mxatms),stat=ierr(2)) ++ allocate(fzz_loc(1:mxatms),stat=ierr(3)) ++ if (any(ierr/=0)) call Mfrz_Error(2510,0.d0) ++ ++c Allocate arrays to hold collective variables ++ ++ allocate( colvar(1:ncolvar),stat=ierr(1)) ++ allocate(dcolvar(1:ncolvar),stat=ierr(2)) ++ allocate(colvar_his(1:ncolvar,1:maxhis),stat=ierr(3)) ++ allocate(colvar_scale(1:ncolvar),stat=ierr(4)) ++ allocate(w_aug(1:maxhis),stat=ierr(5)) ++ if (any(ierr/=0)) call Mfrz_Error(2511,0.d0) ++ ++c Allocate Wang-Landau bin array ++ ++ allocate(wl_bin(1:wl_nbins),stat=ierr(1)) ++ if (any(ierr/=0)) call Mfrz_Error(2512,0.d0) ++ wl_bin = 0.0d0 ++ ++c------------------------------------------------------------- ++c Process Steinhardt order parameter settings if present ++c------------------------------------------------------------- ++ ++ if ( lstein ) then ++ ++ allocate(q4label(1:2,1:nq4),stat=ierr(1)) ++ allocate(q6label(1:2,1:nq6),stat=ierr(2)) ++ allocate(q4cutoff(1:2,1:nq4),stat=ierr(3)) ++ allocate(q6cutoff(1:2,1:nq6),stat=ierr(4)) ++ allocate(q4scale(1:nq4),stat=ierr(5)) ++ allocate(q6scale(1:nq6),stat=ierr(6)) ++ allocate(q4nn(1:nq4),stat=ierr(7)) ++ allocate(q6nn(1:nq6),stat=ierr(8)) ++ allocate(q4ninc(1:nq4),stat=ierr(9)) ++ allocate(q6ninc(1:nq6),stat=ierr(10)) ++ allocate(buff(1:max(nq4,nq6)),stat=ierr(11)) ++ allocate(q4_global(1:nq4),stat=ierr(12)) ++ allocate(q6_global(1:nq6),stat=ierr(13)) ++ allocate(ReQ4Bar(-4:+4,1:nq4),stat=ierr(14)) ++ allocate(ImQ4Bar(-4:+4,1:nq4),stat=ierr(15)) ++ allocate(ReQ6Bar(-6:+6,1:nq6),stat=ierr(16)) ++ allocate(ImQ6Bar(-6:+6,1:nq6),stat=ierr(17)) ++ if (any(ierr/=0)) call Mfrz_Error(2515,0.d0) ++ ++c Open STEINHARDT file and process ++ ++ if (onroot) then ++ open(unit=stn,file='STEINHARDT',status='old',iostat=ierr(1)) ++ else ++ ierr(1)=0 ++ endif ++ call gisum(ierr(1),1,ierr(2)) ++ if ( ierr(1)/=0 ) call Mfrz_Error(2516,0.d0) ++ ++ ilin = 1 ++ safe=.true. ++ if (nq4>0) then ++ call getrec(safe,myrank,stn) ! Ignore q4 comment line ++ ilin = ilin + 1 ++ do i = 1,nq4 ++ call getrec(safe,myrank,stn) ++ if (safe) then ++ call getword(q4label(1,i),record,8,lenrec) ++ call getword(q4label(2,i),record,8,lenrec) ++ q4cutoff(1,i)=dblstr(record,lenrec,idum) ++ q4cutoff(2,i)=dblstr(record,lenrec,idum) ++ q4scale(i)=dblstr(record,lenrec,idum) ++ q4nn(i)=intstr(record,lenrec,idum) ++ ierr(ilin)=0 ++ else ++ ierr(ilin)=1 ++ endif ++ ilin = ilin + 1 ++ end do ++ end if ++ if (nq6>0) then ++ call getrec(safe,myrank,stn) ! Ignore q6 comment line ++ ilin = ilin + 1 ++ do i = 1,nq6 ++ call getrec(safe,myrank,stn) ++ if (safe) then ++ call getword(q6label(1,i),record,8,lenrec) ++ call getword(q6label(2,i),record,8,lenrec) ++ q6cutoff(1,i)=dblstr(record,lenrec,idum) ++ q6cutoff(2,i)=dblstr(record,lenrec,idum) ++ q6scale(i)=dblstr(record,lenrec,idum) ++ q6nn(i)=intstr(record,lenrec,idum) ++ ierr(ilin)=0 ++ else ++ ierr(ilin)=1 ++ endif ++ ilin = ilin + 1 ++ end do ++ end if ++ if (onroot) close(unit=stn) ++ ++ call gisum(ierr(1),ilin-1,ierr(ilin)) ++ do i = 1,ilin-1 ++ if (ierr(i)/=0) then ++ call Mfrz_Error(2521,dble(i)) ++ end if ++ end do ++ ++c Create array indicating which site-site connections use ++c which set of q4 cut-offs, scaling factors and num neighbours. ++ ++ allocate(q4site(1:size(unqatm),1:size(unqatm)),stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2517,0.d0) ++ q4site(:,:) = 0 ++ ++ do isite = 1,ntpatm ++ do jsite = isite,ntpatm ++ do iq = 1,nq4 ++ if ((q4label(1,iq)==unqatm(isite)).and. ++ x (q4label(2,iq)==unqatm(jsite))) then ++ q4site(jsite,isite) = iq ++ q4site(isite,jsite) = iq ++ driven(jsite) = .true. ++ driven(isite) = .true. ++ end if ++ end do ++ end do ++ end do ++ ++ allocate(q6site(1:size(unqatm),1:size(unqatm)),stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2518,0.d0) ++ q6site(:,:) = 0 ++ do isite = 1,ntpatm ++ do jsite = isite,ntpatm ++ do iq = 1,nq6 ++ if ((q6label(1,iq)==unqatm(isite)).and. ++ x q6label(2,iq)==unqatm(jsite)) then ++ q6site(jsite,isite) = iq ++ q6site(isite,jsite) = iq ++ driven(jsite) = .true. ++ driven(isite) = .true. ++ end if ++ end do ++ end do ++ end do ++ ++c Count number of included sites ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ q4ninc = 0 ++ q6ninc = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ isite = ltype(iatm) ++ ++ do iq = 1,nq4 ++ if (unqatm(isite)==q4label(1,iq)) q4ninc(iq) = q4ninc(iq) + 1 ++ end do ++ do iq = 1,nq6 ++ if (unqatm(isite)==q6label(1,iq)) q6ninc(iq) = q6ninc(iq) + 1 ++ end do ++ ++ end do ++ ++ if ( commsize > 0 ) then ++ if (nq4>0) call gisum(q4ninc,nq4,buff(1:nq4)) ++ if (nq6>0) call gisum(q6ninc,nq6,buff(1:nq6)) ++ end if ++ ++ deallocate(buff,stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2519,0.d0) ++ ++ end if ! end if steinhardt order parameters ++ ++ if ( ltet ) then ++ ++ allocate(zetacutoff(1:2,1:ntet),stat=ierr(1)) ++ allocate(zeta_global(1:ntet),stat=ierr(2)) ++ allocate(zetascale(1:ntet),stat=ierr(3)) ++ allocate(zetalabel(1:ntet),stat=ierr(4)) ++ allocate(zetann(1:ntet),stat=ierr(5)) ++ allocate(zetaninc(1:ntet),stat=ierr(6)) ++ allocate(buff(1:ntet),stat=ierr(7)) ++ if (any(ierr/=0)) call Mfrz_Error(2522,0.d0) ++ ++c Open ZETA file and process ++ ++ if (onroot) then ++ open(unit=zta,file='ZETA',status='old',iostat=ierr(1)) ++ else ++ ierr(1)=0 ++ endif ++ call gisum(ierr(1),1,ierr(2)) ++ if ( ierr(1)/=0 ) call Mfrz_Error(2523,0.d0) ++ ++ ilin = 1 ++ safe=.true. ++ if (ntet>0) then ++ call getrec(safe,myrank,zta) ! Ignore comment line ++ ilin = ilin + 1 ++ do i = 1,ntet ++ call getrec(safe,myrank,zta) ++ if (safe) then ++ call getword(zetalabel(i),record,8,lenrec) ++ zetacutoff(1,i)=dblstr(record,lenrec,idum) ++ zetacutoff(2,i)=dblstr(record,lenrec,idum) ++ zetascale(i)=dblstr(record,lenrec,idum) ++ zetann(i)=intstr(record,lenrec,idum) ++ ierr(ilin)=0 ++ else ++ ierr(ilin)=1 ++ endif ++ ilin = ilin + 1 ++ end do ++ end if ++ if (onroot) close(unit=zta) ++ ++ call gisum(ierr(1),ilin-1,ierr(ilin)) ++ do i = 1,ilin-1 ++ if (ierr(i)/=0) then ++ call Mfrz_Error(2529,dble(i)) ++ end if ++ end do ++ ++c Create array indicating which site-site connections use ++c which set of q4 cut-offs, scaling factors and num neighbours. ++ ++ allocate(zetasite(1:size(unqatm)),stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2524,0.d0) ++ zetasite(:) = 0 ++ ++ do isite = 1,size(unqatm) ++ do iq = 1,ntet ++ if (zetalabel(iq)==unqatm(isite)) then ++ zetasite(isite) = iq ++ driven(isite) = .true. ++ end if ++ end do ++ end do ++ ++c Count number of included sites ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ zetaninc(:) = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ isite = ltype(iatm) ++ ++ do iq = 1,ntet ++ if (unqatm(isite)==zetalabel(iq)) ++ x zetaninc(iq) = zetaninc(iq) + 1 ++ end do ++ end do ++ ++ if (commsize>1) then ++ if (ntet>0) call gisum(zetaninc,ntet,buff) ++ end if ++ ++c$$$ do iq = 1,ntet ++c$$$ write(0,'("Number of sites for zeta type ",I5," : ",I5)') ++c$$$ x iq,zetaninc(iq) ++c$$$ end do ++ ++ mxninc = max(100,4*maxval(zetaninc)/commsize) ++ allocate(nflist(1:mxninc),stat=ierr(1)) ++ allocate(flist(1:mxflist,1:mxninc),stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2525,0.d0) ++ ++ deallocate(buff,stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2519,0.d0) ++ ++ end if ! end if tetrahedral order parameters ++ ++c Check total number of collective variables (ncolvar) matches total ++c number specified by nq4, nq6, ntet and potential energy flags. ++ ++ k = 0 ++ if (llocpe ) k = k + 1 ++ if (lglobpe ) k = k + 1 ++ k = k + ntet + nq4 + nq6 ++ if ( k /= ncolvar ) call Mfrz_Error(2527,0.d0) ++ ++c populate colvar_scale ++ ++ k = 1 ++ do iq = 1,nq4 ++ colvar_scale(k) = q4scale(iq) ++ k = k + 1 ++ end do ++ do iq = 1,nq6 ++ colvar_scale(k) = q6scale(iq) ++ k = k + 1 ++ end do ++ do iq = 1,ntet ++ colvar_scale(k) = zetascale(iq) ++ k = k + 1 ++ end do ++ if (lglobpe) then ++ colvar_scale(k) = globpe_scale ++ k = k + 1 ++ end if ++ if (llocpe) then ++ colvar_scale(k) = locpe_scale ++ k = k + 1 ++ end if ++ ++c write(0,*)lglobpe,llocpe ++c write(0,'("DEBUG : CV Scaling factors : ",6F15.6)')colvar_scale(:) ++ ++ ++c Convert into internal units ++ ++ wt_Dt = wt_Dt*temp*boltz ++ ref_W_aug = ref_W_aug*temp*boltz ++ kt = temp*boltz ++ ++c--------------------------------------------------------------------- ++c Purge the METADYNAMICS file or re-open and read if this is a ++c restart. N.B. we assume a restart if REVOLD if present and ++c ignore keyres. ++c--------------------------------------------------------------------- ++ ++ if (onroot) then ++ inquire(file='REVOLD',exist=lexist) ++ else ++ lexist=.true. ++ endif ++ call gstate(lexist) ++ ++ if (lexist) then ++ ++c read contents of METADYNAMICS file ++ ++ if (onroot) then ++ ++ open(unit=mtd,file='METADYNAMICS',status='old',iostat=ierr(1)) ++ ++ k = 0 ++ do ++ read(unit=mtd,fmt=*,end=10)meta_step,colvar(:),waug ++ waug = waug*temp*boltz ++ if (k == 0) then ++ n = (meta_step-1)/commsize + 1 ++ colvar_his(:,n)=colvar(:) ++ w_aug(n)=waug ++ else ++ dummy(1)=dble(meta_step) ++ call csend(17947,dummy,1,k,idum) ++ call csend(17948,colvar,ncolvar,k,ierr(3)) ++ dummy(1)=waug ++ call csend(17949,dummy,1,k,ierr(4)) ++ end if ++ ++ k = k + 1 ++ if (k == commsize) k = 0 ++ end do ++ ++ 10 close(unit=mtd) ++ ++ do k=1,commsize-1 ++ dummy(1)=-dble(meta_step) ++ call csend(17947,dummy,1,k,ierr(2)) ++ end do ++ ++ else ++ ++ go = .true. ++ do while(go) ++ ++ call crecv(17947,dummy,1) ++ meta_step=nint(dummy(1)) ++ ierr(2)=0 ++ ++ if ( meta_step < 0 ) then ++ meta_step = -meta_step ++ go = .false. ++ else ++ call crecv(17948,colvar,ncolvar) ++ ierr(3)=0 ++ call crecv(17949,dummy,1) ++ waug=dummy(1) ++ ierr(4)=0 ++ n = (meta_step-1)/commsize + 1 ++ colvar_his(:,n)=colvar(:) ++ w_aug(n)=waug ++ end if ++ ++ enddo ++ ++ end if ++ call gisum(ierr(1),4,ierr(5)) ++ do i=1,4 ++ if (ierr(i)/=0) call Mfrz_Error(2531,0.d0) ++ enddo ++ meta_step = meta_step + 1 ++ ++ else ++ ++c purge any existing METADYNAMICS file ++ ++ if (onroot) then ++ ++ open(unit=mtd,file='METADYNAMICS',status='replace', ++ x iostat=ierr(1)) ++ close(unit=mtd) ++ ++ end if ++ ++ end if ++ ++ return ++ ++ end Subroutine Define_Metadynamics ++ ++ Function Fc(r,inner_cut,outer_cut) ++ ++c--------------------------------------------------------------------- ++c ++c Computes the smooth cut-off function used when computing an order ++c parameter as a function of pair separation. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ implicit none ++ ++ real(8),parameter :: Pi=3.141592653589793238462643383279502884d0 ++ real(8),intent(in) :: r,inner_cut,outer_cut ++ real(8) :: fc ++ ++ if ( r > outer_cut ) then ++ fc = 0.0d0 ++ elseif ( r > inner_cut ) then ++ fc = 0.5d0*cos((r-inner_cut)*Pi/(outer_cut-inner_cut))+0.5d0 ++ elseif ( r <= inner_cut ) then ++ fc = 1.0d0 ++ else ++ call Mfrz_Error(2532,r) ++ end if ++ ++ return ++ ++ end Function Fc ++ ++ Function Dfc(r,inner_cut,outer_cut) ++ ++c--------------------------------------------------------------------- ++c Computes the derivative of the smooth cut-off function used when ++c computing an order parameter as a function of pair separation. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ implicit none ++ ++ real(8),parameter :: Pi=3.141592653589793238462643383279502884d0 ++ real(8),intent(in) :: r,inner_cut,outer_cut ++ real(8) :: dfc ++ ++ if ( r > outer_cut ) then ++ dfc = 0.0d0 ++ elseif ( r > inner_cut ) then ++ dfc = -0.5d0*sin((r-inner_cut)*Pi/(outer_cut-inner_cut)) ++ x *Pi/(outer_cut-inner_cut) ++ else ++ dfc = 0.0d0 ++ end if ++ ++ return ++ ++ end Function Dfc ++ ++ subroutine compute_steinhardt(imcon,natms) ++ ++c--------------------------------------------------------------------- ++c ++c Computes nq4 Q4 and nq6 Q6 global order parameters. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use setup_module, only : mxlist ++ use utility_module, only : images ++ ++ implicit none ++ ++c Arguments ++ ++ integer,intent(in) :: imcon,natms ++ ++c sqrt(pi/13) , sqrt(pi/9) , 1/3 ++ ++ real(8),parameter :: rpibtt = 0.491590249d0 ++ real(8),parameter :: rpibn = 0.590817950d0 ++ real(8),parameter :: third = 1.0d0/3.0d0 ++ ++c Prefactors for spherical harmonics with l = 6 ++ ++ real(8),parameter :: ypre6m6 = 0.48308411358006625446748d0 ++ real(8),parameter :: ypre6m5 = 1.67345245810009801701312d0 ++ real(8),parameter :: ypre6m4 = 0.35678126285399802686271d0 ++ real(8),parameter :: ypre6m3 = 0.65139048586771575166665d0 ++ real(8),parameter :: ypre6m2 = 0.32569524293385787583333d0 ++ real(8),parameter :: ypre6m1 = 0.41197551630114082055201d0 ++ real(8),parameter :: ypre6m0 = 0.06356920226762842462964d0 ++ real(8),parameter :: ypre6p1 = -0.41197551630114082055201d0 ++ real(8),parameter :: ypre6p2 = 0.32569524293385787583333d0 ++ real(8),parameter :: ypre6p3 = -0.65139048586771575166665d0 ++ real(8),parameter :: ypre6p4 = 0.35678126285399802686271d0 ++ real(8),parameter :: ypre6p5 = -1.67345245810009801701312d0 ++ real(8),parameter :: ypre6p6 = 0.48308411358006625446748d0 ++ ++c Prefactors for spherical harmonics with l = 4 ++ ++ real(8),parameter :: ypre4m4 = 0.44253269244498261159038d0 ++ real(8),parameter :: ypre4m3 = 1.25167147089835228968013d0 ++ real(8),parameter :: ypre4m2 = 0.33452327177864460416856d0 ++ real(8),parameter :: ypre4m1 = 0.47308734787878004013351d0 ++ real(8),parameter :: ypre4m0 = 0.10578554691520430930396d0 ++ real(8),parameter :: ypre4p1 = -0.47308734787878004013351d0 ++ real(8),parameter :: ypre4p2 = 0.33452327177864460416856d0 ++ real(8),parameter :: ypre4p3 = -1.25167147089835228968013d0 ++ real(8),parameter :: ypre4p4 = 0.44253269244498261159038d0 ++ ++c Maximum no. of entries in solvation list ++ ++ integer :: maxneigh ++ ++c Solvation shell information - Q4 ++ ++ real(8),allocatable,dimension(:) :: solvx4,solvy4,solvz4 ++ real(8),allocatable,dimension(:) :: solvrmag4,solvimag4,solvrsq4 ++ integer,allocatable,dimension(:) :: solvlist4,solvtype4 ++ integer :: isolvmax4 ++ ++c Solvation shell information - Q6 ++ ++ real(8),allocatable,dimension(:) :: solvx6,solvy6,solvz6 ++ real(8),allocatable,dimension(:) :: solvrmag6,solvimag6,solvrsq6 ++ integer,allocatable,dimension(:) :: solvlist6,solvtype6 ++ integer :: isolvmax6 ++ ++c separation vectors and powers thereof ++ ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ real(8) :: x,y,z ++ real(8) :: x2,y2,z2,x3,y3,z3 ++ real(8) :: x4,y4,z4,x5,y5,z5 ++ real(8) :: x6,y6,z6 ++ real(8) :: invrc,invrs ++ ++c list of separation vectors ++ integer :: numdst ++ integer,allocatable,dimension(:) :: dstlst ++ ++ ++c Comms buffers ++ ++ real(8),allocatable,dimension(:) :: buff1,buff2 ++ ++c Temporaries ++ ++ real(8) :: tmpsq,f_ij,df_ij,ReYlm,ImYlm,tmpvar ++ ++c Loop counters ++ ++ integer :: iatm1,iatm0,iatm,isite,istrd,ii,isolv4,isolv6,isolv ++ integer :: idi,idj,limit,nn,k,jatm,jsite,q4type,q6type ++ integer :: itype,jtype,l,m,iq ++ ++ maxneigh = 100 ! Max number of atoms in coordination shell ++ ++ ierr = 0 ! Error flags ++ ++ ++c DQ - modified 10/12/11, arrays now big enough ++c to hold maximum number of neighbours plus ++c maximum number of excluded atoms. ++ allocate(xdf(1:mxlist+mxexcl),stat=ierr(1)) ++ allocate(ydf(1:mxlist+mxexcl),stat=ierr(2)) ++ allocate(zdf(1:mxlist+mxexcl),stat=ierr(3)) ++ ++c DQ - modified 10/12/11, array to hold a list of ++c all atom entries in the above three arrays ++ allocate(dstlst(1:mxlist+mxexcl),stat=ierr(4)) ++ ++ allocate(solvx4(1:maxneigh),stat=ierr(5)) ++ allocate(solvy4(1:maxneigh),stat=ierr(6)) ++ allocate(solvz4(1:maxneigh),stat=ierr(7)) ++ allocate(solvrmag4(1:maxneigh),stat=ierr(8)) ++ allocate(solvimag4(1:maxneigh),stat=ierr(9)) ++ allocate(solvrsq4 (1:maxneigh),stat=ierr(10)) ++ allocate(solvlist4(1:maxneigh),stat=ierr(11)) ++ allocate(solvtype4(1:maxneigh),stat=ierr(12)) ++ ++ allocate(solvx6(1:maxneigh),stat=ierr(13)) ++ allocate(solvy6(1:maxneigh),stat=ierr(14)) ++ allocate(solvz6(1:maxneigh),stat=ierr(15)) ++ allocate(solvrmag6(1:maxneigh),stat=ierr(16)) ++ allocate(solvimag6(1:maxneigh),stat=ierr(17)) ++ allocate(solvrsq6 (1:maxneigh),stat=ierr(18)) ++ allocate(solvlist6(1:maxneigh),stat=ierr(19)) ++ allocate(solvtype6(1:maxneigh),stat=ierr(20)) ++ if (any(ierr/=0)) call Mfrz_Error(2533,0.d0) ++ ++ allocate(buff1(1:18*nq4+26*nq6),stat=ierr(1)) ++ allocate(buff2(1:18*nq4+26*nq6),stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2534,0.d0) ++ ++c Zero accumulators used in Steinhardt order parameters ++ ++ ReQ6bar = 0.0d0 ++ ImQ6bar = 0.0d0 ++ ReQ4bar = 0.0d0 ++ ImQ4bar = 0.0d0 ++ ++c Set atoms looped over by current rank ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++c -------------------------------------------------------------- ++c Build a list of the required connections to iatm. This ++c differs depending on the version of DLPOLY we are using. ++c First we loop over atoms in the neighbour list of iatm. ++c--------------------------------------------------------------- ++ ++ ii = ii + 1 ++ isite=ltype(iatm) ++ limit=lentry(ii) ++ nn = 0 ++ do k = 1,limit ++ ++ jatm = list(ii,k) ++ jsite = ltype(jatm) ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ dstlst(nn) = jatm ++ ++ xdf(nn)=xxx(jatm)-xxx(iatm) ++ ydf(nn)=yyy(jatm)-yyy(iatm) ++ zdf(nn)=zzz(jatm)-zzz(iatm) ++ ++ end do ++ ++c -------------------------------------------------------------- ++c Next we loop over the excluded atom list of iatm and add ++c and pairs needed for computation of the current OP. ++c--------------------------------------------------------------- ++ ++ccc DEBUG ++ccc write(0,'("atom ",I5," has ",I5," excluded interactions")') ++ccc x iatm,mtd_nexatm(iatm) ++ ++ do k = 1,mtd_nexatm(ii) ++ ++ jatm = mtd_lexatm(ii,k) ++ jsite = ltype(jatm) ++ ++ccc DEBUG ++ccc write(0,'("Interaction with atom ",I5," is excluded. ")')jatm ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ dstlst(nn) = jatm ++ ++ xdf(nn)=xxx(jatm)-xxx(iatm) ++ ydf(nn)=yyy(jatm)-yyy(iatm) ++ zdf(nn)=zzz(jatm)-zzz(iatm) ++ ++ end do ++ ++ccc DEBUG ++ccc write(0,'("Num neighbours to consider for atom ",I5," : ",I5)') ++ccc x iatm,nn ++ ++ numdst = nn ++ ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ nn = 0 ++ isolvmax4 = 0 ++ isolvmax6 = 0 ++ isolv4 = 0 ++ isolv6 = 0 ++ ++ do k = 1,numdst ++ jatm = dstlst(k) ++ jsite = ltype(jatm) ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ q4type = q4site(jsite,isite) ++ q6type = q6site(jsite,isite) ++ ++ tmpsq = xdf(nn)*xdf(nn)+ydf(nn)*ydf(nn)+zdf(nn)*zdf(nn) ++ ++ if (nq4>0) then ++ ++c Add to solvation lists if within cut-off ++ ++ if ( tmpsq < q4cutoff(2,q4type)**2 ) then ++ isolv4 = isolv4 + 1 ++ solvlist4(isolv4) = jatm ++ solvrsq4(isolv4) = tmpsq ++ solvrmag4(isolv4) = sqrt(tmpsq) ++ solvimag4(isolv4) = 1.0d0/solvrmag4(isolv4) ++ solvx4(isolv4) = xdf(nn) ++ solvy4(isolv4) = ydf(nn) ++ solvz4(isolv4) = zdf(nn) ++ solvtype4(isolv4) = q4type ++ end if ++ end if ++ ++ if (nq6>0) then ++ ++c Add to solvation lists if within cut-off ++ ++ if ( tmpsq < q6cutoff(2,q6type)**2 ) then ++ isolv6 = isolv6 + 1 ++ solvlist6(isolv6) = jatm ++ solvrsq6(isolv6) = tmpsq ++ solvrmag6(isolv6) = sqrt(tmpsq) ++ solvimag6(isolv6) = 1.0d0/solvrmag6(isolv6) ++ solvx6(isolv6) = xdf(nn) ++ solvy6(isolv6) = ydf(nn) ++ solvz6(isolv6) = zdf(nn) ++ solvtype6(isolv6) = q6type ++ end if ++ end if ++ isolvmax4 = isolv4 ++ isolvmax6 = isolv6 ++ if ((isolv4>maxneigh) .or. (isolv6>maxneigh)) ++ x call Mfrz_Error(2535,0.d0) ++ ++ end do ! end loop over k ++ ++ccc write(0,'("Num in range for OPs on atom ",I5," : ",I5)') ++ccc x iatm,isolvmax4 ++ ++ ++c--------------------------------------------------------- ++c Compute Q4 Steinhardt order parameters ++c--------------------------------------------------------- ++ ++ if ( (nq4>0).and.isolvmax4>0 ) then ++ ++ do isolv4 = 1,isolvmax4 ++ ++ jatm = solvlist4(isolv4) ++ itype = solvtype4(isolv4) ++ ++ invrc = solvimag4(isolv4)**6 ++ invrs = solvimag4(isolv4)**4 ++ ++ x = solvx4(isolv4) ++ y = solvy4(isolv4) ++ z = solvz4(isolv4) ++ ++ f_ij = fc(solvrmag4(isolv4),q4cutoff(1,itype), ++ x q4cutoff(2,itype)) ++ ++ x2 = x*x ++ y2 = y*y ++ z2 = z*z ++ ++ x3 = x2*x ++ y3 = y2*y ++ z3 = z2*z ++ ++ x4 = x2*x2 ++ y4 = y2*y2 ++ z4 = z2*z2 ++ ++ x5 = x4*x ++ y5 = y4*y ++ z5 = z4*z ++ ++ x6 = x4*x2 ++ y6 = y4*y2 ++ z6 = z4*z2 ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(-4/+4) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre4m4*invrs*(x4-6.d0*x2*y2+y4) ++ ImYlm = ypre4m4*invrs*(-4.d0*x3*y+4.d0*x*y3) ++ ++ ReQ4bar(-4,itype) = ReQ4bar(-4,itype) + f_ij*ReYlm ++ ImQ4bar(-4,itype) = ImQ4bar(-4,itype) + f_ij*ImYlm ++ ++ ReQ4bar(+4,itype) = ReQ4bar(+4,itype) + f_ij*ReYlm ++ ImQ4bar(+4,itype) = ImQ4bar(+4,itype) - f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(-3/+3) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre4m3*invrs*z*(x3-3.d0*x*y2) ++ ImYlm = ypre4m3*invrs*z*(-3.d0*x2*y+y3) ++ ++ ReQ4bar(-3,itype) = ReQ4bar(-3,itype) + f_ij*ReYlm ++ ImQ4bar(-3,itype) = ImQ4bar(-3,itype) + f_ij*ImYlm ++ ++ ReQ4bar(+3,itype) = ReQ4bar(+3,itype) - f_ij*ReYlm ++ ImQ4bar(+3,itype) = ImQ4bar(+3,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(-2/+2) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre4m2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) ++ ImYlm = ypre4m2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y ++ ++ ReQ4bar(-2,itype) = ReQ4bar(-2,itype) + f_ij*ReYlm ++ ImQ4bar(-2,itype) = ImQ4bar(-2,itype) + f_ij*ImYlm ++ ++ ReQ4bar(+2,itype) = ReQ4bar(+2,itype) + f_ij*ReYlm ++ ImQ4bar(+2,itype) = ImQ4bar(+2,itype) - f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(-1/+1) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x ++ ImYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y ++ ++ ReQ4bar(-1,itype) = ReQ4bar(-1,itype) + f_ij*ReYlm ++ ImQ4bar(-1,itype) = ImQ4bar(-1,itype) + f_ij*ImYlm ++ ++ ReQ4bar(+1,itype) = ReQ4bar(+1,itype) - f_ij*ReYlm ++ ImQ4bar(+1,itype) = ImQ4bar(+1,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(0) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre4m0*invrs*(8.d0*z4-24.d0*z2*x2-24.d0*z2*y2+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++ ReQ4bar(0,itype) = ReQ4bar(0,itype) + f_ij*ReYlm ++ ++ end do ! end loop over connection list for iatm ++ ++ end if ! end if computing Q4 ++ ++c------------------------------------------------ ++c Compute Q6 Steinhardt order parameters ++c------------------------------------------------ ++ ++ if ( (nq6>0).and.isolvmax6>0 ) then ++ ++ do isolv6 = 1,isolvmax6 ++ ++ jatm = solvlist6(isolv6) ++ itype = solvtype6(isolv6) ++ ++ invrc = solvimag6(isolv6)**6 ++ invrs = solvimag6(isolv6)**4 ++ ++ x = solvx6(isolv6) ++ y = solvy6(isolv6) ++ z = solvz6(isolv6) ++ ++ f_ij = fc(solvrmag6(isolv6),q6cutoff(1,itype), ++ x q6cutoff(2,itype)) ++ ++ x2 = x*x ++ y2 = y*y ++ z2 = z*z ++ ++ x3 = x2*x ++ y3 = y2*y ++ z3 = z2*z ++ ++ x4 = x2*x2 ++ y4 = y2*y2 ++ z4 = z2*z2 ++ ++ x5 = x4*x ++ y5 = y4*y ++ z5 = z4*z ++ ++ x6 = x4*x2 ++ y6 = y4*y2 ++ z6 = z4*z2 ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-6/+6) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m6*invrc*(x6-15.0d0*x4*y2+15.0d0*x2*y4-y6) ++ ImYlm = ypre6m6*invrc*(-6.0d0*x5*y+20.0d0*x3*y3-6.0d0*x*y5) ++ ++ ReQ6bar(-6,itype) = ReQ6bar(-6,itype) + f_ij*ReYlm ++ ImQ6bar(-6,itype) = ImQ6bar(-6,itype) + f_ij*ImYlm ++ ++ ReQ6bar(+6,itype) = ReQ6bar(+6,itype) + f_ij*ReYlm ++ ImQ6bar(+6,itype) = ImQ6bar(+6,itype) - f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-5/+5) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre6m5*invrc*z*(-x5+10.0d0*x3*y2-5.0d0*x*y4) ++ ImYlm = -ypre6m5*invrc*z*(5.0d0*x4*y-10.0d0*x2*y3+y5) ++ ++ ReQ6bar(-5,itype) = ReQ6bar(-5,itype) + f_ij*ReYlm ++ ImQ6bar(-5,itype) = ImQ6bar(-5,itype) + f_ij*ImYlm ++ ++ ReQ6bar(+5,itype) = ReQ6bar(+5,itype) - f_ij*ReYlm ++ ImQ6bar(+5,itype) = ImQ6bar(+5,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-4/+4) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(x4-6.0d0*x2*y2+y4) ++ ImYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(-4.0d0*x3*y+ ++ x 4.0d0*x*y3) ++ ++ ReQ6bar(-4,itype) = ReQ6bar(-4,itype) + f_ij*ReYlm ++ ImQ6bar(-4,itype) = ImQ6bar(-4,itype) + f_ij*ImYlm ++ ++ ReQ6bar(+4,itype) = ReQ6bar(+4,itype) + f_ij*ReYlm ++ ImQ6bar(+4,itype) = ImQ6bar(+4,itype) - f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-3/+3) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* ++ x (-x3+3.0d0*x*y2) ++ ImYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* ++ x (3.0d0*x2*y-y3) ++ ++ ReQ6bar(-3,itype) = ReQ6bar(-3,itype) + f_ij*ReYlm ++ ImQ6bar(-3,itype) = ImQ6bar(-3,itype) + f_ij*ImYlm ++ ++ ReQ6bar(+3,itype) = ReQ6bar(+3,itype) - f_ij*ReYlm ++ ImQ6bar(+3,itype) = ImQ6bar(+3,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-2/+2) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m2*invrc*(16.0d0*z4-16.0d0*z2*x2-16.0d0*z2*y2+ ++ x x4+2.0d0*x2*y2+y4)*(x2-y2) ++ ImYlm = -ypre6m2*invrc*2.0d0*(16.0d0*z4-16.0d0*z2*x2-16.0d0* ++ x z2*y2+x4+2.0d0*x2*y2+y4)*x*y ++ ++ ReQ6bar(-2,itype) = ReQ6bar(-2,itype) + f_ij*ReYlm ++ ImQ6bar(-2,itype) = ImQ6bar(-2,itype) + f_ij*ImYlm ++ ++ ReQ6bar(+2,itype) = ReQ6bar(+2,itype) + f_ij*ReYlm ++ ImQ6bar(+2,itype) = ImQ6bar(+2,itype) - f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-1/+1) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ ++ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x ++ ImYlm = -ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ ++ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y ++ ++ ReQ6bar(-1,itype) = ReQ6bar(-1,itype) + f_ij*ReYlm ++ ImQ6bar(-1,itype) = ImQ6bar(-1,itype) + f_ij*ImYlm ++ ++ ReQ6bar(+1,itype) = ReQ6bar(+1,itype) - f_ij*ReYlm ++ ImQ6bar(+1,itype) = ImQ6bar(+1,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(0) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m0*invrc*(16.0d0*z6-120.0d0*z4*x2-120.0d0*z4* ++ x y2+90.0d0*z2*x4+180.0d0*z2*x2*y2+90.0d0*z2*y4-5.0d0 ++ x *x6-15.0d0*x4*y2-15.0d0*x2*y4-5.0d0*y6) ++ ++ ReQ6bar(0,itype) = ReQ6bar(0,itype) + f_ij*ReYlm ++ ++ end do ! end loop over connection list for iatm ++ ++ end if ! end if computing Q6 ++ ++ end do ! end loop over iatm ++ ++c----------------------------------------------- ++c Global summation of order parameters ++c----------------------------------------------- ++ ++ l = 1 ++ do itype = 1,nq4 ++ do m = -4,4 ++ buff1(l) = ReQ4bar(m,itype) ++ l = l + 1 ++ end do ++ do m = -4,4 ++ buff1(l) = ImQ4bar(m,itype) ++ l = l + 1 ++ end do ++ end do ++ do itype = 1,nq6 ++ do m = -6,6 ++ buff1(l) = ReQ6bar(m,itype) ++ l = l + 1 ++ end do ++ do m = -6,6 ++ buff1(l) = ImQ6bar(m,itype) ++ l = l + 1 ++ end do ++ end do ++ ++ if (commsize>1) call gdsum(buff1,18*nq4+26*nq6,buff2) ++ ++ l = 1 ++ do itype = 1,nq4 ++ do m = -4,4 ++ ReQ4bar(m,itype) = buff1(l) ++ l = l + 1 ++ end do ++ do m = -4,4 ++ ImQ4bar(m,itype) = buff1(l) ++ l = l + 1 ++ end do ++ end do ++ do itype = 1,nq6 ++ do m = -6,6 ++ ReQ6bar(m,itype) = buff1(l) ++ l = l + 1 ++ end do ++ do m = -6,6 ++ ImQ6bar(m,itype) = buff1(l) ++ l = l + 1 ++ end do ++ end do ++ ++c--------------------------------------------------- ++c Final computation of global order parameters ++c--------------------------------------------------- ++ ++ l = 1 ++ do iq = 1,nq4 ++ tmpvar = 0.0d0 ++ do m = 1,18 ++ tmpvar = tmpvar + buff1(l)**2 ++ l = l + 1 ++ end do ++ q4_global(iq) = 4.0d0*rpibn*sqrt(tmpvar)/ ++ x dble(q4ninc(iq)*q4nn(iq)) ++ end do ++ ++ do iq = 1,nq6 ++ tmpvar = 0.0d0 ++ do m = 1,26 ++ tmpvar = tmpvar + buff1(l)**2 ++ l = l + 1 ++ end do ++ q6_global(iq) = 4.0d0*rpibtt*sqrt(tmpvar)/ ++ x dble(q6ninc(iq)*q6nn(iq)) ++ end do ++ ++c Tidy up ++ ++ deallocate(xdf,stat=ierr(1)) ++ deallocate(ydf,stat=ierr(2)) ++ deallocate(zdf,stat=ierr(3)) ++ ++ deallocate(dstlst,stat=ierr(4)) ++ ++ deallocate(solvx4,stat=ierr(5)) ++ deallocate(solvy4,stat=ierr(6)) ++ deallocate(solvz4,stat=ierr(7)) ++ deallocate(solvrmag4,stat=ierr(8)) ++ deallocate(solvimag4,stat=ierr(9)) ++ deallocate(solvrsq4 ,stat=ierr(10)) ++ deallocate(solvlist4,stat=ierr(11)) ++ deallocate(solvtype4,stat=ierr(12)) ++ ++ deallocate(solvx6,stat=ierr(13)) ++ deallocate(solvy6,stat=ierr(14)) ++ deallocate(solvz6,stat=ierr(15)) ++ deallocate(solvrmag6,stat=ierr(16)) ++ deallocate(solvimag6,stat=ierr(17)) ++ deallocate(solvrsq6 ,stat=ierr(18)) ++ deallocate(solvlist6,stat=ierr(19)) ++ deallocate(solvtype6,stat=ierr(20)) ++ if (any(ierr/=0)) call Mfrz_Error(2536,0.d0) ++ ++ deallocate(buff1,stat=ierr(1)) ++ deallocate(buff2,stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2537,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Steinhardt ++ ++ Subroutine Compute_Steinhardt_Forces(imcon,natms,engord,virord) ++ ++c--------------------------------------------------------------------- ++c ++c Computes forces from nq4 Q4 and nq6 Q6 global order parameters. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use setup_module, only : mxlist ++ use utility_module, only : images ++ implicit none ++ ++c Arguments ++ ++ integer,intent(in) :: imcon,natms ++ ++ real(8),intent(inout) :: engord,virord ++ ++c sqrt(pi/13) , sqrt(pi/9) , 1/3 ++ ++ real(8),parameter :: rpibtt = 0.491590249d0 ++ real(8),parameter :: rpibn = 0.590817950d0 ++ real(8),parameter :: third = 1.0d0/3.0d0 ++ ++c Prefactors for spherical harmonics with l = 6 ++ ++ real(8),parameter :: ypre6m6 = 0.48308411358006625446748d0 ++ real(8),parameter :: ypre6m5 = 1.67345245810009801701312d0 ++ real(8),parameter :: ypre6m4 = 0.35678126285399802686271d0 ++ real(8),parameter :: ypre6m3 = 0.65139048586771575166665d0 ++ real(8),parameter :: ypre6m2 = 0.32569524293385787583333d0 ++ real(8),parameter :: ypre6m1 = 0.41197551630114082055201d0 ++ real(8),parameter :: ypre6m0 = 0.06356920226762842462964d0 ++ real(8),parameter :: ypre6p1 = -0.41197551630114082055201d0 ++ real(8),parameter :: ypre6p2 = 0.32569524293385787583333d0 ++ real(8),parameter :: ypre6p3 = -0.65139048586771575166665d0 ++ real(8),parameter :: ypre6p4 = 0.35678126285399802686271d0 ++ real(8),parameter :: ypre6p5 = -1.67345245810009801701312d0 ++ real(8),parameter :: ypre6p6 = 0.48308411358006625446748d0 ++ ++c Prefactors for speherical harmonics with l = 4 ++ ++ real(8),parameter :: ypre4m4 = 0.44253269244498261159038d0 ++ real(8),parameter :: ypre4m3 = 1.25167147089835228968013d0 ++ real(8),parameter :: ypre4m2 = 0.33452327177864460416856d0 ++ real(8),parameter :: ypre4m1 = 0.47308734787878004013351d0 ++ real(8),parameter :: ypre4m0 = 0.10578554691520430930396d0 ++ real(8),parameter :: ypre4p1 = -0.47308734787878004013351d0 ++ real(8),parameter :: ypre4p2 = 0.33452327177864460416856d0 ++ real(8),parameter :: ypre4p3 = -1.25167147089835228968013d0 ++ real(8),parameter :: ypre4p4 = 0.44253269244498261159038d0 ++ ++c Maximum no. of entries in solvation list ++ ++ integer :: maxneigh ++ ++c Solvation shell information - Q4 ++ ++ real(8),allocatable,dimension(:) :: solvx4,solvy4,solvz4 ++ real(8),allocatable,dimension(:) :: solvrmag4,solvimag4,solvrsq4 ++ integer,allocatable,dimension(:) :: solvlist4,solvtype4 ++ integer :: isolvmax4 ++ ++c Solvation shell information - Q6 ++ ++ real(8),allocatable,dimension(:) :: solvx6,solvy6,solvz6 ++ real(8),allocatable,dimension(:) :: solvrmag6,solvimag6,solvrsq6 ++ integer,allocatable,dimension(:) :: solvlist6,solvtype6 ++ integer :: isolvmax6 ++ ++c Prefactors arising from derivative of bias potential ++ ++ real(8),allocatable,dimension(:) :: q4prefactor,q6prefactor ++ ++c Separation vectors and powers thereof ++ ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ real(8) :: x,y,z ++ real(8) :: x2,y2,z2,x3,y3,z3 ++ real(8) :: x4,y4,z4,x5,y5,z5 ++ real(8) :: x6,y6,z6 ++ real(8) :: invrc,invrs,invrq ++ ++c list of separation vectors ++ integer :: numdst ++ integer,allocatable,dimension(:) :: dstlst ++ ++c Comms buffers ++ ++ real(8),allocatable,dimension(:) :: buff1,buff2 ++ ++c Temporaries ++ ++ real(8) :: tmpsq,f_ij,df_ij,ReYlm,ImYlm,tmpvar,invrN ++ real(8) :: fx,fy,fz,fx2,fy2,fz2,prefactor2,fx1,fy1,fz1 ++ real(8) :: strs1,strs2,strs3,strs4,strs5,strs6,strs7,strs8,strs9 ++ ++ integer :: iatm1,iatm0,iatm,isite,istrd,ii,isolv4,isolv6,isolv ++ integer :: idi,idj,limit,nn,k,jatm,jsite,q4type,q6type ++ integer :: itype,jtype,l,m,iq ++ ++ maxneigh = 500 ! Max number of atoms in coordination shell ++ ++ ierr = 0 ! Error flags ++ ++c DQ - modified 10/12/11, arrays now big enough ++c to hold maximum number of neighbours plus ++c maximum number of excluded atoms. ++ allocate(xdf(1:mxlist+mxexcl),stat=ierr(1)) ++ allocate(ydf(1:mxlist+mxexcl),stat=ierr(2)) ++ allocate(zdf(1:mxlist+mxexcl),stat=ierr(3)) ++ ++c DQ - modified 10/12/11, array to hold a list of ++c all atom entries in the above three arrays ++ allocate(dstlst(1:mxlist+mxexcl),stat=ierr(4)) ++ ++ allocate(solvx4(1:maxneigh),stat=ierr(5)) ++ allocate(solvy4(1:maxneigh),stat=ierr(6)) ++ allocate(solvz4(1:maxneigh),stat=ierr(7)) ++ allocate(solvrmag4(1:maxneigh),stat=ierr(8)) ++ allocate(solvimag4(1:maxneigh),stat=ierr(9)) ++ allocate(solvrsq4 (1:maxneigh),stat=ierr(10)) ++ allocate(solvlist4(1:maxneigh),stat=ierr(11)) ++ allocate(solvtype4(1:maxneigh),stat=ierr(12)) ++ ++ allocate(solvx6(1:maxneigh),stat=ierr(13)) ++ allocate(solvy6(1:maxneigh),stat=ierr(14)) ++ allocate(solvz6(1:maxneigh),stat=ierr(15)) ++ allocate(solvrmag6(1:maxneigh),stat=ierr(16)) ++ allocate(solvimag6(1:maxneigh),stat=ierr(17)) ++ allocate(solvrsq6 (1:maxneigh),stat=ierr(18)) ++ allocate(solvlist6(1:maxneigh),stat=ierr(19)) ++ allocate(solvtype6(1:maxneigh),stat=ierr(20)) ++ if (any(ierr/=0)) call Mfrz_Error(2538,0.d0) ++ ++ allocate(buff1(1:18*nq4+26*nq6),stat=ierr(1)) ++ allocate(buff2(1:18*nq4+26*nq6),stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2534,0.d0) ++ ++ allocate(q4prefactor(1:nq4),stat=ierr(1)) ++ allocate(q6prefactor(1:nq6),stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2540,0.d0) ++ ++c Compute the prefactors associated from dV_aug/d_q4 ++ ++ k = 1 ++ do iq = 1,nq4 ++ invrN = 1.0d0/dble(q4ninc(iq)*q4nn(iq)) ++ q4prefactor(iq) = -16.0d0*(rpibn**2)*(invrN**2)*dcolvar(k)/ ++ x Q4_global(iq) ++ k = k + 1 ++ end do ++ ++c Compute the prefactors associated from dV_aug/d_q6 ++ ++ do iq = 1,nq6 ++ invrN = 1.0d0/dble(q6ninc(iq)*q6nn(iq)) ++ q6prefactor(iq) = -16.0d0*(rpibtt**2)*(invrN**2)*dcolvar(k)/ ++ x Q6_global(iq) ++ k = k + 1 ++ end do ++ ++c write(0,'("DEBUG : q4prefactors = ",5F15.6)')q4prefactor ++ ++c Set atoms looper over by current rank ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ strs1 = 0.0d0 ++ strs2 = 0.0d0 ++ strs3 = 0.0d0 ++ strs4 = 0.0d0 ++ strs5 = 0.0d0 ++ strs6 = 0.0d0 ++ strs7 = 0.0d0 ++ strs8 = 0.0d0 ++ strs9 = 0.0d0 ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++c -------------------------------------------------------------- ++c Build a list of the required connections to iatm. This ++c differs depending on the version of DLPOLY we are using. ++c First we loop over atoms in the neighbour list of iatm. ++c--------------------------------------------------------------- ++ ++ ii = ii + 1 ++ isite=ltype(iatm) ++ limit=lentry(ii) ++ ++ nn = 0 ++ do k = 1,limit ++ ++ jatm = list(ii,k) ++ jsite = ltype(jatm) ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ dstlst(nn) = jatm ++ ++ xdf(nn)=xxx(jatm)-xxx(iatm) ++ ydf(nn)=yyy(jatm)-yyy(iatm) ++ zdf(nn)=zzz(jatm)-zzz(iatm) ++ ++ end do ++ ++c -------------------------------------------------------------- ++c Next we loop over the excluded atom list of iatm and add ++c and pairs needed for computation of the current OP. ++c--------------------------------------------------------------- ++ ++ccc DEBUG ++ccc write(0,'("atom ",I5," has ",I5," excluded interactions")') ++ccc x iatm,mtd_nexatm(iatm) ++ ++ do k = 1,mtd_nexatm(ii) ++ ++ jatm = mtd_lexatm(ii,k) ++ jsite = ltype(jatm) ++ ++ccc DEBUG ++ccc write(0,'("Interaction with atom ",I5," is excluded. ")')jatm ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ dstlst(nn) = jatm ++ ++ xdf(nn)=xxx(jatm)-xxx(iatm) ++ ydf(nn)=yyy(jatm)-yyy(iatm) ++ zdf(nn)=zzz(jatm)-zzz(iatm) ++ ++ end do ++ ++ccc DEBUG ++ccc write(0,*) ++ ++ numdst = nn ++ ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ ++ nn = 0 ++ isolvmax4 = 0 ++ isolvmax6 = 0 ++ isolv4 = 0 ++ isolv6 = 0 ++ do k = 1,numdst ++ jatm = dstlst(k) ++ jsite = ltype(jatm) ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ q4type = q4site(jsite,isite) ++ q6type = q6site(jsite,isite) ++ ++ tmpsq = xdf(nn)*xdf(nn)+ydf(nn)*ydf(nn)+zdf(nn)*zdf(nn) ++ if (nq4>0) then ++ ++c Add to solvation lists if within cut-off ++ ++ if ( tmpsq < q4cutoff(2,q4type)**2 ) then ++ isolv4 = isolv4 + 1 ++ solvlist4(isolv4) = jatm ++ solvrsq4(isolv4) = tmpsq ++ solvrmag4(isolv4) = sqrt(tmpsq) ++ solvimag4(isolv4) = 1.0d0/solvrmag4(isolv4) ++ solvx4(isolv4) = xdf(nn) ++ solvy4(isolv4) = ydf(nn) ++ solvz4(isolv4) = zdf(nn) ++ solvtype4(isolv4) = q4type ++ end if ++ end if ++ ++ if (nq6>0) then ++ ++c Add to solvation lists if within cut-off ++ ++ if ( tmpsq < q6cutoff(2,q6type)**2 ) then ++ isolv6 = isolv6 + 1 ++ solvlist6(isolv6) = jatm ++ solvrsq6(isolv6) = tmpsq ++ solvrmag6(isolv6) = sqrt(tmpsq) ++ solvimag6(isolv6) = 1.0d0/solvrmag6(isolv6) ++ solvx6(isolv6) = xdf(nn) ++ solvy6(isolv6) = ydf(nn) ++ solvz6(isolv6) = zdf(nn) ++ solvtype6(isolv6) = q6type ++ end if ++ end if ++ isolvmax4 = isolv4 ++ isolvmax6 = isolv6 ++ if ((isolv4>maxneigh) .or. (isolv6>maxneigh)) ++ x call Mfrz_Error(2535,0.d0) ++ ++ end do ! end loop over k ++ ++c--------------------------------------------------------- ++c--------------------------------------------------------- ++c Compute forces arising from Q4 order parameters ++c--------------------------------------------------------- ++c--------------------------------------------------------- ++ ++ if ( (nq4>0).and.isolvmax4>0 ) then ++ ++ do isolv4 = 1,isolvmax4 ++ ++ jatm = solvlist4(isolv4) ++ itype = solvtype4(isolv4) ++ ++ invrc = solvimag4(isolv4)**6 ++ invrq = solvimag4(isolv4)**8 ++ invrs = solvimag4(isolv4)**4 ++ ++ x = solvx4(isolv4) ++ y = solvy4(isolv4) ++ z = solvz4(isolv4) ++ ++ f_ij = fc(solvrmag4(isolv4),q4cutoff(1,itype), ++ x q4cutoff(2,itype)) ++ df_ij = dfc(solvrmag4(isolv4),q4cutoff(1,itype), ++ x q4cutoff(2,itype)) ++ ++ x2 = x*x ++ y2 = y*y ++ z2 = z*z ++ ++ x3 = x2*x ++ y3 = y2*y ++ z3 = z2*z ++ ++ x4 = x2*x2 ++ y4 = y2*y2 ++ z4 = z2*z2 ++ ++ x5 = x4*x ++ y5 = y4*y ++ z5 = z4*z ++ ++ x6 = x4*x2 ++ y6 = y4*y2 ++ z6 = z4*z2 ++ ++ fx = 0.0d0 ++ fy = 0.0d0 ++ fz = 0.0d0 ++ ++c------------------------------------- ++c Gradient of f_ij w.r.t. r_{j} ++c------------------------------------- ++ ++ fx2 = df_ij*x*solvimag4(isolv4) ++ fy2 = df_ij*y*solvimag4(isolv4) ++ fz2 = df_ij*z*solvimag4(isolv4) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -4 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre4m4*invrs*(x4-6.d0*x2*y2+y4) ++ ImYlm = ypre4m4*invrs*(-4.d0*x3*y+4.d0*x*y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = -4 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q4prefactor(itype)*ReQ4bar(-4,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{4,-4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrc*ypre4m4*4.d0*x*(4.d0*x2*y2-4.d0*y4+z2*x2- ++ x 3.d0*z2*y2) ++ fy1 = -invrc*ypre4m4*4.d0*y*(4.d0*x4-4.d0*x2*y2+3.d0* ++ x z2*x2-z2*y2) ++ fz1 = -invrc*ypre4m4*4.d0*z*(x4-6.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -4 (imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q4prefactor(itype)*ImQ4bar(-4,itype) ++ ++c---------------------------------------------- ++c Gradient of Im(Y_{4,-4}) w.r.t r_{j} ++c---------------------------------------------- ++ ++ fx1 = invrc*ypre4m4*4.d0*y*(x4-6.d0*x2*y2-3.d0*z2*x2+ ++ x y4+z2*y2) ++ fy1 = -invrc*ypre4m4*4.d0*x*(-6.d0*x2*y2+y4+x4+z2*x2- ++ x 3.d0*z2*y2) ++ fz1 = invrc*ypre4m4*16.d0*x*y*z*(x2-y2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -3 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre4m3*invrs*z*(x3-3.d0*x*y2) ++ ImYlm = ypre4m3*invrs*z*(-3.d0*x2*y+y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = -3 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q4prefactor(itype)*ReQ4bar(-3,itype) ++ ++c--------------------------------------------- ++c Gradient of Re(Y_{4,-3}) w.r.t r_{j} ++c--------------------------------------------- ++ ++ fx1 = -invrc*ypre4m3*z*(x4-12.d0*x2*y2-3.d0*z2*x2+ ++ x 3.d0*y4+3.d0*z2*y2) ++ fy1 = -invrc*ypre4m3*2.d0*z*x*y*(5.0d0*x2-3.d0*y2+ ++ x 3.d0*z2) ++ fz1 = invrc*ypre4m3*x*(x2-3.d0*y2)*(x2+y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = -3 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q4prefactor(itype)*ImQ4bar(-3,itype) ++ ++c-------------------------------------------------- ++c Gradient of Im(Y_{4,-3}) w.r.t r_{j} ++c-------------------------------------------------- ++ ++ fx1 = invrc*ypre4m3*2.d0*z*x*y*(3.d0*x2-5.d0*y2-3.0d0*z2) ++ fy1 = -invrc*ypre4m3*z*(-12.d0*x2*y2+y4+3.d0*x4+3.d0*z2*x2 ++ x -3.d0*z2*y2) ++ fz1 = -invrc*ypre4m3*y*(3.d0*x2-y2)*(x2+y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -2 ++c-------------------------------------------------------- ++ ++ ReYlm = -ypre4m2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) ++ ImYlm = ypre4m2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y ++ ++c-------------------------------------------------- ++c Force contributions from m = -2 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q4prefactor(itype)*ReQ4bar(-2,itype) ++ ++c--------------------------------------------- ++c Gradient of Re(Y_{4,-2}) w.r.t r_{j} ++c--------------------------------------------- ++ ++ fx1 = -invrc*ypre4m2*4.d0*x*(4.d0*z2*x2+y4-9.d0*z2*y2- ++ x 3.d0*z4+x2*y2) ++ fy1 = invrc*ypre4m2*4.d0*y*(x4-9.d0*z2*x2+4.d0*z2*y2- ++ x 3.d0*z4+x2*y2) ++ fz1 = invrc*ypre4m2*4.d0*z*(x2-y2)*(4.d0*x2+4.d0*y2- ++ x 3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = -2 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q4prefactor(itype)*ImQ4bar(-2,itype) ++ ++c----------------------------------------- ++c Gradient of Im(Y_{4,-2}) w.r.t r_{j} ++c----------------------------------------- ++ ++ fx1 = -invrc*ypre4m2*2.d0*y*(x4-21.d0*z2*x2+5.d0*z2*y2+ ++ x 6.d0*z4-y4) ++ fy1 = invrc*ypre4m2*2.d0*x*(-y4+21.d0*z2*y2-5.d0*z2*x2 ++ x -6.d0*z4+x4) ++ fz1 = -invrc*ypre4m2*8.d0*z*x*y*(4.d0*x2+4.d0*y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -1 ++c-------------------------------------------------------- ++ ++ ReYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x ++ ImYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y ++ ++c-------------------------------------------------- ++c Force contributions from m = -1 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q4prefactor(itype)*ReQ4bar(-1,itype) ++ ++c---------------------------------------- ++c Gradient of Re(Y_{4,-1}) w.r.t r_{j} ++c---------------------------------------- ++ ++ fx1 = invrc*ypre4m1*z*(3.d0*x4-21.d0*z2*x2+z2*y2+4.d0*z4- ++ x 3.d0*y4) ++ fy1 = invrc*ypre4m1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) ++ fz1 = -invrc*ypre4m1*x*(-21.d0*x2*z2-21.d0*z2*y2+4.d0*z4+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = -1 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q4prefactor(itype)*ImQ4bar(-1,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{4,-1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -invrc*ypre4m1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) ++ fy1 = invrc*ypre4m1*z*(-3.d0*y4+21.d0*z2*y2-z2*x2-4.d0*z4+ ++ x 3.d0*x4) ++ fz1 = invrc*ypre4m1*y*(-21.d0*z2*x2-21.d0*z2*y2+4.d0*z4+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real spherical harmonics for m = 0 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre4m0*invrs*(8.d0*z4-24.d0*z2*x2-24.d0*z2*y2+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++c-------------------------------------------------- ++c Force contributions from m = 0 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(0,itype) ++ ++c------------------------------------------- ++c Gradient of Re(Y_{4,0}) w.r.t r_{j} ++c------------------------------------------- ++ ++ fx1 = 20.d0*ypre4m0*invrc*z2*(-4.d0*z2+3.d0*x2+3.d0*y2)*x ++ fy1 = 20.d0*ypre4m0*invrc*z2*(-4.d0*z2+3.d0*x2+3.d0*y2)*y ++ fz1 = -20.d0*ypre4m0*invrc*z*(-4.d0*z2*x2-4.d0*z2*y2+3.d0* ++ x x4+6.d0*x2*y2+3.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c Add into global force and stress arrays ++ ++ fxx(jatm) = fxx(jatm) + fx ++ fyy(jatm) = fyy(jatm) + fy ++ fzz(jatm) = fzz(jatm) + fz ++ fxx(iatm) = fxx(iatm) - fx ++ fyy(iatm) = fyy(iatm) - fy ++ fzz(iatm) = fzz(iatm) - fz ++ ++c Virial ++ ++ virord = virord - (fx*x + fy*y + fz*z) ++ ++c Stress ++ ++ strs1=strs1+x*fx ++ strs2=strs2+x*fy ++ strs3=strs3+x*fz ++ strs5=strs5+y*fy ++ strs6=strs6+y*fz ++ strs9=strs9+z*fz ++ ++ end do ! end loop over connection list for iatm ++ ++ end if ! end of computing Q4 ++ ++c--------------------------------------------------------- ++c--------------------------------------------------------- ++c Compute forces arising from Q6 order parameters ++c--------------------------------------------------------- ++c--------------------------------------------------------- ++ ++ if ( (nq6>0).and.isolvmax6>0 ) then ++ ++ do isolv6 = 1,isolvmax6 ++ ++ jatm = solvlist6(isolv6) ++ itype = solvtype6(isolv6) ++ ++ invrc = solvimag6(isolv6)**6 ++ invrq = solvimag6(isolv6)**8 ++ invrs = solvimag6(isolv6)**4 ++ ++ x = solvx6(isolv6) ++ y = solvy6(isolv6) ++ z = solvz6(isolv6) ++ ++ f_ij = fc(solvrmag6(isolv6),q6cutoff(1,itype), ++ x q6cutoff(2,itype)) ++ df_ij = dfc(solvrmag6(isolv6),q6cutoff(1,itype), ++ x q6cutoff(2,itype)) ++ ++ x2 = x*x ++ y2 = y*y ++ z2 = z*z ++ ++ x3 = x2*x ++ y3 = y2*y ++ z3 = z2*z ++ ++ x4 = x2*x2 ++ y4 = y2*y2 ++ z4 = z2*z2 ++ ++ x5 = x4*x ++ y5 = y4*y ++ z5 = z4*z ++ ++ x6 = x4*x2 ++ y6 = y4*y2 ++ z6 = z4*z2 ++ ++ fx = 0.0d0 ++ fy = 0.0d0 ++ fz = 0.0d0 ++ ++c---------------------------------------- ++c Gradient of f_ij w.r.t. r_{j} ++c---------------------------------------- ++ ++ fx2 = df_ij*x*solvimag6(isolv6) ++ fy2 = df_ij*y*solvimag6(isolv6) ++ fz2 = df_ij*z*solvimag6(isolv6) ++ ++c----------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -6 ++c----------------------------------------------------------- ++ ++ ReYlm = ypre6m6*invrc*(x6-15.0d0*x4*y2+15.0d0*x2*y4-y6) ++ ImYlm = ypre6m6*invrc*(-6.0d0*x5*y+20.0d0*x3*y3-6.0d0* ++ x x*y5) ++ ++c----------------------------------------------------- ++c Force contributions from m = -6 (real part) ++c----------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-6,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-6}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrq*ypre6m6*6.0d0*x*(6.0d0*x4*y2-20.0d0*x2*y4+ ++ x 6.0d0*y6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fy1 = -invrq*ypre6m6*6.0d0*y*(6.0d0*x6-20.0d0*x4*y2+6.0d0 ++ x *x2*y4+5.0d0*z2*x4-10.0d0*z2*x2*y2+z2*y4) ++ fz1 = -invrq*ypre6m6*6.0d0*z*(x6-15.0d0*x4*y2+15.0d0*x2* ++ x y4-y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c---------------------------------------------------------- ++c Force contributions from m = -6 (Imaginary part) ++c---------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-6,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-6}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -invrq*ypre6m6*6.0d0*y*(-x6+15.0d0*x4*y2-15.0d0*x2* ++ x y4+5.0d0*z2*x4-10.0d0*z2*x2*y2+y6+z2*y4) ++ fy1 = -invrq*ypre6m6*6.0d0*x*(-15.0d0*x4*y2+15.0d0*x2*y4- ++ x y6+x6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fz1 = invrq*ypre6m6*12.0d0*x*y*z*(3.0d0*x4-10.0d0*x2*y2+ ++ x 3.0d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c--------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -5 ++c--------------------------------------------------------- ++ ++ ReYlm = -ypre6m5*invrc*z*(-x5+10.0d0*x3*y2-5.0d0*x*y4) ++ ImYlm = -ypre6m5*invrc*z*(5.0d0*x4*y-10.0d0*x2*y3+y5) ++ ++c-------------------------------------------------- ++c Force contributions from m = -5 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-5,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-5}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = ypre6m5*invrq*z*(-x6+35.0d0*x4*y2-55.d0*x2*y4+ ++ x 5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*y6+5.0d0*z2*y4) ++ fy1 = -2.0d0*ypre6m5*invrq*x*y*z*(13.0d0*x4-30.0d0*x2 ++ x *y2+5.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) ++ fz1 = -ypre6m5*invrq*x*(x4-10.0d0*x2*y2+5.0d0*y4)* ++ x (-x2-y2+5.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -5 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-5,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-5}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -2.0d0*ypre6m5*invrq*x*y*z*(-5.0d0*x4+30.0d0*x2*y2 ++ x -13.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) ++ fy1 = -ypre6m5*invrq*z*(-55.0d0*x4*y2+35.0d0*x2*y4-y6+ ++ x 5.0d0*x6+5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fz1 = ypre6m5*invrq*y*(5.0d0*x4-10.0d0*x2*y2+y4)* ++ x (-x2-y2+5.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -4 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(x4-6.0d0*x2*y2+y4) ++ ImYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(-4.0d0*x3*y+4.0d0* ++ x x*y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = -4 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-4,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.0d0*ypre6m4*invrq*x*(-8.0d0*x4*y2-13.0d0*z2*x4+ ++ x 150.0d0*z2*x2*y2+8.0d0*y6-85.0d0*z2*y4+20.0d0*z4* ++ x x2-60.0d0*z4*y2) ++ fy1 =-2.0d0*ypre6m4*invrq*y*(-8.0d0*x6+85.0d0*z2*x4+8.0d0 ++ x *x2*y4-150.0d0*z2*x2*y2+13.0d0*z2*y4+60.0d0*z4*x2- ++ x 20.0d0*z4*y2) ++ fz1 =-2.0d0*ypre6m4*invrq*z*(x4-6.0d0*x2*y2+y4)*(-13.0d0 ++ x *x2-13.0d0*y2+20.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -4 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-4,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -4.0d0*ypre6m4*invrq*y*(x6-35.0d0*z2*x4-5.0d0*x2*y4 ++ x +80.0d0*z2*x2*y2+30*z4*x2-9.0d0*z2*y4-10*z4*y2-5.0d0 ++ x *x4*y2+y6) ++ fy1 = -4.0d0*ypre6m4*invrq*x*(5.0d0*x4*y2-80.0d0*z2*x2*y2 ++ x -y6+35.0d0*z2*y4+9.0d0*z2*x4+10.0d0*z4*x2-30.0d0*z4 ++ x *y2-x6+5.0d0*x2*y4) ++ fz1 = 8.0d0*ypre6m4*invrq*z*x*y*(x2-y2)*(-13.0d0*x2- ++ x 13.0d0*y2+20.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -3 ++c-------------------------------------------------------- ++ ++ ReYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* ++ x (-x3+3.0d0*x*y2) ++ ImYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* ++ x (3.0d0*x2*y-y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = -3 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-3,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-3}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 3.d0*ypre6m3*invrq*z*(x6-11.d0*x4*y2-13.d0*z2*x4- ++ x 9.d0*x2*y4+54.d0*z2*x2*y2+8.d0*z4*x2-5.d0*z2*y4- ++ x 8.d0*z4*y2+3.d0*y6) ++ fy1 = -6.d0*ypre6m3*invrq*z*x*y*(-5.d0*x4-2.d0*x2*y2+14.d0 ++ x *z2*x2+3.d0*y4-22.d0*z2*y2+8.d0*z4) ++ fz1 = -3.d0*ypre6m3*invrq*x*(x2-3.d0*y2)*(-13.d0*z2*x2- ++ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -3 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-3,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-3}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -6.d0*ypre6m3*invrq*z*x*y*(3.d0*x4-2.d0*x2*y2-22.d0 ++ x *z2*x2-5.d0*y4+14.d0*z2*y2+8.d0*z4) ++ fy1 = -3.d0*ypre6m3*invrq*z*(9.d0*x4*y2+11.d0*x2*y4-54.d0 ++ x *z2*x2*y2-y6+13.d0*z2*y4+5.d0*z2*x4+8.d0*z4*x2-8.d0 ++ x *z4*y2-3.d0*x6) ++ fz1 = 3.d0*ypre6m3*invrq*y*(3.d0*x2-y2)*(-13.d0*z2*x2- ++ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -2 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6m2*invrc*(16.0d0*z4-16.0d0*z2*x2-16.0d0*z2 ++ x *y2+x4+2.0d0*x2*y2+y4)*(x2-y2) ++ ImYlm = -ypre6m2*invrc*2.0d0*(16.0d0*z4-16.0d0*z2*x2- ++ x 16.0d0*z2*y2+x4+2.0d0*x2*y2+y4)*x*y ++ ++c-------------------------------------------------- ++c Force contributions from m = -2 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-2,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-2}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.d0*ypre6m2*invrq*x*( 19.d0*z2*x4-64.d0*z4*x2- ++ x 49.d0*z2*y4+64.d0*z4*y2+2.d0*x4*y2+4.d0*x2*y4+ ++ x 2.d0*y6+16.d0*z6-30.d0*z2*x2*y2) ++ fy1 = -2.d0*ypre6m2*invrq*y*(-49.d0*z2*x4+64.d0*z4*x2+ ++ x 19.d0*z2*y4-64.d0*z4*y2+2.d0*x6+4.d0*x4*y2+2.d0* ++ x x2*y4+16.d0*z6-30.d0*z2*x2*y2) ++ fz1 = -2.d0*ypre6m2*invrq*z*(x2-y2)*(-64.d0*z2*x2-64.d0 ++ x *z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -2 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-2,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-2}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -2.d0*ypre6m2*invrq*y*(53.d0*z2*x4+38.d0*z2*x2* ++ x y2-128.d0*z4*x2-x6-x4*y2+x2*y4+16.d0*z6-15.d0* ++ x z2*y4+y6) ++ fy1 = -2.d0*ypre6m2*invrq*x*(38.d0*z2*x2*y2+53.d0*z2* ++ x y4-128.d0*z4*y2+x4*y2-x2*y4-y6+16.d0*z6-15.d0* ++ x z2*x4+x6) ++ fz1 = 4.d0*ypre6m2*invrq*z*x*y*(-64.d0*z2*x2-64.d0* ++ x z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -1 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2 ++ x +5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x ++ ImYlm = -ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2 ++ x +5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y ++ ++c-------------------------------------------------- ++c Force contributions from m = -1 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-1,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = ypre6m1*invrq*z*(85.d0*z2*x4+70.d0*z2*x2*y2 ++ x -100.d0*z4*x2-5.d0*x6-5.d0*x4*y2+5.d0*x2*y4-12.d0 ++ x *z4*y2+8.d0*z6-15.d0*z2*y4+5.d0*y6) ++ fy1 = -2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0*z2* ++ x y2+44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) ++ fz1 = -ypre6m1*invrq*x*(-100.d0*z4*x2-100.d0*z4*y2+ ++ x 8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0*z2*y4- ++ x 5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -1 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-1,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0* ++ x z2*y2+44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) ++ fy1 = -ypre6m1*invrq*z*(70.d0*z2*x2*y2+85.d0*z2 ++ x *y4-100.d0*z4*y2+5.d0*x4*y2-5.d0*x2*y4-5.d0*y6 ++ x -12.d0*z4*x2+8.d0*z6-15.d0*z2*x4+5.d0*x6) ++ fz1 = ypre6m1*invrq*y*(-100.d0*z4*x2-100.d0*z4 ++ x *y2+8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0* ++ x z2*y4-5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real spherical harmonics for m = 0 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6m0*invrc*(16.0d0*z6-120.0d0*z4*x2-120.0d0 ++ x *z4*y2+90.0d0*z2*x4+180.0d0*z2*x2*y2+90.0d0*z2*y4 ++ x -5.0d0*x6-15.0d0*x4*y2-15.0d0*x2*y4-5.0d0*y6) ++ ++c-------------------------------------------------- ++c Force contributions from m = 0 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(0,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,0}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -42.d0*ypre6m0*invrq*z2*(8.d0*z4-20.d0*z2*x2-20.d0 ++ x *z2*y2+5.d0*x4+10.d0*x2*y2+5.d0*y4)*x ++ fy1 = -42.d0*ypre6m0*invrq*z2*(8.d0*z4-20.d0*z2*x2-20.d0 ++ x *z2*y2+5.d0*x4+10.d0*x2*y2+5.d0*y4)*y ++ fz1 = 42.d0*ypre6m0*invrq*z*(8.d0*z4*x2+8.d0*z4*y2-20.d0 ++ x *z2*x4-40.d0*z2*x2*y2-20.d0*z2*y4+5.d0*x6+15.d0*x4* ++ x y2+15.d0*x2*y4+5.d0*y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++ ++c Add into global force and stress arrays ++ ++ fxx(jatm) = fxx(jatm) + fx ++ fyy(jatm) = fyy(jatm) + fy ++ fzz(jatm) = fzz(jatm) + fz ++ fxx(iatm) = fxx(iatm) - fx ++ fyy(iatm) = fyy(iatm) - fy ++ fzz(iatm) = fzz(iatm) - fz ++ ++c Virial ++ ++ virord = virord - (fx*x + fy*y + fz*z) ++ ++c Stress ++ ++ strs1=strs1+x*fx ++ strs2=strs2+x*fy ++ strs3=strs3+x*fz ++ strs5=strs5+y*fy ++ strs6=strs6+y*fz ++ strs9=strs9+z*fz ++ ++ end do ! end loop over connection list for iatm ++ ++ end if ! end of computing Q6 ++ ++ ++ end do ! end loop over iatm ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs1 ++ stress(2)=stress(2)+strs2 ++ stress(3)=stress(3)+strs3 ++ stress(4)=stress(4)+strs2 ++ stress(5)=stress(5)+strs5 ++ stress(6)=stress(6)+strs6 ++ stress(7)=stress(7)+strs3 ++ stress(8)=stress(8)+strs6 ++ stress(9)=stress(9)+strs9 ++ ++c tidy up ++ ++ ierr = 0 ++ ++ deallocate(xdf,stat=ierr(1)) ++ deallocate(ydf,stat=ierr(2)) ++ deallocate(zdf,stat=ierr(3)) ++ ++ deallocate(dstlst,stat=ierr(4)) ++ ++ deallocate(solvx4,stat=ierr(5)) ++ deallocate(solvy4,stat=ierr(6)) ++ deallocate(solvz4,stat=ierr(7)) ++ deallocate(solvrmag4,stat=ierr(8)) ++ deallocate(solvimag4,stat=ierr(9)) ++ deallocate(solvrsq4 ,stat=ierr(10)) ++ deallocate(solvlist4,stat=ierr(11)) ++ deallocate(solvtype4,stat=ierr(12)) ++ ++ deallocate(solvx6,stat=ierr(13)) ++ deallocate(solvy6,stat=ierr(14)) ++ deallocate(solvz6,stat=ierr(15)) ++ deallocate(solvrmag6,stat=ierr(16)) ++ deallocate(solvimag6,stat=ierr(17)) ++ deallocate(solvrsq6 ,stat=ierr(18)) ++ deallocate(solvlist6,stat=ierr(19)) ++ deallocate(solvtype6,stat=ierr(20)) ++ if (any(ierr/=0)) call Mfrz_Error(2536,0.d0) ++ ++ deallocate(buff1,stat=ierr(1)) ++ deallocate(buff2,stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2537,0.d0) ++ ++ deallocate(q4prefactor,stat=ierr(1)) ++ deallocate(q6prefactor,stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2540,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Steinhardt_Forces ++ ++ Subroutine Compute_Tet_Nlist(imcon,natms) ++ ++c--------------------------------------------------------------------- ++c ++c The existing neighbour list is not known by all nodes and ++c therefore we compute a new one from scratch rather than trying ++c to merge a full neighbour list across all MPI tasks or restore ++c symmetry. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use utility_module, only : images ++ ++ implicit none ++ integer,intent(in) :: imcon,natms ++ integer :: nlast,megatm ++ ++ integer :: iatm0,iatm1,istrd,iatm,jatm,nn,itype,jtype ++ integer :: ninclude,ifi,ii,ztype,nnn,k ++ real(8) :: rsq,rangesq ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ ninclude = maxval(zetaninc) ++ ++ nlast = natms ++ megatm = natms ++ ++ nnn = int(dble(ninclude*nlast*1.2)/dble(megatm)) ++ ++ allocate(xdf(1:nnn),stat=ierr(1)) ++ allocate(ydf(1:nnn),stat=ierr(2)) ++ allocate(zdf(1:nnn),stat=ierr(3)) ++ if (any(ierr/=0)) call Mfrz_Error(2541,0.d0) ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ itype = ltype(iatm) ++ ++ ztype = zetasite(itype) ++ if ( ztype==0 ) cycle ++ ++ nn = 0 ! Number of images to compute ++ ii = ii + 1 ! index for this list ++ ifi = 0 ! index for entries in this list ++ ++ if (ii>mxninc) call Mfrz_Error(2542,0.d0) ++ ++ do jatm = 1,nlast ++ ++ jtype = ltype(jatm) ++ ++ if ( itype/=jtype ) cycle ++ if ( iatm == jatm ) cycle ++ ++ nn = nn + 1 ++ xdf(nn) = xxx(iatm) - xxx(jatm) ! separation vector ++ ydf(nn) = yyy(iatm) - yyy(jatm) ++ zdf(nn) = zzz(iatm) - zzz(jatm) ++ ++ end do ++ ++ if ( nn > nnn ) call Mfrz_Error(2543,0.d0) ++ ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ ++ nn = 0 ++ do jatm = 1,nlast ++ ++ jtype = ltype(jatm) ++ ++ if ( itype/=jtype ) cycle ++ if ( iatm == jatm ) cycle ++ ++ nn = nn + 1 ++ rsq = xdf(nn)*xdf(nn) + ydf(nn)*ydf(nn) + zdf(nn)*zdf(nn) ++ ++ rangesq = zetacutoff(2,ztype)**2 ++ ++ if ( rsq < rangesq ) then ++ ++ ifi = ifi + 1 ++ flist(ifi,ii) = jatm ++ ++ end if ++ ++ end do ++ if ( ifi > mxflist ) call Mfrz_Error(2544,0.d0) ++ nflist(ii) = ifi ++ ++ end do ! end loop over iatm ++ ++ deallocate(xdf,stat=ierr(1)) ++ deallocate(ydf,stat=ierr(2)) ++ deallocate(zdf,stat=ierr(3)) ++ if (any(ierr/=0))call Mfrz_Error(2545,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Tet_Nlist ++ ++ Subroutine Compute_Tetrahedral(imcon,natms) ++ ++c--------------------------------------------------------------------- ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use utility_module, only : images ++ ++ implicit none ++ integer,intent(in) :: imcon,natms ++ ++ integer :: iatm0,iatm1,istrd,iatm,jatm,nn,itype,jtype ++ integer :: ninclude,ifi,ii,k,ztype,mm,katm,ktype,it ++ real(8) :: f_ij,f_ik,r_ij,r_ik,x,y,z,dot ++ real(8),parameter :: third=1.0d0/3.0d0 ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ real(8),allocatable,dimension(:) :: buff1 ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ allocate(xdf(1:mxflist),stat=ierr(1)) ++ allocate(ydf(1:mxflist),stat=ierr(2)) ++ allocate(zdf(1:mxflist),stat=ierr(3)) ++ allocate(buff1(1:ntet),stat=ierr(4)) ++ if (any(ierr/=0)) call Mfrz_Error(2546,0.d0) ++ ++ zeta_global(:) = 0.0d0 ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ itype = ltype(iatm) ++ ++c no tetrahedral contributions from this atom type? ++ ++ ztype = zetasite(itype) ++ if ( ztype == 0 ) cycle ++ ++ ii = ii + 1 ! index for this list ++ ++ do k = 1,nflist(ii) ++ ++ jatm = flist(k,ii) ++ ++ xdf(k) = xxx(jatm) - xxx(iatm) ! separation vector ++ ydf(k) = yyy(jatm) - yyy(iatm) ++ zdf(k) = zzz(jatm) - zzz(iatm) ++ ++ end do ++ ++ nn = nflist(ii) ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ ++ do k = 1,nflist(ii) ++ ++ jatm = flist(k,ii) ++ ++ r_ij = sqrt(xdf(k)*xdf(k) + ydf(k)*ydf(k) + zdf(k)*zdf(k)) ++ f_ij = fc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ ++ x = xdf(k) ; y = ydf(k) ; z = zdf(k) ++ ++c loop over all other entries katm ++ ++ do mm = k+1,nflist(ii) ++ ++c katm also in solvation shell of iatm ++ ++ katm = flist(mm,ii) ++ ++ r_ik = sqrt(xdf(mm)*xdf(mm) + ydf(mm)*ydf(mm) + ++ x zdf(mm)*zdf(mm)) ++ f_ik = fc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ ++c The node holding the central atom keeps the contrib ++ ++ dot = (x*xdf(mm) + y*ydf(mm) + z*zdf(mm)) / (r_ij*r_ik) + ++ x third ++ zeta_global(ztype) = zeta_global(ztype) + f_ij*f_ik*dot*dot ++ end do ++ end do ++ ++ end do ++ ++ call gdsum(zeta_global(1),ntet,buff1(1:ntet)) ++ ++ do it = 1,ntet ++ zeta_global(it) = 1.0d0 - zeta_global(it)/dble(zetaninc(it)* ++ x zetann(it)) ++ end do ++ ++ deallocate(xdf ,stat=ierr(1)) ++ deallocate(ydf ,stat=ierr(2)) ++ deallocate(zdf ,stat=ierr(3)) ++ deallocate(buff1,stat=ierr(4)) ++ if (any(ierr/=0)) call Mfrz_Error(2547,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Tetrahedral ++ ++ Subroutine Compute_Tetrahedral_Forces(imcon,natms,engord,virord) ++ ++c--------------------------------------------------------------------- ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use utility_module, only : images ++ ++ implicit none ++ integer,intent(in) :: imcon,natms ++ real(8),intent(inout) :: engord,virord ++ ++ integer :: iatm,jatm,katm,iatm0,iatm1,istrd,nn ++ integer :: ii,k,m,itet,itype,jtype,ztype,it ++ ++ real(8),parameter :: third = 1.0d0/3.0d0 ++ real(8) :: strs1,strs2,strs3,strs5,strs6,strs9 ++ real(8) :: xj,yj,zj,xk,yk,zk,tmpvar,tmpvar2,dot ++ real(8) :: r_ij,r_ik,f_ij,f_ik,df_ij,df_ik ++ real(8) :: invrij,invrik,ctheta ++ real(8) :: fxj,fyj,fzj,fxk,fyk,fzk ++ ++ real(8),dimension(3) :: rij_hat,rik_hat ++ ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ real(8),allocatable,dimension(:) :: tetprefactor ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ allocate(xdf(1:mxflist),stat=ierr(1)) ++ allocate(ydf(1:mxflist),stat=ierr(2)) ++ allocate(zdf(1:mxflist),stat=ierr(3)) ++ allocate(tetprefactor(1:ntet),stat=ierr(4)) ++ if (any(ierr/=0)) call Mfrz_Error(2548,0.d0) ++ ++c Compute the prefactor ++ ++ k = nq4+nq6+1 ++ do it = 1,ntet ++ tetprefactor = dcolvar(k)/dble(zetaninc(it)*zetann(it)) ++ k = k + 1 ++ end do ++ ++c zero contribution to the stress tensor ++ ++ strs1=0.0d0 ++ strs2=0.0d0 ++ strs3=0.0d0 ++ strs5=0.0d0 ++ strs6=0.0d0 ++ strs9=0.0d0 ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ itype = ltype(iatm) ++ ++c no tetrahedral contributions from this atom type? ++ ++ ztype = zetasite(itype) ++ if ( ztype == 0 ) cycle ++ ++ ii = ii + 1 ! index for this list ++ ++ do k = 1,nflist(ii) ++ ++ jatm = flist(k,ii) ++ ++ xdf(k) = xxx(jatm) - xxx(iatm) ! separation vector ++ ydf(k) = yyy(jatm) - yyy(iatm) ++ zdf(k) = zzz(jatm) - zzz(iatm) ++ ++ end do ++ ++ nn = nflist(ii) ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ ++ do k = 1,nflist(ii) ++ ++ jatm = flist(k,ii) ++ ++ r_ij = sqrt(xdf(k)*xdf(k) + ydf(k)*ydf(k) + zdf(k)*zdf(k)) ++ f_ij = fc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ df_ij = dfc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ ++ xj = xdf(k) ; yj = ydf(k) ; zj = zdf(k) ++ ++ invrij = 1.0d0/r_ij ++ ++ rij_hat(1) = xj*invrij ++ rij_hat(2) = yj*invrij ++ rij_hat(3) = zj*invrij ++ ++ do m = k + 1,nflist(ii) ++ ++ r_ik = sqrt(xdf(m)*xdf(m) + ydf(m)*ydf(m) + zdf(m)*zdf(m)) ++ f_ik = fc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ df_ik = dfc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ ++ xk = xdf(m) ; yk = ydf(m) ; zk = zdf(m) ++ ++ invrik = 1.0d0/r_ik ++ ++ rik_hat(1) = xk*invrik ++ rik_hat(2) = yk*invrik ++ rik_hat(3) = zk*invrik ++ ++ ctheta = dot_product(rij_hat,rik_hat) ++ dot = ctheta + third ++ ++ tmpvar = 2.0d0*dot*f_ij*f_ik*tetprefactor(ztype)*invrij ++ tmpvar2 = tetprefactor(ztype)*dot*dot*df_ij*f_ik ++ ++c force between atom i and atom j due to second term ++c i.e. ( f_ij*f_ik*dot*dot ) ++ ++ fxj = tmpvar*(rik_hat(1) - rij_hat(1)*ctheta) + ++ x tmpvar2*rij_hat(1) ++ fyj = tmpvar*(rik_hat(2) - rij_hat(2)*ctheta) + ++ x tmpvar2*rij_hat(2) ++ fzj = tmpvar*(rik_hat(3) - rij_hat(3)*ctheta) + ++ x tmpvar2*rij_hat(3) ++ ++ tmpvar = 2.0d0*dot*f_ij*f_ik*tetprefactor(ztype)*invrik ++ tmpvar2 = tetprefactor(ztype)*dot*dot*df_ik*f_ij ++ ++c force between atom i and atom k due to second term ++c i.e ( f_ij*f_ik*dot*dot ) ++ ++ fxk = tmpvar*(rij_hat(1) - rik_hat(1)*ctheta) + ++ x tmpvar2*rik_hat(1) ++ fyk = tmpvar*(rij_hat(2) - rik_hat(2)*ctheta) + ++ x tmpvar2*rik_hat(2) ++ fzk = tmpvar*(rij_hat(3) - rik_hat(3)*ctheta) + ++ x tmpvar2*rik_hat(3) ++ ++c Add in to forces, virial and stress tensor ++ ++ katm = flist(m,ii) ++ ++ fxx(iatm) = fxx(iatm) + fxj + fxk ++ fyy(iatm) = fyy(iatm) + fyj + fyk ++ fzz(iatm) = fzz(iatm) + fzj + fzk ++ ++ fxx(jatm) = fxx(jatm) - fxj ++ fyy(jatm) = fyy(jatm) - fyj ++ fzz(jatm) = fzz(jatm) - fzj ++ ++ fxx(katm) = fxx(katm) - fxk ++ fyy(katm) = fyy(katm) - fyk ++ fzz(katm) = fzz(katm) - fzk ++ ++ virord = virord - fxj*xj - fyj*yj - fzj*zj ++ virord = virord - fxk*xk - fyk*yk - fzk*zk ++ ++ strs1 = strs1 + xk*fxk + xj*fxj ++ strs2 = strs2 + xk*fyk + xj*fyj ++ strs3 = strs3 + xk*fzk + xj*fzj ++ strs5 = strs5 + yk*fyk + yj*fyj ++ strs6 = strs6 + yk*fzk + yj*fzj ++ strs9 = strs9 + zk*fzk + zj*fzj ++ ++ end do ++ end do ++ end do ++ ++c Complete stress tensor ++ ++ stress(1)=stress(1)+strs1 ++ stress(2)=stress(2)+strs2 ++ stress(3)=stress(3)+strs3 ++ stress(4)=stress(4)+strs2 ++ stress(5)=stress(5)+strs5 ++ stress(6)=stress(6)+strs6 ++ stress(7)=stress(7)+strs3 ++ stress(8)=stress(8)+strs6 ++ stress(9)=stress(9)+strs9 ++ ++ ++c Tidy up ++ ++ deallocate(xdf,stat=ierr(1)) ++ deallocate(ydf,stat=ierr(2)) ++ deallocate(zdf,stat=ierr(3)) ++ if (any(ierr/=0)) call Mfrz_Error(2547,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Tetrahedral_Forces ++ ++ Subroutine Mfrz_Error(kode,arg) ++ ++c--------------------------------------------------------------------- ++c ++c Author W. Smith Daresbury Laboratory January 2011 ++c Adapted from D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use setup_module, only : nrite,nhist,nread,nconf,nstats, ++ x nrest,nfield,ntable,nevnt ++ ++ implicit none ++ integer,intent(in) :: kode ++ real(8),intent(in) :: arg ++ ++ if(onroot)then ++ ++ if(kode.eq.2500)then ++ ++ write(nrite,"( ++ x 'Error in number of collective variables - '// ++ x 'ncolvar too small?' ++ x )") ++ ++ elseif(kode.eq.2501)then ++ ++ write(nrite,"( ++ x 'Wang-Landau style recursion not yet implemented'// ++ x 'for ncolvar > 1' ++ x )") ++ ++ elseif(kode.eq.2502)then ++ ++ write(nrite,"('Unrecognised Gaussian height scheme')") ++ ++ elseif(kode.eq.2503)then ++ ++ write(nrite,"('Error maxhis exceeded in metadynamics')") ++ ++ elseif(kode.eq.2504)then ++ ++ write(nrite,"( ++ x 'Error allocating comms buffer in compute_bias_potential' ++ x )") ++ ++ elseif(kode.eq.2505)then ++ ++ write(nrite,"('Error allocating driven array')") ++ ++ elseif(kode.eq.2506)then ++ ++ write(nrite,"('Could not open METACONTROL')") ++ ++ elseif(kode.eq.2508)then ++ ++ write(nrite,"('Comms error in metadynamics setup')") ++ ++ elseif(kode.eq.2509)then ++ ++ write(nrite,"( ++ x 'Cannot bias local and global PE in same run' ++ x )") ++ ++ elseif(kode.eq.2510)then ++ ++ write(nrite,"('Error allocating local force arrays')") ++ ++ elseif(kode.eq.2511)then ++ ++ write(nrite,"( ++ x 'Error allocating collective variables arrays' ++ x )") ++ ++ elseif(kode.eq.2512)then ++ ++ write(nrite,"('Error allocating Wang-Landau bins')") ++ ++ elseif(kode.eq.2515)then ++ ++ write(nrite,"( ++ x 'Error allocating Steinhardt parameter arrays' ++ x )") ++ ++ elseif(kode.eq.2516)then ++ ++ write(nrite,"('Could not open STEINHARDT')") ++ ++ elseif(kode.eq.2517)then ++ ++ write(nrite,"('Error allocating q4site')") ++ ++ elseif(kode.eq.2518)then ++ ++ write(nrite,"('Error allocating q6site')") ++ ++ elseif(kode.eq.2519)then ++ ++ write(nrite,"('Error deallocating buff')") ++ ++ elseif(kode.eq.2521)then ++ ++ write(nrite,"('Error reading line ',i5,' of STEINHARDT' ++ x )")nint(arg) ++ ++ elseif(kode.eq.2522)then ++ ++ write(nrite,"( ++ x 'Error allocating Steinhardt parameter arrays' ++ x )") ++ ++ elseif(kode.eq.2523)then ++ ++ write(nrite,"('Could not open ZETA')") ++ ++ elseif(kode.eq.2524)then ++ ++ write(nrite,"('Error allocating zetasite')") ++ ++ elseif(kode.eq.2525)then ++ ++ write(nrite,"('Error allocating full neighbour list')") ++ ++ elseif(kode.eq.2527)then ++ ++ write(nrite,"( ++ x 'Number of collective variables incorrect for specified'// ++ x 'order parameters' ++ x )") ++ ++ elseif(kode.eq.2529)then ++ ++ write(nrite,"('Error reading line ',i5,' of ZETA' ++ x )")nint(arg) ++ ++ elseif(kode.eq.2531)then ++ ++ write(nrite,"('Comms error on reading METADYNAMICS')") ++ ++ elseif(kode.eq.2532)then ++ ++ write(nrite,"('Error in fc function - out of range')") ++ write(nrite,"('Value of r was ',1p,e14.6)")arg ++ ++ elseif(kode.eq.2533)then ++ ++ write(nrite,"( ++ x 'Error allocating solvation arrays for metadynamics' ++ x )") ++ ++ elseif(kode.eq.2534)then ++ ++ write(nrite,"('Error allocating comms buffer arrays')") ++ ++ elseif(kode.eq.2535)then ++ ++ write(nrite,"('Solvation list overrun')") ++ ++ elseif(kode.eq.2536)then ++ ++ write(nrite,"( ++ x 'Error deallocating solvation arrays for metadynamics' ++ x )") ++ ++ elseif(kode.eq.2537)then ++ ++ write(nrite,"('Error deallocating comms buffer arrays')") ++ ++ elseif(kode.eq.2538)then ++ ++ write(nrite,"( ++ x 'Error allocating solvation arrays for metadynamics' ++ x )") ++ ++ elseif(kode.eq.2540)then ++ ++ write(nrite,"('Error allocating force prefactor arrays')") ++ ++ elseif(kode.eq.2541)then ++ ++ write(nrite,"( ++ x 'Memory allocation error in compute_tet_nlist' ++ x )") ++ ++ elseif(kode.eq.2542)then ++ ++ write(nrite,"( ++ x 'Error in metafreeze_module.f90 mxninc too small' ++ x )") ++ ++ elseif(kode.eq.2543)then ++ ++ write(nrite,"('nnn too small in compute_tet_nlist')") ++ ++ elseif(kode.eq.2544)then ++ ++ write(nrite,"('mxflist too small in metafreeze_module')") ++ ++ elseif(kode.eq.2545)then ++ ++ write(nrite,"( ++ x 'Memory deallocation error in compute_tet_nlist' ++ x )") ++ ++ elseif(kode.eq.2546)then ++ ++ write(nrite,"( ++ x 'Memory allocation error in compute_tet_nlist' ++ x )") ++ ++ elseif(kode.eq.2547)then ++ ++ write(nrite,"( ++ x 'Memory deallocation error in compute_tet_nlist' ++ x )") ++ ++ elseif(kode.eq.2548)then ++ ++ write(nrite,"( ++ x 'Memory allocation error in compute_tet_nlist' ++ x )") ++ ++ endif ++ ++c close all i/o channels ++ ++ close (nrite) ++ close (nhist) ++ close (nread) ++ close (nconf) ++ close (nstats) ++ close (nrest) ++ close (nfield) ++ close (ntable) ++ close (nevnt) ++ close (stn) ++ close (zta) ++ close (mtd) ++ ++ endif ++ ++c shut down communications ++ ++ call gsync() ++ call exitcomms() ++ ++ end Subroutine Mfrz_Error ++ ++ end module metafreeze_module ++ +diff -urN dl_class_1.9.orig/srcmod/metal_module.f dl_class_1.9/srcmod/metal_module.f +--- dl_class_1.9.orig/srcmod/metal_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/metal_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1669 @@ ++ module metal_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining metal potential arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use pair_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use utility_module ++ ++ implicit none ++ ++ logical lmetab ++ integer, allocatable :: ltpmet(:),lstmet(:) ++ real(8), allocatable :: prmmet(:,:),vmet(:,:,:),dmet(:,:,:) ++ real(8), allocatable :: rho(:),elrcm(:),vlrcm(:),fmet(:,:,:) ++ ++ save lmetab,ltpmet,lstmet,prmmet,vmet,dmet,fmet,rho,elrcm,vlrcm ++ ++ contains ++ ++ subroutine alloc_met_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ integer i,fail,idnode ++ ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (ltpmet(mxmet),stat=fail(1)) ++ allocate (lstmet(mxmet),stat=fail(2)) ++ allocate (prmmet(mxmet,mxpmet),stat=fail(3)) ++ allocate (vmet(mxgrid,mxmet,2),stat=fail(4)) ++ allocate (dmet(mxgrid,mxmet,2),stat=fail(5)) ++ allocate (rho(mxatms),stat=fail(6)) ++ allocate (elrcm(0:mxsmet),stat=fail(7)) ++ allocate (vlrcm(0:mxsmet),stat=fail(8)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1280) ++ enddo ++ ++ end subroutine alloc_met_arrays ++ ++ subroutine define_metals ++ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rmet,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining metal potentials ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits,lmols ++ character*8 keyword ++ character*8 atom1,atom2 ++ character*1 message(80) ++ integer idnode,ntpmet,ntpatm,idum,imet,j ++ integer keypot,numpar,katm1,katm2,keymet,ntab,i,fail,itpmet ++ integer jtpatm ++ real(8) rmet,engunit ++ ++ real(8), allocatable :: parpot(:) ++ allocate (parpot(mxpmet),stat=fail) ++ ++ ntpmet=intstr(record,lenrec,idum) ++ ++ lmetab=.false. ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'number of specified metal ', ++ x 'potentials',i10)") ntpmet ++ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ',3x, ++ x ' key',30x,'parameters'/,/)") ++ ++ endif ++ ++ if(ntpmet.ge.mxmet) call error(idnode,71) ++ if(.not.lunits) call error(idnode,6) ++ if(.not.lmols) call error(idnode,13) ++ ++ do imet=1,mxmet ++ lstmet(imet)=0 ++ ltpmet(imet)=0 ++ enddo ++ ++ do itpmet=1,ntpmet ++ ++ do i=1,mxpmet ++ parpot(i)=0.d0 ++ enddo ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call getword(atom1,record,8,lenrec) ++ call getword(atom2,record,8,lenrec) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'stch') then ++ keypot=1 ++ numpar=5 ++ else if(keyword(1:4).eq.'fnsc') then ++ keypot=2 ++ numpar=7 ++ else if(keyword(1:4).eq.'gupt') then ++ keypot=3 ++ numpar=5 ++ elseif(keyword(1:4).eq.'eam ') then ++ keypot=999 ++ lmetab=.true. ++ numpar=0 ++ else ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,461) ++ endif ++ ++ if(.not.lmetab)then ++ ++ parpot(1)=dblstr(record,lenrec,idum) ++ parpot(2)=dblstr(record,lenrec,idum) ++ parpot(3)=dblstr(record,lenrec,idum) ++ parpot(4)=dblstr(record,lenrec,idum) ++ parpot(5)=dblstr(record,lenrec,idum) ++ parpot(6)=dblstr(record,lenrec,idum) ++ parpot(7)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(16x,2a8,2x,a4,3x,1p,9e13.5)") ++ x atom1,atom2,keyword(1:4),(parpot(j),j=1,numpar) ++ ++ endif ++ ++ katm1=0 ++ katm2=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm ++ ++ enddo ++ ++ if(katm1.eq.0.or.katm2.eq.0) then ++ call error(idnode,463) ++ endif ++ ++ keymet=loc2(katm1,katm2) ++ ++c convert energies to internal unit ++ ++ if(keymet.ge.mxmet) call error(idnode,465) ++ ++ parpot(1)=parpot(1)*engunit ++ ++ if(keypot.eq.2)then ++ ++ parpot(2)=parpot(2)*engunit ++ parpot(3)=parpot(3)*engunit ++ parpot(5)=parpot(5)*engunit ++ ++ endif ++ ++ if(keypot.eq.3)then ++ parpot(4)=parpot(4)*engunit ++ endif ++ ++ if(lstmet(keymet).ne.0) call error(idnode,141) ++ lstmet(keymet)=itpmet ++ ltpmet(itpmet)=keypot ++ if(itpmet.gt.1)then ++ if(keypot.ne.ltpmet(itpmet-1))call error(idnode,72) ++ endif ++ ++ if(.not.lmetab)then ++ ++ do i=1,numpar ++ prmmet(itpmet,i)=parpot(i) ++ enddo ++ ++ endif ++ ++ enddo ++ ++c check for unspecified atom-atom potentials ++ ++ ntab=(ntpatm*(ntpatm+1))/2 ++ ++ if(ntpmet.lt.ntab) then ++ ++ call warning(idnode,110,0.d0,0.d0,0.d0) ++ ++ do i=1,ntab ++ if(lstmet(i).eq.0) lstmet(i)=ntpmet+1 ++ enddo ++ ++c set zero potential for undefined interactions ++ ++ do i=1,mxmet ++ ++ vmet(1,i,1)=0.d0 ++ vmet(1,i,2)=0.d0 ++ dmet(1,i,1)=0.d0 ++ dmet(1,i,2)=0.d0 ++ ++ enddo ++ ++ endif ++ ++c generate metal force arrays ++ ++ call metgen(idnode,ntpatm,rmet) ++ ++ if(lmetab) ++ x call mettab(ntpatm,idnode,rmet,engunit) ++ ++ deallocate (parpot,stat=fail) ++ ++ return ++ end subroutine define_metals ++ ++ subroutine metdens ++ x (idnode,imcon,mxnode,natms,engmet,virden) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating local density in metals ++c using the verlet neighbour list and sutton-chen potentials ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1995 ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer idnode,imcon,mxnode,natms,i,j,k,ii,k0,l ++ real(8) engmet,engtmp,virden,rhosqr,rrr,ppp,fk0,fk1,fk2,t1,t2 ++ ++ safe=.true. ++ ++c initialise energy accumulator ++ ++ engmet=0.d0 ++ virden=0.d0 ++ ++c initialise density array ++ ++ do i=1,natms ++ rho(i)=0.d0 ++ enddo ++ ++c calculate local atomic density ++ ++ ii=0 ++ ++c outer loop over atoms ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ilist(k)=j ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) ++ ++c square of distances ++ ++ do k=1,lentry(ii) ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ enddo ++ ++ if(lmetab)then ++ ++c calculate EAM density contributions ++ ++ call eamden(safe,i,lentry(ii)) ++ ++ else ++ ++c calculate FS density contributions ++ ++ call fsden(safe,i,lentry(ii)) ++ ++ endif ++ ++ enddo ++ ++c global sum of local atomic densities ++ ++ if(mxnode.gt.1)call gdsum(rho,natms,buffer) ++ ++c calculate embedding energy ++ ++ if(lmetab)then ++ ++c density terms for eam potentials ++ ++ do i=1,natms ++ ++ if(rho(i).gt.0.d0)then ++ ++ k0=ltype(i) ++ rrr=rho(i)-fmet(2,k0,1) ++ l=min(nint(rrr/fmet(4,k0,1)),int(fmet(1,k0,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ ++ else ++ ++ ppp=(rrr/fmet(4,k0,1))-dble(l) ++ ++c calculate embedding energy using 3-point interpolation ++ ++ fk0=fmet(l-1,k0,1) ++ fk1=fmet(l,k0,1) ++ fk2=fmet(l+1,k0,1) ++ ++ t1=fk1+(fk1-fk0)*ppp ++ t2=fk1+(fk2-fk1)*ppp ++ if(ppp.lt.0.d0)then ++ engtmp=-(t1+0.5d0*(t2-t1)*(ppp+1.d0)) ++ else ++ engtmp=-(t2+0.5d0*(t2-t1)*(ppp-1.d0)) ++ endif ++ ++ engmet=engmet+engtmp ++ ++c calculate derivative of embedding function wrt density using 3-point ++c interpolation - store result in rho array ++ ++ fk0=fmet(l-1,k0,2) ++ fk1=fmet(l,k0,2) ++ fk2=fmet(l+1,k0,2) ++ ++ t1=fk1+(fk1-fk0)*ppp ++ t2=fk1+(fk2-fk1)*ppp ++ if(ppp.lt.0.d0)then ++ rho(i)=(t1+0.5d0*(t2-t1)*(ppp+1.d0)) ++ else ++ rho(i)=(t2+0.5d0*(t2-t1)*(ppp-1.d0)) ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ else ++ ++c analytical square root of density dependence ++ ++ do i=1,natms ++ ++ if(rho(i).gt.0.d0)then ++ ++ rhosqr=sqrt(rho(i)+elrcm(ltype(i))) ++ engmet=engmet+rhosqr ++ rho(i)=0.5d0/rhosqr ++ virden=virden+vlrcm(ltype(i))/rhosqr ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ engmet=-engmet/dble(mxnode) ++ virden=virden/dble(mxnode) ++ ++c check interpolation is safe ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,142) ++ ++ return ++ end subroutine metdens ++ ++ subroutine fsden(safe,iatm,ik) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating local atomic density ++c for FS type metal potentials ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer iatm,jatm,ik,m,k0,l ++ real(8) rdr,ai,aj,ab,rsq,rrr,ppp,t1,t2 ++ real(8) vk0,vk1,vk2,density ++ ++c start of primary loop for density ++ ++ ai=dble(ltype(iatm)) ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ jatm=ilist(m) ++ ++ aj=dble(ltype(jatm)) ++ if(ai.gt.aj) then ++ ab=ai*(ai-1.d0)*0.5d0+aj+0.5d0 ++ else ++ ab=aj*(aj-1.d0)*0.5d0+ai+0.5d0 ++ endif ++ ++ k0=lstmet(int(ab)) ++ ++ if((ltpmet(k0).ge.1).and.(abs(dmet(1,k0,1)).gt.0.d0))then ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++c apply cutoff condition ++ ++ if(rsq.le.dmet(3,k0,1)**2)then ++ ++c interpolation parameters ++ ++ rdr=1.d0/dmet(4,k0,1) ++ rrr=sqrt(rsq)-dmet(2,k0,1) ++ l=min(nint(rrr*rdr),int(dmet(1,k0,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ ++ else ++ ++ ppp=rrr*rdr-dble(l) ++ ++c calculate density using 3-point interpolation ++ ++ vk0=dmet(l-1,k0,1) ++ vk1=dmet(l,k0,1) ++ vk2=dmet(l+1,k0,1) ++ ++ t1=vk1+ppp*(vk1-vk0) ++ t2=vk1+ppp*(vk2-vk1) ++ if(ppp.lt.0.d0)then ++ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ if(ai.gt.aj)then ++ ++ rho(iatm)=rho(iatm)+density*dmet(1,k0,2) ++ rho(jatm)=rho(jatm)+density*dmet(2,k0,2) ++ ++ else ++ ++ rho(iatm)=rho(iatm)+density*dmet(2,k0,2) ++ rho(jatm)=rho(jatm)+density*dmet(1,k0,2) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine fsden ++ ++ subroutine eamden(safe,iatm,ik) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating local atomic density ++c for EAM type metal potentials ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ logical safe ++ integer iatm,jatm,ik,m,l,ktyp1,ktyp2 ++ real(8) rdr,rsq,rrr,ppp,t1,t2 ++ real(8) vk0,vk1,vk2,density ++ ++c start of primary loop for density ++ ++ ktyp1=ltype(iatm) ++ ++ do m=1,ik ++ ++c first metal atom density ++ ++ jatm=ilist(m) ++ ktyp2=ltype(jatm) ++ ++ if(abs(dmet(1,ktyp2,1)).gt.0.d0)then ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++ if(rsq.le.dmet(3,ktyp2,1)**2)then ++ ++c interpolation parameters ++ ++ rdr=1.d0/dmet(4,ktyp2,1) ++ rrr=sqrt(rsq)-dmet(2,ktyp2,1) ++ l=min(nint(rrr*rdr),int(dmet(1,ktyp2,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ ++ else ++ ++ ppp=rrr*rdr-dble(l) ++ ++c calculate density using 3-point interpolation ++ ++ vk0=dmet(l-1,ktyp2,1) ++ vk1=dmet(l,ktyp2,1) ++ vk2=dmet(l+1,ktyp2,1) ++ ++ t1=vk1+ppp*(vk1-vk0) ++ t2=vk1+ppp*(vk2-vk1) ++ if(ppp.lt.0.d0)then ++ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ rho(iatm)=rho(iatm)+density ++ if(ktyp1.eq.ktyp2)rho(jatm)=rho(jatm)+density ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c second metal atom density ++ ++ if(ktyp1.ne.ktyp2)then ++ ++ if(abs(dmet(1,ktyp1,1)).gt.0.d0)then ++ ++c apply truncation of potential ++ ++ if(rsq.le.dmet(3,ktyp1,1)**2)then ++ ++c interpolation parameters ++ ++ rdr=1.d0/dmet(4,ktyp1,1) ++ rrr=sqrt(rsq)-dmet(2,ktyp1,1) ++ l=min(nint(rrr*rdr),int(dmet(1,ktyp1,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ ++ else ++ ++ ppp=rrr*rdr-dble(l) ++ ++c calculate density using 3-point interpolation ++ ++ vk0=dmet(l-1,ktyp1,1) ++ vk1=dmet(l,ktyp1,1) ++ vk2=dmet(l+1,ktyp1,1) ++ ++ t1=vk1+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*ppp ++ if(ppp.lt.0.d0)then ++ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ rho(jatm)=rho(jatm)+density ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine eamden ++ ++ subroutine metfrc(safe,iatm,ik,engmet,virmet) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating metal forces ++c for EAM and FS potentials using a verlet neighbour list ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer iatm,jatm,ik,m,k0,l,ld,ktyp1,ktyp2 ++ real(8) engmet,virmet,strs ++ real(8) rdr,rsq,rrr,ppp,vk0,vk1,vk2,t1,t2,gk0,gk1,gk2 ++ real(8) gamma,gamma1,gamma2,gamma3,fx,fy,fz,fi ++ dimension fi(3),strs(6) ++ ++CDIR$ CACHE_ALIGN fi ++ ++c initialise potential energy and virial ++ ++ engmet=0.d0 ++ virmet=0.d0 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ ++c store forces for iatm ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ktyp1=ltype(iatm) ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ jatm=ilist(m) ++ ktyp2=ltype(jatm) ++ k0=lstmet(loc2(ktyp1,ktyp2)) ++ ++ if((ltpmet(k0).gt.0).and.(abs(vmet(1,k0,1)).gt.0.d0))then ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++ if(rsq.le.vmet(3,k0,1)**2)then ++ ++c interpolation parameters ++ ++ rdr=1.d0/vmet(4,k0,1) ++ rrr=sqrt(rsq)-vmet(2,k0,1) ++ l=min(nint(rrr*rdr),int(vmet(1,k0,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ gamma1=0.d0 ++ ++ else ++ ++ ppp=rrr*rdr-dble(l) ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0=vmet(l-1,k0,1) ++ vk1=vmet(l,k0,1) ++ vk2=vmet(l+1,k0,1) ++ ++ t1=vk1+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*ppp ++ if(ppp.lt.0.d0)then ++ engmet=engmet+t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ engmet=engmet+t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++c calculate pair forces using 3-point interpolation ++ ++ gk0=vmet(l-1,k0,2) ++ gk1=vmet(l,k0,2) ++ gk2=vmet(l+1,k0,2) ++ ++ t1=gk1+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*ppp ++ if(ppp.lt.0.d0)then ++ gamma1=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ gamma1=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ endif ++ ++c calculate embedding forces using 3-point interpolation ++ ++ if(lmetab)then ++ ++ if(rsq.le.dmet(3,ktyp2,1)**2)then ++ ++ rdr=1.d0/dmet(4,ktyp2,1) ++ rrr=sqrt(rsq)-dmet(2,ktyp2,1) ++ ld=min(nint(rrr*rdr),int(dmet(1,ktyp2,1))-1) ++ if(ld.lt.1)then ++ ++ safe=.false. ++ gamma2=0.d0 ++ ++ else ++ ++ ppp=rrr*rdr-dble(ld) ++ ++ gk0=dmet(ld-1,ktyp2,2) ++ gk1=dmet(ld,ktyp2,2) ++ gk2=dmet(ld+1,ktyp2,2) ++ ++ t1=gk1+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*ppp ++ if(ppp.lt.0.d0)then ++ gamma2=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ gamma2=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ endif ++ ++ else ++ ++ gamma2=0.d0 ++ ++ endif ++ ++ if(ktyp1.eq.ktyp2)then ++ ++ gamma3=gamma2 ++ ++ elseif(rsq.le.dmet(3,ktyp1,1)**2)then ++ ++ rdr=1.d0/dmet(4,ktyp1,1) ++ rrr=sqrt(rsq)-dmet(2,ktyp1,1) ++ ld=min(nint(rrr*rdr),int(dmet(1,ktyp1,1))-1) ++ if(ld.lt.1)then ++ ++ safe=.false. ++ gamma3=0.d0 ++ ++ else ++ ++ ppp=rrr*rdr-dble(ld) ++ gk0=dmet(ld-1,ktyp1,2) ++ gk1=dmet(ld,ktyp1,2) ++ gk2=dmet(ld+1,ktyp1,2) ++ ++ t1=gk1+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*ppp ++ if(ppp.lt.0.d0)then ++ gamma3=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ gamma3=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ endif ++ ++ else ++ ++ gamma3=0.d0 ++ ++ endif ++ ++ gamma=(gamma1+(gamma2*rho(iatm)+gamma3*rho(jatm)))/rsq ++ ++ else ++ ++ if(safe.and.rsq.le.dmet(3,k0,1)**2)then ++ ++ gk0=dmet(l-1,k0,2) ++ gk1=dmet(l,k0,2) ++ gk2=dmet(l+1,k0,2) ++ ++ t1=gk1+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*ppp ++ if(ppp.lt.0.d0)then ++ gamma2=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ gamma2=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ else ++ ++ gamma2=0.d0 ++ ++ endif ++ ++ if(ktyp1.gt.ktyp2)then ++ ++ gamma=(gamma1-gamma2*(rho(iatm)*dmet(1,k0,2)+ ++ x rho(jatm)*dmet(2,k0,2)))/rsq ++ ++ else ++ ++ gamma=(gamma1-gamma2*(rho(iatm)*dmet(2,k0,2)+ ++ x rho(jatm)*dmet(1,k0,2)))/rsq ++ ++ endif ++ ++ endif ++ ++c calculate forces ++ ++ fx=gamma*xdf(m) ++ fy=gamma*ydf(m) ++ fz=gamma*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++c calculate virial ++ ++ virmet=virmet-gamma*rsq ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ return ++ end subroutine metfrc ++ ++ subroutine metgen(idnode,ntpatm,rmet) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for generating potential energy and ++c force arrays for metal potentials ++c ++c copyright - daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,kmet,mmet,katm1,katm2,ntpatm,imet,nmet ++ integer idnode,nnn,mmm ++ real(8) dlrpot,rmet,rrr,eps,sig,cc0,cc1,cc2,ccc ++ real(8) ddd,bet,cut1,cut2,aaa,rr0,ppp,qqq ++ ++c define grid resolution for potential arrays ++ ++ dlrpot=rmet/dble(mxgrid-1) ++ ++c construct arrays for metal potentials ++ ++ kmet=0 ++ do katm1=1,ntpatm ++ ++ do katm2=1,katm1 ++ ++ kmet=kmet+1 ++ imet=lstmet(kmet) ++ ++ if(ltpmet(imet).gt.0)then ++ ++c store array specification parameters ++ ++ vmet(1,imet,1)=dble(mxgrid) ++ vmet(2,imet,1)=0.d0 ++ vmet(3,imet,1)=rmet ++ vmet(4,imet,1)=dlrpot ++ ++ do i=1,4 ++ ++ vmet(i,imet,2)=vmet(i,imet,1) ++ dmet(i,imet,1)=vmet(i,imet,1) ++ dmet(i,imet,2)=0.d0 ++ ++ enddo ++ ++ if(ltpmet(imet).eq.1)then ++ ++c sutton-chen potentials ++ ++ eps=prmmet(imet,1) ++ sig=prmmet(imet,2) ++ nnn=nint(prmmet(imet,3)) ++ mmm=nint(prmmet(imet,4)) ++ ++ do i=5,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ vmet(i,imet,1)=eps*(sig/rrr)**nnn ++ vmet(i,imet,2)=dble(nnn)*eps*(sig/rrr)**nnn ++ dmet(i,imet,1)=(sig/rrr)**mmm ++ dmet(i,imet,2)=dble(mmm)*(sig/rrr)**mmm ++ ++ enddo ++ ++ if(katm1.eq.katm2)then ++ ++ dmet(1,imet,2)=(prmmet(imet,1)*prmmet(imet,5))**2 ++ dmet(2,imet,2)=(prmmet(imet,1)*prmmet(imet,5))**2 ++ ++ else ++ ++ nmet=lstmet((katm1*(katm1+1))/2) ++ mmet=lstmet((katm2*(katm2+1))/2) ++ dmet(1,imet,2)=(prmmet(nmet,1)*prmmet(nmet,5))**2 ++ dmet(2,imet,2)=(prmmet(mmet,1)*prmmet(mmet,5))**2 ++ ++ endif ++ ++ else if(ltpmet(imet).eq.2)then ++ ++c finnis sinclair potentials ++ ++ cc0=prmmet(imet,1) ++ cc1=prmmet(imet,2) ++ cc2=prmmet(imet,3) ++ ccc=prmmet(imet,4) ++ ddd=prmmet(imet,6) ++ bet=prmmet(imet,7) ++ cut1=ccc+4.d0*dlrpot ++ cut2=ddd+4.d0*dlrpot ++ ++ do i=5,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ vmet(i,imet,1)=0.d0 ++ vmet(i,imet,2)=0.d0 ++ dmet(i,imet,1)=0.d0 ++ dmet(i,imet,2)=0.d0 ++ ++ if(rrr.le.cut1)then ++ ++ vmet(i,imet,1)=(cc0+cc1*rrr+cc2*rrr*rrr)*(rrr-ccc)**2 ++ vmet(i,imet,2)=-rrr*(2.d0*(cc0+cc1*rrr+cc2*rrr*rrr)* ++ x (rrr-ccc)+(cc1+2.d0*cc2*rrr)*(rrr-ccc)**2) ++ ++ endif ++ ++ if(rrr.le.cut2)then ++ ++ dmet(i,imet,1)=(rrr-ddd)**2+bet*(rrr-ddd)**3/ddd ++ dmet(i,imet,2)=-rrr*(2.d0*(rrr-ddd)+ ++ x 3.d0*bet*(rrr-ddd)**2/ddd) ++ ++ endif ++ ++ enddo ++ ++ if(katm1.eq.katm2)then ++ ++ dmet(1,imet,2)=prmmet(imet,5)**2 ++ dmet(2,imet,2)=prmmet(imet,5)**2 ++ ++ else ++ ++ nmet=lstmet((katm1*(katm1+1))/2) ++ mmet=lstmet((katm2*(katm2+1))/2) ++ dmet(1,imet,2)=prmmet(nmet,5)**2 ++ dmet(2,imet,2)=prmmet(mmet,5)**2 ++ ++ endif ++ ++ else if(ltpmet(imet).eq.3)then ++ ++c gupta potentials ++ ++ aaa=prmmet(imet,1) ++ rr0=prmmet(imet,2) ++ ppp=prmmet(imet,3) ++ qqq=prmmet(imet,5) ++ ++ do i=5,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ vmet(i,imet,1)=aaa*exp(-ppp*(rrr-rr0)/rr0) ++ vmet(i,imet,2)=vmet(i,imet,1)*rrr*ppp/rr0 ++ dmet(i,imet,1)=exp(-2.d0*qqq*(rrr-rr0)/rr0) ++ dmet(i,imet,2)=2.d0*dmet(i,imet,1)*rrr*qqq/rr0 ++ ++ enddo ++ ++ dmet(1,imet,2)=prmmet(imet,4)**2 ++ dmet(2,imet,2)=prmmet(imet,4)**2 ++ ++ else if(.not.lmetab)then ++ ++ call error(idnode,151) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine metgen ++ ++ subroutine lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rmet,volm) ++ ++c************************************************************************* ++c ++c DL_POLY subroutine to evaluate long-range corrections to ++c pressure and energy in a periodic metal system. ++c ++c copyright daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*************************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,imcon,natms,ntpatm,i,ka,j ++ integer kmet,k0,k1,k2 ++ real(8) engunit,rmet,volm,twopi,forpi,eps,sig,nnn,mmm,ccc ++ real(8) elrcm0,elrcm1,elrcm2,vlrcm0,vlrcm1,vlrcm2,aaa,rr0,ppp ++ real(8) zet,qqq,eee ++ ++ save newjob ++ data newjob/.true./ ++ ++ twopi=2.0d0*pi ++ forpi=4.0d0*pi ++ ++c initalise counter arrays ++ ++ do i=1,mxsmet ++ numtyp(i)=0 ++ enddo ++ ++c evaluate species populations in system ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ numtyp(ka)=numtyp(ka)+1 ++ ++ enddo ++ ++c number densities ++ ++ do i=1,ntpatm ++ dens(i)=dble(numtyp(i))/volm ++ enddo ++ ++c long range corrections to density, energy and pressure ++ ++ do i=0,mxsmet ++ ++ elrcm(i)=0.d0 ++ vlrcm(i)=0.d0 ++ ++ enddo ++ ++ if(imcon.ne.0.and.imcon.ne.6) then ++ ++ kmet=0 ++ do i=1,ntpatm ++ ++ do j=1,i ++ ++ elrcm0=0.d0 ++ elrcm1=0.d0 ++ elrcm2=0.d0 ++ vlrcm0=0.d0 ++ vlrcm1=0.d0 ++ vlrcm2=0.d0 ++ ++ kmet=kmet+1 ++ k0=lstmet(kmet) ++ ++ if(ltpmet(k0).eq.1) then ++ ++c sutton-chen potentials ++ ++ eps=prmmet(k0,1) ++ sig=prmmet(k0,2) ++ nnn=prmmet(k0,3) ++ mmm=prmmet(k0,4) ++ ccc=prmmet(k0,5) ++ ++ elrcm0=eps*sig**3*(sig/rmet)**(nnn-3.d0)/(nnn-3.d0) ++ vlrcm0=eps*nnn*sig**3*(sig/rmet)**(nnn-3.d0)/(nnn-3.d0) ++ if(i.ne.j) then ++ elrcm0=elrcm0*2.d0 ++ vlrcm0=vlrcm0*2.d0 ++ endif ++ elrcm(0)=elrcm(0)+twopi*volm*dens(i)*dens(j)*elrcm0 ++ vlrcm(0)=vlrcm(0)-twopi*volm*dens(i)*dens(j)*vlrcm0 ++ ++ if(i.eq.j) then ++ ++ elrcm1=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (eps*ccc)**2 ++ elrcm(i)=elrcm(i)+forpi*dens(i)*elrcm1 ++ ++ vlrcm1=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (eps*ccc)**2 ++ vlrcm(i)=vlrcm(i)+twopi*dens(i)*vlrcm1 ++ ++ else ++ ++ k1=lstmet((i*(i+1))/2) ++ k2=lstmet((j*(j+1))/2) ++ elrcm1=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (prmmet(k1,1)*prmmet(k1,5))**2 ++ elrcm2=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (prmmet(k2,1)*prmmet(k2,5))**2 ++ elrcm(i)=elrcm(i)+forpi*dens(j)*elrcm1 ++ elrcm(j)=elrcm(j)+forpi*dens(i)*elrcm2 ++ ++ vlrcm1=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (prmmet(k1,1)*prmmet(k1,5))**2 ++ vlrcm2=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (prmmet(k2,1)*prmmet(k2,5))**2 ++ vlrcm(i)=vlrcm(i)+twopi*dens(j)*vlrcm1 ++ vlrcm(j)=vlrcm(j)+twopi*dens(i)*vlrcm2 ++ ++ endif ++ ++ else if(ltpmet(k0).eq.3) then ++ ++c gupta potentials ++ ++ aaa=prmmet(k0,1) ++ rr0=prmmet(k0,2) ++ ppp=prmmet(k0,3) ++ zet=prmmet(k0,4) ++ qqq=prmmet(k0,5) ++ eee=exp(-ppp*(rmet-rr0)/rr0) ++ ++ elrcm0=aaa*(rr0/ppp)*(rmet**2+2.d0*rmet*(rr0/ppp)+ ++ x 2.d0*(rr0/ppp)**2)*eee ++ vlrcm0=aaa*(rmet**3+3.d0*rmet**2*(rr0/ppp)+ ++ x 6.d0*rmet*(rr0/ppp)**2+6.d0*(rr0/rmet)**3)*eee ++ if(i.ne.j) then ++ elrcm0=elrcm0*2.d0 ++ vlrcm0=vlrcm0*2.d0 ++ endif ++ elrcm(0)=elrcm(0)+twopi*volm*dens(i)*dens(j)*elrcm0 ++ vlrcm(0)=vlrcm(0)-twopi*volm*dens(i)*dens(j)*vlrcm0 ++ ++ eee=exp(-2.d0*qqq*(rmet-rr0)/rr0) ++ ++ if(i.eq.j) then ++ ++ elrcm1=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ ++ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee*zet**2 ++ elrcm(i)=elrcm(i)+forpi*dens(i)*elrcm1 ++ ++ vlrcm1=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ ++ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* ++ x eee*zet**2 ++ vlrcm(i)=vlrcm(i)+twopi*dens(i)*vlrcm1 ++ ++ else ++ ++ elrcm1=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ ++ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee* ++ x zet**2 ++ elrcm2=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ ++ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee* ++ x zet**2 ++ elrcm(i)=elrcm(i)+forpi*dens(j)*elrcm1 ++ elrcm(j)=elrcm(j)+forpi*dens(i)*elrcm2 ++ ++ vlrcm1=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ ++ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* ++ x eee*zet**2 ++ vlrcm2=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ ++ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* ++ x eee*zet**2 ++ vlrcm(i)=vlrcm(i)+twopi*dens(j)*vlrcm1 ++ vlrcm(j)=vlrcm(j)+twopi*dens(i)*vlrcm2 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(newjob)then ++ ++ newjob=.false. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,/, ++ x 'long range corrections for metal potentials',/)") ++ write(nrite, ++ x "('short range energy and virial corrections:', ++ x 1p,2e15.6,/)") ++ x elrcm(0)/engunit,vlrcm(0)/engunit ++ write(nrite, ++ x "('density dependent energy and virial corrections',/)") ++ ++ do i=1,ntpatm ++ ++ kmet=lstmet((i*(i+1))/2) ++ if(lstmet(kmet).gt.0)then ++ ++ write(nrite,"(25x,a8,1p,2e15.6)")unqatm(i), ++ x elrcm(i)/engunit,vlrcm(i)/engunit ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine lrcmetal ++ ++ subroutine mettab(ntpatm,idnode,rmet,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading potential energy and ++c force arrays for EAM metal forces only ++c ++c copyright - daresbury laboratory ++c author - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 atom1,atom2,type ++ integer idnode,ntpatm,idum,fail ++ integer imet,katm1,katm2,jtpatm,i,j,k,ktype ++ integer numpot,numpts,ipot ++ real(8) rmet,engunit,start,finish ++ data fail/0/ ++ ++c allocate embedding array ++ ++ allocate(fmet(mxgrid,mxmet,2),stat=fail) ++ if(fail.ne.0)call error(idnode,36) ++ ++c define zero function for undefined interactions ++ ++ do i=1,mxmet ++ ++ fmet(1,i,1)=0.d0 ++ fmet(1,i,2)=0.d0 ++ ++ enddo ++ ++ if(idnode.eq.0)open (ntable,file='TABEAM') ++ ++c skip header record ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_eamtable_read(idnode,ntable) ++ ++c read number of potential functions in file ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_eamtable_read(idnode,ntable) ++ numpot=intstr(record,lenrec,idum) ++ ++ do ipot=1,numpot ++ ++c read data type, atom labels, number of points, start and end ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_eamtable_read(idnode,ntable) ++ ++c indentify data type ++ ++ ktype=1 ++ if(findstring('dens',record,idum).or. ++ x findstring('DENS',record,idum))ktype=2 ++ if(findstring('embe',record,idum).or. ++ x findstring('EMBE',record,idum))ktype=3 ++ call getword(type,record,8,lenrec) ++ ++c identify atom types ++ ++ call getword(atom1,record,8,lenrec) ++ if(ktype.eq.1)then ++ call getword(atom2,record,8,lenrec) ++ else ++ atom2=atom1 ++ endif ++ ++c data specifiers ++ ++ numpts=intstr(record,lenrec,idum) ++ start=dblstr(record,lenrec,idum) ++ finish=dblstr(record,lenrec,idum) ++ ++c check atom indentities ++ ++ katm1=0 ++ katm2=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm ++ ++ enddo ++ ++ if(katm1.eq.0.or.katm2.eq.0) then ++ if(idnode.eq.0) ++ x write(nrite,'(a)') ' **** '//atom1//' *** '//atom2//' ****' ++ call error(idnode,81) ++ endif ++ ++c check array dimensions ++ ++ if(mxbuff.lt.numpts+4)then ++ ++ if(idnode.eq.0) ++ x write(nrite,*) 'mxbuff must be >=',numpts+4,' in mettab' ++ call error(idnode,28) ++ ++ endif ++ ++c store working parameters (start shifted for DL_POLY interpolation) ++ ++ buffer(1)=dble(numpts+4) ++ buffer(4)=(finish-start)/dble(numpts-1) ++ buffer(2)=start-5.d0*buffer(4) ++ buffer(3)=finish ++ if(idnode.eq.0) ++ x write(nrite,"(16x,2a8,2x,a4,3x,1p,4e13.5)") ++ x atom1,atom2,type,dble(numpts),start,finish,buffer(4) ++ ++c read potential arrays ++ ++ k=4 ++ do j=1,(numpts+3)/4 ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_eamtable_read(idnode,ntable) ++ buffer(k+1)=dblstr(record,lenrec,idum) ++ buffer(k+2)=dblstr(record,lenrec,idum) ++ buffer(k+3)=dblstr(record,lenrec,idum) ++ buffer(k+4)=dblstr(record,lenrec,idum) ++ k=k+4 ++ ++ enddo ++ ++c copy data to internal arrays ++ ++ if(ktype.eq.1)then ++ ++c check range against specified cutoff ++ ++ if(rmet.lt.finish)call error(idnode,26) ++ ++c identify potential ++ ++ imet=lstmet(loc2(katm1,katm2)) ++ ++c pair potential terms ++ ++ vmet(1,imet,1)=buffer(1) ++ vmet(2,imet,1)=buffer(2) ++ vmet(3,imet,1)=buffer(3) ++ vmet(4,imet,1)=buffer(4) ++ ++ do i=5,mxgrid ++ ++ if(i-4.gt.numpts)then ++ vmet(i,imet,1)=0.d0 ++ else ++ vmet(i,imet,1)=buffer(i)*engunit ++ buffer(i)=buffer(i)*engunit ++ endif ++ ++ enddo ++ ++c calculate derivative of pair potential function ++ ++ call metal_deriv(imet,vmet,buffer) ++ ++c adapt derivatives for use in interpolation ++ ++ do i=5,numpts+4 ++ vmet(i,imet,2)=-(dble(i)*buffer(4)+buffer(2))* ++ x vmet(i,imet,2) ++ enddo ++ ++ else if(ktype.eq.2)then ++ ++c check range against specified cutoff ++ ++ if(rmet.lt.finish)call error(idnode,26) ++ ++c density terms ++ ++ dmet(1,katm1,1)=buffer(1) ++ dmet(2,katm1,1)=buffer(2) ++ dmet(3,katm1,1)=buffer(3) ++ dmet(4,katm1,1)=buffer(4) ++ ++ do i=5,mxgrid ++ ++ if(i-4.gt.numpts)then ++ dmet(i,katm1,1)=0.d0 ++ else ++ dmet(i,katm1,1)=buffer(i) ++ endif ++ ++ enddo ++ ++c calculate derivative of density function ++ ++ call metal_deriv(katm1,dmet,buffer) ++ ++c adapt derivatives for use in interpolation ++ ++ dmet(1,katm1,2)=0.d0 ++ dmet(2,katm1,2)=0.d0 ++ dmet(3,katm1,2)=0.d0 ++ dmet(4,katm1,2)=0.d0 ++ do i=5,numpts+4 ++ dmet(i,katm1,2)=-(dble(i)*buffer(4)+buffer(2))* ++ x dmet(i,katm1,2) ++ enddo ++ ++ else if(ktype.eq.3)then ++ ++c embedding function arrays ++ ++ fmet(1,katm1,1)=buffer(1) ++ fmet(2,katm1,1)=buffer(2) ++ fmet(3,katm1,1)=buffer(3) ++ fmet(4,katm1,1)=buffer(4) ++ ++ do i=5,mxgrid ++ ++ if(i-4.gt.numpts)then ++ fmet(i,katm1,1)=0.d0 ++ else ++ fmet(i,katm1,1)=buffer(i)*engunit ++ buffer(i)=buffer(i)*engunit ++ endif ++ ++ enddo ++ ++c calculate derivative of embedding function ++ ++ call metal_deriv(katm1,fmet,buffer) ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)close (ntable) ++ ++ if(idnode.eq.0)write(nrite,'(/,/,1x,a)') ++ x 'potential tables read from TABEAM file' ++ ++ return ++ end subroutine mettab ++ ++ subroutine metal_deriv(ityp,vvv,buffer) ++ ++c********************************************************************** ++c ++c calculate numerical derivatives of tabulated EAM metal potentials ++c ++c copyright - daresbury laboratory ++c author - w.smith march 2006 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer ityp,i,npt ++ real(8) vvv,buffer,delmet,aa0,aa1,aa2,aa3,aa4,d1y,d2y,d3y,d4y ++ real(8) f0,f1,f2,f3,f4 ++ ++ dimension vvv(mxgrid,mxmet,2),buffer(mxbuff) ++ ++c interpolation parameters ++ ++ vvv(1,ityp,2)=buffer(1) ++ vvv(2,ityp,2)=buffer(2) ++ vvv(3,ityp,2)=buffer(3) ++ vvv(4,ityp,2)=buffer(4) ++ ++c construct interpolation table ++ ++ delmet=buffer(4) ++ npt=nint(buffer(1))-2 ++ do i=7,npt ++ ++ aa0=buffer(i) ++ f0=buffer(i-2)/aa0 ++ f1=buffer(i-1)/aa0 ++ f2=1.d0 ++ f3=buffer(i+1)/aa0 ++ f4=buffer(i+2)/aa0 ++ ++c calculate numerical differences for 5-point interpolation ++ ++ d1y=(f1-f0) ++ d2y=(f2-f1)-(f1-f0) ++ d3y=(f3-f0)+3.d0*(f1-f2) ++ d4y=(f4-f3)+3.d0*(f2-f3)+3.d0*(f2-f1)+(f0-f1) ++ ++c calculate polynomial coefficients ++ ++ aa0=aa0/delmet ++ aa4=d4y/24.d0 ++ aa3=(d3y+12.d0*aa4)/6.d0 ++ aa2=(d2y+6.d0*aa3-14.d0*aa4)/2.d0 ++ aa1=d1y+3.d0*aa2-7.d0*aa3+15.d0*aa4 ++ ++c calculate derivatives ++ ++ vvv(i,ityp,2)=aa1*aa0 ++ ++c derivatives at extremes of range ++ ++ if(i.eq.7)then ++ ++ vvv(5,ityp,2)=(aa1-4.d0*aa2+12.d0*aa3-32.d0*aa4)*aa0 ++ vvv(6,ityp,2)=(aa1-2.d0*aa2+3.d0*aa3-4.d0*aa4)*aa0 ++ ++ else if(i.eq.npt)then ++ ++ vvv(npt+1,ityp,2)=(aa1+2.d0*aa2+3.d0*aa3+4.d0*aa4)*aa0 ++ vvv(npt+2,ityp,2)=(aa1+4.d0*aa2+12.d0*aa3+32.d0*aa4)*aa0 ++ ++ endif ++ ++ enddo ++ ++c set derivatives to zero beyond end point of function ++ ++ do i=npt+3,mxgrid ++ vvv(i,ityp,2)=0.d0 ++ enddo ++ ++ return ++ end subroutine metal_deriv ++ ++ subroutine abort_eamtable_read(idnode,ntable) ++ ++c*********************************************************************** ++c ++c dl_poly error exit subroutine for reading TABEAM file ++c ++c copyright - daresbury laboratory ++c author - w. smith mar 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ integer idnode,ntable ++ ++ if(idnode.eq.0)close (ntable) ++ ++ call error(idnode,29) ++ ++ end subroutine abort_eamtable_read ++ ++ end module metal_module +diff -urN dl_class_1.9.orig/srcmod/neu_coul_module.f dl_class_1.9/srcmod/neu_coul_module.f +--- dl_class_1.9.orig/srcmod/neu_coul_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/neu_coul_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,731 @@ ++ module neu_coul_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining neutral group coulomb terms ++c copyright - daresbury laboratory ++c ++c author - w. smith aug 2006 ++c adapted - p.-a. cazade oct 2007 : solvation, free energy etc ++c adapted - w. smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use ewald_module ++ use metafreeze_module ++ use pair_module ++ use setup_module ++ use solvation_module ++ ++ contains ++ ++ subroutine coul0neu ++ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic force. ++c 1/r potential, no truncation or damping. ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lexcite,lselect,lskip,idrive,jdrive ++ integer ik,m,iatm,jatm,kkk ++ real(8) engcpe,vircpe,epsq,chgprd,rsq,rrr,coul,reps,fcoul ++ real(8) fx,fy,fz ++ real(8) strs(6),strs_loc(6) ++ ++ lskip=(lfree.or.lexcite) ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ reps=r4pie0/epsq ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ iatm=ilist(m) ++ jatm=jlist(m) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(iatm)) ++ jdrive=driven(ltype(jatm)) ++ ++ endif ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chge(jatm)*chge(iatm)*reps ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++ rsq=rsqdf(m) ++ rrr=sqrt(rsq) ++ ++c calculate coulomb energy and force ++ ++ coul=chgprd/rrr ++ fcoul=coul/rsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+coul ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-coul ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate forces ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fxx(iatm)=fxx(iatm)+fx ++ fyy(iatm)=fyy(iatm)+fy ++ fzz(iatm)=fzz(iatm)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local definitions ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-coul ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine coul0neu ++ ++ subroutine coul2neu ++ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces ++c assuming a distance dependant dielectric `constant'. ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lexcite,lselect,lskip,idrive,jdrive ++ integer ik,m,iatm,jatm,kkk ++ real(8) engcpe,vircpe,epsq,fx,fy,fz,chgprd,rrsq,coul,egamma ++ real(8) strs(6),strs_loc(6) ++ ++ lskip=(lfree.or.lexcite) ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ iatm=ilist(m) ++ jatm=jlist(m) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(iatm)) ++ jdrive=driven(ltype(jatm)) ++ ++ endif ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chge(iatm)*chge(jatm)*r4pie0/epsq ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate potential energy ++ ++ rrsq=1.d0/rsqdf(m) ++ coul=chgprd*rrsq ++ egamma=2.d0*coul*rrsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+2.d0*coul ++ coul=lambda1*coul ++ egamma=lambda1*egamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-2.d0*coul ++ coul=lambda2*coul ++ egamma=lambda2*egamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and Virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-2.d0*coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate forces ++ ++ fx=egamma*xdf(m) ++ fy=egamma*ydf(m) ++ fz=egamma*zdf(m) ++ ++ fxx(iatm)=fxx(iatm)+fx ++ fyy(iatm)=fyy(iatm)+fy ++ fzz(iatm)=fzz(iatm)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local definitions ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-2.d0*coul ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine coul2neu ++ ++ subroutine coul3neu ++ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq,rcut,alpha) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic force. ++c reaction field potential ++c Ref: M Neumann, J Chem Phys, 82, 5633, (1985) ++c adapted for fennell-gezelter coulombic model ++c by w.smith june 2007 ++c Ref: CJ Fennell and JD Gezelter, J Chem Phys, ++c 124, 234104, (2006) ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1995 ++c author - t. forester february 1995 ++c stress tensor - t.forester feb 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lexcite,lselect,lskip,newjob,idrive,jdrive ++ integer ik,m,iatm,jatm,kkk ++ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,erc1,fer1 ++ real(8) rcsq,b0,rfld0,rfld1,rfld2,chgprd,rsq,coul,omega,fcoul ++ real(8) fx,fy,fz,rrr,alpha,a1,a2,a3,a4,a5,pp,tt,exp1 ++ real(8) strs(6),strs_loc(6) ++ ++ save newjob,b0,rfld0,rfld1,rfld2,vcon,fcon ++ ++ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ ++ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ ++ data newjob/.true./ ++ ++ if(newjob)then ++ ++c reaction field terms ++ ++ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) ++ rfld0=b0/rcut**3 ++ rfld1=(1.d0+b0*0.5d0)/rcut ++ rfld2=rfld0*0.5d0 ++ ++c screened coulomb terms ++ ++ tt=1.d0/(1.d0+pp*alpha*rcut) ++ exp1=exp(-(alpha*rcut)**2) ++ erc1=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut ++ fer1=(erc1+2.d0*(alpha/sqrpi)*exp1)/(rcut*rcut) ++ vcon=erc1+rfld2*rcut**2-rfld1 ++ fcon=rcut*fer1-rfld0*rcut ++ ++ endif ++ ++ lskip=(lfree.or.lexcite) ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ iatm=ilist(m) ++ jatm=jlist(m) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(iatm)) ++ jdrive=driven(ltype(jatm)) ++ ++ endif ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chge(jatm)*chge(iatm)*r4pie0 ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ rrr=sqrt(rsq) ++ ++c error function terms ++ ++ tt=1.d0/(1.d0+pp*alpha*rrr) ++ exp1=exp(-(alpha*rrr)**2) ++ erc1=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rrr ++ fer1=(erc1+2.d0*(alpha/sqrpi)*exp1)/rsq ++ ++c calculate potential energy ++ ++ omega=erc1-vcon+fcon*(rrr-rcut) ++ coul=chgprd*(omega+rfld2*rsq-rfld1) ++ ++c calculate forces ++ ++ fcoul=chgprd*(fer1-fcon/rrr-rfld0) ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+fcoul*rsq ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-fcoul*rsq ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate coulombic energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-fcoul*rsq ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate coulombic force ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fxx(iatm)=fxx(iatm)+fx ++ fyy(iatm)=fyy(iatm)+fy ++ fzz(iatm)=fzz(iatm)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local definitions ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-fcoul*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine coul3neu ++ ++ end module neu_coul_module +diff -urN dl_class_1.9.orig/srcmod/nlist_builders_module.f dl_class_1.9/srcmod/nlist_builders_module.f +--- dl_class_1.9.orig/srcmod/nlist_builders_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/nlist_builders_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,2216 @@ ++ module nlist_builders_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining neighbourlist builder routines ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use exclude_module ++ use pair_module ++ use setup_module ++ use utility_module ++ ++ contains ++ ++ subroutine nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c********************************************************************* ++c ++c dl_poly subroutine to select and implement neighbour list ++c builders for short range force calculations ++c ++c copyright - daresbury laboratory ++c author - w. smith june 2006 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,lneut,lnsq,loglnk,newjob,ltad ++ integer natms,idnode,mxnode,imcon,nneut,keyfce ++ real(8) rcut,delr,tstep ++ ++ save newjob ++ ++ data newjob/.true./ ++ ++c skip if no pair force calculations required ++ ++ if(keyfce.gt.0)then ++ ++c test for updating the Verlet list ++ ++ if(ltad)then ++ ++ call vertest2(newlst,idnode,mxnode,natms,imcon,delr,tstep) ++ ++ else ++ ++ call vertest(newlst,idnode,mxnode,natms,delr,tstep) ++ ++ endif ++ ++c set up nonbonded interaction (verlet) list ++ ++ newlst=(newjob.or.newlst) ++ ++ if(newlst)then ++ ++ if(.not.lneut)then ++ ++ if(lnsq)then ++ ++c calculate distant interactions explicitly ++ ++ call parlst_nsq(newlst,natms,idnode,mxnode,imcon,rcut) ++ ++ elseif(loglnk)then ++ ++c ignore real space distant interactions ++ ++ call parlink ++ x (newlst,natms,idnode,mxnode,imcon,rcut,delr) ++ ++ else ++ ++ call parlst ++ x (newlst,natms,idnode,mxnode,imcon,rcut,delr) ++ ++ endif ++ ++ else ++ ++ if(.not.loglnk)then ++ ++ call parneulst ++ x (newlst,lneut,nneut,idnode,mxnode,imcon,rcut, ++ x delr) ++ ++ else ++ ++ call parlinkneu ++ x (newlst,natms,nneut,idnode,mxnode,imcon, ++ x rcut,delr) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ newjob=.false. ++ ++ return ++ end subroutine nlist_driver ++ ++ subroutine parlst(newlst,natms,idnode,mxnode,imcon,rcut,delr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on the brode-ahlrichs scheme ++c frozen atoms taken into account ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w.smith march 1992 ++c modified - t.forester october 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst,lfrzi,ldo ++ integer natms,idnode,mxnode,imcon,ibig,last,mpm2 ++ integer npm2,idum,i,m,ii,j ++ real(8) rcut,delr,rclim,rsq ++ ++ ++ if(newlst)then ++ ++ ibig=0 ++ ++c check size of work array ++ ++ if(mxxdf.lt.(natms+1)/2)then ++ if(idnode.eq.0) write(nrite,*) 'mxxdf must be greater than ', ++ x (natms+1)/2 ++ call error(idnode,474) ++ endif ++ ++c set control variables ++ ++ last=natms ++ lchk=.true. ++ mpm2=natms/2 ++ npm2=(natms-1)/2 ++ ++c set cutoff radius ++ ++ rclim=(rcut+delr)**2 ++ ++c construct pair force neighbour list ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ noxatm(i)=1 ++ ++ enddo ++ ++c outer loop over atoms ++ ++ do m=1,mpm2 ++ ++ if(m.gt.npm2)last=mpm2 ++ ++c inner loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ ii=ii+1 ++ xdf(ii)=xxx(i)-xxx(j) ++ ydf(ii)=yyy(i)-yyy(j) ++ zdf(ii)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c apply minimum image convention ++ ++ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) ++ ++c allocate atoms to neighbour list ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++ lfrzi=(lstfrz(i).ne.0) ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ ii=ii+1 ++ ++c reject atoms in excluded pair list ++ ++ if((nexatm(ii).gt.0).and.(lexatm(ii,noxatm(ii)).eq.j)) ++ x then ++ ++ noxatm(ii)=min(noxatm(ii)+1,nexatm(ii)) ++ ++c reject frozen atom pairs ++ ++ else ++ ++ ldo=.true. ++ if(lfrzi)ldo=(lstfrz(j).eq.0) ++ ++ if(ldo)then ++ ++c calculate interatomic distance ++ ++ if(imcon.eq.6)then ++ ++ rsq=xdf(ii)*xdf(ii)+ydf(ii)*ydf(ii) ++ ++ else ++ ++ rsq=xdf(ii)*xdf(ii)+ydf(ii)*ydf(ii)+zdf(ii)*zdf(ii) ++ ++ endif ++ ++c running check of neighbour list array capacity ++ ++ if(rsq.lt.rclim)then ++ ++ lentry(ii)=lentry(ii)+1 ++ ++ if(lentry(ii).gt.mxlist)then ++ ++ lchk=.false. ++ ibig=max(lentry(ii),ibig) ++ ++ endif ++ ++c compile neighbour list array ++ ++ if(lchk)then ++ ++ list(ii,lentry(ii))=j ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ ++ if(.not.lchk)then ++ ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) ' mxlist must be at least ',ibig ++ write(nrite,*) ' mxlist is currently ',mxlist ++ endif ++ call error(idnode,110) ++ ++ endif ++ ++c check all excluded atoms are accounted for ++ ++ do i=1,ii ++ ++ if(nexatm(i).gt.0.and.noxatm(i).ne.nexatm(i))lchk=.false. ++ ++ enddo ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ ++ if(.not.lchk) call error(idnode,160) ++ ++ endif ++ ++ return ++ end subroutine parlst ++ ++ subroutine parlink(newlst,natms,idnode,mxnode,imcon,rcut,delr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on link-cell method. ++c frozen atoms taken into account ++c ++c to be used with the link version of exclude :exclude_link ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester september 1993. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst,linc,newjob,lfrzi,ldo ++ integer natms,idnode,mxnode,imcon,idum,nix,niy,niz,fail ++ integer i,ibig,irat,nsbcll,ilx,ily,ilz,ncells,ix,iy,iz,j,icell ++ integer ic,ii,kc,ik,jx,jy,jz,jc,ixl ++ real(8) rcut,delr,rcsq,xm,ym,zm,det,xdc,ydc,zdc,tx,ty,tz ++ real(8) cx,cy,cz,sxd,syd,szd,xd,yd,zd,rsq ++ ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ ++ dimension nix(508),niy(508),niz(508) ++ ++ save newjob ++ data newjob/.true./ ++ ++ data nix/0,1,0,0,-1,1,0,-1,1,0,-1,1,-1,1,2,0,0,-2,2,-1,1,0,-2,2,0, ++ x 0,-1,1,0,-1,1,-2,2,-2,2,-1,1,-1,1,-1,1,-2,2,0,-2,2,0,-2,2,-2,2, ++ x -1,1,-2,2,-2,2,-1,1,-2,2,-2,2,3,0,0,-3,3,-1,1,0,-3,3,0,0,-1,1,0, ++ x -1,1,-3,3,-3,3,-1,1,-1,1,-1,1,-3,3,-2,2,0,-3,3,0,0,-2,2,0,-2,2, ++ x -3,3,-3,3,-2,2,-1,1,-3,3,-3,3,-1,1,-1,1,-2,2,-2,2,-1,1,-2,2,-3,3, ++ x -3,3,-2,2,-2,2,-2,2,-3,3,0,-3,3,0,-3,3,-3,3,-1,1,-3,3,-3,3,-1,1, ++ x -3,3,-3,3,-2,2,-3,3,-3,3,-2,2,-3,3,-3,3,4,0,0,-4,4,-1,1,0,-4,4,0, ++ x 0,-1,1,0,-1,1,-4,4,-4,4,-1,1,-1,1,-1,1,-4,4,-2,2,0,-4,4,0,0,-2,2, ++ x 0,-2,2,-4,4,-4,4,-2,2,-1,1,-4,4,-4,4,-1,1,-1,1,-2,2,-2,2,-1,1,-2, ++ x 2,-4,4,-4,4,-2,2,-2,2,-2,2,-4,4,-3,3,0,-4,4,0,0,-3,3,0,-3,3,-4,4, ++ x -4,4,-3,3,-1,1,-4,4,-4,4,-1,1,-1,1,-3,3,-3,3,-1,1,-3,3,-4,4,-4,4, ++ x -3,3,-2,2,-4,4,-4,4,-2,2,-2,2,-3,3,-3,3,-2,2,-3,3,-4,4,-4,4,-3,3, ++ x -3,3,-3,3,-4,4,0,-4,4,0,-4,4,-4,4,-1,1,-4,4,-4,4,-1,1,-4,4,-4,4, ++ x -2,2,-4,4,-4,4,-2,2,-4,4,-4,4,-3,3,-4,4,-4,4,-3,3,5,0,0,-5,5,-1, ++ x 1,0,-5,5,0,0,-1,1,0,-1,1,-5,5,-5,5,-1,1,-1,1,-1,1,-5,5,-2,2,0,-5, ++ x 5,0,0,-2,2,0,-2,2,-5,5,-5,5,-2,2,-1,1,-5,5,-5,5,-1,1,-1,1,-2,2, ++ x -2,2,-1,1,-2,2,-5,5,-5,5,-2,2,-2,2,-2,2,-5,5,-3,3,0,-5,5,0,0,-3, ++ x 3,0,-3,3,-5,5,-5,5,-3,3,-1,1,-5,5,-5,5,-1,1,-1,1,-3,3,-3,3,-1,1, ++ x -3,3,-5,5,-5,5,-3,3,-2,2,-5,5,-5,5,-2,2,-2,2,-3,3,-3,3,-2,2,-3,3, ++ x -5,5,-5,5,-3,3,-3,3,-3,3/ ++ data niy/ 0,0,1,0,1,1,-1,0,0,1,-1,-1,1,1,0,2,0,1,1,2,2,-2,0,0,2, ++ x -1,0,0,1,-2,-2,-1,-1,1,1,2,2,-1,-1,1,1,2,2,-2,0,0,2,-2,-2,2,2,-2, ++ x -2,-1,-1,1,1,2,2,-2,-2,2,2,0,3,0,1,1,3,3,-3,0,0,3,-1,0,0,1,-3,-3, ++ x -1,-1,1,1,3,3,-1,-1,1,1,2,2,3,3,-3,0,0,3,-2,0,0,2,-3,-3,-2,-2,2, ++ x 2,3,3,-3,-3,-1,-1,1,1,3,3,-2,-2,-1,-1,1,1,2,2,-3,-3,-2,-2,2,2,3, ++ x 3,-2,-2,2,2,3,3,-3,0,0,3,-3,-3,3,3,-3,-3,-1,-1,1,1,3,3,-3,-3,3,3, ++ x -3,-3,-2,-2,2,2,3,3,-3,-3,3,3,0,4,0,1,1,4,4,-4,0,0,4,-1,0,0,1,-4, ++ x -4,-1,-1,1,1,4,4,-1,-1,1,1,2,2,4,4,-4,0,0,4,-2,0,0,2,-4,-4,-2,-2, ++ x 2,2,4,4,-4,-4,-1,-1,1,1,4,4,-2,-2,-1,-1,1,1,2,2,-4,-4,-2,-2,2,2, ++ x 4,4,-2,-2,2,2,3,3,4,4,-4,0,0,4,-3,0,0,3,-4,-4,-3,-3,3,3,4,4,-4, ++ x -4,-1,-1,1,1,4,4,-3,-3,-1,-1,1,1,3,3,-4,-4,-3,-3,3,3,4,4,-4,-4, ++ x -2,-2,2,2,4,4,-3,-3,-2,-2,2,2,3,3,-4,-4,-3,-3,3,3,4,4,-3,-3,3,3, ++ x 4,4,-4,0,0,4,-4,-4,4,4,-4,-4,-1,-1,1,1,4,4,-4,-4,4,4,-4,-4,-2,-2, ++ x 2,2,4,4,-4,-4,4,4,-4,-4,-3,-3,3,3,4,4,0,5,0,1,1,5,5,-5,0,0,5,-1, ++ x 0,0,1,-5,-5,-1,-1,1,1,5,5,-1,-1,1,1,2,2,5,5,-5,0,0,5,-2,0,0,2,-5, ++ x -5,-2,-2,2,2,5,5,-5,-5,-1,-1,1,1,5,5,-2,-2,-1,-1,1,1,2,2,-5,-5, ++ x -2,-2,2,2,5,5,-2,-2,2,2,3,3,5,5,-5,0,0,5,-3,0,0,3,-5,-5,-3,-3,3, ++ x 3,5,5,-5,-5,-1,-1,1,1,5,5,-3,-3,-1,-1,1,1,3,3,-5,-5,-3,-3,3,3,5, ++ x 5,-5,-5,-2,-2,2,2,5,5,-3,-3,-2,-2,2,2,3,3,-5,-5,-3,-3,3,3,5,5,-3, ++ x -3,3,3/ ++ data niz/0,0,0,1,0,0,1,1,1,1,1,1,1,1,0,0,2,0,0,0,0,1,1,1,1,2,2,2, ++ x 2,1,1,1,1,1,1,1,1,2,2,2,2,0,0,2,2,2,2,1,1,1,1,2,2,2,2,2,2,2,2,2, ++ x 2,2,2,0,0,3,0,0,0,0,1,1,1,1,3,3,3,3,1,1,1,1,1,1,1,1,3,3,3,3,0,0, ++ x 0,0,2,2,2,2,3,3,3,3,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3, ++ x 3,3,2,2,2,2,2,2,2,2,3,3,3,3,0,0,3,3,3,3,1,1,1,1,3,3,3,3,3,3,3,3, ++ x 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,0,0,4,0,0,0,0,1,1,1,1,4,4,4,4,1, ++ x 1,1,1,1,1,1,1,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,1,1,1,1,1,1,1,1,2, ++ x 2,2,2,2,2,2,2,4,4,4,4,4,4,4,4,2,2,2,2,2,2,2,2,4,4,4,4,0,0,0,0,3, ++ x 3,3,3,4,4,4,4,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,2, ++ x 2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,4, ++ x 4,4,4,0,0,4,4,4,4,1,1,1,1,4,4,4,4,4,4,4,4,2,2,2,2,4,4,4,4,4,4,4, ++ x 4,3,3,3,3,4,4,4,4,4,4,4,4,0,0,5,0,0,0,0,1,1,1,1,5,5,5,5,1,1,1,1, ++ x 1,1,1,1,5,5,5,5,0,0,0,0,2,2,2,2,5,5,5,5,1,1,1,1,1,1,1,1,2,2,2,2, ++ x 2,2,2,2,5,5,5,5,5,5,5,5,2,2,2,2,2,2,2,2,5,5,5,5,0,0,0,0,3,3,3,3, ++ x 5,5,5,5,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,2,2,2,2, ++ x 2,2,2,2,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,5,5,5,5/ ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1890) ++ ++ if(newlst)then ++ ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x call error(idnode,300) ++ lchk=.true. ++ ibig=0 ++ ++c zero link arrays ++ ++ do i=1,natms ++ link(i)=0 ++ enddo ++ ++c construct pair force neighbour list ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ ++ enddo ++ ++c real space cut off ++ ++ rcsq=(rcut+delr)**2 ++ ++c create mock cell vector for non-periodic system ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++c find maximum x,y,z postions ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ ++ do i=1,natms ++ ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ ++ enddo ++ ++ if(imcon.eq.0)then ++ ++ cell(1)=max(2.d0*xm+rcut+delr,3.d0*(rcut+delr)) ++ cell(5)=max(2.d0*ym+rcut+delr,3.d0*(rcut+delr)) ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ ++ endif ++ ++ cell(9)=max(2.d0*zm+rcut+delr,3.d0*(rcut+delr),cell(9)) ++ ++ endif ++ ++ call dcell(cell,celprp) ++ call invert(cell,rcell,det) ++ ++c ratio of link cell length to cut off diameter - max value is 5 ++ ++c irat=nint((rcut+delr)/rlink) ++c irat=min(max(irat,1),5) ++ ++ irat=1 ++ ++ ++c number of subcells ++ ++ if (irat.eq.1)then ++ ++ nsbcll=14 ++ ++ elseif(irat.eq.2)then ++ ++ nsbcll=63 ++ ++ elseif(irat.eq.3)then ++ ++ nsbcll=156 ++ ++ elseif(irat.eq.4)then ++ ++ nsbcll=307 ++ ++ elseif(irat.eq.5)then ++ ++ nsbcll=508 ++ ++ endif ++ ++ ilx=int(celprp(7)*dble(irat)/(rcut+delr)) ++ ily=int(celprp(8)*dble(irat)/(rcut+delr)) ++ ilz=int(celprp(9)*dble(irat)/(rcut+delr)) ++ ++c check there are enough link cells ++ ++ linc=.true. ++ if(ilx.lt.2*irat+1)linc=.false. ++ if(ily.lt.2*irat+1)linc=.false. ++ if(ilz.lt.2*irat+1)linc=.false. ++ if(.not.linc) call error(idnode,305) ++ ncells=ilx*ily*ilz ++ if(ncells.gt.mxcell) call error(idnode,392) ++ ++c calculate link cell indices ++ ++ do i=1,ncells ++ ++ lct(i)=0 ++ ++ enddo ++ ++c link-cell cutoff for reduced space ++ ++ xdc=dble(ilx) ++ ydc=dble(ily) ++ zdc=dble(ilz) ++ ++c reduced space coordinates ++ if(newjob)then ++ ++ newjob=.false. ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++ if(mxnode.gt.1) call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ do i=1,natms ++ ++ tx=xxx(i) ++ ty=yyy(i) ++ tz=zzz(i) ++ ++ uxx(i)=(rcell(1)*tx+rcell(4)*ty+rcell(7)*tz)+0.5d0 ++ uyy(i)=(rcell(2)*tx+rcell(5)*ty+rcell(8)*tz)+0.5d0 ++ uzz(i)=(rcell(3)*tx+rcell(6)*ty+rcell(9)*tz)+0.5d0 ++ ++ enddo ++ ++c link neighbours ++ ++ do i=1,natms ++ ++ ix=min(int(xdc*uxx(i)),ilx-1) ++ iy=min(int(ydc*uyy(i)),ily-1) ++ iz=min(int(zdc*uzz(i)),ilz-1) ++ ++ icell=1+ix+ilx*(iy+ily*iz) ++ ++ j=lct(icell) ++ lct(icell)=i ++ link(i)=j ++ ++ enddo ++ ++c set control variables for loop over subcells ++ ++ ix=1 ++ iy=1 ++ iz=1 ++ ++c primary loop over subcells ++ ++ do ic=1,ncells ++ ++ ii=lct(ic) ++ if(ii.gt.0)then ++ ++c secondary loop over subcells ++ ++ ik=0 ++ ++ do kc=1,nsbcll ++ ++ i=ii ++ ++ cx=0.d0 ++ cy=0.d0 ++ cz=0.d0 ++ jx=ix+nix(kc) ++ jy=iy+niy(kc) ++ jz=iz+niz(kc) ++ ++c minimum image convention ++ ++ if(jx.gt.ilx)then ++ ++ jx=jx-ilx ++ cx=1.d0 ++ ++ elseif(jx.lt.1)then ++ ++ jx=jx+ilx ++ cx=-1.d0 ++ ++ endif ++ ++ if(jy.gt.ily)then ++ ++ jy=jy-ily ++ cy=1.d0 ++ ++ elseif(jy.lt.1)then ++ ++ jy=jy+ily ++ cy=-1.d0 ++ ++ endif ++ ++ if(jz.gt.ilz)then ++ ++ jz=jz-ilz ++ cz=1.d0 ++ ++ elseif(jz.lt.1)then ++ ++ jz=jz+ilz ++ cz=-1.d0 ++ ++ endif ++ ++c index of neighbouring cell ++ ++ jc=jx+ilx*((jy-1)+ily*(jz-1)) ++ j=lct(jc) ++ ++c ignore if empty ++ ++ if(j.gt.0)then ++ ++ do while(i.ne.0) ++ ++c test if site is of interest to this node ++ ++ if(mod(i-1,mxnode).eq.idnode)then ++ ++ ++c i's index for this processor ++ ik=((i-1)/mxnode)+1 ++ ++c test if i is a frozen atom ++ ++ lfrzi=(lstfrz(i).ne.0) ++ ++ if(ic.eq.jc) j=link(i) ++ if(j.gt.0)then ++ ++ do while(j.ne.0) ++ ++c test of frozen atom pairs ++ ++ ldo=.true. ++ if(lfrzi)ldo=(lstfrz(j).eq.0) ++ ++ if(ldo)then ++ ++c distance in real space : minimum image applied ++ ++ sxd=uxx(j)-uxx(i)+cx ++ syd=uyy(j)-uyy(i)+cy ++ szd=uzz(j)-uzz(i)+cz ++ ++ xd=cell(1)*sxd+cell(4)*syd+cell(7)*szd ++ yd=cell(2)*sxd+cell(5)*syd+cell(8)*szd ++ zd=cell(3)*sxd+cell(6)*syd+cell(9)*szd ++ ++ if(imcon.eq.6)then ++ ++ rsq=xd**2+yd**2 ++ ++ else ++ ++ rsq=xd**2+yd**2+zd**2 ++ ++ endif ++ ++c test of distance ++ if(rcsq.gt.rsq)then ++ ++c test for excluded atom ++ ++ linc=.true. ++ do ixl=1,nexatm(ik) ++ ++ if(lexatm(ik,ixl).eq.j) linc=.false. ++ ++ enddo ++ ++ if(linc)then ++ ++ lentry(ik)=lentry(ik)+1 ++ ++ if(lentry(ik).gt.mxlist)then ++ ++ ibig=max(ibig,lentry(ik)) ++ lchk=.false. ++ ++ else ++ ++ list(ik,lentry(ik))=j ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ j=link(j) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ j=lct(jc) ++ i=link(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ ix=ix+1 ++ if(ix.gt.ilx)then ++ ++ ix=1 ++ iy=iy+1 ++ ++ if(iy.gt.ily)then ++ ++ iy=1 ++ iz=iz+1 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ ++ if(.not.lchk)then ++ ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) ' mxlist must be >= ',ibig ++ write(nrite,*) ' mxlist is currenty ',mxlist ++ endif ++ call error(idnode,106) ++ ++ endif ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (uxx,uyy,uzz,stat=fail) ++ ++ return ++ end subroutine parlink ++ ++ subroutine parneulst(newlst,lneut,nneut,idnode,mxnode,imcon, ++ x rcut,delr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on the brode-ahlrichs scheme ++c frozen atoms taken into account ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - t.forester april 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst,lneut,safe,lfrzi ++ integer nneut,idnode,mxnode,imcon,idum,fail,mpm2,npm2,ibig ++ integer i,ill,ia,im,jmlast,jmwrap,nuei1,nuei2,ii,jm1,jm,jj0,jj2 ++ integer j,ii1 ++ real(8) rcut,delr,rclim,fi,rrr,rcl1 ++ ++ logical, allocatable :: lms(:) ++ dimension fi(3) ++ ++ data fail/0/ ++ ++C DIR$ CACHE_ALIGN fi ++ ++c allocate work arrays ++ ++ allocate (lms(mxneut),stat=fail) ++ if(fail.ne.0)call error(idnode,1910) ++ ++ if(newlst.and.lneut)then ++ ++c set control variables ++ ++ safe=.true. ++ lchk= .true. ++ mpm2=(nneut+2)/2 ++ npm2=(nneut+1)/2 ++ ++c set cutoff radius ++ ++ rcl1=(rcut+delr) ++ rclim=(rcut+delr)**2 ++ ibig=0 ++ ill=0 ++ ++c construct pair force neighbour list: neutral groups ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ ++ enddo ++ ++ ++c outer loop over groups ++ ++ ia=0 ++ ++ do im=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ if(im.ge.mpm2) mpm2=npm2 ++ ++ lms(1)=.false. ++ do j=2,mpm2 ++ lms(j)=.true. ++ enddo ++ ++ jmlast=min(nneut,im+mpm2-1) ++ jmwrap=max(0,im+mpm2-1-nneut) ++ ++c loop over atomic pairs ++ ++ nuei1=neulst(im) ++ nuei2=neulst(im+1)-1 ++ ++ do i=nuei1,nuei2 ++ ++ fi(1)=xxx(i) ++ fi(2)=yyy(i) ++ fi(3)=zzz(i) ++ lfrzi=(lstfrz(i).eq.0) ++ ++ ii=0 ++ jm1=1 ++ do jm=im+1,jmlast ++ ++ jm1=jm1+1 ++ if(lms(jm1))then ++ ++ jj0=neulst(jm) ++ jj2=neulst(jm+1)-1 ++ ++ do j=jj0,jj2 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ ++ xdf(ii)=fi(1)-xxx(j) ++ ydf(ii)=fi(2)-yyy(j) ++ zdf(ii)=fi(3)-zzz(j) ++ ++ else ++ ++ ibig=max(ibig,ii) ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ do jm=1,jmwrap ++ ++ jm1=jm1+1 ++ if(lms(jm1))then ++ ++ jj0=neulst(jm) ++ jj2=neulst(jm+1)-1 ++ ++ do j=jj0,jj2 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ ++ xdf(ii)=fi(1)-xxx(j) ++ ydf(ii)=fi(2)-yyy(j) ++ zdf(ii)=fi(3)-zzz(j) ++ ++ else ++ ++ safe=.false. ++ ibig=max(ibig,ii) ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c apply minimum image convention ++ ++ ii1=min(ii,mxxdf) ++ call images(imcon,0,1,ii1,cell,xdf,ydf,zdf) ++ ++c search for those in cutoff ++ ++ ii=0 ++ jm1=1 ++ do jm=im+1,jmlast ++ ++ jm1=jm1+1 ++ if(lms(jm1))then ++ ++ jj0=neulst(jm) ++ jj2=neulst(jm+1)-1 ++ ++ do j=jj0,jj2 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ ++ if(lms(jm1))then ++ ++ if(lfrzi)then ++ if(abs(zdf(ii)).lt.rcl1)then ++ if(abs(ydf(ii)).lt.rcl1)then ++ if(abs(xdf(ii)).lt.rcl1)then ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ if(rrr.lt.rclim) lms(jm1)=.false. ++ endif ++ endif ++ endif ++ ++ elseif(lstfrz(j).eq.0)then ++ if(abs(zdf(ii)).lt.rcl1)then ++ if(abs(ydf(ii)).lt.rcl1)then ++ if(abs(xdf(ii)).lt.rcl1)then ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ if(rrr.lt.rclim) lms(jm1)=.false. ++ endif ++ endif ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ do jm=1,jmwrap ++ ++ jm1=jm1+1 ++ if(lms(jm1))then ++ ++ jj0=neulst(jm) ++ jj2=neulst(jm+1)-1 ++ ++ do j=jj0,jj2 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ ++ if(lms(jm1))then ++ ++ if(lfrzi)then ++ ++ if(abs(zdf(ii)).lt.rcl1)then ++ if(abs(ydf(ii)).lt.rcl1)then ++ if(abs(xdf(ii)).lt.rcl1)then ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ if(rrr.lt.rclim) lms(jm1)=.false. ++ endif ++ endif ++ endif ++ ++ elseif(lstfrz(j).eq.0)then ++ ++ if(abs(zdf(ii)).lt.rcl1)then ++ if(abs(ydf(ii)).lt.rcl1)then ++ if(abs(xdf(ii)).lt.rcl1)then ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ if(rrr.lt.rclim) lms(jm1)=.false. ++ endif ++ endif ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c compile neighbour list for ia ++c with running check of neighbour list array capacity ++ ++ jm1=0 ++ do jm=im,jmlast ++ ++ jm1=jm1+1 ++ if(.not.lms(jm1))then ++ ++ lentry(ia)=lentry(ia)+1 ++ if(lentry(ia).le.mxlist)then ++ ++ list(ia,lentry(ia))=jm ++ ++ else ++ ++ ill=max(ill,lentry(ia)) ++ lchk=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ do jm=1,jmwrap ++ ++ jm1=jm1+1 ++ if(.not.lms(jm1))then ++ ++ lentry(ia)=lentry(ia)+1 ++ if(lentry(ia).le.mxlist)then ++ ++ list(ia,lentry(ia))=jm ++ ++ else ++ ++ ill=max(ill,lentry(ia)) ++ lchk=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ if(.not.lchk)then ++ ++ call gimax(ill,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) ' mxlist must be at least ',ill ++ write(nrite,*) ' mxlist is currently ',mxlist ++ endif ++ call error(idnode,108) ++ ++ endif ++ ++c terminate job if work arrays exceeded ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*)'mxxdf must be at least ',ibig ++ write(nrite,*)'mxxdf is currently ',mxxdf ++ endif ++ call error(idnode,476) ++ endif ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(lms,stat=fail) ++ ++ return ++ end subroutine parneulst ++ ++ subroutine parlinkneu ++ x (newlst,natms,nneut,idnode,mxnode,imcon,rcut,delr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on link-cell method with neutral groups ++c frozen atoms taken into account ++c ++c to be used with the link version of exclude :excludeneu_link ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1996 ++c author - t. forester january 1996. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst,linc,newjob,lfrzi,ldo,swop ++ integer natms,nneut,idnode,mxnode,imcon,idum,fail,ibig ++ integer nix,niy,niz,i,irat,nsbcll,ilx,ily,ilz,ncells,ix,iy,iz ++ integer icell,j,ic,ii,kc,jx,jy,jz,jc,ineu,ik,jneu,ineua,jneua ++ integer ika,jneua1,i1,j1 ++ real(8) rcut,delr,rcsq,xm,ym,zm,det,xdc,ydc,zdc,tx,ty,tz ++ real(8) cx,cy,cz,sxd,syd,szd,rsq,xd,yd,zd ++ ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ ++ dimension nix(14),niy(14),niz(14) ++ ++ save newjob ++ ++ data newjob/.true./ ++ data nix/0,1,0,0,-1,1,0,-1,1,0,-1,1,-1,1/ ++ data niy/ 0,0,1,0,1,1,-1,0,0,1,-1,-1,1,1/ ++ data niz/0,0,0,1,0,0,1,1,1,1,1,1,1,1/ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1900) ++ ++ lchk=.true. ++ ibig=0 ++ if(newlst)then ++ ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x call error(idnode,300) ++ ++c zero link arrays ++ ++ do i=1,natms ++ ++ link(i)=0 ++ ++ enddo ++ ++c construct pair force neighbour list ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ ++ enddo ++ ++c real space cut off ++ ++ rcsq=(rcut+delr)**2 ++c ++c create mock cell vector for non-periodic system ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++c find maximum x,y,z postions ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ ++ do i=1,natms ++ ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ ++ enddo ++ ++ if(imcon.eq.0)then ++ ++ cell(1)=max(2.d0*xm+rcut+delr,3.d0*(rcut+delr)) ++ cell(5)=max(2.d0*ym+rcut+delr,3.d0*(rcut+delr)) ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ ++ endif ++ ++ cell(9)=max(2.d0*zm+rcut+delr,3.d0*(rcut+delr),cell(9)) ++ ++ endif ++ ++ call dcell(cell,celprp) ++ call invert(cell,rcell,det) ++ ++c ratio of link cell length to cut off diameter ++ ++ irat=1 ++ ++c number of subcells ++ ++ nsbcll=14 ++ ++ ilx=int(celprp(7)*dble(irat)/(rcut+delr)) ++ ily=int(celprp(8)*dble(irat)/(rcut+delr)) ++ ilz=int(celprp(9)*dble(irat)/(rcut+delr)) ++c ++c check there are enough link cells ++ ++ linc=.false. ++ if(ilx.lt.2*irat+1) linc=.true. ++ if(ily.lt.2*irat+1) linc=.true. ++ if(ilz.lt.2*irat+1) linc=.true. ++ if(linc) call error(idnode,305) ++ ++ ncells=ilx*ily*ilz ++ if(ncells.gt.mxcell)then ++ ++ if(idnode.eq.0) write(nrite,*) 'mxcell must be >= ',ncells ++ call error(idnode,392) ++ ++ endif ++ ++c calculate link cell indices ++ ++ do i=1,ncells ++ ++ lct(i)=0 ++ ++ enddo ++ ++c link-cell cutoff for reduced space ++ ++ xdc=dble(ilx) ++ ydc=dble(ily) ++ zdc=dble(ilz) ++ ++c reduced space coordinates ++ if(newjob)then ++ ++ newjob=.false. ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++ if(mxnode.gt.1) call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ do i=1,natms ++ ++ tx=xxx(i) ++ ty=yyy(i) ++ tz=zzz(i) ++ ++ uxx(i)=(rcell(1)*tx+rcell(4)*ty+rcell(7)*tz)+0.5d0 ++ uyy(i)=(rcell(2)*tx+rcell(5)*ty+rcell(8)*tz)+0.5d0 ++ uzz(i)=(rcell(3)*tx+rcell(6)*ty+rcell(9)*tz)+0.5d0 ++ ++ enddo ++ ++c link neighbours ++ ++ do i=1,natms ++ ++ ix=min(int(xdc*uxx(i)),ilx-1) ++ iy=min(int(ydc*uyy(i)),ily-1) ++ iz=min(int(zdc*uzz(i)),ilz-1) ++ ++ icell=1+ix+ilx*(iy+ily*iz) ++ ++ j=lct(icell) ++ lct(icell)=i ++ link(i)=j ++ ++ enddo ++ ++c set control variables for loop over subcells ++ ++ ix=1 ++ iy=1 ++ iz=1 ++ ++c primary loop over subcells ++ ++ do ic=1,ncells ++ ++ ii=lct(ic) ++ if(ii.gt.0)then ++ ++c secondary loop over subcells ++ ++ do kc=1,nsbcll ++ ++ i=ii ++ ++ cx=0.d0 ++ cy=0.d0 ++ cz=0.d0 ++ jx=ix+nix(kc) ++ jy=iy+niy(kc) ++ jz=iz+niz(kc) ++ ++c minimum image convention ++ ++ if(jx.gt.ilx)then ++ ++ jx=jx-ilx ++ cx=1.d0 ++ ++ elseif(jx.lt.1)then ++ ++ jx=jx+ilx ++ cx=-1.d0 ++ ++ endif ++ ++ if(jy.gt.ily)then ++ ++ jy=jy-ily ++ cy=1.d0 ++ ++ elseif(jy.lt.1)then ++ ++ jy=jy+ily ++ cy=-1.d0 ++ ++ endif ++ ++ if(jz.gt.ilz)then ++ ++ jz=jz-ilz ++ cz=1.d0 ++ ++ elseif(jz.lt.1)then ++ ++ jz=jz+ilz ++ cz=-1.d0 ++ ++ endif ++ ++c index of neighbouring cell ++ ++ jc=jx+ilx*((jy-1)+ily*(jz-1)) ++ j=lct(jc) ++ ++c ignore if empty ++ ++ if(j.gt.0)then ++ ++ do while(i.ne.0) ++ ++c test if site is of interest to this node ++ ++ ineu=lstneu(i) ++ ik=0 ++ ++c i's group index for this processor ++ ++ if(mod(ineu-1,mxnode).eq.idnode) ++ x ik=((ineu-1)/mxnode)+1 ++ ++c test if i is a frozen atom ++ ++ lfrzi=(lstfrz(i).ne.0) ++ ++ if(ic.eq.jc) j=link(i) ++ if(j.gt.0)then ++ ++ do while(j.ne.0) ++ ++ jneu=lstneu(j) ++ ++c swop tests for switching of group indices, ++c ldo for 'doing' interaction ++ ++ swop=.false. ++ ldo=(ik.gt.0) ++ jneua=jneu ++ ineua=ineu ++ ika=ik ++ ++c keep only Brode-Ahlrichs pairs ++ ++ if(jneua.ge.ineua)then ++ ++ if(jneua-ineua.gt.nneut/2)then ++ ++ swop=(mod(jneu-1,mxnode).eq.idnode) ++ if(swop)then ++ ldo=((nneut+ineua-jneua).le.(nneut-1)/2) ++ else ++ ldo=.false. ++ endif ++ ++ endif ++ ++ elseif(nneut+jneua-ineua.gt.(nneut-1)/2)then ++ ++ swop=(mod(jneu-1,mxnode).eq.idnode) ++ if(swop)then ++ ldo=((ineua-jneua).le.nneut/2) ++ else ++ ldo=.false. ++ endif ++ ++ endif ++ ++ if(swop.and.ldo)then ++ jneua=ineu ++ ineua=jneu ++ ika=((jneu-1)/mxnode)+1 ++ endif ++ ++c test of frozen atom pairs ++ ++ if(lfrzi.and.ldo)ldo=(lstfrz(j).eq.0) ++ ++c check we haven't already included this group in the list ... ++ ++ jneua1=0 ++ do while ++ x (ldo.and.jneua1.lt.min(lentry(ika),mxlist)) ++ ++ jneua1=jneua1+1 ++ if(list(ika,jneua1).eq.jneua) ldo=.false. ++ ++ enddo ++ ++ if(ldo)then ++ ++c distance in real space : minimum image applied ++ ++ sxd=uxx(j)-uxx(i)+cx ++ syd=uyy(j)-uyy(i)+cy ++ szd=uzz(j)-uzz(i)+cz ++ ++ xd=cell(1)*sxd+cell(4)*syd+cell(7)*szd ++ yd=cell(2)*sxd+cell(5)*syd+cell(8)*szd ++ zd=cell(3)*sxd+cell(6)*syd+cell(9)*szd ++ ++ rsq=xd*xd+yd*yd+zd*zd ++ ++c test of distance ++ ++ if(rsq.lt.rcsq)then ++ ++ lentry(ika)=lentry(ika)+1 ++ if(lentry(ika).gt.mxlist)then ++ ++ ibig=max(ibig,lentry(ika)) ++ lchk=.false. ++ ++ else ++ ++ list(ika,lentry(ika))=jneua ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ j=link(j) ++ ++ enddo ++ ++ endif ++ ++ j=lct(jc) ++ i=link(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ ix=ix+1 ++ if(ix.gt.ilx)then ++ ++ ix=1 ++ iy=iy+1 ++ ++ if(iy.gt.ily)then ++ ++ iy=1 ++ iz=iz+1 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ ++ if(.not.lchk)then ++ ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*)'mxlist must be at least ',ibig ++ write(nrite,*)'mxlist is currently ',mxlist ++ endif ++ call error(idnode,107) ++ ++ endif ++ ++c sort list into order .. ++c use link as a work array ++ ++ ik=0 ++ do i=1+idnode,nneut,mxnode ++ ++ ik=ik+1 ++ do j=1,lentry(ik) ++ ++ link(j)=list(ik,j) ++ ++ enddo ++ call shellsort(lentry(ik),link) ++ ++c ensure Brode-Ahlrichs ordering ++ ++ i1=lentry(ik)+1 ++ j1=0 ++ do j=1,lentry(ik) ++ ++ if(link(j).ge.i)then ++ ++ j1=j1+1 ++ list(ik,j1)=link(j) ++ i1=min(i1,j) ++ ++ endif ++ ++ enddo ++ ++ do j=1,i1-1 ++ ++ j1=j1+1 ++ list(ik,j1)=link(j) ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (uxx,uyy,uzz,stat=fail) ++ ++ return ++ end subroutine parlinkneu ++ ++ subroutine parlst_nsq ++ x (newlst,natms,idnode,mxnode,imcon,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on the brode-ahlrichs scheme ++c frozen atom option included ++c ++c to be used with multiple_nsq ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c adapted - w.smith aug 2008 - solvation, excitation etc ++c ++c stress tensor : t.forester may 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst ++ integer natms,idnode,mxnode,imcon,ibig,i,last,mpm2 ++ integer npm2,m,ii,j,idum ++ real(8) rcut,rclim,rsq,rrr ++ ++ if(newlst)then ++ ++ ibig=0 ++ ++c check size of work array ++ ++ if(mxxdf.lt.(natms+1)/2)then ++ if(idnode.eq.0) write(nrite,*) 'mxxdf must be greater than ', ++ x (natms+1)/2 ++ call error(idnode,475) ++ endif ++ ++c set control variables ++ ++ last=natms ++ lchk=.true. ++ mpm2=natms/2 ++ npm2=(natms-1)/2 ++ ++c set cutoff radius - ignore border width ++ ++ rclim=(rcut)**2 ++ ++c construct pair force neighbour list ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ noxatm(i)=1 ++ ++ enddo ++ ++c outer loop over atoms ++ ++ do m=1,mpm2 ++ ++ if(m.gt.npm2)last=mpm2 ++ ++c inner loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++c calculate interatomic displacements ++ ++ ii=ii+1 ++ xdf(ii)=xxx(i)-xxx(j) ++ ydf(ii)=yyy(i)-yyy(j) ++ zdf(ii)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c apply minimum image convention ++ ++ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) ++ ++c allocate atoms to neighbour list ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ ii=ii+1 ++ if((nexatm(ii).gt.0).and.(lexatm(ii,noxatm(ii)).eq.j)) ++ x then ++ ++ noxatm(ii)=min(noxatm(ii)+1,nexatm(ii)) ++ ++ elseif(lstfrz(i).eq.0.or.lstfrz(j).eq.0)then ++ ++c reject frozen atoms and calculate interatomic distance ++ ++ rsq=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ ++c running check of neighbour list array capacity ++ ++ if(rsq.lt.rclim)then ++ ++ lentry(ii)=lentry(ii)+1 ++ ++ if(lentry(ii).gt.mxlist)then ++ ++ ibig=max(ibig,lentry(ii)) ++ lchk=.false. ++ ++ endif ++ ++c compile neighbour list array ++ ++ if(lchk)then ++ ++ list(ii,lentry(ii))=j ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ ++ if(.not.lchk)then ++ ++ call gisum(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) ' mxlist must be >= ',ibig ++ write(nrite,*) ' mxlist is currenty ',mxlist ++ endif ++ call error(idnode,109) ++ ++ endif ++ ++c check all excluded atoms are accounted for ++ ++ do i=1,ii ++ ++ if(nexatm(i).gt.0.and.noxatm(i).ne.nexatm(i))lchk=.false. ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ ++ if(.not.lchk) call error(idnode,160) ++ ++ endif ++ ++ return ++ end subroutine parlst_nsq ++ ++ subroutine primlst(idnode,mxnode,natms,imcon,rprim) ++ ++c********************************************************************* ++c ++c dlpoly routine to split interaction list into primary and ++c secondary neighbours for use with multiple timestep method ++c ++c copyright daresbury laboratory ++c author - t. forester february 1993 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,imcon,ii,k,j,i ++ real(8) rprim,rprim2,rsq ++ ++ rprim2=rprim*rprim ++ ii=0 ++ ++ do i=1+idnode,natms,mxnode ++ ++ ii=ii+1 ++ ++ do j=1,lentry(ii) ++ ++ k=iabs(list(ii,j)) ++ xdf(j)=xxx(i)-xxx(k) ++ ydf(j)=yyy(i)-yyy(k) ++ zdf(j)=zzz(i)-zzz(k) ++ ++ enddo ++ ++c apply minimum image convention ++ ++ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) ++ ++c assign atoms as primary or secondary ++ ++ ++ do j=1,lentry(ii) ++ ++c calculate interatomic distance ++ ++ rsq=xdf(j)**2+ydf(j)**2+zdf(j)**2 ++ ++ if(rsq.lt.rprim2)then ++ ++c compile primary neighbour list array : -ve indices ++ ++ list(ii,j)=-iabs(list(ii,j)) ++ ++ else ++ ++c compile secondary neighbour list array : +ve indices ++ ++ list(ii,j)=iabs(list(ii,j)) ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine primlst ++ ++ subroutine prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) ++ ++c*********************************************************************** ++c ++c dlpoly routine to partition neutral group list into ++c primary and secondary groups ++c loops over group ineu ++c ++c replicated data version ++c ++c copyright daresbury laboratory 1994 ++c author t.forester april 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newlst,lchk,ldo ++ integer imcon,idnode,mxnode,nneut,ineu,ia,jj,ibig,ii ++ integer jj0,jneu,j,i,idum ++ real(8) rprim,rclim,xi,yi,zi,rrr ++ ++ lchk=.true. ++ ++ if(newlst)then ++ ++c set primary cutoff limit ++ ++ rclim=rprim*rprim ++ ++c set list to negative - signal for seconary shell ++ ++ ia=0 ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++ do jj=1,lentry(ia) ++ ++ list(ia,jj)=-abs(list(ia,jj)) ++ ++ enddo ++ ++ enddo ++ ++c loop over neutral group ineu sites ++ ++ lchk=.true. ++ ibig=0 ++ ++ ia=0 ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++ ii=0 ++ do i=neulst(ineu),neulst(ineu+1)-1 ++ ++ xi=xxx(i) ++ yi=yyy(i) ++ zi=zzz(i) ++ ++ do jj=1,lentry(ia) ++ ++ jneu=-list(ia,jj) ++ jj0=neulst(jneu) ++ ++ if(ineu.eq.jneu) jj0=i+1 ++ ++c loop over jneu sites ++ ++ do j=jj0,neulst(jneu+1)-1 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ xdf(ii)=xi-xxx(j) ++ ydf(ii)=yi-yyy(j) ++ zdf(ii)=zi-zzz(j) ++ else ++ lchk=.false. ++ ibig=ii ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c apply minimum image convention ++ ++ ii=min(ii,mxxdf) ++ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) ++ ++c allocate groups to primary or secondary shell ++c on basis of closest atom-atom interactions ++ ++ ii=0 ++ do i=neulst(ineu),neulst(ineu+1)-1 ++ ++ do jj=1,lentry(ia) ++ ++ jneu=list(ia,jj) ++ ldo=(jneu.lt.0) ++ if(ldo)then ++ jneu=-jneu ++ jj0=neulst(jneu) ++ if(ineu.eq.jneu) jj0=i+1 ++ ++c loop over jneu sites ++ ++ do j=jj0,neulst(jneu+1)-1 ++ ++ if(ldo)then ++ ++ ii=min(ii+1,mxxdf) ++ ++ if(abs(xdf(ii)).lt.rprim)then ++ if(abs(ydf(ii)).lt.rprim)then ++ if(abs(zdf(ii)).lt.rprim)then ++ ++c calculate interatomic distance ++ ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ ++c put in primary list if found any interaction close enough ++ ++ if(rrr.le.rclim)then ++ ldo=.false. ++ list(ia,jj)=jneu ++ endif ++ ++ endif ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ if(.not.lchk)then ++ ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) 'mxxdf must be at least ',ibig ++ write(nrite,*) 'mxxdf is currently ',mxxdf ++ endif ++ call error(idnode,477) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine prneulst ++ ++ subroutine vertest(newlst,idnode,mxnode,natms,delr,tstep) ++ ++c********************************************************************* ++c ++c DL_POLY subroutime to test for updating of Verlet list ++c replicated data version ++c ++c copyright daresbury laboratory 1993 ++c author - t. forester may 1993 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,newjob ++ integer idnode,mxnode,natms,i,j,k,moved,ibuff,fail ++ real(8) rmax,dr,delr,tstep ++ ++ real(8), allocatable :: xold(:),yold(:),zold(:) ++ ++ save newjob,xold,yold,zold ++ ++ data newjob/.true./,fail/0/ ++ ++ if((natms+mxnode-1)/mxnode.gt.msatms) call error(idnode,112) ++ ++ if(newjob)then ++ ++c set up initial arrays ++ ++ allocate (xold(msatms),yold(msatms),zold(msatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1930) ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xold(j)=0.d0 ++ yold(j)=0.d0 ++ zold(j)=0.d0 ++ ++ enddo ++ ++ newjob=.false. ++ newlst=.true. ++ ++ else ++ ++c integrate velocities ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xold(j)=xold(j)+vxx(i) ++ yold(j)=yold(j)+vyy(i) ++ zold(j)=zold(j)+vzz(i) ++ ++ enddo ++ ++c maximum displacement ++ ++ rmax=(delr/2.d0)**2 ++ ++c test atomic displacements ++ ++ moved=0 ++ ++ do k=1,j ++ ++ dr=tstep**2*(xold(k)**2+yold(k)**2+zold(k)**2) ++ if(dr.gt.rmax) moved=moved+1 ++ ++ enddo ++ ++c global sum of moved atoms ++ ++ if(mxnode.gt.1) call gisum(moved,1,ibuff) ++ ++c test for new verlet list ++ ++ newlst=(moved.ge.2) ++ ++c update stored positions ++ ++ if(newlst)then ++ ++ do k=1,j ++ ++ xold(k)=0.d0 ++ yold(k)=0.d0 ++ zold(k)=0.d0 ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine vertest ++ ++ subroutine vertest2(newlst,idnode,mxnode,natms,imcon,delr,tstep) ++ ++c********************************************************************* ++c ++c DL_POLY subroutime to test for updating of Verlet list ++c replicated data version (version 2) ++c ++c copyright daresbury laboratory ++c author - w.smith 2007 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,newjob ++ integer idnode,mxnode,natms,imcon,i,j,k,moved,ibuff,fail ++ real(8) rmax,dr,delr,tstep ++ ++ real(8), allocatable :: xold(:),yold(:),zold(:) ++ real(8), allocatable :: xdif(:),ydif(:),zdif(:) ++ ++ save newjob,xold,yold,zold ++ ++ data newjob/.true./,fail/0/ ++ ++ if((natms+mxnode-1)/mxnode.gt.msatms) call error(idnode,112) ++ ++c set up initial arrays ++ ++ allocate (xdif(msatms),ydif(msatms),zdif(msatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1930) ++ ++ if(newjob)then ++ ++ allocate (xold(msatms),yold(msatms),zold(msatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1930) ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xold(j)=xxx(i) ++ yold(j)=yyy(i) ++ zold(j)=zzz(i) ++ ++ enddo ++ ++ newjob=.false. ++ newlst=.true. ++ ++ else ++ ++c calculate atomic shifts ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xdif(j)=xxx(i)-xold(j) ++ ydif(j)=yyy(i)-yold(j) ++ zdif(j)=zzz(i)-zold(j) ++ ++ enddo ++ ++c minimum image calculation ++ ++ call images(imcon,0,1,j,cell,xdif,ydif,zdif) ++ ++c maximum displacement ++ ++ rmax=(delr/2.d0)**2 ++ ++c test atomic displacements ++ ++ moved=0 ++ ++ do k=1,j ++ ++ dr=(xdif(k)**2+ydif(k)**2+zdif(k)**2) ++ if(dr.gt.rmax)moved=moved+1 ++ ++ enddo ++ ++c global sum of moved atoms ++ ++ if(mxnode.gt.1) call gisum(moved,1,ibuff) ++ ++c test for new verlet list ++ ++ newlst=(moved.ge.2) ++ ++c update stored positions ++ ++ if(newlst)then ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xold(j)=xxx(i) ++ yold(j)=yyy(i) ++ zold(j)=zzz(i) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c deallocate arrays ++ ++ deallocate(xdif,ydif,zdif,stat=fail) ++ ++ return ++ end subroutine vertest2 ++ ++ end module nlist_builders_module +diff -urN dl_class_1.9.orig/srcmod/optimiser_module.f dl_class_1.9/srcmod/optimiser_module.f +--- dl_class_1.9.orig/srcmod/optimiser_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/optimiser_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1144 @@ ++ module optimiser_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining structural optimiser routines ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: ggx(:),ggy(:),ggz(:) ++ real(8), allocatable :: hhx(:),hhy(:),hhz(:) ++ real(8), allocatable :: oxx(:),oyy(:),ozz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ ++ save hhx,hhy,hhz ++ ++ contains ++ ++ subroutine optimisation_selector ++ x (loptim,stropt,lzero,idnode,mxnode,natms,imcon,ntcons, ++ x nscons,ngrp,ntfree,keystr,keytol,engcfg,tstep,opttol) ++ ++c*********************************************************************** ++c ++c dl_poly routine for selecting and running a nominated ++c structure optimisation algorithm using energy minimisation ++c ++c copyright - daresbury laboratory ++c author - w. smith june 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical loptim,stropt,lzero ++ integer idnode,mxnode,natms,imcon,nscons,ngrp,ntfree,keystr ++ integer keytol,ntcons ++ real(8) engcfg,tstep,opttol,hnorm,grad0,grad1,ff1,sgn ++ ++ save grad0,grad1,ff1,sgn,hnorm ++ ++ stropt=.false. ++ ++ if(loptim)then ++ ++c conjugate gradient structure optimisation ++ ++ call strucopt ++ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++ else if(lzero)then ++ ++c zero kelvin structure optimisation ++ ++ call zero_kelvin ++ x (stropt,idnode,mxnode,imcon,natms,ngrp,ntfree,opttol) ++ ++ endif ++ ++ return ++ end subroutine optimisation_selector ++ ++ subroutine zero_kelvin ++ x (stropt,idnode,mxnode,imcon,natms,ngrp,ntfree,opttol) ++ ++c*********************************************************************** ++c ++c dl_poly routine for zero Kelvin temperature optimization ++c if velocity.Force < 0 then velocity is set to zero in ++c preparation for integration of equations of motion ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1994 ++c author t.forester march 1994 ++c amended t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical stropt ++ integer idnode,mxnode,imcon,natms,ngrp,ntfree,fail,i ++ integer iatm0,iatm1,igrp1,igrp2,ifre1,ifre2,jr,ig,j,id ++ real(8) dot,fsq,fcomx,fcomy,fcomz,trx,try,trz,tax,tay,taz ++ real(8) rot,ggg,opttol ++ ++ dimension rot(9) ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1920) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c check for convergence of forces ++ ++ ggg=0.d0 ++ do i=iatm0,iatm1 ++ ggg=ggg+fxx(i)**2+fyy(i)**2+fzz(i)**2 ++ enddo ++ ++ if(mxnode.gt.1)then ++ buffer(1)=ggg ++ call gdsum(buffer(1),1,buffer(2)) ++ ggg=buffer(1) ++ endif ++ ++c check convergence condition for forces ++ ++ if(opttol.ge.abs(ggg)/dble(natms))then ++ ++ stropt=.true. ++ return ++ ++ endif ++ ++ if(ngrp.eq.0) then ++ ++c take component of velocity in direction of force ++ ++ do i=iatm0,iatm1 ++ ++ dot=vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ if(dot.lt.0.d0) then ++ ++ vxx(i)=0.d0 ++ vyy(i)=0.d0 ++ vzz(i)=0.d0 ++ ++ else ++ ++c take component of velocity in direction of force ++ ++ fsq=(fxx(i)**2+fyy(i)**2+fzz(i)**2) ++ fsq=dot/max(1.d-10,fsq) ++ vxx(i)=fxx(i)*fsq ++ vyy(i)=fyy(i)*fsq ++ vzz(i)=fzz(i)*fsq ++ ++ endif ++ ++ enddo ++ ++ else ++ ++c block indices for groups and free atoms ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++ do j=ifre1,ifre2 ++ ++c reset atomic velocities ++ ++ i=lstfre(j) ++ ++ dot=vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ if(dot.lt.0.d0) then ++ ++ vxx(i)=0.d0 ++ vyy(i)=0.d0 ++ vzz(i)=0.d0 ++ ++ else ++ ++c take component of velocity in direction of force ++ ++ fsq=(fxx(i)**2+fyy(i)**2+fzz(i)**2) ++ fsq=dot/max(1.d-10,fsq) ++ vxx(i)=fxx(i)*fsq ++ vyy(i)=fyy(i)*fsq ++ vzz(i)=fzz(i)*fsq ++ ++ endif ++ ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c reset rigid body velocites (linear and angular) ++ ++ fcomx=0.d0 ++ fcomy=0.d0 ++ fcomz=0.d0 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c forces on com ++ ++ fcomx=fcomx+fxx(i) ++ fcomy=fcomy+fyy(i) ++ fcomz=fcomz+fzz(i) ++ ++ enddo ++ ++ dot=gvxx(ig)*fcomx+gvyy(ig)*fcomy+gvzz(ig)*fcomz ++ if(dot.lt.0.d0) then ++ ++ gvxx(ig)=0.d0 ++ gvyy(ig)=0.d0 ++ gvzz(ig)=0.d0 ++ ++ else ++ ++c take component of velocity in direction of force ++ ++ fsq=(fcomx**2+fcomy**2+fcomz**2) ++ fsq=dot/max(1.d-10,fsq) ++ gvxx(ig)=fcomx*fsq ++ gvyy(ig)=fcomy*fsq ++ gvzz(ig)=fcomz*fsq ++ ++ endif ++ ++ enddo ++ ++c site to com distances ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ do j=1,numgsit(lstgtp(ig)) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxt(jr)=xxx(i)-gcmx(ig) ++ yyt(jr)=yyy(i)-gcmy(ig) ++ zzt(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) ++ ++c calculate torques in lab frame ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ trx=0.d0 ++ try=0.d0 ++ trz=0.d0 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ trx=trx+yyt(jr)*fzz(i)-zzt(jr)*fyy(i) ++ try=try+zzt(jr)*fxx(i)-xxt(jr)*fzz(i) ++ trz=trz+xxt(jr)*fyy(i)-yyt(jr)*fxx(i) ++ ++ enddo ++ ++ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 ++ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) ++ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) ++ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) ++ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 ++ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) ++ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) ++ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) ++ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 ++ ++c transform to body fixed frame ++ ++ tax=(trx*rot(1)+try*rot(4)+trz*rot(7))*rotinx(id,2) ++ tay=(trx*rot(2)+try*rot(5)+trz*rot(8))*rotiny(id,2) ++ taz=(trx*rot(3)+try*rot(6)+trz*rot(9))*rotinz(id,2) ++ ++ dot=omx(ig)*tax+omy(ig)*tay+omz(ig)*taz ++ if(dot.le.0.d0) then ++ ++ omx(ig)=0.d0 ++ omy(ig)=0.d0 ++ omz(ig)=0.d0 ++ ++ else ++ ++c take component of velocity in direction of torque ++ ++ fsq=(tax**2+tay**2+taz**2) ++ fsq=dot/max(1.d-10,fsq) ++ omx(ig)=tax*fsq ++ omy(ig)=tay*fsq ++ omz(ig)=taz*fsq ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail) ++ ++ return ++ end subroutine zero_kelvin ++ ++ subroutine strucopt ++ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,fnew,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for optimising molecular structures ++c based on conjugate gradient method ++c ++c copyright - daresbury laboratory ++c author - w. smith dec 2005 ++c ++c note. basis of minimisation criterion : ++c keytol=0 : absolute force ++c keytol=1 : absolute energy ++c keytol=2 : absolute displacement ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ ++ logical stropt,newjob,engchk ++ integer keystr,keytol,idnode,mxnode,natms,i,j,k ++ integer iatm0,iatm1,fail,ngrp,ntcons,nscons,jr ++ integer imcon,ig,jf,id,ntfree,igrp1,igrp2,ifre1,ifre2 ++ real(8) hnorm,grad0,grad1,grad2,ff1,stride,tstep,step ++ real(8) ggg,fnew,fff,gam2,sgn,opttol,dischk ++ ++ dimension fail(nnn) ++ ++ save iatm0,iatm1,igrp1,igrp2,engchk,ifre1,ifre2,newjob ++ ++ data newjob/.true./,engchk/.false./ ++ ++c define initial data ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ if(newjob)then ++ allocate(hhx(mxatms),hhy(mxatms),hhz(mxatms),stat=fail(1)) ++ endif ++ allocate(ggx(mxatms),ggy(mxatms),ggz(mxatms),stat=fail(2)) ++ allocate(oxx(mxatms),oyy(mxatms),ozz(mxatms),stat=fail(3)) ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(4)) ++ if(ngrp.gt.0)then ++ ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(6)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ if(ngrp.eq.0) ++ x allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(dxx(mxatms),dyy(mxatms),dzz(mxatms),stat=fail(7)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) ++ ++ endif ++ ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1925) ++ enddo ++ ++ if(newjob)then ++ ++c define atoms for this node ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++ newjob=.false. ++ ++ endif ++ ++c step length for relaxation ++ ++ if(ntcons.gt.0)then ++ step=tstep**2 ++ else ++ step=10.d0*tstep**2 ++ endif ++ ++c current system configuration energy ++ ++ fff=fnew ++ ++c initialise conjugate gradient position arrays ++ ++ do i=1,natms ++ ++ oxx(i)=xxx(i) ++ oyy(i)=yyy(i) ++ ozz(i)=zzz(i) ++ ggx(i)=0.d0 ++ ggy(i)=0.d0 ++ ggz(i)=0.d0 ++ ++ enddo ++ ++c define constraint bonds ++ ++ if(ntcons.gt.0)then ++ ++c calculate constraint bond vector ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c calculate pseudo forces for constraint bonds ++ ++ call pseudo_shake(nscons,natms,mxnode,fff) ++ ++ do i=1,natms ++ ++ ggx(i)=fxx(i)+ggx(i) ++ ggy(i)=fyy(i)+ggy(i) ++ ggz(i)=fzz(i)+ggz(i) ++ ++ enddo ++ ++ else ++ ++ do i=1,natms ++ ++ ggx(i)=fxx(i) ++ ggy(i)=fyy(i) ++ ggz(i)=fzz(i) ++ ++ enddo ++ ++ endif ++ ++c calculate pseudo forces for rigid bodies ++ ++ if(ngrp.gt.0)call torque_split ++ x (ngrp,idnode,mxnode,imcon,ggx,ggy,ggz,txx,tyy,tzz, ++ x uxx,uyy,uzz,dtx,dty,dtz) ++ ++c determine magnitude of 3N force vector ++ ++ ggg=0.d0 ++ ++ if(ngrp.eq.0)then ++ ++ do i=iatm0,iatm1 ++ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 ++ enddo ++ ++ else ++ ++ do jf=ifre1,ifre2 ++ ++ i=lstfre(jf) ++ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 ++ ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ buffer(1)=ggg ++ call gdsum(buffer(1),1,buffer(2)) ++ ggg=buffer(1) ++ endif ++ ggg=sqrt(ggg) ++ ++c check convergence condition for forces ++ ++ if(keytol.eq.0.and.opttol.ge.abs(ggg)/dble(natms))stropt=.true. ++ ++ if(keystr.eq.0) then ++ ++c set original search direction ++ ++ ff1=fff ++ hnorm=ggg ++ grad0=ggg ++ grad1=ggg ++ ++ if(ngrp.eq.0)then ++ ++ do i=iatm0,iatm1 ++ ++ hhx(i)=ggx(i) ++ hhy(i)=ggy(i) ++ hhz(i)=ggz(i) ++ oxx(i)=oxx(i)+step*hhx(i) ++ oyy(i)=oyy(i)+step*hhy(i) ++ ozz(i)=ozz(i)+step*hhz(i) ++ ++ enddo ++ ++ else ++ ++ do jf=ifre1,ifre2 ++ ++ i=lstfre(jf) ++ hhx(i)=ggx(i) ++ hhy(i)=ggy(i) ++ hhz(i)=ggz(i) ++ ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ hhx(i)=ggx(i) ++ hhy(i)=ggy(i) ++ hhz(i)=ggz(i) ++ ++ enddo ++ ++ enddo ++ ++ call turn_rigid_body ++ x (igrp1,igrp2,ifre1,ifre2,step,hhx,hhy,hhz, ++ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) ++ ++ endif ++ ++ keystr=1 ++ sgn=1.d0 ++ ++ elseif(keystr.eq.1)then ++ ++c check convergence condition for energy ++ ++ if(engchk.and.keytol.eq.1.and. ++ x opttol.ge.abs(fff-ff1))stropt=.true. ++ engchk=.false. ++ ++c line search along chosen direction ++ ++ ff1=fff ++ grad2=grad1 ++ grad1=0.d0 ++ do i=iatm0,iatm1 ++ grad1=grad1+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) ++ enddo ++ if(mxnode.gt.1)then ++ buffer(1)=grad1 ++ call gdsum(buffer(1),1,buffer(2)) ++ grad1=buffer(1) ++ endif ++ grad1=sgn*grad1/hnorm ++ ++c linear extrapolation to minimum ++ ++ stride=sgn*step ++ if(grad1.lt.0.d0)then ++ ++ keystr=2 ++ stride=sgn*step*grad1/(grad2-grad1) ++ ++ endif ++ ++ if(ngrp.eq.0)then ++ ++ do i=iatm0,iatm1 ++ ++ oxx(i)=oxx(i)+stride*hhx(i) ++ oyy(i)=oyy(i)+stride*hhy(i) ++ ozz(i)=ozz(i)+stride*hhz(i) ++ ++ enddo ++ ++ else ++ ++ call turn_rigid_body ++ x (igrp1,igrp2,ifre1,ifre2,stride,hhx,hhy,hhz, ++ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) ++ ++ endif ++ ++ elseif(keystr.eq.2)then ++ ++c construct conjugate search vector ++ ++ ff1=fff ++ gam2=(ggg/grad0)**2 ++ hnorm=0.d0 ++ grad0=ggg ++ grad1=0.d0 ++ do i=iatm0,iatm1 ++ ++ hhx(i)=ggx(i)+gam2*hhx(i) ++ hhy(i)=ggy(i)+gam2*hhy(i) ++ hhz(i)=ggz(i)+gam2*hhz(i) ++ hnorm=hnorm+hhx(i)**2+hhy(i)**2+hhz(i)**2 ++ grad1=grad1+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) ++ ++ enddo ++ if(mxnode.gt.1)then ++ ++ buffer(1)=hnorm ++ buffer(2)=grad1 ++ call gdsum(buffer(1),2,buffer(3)) ++ hnorm=buffer(1) ++ grad1=buffer(2) ++ ++ endif ++ hnorm=sqrt(hnorm) ++ grad1=grad1/hnorm ++ sgn=sign(1.d0,grad1) ++ grad1=sgn*grad1 ++ stride=sgn*step ++ ++ if(ngrp.eq.0)then ++ ++ do i=iatm0,iatm1 ++ ++ oxx(i)=oxx(i)+stride*hhx(i) ++ oyy(i)=oyy(i)+stride*hhy(i) ++ ozz(i)=ozz(i)+stride*hhz(i) ++ ++ enddo ++ ++ else ++ ++ call turn_rigid_body ++ x (igrp1,igrp2,ifre1,ifre2,stride,hhx,hhy,hhz, ++ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) ++ ++ endif ++ ++ engchk=.true. ++ keystr=1 ++ ++ endif ++ ++c merge coordinate arrays ++ ++ if(mxnode.gt.1)then ++ ++ if(ngrp.eq.0)then ++ ++ call merge ++ x (idnode,mxnode,natms,mxbuff,oxx,oyy,ozz,buffer) ++ ++ else ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,oxx,oyy,ozz,buffer) ++ ++ endif ++ ++ endif ++ ++c reassign atomic positions and calculate max displacement ++ ++ dischk=0.d0 ++ do i=1,natms ++ ++ dischk=max(dischk,(xxx(i)-oxx(i))**2+ ++ x (yyy(i)-oyy(i))**2+(zzz(i)-ozz(i))**2) ++ ++ xxx(i)=oxx(i) ++ yyy(i)=oyy(i) ++ zzz(i)=ozz(i) ++ ++ enddo ++ ++c check convergence condition for position ++ ++ if(keytol.eq.2.and.keystr.gt.0.and. ++ x opttol.ge.sqrt(dischk))stropt=.true. ++ ++c deallocate working arrays ++ ++ deallocate(ggx,ggy,ggz,dtx,dty,dtz,oxx,oyy,ozz,stat=fail(1)) ++ if(ngrp.gt.0)then ++ deallocate(txx,tyy,tzz,uxx,uyy,uzz,stat=fail(2)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(3)) ++ if(ngrp.eq.0)deallocate(txx,tyy,tzz,stat=fail(4)) ++ ++ endif ++ ++ return ++ end subroutine strucopt ++ ++ subroutine pseudo_shake(nscons,natms,mxnode,fff) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine treating rigid bonds as stiff harmonic bonds ++c suitable for conjugate gradient minimisation ++c ++c copyright - daresbury laboratory ++c author - w. smith may 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ real(8), parameter :: harm=1.d6 ++ ++ integer i,j,k,natms,nscons,mxnode ++ real(8) fff,engbnd,dis,rrr,gamma ++ ++c calculate energy and force ++ ++ engbnd=0.d0 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dis=prmcon(listcon(k,1)) ++ rrr=sqrt(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ engbnd=engbnd+0.5d0*harm*(rrr-dis)**2 ++ gamma=harm*(rrr-dis)/rrr ++ ggx(i)=ggx(i)-dxx(k)*gamma ++ ggy(i)=ggy(i)-dyy(k)*gamma ++ ggz(i)=ggz(i)-dzz(k)*gamma ++ ++ ggx(j)=ggx(j)+dxx(k)*gamma ++ ggy(j)=ggy(j)+dyy(k)*gamma ++ ggz(j)=ggz(j)+dzz(k)*gamma ++ ++ enddo ++ ++c global sum of pseudo forces ++ ++ call global_sum_forces(natms,mxnode,ggx,ggy,ggz) ++ if(mxnode.gt.1)then ++ buffer(1)=engbnd ++ call gdsum(buffer(1),1,buffer(2)) ++ engbnd=buffer(1) ++ endif ++ fff=fff+engbnd ++ ++ return ++ end subroutine pseudo_shake ++ ++ subroutine torque_split ++ x (ngrp,idnode,mxnode,imcon,ggx,ggy,ggz,txx,tyy,tzz, ++ x uxx,uyy,uzz,dtx,dty,dtz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for resolving torques into equivalent atomic ++c forces suitable for conjugate gradient minimisation ++c ++c copyright - daresbury laboratory ++c author - w. smith may 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,j,ig,id,jr,jrs,ngrp,igrp1,igrp2,idnode,imcon,mxnode ++ ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,trq,txx,tyy,tzz ++ real(8) ggx,ggy,ggz,tmp,taq,scale ++ real(8) uxx,uyy,uzz,dtx,dty,dtz ++ ++ dimension ggx(mxatms),ggy(mxatms),ggz(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) ++ dimension dtx(mxatms),dty(mxatms),dtz(mxatms) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c calculate centres of mass of rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c working com is first site in group ++ ++ i=lstrgd(jr+1) ++ txx(ig)=xxx(i) ++ tyy(ig)=yyy(i) ++ tzz(ig)=zzz(i) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ uxx(jr)=xxx(i)-txx(ig) ++ uyy(jr)=yyy(i)-tyy(ig) ++ uzz(jr)=zzz(i)-tzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c minimum image from working com ++ ++ call images(imcon,0,1,jr,cell,uxx,uyy,uzz) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=0.d0 ++ gcmy(ig)=0.d0 ++ gcmz(ig)=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ gcmx(ig)=gcmx(ig)+weight(i)*uxx(jr) ++ gcmy(ig)=gcmy(ig)+weight(i)*uyy(jr) ++ gcmz(ig)=gcmz(ig)+weight(i)*uzz(jr) ++ ++ enddo ++ ++c final centre of mass ++ ++ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) ++ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) ++ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) ++ ++ enddo ++ ++c calculate atom displacements from rigid body com ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c resolve rigid body forces and torques to orthogonal atomic basis ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+ggx(i) ++ fmy=fmy+ggy(i) ++ fmz=fmz+ggz(i) ++ ++ enddo ++ fmx=fmx/dble(numgsit(id)) ++ fmy=fmy/dble(numgsit(id)) ++ fmz=fmz/dble(numgsit(id)) ++ ++c calculate torque on rigid body ++ ++ jr=jrs ++ tqx=0.d0 ++ tqy=0.d0 ++ tqz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx=tqx+dty(jr)*ggz(i)-dtz(jr)*ggy(i) ++ tqy=tqy+dtz(jr)*ggx(i)-dtx(jr)*ggz(i) ++ tqz=tqz+dtx(jr)*ggy(i)-dty(jr)*ggx(i) ++ ++ enddo ++ ++c magnitude of torque ++ ++ trq=sqrt(tqx**2+tqy**2+tqz**2) ++ ++c construct unit vectors for new site forces ++ ++ jr=jrs ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ txx(i)=dty(jr)*tqz-tqy*dtz(jr) ++ tyy(i)=dtz(jr)*tqx-tqz*dtx(jr) ++ tzz(i)=dtx(jr)*tqy-tqx*dty(jr) ++ tmp=sqrt(txx(i)**2+tyy(i)**2+tzz(i)**2) ++ if(tmp.gt.1.d-10)then ++ ++ txx(i)=txx(i)/tmp ++ tyy(i)=tyy(i)/tmp ++ tzz(i)=tzz(i)/tmp ++ ++ else ++ ++ txx(i)=0.d0 ++ tyy(i)=0.d0 ++ tzz(i)=0.d0 ++ ++ endif ++ ++ enddo ++ ++c construct unit vectors for site location ++ ++ jr=jrs ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ uxx(i)=(tyy(i)*tqz-tqy*tzz(i))/trq ++ uyy(i)=(tzz(i)*tqx-tqz*txx(i))/trq ++ uzz(i)=(txx(i)*tqy-tqx*tyy(i))/trq ++ ++ enddo ++ ++c scale unit vectors to working lengths ++ ++ jr=jrs ++ taq=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ tmp=dtx(jr)*uxx(i)+dty(jr)*uyy(i)+dtz(jr)*uzz(i) ++ taq=taq+tmp**2 ++ txx(i)=tmp*txx(i) ++ tyy(i)=tmp*tyy(i) ++ tzz(i)=tmp*tzz(i) ++ uxx(i)=tmp*uxx(i) ++ uyy(i)=tmp*uyy(i) ++ uzz(i)=tmp*uzz(i) ++ ++ enddo ++ ++c calculate force scale factor ++ ++ scale=trq/taq ++ ++c final site forces ++ ++ jr=jrs ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ txx(i)=scale*txx(i) ++ tyy(i)=scale*tyy(i) ++ tzz(i)=scale*tzz(i) ++ ggx(i)=fmx ++ ggy(i)=fmy ++ ggz(i)=fmz ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine torque_split ++ ++ subroutine turn_rigid_body ++ x (igrp1,igrp2,ifre1,ifre2,step,hhx,hhy,hhz, ++ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) ++ ++c*********************************************************************** ++c ++c dl_poly routine for updating positions of atoms in a rigid body ++c during a conjugate gradient minimisation ++c ++c copyright daresbury laboratory ++c author w.smith may 2006 ++c ++c note: coz=cos(theta)-1 ++c zin=sin(theta)/theta ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,j,jr,jf,ig,id,igrp1,igrp2,ifre1,ifre2 ++ real(8) step,hhx,hhy,hhz,uxx,uyy,uzz,txx,tyy,tzz ++ real(8) oxx,oyy,ozz,uuu,ttt,the2,coz,zin ++ ++ dimension hhx(mxatms),hhy(mxatms),hhz(mxatms) ++ dimension oxx(mxatms),oyy(mxatms),ozz(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) ++ ++c update free atom positions ++ ++ do jf=ifre1,ifre2 ++ ++ i=lstfre(jf) ++ oxx(i)=oxx(i)+step*hhx(i) ++ oyy(i)=oyy(i)+step*hhy(i) ++ ozz(i)=ozz(i)+step*hhz(i) ++ ++ enddo ++ ++c update rigid body atoms ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ uuu=uxx(i)**2+uyy(i)**2+uzz(i)**2 ++ if(uuu.gt.1.d-10)then ++ ++ ttt=txx(i)**2+tyy(i)**2+tzz(i)**2 ++ the2=(ttt/uuu)*step**2 ++ ++ coz=-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0- ++ x the2/132.d0)/90.d0)/56.d0)/30.d0)/12.d0)/2.d0 ++ zin=-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0- ++ x the2/156.d0)/110.d0)/72.d0)/42.d0)/20.d0)/6.d0+1.d0 ++ ++ oxx(i)=oxx(i)+coz*uxx(i)+step*(hhx(i)+zin*txx(i)) ++ oyy(i)=oyy(i)+coz*uyy(i)+step*(hhy(i)+zin*tyy(i)) ++ ozz(i)=ozz(i)+coz*uzz(i)+step*(hhz(i)+zin*tzz(i)) ++ ++ else ++ ++ oxx(i)=oxx(i)+step*hhx(i) ++ oyy(i)=oyy(i)+step*hhy(i) ++ ozz(i)=ozz(i)+step*hhz(i) ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine turn_rigid_body ++ ++ end module optimiser_module +diff -urN dl_class_1.9.orig/srcmod/pair_module.f dl_class_1.9/srcmod/pair_module.f +--- dl_class_1.9.orig/srcmod/pair_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/pair_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,46 @@ ++ module pair_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining atom pair data ++c copyright - daresbury laboratory ++c author - w. smith mar 2004 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ integer, allocatable :: ilist(:),jlist(:) ++ real(8), allocatable :: xdf(:),ydf(:),zdf(:) ++ real(8), allocatable :: rsqdf(:) ++ ++ save ilist,jlist,xdf,ydf,zdf,rsqdf ++ ++ contains ++ ++ subroutine alloc_pair_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=6 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ allocate (ilist(mxxdf),stat=fail(1)) ++ allocate (jlist(mxxdf),stat=fail(2)) ++ allocate (xdf(mxxdf),stat=fail(3)) ++ allocate (ydf(mxxdf),stat=fail(4)) ++ allocate (zdf(mxxdf),stat=fail(5)) ++ allocate (rsqdf(mxxdf),stat=fail(6)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1940) ++ enddo ++ ++ end subroutine alloc_pair_arrays ++ ++ end module pair_module +diff -urN dl_class_1.9.orig/srcmod/parse_module.f dl_class_1.9/srcmod/parse_module.f +--- dl_class_1.9.orig/srcmod/parse_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/parse_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,585 @@ ++ module parse_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining parsing arrays ++c copyright - daresbury laboratory ++c author - w. smith jan 2004 ++c ++c*********************************************************************** ++ ++ integer, parameter :: lenrec=150 ++ character*1 record(lenrec) ++ save record ++ ++ contains ++ ++ subroutine getrec(safe,idnode,ifile) ++ ++c********************************************************************* ++c ++c dl_poly subroutine to read a character string on one node ++c and broadcast it to all other nodes ++c ++c copyright daresbury laboratory 1994 ++c author w.smith december 1994 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical safe ++ ++ character*150 line ++ integer export,import,idnode,ifile,i ++ dimension export(lenrec),import(lenrec) ++ ++ safe=.true. ++ ++ call gsync() ++ ++ if(idnode.eq.0)then ++ ++ read(ifile,'(a150)',end=100)line ++ ++ do i=1,lenrec ++ ++ record(i)=line(i:i) ++ export(i)=ichar(line(i:i)) ++ ++ enddo ++ ++ call gstate(safe) ++ call gisum(export,lenrec,import) ++ ++ return ++ ++ 100 safe=.false. ++ ++ call gstate(safe) ++ ++ else ++ ++ call gstate(safe) ++ if(.not.safe)return ++ ++ do i=1,lenrec ++ ++ export(i)=0 ++ ++ enddo ++ ++ call gisum(export,lenrec,import) ++ ++ do i=1,lenrec ++ ++ record(i)=char(export(i)) ++ ++ enddo ++ ++ return ++ ++ endif ++ ++ end subroutine getrec ++ ++ integer function intstr(word,len,lst) ++ ++c*********************************************************************** ++c ++c dl_poly function for extracting integers from a ++c character string ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith may 1994. ++c ++c parameters: ++c word - input character string ++c len - working length of character string ++c lst - location of space character at end of ++c integer string ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical flag,count,final ++ character*1 n,word,ksn ++ integer lst,len,j,isn ++ ++ dimension n(0:9),word(len) ++ data n/'0','1','2','3','4','5','6','7','8','9'/ ++ ++ isn=1 ++ lst=0 ++ ksn='+' ++ intstr=0 ++ flag=.false. ++ final=.false. ++ count=.false. ++ ++ do while(lst.lt.len.and.(.not.final)) ++ ++ lst=lst+1 ++ flag=.false. ++ ++ do j=0,9 ++ ++ if(n(j).eq.word(lst))then ++ ++ intstr=10*intstr+j ++ count=.true. ++ flag=.true. ++ ++ endif ++ ++ enddo ++ ++ if(count.and.(.not.flag))final=.true. ++ if(flag.and.ksn.eq.'-')isn=-1 ++ ksn=word(lst) ++ ++ enddo ++ ++ intstr=isn*intstr ++ ++ do j=lst,len ++ word(j-lst+1)=word(j) ++ enddo ++ do j=len-lst+2,len ++ word(j)=' ' ++ enddo ++ ++ return ++ end function intstr ++ ++ real(8) function dblstr(word,len,lst) ++ ++c*********************************************************************** ++c ++c dl_poly function for extracting double precisions from a ++c character string. ++c modified from dl_poly function intstr ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith may 1994. ++c modified - t. forester april 1994 ++c ++c parameters: ++c word - input character string ++c len - working length of character string ++c lst - location of space character at end of ++c double precision string ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 n,word,ksn,dot,d,e ++ logical flag,ldot,start,final ++ integer len,lst,iexp,idum,i,j,fail ++ real(8) sn,ten,one ++ dimension n(0:9),word(len) ++ character*1, allocatable :: work(:) ++ ++ data n/'0','1','2','3','4','5','6','7','8','9'/ ++ data dot/'.'/ ++ data d/'d'/ ++ data e/'e'/ ++ ++ allocate(work(len),stat=fail) ++ ++ lst=0 ++ sn=1.d0 ++ ksn='+' ++ ten=10.d0 ++ one=1.d0 ++ ++ dblstr=0.d0 ++ iexp=0 ++ idum=0 ++ start=.false. ++ ldot=.false. ++ final=.false. ++ ++ do while(lst.lt.len.and.(.not.final)) ++ ++ lst=lst+1 ++ flag=.false. ++ ++ do j=0,9 ++ ++ if(n(j).eq.word(lst))then ++ ++ dblstr=ten*dblstr+one*dble(j) ++ flag=.true. ++ start=.true. ++ ++ endif ++ ++ enddo ++ ++ if(dot.eq.word(lst))then ++ ++ flag=.true. ++ ten=1.d0 ++ ldot=.true. ++ start=.true. ++ ++ endif ++ ++ if(flag.and.ksn.eq.'-') sn=-1.d0 ++ if(ldot) one=one/10.d0 ++ ksn=word(lst) ++ if(ksn.eq."D")ksn="d" ++ if(ksn.eq."E")ksn="e" ++ ++ if(start)then ++ ++ if(d.eq.ksn.or.e.eq.ksn)then ++ ++ do i=1,len-lst ++ work(i)=word(i+lst) ++ enddo ++ iexp=intstr(work,len-lst,idum) ++ final=.true. ++ ++ endif ++ ++ if(.not.flag)final=.true. ++ ++ endif ++ ++ enddo ++ ++ dblstr=sn*dblstr*(10.d0**iexp) ++ lst=lst+idum ++ ++ do j=lst,len ++ word(j-lst+1)=word(j) ++ enddo ++ do j=len-lst+2,len ++ word(j)=' ' ++ enddo ++ ++ deallocate(work,stat=idum) ++ ++ return ++ end function dblstr ++ ++ subroutine strip(string,imax) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to strip blanks from start of a string ++c maximum length is 255 characters ++c ++c copyright daresbury laboratory 1993 ++c author t.forester july 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,imax,j ++ character*1 string(imax) ++ ++ do i=1,imax ++ ++ if(string(1).eq.' ')then ++ ++ do j=1,imax-1 ++ ++ string(j)=string(j+1) ++ ++ enddo ++ ++ string(imax)=' ' ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine strip ++ ++ subroutine lowcase(string,length) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to lowercase a string of up to 255 characters. ++c Transportable to non-ASCII machines ++c ++c copyright daresbury laboratory 1993 ++c author t. forester july 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 string(*) ++ character*1 letter ++ integer i,length ++ ++ do i=1,min(255,length) ++ ++ letter=string(i) ++ ++ if(letter.eq.'A')then ++ letter='a' ++ else if(letter.eq.'B')then ++ letter='b' ++ else if(letter.eq.'C')then ++ letter='c' ++ else if(letter.eq.'D')then ++ letter='d' ++ else if(letter.eq.'E')then ++ letter='e' ++ else if(letter.eq.'F')then ++ letter='f' ++ else if(letter.eq.'G')then ++ letter='g' ++ else if(letter.eq.'H')then ++ letter='h' ++ else if(letter.eq.'I')then ++ letter='i' ++ else if(letter.eq.'J')then ++ letter='j' ++ else if(letter.eq.'K')then ++ letter='k' ++ else if(letter.eq.'L')then ++ letter='l' ++ else if(letter.eq.'M')then ++ letter='m' ++ else if(letter.eq.'N')then ++ letter='n' ++ else if(letter.eq.'O')then ++ letter='o' ++ else if(letter.eq.'P')then ++ letter='p' ++ else if(letter.eq.'Q')then ++ letter='q' ++ else if(letter.eq.'R')then ++ letter='r' ++ else if(letter.eq.'S')then ++ letter='s' ++ else if(letter.eq.'T')then ++ letter='t' ++ else if(letter.eq.'U')then ++ letter='u' ++ else if(letter.eq.'V')then ++ letter='v' ++ else if(letter.eq.'W')then ++ letter='w' ++ else if(letter.eq.'X')then ++ letter='x' ++ else if(letter.eq.'Y')then ++ letter='y' ++ else if(letter.eq.'Z')then ++ letter='z' ++ endif ++ ++ string(i)=letter ++ ++ enddo ++ ++ return ++ end subroutine lowcase ++ ++ subroutine copystring(oldstr,newstr,length) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to copy one string into another ++c ++c copyright daresbury laboratory ++c author w. smith jan 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 newstr(*),oldstr(*) ++ integer i,length ++ ++ do i=1,length ++ ++ newstr(i)=oldstr(i) ++ ++ enddo ++ ++ return ++ end subroutine copystring ++ ++ logical function findstring(seek,string,here) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to find an explicit string in an input record ++c note: variable `seek' is a character string while variable ++c `string' is a character*1 array i.e. code is application specific ++c ++c copyright daresbury laboratory ++c author w.smith jan 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,n,m,here ++ character*(*) seek ++ character*1 string(lenrec) ++ ++ m=lenrec ++ n=len(seek) ++ findstring=.false. ++ ++ here=0 ++ do while(here.le.m-n.and.(.not.findstring)) ++ ++ findstring=.true. ++ ++ do i=1,n ++ if(seek(i:i).ne.string(here+i))findstring=.false. ++ enddo ++ ++ here=here+1 ++ ++ enddo ++ ++ return ++ end function findstring ++ ++ subroutine striptext(string,length,nwords) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to strip leading text from a data record ++c ++c copyright daresbury laboratory ++c author w.smith jan 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical final ++ integer length,nwords,i,j,k ++ character*1 string(length) ++ ++ do k=1,nwords ++ ++ i=0 ++ final=.false. ++ ++ do while(.not.final.and.i.lt.length) ++ ++ i=i+1 ++ ++ if(string(1).eq.' ')then ++ ++ final=.true. ++ ++ else ++ ++ do j=1,length-1 ++ ++ string(j)=string(j+1) ++ ++ enddo ++ ++ string(length)=' ' ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine striptext ++ ++ subroutine getword(word,string,len1,len2) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to fetch an 8 character word from a string ++c while ignoring leading blanks ++c ++c copyright daresbury laboratory ++c author w.smith jan 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical final ++ character*8 word ++ integer len1,len2,i,j,k ++ character*1 wrdseq(len1),string(len2) ++ ++ do i=1,len1 ++ wrdseq(i)=' ' ++ enddo ++ ++ i=0 ++ k=0 ++ final=.false. ++ ++ do while(.not.final.and.i.lt.len2) ++ ++ i=i+1 ++ ++ if(string(1).eq.' ')then ++ ++ if(k.gt.0)final=.true. ++ ++ else ++ ++ k=k+1 ++ wrdseq(k)=string(1) ++ if(k.eq.len1)final=.true. ++ ++ endif ++ ++ do j=1,len2-1 ++ ++ string(j)=string(j+1) ++ ++ enddo ++ ++ string(len2)=' ' ++ ++ enddo ++ ++ word=mkwd8(wrdseq) ++ ++ return ++ end subroutine getword ++ ++ character*8 function mkwd8(string) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to make an 8 character word from a string ++c ++c copyright daresbury laboratory ++c author w.smith nov 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i ++ character*1 string(*) ++ ++ do i=1,8 ++ mkwd8(i:i)=string(i) ++ enddo ++ ++ return ++ end function mkwd8 ++ ++ end module parse_module ++ ++ +diff -urN dl_class_1.9.orig/srcmod/pass_tools.f dl_class_1.9/srcmod/pass_tools.f +--- dl_class_1.9.orig/srcmod/pass_tools.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/pass_tools.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,318 @@ ++ subroutine passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for passing information about bond ++c constraints between nodes ++c ++c parallel replicated data version assuming direct node-node ++c connection (i.e. this version may be intel specific) ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith august 1992. ++c MPI version t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ logical safe,lshmov ++ integer idnode,mxnode,natms,nscons,lashap,lishap,listme,ierr ++ integer listin,listot,listcon,lstfrz,i,j,k,jdnode,idum ++ ++ dimension listme(mxatms),listin(mxatms),listot(mxatms) ++ dimension lishap(mxlshp),lashap(mxproc),listcon(mxcons,3) ++ dimension lstfrz(mxatms) ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++ if(mxproc.lt.mxnode)call error(idnode,102) ++ ++ safe=.true. ++ ++ do i=1,natms ++ ++ listme(i)=0 ++ ++ enddo ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ listme(i)=listme(i)+1 ++ listme(j)=listme(j)+1 ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ j=0 ++ call gsync() ++ do k=1,mxnode-1 ++ ++ jdnode=mod(idnode+mxnode-k,mxnode) ++ ++ call MPI_IRECV(listin,natms,MPI_INTEGER, ++ x MPI_ANY_SOURCE,Passcon_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(listme,natms,MPI_INTEGER,jdnode, ++ x Passcon_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++ do i=1,natms ++ ++ if((listme(i).gt.0).and.(listin(i).gt.0.and. ++ x lstfrz(i).eq.0))then ++ ++ j=j+1 ++ if(j.gt.mxlshp)then ++ ++ safe=.false. ++ ++ else ++ ++ lishap(j)=i ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ lashap(k)=j ++ ++ enddo ++ ++ endif ++ ++c check for global error condition ++ ++ if(mxnode.gt.1) call gstate(safe) ++ ++ if(.not.safe)call error(idnode,103) ++ ++ if(mxnode.gt.1) then ++ call gisum(j,1,idum) ++ if(idnode.eq.0) write(nrite,'(/,a,14x,i10)') ++ x ' shared atoms from passcon',j/2 ++ lshmov = (j.gt.0) ++ endif ++ ++c keep record of all atoms subject to constraints ++ ++ do i=1,natms ++ ++ if(listme(i).gt.0)then ++ ++ listot(i)=1 ++ ++ else ++ ++ listot(i)=0 ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gisum(listot,natms,listin) ++ ++ return ++ end ++ ++ subroutine passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for passing information about PMF ++c constraints between nodes ++c ++c parallel replicated data version assuming direct node-node ++c connection (i.e. this version may be intel specific) ++c ++c copyright - daresbury laboratory 1995 ++c author - t.forester august 1995. ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf ++ integer npmf,i,j,k ++ ++ dimension listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) ++ dimension lstpmf(mxspmf,mspmf),npmf(2) ++ ++ if(mxproc.lt.mxnode)call error(idnode,102) ++ if(mxpmf.lt.natms) call error(idnode,490) ++ ++ do i=1,natms ++ ++ listpm(i)=0 ++ ++ enddo ++ ++ do k=1,nspmf ++ ++ do j = 1,npmf(1)+npmf(2) ++ ++ i=lstpmf(j,k) ++ listpm(i)= 1 ++ ++ enddo ++ ++ enddo ++c ++c keep record of all atoms subject to pmf constraints ++ ++ do i=1,natms ++ ++ if(listpm(i).gt.0)then ++ ++ lstpmt(i)=1 ++ ++ else ++ ++ lstpmt(i)=0 ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gisum(lstpmt,natms,listin) ++ ++ return ++ end ++ ++ subroutine passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for passing information about rigid body ++c atoms involved in bond constraints between nodes ++c ++c parallel replicated data version assuming direct node-node ++c connection ++c ++c copyright - daresbury laboratory 1995 ++c author - t. forester december 1995. ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ logical lcnb,safe ++ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,listin ++ integer listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp ++ integer numgsit,igrp1,igrp2,i,jr,igrp,itmols,imols,lgrp,id ++ integer jj,ik,j,k ++ ++ dimension listin(mxatms) ++ dimension listcon(mxcons,3),lstcsit(2*mxcons) ++ dimension lstout(mxatms),lstrgd(mxgatm) ++ dimension nummols(mxtmls),numgrp(mxtmls),numgsit(mxungp) ++ dimension lstgtp(mxgrp) ++ ++ integer status(MPI_STATUS_SIZE) ++ ++ if(mxproc.lt.mxnode)call error(idnode,102) ++ ++c block indices for groups ++ ++ igrp1 = (idnode*ngrp)/mxnode + 1 ++ igrp2 = ((idnode+1)*ngrp)/mxnode ++ ++c locate site indices of atoms in constraints ++ ++ do i = 1,natms ++ listin(i) = 0 ++ enddo ++ ++c loop over molecule types ++ ++ jr = 0 ++ igrp = 0 ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then ++ ++ id = lstgtp(igrp) ++ do jj = 1,numgsit(id) ++ ++ jr = jr +1 ++ i = lstrgd(jr) ++ listin(i) = jj ++ ++ enddo ++ endif ++ enddo ++ enddo ++ enddo ++ ++ if(mxnode.gt.1) call gisum(listin,natms,lstout) ++ ++ safe = .true. ++ ik = 0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ if(listin(i).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(i) ++ safe = .false. ++ endif ++ ++ if(listin(j).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(j) ++ safe = .false. ++ endif ++ ++ enddo ++ ++c lcnb flags bodies connected by constraints ++ ++ if(mxnode.gt.1) call gstate(safe) ++ lcnb = (.not.safe) ++ ++ return ++ end ++ ++ ++ +diff -urN dl_class_1.9.orig/srcmod/pmf_module.f dl_class_1.9/srcmod/pmf_module.f +--- dl_class_1.9.orig/srcmod/pmf_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/pmf_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1911 @@ ++ module pmf_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining potential of mean force arrays ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use ensemble_tools_module ++ use lf_motion_module ++ use lf_rotation1_module ++ use parse_module ++ use property_module ++ use setup_module ++ use shake_module ++ use vv_motion_module ++ use utility_module ++ ++ implicit none ++ ++ integer npmf ++ real(8) prmpmf,pmfnrm ++ real(8), allocatable :: pmfwght(:) ++ integer, allocatable :: numpmf(:) ++ integer, allocatable :: indpmf(:) ++ integer, allocatable :: listpm(:) ++ integer, allocatable :: lstpmt(:) ++ integer, allocatable :: lstpmf(:,:) ++ ++ dimension npmf(2),pmfnrm(2) ++ ++ save npmf,prmpmf,pmfnrm,pmfwght,numpmf,indpmf,listpm ++ save lstpmt,lstpmf ++ ++ contains ++ ++ subroutine alloc_pmf_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for allocating pmf arrays ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=6 ++ ++ integer i,idnode,fail ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (pmfwght(mxspmf),stat=fail(1)) ++ allocate (indpmf(mxspmf),stat=fail(2)) ++ allocate (numpmf(mxtmls),stat=fail(3)) ++ allocate (listpm(mxpmf),stat=fail(4)) ++ allocate (lstpmt(mxpmf),stat=fail(5)) ++ allocate (lstpmf(mxspmf,mspmf),stat=fail(6)) ++ ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1210) ++ enddo ++ ++ do i=1,mxtmls ++ numpmf(i)=0 ++ enddo ++ ++ end subroutine alloc_pmf_arrays ++ ++ subroutine define_pmf(safe,idnode,itmols,nspmf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining pmf units ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer idnode,itmols,nspmf,ipmf,jpmf,iatm1,idum ++ real(8) wght ++ ++ numpmf(itmols)=1 ++ prmpmf=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) then ++ write(nrite,"(/,1x,' PMF bondlength :', ++ x 5x,f20.10)") prmpmf ++ write(nrite, ++ x "(/,/,12x,'unit, site and weight details:' ++ x ,/,/,16x,'unit',6x,'index',5x,'weight')") ++ endif ++ ++ do ipmf=1,2 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ call strip(record,lenrec) ++ call lowcase(record,lenrec) ++ if(.not.findstring('pmf unit',record,idum)) ++ x call error(idnode,462) ++ npmf(ipmf)=intstr(record,lenrec,idum) ++ ++ do jpmf=1,npmf(ipmf) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ iatm1=intstr(record,lenrec,idum) ++ wght=dblstr(record,lenrec,idum) ++ if(wght.le.1.d-10) wght=1.d0 ++ ++ nspmf=nspmf+1 ++ ++ if(nspmf.gt.mxspmf) call error(idnode,460) ++ ++ indpmf(nspmf)=iatm1 ++ pmfwght(nspmf)=wght ++ ++ if(idnode.eq.0) then ++ ++ if(jpmf.eq.1) then ++ write(nrite,"(16x,i5,i10,f12.6)") ++ x ipmf,indpmf(nspmf),pmfwght(nspmf) ++ else ++ write(nrite,"(21x,i10,f12.6)") ++ x indpmf(nspmf),pmfwght(nspmf) ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine define_pmf ++ ++ subroutine pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, ++ x dxp,dyp,dzp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing vectors for PMF calculations ++c ++c copyright - daresbury laboratory ++c adapted by w.smith october 2005 ++c original by t.forester aug 1995 ++c ++c set variable img true for PBC shifted vectors ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical img ++ integer nspmf,imcon,k,jj,kk,ipmf,i,i1,i2 ++ ++ real(8) xxx(mxatms),yyy(mxatms),zzz(mxatms) ++ real(8) xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ real(8) xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) ++ real(8) dxp(mspmf),dyp(mspmf),dzp(mspmf),cell(9) ++ ++ do k=1,nspmf ++ ++ jj=0 ++ kk=0 ++ ++c calculate difference vectors ++ ++ do ipmf=1,2 ++ ++ i1=lstpmf(jj+1,k) ++ ++c position difference vectors ++ ++ do i=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i2=lstpmf(jj,k) ++ xxt(i)=xxx(i2)-xxx(i1) ++ yyt(i)=yyy(i2)-yyy(i1) ++ zzt(i)=zzz(i2)-zzz(i1) ++ ++ enddo ++ ++c correct for periodic images - assume less than half box length ++ ++ if(img)call images(imcon,0,1,npmf(ipmf),cell,xxt,yyt,zzt) ++ ++c create weighted coordinate ++ ++ xxa(ipmf,k)=0.d0 ++ yya(ipmf,k)=0.d0 ++ zza(ipmf,k)=0.d0 ++ ++ do i=1,npmf(ipmf) ++ ++ kk=kk+1 ++ xxa(ipmf,k)=xxa(ipmf,k)+pmfwght(kk)*xxt(i) ++ yya(ipmf,k)=yya(ipmf,k)+pmfwght(kk)*yyt(i) ++ zza(ipmf,k)=zza(ipmf,k)+pmfwght(kk)*zzt(i) ++ ++ enddo ++ ++ xxa(ipmf,k)=xxa(ipmf,k)/pmfnrm(ipmf)+xxx(i1) ++ yya(ipmf,k)=yya(ipmf,k)/pmfnrm(ipmf)+yyy(i1) ++ zza(ipmf,k)=zza(ipmf,k)/pmfnrm(ipmf)+zzz(i1) ++ ++ enddo ++ ++ dxp(k)=xxa(2,k)-xxa(1,k) ++ dyp(k)=yya(2,k)-yya(1,k) ++ dzp(k)=zza(2,k)-zza(1,k) ++ ++ enddo ++ ++c periodic boundary condition for pmf vectors ++ ++ if(img)call images(imcon,0,1,nspmf,cell,dxp,dyp,dzp) ++ ++ return ++ end subroutine pmf_vectors ++ ++ subroutine pmflf ++ x (safe,safep,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics. Verlet leapfrog With RD-SHAKE ++c and PMF_SHAKE - for potential of mean force calculations. ++c ++c parallel replicated data version : block data ++c adapted from dl_poly routine nve_1.f ++c ++c copyright - daresbury laboratory 1995 ++c author - t.forester aug 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ ++ logical safe,lshmov,safep,unsafe,img ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,nspmf,ntpmf ++ integer fail,iatm0,iatm1,i,j,k,jj,ii,ipmf,icyc ++ real(8) engke,tolnce,tstep,vircon,virpmf,strpmf,summas ++ real(8) rstep,viracc,strkin,strcon ++ ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) ++ real(8), allocatable :: dxp(:),dyp(:),dzp(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ dimension strpmf(9),strcon(9),strkin(9),summas(2),fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(1)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(2)) ++ allocate(xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(3)) ++ allocate(uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(4)) ++ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(5)) ++ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(8)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1220) ++ enddo ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c constraint virials ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ ++c temporary stress tensor accumulators ++ ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ strpmf(i)=0.d0 ++ ++ enddo ++ ++c store initial values of position ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c calculate mass terms for PMF units ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ summas(ipmf)=0.d0 ++ pmfnrm(ipmf)=0.d0 ++ ++ do i=1,npmf(ipmf) ++ ++ jj=jj+1 ++ ii=lstpmf(jj,1) ++ summas(ipmf)=summas(ipmf)+weight(ii) ++ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) ++ ++ enddo ++ ++ enddo ++ ++c calculate PMF bond constraints and store initial positions ++ ++ img=.true. ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, ++ x xxa,yya,zza,dxp,dyp,dzp) ++ ++c move atoms by leapfrog algorithm ++ ++ safe=(ntcons.eq.0) ++ safep=(ntpmf.eq.0) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c update velocities ++ ++ uxx(i)=vxx(i)+tstep*rmass(i)*fxx(i) ++ uyy(i)=vyy(i)+tstep*rmass(i)*fyy(i) ++ uzz(i)=vzz(i)+tstep*rmass(i)*fzz(i) ++ ++c update positions ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++c RDSHAKE procedure ++ ++ if(ntcons.gt.0.or.ntpmf.gt.0) then ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint corrections - iteratively ++ ++ icyc=0 ++ unsafe=.true. ++ ++ do while(unsafe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c apply bond constraints ++ ++ viracc=0.d0 ++ if(ntcons.gt.0)call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c apply pmf constraints ++ ++ viracc=0.d0 ++ if(ntpmf.gt.0)call pmf_shake ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x viracc,xxt,yyt,zzt,strcon,summas,dxp,dyp,dzp, ++ x xxa,yya,zza) ++ ++ virpmf=virpmf+viracc ++ do i=1,9 ++ strpmf(i)=strpmf(i)+strcon(i) ++ enddo ++ ++ unsafe=(.not.(safe.and.safep.and.abs(viracc).lt.1.d-10)) ++ ++ enddo ++ ++ safep=.not.unsafe ++ ++c calculate velocity correction ++ ++ j=0 ++ rstep=1.d0/tstep ++ do i=iatm0,iatm1 ++ ++c update corrected velocity ++ ++ j=j+1 ++ uxx(i)=(xxx(i)-xxo(j))*rstep ++ uyy(i)=(yyy(i)-yyo(j))*rstep ++ uzz(i)=(zzz(i)-zzo(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=(uxx(i)-vxx(i))*weight(i)*rstep ++ fyy(i)=(uyy(i)-vyy(i))*weight(i)*rstep ++ fzz(i)=(uzz(i)-vzz(i))*weight(i)*rstep ++ ++ enddo ++ ++ endif ++ ++c calculate velocity at full time step ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=0.5d0*(vxx(i)+uxx(i)) ++ vyy(i)=0.5d0*(vyy(i)+uyy(i)) ++ vzz(i)=0.5d0*(vzz(i)+uzz(i)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c total contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strpmf(i)+strcns(i)+strkin(i) ++ enddo ++ ++c add pmf and constraint virials ++ ++ vircon=vircon+virpmf ++ ++c restore half step velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(1)) ++ deallocate(uxx,uyy,uzz,dxp,dyp,dzp,stat=fail(2)) ++ deallocate(txx,tyy,tzz,xxo,yyo,zzo,stat=fail(3)) ++ deallocate(dxt,dyt,dzt,xxa,yya,zza,stat=fail(4)) ++ ++ return ++ end subroutine pmflf ++ ++ subroutine pmflfq_1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon,safep,nspmf,ntpmf,virpmf) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame ++c omx,omy,omz = angular velocity in body fixed frame (principal axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=14 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newjob,safep,unsafe,img ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer fail,i,igrp,igrp1,igrp2,idum,ifre1,ifre2,j,ifre ++ integer jg,ig,k,id,jr,nspmf,ntpmf,jj,ii,ipmf,icyc ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) strkin,rot,rstep,rtsq,engtrn,vaa,vbb,vcc,virpmf ++ real(8) trx,try,trz,delx,dely,delz,engfke,viracc ++ real(8) strgrp,tqx,tqy,tqz,fmx,fmy,fmz ++ real(8) strpmf,strcon,summas ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ ++ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) ++ real(8), allocatable :: dxp(:),dyp(:),dzp(:) ++ ++ dimension strkin(9),strgrp(9),rot(9),fail(nnn) ++ ++ dimension strpmf(9),strcon(9),summas(2) ++ ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(12)) ++ ++ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(13)) ++ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(14)) ++ ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1500) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c constraint virials ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ ++c temporary stress tensor accumulators ++ ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ strpmf(i)=0.d0 ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c calculate mass terms for PMF units ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ summas(ipmf)=0.d0 ++ pmfnrm(ipmf)=0.d0 ++ ++ do i=1,npmf(ipmf) ++ ++ jj=jj+1 ++ ii=lstpmf(jj,1) ++ summas(ipmf)=summas(ipmf)+weight(ii) ++ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) ++ ++ enddo ++ ++ enddo ++ ++c calculate PMF bond constraints and store initial positions ++ ++ img=.true. ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, ++ x xxa,yya,zza,dxp,dyp,dzp) ++ ++c move atoms by leapfrog algorithm ++ ++ safe=(ntcons.eq.0) ++ safep=(ntpmf.eq.0) ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(i)=vxo(j)+tstep*rmass(i)*fxx(i) ++ uyy(i)=vyo(j)+tstep*rmass(i)*fyy(i) ++ uzz(i)=vzo(j)+tstep*rmass(i)*fzz(i) ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0.or.ntpmf.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint corrections - iteratively ++ ++ icyc=0 ++ unsafe=.true. ++ ++ do while(unsafe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c apply bond constraints ++ ++ viracc=0.d0 ++ if(ntcons.gt.0)call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c apply pmf constraints ++ ++ viracc=0.d0 ++ if(ntpmf.gt.0)call pmf_shake ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x viracc,xxt,yyt,zzt,strcon,summas,dxp,dyp,dzp, ++ x xxa,yya,zza) ++ ++ virpmf=virpmf+viracc ++ do i=1,9 ++ strpmf(i)=strpmf(i)+strcon(i) ++ enddo ++ ++ unsafe=(.not.(safe.and.safep.and.abs(viracc).lt.1.d-10)) ++ ++ enddo ++ ++ safep=.not.unsafe ++ ++c calculate force and velocity corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational rigid body motion ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) ++ uyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) ++ uzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcmx(ig)+tstep*uxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*uyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*uzz(ig) ++ ++c estimate velocity at full time step ++ ++ gvxx(ig)=0.5d0*(gvxx(ig)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyy(ig)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzz(ig)+uzz(ig)) ++ ++ enddo ++ ++c calculate rigid body translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c total translational kinetic energy ++ ++ engke=engtrn+engfke ++ ++c calculate ridid body kinetic stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore rigid body half timestep velocity ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx=0.d0 ++ tqy=0.d0 ++ tqz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx=tqx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy=tqy+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz=tqz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c store current angular velocity ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx*rot(1)+tqy*rot(4)+tqz*rot(7))*rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) ++ try=(tqx*rot(2)+tqy*rot(5)+tqz*rot(8))*rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) ++ trz=(tqx*rot(3)+tqy*rot(6)+tqz*rot(9))*rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+delx*pt5 ++ opy(jg)=omy(ig)+dely*pt5 ++ opz(jg)=omz(ig)+delz*pt5 ++ ++ enddo ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omx(ig)+delx ++ uyy(ig)=omy(ig)+dely ++ uzz(ig)=omz(ig)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omx(ig)+delx*1.5d0 ++ oqy(jg)=omy(ig)+dely*1.5d0 ++ oqz(jg)=omz(ig)+delz*1.5d0 ++ ++c angular velocity at timestep n ++ ++ omx(ig)=omx(ig)+pt5*delx ++ omy(ig)=omy(ig)+pt5*dely ++ omz(ig)=omz(ig)+pt5*delz ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i)+ ++ x strpmf(i) ++ enddo ++ ++c add pmf and constraint virials ++ ++ vircon=vircon+virpmf ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies - relative to c.o.m ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate(opx,opy,opz,xxt,yyt,zzt,stat=fail(1)) ++ deallocate(oqx,oqy,oqz,dtx,dty,dtz,stat=fail(2)) ++ deallocate(dxx,dyy,dzz,uxx,uyy,uzz,stat=fail(3)) ++ deallocate(txx,tyy,tzz,dxt,dyt,dzt,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,xx1,yy1,zz1,stat=fail(5)) ++ deallocate(vxo,vyo,vzo,gcxo,gcyo,gczo,stat=fail(6)) ++ deallocate(dxp,dyp,dzp,xxa,yya,zza,stat=fail(7)) ++ ++ return ++ end subroutine pmflfq_1 ++ ++ subroutine pmf_shake ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x virpmf,xxt,yyt,zzt,strpmf,summas,dxp,dyp,dzp, ++ x xxa,yya,zza) ++ ++c*********************************************************************** ++c ++c dlpoly constraint subroutine for potential of mean force calc. ++c accummulates constraint force to maintain reaction coordinate ++c ++c assume bond vectors dxp,dyp,dzp are input ++c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc ++c ++c copyright daresbury laboratory 1995 ++c author t.forester august 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safep,img ++ integer idnode,mxnode,imcon,natms,nspmf,fail,icyc,k,jj ++ integer ii,i,ipmf ++ real(8) tstep,tolnce,virpmf,xxt,yyt,zzt,strpmf,summas ++ real(8) dxp,dyp,dzp,xxa,yya,zza,amt,strs1,strs2,strs3,strs5 ++ real(8) strs6,strs9,tstep2,dis,omega2,eps,gamma,gammi ++ ++ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) ++ dimension amt(2),strpmf(9),summas(2) ++ ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:),dsq(:) ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),dsq(mspmf), ++ x stat=fail) ++ if(fail.ne.0)call error(idnode,1230) ++ ++ if(mxcons.lt.nspmf) call error(idnode,492) ++ if(mspmf .lt.nspmf) call error(idnode,458) ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c accumulators for strpmf tensor ++ ++ virpmf=0.d0 ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ safep=.false. ++ ++ do while(.not.safep.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c calculate bond constraint length ++ ++ img=.true. ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, ++ x xxa,yya,zza,dxt,dyt,dzt) ++ ++ amt(1)= tstep2/summas(1) ++ amt(2)=-tstep2/summas(2) ++ ++ eps=0.d0 ++ dis=prmpmf ++ omega2=dis*dis ++ ++ do k=1,nspmf ++ ++ dsq(k)=dxt(k)**2+dyt(k)**2+dzt(k)**2 ++ eps=max(eps,abs((omega2-dsq(k))/(2.0d0*dis))) ++ ++ enddo ++ ++c check convergence condition ++ ++ safep=(eps.le.tolnce) ++ ++c bypass calculations if converged ++ ++ if(.not.safep)then ++ ++ do k=1,nspmf ++ ++ gamma=(omega2-dsq(k))/(-2.d0*(amt(2)-amt(1))* ++ x (dxp(k)*dxt(k)+dyp(k)*dyt(k)+dzp(k)*dzt(k))) ++ ++c accumulate pmf virial ++ ++ virpmf=virpmf+gamma*(dxp(k)**2+dyp(k)**2+dzp(k)**2) ++ ++ strs1=strs1-gamma*dxp(k)*dxp(k) ++ strs2=strs2-gamma*dxp(k)*dyp(k) ++ strs3=strs3-gamma*dxp(k)*dzp(k) ++ strs5=strs5-gamma*dyp(k)*dyp(k) ++ strs6=strs6-gamma*dyp(k)*dzp(k) ++ strs9=strs9-gamma*dzp(k)*dzp(k) ++ ++c improve approximate atomic positions ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ gammi=-gamma*amt(ipmf) ++ ++ do ii=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i=lstpmf(jj,k) ++ ++ xxx(i)=xxx(i)+dxp(k)*gammi ++ yyy(i)=yyy(i)+dyp(k)*gammi ++ zzz(i)=zzz(i)+dzp(k)*gammi ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c complete strpmf tensor ++ ++ strpmf(1)=strs1 ++ strpmf(2)=strs2 ++ strpmf(3)=strs3 ++ strpmf(4)=strs2 ++ strpmf(5)=strs5 ++ strpmf(6)=strs6 ++ strpmf(7)=strs3 ++ strpmf(8)=strs6 ++ strpmf(9)=strs9 ++ ++c splice coordinate arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=virpmf ++ call gdsum(buffer(1),1,buffer(2)) ++ virpmf=buffer(1) ++ call gdsum(strpmf,9,buffer) ++ call splice ++ x (idnode,natms,listpm,lstpmt,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(dxt,dyt,dzt,dsq,stat=fail) ++ ++ return ++ end subroutine pmf_shake ++ ++ subroutine pmfvv ++ x (safe,safep,lshmov,isw,idnode,mxnode,imcon,natms,nscons, ++ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics. Velocity Verlet With PMF_RATTLE ++c for potential of mean force calculations. ++c ++c copyright - daresbury laboratory ++c adapted by w.smith october 2005 ++c original by t.forester aug 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical safe,lshmov,safep,unsafe,newjob,img ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,nspmf,ntpmf ++ integer isw,mxtop ++ integer fail,iatm0,iatm1,i,j,k,jj,i1,ipmf,icyc ++ real(8) engke,tolnce,tstep,vircon,virpmf,strcon,summas ++ real(8) viracc,strpmf,strkin ++ ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxp(:),dyp(:),dzp(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) ++ ++ dimension strcon(9),strpmf(9),strkin(9),summas(2),fail(nnn) ++ save summas,newjob,strpmf ++ data newjob/.true./ ++ ++c set default safety flags ++ ++ safe=(ntcons.eq.0) ++ safep=(ntpmf.eq.0) ++ if(safe.and.safep)return ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ mxtop=max(mxcons,mspmf) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(1)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(2)) ++ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(3)) ++ allocate(dxt(mxtop),dyt(mxtop),dzt(mxtop),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(6)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1220) ++ enddo ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate mass terms for PMF units ++ ++ if(newjob)then ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ summas(ipmf)=0.d0 ++ pmfnrm(ipmf)=0.d0 ++ ++ do i=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i1=lstpmf(jj,1) ++ summas(ipmf)=summas(ipmf)+weight(i1) ++ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) ++ ++ enddo ++ ++ enddo ++ ++ newjob=.false. ++ ++ endif ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c calculate PMF bond constraints and store initial positions ++ ++ img=.true. ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, ++ x dxp,dyp,dzp) ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ if(isw.eq.1)then ++ ++c constraint virials ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ ++c temporary stress tensor accumulators ++ ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ strpmf(i)=0.d0 ++ ++ enddo ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c apply constraint corrections - iteratively ++ ++ icyc=0 ++ unsafe=.true. ++ ++ do while(unsafe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ if(isw.eq.1)then ++ ++c apply bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++ endif ++ ++c apply pmf constraints ++ ++ if(ntpmf.gt.0)then ++ ++ safep=.false. ++ call pmf_rattle_r ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x viracc,summas,xxt,yyt,zzt,xxa,yya,zza,dxp,dyp,dzp, ++ x dxt,dyt,dzt,strcon) ++ ++ virpmf=virpmf+viracc ++ do i=1,9 ++ strpmf(i)=strpmf(i)+strcon(i) ++ enddo ++ ++ endif ++ ++ unsafe=(.not.(safe.and.safep.and.abs(viracc).le.1.d-10)) ++ ++ endif ++ ++ if(isw.eq.2)then ++ ++c apply rattle velocity constraints ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ ++ endif ++ ++c apply pmf velocity constraints ++ ++ if(ntpmf.gt.0)then ++ ++ safep=.false. ++ call pmf_rattle_v ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x summas,dxp,dyp,dzp,xxt,yyt,zzt,xxa,yya,zza,dxt,dyt,dzt) ++ ++ endif ++ ++ unsafe=(.not.(safe.and.safep)) ++ ++ endif ++ ++ enddo ++ ++ safep=(.not.unsafe) ++ ++c periodic boundary condition ++ ++ if(isw.eq.1)call images ++ x (imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++ if(isw.eq.2)then ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c total contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strpmf(i)+strcns(i)+strkin(i) ++ enddo ++ ++c add pmf and constraint virials ++ ++ vircon=vircon+virpmf ++ ++ endif ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(isw.eq.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(1)) ++ deallocate(dxp,dyp,dzp,dxt,dyt,dzt,stat=fail(2)) ++ deallocate(txx,tyy,tzz,xxa,yya,zza,stat=fail(3)) ++ ++ return ++ end subroutine pmfvv ++ ++ subroutine pmf_rattle_r ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x virpmf,summas,xxt,yyt,zzt,xxa,yya,zza,dxp,dyp,dzp, ++ x dxt,dyt,dzt,strpmf) ++ ++c*********************************************************************** ++c ++c dlpoly constraint subroutine for potential of mean force calc. ++c accumulates constraint force to maintain reaction coordinate. ++c velocity verlet adaptation ++c ++c assume bond vectors dxp,dyp,dzp are input ++c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc ++c ++c copyright daresbury laboratory ++c adapted by w.smith october 2005 ++c original t.forester august 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safep,img ++ integer idnode,mxnode,imcon,natms,nspmf,icyc,k,jj ++ integer i1,i,ipmf ++ real(8) tstep,tolnce,virpmf,xxt,yyt,zzt,strpmf,summas,gamma ++ real(8) dxp,dyp,dzp,xxa,yya,zza,amt,tstep2,dis,omega2,eps,gammi ++ real(8) strs1,strs2,strs3,strs5,strs6,strs9,dxt,dyt,dzt,dsq ++ ++ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) ++ dimension amt(2),strpmf(9),summas(2) ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c pmf virial ++ ++ virpmf=0.d0 ++ ++c accumulators for stress tensor ++ ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c array bound check ++ ++ if(mxcons.lt.nspmf) call error(idnode,492) ++ if(mspmf .lt.nspmf) call error(idnode,458) ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ img=.true. ++ safep=.false. ++ dis=prmpmf ++ omega2=dis*dis ++ amt(1)= tstep2/summas(1) ++ amt(2)=-tstep2/summas(2) ++ ++ do while(.not.safep.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, ++ x dxt,dyt,dzt) ++ ++c check convergence ++ ++ eps=0.d0 ++ ++ do k=1,nspmf ++ ++ dsq=dxt(k)**2+dyt(k)**2+dzt(k)**2 ++ eps=max(eps,abs((omega2-dsq)/dis)) ++ ++ enddo ++ ++ eps=eps*0.5d0 ++ ++c verification of convergence ++ ++ safep=(eps.lt.tolnce) ++ ++c bypass calculations if converged ++ ++ if(.not.safep)then ++ ++ do k=1,nspmf ++ ++ dsq=dxt(k)**2+dyt(k)**2+dzt(k)**2 ++ gamma=(omega2-dsq)/(-(amt(2)-amt(1))* ++ x (dxp(k)*dxt(k)+dyp(k)*dyt(k)+dzp(k)*dzt(k))) ++ ++c accumulate pmf virial ++ ++ virpmf=virpmf+gamma*(dxp(k)**2+dyp(k)**2+dzp(k)**2) ++ ++ strs1=strs1-gamma*dxp(k)*dxp(k) ++ strs2=strs2-gamma*dxp(k)*dyp(k) ++ strs3=strs3-gamma*dxp(k)*dzp(k) ++ strs5=strs5-gamma*dyp(k)*dyp(k) ++ strs6=strs6-gamma*dyp(k)*dzp(k) ++ strs9=strs9-gamma*dzp(k)*dzp(k) ++ ++c improve approximate atomic positions and velocities ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ gammi=-0.5d0*gamma*amt(ipmf) ++ ++ do i1=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i=lstpmf(jj,k) ++ ++ xxx(i)=xxx(i)+dxp(k)*gammi ++ yyy(i)=yyy(i)+dyp(k)*gammi ++ zzz(i)=zzz(i)+dzp(k)*gammi ++ vxx(i)=vxx(i)+dxp(k)*gammi/tstep ++ vyy(i)=vyy(i)+dyp(k)*gammi/tstep ++ vzz(i)=vzz(i)+dzp(k)*gammi/tstep ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ strpmf(1)=strs1 ++ strpmf(2)=strs2 ++ strpmf(3)=strs3 ++ strpmf(4)=strs2 ++ strpmf(5)=strs5 ++ strpmf(6)=strs6 ++ strpmf(7)=strs3 ++ strpmf(8)=strs6 ++ strpmf(9)=strs9 ++ ++c splice coordinate and velocity arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=virpmf ++ call gdsum(buffer(1),1,buffer(2)) ++ virpmf=buffer(1) ++ call gdsum(strpmf,9,buffer) ++ call splice ++ x (idnode,natms,listpm,lstpmt,xxx,yyy,zzz,buffer) ++ call splice ++ x (idnode,natms,listpm,lstpmt,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++ return ++ end subroutine pmf_rattle_r ++ ++ subroutine pmf_rattle_v ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce,summas, ++ x dxp,dyp,dzp,vxt,vyt,vzt,vxa,vya,vza,vxp,vyp,vzp) ++ ++c*********************************************************************** ++c ++c dlpoly constraint subroutine for potential of mean force calc. ++c accumulates velocity correction for second constraint condition ++c velocity verlet adaptation ++c ++c assume bond vectors dxp,dyp,dzp are input ++c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc ++c ++c copyright daresbury laboratory ++c author w.smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safep,img ++ integer idnode,mxnode,imcon,natms,nspmf,icyc,k,jj ++ integer i1,i,ipmf ++ real(8) tstep,tolnce,summas,gamma,vxt,vyt,vzt,vxa,vya,vza ++ real(8) vxp,vyp,vzp,dxp,dyp,dzp,amt,omega,eps,gammi,tolvel ++ ++ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) ++ dimension vxp(mspmf),vyp(mspmf),vzp(mspmf) ++ dimension vxt(mxatms),vyt(mxatms),vzt(mxatms) ++ dimension vxa(2,mspmf),vya(2,mspmf),vza(2,mspmf) ++ dimension amt(2),summas(2) ++ ++c constraint convergence tolerance ++ ++ tolvel=tolnce/tstep ++ ++c array bound check ++ ++ if(mxcons.lt.nspmf) call error(idnode,492) ++ if(mspmf .lt.nspmf) call error(idnode,458) ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ img=.false. ++ safep=.false. ++ amt(1)= 0.5d0*tstep/summas(1) ++ amt(2)=-0.5d0*tstep/summas(2) ++ ++ do while(.not.safep.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,vxx,vyy,vzz,vxt,vyt,vzt,vxa,vya,vza, ++ x vxp,vyp,vzp) ++ ++c check convergence ++ ++ eps=0.d0 ++ do k=1,nspmf ++ ++ omega=dxp(k)*vxp(k)+dyp(k)*vyp(k)+dzp(k)*vzp(k) ++ eps=max(eps,abs(omega)/prmpmf) ++ ++ enddo ++ ++c verification of convergence ++ ++ safep=(eps.lt.tolvel) ++ ++c bypass calculations if converged ++ ++ if(.not.safep)then ++ ++ do k=1,nspmf ++ ++ omega=dxp(k)*vxp(k)+dyp(k)*vyp(k)+dzp(k)*vzp(k) ++ gamma=omega/((amt(2)-amt(1))* ++ x (dxp(k)**2+dyp(k)**2+dzp(k)**2)) ++ ++c improve approximate atomic velocities ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ gammi=-gamma*amt(ipmf) ++ ++ do i1=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i=lstpmf(jj,k) ++ ++ vxx(i)=vxx(i)+dxp(k)*gammi ++ vyy(i)=vyy(i)+dyp(k)*gammi ++ vzz(i)=vzz(i)+dzp(k)*gammi ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c splice velocity arrays across nodes ++ ++ if(mxnode.gt.1)call splice ++ x (idnode,natms,listpm,lstpmt,vxx,vyy,vzz,buffer) ++ ++ return ++ end subroutine pmf_rattle_v ++ ++ end module pmf_module +diff -urN dl_class_1.9.orig/srcmod/property_module.f dl_class_1.9/srcmod/property_module.f +--- dl_class_1.9.orig/srcmod/property_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/property_module.f 2014-02-27 13:49:34.000000000 +0100 +@@ -0,0 +1,1318 @@ ++ module property_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining simulation property data ++c copyright - daresbury laboratory ++c author - w. smith nov 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use pair_module ++ use setup_module ++ use site_module ++ use tether_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ real(8), allocatable :: rdf(:,:),zdens(:,:) ++ real(8), allocatable :: stpval(:),sumval(:) ++ real(8), allocatable :: ssqval(:),zumval(:) ++ real(8), allocatable :: ravval(:),stkval(:,:) ++ real(8), allocatable :: xx0(:),yy0(:),zz0(:) ++ real(8), allocatable :: amsd(:) ++ ++ save rdf,zdens,stpval,sumval,ssqval,xx0,yy0,zz0 ++ save zumval,ravval,stkval ++ ++ contains ++ ++ subroutine alloc_prp_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=6 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (zdens(mxzdn,mxatyp),stat=fail(1)) ++ allocate (rdf(mxrdf,mxxtyp),amsd(mxatyp),stat=fail(2)) ++ allocate (stpval(mxnstk),sumval(mxnstk),stat=fail(3)) ++ allocate (ssqval(mxnstk),zumval(mxnstk),stat=fail(4)) ++ allocate (ravval(mxnstk),stkval(mxstak,mxnstk),stat=fail(5)) ++ allocate (xx0(mxatms),yy0(mxatms),zz0(mxatms),stat=fail(6)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1740) ++ enddo ++ ++ end subroutine alloc_prp_arrays ++ ++ subroutine result ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit,conint, ++ x rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost,chit_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing simulation summary and ++c saving the restart data ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith dec 1992. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 hms,dec ++ logical lgofr,lpgr,lzden,check,ltad,lbpd,goprint ++ ++ integer idnode,imcon,keyens,mxnode,natms,nzden,nstep,ntpatm ++ integer levcfg,numacc,numrdf,keybpd,i,iadd,io,j ++ real(8) chip,chit,conint,rcut,tstep,volm,timelp,avvol,zlen,dc ++ real(8) engcfg,virtot,vircom,prntim,simtim,tboost,chit_shl ++ ++c save restart data ++ ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++c for TAD and BPD system averages not generally meaningful ++c useful only for BPD in configurational sampling mode ++ ++ goprint=.not.(ltad.or.(lbpd.and.keybpd.gt.1)) ++ ++ if(goprint)then ++ ++c calculate final fluctuations ++ ++ do i=1,mxnstk ++ ssqval(i)=sqrt(max(0.d0,ssqval(i))) ++ enddo ++ ++c final averages and fluctuations ++ ++ call timchk(0,timelp) ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'run terminated after',i8,' steps.', ++ x ' final averages calculated over',i8,' steps.',/,/)") ++ x nstep,numacc ++ write(nrite,"(1x,120('-'), ++ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x,'eng_cfg', ++ x 5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd',5x,'eng_ang',5x, ++ x 'eng_dih',5x,'eng_tet',/,1x,'time ',5x,' eng_pv',4x, ++ x 'temp_rot',5x,'vir_cfg',5x,'vir_vdw',5x,'vir_cou',5x, ++ x 'vir_bnd',5x,'vir_ang',5x,'vir_con',5x,'vir_tet',/, ++ x 1x,'cpu time',6x,'volume',4x,'temp_shl',5x,'eng_shl', ++ x 5x,'vir_shl',7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', ++ x 7x,'press',/,/, ++ x 1x,120('-'))") ++ ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) ++ write(nrite,'(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)') ++ x nstep,(sumval(i),i=1,9), ++ x simtim,dec,(sumval(i),i=10,18), ++ x prntim,hms,(sumval(i),i=19,27) ++ write(nrite,"(/,1x,' r.m.s. ',1p,9e12.4,/,1x,'fluctn. ', ++ x 1p,9e12.4,/,9x,9e12.4)") (ssqval(i),i=1,27) ++ write(nrite,"(1x,120('-'))") ++ ++c write out bias potential boost factor ++ ++ if(lbpd)write(nrite,"(/,/,1x, ++ x 'calculated bias potential boost factor',1p,e16.8)")tboost ++ ++ if(numacc.gt.0)then ++ iadd=27 ++ ++c write out estimated diffusion coefficients ++ ++ if(numacc.gt.0)then ++ ++ write(nrite,"(/,/,12x,'Approximate 3D Diffusion', ++ x ' coefficients (10^-9 m^2 / s)',/,/,12x,'atom',7x, ++ x ' D ')") ++ ++ do i=1,ntpatm ++ ++ iadd=iadd+1 ++ dc=(ravval(iadd)-sumval(iadd))/ ++ x (3.d0*dble(numacc-min(mxnstk,numacc-1))*tstep)*10.d0 ++ if(dc.lt.1d-10) dc=0.d0 ++ if(lbpd)dc=dc/tboost ++ write(nrite,'(12x,a8,1p,e13.4)') unqatm(i),dc ++ ++ enddo ++ ++ endif ++ ++c print out average pressure tensor ++ ++ write(nrite,"(/,/,16x,'Average pressure tensor', ++ x 39x,'r.m.s. fluctuations ',/)") ++ ++ do i=iadd,iadd+6,3 ++ write(nrite,'(9x,1p,3e12.4,24x,3e12.4)') ++ x (sumval(i+j),j=1,3),(ssqval(i+j),j=1,3) ++ enddo ++ iadd=iadd+9 ++ ++ write(nrite,'(/,12x,a,1p,e12.4)') 'trace/3. ', ++ x (sumval(iadd)+sumval(iadd-4)+sumval(iadd-8))/3.d0 ++ ++c write out mean cell vectors for npt ++ ++ if(keyens.gt.3.and.(keyens.le.7))then ++ ++ write(nrite,"(/,/,17x,'Average cell vectors', ++ x 41x,'r.m.s. fluctuations ',/)") ++ ++ do i=iadd,iadd+6,3 ++ write(nrite,'(3f20.10,9x,1p,3e12.4)') ++ x (sumval(i+j),j=1,3),(ssqval(i+j),j=1,3) ++ enddo ++ iadd=iadd+9 ++ ++ endif ++ ++c write out remaining registers ++ ++ check=.false. ++ do i=iadd+1,mxnstk ++ ++ if((abs(sumval(i)).gt.1.d-10).or. ++ x (abs(ssqval(i)).gt.1.d-10)) check=.true. ++ ++ enddo ++ ++ if(check)then ++ ++ write(nrite,"(/,/,12x, ++ x 'Remaining non-zero statistics registers ',/,/,12x, ++ x 'Register',7x,'Average value',8x,'r.m.s. fluc.')") ++ ++ do i=iadd+1,mxnstk ++ ++ if((abs(sumval(i)).gt.1.d-10).or. ++ x (abs(ssqval(i)).gt.1.d-10)) ++ x write(nrite,'(10x,i10,2f20.10)') i,sumval(i),ssqval(i) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c print out sample of final configuration ++ ++ write(nrite,"(/,/,1x,'sample of final configuration',/)") ++ write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',7x,'fx(i)',7x, ++ x 'fy(i)',7x,'fz(i)',/,/)") ++ io=(natms+19)/20 ++ ++ do i=1,natms,io ++ ++ write(nrite,"(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i), ++ x fxx(i),fyy(i),fzz(i) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c bypass printing averages for certain tad and bpd options ++ ++ if(goprint)then ++ ++c average volume ++ ++ avvol=sumval(19) ++ if(imcon.eq.0.or.imcon.eq.6)then ++ avvol=4.d0*pi/3.d0*rcut**3 ++ volm=avvol ++ endif ++ ++c calculate and print radial distribution functions ++ ++ if(lgofr.and.lpgr.and.(numrdf.gt.0))then ++ ++c scale densities for average volume ++ ++ do i=1,ntpatm ++ dens(i)=dens(i)*(volm/avvol) ++ enddo ++ ++ call rdf1 ++ x (lpgr,idnode,mxnode,ntpatm,numrdf,avvol,rcut) ++ ++ endif ++ ++ if(lzden.and.lpgr.and.(nzden.gt.0))then ++ call zden1(lpgr,idnode,mxnode,ntpatm,nzden,avvol,zlen) ++ endif ++ ++ if(imcon.eq.0)volm=0.d0 ++ ++ endif ++ ++c print final time check ++ ++ call timchk(1,timelp) ++ ++ return ++ end subroutine result ++ ++ subroutine diffsn0(idnode,natms,mxnode,tstep) ++ ++c*********************************************************************** ++c ++c DL_POLY routine for calculating displacements of sites from ++c t=0 positions ++c ++c use diffsn1 for mean squared displacements ++c ++c parallel version - replicated data. ++c ++c copyright daresbury laboratory 1993 ++c ++c author - t. forester june 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,natms,mxnode,iatm1,iatm2,i ++ real(8) tstep ++ ++ save newjob,iatm1,iatm2 ++ data newjob/.true./ ++ ++ if(newjob)then ++ ++ newjob=.false. ++ iatm1=(idnode*natms)/mxnode+1 ++ iatm2=((idnode+1)*natms)/mxnode ++ ++ endif ++ ++ do i=iatm1,iatm2 ++ ++ xx0(i)=xx0(i)+vxx(i)*tstep ++ yy0(i)=yy0(i)+vyy(i)*tstep ++ zz0(i)=zz0(i)+vzz(i)*tstep ++ ++ enddo ++ ++ return ++ end subroutine diffsn0 ++ ++ subroutine diffsn1(idnode,natms,ntpatm,mxnode) ++ ++c*********************************************************************** ++c ++c DL_POLY routine for calculating mean squared displacements ++c ++c displacements calculated in diffsn0 ++c ++c parallel version - replicated data. ++c ++c copyright daresbury laboratory 1993 ++c ++c author - t. forester june 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,natms,ntpatm,mxnode,iatm1,iatm2,k,i ++ ++ save newjob,iatm1,iatm2 ++ ++ data newjob/.true./ ++ ++ if(newjob)then ++ ++ newjob=.false. ++ iatm1=(idnode*natms)/mxnode+1 ++ iatm2=((idnode+1)*natms)/mxnode ++ ++ endif ++ ++c running sum of squared displacements ++ ++ do k=1,ntpatm ++ ++ amsd(k)=0.d0 ++ ++ enddo ++ ++c calculate square of displacements for each atom type ++ ++ do i=iatm1,iatm2 ++ ++ k=ltype(i) ++ amsd(k)=amsd(k)+xx0(i)**2+yy0(i)**2+zz0(i)**2 ++ ++ enddo ++ ++c global sum - replicated data strategy ++ ++ if(mxnode.gt.1)then ++ ++ do k=1,ntpatm ++ ++ buffer(k+ntpatm)=amsd(k) ++ ++ enddo ++ ++ call gdsum(buffer(1+ntpatm),ntpatm,buffer(1)) ++ ++ do k=1,ntpatm ++ ++ amsd(k)=buffer(k+ntpatm) ++ ++ enddo ++ ++ endif ++ ++c mean squared displacement ++ ++ do k=1,ntpatm ++ ++ amsd(k)=amsd(k)/dble(max(numtyp(k),1)) ++ ++ enddo ++ ++ return ++ end subroutine diffsn1 ++ ++ subroutine rdf0(iatm,ik,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for accumulating statistic for radial ++c distribution functions. ++c double precision accumulators ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer iatm,ik,m,jatm,ll,k ++ real(8) rcut,rcsq,rdelr,ai,aj,rsq,rrr ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut*rcut ++ ++c grid interval for rdf tables ++ ++ rdelr=dble(mxrdf)/rcut ++ ++c set up atom iatm type ++ ++ ai=ltype(iatm) ++ ++c start of primary loop for rdf accumulation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ jatm=ilist(m) ++ ++ aj=ltype(jatm) ++ if(ai.gt.aj)then ++ k=int(ai*(ai-1.d0)*0.5d0+aj+0.5d0) ++ else ++ k=int(aj*(aj-1.d0)*0.5d0+ai+0.5d0) ++ endif ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ ll=Min(1+Int(rrr*rdelr),mxrdf) ++ ++c accumulate statistics ++ ++ rdf(ll,k)=rdf(ll,k)+1.d0 ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine rdf0 ++ ++ subroutine rdf1 ++ x (lpgr,idnode,mxnode,ntpatm,numrdf,volm,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating radial distribution functions ++c from accumulated data. ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,ntpatm,numrdf,ia,ib,k,j ++ real(8) volm,factor,sum,rrr,dvol,gofr,rcut,delrdf ++ ++ logical lpgr,zero ++ ++ if(idnode.eq.0) write(nrite, ++ x "(/,/,12X,'RADIAL DISTRIBUTION FUNCTIONS',/,/, ++ x 'calculated using ',i10,' configurations')") numrdf ++ ++ if(lpgr)then ++ ++c open RDF file and write headers ++ ++ if(idnode.eq.0)then ++ ++ open(nrdfdt,file='RDFDAT') ++ ++ write(nrdfdt,'(80a1)')cfgname ++ write(nrdfdt,'(2i10)')mxxtyp,mxrdf ++ ++ endif ++ ++c default bin width ++ ++ delrdf=rcut/dble(mxrdf) ++ ++c construct rdf tables ++ ++ do ia=1,ntpatm ++ ++ do ib=ia,ntpatm ++ ++ k=(ib*(ib-1))/2+ia ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,'g(r) :',2a8,/,/,8x,'r',6x,'g(r)',9x,'n(r)',/)") ++ x unqatm(ia),unqatm(ib) ++ write(nrdfdt,'(2a8)')unqatm(ia),unqatm(ib) ++ ++ endif ++ ++c global sum of data on all nodes ++ ++ if(mxnode.gt.1) call gdsum(rdf(1,k),mxrdf,buffer) ++ ++c normalisation factor ++ ++ factor=volm*dens(ia)*dens(ib)*dble(numrdf) ++ if((ia.eq.ib).and.(volm*dens(ia).gt.1.d0)) ++ x factor=factor*0.5d0 ++ ++c running integration of rdf ++ ++ sum=0.d0 ++ ++c loop over distances ++ ++ zero=.true. ++ ++ do j=1,mxrdf ++ ++ if(zero.and.(j.lt.mxrdf-3)) ++ x zero=(rdf(j+2,k).le.0.d0) ++ ++ rrr=(dble(j)-0.5d0)*delrdf ++ dvol=4.d0*pi*(delrdf*rrr*rrr+(delrdf**3)/12.d0) ++ ++ gofr=rdf(j,k)/(factor*dvol) ++ sum=sum+gofr*dvol*dens(ib) ++ ++c print out information ++ ++ if(idnode.eq.0)then ++ ++ write(nrdfdt,"(1p,2e14.6)")rrr,gofr ++ if(.not.zero) ++ x write(nrite,"(f10.4,1p,2e14.6)")rrr,gofr,sum ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ if(idnode.eq.0)close (nrdfdt) ++ ++ endif ++ ++ return ++ end subroutine rdf1 ++ ++ subroutine static ++ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for accumulating periodic data during the ++c molecular dynamics simulation and computing the rolling averages ++c ++c copyright daresbury laboratory 1992 ++c ++c author - w. smith august 1992 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lbpd,lzeql,newjob ++ integer idnode,intsta,imcon,keyens,natms,nstack,nstep,j ++ integer nsteql,ntpatm,numacc,mxnode,i,iadd,k,kstak ++ integer nblock,keybpd,numbpd ++ real(8) consv,degfre,degrot,engang,engbnd,engcpe,engdih ++ real(8) enginv,engke,engrot,engsrp,engunit,engcfg,stpeng ++ real(8) stpeth,stpprs,stptmp,stpvir,stpvol,tstep,virbnd ++ real(8) engfbp,vircom,vircon,vircpe,virsrp,engfld,virfld ++ real(8) engtbp,virtbp,virpmf,virshl,engshl,engtet,virtet ++ real(8) degshl,shlke,virang,width,sclnv1,sclnv2,stprot ++ real(8) stpcns,stpshl,zistk,engmet,virmet,engter,virter ++ real(8) tbold,aterm,bterm,cterm,boost,tboost ++ ++ save newjob ++ ++ data newjob/.true./ ++ ++c open statistics file for append ++ ++ if(newjob.and.idnode.eq.0.and.intsta.gt.0)then ++ ++ open(nstats,file='STATIS',position='append') ++ newjob=.false. ++ ++ endif ++ ++ if(idnode.eq.0.and.nstep.eq.intsta.and.intsta.gt.0)then ++ ++ write(nstats,'(80a1)') cfgname ++ if(abs(engunit-9648.530821d0).le.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=electron Volts ')") ++ if(abs(engunit-9648530.821d0).le.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=kilo electron Volts ')") ++ if(abs(engunit-418.4d0).le.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=kcal/mol ')") ++ if(abs(engunit-1.d2).le.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=kjoule/mol ')") ++ if(abs(engunit-boltz).lt.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=kelvin ')") ++ if(abs(engunit-1.d0).lt.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=DL_POLY Internal Units ')") ++ ++ endif ++ ++c calculate cell volume and minimum cell half-width ++ ++ if(imcon.eq.0)then ++ ++ width=0.d0 ++ ++ stpvol=0.d0 ++ do i=1,10 ++ celprp(i)=0.d0 ++ enddo ++ ++ else ++ ++ call dcell(cell,celprp) ++ stpvol=celprp(10) ++ width=min(celprp(7),celprp(8),celprp(9))/2.d0 ++ ++ if(imcon.eq.4)then ++ ++ stpvol=0.5d0*celprp(10) ++ width=sqrt(3.d0)*cell(1)/4.d0 ++ ++ elseif(imcon.eq.5)then ++ ++ stpvol=0.5d0*celprp(10) ++ width=cell(1)/2.d0 ++ ++ elseif(imcon.eq.6)then ++ ++ width=min(celprp(7),celprp(8))/2.d0 ++ ++ elseif(imcon.eq.7)then ++ ++ stpvol=0.5d0*celprp(10) ++ ++ endif ++ ++ endif ++ ++c energetic properties of system ++ ++ stpvir=virsrp+vircpe+virbnd+vircon+vircom+virtbp+virang ++ x +virshl+virtet+virter+virmet+virfld ++ stpeng=engcfg+engke+engrot ++ stprot=2.d0*engrot/(boltz*max(1.d0,degrot)) ++ stpshl=2.d0*shlke/(boltz*max(1.d0,degshl)) ++ stptmp=2.d0*(engke+engrot)/(boltz*degfre) ++ stpprs=0.d0 ++ if(imcon.gt.0)stpprs=(2.d0*engke-stpvir)/(3.d0*stpvol) ++ stpeth=stpeng+stpprs*stpvol ++ stpcns=stpeng+consv ++ ++c convert pressure to units of katm ++ ++ stpprs=stpprs*prsunt ++ ++c calculate mean squared displacements ++c atomic displacements from origin of production run ++ ++ if((.not.lzeql).or.(nstep.gt.nsteql))then ++ ++ call diffsn0(idnode,natms,mxnode,tstep) ++ call diffsn1(idnode,natms,ntpatm,mxnode) ++ ++ endif ++ ++c zero statistics arrays ++ ++ if((nstep.le.0).or.(numacc.eq.0))then ++ ++ numacc=0 ++ ++ do i=1,mxnstk ++ ++ stpval(i)=0.d0 ++ sumval(i)=0.d0 ++ ssqval(i)=0.d0 ++ ++ enddo ++ ++ do i=1,mxatms ++ ++ xx0(i)=0.d0 ++ yy0(i)=0.d0 ++ zz0(i)=0.d0 ++ ++ enddo ++ ++ endif ++ ++c store current values in statistics array ++ ++ stpval(1) =stpcns/engunit ++ stpval(2) =stptmp ++ stpval(3) =engcfg/engunit ++ stpval(4) =(engsrp+engmet+engter)/engunit ++ stpval(5) =engcpe/engunit ++ stpval(6) =engbnd/engunit ++ stpval(7) =(engang+engtbp)/engunit ++ stpval(8) =(engdih+enginv+engfbp)/engunit ++ stpval(9) =engtet/engunit ++ stpval(10)=stpeth/engunit ++ stpval(11)=stprot ++ stpval(12)=stpvir/engunit ++ stpval(13)=(virsrp+virmet+virter)/engunit ++ stpval(14)=vircpe/engunit ++ stpval(15)=virbnd/engunit ++ stpval(16)=(virtbp+virang)/engunit ++ stpval(17)=vircon/engunit ++ stpval(18)=virtet/engunit ++ stpval(19)=stpvol ++ stpval(20)=stpshl ++ stpval(21)=engshl/engunit ++ stpval(22)=virshl/engunit ++ stpval(23)=acos(celprp(6))*180.d0/pi ++ stpval(24)=acos(celprp(5))*180.d0/pi ++ stpval(25)=acos(celprp(4))*180.d0/pi ++ stpval(26)=virpmf/engunit ++ stpval(27)=stpprs ++ ++ iadd=27 ++ ++c mean squared displacements ++ ++ if((.not.lzeql).or.(nstep.gt.nsteql))then ++ ++ do k=1,ntpatm ++ ++ stpval(iadd+k)=amsd(k) ++ ++ enddo ++ ++ endif ++ ++ iadd=iadd+ntpatm ++ ++c stress tensor ++ ++ if(abs(stpvol).le.1.d-10) stpvol=1.d0 ++ do i=1,9 ++ stpval(iadd+i)=stress(i)*prsunt/(stpvol) ++ enddo ++ iadd=iadd+9 ++ ++c cell vectors ++ ++ if(keyens.gt.3.and.(keyens.le.7))then ++ do i=1,9 ++ stpval(iadd+i)=cell(i) ++ enddo ++ iadd=iadd+9 ++ endif ++ ++c check on number of variables for stack - ++ ++ if(iadd.gt.mxnstk) call error(idnode,170) ++ ++c accumulate totals over steps ++ ++ numacc=numacc+1 ++ sclnv2=1.d0/dble(numacc) ++ sclnv1=dble(numacc-1)/dble(numacc) ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++c calculate true thermodynamic averages in bias potential system ++c note integers numacc and numbpd should be equal in this case ++ ++ tbold=tboost*dble(numbpd)/dble(numbpd-1)-boost/dble(numbpd-1) ++ cterm=0.d0 ++ do i=1,mxnstk ++ ++ aterm=sumval(i)*tbold ++ bterm=ssqval(i)*tbold**2 ++ if(tbold.gt.0.d0)cterm=(bterm+aterm**2)/tbold ++ ssqval(i)=(sclnv1*(sclnv1*bterm+boost*sclnv2*(cterm+ ++ x (tbold*stpval(i)-2.d0*aterm)*stpval(i))))/tboost**2 ++ sumval(i)=(sclnv1*aterm+boost*sclnv2*stpval(i))/tboost ++ ++ enddo ++ ++ else ++ ++c calculate true thermodynamic averages in normal system ++ ++ do i=1,mxnstk ++ ++ ssqval(i)=sclnv1*(ssqval(i)+sclnv2*(stpval(i)-sumval(i))**2) ++ sumval(i)=sclnv1*sumval(i)+sclnv2*stpval(i) ++ ++ enddo ++ ++ endif ++ ++c write statistics file ++ ++ if(idnode.eq.0.and.intsta.gt.0)then ++ ++ if(mod(nstep,intsta).eq.0)then ++ ++ write(nstats,'(i10,1p,e14.6,0p,i10,/,(1p,5e14.6))') ++ x nstep,nstep*tstep,iadd,(stpval(k),k=1,iadd) ++ call flush(nstats) ++c$$$c write option for Excel spreadsheet ++c$$$ write(nstats,'(i10,1p,e14.6,0p,i10,300(1p,5e14.6))') ++c$$$ x nstep,nstep*tstep,iadd,(stpval(k),k=1,iadd) ++ ++ endif ++ ++ endif ++ ++c zero rolling average accumulators ++ ++ if(nstep.le.0)then ++ ++ numacc=0 ++ ++ do i=1,mxnstk ++ ++ zumval(i)=0.d0 ++ ++ do j=1,mxstak ++ ++ stkval(j,i)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c store quantities in stack ++ ++ kstak=mod(nstep-1,nstack)+1 ++ ++ if(nstep.gt.nstack)then ++ ++ do i=1,mxnstk ++ ++ zumval(i)=zumval(i)-stkval(kstak,i) ++ ++ enddo ++ ++ endif ++ ++ do i=1,mxnstk ++ ++ stkval(kstak,i)=stpval(i) ++ zumval(i)=zumval(i)+stpval(i) ++ ++ enddo ++ ++c calculate rolling averages ++ ++ zistk=min(nstack,nstep) ++ ++ do i=1,mxnstk ++ ++ ravval(i)=zumval(i)/zistk ++ ++ enddo ++ ++c zero accumulators during equilibration period ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numacc=0 ++ do i=1,mxnstk ++ ++ sumval(i)=0.d0 ++ ssqval(i)=0.d0 ++ ++ enddo ++ ++ endif ++ ++c close statistics file at regular intervals ++ ++ if(.not.newjob.and.mod(nstep,ndump).eq.0)then ++ ++ if(idnode.eq.0)close (nstats) ++ newjob=.true. ++ ++ endif ++ ++ return ++ end subroutine static ++ ++ subroutine revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing restart files at job termination ++c or at selected intervals in simulation ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith dec 1992. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzden ++ integer idnode,imcon,mxnode,natms,nstep,nzden,numacc,numrdf ++ integer levcfg,nsum,nbuff,i,j ++ real(8) chip,chit,conint,tstep,engcfg,rmxnode,virtot,vircom ++ real(8) tboost,chit_shl ++ ++ if(mxnode.gt.1)then ++ ++c merge displacement data ++ ++ call merge(idnode,mxnode,natms,mxbuff,xx0,yy0,zz0,buffer) ++ ++c globally sum rdf information before saving ++ ++ if(lgofr)then ++ ++c maximum rdfs that can be summed in each step ++ ++ nsum=mxbuff/mxrdf ++ if(nsum.eq.0) call error(idnode,200) ++ ++ nbuff=nsum*mxrdf ++ ++ do i=1,mxxtyp,nsum ++ ++ if((mxxtyp+1-i).lt.nsum) nbuff=(mxxtyp+1-i)*mxrdf ++ call gdsum(rdf(1,i),nbuff,buffer) ++ ++ enddo ++ ++ endif ++ ++c globally sum zden information before saving ++ ++ if(lzden)then ++ ++c maximum zdfs that can be summed in each step ++ ++ nsum=mxbuff/mxzdn ++ if(nsum.eq.0) call error(idnode,200) ++ ++ nbuff=nsum*mxzdn ++ ++ do i =1,mxatyp,nsum ++ ++ if((mxatyp+1-i).lt.nsum) nbuff=(mxatyp+1-i)*mxzdn ++ call gdsum(zdens(1,i),nbuff,buffer) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c node 0 handles i/o ++ ++ if(idnode.eq.0)then ++ ++c write configuration data to new configuration file ++ ++ call config_write('REVCON',levcfg,imcon,natms,engcfg) ++ ++c write accumulator data to dump file ++ ++ open(nrest,file='REVIVE',form='unformatted') ++ ++ write(nrest) dble(nstep),dble(numacc),dble(numrdf),chit, ++ x chip,conint,dble(nzden),tboost,chit_shl ++ write(nrest) virtot,vircom,eta,strcns,strbod ++ write(nrest) stpval ++ write(nrest) sumval ++ write(nrest) ssqval ++ write(nrest) zumval ++ write(nrest) ravval ++ write(nrest) stkval ++ write(nrest) xx0,yy0,zz0 ++ write(nrest) xxs,yys,zzs ++ if(lgofr) write(nrest) rdf ++ if(lzden) write(nrest) zdens ++ ++ close (nrest) ++ ++ endif ++ ++c divide rdf data between nodes ++ ++ rmxnode=1.d0/dble(mxnode) ++ ++ if(lgofr)then ++ ++ do i=1,mxxtyp ++ ++ do j=1,mxrdf ++ ++ rdf(j,i)=rdf(j,i)*rmxnode ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c divide zdensity data between nodes ++ ++ if(lzden)then ++ ++ do i=1,mxatyp ++ ++ do j=1,mxzdn ++ ++ zdens(j,i)=zdens(j,i)*rmxnode ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine revive ++ ++ subroutine zden0(idnode,natms,mxnode,nzden,zlen) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for accumulating statistic for density profile ++c zlen=length of cell in z direction ++c ++c double precision accumulators ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nzden,iatm,ll,k ++ real(8) zlen,zleno2,rzdn ++ ++c accumulator ++ ++ nzden=nzden+1 ++ ++c half of z length ++ ++ zleno2=zlen*0.5d0 ++ ++c grid interval for density profiles ++ ++ rzdn=dble(mxzdn)/zlen ++ ++c set up atom iatm type ++ ++ do iatm=idnode+1,natms,mxnode ++ ++ k =ltype(iatm) ++ ++ ll=int((zzz(iatm)+zleno2)*rzdn+1.0d0) ++ ++c accumulate statistic ++ ++ if(ll.gt.0.and.ll.le.mxzdn)zdens(ll,k)=zdens(ll,k)+1.d0 ++ ++ enddo ++ ++ return ++ end subroutine zden0 ++ ++ subroutine zden1 ++ x (lpgr,idnode,mxnode,ntpatm,nzden,volm,zlen) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating Z density profile ++c from accumulated data. ++c double precision version ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lpgr ++ integer idnode,mxnode,ntpatm,nzden,k,j ++ real(8) volm,zlen,delzdn,dvolz,factor,sum,rrr,rho ++ ++ if(idnode.eq.0) write(nrite, ++ x "(/,/,12X,'Z DENSITY PROFILES',/,/, ++ x 'calculated using ',i10,' configurations')") nzden ++ ++ if(lpgr)then ++ ++c open Z density file and write headers ++ ++ if(idnode.eq.0)then ++ ++ open(nzdndt,file='ZDNDAT') ++ ++ write(nzdndt,'(80a1)')cfgname ++ write(nzdndt,'(2i10)')ntpatm,mxzdn ++ ++ endif ++ ++c volume of z strip (arbitrary) ++ ++ delzdn=zlen/dble(mxzdn) ++ dvolz=(volm/zlen)*delzdn ++ ++c normalisation factor ++ ++ nzden=max(nzden,1) ++ factor=1.d0/(dble(nzden)*dvolz) ++ ++ do k=1,ntpatm ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,'rho(r) :',a8,/,/,8x,'r',6x,'rho',9x,'n(r)',/)") ++ x unqatm(k) ++ write(nzdndt,'(a8)')unqatm(k) ++ ++ endif ++ ++c global sum of data on all nodes ++ ++ if(mxnode.gt.1)call gdsum(zdens(1,k),mxzdn,buffer) ++ ++c running integration of z-density ++ ++ sum=0.d0 ++ ++c loop over distances ++ ++ do j=1,mxzdn ++ ++ rrr=(dble(j)-0.5d0)*delzdn-zlen*0.5d0 ++ rho=zdens(j,k)*factor ++ sum=sum+rho*dvolz ++ ++c print out information ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(f10.4,1p,2e14.6)") rrr,rho,sum ++ write(nzdndt,"(1p,2e14.6)") rrr,rho ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ if(idnode.eq.0)close (nzdndt) ++ ++ endif ++ ++ return ++ end subroutine zden1 ++ ++ subroutine rdf0neu(ik,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for accumulating statistic for radial ++c distribution functions. ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c amended t. forester april 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer ik,m,iatm,jatm,ll,k ++ real(8) rcut,a0,a1,a2,a3,a4,a5,rcsq,rrcsq,sqlim,rdelr ++ real(8) ai,aj,rsq,rrr,sss ++ ++ data a0,a1,a2,a3,a4,a5/.0837557783d0,2.9399054d0,-7.8475201d0, ++ x 14.1328992d0,-12.6228528d0,4.32084948d0/ ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ rrcsq=1.d0/rcsq ++ sqlim=0.01d0*rcsq ++ ++c grid interval for rdf tables ++ ++ rdelr=dble(mxrdf)/rcut ++ ++c start of primary loop for rdf accumulation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ iatm=ilist(m) ++ ai=ltype(iatm) ++ ++ jatm=jlist(m) ++ aj=ltype(jatm) ++ ++ if(ai.gt.aj)then ++ ll=int(ai*(ai-1.d0)*0.5d0+aj+0.5d0) ++ k=lstvdw(ll) ++ else ++ ll=int(aj*(aj-1.d0)*0.5d0+ai+0.5d0) ++ k=lstvdw(ll) ++ endif ++ ++ rsq=rsqdf(m) ++ ++ if(rcsq.gt.rsq)then ++ ++c determine interpolation panel for rdf table ++ ++ if(rsq.lt.sqlim)then ++ ++ rrr=sqrt(rsq) ++ ++ else ++ ++c interpolate square-root by polynomial plus newton-raphson ++ ++ sss=rsq*rrcsq ++ rrr=1.d0/ ++ x (a0 +sss*(a1+sss*(a2+sss*(a3+sss*(a4+sss*a5))))) ++ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr) ++ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr) ++ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr)*sss*rcut ++ ++ endif ++ ++ ll=int(rrr*rdelr+0.999999d0) ++ ++c accumulate statistics ++ ++ rdf(ll,k)=rdf(ll,k)+1.d0 ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine rdf0neu ++ ++ end module property_module +diff -urN dl_class_1.9.orig/srcmod/rigid_body_module.f dl_class_1.9/srcmod/rigid_body_module.f +--- dl_class_1.9.orig/srcmod/rigid_body_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/rigid_body_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,243 @@ ++ module rigid_body_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining rigid body arrays ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use parse_module ++ use setup_module ++ use site_module ++ use solvation_module ++ ++ implicit none ++ ++ real(8), allocatable :: omx(:),omy(:),omz(:) ++ real(8), allocatable :: gcmx(:),gcmy(:),gcmz(:) ++ real(8), allocatable :: gvxx(:),gvyy(:),gvzz(:),gmass(:) ++ real(8), allocatable :: q0(:),q1(:),q2(:),q3(:) ++ real(8), allocatable :: gxx(:,:),gyy(:,:),gzz(:,:) ++ real(8), allocatable :: rotinx(:,:),rotiny(:,:),rotinz(:,:) ++ integer, allocatable :: lstrgd(:),numgsit(:),lstgtp(:) ++ integer, allocatable :: listyp(:),lstgst(:,:),lstfre(:) ++ integer, allocatable :: lstme(:),lstbod(:),lstcsit(:) ++ ++ save omx,omy,omz,gcmx,gcmy,gcmz,gvxx,gvyy,gvzz,gmass ++ save q0,q1,q2,q3,gxx,gyy,gzz,rotinx,rotiny,rotinz ++ save lstrgd,numgsit,lstgtp,listyp,lstgst,lstfre,lstme ++ save lstbod,lstcsit ++ ++ contains ++ ++ subroutine alloc_rgbdy_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (omx(mxgrp),omy(mxgrp),omz(mxgrp),stat=fail(1)) ++ allocate (gcmx(mxgrp),gcmy(mxgrp),gcmz(mxgrp),stat=fail(2)) ++ allocate (gvxx(mxgrp),gvyy(mxgrp),gvzz(mxgrp),stat=fail(3)) ++ allocate (q0(mxgrp),q1(mxgrp),q2(mxgrp),q3(mxgrp),stat=fail(4)) ++ allocate (gxx(mxungp,mxngp),gyy(mxungp,mxngp),stat=fail(5)) ++ allocate (gzz(mxungp,mxngp),gmass(mxungp),stat=fail(6)) ++ allocate (rotinx(mxungp,2),rotiny(mxungp,2),stat=fail(7)) ++ allocate (rotinz(mxungp,2),lstgtp(mxgrp),stat=fail(8)) ++ allocate (lstrgd(mxgatm),numgsit(mxungp),stat=fail(9)) ++ allocate (listyp(mxungp),lstgst(mxungp,mxngp),stat=fail(10)) ++ allocate (lstfre(mxatms),lstme(mxatms),stat=fail(11)) ++ allocate (lstbod(mxatms),lstcsit(2*mxcons),stat=fail(12)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1013) ++ enddo ++ ++ end subroutine alloc_rgbdy_arrays ++ ++ subroutine define_rigid_body ++ x (safe,lghost,idnode,itmols,ngrp,natmsr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining rigid bodies ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c adapted - p-a cazade oct 2007, solvation, excitation etc. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lghost,site_test ++ integer idnode,itmols,ngrp,ntmp,idum,igrp ++ integer j,site,natmsr ++ ++ ngrp_ghost=0 ++ ntmp=intstr(record,lenrec,idum) ++ numgrp(itmols)=numgrp(itmols)+ntmp ++ if(idnode.eq.0) then ++ write(nrite,"(/,1x,'number of rigid units ', ++ x 6x,i10)") ntmp ++ write(nrite,"(/,' rigid body details:',/,/,21x, ++ x 6x,'unit',3x,'indices',/) ") ++ endif ++ ++ do igrp=1,numgrp(itmols) ++ ++ ngrp=ngrp+1 ++ site_test=.true. ++ ++ if(ngrp.gt.mxungp) call error(idnode,301) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ numgsit(ngrp)=intstr(record,lenrec,idum) ++ if(numgsit(ngrp).gt.mxngp) ++ x call error (idnode,302) ++ ++ listyp(ngrp)=ngrp ++ ++ do j=1,numgsit(ngrp) ++ ++ site=intstr(record,lenrec,idum) ++ ++ if(site.eq.0)then ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ site=intstr(record,lenrec,idum) ++ ++ endif ++ ++ lstgst(ngrp,j)=site ++ ++ if(lghost)then ++ ++ if(site_test)then ++ ++ if(site+natmsr.ge.ind_fre(3))then ++ ++ site_test=.false. ++ ngrp_ghost=ngrp_ghost+1 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0) ++ x write(nrite,"(21x,10i10,100(/,21x,10i10))") ++ x listyp(ngrp),(lstgst(ngrp,j),j=1, ++ x numgsit(ngrp)) ++ ++ enddo ++ ++ numgrp(itmols)=numgrp(itmols)-ngrp_ghost ++ ngrp=ngrp-ngrp_ghost ++ ++ return ++ end subroutine define_rigid_body ++ ++ subroutine bodystress ++ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c*********************************************************************** ++c ++c dlpoly routine to calculate rigid body contributions to the ++c stress tensor ++c ++c copyright daresbury laboratory ++c author w.smith aug 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i,j,ig,id,jr,igrp1,igrp2,idnode,mxnode,ngrp ++ real(8) vircom,strbod,dtx,dty,dtz ++ ++ dimension dtx(mxatms),dty(mxatms),dtz(mxatms),strbod(9) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c zero stress tensor accumulators ++ ++ vircom=0.d0 ++ do i=1,9 ++ strbod(i)=0.d0 ++ enddo ++ ++c convert atomic virial to molecular ++c note convention: virial(atom-atom)=-sum(Ri.Fi) ++c : virial(com-com)=-sum(Rcom.Fcom) so ++c virial(com-com)=virial(atom-atom)+sum((Ri-Rcom).Fi) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ vircom=vircom+ ++ x (dtx(jr)*fxx(i)+dty(jr)*fyy(i)+dtz(jr)*fzz(i)) ++ ++c stress tensor : rigid body contributions ++ ++ strbod(1)=strbod(1)-dtx(jr)*fxx(i) ++ strbod(2)=strbod(2)-dtx(jr)*fyy(i) ++ strbod(3)=strbod(3)-dtx(jr)*fzz(i) ++ strbod(4)=strbod(4)-dty(jr)*fxx(i) ++ strbod(5)=strbod(5)-dty(jr)*fyy(i) ++ strbod(6)=strbod(6)-dty(jr)*fzz(i) ++ strbod(7)=strbod(7)-dtz(jr)*fxx(i) ++ strbod(8)=strbod(8)-dtz(jr)*fyy(i) ++ strbod(9)=strbod(9)-dtz(jr)*fzz(i) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ call gdsum(strbod,9,buffer) ++ buffer(1)=vircom ++ call gdsum(buffer(1),1,buffer(2)) ++ vircom=buffer(1) ++ ++ endif ++ ++c symmetrise stress tensor ++ ++ strbod(2)=0.5d0*(strbod(2)+strbod(4)) ++ strbod(4)=strbod(2) ++ strbod(3)=0.5d0*(strbod(3)+strbod(7)) ++ strbod(7)=strbod(3) ++ strbod(6)=0.5d0*(strbod(6)+strbod(8)) ++ strbod(8)=strbod(6) ++ ++ return ++ end subroutine bodystress ++ ++ end module rigid_body_module +diff -urN dl_class_1.9.orig/srcmod/serial.f dl_class_1.9/srcmod/serial.f +--- dl_class_1.9.orig/srcmod/serial.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/serial.f 2015-11-09 14:15:45.064258843 +0100 +@@ -0,0 +1,543 @@ ++ subroutine initcomms() ++ ++c********************************************************************* ++c ++c dummy initcomms routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ return ++ end ++ ++ integer*8 function get_comms() ++c********************************************************************* ++c ++c dummy machine routine for serial DL_POLY with PLUMED ++c ++c******************************************************************** ++ ++ implicit none ++ ++ get_comms=0 ++ ++ return ++ end ++ ++ subroutine machine(idnode,mxnode) ++ ++c********************************************************************* ++c ++c dummy machine routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode ++ ++ idnode=0 ++ mxnode=1 ++ ++ return ++ end ++ ++ integer function mynode() ++ ++c********************************************************************* ++c ++c dummy mynode routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ mynode=0 ++ ++ return ++ end ++ ++ integer function nodedim() ++ ++c********************************************************************* ++c ++c dummy nodedim routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ nodedim=0 ++ ++ return ++ end ++ ++ integer function numnodes() ++ ++c********************************************************************* ++c ++c dummy numnodes routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ numnodes=1 ++ ++ return ++ end ++ ++ subroutine csend(msgtag,buf,length,pe,idum) ++ ++c********************************************************************* ++c ++c dummy csend routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ integer msgtag,length,pe,idum ++ ++ real(8) buf(*) ++ ++ return ++ end ++ ++ subroutine crecv(msgtag,buf,length) ++ ++c********************************************************************* ++c ++c dummy crecv routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer msgtag,length ++ real(8) buf(*) ++ ++ return ++ end ++ ++ subroutine gisum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy isum for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ integer aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gdsum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ real(8) aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gimax(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ integer aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gstate(check) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical check ++ ++ return ++ end ++ ++ subroutine gsync() ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ return ++ end ++ ++ subroutine exitcomms() ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ stop ++ end ++ ++ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ implicit none ++ ++ integer idnode,mxnode,natms,nbuff ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms ++ integer lstme(*) ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ngrp,nbuff ++ real(8) q0(*),q1(*),q2(*),q3(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine shlmerge(idnode,mxnode,ntshl) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl ++ ++ return ++ end ++ ++ subroutine shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode, mxnode, natms ++ integer lishap(*),lashap(*) ++ real(8) xxt(*),yyt(*),zzt(*),txx(*),tyy(*),tzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,natms ++ integer listme(*),listot(*) ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ logical lshmov ++ integer idnode,mxnode,natms,nscons,i,j,k ++ integer lashap(mxproc),lishap(mxlshp),listme(mxatms) ++ integer listin(mxatms),listot(mxatms),listcon(mxcons,3) ++ integer lstfrz(mxatms) ++ ++ do i=1,natms ++ listme(i)=0 ++ enddo ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ listme(i)=listme(i)+1 ++ listme(j)=listme(j)+1 ++ ++ enddo ++ ++c keep record of all atoms subject to constraints ++ ++ do i=1,natms ++ ++ if(listme(i).gt.0)then ++ listot(i)=1 ++ else ++ listot(i)=0 ++ endif ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use error_module ++ use setup_module ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nspmf,i,j,k ++ integer listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) ++ integer lstpmf(mxspmf,mspmf),npmf(2) ++ ++ if(mxpmf.lt.natms) call error(idnode,490) ++ ++ do i=1,natms ++ listpm(i)=0 ++ enddo ++ ++ do k=1,nspmf ++ ++ do j = 1,npmf(1)+npmf(2) ++ ++ i=lstpmf(j,k) ++ listpm(i)= 1 ++ ++ enddo ++ ++ enddo ++ ++c keep record of all atoms subject to pmf constraints ++ ++ do i=1,natms ++ ++ if(listpm(i).gt.0)then ++ lstpmt(i)=1 ++ else ++ lstpmt(i)=0 ++ endif ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ logical lcnb ++ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,jj,id,igrp1,igrp2 ++ integer i,j,k,jr,igrp,itmols,imols,ik,lgrp ++ integer listin(mxatms),listcon(mxcons,3),lstrgd(mxgatm) ++ integer lstout(mxatms),lstcsit(2*mxcons),numgsit(mxungp) ++ integer lstgtp(mxgrp),nummols(mxtmls),numgrp(mxtmls) ++ ++c block indices for groups ++ ++ igrp1 = (idnode*ngrp)/mxnode + 1 ++ igrp2 = ((idnode+1)*ngrp)/mxnode ++ ++c locate site indices of atoms in constraints ++ ++ do i = 1,natms ++ listin(i) = 0 ++ enddo ++ ++c loop over molecule types ++ ++ jr = 0 ++ igrp = 0 ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then ++ ++ id = lstgtp(igrp) ++ do jj = 1,numgsit(id) ++ ++ jr = jr +1 ++ i = lstrgd(jr) ++ listin(i) = jj ++ ++ enddo ++ endif ++ enddo ++ enddo ++ enddo ++ ++ lcnb = .true. ++ ik = 0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ if(listin(i).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(i) ++ lcnb = .false. ++ endif ++ ++ if(listin(j).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(j) ++ lcnb = .false. ++ endif ++ ++ enddo ++ ++c lcnb flags bodies connected by constraints ++ ++ lcnb = (.not.lcnb) ++ ++ return ++ end ++ +diff -urN dl_class_1.9.orig/srcmod/serial.f.preplumed dl_class_1.9/srcmod/serial.f.preplumed +--- dl_class_1.9.orig/srcmod/serial.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/serial.f.preplumed 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,529 @@ ++ subroutine initcomms() ++ ++c********************************************************************* ++c ++c dummy initcomms routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ return ++ end ++ ++ subroutine machine(idnode,mxnode) ++ ++c********************************************************************* ++c ++c dummy machine routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode ++ ++ idnode=0 ++ mxnode=1 ++ ++ return ++ end ++ ++ integer function mynode() ++ ++c********************************************************************* ++c ++c dummy mynode routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ mynode=0 ++ ++ return ++ end ++ ++ integer function nodedim() ++ ++c********************************************************************* ++c ++c dummy nodedim routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ nodedim=0 ++ ++ return ++ end ++ ++ integer function numnodes() ++ ++c********************************************************************* ++c ++c dummy numnodes routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ numnodes=1 ++ ++ return ++ end ++ ++ subroutine csend(msgtag,buf,length,pe,idum) ++ ++c********************************************************************* ++c ++c dummy csend routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ integer msgtag,length,pe,idum ++ ++ real(8) buf(*) ++ ++ return ++ end ++ ++ subroutine crecv(msgtag,buf,length) ++ ++c********************************************************************* ++c ++c dummy crecv routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer msgtag,length ++ real(8) buf(*) ++ ++ return ++ end ++ ++ subroutine gisum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy isum for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ integer aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gdsum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ real(8) aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gimax(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ integer aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gstate(check) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical check ++ ++ return ++ end ++ ++ subroutine gsync() ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ return ++ end ++ ++ subroutine exitcomms() ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ stop ++ end ++ ++ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ implicit none ++ ++ integer idnode,mxnode,natms,nbuff ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms ++ integer lstme(*) ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ngrp,nbuff ++ real(8) q0(*),q1(*),q2(*),q3(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine shlmerge(idnode,mxnode,ntshl) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl ++ ++ return ++ end ++ ++ subroutine shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode, mxnode, natms ++ integer lishap(*),lashap(*) ++ real(8) xxt(*),yyt(*),zzt(*),txx(*),tyy(*),tzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,natms ++ integer listme(*),listot(*) ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ logical lshmov ++ integer idnode,mxnode,natms,nscons,i,j,k ++ integer lashap(mxproc),lishap(mxlshp),listme(mxatms) ++ integer listin(mxatms),listot(mxatms),listcon(mxcons,3) ++ integer lstfrz(mxatms) ++ ++ do i=1,natms ++ listme(i)=0 ++ enddo ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ listme(i)=listme(i)+1 ++ listme(j)=listme(j)+1 ++ ++ enddo ++ ++c keep record of all atoms subject to constraints ++ ++ do i=1,natms ++ ++ if(listme(i).gt.0)then ++ listot(i)=1 ++ else ++ listot(i)=0 ++ endif ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use error_module ++ use setup_module ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nspmf,i,j,k ++ integer listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) ++ integer lstpmf(mxspmf,mspmf),npmf(2) ++ ++ if(mxpmf.lt.natms) call error(idnode,490) ++ ++ do i=1,natms ++ listpm(i)=0 ++ enddo ++ ++ do k=1,nspmf ++ ++ do j = 1,npmf(1)+npmf(2) ++ ++ i=lstpmf(j,k) ++ listpm(i)= 1 ++ ++ enddo ++ ++ enddo ++ ++c keep record of all atoms subject to pmf constraints ++ ++ do i=1,natms ++ ++ if(listpm(i).gt.0)then ++ lstpmt(i)=1 ++ else ++ lstpmt(i)=0 ++ endif ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ logical lcnb ++ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,jj,id,igrp1,igrp2 ++ integer i,j,k,jr,igrp,itmols,imols,ik,lgrp ++ integer listin(mxatms),listcon(mxcons,3),lstrgd(mxgatm) ++ integer lstout(mxatms),lstcsit(2*mxcons),numgsit(mxungp) ++ integer lstgtp(mxgrp),nummols(mxtmls),numgrp(mxtmls) ++ ++c block indices for groups ++ ++ igrp1 = (idnode*ngrp)/mxnode + 1 ++ igrp2 = ((idnode+1)*ngrp)/mxnode ++ ++c locate site indices of atoms in constraints ++ ++ do i = 1,natms ++ listin(i) = 0 ++ enddo ++ ++c loop over molecule types ++ ++ jr = 0 ++ igrp = 0 ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then ++ ++ id = lstgtp(igrp) ++ do jj = 1,numgsit(id) ++ ++ jr = jr +1 ++ i = lstrgd(jr) ++ listin(i) = jj ++ ++ enddo ++ endif ++ enddo ++ enddo ++ enddo ++ ++ lcnb = .true. ++ ik = 0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ if(listin(i).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(i) ++ lcnb = .false. ++ endif ++ ++ if(listin(j).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(j) ++ lcnb = .false. ++ endif ++ ++ enddo ++ ++c lcnb flags bodies connected by constraints ++ ++ lcnb = (.not.lcnb) ++ ++ return ++ end ++ +diff -urN dl_class_1.9.orig/srcmod/setup_module.f dl_class_1.9/srcmod/setup_module.f +--- dl_class_1.9.orig/srcmod/setup_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/setup_module.f 2011-07-11 17:09:10.000000000 +0200 +@@ -0,0 +1,1664 @@ ++ module setup_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining default array sizes ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c note the following internal units apply everywhere ++c ++c unit of time (to) = 1 x 10**(-12) seconds ++c unit of length (lo) = 1 x 10**(-10) metres ++c unit of mass (mo) = 1.6605402 x 10**(-27) kilograms ++c unit of charge (qo) = 1.60217733 x 10**(-19) coulombs ++c unit of energy (eo) = 1.6605402 x 10**(-23) joules ++c unit of pressure (po) = 1.6605402 x 10**( 7) pascals ++c ++c********************************************************************* ++ ++ use parse_module ++ ++ implicit none ++ ++c FIXED PARAMETERS ++ ++c standard pi values ++ ++ real(8), parameter :: pi=3.141592653589793d0 ++ real(8), parameter :: sqrpi=1.7724538509055159d0 ++ ++c conversion factor for coulombic terms in internal units ++c i.e. (unit(charge)**2/(4 pi eps0 unit(length))/unit(energy) ++ ++ real(8), parameter :: r4pie0=138935.4835d0 ++ ++c boltzmann constant in internal units ++ ++ real(8), parameter :: boltz=8.31451115d-1 ++ ++c planck's constant in internal units ++ ++ real(8), parameter :: hbar=6.350780719d0 ++ ++c conversion factor for pressure from internal units to katm ++ ++ real(8), parameter :: prsunt=0.163882576d0 ++ ++c main input channel ++ ++ integer, parameter :: nread=5 ++ ++c main output channel ++ ++ integer, parameter :: nrite=6 ++ ++c force field input channel ++ ++ integer, parameter :: nfield=9 ++ ++c configuration file input channel ++ ++ integer, parameter :: nconf=10 ++ ++c statistical data file output channel ++ ++ integer, parameter :: nstats=20 ++ ++c trajectory history file channel ++ ++ integer, parameter :: nhist=21 ++ ++c acummulators restart dump file ++ ++ integer, parameter :: nrest=22 ++ ++c tabulated potential file channel ++ ++ integer, parameter :: ntable=23 ++ ++c rdf file channel number ++ ++ integer, parameter :: nrdfdt=24 ++ ++c z density file channel number ++ ++ integer, parameter :: nzdndt=25 ++ ++c hyperdynamics reference basin file ++ ++ integer, parameter :: nbsn=30 ++ ++c neb reaction path profile file ++ ++ integer, parameter :: npro=31 ++ ++c hyperdynamics events journal file ++ ++ integer, parameter :: nevnt=33 ++ ++c hyperdynamics tracking file ++ ++ integer, parameter :: ntrk=32 ++ ++c hyperdynamics restart file ++ ++ integer, parameter :: nhrs=35 ++ ++c free energy data file ++ ++ integer, parameter :: nfrnwr=41 ++ ++c solvation data file ++ ++ integer, parameter :: nsolwr=43 ++ ++c data dumping interval in event of system crash ++ ++ integer, parameter :: ndump=1000 ++ ++c maximum number of neb calculations ++ ++ integer, parameter :: maxneb=10 ++ ++c array allocation parameters (set by subroutine parset) ++ ++ integer kmaxa,kmaxb,kmaxc,minnode,msatms,msbad,msgrp ++ integer mspmf,msteth,mxangl,mxatms,mxbond,mxbuff,mxcell ++ integer mxcons,mxdihd,mxewld,mxexcl,mxfbp,mxfld,mxgatm,mxgrid ++ integer mxgrp,mxinv,mxlist,mxlshp,mxneut,mxngp,mxnstk,mxpang ++ integer mxpbnd,mxpdih,mxpfbp,mxpinv,mxpmf,mxproc,mxptbp,mxpvdw ++ integer mxrdf,mxzdn,mxshl,mxsite,mxspmf,mxstak,mxtang,mxtbnd ++ integer mxtbp,mxtcon,mxtdih,mxteth,mxtinv,mxtmls,mxtshl,mxungp ++ integer mxvdw,mxxdf,mx2tbp,mx3fbp,mxebuf,mxquat,mxshak,mxspl ++ integer kmaxd,kmaxe,kmaxf,mxspme,mxftab,mxhko,mxegrd,mxhke ++ integer mxmet,mxsmet,mxpmet,mxter,mxpter,mxatyp,mxxtyp ++ integer mxtmls_fre,mxewld_fre,mxebuf_fre,mxatms_fre,mxatyp_exc ++ integer mxtmls_exc,mxtmls_sol,mxebuf_sol,mxatms_sol ++ ++ save kmaxa,kmaxb,kmaxc,minnode,msatms,msbad,msgrp ++ save mspmf,msteth,mxangl,mxatms,mxbond,mxbuff,mxcell ++ save mxcons,mxdihd,mxewld,mxexcl,mxfbp,mxfld,mxgatm,mxgrid ++ save mxgrp,mxinv,mxlist,mxlshp,mxneut,mxngp,mxnstk,mxpang ++ save mxpbnd,mxpdih,mxpfbp,mxpinv,mxpmf,mxproc,mxptbp,mxpvdw ++ save mxrdf,mxzdn,mxshl,mxsite,mxspmf,mxstak,mxtang,mxtbnd ++ save mxtbp,mxtcon,mxtdih,mxteth,mxtinv,mxtmls,mxtshl,mxungp ++ save mxvdw,mxxdf,mx2tbp,mx3fbp,mxebuf,mxquat,mxshak,mxspl ++ save kmaxd,kmaxe,kmaxf,mxspme,mxftab,mxhko,mxegrd,mxhke ++ save mxmet,mxsmet,mxpmet,mxter,mxpter,mxatyp,mxxtyp ++ save mxtmls_fre,mxewld_fre,mxebuf_fre,mxatms_fre,mxatyp_exc ++ save mxtmls_exc,mxtmls_sol,mxebuf_sol,mxatms_sol ++ ++ contains ++ ++ subroutine parset(redirect,idnode,mxnode,buffer) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to determine required array sizes for ++c allocation of memory manager ++c ++c copyright daresbury laboratory 1997 ++c author - w.smith june 1997 ++c ++c*********************************************************************** ++ ++ logical loglnk,lewald,lspme,lhke,nolink,lcshft ++ logical lsolva,lfree,lfrmas,lghost,redirect ++ real(8) cell,celprp,rctbp,rcfbp,volm,xhi,yhi,zhi,rcut,rvdw ++ real(8) densvar,delr,cut,dens,ratio,drdf,dzdn,rcter,buffer ++ real(8) zlen ++ integer imcon,nhko,ilx,ily,ilz,ncells ++ integer idnode,mxnode,mxn1 ++ ++ dimension cell(9),celprp(10),buffer(10) ++ ++ lhke=.false. ++ lspme=.false. ++ lewald=.false. ++ lcshft=.false. ++ nolink=.false. ++ redirect=.false. ++ mxtmls_sol=1 ++ mxebuf_sol=1 ++ mxatms_sol=1 ++ mxtmls_fre=1 ++ mxewld_fre=1 ++ mxebuf_fre=1 ++ mxatms_fre=1 ++ mxatyp_exc=1 ++ mxtmls_exc=1 ++ ++c specify maximum and minimum nodes ++ ++ mxproc=mxnode ++ minnode=mxnode ++ ++c scan the FIELD file data ++ ++ call fldscan(idnode,mxn1,rctbp,rcfbp,rcter) ++ ++c scan CONFIG file data ++ ++ call cfgscan ++ x (idnode,nconf,imcon,volm,xhi,yhi,zhi,cell,buffer) ++ ++c scan CONTROL file data ++ ++ call conscan ++ x (redirect,lewald,lspme,lhke,nolink,lcshft,lsolva,lfree,lfrmas, ++ x lghost,idnode,imcon,nhko,rcut,rvdw,delr,densvar,drdf,dzdn, ++ x zlen,cell) ++ ++c set dimension of working coordinate arrays ++ ++ msatms=max(1,(mxatms+minnode-1)/minnode) ++ if(lsolva)mxatms_sol=mxatms ++ if(lfree.or.lghost)mxatms_fre=mxatms ++ ++c maximum number of molecule types ++ ++ mxtmls=max(mxtmls,1) ++ if(lsolva)mxtmls_sol=mxtmls ++ if(lfree)mxtmls_fre=mxtmls ++ if(lghost)then ++ ++ mxtmls_exc=mxtmls ++ mxtmls_fre=mxtmls ++ ++ endif ++ ++c maximum number of specified bondlength constraints ++ ++ mxtcon=max(mxtcon,1) ++ ++c maximum number of chemical bond potentials ++ ++ mxtbnd=max(mxtbnd,1) ++ ++c maximum number of different bond angle potentials ++ ++ mxtang=max(mxtang,1) ++ ++c maximum number of different torsional potentials ++ ++ mxtdih=max(mxtdih,1) ++ ++c maximum number of different inversion potentials ++ ++ mxtinv=max(mxtinv,1) ++ ++c maximum number of unique rigid body units ++ ++ mxungp=max(mxungp,1) ++ ++c maximum number of tethered atom potentials ++ ++ mxteth=max(mxteth,1) ++ ++c maximum number of core-shell units ++ ++ mxshl=max(mxshl,1) ++ ++c set maximum number of unique atom types ++ ++ mxatyp=max(1,mxatyp) ++ mxxtyp=(mxatyp*(mxatyp+1))/2 ++ if(lghost)mxatyp_exc=mxatyp ++ ++c maximum number of vdw potentials ++ ++ mxvdw=max(mxvdw,1)+1 ++ ++c maximum number of metal potentials ++ ++ mxmet=max(mxmet,1)+1 ++ mxsmet=mxatyp ++ ++c maximum number of tersoff potentials ++ ++ if(mxter.gt.0)then ++ ++ mxter=mxatyp ++ ++ endif ++ ++c maximum number of three body potentials ++ ++ if(mxtbp.eq.0)then ++ ++ mx2tbp=0 ++ ++ else ++ ++ mx2tbp=(mxatyp*(mxatyp+1))/2 ++ mxtbp=mx2tbp*mxatyp ++ ++ endif ++ ++c maximum number of four body potentials ++ ++ if(mxfbp.eq.0)then ++ ++ mx3fbp=0 ++ ++ else ++ ++ mx3fbp=(mxatyp*(mxatyp+1)*(mxatyp+2))/6 ++ mxfbp=mxatyp*mx3fbp ++ ++ endif ++ ++c maximum number of angular potential parameters ++ ++ mxpang=6 ++ ++c maximum number of three body potential parameters ++ ++ mxptbp=mxpang+1 ++ ++c maximum number of four body potential parameters ++ ++ mxpfbp=3 ++ ++c maximum number of parameters for dihedrals ++ ++ mxpdih=5 ++ ++c maximum number of parameters for inversion potentials ++ ++ mxpinv=2 ++ ++c maximum number of parameters for bond potentials ++ ++ mxpbnd=4 ++ ++c maximum number of parameters for vdw potentials ++ ++ mxpvdw=6 ++ ++c maximum number of parameters for metal potentials ++ ++ mxpmet=7 ++ ++c maximum number of parameters for tersoff potential ++ ++ mxpter=11 ++ ++c maximum number of external field parameters ++ ++ mxfld=10 ++ ++c maximum number of excluded atoms per atom ++ ++ mxexcl=max(mxexcl,1) ++ ++c maximum number of different sites in system ++ ++ mxsite=max(mxsite,1) ++ ++c maximum number of chemical bonds per node ++ ++ mxbond=max(1,(mxbond+minnode-1)/minnode) ++ ++c maximum number of bond angles per node ++ ++ mxangl=max(1,(mxangl+minnode-1)/minnode) ++ ++c maximum number of torsion angles per node ++ ++ mxdihd=max(1,(mxdihd+minnode-1)/minnode) ++ ++c maximum number of inversion potentials per node ++ ++ mxinv=max(1,(mxinv+minnode-1)/minnode) ++ ++c maximum number of constraints per node ++ ++ mxcons=max(1,2*((mxcons+minnode-1)/minnode)) ++ ++c maximum number of tethered atoms per node ++ ++ msteth=max(1,(msteth+minnode-1)/minnode) ++ ++c maximum size for working arrays for bonds, angles, dihedrals ++c inversion potentials, tethers and core-shell units ++ ++ msbad=max(mxbond,mxangl,mxdihd,mxinv,msteth,mxshl) ++ ++c maximum number of grid points in potentials arrays ++ ++ if(mxgrid.eq.0)then ++ ++ mxgrid=max(1000,int(rvdw/0.01d0+0.5d0)+4) ++ ++ endif ++ ++ mxegrd=0 ++ if(lewald.or.lspme.or.lhke.or.lcshft)mxegrd=mxgrid ++ ++c maximum dimension of rdf arrays ++ ++ mxrdf=max(128,int(rcut/drdf)) ++ ++c maximum dimension of zdensity arrays ++ ++ mxzdn=max(128,int(zlen/dzdn)) ++ ++c maximum number of rigid groups in system ++ ++ mxgrp=max(mxgrp,1) ++ ++c maximum number of rigid groups per node ++ ++ msgrp=max(1,(mxgrp+minnode-1)/minnode) ++ ++c maximum number of sites per rigid unit ++ ++ mxngp=max(mxngp,3) ++ ++c maximum number of sites in rigid units ++ ++ mxgatm=max(1,mxgatm) ++ ++c maximum number of timesteps in stack arrays ++ ++ mxstak=max(100,mxstak) ++ ++c maximum number of variables in stack arrays ++ ++ mxnstk=45+mxatyp ++ ++c dimension of shake shared atoms array ++ ++ mxlshp=max(mxcons*2,1) ++ ++c set dimension of working arrays in ewald sum ++ ++ mxewld=1 ++ mxebuf=1 ++ if(lewald)then ++ ++ mxftab=1 ++ mxewld=msatms ++ mxebuf=(2*kmaxa+1)*(2*kmaxb+1)*(2*kmaxc+1)-1 ++ if(lfree.or.lghost)mxebuf=3*mxebuf ++ if(mxnode.le.16.and.mxebuf.le.5000)mxebuf=1 ++ ++ endif ++ ++c set dimension of working arrays in spme ++ ++ mxspme=1 ++ if(lspme)then ++ ++ mxspme=mxatms ++ mxftab=2*(kmaxd+kmaxe+kmaxf) ++ ++ endif ++ ++c set dimension of working arrays for HK ewald ++ ++ mxhko=1 ++ mxhke=1 ++ if(lhke)then ++ ++ mxhko=2 ++ mxewld=msatms ++ mxhke=msatms ++ if(nhko.gt.0)mxhko=max(2,nhko) ++ mxebuf=(2*kmaxa+1)*(2*kmaxb+1)-1 ++ if(mxnode.le.16.and.mxebuf.le.5000)mxebuf=1 ++ ++ endif ++ ++ if(lsolva)mxebuf_sol=mxebuf ++ if(lfree.or.lghost)then ++ ++ mxebuf_fre=mxebuf ++ mxewld_fre=mxewld ++ ++ endif ++ ++c maximum dimension of principal transfer buffer ++ ++ mxbuff=max(6*mxatms,8*(mxcons+1),8*(mxgrp+1),mxnstk*mxstak, ++ x mxebuf,mxgrid,2*kmaxa*kmaxb*kmaxc,2*kmaxd*kmaxe*kmaxf, ++ x 10000) ++ ++c maximum size of verlet neighbour/link cell list for each atom ++c decide if link-cells in use or not ++ ++ cut=rcut+delr ++ dens=dble(mxatms)/volm ++ ratio=1.5d0*dens*(4.d0*pi/3.d0)*cut**3 ++ mxlist=min(nint(ratio),(mxatms+1)/2) ++ if(imcon.eq.0) then ++ ++ cell(1)=max(xhi+2.d0*cut,3.d0*cut) ++ cell(5)=max(yhi+2.d0*cut,3.d0*cut) ++ cell(9)=max(zhi+2.d0*cut,3.d0*cut) ++ ++ endif ++ if(imcon.eq.6)then ++ ++ cell(9)=max(zhi+2.d0*cut,3.d0*cut,cell(9)) ++ ++ endif ++ ++ if(nolink)then ++ ++ loglnk=.false. ++ ++ else ++ ++ loglnk=.true. ++ call dcell(cell,celprp) ++ ilx=int(celprp(7)/cut) ++ ily=int(celprp(8)/cut) ++ ilz=int(celprp(9)/cut) ++ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. ++ ncells=ilx*ily*ilz ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. ++ if(mxneut.gt.0.and.ncells.le.36) loglnk=.false. ++ ++ endif ++ ++ mxcell=1 ++ if(loglnk)then ++ ++ mxlist=14*nint(1.5d0*dens*celprp(10)/dble(ncells)) ++ mxcell=(ilx+2)*(ily+2)*(ilz+2) ++ ++ endif ++ ++ if(mxneut.gt.0)mxlist=(mxneut+1)/2 ++ mxlist=2*mxlist ++ if(mxtbp.gt.0.or.mxfbp.gt.0.or.mxter.gt.0)then ++ ++ if(mxtbp.gt.0)cut=min(cut,rctbp) ++ if(mxfbp.gt.0)cut=min(cut,rcfbp) ++ if(mxter.gt.0)cut=min(cut,rcter) ++ ilx=max(3,int(celprp(7)/cut)) ++ ily=max(3,int(celprp(8)/cut)) ++ ilz=max(3,int(celprp(9)/cut)) ++ mxcell=max(mxcell,(ilx+2)*(ily+2)*(ilz+2)) ++ ++ endif ++ mxcell=int(dble(mxcell)*densvar/100.d0) ++ mxlist=int(dble(mxlist)*densvar/100.d0) ++ mxlist=max(500,mxlist) ++ ++c maximum size for coordinate difference arrays ++ ++ mxxdf=max(mxlist,mxatms,mxcons,mxn1*mxn1*(mxneut+1)/2) ++ ++c maximum number of core-shell unit types ++ ++ mxtshl=max(mxtshl,1) ++ ++c potential of mean force array parameter ++ ++ mxpmf=max(mxpmf,1) ++ ++c number of pmf constraints on a processor ++ ++ mspmf=max(1,(mxpmf+minnode-1)/minnode) ++ ++c maximum number of sites to define pmf units ++ ++ mxspmf=max(mxspmf,1) ++ ++c maximum iterations in quaternion integration ++ ++ mxquat=100 ++ ++c maximum number of shake cycles ++ ++ mxshak=100 ++ ++c maximum b-spline interpolation order ++ ++ mxspl=12 ++ ++c increment mxneut ++ ++ if(mxneut.gt.0)mxneut=mxneut+1 ++ ++ return ++ ++ end subroutine parset ++ ++ subroutine fldscan(idnode,mxn1,rctbp,rcfbp,rcter) ++ ++c*********************************************************************** ++c ++c dl_poly routine for scanning the field file to determine the ++c required parameters ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith november 1994 ++c ++c*********************************************************************** ++ ++ integer, parameter :: mmk=1000 ++ ++ character*8 name,keyword,chr(mmk) ++ logical check,ltable,lmetab,safe,lneut,loop1,loop2 ++ real(8) rctbp,rcter,rcfbp,rct,ppp ++ integer mxn1,nxn1,idnode,nold ++ integer itmols,ksite,numsit,isite,nrept,ifrz,i,j ++ integer ishls,ibonds,numcon,numang,icon,iang,idih,numdih ++ integer numinv,iinv,numgrp,kgrp,numgsit,numteth,iteth ++ integer ipmf,jpmf,npmf,itpvdw,itptbp,itpfbp ++ integer itpter,k,nfld,nummols,idum,numshl,nneu ++ integer numbonds,itpmet,iii,ngrid ++ ++ mxtmls=0 ++ mxatms=0 ++ mxgrp=0 ++ mxtcon=0 ++ mxtbnd=0 ++ mxtang=0 ++ mxtdih=0 ++ mxtinv=0 ++ mxpmf=0 ++ mxspmf=0 ++ mxungp=0 ++ mxngp=0 ++ mxneut=0 ++ mxmet=0 ++ mxatyp=0 ++ mxn1=0 ++ nxn1=0 ++ nold=-1 ++ mxgatm=0 ++ mxteth=0 ++ msteth=0 ++ mxvdw=0 ++ mxtbp=0 ++ mxter=0 ++ mxexcl=0 ++ mxsite=0 ++ mxbond=0 ++ mxcons=0 ++ mxangl=0 ++ mxdihd=0 ++ mxinv=0 ++ mxshl=0 ++ mxtshl=0 ++ mxfbp=0 ++ mxgrid=0 ++ rctbp=0.d0 ++ rcter=0.d0 ++ rcfbp=0.d0 ++ safe=.true. ++ loop1=.true. ++ loop2=.true. ++ lneut=.false. ++ ltable=.false. ++ lmetab=.false. ++ ++c open force field data file ++ ++ if(idnode.eq.0)open (nfield,file='FIELD') ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++c read and process directives from field file ++ ++ do while(loop1) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ ++ if(findstring('neut',record,idum))then ++ ++ lneut=.true. ++ ++ elseif(findstring('molecu',record,idum))then ++ ++ mxtmls=intstr(record,lenrec,idum) ++ ++ do itmols=1,mxtmls ++ ++ loop2=.true. ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ do while(loop2) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ ++ ksite=0 ++ ++ if(findstring('nummol',record,idum))then ++ ++ nummols=intstr(record,lenrec,idum) ++ ++ elseif(findstring('atoms',record,idum))then ++ ++ numsit=intstr(record,lenrec,idum) ++ mxatms=mxatms+numsit*nummols ++ mxsite=mxsite+numsit ++ ksite=0 ++ do isite=1,numsit ++ ++ if(ksite.lt.numsit)then ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ call getword(name,record,8,lenrec) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ nrept=intstr(record,lenrec,idum) ++ ifrz=intstr(record,lenrec,idum) ++ nneu=intstr(record,lenrec,idum) ++ if(nrept.eq.0)nrept=1 ++ if(lneut)then ++ if(nneu.ne.nold) nxn1=0 ++ nxn1=nxn1+nrept ++ mxn1=max(mxn1,nxn1) ++ nold=nneu ++ endif ++ ++ if(mxatyp.eq.0)then ++ ++ mxatyp=1 ++ chr(1)=name ++ ++ else ++ ++ check=.true. ++ do j=1,mxatyp ++ ++ if(name.eq.chr(j))check=.false. ++ ++ enddo ++ if(check)then ++ ++ mxatyp=mxatyp+1 ++ if(mxatyp.le.mmk)chr(mxatyp)=name ++ ++ endif ++ ++ endif ++ if(nrept.eq.0)nrept=1 ++ ksite=ksite+nrept ++ ++ endif ++ ++ enddo ++ ++ if(mmk.lt.mxatyp)call abortscan(34,idnode) ++ ++ if(lneut)mxneut=mxneut+nneu*nummols ++ ++ elseif(findstring('shell',record,idum))then ++ ++ numshl=intstr(record,40,idum) ++ mxtshl=mxtshl+numshl ++ mxshl=mxshl+nummols*numshl ++ ++ do ishls=1,numshl ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('bonds',record,idum))then ++ ++ numbonds=intstr(record,lenrec,idum) ++ mxtbnd=mxtbnd+numbonds ++ mxbond=mxbond+nummols*numbonds ++ ++ do ibonds=1,numbonds ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('constr',record,idum))then ++ ++ numcon=intstr(record,lenrec,idum) ++ mxtcon=mxtcon+numcon ++ mxcons=mxcons+nummols*numcon ++ ++ do icon=1,numcon ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('angles',record,idum))then ++ ++ numang=intstr(record,lenrec,idum) ++ mxtang=mxtang+numang ++ mxangl=mxangl+nummols*numang ++ ++ do iang=1,numang ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('dihedr',record,idum))then ++ ++ numdih=intstr(record,lenrec,idum) ++ mxtdih=mxtdih+numdih ++ mxdihd=mxdihd+nummols*numdih ++ ++ do idih=1,numdih ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('invers',record,idum))then ++ ++ numinv=intstr(record,lenrec,idum) ++ mxtinv=mxtinv+numinv ++ mxinv=mxinv+nummols*numinv ++ ++ do iinv=1,numinv ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('rigid',record,idum))then ++ ++ numgrp=intstr(record,lenrec,idum) ++ mxungp=mxungp+numgrp ++ mxgrp=mxgrp+numgrp*nummols ++ ++ do kgrp=1,numgrp ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ numgsit=intstr(record,lenrec,idum) ++ mxgatm=mxgatm+numgsit*nummols ++ mxngp=max(mxngp,numgsit) ++ do j=1,numgsit ++ ++ iii=intstr(record,lenrec,idum) ++ if(iii.eq.0)then ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ iii=intstr(record,lenrec,idum) ++ endif ++ ++ enddo ++ ++ enddo ++ ++ elseif(findstring('teth',record,idum))then ++ ++ numteth=intstr(record,lenrec,idum) ++ mxteth=mxteth+numteth ++ msteth=msteth+numteth*nummols ++ ++ do iteth=1,numteth ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('pmf',record,idum))then ++ ++ do ipmf=1,2 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ npmf=intstr(record,lenrec,idum) ++ mxspmf=mxspmf+npmf ++ ++ do jpmf=1,npmf ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ enddo ++ ++ mxpmf=mxpmf+nummols ++ ++ elseif(findstring('finish',record,idum))then ++ ++ loop2=.false. ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ elseif(findstring('vdw',record,idum))then ++ ++ if(findstring('tab',record,idum))ltable=.true. ++ mxvdw=intstr(record,lenrec,idum) ++ do itpvdw=1,mxvdw ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ if(findstring('tab',record,idum))ltable=.true. ++ ++ enddo ++ mxvdw=max(mxvdw,(mxatyp*(mxatyp+1))/2) ++ ++ if(ltable)then ++ ++ if(idnode.eq.0)open(ntable,file='TABLE') ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ mxgrid=max(mxgrid,intstr(record,lenrec,idum)) ++ ++ close (ntable) ++ ++ endif ++ ++ elseif(findstring('metal',record,idum))then ++ ++ if(findstring('eam',record,idum))lmetab=.true. ++ mxmet=intstr(record,lenrec,idum) ++ do itpmet=1,mxmet ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ if(findstring('eam',record,idum))lmetab=.true. ++ ++ enddo ++ mxmet=max(mxmet,(mxatyp*(mxatyp+1))/2) ++ ++ if(lmetab)then ++ ++ if(idnode.eq.0)open(ntable,file='TABEAM') ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ do i=1,intstr(record,lenrec,idum) ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ ngrid=intstr(record,lenrec,idum) ++ mxgrid=max(mxgrid,ngrid+4) ++ do j=1,(ngrid+3)/4 ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ ++ enddo ++ ++ enddo ++ ++ close (ntable) ++ ++ endif ++ ++ elseif(findstring('tbp',record,idum))then ++ ++ mxtbp=intstr(record,lenrec,idum) ++ ++ do itptbp=1,mxtbp ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(keyword,record,4,lenrec) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ rct=dblstr(record,lenrec,idum) ++ rctbp=max(rctbp,rct) ++ ++ enddo ++ ++ elseif(findstring('fbp',record,idum))then ++ ++ mxfbp=intstr(record,lenrec,idum) ++ do itpfbp=1,mxfbp ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(keyword,record,4,lenrec) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ rct=dblstr(record,lenrec,idum) ++ rcfbp=max(rcfbp,rct) ++ ++ enddo ++ ++ elseif(findstring('tersof',record,idum))then ++ ++ mxter=intstr(record,lenrec,idum) ++ ++ do itpter=1,mxter ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ rct=dblstr(record,lenrec,idum) ++ rcter=max(rcter,rct) ++ ++ enddo ++ ++ elseif(findstring('extern',record,idum))then ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ nfld=intstr(record,lenrec,idum) ++ if(nfld.eq.0)nfld=5 ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ do k=1,nfld ++ ++ ppp=dblstr(record,lenrec,idum) ++ if(idum.gt.lenrec.and.k.lt.nfld)then ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ endif ++ ++ enddo ++ ++ elseif(findstring('close',record,idum))then ++ ++ loop1=.false. ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)close (nfield) ++ ++ if(mxpmf.gt.0)mxpmf=mxatms ++ if(mxtcon.gt.0)mxexcl=max(mxexcl,6) ++ if(mxtbnd.gt.0)mxexcl=max(mxexcl,6) ++ if(mxtang.gt.0)mxexcl=max(mxexcl,16) ++ if(mxtdih.gt.0)mxexcl=max(mxexcl,50) ++ if(mxtinv.gt.0)mxexcl=max(mxexcl,50) ++ if(mxneut.gt.0)mxexcl=max(mxexcl,10*mxn1*mxn1) ++ if(mxgrp.gt.0)mxexcl=max(mxexcl,mxngp) ++ ++ return ++ ++ end subroutine fldscan ++ ++ subroutine cfgscan ++ x (idnode,nconf,imcon,volm,xhi,yhi,zhi,cell,buffer) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for scanning the initial configuration ++c file to determine the number of atoms present ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith june 1997 ++c ++c note: volm is volume containing all particles, not system volume ++c ++c*********************************************************************** ++ ++ character*80 header ++ character*8 name ++ logical lvolm ++ real(8) cell,celprp,buffer,extra,volm,xhi,yhi,zhi ++ real(8) xxx,yyy,zzz,uuu,vvv,www,coz ++ integer idnode,nconf,imcon,i,levcfg ++ dimension cell(9),celprp(10),buffer(10),extra(5) ++ ++ imcon=0 ++ xhi=0.d0 ++ yhi=0.d0 ++ zhi=0.d0 ++ volm=0.d0 ++ do i=1,9 ++ ++ cell(i)=0.d0 ++ ++ enddo ++ if(idnode.eq.0)then ++ ++ open (nconf,file='CONFIG') ++ ++c read the CONFIG file header ++ ++ read(nconf,'(a80)',end=100)header ++ read(nconf,'(2i10)',end=100)levcfg,imcon ++ lvolm=(imcon.eq.0.or.imcon.eq.6) ++ ++c specify molecular dynamics simulation cell ++ ++ if(imcon.gt.0)then ++ ++ read(nconf,'(3f20.0)',end=100)cell(1),cell(2),cell(3) ++ read(nconf,'(3f20.0)',end=100)cell(4),cell(5),cell(6) ++ read(nconf,'(3f20.0)',end=100)cell(7),cell(8),cell(9) ++ call dcell(cell,celprp) ++ ++ endif ++ ++ if(.not.lvolm)then ++ ++ volm=celprp(10) ++ ++ if(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ endif ++ ++ endif ++ ++ i=0 ++ do while(.true.) ++ ++ i=i+1 ++ if(levcfg.eq.0)then ++ ++ read(nconf,'(a8)',end=100) name ++ read(nconf,'(3f20.0)')xxx,yyy,zzz ++ ++ else if(levcfg.eq.1)then ++ ++ read(nconf,'(a8)',end=100) name ++ read(nconf,'(3f20.0)')xxx,yyy,zzz ++ read(nconf,'(3f20.0)')uuu,vvv,www ++ ++ else ++ ++ read(nconf,'(a8)',end=100) name ++ read(nconf,'(3f20.0)')xxx,yyy,zzz ++ read(nconf,'(3f20.0)')uuu,vvv,www ++ read(nconf,'(3f20.0)')uuu,vvv,www ++ ++ endif ++ ++ if(lvolm)then ++ ++ if(i.eq.1)then ++ ++ xhi=abs(xxx) ++ yhi=abs(yyy) ++ zhi=abs(zzz) ++ ++ else ++ ++ xhi=max(xhi,abs(xxx)) ++ yhi=max(yhi,abs(yyy)) ++ zhi=max(zhi,abs(zzz)) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ 100 continue ++ ++ if(imcon.eq.0)then ++ ++ volm=8.d0*xhi*yhi*zhi ++ ++ else if(imcon.eq.6)then ++ ++ coz=(cell(1)*cell(4)+cell(2)*cell(5)+cell(3)*cell(6))/ ++ x (celprp(1)*celprp(2)) ++ volm=2.d0*zhi*celprp(1)*celprp(2)*sqrt(1.d0-coz**2) ++ ++ endif ++ ++ close (nconf) ++ ++ endif ++ ++ extra(1)=dble(imcon) ++ extra(2)=xhi ++ extra(3)=yhi ++ extra(4)=zhi ++ extra(5)=volm ++ call gdsum(extra,5,buffer) ++ call gdsum(cell,9,buffer) ++ imcon=nint(extra(1)) ++ xhi=extra(2) ++ yhi=extra(3) ++ zhi=extra(4) ++ volm=extra(5) ++ ++ return ++ ++ end subroutine cfgscan ++ ++ subroutine conscan ++ x (redirect,lewald,lspme,lhke,nolink,lcshft,lsolva,lfree,lfrmas, ++ x lghost,idnode,imcon,nhko,rcut,rvdw,delr,densvar,drdf,dzdn, ++ x zlen,cell) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for scanning the contents of the control file ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith june 1997 ++c ++c*********************************************************************** ++ ++ logical safe,lewald,lspme,lhke,peek,nolink,lcshft,lmetad ++ logical lsolva,lfree,lfrmas,lghost,redirect ++ real(8) cell,celprp,rcut,rvdw,delr,eps,alpha,fac,tol,tol1 ++ real(8) densvar,drdf,dzdn,zlen ++ integer nhko,idnode,imcon,idum,jmp ++ integer nlatt,kmax1,kmax2,kmax3,kmaxpow2 ++ dimension celprp(10),cell(9) ++ ++ nhko=0 ++ mxstak=0 ++ kmaxa=0 ++ kmaxb=1 ++ kmaxc=1 ++ kmaxd=1 ++ kmaxe=1 ++ kmaxf=1 ++ rcut=0.d0 ++ rvdw=0.d0 ++ delr=0.d0 ++ drdf=0.05d0 ++ dzdn=0.05d0 ++ zlen=0.d0 ++ densvar=1.d2 ++ peek=.true. ++ lhke=.false. ++ lspme=.false. ++ lewald=.false. ++ lcshft=.false. ++ nolink=.false. ++ lghost=.false. ++ lfree=.false. ++ lfrmas=.false. ++ lsolva=.false. ++ lmetad=.false. ++ redirect=.false. ++ ++c open the simulation input file ++ ++ if(idnode.eq.0)open (nread,file='CONTROL') ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abortscan(17,idnode) ++ ++ do while(peek) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abortscan(17,idnode) ++ call lowcase(record,lenrec) ++ if(record(1).ne.'#')then ++ ++ if(findstring('stack',record,idum))then ++ ++ mxstak=intstr(record,lenrec,idum) ++ ++ elseif(findstring('no link',record,idum))then ++ ++ nolink=.true. ++ ++ elseif(findstring('metafreeze',record,idum))then ++ ++ lmetad=.true. ++ do while(lmetad) ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abortscan(17,idnode) ++ call lowcase(record,lenrec) ++ lmetad=.not.findstring('endmet',record,idum) ++ enddo ++ ++ elseif(findstring('redirect',record,idum))then ++ ++ redirect=.true. ++ ++ elseif(findstring('densvar',record,idum))then ++ ++ densvar=dblstr(record,lenrec,idum) ++ ++ elseif(findstring('shift',record,idum).or. ++ x findstring('reaction',record,idum))then ++ ++ lcshft=.true. ++ ++ elseif(findstring('ewald',record,idum).or. ++ x findstring('spme',record,idum).or. ++ x findstring('hke',record,idum))then ++ ++c read Ewald or HK-Ewald or SPM-Ewald sum parameters ++ ++ lhke=findstring('hke',record,idum) ++ lspme=findstring('spme',record,idum) ++ lewald=findstring('ewald',record,idum) ++ ++ if(findstring('precision',record,idum))then ++ ++ eps=dblstr(record,lenrec,idum) ++ if(lhke) then ++ ++ nhko=intstr(record,lenrec,idum) ++ nlatt=intstr(record,lenrec,idum) ++ nlatt=min(nlatt,2) ++ ++ endif ++ ++ if(rcut.lt.1.d-6)rcut=10.d0 ++ ++c compute alpha and the kmax ++ ++ if(lewald.or.lspme)then ++ ++ call dcell(cell,celprp) ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) ++ fac=1.d0 ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x fac=2.d0**(1.d0/3.d0) ++ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) ++ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) ++ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) ++ ++ elseif(lhke)then ++ ++ if(nhko.eq.0)then ++ if(eps.le.1.d-6)then ++ alpha=3.46d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=3.14d0/rcut ++ else ++ alpha=2.76d0/rcut ++ endif ++ elseif(nhko.eq.1)then ++ if(eps.le.1.d-6)then ++ alpha=4.37d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.08d0/rcut ++ else ++ alpha=3.75d0/rcut ++ endif ++ elseif(nhko.eq.2)then ++ if(eps.le.1.d-6)then ++ alpha=5.01d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.74d0/rcut ++ else ++ alpha=4.44d0/rcut ++ endif ++ elseif(nhko.eq.3)then ++ if(eps.le.1.d-6)then ++ alpha=5.55d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=5.28d0/rcut ++ else ++ alpha=5.00d0/rcut ++ endif ++ endif ++ alpha=alpha/dble(2*nlatt+1) ++ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 ++ call dcell(cell,celprp) ++ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) ++ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) ++ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) ++ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) ++ kmax3=1 ++ ++ endif ++ ++ else ++ ++ alpha=dblstr(record,lenrec,idum) ++ kmax1=intstr(record,lenrec,idum) ++ kmax2=intstr(record,lenrec,idum) ++ ++ if(lhke)then ++ ++ kmax3=1 ++ nhko=intstr(record,lenrec,idum) ++ ++ else ++ ++ kmax3=intstr(record,lenrec,idum) ++ ++ endif ++ ++ endif ++ ++c for spme double kmax and set to next power of 2, with current ++c upper limit of 512 ++ ++ if(lspme)then ++ ++ kmaxpow2=1 ++ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ end do ++ kmaxd=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ end do ++ kmaxe=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ end do ++ kmaxf=2 * kmaxpow2 ++ ++ elseif(lhke) then ++ ++ kmaxa=kmax1 ++ kmaxb=kmax2 ++ kmaxc=1 ++ ++ else ++ ++ kmaxa=kmax1 ++ kmaxb=kmax2 ++ kmaxc=kmax3 ++ ++ endif ++ ++ elseif(findstring('cut',record,idum))then ++ ++ rcut=dblstr(record,lenrec,idum) ++ ++ elseif(findstring('rvdw',record,idum))then ++ ++ rvdw=dblstr(record,lenrec,idum) ++ ++ elseif(findstring('delr',record,idum))then ++ ++ delr=dblstr(record,100,idum) ++ ++ else if(findstring('rdf',record,idum))then ++ ++ if(.not.findstring('print',record,idum))then ++ ++ jmp=intstr(record,lenrec,idum) ++ drdf=dblstr(record,lenrec,idum) ++ ++ endif ++ ++ else if(findstring('zden',record,idum))then ++ ++ jmp=intstr(record,lenrec,idum) ++ dzdn=dblstr(record,lenrec,idum) ++ zlen=dblstr(record,lenrec,idum) ++ if(dzdn.lt.1.d-8)then ++ ++ dzdn=0.1d0 ++ zlen=0.1d0*dble(128) ++ ++ elseif(zlen.lt.1.d-8)then ++ ++ zlen=dzdn*dble(128) ++ ++ endif ++ ++ elseif(findstring('solva',record,idum))then ++ ++ lsolva=.true. ++ ++ elseif(findstring('decomp',record,idum))then ++ ++ lsolva=.true. ++ ++ elseif(findstring('free',record,idum))then ++ ++ lfree=.true. ++ ++ elseif(findstring('excit',record,idum))then ++ ++ lghost=.true. ++ lsolva=.true. ++ ++ elseif(findstring('reset_mass',record,idum))then ++ ++ lfrmas=.true. ++ ++ elseif(findstring('switch',record,idum))then ++ ++ lghost=.true. ++ lsolva=.true. ++ ++ elseif(findstring('finish',record,idum))then ++ ++ peek=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)close (nread) ++ if(abs(rvdw).le.1.d-10)rvdw=rcut ++ if(drdf.lt.1.d-8)drdf=0.05d0 ++ if(dzdn.lt.1.d-8)dzdn=0.05d0 ++ ++ return ++ ++ end subroutine conscan ++ ++ subroutine abortscan(key,idnode) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for controlled exit of file scan ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c********************************************************************* ++ ++ integer key,idnode ++ ++ write(nrite,'(/,/,1x,a,i5)') ++ x 'DL_POLY terminated due to error ', key ++ ++ if(key.eq.17)then ++ ++ write(nrite,'(/,/,1x,a)') ++ x 'error - strange exit from CONTROL file processing' ++ ++ else if(key.eq.52)then ++ ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of FIELD file encountered' ++ ++ else if(key.eq.24)then ++ ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of file encountered in TABLE file' ++ ++ else if(key.eq.34)then ++ ++ write(nrite,'(/,/,1x,a)') ++ x 'error - character array memory allocation failure' ++ ++ endif ++ ++ if(idnode.eq.0) then ++ close (nrite) ++ close (nhist) ++ close (nread) ++ close (nconf) ++ close (nstats) ++ close (nrest) ++ close (nfield) ++ close (ntable) ++ endif ++ ++ call gsync() ++ call exitcomms() ++ ++ return ++ end subroutine abortscan ++ ++ subroutine dcell(aaa,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to calculate the dimensional properties of ++c a simulation cell specified by the input matrix aaa. ++c the results are returned in the array bbb, with : ++c ++c bbb(1 to 3) - lengths of cell vectors ++c bbb(4 to 6) - cosines of cell angles ++c bbb(7 to 9) - perpendicular cell widths ++c bbb(10) - cell volume ++c ++c copyright daresbury laboratory 1992 ++c author - w. smith july 1992 ++c ++c*********************************************************************** ++ ++ real(8) aaa,bbb,axb1,axb2,axb3,bxc1,bxc2,bxc3,cxa1,cxa2,cxa3 ++ ++ dimension aaa(9),bbb(10) ++ ++c calculate lengths of cell vectors ++ ++ bbb(1)=sqrt(aaa(1)*aaa(1)+aaa(2)*aaa(2)+aaa(3)*aaa(3)) ++ bbb(2)=sqrt(aaa(4)*aaa(4)+aaa(5)*aaa(5)+aaa(6)*aaa(6)) ++ bbb(3)=sqrt(aaa(7)*aaa(7)+aaa(8)*aaa(8)+aaa(9)*aaa(9)) ++ ++c calculate cosines of cell angles ++ ++ bbb(4)=(aaa(1)*aaa(4)+aaa(2)*aaa(5)+aaa(3)*aaa(6))/(bbb(1)*bbb(2)) ++ bbb(5)=(aaa(1)*aaa(7)+aaa(2)*aaa(8)+aaa(3)*aaa(9))/(bbb(1)*bbb(3)) ++ bbb(6)=(aaa(4)*aaa(7)+aaa(5)*aaa(8)+aaa(6)*aaa(9))/(bbb(2)*bbb(3)) ++ ++c calculate vector products of cell vectors ++ ++ axb1=aaa(2)*aaa(6)-aaa(3)*aaa(5) ++ axb2=aaa(3)*aaa(4)-aaa(1)*aaa(6) ++ axb3=aaa(1)*aaa(5)-aaa(2)*aaa(4) ++ bxc1=aaa(5)*aaa(9)-aaa(6)*aaa(8) ++ bxc2=aaa(6)*aaa(7)-aaa(4)*aaa(9) ++ bxc3=aaa(4)*aaa(8)-aaa(5)*aaa(7) ++ cxa1=aaa(8)*aaa(3)-aaa(2)*aaa(9) ++ cxa2=aaa(1)*aaa(9)-aaa(3)*aaa(7) ++ cxa3=aaa(2)*aaa(7)-aaa(1)*aaa(8) ++ ++c calculate volume of cell ++ ++ bbb(10)=abs(aaa(1)*bxc1+aaa(2)*bxc2+aaa(3)*bxc3) ++ ++c calculate cell perpendicular widths ++ ++ bbb(7)=bbb(10)/sqrt(bxc1*bxc1+bxc2*bxc2+bxc3*bxc3) ++ bbb(8)=bbb(10)/sqrt(cxa1*cxa1+cxa2*cxa2+cxa3*cxa3) ++ bbb(9)=bbb(10)/sqrt(axb1*axb1+axb2*axb2+axb3*axb3) ++ ++ return ++ end subroutine dcell ++ ++ end module setup_module +diff -urN dl_class_1.9.orig/srcmod/shake_module.f dl_class_1.9/srcmod/shake_module.f +--- dl_class_1.9.orig/srcmod/shake_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/shake_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,152 @@ ++ module shake_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining bond shake arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use error_module ++ use parse_module ++ use setup_module ++ use site_module ++ use solvation_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmcon(:) ++ integer, allocatable :: listcon(:,:),listot(:) ++ integer, allocatable :: numcon(:),lstcon(:,:) ++ integer, allocatable :: listme(:),lishap(:),lashap(:) ++ ++ save prmcon,listcon,listot,numcon,lstcon,listme,lishap,lashap ++ ++ contains ++ ++ subroutine alloc_shake_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (prmcon(mxtcon),stat=fail(1)) ++ allocate (numcon(mxtmls),stat=fail(2)) ++ allocate (lstcon(mxtcon,2),stat=fail(3)) ++ allocate (listcon(mxcons,3),stat=fail(4)) ++ allocate (listme(mxatms),stat=fail(5)) ++ allocate (lishap(mxlshp),stat=fail(6)) ++ allocate (lashap(mxproc),stat=fail(7)) ++ allocate (listot(mxatms),stat=fail(8)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1070) ++ enddo ++ ++ do i=1,mxtmls ++ numcon(i)=0 ++ enddo ++ ++ end subroutine alloc_shake_arrays ++ ++ subroutine define_constraints ++ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining constraints ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c adapted - p-a cazade oct 2007, solvation, excitation etc. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lghost ++ character*1 message(80) ++ integer idnode,itmols,nconst,nsite,ntmp,icnst ++ integer icnst1,iatm1,iatm2,isite1,isite2,idum,i ++ integer isol1,isol2,natmsr ++ ++ ntmp=intstr(record,lenrec,idum) ++ numcon(itmols)=numcon(itmols)+ntmp ++ if(idnode.eq.0) then ++ write(nrite,"(/,1x,'number of bond constraints', ++ x 5x,i10)") ntmp ++ write(nrite,"(/,/,1x,'constraint bond details:', ++ x /,/,21x,5x,'index',5x,'index',2x,'bondlength',/) ++ x ") ++ endif ++ ++ icnst1 = numcon(itmols) ++ do icnst=1,icnst1 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ iatm1 = intstr(record,lenrec,idum) ++ iatm2 = intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs(:) ++ ++ isite1 = nsite - numsit(itmols) + iatm1 ++ isite2 = nsite - numsit(itmols) + iatm2 ++ if(lghost)then ++ ++ isol1=natmsr+iatm1 ++ isol2=natmsr+iatm2 ++ ++ endif ++ ++ if(lfzsit(isite1)*lfzsit(isite2).ne.0) then ++ ++ numcon(itmols) = numcon(itmols) -1 ++ if(idnode.eq.0) write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ nconst=nconst+1 ++ ++ if(nconst.gt.mxtcon) call error(idnode,40) ++ ++ lstcon(nconst,1)= iatm1 ++ lstcon(nconst,2)= iatm2 ++ prmcon(nconst)=dblstr(record,lenrec,idum) ++ ++ if(lghost)then ++ ++ if((isol1.ge.ind_fre(3)).or.(isol2.ge.ind_fre(3)))then ++ ++ numcon(itmols)=numcon(itmols)-1 ++ ntcons_ghost=ntcons_ghost+1 ++ ++ endif ++ ++ endif ++ ++ if(idnode.eq.0) ++ x write(nrite,"(21x,2i10,f12.6)") ++ x lstcon(nconst,1),lstcon(nconst,2), ++ x prmcon(nconst) ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_constraints ++ ++ end module shake_module +diff -urN dl_class_1.9.orig/srcmod/site_module.f dl_class_1.9/srcmod/site_module.f +--- dl_class_1.9.orig/srcmod/site_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/site_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,233 @@ ++ module site_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining atomic/site arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use error_module ++ use parse_module ++ use setup_module ++ ++ implicit none ++ ++ character*1, allocatable :: molnam(:,:) ++ character*8, allocatable :: sitnam(:),unqatm(:) ++ real(8), allocatable :: dens(:),chgsit(:),wgtsit(:) ++ integer, allocatable :: nexsit(:),lfzsit(:),numsit(:),ltpsit(:) ++ integer, allocatable :: nugrp(:),lexsit(:,:),numgrp(:) ++ integer, allocatable :: numtyp(:),numfrz(:),nummols(:) ++ ++ save numtyp,numfrz,dens,chgsit,wgtsit,sitnam,unqatm,nexsit ++ save lfzsit,numsit,ltpsit,nugrp,lexsit,numgrp,molnam,nummols ++ ++ contains ++ ++ subroutine alloc_site_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (chgsit(mxsite),stat=fail(1)) ++ allocate (wgtsit(mxsite),stat=fail(2)) ++ allocate (nexsit(mxsite),stat=fail(3)) ++ allocate (lfzsit(mxsite),stat=fail(4)) ++ allocate (nugrp(mxsite) ,stat=fail(5)) ++ allocate (ltpsit(mxsite),stat=fail(6)) ++ allocate (numsit(mxtmls),stat=fail(7)) ++ allocate (lexsit(mxsite,mxexcl),stat=fail(8)) ++ allocate (sitnam(mxsite),stat=fail(9)) ++ allocate (unqatm(mxsite),stat=fail(10)) ++ allocate (numgrp(mxtmls),stat=fail(11)) ++ allocate (numtyp(mxatyp),stat=fail(12)) ++ allocate (numfrz(mxatyp),stat=fail(13)) ++ allocate (dens(mxatyp),stat=fail(14)) ++ allocate (nummols(mxtmls),stat=fail(15)) ++ allocate (molnam(40,mxtmls),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1090) ++ enddo ++ ++ do i=1,mxtmls ++ numsit(i)=0 ++ enddo ++ ++ end subroutine alloc_site_arrays ++ ++ subroutine define_atoms ++ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining atom types in system ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 atom1 ++ character*1 message(80) ++ logical lneut,safe,atmchk ++ integer idnode,itmols,nsite,ksite,ntpatm,isite,nrept ++ integer ifrz,neugp,irept,jsite,idum ++ real(8) weight,charge ++ ++ numsit(itmols)=intstr(record,lenrec,idum) ++ if(idnode.eq.0) then ++ write(nrite,"(/,1x,'number of atoms/sites', ++ x 10x,i10)") numsit(itmols) ++ if(.not.lneut) ++ x write(nrite,"(/,/,1x,'atomic characteristics:', ++ x /,/,21x,' site',5x,'name',10x,'mass',8x, ++ x 'charge',4x,'repeat',4x,'freeze'/)") ++ if(lneut) ++ x write(nrite,"(/,/,1x,'atomic characteristics:',/ ++ x /,21x,' site',5x,'name',10x,'mass',8x,'charge', ++ x 4x,'repeat',4x,'freeze',3x,'chg grp')") ++ ++ endif ++ ++ do isite=1,numsit(itmols) ++ ++ if(ksite.lt.numsit(itmols))then ++ ++c read atom name, site number, mass, charge, freeze option ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call getword(atom1,record,8,lenrec) ++ weight=dblstr(record,lenrec,idum) ++ charge=dblstr(record,lenrec,idum) ++ nrept=intstr(record,lenrec,idum) ++ ifrz =intstr(record,lenrec,idum) ++ neugp=intstr(record,lenrec,idum) ++ if(nrept.eq.0)nrept=1 ++ ksite=ksite+nrept ++ ++ if(idnode.eq.0) then ++ ++ if(.not.lneut) then ++ ++ write(nrite, ++ x "(21x,i5,5x,a8,2f12.5,2i10)") ++ x nsite+1,atom1,weight,charge,nrept, ++ x ifrz ++ ++ else ++ ++ write(nrite, ++ x "(21x,i5,5x,a8,2f12.5,3i10)") ++ x nsite+1,atom1,weight,charge,nrept, ++ x ifrz,neugp ++ ++ endif ++ ++ endif ++ ++ do irept=1,nrept ++ ++ nsite=nsite+1 ++ if(nsite.gt.mxsite) call error(idnode,20) ++ ++ sitnam(nsite)=atom1 ++ wgtsit(nsite)=weight ++ chgsit(nsite)=charge ++ lfzsit(nsite)=ifrz ++ nugrp(nsite)=neugp ++ ++ enddo ++ ++c establish list of unique atom types ++ ++ atmchk=.true. ++ ++ do jsite=1,ntpatm ++ ++ if(atom1.eq.unqatm(jsite)) then ++ ++ atmchk=.false. ++ do irept=nsite,nsite-nrept+1,-1 ++ ++ ltpsit(irept)=jsite ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ if(atmchk)then ++ ++ ntpatm=ntpatm+1 ++ if(ntpatm.gt.mxatyp)call error(idnode,14) ++ unqatm(ntpatm)=atom1 ++ ++ do irept=nsite,nsite-nrept+1,-1 ++ ++ ltpsit(irept)=ntpatm ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_atoms ++ ++ subroutine check_syschg(idnode,ntpmls,sumchg) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for checking the system charge ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,ntpmls,jsite,itmols,lsite ++ real(8) sumchg ++ ++ jsite=0 ++ do itmols=1,ntpmls ++ ++ do lsite=1,numsit(itmols) ++ ++ jsite=jsite+1 ++ sumchg=sumchg+dble(nummols(itmols))*chgsit(jsite) ++ ++ enddo ++ ++ enddo ++ ++ if(abs(sumchg).gt.1.0d-6) then ++ ++ call warning(idnode,60,sumchg,0.d0,0.d0) ++ ++ endif ++ ++ return ++ end subroutine check_syschg ++ ++ end module site_module +diff -urN dl_class_1.9.orig/srcmod/solvation_module.f dl_class_1.9/srcmod/solvation_module.f +--- dl_class_1.9.orig/srcmod/solvation_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/solvation_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,996 @@ ++ module solvation_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining decomposition of energy arrays ++c to calculate solvation energies ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ use config_module ++ ++ implicit none ++ ++ logical lcomp(9) ++ ++ integer mxtmls_sol2,mxtmls_sol3,mxtmls_sol4 ++ integer ntcons_ghost,ngrp_ghost,nswitch,niswitch ++ integer mxtmls_exc2,mxtmls_exc3,mxtmls_exc4 ++ integer nfrn,ifrn,mfree,kfree,ind_fre(4) ++ ++ real(8) pfree,lambda1,lambda2,dlambda,eng_kin_fre ++ real(8) elrc2,virlrc2,engsic0,engsic2,elrc_sav,qfix_fre ++ real(8) virlrc_sav,volm_sav,elrc_fre,elrc_fre_sav,vlrc_fre ++ real(8) qchg0,qchg1,qchg2,ang_fre,bnd_fre,dih_fre ++ real(8) inv_fre,tbp_fre,fbp_fre,cou_fre,elrc2_sav ++ real(8) vdw_fre,eng_cfg_fre,shl_fre,virlrc2_sav,vlrc_fre_sav ++ real(8) qchg_sav,vir_cfg_fre,ang_vir,bnd_vir,dih_vir ++ real(8) inv_vir,tbp_vir,fbp_vir,cou_vir,vdw_vir,shl_vir ++ ++ integer, allocatable :: atm_fre(:) ++ integer, allocatable :: atmolt(:),rigid_sol(:),const_sol(:) ++ integer, allocatable :: lstgot_sol(:),natm_sol(:) ++ ++ real(8), allocatable :: elrc_sol(:),elrc_sol_sav(:),shl_sol(:) ++ real(8), allocatable :: cou_sol(:),vdw_sol(:),bnd_sol(:) ++ real(8), allocatable :: ckc_sol_sum(:),cks_sol_sum(:) ++ real(8), allocatable :: cou_sol_sic(:),ebuf_sol1(:),inv_sol(:) ++ real(8), allocatable :: ang_sol(:),dih_sol(:),en3_sol(:) ++ real(8), allocatable :: qfix_sol(:),ebuf_sol2(:),en4_sol(:) ++ real(8), allocatable :: vdw_sol_lng(:),cou_sol_lng(:) ++ real(8), allocatable :: degfre_sol(:),degrot_sol(:),temp_sol(:) ++ real(8), allocatable :: vxo_sol(:),vyo_sol(:),vzo_sol(:) ++ real(8), allocatable :: ckc1(:),cks1(:),ckc2(:),cks2(:) ++ real(8), allocatable :: ckc_fre_sum(:),cks_fre_sum(:) ++ real(8), allocatable :: ebuf_exc1(:),ebuf_exc2(:) ++ real(8), allocatable :: vxo_fre(:),vyo_fre(:),vzo_fre(:) ++ real(8), allocatable :: elrc_exc(:),elrc_exc_sav(:) ++ real(8), allocatable :: cou_exc(:),vdw_exc(:),bnd_exc(:) ++ real(8), allocatable :: ang_exc(:),dih_exc(:),en4_exc(:) ++ real(8), allocatable :: vdw_exc_lng(:),cou_exc_lng(:) ++ real(8), allocatable :: shl_exc(:),en3_exc(:),inv_exc(:) ++ real(8), allocatable :: qfix_exc(:),cou_exc_sic(:),weight_sav(:) ++ ++ save atmolt,rigid_sol,const_sol,lstgot_sol,natm_sol,elrc_sol ++ save elrc_sol_sav,cou_sol,vdw_sol,bnd_sol,ckc_sol_sum,cks_sol_sum ++ save cou_sol_sic,ebuf_sol1,en4_sol,ang_sol,dih_sol,en3_sol ++ save qfix_sol,ebuf_sol2,shl_sol,vdw_sol_lng,cou_sol_lng,degfre_sol ++ save degrot_sol,inv_sol,temp_sol,vxo_sol,vyo_sol,vzo_sol ++ save mxtmls_sol2,mxtmls_sol3,mxtmls_sol4,lcomp ++ ++ save nfrn,ifrn,mfree,kfree,pfree,lambda1,lambda2,dlambda ++ save eng_kin_fre,elrc2,virlrc2,engsic0,engsic2,cks_fre_sum ++ save virlrc_sav,volm_sav,elrc_fre,elrc_fre_sav,qchg1,qchg2 ++ save ang_fre,bnd_fre,dih_fre,inv_fre,tbp_fre,fbp_fre,qchg0 ++ save cou_fre,vdw_fre,eng_cfg_fre,elrc2_sav,elrc_sav,vlrc_fre ++ save ang_vir,bnd_vir,dih_vir,inv_vir,tbp_vir,fbp_vir,cou_vir ++ save vdw_vir,shl_vir,vir_cfg_fre,qfix_fre,virlrc2_sav ++ save ind_fre,atm_fre,ckc1,cks1,ckc2,cks2,ckc_fre_sum ++ save ebuf_exc1,ebuf_exc2,vxo_fre,vyo_fre,vzo_fre,vlrc_fre_sav ++ save weight_sav ++ ++ save ntcons_ghost,ngrp_ghost,qchg_sav,nswitch,niswitch ++ save mxtmls_exc2,mxtmls_exc3,mxtmls_exc4 ++ save cou_exc,vdw_exc,bnd_exc,ang_exc,dih_exc,en4_exc,vdw_exc_lng ++ save cou_exc_lng,shl_exc,en3_exc,inv_exc,elrc_exc,elrc_exc_sav ++ save qfix_exc,cou_exc_sic ++ ++ contains ++ ++ subroutine alloc_sol_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine for allocating solvation module arrays ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=37 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ mxtmls_sol2=((mxtmls_sol+1)*mxtmls_sol)/2 ++ mxtmls_sol3=(((mxtmls_sol+3)*mxtmls_sol+2)*mxtmls_sol)/6 ++ mxtmls_sol4=((((mxtmls_sol+6)*mxtmls_sol+11)*mxtmls_sol+6)* ++ x mxtmls_sol)/24 ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (cou_sol(mxtmls_sol2),stat=fail(1)) ++ allocate (vdw_sol(mxtmls_sol2),stat=fail(2)) ++ allocate (shl_sol(mxtmls_sol),stat=fail(3)) ++ allocate (ebuf_sol1(mxebuf_sol),stat=fail(4)) ++ allocate (cou_sol_sic(mxtmls_sol2),stat=fail(5)) ++ allocate (cks_sol_sum(mxtmls_sol),stat=fail(6)) ++ allocate (ckc_sol_sum(mxtmls_sol),stat=fail(7)) ++ allocate (bnd_sol(mxtmls_sol),stat=fail(8)) ++ allocate (ang_sol(mxtmls_sol),stat=fail(9)) ++ allocate (dih_sol(mxtmls_sol),stat=fail(10)) ++ allocate (atmolt(mxatms_sol),stat=fail(11)) ++ allocate (en3_sol(mxtmls_sol3),stat=fail(12)) ++ allocate (en4_sol(mxtmls_sol4),stat=fail(13)) ++ allocate (qfix_sol(mxtmls_sol),stat=fail(14)) ++ allocate (elrc_sol(mxtmls_sol2),stat=fail(15)) ++ allocate (elrc_sol_sav(mxtmls_sol2),stat=fail(16)) ++ allocate (ebuf_sol2(mxebuf_sol),stat=fail(23)) ++ allocate (rigid_sol(mxtmls_sol),stat=fail(24)) ++ allocate (const_sol(mxtmls_sol),stat=fail(25)) ++ allocate (degfre_sol(mxtmls_sol),stat=fail(26)) ++ allocate (degrot_sol(mxtmls_sol),stat=fail(27)) ++ allocate (natm_sol(mxtmls_sol),stat=fail(28)) ++ allocate (lstgot_sol(mxatms_sol),stat=fail(29)) ++ allocate (temp_sol(mxtmls_sol),stat=fail(30)) ++ allocate (vxo_sol(mxatms_sol),stat=fail(31)) ++ allocate (vyo_sol(mxatms_sol),stat=fail(32)) ++ allocate (vzo_sol(mxatms_sol),stat=fail(33)) ++ allocate (vdw_sol_lng(mxtmls_sol2),stat=fail(34)) ++ allocate (cou_sol_lng(mxtmls_sol2),stat=fail(35)) ++ allocate (inv_sol(mxtmls_sol),stat=fail(36)) ++ allocate (weight_sav(mxatms_fre),stat=fail(37)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1030) ++ enddo ++ ++c initialise accumulators ++ ++ lcomp(:)=.false. ++ elrc_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ en3_sol(:)=0.d0 ++ en4_sol(:)=0.d0 ++ bnd_sol(:)=0.d0 ++ ang_sol(:)=0.d0 ++ dih_sol(:)=0.d0 ++ inv_sol(:)=0.d0 ++ ++ return ++ end subroutine alloc_sol_arrays ++ ++ subroutine solva_temp(idnode,mxnode,natms,keyver) ++ ++c*********************************************************************** ++c ++c dl_poly routine for solvation module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,ii,idnode,mxnode,natms,keyver ++ real(8) vvx,vvy,vvz ++ ++ temp_sol(:)=0.d0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ if(keyver.eq.0)then ++ ++ vvx=0.5d0*(vxx(i)+vxo_sol(i)) ++ vvy=0.5d0*(vyy(i)+vyo_sol(i)) ++ vvz=0.5d0*(vzz(i)+vzo_sol(i)) ++ ++ else ++ ++ vvx=vxx(i) ++ vvy=vyy(i) ++ vvz=vzz(i) ++ ++ endif ++ ++ temp_sol(atmolt(i))=temp_sol(atmolt(i))+weight(i)* ++ x (vvx*vvx+vvy*vvy+vvz*vvz)/(boltz*degfre_sol(atmolt(i))) ++ ++ enddo ++ ++c global sum ++ ++ if(mxnode.gt.1)call gdsum(temp_sol,mxtmls_sol,buffer) ++ ++ return ++ end subroutine solva_temp ++ ++ subroutine alloc_free_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine to allocate free energy arrays ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w.smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (ebuf_exc1(mxebuf_fre),stat=fail(1)) ++ allocate (ckc1(mxewld_fre),stat=fail(2)) ++ allocate (cks1(mxewld_fre),stat=fail(3)) ++ allocate (ckc2(mxewld_fre),stat=fail(4)) ++ allocate (cks2(mxewld_fre),stat=fail(5)) ++ allocate (cks_fre_sum(mxtmls_fre),stat=fail(6)) ++ allocate (ckc_fre_sum(mxtmls_fre),stat=fail(7)) ++ allocate (atm_fre(mxatms_fre),stat=fail(8)) ++ allocate (ebuf_exc2(mxebuf_fre),stat=fail(9)) ++ allocate (vxo_fre(mxatms_fre),stat=fail(10)) ++ allocate (vyo_fre(mxatms_fre),stat=fail(11)) ++ allocate (vzo_fre(mxatms_fre),stat=fail(12)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1030) ++ enddo ++ ++ return ++ ++ end subroutine alloc_free_arrays ++ ++ subroutine lrcorrect_fre(lfree,volm,elrc,virlrc) ++ ++c*********************************************************************** ++c ++c dl_poly routine for free energy module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w.smith aug 2008 ++c ++c*********************************************************************** ++ ++ logical lfree ++ real(8) volm,elrc,virlrc ++ ++ elrc=elrc_sav*(volm_sav/volm) ++ elrc2=elrc2_sav*(volm_sav/volm) ++ virlrc=virlrc_sav*(volm_sav/volm) ++ virlrc2=virlrc2_sav*(volm_sav/volm) ++ if(lfree)then ++ elrc_fre=elrc_fre_sav*(volm_sav/volm) ++ vlrc_fre=vlrc_fre_sav*(volm_sav/volm) ++ endif ++ ++ end subroutine lrcorrect_fre ++ ++ subroutine free_kinetic(lfrmas,idnode,mxnode,keyver) ++ ++c*********************************************************************** ++c ++c dl_poly routine for free energy module ++c calculate kinetic energy difference between states ++c ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008: parallel version ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lfrmas ++ integer i,idnode,mxnode,keyver ++ real(8) fac ++ ++ fac=dlambda ++ eng_kin_fre=0.d0 ++ ++ if(keyver.eq.0)then ++ ++ if(lfrmas)fac=dlambda/lambda1 ++ do i=ind_fre(1)+idnode,ind_fre(2),mxnode ++ ++ eng_kin_fre=eng_kin_fre- ++ x fac*weight(i)*((vxx(i)+vxo_fre(i))**2+ ++ x (vyy(i)+vyo_fre(i))**2+(vzz(i)+vzo_fre(i))**2) ++ ++ enddo ++ ++ if(lfrmas)fac=dlambda/lambda2 ++ do i=ind_fre(3)+idnode,ind_fre(4),mxnode ++ ++ eng_kin_fre=eng_kin_fre+ ++ x fac*weight(i)*((vxx(i)+vxo_fre(i))**2+ ++ x (vyy(i)+vyo_fre(i))**2+(vzz(i)+vzo_fre(i))**2) ++ ++ enddo ++ ++ eng_kin_fre=eng_kin_fre/8.d0 ++ ++ else ++ ++ if(lfrmas)fac=dlambda/lambda1 ++ do i=ind_fre(1)+idnode,ind_fre(2),mxnode ++ ++ eng_kin_fre=eng_kin_fre-fac*weight(i)*(vxx(i)**2+ ++ x vyy(i)**2+vzz(i)**2) ++ ++ enddo ++ ++ if(lfrmas)fac=dlambda/lambda2 ++ do i=ind_fre(3)+idnode,ind_fre(4),mxnode ++ ++ eng_kin_fre=eng_kin_fre+fac*weight(i)*(vxx(i)**2+ ++ x vyy(i)**2+vzz(i)**2) ++ ++ enddo ++ ++ eng_kin_fre=eng_kin_fre/2.d0 ++ ++ endif ++ ++c global sum ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=eng_kin_fre ++ call gdsum(buffer(1),1,buffer(2)) ++ eng_kin_fre=buffer(1) ++ ++ endif ++ ++ return ++ end subroutine free_kinetic ++ ++ subroutine freegen() ++ ++c*********************************************************************** ++c ++c dl_poly routine for free energy module: select mixing scheme ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w.smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,j,fac1,fac2 ++ real(8) sigma1,sigma2,acc,arg,gss,tt,pp,a1,a2,a3,a4,a5,err ++ ++ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ ++ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ ++ ++ if(mfree.eq.1)then ++ ++c linear mixing ++ ++ lambda1=(1.d0-pfree) ++ lambda2=pfree ++ dlambda=1.d0 ++ ++ elseif(mfree.eq.2)then ++ ++c nonlinear mixing ++ ++ lambda1=(1.d0-pfree)**kfree ++ lambda2=(1.d0-(1.d0-pfree)**kfree) ++ dlambda=dble(kfree)*(1.d0-pfree)**(kfree-1) ++ ++ elseif(mfree.eq.3)then ++ ++c trigonmetric mixing ++ ++ lambda2=0.5d0*(1.d0+sin(pi*(pfree-0.5d0))) ++ lambda1=1.d0-lambda2 ++ dlambda=0.5d0*pi*cos(pi*(pfree-0.5d0)) ++ ++ elseif(mfree.eq.4)then ++ ++c error function mixing ++ ++ acc=12.d0 ++ arg=2.d0*sqrt(2.302585093*acc) ++ gss=exp(-(arg*(pfree-0.5d0))**2) ++ tt=1.d0/(1.d0+pp*arg*abs(pfree-0.5d0)) ++ err=1.d0-tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*gss ++ lambda2=0.5d0*(1.d0+sign(err,(pfree-0.5d0))) ++ lambda1=1.d0-lambda2 ++ dlambda=gss*arg/sqrpi ++ ++ elseif(mfree.eq.5)then ++ ++c polynomial mixing ++ ++ sigma1=0.d0 ++ ++ do i=0,kfree-1 ++ ++ fac1=1 ++ fac2=1 ++ ++ do j=0,i-1 ++ ++ fac1=fac1*(kfree-1+i-j) ++ fac2=fac2*(i-j) ++ ++ enddo ++ ++ sigma1=sigma1+(dble(fac1/fac2))*pfree**i ++ ++ enddo ++ ++ lambda1=sigma1*(1.d0-pfree)**kfree ++ lambda2=1.d0-lambda1 ++ dlambda=sigma1*kfree*(1.d0-pfree)**(kfree-1) ++ ++ sigma2=0.d0 ++ ++ do i=1,kfree-1 ++ ++ fac1=1 ++ fac2=1 ++ ++ do j=0,i-1 ++ ++ fac1=fac1*(kfree-1+i-j) ++ fac2=fac2*(i-j) ++ ++ enddo ++ ++ sigma2=sigma2+(dble(fac1*i/fac2))*pfree**(i-1) ++ ++ enddo ++ ++ dlambda=dlambda-sigma2*(1.d0-pfree)**kfree ++ ++ else ++ ++c spline kernel mixing ++ ++ arg=pfree-0.5d0 ++ lambda2=2.d0*pfree-8.d0*arg**3*(1.d0-abs(arg))-0.5d0 ++ lambda1=1.d0-lambda2 ++ dlambda=2.d0+arg**2*(32.d0*abs(arg)-24.d0) ++ ++ endif ++ ++ return ++ end subroutine freegen ++ ++ subroutine free_energy_write(idnode,nstep,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing free energy file at selected ++c intervals in simulation ++c ++c copyright - daresbury laboratory ++c author - p.-a. cazade dec 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,natms,nstep ++ real(8) engunit ++ ++ save newjob ++ data newjob/.true./ ++ ++ if(idnode.eq.0)then ++ ++c open the FREENG file if new job or file closed ++ ++ if(newjob)then ++ ++ newjob = .false. ++ open(nfrnwr,file='FREENG',position='append') ++ ++ endif ++ ++ if(nstep.eq.nfrn.or.nstep.eq.ifrn)then ++ ++ write(nfrnwr,'(80a1)')cfgname ++ ++ if(abs(engunit-9648.530821d0).le.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=electron Volts ')") ++ if(abs(engunit-418.4d0).le.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=kcal/mol ')") ++ if(abs(engunit-1.d2).le.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=kjoule/mol ')") ++ if(abs(engunit-boltz).lt.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=kelvin ')") ++ if(abs(engunit-1.d0).lt.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=DL_POLY Internal UNITS ')") ++ ++ write(nfrnwr,'(1p,4e16.8)')pfree,lambda1,lambda2,dlambda ++ ++ endif ++ ++ if(mod(nstep-nfrn,ifrn).eq.0)then ++ ++ write(nfrnwr,"(i10,1p,2e16.8)") ++ x nstep,eng_cfg_fre/engunit,vir_cfg_fre/engunit ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine free_energy_write ++ ++ subroutine alloc_exi_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine to allocate excited state arrays ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ integer, parameter :: nnn=15 ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ mxtmls_exc2=((mxtmls_exc+1)*mxtmls_exc)/2 ++ mxtmls_exc3=(((mxtmls_exc+3)*mxtmls_exc+2)*mxtmls_exc)/6 ++ mxtmls_exc4=((((mxtmls_exc+6)*mxtmls_exc+11)*mxtmls_exc+6)* ++ x mxtmls_exc)/24 ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (cou_exc(mxtmls_exc2),stat=fail(1)) ++ allocate (vdw_exc(mxtmls_exc2),stat=fail(2)) ++ allocate (bnd_exc(mxtmls_exc),stat=fail(3)) ++ allocate (ang_exc(mxtmls_exc),stat=fail(4)) ++ allocate (dih_exc(mxtmls_exc),stat=fail(5)) ++ allocate (en3_exc(mxtmls_exc3),stat=fail(6)) ++ allocate (en4_exc(mxtmls_exc4),stat=fail(7)) ++ allocate (shl_exc(mxtmls_exc),stat=fail(8)) ++ allocate (vdw_exc_lng(mxtmls_exc2),stat=fail(9)) ++ allocate (cou_exc_lng(mxtmls_exc2),stat=fail(10)) ++ allocate (inv_exc(mxtmls_exc),stat=fail(11)) ++ allocate (elrc_exc(mxtmls_exc2),stat=fail(12)) ++ allocate (elrc_exc_sav(mxtmls_exc2),stat=fail(13)) ++ allocate (qfix_exc(mxtmls_exc),stat=fail(14)) ++ allocate (cou_exc_sic(mxtmls_exc2),stat=fail(15)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1030) ++ enddo ++ ++c initialise accumulators ++ ++ bnd_exc(:)=0.d0 ++ ang_exc(:)=0.d0 ++ dih_exc(:)=0.d0 ++ inv_exc(:)=0.d0 ++ en3_exc(:)=0.d0 ++ en4_exc(:)=0.d0 ++ elrc_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ return ++ end subroutine alloc_exi_arrays ++ ++ subroutine update_ghost(idnode,mxnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine for excited state module ++c update the positions of ghost atoms ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,ii,idnode,mxnode ++ ++ if(ind_fre(1).lt.ind_fre(3))then ++ ++ ii=ind_fre(3) ++ ++ do i=ind_fre(1),ind_fre(2) ++ ++ xxx(ii)=xxx(i) ++ yyy(ii)=yyy(i) ++ zzz(ii)=zzz(i) ++ ++ ii=ii+1 ++ ++ enddo ++ ++ else ++ ++ ii=ind_fre(1) ++ ++ do i=ind_fre(3),ind_fre(4) ++ ++ xxx(ii)=xxx(i) ++ yyy(ii)=yyy(i) ++ zzz(ii)=zzz(i) ++ ++ ii=ii+1 ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine update_ghost ++ ++ subroutine copy_force(idnode,mxnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine for excited state module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,ii,idnode,mxnode ++ ++ ii=ind_fre(3) ++ ++ do i=ind_fre(1),ind_fre(2) ++ ++ fxx(ii)=fxx(i) ++ fyy(ii)=fyy(i) ++ fzz(ii)=fzz(i) ++ ++ ii=ii+1 ++ ++ enddo ++ ++ return ++ end subroutine copy_force ++ ++ subroutine switch(elrc,virlrc) ++c*********************************************************************** ++c ++c dl_poly routine for switching system in excitation simulation ++c copyright - daresbury laboratory ++c author - w. smith sep 2008 ++c adapted from p.-a. cazade oct 2007 ++c ++c*********************************************************************** ++ ++ real(8) :: swap,elrc,virlrc ++ real(8), allocatable :: cou_sic_swp(:),qfix_swp(:) ++ real(8), allocatable :: elrc_swp(:) ++ ++ allocate(cou_sic_swp(mxtmls_exc2),qfix_swp(mxtmls_exc)) ++ allocate(elrc_swp(mxtmls_exc2)) ++ ++ swap=elrc ++ elrc=elrc2 ++ elrc2=swap ++ ++ swap=engsic0 ++ engsic0=engsic2 ++ engsic2=swap ++ ++ swap=virlrc ++ virlrc=virlrc2 ++ virlrc2=swap ++ ++ swap=elrc_sav ++ elrc_sav=elrc2_sav ++ elrc2_sav=swap ++ ++ swap=virlrc_sav ++ virlrc_sav=virlrc2_sav ++ virlrc2_sav=swap ++ ++ swap=qchg0 ++ qchg0=qchg2 ++ qchg2=swap ++ ++ cou_sic_swp(:)=cou_sol_sic(:) ++ cou_sol_sic(:)=cou_exc_sic(:) ++ cou_exc_sic(:)=cou_sic_swp(:) ++ ++ qfix_swp(:)=qfix_sol(:) ++ qfix_sol(:)=qfix_exc(:) ++ qfix_exc(:)=qfix_swp(:) ++ ++ elrc_swp(:)=elrc_sol(:) ++ elrc_sol(:)=elrc_exc(:) ++ elrc_exc(:)=elrc_swp(:) ++ ++ elrc_swp(:)=elrc_sol_sav(:) ++ elrc_sol_sav(:)=elrc_exc_sav(:) ++ elrc_exc_sav(:)=elrc_swp(:) ++ ++ deallocate(elrc_swp,cou_sic_swp,qfix_swp) ++ ++ return ++ ++ end subroutine switch ++ ++ subroutine lrcorrect_sol(lghost,volm) ++ ++c*********************************************************************** ++c ++c dl_poly routine for excited state module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ logical :: lghost ++ real(8) :: volm ++ ++ elrc_sol(:)=elrc_sol_sav(:)*(volm_sav/volm) ++ if(lghost)elrc_exc(:)=elrc_exc_sav(:)*(volm_sav/volm) ++ ++ return ++ end subroutine lrcorrect_sol ++ ++ subroutine switch_atm(lfrmas) ++ ++c*********************************************************************** ++c ++c dl_poly routine for excitation module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w.smith aug 2008 ++c ++c*********************************************************************** ++ ++ logical lfrmas ++ integer i,at1_swap,at2_swap ++ ++ at1_swap=ind_fre(1) ++ at2_swap=ind_fre(2) ++ ind_fre(1)=ind_fre(3) ++ ind_fre(2)=ind_fre(4) ++ ind_fre(3)=at1_swap ++ ind_fre(4)=at2_swap ++ ++ if(lfrmas)then ++ ++ do i=ind_fre(1),ind_fre(2) ++ ++ atm_fre(i)=1 ++ weight(i)=lambda1*weight_sav(i) ++ ++ enddo ++ ++ do i=ind_fre(3),ind_fre(4) ++ ++ atm_fre(i)=2 ++ weight(i)=lambda2*weight_sav(i) ++ ++ enddo ++ ++ else ++ ++ do i=ind_fre(1),ind_fre(2) ++ atm_fre(i)=1 ++ enddo ++ ++ do i=ind_fre(3),ind_fre(4) ++ atm_fre(i)=2 ++ enddo ++ ++ endif ++ ++ return ++ end subroutine switch_atm ++ ++ subroutine solvation_write ++ x (lexcite,lswitch,idnode,natms,nstep,nsolva,isolva, ++ x tstep,engunit,elrc) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing solva file at selected ++c intervals in simulation ++c ++c copyright - daresbury laboratory ++c author - p.-a. cazade jun 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob,lexcite,lswitch ++ integer idnode,natms,nstep,nsolva,isolva,i,j,k ++ integer mxtmls2,mxtmls3,mxtmls4 ++ real(8) tstep,engunit,elrc ++ character*80 aa,bb,cc,dd ++ ++ save newjob ++ data newjob/.true./ ++ ++ mxtmls2=((mxtmls+1)*mxtmls)/2 ++ mxtmls3=(((mxtmls+3)*mxtmls+2)*mxtmls)/6 ++ mxtmls4=((((mxtmls+6)*mxtmls+11)*mxtmls+6)*mxtmls)/24 ++ ++ if(idnode.eq.0)then ++ ++c open the SOLVAT file if new job or file closed ++ ++ if(newjob)then ++ ++ newjob=.false. ++ open(nsolwr,file='SOLVAT',position='append') ++ ++ endif ++ ++c write file header block ++ ++ if(nstep.eq.nsolva.or.nstep.eq.isolva)then ++ ++ write(nsolwr,'(80a1)')cfgname ++ ++ if(abs(engunit-9648.530821d0).le.1.d-10)write(nsolwr, ++ x "('ENERGY UNITS=electron Volts ')") ++ if(abs(engunit-418.4d0).le.1.d-10) write(nsolwr, ++ x "('ENERGY UNITS=kcal/mol ')") ++ if(abs(engunit-1.d2).le.1.d-10) write(nsolwr, ++ x "('ENERGY UNITS=kjoule/mol ')") ++ if(abs(engunit-boltz).lt.1.d-10) write(nsolwr, ++ x "('ENERGY UNITS=kelvin ')") ++ if(abs(engunit-1.d0).lt.1.d-10) write(nsolwr, ++ x "('ENERGY UNITS=DL_POLY Internal UNITS ')") ++ ++ write(nsolwr,'(2i10)')natms,mxtmls ++ write(nsolwr,'(1x,11a4)')' lex','lsw',' bnd',' ang', ++ x ' dih',' inv',' shl',' cou',' vdw',' 3bd',' 4bd' ++ write(nsolwr,'(11l4)')lexcite,lswitch,lcomp ++ ++ endif ++ ++c write out periodic data ++ ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++c mark start of time step data ++ ++ if(lexcite)then ++ write(nsolwr,'("timestep",i10,f12.5,1p,2e14.6)') ++ x nstep,tstep,elrc/engunit,elrc2/engunit ++ else ++ write(nsolwr,'("timestep",i10,f12.5,1p,e14.6)') ++ x nstep,tstep,elrc/engunit ++ endif ++ ++c write intramolecular data ++ ++ write(nsolwr,'(1p,5e14.6)')temp_sol ++ if(lcomp(1))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')bnd_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')bnd_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')bnd_sol(:)/engunit ++ endif ++ endif ++ if(lcomp(2))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')ang_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')ang_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')ang_sol(:)/engunit ++ endif ++ endif ++ if(lcomp(3))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')dih_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')dih_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')dih_sol(:)/engunit ++ endif ++ endif ++ if(lcomp(4))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')inv_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')inv_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')inv_sol(:)/engunit ++ endif ++ endif ++ ++c write core-shell data ++ ++ if(lcomp(5))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')shl_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')shl_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')shl_sol(:)/engunit ++ endif ++ endif ++ ++c write coulombic data ++ ++ if(lcomp(6))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')cou_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')cou_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')cou_sol(:)/engunit ++ endif ++ endif ++ ++c write vdw data ++ ++ if(lcomp(7))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')vdw_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')vdw_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')vdw_sol(:)/engunit ++ endif ++ endif ++ ++c write 3-body data ++ ++ if(lcomp(8))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')en3_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')en3_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')en3_sol(:)/engunit ++ endif ++ endif ++ ++c write 4-body data ++ ++ if(lcomp(9))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')en4_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')en4_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')en4_sol(:)/engunit ++ endif ++ endif ++ ++ endif ++ ++c close SOLVAT file at regular intervals ++ ++ if(.not.newjob.and.mod(nstep,ndump).eq.0)then ++ ++ close(nsolwr) ++ newjob=.true. ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine solvation_write ++ ++ end module solvation_module +diff -urN dl_class_1.9.orig/srcmod/spme_module.f dl_class_1.9/srcmod/spme_module.f +--- dl_class_1.9.orig/srcmod/spme_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/spme_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1175 @@ ++ module spme_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining spme arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use setup_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: csp(:),qqc(:,:,:),ffttable(:) ++ real(8), allocatable :: bspx(:,:), bspy(:,:), bspz(:,:) ++ real(8), allocatable :: bsdx(:,:), bsdy(:,:), bsdz(:,:) ++ integer, allocatable :: key1(:),key2(:),key3(:) ++ complex(8), allocatable :: ww1(:), ww2(:), ww3(:) ++ complex(8), allocatable :: qqq(:,:,:) ++ complex(8), allocatable :: bscx(:), bscy(:),bscz(:) ++CFFTW pointer, save :: fplan, bplan ++ ++ save csp,qqc,qqq,ww1,ww2,ww3,bscx,bscy,bscz,ffttable ++ save bspx,bspy,bspz,bsdx,bsdy,bsdz,key1,key2,key3 ++ ++ contains ++ ++ subroutine alloc_spme_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=9 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (csp(mxspl),ffttable(mxftab),stat=fail(1)) ++ allocate (bspx(mxspme,mxspl),bspy(mxspme,mxspl),stat=fail(2)) ++ allocate (bspz(mxspme,mxspl),bsdx(mxspme,mxspl),stat=fail(3)) ++ allocate (bsdy(mxspme,mxspl),bsdz(mxspme,mxspl),stat=fail(4)) ++ allocate (bscx(kmaxd),bscy(kmaxe),bscz(kmaxf),stat=fail(5)) ++ allocate (key1(kmaxd),key2(kmaxe),key3(kmaxf),stat=fail(6)) ++ allocate (ww1(kmaxd),ww2(kmaxe),ww3(kmaxf),stat=fail(7)) ++ allocate (qqc(kmaxd,kmaxe,kmaxf),stat=fail(8)) ++ allocate (qqq(kmaxd,kmaxe,kmaxf),stat=fail(9)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1750) ++ enddo ++ ++ end subroutine alloc_spme_arrays ++ ++ subroutine bspcoe(nospl,kmax1,kmax2,kmax3) ++ ++c********************************************************************** ++c ++c dl_poly subroutine to calculate B-spline coefficients for ++c Euler exponential splines. ++c ++c copyright - daresbury laboratory 1998 ++c author - w. smith july 1998 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nospl,kmax1,kmax2,kmax3,k,i,j ++ complex(8) ccc ++ ++c calculate B-splines at knots ++ ++ csp(1)=0.d0 ++ csp(2)=1.d0 ++ ++ do k=3,nospl ++ ++ csp(k)=0.d0 ++ ++ do j=k,2,-1 ++ ++ csp(j)=(dble(j-1)*csp(j)+dble(k-j+1)*csp(j-1))/dble(k-1) ++ ++ enddo ++ ++ enddo ++ ++c calculate B-spline coefficients ++ ++ do i=0,kmax1-1 ++ ++ ccc=(0.d0,0.d0) ++ ++ do k=0,nospl-2 ++ ++ ccc=ccc+csp(k+2)*ww1(mod(i*k,kmax1)+1) ++ ++ enddo ++ ++ bscx(i+1)=ww1(mod(i*(nospl-1),kmax1)+1)/ccc ++ ++ enddo ++ ++ do i=0,kmax2-1 ++ ++ ccc=(0.d0,0.d0) ++ ++ do k=0,nospl-2 ++ ++ ccc=ccc+csp(k+2)*ww2(mod(i*k,kmax2)+1) ++ ++ enddo ++ ++ bscy(i+1)=ww2(mod(i*(nospl-1),kmax2)+1)/ccc ++ ++ enddo ++ ++ do i=0,kmax3-1 ++ ++ ccc=(0.d0,0.d0) ++ ++ do k=0,nospl-2 ++ ++ ccc=ccc+csp(k+2)*ww3(mod(i*k,kmax3)+1) ++ ++ enddo ++ ++ bscz(i+1)=ww3(mod(i*(nospl-1),kmax3)+1)/ccc ++ ++ enddo ++ ++ return ++ end subroutine bspcoe ++ ++ subroutine bspgen(idnode,mxnode,natms,nospl,txx,tyy,tzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to calculate B-splines for SPME method ++c ++c copyright - daresbury laboratory 1998 ++c author - w. smith july 1998 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nospl,natms,idnode,mxnode,iatm0,iatm1,i,j,k ++ real(8) aaa,bbb,ccc,txx,tyy,tzz ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ ++c set up atoms numbers for nodes ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c construct B-splines ++ ++ do i=iatm0,iatm1 ++ ++ bsdx(i,1)=1.d0 ++ bsdy(i,1)=1.d0 ++ bsdz(i,1)=1.d0 ++ bsdx(i,2)=-1.d0 ++ bsdy(i,2)=-1.d0 ++ bsdz(i,2)=-1.d0 ++ bspx(i,1)=txx(i)-int(txx(i)) ++ bspy(i,1)=tyy(i)-int(tyy(i)) ++ bspz(i,1)=tzz(i)-int(tzz(i)) ++ bspx(i,2)=1.d0-txx(i)+int(txx(i)) ++ bspy(i,2)=1.d0-tyy(i)+int(tyy(i)) ++ bspz(i,2)=1.d0-tzz(i)+int(tzz(i)) ++ ++ enddo ++ ++ do k=3,nospl ++ ++ do i=iatm0,iatm1 ++ ++ bspx(i,k)=0.d0 ++ bspy(i,k)=0.d0 ++ bspz(i,k)=0.d0 ++ ++ enddo ++ ++ do j=k,2,-1 ++ ++ if(k.eq.nospl)then ++ ++ do i=iatm0,iatm1 ++ ++ bsdx(i,j)=bspx(i,j)-bspx(i,j-1) ++ bsdy(i,j)=bspy(i,j)-bspy(i,j-1) ++ bsdz(i,j)=bspz(i,j)-bspz(i,j-1) ++ ++ enddo ++ ++ endif ++ ++ do i=iatm0,iatm1 ++ ++ aaa=txx(i)+dble(j-1)-int(txx(i)) ++ bbb=tyy(i)+dble(j-1)-int(tyy(i)) ++ ccc=tzz(i)+dble(j-1)-int(tzz(i)) ++ bspx(i,j)=(aaa*bspx(i,j)+(dble(k)-aaa)*bspx(i,j-1))/ ++ x dble(k-1) ++ bspy(i,j)=(bbb*bspy(i,j)+(dble(k)-bbb)*bspy(i,j-1))/ ++ x dble(k-1) ++ bspz(i,j)=(ccc*bspz(i,j)+(dble(k)-ccc)*bspz(i,j-1))/ ++ x dble(k-1) ++ ++ enddo ++ ++ enddo ++ ++ if(k.eq.nospl)then ++ ++ do i=iatm0,iatm1 ++ ++ bsdx(i,1)=bspx(i,1) ++ bsdy(i,1)=bspy(i,1) ++ bsdz(i,1)=bspz(i,1) ++ ++ enddo ++ ++ endif ++ ++ do i=iatm0,iatm1 ++ ++ bspx(i,1)=(txx(i)-int(txx(i)))*bspx(i,1)/dble(k-1) ++ bspy(i,1)=(tyy(i)-int(tyy(i)))*bspy(i,1)/dble(k-1) ++ bspz(i,1)=(tzz(i)-int(tzz(i)))*bspz(i,1)/dble(k-1) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine bspgen ++ ++ subroutine ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engcpe,vircpe,alpha,volm,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces in a ++c periodic system using the smoothed particle mesh ewald method ++c due to Essmann et al J. Chem. Phys. 103 (1995) 8577. ++c ++c parallel replicated data version (part 1) ++c ++c copyright - daresbury laboratory 1998 ++c author - w. smith july 1998 ++c additional FFT code - j. geronowicz sept 1999 ++c ++c part 1 - reciprocal space terms (fourier part) ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob,lconsw ++ ++ integer idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl ++ integer npass,i,nnn,ipass,l,ll,k,kk,j,jj,fail,iatm0,iatm1 ++ real(8) engcpe,vircpe,alpha,volm,epsq,omg,bb1,bb2,bb3,qchg ++ real(8) twopi,engsic,rvolm,ralph,shiftx,shifty,shiftz,det,qfix ++ real(8) tx,ty,tz,rcpcut,rcpct2,rkx1,rky1,rkz1,rkx2,rky2,rkz2 ++ real(8) rkx3,rky3,rkz3,rksq,akv,eng1,den,scal1,tmp,rclprp ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++CESSL integer inc2,inc3 ++CSGIC real(8) nauxfft(4) ++ ++ dimension omg(9),rclprp(10) ++ complex(8) cpetot,vterm ++ save newjob,engsic,qchg,iatm0,iatm1 ++ ++ data newjob/.true./,fail/0/ ++CSGIC data nauxfft/3,0,0,0/ ++ ++c allocate temporary arrays ++ ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1760) ++ ++ npass=1 ++ lconsw=.true. ++ twopi=2.d0*pi ++ ++ if(newjob)then ++ ++ newjob=.false. ++ ++c set up atoms numbers for nodes ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate self interaction correction and net system charge ++ ++ qchg=0.d0 ++ engsic=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ qchg=qchg+chge(i) ++ engsic=engsic+chge(i)**2 ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=qchg ++ buffer(2)=engsic ++ call gdsum(buffer(1),2,buffer(3)) ++ qchg =buffer(1) ++ engsic=buffer(2) ++ ++ endif ++ ++ engsic=-r4pie0/epsq*alpha*engsic/sqrpi ++ ++c initialise the complex exponential arrays ++ ++CCRAY call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) ++CESSL call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) ++CFFTW call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) ++CSGIC call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) ++ ++c initialise the default fft routine ++ ++ call dlpfft3(1,1,kmax1,kmax2,kmax3,key1,key2,key3, ++ x ww1,ww2,ww3,qqq) ++ ++c calculate B-spline coefficients ++ ++ call bspcoe(nospl,kmax1,kmax2,kmax3) ++ ++ endif ++ ++c initialise coulombic potential energy ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c initalize stress tensor working arrays ++ ++ do i = 1,9 ++ omg(i) = 0.d0 ++ enddo ++ ++c set working parameters ++ ++ rvolm=twopi/volm ++ ralph=-0.25d0/alpha**2 ++ ++c set switch for TO, RD and HP boundary conditions ++ ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) then ++ ++ npass=2 ++ lconsw=.false. ++ rvolm=0.5d0*rvolm ++ shiftx=0.5d0*dble(kmax1) ++ shifty=0.5d0*dble(kmax2) ++ shiftz=0.5d0*dble(kmax3) ++ if(imcon.eq.7)shiftz=0.d0 ++ ++ endif ++ ++c convert cell coordinates to fractional coordinates ++ ++ call invert(cell,rcell,det) ++ if(abs(det).lt.1.d-6)call error(idnode,120) ++ ++ do i=iatm0,iatm1 ++ ++ txx(i)=dble(kmax1)*(rcell(1)*xxx(i)+rcell(4)*yyy(i)+ ++ x rcell(7)*zzz(i)+0.5d0) ++ tyy(i)=dble(kmax2)*(rcell(2)*xxx(i)+rcell(5)*yyy(i)+ ++ x rcell(8)*zzz(i)+0.5d0) ++ tzz(i)=dble(kmax3)*(rcell(3)*xxx(i)+rcell(6)*yyy(i)+ ++ x rcell(9)*zzz(i)+0.5d0) ++ ++ enddo ++ ++c construct B-splines for atoms ++ ++ call bspgen(idnode,mxnode,natms,nospl,txx,tyy,tzz) ++ ++c zero 3D charge array ++ ++ nnn=kmaxd*kmaxe*kmaxf ++ call set_block(nnn,0.d0,qqc) ++ ++c construct 3D charge array ++ ++ do ipass=1,npass ++ ++ do i=iatm0,iatm1 ++ ++ do l=1,nospl ++ ++ ll=int(tzz(i))-l+2 ++ if(ll.gt.kmax3)ll=1 ++ if(ll.lt.1)ll=ll+kmax3 ++ do k=1,nospl ++ ++ kk=int(tyy(i))-k+2 ++ if(kk.gt.kmax2)kk=1 ++ if(kk.lt.1)kk=kk+kmax2 ++ ++ do j=1,nospl ++ ++ jj=int(txx(i))-j+2 ++ if(jj.gt.kmax1)jj=1 ++ if(jj.lt.1)jj=jj+kmax1 ++ ++ qqc(jj,kk,ll)=qqc(jj,kk,ll)+ ++ x chge(i)*bspx(i,j)*bspy(i,k)*bspz(i,l) ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ if(.not.lconsw)then ++ ++ do i=iatm0,iatm1 ++ ++ tx=txx(i)-shiftx ++ ty=tyy(i)-shifty ++ tz=tzz(i)-shiftz ++ txx(i)=txx(i)-sign(shiftx,tx) ++ tyy(i)=tyy(i)-sign(shifty,ty) ++ tzz(i)=tzz(i)-sign(shiftz,tz) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c global sum of charge array ++ ++ if(mxnode.gt.1) call gdsum(qqc,nnn,buffer) ++ ++c load charge array into complex array for FFT ++ ++ call cpy_rtc(nnn,qqc,qqq) ++ ++c calculate inverse 3D FFT of charge array (in place). ++ ++CFFTW call fftwnd_f77_one(fplan,qqq,0) ++ ++CESSL inc2=kmaxd ++CESSL inc3=kmaxd*kmaxe ++CESSL call dcft3(qqq,inc2,inc3,qqq,inc2,inc3,kmax1,kmax2,kmax3, ++CESSL x -1,1.d0,buffer,mxbuff) ++ ++CSGIC call zzfft3d( -1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, ++CSGIC x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) ++ ++CCRAY call ccfft3d( -1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, ++CCRAY x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) ++ ++ call dlpfft3(0,1,kmax1,kmax2,kmax3,key1,key2,key3, ++ x ww1,ww2,ww3,qqq) ++ ++c set reciprocal space cutoff ++ ++ call dcell(rcell,rclprp) ++ ++ rcpcut=0.5d0*min(dble(kmax1)*rclprp(7),dble(kmax2)*rclprp(8), ++ x dble(kmax3)*rclprp(9)) ++ rcpcut=rcpcut*1.05d0*twopi ++ rcpct2=rcpcut**2 ++ ++c calculate convolution of charge array with gaussian function ++ ++ do l=1,kmax3 ++ ++ ll=l-1 ++ if(l.gt.kmax3/2)ll=l-kmax3-1 ++ tmp=twopi*dble(ll) ++ rkx1=tmp*rcell(3) ++ rky1=tmp*rcell(6) ++ rkz1=tmp*rcell(9) ++ bb3=real(bscz(l)*conjg(bscz(l))) ++ ++ do k=1,kmax2 ++ ++ kk=k-1 ++ if(k.gt.kmax2/2)kk=k-kmax2-1 ++ tmp=twopi*dble(kk) ++ rkx2=rkx1+tmp*rcell(2) ++ rky2=rky1+tmp*rcell(5) ++ rkz2=rkz1+tmp*rcell(8) ++ bb2=bb3*real(bscy(k)*conjg(bscy(k))) ++ ++ do j=1,kmax1 ++ ++ jj=j-1 ++ if(j.gt.kmax1/2)jj=j-kmax1-1 ++ tmp=twopi*dble(jj) ++ rkx3=rkx2+tmp*rcell(1) ++ rky3=rky2+tmp*rcell(4) ++ rkz3=rkz2+tmp*rcell(7) ++ bb1=bb2*real(bscx(j)*conjg(bscx(j))) ++ ++ rksq=rkx3*rkx3+rky3*rky3+rkz3*rkz3 ++ ++ if(rksq.gt.1.d-6.and.rksq.le.rcpct2)then ++ ++ vterm=bb1*exp(ralph*rksq)/rksq*qqq(j,k,l) ++ akv=2.d0*(1.d0/rksq-ralph)*real(vterm*conjg(qqq(j,k,l))) ++ omg(1)=omg(1)-rkx3*rkx3*akv ++ omg(5)=omg(5)-rky3*rky3*akv ++ omg(9)=omg(9)-rkz3*rkz3*akv ++ omg(2)=omg(2)-rkx3*rky3*akv ++ omg(3)=omg(3)-rkx3*rkz3*akv ++ omg(6)=omg(6)-rky3*rkz3*akv ++ qqq(j,k,l)=vterm ++ ++ else ++ ++ qqq(j,k,l)=(0.d0,0.d0) ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++CFFTW call fftwnd_f77_one(bplan,qqq,0) ++CESSL call dcft3(qqq,inc2,inc3,qqq,inc2,inc3,kmax1,kmax2,kmax3, ++CESSL x 1,1.d0,buffer,mxbuff) ++ ++CSGIC call zzfft3d( 1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, ++CSGIC x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) ++ ++CCRAY call ccfft3d( 1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, ++CCRAY x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) ++ ++ call dlpfft3(0,-1,kmax1,kmax2,kmax3,key1,key2,key3, ++ x ww1,ww2,ww3,qqq) ++ ++c calculate atomic forces ++ ++ call spme_for ++ x (idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,rvolm, ++ x epsq,txx,tyy,tzz) ++ ++c complete product of charge array and its gaussian convolution ++ ++ call ele_prd(nnn,qqq,qqc,qqq) ++ ++c correction for charged systems ++ ++ qfix=-(0.5d0*pi*r4pie0/epsq)*((qchg/alpha)**2/volm)/ ++ x dble(mxnode) ++ ++c calculate total energy ++ ++ call scl_csum(nnn,cpetot,qqq) ++ ++ eng1=real(cpetot) ++ den=1.d0/dble(npass) ++ engcpe=engcpe+(den*rvolm*r4pie0*eng1/epsq+engsic)/ ++ x dble(mxnode)+qfix ++ ++c calculate stress tensor (symmetrical) ++ ++ scal1=den*rvolm*r4pie0/(epsq*dble(mxnode)) ++ stress(1) = stress(1)+scal1*(omg(1)+eng1)+qfix ++ stress(2) = stress(2)+scal1*omg(2) ++ stress(3) = stress(3)+scal1*omg(3) ++ stress(4) = stress(4)+scal1*omg(2) ++ stress(5) = stress(5)+scal1*(omg(5)+eng1)+qfix ++ stress(6) = stress(6)+scal1*omg(6) ++ stress(7) = stress(7)+scal1*omg(3) ++ stress(8) = stress(8)+scal1*omg(6) ++ stress(9) = stress(9)+scal1*(omg(9)+eng1)+qfix ++ ++c virial term ++ ++ vircpe=vircpe-scal1*(omg(1)+omg(5)+omg(9)+3.d0*eng1)-3.d0*qfix ++ ++c deallocate temporary arrays ++ ++ deallocate (txx,tyy,tzz,stat=fail) ++ ++ return ++ end subroutine ewald_spme ++ ++ subroutine spme_for ++ x (idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,rvolm, ++ x epsq,txx,tyy,tzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces in a ++c periodic system using smoothed particle mesh ewald method ++c ++c parallel replicated data version (part 1) ++c ++c copyright - daresbury laboratory 1998 ++c author - w. smith oct 1998 ++c ++c part 1 - reciprocal space terms (fourier part) ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,i,ll ++ integer iatm0,iatm1,kk,k,j,jj,l ++ real(8) rvolm,epsq,txx,tyy,tzz,fff,fac,bdx,bdy,bdz ++ real(8) det,qsum ++ ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension fff(3) ++ ++ fac=-2.d0*rvolm*r4pie0/epsq ++ call invert(cell,rcell,det) ++ ++c set up atom numbers for nodes ++ ++ iatm0 = (idnode*natms)/mxnode + 1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++c calculate forces ++ ++ do i=iatm0,iatm1 ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ do l=1,nospl ++ ++ ll=int(tzz(i))-l+2 ++ if(ll.gt.kmax3)ll=1 ++ if(ll.lt.1)ll=ll+kmax3 ++ ++ do k=1,nospl ++ ++ kk=int(tyy(i))-k+2 ++ if(kk.gt.kmax2)kk=1 ++ if(kk.lt.1)kk=kk+kmax2 ++ ++ do j=1,nospl ++ ++ jj=int(txx(i))-j+2 ++ if(jj.gt.kmax1)jj=1 ++ if(jj.lt.1)jj=jj+kmax1 ++ ++ qsum=real(qqq(jj,kk,ll)) ++ bdx=qsum*bsdx(i,j)*bspy(i,k)*bspz(i,l)*dble(kmax1) ++ bdy=qsum*bspx(i,j)*bsdy(i,k)*bspz(i,l)*dble(kmax2) ++ bdz=qsum*bspx(i,j)*bspy(i,k)*bsdz(i,l)*dble(kmax3) ++ ++ fxx(i)=fxx(i)+fac*chge(i)*(bdx*rcell(1)+bdy*rcell(2)+ ++ x bdz*rcell(3)) ++ fyy(i)=fyy(i)+fac*chge(i)*(bdx*rcell(4)+bdy*rcell(5)+ ++ x bdz*rcell(6)) ++ fzz(i)=fzz(i)+fac*chge(i)*(bdx*rcell(7)+bdy*rcell(8)+ ++ x bdz*rcell(9)) ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c remove COM drift arising from SPME approximations ++ ++ fff(1)=0.d0 ++ fff(2)=0.d0 ++ fff(3)=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ fff(1)=fff(1)+fxx(i) ++ fff(2)=fff(2)+fyy(i) ++ fff(3)=fff(3)+fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)call gdsum(fff,3,buffer) ++ ++ fff(1)=fff(1)/dble(natms) ++ fff(2)=fff(2)/dble(natms) ++ fff(3)=fff(3)/dble(natms) ++ ++ do i=iatm0,iatm1 ++ ++ fxx(i)=fxx(i)-fff(1) ++ fyy(i)=fyy(i)-fff(2) ++ fzz(i)=fzz(i)-fff(3) ++ ++ enddo ++ ++ return ++ end subroutine spme_for ++ ++ subroutine dlpfft3 ++ x (ind,isw,ndiv1,ndiv2,ndiv3,key1,key2,key3,ww1,ww2,ww3,aaa) ++ ++c*********************************************************************** ++c ++c dl-poly 3D fast fourier transform routine (in place) ++c ++c copyright daresbury laboratory 1998 ++c author w smith july 1998 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lkx,lky,lkz ++ integer ind,isw,ndiv1,ndiv2,ndiv3,key1,key2,key3,i,idm,kkk ++ integer nu1,nu2,nu3,iii,jjj,j,jj2,num,l,kk1,k12,k ++ real(8) tpi,arg ++ ++ dimension key1(ndiv1),key2(ndiv2),key3(ndiv3) ++ complex(8) ww1(ndiv1),ww2(ndiv2),ww3(ndiv3) ++ complex(8) ttt,aaa(ndiv1,ndiv2,ndiv3) ++ save nu1,nu2,nu3 ++ ++ data tpi/6.283185307179586d0/ ++ ++ if(ind.gt.0)then ++ ++c check FFT array dimensions ++ ++ idm=1 ++ lkx=.true. ++ lky=.true. ++ lkz=.true. ++ ++ do i=1,30 ++ ++ idm=2*idm ++ ++ if(idm.eq.ndiv1)then ++ ++ lkx=.false. ++ nu1=i ++ ++ endif ++ if(idm.eq.ndiv2)then ++ ++ lky=.false. ++ nu2=i ++ ++ endif ++ if(idm.eq.ndiv3)then ++ ++ lkz=.false. ++ nu3=i ++ ++ endif ++ ++ enddo ++ ++ if(lkx.or.lky.or.lkz)then ++ ++ write(*,*)'error - FFT array not 2**N' ++ stop ++ ++ endif ++ ++c set reverse bit address arrays ++ ++ do kkk=1,ndiv1 ++ ++ iii=0 ++ jjj=kkk-1 ++ ++ do j=1,nu1 ++ ++ jj2=jjj/2 ++ iii=2*(iii-jj2)+jjj ++ jjj=jj2 ++ ++ enddo ++ ++ key1(kkk)=iii+1 ++ ++ enddo ++ ++ do kkk=1,ndiv2 ++ ++ iii=0 ++ jjj=kkk-1 ++ ++ do j=1,nu2 ++ ++ jj2=jjj/2 ++ iii=2*(iii-jj2)+jjj ++ jjj=jj2 ++ ++ enddo ++ ++ key2(kkk)=iii+1 ++ ++ enddo ++ ++ do kkk=1,ndiv3 ++ ++ iii=0 ++ jjj=kkk-1 ++ ++ do j=1,nu3 ++ ++ jj2=jjj/2 ++ iii=2*(iii-jj2)+jjj ++ jjj=jj2 ++ ++ enddo ++ ++ key3(kkk)=iii+1 ++ ++ enddo ++ ++c initialise complex exponential factors ++ ++ ww1(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv1/2 ++ ++ arg=(tpi/dble(ndiv1))*dble(i) ++ ww1(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww1(ndiv1+1-i)=conjg(ww1(i+1)) ++ ++ enddo ++ ++ ww2(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv2/2 ++ ++ arg=(tpi/dble(ndiv2))*dble(i) ++ ww2(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww2(ndiv2+1-i)=conjg(ww2(i+1)) ++ ++ enddo ++ ++ ww3(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv3/2 ++ ++ arg=(tpi/dble(ndiv3))*dble(i) ++ ww3(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww3(ndiv3+1-i)=conjg(ww3(i+1)) ++ ++ enddo ++ ++ return ++ ++ endif ++ ++c take conjugate of exponentials if required ++ ++ if(isw.lt.0)then ++ ++ do i=1,ndiv1 ++ ++ ww1(i)=conjg(ww1(i)) ++ ++ enddo ++ ++ do i=1,ndiv2 ++ ++ ww2(i)=conjg(ww2(i)) ++ ++ enddo ++ ++ do i=1,ndiv3 ++ ++ ww3(i)=conjg(ww3(i)) ++ ++ enddo ++ ++ endif ++ ++c perform fourier transform in X direction ++ ++ kkk=0 ++ num=ndiv1/2 ++ ++ do l=1,nu1 ++ ++ do while(kkk.lt.ndiv1) ++ ++ do i=1,num ++ ++ iii=key1(kkk/num+1) ++ kk1=kkk+1 ++ k12=kk1+num ++ ++ do j=1,ndiv2 ++ ++ do k=1,ndiv3 ++ ++ ttt=aaa(k12,j,k)*ww1(iii) ++ aaa(k12,j,k)=aaa(kk1,j,k)-ttt ++ aaa(kk1,j,k)=aaa(kk1,j,k)+ttt ++ ++ enddo ++ ++ enddo ++ ++ kkk=kkk+1 ++ ++ enddo ++ ++ kkk=kkk+num ++ ++ enddo ++ ++ kkk=0 ++ num=num/2 ++ ++ enddo ++ ++c unscramble the fft using bit address array ++ ++ do kkk=1,ndiv1 ++ ++ iii=key1(kkk) ++ ++ if(iii.gt.kkk)then ++ ++ do j=1,ndiv2 ++ ++ do k=1,ndiv3 ++ ++ ttt=aaa(kkk,j,k) ++ aaa(kkk,j,k)=aaa(iii,j,k) ++ aaa(iii,j,k)=ttt ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c perform fourier transform in Y direction ++ ++ kkk=0 ++ num=ndiv2/2 ++ ++ do l=1,nu2 ++ ++ do while(kkk.lt.ndiv2) ++ ++ do i=1,num ++ ++ iii=key2(kkk/num+1) ++ kk1=kkk+1 ++ k12=kk1+num ++ ++ do j=1,ndiv1 ++ ++ do k=1,ndiv3 ++ ++ ttt=aaa(j,k12,k)*ww2(iii) ++ aaa(j,k12,k)=aaa(j,kk1,k)-ttt ++ aaa(j,kk1,k)=aaa(j,kk1,k)+ttt ++ ++ enddo ++ ++ enddo ++ ++ kkk=kkk+1 ++ ++ enddo ++ ++ kkk=kkk+num ++ ++ enddo ++ ++ kkk=0 ++ num=num/2 ++ ++ enddo ++ ++c unscramble the fft using bit address array ++ ++ do kkk=1,ndiv2 ++ ++ iii=key2(kkk) ++ ++ if(iii.gt.kkk)then ++ ++ do j=1,ndiv1 ++ ++ do k=1,ndiv3 ++ ++ ttt=aaa(j,kkk,k) ++ aaa(j,kkk,k)=aaa(j,iii,k) ++ aaa(j,iii,k)=ttt ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c perform fourier transform in Z direction ++ ++ kkk=0 ++ num=ndiv3/2 ++ ++ do l=1,nu3 ++ ++ do while(kkk.lt.ndiv3) ++ ++ do i=1,num ++ ++ iii=key3(kkk/num+1) ++ kk1=kkk+1 ++ k12=kk1+num ++ ++ do j=1,ndiv1 ++ ++ do k=1,ndiv2 ++ ++ ttt=aaa(j,k,k12)*ww3(iii) ++ aaa(j,k,k12)=aaa(j,k,kk1)-ttt ++ aaa(j,k,kk1)=aaa(j,k,kk1)+ttt ++ ++ enddo ++ ++ enddo ++ ++ kkk=kkk+1 ++ ++ enddo ++ ++ kkk=kkk+num ++ ++ enddo ++ ++ kkk=0 ++ num=num/2 ++ ++ enddo ++ ++c unscramble the fft using bit address array ++ ++ do kkk=1,ndiv3 ++ ++ iii=key3(kkk) ++ ++ if(iii.gt.kkk)then ++ ++ do j=1,ndiv1 ++ ++ do k=1,ndiv2 ++ ++ ttt=aaa(j,k,kkk) ++ aaa(j,k,kkk)=aaa(j,k,iii) ++ aaa(j,k,iii)=ttt ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c restore exponentials to unconjugated values if necessary ++ ++ if(isw.lt.0)then ++ ++ do i=1,ndiv1 ++ ++ ww1(i)=conjg(ww1(i)) ++ ++ enddo ++ ++ do i=1,ndiv2 ++ ++ ww2(i)=conjg(ww2(i)) ++ ++ enddo ++ ++ do i=1,ndiv3 ++ ++ ww3(i)=conjg(ww3(i)) ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine dlpfft3 ++ ++ subroutine spl_cexp(ndiv1,ndiv2,ndiv3,ww1,ww2,ww3) ++ ++c*********************************************************************** ++c ++c dl-poly routine to create complex exponential arrays for ++c b-splines ++c ++c copyright daresbury laboratory 1998 ++c author w smith oct 1998 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer ndiv1,ndiv2,ndiv3,i ++ real(8) tpi,arg ++ complex(8) ww1(ndiv1),ww2(ndiv2),ww3(ndiv3) ++ ++ data tpi/6.283185307179586d0/ ++ ++c initialise complex exponential factors ++ ++ ww1(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv1/2 ++ ++ arg=(tpi/dble(ndiv1))*dble(i) ++ ww1(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww1(ndiv1+1-i)=conjg(ww1(i+1)) ++ ++ enddo ++ ++ ww2(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv2/2 ++ ++ arg=(tpi/dble(ndiv2))*dble(i) ++ ww2(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww2(ndiv2+1-i)=conjg(ww2(i+1)) ++ ++ enddo ++ ++ ww3(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv3/2 ++ ++ arg=(tpi/dble(ndiv3))*dble(i) ++ ww3(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww3(ndiv3+1-i)=conjg(ww3(i+1)) ++ ++ enddo ++ ++ return ++ end subroutine spl_cexp ++ ++ end module spme_module +diff -urN dl_class_1.9.orig/srcmod/temp_scalers_module.f dl_class_1.9/srcmod/temp_scalers_module.f +--- dl_class_1.9.orig/srcmod/temp_scalers_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/temp_scalers_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,768 @@ ++ module temp_scalers_module ++ ++c*********************************************************************** ++c ++c dl_poly module for temperature scaling routines ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use core_shell_module ++ use error_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use utility_module ++ ++ contains ++ ++ subroutine quench(imcon,idnode,mxnode,natms,nscons,tolnce) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for quenching the bond energies in the ++c initial structure of a molecule defined by constraints ++c ++c copyright - daresbury laboratory 1992 ++c author w.smith november 1992 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical safe ++ integer imcon,idnode,mxnode,natms,nscons,i,j,k,icyc ++ integer fail ++ real(8) tolnce,ddd,esig,vvv,ww1,ww2 ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++ dimension fail(3) ++ ++ data fail/0,0,0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(3)) ++ ++ do i=1,3 ++ if(fail(i).ne.0)call error(idnode,1770) ++ enddo ++ ++c calculate bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c normalise bond vectors ++ ++ do k=1,nscons ++ ++ ddd=sqrt(dxt(k)**2+dyt(k)**2+dzt(k)**2) ++ ++ dxt(k)=dxt(k)/ddd ++ dyt(k)=dyt(k)/ddd ++ dzt(k)=dzt(k)/ddd ++ ++ enddo ++ ++c start of quenching cycle ++ ++ icyc=0 ++ safe=.false. ++ do while(.not.safe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c initialise velocity correction arrays ++ ++ do i=1,natms ++ ++ uxx(i)=0.d0 ++ uyy(i)=0.d0 ++ uzz(i)=0.d0 ++ ++ enddo ++ ++c calculate velocity corrections and error ++ ++ esig=0.d0 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ vvv=dxt(k)*(vxx(i)-vxx(j))+dyt(k)*(vyy(i)-vyy(j))+ ++ x dzt(k)*(vzz(i)-vzz(j)) ++ ++ esig=max(esig,abs(vvv)) ++ ++ ww1=weight(j)*vvv/(weight(i)+weight(j)) ++ ww2=weight(i)*vvv/(weight(i)+weight(j)) ++ uxx(i)=uxx(i)-ww1*dxt(k) ++ uyy(i)=uyy(i)-ww1*dyt(k) ++ uzz(i)=uzz(i)-ww1*dzt(k) ++ uxx(j)=uxx(j)+ww2*dxt(k) ++ uyy(j)=uyy(j)+ww2*dyt(k) ++ uzz(j)=uzz(j)+ww2*dzt(k) ++ ++ enddo ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++ if(.not.safe)then ++ ++c transport velocity adjustments to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ call shmove ++ x (idnode,mxnode,natms,lashap,lishap,uxx,uyy,uzz, ++ x xxt,yyt,zzt,buffer) ++ ++ endif ++ ++c update velocities ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ vxx(i)=vxx(i)+uxx(i)/dble(listme(i)) ++ vyy(i)=vyy(i)+uyy(i)/dble(listme(i)) ++ vzz(i)=vzz(i)+uzz(i)/dble(listme(i)) ++ vxx(j)=vxx(j)+uxx(j)/dble(listme(j)) ++ vyy(j)=vyy(j)+uyy(j)/dble(listme(j)) ++ vzz(j)=vzz(j)+uzz(j)/dble(listme(j)) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c error exit if quenching fails ++ ++ if(.not.safe)call error(idnode,70) ++ ++c splice velocity arrays across nodes ++ ++ if(mxnode.gt.1) call splice ++ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,stat=fail(3)) ++ ++ return ++ end subroutine quench ++ ++ subroutine quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to convert atomic velocities to rigid body ++c c.o.m. and angular velocity ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1993. ++c author - t.forester nov 1993. ++c amended - t.forester dec 1994 : block data. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,mxnode,natms,ngrp,fail,ig,jr,id ++ integer igrp1,igrp2,i,j ++ real(8) rot,wxx,wyy,wzz ++ ++ dimension rot(9) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1780) ++ ++c block indices for groups ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c translate atomic velocites to com velocity & angular velocity ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=0.d0 ++ gvyy(ig)=0.d0 ++ gvzz(ig)=0.d0 ++ omx(ig)=0.d0 ++ omy(ig)=0.d0 ++ omz(ig)=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr =jr+1 ++ i =lstrgd(jr) ++ ++c centre of mass momentum ++ ++ gvxx(ig)=gvxx(ig)+weight(i)*vxx(i) ++ gvyy(ig)=gvyy(ig)+weight(i)*vyy(i) ++ gvzz(ig)=gvzz(ig)+weight(i)*vzz(i) ++ ++c distance to c.o.m of molecule ++ ++ xxt(jr)=xxx(i)-gcmx(ig) ++ yyt(jr)=yyy(i)-gcmy(ig) ++ zzt(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++c centre of mass velocity ++ ++ gvxx(ig)=gvxx(ig)/gmass(id) ++ gvyy(ig)=gvyy(ig)/gmass(id) ++ gvzz(ig)=gvzz(ig)/gmass(id) ++ ++ enddo ++ ++ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c rotational matrix ++ ++ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 ++ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) ++ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) ++ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) ++ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 ++ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) ++ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) ++ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) ++ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 ++ ++c angular momentum accumulators ++ ++ wxx=0.d0 ++ wyy=0.d0 ++ wzz=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr =jr+1 ++ i =lstrgd(jr) ++ ++ wxx=wxx+weight(i)*(yyt(jr)*vzz(i)-zzt(jr)*vyy(i)) ++ wyy=wyy+weight(i)*(zzt(jr)*vxx(i)-xxt(jr)*vzz(i)) ++ wzz=wzz+weight(i)*(xxt(jr)*vyy(i)-yyt(jr)*vxx(i)) ++ ++ enddo ++ ++c angular velocity in body fixed frame ++ ++ omx(ig)=(rot(1)*wxx+rot(4)*wyy+rot(7)*wzz)*rotinx(id,2) ++ omy(ig)=(rot(2)*wxx+rot(5)*wyy+rot(8)*wzz)*rotiny(id,2) ++ omz(ig)=(rot(3)*wxx+rot(6)*wyy+rot(9)*wzz)*rotinz(id,2) ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr +1 ++ i=lstrgd(jr) ++ ++c site velocity in body frame ++ ++ wxx=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ wyy=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ wzz=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*wxx+rot(2)*wyy+rot(3)*wzz+gvxx(ig) ++ vyy(i)=rot(4)*wxx+rot(5)*wyy+rot(6)*wzz+gvyy(ig) ++ vzz(i)=rot(7)*wxx+rot(8)*wyy+rot(9)*wzz+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,omx,omy,omz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail) ++ ++ return ++ end subroutine quatqnch ++ ++ subroutine vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for scaling the velocity arrays to the ++c desired temperature ++c ++c zeroes angular momentum in non-periodic system. ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1992. ++c author - w.smith july 1992 ++c amended - t.forester oct 1993 ++c amended - t.forester dec 1994 : block data ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,imcon,natms,ngrp,iatm1,iatm2,i ++ real(8) sigma,roti,rotinv,cmx,cmy,cmz,cmvx,cmvy,cmvz,sysmas ++ real(8) amx,amy,amz,det,scale,rsq,wxx,wyy,wzz,sumke ++ ++ dimension roti(9),rotinv(9) ++ ++c block indices ++ ++ iatm1=(idnode*natms)/mxnode+1 ++ iatm2=((idnode+1)*natms)/mxnode ++ ++c calculate centre of mass position and motion of the system ++ ++ cmx=0.d0 ++ cmy=0.d0 ++ cmz=0.d0 ++ cmvx=0.d0 ++ cmvy=0.d0 ++ cmvz=0.d0 ++ sysmas=0.d0 ++ ++ do i=iatm1,iatm2 ++ ++ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then ++ ++ cmx=cmx+weight(i)*xxx(i) ++ cmy=cmy+weight(i)*yyy(i) ++ cmz=cmz+weight(i)*zzz(i) ++ sysmas=sysmas+weight(i) ++ cmvx=cmvx+vxx(i)*weight(i) ++ cmvy=cmvy+vyy(i)*weight(i) ++ cmvz=cmvz+vzz(i)*weight(i) ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ buffer(8)=sysmas ++ buffer(9)=cmx ++ buffer(10)=cmy ++ buffer(11)=cmz ++ buffer(12)=cmvx ++ buffer(13)=cmvy ++ buffer(14)=cmvz ++ call gdsum(buffer(8),7,buffer(1)) ++ sysmas= buffer(8) ++ cmx=buffer(9) ++ cmy=buffer(10) ++ cmz=buffer(11) ++ cmvx=buffer(12) ++ cmvy=buffer(13) ++ cmvz=buffer(14) ++ endif ++ ++ cmx=cmx/sysmas ++ cmy=cmy/sysmas ++ cmz=cmz/sysmas ++ ++ cmvx=cmvx/sysmas ++ cmvy=cmvy/sysmas ++ cmvz=cmvz/sysmas ++ ++c remove centre of mass motion ++ ++ do i=1,natms ++ ++ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then ++ ++ vxx(i)=vxx(i)-cmvx ++ vyy(i)=vyy(i)-cmvy ++ vzz(i)=vzz(i)-cmvz ++ ++ else ++ ++ vxx(i)=0.d0 ++ vyy(i)=0.d0 ++ vzz(i)=0.d0 ++ ++ endif ++ ++ enddo ++ ++c zero angular momentum about centre of mass - non-periodic system ++ ++ if(imcon.eq.0)then ++ ++c move to centre of mass origin ++ ++ do i=1,natms ++ ++ xxx(i)=xxx(i)-cmx ++ yyy(i)=yyy(i)-cmy ++ zzz(i)=zzz(i)-cmz ++ ++ enddo ++ ++c angular momentum accumulators ++ ++ amx=0.d0 ++ amy=0.d0 ++ amz=0.d0 ++ ++c rotational inertia accumulators ++ ++ do i=1,9 ++ roti(i)=0.d0 ++ enddo ++ ++ do i=iatm1,iatm2 ++ ++ amx=amx+weight(i)*(yyy(i)*vzz(i)-zzz(i)*vyy(i)) ++ amy=amy+weight(i)*(zzz(i)*vxx(i)-xxx(i)*vzz(i)) ++ amz=amz+weight(i)*(xxx(i)*vyy(i)-yyy(i)*vxx(i)) ++ ++ rsq=xxx(i)**2+yyy(i)**2+zzz(i)**2 ++ roti(1)=roti(1)+weight(i)*(xxx(i)*xxx(i)-rsq) ++ roti(2)=roti(2)+weight(i)* xxx(i)*yyy(i) ++ roti(3)=roti(3)+weight(i)* xxx(i)*zzz(i) ++ roti(5)=roti(5)+weight(i)*(yyy(i)*yyy(i)-rsq) ++ roti(6)=roti(6)+weight(i)* yyy(i)*zzz(i) ++ roti(9)=roti(9)+weight(i)*(zzz(i)*zzz(i)-rsq) ++ ++ enddo ++ ++c complete rotational inertia matrix ++ ++ roti(4)=roti(2) ++ roti(7)=roti(3) ++ roti(8)=roti(6) ++ ++c global sum ++ ++ if(mxnode.gt.1)then ++ buffer(13)=amx ++ buffer(14)=amy ++ buffer(15)=amz ++ do i=1,9 ++ buffer(15+i)=roti(i) ++ enddo ++ call gdsum(buffer(13),12,buffer(1)) ++ amx=buffer(13) ++ amy=buffer(14) ++ amz=buffer(15) ++ do i=1,9 ++ roti(i)=buffer(15+i) ++ enddo ++ endif ++ ++c invert rotational inertia matrix ++ ++ call invert (roti,rotinv,det) ++ ++c correction to angular velocity ++ ++ wxx=rotinv(1)*amx+rotinv(2)*amy+rotinv(3)*amz ++ wyy=rotinv(4)*amx+rotinv(5)*amy+rotinv(6)*amz ++ wzz=rotinv(7)*amx+rotinv(8)*amy+rotinv(9)*amz ++ ++c correction to linear velocity ++ ++ do i=1,natms ++ ++ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then ++ ++ vxx(i)=vxx(i)+(wyy*zzz(i)-wzz*yyy(i)) ++ vyy(i)=vyy(i)+(wzz*xxx(i)-wxx*zzz(i)) ++ vzz(i)=vzz(i)+(wxx*yyy(i)-wyy*xxx(i)) ++ ++ endif ++ ++ enddo ++ ++c reset positions to original reference frame ++ ++ do i=1,natms ++ ++ xxx(i)=xxx(i)+cmx ++ yyy(i)=yyy(i)+cmy ++ zzz(i)=zzz(i)+cmz ++ ++ enddo ++ ++ endif ++ ++c calculate temperature ++ ++ sumke=0.d0 ++ ++ do i=iatm1,iatm2 ++ ++ sumke=sumke+weight(i)* ++ x (vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ ++ enddo ++ ++ sumke=0.5d0*sumke ++ if(mxnode.gt.1)then ++ buffer(1)=sumke ++ call gdsum(buffer(1),1,buffer(2)) ++ sumke=buffer(1) ++ endif ++ ++c apply temperature scaling ++ ++ scale=1.d0 ++ if(sumke.gt.1.d-6)scale=sqrt(sigma/sumke) ++ ++ do i=1,natms ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++ if(ngrp.gt.0)then ++ call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ endif ++ ++ return ++ end subroutine vscaleg ++ ++ subroutine shlqnch(idnode,mxnode,ntshl,temp) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for quenching the internal bond energies ++c in ions defined by shell model ++c ++c copyright - daresbury laboratory 1994 ++c author w.smith july 1994 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m ++ real(8) temp,pke,rmu,dvx,dvy,dvz,tmx,tmy,tmz,scl ++ ++c permitted core-shell internal kinetic energy ++ ++ pke=boltz*temp*1.d-4 ++ ++c block indices ++ ++ ishl1 = (idnode*ntshl)/mxnode+1 ++ ishl2 = ((idnode+1)*ntshl)/mxnode ++ ++c calculate core and shell velocities from total momentum ++ ++ m=0 ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++ rmu=(weight(i)*weight(j))/(weight(i)+weight(j)) ++ ++ if(rmu.gt.0.d0)then ++ ++ dvx=vxx(j)-vxx(i) ++ dvy=vyy(j)-vyy(i) ++ dvz=vzz(j)-vzz(i) ++ ++ scl=sqrt(pke/(rmu*(dvx*dvx+dvy*dvy+dvz*dvz))) ++ ++ tmx=weight(i)*vxx(i)+weight(j)*vxx(j) ++ tmy=weight(i)*vyy(i)+weight(j)*vyy(j) ++ tmz=weight(i)*vzz(i)+weight(j)*vzz(j) ++ ++ vxx(i)=tmx/(weight(i)+weight(j))-scl*rmu*dvx/weight(i) ++ vxx(j)=tmx/(weight(i)+weight(j))+scl*rmu*dvx/weight(j) ++ vyy(i)=tmy/(weight(i)+weight(j))-scl*rmu*dvy/weight(i) ++ vyy(j)=tmy/(weight(i)+weight(j))+scl*rmu*dvy/weight(j) ++ vzz(i)=tmz/(weight(i)+weight(j))-scl*rmu*dvz/weight(i) ++ vzz(j)=tmz/(weight(i)+weight(j))+scl*rmu*dvz/weight(j) ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1) call shlmerge(idnode,mxnode,ntshl) ++ ++ return ++ end subroutine shlqnch ++ ++ subroutine regauss ++ x (idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for resetting the system velocities ++c ++c copyright - daresbury laboratory ++c author - w. smith may 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,mxnode,natms,ngrp,nscons ++ integer ntcons,ntshl,i,k,keyshl ++ real(8) temp,tolnce,sigma,rsq ++ ++c set atomic velocities from gaussian distribution ++ ++ call gauss(natms,vxx,vyy,vzz) ++ ++ do i=1,natms ++ ++ rsq=sqrt(rmass(i)) ++ vxx(i)=vxx(i)*rsq ++ vyy(i)=vyy(i)*rsq ++ vzz(i)=vzz(i)*rsq ++ ++ enddo ++ ++ if(ntcons.gt.0)call quench ++ x (imcon,idnode,mxnode,natms,nscons,tolnce) ++ ++ if(ngrp.gt.0)call quatqnch ++ x (idnode,imcon,mxnode,natms,ngrp) ++ ++ if(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ return ++ end subroutine regauss ++ ++ subroutine impact(khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) ++ ++c********************************************************************* ++c ++c DLPOLY routinue for impacting a selected atom with a specified ++c recoil energy ++c ++c copyright daresbury laboratory ++c author w.smith september 2007 ++c ++c********************************************************************* ++ ++ use config_module ++ use ensemble_tools_module ++ ++ implicit none ++ ++ integer i,khit,natms,idnode,mxnode,iatm0,iatm1 ++ real(8) ehit,vxo,vyo,vzo,xhit,yhit,zhit,fac,smass,vel ++ ++c store original particle velocity ++ ++ vxo=vxx(khit) ++ vyo=vyy(khit) ++ vzo=vzz(khit) ++ ++c determine recoil velocity ++ ++ vel=sqrt(2.d0*ehit/(weight(khit)*(xhit**2+yhit**2+zhit**2))) ++ ++c reassign particle velocity ++ ++ vxx(khit)=vel*xhit ++ vyy(khit)=vel*yhit ++ vzz(khit)=vel*zhit ++ ++c determine system mass ++ ++ smass=getmass(natms,idnode,mxnode) ++ ++c calculate net system velocity ++ ++ vxo=(vxx(khit)-vxo)*weight(khit)/smass ++ vyo=(vyy(khit)-vyo)*weight(khit)/smass ++ vzo=(vzz(khit)-vzo)*weight(khit)/smass ++ ++c reset system net velocity to zero ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vxo ++ vyy(i)=vyy(i)-vyo ++ vzz(i)=vzz(i)-vzo ++ ++ enddo ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ return ++ end subroutine impact ++ ++ end module temp_scalers_module +diff -urN dl_class_1.9.orig/srcmod/tersoff_module.f dl_class_1.9/srcmod/tersoff_module.f +--- dl_class_1.9.orig/srcmod/tersoff_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/tersoff_module.f 2011-04-16 16:13:06.000000000 +0200 +@@ -0,0 +1,1011 @@ ++ module tersoff_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining tersoff potential arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith dec 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use parse_module ++ use setup_module ++ use site_module ++ use utility_module ++ ++ implicit none ++ ++ logical, allocatable :: filter(:) ++ integer, allocatable :: lstter(:),ltpter(:),lattsf(:) ++ real(8), allocatable :: prmter(:,:),prmter2(:,:) ++ real(8), allocatable :: vmbp(:,:,:),gmbp(:,:,:) ++ real(8), allocatable :: xtf(:),ytf(:),ztf(:),rtf(:) ++ real(8), allocatable :: ert(:),eat(:),grt(:),gat(:) ++ real(8), allocatable :: scr(:),gcr(:),gam(:),gvr(:) ++ ++ save xtf,ytf,ztf,rtf,ert,eat,grt,gat,scr,gcr,gam,filter ++ save prmter,prmter2,lstter,ltpter,lattsf,vmbp,gmbp ++ ++ contains ++ ++ subroutine alloc_ter_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=20 ++ ++ integer i,fail,idnode,npairs ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ npairs=(mxter*(mxter+1))/2 ++ allocate (prmter(mxter,mxpter),stat=fail(1)) ++ allocate (prmter2(2,npairs),stat=fail(2)) ++ allocate (lstter(mxter),stat=fail(3)) ++ allocate (ltpter(mxter),stat=fail(4)) ++ allocate (lattsf(mxatms),stat=fail(5)) ++ allocate (xtf(mxatms),stat=fail(6)) ++ allocate (ytf(mxatms),stat=fail(7)) ++ allocate (ztf(mxatms),stat=fail(8)) ++ allocate (rtf(mxatms),stat=fail(9)) ++ allocate (ert(mxatms),stat=fail(10)) ++ allocate (eat(mxatms),stat=fail(11)) ++ allocate (grt(mxatms),stat=fail(12)) ++ allocate (gat(mxatms),stat=fail(13)) ++ allocate (scr(mxatms),stat=fail(14)) ++ allocate (gcr(mxatms),stat=fail(15)) ++ allocate (gam(mxatms),stat=fail(16)) ++ allocate (gvr(mxatms),stat=fail(17)) ++ allocate (vmbp(mxgrid,npairs,3),stat=fail(18)) ++ allocate (gmbp(mxgrid,npairs,3),stat=fail(19)) ++ allocate (filter(mxsite),stat=fail(20)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1945) ++ enddo ++ ++ end subroutine alloc_ter_arrays ++ ++ subroutine define_tersoff ++ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining tersoff potentials ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits,lmols ++ character*8 keyword ++ character*8 atom0,atom1 ++ character*1 message(80) ++ integer fail,idnode,ntpter,ntpatm,i,idum,j,itpter ++ integer keypot,jtpatm,k,katm0,katm1,icross,npairs,ktyp ++ real(8) rctter,engunit ++ real(8), allocatable :: parpot(:) ++ data fail/0/ ++ ++ allocate (parpot(mxpter),stat=fail) ++ if(fail.ne.0)call error(idnode,1955) ++ ++ ntpter=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'number of specified tersoff ', ++ x 'atom potentials',i10)") ntpter ++ write(nrite,"(/,/,16x,'atom ',3x,' key',30x, ++ x 'parameters'/,/)") ++ ++ endif ++ if(ntpter.gt.mxter) call error(idnode,88) ++ if(.not.lunits) call error(idnode,6) ++ if(.not.lmols) call error(idnode,13) ++ ++ rctter=0.d0 ++ ++ do i=1,mxter ++ lstter(i)=-1 ++ enddo ++ ++ do i=1,mxsite ++ filter(i)=.false. ++ enddo ++ ++ k=0 ++ do i=1,mxter ++ do j=1,i ++ ++ k=k+1 ++ prmter2(1,k)=0.d0 ++ prmter2(2,k)=0.d0 ++ ++ enddo ++ enddo ++ ++ do itpter=1,ntpter ++ ++ do i=1,mxpter ++ parpot(i)=0.d0 ++ enddo ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call getword(atom0,record,8,lenrec) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'ters') then ++ ++ keypot=1 ++ ++ else ++ ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,1972) ++ ++ endif ++ ++ parpot(1)=dblstr(record,lenrec,idum) ! A_i ++ parpot(2)=dblstr(record,lenrec,idum) ! a_i ++ parpot(3)=dblstr(record,lenrec,idum) ! B_i ++ parpot(4)=dblstr(record,lenrec,idum) ! b_i ++ parpot(5)=dblstr(record,lenrec,idum) ! R_i ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ parpot(6)=dblstr(record,lenrec,idum) ! S_i ++ parpot(7)=dblstr(record,lenrec,idum) ! beta_i ++ parpot(8)=dblstr(record,lenrec,idum) ! eta_i ++ parpot(9)=dblstr(record,lenrec,idum) ! c_i ++ parpot(10)=dblstr(record,lenrec,idum) ! d_i ++ parpot(11)=dblstr(record,lenrec,idum) ! h_i ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(16x,a8,2x,a4,2x,1p,5e13.5)") ++ x atom0,keyword(1:4),(parpot(j),j=1,5) ++ write(nrite,"(32x,1p,5e13.5)")(parpot(j),j=6,mxpter) ++ ++ endif ++ ++ katm0=0 ++ ++ do jtpatm=1,ntpatm ++ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm ++ enddo ++ ++ if(katm0.eq.0)call error(idnode,92) ++ ++ filter(katm0)=.true. ++ ++c convert parameters to internal units ++ ++ if(keypot.eq.1)then ++ ++ parpot(1)=parpot(1)*engunit ++ parpot(3)=parpot(3)*engunit ++ ++ endif ++ if(lstter(katm0).gt.-1) call error(idnode,21) ++ lstter(katm0)=itpter ++ ltpter(itpter)=keypot ++ ++c calculate max tersoff cutoff ++ ++ rctter=max(rctter,parpot(6)) ++ ++c store tersoff single atom potential parameters ++ ++ do i=1,mxpter ++ prmter(itpter,i)=parpot(i) ++ enddo ++ ++ enddo ++ ++ if(rctter.lt.1.d-6)call error(idnode,1953) ++ ++c start processing double atom potential parameters ++ ++ npairs=(ntpter*(ntpter+1))/2 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,/,1x,'number of tersoff ', ++ x 'cross terms',i10)") npairs ++ write(nrite,"(/,/,16x,'atom ','atom ',10x, ++ x 'parameters'/,/)") ++ ++ endif ++ ++ do icross=1,npairs ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call getword(atom0,record,8,lenrec) ++ call getword(atom1,record,8,lenrec) ++ ++ parpot(1)=dblstr(record,lenrec,idum) ! chi_ij ++ parpot(2)=dblstr(record,lenrec,idum) ! omega_ij ++ ++ katm0=0 ++ katm1=0 ++ ++ do jtpatm=1,ntpatm ++ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ enddo ++ ++ if(katm0.eq.0.or.katm1.eq.0)call error(idnode,92) ++ ++ filter(katm0)=.true. ++ filter(katm1)=.true. ++ ++ ktyp=loc2(lstter(katm0),lstter(katm1)) ++ prmter2(1,ktyp)=parpot(1) ++ prmter2(2,ktyp)=parpot(2) ++ ++ if(idnode.eq.0)write(nrite,"(16x,a8,a8,1p,2e13.5)") ++ x atom0,atom1,(parpot(j),j=1,2) ++ ++ enddo ++ ++c generate tersoff interpolation arrays ++ ++ call tergen(ntpatm,rctter) ++ ++ return ++ end subroutine define_tersoff ++ ++ subroutine tergen(ntpatm,rctter) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for generating potential energy and ++c force arrays for tersoff forces only ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w. smith dec 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer ntpatm,katm0,katm1,ipt,jpt,kpt,i ++ real(8) dlrpot,rctter,baij,saij,bbij,sbij,rij,sij,att,arg ++ real(8) rrr,rep ++ ++c define grid resolution for potential arrays ++ ++ dlrpot=rctter/dble(mxgrid-4) ++ ++c construct arrays for all types of short ranged potential ++ ++ do katm0=1,ntpatm ++ ++ if(filter(katm0))then ++ ++ ipt=lstter(katm0) ++ ++ do katm1=1,katm0 ++ ++ if(filter(katm1))then ++ ++ jpt=lstter(katm1) ++ ++ if((ltpter(ipt).eq.1).and.(ltpter(jpt).eq.1))then ++ ++ kpt=loc2(ipt,jpt) ++ ++c define tersoff parameters ++ ++ baij=sqrt(prmter(ipt,1)*prmter(jpt,1)) ++ saij=0.5d0*(prmter(ipt,2)+prmter(jpt,2)) ++ bbij=sqrt(prmter(ipt,3)*prmter(jpt,3)) ++ sbij=0.5d0*(prmter(ipt,4)+prmter(jpt,4)) ++ rij=sqrt(prmter(ipt,5)*prmter(jpt,5)) ++ sij=sqrt(prmter(ipt,6)*prmter(jpt,6)) ++ ++c store potential cutoff ++ ++ vmbp(1,kpt,1)=sij ++ ++c calculate screening function ++ ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ ++ if(rrr.le.rij)then ++ ++ vmbp(i,kpt,1)=1.d0 ++ gmbp(i,kpt,1)=0.d0 ++ ++ else ++ ++ arg=pi*(rrr-rij)/(sij-rij) ++ vmbp(i,kpt,1)=0.5d0*(1.d0+cos(arg)) ++ gmbp(i,kpt,1)=0.5d0*pi*rrr*sin(arg)/(sij-rij) ++ ++ endif ++ ++ enddo ++ ++c calculate screened repulsion function ++ ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ ++ rep=baij*exp(-saij*rrr) ++ vmbp(i,kpt,2)=rep*vmbp(i,kpt,1) ++ gmbp(i,kpt,2)=rep*(gmbp(i,kpt,1)+ ++ x saij*rrr*vmbp(i,kpt,1)) ++ ++ enddo ++ ++c calculate screened attraction function ++ ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ ++ att=bbij*exp(-sbij*rrr) ++ vmbp(i,kpt,3)=att*vmbp(i,kpt,1) ++ gmbp(i,kpt,3)=att*(gmbp(i,kpt,1)+ ++ x sbij*rrr*vmbp(i,kpt,1)) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine tergen ++ ++ subroutine tersoff ++ x (idnode,mxnode,natms,imcon,rctter,engter,virter) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating potential and forces ++c due to a tersoff potential ++c ++c Note: the subroutine converts coordinates to reduced units ++c to avoid a call to images.f. The link cell algorithm used ++c here necessitates a parallelepiped, cubic or orthorhombic ++c cell geometry ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w.smith dec 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer idnode,mxnode,natms,imcon,nix,niy,niz,i,j,nbx ++ integer nby,nbz,ncells,l,ix,iy,iz,k,icell,kk,jx,jy,jz,jcell,iter ++ integer limit,ii,iatm ++ real(8) rctter,engter,virter,xm,ym,zm,det,cprp ++ real(8) xdc,ydc,zdc,sxx,syy,szz,strs ++ ++ dimension nix(27),niy(27),niz(27),cprp(10),strs(6) ++ ++ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, ++ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ ++ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, ++ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ ++ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ++ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ ++ ++c flag for undefined potentials ++ ++ safe=.true. ++ ++c initialise potential energy and virial ++ ++ engter=0.d0 ++ virter=0.d0 ++ ++c create mock cell vectors for non-periodic system ++ ++ if(imcon.eq.0) then ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ ++ do i=1,natms ++ ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ ++ enddo ++ ++ cell(1)=2.d0*xm+rctter ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(5)=2.d0*ym+rctter ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ cell(9)=2.d0*zm+rctter ++ ++ endif ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ ++c check for appropriate boundary conditions ++ ++ if(imcon.gt.3)call error(idnode,1974) ++ call invert(cell,rcell,det) ++ call dcell(cell,cprp) ++ ++c calculate link cell numbers ++ ++ nbx=int(cprp(7)/(rctter+1.d-6)) ++ nby=int(cprp(8)/(rctter+1.d-6)) ++ nbz=int(cprp(9)/(rctter+1.d-6)) ++ if(nbx.lt.3.or.nby.lt.3.or.nbz.lt.3)then ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,'(a,3i5)') ++ x 'tersoff link cell decomposition is',nbx,nby,nbz ++ ++ endif ++ ++ call error(idnode,1977) ++ ++ endif ++ ncells=nbx*nby*nbz ++ ++ if(ncells.gt.mxcell) then ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,'(a,i6)') ++ x 'number of required link cells in tersoff.f is ',ncells ++ write(nrite,'(a,i6)') ++ x 'number of default link cells in tersoff.f is ',mxcell ++ call error(idnode,1976) ++ ++ endif ++ ++ endif ++ ++c transform atomic coordinates and construct link cells ++ ++ do l=1,ncells ++ ++ lct(l)=0 ++ lst(l)=0 ++ ++ enddo ++ ++ xdc=dble(nbx) ++ ydc=dble(nby) ++ zdc=dble(nbz) ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ xxx(i)=sxx ++ yyy(i)=syy ++ zzz(i)=szz ++ ++ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) ++ iy=min(int(ydc*(syy+0.5d0)),nby-1) ++ iz=min(int(zdc*(szz+0.5d0)),nbz-1) ++ k=1+ix+nbx*(iy+nby*iz) ++ lst(k)=lst(k)+1 ++ link(i)=lct(k) ++ lct(k)=i ++ ++ endif ++ ++ enddo ++ ++c loop over central atoms of angles ++ ++ ix=0 ++ iy=1 ++ iz=1 ++ do icell=1,ncells ++ ++ ix=ix+1 ++ if(ix.gt.nbx)then ++ ix=1 ++ iy=iy+1 ++ if(iy.gt.nby)then ++ iy=1 ++ iz=iz+1 ++ endif ++ endif ++ ++c construct mini-list of neighbour cell contents ++ ++ k=0 ++ do kk=1,27 ++ ++ jx=ix+nix(kk) ++ jy=iy+niy(kk) ++ jz=iz+niz(kk) ++ ++ if(jx.gt.nbx)jx=1 ++ if(jy.gt.nby)jy=1 ++ if(jz.gt.nbz)jz=1 ++ if(jx.lt.1)jx=jx+nbx ++ if(jy.lt.1)jy=jy+nby ++ if(jz.lt.1)jz=jz+nbz ++ ++ jcell=jx+nbx*(jy-1+nby*(jz-1)) ++ j=lct(jcell) ++ ++ do ii=1,lst(jcell) ++ ++ k=k+1 ++ lattsf(k)=j ++ j=link(j) ++ ++ enddo ++ ++ enddo ++ ++ limit=k ++ ++ do ii=1,lst(icell) ++ ++ iatm=lattsf(ii) ++ iter=lstter(ltype(iatm)) ++ ++ if(mod(iatm,mxnode).eq.idnode.and.iter.ge.0)then ++ ++c construct working arrays by interpolation ++ ++ call terint(iatm,limit,rctter) ++ ++c calculate three body (attractive) terms ++ ++ call tersoff3(ii,limit,engter,virter,strs) ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c calculate stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,1978) ++ ++c global sum of three body potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engter ++ buffer(2)=virter ++ call gdsum(buffer(1),2,buffer(3)) ++ engter=buffer(1) ++ virter=buffer(2) ++ ++ endif ++ ++c remove effect of double counting ++ ++ engter=0.5d0*engter ++ virter=0.5d0*virter ++ ++c restore coordinate array to original representation ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=xxx(i) ++ syy=yyy(i) ++ szz=zzz(i) ++ ++ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz ++ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz ++ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz ++ ++ endif ++ ++ enddo ++ ++c restore cell vector ++ ++ if(imcon.eq.0) then ++ cell(1)=0.d0 ++ cell(5)=0.d0 ++ cell(9)=0.d0 ++ endif ++ ++ return ++ end subroutine tersoff ++ ++ subroutine terint(iatm,limit,rctter) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing working arrays for ++c a tersoff potential using interpolation ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w.smith dec 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer iatm,jatm,jj,limit,iter,jter,jjter,ll ++ real(8) rctter,sxij,syij,szij,ppp,t1,t2,rdr ++ real(8) vk0,vk1,vk2,gk0,gk1,gk2 ++ ++ rdr=dble(mxgrid-4)/rctter ++ iter=lstter(ltype(iatm)) ++ ++c initialise working arrays ++ ++ do jj=1,limit ++ ++ xtf(jj)=0.d0 ++ ytf(jj)=0.d0 ++ ztf(jj)=0.d0 ++ rtf(jj)=0.d0 ++ ert(jj)=0.d0 ++ eat(jj)=0.d0 ++ grt(jj)=0.d0 ++ gat(jj)=0.d0 ++ scr(jj)=0.d0 ++ gcr(jj)=0.d0 ++ ++ enddo ++ ++c construct working arrays ++ ++ do jj=1,limit ++ ++ jatm=lattsf(jj) ++ jter=lstter(ltype(jatm)) ++ ++ if(jatm.ne.iatm.and.jter.ge.0)then ++ ++ sxij=xxx(jatm)-xxx(iatm) ++ sxij=sxij-nint(sxij) ++ syij=yyy(jatm)-yyy(iatm) ++ syij=syij-nint(syij) ++ szij=zzz(jatm)-zzz(iatm) ++ szij=szij-nint(szij) ++ ++ xtf(jj)=cell(1)*sxij+cell(4)*syij+cell(7)*szij ++ ytf(jj)=cell(2)*sxij+cell(5)*syij+cell(8)*szij ++ ztf(jj)=cell(3)*sxij+cell(6)*syij+cell(9)*szij ++ rtf(jj)=sqrt(xtf(jj)**2+ytf(jj)**2+ztf(jj)**2) ++ xtf(jj)=xtf(jj)/rtf(jj) ++ ytf(jj)=ytf(jj)/rtf(jj) ++ ztf(jj)=ztf(jj)/rtf(jj) ++ ++ jjter=loc2(iter,jter) ++ if(rtf(jj).le.vmbp(1,jjter,1))then ++ ++ ll=int(rdr*rtf(jj)) ++ ppp=rtf(jj)*rdr-dble(ll) ++ ++c interpolate screening function ++ ++ vk0=vmbp(ll,jjter,1) ++ vk1=vmbp(ll+1,jjter,1) ++ vk2=vmbp(ll+2,jjter,1) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ scr(jj)=t1+(t2-t1)*ppp*0.5d0 ++ ++c interpolate derivative of screening function ++ ++ gk0=gmbp(ll,jjter,1) ++ gk1=gmbp(ll+1,jjter,1) ++ gk2=gmbp(ll+2,jjter,1) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ gcr(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) ++ ++c interpolate repulsive component of energy ++ ++ vk0=vmbp(ll,jjter,2) ++ vk1=vmbp(ll+1,jjter,2) ++ vk2=vmbp(ll+2,jjter,2) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ ert(jj)=t1+(t2-t1)*ppp*0.5d0 ++ ++c interpolate derivative of repulsive function ++ ++ gk0=gmbp(ll,jjter,2) ++ gk1=gmbp(ll+1,jjter,2) ++ gk2=gmbp(ll+2,jjter,2) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ grt(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) ++ ++c interpolate attractive component of energy ++ ++ vk0=vmbp(ll,jjter,3) ++ vk1=vmbp(ll+1,jjter,3) ++ vk2=vmbp(ll+2,jjter,3) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ eat(jj)=t1+(t2-t1)*ppp*0.5d0 ++ ++c interpolate derivative of attractive function ++ ++ gk0=gmbp(ll,jjter,3) ++ gk1=gmbp(ll+1,jjter,3) ++ gk2=gmbp(ll+2,jjter,3) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ gat(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine terint ++ ++ subroutine tersoff3(ii,limit,engter,virter,strs) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating three body contributions ++c to a tersoff potential and tersoff potential, virial and ++c atomic forces ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w.smith dec 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical flag ++ integer iatm,jatm,katm,limit,ii,jj,kk ++ integer iter,jter,kter,jjter,kkter ++ real(8) cost,gtheta,ci,di,hi,gamma,gam_j,gam_k,eterm,gterm,strs ++ real(8) fxa,fya,fza,fxc,fyc,fzc,engter,virter,vterm,gam_ij,bi,ei ++ ++ dimension strs(6) ++ ++ iatm=lattsf(ii) ++ iter=lstter(ltype(iatm)) ++ ++ bi=prmter(iter,7) ++ ei=prmter(iter,8) ++ ci=prmter(iter,9) ++ di=prmter(iter,10) ++ hi=prmter(iter,11) ++ ++ do jj=1,limit ++ ++ jatm=lattsf(jj) ++ jter=lstter(ltype(jatm)) ++ if(jter.ge.0.and.iatm.ne.jatm)then ++ ++ jjter=loc2(iter,jter) ++ if(rtf(jj).le.vmbp(1,jjter,1))then ++ ++ flag=.false. ++ ++c potential energy and virial terms ++ ++ vterm=0.d0 ++ eterm=0.d0 ++ ++c initialise work arrays ++ ++ do kk=1,limit ++ ++ gam(kk)=0.d0 ++ gvr(kk)=0.d0 ++ ++ enddo ++ ++c calculate bond factor ++ ++ do kk=1,limit ++ ++ katm=lattsf(kk) ++ kter=lstter(ltype(katm)) ++ if(kter.ge.0.and.iatm.ne.katm.and.jatm.ne.katm)then ++ ++ kkter=loc2(iter,kter) ++ ++ if(rtf(kk).le.vmbp(1,kkter,1))then ++ ++ cost=(xtf(jj)*xtf(kk)+ytf(jj)*ytf(kk)+ztf(jj)*ztf(kk)) ++ gtheta=1.d0+(ci/di)**2-ci**2/(di**2+(hi-cost)**2) ++ eterm=eterm+gtheta*prmter2(2,kkter)*scr(kk) ++ vterm=vterm+gtheta*prmter2(2,kkter)*gcr(kk)*rtf(kk) ++ gvr(kk)=2.d0*ci**2*(hi-cost)/(di**2+(hi-cost)**2)**2 ++ gam(kk)=gtheta ++ flag=.true. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(flag)then ++ ++c tersoff energy and virial ++ ++ gam_ij=prmter2(1,jjter)*(1.d0+(bi*eterm)**ei)**(-0.5d0/ei) ++ gamma=0.5d0*prmter2(1,jjter)*bi*(bi*eterm)**(ei-1.d0)* ++ x eat(jj)*(1.d0+(bi*eterm)**ei)**(-0.5d0/ei-1.d0) ++ engter=engter+ert(jj)-gam_ij*eat(jj) ++ virter=virter+gamma*vterm+(grt(jj)-gam_ij*gat(jj))*rtf(jj) ++ ++c calculate 3-body forces ++ ++ do kk=1,limit ++ ++ katm=lattsf(kk) ++ kter=lstter(ltype(katm)) ++ if(kter.ge.0.and.iatm.ne.katm.and.jatm.ne.katm)then ++ ++ kkter=loc2(iter,kter) ++ if(rtf(kk).le.vmbp(1,kkter,1))then ++ ++ gam_j=0.5d0*gamma*prmter2(2,kkter)*scr(kk)*gvr(kk) ++ gam_k=0.5d0*gamma*prmter2(2,kkter)*gcr(kk)*gam(kk) ++ ++c calculate contribution to atomic forces ++ ++ cost=(xtf(jj)*xtf(kk)+ytf(jj)*ytf(kk)+ ++ x ztf(jj)*ztf(kk)) ++ ++ fxa=gam_j*(xtf(kk)-xtf(jj)*cost)/rtf(jj) ++ fya=gam_j*(ytf(kk)-ytf(jj)*cost)/rtf(jj) ++ fza=gam_j*(ztf(kk)-ztf(jj)*cost)/rtf(jj) ++ ++ fxc=gam_j*(xtf(jj)-xtf(kk)*cost)/rtf(kk)- ++ x gam_k*xtf(kk) ++ fyc=gam_j*(ytf(jj)-ytf(kk)*cost)/rtf(kk)- ++ x gam_k*ytf(kk) ++ fzc=gam_j*(ztf(jj)-ztf(kk)*cost)/rtf(kk)- ++ x gam_k*ztf(kk) ++ ++ fxx(jatm)=fxx(jatm)+fxa ++ fyy(jatm)=fyy(jatm)+fya ++ fzz(jatm)=fzz(jatm)+fza ++ ++ fxx(iatm)=fxx(iatm)-(fxa+fxc) ++ fyy(iatm)=fyy(iatm)-(fya+fyc) ++ fzz(iatm)=fzz(iatm)-(fza+fzc) ++ ++ fxx(katm)=fxx(katm)+fxc ++ fyy(katm)=fyy(katm)+fyc ++ fzz(katm)=fzz(katm)+fzc ++ ++c calculate contributions to stress tensor ++ ++ strs(1)=strs(1)+(fxa*xtf(jj)*rtf(jj)+ ++ x fxc*xtf(kk)*rtf(kk)) ++ strs(2)=strs(2)+(fxa*ytf(jj)*rtf(jj)+ ++ x fxc*ytf(kk)*rtf(kk)) ++ strs(3)=strs(3)+(fxa*ztf(jj)*rtf(jj)+ ++ x fxc*ztf(kk)*rtf(kk)) ++ strs(4)=strs(4)+(fya*ytf(jj)*rtf(jj)+ ++ x fyc*ytf(kk)*rtf(kk)) ++ strs(5)=strs(5)+(fya*ztf(jj)*rtf(jj)+ ++ x fyc*ztf(kk)*rtf(kk)) ++ strs(6)=strs(6)+(fza*ztf(jj)*rtf(jj)+ ++ x fzc*ztf(kk)*rtf(kk)) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ else ++ ++ gam_ij=prmter2(1,jjter) ++ engter=engter+ert(jj)-gam_ij*eat(jj) ++ virter=virter+(grt(jj)-gam_ij*gat(jj))*rtf(jj) ++ ++ endif ++ ++c calculate two body force terms ++ ++ gterm=0.5d0*(grt(jj)-gam_ij*gat(jj)) ++ fxx(iatm)=fxx(iatm)+xtf(jj)*gterm ++ fyy(iatm)=fyy(iatm)+ytf(jj)*gterm ++ fzz(iatm)=fzz(iatm)+ztf(jj)*gterm ++ fxx(jatm)=fxx(jatm)-xtf(jj)*gterm ++ fyy(jatm)=fyy(jatm)-ytf(jj)*gterm ++ fzz(jatm)=fzz(jatm)-ztf(jj)*gterm ++ ++c calculate contributions to stress tensor ++ ++ strs(1)=strs(1)-gterm*rtf(jj)*xtf(jj)*xtf(jj) ++ strs(2)=strs(2)-gterm*rtf(jj)*xtf(jj)*ytf(jj) ++ strs(3)=strs(3)-gterm*rtf(jj)*xtf(jj)*ztf(jj) ++ strs(4)=strs(4)-gterm*rtf(jj)*ytf(jj)*ytf(jj) ++ strs(5)=strs(5)-gterm*rtf(jj)*ytf(jj)*ztf(jj) ++ strs(6)=strs(6)-gterm*rtf(jj)*ztf(jj)*ztf(jj) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine tersoff3 ++ ++ end module tersoff_module +diff -urN dl_class_1.9.orig/srcmod/tether_module.f dl_class_1.9/srcmod/tether_module.f +--- dl_class_1.9.orig/srcmod/tether_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/tether_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,447 @@ ++ module tether_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining tether potential arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use parse_module ++ use setup_module ++ use site_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmtet(:,:) ++ integer, allocatable :: listtet(:,:) ++ integer, allocatable :: numteth(:),keytet(:),lsttet(:) ++ real(8), allocatable :: xxs(:),yys(:),zzs(:) ++ ++ save prmtet,lsttet,listtet,numteth,keytet,xxs,yys,zzs ++ ++ contains ++ ++ subroutine alloc_tet_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (prmtet(mxteth,mxpbnd),stat=fail(1)) ++ allocate (numteth(mxtmls),stat=fail(2)) ++ allocate (keytet(mxteth),stat=fail(3)) ++ allocate (lsttet(mxteth),stat=fail(4)) ++ allocate (listtet(msteth,2),stat=fail(5)) ++ allocate (xxs(mxatms),stat=fail(6)) ++ allocate (yys(mxatms),stat=fail(7)) ++ allocate (zzs(mxatms),stat=fail(8)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1260) ++ enddo ++ ++ do i=1,mxtmls ++ numteth(i)=0 ++ enddo ++ ++ end subroutine alloc_tet_arrays ++ ++ subroutine define_tethers ++ x (safe,idnode,itmols,nteth,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining tether bonds ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ real(8) engunit ++ integer idnode,itmols,nteth,nsite,ntmp,iteth,iteth1,idum ++ integer iatm1,isite1,j,i ++ ++ ntmp=intstr(record,lenrec,idum) ++ numteth(itmols)=numteth(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of tethered atoms ', ++ x 6x,i10)")ntmp ++ write(nrite,"(/,' tethered atom details:',/,/, ++ x 21x,7x,'key',6x,'atom',19x,'parameters',/) ") ++ endif ++ ++ iteth1=numteth(itmols) ++ do iteth=1,iteth1 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ call strip(record,lenrec) ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ ++ iatm1=intstr(record,lenrec,idum) ++ ++c test for frozen atom ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ ++ if(lfzsit(isite1).ne.0)then ++ ++ numteth(itmols)=numteth(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ nteth=nteth+1 ++ if(nteth.gt.mxteth)call error(idnode,62) ++ ++ if(keyword(1:4).eq.'harm')then ++ keytet(nteth)=1 ++ elseif(keyword(1:4).eq.'rhrm')then ++ keytet(nteth)=2 ++ elseif(keyword(1:4).eq.'quar')then ++ keytet(nteth)=3 ++ else ++ if(idnode.eq.0)write(nrite,*)message ++ call error(idnode,450) ++ endif ++ ++ lsttet(nteth)=iatm1 ++ prmtet(nteth,1)=dblstr(record,lenrec,idum) ++ prmtet(nteth,2)=dblstr(record,lenrec,idum) ++ prmtet(nteth,3)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,i10,1p,9e12.4)") ++ x keyword(1:4),lsttet(nteth), ++ x (prmtet(nteth,j),j=1,mxpbnd) ++ ++c convert energy units to internal units ++ ++ if(abs(keytet(nteth)).eq.1)then ++ prmtet(nteth,1)=prmtet(nteth,1)*engunit ++ elseif(abs(keytet(nteth)).eq.2)then ++ prmtet(nteth,1)=prmtet(nteth,1)*engunit ++ elseif(abs(keytet(nteth)).eq.3)then ++ prmtet(nteth,1)=prmtet(nteth,1)*engunit ++ prmtet(nteth,2)=prmtet(nteth,2)*engunit ++ prmtet(nteth,3)=prmtet(nteth,3)*engunit ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_tethers ++ ++ subroutine tethfrc ++ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) ++ ++c*********************************************************************** ++c ++c dl_poly routine to tether atoms to initial positions ++c includes stress tensor ++c ++c replicated data version : block data ++c ++c copyright daresbury laboratory 1994 ++c author t.forester feb 1994 ++c amended t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer idnode,mxnode,imcon,natms,nstep,ntteth,i,ii,ia,kk ++ integer itet1,itet2,fail ++ ++ real(8) engtet,virtet,rab ++ real(8) rrab,omega,gamma ++ ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ ++ data safe/.true./ ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail) ++ if(fail.ne.0)call error(idnode,1270) ++ ++c set up reference positions at start of job ++ ++ if(nstep.le.1)then ++ ++ do i=1,natms ++ ++ xxs(i)=xxx(i) ++ yys(i)=yyy(i) ++ zzs(i)=zzz(i) ++ ++ enddo ++ ++ endif ++ ++c check size of work arrays ++ ++ if((ntteth-mxnode+1)/mxnode.gt.msbad) call error(idnode,420) ++ ++c block indices ++ ++ itet1=(idnode*ntteth)/mxnode+1 ++ itet2=((idnode+1)*ntteth)/mxnode ++ ++ ii=0 ++ do i=itet1,itet2 ++ ++ ii=ii+1 ++ ++c atomic index ++ ++ ia= listtet(ii,2) ++ ++c tether vector ++ ++ xdab(ii)=xxx(ia)-xxs(ia) ++ ydab(ii)=yyy(ia)-yys(ia) ++ zdab(ii)=zzz(ia)-zzs(ia) ++ ++ enddo ++ ++c ignore periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ ++c zero tether energy and virial accumulators ++ ++ engtet=0.d0 ++ virtet=0.d0 ++ ++c loop over all specified tethered atoms ++ ++ ii=0 ++ do i=itet1,itet2 ++ ++ ii=ii+1 ++ ++c define components of bond vector ++ ++ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) ++ ++c check for possible zero length vector ++ ++ if(rab.lt.1.d-10)then ++ ++ rrab =0.d0 ++ ++ else ++ ++ rrab=1.d0/rab ++ ++ endif ++ ++c index of potential function parameters ++ ++ kk=listtet(ii,1) ++ ++c calculate scalar constant terms ++ ++ if(keytet(kk).eq.1)then ++ ++c harmonic function ++ ++ omega=0.5d0*prmtet(kk,1)*rab**2 ++ gamma=prmtet(kk,1) ++ ++ elseif(keytet(kk).eq.2)then ++ ++c restrained harmonic: ++ ++ omega=0.5d0*prmtet(kk,1)*(min(rab,prmtet(kk,2)))**2 ++ x +prmtet(kk,1)*prmtet(kk,2)* ++ x (sign(max(rab-prmtet(kk,2),0.d0),rab)) ++ gamma=prmtet(kk,1)*(sign(min(rab,prmtet(kk,2)),rab))*rrab ++ ++ elseif(keytet(kk).eq.3)then ++ ++c quartic potential ++ ++ omega=0.5d0*prmtet(kk,1)*rab**2 + ++ x 1.d0/3.d0*prmtet(kk,2)*rab**3+ ++ x 0.25d0*prmtet(kk,3)*rab**4 ++ gamma=(prmtet(kk,1)*rab + ++ x prmtet(kk,2)*rab**2 + ++ x prmtet(kk,3)*rab**3)*rrab ++ ++ else ++ safe=.false. ++ omega=0.d0 ++ gamma=0.d0 ++ endif ++ ++ gamma=-gamma ++ ++c calculate tether energy and virial ++ ++ engtet=engtet+omega ++ virtet=virtet-gamma*rab*rab ++ ++c index of atom ++ ++ ia=listtet(ii,2) ++ ++c calculate atomic forces ++ ++ fxx(ia)=fxx(ia)+gamma*xdab(ii) ++ fyy(ia)=fyy(ia)+gamma*ydab(ii) ++ fzz(ia)=fzz(ia)+gamma*zdab(ii) ++ ++c stress tensor ++ ++ stress(1)=stress(1)+xdab(ii)*gamma*xdab(ii) ++ stress(2)=stress(2)+xdab(ii)*gamma*ydab(ii) ++ stress(3)=stress(3)+xdab(ii)*gamma*zdab(ii) ++ stress(4)=stress(4)+ydab(ii)*gamma*xdab(ii) ++ stress(5)=stress(5)+ydab(ii)*gamma*ydab(ii) ++ stress(6)=stress(6)+ydab(ii)*gamma*zdab(ii) ++ stress(7)=stress(7)+zdab(ii)*gamma*xdab(ii) ++ stress(8)=stress(8)+zdab(ii)*gamma*ydab(ii) ++ stress(9)=stress(9)+zdab(ii)*gamma*zdab(ii) ++ ++ enddo ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,450) ++ ++c sum contributions to potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(3)=engtet ++ buffer(4)=virtet ++ ++ call gdsum(buffer(3),2,buffer(1)) ++ ++ engtet=buffer(3) ++ virtet=buffer(4) ++ ++ endif ++ ++ deallocate (xdab,ydab,zdab,stat=fail) ++ ++ return ++ end subroutine tethfrc ++ ++ subroutine xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++c*********************************************************************** ++c ++c dl_poly routine to scale positions with change in box shape ++c ++c parallel replicated data version ++c ++c copyright daresbury laboratory 1995 ++c author t.forester october 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,keyens,imcon,iatm0,iatm1,i ++ real(8) tstep,xa,ya,za,totmas,xcmo,ycmo,zcmo ++ ++c assign block of atoms to processor ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ if((keyens.eq.4).or.(keyens.eq.6))then ++ ++c berendsen npt/nst ++ ++ do i=iatm0,iatm1 ++ ++ xa=eta(1)*xxs(i)+eta(2)*yys(i)+eta(3)*zzs(i) ++ ya=eta(4)*xxs(i)+eta(5)*yys(i)+eta(6)*zzs(i) ++ za=eta(7)*xxs(i)+eta(8)*yys(i)+eta(9)*zzs(i) ++ ++ xxs(i)=xa ++ yys(i)=ya ++ zzs(i)=za ++ ++ enddo ++ ++ elseif(keyens.eq.5.or.keyens.eq.7)then ++ ++c hoover npt/nst ++ ++ totmas=0.d0 ++ do i=1,natms ++ if(rmass(i).gt.0.d0)totmas=totmas+weight(i) ++ enddo ++ ++ xcmo=0.d0 ++ ycmo=0.d0 ++ zcmo=0.d0 ++ ++ do i=1,natms ++ ++ if(rmass(i).gt.0.d0)then ++ ++ xcmo=xcmo+weight(i)*xxs(i) ++ ycmo=ycmo+weight(i)*yys(i) ++ zcmo=zcmo+weight(i)*zzs(i) ++ ++ endif ++ ++ enddo ++ xcmo=xcmo/totmas ++ ycmo=ycmo/totmas ++ zcmo=zcmo/totmas ++ ++ do i=iatm0,iatm1 ++ ++ xa=xxs(i)-xcmo ++ ya=yys(i)-ycmo ++ za=zzs(i)-zcmo ++ ++ xxs(i)=xxs(i)+tstep*(eta(1)*xa+eta(2)*ya+eta(3)*za) ++ yys(i)=yys(i)+tstep*(eta(2)*xa+eta(5)*ya+eta(6)*za) ++ zzs(i)=zzs(i)+tstep*(eta(3)*xa+eta(6)*ya+eta(9)*za) ++ ++ enddo ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxs,yys,zzs) ++ ++ endif ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxs,yys,zzs,buffer) ++ ++ return ++ end subroutine xscale ++ ++ end module tether_module ++ +diff -urN dl_class_1.9.orig/srcmod/three_body_module.f dl_class_1.9/srcmod/three_body_module.f +--- dl_class_1.9.orig/srcmod/three_body_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/three_body_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,882 @@ ++ module three_body_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining three-body potential arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - w. smith aug 2008 : solvation, free energy excitation ++c adapted - w. smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ ++ implicit none ++ ++ logical, allocatable :: filter(:) ++ real(8), allocatable :: prmtbp(:,:),rcut3b(:) ++ integer, allocatable :: lsttbp(:),ltptbp(:),lattbp(:) ++ ++ save prmtbp,rcut3b,lsttbp,ltptbp,lattbp,filter ++ ++ contains ++ ++ subroutine alloc_tbp_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(6) ++ ++ do i=1,6 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmtbp(mxtbp,mxptbp),stat=fail(1)) ++ allocate (rcut3b(mxtbp),stat=fail(2)) ++ allocate (lsttbp(mxtbp),stat=fail(3)) ++ allocate (ltptbp(mxtbp),stat=fail(4)) ++ allocate (lattbp(mxatms),stat=fail(5)) ++ allocate (filter(mxsite),stat=fail(6)) ++ ++ do i=1,6 ++ if(fail(i).gt.0)call error(idnode,1170) ++ enddo ++ ++ end subroutine alloc_tbp_arrays ++ ++ subroutine define_three_body ++ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining three body potentials ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits,lmols ++ character*8 keyword ++ character*8 atom0,atom1,atom2 ++ character*1 message(80) ++ integer idnode,ntptbp,ntpatm,fail,i,itbp,itptbp,keypot ++ integer idum,katm1,katm2,katm0,j,keytbp,ktbp,jtpatm ++ real(8) rcuttb,engunit ++ real(8), allocatable :: parpot(:) ++ ++ data fail/0/ ++ ++ allocate (parpot(mxptbp),stat=fail) ++ if(fail.ne.0)call error(idnode,1180) ++ ++ ntptbp=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'number of specified three ', ++ x 'body potentials',i10)") ntptbp ++ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ','atom 3 ', ++ x 3x,' key',30x,'parameters'/,/)") ++ ++ endif ++ if(ntptbp.gt.mxtbp) call error(idnode,83) ++ if(.not.lunits) call error(idnode,6) ++ if(.not.lmols) call error(idnode,13) ++ ++ do i=1,mxsite ++ filter(i)=.false. ++ enddo ++ ++ do itbp=1,mxtbp ++ lsttbp(itbp)=0 ++ enddo ++ ++ do itbp=1,mxtbp,mx2tbp ++ lsttbp(itbp)=-1 ++ enddo ++ ++ rcuttb=0.d0 ++ ++ do itptbp=1,ntptbp ++ ++ do i=1,mxptbp ++ parpot(i)=0.d0 ++ enddo ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++c Note the order!! atom0 is central ++ ++ call copystring(record,message,80) ++ call getword(atom1,record,8,lenrec) ++ call getword(atom0,record,8,lenrec) ++ call getword(atom2,record,8,lenrec) ++ call lowcase(record,lenrec) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'harm') then ++ keypot=0 ++ elseif(keyword(1:4).eq.'thrm') then ++ keypot=1 ++ elseif(keyword(1:4).eq.'shrm') then ++ keypot=2 ++ elseif(keyword(1:4).eq.'bvs1') then ++ keypot=3 ++ elseif(keyword(1:4).eq.'bvs2') then ++ keypot=4 ++ elseif(keyword(1:4).eq.'hbnd') then ++ keypot=5 ++ else ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,442) ++ endif ++ ++ parpot(1)=dblstr(record,lenrec,idum) ++ parpot(2)=dblstr(record,lenrec,idum) ++ parpot(3)=dblstr(record,lenrec,idum) ++ parpot(4)=dblstr(record,lenrec,idum) ++ parpot(5)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(16x,3a8,4x,a4,1x,1p,9e13.5)") ++ x atom1,atom0,atom2,keyword(1:4),(parpot(j),j=1,mxptbp) ++ ++ katm0=0 ++ katm1=0 ++ katm2=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm ++ ++ enddo ++ ++ if(katm0.eq.0.or.katm1.eq.0.or.katm2.eq.0) ++ x call error(idnode,84) ++ ++ filter(katm0)=.true. ++ filter(katm1)=.true. ++ filter(katm2)=.true. ++ ++ keytbp=(max(katm1,katm2)*(max(katm1,katm2)-1))/2+ ++ x min(katm1,katm2)+(katm0-1)*mx2tbp ++ ++ if(keytbp.gt.mxtbp) call error(idnode,86) ++ ++c convert parameters to internal units ++ ++ parpot(1)=parpot(1)*engunit ++ if(keypot.ne.5)parpot(2)=parpot(2)*(pi/180.d0) ++ ++ if(lsttbp(keytbp).gt.0) call error(idnode,18) ++ lsttbp(keytbp)=itptbp ++ ltptbp(itptbp)=keypot ++ ktbp=mx2tbp*((keytbp-1)/mx2tbp)+1 ++ if(lsttbp(ktbp).lt.0)lsttbp(ktbp)=0 ++ ++c calculate max three body cutoff ++ ++ rcuttb=max(rcuttb,parpot(5)) ++ rcut3b(itptbp)=parpot(5) ++ ++c store three body potential parameters ++ ++ do i=1,4 ++ prmtbp(itptbp,i)=parpot(i) ++ enddo ++ if(mxptbp.ge.6) then ++ do i=6,mxptbp ++ prmtbp(itptbp,i-1)=parpot(i-1) ++ enddo ++ endif ++ enddo ++ ++ if(rcuttb.lt.1.d-6)call error(idnode,451) ++ ++ deallocate (parpot,stat=fail) ++ ++ return ++ end subroutine define_three_body ++ ++ subroutine thbfrc ++ x (lsolva,lfree,lexcite,idnode,mxnode,natms,imcon,rcuttb, ++ x engtbp,virtbp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating three body forces arising ++c from the included angle between three atoms ++c ++c Note: the subroutine converts coordinates to reduced units ++c to avoid a call to images.f. The link cell algorithm used ++c here necessitates a parallelepiped cell geometry ++c ++c copyright - daresbury laboratory 1994 ++c author - w.smith mar 1994 ++c adapted - w.smith aug 2008 solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect,lskip ++ logical idrive,jdrive,kdrive ++ integer idnode,mxnode,natms,imcon,nix,niy,niz ++ integer i,nbx,nby,nbz,ncells,l,ix,iy,iz,k,icell,kk,jx,jy,jz ++ integer j,jcell,ii,itbp,limit,last,ktbp,jtbp,jktbp,kktbp ++ integer ia,ib,ic,ktyp,jj,jk,kkk ++ real(8) rcuttb,engtbp,virtbp,tterm,uterm,xm,ym,zm,cprp,det ++ real(8) xdc,ydc,zdc,sxx,syy,szz,sxab,syab,szab,xab,yab,zab ++ real(8) rab,sxbc,sybc,szbc,xbc,ybc,zbc,rbc,xac,yac,zac,rac ++ real(8) rrab,rrbc,rrac,cost,sint,theta,pterm,gamma,vterm ++ real(8) gamsa,gamsb,gamsc,scrn,fxa,fya,fza,fxc,fyc,fzc,strs ++ real(8) strs_loc ++ ++ dimension nix(27),niy(27),niz(27),cprp(10),strs(6),strs_loc(9) ++ ++ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, ++ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ ++ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, ++ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ ++ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ++ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ ++ ++ lskip=(lfree.or.lexcite) ++ ++c flag for undefined potentials ++ ++ safe=.true. ++ ++c initialise accumulators ++ ++ engtbp=0.d0 ++ virtbp=0.d0 ++ tbp_fre=0.d0 ++ tbp_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(8)=.true. ++ en3_sol(:)=0.d0 ++ if(lexcite)en3_exc(:)=0.d0 ++ ++ endif ++ ++c create mock cell vectors for non-periodic system ++ ++ if(imcon.eq.0) then ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ do i=1,natms ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ enddo ++ ++ cell(1)=2.d0*xm+rcuttb ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(5)=2.d0*ym+rcuttb ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ cell(9)=2.d0*zm+rcuttb ++ ++ endif ++ ++c check for appropriate boundary conditions ++ ++ if(imcon.gt.3)call error(idnode,67) ++ call invert(cell,rcell,det) ++ call dcell(cell,cprp) ++ ++c calculate link cell numbers ++ ++ nbx=int(cprp(7)/(rcuttb+1.d-6)) ++ nby=int(cprp(8)/(rcuttb+1.d-6)) ++ nbz=int(cprp(9)/(rcuttb+1.d-6)) ++ ncells=nbx*nby*nbz ++ if(ncells.gt.mxcell) then ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,'(a,i6)') ++ x 'number of required link cells in routine thbfrc is ',ncells ++ write(nrite,'(a,i6)') ++ x 'number of default link cells in routine thbfrc is ',mxcell ++ call error(idnode,69) ++ ++ endif ++ ++ endif ++ ++c transform atomic coordinates and construct link cells ++ ++ do l=1,ncells ++ ++ lct(l)=0 ++ lst(l)=0 ++ ++ enddo ++ ++ xdc=dble(nbx) ++ ydc=dble(nby) ++ zdc=dble(nbz) ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ xxx(i)=sxx ++ yyy(i)=syy ++ zzz(i)=szz ++ ++ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) ++ iy=min(int(ydc*(syy+0.5d0)),nby-1) ++ iz=min(int(zdc*(szz+0.5d0)),nbz-1) ++ k=1+ix+nbx*(iy+nby*iz) ++ lst(k)=lst(k)+1 ++ link(i)=lct(k) ++ lct(k)=i ++ ++ endif ++ ++ enddo ++ ++c loop over central atoms of angles ++ ++ ix=0 ++ iy=1 ++ iz=1 ++ do icell=1,ncells ++ ++ ix=ix+1 ++ if(ix.gt.nbx)then ++ ix=1 ++ iy=iy+1 ++ if(iy.gt.nby)then ++ iy=1 ++ iz=iz+1 ++ endif ++ endif ++ ++c construct mini-list of neighbour cell contents ++ ++ k=0 ++ do kk=1,27 ++ ++ jx=ix+nix(kk) ++ jy=iy+niy(kk) ++ jz=iz+niz(kk) ++ ++ if(jx.gt.nbx)jx=1 ++ if(jy.gt.nby)jy=1 ++ if(jz.gt.nbz)jz=1 ++ if(jx.lt.1)jx=jx+nbx ++ if(jy.lt.1)jy=jy+nby ++ if(jz.lt.1)jz=jz+nbz ++ ++ jcell=jx+nbx*(jy-1+nby*(jz-1)) ++ j=lct(jcell) ++ ++ do ii=1,lst(jcell) ++ ++ k=k+1 ++ lattbp(k)=j ++ j=link(j) ++ ++ enddo ++ ++ enddo ++ ++ limit=k ++ ++ do ii=1,lst(icell) ++ ++ i=lattbp(ii) ++ itbp=mx2tbp*(ltype(i)-1) ++ if(mod(i,mxnode).eq.idnode.and.lsttbp(itbp+1).ge.0)then ++ ++ last=limit ++ ++ do kk=1,limit/2 ++ ++ if(kk.gt.(limit-1)/2)last=limit/2 ++ ++ do jj=1,last ++ ++ j=lattbp(jj) ++ jk=jj+kk ++ if(jk.gt.limit)jk=jk-limit ++ k=lattbp(jk) ++ if(i.ne.j.and.i.ne.k)then ++ ++ jtbp=max(ltype(j),ltype(k)) ++ ktbp=min(ltype(j),ltype(k)) ++ jktbp=itbp+(jtbp*(jtbp-1))/2+ktbp ++ kktbp=lsttbp(jktbp) ++ if(kktbp.gt.0)then ++ ++c make labels etc consistent with angfrc.f ++ ++ ia=j ++ ib=i ++ ic=k ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ kdrive=driven(ltype(ic)) ++ ++ endif ++ ++ if(lskip)then ++ ++ if((atm_fre(ia).eq.1.or.atm_fre(ib).eq.1.or. ++ x atm_fre(ic).eq.1).and.(atm_fre(ia).eq.2.or. ++ x atm_fre(ib).eq.2.or.atm_fre(ic).eq.2))cycle ++ ++ endif ++ ++ sxab=xxx(ia)-xxx(ib) ++ sxab=sxab-nint(sxab) ++ syab=yyy(ia)-yyy(ib) ++ syab=syab-nint(syab) ++ szab=zzz(ia)-zzz(ib) ++ szab=szab-nint(szab) ++ ++ xab=cell(1)*sxab+cell(4)*syab+cell(7)*szab ++ if(abs(xab).lt.rcuttb)then ++ ++ yab=cell(2)*sxab+cell(5)*syab+cell(8)*szab ++ if(abs(yab).lt.rcuttb)then ++ ++ zab=cell(3)*sxab+cell(6)*syab+cell(9)*szab ++ if(abs(zab).lt.rcuttb)then ++ ++ sxbc=xxx(ic)-xxx(ib) ++ sxbc=sxbc-nint(sxbc) ++ sybc=yyy(ic)-yyy(ib) ++ sybc=sybc-nint(sybc) ++ szbc=zzz(ic)-zzz(ib) ++ szbc=szbc-nint(szbc) ++ ++ xbc=cell(1)*sxbc+cell(4)*sybc+cell(7)*szbc ++ if(abs(xbc).lt.rcuttb)then ++ ++ ybc=cell(2)*sxbc+cell(5)*sybc+cell(8)*szbc ++ if(abs(ybc).lt.rcuttb)then ++ ++ zbc=cell(3)*sxbc+cell(6)*sybc+cell(9)*szbc ++ if(abs(zbc).lt.rcuttb)then ++ ++ ktyp=ltptbp(kktbp) ++ rab=sqrt(xab*xab+yab*yab+zab*zab) ++ rbc=sqrt(xbc*xbc+ybc*ybc+zbc*zbc) ++ ++ if(rcut3b(kktbp).ge.max(rab,rbc))then ++ ++ xac=xab-xbc ++ yac=yab-ybc ++ zac=zab-zbc ++ rac=sqrt(xac*xac+yac*yac+zac*zac) ++ ++ rrab=1.d0/rab ++ rrbc=1.d0/rbc ++ rrac=1.d0/rac ++ ++c normalise direction vectors ++ ++ xab=xab*rrab ++ yab=yab*rrab ++ zab=zab*rrab ++ ++ xbc=xbc*rrbc ++ ybc=ybc*rrbc ++ zbc=zbc*rrbc ++ ++ xac=xac*rrac ++ yac=yac*rrac ++ zac=zac*rrac ++ ++ cost=(xab*xbc+yab*ybc+zab*zbc) ++ if(abs(cost).gt.1.d0)cost=sign(1.d0,cost) ++ if(ktyp.ne.5)then ++ ++ sint=max(1.d-8,sqrt(1.d0-cost*cost)) ++ theta=acos(cost) ++ ++ endif ++ ++ if(ktyp.eq.0)then ++ ++c harmonic angle potential ++ ++ pterm=0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 ++ gamma=prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint ++ ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.1)then ++ ++c truncated harmonic valence angle potential ++ ++ scrn=exp(-(rab**8+rbc**8)/prmtbp(kktbp,3)**8) ++ pterm=scrn*0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 ++ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmtbp(kktbp,3)**8 ++ gamma=scrn*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint ++ gamsa=(8.d0*pterm/prmtbp(kktbp,3)**8)*rab**7 ++ gamsc=(8.d0*pterm/prmtbp(kktbp,3)**8)*rbc**7 ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.2)then ++ ++c screened harmonic valence angle potential ++ ++ scrn=exp(-(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4))) ++ pterm=scrn*0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 ++ vterm=-pterm*(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4)) ++ gamma=scrn*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint ++ gamsa=(pterm/prmtbp(kktbp,3)) ++ gamsc=(pterm/prmtbp(kktbp,4)) ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.3)then ++ ++c screened vessal potential type 1 ++ ++ scrn=exp(-(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4))) ++ pterm=scrn*prmtbp(kktbp,1)/ ++ x (8.d0*(prmtbp(kktbp,2)-pi)**2)* ++ x ((prmtbp(kktbp,2)-pi)**2-(theta-pi)**2)**2 ++ vterm=-pterm*(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4)) ++ gamma=scrn*prmtbp(kktbp,1)/ ++ x (2.d0*(prmtbp(kktbp,2)-pi)**2)* ++ x ((prmtbp(kktbp,2)-pi)**2-(theta-pi)**2)*(theta-pi)/sint ++ gamsa=(pterm/prmtbp(kktbp,3)) ++ gamsc=(pterm/prmtbp(kktbp,4)) ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.4)then ++ ++c truncated vessal potential type 2 - use with sw1 ++ ++ scrn=exp(-(rab**8+rbc**8)/prmtbp(kktbp,4)**8) ++ pterm=scrn*prmtbp(kktbp,1)*(theta**prmtbp(kktbp,3)* ++ x (theta-prmtbp(kktbp,2))**2*(theta+prmtbp(kktbp,2)- ++ x 2.d0*pi)**2-0.5d0*prmtbp(kktbp,3)*pi**(prmtbp(kktbp,3) ++ x -1.d0)*(theta-prmtbp(kktbp,2))**2*(pi- ++ x prmtbp(kktbp,2))**3) ++ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmtbp(kktbp,4)**8 ++ gamma=scrn*prmtbp(kktbp,1)*(theta**(prmtbp(kktbp,3)-1.d0)* ++ x (theta-prmtbp(kktbp,2))*(theta+prmtbp(kktbp,2)- ++ x 2.d0*pi)*((prmtbp(kktbp,3)+4.d0)*theta**2-2.d0*pi* ++ x (prmtbp(kktbp,3)+2.d0)*theta+prmtbp(kktbp,3)* ++ x prmtbp(kktbp,2)*(2.d0*pi-prmtbp(kktbp,2)))- ++ x prmtbp(kktbp,3)*pi**(prmtbp(kktbp,3)-1.d0)* ++ x (theta-prmtbp(kktbp,2))*(pi-prmtbp(kktbp,2))**3)/sint ++ gamsa=(8.d0*pterm/prmtbp(kktbp,4)**8)*rab**7 ++ gamsc=(8.d0*pterm/prmtbp(kktbp,4)**8)*rbc**7 ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.5)then ++ ++ if(min(rab,rbc).lt.1.5d0)then ++ ++ scrn=(5.d0*(prmtbp(kktbp,2)/rac)**2-6.d0)* ++ x (prmtbp(kktbp,2)/rac)**10 ++ tterm=prmtbp(kktbp,1)*cost**4 ++ pterm=scrn*tterm ++ uterm=60.d0*((prmtbp(kktbp,2)/rac)**2-1.d0)* ++ x (prmtbp(kktbp,2)/rac)**10 ++ vterm=tterm*uterm ++ gamma=scrn*4.d0*prmtbp(kktbp,1)*cost**3 ++ gamsb=tterm*uterm/rac ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ endif ++ ++ else ++ ++ safe=.false. ++ pterm=0.d0 ++ vterm=0.d0 ++ gamma=0.d0 ++ gamsa=0.d0 ++ gamsb=0.d0 ++ gamsc=0.d0 ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set triple index ++ ++ if(lsolva)kkk=loc3(atmolt(ia),atmolt(ib),atmolt(ic)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1) ++ x .and.(atm_fre(ic).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic).eq.0) ++ ++ if(lsolva)en3_exc(kkk)=en3_exc(kkk)+pterm ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1) ++ x .or.(atm_fre(ic).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ tbp_fre=tbp_fre-pterm ++ tbp_vir=tbp_vir-vterm ++ pterm=lambda1*pterm ++ vterm=lambda1*vterm ++ gamma=lambda1*gamma ++ gamsa=lambda1*gamsa ++ gamsb=lambda1*gamsb ++ gamsc=lambda1*gamsc ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2) ++ x .or.(atm_fre(ic).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ tbp_fre=tbp_fre+pterm ++ tbp_vir=tbp_vir+vterm ++ pterm=lambda2*pterm ++ vterm=lambda2*vterm ++ gamma=lambda2*gamma ++ gamsa=lambda2*gamsa ++ gamsb=lambda2*gamsb ++ gamsc=lambda2*gamsc ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential and virial ++ ++ engtbp=engtbp+pterm ++ virtbp=virtbp+vterm ++ ++ if(lsolva)en3_sol(kkk)=en3_sol(kkk)+pterm ++ ++c calculate atomic forces ++ ++ fxa=gamma*(xbc-xab*cost)*rrab+gamsa*xab+gamsb*xac ++ fya=gamma*(ybc-yab*cost)*rrab+gamsa*yab+gamsb*yac ++ fza=gamma*(zbc-zab*cost)*rrab+gamsa*zab+gamsb*zac ++ ++ fxc=gamma*(xab-xbc*cost)*rrbc+gamsc*xbc-gamsb*xac ++ fyc=gamma*(yab-ybc*cost)*rrbc+gamsc*ybc-gamsb*yac ++ fzc=gamma*(zab-zbc*cost)*rrbc+gamsc*zbc-gamsb*zac ++ ++ fxx(ia)=fxx(ia)+fxa ++ fyy(ia)=fyy(ia)+fya ++ fzz(ia)=fzz(ia)+fza ++ ++ fxx(ib)=fxx(ib)-fxa-fxc ++ fyy(ib)=fyy(ib)-fya-fyc ++ fzz(ib)=fzz(ib)-fza-fzc ++ ++ fxx(ic)=fxx(ic)+fxc ++ fyy(ic)=fyy(ic)+fyc ++ fzz(ic)=fzz(ic)+fzc ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+rab*xab*fxa+rbc*xbc*fxc ++ strs(2)=strs(2)+rab*xab*fya+rbc*xbc*fyc ++ strs(3)=strs(3)+rab*xab*fza+rbc*xbc*fzc ++ strs(4)=strs(4)+rab*yab*fya+rbc*ybc*fyc ++ strs(5)=strs(5)+rab*yab*fza+rbc*ybc*fzc ++ strs(6)=strs(6)+rab*zab*fza+rbc*zbc*fzc ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn)then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+pterm ++ vir_loc=vir_loc+vterm ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fxa ++ fyy_loc(ia)=fyy_loc(ia)+fya ++ fzz_loc(ia)=fzz_loc(ia)+fza ++ ++ fxx_loc(ib)=fxx_loc(ib)-fxa-fxc ++ fyy_loc(ib)=fyy_loc(ib)-fya-fyc ++ fzz_loc(ib)=fzz_loc(ib)-fza-fzc ++ ++ fxx_loc(ic)=fxx_loc(ic)+fxc ++ fyy_loc(ic)=fyy_loc(ic)+fyc ++ fzz_loc(ic)=fzz_loc(ic)+fzc ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+rab*xab*fxa+rbc*xbc*fxc ++ strs_loc(2)=strs_loc(2)+rab*xab*fya+rbc*xbc*fyc ++ strs_loc(3)=strs_loc(3)+rab*xab*fza+rbc*xbc*fzc ++ strs_loc(4)=strs_loc(4)+rab*yab*fya+rbc*ybc*fyc ++ strs_loc(5)=strs_loc(5)+rab*yab*fza+rbc*ybc*fzc ++ strs_loc(6)=strs_loc(6)+rab*zab*fza+rbc*zbc*fzc ++ ++ endif ++ ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,442) ++ ++c global sum of three body potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engtbp ++ buffer(2)=virtbp ++ buffer(3)=tbp_fre ++ buffer(4)=tbp_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engtbp=buffer(1) ++ virtbp=buffer(2) ++ tbp_fre=buffer(3) ++ tbp_vir=buffer(4) ++ ++c sum up solvation energies ++ ++ if(lsolva)then ++ ++ call gdsum(en3_sol,mxtmls_sol3,buffer(1)) ++ if(lexcite)call gdsum(en3_exc,mxtmls_exc3,buffer(1)) ++ ++ endif ++ ++ endif ++ ++c restore coordinate array to original representation ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=xxx(i) ++ syy=yyy(i) ++ szz=zzz(i) ++ ++ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz ++ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz ++ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz ++ ++ endif ++ ++ enddo ++ ++c restore cell vector ++ ++ if(imcon.eq.0) then ++ cell(1)=0.d0 ++ cell(5)=0.d0 ++ cell(9)=0.d0 ++ endif ++ ++ return ++ ++ end subroutine thbfrc ++ ++ end module three_body_module +diff -urN dl_class_1.9.orig/srcmod/utility_module.f dl_class_1.9/srcmod/utility_module.f +--- dl_class_1.9.orig/srcmod/utility_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/utility_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1612 @@ ++ module utility_module ++ ++c*********************************************************************** ++c ++c dl_poly module for utility subroutines and functions ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ contains ++ ++ subroutine global_sum_forces(natms,mxnode,gxx,gyy,gzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to perform global sum of atomic forces as ++c requred by replicated data strategy ++c ++c copyright - daresbury laboratory ++c author - w.smith december 2005 ++c ++c*********************************************************************** ++ ++ use config_module ++ ++ implicit none ++ ++ integer natms,mxnode,i,j ++ real(8) gxx(*),gyy(*),gzz(*) ++ ++ if(mxnode.gt.1) then ++ ++ j=0 ++ do i=1,natms ++ ++ buffer(j+1)=gxx(i) ++ buffer(j+2)=gyy(i) ++ buffer(j+3)=gzz(i) ++ j=j+3 ++ ++ enddo ++ call gdsum(buffer(1),3*natms,buffer(3*natms+1)) ++ j=0 ++ do i=1,natms ++ ++ gxx(i)=buffer(j+1) ++ gyy(i)=buffer(j+2) ++ gzz(i)=buffer(j+3) ++ j=j+3 ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine global_sum_forces ++ ++ subroutine images ++ x (imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating the minimum image ++c of atom pairs within a specified MD cell ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c T3D optimised version. t.forester july 1994 ++c ++c for ++c imcon=0 no boundary conditions apply ++c imcon=1 standard cubic boundaries apply ++c imcon=2 orthorhombic boundaries apply ++c imcon=3 parallelepiped boundaries apply ++c imcon=4 truncated octahedron boundaries apply ++c imcon=5 rhombic dodecahedron boundaries apply ++c imcon=6 x-y parallelogram boundary conditions : no periodicity in z ++c imcon=7 hexagonal prism boundaries apply ++c ++c note: in all cases the centre of the cell is at (0,0,0) ++c warning - replicated data version: does not re-merge ++c coordinate arrays ++c ++c*********************************************************************** ++ ++ use error_module ++ ++ implicit none ++ ++ integer imcon,idnode,mxnode,natms,iatm1,iatm2,i ++ real(8) cell,xxx,yyy,zzz,aaa,bbb,ccc,det,rt2,rt3,ssx ++ real(8) ssy,ssz,ddd,xss,yss,zss,rcell ++ ++ dimension xxx(*),yyy(*),zzz(*) ++ dimension cell(9),rcell(9) ++ ++ data rt2/1.41421356623d0/,rt3/1.7320508075d0/ ++ ++ if(imcon.gt.0) then ++ ++c block indices ++ ++ iatm1 = (idnode*natms)/mxnode+1 ++ iatm2 = ((idnode+1)*natms)/mxnode ++ ++ endif ++ ++ if(imcon.eq.1)then ++ ++c standard cubic boundary conditions ++ ++ ++ aaa=1.d0/cell(1) ++ ++ do i=iatm1,iatm2 ++ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) ++ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) ++ zzz(i)=zzz(i)-cell(1)*nint(aaa*zzz(i)) ++ enddo ++ ++ else if(imcon.eq.2)then ++ ++c rectangular (slab) boundary conditions ++ ++ aaa=1.d0/cell(1) ++ bbb=1.d0/cell(5) ++ ccc=1.d0/cell(9) ++ ++ do i=iatm1,iatm2 ++ ++ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) ++ yyy(i)=yyy(i)-cell(5)*nint(bbb*yyy(i)) ++ zzz(i)=zzz(i)-cell(9)*nint(ccc*zzz(i)) ++ ++ enddo ++ ++ else if(imcon.eq.3)then ++ ++c parallelepiped boundary conditions ++ ++ call invert(cell,rcell,det) ++ ++ do i=iatm1,iatm2 ++ ++ ssx=(rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i)) ++ ssy=(rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i)) ++ ssz=(rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i)) ++ ++ xss=ssx-nint(ssx) ++ yss=ssy-nint(ssy) ++ zss=ssz-nint(ssz) ++ ++ xxx(i)=(cell(1)*xss+cell(4)*yss+cell(7)*zss) ++ yyy(i)=(cell(2)*xss+cell(5)*yss+cell(8)*zss) ++ zzz(i)=(cell(3)*xss+cell(6)*yss+cell(9)*zss) ++ ++ enddo ++ ++ else if(imcon.eq.4)then ++ ++c truncated octahedral boundary conditions ++ ++ if(.not.(abs(cell(1)-cell(5)).lt.1.d-6.and. ++ x abs(cell(5)-cell(9)).lt.1.d-6)) call error(idnode,130) ++ ++ aaa=1.d0/cell(1) ++ ++ do i=iatm1,iatm2 ++ ++ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) ++ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) ++ zzz(i)=zzz(i)-cell(1)*nint(aaa*zzz(i)) ++ ++ if((abs(xxx(i))+abs(yyy(i))+abs(zzz(i))).ge. ++ x (0.75d0*cell(1)))then ++ ++ xxx(i)=xxx(i)-0.5d0*sign(cell(1),xxx(i)) ++ yyy(i)=yyy(i)-0.5d0*sign(cell(1),yyy(i)) ++ zzz(i)=zzz(i)-0.5d0*sign(cell(1),zzz(i)) ++ ++ endif ++ ++ enddo ++ ++ else if(imcon.eq.5)then ++ ++c rhombic dodecahedral boundary conditions ++ ++ if(.not.(abs(cell(1)-cell(5)).lt.1.d-6.and. ++ x abs(cell(9)-cell(1)*rt2).lt.1.d-6)) ++ x call error(idnode,140) ++ ++ aaa=1.d0/cell(1) ++ bbb=1.d0/cell(9) ++ ++ do i=iatm1,iatm2 ++ ++ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) ++ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) ++ zzz(i)=zzz(i)-cell(9)*nint(bbb*zzz(i)) ++ ++ if((abs(xxx(i))+abs(yyy(i))+abs(rt2*zzz(i))).ge. ++ x cell(1))then ++ ++ xxx(i)=xxx(i)-0.5d0*sign(cell(1),xxx(i)) ++ yyy(i)=yyy(i)-0.5d0*sign(cell(1),yyy(i)) ++ zzz(i)=zzz(i)-0.5d0*sign(cell(9),zzz(i)) ++ ++ endif ++ ++ enddo ++ ++ else if(imcon.eq.6) then ++ ++c x-y boundary conditions ++ ++ det = cell(1)*cell(5) - cell(2)*cell(4) ++ ++ if(abs(det).lt.1.d-6)call error(idnode,120) ++ ++ det = 1.d0/det ++ ++ rcell(1) = det*cell(5) ++ rcell(2) = -det*cell(2) ++ rcell(4) = -det*cell(4) ++ rcell(5) = det*cell(1) ++ ++ do i=iatm1,iatm2 ++ ++ ssx = rcell(1)*xxx(i) + rcell(4)*yyy(i) ++ ssy = rcell(2)*xxx(i) + rcell(5)*yyy(i) ++ ++ xss = ssx - nint(ssx) ++ yss = ssy - nint(ssy) ++ ++ xxx(i)=cell(1)*xss + cell(4)*yss ++ yyy(i)=cell(2)*xss + cell(5)*yss ++ ++ enddo ++ ++ else if(imcon.eq.7) then ++ ++c hexagonal prism boundary conditions ++ ++ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) ++ x call error(idnode,135) ++ ++ aaa=cell(1)/(rt3*2.d0) ++ bbb=cell(1)/rt3 ++ ccc=rt3/cell(1) ++ ddd=1.d0/cell(9) ++ ++ do i=iatm1,iatm2 ++ ++ yyy(i)=yyy(i)-bbb*nint(ccc*yyy(i)) ++ zzz(i)=zzz(i)-cell(9)*nint(ddd*zzz(i)) ++ ++ if((abs(yyy(i))+abs(rt3*xxx(i))).ge.bbb)then ++ ++ xxx(i)=xxx(i)-rt3*sign(aaa,xxx(i)) ++ yyy(i)=yyy(i)-sign(aaa,yyy(i)) ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine images ++ ++ subroutine config_write(fname,levcfg,imcon,natms,engcfg) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing CONFIG files ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2007 ++c ++c*********************************************************************** ++ ++ use config_module ++ use setup_module ++ ++ implicit none ++ ++ character*6 fname ++ ++ integer i,natms,levcfg,imcon,nstep ++ real(8) engcfg ++ ++ open(nconf,file=fname,form='formatted') ++ ++ write(nconf,'(80a1)') cfgname ++ write(nconf,'(3i10,1p,g20.12)') levcfg,imcon,natms,engcfg ++ if(imcon.gt.0) write(nconf,'(3f20.12)') cell ++ ++ do i=1,natms ++ ++ write(nconf,'(a8,i10)') atmnam(i),i ++ write(nconf,'(3g20.10)') xxx(i),yyy(i),zzz(i) ++ if(levcfg.gt.0)write(nconf,'(3g20.12)') ++ x vxx(i),vyy(i),vzz(i) ++ if(levcfg.gt.1)write(nconf,'(3g20.12)') ++ x fxx(i),fyy(i),fzz(i) ++ ++ enddo ++ ++ close (nconf) ++ ++ return ++ end subroutine config_write ++ ++ subroutine bomb(idnode,nyr,nmn,ndy) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to set an expiry date in a compiled program ++c ++c copyright - daresbury laboratory ++c author - w. smith oct 2002 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ logical safe ++ integer info(8) ++ character*12 dat,tim,zon ++ integer idnode,nyr,nmn,ndy ++ ++ safe=.true. ++ ++ call date_and_time(dat,tim,zon,info) ++ ++ if(info(1).gt.nyr)then ++ ++ safe=.false. ++ ++ else if(info(1).eq.nyr)then ++ ++ if(info(2).gt.nmn)then ++ ++ safe=.false. ++ ++ else if(info(2).eq.nmn)then ++ ++ if(info(3).ge.ndy)safe=.false. ++ ++ endif ++ ++ endif ++ ++ if(.not.safe)then ++ ++ if(idnode.eq.0)write(nrite,'(a,/,a)') ++ x 'THE EXPIRY DATE OF THIS EXECUTABLE HAS PASSED.', ++ X 'PLEASE CONTACT W.SMITH@DL.AC.UK FOR A NEW LICENCE' ++ ++ call exitcomms() ++ ++ endif ++ ++ return ++ end subroutine bomb ++ ++ subroutine cpy_rtc(nnn,aaa,bbb) ++ ++c********************************************************************** ++c ++c dl_poly subroutine for copying a real array into a complex array ++c of the same dimension ++c ++c copyright daresbury laboratory 1998 ++c author w.smith oct 1998 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i,nnn ++ real(8) aaa(*) ++ complex(8) bbb(*) ++ ++ do i=1,nnn ++ ++ bbb(i)=cmplx(aaa(i),0.d0,kind=8) ++ ++ enddo ++ ++ return ++ end subroutine cpy_rtc ++ ++ function duni() ++ ++c********************************************************************* ++c ++c dl_poly random number generator based on the universal ++c random number generator of marsaglia, zaman and tsang ++c (stats and prob. lett. 8 (1990) 35-39.) it must be ++c called once to initialise parameters u,c,cd,cm ++c ++c copyright daresbury laboratory 1992 ++c author - w.smith july 1992 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical new ++ integer ir,jr,i,j,k,l,m,ii,jj ++ real(4) s,t,u,c,cd,cm,uni ++ real(8) duni ++ dimension u(97) ++ save u,c,cd,cm,uni,ir,jr,new ++ data new/.true./ ++ ++ if(new)then ++ ++c initial values of i,j,k must be in range 1 to 178 (not all 1) ++c initial value of l must be in range 0 to 168. ++ ++ i=12 ++ j=34 ++ k=56 ++ l=78 ++c ++ ir=97 ++ jr=33 ++ new=.false. ++ ++ do 200 ii=1,97 ++ s=0.0 ++ t=0.5 ++ do 100 jj=1,24 ++ m=mod(mod(i*j,179)*k,179) ++ i=j ++ j=k ++ k=m ++ l=mod(53*l+1,169) ++ if(mod(l*m,64).ge.32)s=s+t ++ t=0.5*t ++ 100 continue ++ u(ii)=s ++ 200 continue ++ c = 362436.0/16777216.0 ++ cd= 7654321.0/16777216.0 ++ cm=16777213.0/16777216.0 ++ else ++ ++c calculate random number ++ uni=u(ir)-u(jr) ++ if(uni.lt.0.0)uni=uni+1.0 ++ u(ir)=uni ++ ir=ir-1 ++ if(ir.eq.0)ir=97 ++ jr=jr-1 ++ if(jr.eq.0)jr=97 ++ c=c-cd ++ if(c.lt.0.0)c=c+cm ++ uni=uni-c ++ if(uni.lt.0.0)uni=uni+1.0 ++ duni=dble(uni) ++ endif ++ ++ return ++ end function duni ++ ++ subroutine ele_prd(nnn,aaa,bbb,ccc) ++ ++c********************************************************************** ++c ++c dl_poly subroutine for element by element product of ++c a real array (bbb) and a complex array (ccc) ++c ++c copyright daresbury laboratory 1998 ++c author w.smith july 1998 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i,nnn ++ real(8) bbb(*) ++ complex(8) aaa(*),ccc(*) ++ ++ do i=1,nnn ++ ++ aaa(i)=bbb(i)*ccc(i) ++ ++ enddo ++ ++ return ++ end subroutine ele_prd ++ ++ subroutine gauss(natms,vxx,vyy,vzz) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for constructing velocity arrays ++c with a gaussian distribution of unit variance. ++c ++c based on the Box-Muller method ++c ++c note - this version uses a universal random number ++c generator, which generates pseudo-random numbers between ++c 0 and 1. it is based on the algorithm of marsaglia, zaman ++c and tsang in: stats and prob. lett. 8 (1990) 35-39. ++c ++c copyright daresbury laboratory 2007 ++c author - w. smith nov 2007 ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ integer natms,i ++ real(8) vxx,vyy,vzz,rrr,rr1,rr2 ++ ++ dimension vxx(natms),vyy(natms),vzz(natms) ++ ++c initialise random number generator ++ ++ rrr=duni() ++ ++c calculate gaussian random numbers ++ ++ do i=1,2*(natms/2),2 ++ ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vxx(i)=rr1*cos(rr2) ++ vxx(i+1)=rr1*sin(rr2) ++ ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vyy(i)=rr1*cos(rr2) ++ vyy(i+1)=rr1*sin(rr2) ++ ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vzz(i)=rr1*cos(rr2) ++ vzz(i+1)=rr1*sin(rr2) ++ ++ enddo ++ if(mod(natms,2).ne.0)then ++ ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vxx(natms)=rr1*cos(rr2) ++ vyy(natms)=rr1*sin(rr2) ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vzz(natms)=rr1*cos(rr2) ++ ++ endif ++ ++ return ++ end subroutine gauss ++ ++ subroutine invert(a,b,d) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to invert a 3 * 3 matrix using cofactors ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith april 1992 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ real(8) a,b,d,r ++ ++ dimension a(9),b(9) ++ ++c calculate adjoint matrix ++ b(1)=a(5)*a(9)-a(6)*a(8) ++ b(2)=a(3)*a(8)-a(2)*a(9) ++ b(3)=a(2)*a(6)-a(3)*a(5) ++ b(4)=a(6)*a(7)-a(4)*a(9) ++ b(5)=a(1)*a(9)-a(3)*a(7) ++ b(6)=a(3)*a(4)-a(1)*a(6) ++ b(7)=a(4)*a(8)-a(5)*a(7) ++ b(8)=a(2)*a(7)-a(1)*a(8) ++ b(9)=a(1)*a(5)-a(2)*a(4) ++ ++c calculate determinant ++ d=a(1)*b(1)+a(4)*b(2)+a(7)*b(3) ++ r=0.d0 ++ if(abs(d).gt.0.d0)r=1.d0/d ++ ++c complete inverse matrix ++ b(1)=r*b(1) ++ b(2)=r*b(2) ++ b(3)=r*b(3) ++ b(4)=r*b(4) ++ b(5)=r*b(5) ++ b(6)=r*b(6) ++ b(7)=r*b(7) ++ b(8)=r*b(8) ++ b(9)=r*b(9) ++ ++ return ++ end subroutine invert ++ ++ subroutine jacobi(a,v,n) ++ ++c*********************************************************************** ++c ++c diagonalisation of real symmetric matices by jacobi method ++c ++c input parameters: ++c ++c a(n,n) is the matrix to be diagonalised ++c v(n,n) is the eigenvector matrix ++c n is the dimension of the matrices ++c ++c jacobi processes lower triangle only (upper triangle unchanged) ++c ++c variable rho sets absolute tolerance on convergence ++c variable tes is a moving tolerance that diminishes ++c on each pass until at true convergence tesdlrpot) .or. (ngrid-4 /= nint(cutpot/delpot))) then ++ ++ if (idnode == 0) write(nrite,"( ++ x 'expected radial increment : ',1p,e15.7,/, ++ x 'TABLE radial increment : ',1p,e15.7,/,/, ++ x 'expected number of grid points : ',0p,i10,/, ++ x 'grid points in TABLE : ',i10)") ++ x dlrpot, delpot, mxgrid, ngrid ++ ++ call error(idnode,22) ++ ++ endif ++ ++ if(cutpot.lt.rcut) call error(idnode,504) ++ if(abs(1.d0-(delpot/dlrpot)).gt.1.0d-8) then ++ if(idnode.eq.0) write(nrite, ++ x "(/,' TABLE arrays resized for mxgrid=',i10)") mxgrid ++ endif ++ ++c read potential arrays for all pairs ++ ++ do ivdw=1,ntpvdw ++ ++c read potential arrays if potential not already defined ++ ++ if(ltpvdw(ivdw).eq.0)then ++ ++c read pair potential labels and long range corrections ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_table_read(idnode,ntable) ++ ++ call getword(atom1,record,8,lenrec) ++ call getword(atom2,record,8,lenrec) ++ prmvdw(ivdw,1)=dblstr(record,lenrec,idum) ++ prmvdw(ivdw,2)=dblstr(record,lenrec,idum) ++ ++ katom1=0 ++ katom2=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom1.eq.unqatm(jtpatm))katom1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katom2=jtpatm ++ ++ enddo ++ ++ if(katom1.eq.0.or.katom2.eq.0)then ++ if(idnode.eq.0) ++ x write(nrite,'(a)') '****',atom1,'***',atom2,'****' ++ call error(idnode,81) ++ endif ++ ++ keyvdw=loc2(katom1,katom2) ++ ++ if(lstvdw(keyvdw).ne.ivdw) call error(idnode,23) ++ ++c read potential arrays ++ ++ if(mxbuff.lt.ngrid) then ++ ++ if(idnode.eq.0) ++ x write(nrite,*) 'mxbuff must be >=',ngrid,' in fortab' ++ call error(idnode,48) ++ ++ endif ++ ++c read in potential arrays ++ ++ do i=1,(ngrid+3)/4 ++ ++ l=min(4,ngrid-(i-1)*4) ++ if (idnode == 0) then ++ read(unit=ntable, fmt=*, end=100) ++ x (buffer((i-1)*4+j),j=1,l) ++ else ++ buffer((i-1)*4+1:(i-1)*4+l)=0.0d0 ++ endif ++ ++ enddo ++ call gdsum(buffer(1:ngrid),ngrid,buffer(ngrid+1:2*ngrid)) ++ ++c reconstruct arrays using 3pt interpolation ++ ++ rdr=1.d0/delpot ++ vvv(1,ivdw)=1.d0 ++ ggg(1,ivdw)=0.d0 ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ vk0=buffer(l) ++ vk1=buffer(l+1) ++ vk2=buffer(l+2) ++ ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ vvv(i,ivdw)=t1+(t2-t1)*ppp*0.5d0 ++ ++ enddo ++ ++c read in force arrays ++ ++ do i=1,(ngrid+3)/4 ++ ++ l=min(4,ngrid-(i-1)*4) ++ if (idnode == 0) then ++ read(unit=ntable, fmt=*, end=100) ++ x (buffer((i-1)*4+j),j=1,l) ++ else ++ buffer((i-1)*4+1:(i-1)*4+l)=0.0d0 ++ endif ++ ++ enddo ++ call gdsum(buffer(1:ngrid),ngrid,buffer(ngrid+1:2*ngrid)) ++ ++c reconstruct ggg arrays using 3pt interpolation ++ ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ vk0=buffer(l) ++ vk1=buffer(l+1) ++ vk2=buffer(l+2) ++ ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ ++ ggg(i,ivdw)=t1+(t2-t1)*ppp*0.5d0 ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c convert to internal units ++ ++ do k=1,ntpvdw ++ ++ if(ltpvdw(k).eq.0)then ++ ++ do i=1,mxgrid ++ ++ vvv(i,k)=vvv(i,k)*engunit ++ ggg(i,k)=ggg(i,k)*engunit ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)close (ntable) ++ ++ if(idnode.eq.0)write(nrite,'(/,/,1x,a)') ++ x 'potential tables read from TABLE file' ++ ++ return ++ ++c end of file error exit ++ ++ 100 call abort_table_read(idnode,ntable) ++ ++ end subroutine fortab ++ ++ subroutine abort_table_read(idnode,ntable) ++ ++c*********************************************************************** ++c ++c dl_poly error exit subroutine for reading TABLE file ++c ++c copyright - daresbury laboratory ++c author - w. smith sept 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ integer idnode,ntable ++ ++ if(idnode.eq.0)close (ntable) ++ ++ call error(idnode,24) ++ ++ end subroutine abort_table_read ++ ++ subroutine srfrce ++ x (lsolva,lfree,lghost,iatm,ik,engsrp,virsrp,rcut,dlrpot) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating short range force and ++c potential energy terms using verlet neighbour list ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992 ++c ++c version 3 ++c author - t. forester june 1993 ++c stress tensor added t.forester may 1994 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,k,l,kkk ++ real(8) engsrp,virsrp,rcut,dlrpot ++ real(8) ab,rrr,rsq,ppp,t1,t2,vk0,vk1,vk2,gk0,gk1,gk2,gamma ++ real(8) fi,rcsq,rdr,ai,aj,fx,fy,fz,omega ++ real(8) strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c interpolation spacing ++ ++ rdr=1.d0/dlrpot ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engsrp=0.d0 ++ virsrp=0.d0 ++ ++c store forces for iatm ++ ++ ai=dble(ltype(iatm)) ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ aj=dble(ltype(jatm)) ++ ++ if(ai.gt.aj) then ++ ab=ai*(ai-1.d0)*0.5d0+aj+0.5d0 ++ else ++ ab=aj*(aj-1.d0)*0.5d0+ai+0.5d0 ++ endif ++ ++ k=lstvdw(int(ab)) ++ ++ if((ltpvdw(k).lt.100).and.(abs(vvv(1,k)).gt.1.d-10))then ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ ++ if(l.eq.0)then ++ ++ omega=vvv(1,k) ++ gamma=ggg(1,k) ++ ++ else ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0=vvv(l,k) ++ vk1=vvv(l+1,k) ++ vk2=vvv(l+2,k) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ omega=t1+(t2-t1)*ppp*0.5d0 ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=ggg(l,k) ++ gk1=ggg(l+1,k) ++ gk2=ggg(l+2,k) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ gamma=(t1+(t2-t1)*ppp*0.5d0)/rsq ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+omega ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ vdw_fre=vdw_fre-omega ++ vdw_vir=vdw_vir+gamma*rsq ++ omega=lambda1*omega ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ vdw_fre=vdw_fre+omega ++ vdw_vir=vdw_vir-gamma*rsq ++ omega=lambda2*omega ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential and virial ++ ++ engsrp=engsrp+omega ++ virsrp=virsrp-gamma*rsq ++ ++ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+omega ++ ++c calculate forces ++ ++ fx=gamma*xdf(m) ++ fy=gamma*ydf(m) ++ fz=gamma*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc-gamma*rsq ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine srfrce ++ ++ subroutine lrcorrect ++ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, ++ x ntpatm,ntpvdw,elrc,engunit,virlrc,rcut,volm) ++ ++c************************************************************************* ++c ++c DL_POLY subroutine to evaluate long-range corrections to ++c pressure and energy in a periodic system. ++c ++c copyright daresbury laboratory 1993 ++c author - t. forester may 1993 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=10 ++ logical lsolva,lfree,lghost ++ integer idnode,imcon,keyfce,natms,ntpatm,i,ka,ntpvdw ++ integer ivdw,j,k,it,jt,kt,fail ++ real(8) natyp,nbtyp,nctyp,ndtyp,nafrz,nbfrz,ncfrz,ndfrz ++ real(8) elrc,engunit,virlrc,rcut,volm,twopi,eadd,padd ++ real(8) denprd,aaa,bbb,ccc,ddd,eee,eps,sig,rr0,ann,amm ++ real(8) denprd1,denprd2,denprd3,denprdf ++ integer, allocatable :: numtyp_sol0(:,:),numfrz_sol0(:,:) ++ integer, allocatable :: numtyp_sol1(:,:),numfrz_sol1(:,:) ++ integer, allocatable :: numtyp_sol2(:,:),numfrz_sol2(:,:) ++ integer, allocatable :: numtyp_fre(:,:),numfrz_fre(:,:) ++ real(8), allocatable :: elrc_sol0(:),elrc_exc0(:) ++ ++ dimension fail(nnn) ++ ++ twopi=2.0d0*pi ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ if(lfree.or.lghost)then ++ ++ allocate (numtyp_fre(mxatyp,0:2),stat=fail(1)) ++ allocate (numfrz_fre(mxatyp,0:2),stat=fail(2)) ++ allocate (elrc_exc0(mxtmls_exc2),stat=fail(3)) ++ ++ endif ++ ++ if(lsolva)then ++ ++ allocate (elrc_sol0(mxtmls_sol2),stat=fail(4)) ++ allocate (numtyp_sol0(mxatyp,mxtmls),stat=fail(5)) ++ allocate (numfrz_sol0(mxatyp,mxtmls),stat=fail(6)) ++ ++ if(lghost)then ++ ++ allocate (numtyp_sol1(mxatyp,mxtmls),stat=fail(7)) ++ allocate (numfrz_sol1(mxatyp,mxtmls),stat=fail(8)) ++ allocate (numtyp_sol2(mxatyp,mxtmls),stat=fail(9)) ++ allocate (numfrz_sol2(mxatyp,mxtmls),stat=fail(10)) ++ ++ endif ++ ++ endif ++ ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1015) ++ enddo ++ ++c initalise counter arrays ++ ++ do i=1,ntpatm ++ ++ numtyp(i)=0 ++ numfrz(i)=0 ++ ++ enddo ++ ++ if(lfree.or.lghost)then ++ ++ numtyp_fre(:,:)=0 ++ numfrz_fre(:,:)=0 ++ ++ endif ++ ++ if(lsolva)then ++ ++ numtyp_sol0(:,:)=0 ++ numfrz_sol0(:,:)=0 ++ ++ if(lghost)then ++ ++ numtyp_sol1(:,:)=0 ++ numfrz_sol1(:,:)=0 ++ numtyp_sol2(:,:)=0 ++ numfrz_sol2(:,:)=0 ++ ++ endif ++ ++ endif ++ ++c evaluate number density in system ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ numtyp(ka)=numtyp(ka)+1 ++ if(lstfrz(i).ne.0)numfrz(ka)=numfrz(ka)+1 ++ ++ enddo ++ ++ if(lfree.or.lghost)then ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ numtyp_fre(ka,atm_fre(i))=numtyp_fre(ka,atm_fre(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_fre(ka,atm_fre(i))=numfrz_fre(ka,atm_fre(i))+1 ++ ++ enddo ++ ++ endif ++ ++ if(lsolva)then ++ ++ if(lghost)then ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ ++ if(atm_fre(i).eq.0)then ++ ++ numtyp_sol0(ka,atmolt(i))=numtyp_sol0(ka,atmolt(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_sol0(ka,atmolt(i))=numfrz_sol0(ka,atmolt(i))+1 ++ ++ elseif(atm_fre(i).eq.1)then ++ ++ numtyp_sol1(ka,atmolt(i))=numtyp_sol1(ka,atmolt(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_sol1(ka,atmolt(i))=numfrz_sol1(ka,atmolt(i))+1 ++ ++ elseif(atm_fre(i).eq.2)then ++ ++ numtyp_sol2(ka,atmolt(i))=numtyp_sol2(ka,atmolt(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_sol2(ka,atmolt(i))=numfrz_sol2(ka,atmolt(i))+1 ++ ++ endif ++ ++ enddo ++ ++ else ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ numtyp_sol0(ka,atmolt(i))=numtyp_sol0(ka,atmolt(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_sol0(ka,atmolt(i))=numfrz_sol0(ka,atmolt(i))+1 ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c number densities ++ ++ do i=1,ntpatm ++ dens(i)=dble(numtyp(i))/volm ++ enddo ++ ++c long range corrections to energy and pressure ++ ++ elrc=0.d0 ++ elrc2=0.d0 ++ virlrc=0.d0 ++ virlrc2=0.d0 ++ denprdf=0.d0 ++ volm_sav=0.d0 ++ elrc_fre=0.d0 ++ vlrc_fre=0.d0 ++ ++ if(imcon.ne.0.and.imcon.ne.6.and.ntpvdw.gt.0) then ++ ++ if(mod(keyfce,2).eq.1) then ++ ++ ivdw=0 ++ ++ do i=1,ntpatm ++ ++ do j=1,i ++ ++ eadd=0.d0 ++ padd=0.d0 ++ ++ ivdw=ivdw+1 ++ k=lstvdw(ivdw) ++ ++ if(ltpvdw(k).eq.0) then ++ ++c tabulated potential ++ ++ eadd=prmvdw(k,1) ++ padd=-prmvdw(k,2) ++ ++ else if(ltpvdw(k).eq.1) then ++ ++c 12-6 potential ++ ++ aaa=prmvdw(k,1) ++ bbb=prmvdw(k,2) ++ ++ eadd=aaa/(9.d0*rcut**9)-bbb/(3.d0*rcut**3) ++ padd=12.d0*aaa/(9.d0*rcut**9)-6.d0*bbb/(3.d0*rcut**3) ++ ++ else if(ltpvdw(k).eq.2) then ++ ++c Lennard Jones potential ++ ++ eps=prmvdw(k,1) ++ sig=prmvdw(k,2) ++ ++ eadd=4.d0*eps*(sig**12/(9.d0*rcut**9)- ++ x sig**6/(3.d0*rcut**3)) ++ padd=4.d0*eps*(12.d0*sig**12/(9.d0*rcut**9)- ++ x 2.d0*sig**6/(rcut**3)) ++ ++ else if(ltpvdw(k).eq.3) then ++ ++c n - m potential ++ ++ eps=prmvdw(k,1) ++ ann=prmvdw(k,2) ++ amm=prmvdw(k,3) ++ rr0=prmvdw(k,4) ++ ++ eadd=eps/(ann-amm)*(amm*rr0**ann/((ann-3.d0)* ++ x rcut**(ann-3.d0))-ann*rr0**amm/((amm-3.0d0)* ++ x rcut**(amm-3.d0))) ++ padd=eps/(ann-amm)*ann*amm*(rr0**ann/((ann-3.d0)* ++ x rcut**(ann-3.d0))-rr0**amm/((amm-3.0d0)* ++ x rcut**(amm-3.d0))) ++ ++ else if(ltpvdw(k).eq.4) then ++ ++c buckingham exp - 6 potential ++ ++ ccc=prmvdw(k,3) ++ ++ eadd=-ccc/(3.d0*rcut**3) ++ padd=-2.d0*ccc/(rcut**3) ++ ++ else if(ltpvdw(k).eq.5) then ++ ++c born huggins meyer exp -6 - 8 potential ++ ++ ddd=prmvdw(k,4) ++ eee=prmvdw(k,5) ++ ++ eadd=-ddd/(3.d0*rcut**3)-eee/(5.d0*rcut**5) ++ padd=-2.d0*ddd/(rcut**3)-8.d0*eee/(5.d0*rcut**5) ++ ++ else if(ltpvdw(k).eq.6) then ++ ++c hydrogen bond 12 - 10 potential ++ ++ aaa=prmvdw(k,1) ++ bbb=prmvdw(k,2) ++ ++ eadd=aaa/(9.d0*rcut**9)-bbb/(7.d0*rcut**7) ++ padd=12.d0*aaa/(9.d0*rcut**9)-1.d1*bbb/(7.d0*rcut**7) ++ ++ endif ++ ++ if(i.ne.j) then ++ ++ eadd=eadd*2.d0 ++ padd=padd*2.d0 ++ ++ endif ++ ++ if(.not.(lfree.or.lghost))then ++ ++ denprd=twopi*(dble(numtyp(i))*dble(numtyp(j))- ++ x dble(numfrz(i))*dble(numfrz(j)))/volm**2 ++ ++ else ++ ++ nafrz=dble(numfrz_fre(i,0)+numfrz_fre(i,1)) ++ natyp=dble(numtyp_fre(i,0)+numtyp_fre(i,1)) ++ nbfrz=dble(numfrz_fre(j,0)+numfrz_fre(j,1)) ++ nbtyp=dble(numtyp_fre(j,0)+numtyp_fre(j,1)) ++ ncfrz=dble(numfrz_fre(i,0)+numfrz_fre(i,2)) ++ nctyp=dble(numtyp_fre(i,0)+numtyp_fre(i,2)) ++ ndfrz=dble(numfrz_fre(j,0)+numfrz_fre(j,2)) ++ ndtyp=dble(numtyp_fre(j,0)+numtyp_fre(j,2)) ++ ++ if(lghost)then ++ ++ denprd=twopi*(natyp*nbtyp-nafrz*nbfrz)/volm**2 ++ denprd3=twopi*(nctyp*ndtyp-ncfrz*ndfrz)/volm**2 ++ ++ elseif(lfree)then ++ ++ denprd1=twopi*(natyp*nbtyp-nafrz*nbfrz)/volm**2 ++ denprd2=twopi*(nctyp*ndtyp-ncfrz*ndfrz)/volm**2 ++ denprd=lambda1*denprd1+lambda2*denprd2 ++ denprd3=lambda2*denprd1+lambda1*denprd2 ++ denprdf=denprd2-denprd1 ++ ++ endif ++ ++ endif ++ ++ elrc=elrc+volm*denprd*eadd ++ virlrc=virlrc-denprd*padd*volm ++ ++ if(lfree.or.lghost)then ++ ++ elrc2=elrc2+volm*denprd3*eadd ++ virlrc2=virlrc2-denprd3*padd*volm ++ if(lfree)then ++ elrc_fre=elrc_fre+volm*denprdf*eadd ++ vlrc_fre=vlrc_fre-denprdf*padd*volm ++ endif ++ ++ endif ++ ++ if(lsolva)then ++ ++ elrc_sol0(:)=0.d0 ++ if(lghost)elrc_exc0(:)=0.d0 ++ ++ do it=1,mxtmls ++ ++ do jt=1,mxtmls ++ ++ kt=loc2(it,jt) ++ ++ if(lghost)then ++ ++ natyp=dble(numtyp_sol0(i,it)+numtyp_sol1(i,it)) ++ nbtyp=dble(numtyp_sol0(j,jt)+numtyp_sol1(j,jt)) ++ nafrz=dble(numfrz_sol0(i,it)+numfrz_sol1(i,it)) ++ nbfrz=dble(numfrz_sol0(j,jt)+numfrz_sol1(j,jt)) ++ ++ elrc_sol0(kt)=elrc_sol0(kt)+twopi*(natyp* ++ x nbtyp-nafrz*nbfrz)/volm**2 ++ ++ nctyp=dble(numtyp_sol0(i,it)+numtyp_sol2(i,it)) ++ ndtyp=dble(numtyp_sol0(j,jt)+numtyp_sol2(j,jt)) ++ ncfrz=dble(numfrz_sol0(i,it)+numfrz_sol2(i,it)) ++ ndfrz=dble(numfrz_sol0(j,jt)+numfrz_sol2(j,jt)) ++ ++ elrc_exc0(kt)=elrc_exc0(kt)+twopi*(nctyp* ++ x ndtyp-ncfrz*ndfrz)/volm**2 ++ ++ else ++ ++ natyp=dble(numtyp_sol0(i,it)) ++ nbtyp=dble(numtyp_sol0(j,jt)) ++ nafrz=dble(numfrz_sol0(i,it)) ++ nbfrz=dble(numfrz_sol0(j,jt)) ++ ++ elrc_sol0(kt)=elrc_sol0(kt)+twopi*(natyp* ++ x nbtyp-nafrz*nbfrz)/volm**2 ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ if(lghost)then ++ ++ elrc_sol(:)=elrc_sol(:)+volm*eadd*elrc_sol0(:) ++ elrc_exc(:)=elrc_exc(:)+volm*eadd*elrc_exc0(:) ++ ++ else ++ ++ elrc_sol(:)=elrc_sol(:)+volm*eadd*elrc_sol0(:) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ if(lfree.or.lghost)then ++ ++ elrc_sav=elrc ++ elrc2_sav=elrc2 ++ virlrc_sav=virlrc ++ virlrc2_sav=virlrc2 ++ elrc_fre_sav=elrc_fre ++ vlrc_fre_sav=vlrc_fre ++ ++ endif ++ ++ volm_sav=volm ++ ++ if(lghost)then ++ ++ elrc_sol_sav(:)=elrc_sol(:) ++ elrc_exc_sav(:)=elrc_exc(:) ++ ++ elseif(lsolva)then ++ ++ elrc_sol_sav(:)=elrc_sol(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,'long range correction for: vdw energy ',e15.6,/, ++ x 25x,': vdw pressure',e15.6)")elrc/engunit, ++ x prsunt*virlrc/(-3.d0*volm) ++ ++ if(lghost) ++ x write(nrite, ++ x "(/,/,'long range correction for: vdw energy ',e15.6,/, ++ x 25x,': vdw pressure',e15.6)")elrc2/engunit, ++ x prsunt*virlrc2/(-3.d0*volm) ++ ++ endif ++ ++c deallocate work arrays ++ ++ if(lfree.or.lghost) ++ x deallocate (elrc_exc0,numtyp_fre,numfrz_fre,stat=fail(1)) ++ ++ if(lsolva)then ++ ++ deallocate (elrc_sol0,numtyp_sol0,numfrz_sol0,stat=fail(2)) ++ ++ if(lghost)then ++ ++ deallocate (numtyp_sol1,numfrz_sol1,stat=fail(3)) ++ deallocate (numtyp_sol2,numfrz_sol2,stat=fail(4)) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine lrcorrect ++ ++ ++ subroutine srfrceneu ++ x (lsolva,lfree,lghost,ik,engsrp,virsrp,dlrpot,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating short range force and ++c potential energy terms using verlet neighbour list ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992 ++c ++c neutral groups ++c author - t. forester march 1994 ++c ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer ik,m,iatm,jatm,l,k,kkk ++ real(8) engsrp,virsrp,dlrpot,rcut,rcsq,fx,fy,fz,omega,omega_exc ++ real(8) rrr,ppp,vk0,vk1,vk2,t1,t2,gk0,gk1,gk2,rdlpot,gamma ++ real(8) ai,aj,ak,rsq,strs(6),strs_loc(6) ++ ++ lskip=(lfree.or.lghost) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c reciprocal of interpolation spacing ++ ++ rdlpot=1.d0/dlrpot ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engsrp=0.d0 ++ virsrp=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ iatm=ilist(m) ++ jatm=jlist(m) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(iatm)) ++ jdrive=driven(ltype(jatm)) ++ ++ endif ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ aj=ltype(jatm) ++ ai=ltype(iatm) ++ ++ if(ai.gt.aj) then ++ ak=(ai*(ai-1.d0)*0.5d0+aj+0.5d0) ++ else ++ ak=(aj*(aj-1.d0)*0.5d0+ai+0.5d0) ++ endif ++ k=lstvdw(int(ak)) ++ ++ if(abs(vvv(1,k)).gt.1.d-10)then ++ ++ rsq=rsqdf(m) ++ ++ if(rsq.lt.rcsq) then ++ ++ rrr=sqrt(rsq) ++ ++c determine interpolation panel for force arrays ++ ++ l=int(rrr*rdlpot) ++ ppp=rrr*rdlpot-dble(l) ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0=vvv(l,k) ++ vk1=vvv(l+1,k) ++ vk2=vvv(l+2,k) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ omega=t1+(t2-t1)*ppp*0.5d0 ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=ggg(l,k) ++ gk1=ggg(l+1,k) ++ gk2=ggg(l+2,k) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ gamma=(t1+(t2-t1)*ppp*0.5d0)/rsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+omega ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ omega=lambda1*omega ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ omega=lambda2*omega ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engsrp=omega+engsrp ++ virsrp=virsrp-gamma*rsq ++ ++ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+omega ++ ++ fx=gamma*xdf(m) ++ fy=gamma*ydf(m) ++ fz=gamma*zdf(m) ++ ++ fxx(iatm)=fxx(iatm)+fx ++ fyy(iatm)=fyy(iatm)+fy ++ fzz(iatm)=fzz(iatm)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc-gamma*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine srfrceneu ++ ++ end module vdw_module +diff -urN dl_class_1.9.orig/srcmod/vv_motion_module.f dl_class_1.9/srcmod/vv_motion_module.f +--- dl_class_1.9.orig/srcmod/vv_motion_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/vv_motion_module.f 2011-02-22 12:46:30.000000000 +0100 +@@ -0,0 +1,3031 @@ ++ module vv_motion_module ++ ++c*********************************************************************** ++c ++c dl_poly module for velocity verlet integration schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use metafreeze_module,only : lmetadyn ++ use property_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ contains ++ ++ subroutine rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,stresh) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for applying bond constraint corrections after ++c atomic integration. rattle algorithm ++c must be used in conjunction with integration algorithms ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical check,safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,icyc,i,j,k ++ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,esig ++ real(8) txx,tyy,tzz,xxt,yyt,zzt,stresh,dx,dy,dz,dis,omega2 ++ real(8) strs1,strs2,strs3,strs5,strs6,strs9,amti,amtj,gamma ++ real(8) gammi,gammj,dli,dlj ++ ++ dimension stresh(9) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ ++c constraint virial ++ ++ vircon=0.d0 ++ ++c accumulators for stress tensor ++ ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c test size of work arrays ++ ++ check=.true. ++ if(mxxdf.lt.nscons)check=.false. ++ if(mxnode.gt.1)call gstate(check) ++ if(.not.check)call error(idnode,412) ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ safe=.false. ++ ++ do while(.not.safe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate temporary bond vector ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c calculate maximum error in bondlength ++ ++ esig=0.d0 ++ ++ do k=1,nscons ++ ++c set bond parameter ++ ++ dx=dxt(k) ++ dy=dyt(k) ++ dz=dzt(k) ++ dis=prmcon(listcon(k,1)) ++ esig=max(esig,abs(dx*dx+dy*dy+dz*dz-dis*dis)/dis) ++ ++ enddo ++ ++ esig=esig*0.5d0 ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++c bypass calculations if all tolerances satisfied ++ ++ if(.not.safe)then ++ ++c initialise increment arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint forces ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c set constraint parameters ++ ++ dis=prmcon(listcon(k,1)) ++ omega2= dis*dis ++ amti= tstep*rmass(i) ++ amtj=-tstep*rmass(j) ++ ++c constraint force parameter ++ ++ dx=dxt(k) ++ dy=dyt(k) ++ dz=dzt(k) ++ ++ gamma=(omega2-(dx*dx+dy*dy+dz*dz))/ ++ x (-tstep*(amti-amtj)*(dxx(k)*dx+dyy(k)*dy+dzz(k)*dz)) ++ ++c accumulate bond virial ++ ++ vircon=vircon+gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ ++ strs1=strs1-gamma*dxx(k)*dxx(k) ++ strs2=strs2-gamma*dxx(k)*dyy(k) ++ strs3=strs3-gamma*dxx(k)*dzz(k) ++ strs5=strs5-gamma*dyy(k)*dyy(k) ++ strs6=strs6-gamma*dyy(k)*dzz(k) ++ strs9=strs9-gamma*dzz(k)*dzz(k) ++ ++c improve approximate constraint force ++ ++ gammi=-0.5d0*gamma*amti ++ xxt(i)=xxt(i)+dxx(k)*gammi ++ yyt(i)=yyt(i)+dyy(k)*gammi ++ zzt(i)=zzt(i)+dzz(k)*gammi ++ ++ gammj=-0.5d0*gamma*amtj ++ xxt(j)=xxt(j)+dxx(k)*gammj ++ yyt(j)=yyt(j)+dyy(k)*gammj ++ zzt(j)=zzt(j)+dzz(k)*gammj ++ ++ enddo ++ ++c sum up constraint forces across nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov)call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.0d0/dble(listme(i)) ++ dlj=1.0d0/dble(listme(j)) ++ ++ xxx(i)=xxx(i)+tstep*dli*xxt(i) ++ yyy(i)=yyy(i)+tstep*dli*yyt(i) ++ zzz(i)=zzz(i)+tstep*dli*zzt(i) ++ xxx(j)=xxx(j)+tstep*dlj*xxt(j) ++ yyy(j)=yyy(j)+tstep*dlj*yyt(j) ++ zzz(j)=zzz(j)+tstep*dlj*zzt(j) ++ ++ vxx(i)=vxx(i)+dli*xxt(i) ++ vzz(i)=vzz(i)+dli*zzt(i) ++ vyy(i)=vyy(i)+dli*yyt(i) ++ vxx(j)=vxx(j)+dlj*xxt(j) ++ vyy(j)=vyy(j)+dlj*yyt(j) ++ vzz(j)=vzz(j)+dlj*zzt(j) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c error exit for non-convergence ++ ++ if(.not.safe)return ++ ++c complete stress tensor ++ ++ stresh(1)=strs1 ++ stresh(2)=strs2 ++ stresh(3)=strs3 ++ stresh(4)=strs2 ++ stresh(5)=strs5 ++ stresh(6)=strs6 ++ stresh(7)=strs3 ++ stresh(8)=strs6 ++ stresh(9)=strs9 ++ ++c splice coordinate arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(stresh,9,buffer) ++ call splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ call splice ++ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++ return ++ end subroutine rdrattle_r ++ ++ subroutine rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for applying a bond constraints to ++c the velocities of the constrained atoms using the rattle ++c procedure (replicated data version) ++c ++c copyright - daresbury laboratory ++c author w.smith october 2002 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical safe ++ integer idnode,mxnode,natms,nscons,icyc ++ integer i,j,k ++ real(8) tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt ++ real(8) esig,amti,amtj,gamma,gammi,gammj,dli,dlj,tolvel ++ ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ ++c constraint convergence tolerance ++ ++ tolvel=tolnce/tstep ++ ++c start of rattle cycle ++ ++ icyc=0 ++ safe=.false. ++ ++ do while(.not.safe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c initialise velocity correction arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate velocity constraint corrections ++ ++ esig=0.d0 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ amti= 0.5d0*tstep*rmass(i) ++ amtj=-0.5d0*tstep*rmass(j) ++ ++c calculate constraint force parameter ++ ++ gamma=(dxx(k)*(vxx(i)-vxx(j))+dyy(k)*(vyy(i)-vyy(j))+ ++ x dzz(k)*(vzz(i)-vzz(j)))/((amti-amtj)* ++ x (dxx(k)**2+dyy(k)**2+dzz(k)**2)) ++ esig=max(esig,abs(gamma)) ++ ++c improve approximate constraint force ++ ++ gammi=-gamma*amti ++ xxt(i)=xxt(i)+gammi*dxx(k) ++ yyt(i)=yyt(i)+gammi*dyy(k) ++ zzt(i)=zzt(i)+gammi*dzz(k) ++ gammj=-gamma*amtj ++ xxt(j)=xxt(j)+gammj*dxx(k) ++ yyt(j)=yyt(j)+gammj*dyy(k) ++ zzt(j)=zzt(j)+gammj*dzz(k) ++ ++ enddo ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolvel) ++ if(mxnode.gt.1)then ++ ++ call gstate(safe) ++ ++ endif ++ ++c terminate iteration if constraints satisfied ++ ++ if(.not.safe)then ++ ++c transport velocity adjustments to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++c update velocities ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ vxx(i)=vxx(i)+dli*xxt(i) ++ vyy(i)=vyy(i)+dli*yyt(i) ++ vzz(i)=vzz(i)+dli*zzt(i) ++ dlj=1.d0/dble(listme(j)) ++ vxx(j)=vxx(j)+dlj*xxt(j) ++ vyy(j)=vyy(j)+dlj*yyt(j) ++ vzz(j)=vzz(j)+dlj*zzt(j) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c error exit if rattle fails ++ ++ if(.not.safe)return ++ ++c splice velocity arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ call splice ++ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++ return ++ end subroutine rdrattle_v ++ ++ subroutine nvevv_1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x tstep,engke,tolnce,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c nve ensemble ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=4 ++ ++ logical safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,i,j,k ++ integer iatm0,iatm1 ++ real(8) tstep,engke,tolnce,vircon ++ integer fail(nnn) ++ real(8) strkin(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++ safe=.true. ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1980) ++ enddo ++ ++ endif ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ if(ntcons.gt.0) ++ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c update velocities for first and second stages ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) ++ ++ endif ++ ++ return ++ end subroutine nvevv_1 ++ ++ subroutine nvtvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x tstep,taut,sigma,engke,tolnce,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c nvt ensemble - Berendsen thermostat (n.b. not symplectic) ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=4 ++ ++ logical safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons ++ integer i,j,k,iatm0,iatm1 ++ real(8) tstep,taut,sigma,engke,tolnce,vircon,chit ++ integer fail(nnn) ++ real(8) strkin(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++ safe=.true. ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1990) ++ enddo ++ ++ endif ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ if(ntcons.gt.0) ++ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c first pass of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c second pass of velocity verlet algorithm ++ ++ else ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ enddo ++ ++ engke=engke*chit**2 ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz, ++ x buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) ++ ++ endif ++ ++ return ++ end subroutine nvtvv_b1 ++ ++ subroutine nvtvv_e1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x tstep,engke,tolnce,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c nvt ensemble - evans thermostat ++c Comp. Phys. reports 1, 299, (1984) ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=4 ++ ++ logical safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons ++ integer i,j,k,iatm0,iatm1 ++ real(8) tstep,engke,tolnce,vircon,vdotf,scale,chit ++ integer fail(nnn) ++ real(8) strkin(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++ safe=.true. ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2000) ++ enddo ++ ++ endif ++ ++ if(ntcons.eq.0)safe=.true. ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ if(ntcons.gt.0) ++ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy and evans thermostat parameter ++ ++ engke=0.d0 ++ vdotf=0.d0 ++ do i=iatm0,iatm1 ++ ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ buffer(2)=vdotf ++ call gdsum(buffer(1),2,buffer(3)) ++ engke=buffer(1) ++ vdotf=buffer(2) ++ ++ endif ++ engke=0.5d0*engke ++ chit=0.5d0*vdotf/engke ++ ++c thermostat the velocities ++ ++ scale=(1.d0-0.5d0*tstep*chit) ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate kinetic energy and evans thermostat parameter ++ ++ engke=0.d0 ++ vdotf=0.d0 ++ do i=iatm0,iatm1 ++ ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ buffer(2)=vdotf ++ call gdsum(buffer(1),2,buffer(3)) ++ engke=buffer(1) ++ vdotf=buffer(2) ++ ++ endif ++ engke=0.5d0*engke ++ chit=0.5d0*vdotf/engke ++ scale=(1.d0-0.5d0*tstep*chit) ++ ++c scale velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++ engke=engke*scale**2 ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) ++ ++ endif ++ ++ return ++ end subroutine nvtvv_e1 ++ ++ subroutine nvtvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x ntshl,keyshl,tstep,taut,sigma,chit,consv,conint,engke, ++ x tolnce,vircon,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c nvt ensemble - nose-hoover thermostat ++c Molecular Physics 87 (1996) 1117 ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=4 ++ ++ logical safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons ++ integer i,j,k,iatm0,iatm1 ++ real(8) tstep,taut,sigma,chit,consv,conint,engke,tolnce,vircon ++ real(8) hstep,qmass ++ integer fail(nnn) ++ real(8) strkin(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ safe=.true. ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2010) ++ enddo ++ ++ endif ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ hstep=0.5d0*tstep ++ qmass=2.d0*sigma*taut**2 ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ if(ntcons.gt.0) ++ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c integrate and apply nvt thermostat ++ ++ call nvtscale ++ x (idnode,mxnode,natms,engke,sigma,hstep,qmass,taut, ++ x chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c integrate and apply nvt thermostat ++ ++ call nvtscale ++ x (idnode,mxnode,natms,engke,sigma,hstep,qmass,taut, ++ x chit,conint) ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ consv=conint+0.5d0*qmass*chit**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) ++ ++ endif ++ ++ return ++ end subroutine nvtvv_h1 ++ ++ subroutine nptvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,tstep,taut,taup,sigma,engke,press,elrc, ++ x virlrc,tolnce,virtot,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c npt ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith december 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical newjob,safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm ++ integer i,j,k,iatm0,iatm1,mxiter,iter,kk ++ real(8) tstep,taut,taup,sigma,engke,press,elrc,virlrc,tolnce ++ real(8) virtot,vircon,volm,volm0,elrc0,virlrc0,psyst ++ real(8) chit,chip,scale,beta ++ ++ integer fail(nnn) ++ real(8) strkin(9),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./,beta/7.3728d-3/ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2020) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(4)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(5)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(6)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(7)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2030) ++ enddo ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ do i=iatm0,iatm1 ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++ endif ++ ++c iteration required if ntcons > 0 and isw = 1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++ scale=1.d0 ++ ++ if(iter.eq.mxiter)then ++ ++c calculate system pressure ++ ++ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) ++ ++c apply Berendsen barostat taup is relaxation time ++ ++ chip=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip**(1.d0/3.d0) ++ volm=chip*volm ++ ++c reset cell parameters for new volume ++ ++ do i=1,9 ++ cell(i)=scale*cell(i) ++ enddo ++ ++ endif ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=scale*xxx(i)+tstep*vxx(i) ++ yyy(i)=scale*yyy(i)+tstep*vyy(i) ++ zzz(i)=scale*zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++ if(iter.lt.mxiter)then ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor for tethered bonds ++ ++ do i=1,9 ++ eta(i)=scale*uni(i) ++ enddo ++ ++c second pass of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c apply Berendsen thermostat taut is relaxation time ++ ++ engke=getkin(natms,idnode,mxnode) ++ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nptvv_b1 ++ ++ subroutine nptvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x ntpatm,ntshl,keyshl,tstep,taut,taup,sigma,temp,chip,chit, ++ x consv,conint,engke,elrc,tolnce,vircon,virtot,virlrc,volm, ++ x press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c npt ensemble - Melchionna, Ciccotti and Holian ++c Molecular Physics 78 (1993) 533 ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith november 2002 ++c amended - w. smith january 2005: f90 conversion ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ integer, parameter :: ncyc=5 ++ ++ logical safe,lshmov,newjob ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm ++ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,icyc ++ real(8) tstep,taup,taut,sigma,temp,chip,chit,consv,conint ++ real(8) engke,elrc,tolnce,vircon,virtot,virlrc,volm,press ++ real(8) volm0,elrc0,virlrc0,hstep,qstep,totmas,qmass,pmass ++ real(8) vzero,chit0,chip0,cons0,scale,fstep ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ integer fail(nnn) ++ real(8) cell0(9),com(3),vom(3),strkin(9),uni(9) ++ ++ save newjob,totmas,volm0,elrc0,virlrc0,dens0 ++ save cell0,iatm0,iatm1,hstep,qstep,fstep,pmass,qmass ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2040) ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c inertia parameter for Nose-Hoover thermostat and barostat ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2050) ++ enddo ++ ++ endif ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metdynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c store current integration variables if ntcons > 0 ++ ++ if(ntcons.gt.0)then ++ ++ vzero=volm ++ chit0=chit ++ chip0=chip ++ cons0=conint ++ do i=iatm0,iatm1 ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++ endif ++ ++c iteration necessary if ntcons > 0 and isw = 1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++c volume integration parameter ++ ++ do icyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, ++ x taut,chip,chit,conint) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptscale_p ++ x (idnode,mxnode,natms,engke,fstep,pmass,chip,chit, ++ x volm,press,vircon,virtot) ++ ++c integrate and apply npt thermostat ++ ++ call nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, ++ x taut,chip,chit,conint) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c update positions ++ ++ scale=exp(tstep*chip) ++ do i=iatm0,iatm1 ++ ++ xxx(i)=scale*(xxx(i)-com(1))+tstep*vxx(i)+com(1) ++ yyy(i)=scale*(yyy(i)-com(2))+tstep*vyy(i)+com(2) ++ zzz(i)=scale*(zzz(i)-com(3))+tstep*vzz(i)+com(3) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c restore original integration parameters if iter < mxiter ++ ++ if(iter.lt.mxiter)then ++ ++ volm=vzero ++ chit=chit0 ++ chip=chip0 ++ conint=cons0 ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++ do icyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, ++ x taut,chip,chit,conint) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptscale_p ++ x (idnode,mxnode,natms,engke,fstep,pmass,chip,chit, ++ x volm,press,vircon,virtot) ++ ++c integrate and apply npt thermostat ++ ++ call nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, ++ x taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ consv=conint+0.5d0*qmass*chit**2+ ++ x 0.5d0*pmass*chip**2+press*volm ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor (for tethered atoms) ++ ++ do i=1,9 ++ eta(i)=chip*uni(i) ++ enddo ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nptvv_h1 ++ ++ subroutine nstvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,mode,tstep,taut,taup,sigma,engke,press,elrc, ++ x virlrc,tolnce,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c anisotropic npt ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith december 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical newjob,safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm ++ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,mode ++ real(8) tstep,taut,taup,sigma,engke,press,elrc,virlrc,tolnce,beta ++ real(8) vircon,volm,volm0,elrc0,virlrc0,chit ++ real(8) xtmp,ytmp,ztmp ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ integer fail(nnn) ++ real(8) uni(9),strkin(9),celp(10) ++ ++ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./,beta/7.3728d-3/ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2060) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(4)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(5)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(6)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(7)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2070) ++ enddo ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c extract previous constraint terms from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ do i=iatm0,iatm1 ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++ endif ++ ++c iteration required if ntcons > 0 and isw = 1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++c zero scaling matrix ++ ++ do i=1,9 ++ eta(i)=uni(i) ++ enddo ++ ++ if(iter.eq.mxiter)then ++ ++c calculate Berendsen barostat - taup is relaxation time ++ ++ do i=1,9 ++ eta(i)=tstep*beta*(stress(i)+strcns(i)- ++ x press*volm*uni(i))/(taup*volm)+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c reset cell parameters for new volume ++ ++ call mat_mul(eta,cell,cell) ++ ++c calculate new volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++ endif ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xtmp=eta(1)*xxx(i)+eta(4)*yyy(i)+eta(7)*zzz(i) ++ ytmp=eta(2)*xxx(i)+eta(5)*yyy(i)+eta(8)*zzz(i) ++ ztmp=eta(3)*xxx(i)+eta(6)*yyy(i)+eta(9)*zzz(i) ++ xxx(i)=tstep*vxx(i)+xtmp ++ yyy(i)=tstep*vyy(i)+ytmp ++ zzz(i)=tstep*vzz(i)+ztmp ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++ if(iter.lt.mxiter)then ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c second pass of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c apply Berendsen thermostat taut is relaxation time ++ ++ engke=getkin(natms,idnode,mxnode) ++ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxo,yyo,zzo,stat=fail(1)) ++ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nstvv_b1 ++ ++ subroutine nstvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x ntpatm,mode,ntshl,keyshl,tstep,taut,taup,sigma,temp,chit, ++ x consv,conint,engke,elrc,tolnce,vircon,virlrc,volm,press, ++ x chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c anisotropic npt ensemble - Melchionna, Ciccotti and Holian ++c Molecular Physics 78 (1993) 533 ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith november 2002 ++c amended - w. smith january 2005 : f90 conversion ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ integer, parameter :: ncyc=5 ++ ++ logical safe,lshmov,newjob ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm ++ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,icyc,mode ++ real(8) tstep,taup,taut,sigma,temp,chit,consv,conint,chit0 ++ real(8) engke,elrc,tolnce,vircon,virlrc,volm,press,volm0 ++ real(8) elrc0,virlrc0,hstep,qstep,totmas,qmass,pmass ++ real(8) cons0,cxx,cyy,czz,chip2,fstep ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ integer fail(nnn) ++ real(8) com(3),vom(3),czero(9),strkin(9),eta0(9),celp(10) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metdynamics shell thermostat variables ++ ++ data newjob/.true./ ++ ++ save newjob,totmas,volm0,elrc0,virlrc0,dens0 ++ save iatm0,iatm1,hstep,qstep,pmass,qmass,fstep ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2080) ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c system total mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c inertia parameter for Nose-Hoover thermostat and barostat ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2090) ++ enddo ++ ++ endif ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metdynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ chit0=chit ++ cons0=conint ++ do i=1,9 ++ ++ czero(i)=cell(i) ++ eta0(i)=eta(i) ++ ++ enddo ++ do i=iatm0,iatm1 ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++ endif ++ ++c subtract kinetic terms from stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ do i=1,9 ++ stress(i)=stress(i)-strkin(i) ++ enddo ++ ++c iteration necessary if ntcons > 0 and isw = 1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++c calculate current volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++ do icyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstscale_p ++ x (idnode,mxnode,natms,mode,fstep,pmass,chit,press,volm) ++ ++c integrate and apply nst thermostat ++ ++ call nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ cxx=xxx(i)-com(1) ++ cyy=yyy(i)-com(2) ++ czz=zzz(i)-com(3) ++ ++ xxx(i)=xxx(i)+ ++ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ yyy(i)=yyy(i)+ ++ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ zzz(i)=zzz(i)+ ++ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c subtract old constraint terms from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++c correct constraint bonds using rattle ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++c add new constraint terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c restore original integration parameters if iter < mxiter ++ ++ if(iter.lt.mxiter)then ++ ++ chit=chit0 ++ conint=cons0 ++ do i=1,9 ++ ++ cell(i)=czero(i) ++ eta(i)=eta0(i) ++ ++ enddo ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c add constraint terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i) ++ enddo ++ ++c correct constraint bond velocities using rattle ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++ do icyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstscale_p ++ x (idnode,mxnode,natms,mode,fstep,pmass,chit,press,volm) ++ ++c integrate and apply nst thermostat ++ ++ call nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nstvv_h1 ++ ++ end module vv_motion_module ++ +diff -urN dl_class_1.9.orig/srcmod/vv_rotation1_module.f dl_class_1.9/srcmod/vv_rotation1_module.f +--- dl_class_1.9.orig/srcmod/vv_rotation1_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/vv_rotation1_module.f 2011-02-22 12:46:30.000000000 +0100 +@@ -0,0 +1,4701 @@ ++ module vv_rotation1_module ++ ++c*********************************************************************** ++c ++c dl_poly module 1 for velocity verlet rotational integration ++c schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use metafreeze_module, only : lmetadyn ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use vv_motion_module ++ use utility_module ++ ++ contains ++ ++ subroutine rotate_omega ++ x (idnode,mxnode,ngrp,tstep,p0,p1,p2,p3,dtx,dty,dtz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for updating the angular velocity and momentum ++c for rigid bodies ++c ++c copyright - daresbury laboratory ++c author - w. smith sept 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,ngrp,i,j,jr,jrs,ig,igrp1,igrp2,id ++ real(8) ftx,fty,ftz,fmx,fmy,fmz,tstep,tqx,tqy,tqz,tq0,tq1,tq2,tq3 ++ ++ real(8) p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp) ++ real(8) dtx(mxatms),dty(mxatms),dtz(mxatms),rot(9) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ tq1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ tq2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ tq3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=p0(ig)+tq0*tstep ++ p1(ig)=p1(ig)+tq1*tstep ++ p2(ig)=p2(ig)+tq2*tstep ++ p3(ig)=p3(ig)+tq3*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) ++ ++ enddo ++ ++ return ++ end subroutine rotate_omega ++ ++ subroutine nosquish(ig,tstep,qq0,qq1,qq2,qq3,pp0,pp1,pp2,pp3) ++ ++c*********************************************************************** ++c ++c dlpoly routine to implement the symplectic no_squish quaternion ++c algorithm of miller et al j.chem.phys 116 (2002) 8649 ++c ++c copyright daresbury laboratory ++c author m. leslie jan 2004 ++c amended w.smith mar 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer m,ig,id ++ real(8) zetax,zetay,zetaz,tstep,cs,sn,trstep ++ ++ integer, parameter :: mrot=10 ++ real(8), parameter :: ov4=0.25d0 ++ real(8), parameter :: ov8=0.125d0 ++ ++ real(8) qq0(*),qq1(*),qq2(*),qq3(*) ++ real(8) pp0(*),pp1(*),pp2(*),pp3(*) ++ ++ real(8) qn1(0:3),pq2(0:3),qn2(0:3),pq3(0:3) ++ real(8) qn3(0:3),pq4(0:3) ++ ++c rotational time step ++ ++ trstep=tstep/dble(mrot) ++ ++c rotation: iterate over mrot rotational time steps ++ ++ id=lstgtp(ig) ++ ++ do m=1,mrot ++ ++ zetaz=ov8*rotinz(id,2)*trstep* ++ x (-pp0(ig)*qq3(ig)+pp1(ig)*qq2(ig)- ++ x pp2(ig)*qq1(ig)+pp3(ig)*qq0(ig)) ++ cs=cos(zetaz) ++ sn=sin(zetaz) ++ qn1(0)=cs*qq0(ig)-sn*qq3(ig) ++ qn1(1)=cs*qq1(ig)+sn*qq2(ig) ++ qn1(2)=cs*qq2(ig)-sn*qq1(ig) ++ qn1(3)=cs*qq3(ig)+sn*qq0(ig) ++ pq2(0)=cs*pp0(ig)-sn*pp3(ig) ++ pq2(1)=cs*pp1(ig)+sn*pp2(ig) ++ pq2(2)=cs*pp2(ig)-sn*pp1(ig) ++ pq2(3)=cs*pp3(ig)+sn*pp0(ig) ++ ++ zetay=ov8*rotiny(id,2)*trstep* ++ x (-pq2(0)*qn1(2)-pq2(1)*qn1(3)+ ++ x pq2(2)*qn1(0)+pq2(3)*qn1(1)) ++ cs=cos(zetay) ++ sn=sin(zetay) ++ qn2(0)=cs*qn1(0)-sn*qn1(2) ++ qn2(1)=cs*qn1(1)-sn*qn1(3) ++ qn2(2)=cs*qn1(2)+sn*qn1(0) ++ qn2(3)=cs*qn1(3)+sn*qn1(1) ++ pq3(0)=cs*pq2(0)-sn*pq2(2) ++ pq3(1)=cs*pq2(1)-sn*pq2(3) ++ pq3(2)=cs*pq2(2)+sn*pq2(0) ++ pq3(3)=cs*pq2(3)+sn*pq2(1) ++ ++ zetax=ov4*rotinx(id,2)*trstep* ++ x (-pq3(0)*qn2(1)+pq3(1)*qn2(0)+ ++ x pq3(2)*qn2(3)-pq3(3)*qn2(2)) ++ cs=cos(zetax) ++ sn=sin(zetax) ++ qn3(0)=cs*qn2(0)-sn*qn2(1) ++ qn3(1)=cs*qn2(1)+sn*qn2(0) ++ qn3(2)=cs*qn2(2)+sn*qn2(3) ++ qn3(3)=cs*qn2(3)-sn*qn2(2) ++ pq4(0)=cs*pq3(0)-sn*pq3(1) ++ pq4(1)=cs*pq3(1)+sn*pq3(0) ++ pq4(2)=cs*pq3(2)+sn*pq3(3) ++ pq4(3)=cs*pq3(3)-sn*pq3(2) ++ ++ zetay=ov8*rotiny(id,2)*trstep* ++ x (-pq4(0)*qn3(2)-pq4(1)*qn3(3)+ ++ x pq4(2)*qn3(0)+pq4(3)*qn3(1)) ++ cs=cos(zetay) ++ sn=sin(zetay) ++ qn2(0)=cs*qn3(0)-sn*qn3(2) ++ qn2(1)=cs*qn3(1)-sn*qn3(3) ++ qn2(2)=cs*qn3(2)+sn*qn3(0) ++ qn2(3)=cs*qn3(3)+sn*qn3(1) ++ pq3(0)=cs*pq4(0)-sn*pq4(2) ++ pq3(1)=cs*pq4(1)-sn*pq4(3) ++ pq3(2)=cs*pq4(2)+sn*pq4(0) ++ pq3(3)=cs*pq4(3)+sn*pq4(1) ++ ++ zetaz=ov8*rotinz(id,2)*trstep* ++ x (-pq3(0)*qn2(3)+pq3(1)*qn2(2)- ++ x pq3(2)*qn2(1)+pq3(3)*qn2(0)) ++ cs=cos(zetaz) ++ sn=sin(zetaz) ++ qq0(ig)=cs*qn2(0)-sn*qn2(3) ++ qq1(ig)=cs*qn2(1)+sn*qn2(2) ++ qq2(ig)=cs*qn2(2)-sn*qn2(1) ++ qq3(ig)=cs*qn2(3)+sn*qn2(0) ++ pp0(ig)=cs*pq3(0)-sn*pq3(3) ++ pp1(ig)=cs*pq3(1)+sn*pq3(2) ++ pp2(ig)=cs*pq3(2)-sn*pq3(1) ++ pp3(ig)=cs*pq3(3)+sn*pq3(0) ++ ++ enddo ++ ++ return ++ end subroutine nosquish ++ ++ subroutine nveqvv_1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author m. leslie jan 2004 ++c amended w.smith jan 2005: f90 conversion ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr ++ integer id,ifre,jrs,idum,ig ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) tqx,tqy,tqz,ftx,fty,ftz ++ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz ++ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,engfke ++ ++ integer, parameter :: nnn=6 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ ++ save newjob,p0,p1,p2,p3 ++ ++ data newjob/.true./ ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2100) ++ enddo ++ ++ newjob=.false. ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++c operations common to first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*pt5*tstep ++ p1(ig)=p1(ig)+qt1*pt5*tstep ++ p2(ig)=p2(ig)+qt2*pt5*tstep ++ p3(ig)=p3(ig)+qt3*pt5*tstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c merge centre of mass velocities from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) ++ ++ enddo ++ ++c merge centre of mass position from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nveqvv_1 ++ ++ subroutine nvtqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, ++ x vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c nvt ensemble - Berendsen thermostat (n.b. not symplectic) ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith mar 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr ++ integer id,ifre,jrs,idum,ig,iatm0,iatm1 ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) tqx,tqy,tqz,ftx,fty,ftz ++ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz ++ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke ++ real(8) chit,engfke ++ ++ integer, parameter :: nnn=6 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ ++ save newjob,p0,p1,p2,p3 ++ ++ data newjob/.true./ ++ ++c atom block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2120) ++ enddo ++ ++ newjob=.false. ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++c operations common to first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*pt5*tstep ++ p1(ig)=p1(ig)+qt1*pt5*tstep ++ p2(ig)=p2(ig)+qt2*pt5*tstep ++ p3(ig)=p3(ig)+qt3*pt5*tstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algoritm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities ++ ++ do i=iatm0,iatm1 ++ ++ if(lstfrz(i).eq.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c exchange position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c merge group velocities from all processors ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nvtqvv_b1 ++ ++ subroutine nvtqvv_h1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke,engrot, ++ x taut,sigma,tolnce,tstep,vircom,vircon,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c nvt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith april 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=6 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr ++ integer id,ig,ifre,jrs,idum ++ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep ++ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn ++ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc ++ real(8) engfke ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newjob,p0,p1,p2,p3 ++ ++ data newjob/.true./ ++ ++c timestep parameters ++ ++ hstep=pt5*tstep ++ ++c nose-hoover inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2140) ++ enddo ++ ++ newjob=.false. ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c apply thermostat for first stage ++ ++ if(isw.eq.1)then ++ ++ call nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x hstep,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ endif ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++c operations common to first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*hstep ++ p1(ig)=p1(ig)+qt1*hstep ++ p2(ig)=p2(ig)+qt2*hstep ++ p3(ig)=p3(ig)+qt3*hstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algoritm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c apply thermostat for second stage and calculate kinetic energy ++ ++ call nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x hstep,qmass,taut,chit,conint) ++ ++ engke=engfke+engtrn ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ consv=conint+0.5d0*qmass*chit**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c merge group velocities from all processors ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nvtqvv_h1 ++ ++ subroutine nptqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c npt ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith april 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr,kk ++ integer id,ifre,jrs,idum,ig,iatm0,iatm1,ntpatm,iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) tqx,tqy,tqz,ftx,fty,ftz ++ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz ++ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke ++ real(8) chit,chip,beta,volm,volm0,elrc,elrc0,virlrc,virlrc0 ++ real(8) virtot,psyst,press,taup,scale,engfke ++ ++ integer, parameter :: nnn=11 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ ++ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./,beta/7.3728d-3/ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2160) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c atom block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ if(isw.eq.1)then ++ ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(6)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(7)) ++ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp),stat=fail(8)) ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(10)) ++ ++ endif ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(11)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2170) ++ enddo ++ ++ newjob=.false. ++ if(ntcons.gt.0)safe=.false. ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn ++ ++c calculate quaternion momenta at start of time step ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c rigid body motion for first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*pt5*tstep ++ p1(ig)=p1(ig)+qt1*pt5*tstep ++ p2(ig)=p2(ig)+qt2*pt5*tstep ++ p3(ig)=p3(ig)+qt3*pt5*tstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ c0(ig)=p0(ig) ++ c1(ig)=p1(ig) ++ c2(ig)=p2(ig) ++ c3(ig)=p3(ig) ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ ++ enddo ++ ++ endif ++ ++c iteration required if ntcons > 0 ++ ++ mxiter=1 ++ if(ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++ scale=1.d0 ++ ++ if(iter.eq.mxiter)then ++ ++c calculate system pressure ++ ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ ++c apply Berendsen barostat ++ ++ chip=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip**(1.d0/3.d0) ++ volm=chip*volm ++ ++c reset cell parameters for new volume ++ ++ do i=1,9 ++ cell(i)=scale*cell(i) ++ enddo ++ ++ endif ++ ++c update centre of mass position ++ ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=scale*gcmx(ig)+tstep*gvxx(ig) ++ gcmy(ig)=scale*gcmy(ig)+tstep*gvyy(ig) ++ gcmz(ig)=scale*gcmz(ig)+tstep*gvzz(ig) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=gcmx(ig)+ ++ x rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ yyy(i)=gcmy(ig)+ ++ x rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ zzz(i)=gcmz(ig)+ ++ x rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=scale*xxx(i)+tstep*vxx(i) ++ yyy(i)=scale*yyy(i)+tstep*vyy(i) ++ zzz(i)=scale*zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++ if(iter.lt.mxiter)then ++ ++ do i=1,natms ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ p0(ig)=c0(ig) ++ p1(ig)=c1(ig) ++ p2(ig)=c2(ig) ++ p3(ig)=c3(ig) ++ gcmx(ig)=gxo(ig) ++ gcmy(ig)=gyo(ig) ++ gcmz(ig)=gzo(ig) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor for tethered bonds ++ ++ do i=1,9 ++ eta(i)=scale*uni(i) ++ enddo ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities ++ ++ do i=iatm0,iatm1 ++ ++ if(lstfrz(i).eq.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c merge group velocities from all processors ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ if(isw.eq.1)then ++ ++ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,c0,c1,c2,c3,stat=fail(5)) ++ deallocate(gxo,gyo,gzo,stat=fail(6)) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine nptqvv_b1 ++ ++ subroutine nptqvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircon,virtot,virlrc,vircom,volm,press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c npt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith may 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ integer, parameter :: ncyc=5 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr ++ integer id,ig,ifre,jrs,idum,mxiter,iter,ntpatm,kk,icyc ++ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep ++ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn ++ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc ++ real(8) taup,temp,press,virtot,vzero,chit0,chip0,cons0 ++ real(8) chip,volm,elrc,elrc0,virlrc,virlrc0,qstep,pmass,totmas ++ real(8) volm0,scale,cxx,cyy,czz,engfke,fstep ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),cell0(9),com(3),vom(3),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: oxo(:),oyo(:),ozo(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newjob,hstep,qstep,fstep,pmass,qmass ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,volm0,elrc0,virlrc0 ++ save totmas,dens0,cell0 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2200) ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c nose-hoover thermostat and barostat inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ ++ if(ntcons.gt.0)then ++ ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(2)) ++ allocate(oxo(mxgrp),oyo(mxgrp),ozo(mxgrp),stat=fail(3)) ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(4)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(5)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(9)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(10)) ++ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(11)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(12)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2210) ++ enddo ++ ++ newjob=.false. ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=1,natms ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=1,ngrp ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store current integration variables if ntcons > 0 ++ ++ if(ntcons.gt.0)then ++ ++ vzero=volm ++ chit0=chit ++ chip0=chip ++ cons0=conint ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ oxo(ig)=omx(ig) ++ oyo(ig)=omy(ig) ++ ozo(ig)=omz(ig) ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ gvxo(ig)=gvxx(ig) ++ gvyo(ig)=gvyy(ig) ++ gvzo(ig)=gvzz(ig) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c iteration necessary if ntcons > 0 and isw=1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++ if(isw.eq.1)then ++ ++ do icyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++ engke=engfke+engtrn ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c calculate quaternion momenta ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*hstep ++ p1(ig)=p1(ig)+qt1*hstep ++ p2(ig)=p2(ig)+qt2*hstep ++ p3(ig)=p3(ig)+qt3*hstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ cxx=gcmx(ig)-com(1) ++ cyy=gcmy(ig)-com(2) ++ czz=gcmz(ig)-com(3) ++ gcmx(ig)=gcmx(ig)+tstep*(gvxx(ig)+chip*cxx) ++ gcmy(ig)=gcmy(ig)+tstep*(gvyy(ig)+chip*cyy) ++ gcmz(ig)=gcmz(ig)+tstep*(gvzz(ig)+chip*czz) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ cxx=xxx(i)-com(1) ++ cyy=yyy(i)-com(2) ++ czz=zzz(i)-com(3) ++ xxx(i)=xxx(i)+tstep*(vxx(i)+chip*cxx) ++ yyy(i)=yyy(i)+tstep*(vyy(i)+chip*cyy) ++ zzz(i)=zzz(i)+tstep*(vzz(i)+chip*czz) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c restore original integration parameters if iter < mxiter ++ ++ if(iter.lt.mxiter)then ++ ++ volm=vzero ++ chit=chit0 ++ chip=chip0 ++ conint=cons0 ++ do i=1,natms ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ omx(ig)=oxo(ig) ++ omy(ig)=oyo(ig) ++ omz(ig)=ozo(ig) ++ gcmx(ig)=gxo(ig) ++ gcmy(ig)=gyo(ig) ++ gcmz(ig)=gzo(ig) ++ gvxx(ig)=gvxo(ig) ++ gvyy(ig)=gvyo(ig) ++ gvzz(ig)=gvzo(ig) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c operations for second stage only ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ do icyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++ engke=engfke+engtrn ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c calculate conserved variable ++ ++ consv=conint+0.5d0*qmass*chit**2+press*volm ++ x +0.5d0*pmass*chip**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c end of iteration cycle ++ ++ enddo ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor (for tethered atoms) ++ ++ do i=1,9 ++ eta(i)=chip*uni(i) ++ enddo ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,oxo,oyo,ozo,stat=fail(5)) ++ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(6)) ++ deallocate(gxo,gyo,gzo,gvxo,gvyo,gvzo,stat=fail(7)) ++ ++ endif ++ ++ return ++ end subroutine nptqvv_h1 ++ ++ subroutine nstqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c nst ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith may 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr,kk,mode ++ integer id,ifre,jrs,idum,ig,iatm0,iatm1,ntpatm,iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engfke ++ real(8) tqx,tqy,tqz,ftx,fty,ftz ++ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz ++ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke ++ real(8) chit,beta,volm,volm0,elrc,elrc0,virlrc,virlrc0 ++ real(8) press,taup,xtmp,ytmp,ztmp ++ ++ integer, parameter :: nnn=11 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ real(8) celp(10),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ ++ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data newjob/.true./,beta/7.3728d-3/ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2240) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c atom block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ if(isw.eq.1)then ++ ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(6)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(7)) ++ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp),stat=fail(8)) ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(10)) ++ ++ endif ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(11)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2250) ++ enddo ++ ++ newjob=.false. ++ if(ntcons.gt.0)safe=.false. ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn ++ ++c calculate quaternion momenta at start of time step ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c rigid body motion for first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*pt5*tstep ++ p1(ig)=p1(ig)+qt1*pt5*tstep ++ p2(ig)=p2(ig)+qt2*pt5*tstep ++ p3(ig)=p3(ig)+qt3*pt5*tstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ c0(ig)=p0(ig) ++ c1(ig)=p1(ig) ++ c2(ig)=p2(ig) ++ c3(ig)=p3(ig) ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ ++ enddo ++ ++ endif ++ ++c extract previous constraint terms from stress tensor ++ ++ if(isw.eq.1)then ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++ endif ++ ++c iteration required if ntcons > 0 ++ ++ mxiter=1 ++ if(ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++c zero scaling matrix ++ ++ do i=1,9 ++ eta(i)=uni(i) ++ enddo ++ ++ if(iter.eq.mxiter)then ++ ++c calculate Berendsen barostat ++ ++ do i=1,9 ++ eta(i)=tstep*beta*(stress(i)+strcns(i)- ++ x press*volm*uni(i))/(taup*volm)+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c reset cell parameters for new volume ++ ++ call mat_mul(eta,cell,cell) ++ ++c calculate new volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++ endif ++ ++c update centre of mass position ++ ++ do ig=igrp1,igrp2 ++ ++ xtmp=eta(1)*gcmx(ig)+eta(4)*gcmy(ig)+eta(7)*gcmz(ig) ++ ytmp=eta(2)*gcmx(ig)+eta(5)*gcmy(ig)+eta(8)*gcmz(ig) ++ ztmp=eta(3)*gcmx(ig)+eta(6)*gcmy(ig)+eta(9)*gcmz(ig) ++ gcmx(ig)=tstep*gvxx(ig)+xtmp ++ gcmy(ig)=tstep*gvyy(ig)+ytmp ++ gcmz(ig)=tstep*gvzz(ig)+ztmp ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=gcmx(ig)+ ++ x rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ yyy(i)=gcmy(ig)+ ++ x rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ zzz(i)=gcmz(ig)+ ++ x rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=tstep*vxx(i)+ ++ x eta(1)*xxx(i)+eta(4)*yyy(i)+eta(7)*zzz(i) ++ yyy(i)=tstep*vyy(i)+ ++ x eta(2)*xxx(i)+eta(5)*yyy(i)+eta(8)*zzz(i) ++ zzz(i)=tstep*vzz(i)+ ++ x eta(3)*xxx(i)+eta(6)*yyy(i)+eta(9)*zzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++ if(iter.lt.mxiter)then ++ ++ do i=1,natms ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ p0(ig)=c0(ig) ++ p1(ig)=c1(ig) ++ p2(ig)=c2(ig) ++ p3(ig)=c3(ig) ++ gcmx(ig)=gxo(ig) ++ gcmy(ig)=gyo(ig) ++ gcmz(ig)=gzo(ig) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities ++ ++ do i=iatm0,iatm1 ++ ++ if(lstfrz(i).eq.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c merge group velocities from all processors ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ if(isw.eq.1)then ++ ++ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,c0,c1,c2,c3,stat=fail(5)) ++ deallocate(gxo,gyo,gzo,stat=fail(6)) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine nstqvv_b1 ++ ++ subroutine nstqvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, ++ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircon,virlrc,vircom,volm,press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c nst ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith may 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ integer, parameter :: ncyc=5 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr,mode ++ integer id,ig,ifre,jrs,idum,mxiter,iter,ntpatm,kk,icyc ++ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep ++ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn ++ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc ++ real(8) taup,temp,press,vzero,chit0,cons0 ++ real(8) chip2,volm,elrc,elrc0,virlrc,virlrc0,qstep,pmass,totmas ++ real(8) volm0,cxx,cyy,czz,engfke,fstep ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),com(3),vom(3) ++ real(8) czero(9),eta0(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: oxo(:),oyo(:),ozo(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newjob,hstep,qstep,fstep,pmass,qmass ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,volm0,elrc0,virlrc0 ++ save totmas,dens0 ++ ++ data newjob/.true./ ++ ++ safe=.true. ++ if(newjob)then ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2280) ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c nose-hoover thermostat and barostat inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(2)) ++ allocate(oxo(mxgrp),oyo(mxgrp),ozo(mxgrp),stat=fail(3)) ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(4)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(5)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(9)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(10)) ++ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(11)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(12)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2290) ++ enddo ++ ++ newjob=.false. ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=1,natms ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=1,ngrp ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store current integration variables if ntcons > 0 ++ ++ if(ntcons.gt.0)then ++ ++ vzero=volm ++ chit0=chit ++ cons0=conint ++ do i=1,9 ++ ++ eta0(i)=eta(i) ++ czero(i)=cell(i) ++ ++ enddo ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ oxo(ig)=omx(ig) ++ oyo(ig)=omy(ig) ++ ozo(ig)=omz(ig) ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ gvxo(ig)=gvxx(ig) ++ gvyo(ig)=gvyy(ig) ++ gvzo(ig)=gvzz(ig) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c iteration necessary if ntcons > 0 and isw=1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++ if(isw.eq.1)then ++ ++ do icyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, ++ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstqscl_p ++ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit, ++ x press,volm) ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, ++ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++ engke=engfke+engtrn ++ ++c calculate quaternion momenta ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*hstep ++ p1(ig)=p1(ig)+qt1*hstep ++ p2(ig)=p2(ig)+qt2*hstep ++ p3(ig)=p3(ig)+qt3*hstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ cxx=gcmx(ig)-com(1) ++ cyy=gcmy(ig)-com(2) ++ czz=gcmz(ig)-com(3) ++ gcmx(ig)=gcmx(ig)+ ++ x tstep*(gvxx(ig)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ gcmy(ig)=gcmy(ig)+ ++ x tstep*(gvyy(ig)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ gcmz(ig)=gcmz(ig)+ ++ x tstep*(gvzz(ig)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ k=k+1 ++ i=lstfre(ifre) ++ cxx=xxx(i)-com(1) ++ cyy=yyy(i)-com(2) ++ czz=zzz(i)-com(3) ++ xxx(i)=xxx(i)+ ++ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ yyy(i)=yyy(i)+ ++ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ zzz(i)=zzz(i)+ ++ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c subtract old constraint terms from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++c correct constraint bonds using rattle ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++c add new constraint terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c restore original integration parameters if iter < mxiter ++ ++ if(iter.lt.mxiter)then ++ ++ volm=vzero ++ chit=chit0 ++ conint=cons0 ++ do i=1,9 ++ ++ eta(i)=eta0(i) ++ cell(i)=czero(i) ++ ++ enddo ++ do i=1,natms ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ omx(ig)=oxo(ig) ++ omy(ig)=oyo(ig) ++ omz(ig)=ozo(ig) ++ gcmx(ig)=gxo(ig) ++ gcmy(ig)=gyo(ig) ++ gcmz(ig)=gzo(ig) ++ gvxx(ig)=gvxo(ig) ++ gvyy(ig)=gvyo(ig) ++ gvzz(ig)=gvzo(ig) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c operations for second stage only ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++c add constraint terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c kinetic terms for stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++ do icyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, ++ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstqscl_p ++ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit, ++ x press,volm) ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, ++ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++ engke=engfke+engtrn ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c end of iteration cycle ++ ++ enddo ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,oxo,oyo,ozo,stat=fail(5)) ++ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(6)) ++ deallocate(gxo,gyo,gzo,gvxo,gvyo,gvzo,stat=fail(7)) ++ ++ endif ++ ++ return ++ end subroutine nstqvv_h1 ++ ++ end module vv_rotation1_module ++ +diff -urN dl_class_1.9.orig/srcmod/vv_rotation2_module.f dl_class_1.9/srcmod/vv_rotation2_module.f +--- dl_class_1.9.orig/srcmod/vv_rotation2_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/vv_rotation2_module.f 2011-02-22 12:46:30.000000000 +0100 +@@ -0,0 +1,5924 @@ ++ module vv_rotation2_module ++ ++c*********************************************************************** ++c ++c dl_poly module 2 for velocity verlet rotational integration ++c schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use metafreeze_module, only : lmetadyn ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use vv_rotation1_module ++ use utility_module ++ ++ contains ++ ++ subroutine qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,stresh) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for applying bond constraint corrections after ++c atomic integration in the velocity verlet scheme. assumes rigid ++c bodies connected by constraints. must be used in conjunction with ++c velocity verlet integration algorithm. note the iteration is ++c handled by the calling routine. ++c ++c copyright - daresbury laboratory ++c author - w. smith february 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newstep,newjob ++ integer fail,idnode,imcon,mxnode,natms,nscons,i,j,k,ik ++ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,txx,tyy ++ real(8) tzz,xxt,yyt,zzt,stresh,strs1,strs2,strs3,strs5,strs6 ++ real(8) strs9,tstep2,esig,dis2,tqa,tqb,gamma,dli,dlj ++ ++ real(8), allocatable :: esig1(:),ggx(:),ggy(:),ggz(:) ++ ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ dimension stresh(9),tqa(3),tqb(3) ++ ++ save newjob,esig1,ggx,ggy,ggz ++ ++ data newjob/.true./,fail/0/ ++ ++ if(newjob)then ++ ++ allocate (esig1(mxcons),ggx(mxcons),ggy(mxcons),ggz(mxcons), ++ x stat=fail) ++ if(fail.ne.0)call error(idnode,1615) ++ newjob=.false. ++ ++ endif ++ ++c accumulators for stress tensor ++ ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c constraint bond vectors are dxx,dyy,dzz (input) ++ ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate temporary bond vector ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c calculate maximum error in bondlength ++ ++ esig=0.d0 ++ do k=1,nscons ++ ++ dis2=prmcon(listcon(k,1))**2 ++ esig1(k)=(dis2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/dis2 ++ esig=max(esig,abs(esig1(k))) ++ ++ enddo ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++c continue if any tolerances unsatisfied ++ ++ if(.not.safe)then ++ ++c initialise force increment arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint forces ++ ++ ik=0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dis2=prmcon(listcon(k,1))**2 ++ ++ if(newstep)then ++ ++ call pivot(1,i,k,ik,tqa,dxx,dyy,dzz) ++ call pivot(1,j,k,ik,tqb,dxx,dyy,dzz) ++ ++ ggx(k)=tstep2*(tqa(1)+tqb(1))/dis2 ++ ggy(k)=tstep2*(tqa(2)+tqb(2))/dis2 ++ ggz(k)=tstep2*(tqa(3)+tqb(3))/dis2 ++ ++ endif ++ ++c constraint force parameter ++ ++ gamma=esig1(k)/(dxt(k)*ggx(k)+dyt(k)*ggy(k)+dzt(k)*ggz(k)) ++ ++c accumulate bond virial ++ ++ vircon=vircon-gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ ++ strs1=strs1+gamma*dxx(k)*dxx(k) ++ strs2=strs2+gamma*dxx(k)*dyy(k) ++ strs3=strs3+gamma*dxx(k)*dzz(k) ++ strs5=strs5+gamma*dyy(k)*dyy(k) ++ strs6=strs6+gamma*dyy(k)*dzz(k) ++ strs9=strs9+gamma*dzz(k)*dzz(k) ++ ++c improved atomic force ++ ++ xxt(i)=xxt(i)+dxx(k)*gamma ++ yyt(i)=yyt(i)+dyy(k)*gamma ++ zzt(i)=zzt(i)+dzz(k)*gamma ++ xxt(j)=xxt(j)-dxx(k)*gamma ++ yyt(j)=yyt(j)-dyy(k)*gamma ++ zzt(j)=zzt(j)-dzz(k)*gamma ++ ++ enddo ++ ++c transport temporary positions to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov) call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ dlj=1.d0/dble(listme(j)) ++ ++ fxx(i)=fxx(i)+xxt(i)*dli ++ fyy(i)=fyy(i)+yyt(i)*dli ++ fzz(i)=fzz(i)+zzt(i)*dli ++ fxx(j)=fxx(j)+xxt(j)*dlj ++ fyy(j)=fyy(j)+yyt(j)*dlj ++ fzz(j)=fzz(j)+zzt(j)*dlj ++ ++ enddo ++ ++c complete stress tensor ++ ++ stresh(1)=stresh(1)+strs1 ++ stresh(2)=stresh(2)+strs2 ++ stresh(3)=stresh(3)+strs3 ++ stresh(4)=stresh(4)+strs2 ++ stresh(5)=stresh(5)+strs5 ++ stresh(6)=stresh(6)+strs6 ++ stresh(7)=stresh(7)+strs3 ++ stresh(8)=stresh(8)+strs6 ++ stresh(9)=stresh(9)+strs9 ++ ++c splice force arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ call splice ++ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++ ++ endif ++ ++ return ++ end subroutine qrattle_r ++ ++ subroutine qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for applying bond constraint corrections after ++c atomic integration in the velocity verlet scheme. assumes rigid ++c bodies connected by constraints. must be used in conjunction with ++c velocity verlet integration algorithm. note the iteration is ++c handled by the calling routine. ++c ++c copyright - daresbury laboratory ++c author - w. smith february 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newstep,newjob ++ integer fail,idnode,mxnode,natms,nscons,i,j,k,ik ++ real(8) tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz,tqa,tqb ++ real(8) xxt,yyt,zzt,tstep2,esig,gamma,dli,dlj ++ real(8) tolvel ++ ++ real(8), allocatable :: esig2(:),hhx(:),hhy(:),hhz(:) ++ ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension tqa(3),tqb(3) ++ ++ save newjob,esig2,hhx,hhy,hhz ++ ++ data newjob/.true./,fail/0/ ++ ++ if(newjob)then ++ ++ allocate (esig2(mxcons),hhx(mxcons),hhy(mxcons),hhz(mxcons), ++ x stat=fail) ++ if(fail.ne.0)call error(idnode,1625) ++ newjob=.false. ++ ++ endif ++ ++c constraint bond vectors are dxx,dyy,dzz (input) ++ ++c half timestep ++ ++ tstep2=tstep/2.d0 ++ ++c tolerance for velocity convergence ++ ++ tolvel=tolnce/tstep ++ ++c calculate maximum error in constraint ++ ++ esig=0.d0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ esig2(k)=(dxx(k)*(vxx(i)-vxx(j))+dyy(k)*(vyy(i)-vyy(j))+ ++ x dzz(k)*(vzz(i)-vzz(j))) ++ esig=max(esig,abs(esig2(k))) ++ ++ enddo ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolvel) ++ ++ if(mxnode.gt.1)then ++ call gstate(safe) ++ endif ++ ++c continue if all tolerances satisfied else return to calling routine ++ ++ if(.not.safe)then ++ ++c initialise velocity correction arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint correction ++ ++ ik=0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ if(newstep)then ++ ++ call pivot(2,i,k,ik,tqa,dxx,dyy,dzz) ++ call pivot(2,j,k,ik,tqb,dxx,dyy,dzz) ++ ++ hhx(k)=tstep2*(tqa(1)+tqb(1)) ++ hhy(k)=tstep2*(tqa(2)+tqb(2)) ++ hhz(k)=tstep2*(tqa(3)+tqb(3)) ++ ++ endif ++ ++c constraint force parameter ++ ++ gamma=esig2(k)/(dxx(k)*hhx(k)+dyy(k)*hhy(k)+dzz(k)*hhz(k)) ++ ++c improved atomic force ++ ++ xxt(i)=xxt(i)-dxx(k)*gamma ++ yyt(i)=yyt(i)-dyy(k)*gamma ++ zzt(i)=zzt(i)-dzz(k)*gamma ++ xxt(j)=xxt(j)+dxx(k)*gamma ++ yyt(j)=yyt(j)+dyy(k)*gamma ++ zzt(j)=zzt(j)+dzz(k)*gamma ++ ++ enddo ++ ++c transport temporary positions to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov) call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ dlj=1.d0/dble(listme(j)) ++ ++ fxx(i)=fxx(i)+dli*xxt(i) ++ fyy(i)=fyy(i)+dli*yyt(i) ++ fzz(i)=fzz(i)+dli*zzt(i) ++ fxx(j)=fxx(j)+dlj*xxt(j) ++ fyy(j)=fyy(j)+dlj*yyt(j) ++ fzz(j)=fzz(j)+dlj*zzt(j) ++ ++ enddo ++ ++c splice force arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ call splice ++ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine qrattle_v ++ ++ subroutine pivot(k,i,kk,ik,tqq,dxx,dyy,dzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for computing pivot vector for velocity ++c corrections to bonds between rigid bodies ++c must be used in conjunction with qrattle routines: ++c if k=1 - use with qrattle_r ++c if k=2 - use with qrattle_v ++c ++c copyright - daresbury laboratory ++c author - w. smith february 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer k,i,kk,ik,ig,id,jj ++ real(8) xxa,yya,zza,tax,tay,taz,trx,try,trz,vix,viy,viz ++ real(8) rot(9),tqq(3),dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ ++ ig=lstbod(i) ++ ++ if(ig.eq.0)then ++ ++c atoms in constraint bonds ++ ++ tqq(1)=dxx(kk)*rmass(i) ++ tqq(2)=dyy(kk)*rmass(i) ++ tqq(3)=dzz(kk)*rmass(i) ++ ++ else ++ ++c terms for rigid body atoms ++ ++ ik=ik+1 ++ id=lstgtp(ig) ++ ++ tqq(1)=dxx(kk)/gmass(id) ++ tqq(2)=dyy(kk)/gmass(id) ++ tqq(3)=dzz(kk)/gmass(id) ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ jj=lstcsit(ik) ++ ++c com-site vector in lab frame ++ ++ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+gzz(id,jj)*rot(3)) ++ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+gzz(id,jj)*rot(6)) ++ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+gzz(id,jj)*rot(9)) ++ ++c cross product of com-site vector and interatomic vector ++ ++ tax=yya*dzz(kk)-zza*dyy(kk) ++ tay=zza*dxx(kk)-xxa*dzz(kk) ++ taz=xxa*dyy(kk)-yya*dxx(kk) ++ ++c transform to body fixed frame ++ ++ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) ++ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) ++ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) ++ ++ if(k.eq.1)then ++ ++c direction of induced velocites in body frame ++ ++ vix=try*gzz(id,jj)-trz*gyy(id,jj) ++ viy=trz*gxx(id,jj)-trx*gzz(id,jj) ++ viz=trx*gyy(id,jj)-try*gxx(id,jj) ++ ++c transform to lab frame ++ ++ tqq(1)=tqq(1)+vix*rot(1)+viy*rot(2)+viz*rot(3) ++ tqq(2)=tqq(2)+vix*rot(4)+viy*rot(5)+viz*rot(6) ++ tqq(3)=tqq(3)+vix*rot(7)+viy*rot(8)+viz*rot(9) ++ ++ elseif(k.eq.2)then ++ ++c transform to lab frame ++ ++ tqq(1)=tqq(1)+trx*rot(1)+try*rot(2)+trz*rot(3) ++ tqq(2)=tqq(2)+trx*rot(4)+try*rot(5)+trz*rot(6) ++ tqq(3)=tqq(3)+trx*rot(7)+try*rot(8)+trz*rot(9) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine pivot ++ ++ subroutine nveqvv_2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith jan 2005 ++c amended w.smith feb 2005: qrattle added ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,jrs,icyc,mxshk,idum,ig ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) engtrn ++ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3 ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ ++ save newstep,newjob,p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data newjob/.true./ ++ ++c set array allocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) ++ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(3)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(4)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(5)) ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) ++ if(isw.eq.2)then ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) ++ endif ++ ++c check array allocation error flags ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2110) ++ enddo ++ ++c initialise constraint virial ++ ++ if(isw.eq.1)then ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) ++ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) ++ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*pt5*tstep ++ p1(ig)=c1(jg)+tq1*pt5*tstep ++ p2(ig)=c2(jg)+tq2*pt5*tstep ++ p3(ig)=c3(jg)+tq3*pt5*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxo(i)+tstep*vxx(i) ++ yyy(i)=yyo(i)+tstep*vyy(i) ++ zzz(i)=zzo(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge free atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++ if(isw.eq.2)then ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ ++ engke=engke+engtrn ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c restore forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ if(isw.eq.2)then ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ endif ++ ++ return ++ end subroutine nveqvv_2 ++ ++ subroutine nvtqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, ++ x vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c nvt ensemble - Berendsen thermostat (n.b. not symplectic) ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith mar 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,jrs,icyc,mxshk,idum,ig ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke ++ real(8) engtrn ++ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,taut,sigma,chit ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ ++ save newstep,newjob,p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data newjob/.true./ ++ ++c set array alocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) ++ allocate(vxo(msatms),vyo(msatms),vzo(mxatms),stat=fail(3)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(4)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(5)) ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) ++ if(isw.eq.2)then ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) ++ endif ++ ++c check array allocation error flags ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2130) ++ enddo ++ ++c initialise constraint virial ++ ++ if(isw.eq.1)then ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) ++ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) ++ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*pt5*tstep ++ p1(ig)=c1(jg)+tq1*pt5*tstep ++ p2(ig)=c2(jg)+tq2*pt5*tstep ++ p3(ig)=c3(jg)+tq3*pt5*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxo(i)+tstep*vxx(i) ++ yyy(i)=yyo(i)+tstep*vyy(i) ++ zzz(i)=zzo(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engke+engtrn+engrot ++ engke=engke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ if(lstfrz(i).ne.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c restore forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ if(isw.eq.2)then ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ endif ++ ++ return ++ end subroutine nvtqvv_b2 ++ ++ subroutine nvtqvv_h2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke,engrot, ++ x taut,sigma,tolnce,tstep,vircom,vircon,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c nvt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith april 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,jrs,icyc,mxshk,idum,ig ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) engtrn,vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,engfke ++ real(8) taut,sigma,chit,hstep,qmass,conint,consv ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newstep,newjob,p0,p1,p2,p3,hstep,qmass,ifre1,ifre2 ++ save igrp1,igrp2 ++ ++ data newjob/.true./ ++ ++c set array allocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c timestep parameters ++ ++ hstep=pt5*tstep ++ ++c nose-hoover inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) ++ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(3)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(4)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(5)) ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) ++ if(isw.eq.2)then ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) ++ endif ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2150) ++ enddo ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c initialise constraint virial ++ ++ if(isw.eq.1)then ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c apply thermostat for first stage ++ ++ if(isw.eq.1)then ++ ++ call nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x hstep,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) ++ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) ++ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*pt5*tstep ++ p1(ig)=c1(jg)+tq1*pt5*tstep ++ p2(ig)=c2(jg)+tq2*pt5*tstep ++ p3(ig)=c3(jg)+tq3*pt5*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxo(i)+tstep*vxx(i) ++ yyy(i)=yyo(i)+tstep*vyy(i) ++ zzz(i)=zzo(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c apply thermostat for second stage and calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++c rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c apply thermostat for second stage and calculate kinetic energy ++ ++ call nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x hstep,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ engke=engfke+engtrn ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ consv=conint+0.5d0*qmass*chit**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c restore forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ if(isw.eq.2)then ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ endif ++ ++ return ++ end subroutine nvtqvv_h2 ++ ++ subroutine nptqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c npt ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith sep 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,jrs,icyc,mxshk,idum,ig,ntpatm ++ integer iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke,engtrn ++ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz,volm0 ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,taut,sigma,chit ++ real(8) volm,elrc0,elrc,virlrc0,virlrc,scale,psyst,virtot,chip ++ real(8) beta,press,taup,engfke,vzero ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),cell0(9),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++ save newstep,newjob,volm0,elrc0,virlrc0,dens0 ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./,beta/7.3728d-3/ ++ ++c set array alocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2180) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(3)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ endif ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(8)) ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(9)) ++ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(11)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(12)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(13)) ++ ++c check array allocation error flags ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2190) ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c cell parameters ++ ++ vzero=volm ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn ++ ++ endif ++ ++c -------------- start of barostat iteration cycle ----------------- ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++ if(isw.eq.1)then ++ ++c restore cell parameters ++ ++ volm=vzero ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c calculate system pressure ++ ++ vircon=-(strcns(1)+strcns(5)+strcns(9)) ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ ++c apply Berendsen barostat ++ ++ chip=1.d0+beta*tstep*(psyst-press)/taup ++ chip=1.d0 ++ scale=chip**(1.d0/3.d0) ++ volm=chip*volm ++ ++c reset cell parameters for new volume ++ ++ do i=1,9 ++ cell(i)=scale*cell(i) ++ enddo ++ ++c reset constraint virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) ++ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) ++ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*pt5*tstep ++ p1(ig)=c1(jg)+tq1*pt5*tstep ++ p2(ig)=c2(jg)+tq2*pt5*tstep ++ p3(ig)=c3(jg)+tq3*pt5*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=scale*gxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=scale*gyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=scale*gzo(jg)+tstep*gvzz(ig) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=scale*xxo(i)+tstep*vxx(i) ++ yyy(i)=scale*yyo(i)+tstep*vyy(i) ++ zzz(i)=scale*zzo(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c rigid body contribution to stress tensor ++ ++ if(isw.eq.2)call bodystress ++ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c restore forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++c -------------- end of barostat iteration cycle ---------------- ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor for tethered bonds ++ ++ do i=1,9 ++ eta(i)=uni(i)*scale ++ enddo ++ ++ endif ++ ++ if(isw.eq.2)then ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ if(lstfrz(i).ne.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,fxo,fyo,fzo,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ ++ return ++ end subroutine nptqvv_b2 ++ ++ subroutine nptqvv_h2 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircom,vircon,virtot,virlrc,volm,press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c npt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith april 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr ++ integer id,ifre,icyc,mxshk,idum,ig,ntpatm ++ integer jcyc,iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) engtrn,vaa,vbb,vcc,opx,opy,opz,engfke ++ real(8) taut,taup,sigma,chit,hstep,qmass,conint,consv ++ real(8) cxx,cyy,czz,scale,virtot,press,chip,temp ++ real(8) volm,pmass,totmas,qstep,fstep,volm0,elrc ++ real(8) virlrc,elrc0,virlrc0,chit0,chip0,vzero,cons0 ++ ++ integer, parameter :: nnn=16 ++ integer, parameter :: ncyc=5 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),cell0(9),com(3),vom(3),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: vx1(:),vy1(:),vz1(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: oxo(:),oyo(:),ozo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gvx1(:),gvy1(:),gvz1(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newstep,newjob,p0,p1,p2,p3,hstep,fstep,qmass,ifre1,ifre2 ++ save igrp1,igrp2,volm0,elrc0,virlrc0,qstep,dens0,totmas ++ save pmass ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++c set array allocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2220) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c nose-hoover thermostat and barostat inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(3)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(8)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(9)) ++ allocate(vx1(mxatms),vy1(mxatms),vz1(mxatms),stat=fail(10)) ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(11)) ++ allocate(oxo(mxatms),oyo(mxatms),ozo(mxatms),stat=fail(12)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp), ++ x stat=fail(13)) ++ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp), ++ x stat=fail(14)) ++ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(15)) ++ allocate(gvx1(mxgrp),gvy1(mxgrp),gvz1(mxgrp),stat=fail(16)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2230) ++ enddo ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c store key config data at start of timestep ++ ++ vzero=volm ++ chit0=chit ++ chip0=chip ++ cons0=conint ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++ if(isw.eq.1)then ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=1,natms ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=1,ngrp ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c store rigid body positions ++ ++ do ig=1,ngrp ++ ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ do i=1,natms ++ ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++c store forces ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, angular and cartesian velocities ++ ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ oxo(ig)=omx(ig) ++ oyo(ig)=omy(ig) ++ ozo(ig)=omz(ig) ++ gvxo(ig)=gvxx(ig) ++ gvyo(ig)=gvyy(ig) ++ gvzo(ig)=gvzz(ig) ++ ++ enddo ++ ++c iteration necessary if ntcons > 0 and isw=1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++c integration of barostat and thermostat (part 1) ++ ++ if(isw.eq.1)then ++ ++c restore cell parameters ++ ++ volm=vzero ++ chit=chit0 ++ chip=chip0 ++ conint=cons0 ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c restore free atom velocities ++ ++ do i=1,natms ++ ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++c restore rigid body quaternions angular and cartesian velocities ++ ++ do ig=1,ngrp ++ ++ omx(ig)=oxo(ig) ++ omy(ig)=oyo(ig) ++ omz(ig)=ozo(ig) ++ gvxx(ig)=gvxo(ig) ++ gvyy(ig)=gvyo(ig) ++ gvzz(ig)=gvzo(ig) ++ ++ enddo ++ ++c current constraint virial ++ ++ vircon=-(strcns(1)+strcns(5)+strcns(9)) ++ ++ do jcyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engke=engfke+engtrn ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/vzero)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c reset constraint virial and stress ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c calculate quaternion momenta ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-b1(ig)*opx-b2(ig)*opy-b3(ig)*opz) ++ p1(ig)=2.0d0*( b0(ig)*opx-b3(ig)*opy+b2(ig)*opz) ++ p2(ig)=2.0d0*( b3(ig)*opx+b0(ig)*opy-b1(ig)*opz) ++ p3(ig)=2.0d0*(-b2(ig)*opx+b1(ig)*opy+b0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store intermediate velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vx1(i)=vxx(i) ++ vy1(i)=vyy(i) ++ vz1(i)=vzz(i) ++ ++ enddo ++ do ig=igrp1,igrp2 ++ ++ c0(ig)=p0(ig) ++ c1(ig)=p1(ig) ++ c2(ig)=p2(ig) ++ c3(ig)=p3(ig) ++ gvx1(ig)=gvxx(ig) ++ gvy1(ig)=gvyy(ig) ++ gvz1(ig)=gvzz(ig) ++ ++ enddo ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vx1(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vy1(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vz1(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c restore rigid body quaternions, angular momenta and velocities ++ ++ do ig=igrp1,igrp2 ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ p0(ig)=c0(ig) ++ p1(ig)=c1(ig) ++ p2(ig)=c2(ig) ++ p3(ig)=c3(ig) ++ gvxx(ig)=gvx1(ig) ++ gvyy(ig)=gvy1(ig) ++ gvzz(ig)=gvz1(ig) ++ ++ enddo ++ ++c calculate new rigid body velocities ++ ++ call rotate_omega ++ x (idnode,mxnode,ngrp,hstep,p0,p1,p2,p3,dtx,dty,dtz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c update centre of mass position by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ cxx=gxo(ig)-com(1) ++ cyy=gyo(ig)-com(2) ++ czz=gzo(ig)-com(3) ++ gcmx(ig)=gxo(ig)+tstep*(gvxx(ig)+chip*cxx) ++ gcmy(ig)=gyo(ig)+tstep*(gvyy(ig)+chip*cyy) ++ gcmz(ig)=gzo(ig)+tstep*(gvzz(ig)+chip*czz) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ cxx=xxo(i)-com(1) ++ cyy=yyo(i)-com(2) ++ czz=zzo(i)-com(3) ++ xxx(i)=xxo(i)+tstep*(vxx(i)+chip*cxx) ++ yyy(i)=yyo(i)+tstep*(vyy(i)+chip*cyy) ++ zzz(i)=zzo(i)+tstep*(vzz(i)+chip*czz) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c integration of barostat and thermostat (part 2) ++ ++ if(isw.eq.2)then ++ ++c current constraint virial ++ ++ vircon=-(strcns(1)+strcns(5)+strcns(9)) ++ ++ do jcyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engke=engfke+engtrn ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/vzero)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++ endif ++ ++c restore forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++c -------------- end of barostat iteration cycle ---------------- ++ ++ enddo ++ ++ if(isw.eq.2)then ++ ++c calculate conserved variable ++ ++ consv=conint+0.5d0*qmass*chit**2+press*volm ++ x +0.5d0*pmass*chip**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c merge velocity arrays ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor (for tethered atoms) ++ ++ do i=1,9 ++ eta(i)=chip*uni(i) ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c exchange position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(oxo,oyo,ozo,dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ ++ return ++ end subroutine nptqvv_h2 ++ ++ subroutine nstqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,volm) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c nst ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith sep 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,icyc,mxshk,idum,ig,ntpatm,mode ++ integer iter,mxiter,jrs ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke ++ real(8) engtrn,taut,sigma,chit ++ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz,volm0 ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3 ++ real(8) volm,elrc0,elrc,virlrc0,virlrc ++ real(8) beta,press,taup,engfke,hstep,vzero ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),uni(9),celp(10) ++ real(8) cell0(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++ save newstep,newjob,volm0,elrc0,virlrc0,dens0 ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,hstep ++ ++ data newjob/.true./,beta/7.3728d-3/ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c set array alocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c timestep parameters ++ ++ hstep=pt5*tstep ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2260) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(3)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ endif ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(8)) ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(9)) ++ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(11)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(12)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(13)) ++ ++c check array allocation error flags ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2270) ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c cell parameters ++ ++ vzero=volm ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++c extract previous constraint terms from stress tensor ++ ++ if(isw.eq.1)then ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++ endif ++ ++c -------------- start of barostat iteration cycle ----------------- ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++ do i=1,9 ++ eta(i)=uni(i) ++ enddo ++ ++ if(isw.eq.1)then ++ ++c restore cell parameters ++ ++ volm=vzero ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c calculate Berendsen barostat ++ ++ do i=1,9 ++ eta(i)=tstep*beta*((stress(i)+strcns(i))/volm- ++ x press*uni(i))/taup+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c reset cell parameters for new volume ++ ++ call mat_mul(eta,cell,cell) ++ ++c calculate new volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++c reset constraint virial ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*hstep ++ p1(ig)=c1(jg)+tq1*hstep ++ p2(ig)=c2(jg)+tq2*hstep ++ p3(ig)=c3(jg)+tq3*hstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*hstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*hstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*hstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=tstep*gvxx(ig)+ ++ x eta(1)*gxo(jg)+eta(4)*gyo(jg)+eta(7)*gzo(jg) ++ gcmy(ig)=tstep*gvyy(ig)+ ++ x eta(2)*gxo(jg)+eta(5)*gyo(jg)+eta(8)*gzo(jg) ++ gcmz(ig)=tstep*gvzz(ig)+ ++ x eta(3)*gxo(jg)+eta(6)*gyo(jg)+eta(9)*gzo(jg) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=tstep*vxx(i)+ ++ x eta(1)*xxo(i)+eta(4)*yyo(i)+eta(7)*zzo(i) ++ yyy(i)=tstep*vyy(i)+ ++ x eta(2)*xxo(i)+eta(5)*yyo(i)+eta(8)*zzo(i) ++ zzz(i)=tstep*vzz(i)+ ++ x eta(3)*xxo(i)+eta(6)*yyo(i)+eta(9)*zzo(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c rigid body contribution to stress tensor ++ ++ if(isw.eq.2)call bodystress ++ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c restore forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++c -------------- end of barostat iteration cycle ---------------- ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++ endif ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ if(lstfrz(i).ne.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,fxo,fyo,fzo,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ ++ return ++ end subroutine nstqvv_b2 ++ ++ subroutine nstqvv_h2 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, ++ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircom,vircon,virlrc,volm,press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c nst ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith sept 2005 ++c adapted d. quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr ++ integer id,ifre,icyc,mxshk,idum,ig,ntpatm,mode ++ integer jcyc,iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) engtrn,engfke ++ real(8) vaa,vbb,vcc,opx,opy,opz ++ real(8) taut,taup,sigma,chit,hstep,qmass,conint,consv ++ real(8) cxx,cyy,czz,press,chip2,temp ++ real(8) volm,pmass,totmas,qstep,fstep,volm0,elrc ++ real(8) virlrc,elrc0,virlrc0,chit0,vzero,cons0 ++ ++ integer, parameter :: nnn=16 ++ integer, parameter :: ncyc=5 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),com(3),vom(3) ++ real(8) cell0(9),eta0(9),stres0(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: vx1(:),vy1(:),vz1(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: oxo(:),oyo(:),ozo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gvx1(:),gvy1(:),gvz1(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newstep,newjob,p0,p1,p2,p3,hstep,fstep,qmass,ifre1,ifre2 ++ save igrp1,igrp2,volm0,elrc0,virlrc0,qstep,dens0,totmas ++ save pmass ++ ++ data newjob/.true./ ++ ++c set array allocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2220) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c nose-hoover thermostat and barostat inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(3)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(8)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(9)) ++ allocate(vx1(mxatms),vy1(mxatms),vz1(mxatms),stat=fail(10)) ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(11)) ++ allocate(oxo(mxatms),oyo(mxatms),ozo(mxatms),stat=fail(12)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp), ++ x stat=fail(13)) ++ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp), ++ x stat=fail(14)) ++ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(15)) ++ allocate(gvx1(mxgrp),gvy1(mxgrp),gvz1(mxgrp),stat=fail(16)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2230) ++ enddo ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c store key config data at start of timestep ++ ++ vzero=volm ++ chit0=chit ++ cons0=conint ++ do i=1,9 ++ ++ cell0(i)=cell(i) ++ eta0(i)=eta(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=1,natms ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=1,ngrp ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c store rigid body positions ++ ++ do ig=1,ngrp ++ ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ do i=1,natms ++ ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++c store forces ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, angular and cartesian velocities ++ ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ oxo(ig)=omx(ig) ++ oyo(ig)=omy(ig) ++ ozo(ig)=omz(ig) ++ gvxo(ig)=gvxx(ig) ++ gvyo(ig)=gvyy(ig) ++ gvzo(ig)=gvzz(ig) ++ ++ enddo ++ ++c iteration necessary if ntcons > 0 and isw=1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++c integration of barostat and thermostat (part 1) ++ ++ if(isw.eq.1)then ++ ++c restore cell parameters ++ ++ volm=vzero ++ chit=chit0 ++ conint=cons0 ++ do i=1,9 ++ ++ cell(i)=cell0(i) ++ eta(i)=eta0(i) ++ ++ enddo ++ ++c restore free atom velocities ++ ++ do i=1,natms ++ ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++c restore rigid body quaternions angular and cartesian velocities ++ ++ do ig=1,ngrp ++ ++ omx(ig)=oxo(ig) ++ omy(ig)=oyo(ig) ++ omz(ig)=ozo(ig) ++ gvxx(ig)=gvxo(ig) ++ gvyy(ig)=gvyo(ig) ++ gvzz(ig)=gvzo(ig) ++ ++ enddo ++ ++c kinetic contributions to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ do jcyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstqscl_p2 ++ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit,press, ++ x volm,strkin,strgrp) ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engke=engfke+engtrn ++ ++c reset constraint virial and stress ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ stress(i)=stress(i)-strcns(i)-strbod(i) ++ strcns(i)=0.d0 ++ ++ enddo ++ ++c calculate quaternion momenta ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-b1(ig)*opx-b2(ig)*opy-b3(ig)*opz) ++ p1(ig)=2.0d0*( b0(ig)*opx-b3(ig)*opy+b2(ig)*opz) ++ p2(ig)=2.0d0*( b3(ig)*opx+b0(ig)*opy-b1(ig)*opz) ++ p3(ig)=2.0d0*(-b2(ig)*opx+b1(ig)*opy+b0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store intermediate velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vx1(i)=vxx(i) ++ vy1(i)=vyy(i) ++ vz1(i)=vzz(i) ++ ++ enddo ++ do ig=igrp1,igrp2 ++ ++ c0(ig)=p0(ig) ++ c1(ig)=p1(ig) ++ c2(ig)=p2(ig) ++ c3(ig)=p3(ig) ++ gvx1(ig)=gvxx(ig) ++ gvy1(ig)=gvyy(ig) ++ gvz1(ig)=gvzz(ig) ++ ++ enddo ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vx1(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vy1(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vz1(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c restore rigid body quaternions, angular momenta and velocities ++ ++ do ig=igrp1,igrp2 ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ p0(ig)=c0(ig) ++ p1(ig)=c1(ig) ++ p2(ig)=c2(ig) ++ p3(ig)=c3(ig) ++ gvxx(ig)=gvx1(ig) ++ gvyy(ig)=gvy1(ig) ++ gvzz(ig)=gvz1(ig) ++ ++ enddo ++ ++c calculate new rigid body velocities ++ ++ call rotate_omega ++ x (idnode,mxnode,ngrp,hstep,p0,p1,p2,p3,dtx,dty,dtz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c update centre of mass position by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ cxx=gxo(ig)-com(1) ++ cyy=gyo(ig)-com(2) ++ czz=gzo(ig)-com(3) ++ gcmx(ig)=gxo(ig)+ ++ x tstep*(gvxx(ig)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ gcmy(ig)=gyo(ig)+ ++ x tstep*(gvyy(ig)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ gcmz(ig)=gzo(ig)+ ++ x tstep*(gvzz(ig)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ cxx=xxo(i)-com(1) ++ cyy=yyo(i)-com(2) ++ czz=zzo(i)-com(3) ++ xxx(i)=xxo(i)+ ++ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ yyy(i)=yyo(i)+ ++ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ zzz(i)=zzo(i)+ ++ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add new constraint terms to stress tensor ++ ++ if(isw.eq.1)then ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strbod(i) ++ enddo ++ ++ endif ++ ++c integration of barostat and thermostat (part 2) ++ ++ if(isw.eq.2)then ++ ++c kinetic contributions to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add kinetic and body contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) ++ enddo ++ ++ do jcyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstqscl_p2 ++ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit,press, ++ x volm,strkin,strgrp) ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engke=engfke+engtrn ++ ++c sum up all contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c restore forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++c -------------- end of barostat iteration cycle ---------------- ++ ++ enddo ++ ++ if(isw.eq.2)then ++ ++c calculate conserved variable ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c merge velocity arrays ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ if(isw.eq.2)then ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ endif ++ ++ return ++ end subroutine nstqvv_h2 ++ ++ end module vv_rotation2_module -- GitLab From 39cfc61ec5910bf0b8d8d912abecb8e7fe9c4a5f Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 9 Nov 2015 17:59:54 +0100 Subject: [PATCH 037/741] Fix typo --- .../DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb index fa6e102be0..f8950cea9a 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb @@ -13,7 +13,7 @@ toolchain = {'name': 'intel', 'version': '2015b'} sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] -builddependencies = [('PLUMED', '2.2')] +builddependencies = [('PLUMED', '2.2.0')] patches = [('plumed-2.2.patch', 1)] -- GitLab From a5fdeab2d85cb17b3e524955cf5d3e9c45c0b67f Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 10 Nov 2015 11:26:30 +0100 Subject: [PATCH 038/741] Reworked DL_POLY with plumed a bit --- ...eb => DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb} | 8 +++++--- .../{plumed-2.2.patch => PLUMED-2.2.0.patch} | 0 2 files changed, 5 insertions(+), 3 deletions(-) rename easybuild/easyconfigs/d/DL_POLY_Classic/{DL_POLY_Classic-1.9-intel-2015b-plumed2.eb => DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb} (84%) rename easybuild/easyconfigs/d/DL_POLY_Classic/{plumed-2.2.patch => PLUMED-2.2.0.patch} (100%) diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb similarity index 84% rename from easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb rename to easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb index f8950cea9a..d38be45cba 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-plumed2.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb @@ -2,7 +2,6 @@ easyblock = 'MakeCp' name = 'DL_POLY_Classic' version = '1.9' -versionsuffix = '-plumed2' homepage = 'http://ccpforge.cse.rl.ac.uk/gf/project/dl_poly_classic/' description = """DL_POLY Classic is a freely available molecular dynamics program developed @@ -13,9 +12,12 @@ toolchain = {'name': 'intel', 'version': '2015b'} sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] -builddependencies = [('PLUMED', '2.2.0')] +plumedversion = '2.2.0' +versionsuffix = '-PLUMED-%(plumedversion)s' -patches = [('plumed-2.2.patch', 1)] +dependencies = [('PLUMED', plumedversion)] + +patches = [('plumed-%(plumedversion)s.patch', 1)] prebuildopts = 'cd srcmod && ' buildopts = 'gfortran' diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/plumed-2.2.patch b/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch similarity index 100% rename from easybuild/easyconfigs/d/DL_POLY_Classic/plumed-2.2.patch rename to easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch -- GitLab From 0a517d8a7d6a0811e0d92eab67c6fd40d225537c Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 10 Nov 2015 12:02:52 +0100 Subject: [PATCH 039/741] Fix template error --- .../DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb index d38be45cba..dcdb0de073 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb @@ -13,11 +13,12 @@ sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] plumedversion = '2.2.0' -versionsuffix = '-PLUMED-%(plumedversion)s' +versionsuffix = '-PLUMED-%s' % plumedversion dependencies = [('PLUMED', plumedversion)] -patches = [('plumed-%(plumedversion)s.patch', 1)] +# this patch needs to be regenerated for another version of PLUMED +patches = [('plumed-%s.patch' % plumedversion, 1)] prebuildopts = 'cd srcmod && ' buildopts = 'gfortran' -- GitLab From ae2010dd70c24115ce4f8c2d2b60b93e81bec309 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 10 Nov 2015 13:32:17 +0100 Subject: [PATCH 040/741] Fix typo --- .../DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb index dcdb0de073..caf84040c2 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb @@ -18,7 +18,7 @@ versionsuffix = '-PLUMED-%s' % plumedversion dependencies = [('PLUMED', plumedversion)] # this patch needs to be regenerated for another version of PLUMED -patches = [('plumed-%s.patch' % plumedversion, 1)] +patches = [('PLUMED-%s.patch' % plumedversion, 1)] prebuildopts = 'cd srcmod && ' buildopts = 'gfortran' -- GitLab From 6abfb7b29f3d2a04153fa611148e5b5c1c0ad1c1 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 16 Nov 2015 10:36:09 +0100 Subject: [PATCH 041/741] Fix PLUMED patch for DL_POLY Link dynamically with PLUMED --- easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch b/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch index 9e8fe4cde6..b6219c6207 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch @@ -8,7 +8,7 @@ diff -urN dl_class_1.9.orig/Plumed.cmake dl_class_1.9/Plumed.cmake +++ dl_class_1.9/Plumed.cmake 2015-11-09 14:26:25.657769545 +0100 @@ -0,0 +1,3 @@ +# PLUMED: runtime installation -+set(PLUMED_LOAD "$ENV{EBROOTPLUMED}/lib/plumed/obj/Plumed.o" -ldl ) ++set(PLUMED_LOAD -L$ENV{EBROOTPLUMED}/lib -lplumed -ldl ) +set(PLUMED_DEPENDENCIES ) diff -urN dl_class_1.9.orig/Plumed.h dl_class_1.9/Plumed.h --- dl_class_1.9.orig/Plumed.h 1970-01-01 01:00:00.000000000 +0100 @@ -519,7 +519,7 @@ diff -urN dl_class_1.9.orig/Plumed.inc dl_class_1.9/Plumed.inc +++ dl_class_1.9/Plumed.inc 2015-11-09 14:26:16.827714651 +0100 @@ -0,0 +1,3 @@ +# PLUMED: runtime installation -+PLUMED_LOAD= "$(EBROOTPLUMED)/lib/plumed/obj/Plumed.o" -ldl ++PLUMED_LOAD= -L$(EBROOTPLUMED)/lib -lplumed -ldl +PLUMED_DEPENDENCIES= diff -urN dl_class_1.9.orig/srcmod/angles_module.f dl_class_1.9/srcmod/angles_module.f --- dl_class_1.9.orig/srcmod/angles_module.f 1970-01-01 01:00:00.000000000 +0100 -- GitLab From 0f9d61816bad6deaacb7303979be51b7169de308 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 16 Nov 2015 11:46:24 +0100 Subject: [PATCH 042/741] Fix sanity check for libffi --- easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb b/easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb index 535d967631..01fb77588e 100644 --- a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb +++ b/easybuild/easyconfigs/l/libffi/libffi-3.0.13-intel-2015b.eb @@ -18,7 +18,7 @@ sources = [SOURCELOWER_TAR_GZ] patches = ['libffi-%(version)s_include-xmmintrin.patch'] sanity_check_paths = { - 'files': ['lib/libffi.%s' % SHLIB_EXT, 'lib/libffi.a'], + 'files': [('lib/libffi.%s' % SHLIB_EXT, 'lib64/libffi.%s' % SHLIB_EXT), ('lib/libffi.a', 'lib64/libffi.a')], 'dirs': [], } -- GitLab From d18119ee1b09e0ec28e141b412f930e5bc01a78a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 16 Nov 2015 18:05:43 +0100 Subject: [PATCH 043/741] Added DL_POLY with Plumed-2.1.4 using foss/2015b --- .../b/Bison/Bison-3.0.4-foss-2015b.eb | 22 + .../b/byacc/byacc-20150711-foss-2015b.eb | 22 + ...OLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb | 39 + .../d/DL_POLY_Classic/PLUMED-2.1.4.patch | 95318 ++++++++++++++++ .../g/GMP/GMP-6.0.0a-foss-2015b.eb | 27 + .../easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb | 18 + .../g/guile/guile-1.8.8-foss-2015b.eb | 31 + .../l/libffi/libffi-3.0.13-foss-2015b.eb | 25 + .../libmatheval-1.1.11-foss-2015b.eb | 33 + .../libunistring-0.9.3-foss-2015b.eb | 26 + .../easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb | 23 + .../p/PLUMED/PLUMED-2.1.4-foss-2015b.eb | 42 + .../pkg-config-0.27.1-foss-2015b.eb | 27 + 13 files changed, 95653 insertions(+) create mode 100644 easybuild/easyconfigs/b/Bison/Bison-3.0.4-foss-2015b.eb create mode 100644 easybuild/easyconfigs/b/byacc/byacc-20150711-foss-2015b.eb create mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb create mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.1.4.patch create mode 100644 easybuild/easyconfigs/g/GMP/GMP-6.0.0a-foss-2015b.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb create mode 100644 easybuild/easyconfigs/g/guile/guile-1.8.8-foss-2015b.eb create mode 100644 easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb create mode 100644 easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.11-foss-2015b.eb create mode 100644 easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb create mode 100644 easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb create mode 100644 easybuild/easyconfigs/p/PLUMED/PLUMED-2.1.4-foss-2015b.eb create mode 100644 easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-foss-2015b.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-3.0.4-foss-2015b.eb b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-foss-2015b.eb new file mode 100644 index 0000000000..5555d066b8 --- /dev/null +++ b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-foss-2015b.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'Bison' +version = '3.0.4' + +homepage = 'http://www.gnu.org/software/bison' +description = """Bison is a general-purpose parser generator that converts an annotated context-free grammar + into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.""" + +toolchain = {'name': 'foss', 'version': '2015b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +builddependencies = [('M4', '1.4.17')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["bison", "yacc"]] + ["lib/liby.a"], + 'dirs': [], +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/b/byacc/byacc-20150711-foss-2015b.eb b/easybuild/easyconfigs/b/byacc/byacc-20150711-foss-2015b.eb new file mode 100644 index 0000000000..6fabc38da7 --- /dev/null +++ b/easybuild/easyconfigs/b/byacc/byacc-20150711-foss-2015b.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'byacc' +version = '20150711' + +homepage = 'http://invisible-island.net/byacc/byacc.html' +description = """Berkeley Yacc (byacc) is generally conceded to be the best yacc variant available. + In contrast to bison, it is written to avoid dependencies upon a particular compiler.""" + +toolchain = {'name': 'foss', 'version': '2015b'} + +sources = [SOURCELOWER_TGZ] +source_urls = ['ftp://invisible-island.net/byacc'] + +checksums = ['2700401030583c4e9169ac7ea7d08de8'] + +sanity_check_paths = { + 'files': ["bin/yacc"], + 'dirs': [] +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb new file mode 100644 index 0000000000..4f3144bb99 --- /dev/null +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb @@ -0,0 +1,39 @@ +easyblock = 'MakeCp' + +name = 'DL_POLY_Classic' +version = '1.9' + +homepage = 'http://ccpforge.cse.rl.ac.uk/gf/project/dl_poly_classic/' +description = """DL_POLY Classic is a freely available molecular dynamics program developed + from the DL_POLY_2 package. This version does not install the java gui.""" + +toolchain = {'name': 'foss', 'version': '2015b'} +toolchainopts = {'usempi': True} + +sources = ['dl_class_%(version)s.tar.gz'] +source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] + +plumedversion = '2.1.4' +versionsuffix = '-PLUMED-%s' % plumedversion + +dependencies = [('PLUMED', plumedversion)] + +# this patch needs to be regenerated for another version of PLUMED +patches = [('PLUMED-%s.patch' % plumedversion, 1)] + +prebuildopts = 'cd srcmod && ' +buildopts = 'gfortran' + +files_to_copy = [(["execute/cleanup", "execute/copy", "execute/DLPOLY.X", + "execute/gopoly", "execute/gui", "execute/select", + "execute/store", "execute/supa"], 'bin')] + +sanity_check_paths = { + 'files': ['bin/DLPOLY.X'], + 'dirs': [] +} + +# parallel build tends to break +parallel = 1 + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.1.4.patch b/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.1.4.patch new file mode 100644 index 0000000000..5f59693c28 --- /dev/null +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.1.4.patch @@ -0,0 +1,95318 @@ +# This patch allows to use Plumed 2.1.4 with DL_POLY. It is autogenerated with the help +# of Plumed and https://groups.google.com/forum/#!topic/plumed-users/cWaIDU5F6Bw +# Follow the instructions on that forum and you can generate the patch below +# The makefile is also adjust to use the EB set values for building +# Ward Poelmans + +diff -urN dl_class_1.9.orig/build/MakePAR dl_class_1.9/build/MakePAR +--- dl_class_1.9.orig/build/MakePAR 2011-02-22 12:46:11.000000000 +0100 ++++ dl_class_1.9/build/MakePAR 2015-11-16 17:17:11.322040795 +0100 +@@ -6,10 +6,10 @@ + #======================================================================= + + BINROOT = ../execute +-CC = gcc ++CC := $(MPICC) + EX = DLPOLY.X + EXE = $(BINROOT)/$(EX) +-FC=undefined ++FC := $(MPIF90) + SHELL=/bin/sh + TYPE=par + +@@ -54,9 +54,9 @@ + + #================== GNU Fortran, MPI version ============================== + gfortran: +- $(MAKE) FC="mpif90" LD="mpif90 -o" \ +- LDFLAGS="-O2 -ffast-math" \ +- FFLAGS="-c -O2 -ffast-math" \ ++ $(MAKE) FC="$(MPIF90)" LD="$(MPIF90) -o" \ ++ LDFLAGS="$(LDFLAGS)" \ ++ FFLAGS="-c $(FFLAGS)" \ + EX=$(EX) BINROOT=$(BINROOT) $(TYPE) + + #================= Woodcrest ========================================= +diff -urN dl_class_1.9.orig/Plumed.cmake dl_class_1.9/Plumed.cmake +--- dl_class_1.9.orig/Plumed.cmake 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/Plumed.cmake 2015-11-16 17:23:39.940977000 +0100 +@@ -0,0 +1,3 @@ ++# PLUMED: runtime installation ++set(PLUMED_LOAD -L$ENV{EBROOTPLUMED}/lib -lplumed -ldl ) ++set(PLUMED_DEPENDENCIES) +diff -urN dl_class_1.9.orig/Plumed.h dl_class_1.9/Plumed.h +--- dl_class_1.9.orig/Plumed.h 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/Plumed.h 2015-10-13 11:08:41.000000000 +0200 +@@ -0,0 +1,494 @@ ++/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++ Copyright (c) 2011-2014 The plumed team ++ (see the PEOPLE file at the root of the distribution for a list of names) ++ ++ See http://www.plumed-code.org for more information. ++ ++ This file is part of plumed, version 2. ++ ++ plumed is free software: you can redistribute it and/or modify ++ it under the terms of the GNU Lesser General Public License as published by ++ the Free Software Foundation, either version 3 of the License, or ++ (at your option) any later version. ++ ++ plumed is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public License ++ along with plumed. If not, see . +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ ++#ifndef __PLUMED_wrapper_Plumed_h ++#define __PLUMED_wrapper_Plumed_h ++ ++/** ++\page ReferencePlumedH Reference for interfacing MD codes with PLUMED ++ ++ Plumed.h and Plumed.c contain the external plumed interface, which is used to ++ integrate it with MD engines. This interface is very general, and is expected ++ not to change across plumed versions. Plumed.c also implements a dummy version ++ of the interface, so as to allow a code to be fully linked even if the plumed ++ library is not available yet. These files could be directly included in the official ++ host MD distribution. In this manner, it will be sufficient to link the plumed ++ library at link time (on all systems) or directly at runtime (on system where ++ dynamic loading is enabled) to include plumed features. ++ ++ Why is Plumed.c written in C and not C++? The reason is that the resulting Plumed.o ++ needs to be linked with the host MD code immediately (whereas the rest of plumed ++ could be linked a posteriori). Imagine the MD code is written in FORTRAN: when we ++ link the Plumed.o file we would like not to need any C++ library linked. In this ++ manner, we do not need to know which C++ compiler will be used to compile plumed. ++ The C++ library is only linked to the "rest" of plumed, which actually use it. ++ Anyway, Plumed.c is written in such a manner to allow its compilation also in C++ ++ (C++ is a bit stricter than C; compatibility is checked when PlumedStatic.cpp, ++ which basically includes Plumed.c, is compiled with the C++ compiler). This will ++ allow e.g. MD codes written in C++ to just incorporate Plumed.c (maybe renamed into ++ Plumed.cpp), without the need of configuring a plain C compiler. ++ ++ Plumed interface can be used from C, C++ and FORTRAN. Everything concerning plumed ++ is hidden inside a single object type, which is described in C by a structure ++ (struct \ref plumed), in C++ by a class (PLMD::Plumed) and in FORTRAN by a ++ fixed-length string (CHARACTER(LEN=32)). Obviously C++ can use both struct ++ and class interfaces, but the first should be preferred. The reference interface ++ is the C one, whereas FORTRAN and C++ interfaces are implemented as wrappers ++ around it. ++ ++ In the C++ interface, all the routines are implemented as methods of PLMD::Plumed. ++ In the C and FORTRAN interfaces, all the routines are named plumed_*, to ++ avoid potential name clashes. Notice that the entire plumed library ++ is implemented in C++, and it is hidden inside the PLMD namespace. ++ ++ Handlers to the plumed object can be converted among different representations, ++ to allow inter-operability among languages. In C, there are tools to convert ++ to/from FORTRAN, whereas in C++ there are tools to convert to/from FORTRAN and C. ++ ++ These handlers only contain a pointer to the real structure, so that ++ when a plumed object is brought from one language to another, ++ it brings a reference to the same environment. ++ ++ Moreover, to simplify life in all cases where a single Plumed object is ++ required for the entire simulation (which covers most of the practical ++ applications with conventional MD codes) it is possible to take advantage ++ of a global interface, which is implicitly referring to a unique global instance. ++ The global object should still be initialized and finalized properly. ++ ++ The basic method to send a message to plumed is ++\verbatim ++ (C) plumed_cmd ++ (C++) PLMD::Plumed::cmd ++ (FORTRAN) PLUMED_F_CMD ++\endverbatim ++ ++ To initialize a plumed object, use: ++\verbatim ++ (C) plumed_create ++ (C++) (constructor of PLMD::Plumed) ++ (FORTRAN) PLUMED_F_CREATE ++\endverbatim ++ ++ To finalize it, use ++\verbatim ++ (C) plumed_finalize ++ (C++) (destructor of PLMD::Plumed) ++ (FORTRAN) PLUMED_F_FINALIZE ++\endverbatim ++ ++ To access to the global-object, use ++\verbatim ++ (C) plumed_gcreate, plumed_gfinalize, plumed_gcmd ++ (C++) PLMD::Plumed::gcreate, PLMD::Plumed::gfinalize, PLMD::Plumed::gcmd ++ (FORTRAN) PLUMED_F_GCREATE, PLUMED_F_GFINALIZE, PLUMED_F_GCMD ++\endverbatim ++ ++ To check if the global object has been initialized, use ++\verbatim ++ (C) plumed_ginitialized ++ (C++) PLMD::Plumed::ginitialized ++ (FORTRAN) PLUMED_F_GINITIALIZED ++\endverbatim ++ ++ To check if plumed library is available (this is useful for runtime linking), use ++\verbatim ++ (C) plumed_installed ++ (C++) PLMD::Plumed::installed ++ (FORTRAN) PLUMED_F_INSTALLED ++\endverbatim ++ ++ To convert handlers use ++\verbatim ++ (C) plumed_c2f (C to FORTRAN) ++ (C) plumed_f2c (FORTRAN to C) ++ (C++) Plumed(plumed) constructor (C to C++) ++ (C++) operator plumed() cast (C++ to C) ++ (C++) Plumed(char*) constructor (FORTRAN to C++) ++ (C++) toFortran(char*) (C++ to FORTRAN) ++\endverbatim ++ ++\verbatim ++ FORTRAN interface ++ SUBROUTINE PLUMED_F_INSTALLED(i) ++ INTEGER, INTENT(OUT) :: i ++ SUBROUTINE PLUMED_F_GINITIALIZED(i) ++ INTEGER, INTENT(OUT) :: i ++ SUBROUTINE PLUMED_F_GCREATE() ++ SUBROUTINE PLUMED_F_GCMD(key,val) ++ CHARACTER(LEN=*), INTENT(IN) :: key ++ UNSPECIFIED_TYPE, INTENT(INOUT) :: val(*) ++ SUBROUTINE PLUMED_F_GFINALIZE() ++ SUBROUTINE PLUMED_F_GLOBAL(p) ++ CHARACTER(LEN=32), INTENT(OUT) :: p ++ SUBROUTINE PLUMED_F_CREATE(p) ++ CHARACTER(LEN=32), INTENT(OUT) :: p ++ SUBROUTINE PLUMED_F_CMD(p,key,val) ++ CHARACTER(LEN=32), INTENT(IN) :: p ++ CHARACTER(LEN=*), INTENT(IN) :: key ++ UNSPECIFIED_TYPE, INTENT(INOUT) :: val(*) ++ SUBROUTINE PLUMED_F_FINALIZE(p) ++ CHARACTER(LEN=32), INTENT(IN) :: p ++\endverbatim ++ ++ The main routine is "cmd", which accepts two arguments: ++ key is a string containing the name of the command ++ val is the argument. it is declared const so as to use allow passing const objects, but in practice plumed ++ is going to modify val in several cases (using a const_cast). ++ In some cases val can be omitted: just pass a NULL pointer (in C++, val is optional and can be omitted). ++ The set of possible keys is the real API of the plumed library, and will be expanded with time. ++ New commands will be added, but backward compatibility will be retained as long as possible. ++ ++ To pass plumed a callback function use the following syntax (not available in FORTRAN yet) ++\verbatim ++ plumed_function_holder ff; ++ ff.p=your_function; ++ plumed_cmd(plumed,"xxxx",&ff); ++\endverbatim ++ (this is passing the your_function() function to the "xxxx" command) ++*/ ++ ++#ifdef __cplusplus ++ extern "C" { ++#endif ++ ++/* Generic function pointer */ ++typedef void (*plumed_function_pointer)(void); ++ ++/** ++ \brief Holder for function pointer. ++ ++ To pass plumed a callback function use the following syntax: ++\verbatim ++ plumed_function_holder ff; ++ ff.p=your_function; ++ plumed_cmd(plumed,"xxxx",&ff); ++\endverbatim ++ (this is going to pass the your_function() function to the "xxxx" command) ++*/ ++ ++typedef struct { ++ plumed_function_pointer p; ++} plumed_function_holder; ++ ++/** ++ \brief Main plumed object ++ ++ This is an object containing a Plumed instance, which should be used in ++ the MD engine. It should first be initialized with plumed_create(), ++ then it communicates with the MD engine using plumed_cmd(). Finally, ++ before the termination, it should be deallocated with plumed_finalize(). ++ Its interface is very simple and general, and is expected ++ not to change across plumed versions. See \ref ReferencePlumedH. ++*/ ++typedef struct { ++/** ++ \private ++ \brief Void pointer holding the real PlumedMain structure ++*/ ++ void*p; ++} plumed; ++ ++/** \relates plumed ++ \brief Constructor ++ ++ \return The constructed plumed object ++*/ ++plumed plumed_create(void); ++ ++/** \relates plumed ++ \brief Tells p to execute a command ++ ++ \param p The plumed object on which command is acting ++ \param key The name of the command to be executed ++ \param val The argument. It is declared as const to allow calls like plumed_cmd(p,"A","B"), ++ but for some choice of key it can change the content ++*/ ++void plumed_cmd(plumed p,const char*key,const void*val); ++ ++/** \relates plumed ++ \brief Destructor ++ ++ \param p The plumed object to be deallocated ++*/ ++void plumed_finalize(plumed p); ++ ++/** \relates plumed ++ \brief Check if plumed is installed (for runtime binding) ++ ++ \return 1 if plumed is installed, to 0 otherwise ++*/ ++int plumed_installed(void); ++ ++/** \relates plumed ++ \brief Retrieves an handler to the global structure. ++*/ ++plumed plumed_global(void); ++ ++/** \relates plumed ++ \brief Check if the global interface has been initialized ++ ++ \return 1 if plumed has been initialized, 0 otherwise ++*/ ++int plumed_ginitialized(void); ++ ++/* global C interface, working on a global object */ ++ ++/** \relates plumed ++ \brief Constructor for the global interface. ++ ++ \note Equivalent to plumed_create(), but initialize a static global plumed object ++*/ ++void plumed_gcreate(void); ++ ++/** \relates plumed ++ \brief Tells to the global interface to execute a command. ++ ++ \param key The name of the command to be executed ++ \param val The argument. It is declared as const to allow calls like plumed_gcmd("A","B"), ++ but for some choice of key it can change the content ++ ++ \note Equivalent to plumed_cmd(), but skipping the plumed argument ++*/ ++void plumed_gcmd(const char* key,const void* val); ++ ++/** \relates plumed ++ \brief Destructor for the global interface. ++ ++ \note Equivalent to plumed_finalize(), but skipping the plumed argument ++*/ ++void plumed_gfinalize(void); ++ ++/* routines to convert char handler from/to plumed objects */ ++ ++/** \related plumed ++ \brief Converts a C handler to a FORTRAN handler ++ ++ \param p The C handler ++ \param c The FORTRAN handler (a char[32]) ++*/ ++void plumed_c2f(plumed p,char* c); ++ ++/** \related plumed ++ \brief Converts a FORTRAN handler to a C handler ++ \param c The FORTRAN handler (a char[32]) ++ \return The C handler ++*/ ++plumed plumed_f2c(const char* c); ++ ++#ifdef __cplusplus ++ } ++#endif ++ ++#ifdef __cplusplus ++ ++/* this is to include the NULL pointer */ ++#include ++ ++/* C++ interface is hidden in PLMD namespace (same as plumed library) */ ++namespace PLMD { ++ ++/** ++ C++ wrapper for \ref plumed. ++ ++ This class provides a C++ interface to PLUMED. ++*/ ++ ++class Plumed{ ++ plumed main; ++/** ++ keeps track if the object was created from scratch using ++ the defaults destructor (cloned=false) or if it was imported ++ from C or FORTRAN (cloned-true). In the latter case, the ++ plumed_finalize() method is not called when destructing the object, ++ since it is expected to be finalized in the C/FORTRAN code ++*/ ++ bool cloned; ++public: ++/** ++ Check if plumed is installed (for runtime binding) ++ \return true if plumed is installed, false otherwise ++*/ ++ static bool installed(); ++/** ++ Check if global-plumed has been initialized ++ \return true if global plumed object (see global()) is initialized (i.e. if gcreate() has been ++ called), false otherwise. ++*/ ++ static bool ginitialized(); ++/** ++ Initialize global-plumed ++*/ ++ static void gcreate(); ++/** ++ Send a command to global-plumed ++ \param key The name of the command to be executed ++ \param val The argument. It is declared as const to allow calls like gcmd("A","B"), ++ but for some choice of key it can change the content ++*/ ++ static void gcmd(const char* key,const void* val); ++/** ++ Finalize global-plumed ++*/ ++ static void gfinalize(); ++/** ++ Returns the Plumed global object ++ \return The Plumed global object ++*/ ++ static Plumed global(); ++/** ++ Constructor ++*/ ++ Plumed(); ++/** ++ Clone a Plumed object from a FORTRAN char* handler ++ \param c The FORTRAN handler (a char[32]). ++ ++ \attention The Plumed object created in this manner ++ will not finalize the corresponding plumed structure. ++ It is expected that the FORTRAN code calls plumed_c_finalize for it ++*/ ++ Plumed(const char*c); ++/** ++ Clone a Plumed object from a C plumed structure ++ \param p The C plumed structure. ++ ++ \attention The Plumed object created in this manner ++ will not finalize the corresponding plumed structure. ++ It is expected that the C code calls plumed_finalize for it ++*/ ++ Plumed(plumed p); ++private: ++/** Copy constructor is disabled (private and unimplemented) ++ The problem here is that after copying it will not be clear who is ++ going to finalize the corresponding plumed structure. ++*/ ++ Plumed(const Plumed&); ++/** Assignment operator is disabled (private and unimplemented) ++ The problem here is that after copying it will not be clear who is ++ going to finalize the corresponding plumed structure. ++*/ ++ Plumed&operator=(const Plumed&); ++public: ++/** ++ Retrieve the C plumed structure for this object ++*/ ++ operator plumed()const; ++/** ++ Retrieve a FORTRAN handler for this object ++ \param c The FORTRAN handler (a char[32]). ++*/ ++ void toFortran(char*c)const; ++/** ++ Send a command to this plumed object ++ \param key The name of the command to be executed ++ \param val The argument. It is declared as const to allow calls like p.cmd("A","B"), ++ but for some choice of key it can change the content ++*/ ++ void cmd(const char*key,const void*val=NULL); ++/** ++ Destructor ++ ++ Destructor is virtual so as to allow correct inheritance from Plumed object. ++ To avoid linking problems with g++, I specify "inline" also here (in principle ++ it should be enough to specify it down in the definition of the function, but ++ for some reason that I do not understand g++ does not inline it properly in that ++ case and complains when Plumed.h is included but Plumed.o is not linked. Anyway, the ++ way it is done here seems to work properly). ++*/ ++ inline virtual ~Plumed(); ++}; ++ ++/* All methods are inlined so as to avoid the compilation of an extra c++ file */ ++ ++inline ++bool Plumed::installed(){ ++ return plumed_installed(); ++} ++ ++inline ++Plumed::Plumed(): ++ main(plumed_create()), ++ cloned(false) ++{} ++ ++inline ++Plumed::Plumed(const char*c): ++ main(plumed_f2c(c)), ++ cloned(true) ++{} ++ ++inline ++Plumed::Plumed(plumed p): ++ main(p), ++ cloned(true) ++{} ++ ++inline ++Plumed::operator plumed()const{ ++ return main; ++} ++ ++inline ++void Plumed::toFortran(char*c)const{ ++ plumed_c2f(main,c); ++} ++ ++inline ++void Plumed::cmd(const char*key,const void*val){ ++ plumed_cmd(main,key,val); ++} ++ ++inline ++Plumed::~Plumed(){ ++ if(!cloned)plumed_finalize(main); ++} ++ ++inline ++bool Plumed::ginitialized(){ ++ return plumed_ginitialized(); ++} ++ ++inline ++void Plumed::gcreate(){ ++ plumed_gcreate(); ++} ++ ++inline ++void Plumed::gcmd(const char* key,const void* val){ ++ plumed_gcmd(key,val); ++} ++ ++inline ++void Plumed::gfinalize(){ ++ plumed_gfinalize(); ++} ++ ++inline ++Plumed Plumed::global(){ ++ return plumed_global(); ++} ++ ++} ++ ++#endif ++ ++ ++#endif +diff -urN dl_class_1.9.orig/Plumed.inc dl_class_1.9/Plumed.inc +--- dl_class_1.9.orig/Plumed.inc 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/Plumed.inc 2015-11-16 17:22:29.921325000 +0100 +@@ -0,0 +1,3 @@ ++# PLUMED: runtime installation ++PLUMED_LOAD= -L$(EBROOTPLUMED)/lib -lplumed -ldl ++PLUMED_DEPENDENCIES= +diff -urN dl_class_1.9.orig/srcmod/angles_module.f dl_class_1.9/srcmod/angles_module.f +--- dl_class_1.9.orig/srcmod/angles_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/angles_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,741 @@ ++ module angles_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining valence angle potentials ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c modified - p.-a.cazade oct 2007 : solvation etc. ++c modified - d. quigley 2010 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmang(:,:) ++ integer, allocatable :: listang(:,:) ++ integer, allocatable :: numang(:),keyang(:),lstang(:,:) ++ ++ save prmang,listang,numang,keyang,lstang ++ ++ contains ++ ++ subroutine alloc_ang_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining valence angle potential arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(5) ++ ++ do i=1,5 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmang(mxtang,mxpang),stat=fail(1)) ++ allocate (numang(mxtmls),stat=fail(2)) ++ allocate (keyang(mxtang),stat=fail(3)) ++ allocate (lstang(mxtang,3),stat=fail(4)) ++ allocate (listang(mxangl,4),stat=fail(5)) ++ ++ do i=1,5 ++ if(fail(i).gt.0)call error(idnode,1010) ++ enddo ++ ++ do i=1,mxtmls ++ numang(i)=0 ++ enddo ++ ++ end subroutine alloc_ang_arrays ++ ++ subroutine define_angles ++ x (safe,idnode,itmols,nangle,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining bond angles ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,itmols,nangle,nsite,ntmp,i,iang,iang1 ++ integer idum,iatm1,iatm2,iatm3,isite1,isite2,isite3,ia,ja ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numang(itmols)=numang(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of bond angles', ++ x 10x,i10)")ntmp ++ write(nrite,"(/,/,1x,'bond angle details:', ++ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, ++ x 'index',5x,'f-const',7x,'angle',/)") ++ endif ++ ++ iang1=numang(itmols) ++ do iang=1,iang1 ++ ++c read bond angle potential parameters ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ iatm3=intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ isite3=nsite-numsit(itmols)+iatm3 ++ ++ if(lfzsit(isite1)*lfzsit(isite2)* ++ x lfzsit(isite3).ne.0)then ++ ++ numang(itmols)=numang(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ nangle=nangle+1 ++ ++ if(nangle.gt.mxtang)call error(idnode,50) ++ ++ if(keyword(1:4).eq.'harm')then ++ keyang(nangle)=1 ++ elseif(keyword(1:4).eq.'-hrm')then ++ keyang(nangle)=-1 ++ elseif(keyword(1:4).eq.'quar')then ++ keyang(nangle)=2 ++ elseif(keyword(1:4).eq.'-qur')then ++ keyang(nangle)=-2 ++ elseif(keyword(1:4).eq.'thrm')then ++ keyang(nangle)=3 ++ elseif(keyword(1:4).eq.'-thm')then ++ keyang(nangle)=-3 ++ elseif(keyword(1:4).eq.'shrm')then ++ keyang(nangle)=4 ++ elseif(keyword(1:4).eq.'-shm')then ++ keyang(nangle)=-4 ++ elseif(keyword(1:4).eq.'bvs1')then ++ keyang(nangle)=5 ++ elseif(keyword(1:4).eq.'-bv1')then ++ keyang(nangle)=-5 ++ elseif(keyword(1:4).eq.'bvs2')then ++ keyang(nangle)=6 ++ elseif(keyword(1:4).eq.'-bv2')then ++ keyang(nangle)=-6 ++ elseif(keyword(1:4).eq.'hcos')then ++ keyang(nangle)=7 ++ elseif(keyword(1:4).eq.'-hcs')then ++ keyang(nangle)=-7 ++ elseif(keyword(1:4).eq.'cos ')then ++ keyang(nangle)=8 ++ elseif(keyword(1:4).eq.'-cos')then ++ keyang(nangle)=-8 ++ elseif(keyword(1:4).eq.'mmsb')then ++ keyang(nangle)=9 ++ elseif(keyword(1:4).eq.'-msb')then ++ keyang(nangle)=-9 ++ elseif(keyword(1:4).eq.'stst') then ++ keyang(nangle)=10 ++ elseif(keyword(1:4).eq.'-sts') then ++ keyang(nangle)=-10 ++ elseif(keyword(1:4).eq.'stbe') then ++ keyang(nangle)=11 ++ elseif(keyword(1:4).eq.'-stb') then ++ keyang(nangle)=-11 ++ elseif(keyword(1:4).eq.'cmps') then ++ keyang(nangle)=12 ++ elseif(keyword(1:4).eq.'-cmp') then ++ keyang(nangle)=-12 ++ else ++ if(idnode.eq.0)write(nrite,*)message ++ call error(idnode,440) ++ endif ++ ++ lstang(nangle,1)=iatm1 ++ lstang(nangle,2)=iatm2 ++ lstang(nangle,3)=iatm3 ++ prmang(nangle,1)=dblstr(record,lenrec,idum) ++ prmang(nangle,2)=dblstr(record,lenrec,idum) ++ prmang(nangle,3)=dblstr(record,lenrec,idum) ++ prmang(nangle,4)=dblstr(record,lenrec,idum) ++ prmang(nangle,5)=dblstr(record,lenrec,idum) ++ prmang(nangle,6)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,3i10,1p,e12.4,0p,9f12.6)") ++ x keyword(1:4),(lstang(nangle,ia),ia=1,3), ++ x (prmang(nangle,ja),ja=1,mxpang) ++ ++c convert energies to internal units ++ ++ prmang(nangle,1)=prmang(nangle,1)*engunit ++ if(abs(keyang(nangle)).eq.2)then ++ prmang(nangle,3)=prmang(nangle,3)*engunit ++ prmang(nangle,4)=prmang(nangle,4)*engunit ++ elseif(abs(keyang(nangle)).eq.12)then ++ prmang(nangle,2)=prmang(nangle,2)*engunit ++ prmang(nangle,3)=prmang(nangle,3)*engunit ++ endif ++ ++c convert angles to radians ++ ++ if(abs(keyang(nangle)).eq.12)then ++ prmang(nangle,4)=prmang(nangle,4)*(pi/180.d0) ++ elseif(abs(keyang(nangle)).ne.10)then ++ prmang(nangle,2)=prmang(nangle,2)*(pi/180.d0) ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_angles ++ ++ subroutine angfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntangl,engang,virang) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating bond angle energy and ++c force terms in molecular dynamics. ++c ++c replicated data - blocked version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith may 1992 ++c modified - t. forester feb 1993 ++c modified - t. forester nov 1994 : block data ++c modified - t. forester may 1995 : stress tensor ++c modified - p.-a.cazade oct 2007 : solvation etc. ++c modified - d. quigley nov 2010 : metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect ++ logical idrive,jdrive,kdrive ++ integer idnode,mxnode,imcon,ntangl,fail1,fail2 ++ integer ii,iang1,iang2,i,ia,ib,ic,kk,keya ++ real(8) engang,virang,theta,fxc,fyc,fzc,rab,xab ++ real(8) yab,zab,rbc,xbc,ybc,zbc,sint,cost,pterm,vterm ++ real(8) gamma,gamsa,gamsc,rrbc,rrab,fxa,fya,fza ++ real(8) strs(6),strs_loc(6) ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ real(8), allocatable :: xdbc(:),ydbc(:),zdbc(:) ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) ++ allocate (xdbc(msbad),ydbc(msbad),zdbc(msbad),stat=fail2) ++ if(fail1.ne.fail2)call error(idnode,1020) ++ ++c flag for undefined potentials ++ ++ safe=.true. ++ ++c check size of work arrays ++ ++ if((ntangl-mxnode+1)/mxnode.gt.msbad)call error(idnode,419) ++ ++c block indices ++ ++ iang1=(idnode*ntangl)/mxnode+1 ++ iang2=((idnode+1)*ntangl)/mxnode ++ ++c zero accumulators ++ ++ engang=0.d0 ++ virang=0.d0 ++ ang_fre=0.d0 ++ ang_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(2)=.true. ++ ang_sol(:)=0.d0 ++ if(lexcite)ang_exc(:)=0.d0 ++ ++ endif ++ ++c calculate atom separation vectors ++ ++ ii=0 ++ do i=iang1,iang2 ++ ++ ii=ii+1 ++ ++c indices of bonded atoms ++ ++ ia=listang(ii,2) ++ ib=listang(ii,3) ++ ic=listang(ii,4) ++ ++c components of first bond vector ++ ++ xdab(ii)=xxx(ia)-xxx(ib) ++ ydab(ii)=yyy(ia)-yyy(ib) ++ zdab(ii)=zzz(ia)-zzz(ib) ++ ++c components of second bond vector ++ ++ xdbc(ii)=xxx(ic)-xxx(ib) ++ ydbc(ii)=yyy(ic)-yyy(ib) ++ zdbc(ii)=zzz(ic)-zzz(ib) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ call images(imcon,0,1,ii,cell,xdbc,ydbc,zdbc) ++ ++c loop over all specified angle potentials ++ ++ ii=0 ++ do i=iang1,iang2 ++ ++ ii=ii+1 ++ ++c define components of first bond vector ++ ++ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) ++ rrab=1.d0/rab ++ ++ xab=xdab(ii)*rrab ++ yab=ydab(ii)*rrab ++ zab=zdab(ii)*rrab ++ ++c define components of second bond vector ++ ++ rbc=sqrt(xdbc(ii)**2+ydbc(ii)**2+zdbc(ii)**2) ++ rrbc=1.d0/rbc ++ ++ xbc=xdbc(ii)*rrbc ++ ybc=ydbc(ii)*rrbc ++ zbc=zdbc(ii)*rrbc ++ ++c index of potential function parameters ++ ++ kk=listang(ii,1) ++ ++c determine bond angle and calculate potential energy ++ ++ cost=(xab*xbc+yab*ybc+zab*zbc) ++ theta=acos(cost) ++ sint=max(1.d-8,sqrt(1.d0-cost**2)) ++ ++ keya=abs(keyang(kk)) ++ ++ if(keya.eq.1)then ++ ++c harmonic potential ++ ++ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2 ++ gamma=prmang(kk,1)*(theta-prmang(kk,2))/sint ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ elseif(keya.eq.2)then ++ ++c quartic potential ++ ++ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2+ ++ x 1.d0/3.d0*prmang(kk,3)*(theta-prmang(kk,2))**3+ ++ x 0.25d0*prmang(kk,4)*(theta-prmang(kk,2))**4 ++ gamma=(prmang(kk,1)*(theta-prmang(kk,2))+ ++ x prmang(kk,3)*(theta-prmang(kk,2))**2+ ++ x prmang(kk,4)*(theta-prmang(kk,2))**3)/sint ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ elseif(keya.eq.3)then ++ ++c truncated harmonic potential ++ ++ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2* ++ x exp(-(rab**8+rbc**8)/prmang(kk,3)**8) ++ gamma=prmang(kk,1)*(theta-prmang(kk,2))* ++ x exp(-(rab**8+rbc**8)/prmang(kk,3)**8)/sint ++ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmang(kk,3)**8 ++ gamsa=(8.d0*pterm/prmang(kk,3)**8)*rab**7 ++ gamsc=(8.d0*pterm/prmang(kk,3)**8)*rbc**7 ++ ++ elseif(keya.eq.4)then ++ ++c screened harmonic potential ++ ++ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2* ++ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4))) ++ gamma=prmang(kk,1)*(theta-prmang(kk,2))* ++ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4)))/sint ++ vterm=-pterm*(rab/prmang(kk,3)+rbc/prmang(kk,4)) ++ gamsa=(pterm/prmang(kk,3)) ++ gamsc=(pterm/prmang(kk,4)) ++ ++ elseif(keya.eq.5)then ++ ++c screened vessal potential (type 1) ++ ++ pterm=(prmang(kk,1)/(8.d0*(prmang(kk,2)-pi)**2)* ++ x (((prmang(kk,2)-pi)**2-(theta-pi)**2)**2))* ++ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4))) ++ gamma=(prmang(kk,1)/(2.d0*(prmang(kk,2)-pi)**2)* ++ x ((prmang(kk,2)-pi)**2-(theta-pi)**2)*(theta-pi))* ++ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4)))/sint ++ vterm=-pterm*(rab/prmang(kk,3)+rbc/prmang(kk,4)) ++ gamsa=(pterm/prmang(kk,3)) ++ gamsc=(pterm/prmang(kk,4)) ++ ++ elseif(keya.eq.6)then ++ ++c truncated vessal potential (type 2) ++ ++ pterm=prmang(kk,1)*(theta**prmang(kk,3)*(theta-prmang(kk,2)) ++ x **2*(theta+prmang(kk,2)-2.d0*pi)**2-0.5d0*prmang(kk,3)*pi ++ x **(prmang(kk,3)-1.d0)*(theta-prmang(kk,2))**2*(pi-prmang(kk, ++ x 2))**3)*exp(-(rab**8+rbc**8)/prmang(kk,4)**8) ++ gamma=prmang(kk,1)*(theta**(prmang(kk,3)-1.d0)*(theta-prmang ++ x (kk,2))*(theta+prmang(kk,2)-2.d0*pi)*((prmang(kk,3)+4.d0)* ++ x theta**2-2.d0*pi*(prmang(kk,3)+2.d0)*theta+prmang(kk,3)* ++ x prmang(kk,2)*(2.d0*pi-prmang(kk,2)))-prmang(kk,3)*pi** ++ x (prmang(kk,3)-1.d0)*(theta-prmang(kk,2))*(pi-prmang(kk,2)) ++ x **3)*exp(-(rab**8+rbc**8)/prmang(kk,4)**8)/sint ++ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmang(kk,4)**8 ++ gamsa=(8.d0*pterm/prmang(kk,4)**8)*rab**7 ++ gamsc=(8.d0*pterm/prmang(kk,4)**8)*rbc**7 ++ ++ elseif(keya.eq.7)then ++ ++c harmonic cosine potential ++ ++ pterm=0.5d0*prmang(kk,1)*(cos(theta)-cos(prmang(kk,2)))**2 ++ gamma=-prmang(kk,1)*(cos(theta)-cos(prmang(kk,2))) ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ elseif(keya.eq.8)then ++ ++c ordinary cosine potential ++ ++ pterm=prmang(kk,1)*(1+cos(prmang(kk,3)*theta-prmang(kk,2))) ++ gamma=-prmang(kk,1)*prmang(kk,3)*sin(prmang(kk,3)*theta- ++ x prmang(kk,2))/sint ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ elseif(keya.eq.9)then ++ ++c mm3 stretch-bend potential ++ ++ pterm=prmang(kk,1)*(theta-prmang(kk,2))* ++ x (rab-prmang(kk,3))*(rbc-prmang(kk,4)) ++ gamma=prmang(kk,1)*(rab-prmang(kk,3))*(rbc- ++ x prmang(kk,4))/sint ++ gamsa=-prmang(kk,1)*(theta-prmang(kk,2))*(rbc-prmang(kk,4)) ++ gamsc=-prmang(kk,1)*(theta-prmang(kk,2))*(rab-prmang(kk,3)) ++ vterm=-(gamsa*rab+gamsc*rbc) ++ ++ elseif(keya.eq.10)then ++ ++c compass stretch-stretch potential ++ ++ pterm=prmang(kk,1)*(rab-prmang(kk,2))*(rbc-prmang(kk,3)) ++ gamma=0.d0 ++ gamsa=-prmang(kk,1)*(rbc-prmang(kk,3)) ++ gamsc=-prmang(kk,1)*(rab-prmang(kk,2)) ++ vterm=-(gamsa*rab+gamsc*rbc) ++ ++ elseif(keya.eq.11)then ++ ++c compass stretch-bend potential ++ ++ pterm=prmang(kk,1)*(theta-prmang(kk,2))*(rab-prmang(kk,3)) ++ gamma=prmang(kk,1)*(rab-prmang(kk,3))/sint ++ gamsa=-prmang(kk,1)*(theta-prmang(kk,2)) ++ gamsc=0.d0 ++ vterm=-gamsa*rab ++ ++ elseif(keya.eq.12)then ++ ++c combined compass angle potential with 3 coupling terms ++ ++ pterm=prmang(kk,1)*(rab-prmang(kk,5))*(rbc-prmang(kk,6))+ ++ x (theta-prmang(kk,4))*(prmang(kk,2)*(rab-prmang(kk,5))+ ++ x prmang(kk,3)*(rbc-prmang(kk,6))) ++ gamma=(prmang(kk,2)*(rab-prmang(kk,5))+ ++ x prmang(kk,3)*(rbc-prmang(kk,6)))/sint ++ gamsa=-prmang(kk,2)*(theta-prmang(kk,4))- ++ x prmang(kk,1)*(rbc-prmang(kk,6)) ++ gamsc=-prmang(kk,3)*(theta-prmang(kk,4))- ++ x prmang(kk,1)*(rab-prmang(kk,5)) ++ vterm=-(gamsa*rab+gamsc*rbc) ++ ++ else ++ ++c undefined potential ++ ++ safe=.false. ++ pterm=0.d0 ++ vterm=0.d0 ++ gamma=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ endif ++ ++c indices of bonded atoms ++ ++ ia=listang(ii,2) ++ ib=listang(ii,3) ++ ic=listang(ii,4) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ kdrive=driven(ltype(ic)) ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. ++ x (atm_fre(ic).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic).eq.0) ++ ++ if(lsolva)then ++ ang_exc(atmolt(ia))=ang_exc(atmolt(ia))+pterm ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. ++ x (atm_fre(ic).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ ang_fre=ang_fre-pterm ++ ang_vir=ang_vir-vterm ++ pterm=lambda1*pterm ++ vterm=lambda1*vterm ++ gamma=lambda1*gamma ++ gamsa=lambda1*gamsa ++ gamsc=lambda1*gamsc ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. ++ x (atm_fre(ic).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ ang_fre=ang_fre+pterm ++ ang_vir=ang_vir+vterm ++ pterm=lambda2*pterm ++ vterm=lambda2*vterm ++ gamma=lambda2*gamma ++ gamsa=lambda2*gamsa ++ gamsc=lambda2*gamsc ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c sum potential energy and virial ++ ++ engang=engang+pterm ++ virang=virang+vterm ++ ++c calculate solvation energy ++ ++ if(lsolva)then ++ ang_sol(atmolt(ia))=ang_sol(atmolt(ia))+pterm ++ endif ++ ++c calculate atomic forces ++ ++ fxa=gamma*(xbc-xab*cost)*rrab+gamsa*xab ++ fya=gamma*(ybc-yab*cost)*rrab+gamsa*yab ++ fza=gamma*(zbc-zab*cost)*rrab+gamsa*zab ++ ++ fxc=gamma*(xab-xbc*cost)*rrbc+gamsc*xbc ++ fyc=gamma*(yab-ybc*cost)*rrbc+gamsc*ybc ++ fzc=gamma*(zab-zbc*cost)*rrbc+gamsc*zbc ++ ++c sum atomic forces ++ ++ fxx(ia)=fxx(ia)+fxa ++ fyy(ia)=fyy(ia)+fya ++ fzz(ia)=fzz(ia)+fza ++ ++ fxx(ib)=fxx(ib)-fxa-fxc ++ fyy(ib)=fyy(ib)-fya-fyc ++ fzz(ib)=fzz(ib)-fza-fzc ++ ++ fxx(ic)=fxx(ic)+fxc ++ fyy(ic)=fyy(ic)+fyc ++ fzz(ic)=fzz(ic)+fzc ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+rab*xab*fxa+rbc*xbc*fxc ++ strs(2)=strs(2)+rab*xab*fya+rbc*xbc*fyc ++ strs(3)=strs(3)+rab*xab*fza+rbc*xbc*fzc ++ strs(4)=strs(4)+rab*yab*fya+rbc*ybc*fyc ++ strs(5)=strs(5)+rab*yab*fza+rbc*ybc*fzc ++ strs(6)=strs(6)+rab*zab*fza+rbc*zbc*fzc ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+pterm ++ vir_loc=vir_loc+vterm ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fxa ++ fyy_loc(ia)=fyy_loc(ia)+fya ++ fzz_loc(ia)=fzz_loc(ia)+fza ++ ++ fxx_loc(ib)=fxx_loc(ib)-fxa-fxc ++ fyy_loc(ib)=fyy_loc(ib)-fya-fyc ++ fzz_loc(ib)=fzz_loc(ib)-fza-fzc ++ ++ fxx_loc(ic)=fxx_loc(ic)+fxc ++ fyy_loc(ic)=fyy_loc(ic)+fyc ++ fzz_loc(ic)=fzz_loc(ic)+fzc ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+rab*xab*fxa+rbc*xbc*fxc ++ strs_loc(2)=strs_loc(2)+rab*xab*fya+rbc*xbc*fyc ++ strs_loc(3)=strs_loc(3)+rab*xab*fza+rbc*xbc*fzc ++ strs_loc(4)=strs_loc(4)+rab*yab*fya+rbc*ybc*fyc ++ strs_loc(5)=strs_loc(5)+rab*yab*fza+rbc*ybc*fzc ++ strs_loc(6)=strs_loc(6)+rab*zab*fza+rbc*zbc*fzc ++ ++ endif ++ ++ enddo ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,440) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c sum up contributions to potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engang ++ buffer(2)=virang ++ buffer(3)=ang_fre ++ buffer(4)=ang_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engang=buffer(1) ++ virang=buffer(2) ++ ang_fre=buffer(3) ++ ang_vir=buffer(4) ++ ++c sum up solvation energies ++ ++ if(lsolva)then ++ ++ call gdsum(ang_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(ang_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ deallocate (xdab,ydab,zdab,stat=fail1) ++ deallocate (xdbc,ydbc,zdbc,stat=fail2) ++ ++ return ++ end subroutine angfrc ++ ++ end module angles_module +diff -urN dl_class_1.9.orig/srcmod/basic_comms.f dl_class_1.9/srcmod/basic_comms.f +--- dl_class_1.9.orig/srcmod/basic_comms.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/basic_comms.f 2015-11-16 17:21:51.184041995 +0100 +@@ -0,0 +1,389 @@ ++ subroutine initcomms() ++ ++c********************************************************************* ++c ++c communication harness initialisation ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_init MPI_init_ ++ ++ call MPI_init(ierr) ++ ++ return ++ end ++ ++c PLUMED ++ integer*8 function get_comms() ++ ++c********************************************************************* ++c ++c dl_poly subroutine for obtaining the communicator ++c this is used by plumed ++c ++c author - G. Tribello ++c ++c********************************************************************* ++ ++ get_comms=MPI_COMM_WORLD ++ end ++ ++ subroutine machine(idnode,mxnode) ++c PLUMED ++ ++c********************************************************************* ++c ++c dl_poly subroutine for obtaining charcteristics of ++c the computer on which the program is being run ++c ++c copyright daresbury laboratory 1992 ++c author - w.smith july 1992 ++c ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,mynode,numnodes ++ ++ idnode=mynode() ++ mxnode=numnodes() ++ ++ return ++ end ++ ++ integer function mynode() ++ ++c********************************************************************* ++c ++c routine to determine identity of processing node ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_COMM_RANK MPI_COMM_RANK_ ++ ++ call MPI_COMM_RANK(MPI_COMM_WORLD, mynode ,ierr) ++ ++ return ++ end ++ ++ integer function nodedim() ++ ++c********************************************************************* ++c ++c calculate dimension of hypercube ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer i,n,ierr,mxnode ++ ++CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ ++ ++ call MPI_COMM_SIZE(MPI_COMM_WORLD, mxnode ,ierr) ++ n=1 ++ nodedim = -1 ++ do i=0,16 ++ ++ if(n.eq.mxnode)nodedim=i ++ n=2*n ++ ++ enddo ++ ++ return ++ end ++ ++ integer function numnodes() ++ ++c********************************************************************* ++c ++c calculate number of nodes ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ ++ ++ call MPI_COMM_SIZE(MPI_COMM_WORLD, numnodes, ierr) ++ ++ return ++ end ++ ++ subroutine csend(tagmsg,buf,length,pe,idum) ++ ++c********************************************************************* ++c ++c Intel-like csend (double precision) ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer tagmsg,length,pe,idum ++ ++ integer ierr ++ real(8) buf(*) ++ ++CMPIU define MPI_send MPI_send_ ++ ++ call MPI_send(buf,length,MPI_DOUBLE_PRECISION,pe,tagmsg, ++ x MPI_COMM_WORLD,ierr) ++ ++ return ++ end ++ ++ subroutine crecv(tagmsg,buf,length) ++ ++c********************************************************************* ++c ++c Intel-like crecv (double precision) ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer tagmsg,length ++ ++ integer ierr ++ integer status(MPI_STATUS_SIZE) ++ real(8) buf(*) ++ ++CMPIU define MPI_RECV MPI_RECV_ ++ ++ call MPI_RECV(buf,length,MPI_DOUBLE_PRECISION,MPI_ANY_SOURCE, ++ x tagmsg,MPI_COMM_WORLD,status,ierr) ++ ++ return ++ end ++ ++ subroutine gisum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global summation subroutine for hypercube - MPI version ++c integer version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ integer nnn,i,ierror,iii,kk,k,k0,k1,k2,msg1,msg2 ++ integer aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++ ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, ++ x MPI_SUM,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gdsum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global summation subroutine for MPI - hypercube assumed ++c double precision version ++c ++c copyright - daresbury laboratory 1995 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn,i,iii,kk,k1,k2,ierror ++ real(8) aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++ ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_DOUBLE_PRECISION, ++ x MPI_SUM,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gimax(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global maximum subroutine for hypercube - MPI version ++c integer version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ integer nnn,i,iii,kk,k1,k2,k,k0msg1,msg2,ierror ++ integer aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, ++ x MPI_MAX,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gstate(check) ++ ++c*********************************************************************** ++c ++c dl_poly global status subroutine : gisum version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992 ++c MPI version - t. forester may 1995 ++c ++c*********************************************************************** ++ ++ ++ implicit none ++ ++ logical check ++ integer i,idum ++ ++ i = 0 ++ if(.not.check) i = 1 ++ ++ call gisum(i,1,idum) ++ ++ check = (i.eq.0) ++ ++ return ++ end ++ ++ subroutine gsync() ++ ++c********************************************************************* ++c ++c barrier / synchronization routine ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ierr ++ ++ include "comms.inc" ++ ++CMPIU define MPI_BARRIER MPI_BARRIER_ ++ ++ call MPI_BARRIER(MPI_COMM_WORLD,ierr) ++ ++ return ++ end ++ ++ subroutine exitcomms() ++ ++c********************************************************************* ++c ++c exitcomms: exit from communication harness ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++CMPIU define MPI_FINALIZE MPI_FINALIZE_ ++ ++ call MPI_FINALIZE(ierr) ++ call exit(0) ++ ++ return ++ end +diff -urN dl_class_1.9.orig/srcmod/basic_comms.f.preplumed dl_class_1.9/srcmod/basic_comms.f.preplumed +--- dl_class_1.9.orig/srcmod/basic_comms.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/basic_comms.f.preplumed 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,373 @@ ++ subroutine initcomms() ++ ++c********************************************************************* ++c ++c communication harness initialisation ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_init MPI_init_ ++ ++ call MPI_init(ierr) ++ ++ return ++ end ++ ++ subroutine machine(idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for obtaining charcteristics of ++c the computer on which the program is being run ++c ++c copyright daresbury laboratory 1992 ++c author - w.smith july 1992 ++c ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,mynode,numnodes ++ ++ idnode=mynode() ++ mxnode=numnodes() ++ ++ return ++ end ++ ++ integer function mynode() ++ ++c********************************************************************* ++c ++c routine to determine identity of processing node ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_COMM_RANK MPI_COMM_RANK_ ++ ++ call MPI_COMM_RANK(MPI_COMM_WORLD, mynode ,ierr) ++ ++ return ++ end ++ ++ integer function nodedim() ++ ++c********************************************************************* ++c ++c calculate dimension of hypercube ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer i,n,ierr,mxnode ++ ++CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ ++ ++ call MPI_COMM_SIZE(MPI_COMM_WORLD, mxnode ,ierr) ++ n=1 ++ nodedim = -1 ++ do i=0,16 ++ ++ if(n.eq.mxnode)nodedim=i ++ n=2*n ++ ++ enddo ++ ++ return ++ end ++ ++ integer function numnodes() ++ ++c********************************************************************* ++c ++c calculate number of nodes ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++ ++CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ ++ ++ call MPI_COMM_SIZE(MPI_COMM_WORLD, numnodes, ierr) ++ ++ return ++ end ++ ++ subroutine csend(tagmsg,buf,length,pe,idum) ++ ++c********************************************************************* ++c ++c Intel-like csend (double precision) ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer tagmsg,length,pe,idum ++ ++ integer ierr ++ real(8) buf(*) ++ ++CMPIU define MPI_send MPI_send_ ++ ++ call MPI_send(buf,length,MPI_DOUBLE_PRECISION,pe,tagmsg, ++ x MPI_COMM_WORLD,ierr) ++ ++ return ++ end ++ ++ subroutine crecv(tagmsg,buf,length) ++ ++c********************************************************************* ++c ++c Intel-like crecv (double precision) ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer tagmsg,length ++ ++ integer ierr ++ integer status(MPI_STATUS_SIZE) ++ real(8) buf(*) ++ ++CMPIU define MPI_RECV MPI_RECV_ ++ ++ call MPI_RECV(buf,length,MPI_DOUBLE_PRECISION,MPI_ANY_SOURCE, ++ x tagmsg,MPI_COMM_WORLD,status,ierr) ++ ++ return ++ end ++ ++ subroutine gisum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global summation subroutine for hypercube - MPI version ++c integer version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ integer nnn,i,ierror,iii,kk,k,k0,k1,k2,msg1,msg2 ++ integer aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++ ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, ++ x MPI_SUM,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gdsum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global summation subroutine for MPI - hypercube assumed ++c double precision version ++c ++c copyright - daresbury laboratory 1995 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn,i,iii,kk,k1,k2,ierror ++ real(8) aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++ ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_DOUBLE_PRECISION, ++ x MPI_SUM,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gimax(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly global maximum subroutine for hypercube - MPI version ++c integer version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ integer nnn,i,iii,kk,k1,k2,k,k0msg1,msg2,ierror ++ integer aaa(nnn),bbb(nnn) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE) ++CMPIU define MPI_allreduce MPI_allreduce_ ++ ++ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, ++ x MPI_MAX,MPI_COMM_WORLD,ierror) ++ ++ do i = 1,nnn ++ aaa(i) = bbb(i) ++ enddo ++ ++ return ++ end ++ ++ subroutine gstate(check) ++ ++c*********************************************************************** ++c ++c dl_poly global status subroutine : gisum version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992 ++c MPI version - t. forester may 1995 ++c ++c*********************************************************************** ++ ++ ++ implicit none ++ ++ logical check ++ integer i,idum ++ ++ i = 0 ++ if(.not.check) i = 1 ++ ++ call gisum(i,1,idum) ++ ++ check = (i.eq.0) ++ ++ return ++ end ++ ++ subroutine gsync() ++ ++c********************************************************************* ++c ++c barrier / synchronization routine ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ierr ++ ++ include "comms.inc" ++ ++CMPIU define MPI_BARRIER MPI_BARRIER_ ++ ++ call MPI_BARRIER(MPI_COMM_WORLD,ierr) ++ ++ return ++ end ++ ++ subroutine exitcomms() ++ ++c********************************************************************* ++c ++c exitcomms: exit from communication harness ++c ++c copyright - daresbury laboratory ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer ierr ++CMPIU define MPI_FINALIZE MPI_FINALIZE_ ++ ++ call MPI_FINALIZE(ierr) ++ call exit(0) ++ ++ return ++ end +diff -urN dl_class_1.9.orig/srcmod/bonds_module.f dl_class_1.9/srcmod/bonds_module.f +--- dl_class_1.9.orig/srcmod/bonds_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/bonds_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,579 @@ ++ module bonds_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining bond potential arrays ++c copyright - daresbury laboratory ++c ++c author - w. smith sep 2003 ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c adapted for metadynamics ++c - d. quigley 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmbnd(:,:) ++ integer, allocatable :: listbnd(:,:) ++ integer, allocatable :: numbonds(:),keybnd(:),lstbnd(:,:) ++ ++ save prmbnd,listbnd,numbonds,keybnd,lstbnd ++ ++ contains ++ ++ subroutine alloc_bnd_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(5) ++ ++ do i=1,5 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmbnd(mxtbnd,mxpbnd),stat=fail(1)) ++ allocate (numbonds(mxtmls),stat=fail(2)) ++ allocate (keybnd(mxtbnd),stat=fail(3)) ++ allocate (lstbnd(mxtbnd,3),stat=fail(4)) ++ allocate (listbnd(mxbond,4),stat=fail(5)) ++ ++ do i=1,5 ++ if(fail(i).gt.0)call error(idnode,1030) ++ enddo ++ ++ do i=1,mxtmls ++ numbonds(i)=0 ++ enddo ++ ++ end subroutine alloc_bnd_arrays ++ ++ subroutine define_bonds ++ x (safe,idnode,itmols,nbonds,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining bonds ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,itmols,nbonds,nsite,ntmp,ibond,ibond1 ++ integer iatm1,iatm2,isite1,isite2,idum,i,j ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numbonds(itmols)=numbonds(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of chemical bonds', ++ x 7x,i10)")ntmp ++ write(nrite,"(/,/,1x,'chemical bond details:', ++ x /,/,21x,7x,'key',5x,'index',5x,'index',28x, ++ x 'parameters', /)") ++ endif ++ ++ ibond1=numbonds(itmols) ++ do ibond=1,ibond1 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ ++ if(lfzsit(isite1)*lfzsit(isite2).ne.0)then ++ ++ numbonds(itmols)=numbonds(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(12x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ nbonds=nbonds+1 ++ if(nbonds.gt.mxtbnd)call error(idnode,30) ++ ++ if(keyword(1:4).eq.'harm')then ++ keybnd(nbonds)=1 ++ elseif(keyword(1:4).eq.'-hrm')then ++ keybnd(nbonds)=-1 ++ elseif(keyword(1:4).eq.'mors')then ++ keybnd(nbonds)=2 ++ elseif(keyword(1:4).eq.'-mrs')then ++ keybnd(nbonds)=-2 ++ elseif(keyword(1:4).eq.'12-6')then ++ keybnd(nbonds)=3 ++ elseif(keyword(1:4).eq.'-126')then ++ keybnd(nbonds)=-3 ++ elseif(keyword(1:4).eq.'rhrm')then ++ keybnd(nbonds)=4 ++ elseif(keyword(1:4).eq.'-rhm')then ++ keybnd(nbonds)=-4 ++ elseif(keyword(1:4).eq.'quar')then ++ keybnd(nbonds)=5 ++ elseif(keyword(1:4).eq.'-qur')then ++ keybnd(nbonds)=-5 ++ elseif(keyword(1:4).eq.'buck')then ++ keybnd(nbonds)=6 ++ elseif(keyword(1:4).eq.'-bck')then ++ keybnd(nbonds)=-6 ++ elseif(keyword(1:4).eq.'fene')then ++ keybnd(nbonds)=7 ++ elseif(keyword(1:4).eq.'-fen')then ++ keybnd(nbonds)=-7 ++ elseif(keyword(1:4).eq.'coul')then ++ keybnd(nbonds)=8 ++ elseif(keyword(1:4).eq.'-cou')then ++ keybnd(nbonds)=-8 ++ else ++ if(idnode.eq.0)write(nrite,*)message ++ call error(idnode,444) ++ endif ++ ++ lstbnd(nbonds,1)=iatm1 ++ lstbnd(nbonds,2)=iatm2 ++ prmbnd(nbonds,1)=dblstr(record,lenrec,idum) ++ prmbnd(nbonds,2)=dblstr(record,lenrec,idum) ++ prmbnd(nbonds,3)=dblstr(record,lenrec,idum) ++ prmbnd(nbonds,4)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,2i10,2x,1p,10e15.6)") ++ x keyword(1:4),lstbnd(nbonds,1), ++ x lstbnd(nbonds,2),(prmbnd(nbonds,j),j=1,mxpbnd) ++c ++c convert energy units to internal units ++ ++ if(abs(keybnd(nbonds)).eq.3)then ++ prmbnd(nbonds,2)=prmbnd(nbonds,2)*engunit ++ endif ++ if(abs(keybnd(nbonds)).eq.5)then ++ prmbnd(nbonds,3)=prmbnd(nbonds,3)*engunit ++ prmbnd(nbonds,4)=prmbnd(nbonds,4)*engunit ++ endif ++ if(abs(keybnd(nbonds)).eq.6)then ++ prmbnd(nbonds,3)=prmbnd(nbonds,3)*engunit ++ endif ++ ++ if(abs(keybnd(nbonds)).ne.8) ++ x prmbnd(nbonds,1)=prmbnd(nbonds,1)*engunit ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_bonds ++ ++ subroutine bndfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntbond,epsq, ++ x engbnd,virbnd) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating chemical bond energy and ++c force terms in molecular dynamics. ++c ++c replicated data - blocked data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992 ++c modified - t. forester march 1993 ++c modified - t. forester march 1994 ++c modified - t. forester may 1994 ++c modified - t. forester nov 1994 ++c modified - w. smith nov 2006 ++c modified - p.-a. cazade oct 2007, solvation etc. ++c modified - d. quigley 2007, metdynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect ++ logical idrive,jdrive ++ integer i,fail,ibnd1,ibnd2,idnode,mxnode,ii,ia,ib,imcon ++ integer keyb,kk,ntbond ++ real(8) strs(6),strs_loc(6) ++ real(8) rab,rrab,omega,gamma,fx,fy,fz,engbnd,virbnd,epsq ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail) ++ if(fail.ne.0)call error(idnode,1040) ++ ++c flag for undefined potential ++ ++ safe=.true. ++ ++c check size of work arrays ++ ++ if((ntbond-mxnode+1)/mxnode.gt.msbad)call error(idnode,418) ++ ++c block indices ++ ++ ibnd1=(idnode*ntbond)/mxnode+1 ++ ibnd2=((idnode+1)*ntbond)/mxnode ++ ++c initialise accumulators ++ ++ engbnd=0.d0 ++ virbnd=0.d0 ++ bnd_fre=0.d0 ++ bnd_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(1)=.true. ++ bnd_sol(:)=0.d0 ++ if(lexcite)bnd_exc(:)=0.d0 ++ ++ endif ++ ++c calculate atom separation vectors ++ ++ ii=0 ++ do i=ibnd1,ibnd2 ++ ++ ii=ii+1 ++ ++c indices of bonded atoms ++ ++ ia=listbnd(ii,2) ++ ib=listbnd(ii,3) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ ++ endif ++ ++c components of bond vector ++ ++ xdab(ii)=xxx(ia)-xxx(ib) ++ ydab(ii)=yyy(ia)-yyy(ib) ++ zdab(ii)=zzz(ia)-zzz(ib) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ ++c loop over all specified chemical bond potentials ++ ++ ii=0 ++ do i=ibnd1,ibnd2 ++ ++ ii=ii+1 ++ ++c define components of bond vector ++ ++ rrab=0.d0 ++ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) ++ if(rab.gt.1.d-6)rrab=1.d0/rab ++ ++c index of potential function parameters ++ ++ kk=listbnd(ii,1) ++ keyb=abs(keybnd(kk)) ++ ++c calculate scalar constant terms ++ ++ if(keyb.eq.0)then ++ ++c null interaction ++ ++ omega=0.d0 ++ gamma=0.d0 ++ ++ elseif(keyb.eq.1)then ++ ++c harmonic potential ++ ++ omega=0.5d0*prmbnd(kk,1)*(rab-prmbnd(kk,2))**2 ++ gamma=prmbnd(kk,1)*(rab-prmbnd(kk,2))*rrab ++ ++ else if(keyb.eq.2)then ++ ++c morse potential ++ ++ omega=prmbnd(kk,1)*((1.d0-exp(-prmbnd(kk,3)* ++ x (rab-prmbnd(kk,2))))**2-1.d0) ++ gamma=2.d0*prmbnd(kk,1)*prmbnd(kk,3)*(1.d0- ++ x exp(-prmbnd(kk,3)*(rab-prmbnd(kk,2))))* ++ x exp(-prmbnd(kk,3)*(rab-prmbnd(kk,2)))*rrab ++ ++ else if(keyb.eq.3)then ++ ++c 12-6 potential ++ ++ omega=(prmbnd(kk,1)*rrab**6-prmbnd(kk,2))*rrab**6 ++ gamma=(6.d0*prmbnd(kk,2)-12.d0*prmbnd(kk,1)*rrab**6)* ++ x rrab**8 ++ ++ elseif(keyb.eq.4)then ++ ++c restrained harmonic ++ ++ rab=rab-prmbnd(kk,2) ++ omega=0.5d0*prmbnd(kk,1)*(min(abs(rab),prmbnd(kk,3)))**2 ++ x +prmbnd(kk,1)*prmbnd(kk,3)*max(abs(rab)-prmbnd(kk,3),0.d0) ++ gamma=rrab*prmbnd(kk,1)*(sign(min(abs(rab),prmbnd(kk,3)),rab)) ++ ++ elseif(keyb.eq.5)then ++ ++c quartic potential ++ ++ omega=0.5d0*prmbnd(kk,1)*(rab-prmbnd(kk,2))**2+ ++ x 1.d0/3.d0*prmbnd(kk,3)*(rab-prmbnd(kk,2))**3+ ++ x 0.25d0*prmbnd(kk,4)*(rab-prmbnd(kk,2))**4 ++ gamma=rrab*(prmbnd(kk,1)*(rab-prmbnd(kk,2))+ ++ x prmbnd(kk,3)*(rab-prmbnd(kk,2))**2+ ++ x prmbnd(kk,4)*(rab-prmbnd(kk,2))**3) ++ ++ else if(keyb.eq.6)then ++ ++c buckingham exp-6 potential ++ ++ omega=prmbnd(kk,1)*exp(-rab/prmbnd(kk,2))-prmbnd(kk,3)* ++ x rrab**6 ++ gamma=-rrab*prmbnd(kk,1)*exp(-rab/prmbnd(kk,2))/prmbnd(kk,2)+ ++ x 6.d0*prmbnd(kk,3)*rrab**8 ++ ++ else if(keyb.eq.7)then ++ ++c FENE bond potential ++ ++ omega=-0.5d0*prmbnd(kk,1)*prmbnd(kk,2)**2*log(1.d0- ++ x ((rab-prmbnd(kk,3))/prmbnd(kk,2))**2) ++ gamma=rrab*prmbnd(kk,1)*(rab-prmbnd(kk,3))/ ++ x (1.d0-((rab-prmbnd(kk,3))/prmbnd(kk,2))**2) ++ ++ else if(keyb.eq.8)then ++ ++c coulomb bond potential ++ ++ omega=prmbnd(kk,1)*prmbnd(kk,2)*rrab*r4pie0/epsq ++ gamma=-omega*rrab*rrab ++ ++ else ++ ++c undefined potential ++ ++ omega=0.d0 ++ gamma=0.d0 ++ safe=.false. ++ ++ endif ++ ++c indices of bonded atoms ++ ++ ia=listbnd(ii,2) ++ ib=listbnd(ii,3) ++ ++c set selection control ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib).eq.0) ++ ++ if(lsolva)then ++ bnd_exc(atmolt(ia))=bnd_exc(atmolt(ia))+omega ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ bnd_fre=bnd_fre-omega ++ bnd_vir=bnd_vir-gamma*rab*rab ++ omega=lambda1*omega ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ bnd_fre=bnd_fre+omega ++ bnd_vir=bnd_vir+gamma*rab*rab ++ omega=lambda2*omega ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate bond energy and virial ++ ++ engbnd=engbnd+omega ++ virbnd=virbnd+gamma*rab*rab ++ ++c calculate solvation energy ++ ++ if(lsolva)then ++ bnd_sol(atmolt(ia))=bnd_sol(atmolt(ia))+omega ++ endif ++ ++c calculate forces ++ ++ fx=-gamma*xdab(ii) ++ fy=-gamma*ydab(ii) ++ fz=-gamma*zdab(ii) ++ ++ fxx(ia)=fxx(ia)+fx ++ fyy(ia)=fyy(ia)+fy ++ fzz(ia)=fzz(ia)+fz ++ ++ fxx(ib)=fxx(ib)-fx ++ fyy(ib)=fyy(ib)-fy ++ fzz(ib)=fzz(ib)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdab(ii)*fx ++ strs(2)=strs(2)+xdab(ii)*fy ++ strs(3)=strs(3)+xdab(ii)*fz ++ strs(4)=strs(4)+ydab(ii)*fy ++ strs(5)=strs(5)+ydab(ii)*fz ++ strs(6)=strs(6)+zdab(ii)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc+gamma*rab*rab ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fx ++ fyy_loc(ia)=fyy_loc(ia)+fy ++ fzz_loc(ia)=fzz_loc(ia)+fz ++ ++ fxx_loc(ib)=fxx_loc(ib)-fx ++ fyy_loc(ib)=fyy_loc(ib)-fy ++ fzz_loc(ib)=fzz_loc(ib)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdab(ii)*fx ++ strs_loc(2)=strs_loc(2)+xdab(ii)*fy ++ strs_loc(3)=strs_loc(3)+xdab(ii)*fz ++ strs_loc(4)=strs_loc(4)+ydab(ii)*fy ++ strs_loc(5)=strs_loc(5)+ydab(ii)*fz ++ strs_loc(6)=strs_loc(6)+zdab(ii)*fz ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,444) ++ ++c sum contributions to potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engbnd ++ buffer(2)=virbnd ++ buffer(3)=bnd_fre ++ buffer(4)=bnd_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engbnd=buffer(1) ++ virbnd=buffer(2) ++ bnd_fre=buffer(3) ++ bnd_vir=buffer(4) ++ ++ if(lsolva)then ++ ++ call gdsum(bnd_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(bnd_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ deallocate (xdab,ydab,zdab,stat=fail) ++ ++ return ++ end subroutine bndfrc ++ ++ end module bonds_module +diff -urN dl_class_1.9.orig/srcmod/comms.inc dl_class_1.9/srcmod/comms.inc +--- dl_class_1.9.orig/srcmod/comms.inc 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/comms.inc 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,42 @@ ++c********************************************************************* ++c ++c dl_poly include file for MPI, PVM and SHMEM ++c copyright - daresbury laboratory ++c ++c********************************************************************* ++ ++CMPIU define mpipriv mpipriv_ ++ ++ include "mpif.h" ++ ++c parameters for message tags ++ ++ integer Xgcopy_tag, Merge1_tag ++ integer Dgsum_tag1, Dgsum_tag2 ++ integer Igmax_tag1, Igmax_tag2 ++ integer Igsum_tag1, Igsum_tag2 ++ integer Shmove_tag, Merge_tag ++ integer Merge4_tag, Shell_tag ++ integer Gstate_tag1, Gstate_tag2 ++ integer Passcon_tag, Msgtag ++ ++c MPI tagsizes ++ ++ parameter( ++ $ Xgcopy_tag = 105, ++ $ Dgsum_tag1 = 6001, ++ $ Dgsum_tag2 = 9001, ++ $ Igsum_tag1 = 12001, ++ $ Igsum_tag2 = 15001, ++ $ Shmove_tag = 18001, ++ $ Merge_tag = 6001, ++ $ Merge1_tag = 9001, ++ $ Merge4_tag = 12001, ++ $ Gstate_tag1 = 15001, ++ $ Gstate_tag2 = 18001, ++ $ Shell_tag = 21001, ++ $ Passcon_tag = 3001, ++ $ Igmax_tag1 = 24001, ++ $ Igmax_tag2 = 27001, ++ $ Msgtag = 30000) ++ +diff -urN dl_class_1.9.orig/srcmod/config_module.f dl_class_1.9/srcmod/config_module.f +--- dl_class_1.9.orig/srcmod/config_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/config_module.f 2015-11-16 17:18:13.402475437 +0100 +@@ -0,0 +1,103 @@ ++ module config_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining simulation configuration data ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ character*1 cfgname(80) ++ character*1 sysname(80) ++ real(8) cell(9),rcell(9),celprp(10) ++ real(8) eta(9),stress(9),stresl(9),strcns(9),strbod(9) ++ ++ character*8, allocatable :: atmnam(:) ++ real(8), allocatable :: xxx(:),yyy(:),zzz(:) ++ real(8), allocatable :: vxx(:),vyy(:),vzz(:) ++ real(8), allocatable :: fxx(:),fyy(:),fzz(:) ++ real(8), allocatable :: flx(:),fly(:),flz(:) ++ real(8), allocatable :: chge(:),weight(:),rmass(:) ++ integer, allocatable :: ltype(:),lstfrz(:) ++ integer, allocatable :: neulst(:),lstneu(:) ++ integer, allocatable :: lentry(:),list(:,:) ++ integer, allocatable :: lstout(:),link(:) ++ integer, allocatable :: lct(:),lst(:) ++ ++ real(8), allocatable :: buffer(:) ++ ++c PLUMED variables ++ logical, save :: lplumed ++c PLUMED variables ++ ++ save atmnam,neulst,lstneu,cfgname,sysname ++ save cell,xxx,yyy,zzz,vxx,vyy,vzz,fxx,fyy,fzz ++ save buffer,weight,chge,ltype,lstfrz,flx,fly,flz ++ save lentry,list,lstout,link,lct,lst,celprp,rmass ++ save eta,stress,stresl,strcns,rcell ++ ++ contains ++ ++ subroutine alloc_config_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining simulation configuration arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ integer, parameter :: nnn=27 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (xxx(mxatms),stat=fail(1)) ++ allocate (yyy(mxatms),stat=fail(2)) ++ allocate (zzz(mxatms),stat=fail(3)) ++ allocate (vxx(mxatms),stat=fail(4)) ++ allocate (vyy(mxatms),stat=fail(5)) ++ allocate (vzz(mxatms),stat=fail(6)) ++ allocate (fxx(mxatms),stat=fail(7)) ++ allocate (fyy(mxatms),stat=fail(8)) ++ allocate (fzz(mxatms),stat=fail(9)) ++ allocate (weight(mxatms),stat=fail(11)) ++ allocate (chge(mxatms),stat=fail(12)) ++ allocate (ltype(mxatms),stat=fail(13)) ++ allocate (lstfrz(mxatms),stat=fail(14)) ++ allocate (flx(mxatms),stat=fail(15)) ++ allocate (fly(mxatms),stat=fail(16)) ++ allocate (flz(mxatms),stat=fail(17)) ++ allocate (atmnam(mxatms),stat=fail(18)) ++ allocate (neulst(mxneut),stat=fail(19)) ++ allocate (lstneu(mxatms),stat=fail(20)) ++ allocate (lstout(mxatms),stat=fail(21)) ++ allocate (lentry(msatms),stat=fail(22)) ++ allocate (list(msatms,mxlist),stat=fail(23)) ++ allocate (link(mxatms),stat=fail(24)) ++ allocate (lct(mxcell),stat=fail(25)) ++ allocate (lst(mxcell),stat=fail(26)) ++ allocate (rmass(mxatms),stat=fail(27)) ++ allocate (buffer(mxbuff),stat=fail(10)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)then ++ if(idnode.eq.0)write(nrite,'(10i5)')fail ++ call error(idnode,1000) ++ endif ++ enddo ++ ++ end subroutine alloc_config_arrays ++ ++ end module config_module +diff -urN dl_class_1.9.orig/srcmod/config_module.f.preplumed dl_class_1.9/srcmod/config_module.f.preplumed +--- dl_class_1.9.orig/srcmod/config_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/config_module.f.preplumed 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,99 @@ ++ module config_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining simulation configuration data ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ character*1 cfgname(80) ++ character*1 sysname(80) ++ real(8) cell(9),rcell(9),celprp(10) ++ real(8) eta(9),stress(9),stresl(9),strcns(9),strbod(9) ++ ++ character*8, allocatable :: atmnam(:) ++ real(8), allocatable :: xxx(:),yyy(:),zzz(:) ++ real(8), allocatable :: vxx(:),vyy(:),vzz(:) ++ real(8), allocatable :: fxx(:),fyy(:),fzz(:) ++ real(8), allocatable :: flx(:),fly(:),flz(:) ++ real(8), allocatable :: chge(:),weight(:),rmass(:) ++ integer, allocatable :: ltype(:),lstfrz(:) ++ integer, allocatable :: neulst(:),lstneu(:) ++ integer, allocatable :: lentry(:),list(:,:) ++ integer, allocatable :: lstout(:),link(:) ++ integer, allocatable :: lct(:),lst(:) ++ ++ real(8), allocatable :: buffer(:) ++ ++ save atmnam,neulst,lstneu,cfgname,sysname ++ save cell,xxx,yyy,zzz,vxx,vyy,vzz,fxx,fyy,fzz ++ save buffer,weight,chge,ltype,lstfrz,flx,fly,flz ++ save lentry,list,lstout,link,lct,lst,celprp,rmass ++ save eta,stress,stresl,strcns,rcell ++ ++ contains ++ ++ subroutine alloc_config_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining simulation configuration arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ integer, parameter :: nnn=27 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (xxx(mxatms),stat=fail(1)) ++ allocate (yyy(mxatms),stat=fail(2)) ++ allocate (zzz(mxatms),stat=fail(3)) ++ allocate (vxx(mxatms),stat=fail(4)) ++ allocate (vyy(mxatms),stat=fail(5)) ++ allocate (vzz(mxatms),stat=fail(6)) ++ allocate (fxx(mxatms),stat=fail(7)) ++ allocate (fyy(mxatms),stat=fail(8)) ++ allocate (fzz(mxatms),stat=fail(9)) ++ allocate (weight(mxatms),stat=fail(11)) ++ allocate (chge(mxatms),stat=fail(12)) ++ allocate (ltype(mxatms),stat=fail(13)) ++ allocate (lstfrz(mxatms),stat=fail(14)) ++ allocate (flx(mxatms),stat=fail(15)) ++ allocate (fly(mxatms),stat=fail(16)) ++ allocate (flz(mxatms),stat=fail(17)) ++ allocate (atmnam(mxatms),stat=fail(18)) ++ allocate (neulst(mxneut),stat=fail(19)) ++ allocate (lstneu(mxatms),stat=fail(20)) ++ allocate (lstout(mxatms),stat=fail(21)) ++ allocate (lentry(msatms),stat=fail(22)) ++ allocate (list(msatms,mxlist),stat=fail(23)) ++ allocate (link(mxatms),stat=fail(24)) ++ allocate (lct(mxcell),stat=fail(25)) ++ allocate (lst(mxcell),stat=fail(26)) ++ allocate (rmass(mxatms),stat=fail(27)) ++ allocate (buffer(mxbuff),stat=fail(10)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)then ++ if(idnode.eq.0)write(nrite,'(10i5)')fail ++ call error(idnode,1000) ++ endif ++ enddo ++ ++ end subroutine alloc_config_arrays ++ ++ end module config_module +diff -urN dl_class_1.9.orig/srcmod/core_shell_module.f dl_class_1.9/srcmod/core_shell_module.f +--- dl_class_1.9.orig/srcmod/core_shell_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/core_shell_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,826 @@ ++ module core_shell_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining core_shell arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use pair_module ++ use parse_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use site_module ++ use solvation_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmshl(:,:) ++ integer, allocatable :: listshl(:,:) ++ integer, allocatable :: numshl(:),lstshl(:,:) ++ ++ save prmshl,listshl,numshl,lstshl ++ ++ contains ++ ++ subroutine alloc_csh_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining core_shell arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(4) ++ ++ do i=1,4 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmshl(mxtshl,2),stat=fail(1)) ++ allocate (numshl(mxtmls),stat=fail(2)) ++ allocate (lstshl(mxtshl,2),stat=fail(3)) ++ allocate (listshl(mxshl,3),stat=fail(4)) ++ ++ do i=1,4 ++ if(fail(i).gt.0)call error(idnode,1100) ++ enddo ++ ++ do i=1,mxtmls ++ numshl(i)=0 ++ enddo ++ ++ end subroutine alloc_csh_arrays ++ ++ subroutine define_core_shell ++ x (safe,idnode,itmols,nshels,nsite,keyshl,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining core-shell units ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ logical safe ++ integer idnode,itmols,nshels,nsite,ntmp,ishls ++ integer iatm1,iatm2,isite1,isite2,keyshl,kshl,idum ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numshl(itmols)=numshl(itmols)+ntmp ++ kshl=intstr(record,lenrec,idum) ++ if(keyshl.eq.0)then ++ keyshl=kshl ++ elseif(kshl.ne.keyshl)then ++ call error(idnode,1960) ++ endif ++ if(idnode.eq.0) then ++ ++ write(nrite, ++ x "(/,1x,'number of core-shell units',5x,i10)") ++ x ntmp ++ if(keyshl.eq.1)then ++ ++ write(nrite, ++ x "(/,/,1x,'core-shell details:',/,/,21x, ++ x 5x,'index',5x,'index',6x,'parameter')") ++ ++ else ++ ++ write(nrite, ++ x "(/,/,1x,'core-shell details:',/,/,21x, ++ x 6x,'core',5x,'shell',6x,'parameter')") ++ ++ endif ++ ++ endif ++ ++ do ishls=1,numshl(itmols) ++ ++ nshels=nshels+1 ++ if(nshels.gt.mxtshl) call error(idnode,57) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ lstshl(nshels,1)=iatm1 ++ lstshl(nshels,2)=iatm2 ++ prmshl(nshels,1)=dblstr(record,lenrec,idum) ++ prmshl(nshels,2)=dblstr(record,lenrec,idum) ++ if(idnode.eq.0) write(nrite, ++ x "(21x,2i10,2f15.4)") ++ x lstshl(nshels,1),lstshl(nshels,2), ++ x prmshl(nshels,1),prmshl(nshels,2) ++ ++c test for frozen cores or shells ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ if(lfzsit(isite1)*lfzsit(isite2).ne.0) ++ x call error(idnode,49) ++ ++c convert energy units to internal units ++ ++ prmshl(nshels,1)=prmshl(nshels,1)*engunit ++ prmshl(nshels,2)=prmshl(nshels,2)*engunit ++ ++ enddo ++ ++ return ++ end subroutine define_core_shell ++ ++ subroutine corshl(idnode,mxnode,ntshl,shlke) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating the internal kinetic ++c energy of core-shell units in the shell polarisation model ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith july 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m ++ real(8) shlke,ppp,ccc,sss ++ ++ shlke=0.d0 ++ ++c block indices ++ ++ ishl1=(idnode*ntshl)/mxnode+1 ++ ishl2=((idnode+1)*ntshl)/mxnode ++ ++c loop over all specified core-shell pairs ++ ++ m=0 ++ ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c indices of atoms involved ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++c calculate atom translational kinetic energy ++ ++ ppp=((weight(i)*vxx(i)+weight(j)*vxx(j))**2 ++ x +(weight(i)*vyy(i)+weight(j)*vyy(j))**2 ++ x +(weight(i)*vzz(i)+weight(j)*vzz(j))**2) ++ x /(weight(i)+weight(j)) ++ ++c calculate individual core and shell kinetic energies ++ ++ ccc=weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ sss=weight(j)*(vxx(j)**2+vyy(j)**2+vzz(j)**2) ++ ++c calculate core-shell internal kinetic energy ++ ++ shlke=shlke+0.5d0*(ccc+sss-ppp) ++ ++ enddo ++ ++c global average of core-shell internal kinetic energy ++ ++ if(mxnode.gt.1)then ++ buffer(1)=shlke ++ call gdsum(buffer(1),1,buffer(2)) ++ shlke=buffer(1) ++ endif ++ ++ return ++ end subroutine corshl ++ ++ subroutine put_shells_on_cores(idnode,mxnode,ntshl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for placing shells on top of cores in the ++c shell model at the start of a simulation ++c ++c copyright - daresbury laboratory ++c author - w. smith feb 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, allocatable :: ltop(:) ++ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m,fail ++ ++c allocate ltop array ++ ++ allocate(ltop(ntshl),stat=fail) ++ ++c block indices ++ ++ ishl1=(idnode*ntshl)/mxnode+1 ++ ishl2=((idnode+1)*ntshl)/mxnode ++ ++c zero ltop array ++ ++ do i=1,ntshl ++ ltop(i)=0 ++ enddo ++ ++c loop over all specified core-shell pairs ++ ++ m=0 ++ ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c indices of atoms involved ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++c set shell and core positions equal ++ ++ ltop(m)=j ++ xxx(j)=xxx(i) ++ yyy(j)=yyy(i) ++ zzz(j)=zzz(i) ++ ++ enddo ++ ++c merge data on different processors ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,ntshl,ltop,xxx,yyy,zzz,buffer) ++ ++c deallocate ltop array ++ ++ deallocate(ltop,stat=fail) ++ ++ return ++ end subroutine put_shells_on_cores ++ ++ subroutine shlfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntshl,engshl,virshl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating shell model spring energy and ++c force terms in molecular dynamics. ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith july 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lexcite,lselect ++ integer idnode,imcon,mxnode,ntshl,ishl1,ishl2,i,j,k,m,kk ++ real(8) engshl,virshl,rij2,omega,gamma,ffx,ffy,ffz,strs ++ ++ dimension strs(6) ++ ++c check adequate workspace is available ++ ++ if(mxxdf.lt.mxshl)call error(idnode,423) ++ ++c block indices ++ ++ ishl1=(idnode*ntshl)/mxnode+1 ++ ishl2=((idnode+1)*ntshl)/mxnode ++ ++c initialise accumulators ++ ++ engshl=0.d0 ++ virshl=0.d0 ++ shl_fre=0.d0 ++ shl_vir=0.d0 ++ ++ do i=1,6 ++ strs(i)=0.d0 ++ enddo ++ ++ if(lsolva)then ++ ++ lcomp(5)=.true. ++ shl_sol(:)=0.d0 ++ if(lexcite)shl_exc(:)=0.d0 ++ ++ endif ++ ++c calculate core-shell separation vectors ++ ++ m=0 ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c indices of core and shell ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++c components of bond vector ++ ++ xdf(m)=xxx(i)-xxx(j) ++ ydf(m)=yyy(i)-yyy(j) ++ zdf(m)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,m,cell,xdf,ydf,zdf) ++ ++c loop over all specified core-shell units ++ ++ m=0 ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c index of potential parameters ++ ++ kk=listshl(m,1) ++ ++c core-shell separation ++ ++ rij2=xdf(m)**2+ydf(m)**2+zdf(m)**2 ++ ++c calculate scalar constant terms ++ ++ omega=(0.5d0*prmshl(kk,1)+0.25d0*prmshl(kk,2)*rij2)*rij2 ++ gamma=prmshl(kk,1)+prmshl(kk,2)*rij2 ++ ++c indices of core and shell ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++c set selection control ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(i).ne.1).and.(atm_fre(j).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(i)+atm_fre(i).eq.0) ++ ++ if(lsolva)then ++ shl_exc(atmolt(i))=shl_exc(atmolt(i))+omega ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(i).eq.1).or.(atm_fre(j).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ shl_fre=shl_fre-omega ++ shl_vir=shl_vir-gamma*rij2 ++ omega=lambda1*omega ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(i).eq.2).or.(atm_fre(j).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ shl_fre=shl_fre+omega ++ shl_vir=shl_vir+gamma*rij2 ++ omega=lambda2*omega ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate spring energy and virial ++ ++ engshl=engshl+omega ++ virshl=virshl+gamma*rij2 ++ ++ if(lsolva)then ++ shl_sol(atmolt(i))=shl_sol(atmolt(i))+omega ++ endif ++ ++c calculate spring forces ++ ++ ffx=-gamma*xdf(m) ++ ffy=-gamma*ydf(m) ++ ffz=-gamma*zdf(m) ++ ++ fxx(i)=fxx(i)+ffx ++ fyy(i)=fyy(i)+ffy ++ fzz(i)=fzz(i)+ffz ++ ++ fxx(j)=fxx(j)-ffx ++ fyy(j)=fyy(j)-ffy ++ fzz(j)=fzz(j)-ffz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*ffx ++ strs(2)=strs(2)+xdf(m)*ffy ++ strs(3)=strs(3)+xdf(m)*ffz ++ strs(4)=strs(4)+ydf(m)*ffy ++ strs(5)=strs(5)+ydf(m)*ffz ++ strs(6)=strs(6)+zdf(m)*ffz ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++c sum contributions to potential and virial ++ ++ if(mxnode.gt.1) then ++ ++ buffer(1)=engshl ++ buffer(2)=virshl ++ buffer(3)=shl_fre ++ buffer(4)=shl_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engshl=buffer(1) ++ virshl=buffer(2) ++ shl_fre=buffer(3) ++ shl_vir=buffer(4) ++ ++c sum up solvation energies ++ ++ if(lsolva)then ++ ++ call gdsum(shl_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(shl_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine shlfrc ++ ++ subroutine check_shells(idnode,itmols,nshels,ngrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to check no core-shell units are in ++c rigid bodies ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,itmols,nshels,ngrp,k1,ia,ib,kk ++ integer id,jj,ia1,jk,ib1 ++ ++ nshels=nshels-numshl(itmols) ++ do k1=1,numshl(itmols) ++ ++ nshels=nshels+1 ++ ia=lstshl(nshels,1) ++ ib=lstshl(nshels,2) ++ ++ ngrp=ngrp-numgrp(itmols) ++ ++ do kk=1,numgrp(itmols) ++ ++ ngrp=ngrp+1 ++ id=listyp(ngrp) ++ ++ do jj=1,numgsit(id)-1 ++ ++ ia1=lstgst(ngrp,jj) ++ if(ia1.eq.ia) then ++ ++ do jk=jj,numgsit(id) ++ ++ ib1=lstgst(ngrp,jk) ++ if(ib1.eq.ib) then ++ ++ if(idnode.eq.0)write(nrite,'(/,13x,a,2i10)') ++ x 'error: sites ',ia,ib ++ call error(idnode,456) ++ ++ endif ++ ++ enddo ++ ++ elseif(ia1.eq.ib) then ++ ++ do jk=jj,numgsit(id) ++ ++ ib1=lstgst(ngrp,jk) ++ if(ib1.eq.ia) then ++ ++ if(idnode.eq.0)write(nrite,'(/,13x,a,2i10)') ++ x 'error: sites ',ia,ib ++ call error(idnode,456) ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ enddo ++ enddo ++ ++ return ++ end subroutine check_shells ++ ++ subroutine relax_shells ++ x (relaxed,keyrlx,idnode,mxnode,natms,ntpmls,tstep,rlxtol) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for relaxing shells to zero force ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical relaxed,newjob ++ integer keyrlx,idnode,mxnode,natms,i,j,itmols,imols ++ integer iatm1,iatm2,fail,numopt,isite,ishls,jshls,lshls,ntpmls ++ integer nbuff ++ real(8) hnorm,grad0,grad1,grad2,stride,tstep,step ++ real(8) ggg,gam2,sgn,rlxtol ++ ++ dimension fail(4) ++ ++ integer, allocatable :: lstopt(:) ++ real(8), allocatable :: ggx(:),ggy(:),ggz(:) ++ real(8), allocatable :: hhx(:),hhy(:),hhz(:) ++ real(8), allocatable :: oxx(:),oyy(:),ozz(:) ++ ++ save hnorm,grad0,grad1,grad2,stride,lstopt ++ save ggx,ggy,ggz,hhx,hhy,hhz,oxx,oyy,ozz,numopt,nbuff,sgn ++ ++ data newjob/.true./,fail/0,0,0,0/ ++ ++c define initial data ++ ++ if(newjob)then ++ ++ newjob=.false. ++ allocate(lstopt(mxatms),stat=fail(1)) ++ allocate(ggx(mxatms),ggy(mxatms),ggz(mxatms),stat=fail(2)) ++ allocate(hhx(mxatms),hhy(mxatms),hhz(mxatms),stat=fail(3)) ++ allocate(oxx(mxatms),oyy(mxatms),ozz(mxatms),stat=fail(4)) ++ do i=1,4 ++ if(fail(i).ne.0)call error(idnode,1970) ++ enddo ++ ++c identify the shells ++ ++ isite=0 ++ ishls=0 ++ jshls=0 ++ do i=1,natms ++ ++ lstopt(i)=0 ++ ++ enddo ++ do itmols=1,ntpmls ++ ++ do imols=1,nummols(itmols) ++ ++ do lshls=1,numshl(itmols) ++ ++ ishls=ishls+1 ++ lstopt(lstshl(lshls+jshls,2)+isite)=1 ++ ++ enddo ++ ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ jshls=jshls+numshl(itmols) ++ ++ enddo ++ ++ numopt=ishls ++ ++ endif ++ ++c load coordinates of shells ++ ++ j=0 ++ do i=1,natms ++ ++ if(lstopt(i).gt.0)then ++ ++ j=j+1 ++ oxx(j)=xxx(i) ++ oyy(j)=yyy(i) ++ ozz(j)=zzz(i) ++ ggx(j)=fxx(i) ++ ggy(j)=fyy(i) ++ ggz(j)=fzz(i) ++ ++ endif ++ ++ enddo ++ ++c step length for relaxation ++ ++ step=tstep**2 ++ ++c define atoms for this nodes ++ ++ iatm1=(idnode*numopt)/mxnode+1 ++ iatm2=((idnode+1)*numopt)/mxnode ++ ++ ggg=0.d0 ++ do i=iatm1,iatm2 ++ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 ++ enddo ++ if(mxnode.gt.1)then ++ buffer(1)=ggg ++ call gdsum(buffer(1),1,buffer(2)) ++ ggg=buffer(1) ++ endif ++ ggg=sqrt(ggg) ++ ++c check convergence ++ ++ if(abs(ggg)/dble(numopt).lt.rlxtol)then ++ ++ relaxed=.true. ++ return ++ ++ endif ++ ++ if(keyrlx.eq.0) then ++ ++c set original search direction ++ ++ hnorm=ggg ++ grad0=ggg ++ grad2=ggg ++ do i=iatm1,iatm2 ++ ++ hhx(i)=ggx(i) ++ hhy(i)=ggy(i) ++ hhz(i)=ggz(i) ++ oxx(i)=oxx(i)+step*hhx(i) ++ oyy(i)=oyy(i)+step*hhy(i) ++ ozz(i)=ozz(i)+step*hhz(i) ++ ++ enddo ++ keyrlx=1 ++ sgn=1.d0 ++ ++ elseif(keyrlx.eq.1)then ++ ++c line search along chosen direction ++ ++ grad1=grad2 ++ grad2=0.d0 ++ do i=iatm1,iatm2 ++ grad2=grad2+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) ++ enddo ++ if(mxnode.gt.1)then ++ buffer(1)=grad2 ++ call gdsum(buffer(1),1,buffer(2)) ++ grad2=buffer(1) ++ endif ++ grad2=sgn*grad2/hnorm ++ ++c linear extrapolation to minimum ++ ++ stride=sgn*step ++ if(grad2.lt.0.d0)then ++ ++ keyrlx=2 ++ stride=sgn*step*grad2/(grad1-grad2) ++ ++ endif ++ ++ do i=iatm1,iatm2 ++ ++ oxx(i)=oxx(i)+stride*hhx(i) ++ oyy(i)=oyy(i)+stride*hhy(i) ++ ozz(i)=ozz(i)+stride*hhz(i) ++ ++ enddo ++ ++ elseif(keyrlx.eq.2)then ++ ++c construct conjugate search vector ++ ++ gam2=(ggg/grad0)**2 ++ hnorm=0.d0 ++ grad0=ggg ++ grad2=0.d0 ++ do i=iatm1,iatm2 ++ ++ hhx(i)=ggx(i)+gam2*hhx(i) ++ hhy(i)=ggy(i)+gam2*hhy(i) ++ hhz(i)=ggz(i)+gam2*hhz(i) ++ hnorm=hnorm+hhx(i)**2+hhy(i)**2+hhz(i)**2 ++ grad2=grad2+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) ++ ++ enddo ++ if(mxnode.gt.1)then ++ ++ buffer(1)=hnorm ++ buffer(2)=grad2 ++ call gdsum(buffer(1),2,buffer(3)) ++ hnorm=buffer(1) ++ grad2=buffer(2) ++ ++ endif ++ hnorm=sqrt(hnorm) ++ grad2=grad2/hnorm ++ sgn=sign(1.d0,grad2) ++ grad2=sgn*grad2 ++ ++ do i=iatm1,iatm2 ++ ++ oxx(i)=oxx(i)+sgn*step*hhx(i) ++ oyy(i)=oyy(i)+sgn*step*hhy(i) ++ ozz(i)=ozz(i)+sgn*step*hhz(i) ++ ++ enddo ++ ++ keyrlx=1 ++ ++ endif ++ ++c merge coordinate arrays ++ ++ if(mxnode.gt.1)then ++ ++ nbuff=6*(numopt+mxnode-1)/mxnode ++ call merge(idnode,mxnode,numopt,nbuff,oxx,oyy,ozz,buffer) ++ ++ endif ++ ++c unload coordinates of shells ++ ++ j=0 ++ do i=1,natms ++ ++ if(lstopt(i).gt.0)then ++ ++ j=j+1 ++ xxx(i)=oxx(j) ++ yyy(i)=oyy(j) ++ zzz(i)=ozz(j) ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine relax_shells ++ ++ end module core_shell_module +diff -urN dl_class_1.9.orig/srcmod/coulomb_module.f dl_class_1.9/srcmod/coulomb_module.f +--- dl_class_1.9.orig/srcmod/coulomb_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/coulomb_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1542 @@ ++ module coulomb_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining coulomb terms ++c copyright - daresbury laboratory ++c ++c author - w. smith sep 2003 ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ewald_module ++ use metafreeze_module ++ use pair_module ++ use property_module ++ use setup_module ++ use solvation_module ++ ++ implicit none ++ ++ contains ++ ++ subroutine coul0 ++ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic force. ++c 1/r potential, no truncation or damping ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester february 1993 ++c stress tensor - t.forester may 1994 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,kkk ++ real(8) rcsq,chgea,rsq,chgprd,rrr,coul,fcoul,fi,fx,fy,fz ++ real(8) engcpe,vircpe,rcut,epsq,strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ chgea=chge(iatm)/epsq*r4pie0 ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ ++c coulomb potential and force ++ ++ coul=chgprd/rrr ++ fcoul=coul/rsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+coul ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-coul ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate forces ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-coul ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul0 ++ ++ subroutine coul1 ++ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces ++c assuming a standard coulomb potential truncated at rcut ++c and shifted to zero at rcut. ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith december 1992. ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c stress tensor t.forester may 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,kkk ++ real(8) engcpe,vircpe,rcut,epsq,rcsq,chgea,rsq ++ real(8) fi,chgprd,omega,egamma,fx,fy,fz,rrr ++ real(8) strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++ chgea=chge(iatm)*r4pie0/epsq ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++c start of primary loop for forces evaluation ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10) then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ ++c calculate potential energy and virial ++ ++ omega=chgprd*(rcut-rrr)/(rrr*rcut) ++ egamma=chgprd/(rrr*rsq) ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+omega ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-omega ++ cou_vir=cou_vir+egamma*rsq ++ omega=lambda1*omega ++ egamma=lambda1*egamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+omega ++ cou_vir=cou_vir-egamma*rsq ++ omega=lambda2*omega ++ egamma=lambda2*egamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engcpe=engcpe+omega ++ vircpe=vircpe-egamma*rsq ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+omega ++ ++c calculate forces ++ ++ fx=egamma*xdf(m) ++ fy=egamma*ydf(m) ++ fz=egamma*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc-egamma*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul1 ++ ++ subroutine coul2 ++ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces ++c assuming a distance dependant dielectric `constant'. ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester april 1993 ++c stress tensor added - t.forester may 1994 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,kkk ++ real(8) engcpe,vircpe,rcut,epsq ++ real(8) fi,rcsq,chgea,chgprd,rsq,rrsq,coul,egamma,fx,fy,fz ++ real(8) strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++ chgea=chge(iatm)/epsq*r4pie0 ++ if(abs(chgea).gt.1.d-10)then ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++c calculate potential energy and Virial ++ ++ rrsq=1.d0/rsq ++ coul=chgprd*rrsq ++ egamma=2.d0*coul*rrsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+2.d0*coul ++ coul=lambda1*coul ++ egamma=lambda1*egamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-2.d0*coul ++ coul=lambda2*coul ++ egamma=lambda2*egamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and Virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-2.d0*coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate forces ++ ++ fx=egamma*xdf(m) ++ fy=egamma*ydf(m) ++ fz=egamma*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-2.d0*coul ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul2 ++ ++ subroutine coul3 ++ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic force. ++c reaction field potential ++c Ref: M Neumann, J Chem Phys, 82, 5633, (1985) ++c adapted for fennell-gezelter coulombic model ++c by w.smith june 2007 ++c Ref: CJ Fennell and JD Gezelter, J Chem Phys, ++c 124, 234104, (2006) ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1995 ++c author - t. forester february 1995 ++c stress tensor - t.forester feb 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,l,kkk ++ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,fi,rcsq ++ real(8) b0,rfld0,rfld1,rfld2,chgea,chgprd,rsq,coul,omega ++ real(8) fx,fy,fz,fcoul,rrr,vk0,vk1,vk2,gk0,gk1,gk2,t1,t2 ++ real(8) strs(6),strs_loc(6) ++ dimension fi(3) ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c reaction field terms ++ ++ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) ++ rfld0=b0/rcut**3 ++ rfld1=(1.d0+b0*0.5d0)/rcut ++ rfld2=rfld0*0.5d0 ++ ++c screened coulomb terms ++ ++ vcon=erc(mxegrd-4)+rfld2*rcut**2-rfld1 ++ fcon=rcut*fer(mxegrd-4)-rfld0*rcut ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ rdr=dble(mxegrd-4)/rcut ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ chgea=chge(iatm)*r4pie0 ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ ++c calculate potential energy using 3-point interpolation ++ ++ vk0=erc(l) ++ vk1=erc(l+1) ++ vk2=erc(l+2) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ omega=t1+(t2-t1)*ppp*0.5d0-vcon+fcon*(rrr-rcut) ++ coul=chgprd*(omega+rfld2*rsq-rfld1) ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=fer(l) ++ gk1=fer(l+1) ++ gk2=fer(l+2) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ fcoul=chgprd*((t1+(t2-t1)*ppp*0.5d0)-fcon/rrr-rfld0) ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+fcoul*rsq ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-fcoul*rsq ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate coulombic energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-fcoul*rsq ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate coulombic force ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-fcoul*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul3 ++ ++ subroutine coul4 ++ X (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces ++c assuming a force shifted coulomb potential. ++c adapted for fennell-gezelter coulombic model ++c by w.smith may 2007 ++c Ref: CJ Fennell and JD Gezelter, J Chem Phys, ++c 124, 234104, (2006) ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1995 ++c author - t.forester october 1995 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,l,kkk ++ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,fi,rcsq,coul ++ real(8) strs9,chgea,chgprd,rsq,rrr,omega,fcoul,fx,fy,fz ++ real(8) vk0,vk1,vk2,gk0,gk1,gk2,t1,t2 ++ real(8) strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c screened coulomb terms ++ ++ vcon=erc(mxegrd-4) ++ fcon=rcut*fer(mxegrd-4) ++ rdr=dble(mxegrd-4)/rcut ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++ chgea=chge(iatm)*r4pie0/epsq ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++c start of primary loop for forces evaluation ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chgea*chge(jatm) ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++c apply truncation of potential ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ ++c calculate potential energy using 3-point interpolation ++ ++ vk0=erc(l) ++ vk1=erc(l+1) ++ vk2=erc(l+2) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ omega=t1+(t2-t1)*ppp*0.5d0 ++ coul=chgprd*(omega-vcon+fcon*(rrr-rcut)) ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=fer(l) ++ gk1=fer(l+1) ++ gk2=fer(l+2) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ fcoul=chgprd*((t1+(t2-t1)*ppp*0.5d0)-fcon/rrr) ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+fcoul*rsq ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-fcoul*rsq ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate the coulombic energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-fcoul*rsq ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate coulombic forces ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-fcoul*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine coul4 ++ ++ subroutine coul_nsq ++ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, ++ x engcpe,vircpe) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic potential and forces ++c for the all-pairs algorithm beyond the range of the normal cutoff ++c i.e. the 'tertiary' forces. frozen atom option included ++c ++c to be used with multiple_nsq ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w.smith august 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip ++ integer natms,idnode,mxnode,imcon,ibig,i,last,mpm2 ++ integer npm2,m,ii,j,idum,kkk ++ real(8) engcpe,epsq,rcut,vircpe,rsq,rrr,chgprd,fcoul,coul,rct2 ++ ++ lskip=(lfree.or.lghost) ++ ++c zero energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c zero force arrays ++ ++ do i=1,natms ++ ++ flx(i)=0.d0 ++ fly(i)=0.d0 ++ flz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stresl(i)=0.d0 ++ enddo ++ ++c zero solvation and excitation accumulators ++ ++ if(lsolva)then ++ ++ cou_sol_lng(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc_lng(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c set control variables ++ ++ last=natms ++ mpm2=natms/2 ++ npm2=(natms-1)/2 ++ ++c set cutoff radius ++ ++ rct2=rcut**2 ++ ++c outer loop over atoms ++ ++ do m=1,mpm2 ++ ++ if(m.gt.npm2)last=mpm2 ++ ++c inner loop over atoms ++ ++ ii=0 ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ if(lskip)then ++ if(atm_fre(i)*atm_fre(j).eq.2)cycle ++ endif ++ ++c calculate interatomic displacements ++ ++ ii=ii+1 ++ xdf(ii)=xxx(i)-xxx(j) ++ ydf(ii)=yyy(i)-yyy(j) ++ zdf(ii)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c apply minimum image convention ++ ++ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) ++ ++c calculate coulomb terms ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ if(lskip)then ++ if(atm_fre(i)*atm_fre(j).eq.2)cycle ++ endif ++ ++ ii=ii+1 ++ if(lstfrz(i).eq.0.or.lstfrz(j).eq.0)then ++ ++c reject frozen atoms and calculate interatomic distance ++ ++ rsq=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ ++c running check of neighbour list array capacity ++ ++ if(rsq.ge.rct2)then ++ ++ chgprd=chge(i)*chge(j)*r4pie0/epsq ++ rrr=sqrt(rsq) ++ ++c calculate potential energy and force ++ ++ coul=chgprd/rrr ++ fcoul=coul/rsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(i),atmolt(j)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(i).ne.1).and.(atm_fre(j).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(i)+atm_fre(j).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc_lng(kkk)=cou_exc_lng(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(i).eq.1).or.(atm_fre(j).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+coul ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(i).eq.2).or.(atm_fre(j).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-coul ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol_lng(kkk)=cou_sol_lng(kkk)+coul ++ ++c calculate forces ++ ++ flx(i)=flx(i)+fcoul*xdf(ii) ++ fly(i)=fly(i)+fcoul*ydf(ii) ++ flz(i)=flz(i)+fcoul*zdf(ii) ++ ++ flx(j)=flx(j)-fcoul*xdf(ii) ++ fly(j)=fly(j)-fcoul*ydf(ii) ++ flz(j)=flz(j)-fcoul*zdf(ii) ++ ++c stress tensor ++ ++ stresl(1)=stresl(1)+xdf(ii)*fcoul*xdf(ii) ++ stresl(2)=stresl(2)+xdf(ii)*fcoul*ydf(ii) ++ stresl(3)=stresl(3)+xdf(ii)*fcoul*zdf(ii) ++ stresl(5)=stresl(5)+ydf(ii)*fcoul*ydf(ii) ++ stresl(6)=stresl(6)+ydf(ii)*fcoul*zdf(ii) ++ stresl(9)=stresl(9)+zdf(ii)*fcoul*zdf(ii) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c complete stress tensor ++ ++ stresl(4)=stresl(2) ++ stresl(7)=stresl(3) ++ stresl(8)=stresl(6) ++ ++ return ++ end subroutine coul_nsq ++ ++ end module coulomb_module +diff -urN dl_class_1.9.orig/srcmod/define_system_module.f dl_class_1.9/srcmod/define_system_module.f +--- dl_class_1.9.orig/srcmod/define_system_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/define_system_module.f 2015-11-16 17:18:13.422475594 +0100 +@@ -0,0 +1,6004 @@ ++ module define_system_module ++ ++c*********************************************************************** ++c ++c dl_poly module for utility subroutines and functions ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - p.-a. cazade oct 2007, solvation, free energy ++c and excitation ++c adapted - d. quigley nov 2010, metadynamics ++c ++c*********************************************************************** ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use dihedral_module ++ use ensemble_tools_module ++ use error_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use inversion_module ++ use metafreeze_module ++ use metal_module ++ use parse_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use vdw_module ++ ++ contains ++ ++ subroutine simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading in the simulation control ++c parameters ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992. ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c modified ++c author - t.forester may 1993 ++c amended - t.forester sept 1994 - dl_poly_1.1 ++c amended - t.forester nov 1994 - macro version ++c amended - w.smith dec 1994 - t3d adaptation ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit,seek ++ character*1 hms ++ character*1 directive(lenrec) ++ logical lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,lpsoc ++ logical ltscal,lzeql,loptim,ltraj,lfcap,lgofr,lpgr,lpres,safe ++ logical lstep,ltemp,lcut,ldelr,lprim,lforc,lens,lvdw,lrvdw,kill ++ logical lnsq,lzden,lewald,lspme,lhke,loop,lzero,nolink,newgau ++ logical lminim,lminopt,ltad,lneb,lhit,lbpd,prechk,tadall,nebgo ++ integer idnode,intsta,istraj,keyens,keyfce,keyres,nstbpo,nsbzdn ++ integer keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,khit,nhit ++ integer nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,ntrack ++ integer idum,imcon,keyver,keytol,nblock,blkout,numgau ++ integer minstp,numneb,i,keybpd,mode,nsolva,isolva,nofic ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,rlxtol,opttol ++ real(8) eps,tol,fm,densvar,delrdf,delzdn,zlen,ehit,hyp_units ++ real(8) catchrad,sprneb,deltad,tlow,xhit,yhit,zhit,ebias,vmin ++ real(8) prntim ++ ++CSGIC real(8) dummy ++CCRAY real(8) dummy ++CFFTWc FFTW instruction codes ++CFFTW ++CFFTW integer FFTW_FORWARD,FFTW_BACKWARD ++CFFTW parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) ++CFFTW ++CFFTW integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL ++CFFTW parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) ++CFFTW ++CFFTW integer FFTW_ESTIMATE,FFTW_MEASURE ++CFFTW parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) ++CFFTW ++CFFTW integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM ++CFFTW parameter (FFTW_OUT_OF_PLACE=0) ++CFFTW parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) ++CFFTW ++CFFTW integer FFTW_THREADSAFE ++CFFTW parameter (FFTW_THREADSAFE=128) ++CFFTW ++ ++c intitialize system variables: temperature,pressure,ensemble key ++c force key, cutoff, primary cutoff, verlet shell width, relative ++c dielectric constant,timestep,temperature scaling flag, ++c temp scaling interval ++ ++ mode=0 ++ nhko=0 ++ nlatt=0 ++ nsteql=0 ++ nstrun=0 ++ minstp=0 ++ keybpd=0 ++ keyres=0 ++ keyens=0 ++ keyver=0 ++ taut=0.d0 ++ nstbts=0 ++ nstbgr=0 ++ nsbzdn=0 ++ nstbpo=100 ++ nstack=mxstak ++ intsta=0 ++ nstraj=0 ++ istraj=1 ++ keytrj=0 ++ numgau=1 ++ alpha=0.d0 ++ kmax1=0 ++ kmax2=0 ++ kmax3=0 ++ nospl=min(8,mxspl) ++ isolva=1 ++ nsolva=0 ++ niswitch=0 ++ nswitch=0 ++ nofic=1000 ++ ++ fmax=1000.d0 ++ keyfce=0 ++ multt=1 ++ keytol=0 ++ tstep=0.d0 ++ temp=0.d0 ++ press=0.d0 ++ rcut=0.d0 ++ rprim=0.d0 ++ rvdw=0.d0 ++ delr=0.d0 ++ epsq=1.d0 ++ rlxtol=1.d0 ++ opttol=1.d0 ++ tolnce=1.d-8 ++ quattol=1.d-8 ++ timjob=0.d0 ++ timcls=0.d0 ++ delrdf=0.d0 ++ delzdn=0.d0 ++ zlen=0.d0 ++ ehit=0.d0 ++ xhit=0.d0 ++ yhit=0.d0 ++ zhit=0.d0 ++ vmin=0.d0 ++ ebias=0.d0 ++ catchrad=0.d0 ++ pfree=0.d0 ++ ++ lhit=.false. ++ lbpd=.false. ++ ltad=.false. ++ lneb=.false. ++ loop=.true. ++ lnfic=.false. ++ lpsoc=.false. ++ lzero=.false. ++ ltscal=.false. ++ lewald=.false. ++ lspme=.false. ++ lhke=.false. ++ lgofr=.false. ++ lpgr=.false. ++ lzeql=.true. ++ loptim=.false. ++ lminim=.false. ++ lminopt=.false. ++ ltraj=.false. ++ lfcap=.false. ++ ltemp=.false. ++ lstep=.false. ++ lcut=.false. ++ ldelr=.false. ++ lprim=.false. ++ lforc=.false. ++ lens=.false. ++ lvdw=.false. ++ lrvdw=.false. ++ lpres=.false. ++ kill=.false. ++ lnsq=.false. ++ lzden=.false. ++ nolink=.false. ++ newgau=.false. ++ prechk=.false. ++ tadall=.false. ++ lsolva=.false. ++ lfree=.false. ++ lfrmas=.false. ++ lexcite=.false. ++ lswitch=.false. ++ lghost=.false. ++ nebgo=.true. ++ seek='all ' ++ ++c open the simulation input file ++ ++ if(idnode.eq.0)open(nread,file='CONTROL',status='old') ++ ++ ++c PlUMED defaults ++ lplumed=.false. ++c PLUMED defaults ++c read job title ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ ++ call copystring(record,sysname,80) ++ if(idnode.eq.0)then ++ ++ write(nrite,"(3(1x,120('*'),/),1x,15('*'),5x,80a1,5x,15('*'),/, ++ x 3(1x,120('*'),/),/,/,1x,'SIMULATION CONTROL PARAMETERS',/)") ++ x sysname ++ ++ endif ++ ++c read and process directives from CONTROL file ++ ++ do while(loop) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ ++c convert to lowercase and strip out leading blanks ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.' ')then ++ ++c record is commented out ++ cycle ++ ++ elseif(findstring('redirect',directive,idum))then ++ ++c ignore this option in this context ++ ++c PLUMED modifications ++ elseif(findstring('plumed',directive,idum))then ++ if(findstring('on',directive,idum)) lplumed=.true. ++ if(findstring('off',directive,idum)) lplumed=.false. ++c PLUMED modifications ++ cycle ++ ++ elseif(findstring('steps',directive,idum))then ++ ++c number of timesteps ++ ++ nstrun=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'selected number of timesteps',3x,i10)")nstrun ++ ++ elseif(findstring('integ',directive,idum))then ++ ++c choice of integration algorithm ++ ++ if(findstring('leapfrog',directive,idum))then ++ ++ keyver=0 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'leapfrog verlet integration selected')") ++ ++ elseif(findstring('velocity',directive,idum))then ++ ++ keyver=1 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'velocity verlet integration selected')") ++ ++ endif ++ ++ elseif(findstring('no fic',directive,idum))then ++ ++c cancel possible "flying ice cube" in Berendsen thermostats ++ ++ lnfic=.true. ++ nofic=intstr(directive,lenrec,idum) ++ ++ elseif(findstring('shells',directive,idum).and. ++ x findstring('on',directive,idum).and. ++ x findstring('cores',directive,idum))then ++ ++c put shells on cores at start - shell model only (else null) ++ ++ lpsoc=.true. ++ ++ elseif(findstring('densvar',directive,idum))then ++ ++c specify allowed density variation ++ ++ densvar=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'allowed density variation ',3x,1p,e12.4)") ++ x densvar ++ ++ elseif(findstring('no link',directive,idum))then ++ ++c switch off link cell option ++ ++ nolink=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'link cells option deactivated')") ++ ++ elseif(findstring('equil',directive,idum))then ++ ++c number of equilibration timesteps ++ ++ nsteql=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'equilibration period ',3x,i10)")nsteql ++ ++ elseif(findstring('restart',directive,idum))then ++ ++c restart control ++ ++ if(findstring('noscale',directive,idum))then ++ ++ keyres=3 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'noscale restart requested')") ++ ++ elseif(findstring('scale',directive,idum))then ++ ++ keyres=2 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'scaled restart requested')") ++ ++ else ++ ++ keyres=1 ++ if(idnode.eq.0)write(nrite,"(/,1x,'restart requested')") ++ ++ endif ++ ++ elseif(findstring('ensemble',directive,idum))then ++ ++c ensemble selection ++ ++ call ensemble_selection(directive,lens,kill,idnode,keyens, ++ x mode,taut,taup) ++ ++ elseif(findstring('regauss',directive,idum))then ++ ++c re-initialise velocities option (regaussing) ++ ++ newgau=.true. ++ numgau=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'regaussing option activated', ++ x /,1x,'regaussing interval set to ',3x,i10)") ++ x numgau ++ ++ elseif(findstring('scale',directive,idum))then ++ ++ nstbts=intstr(directive,lenrec,idum) ++ if(nstbts.gt.0)then ++ ltscal=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'temperature scaling on' ++ x /,1x,'temperature scaling interval',3x,i10)") ++ x nstbts ++ ++ endif ++ ++ elseif(findstring('rdf',directive,idum))then ++ ++ if(findstring('print',directive,idum))then ++ ++ lpgr=.true. ++ lpgr=(lgofr.and.lpgr) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'g(r) printing option on ')") ++ ++ else ++ ++ lgofr=.true. ++ nstbgr=intstr(directive,lenrec,idum) ++ delrdf=dblstr(directive,lenrec,idum) ++ if(nstbgr.eq.0)nstbgr=10 ++ if(delrdf.lt.1.d-8)delrdf=0.05d0 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'radial distribution functions on ', ++ x /,1x,'g(r) collection interval ',3x,i10)")nstbgr ++ write(nrite, ++ x "(1x,'g(r) bin width ',3x,1p,e12.4)") ++ x delrdf ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('zden',directive,idum))then ++ ++ lzden=.true. ++ nsbzdn=intstr(directive,lenrec,idum) ++ delzdn=dblstr(directive,lenrec,idum) ++ zlen=dblstr(directive,lenrec,idum) ++ if(nsbzdn.eq.0)nsbzdn=10 ++ if(delzdn.lt.1.d-8)then ++ zlen=0.1d0*dble(mxzdn) ++ delzdn=0.1d0 ++ elseif(zlen.lt.1.d-8)then ++ zlen=delzdn*dble(mxzdn) ++ endif ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'Z density profile requested', ++ x /,1x,'zdensity collection interval',3x,i10)")nsbzdn ++ write(nrite, ++ x "(1x,'zdensity bin width ',3x,1p,e12.4)") ++ x delzdn ++ write(nrite, ++ x "(1x,'zdensity range ',3x,1p,e12.4)") ++ x zlen ++ ++ endif ++ ++ elseif(findstring('collect',directive,idum))then ++ ++ lzeql=.false. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'equilibration included in overall averages')") ++ ++ elseif(findstring('neb',directive,idum))then ++ ++c activate nudged elastic band option ++ ++ call neb_option(directive,lneb,lminopt,idnode, ++ x numneb,keytol,sprneb,opttol,hyp_units) ++ ++ elseif(findstring('impact',directive,idum))then ++ ++c activate the impact option ++ ++ if(lhit)call error(idnode,516) ++ lhit=.true. ++ khit=intstr(directive,lenrec,idum) ++ nhit=intstr(directive,lenrec,idum) ++ ehit=dblstr(directive,lenrec,idum) ++ xhit=dblstr(directive,lenrec,idum) ++ yhit=dblstr(directive,lenrec,idum) ++ zhit=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,1x,'impact option selected')") ++ write(nrite,"( ++ x /,1x,'identity of impact atom ',i10, ++ x /,1x,'time step of impact ',i10, ++ x /,1x,'impact recoil energy (keV) ',1p,e12.4, ++ x /,1x,'impact direction (x component) ',1p,e12.4, ++ x /,1x,'impact direction (y component) ',1p,e12.4, ++ x /,1x,'impact direction (z component) ',1p,e12.4)") ++ x khit,nhit,ehit,xhit,yhit,zhit ++ ++ endif ++ ++c convert impact energy from keV to internal units ++ ++ ehit=ehit*9648530.821d0 ++ ++ elseif(findstring('bpd',directive,idum))then ++ ++c activate the BPD option ++ ++ call bpd_option(directive,seek,lbpd,ltad,lminopt,prechk, ++ x nebgo,keybpd,idnode,nblock,ntrack,keytol,ebias,vmin, ++ x catchrad,sprneb,opttol,hyp_units) ++ ++ elseif(findstring('tad',directive,idum))then ++ ++c activate temperature accelerated dynamics option ++ ++ call tad_option(directive,ltad,lbpd,lminopt,prechk,tadall, ++ x idnode,nblock,ntrack,blkout,keytol,catchrad,sprneb,tlow, ++ x deltad,opttol,hyp_units) ++ ++ elseif(findstring('minim',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ if(findstring('forc',directive,idum))keytol=0 ++ if(findstring('ener',directive,idum))keytol=1 ++ if(findstring('posi',directive,idum))keytol=2 ++ hyp_units=energy_unit() ++ minstp=intstr(directive,lenrec,idum) ++ opttol=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ lminim=.true. ++ loptim=.false. ++ lzero=.false. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'minimisation programme requested')") ++ write(nrite, ++ x "(1x,'structure minimisation interval ', ++ x 3x,i10)")minstp ++ call print_optim(keytol) ++ write(nrite, ++ x "(1x,'structure minimisation tolerance', ++ x 3x,1p,e12.4,1x,a8)")opttol,cunit ++ ++ endif ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ elseif(findstring('optim',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ if(findstring('forc',directive,idum))keytol=0 ++ if(findstring('ener',directive,idum))keytol=1 ++ if(findstring('posi',directive,idum))keytol=2 ++ hyp_units=energy_unit() ++ opttol=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ loptim=.true. ++ lminim=.false. ++ lzero=.false. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'structure optimisation requested')") ++ call print_optim(keytol) ++ write(nrite, ++ x "(1x,'tolerance for structure optimisation ', ++ x 3x,1p,e12.4,1x,a8)")opttol,cunit ++ ++ endif ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ elseif(findstring('zero',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ temp=1.d0 ++ lzero=.true. ++ loptim=.false. ++ lminim=.false. ++ ltemp=.true. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'zero K optimisation requested')") ++ write(nrite, ++ x "(' temperature reset to',1p,e12.4)")1.d0 ++ ++ endif ++ ++ else if(findstring('solva',directive,idum))then ++ ++ call solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++ else if(findstring('decomp',directive,idum))then ++ ++ call solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++ elseif(findstring('metafreeze',directive,idum).or. ++ x findstring('metadyn',directive,idum))then ++ ++c activate metadynamics option - d. quigley ++ ++ call metadyn_option ++ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, ++ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, ++ x locpe_scale,ref_W_aug,h_aug,wt_Dt) ++ ++ else if(findstring('free',directive,idum))then ++ ++ call free_energy_option(directive,lfree,lfrmas,idnode) ++ ++ else if(findstring('excite',directive,idum))then ++ ++ call excitation_option ++ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) ++ ++ else if(findstring('switch',directive,idum))then ++ ++ call switching_option ++ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) ++ ++ elseif(findstring('print',directive,idum))then ++ ++ nstbpo=intstr(directive,lenrec,idum) ++ nstbpo=max(nstbpo,1) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'data printing interval ',3x,i10)")nstbpo ++ ++ elseif(findstring('stack',directive,idum))then ++ ++ nstack=intstr(directive,lenrec,idum) ++ ++c reset stack limit if too large ++ ++ nstack=min(nstack,mxstak) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'data stacking interval ',3x,i10)")nstack ++ ++ elseif(findstring('stats',directive,idum))then ++ ++ intsta=intstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'statistics file interval ',3x,i10)")intsta ++ ++ elseif(findstring('traj',directive,idum))then ++ ++ ltraj=.true. ++ nstraj=intstr(directive,lenrec,idum) ++ istraj=max(intstr(directive,lenrec,idum),1) ++ keytrj=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'trajectory file option on ', ++ x /,1x,'trajectory file start ',3x,i10, ++ x /,1x,'trajectory file interval ',3x,i10 ++ x /,1x,'trajectory file info key ',3x,i10)") ++ x nstraj,istraj,keytrj ++ ++ elseif(findstring('ewald',directive,idum).or. ++ x findstring('spme',directive,idum).or. ++ x findstring('hke',directive,idum))then ++ ++c read Ewald or HK-Ewald or SPM-Ewald sum parameters ++ ++ call ewald_selection(directive,lhke,lspme,lewald,lcut, ++ x lforc,kill,idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2, ++ x kmax3,alpha,rcut) ++ ++ elseif(findstring('distan',directive,idum))then ++ ++ keyfce=4 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Distance dependent dielectric')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('coul',directive,idum))then ++ ++ keyfce=6 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Coulombic potential')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('shift',directive,idum))then ++ ++ keyfce=8 ++ alpha=0.d0 ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Shifted Coulombic potential')") ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(.not.lcut)then ++ call error(idnode,-435) ++ kill=.true. ++ else ++ ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(1x,'Specified precision parameter : ',1p, ++ x e12.4)")eps ++ write(nrite, ++ x "(1x,'Calculated damping parameter: ',1p, ++ x e12.4)")alpha ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('damp',directive,idum))then ++ ++ alpha=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(1x,'Specified damping parameter : ',1p,e12.4)") ++ x alpha ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('reaction',directive,idum))then ++ ++ keyfce=10 ++ alpha=0.d0 ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : reaction field')") ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(.not.lcut)then ++ call error(idnode,-435) ++ kill=.true. ++ else ++ ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(1x,'Specified precision parameter : ',1p, ++ x e12.4)")eps ++ write(nrite, ++ x "(1x,'Calculated damping parameter: ',1p, ++ x e12.4)")alpha ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('damp',directive,idum))then ++ ++ alpha=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(1x,'Specified damping parameter : ',1p,e12.4)") ++ x alpha ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('cap',directive,idum))then ++ ++ lfcap=.true. ++ fm=dblstr(directive,lenrec,idum) ++ if(fm.gt.0.d0)fmax=fm ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'force capping :',16x,1p,e12.4,' kT/A')")fmax ++ ++ elseif(findstring('no vdw',directive,idum))then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'short-range potential terms off')") ++ lvdw=.true. ++ ++ elseif(findstring('no elec',directive,idum))then ++ ++ keyfce=0 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'electrostatic potential terms off')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('mult',directive,idum))then ++ ++ multt=max(intstr(directive,lenrec,idum),1) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'multiple timestep interval ',3x,i10)")multt ++ ++ elseif(findstring('timestep',directive,idum))then ++ ++ lstep=.true. ++ tstep=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation timestep ',3x,1p,e12.4)")tstep ++ ++ elseif(findstring('temp',directive,idum))then ++ ++ ltemp=.true. ++ temp=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation temperature ',3x,1p,e12.4)")temp ++ ++ elseif(findstring('pres',directive,idum))then ++ ++ press=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation pressure (katm) ',3x,1p,e12.4)")press ++ ++c convert from katm to internal units of pressure ++ ++ press=press/prsunt ++ lpres=.true. ++ ++ elseif(findstring('prim',directive,idum))then ++ ++c primary cutoff ++ ++ lprim=.true. ++ rprim=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'primary neighbour cut off ',3x,1p,e12.4)")rprim ++ ++ elseif(findstring('rvdw',directive,idum))then ++ ++c cutoff for short range potentials ++ ++ rvdw=dblstr(directive,lenrec,idum) ++ lrvdw=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'real space cut off (vdw) ',3x,1p,e12.4)")rvdw ++ ++ elseif(findstring('delr',directive,idum))then ++ ++c Verlet shell width ++ ++ ldelr=.true. ++ delr=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'border width of Verlet shell',3x,1p,e12.4)")delr ++ ++ elseif(findstring('cut',directive,idum))then ++ ++c cutoff ++ ++ lcut=.true. ++ rcut=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'real space cut off ',3x,1p,e12.4)")rcut ++ ++ elseif(findstring('eps',directive,idum))then ++ ++c relative dielectric constant ++ ++ epsq=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'relative dielectric constant',3x,1p,e12.4)")epsq ++ ++ elseif(findstring('rlxtol',directive,idum))then ++ ++c force tolerance for shell relaxation ++ ++ rlxtol=max(rlxtol,dblstr(directive,lenrec,idum)) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for shell relaxn. ',3x,1p,e12.4)")rlxtol ++ ++ elseif(findstring('shake',directive,idum))then ++ ++c tolerance for shake ++ ++ tolnce=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for SHAKE ',3x,1p,e12.4)")tolnce ++ ++ elseif(findstring('quaternion',directive,idum))then ++ ++c tolerance for quaternion integration ++ ++ quattol=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for Quaternions ',3x,1p,e12.4)")quattol ++ ++ elseif(findstring('job time',directive,idum))then ++ ++c time for simulation (in seconds/minutes/hours/days or indefinite) ++ ++ if(findstring('indef',directive,idum))then ++ timjob=1.0d6*365.25d0*24.d0*60.d0*60.d0 ++ else ++ timjob=dblstr(directive,lenrec,idum) ++ if(findstring('m',directive,idum))then ++ timjob=6.0d1*timjob ++ elseif(findstring('h',directive,idum))then ++ timjob=3.6d3*timjob ++ elseif(findstring('d',directive,idum))then ++ timjob=8.64d4*timjob ++ endif ++ endif ++ ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'user allocated job time (',a1,') ',3x,f8.4)") ++ x hms,prntim ++ ++ elseif(findstring('close time',directive,idum))then ++ ++c time for winding up a job (in seconds) ++ ++ timcls=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'job closure time (s) ',3x,f8.3)")timcls ++ ++ elseif(findstring('all pairs',directive,idum))then ++ ++c full minimum image - N^2 interactions each timestep ++ ++ lnsq=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'All-pairs requested for electrostatics')") ++ ++ elseif(findstring('nospl',directive,idum))then ++ ++c set ewald_spme interpolation order ++ ++ nospl=intstr(directive,lenrec,idum) ++ ++ elseif(findstring('finish',directive,idum))then ++ ++c safe termination of reading CONTROL file ++ ++ loop=.false. ++ ++ else ++ ++c unrecognised directive in control file ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ enddo ++ ++c check on steps before temperature scaling ++ ++ if(nstbts.eq.0)nstbts=nstrun+1 ++ ++c conduct consistency checks on directives ++ ++ if(lminim)then ++ ++c ensure final configuration follows minimisation ++ ++ if(minstp.eq.0)minstp=nstrun ++ nstrun=minstp*(nstrun/minstp) ++ ++ endif ++ ++c check force activation options ++ ++ if(.not.lforc)then ++ ++c check if any forces are in operation ++ ++ if(.not.lvdw)then ++ ++ kill=.true. ++ call error(idnode,-383) ++ ++ endif ++ ++ else ++ ++c turn on short range forces ++ ++ if(lvdw)then ++ ++ if(keyfce.eq.0)then ++ ++ lcut=.true. ++ ldelr=.true. ++ ++ endif ++ ++ else ++ ++ keyfce=keyfce+1 ++ ++ endif ++ ++ endif ++ ++c if tad selected use only leap frog ++ ++ if(ltad.and.keyver.eq.1)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'switching to leapfrog for TAD dynamics')") ++ keyver=0 ++ ++ endif ++ ++c error checking ++ ++ if(lmetadyn.and.keyens.ne.3.and.keyens.ne.5.and.keyens.ne.7)then ++ ++ kill=.true. ++ call error(idnode,-2360) ++ ++ endif ++ ++ if(lsolva.or.lfree.or.lexcite.or.lswitch)then ++ ++ if(lspme)then ++ ++ kill=.true. ++ call error(idnode,-601) ++ ++ endif ++ ++ if(lhke)then ++ ++ kill=.true. ++ call error(idnode,-602) ++ ++ endif ++ ++ endif ++ ++ if(lghost.and.nstbgr.ne.isolva)then ++ ++ call warning(idnode,130,dble(isolva),0.d0,0.d0) ++ nstbgr=isolva ++ ++ endif ++ if(lfree.and.lgofr)then ++ ++ call warning(idnode,140,0.d0,0.d0,0.d0) ++ lgofr=.false. ++ lpgr=.false. ++ ++ endif ++ if(loptim)then ++ ++ temp=0.d0 ++ ++ elseif(.not.ltemp)then ++ ++ kill=.true. ++ call error(idnode,-380) ++ ++ endif ++ ++ if(.not.lstep)then ++ ++ kill=.true. ++ call error(idnode,-381) ++ ++ endif ++ ++ if(.not.lcut)then ++ ++ kill=.true. ++ call error(idnode,-382) ++ ++ endif ++ ++c check if van der Waals cutoff set ++ ++ if(.not.lrvdw.and.mod(keyfce,2).eq.1)then ++ ++ if(rcut.gt.0.d0)then ++ ++ rvdw=rcut ++ ++ else ++ ++ kill=.true. ++ call error(idnode,-402) ++ ++ endif ++ ++ endif ++ ++ if(.not.ldelr)then ++ ++ kill=.true. ++ call error(idnode,-384) ++ ++ endif ++ ++ if(multt.gt.1)then ++ ++ if(.not.lprim)then ++ ++ kill=.true. ++ call error(idnode,-385) ++ ++ elseif(rprim.gt.rcut)then ++ ++ kill=.true. ++ call error(idnode,-386) ++ ++ endif ++ ++ endif ++ ++c check settings in nvt ensemble ++ ++ if(keyens.ge.2.and.keyens.le.3)then ++ ++ if(taut.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-464) ++ ++ endif ++ ++ endif ++ ++c check settings in npt ensemble ++ ++ if(keyens.ge.4.and.keyens.le.7)then ++ ++ if(.not.lpres)then ++ ++ kill=.true. ++ call error(idnode,-387) ++ ++ endif ++ ++c check barostat and thermostat rates non zero ++ ++ if(taut.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-464) ++ ++ endif ++ if(taup.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-466) ++ ++ endif ++ ++ endif ++ ++c check multiple timestep cutoffs are sensible ++ ++ if(multt.gt.1)then ++ if(rcut-rprim.lt.delr)then ++ ++ kill=.true. ++ call error(idnode,-398) ++ ++ endif ++ endif ++ ++c check rcut > rvdw (for verlet list constructor) ++ ++ if(rcut.lt.rvdw)then ++ ++ kill=.true. ++ call error(idnode,-400) ++ ++ endif ++ ++c check spme is not being used with incorrect pbc ++ ++ if(lspme)then ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++ kill=.true. ++ call error(idnode,-513) ++ ++ endif ++ ++ endif ++ ++c check on all-pairs calculation request ++ ++ if(lnsq)then ++ ++ if(multt.eq.1)then ++ ++ kill=.true. ++ call error(idnode,-422) ++ ++ endif ++ ++ if(keyfce/2.lt.2.or.keyfce/2.gt.3)then ++ ++ kill=.true. ++ call error(idnode,-424) ++ ++ endif ++ ++ endif ++ ++c cancel rdf option if no vdw or coulombic forces ++ ++ if(lgofr.and.keyfce.eq.0)then ++ ++ lgofr=.false. ++ call warning(idnode,120,0.d0,0.d0,0.d0) ++ ++ endif ++ ++ if(kill)call abort_control_read(2,idnode,nread) ++ ++c close CONTROL file ++ ++ if(idnode.eq.0)close(nread) ++ ++ return ++ end subroutine simdef ++ ++ subroutine sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading in the molecular specifications ++c of the system to be simulated ++c version for rigid unit data and neutral groups ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith may 1992. ++c amended - w.smith march 1994 ++c amended - t.forester april 1994 ++c amended - w.smith dec 1994 - getrec etc ++c amended - a.smondyrev may 2000 - keydih=5 for ++c ryckaert-bellemans potential in dihedrals ++c amended - a.smondyrev may 2000 - keydih=6 for ++c fluorinated ryckaert-bellemans potential in dihedrals ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lunits,lmols,lneut,ltable,lnsq,lshl,safe,lpmf ++ logical loop1,loop2,lsolva,lfree,lexcite,lswitch,lghost ++ ++ integer idnode,keyfce,keyfld,natms,ngrp,ntpatm,ntpmls ++ integer ntpvdw,ntptbp,ntpmet,ntpfbp,nshels,ksite ++ integer nsite,nconst,nangle,ndihed,ninver,nbonds ++ integer nteth,nspmf,itmols,i,idum,keyver ++ integer ntpter,keyshl,iatm,natmsr,ntghost ++ ++ real(8) dlrpot,engunit,rvdw,rcuttb,rctter,rcutfb ++ real(8) sumchg ++ ++ data loop1/.true./,loop2/.true./ ++ ++c initialise system counters: atomic site index, number of ++c constraints, bond angles, dihedrals, inversions, chemical bonds, ++c unique atom types, total number of atoms, ++c total number of rigid groups, number of tethered atoms, ++c number of three body potentials ++ ++ nsite=0 ++ nconst=0 ++ nangle=0 ++ ndihed=0 ++ ninver=0 ++ nbonds=0 ++ ntpatm=0 ++ natms=0 ++ ngrp=0 ++ nteth=0 ++ ntptbp=0 ++ ntpter=0 ++ ntpmet=0 ++ ntpvdw=0 ++ ntpfbp=0 ++ nshels=0 ++ nspmf=0 ++ keyfld=0 ++ keyshl=0 ++ ntghost=0 ++ natmsr=0 ++ ntcons_ghost=0 ++ ++ lunits=.false. ++ lmols=.false. ++ lneut=.false. ++ ltable=.false. ++ lmetab=.false. ++ lshl=.false. ++ lpmf=.false. ++ engunit=1.d0 ++ ++ numbonds(:)=0 ++ numpmf(:)=0 ++ numcon(:)=0 ++ numdih(:)=0 ++ numinv(:)=0 ++ numgrp(:)=0 ++ numsit(:)=0 ++ numteth(:)=0 ++ numshl(:)=0 ++ npmf(:)=0 ++ indpmf(:)=0 ++ ++c open force field data file ++ ++ if(idnode.eq.0)open (nfield,file='FIELD',status='old') ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,'SYSTEM SPECIFICATION')") ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read and process directives from field file ++ ++ do while(loop1) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c convert to lowercase and remove leading blanks ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.' ')then ++ ++c record is commented out ++ cycle ++ ++ elseif(findstring('units',record,idum))then ++ ++c identify energy unit for input/output ++ ++ lunits=.true. ++ call define_units(idnode,engunit) ++ ++c neutral group control option ++ ++ elseif(findstring('neut',record,idum))then ++ ++ lneut=.true. ++ if(idnode.eq.0) ++ x write(nrite,"(/,' neutral group implementation in use')") ++ ++c can't have neutral groups with all-pairs ++ ++ if(lnsq)call error(idnode,426) ++ ++c specify molecular species ++ ++ elseif(findstring('molecu',record,idum))then ++ ++c number of molecular types ++ ++ if(lmols)call error(idnode,11) ++ lmols=.true. ++ ntpmls=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,1x,'number of molecular types',6x,i10)") ++ x ntpmls ++ ++ if(ntpmls.gt.mxtmls)call error(idnode,10) ++ ++c initialise total system charge ++ ++ sumchg=0.d0 ++ ++c read in molecular characteristics ++ ++ do itmols=1,ntpmls ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'molecular species type',9x,i10)") ++ x itmols ++ ++c name of molecular species ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++ call copystring(record,molnam(1,itmols),40) ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,1x,'name of species:',13x,40a1)") ++ x (molnam(i,itmols),i=1,40) ++ ++c stop processing if energy unit has not been specified ++ ++ if(.not.lunits)call error(idnode,6) ++ ++c read molecular data ++ ++ loop2=.true. ++ ++ do while(loop2) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ ++ ksite=0 ++ ++ if(findstring('nummol',record,idum))then ++ ++ nummols(itmols)=intstr(record,lenrec,idum) ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'number of molecules ', ++ x 10x,i10)")nummols(itmols) ++ ++ elseif(findstring('atoms',record,idum))then ++ ++c read in atomic details ++ ++ call define_atoms ++ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read core - shell spring parameters ++ ++ elseif(findstring('shell',record,idum))then ++ ++ lshl=.true. ++ call define_core_shell ++ x (safe,idnode,itmols,nshels,nsite,keyshl, ++ x engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read chemical bond force constant and bondlength ++ ++ elseif(findstring('bonds',record,idum))then ++ ++ call define_bonds ++ x (safe,idnode,itmols,nbonds,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read bond atom indices and constraint bondlength ++ ++ elseif(findstring('constr',record,idum))then ++ ++ call define_constraints ++ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read pmf bond atom indices, weights and constraint bondlength ++ ++ elseif(findstring('pmf',record,idum))then ++ ++ if(lpmf)call error(idnode,484) ++ lpmf=.true. ++ call define_pmf(safe,idnode,itmols,nspmf) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular angular potential parameters ++ ++ elseif(findstring('angles',record,idum))then ++ ++ call define_angles ++ x (safe,idnode,itmols,nangle,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular dihedral potential parameters ++ ++ elseif(findstring('dihedr',record,idum))then ++ ++ call define_dihedrals ++ x (safe,idnode,itmols,ndihed,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular inversion potential parameters ++ ++ elseif(findstring('invers',record,idum))then ++ ++ call define_inversions ++ x (safe,idnode,itmols,ninver,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read rigid body data ++ ++ elseif(findstring('rigid',record,idum))then ++ ++ call define_rigid_body ++ x (safe,lghost,idnode,itmols,ngrp,natmsr) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read tethered atom indices and tethering parameters ++ ++ elseif(findstring('teth',record,idum))then ++ ++ call define_tethers ++ x (safe,idnode,itmols,nteth,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c finish of data for one molecular type ++ ++ elseif(findstring('finish',record,idum))then ++ ++c running total of number of atoms in system ++ ++ natms=natms+nummols(itmols)*numsit(itmols) ++ if(natms.gt.mxatms)call error(idnode,75) ++ ++c check core-shell units are not both in same rigid body unit ++ ++ call check_shells(idnode,itmols,nshels,ngrp) ++ ++ loop2=.false. ++ ++ else ++ ++c error exit for unidentified directive in molecular data ++ ++ if(idnode.eq.0)write(nrite,'(12x,a)')record ++ call error(idnode,12) ++ ++ endif ++ ++ enddo ++ ++c construction of atmolt table for solvation calculation ++ ++ if(lsolva)then ++ ++ do iatm=natmsr+1,natms ++ atmolt(iatm)=itmols ++ enddo ++ natmsr=natms ++ ++ endif ++ ++ enddo ++ ++c construction of atm_fre table for free energy or excitation ++ ++ if(lfree.or.lexcite.or.lswitch)then ++ ++ atm_fre(:)=0 ++ if((ind_fre(1).ne.0).and.(ind_fre(2).ne.0))then ++ ++ do iatm=ind_fre(1),ind_fre(2) ++ atm_fre(iatm)=1 ++ enddo ++ ++ endif ++ ++ if((ind_fre(3).ne.0).and.(ind_fre(4).ne.0))then ++ ++ do iatm=ind_fre(3),ind_fre(4) ++ ++ atm_fre(iatm)=2 ++ if(lghost)ntghost=ntghost+1 ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c calculate system charge ++ ++ call check_syschg(idnode,ntpmls,sumchg) ++ ++c read in the nonbonded potential energy parameters ++ ++ elseif(findstring('vdw',record,idum))then ++ ++ call define_van_der_waals ++ x (safe,ltable,lunits,lmols,idnode,ntpvdw, ++ x ntpatm,keyfce,dlrpot,rvdw,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read in the metal potential energy parameters ++ ++ elseif(findstring('met',record,idum))then ++ ++ call define_metals ++ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rvdw,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read the three body potential energy parameters ++ ++ elseif(findstring('tbp',record,idum))then ++ ++ call define_three_body ++ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read the tersoff potential energy parameters ++ ++ elseif(findstring('tersoff',record,idum))then ++ ++ call define_tersoff ++ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read in the four body potential energy parameters ++ ++ elseif(findstring('fbp',record,idum))then ++ ++ call define_four_body ++ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, ++ x rcutfb,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read external field data ++ ++ elseif(findstring('extern',record,idum))then ++ ++ call define_external_field ++ x (safe,lunits,idnode,keyfld,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c normal end of FIELD file ++ ++ elseif(findstring('close',record,idum))then ++ ++ loop1=.false. ++ if(ntpvdw.eq.0.and.ntpmet.eq.0.and. ++ x mod(keyfce,2).eq.1)call error(idnode,145) ++ ++c error exit for unidentified directive ++ ++ else ++ ++ if(idnode.eq.0)write(nrite,'(100a)')record ++ call abort_field_read(2,idnode,nfield) ++ ++ endif ++ ++ enddo ++ ++c close force field file ++ ++ if(idnode.eq.0)close (nfield) ++ ++ ++ if(lshl.and.idnode.eq.0)then ++ ++ if(keyshl.eq.1)write(nrite, ++ x "(/,/,'adiabatic shell model in operation')") ++ ++ if(keyshl.eq.2)write(nrite, ++ x "(/,/,'relaxed shell model in operation')") ++ ++ endif ++ ++ if(lshl.and.keyshl.eq.0)call error(idnode,1951) ++ ++c if metadynamics and shell selected use only velocity verlet ++ ++ if(lshl.and.lmetadyn.and.keyver.eq.0)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'switching to velocity verlet for metadynamics')") ++ keyver=1 ++ ++ endif ++ ++ return ++ end subroutine sysdef ++ ++ subroutine sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading the configuration data file ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 atname(8) ++ ++ logical loglnk,safe,lneut,nolink,lfree,lfrmas ++ integer idnode,imcon,keyens,keyfce,keyres,levcfg,multt ++ integer ntpmls,i,indatm,indnam,indneu,k,ilx,ily,ilz ++ integer m,l,ncells,idum,mxnode ++ real(8) delr,rcut,volm,xcoord,ycoord,zcoord,totmas,xveloc ++ real(8) yveloc,zveloc,xforce,yforce,zforce,axx,rt3,xhi,yhi,zhi ++ real(8) width,dum1,dum2,test,com(3) ++ ++c open the system input file ++ ++ if(idnode.eq.0)open (nconf,file='CONFIG') ++ ++c read the CONFIG file header ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ ++ call copystring(record,cfgname,80) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'configuration file name: ',/,/,10x,80a1)")cfgname ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ ++ levcfg=intstr(record,lenrec,idum) ++ imcon=intstr(record,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'selected image convention',6x,i10)")imcon ++ ++c check config file contents for consistent data ++ ++ if((imcon.eq.0.or.imcon.eq.6).and. ++ x (keyfce/2.eq.1.or.keyfce/2.eq.6)) ++ x call error(idnode,180) ++ ++ if(imcon.eq.0.and.(.not.lneut).and.(keyfce.gt.1) ++ x .and.(multt.eq.1))call warning(idnode,30,0.d0,0.d0,0.d0) ++ ++ if(imcon.eq.0.and.(keyens.ge.4.and.keyens.le.7)) ++ x call error(idnode,390) ++ if(imcon.le.2.and.(keyens.eq.6.or.keyens.eq.7))imcon=3 ++ if(keyres.gt.0.and.levcfg.lt.1)call error(idnode,85) ++ ++c specify molecular dynamics simulation cell ++ ++ if(imcon.eq.0)then ++ ++c if no periodic boundaries - set zero values for cell ++c vectors and cell volume ++ ++ cell(:)=0.d0 ++ volm=0.d0 ++ ++ else ++ ++c read cell vectors ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(1)=dblstr(record,lenrec,idum) ++ cell(2)=dblstr(record,lenrec,idum) ++ cell(3)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(4)=dblstr(record,lenrec,idum) ++ cell(5)=dblstr(record,lenrec,idum) ++ cell(6)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(7)=dblstr(record,lenrec,idum) ++ cell(8)=dblstr(record,lenrec,idum) ++ cell(9)=dblstr(record,lenrec,idum) ++ ++ endif ++ ++c read the atomic coordinates ++ ++ indatm=0 ++ indnam=0 ++ indneu=0 ++ safe=.true. ++ ++ do k=1,ntpmls ++ ++ do l=1,nummols(k) ++ ++ do m=1,numsit(k) ++ ++ indatm=indatm+1 ++ ++ if(indatm.gt.mxatms)call error(idnode,45) ++ ++ xxx(indatm)=0.d0 ++ yyy(indatm)=0.d0 ++ zzz(indatm)=0.d0 ++ vxx(indatm)=0.d0 ++ vyy(indatm)=0.d0 ++ vzz(indatm)=0.d0 ++ fxx(indatm)=0.d0 ++ fyy(indatm)=0.d0 ++ fzz(indatm)=0.d0 ++ ++ if(idnode.eq.0)then ++ ++ if(levcfg.eq.0)then ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ ++ elseif(levcfg.eq.1)then ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc ++ ++ else ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc ++ read(nconf,'(3f20.0)',end=100)xforce,yforce,zforce ++ ++ endif ++ ++c strip blanks off atom name ++ ++ call strip(atname,8) ++ ++ if(sitnam(indnam+m).eq.mkwd8(atname))then ++ ++ xxx(indatm)=xcoord ++ yyy(indatm)=ycoord ++ zzz(indatm)=zcoord ++ ++ if(levcfg.gt.0)then ++ ++ vxx(indatm)=xveloc ++ vyy(indatm)=yveloc ++ vzz(indatm)=zveloc ++ ++ endif ++ ++ if(levcfg.gt.1)then ++ ++ fxx(indatm)=xforce ++ fyy(indatm)=yforce ++ fzz(indatm)=zforce ++ ++ endif ++ ++ else ++ ++ write(nrite,"(/,/,'unidentified atom label :',8a1, ++ x ': atom number ',i5)")atname,indatm ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ call gstate(safe) ++ if(.not.safe)call error(idnode,25) ++ ++ ltype(indatm)=ltpsit(indnam+m) ++ weight(indatm)=wgtsit(indnam+m) ++ chge(indatm)=chgsit(indnam+m) ++ atmnam(indatm)=sitnam(indnam+m) ++ lstfrz(indatm)=lfzsit(indnam+m) ++ if(lneut)lstneu(indatm)=nugrp(indnam+m)+indneu ++ ++c reset atomic masses according to free energy definitions ++ ++ if(lfree)then ++ ++ weight_sav(indatm)=weight(indatm) ++ ++ if(lfrmas)then ++ ++ if(indatm.ge.ind_fre(1).and.indatm.le.ind_fre(2))then ++ weight(indatm)=lambda1*weight(indatm) ++ elseif(indatm.ge.ind_fre(3).and.indatm.le.ind_fre(4)) ++ x then ++ weight(indatm)=lambda2*weight(indatm) ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ indneu=indneu+nugrp(indnam+numsit(k)) ++ ++ enddo ++ ++ indnam=indnam+numsit(k) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ call gdsum(xxx,indatm,buffer) ++ call gdsum(yyy,indatm,buffer) ++ call gdsum(zzz,indatm,buffer) ++ ++ if(levcfg.gt.0)then ++ ++ call gdsum(vxx,indatm,buffer) ++ call gdsum(vyy,indatm,buffer) ++ call gdsum(vzz,indatm,buffer) ++ ++ endif ++ ++ if(levcfg.gt.1)then ++ ++ call gdsum(fxx,indatm,buffer) ++ call gdsum(fyy,indatm,buffer) ++ call gdsum(fzz,indatm,buffer) ++ ++ endif ++ ++ endif ++ ++c check integrity of cell vectors : for cubic, TO and RD cases ++c ie. cell(1)=cell(5)=cell(9) (or cell(9)/sqrt(2) for RD) ++ ++ if((imcon.eq.1).or.(imcon.eq.4).or.(imcon.eq.5))then ++ ++ axx=(abs(cell(1))+abs(cell(5)))/2.d0 ++ test=1.d-8*axx ++ if(abs(cell(1)-axx).gt.test)call error(idnode,410) ++ if(abs(cell(5)-axx).gt.test)call error(idnode,410) ++ if(imcon.eq.5)then ++ if(abs(cell(9)-axx*sqrt(2.d0)).gt.test) ++ x call error(idnode,410) ++ else ++ if(abs(cell(9)-axx).gt.test)call error(idnode,410) ++ endif ++ ++ endif ++ ++c check integrity of hexagonal prism cell vectors ++ ++ if(imcon.eq.7)then ++ ++ rt3=sqrt(3.d0) ++ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) ++ x call error(idnode,410) ++ ++ endif ++ ++c check 2D PBC for imcon=6 ++ ++ if(imcon.eq.6)then ++ ++ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) ++ ++ endif ++ ++c check for diagonal cell matrix if appropriate ++ ++ if((imcon.eq.1).or.(imcon.eq.2).or.(imcon.eq.4).or. ++ x (imcon.eq.5).or.(imcon.eq.7))then ++ ++ if(abs(cell(2)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(4)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) ++ ++ endif ++ ++c put centre of mass at centre of coordinates if imcon=0 ++ ++ if(imcon.eq.0)then ++ ++ totmas=getmass(indatm,idnode,mxnode) ++ call getcom(indatm,idnode,mxnode,totmas,com) ++ ++ do i=1,indatm ++ ++ xxx(i)=xxx(i)-com(1) ++ yyy(i)=yyy(i)-com(2) ++ zzz(i)=zzz(i)-com(3) ++ ++ enddo ++ ++ endif ++ ++c set widths if unset - needed for check on link cells below ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++ xhi=abs(xxx(1)) ++ yhi=abs(yyy(1)) ++ zhi=abs(zzz(1)) ++ do i=2,indatm ++ ++ xhi=max(xhi,abs(xxx(i))) ++ yhi=max(yhi,abs(yyy(i))) ++ zhi=max(zhi,abs(zzz(i))) ++ ++ enddo ++ if(imcon.eq.0)then ++ ++ cell(1)=max(2.d0*xhi+rcut+delr,3.d0*(rcut+delr)) ++ cell(5)=max(2.d0*yhi+rcut+delr,3.d0*(rcut+delr)) ++ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) ++ ++ endif ++ ++ if(imcon.eq.6.and.cell(9).lt.1.d-6)then ++ ++ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) ++ ++ endif ++ ++ endif ++ ++c calculate dimensional properties of simulation cell ++ ++ call dcell(cell,celprp) ++ ++ if(imcon.eq.0)then ++ ++ volm=0.d0 ++ ++ elseif(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ else ++ ++ volm=celprp(10) ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,/,1x,'simulation cell vectors'/,/)") ++ write(nrite,"(21x,3f12.6)")cell ++ ++ write(nrite, ++ x "(/,/,1x,'system volume ',2x,1p,g22.12)")volm ++ ++ endif ++ ++c check value of cutoff and reset if necessary ++ ++ if(imcon.gt.0)then ++ ++ width=min(celprp(7),celprp(8),celprp(9))/2.d0 ++ if(imcon.eq.4)width=sqrt(3.d0)*cell(1)/4.d0 ++ if(imcon.eq.5)width=cell(1)/2.d0 ++ if(imcon.eq.6)width=min(celprp(7),celprp(8))/2.d0 ++ ++c halt program if potential cutoff exceeds cell width ++ ++ if(rcut.gt.width)call error(idnode,95) ++ ++ endif ++ ++c decide on whether to use link cells for verlet list constructor ++ ++ if(nolink)then ++ ++ loglnk=.false. ++ ++ else ++ ++ loglnk=.true. ++ ++ ilx=int(celprp(7)/(rcut+delr)) ++ ily=int(celprp(8)/(rcut+delr)) ++ ilz=int(celprp(9)/(rcut+delr)) ++ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. ++ ncells=ilx*ily*ilz ++ if(lneut.and.ncells.le.36)loglnk=.false. ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. ++ if(loglnk.and.ncells.gt.mxcell)then ++ ++ dum1=dble(ncells) ++ dum2=dble(mxcell) ++ call warning(idnode,90,dum1,dum2,dum2) ++ loglnk=.false. ++ ++ endif ++ ++ endif ++ ++ if(loglnk.and.idnode.eq.0) ++ x write(nrite,"(/,/,' link cell algorithm in use')") ++ ++ if(idnode.eq.0)close (nconf) ++ ++c ensure PBC compliance of starting structure ++ ++ if(keyres.eq.0.and.imcon.gt.0)then ++ ++ call images(imcon,idnode,mxnode,indatm,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,indatm,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ return ++ ++c error exit for config file read ++ ++ 100 call abort_config_read(2,idnode,nconf) ++ ++ end subroutine sysgen ++ ++ subroutine sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading the REVIVE file data and ++c defining the initial thermodynamic and structural accumulators. ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c adapted - d. quigley nov 2010, metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzden,lfree,lsolva,lghost,lpsoc ++ integer idnode,imcon,keyfce,keyres,mxnode,natms,nstep,numacc ++ integer numrdf,ntpatm,nzden,i,j,k,ntpmet,ntshl,ntpvdw ++ real(8) chip,chit,conint,elrc,engunit,virlrc,rvdw,volm ++ real(8) dnumrd,dnstep,dnumac,dnzden,virtot,vircom,tboost ++ real(8) chit_shl ++ ++c read or initialise accumulator arrays ++ ++ if(keyres.eq.1.and.idnode.eq.0)then ++ ++c read accumulator data from dump file ++ ++ open(nrest,file='REVOLD',form='unformatted') ++ ++ read(nrest) dnstep,dnumac,dnumrd,chit,chip,conint,dnzden, ++ x tboost,chit_shl ++ read(nrest) virtot,vircom,eta,strcns,strbod ++ read(nrest) stpval ++ read(nrest) sumval ++ read(nrest) ssqval ++ read(nrest) zumval ++ read(nrest) ravval ++ read(nrest) stkval ++ read(nrest) xx0,yy0,zz0 ++ read(nrest) xxs,yys,zzs ++ ++ if(lgofr) read(nrest)rdf ++ if(lzden) read(nrest)zdens ++ ++ nstep=nint(dnstep) ++ numacc=nint(dnumac) ++ numrdf=nint(dnumrd) ++ nzden=nint(dnzden) ++ close (nrest) ++ ++ else ++ ++c initialise step counters ++ ++ nstep=0 ++ numacc=0 ++ numrdf=0 ++ nzden=0 ++ ++c initialise temperature and pressure coupling parameters ++c and integral for conserved quantity ++ ++ chit=0.d0 ++ chip=0.d0 ++ conint=0.d0 ++ virtot=0.d0 ++ vircom=0.d0 ++ chit_shl=0.d0 ++ do i=1,9 ++ ++ eta(i)=0.d0 ++ strcns(i)=0.d0 ++ strbod(i)=0.d0 ++ ++ enddo ++ ++c initialise accumulator arrays ++ ++ do i=1,mxnstk ++ ++ stpval(i)=0.d0 ++ sumval(i)=0.d0 ++ ssqval(i)=0.d0 ++ zumval(i)=0.d0 ++ ravval(i)=0.d0 ++ ++ enddo ++ ++ do i=1,mxatms ++ ++ xx0(i)=0.d0 ++ yy0(i)=0.d0 ++ zz0(i)=0.d0 ++ xxs(i)=0.d0 ++ yys(i)=0.d0 ++ zzs(i)=0.d0 ++ ++ enddo ++ ++ do j=1,mxnstk ++ ++ do i=1,mxstak ++ ++ stkval(i,j)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ if(lgofr)then ++ ++ do i=1,mxxtyp ++ ++ do j=1,mxrdf ++ ++ rdf(j,i)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(lzden)then ++ ++ do i=1,mxatyp ++ ++ do j=1,mxzdn ++ zdens(j,i)=0.d0 ++ enddo ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c put shells on cores at start ++ ++ if(lpsoc.and.keyres.ne.1.and.ntshl.gt.0) ++ x call put_shells_on_cores(idnode,mxnode,ntshl) ++ ++c if restart then broadcast stored variables via a global sum ++ ++ if(keyres.eq.1.and.mxnode.gt.1)then ++ ++ if(mxbuff.lt.natms.or.mxbuff.lt.mxnstk*mxstak) ++ x call error(idnode,186) ++ ++ buffer(1)=chit ++ buffer(2)=chip ++ buffer(3)=conint ++ buffer(4)=dble(nstep) ++ buffer(5)=dble(numacc) ++ buffer(6)=dble(numrdf) ++ buffer(7)=dble(nzden) ++ buffer(8)=tboost ++ buffer(9)=virtot ++ buffer(10)=vircom ++ buffer(11)=chit_shl ++ call gdsum(buffer(1),11,buffer(12)) ++ chit=buffer(1) ++ chip=buffer(2) ++ conint=buffer(3) ++ nstep=nint(buffer(4)) ++ numacc=nint(buffer(5)) ++ numrdf=nint(buffer(6)) ++ nzden=nint(buffer(7)) ++ tboost=buffer(8) ++ virtot=buffer(9) ++ vircom=buffer(10) ++ chit_shl=buffer(11) ++ ++ call gdsum(eta,9,buffer) ++ call gdsum(strcns,9,buffer) ++ call gdsum(strbod,9,buffer) ++ call gdsum(stpval,mxnstk,buffer) ++ call gdsum(sumval,mxnstk,buffer) ++ call gdsum(ssqval,mxnstk,buffer) ++ call gdsum(zumval,mxnstk,buffer) ++ call gdsum(ravval,mxnstk,buffer) ++ call gdsum(stkval,mxnstk*mxstak,buffer) ++ call gdsum(xx0,natms,buffer) ++ call gdsum(yy0,natms,buffer) ++ call gdsum(zz0,natms,buffer) ++ call gdsum(xxs,natms,buffer) ++ call gdsum(yys,natms,buffer) ++ call gdsum(zzs,natms,buffer) ++ ++c for rdf table - broadcast and normalise ++ ++ if(lgofr)then ++ ++ do k=1,mxxtyp ++ ++ call gdsum(rdf(1,k),mxrdf,buffer) ++ ++ do j=1,mxrdf ++ rdf(j,k)=rdf(j,k)/dble(mxnode) ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(lzden)then ++ ++ do k=1,mxatyp ++ ++ call gdsum(zdens(1,k),mxzdn,buffer) ++ ++ do j=1,mxzdn ++ zdens(j,k)=zdens(j,k)/dble(mxnode) ++ enddo ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c number densities and long-range corrections ++ ++ elrc=0.d0 ++ virlrc=0.d0 ++ ++ if(imcon.eq.0.or.imcon.eq.6)volm=4.d0*pi/3.d0*rvdw**3 ++ ++ call lrcorrect ++ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, ++ x ntpatm,ntpvdw,elrc,engunit,virlrc,rvdw,volm) ++ ++ if(lmetab.or.ntpmet.eq.0)then ++ ++ elrcm(0)=0.d0 ++ vlrcm(0)=0.d0 ++ ++ else ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++ if(imcon.eq.0.or.imcon.eq.6)volm=0.d0 ++ ++ return ++ end subroutine sysinit ++ ++ subroutine systemp ++ x (idnode,imcon,keyres,mxnode,natms,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for setting the initial system temperature ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,keyres,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,ntshl,levcfg,i,io,k,keyshl ++ real(8) degfre,degshl,degrot,temp,tolnce,sigma,rsq ++ ++c number of degrees of freedom ++c 3 for com translation ++c 3 for angular momentum about origin (non-periodic systems only) ++ ++ degfre=dble(3*(ntfree-ntshl)-3-ntcons)+degfre ++ if(imcon.eq.0.or.imcon.eq.6)degfre=degfre-3.0d0 ++ if(imcon.eq.0.or.imcon.eq.6)degrot=max(0.d0,degrot-3.0d0) ++ degshl=dble(3*ntshl) ++ ++c lose one degree of freedom if temperature constrained ++c gaussian constraints ++ ++c if(keyens.eq.1)degfre=degfre-1.d0 ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,' total degrees of freedom ',f20.0,/, ++ x ' rotational degrees of freedom ',f20.0,/, ++ x ' shell pseudo degrees of freedom',f20.0)") ++ x degfre,degrot,degshl ++ if(degfre.lt.1.d0)call error(idnode,350) ++ ++c define reciprocal masses of atoms ++ ++ do i=1,natms ++ ++ if(lstfrz(i).ne.0.or.weight(i).lt.1.d-6)then ++ ++ rmass(i)=0.d0 ++ weight(i)=0.d0 ++ ++ else ++ ++ rmass(i)=1.d0/weight(i) ++ ++ endif ++ ++ enddo ++ ++c generate starting velocities ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++ if(keyres.eq.0)then ++ ++ call gauss(natms,vxx,vyy,vzz) ++ ++ do i=1,natms ++ ++ rsq=sqrt(rmass(i)) ++ vxx(i)=vxx(i)*rsq ++ vyy(i)=vyy(i)*rsq ++ vzz(i)=vzz(i)*rsq ++ ++ enddo ++ ++ if(ntcons.gt.0)call quench ++ x (imcon,idnode,mxnode,natms,nscons,tolnce) ++ ++ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ if(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ elseif(keyres.eq.1.or.keyres.eq.3)then ++ ++ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ elseif(keyres.eq.2)then ++ ++ if(ngrp.gt.0)then ++ ++ call vscaleg ++ x (idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ elseif(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c print out sample of initial configuration ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'sample of starting configuration',/)") ++ ++ io=(natms+19)/20 ++ if((levcfg.le.1).and.(idnode.eq.0)) ++ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',/,/)") ++ if((levcfg.eq.2).and.(idnode.eq.0)) ++ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)', ++ x 7x,'fx(i)',7x,'fy(i)',7x,'fz(i)',/,/)") ++ ++ do i=1,natms,io ++ ++ if(levcfg.le.1)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i) ++ ++ elseif(levcfg.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i), ++ x vxx(i),vyy(i),vzz(i),fxx(i),fyy(i),fzz(i) ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine systemp ++ ++ subroutine sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine defining global bookkeeping ++c arrays ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical loglnk,lneut,lshmov,lcnb,lsolva,lghost ++ integer idnode,imcon,mxnode,natms,nneut,ngrp,nscons,ntangl,i ++ integer ntbond,ntcons,ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,ii,isol,itmols,igsol,iggsol,natmsf,natmsl ++ integer ntghost,natms2 ++ real(8) degfre,degrot ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c neutral group bookkeeping ++ ++ call neutbook(lneut,idnode,natms,nneut) ++ ++c rigid body bookkeeping ++ ++ call quatbook ++ x (lsolva,idnode,imcon,mxnode,natms2,ngrp,ntpmls, ++ x ntfree,degfre,degrot) ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ ++ numcon(mxtmls)=numcon(mxtmls)+ntcons_ghost ++ numgrp(mxtmls)=numgrp(mxtmls)+ngrp_ghost ++ ++ endif ++ ++c construct list of excluded pair interactions ++ ++ if(lneut)then ++ ++ call exclude(idnode,mxnode,natms,ntpmls) ++ call excludeneu(idnode,mxnode,nneut) ++ ++ elseif(.not.lneut)then ++ ++ call exclude(idnode,mxnode,natms,ntpmls) ++ ++ if(loglnk)then ++ ++ call exclude_link(idnode,mxnode,ntpmls) ++ ++ else ++ ++ call exclude_atom(idnode,mxnode,natms,ntpmls) ++ ++ endif ++ ++ endif ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ ++ numcon(mxtmls)=numcon(mxtmls)-ntcons_ghost ++ numgrp(mxtmls)=numgrp(mxtmls)-ngrp_ghost ++ ++ endif ++ ++c construct interaction lists for bonded forces ++ ++ call intlist ++ x (lshmov,lcnb,idnode,mxnode,natms2,nscons,ntangl,ntbond, ++ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) ++ ++c adaptations for solvation and excitation simulations ++ ++ if(lsolva.or.lghost)then ++ ++ natmsf=0 ++ natmsl=0 ++ natm_sol(:)=0 ++ const_sol(:)=numcon(:)*nummols(:) ++ rigid_sol(:)=numgrp(:)*nummols(:) ++ ++ if(ngrp.eq.0)then ++ ++ do itmols=1,mxtmls ++ ++ natmsl=natmsl+numsit(itmols)*nummols(itmols) ++ ++ do isol=natmsf+1,natmsl ++ ++ if(lstfrz(isol).eq.0)then ++ natm_sol(itmols)=natm_sol(itmols)+1 ++ endif ++ ++ enddo ++ ++ natmsf=natmsl ++ ++ enddo ++ ++ else ++ ++ ii=1 ++ ++ do itmols=1,mxtmls ++ ++ natmsl=natmsl+numsit(itmols)*nummols(itmols) ++ ++ do isol=natmsf+1,natmsl ++ ++ if(lstgot_sol(ii).eq.isol)then ++ ii=ii+1 ++ else ++ ++ if(lstfrz(isol).eq.0)then ++ natm_sol(itmols)=natm_sol(itmols)+1 ++ endif ++ ++ endif ++ ++ enddo ++ ++ natmsf=natmsl ++ ++ enddo ++ ++ degrot_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 ++ degfre_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 ++ ++ endif ++ ++ if(lghost)natm_sol(mxtmls)=natm_sol(mxtmls)-ntghost ++ degfre_sol(:)=dble(3*(natm_sol(:))-const_sol(:))+degfre_sol(:) ++ ++ endif ++ ++ return ++ end subroutine sysbook ++ ++ subroutine define_units(idnode,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting energy units ++c ++c copyright - daresbury laboratory ++c author - w. smith august 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,idum,i ++ real(8) engunit ++ logical blank ++ ++ blank=.true. ++ ++ do i=6,lenrec ++ if(record(i).ne.' ')blank=.false. ++ enddo ++ ++ if(blank)then ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=dl_poly internal ', ++ x 'units ')") ++ ++ elseif(findstring('ev',record,idum))then ++ ++ engunit=9648.530821d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=electron volts ')") ++ ++ elseif(findstring('kev',record,idum))then ++ ++ engunit=9648530.821d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kilo electron volts ')") ++ ++ elseif(findstring('kcal',record,idum))then ++ ++ engunit=418.4d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kcal/ mol ')") ++ ++ elseif(findstring('kj',record,idum))then ++ ++ engunit=1.d2 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kjoule/mol ')") ++ ++ elseif(findstring('k',record,idum))then ++ ++ engunit=boltz ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kelvin ')") ++ ++ elseif(findstring('internal',record,idum))then ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=dl_poly internal', ++ x ' units ')") ++ ++ else ++ ++ if(idnode.eq.0)write(nrite,'(a)')record ++ call error(idnode,5) ++ ++ endif ++ ++ return ++ end subroutine define_units ++ ++ subroutine quatbook ++ x (lsolva,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree, ++ x degfre,degrot) ++ ++c************************************************************************** ++c ++c dl_poly subroutine for setting up bookkeeping for rigid bodies ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c************************************************************************* ++ ++ implicit none ++ ++ logical safe,pass1,pass2,linear,lsolva ++ integer fail,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree ++ integer i,igrp,jgrp,kgrp,jr,jt,igrp1,igrp2,itmols,imols,lgrp,id ++ integer ii,jj,isite,k,kk,ill,i1,i2,i3,j,ngp,ifre1,ifre2,ig,ij ++ integer fngrp,lngrp ++ real(8) degfre,degrot,dnorm,a1,rtall,rotall,rot,aa,rotinr,bb,rot1 ++ real(8) rsq,det,dettest,aq,bq,cq,dq,eq,fq,gq,hq,rnorm,tol,rotxyz ++ real(8) rotlim,rrr ++ ++ integer, allocatable :: ind(:,:),lstgot(:) ++ real(8), allocatable :: gaxs(:,:),rotmin(:),accum(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ dimension rot(9),aa(9),rotinr(3,3),bb(9),rot1(3,3),fail(5) ++ ++ data fail/0,0,0,0,0/ ++ ++c allocate working arrays ++ ++ allocate (ind(mxgrp,3),lstgot(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) ++ allocate (gaxs(mxungp,9),rotmin(mxungp),stat=fail(4)) ++ allocate (accum(mxungp),stat=fail(5)) ++ do i=1,5 ++ if(fail(i).ne.0)call error(idnode,1790) ++ enddo ++ ++c initialise bookkeeping indices ++ ++ igrp=0 ++ jgrp=0 ++ kgrp=0 ++ isite=0 ++ jr=0 ++ jt=0 ++ safe=.true. ++ degfre=0.d0 ++ degrot=0.d0 ++ ++c rigid body identifier ++ ++ do i=1,natms ++ lstbod(i)=0 ++ enddo ++ ++c number of rigid groups in system ++ ++ ngrp=0 ++ do itmols=1,ntpmls ++ ngrp=ngrp+nummols(itmols)*numgrp(itmols) ++ enddo ++ ++c block indices for groups ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c loop over molecule types ++ ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if(igrp.le.mxgrp)then ++ ++ lstgtp(igrp)=listyp(lgrp+kgrp) ++ id=listyp(lgrp+kgrp) ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2))then ++ ++ jgrp=jgrp+1 ++ ++ do jj=1,numgsit(id) ++ ++ jr=jr+1 ++ jt=jt+1 ++ ++ if(jr.le.mxatms.and.jt.le.mxatms)then ++ ++ lstrgd(jr)=lstgst(id,jj)+isite ++ lstgot(jt)=lstgst(id,jj)+isite ++ lstbod(lstgst(id,jj)+isite)=igrp ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ else ++ ++ do jj=1,numgsit(id) ++ ++ jt=jt+1 ++ if(jt.le.mxatms)then ++ ++ lstgot(jt)=lstgst(id,jj)+isite ++ lstbod(lstgst(id,jj)+isite)=igrp ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,304) ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ kgrp=kgrp+numgrp(itmols) ++ ++ enddo ++ ++ if(ngrp.eq.0)then ++ ++ j=0 ++ do i=1,natms ++ ++ if(lstfrz(i).eq.0)then ++ ++ j=j+1 ++ lstfre(j)=i ++ ++ endif ++ ++ enddo ++ ntfree=j ++ ++ else ++ ++c centre of mass of groups ++c assumes group dimensions are smaller than half box width ++ ++ do i=1,natms ++ lstme(i)=0 ++ enddo ++ ++ do id=1,mxungp ++ gmass(id)=0.d0 ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c working com is first site in group ++ ++ i=lstrgd(jr+1) ++ txx(ig)=xxx(i) ++ tyy(ig)=yyy(i) ++ tzz(ig)=zzz(i) ++ ++ id=lstgtp(ig) ++ safe=.false. ++ if(abs(gmass(id)).lt.1.d-10)safe=.true. ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ xxt(jr)=xxx(i)-txx(ig) ++ yyt(jr)=yyy(i)-tyy(ig) ++ zzt(jr)=zzz(i)-tzz(ig) ++ if(safe)gmass(id)=gmass(id)+weight(i) ++ ++ enddo ++ ++ enddo ++ ++c minimum image from working com ++ ++ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=0.d0 ++ gcmy(ig)=0.d0 ++ gcmz(ig)=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ gcmx(ig)=gcmx(ig)+weight(i)*xxt(jr) ++ gcmy(ig)=gcmy(ig)+weight(i)*yyt(jr) ++ gcmz(ig)=gcmz(ig)+weight(i)*zzt(jr) ++ ++ enddo ++ ++ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) ++ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) ++ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) ++ ++ enddo ++ ++c global communications ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++c make sure all nodes have same copy of gmass ++ ++ if(mxnode.gt.1)then ++ ++ do id=1,mxungp ++ ++ accum(id)=0.d0 ++ if(gmass(id).gt.0.d0)accum(id)=1.d0 ++ ++ enddo ++ ++ call gdsum(gmass(1),mxungp,buffer(1)) ++ call gdsum(accum(1),mxungp,buffer(1)) ++ ++ do id=1,mxungp ++ ++ dnorm=max(1.d0,accum(id)) ++ gmass(id)=gmass(id)/dnorm ++ ++ enddo ++ ++ endif ++ ++c find a group of each type on this node to ++c find principal axis system of the group type ++ ++ do id=1,mxungp ++ ++ jr=0 ++ ij=0 ++ safe=.false. ++ ++ do while(.not.safe.and.ij.lt.ngrp) ++ ++ ij=ij+1 ++ jr=jr+numgsit(lstgtp(ij)) ++ if(lstgtp(ij).eq.id)safe=.true. ++ ++ enddo ++ ++ if(safe)then ++ ++c rotational inertia accumulator ++ ++ do k=1,3 ++ ++ do kk=1,3 ++ ++ rotinr(k,kk)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstgot(jr) ++ ++ xxt(jr)=xxx(i)-gcmx(ij) ++ yyt(jr)=yyy(i)-gcmy(ij) ++ zzt(jr)=zzz(i)-gcmz(ij) ++ ++ call images(imcon,0,1,1,cell,xxt(jr),yyt(jr),zzt(jr)) ++ ++ rotinr(1,1)=rotinr(1,1)+weight(i)*(xxt(jr)**2) ++ rotinr(1,2)=rotinr(1,2)+weight(i)*xxt(jr)*yyt(jr) ++ rotinr(1,3)=rotinr(1,3)+weight(i)*xxt(jr)*zzt(jr) ++ rotinr(2,2)=rotinr(2,2)+weight(i)*(yyt(jr)**2) ++ rotinr(2,3)=rotinr(2,3)+weight(i)*yyt(jr)*zzt(jr) ++ rotinr(3,3)=rotinr(3,3)+weight(i)*(zzt(jr)**2) ++ ++ enddo ++ ++ rotinr(2,1)=rotinr(1,2) ++ rotinr(3,1)=rotinr(1,3) ++ rotinr(3,2)=rotinr(2,3) ++ ++ call jacobi(rotinr,rot1,3) ++ ++ rot(1)=rot1(1,1) ++ rot(4)=rot1(2,1) ++ rot(7)=rot1(3,1) ++ rot(2)=rot1(1,2) ++ rot(5)=rot1(2,2) ++ rot(8)=rot1(3,2) ++ rot(3)=rot1(1,3) ++ rot(6)=rot1(2,3) ++ rot(9)=rot1(3,3) ++ ++c rotational inertia accumulators ++ ++ rotinx(id,1)=0.d0 ++ rotiny(id,1)=0.d0 ++ rotinz(id,1)=0.d0 ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstgot(jr) ++ ++c site positions in principal axis system ++ ++ gxx(id,j)=rot(1)*xxt(jr)+rot(4)*yyt(jr)+rot(7)*zzt(jr) ++ gyy(id,j)=rot(2)*xxt(jr)+rot(5)*yyt(jr)+rot(8)*zzt(jr) ++ gzz(id,j)=rot(3)*xxt(jr)+rot(6)*yyt(jr)+rot(9)*zzt(jr) ++ ++c impose rounding ++ ++ if(abs(gxx(id,j)).lt.1.d-8)gxx(id,j)=0.d0 ++ if(abs(gyy(id,j)).lt.1.d-8)gyy(id,j)=0.d0 ++ if(abs(gzz(id,j)).lt.1.d-8)gzz(id,j)=0.d0 ++ ++c rotational inertia tensor of group type ++ ++ rotinx(id,1)=rotinx(id,1)+ ++ x weight(i)*(gyy(id,j)**2+gzz(id,j)**2) ++ rotiny(id,1)=rotiny(id,1)+ ++ x weight(i)*(gzz(id,j)**2+gxx(id,j)**2) ++ rotinz(id,1)=rotinz(id,1)+ ++ x weight(i)*(gxx(id,j)**2+gyy(id,j)**2) ++ ++ enddo ++ ++c set axis system such that: Ixx >=Iyy >=Izz ++ ++ rotxyz=max(rotinx(id,1),rotiny(id,1),rotinz(id,1)) ++ ++ if(rotxyz.ge.rotinx(id,1))then ++ ++ if(rotiny(id,1).ge.rotxyz)then ++ ++ do j=1,numgsit(id) ++ ++ a1=gxx(id,j) ++ gxx(id,j)=gyy(id,j) ++ gyy(id,j)=-a1 ++ ++ enddo ++ ++ rotiny(id,1)=rotinx(id,1) ++ rotinx(id,1)=rotxyz ++ ++ elseif(rotinz(id,1).ge.rotxyz)then ++ ++ do j=1,numgsit(id) ++ ++ a1=gxx(id,j) ++ gxx(id,j)=gzz(id,j) ++ gzz(id,j)=-a1 ++ ++ enddo ++ ++ rotinz(id,1)=rotinx(id,1) ++ rotinx(id,1)=rotxyz ++ ++ endif ++ ++ endif ++ ++ if(rotinz(id,1).gt.rotiny(id,1))then ++ ++ do j=1,numgsit(id) ++ ++ a1=gyy(id,j) ++ gyy(id,j)=gzz(id,j) ++ gzz(id,j)=-a1 ++ ++ enddo ++ ++ a1=rotinz(id,1) ++ rotinz(id,1)=rotiny(id,1) ++ rotiny(id,1)=a1 ++ ++ endif ++ ++c set up principal axis system in terms of site positions ++ ++c test for (near) linear unit ++ ++ ill=0 ++ rtall=(rotinx(id,1)+rotiny(id,1)+rotinz(id,1)) ++ ++ if(rtall.gt.1.d-5)then ++ rotall=rtall ++ else ++ rotall=1.d0 ++ endif ++ ++ rotmin(id)=min(rotinx(id,1),rotiny(id,1)) ++ rotmin(id)=min(rotmin(id),rotinz(id,1))/rotall ++ ++ if((rotinx(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ if((rotiny(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ if((rotinz(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ ++ if(ill.ge.2)then ++ ++c point particle only ++ ++ ind(id,1)=1 ++ ind(id,2)=1 ++ ind(id,3)=1 ++ ++ do jj=1,9 ++ gaxs(id,jj)=0.d0 ++ enddo ++ ++ elseif(ill.eq.1)then ++ ++c linear molecule ++ ++ ind(id,1)=1 ++ ind(id,2)=2 ++ ind(id,3)=1 ++ ++ aa(1)=gxx(id,1)-gxx(id,2) ++ aa(4)=gyy(id,1)-gyy(id,2) ++ aa(7)=gzz(id,1)-gzz(id,2) ++ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) ++ ++ if(abs(aa(7)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(7)**2) ++ aa(2)=0.d0 ++ aa(5)=aa(7)/rsq ++ aa(8)=-aa(4)/rsq ++ ++ elseif(abs(aa(4)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(1)**2) ++ aa(2)=-aa(4)/rsq ++ aa(5)=aa(1)/rsq ++ aa(8)=0.d0 ++ ++ elseif(abs(aa(1)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(1)**2+aa(7)**2) ++ aa(2)=-aa(7)/rsq ++ aa(5)=0.d0 ++ aa(8)=aa(1)/rsq ++ ++ endif ++ ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++ call invert(aa,bb,det) ++ ++ if(abs(det).lt.1.d-5)call error(idnode,306) ++ ++ do j=1,9 ++ gaxs(id,j)=bb(j) ++ enddo ++ ++ elseif(ill.eq.0)then ++ ++c non-linear molecule ++ ++ i1=1 ++ i2=1 ++ i3=1 ++ pass1=.true. ++ dettest=1.d-1 ++ ++ do while(pass1.and.i2.lt.numgsit(id)-1) ++ ++ i2=i2+1 ++ i3=i2 ++ pass2=.true. ++ ++ do while(pass2.and.i3.lt.numgsit(id)) ++ ++ i3=i3+1 ++ ++ aa(1)=gxx(id,i1)-gxx(id,i2) ++ aa(4)=gyy(id,i1)-gyy(id,i2) ++ aa(7)=gzz(id,i1)-gzz(id,i2) ++ aa(2)=gxx(id,i1)-gxx(id,i3) ++ aa(5)=gyy(id,i1)-gyy(id,i3) ++ aa(8)=gzz(id,i1)-gzz(id,i3) ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++c invert matrix ++ ++ call invert(aa,bb,det) ++ ++c check on size of determinant - to see if the 3 sites are ++c too close to being linear for safety. ++ ++ pass2=abs(det).lt.dettest ++ ++ enddo ++ ++ pass1=abs(det).lt.dettest ++ ++ enddo ++ ++ if(abs(det).lt.dettest)call error(idnode,306) ++ ++c store indices used ++ ++ ind(id,1)=i1 ++ ind(id,2)=i2 ++ ind(id,3)=i3 ++ ++c store coefficients ++ ++ do j=1,9 ++ ++ gaxs(id,j)=bb(j) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c check that rigid unit does not contain frozen atoms ++ ++ safe=.true. ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ if(lstfrz(i).ne.0)safe=.false. ++ ++ enddo ++ ++ enddo ++ ++c global check on error condition ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,360) ++ ++c quaternions for all rigid groups in system ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ i1=lstrgd(jr+ind(id,1)) ++ i2=lstrgd(jr+ind(id,2)) ++ i3=lstrgd(jr+ind(id,3)) ++ ++ jr=jr+numgsit(id) ++ ++c group basis vectors ++ ++ aa(1)=xxx(i1)-xxx(i2) ++ aa(4)=yyy(i1)-yyy(i2) ++ aa(7)=zzz(i1)-zzz(i2) ++ ++ call images(imcon,0,1,1,cell,aa(1),aa(4),aa(7)) ++ ++ if(rotmin(id).gt.1.d-5)then ++ ++ aa(2)=xxx(i1)-xxx(i3) ++ aa(5)=yyy(i1)-yyy(i3) ++ aa(8)=zzz(i1)-zzz(i3) ++ ++ else ++ ++ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) ++ ++ if(abs(aa(7)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(7)**2) ++ aa(2)=0.d0 ++ aa(5)=aa(7)/rsq ++ aa(8)=-aa(4)/rsq ++ ++ elseif(abs(aa(4)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(1)**2) ++ aa(2)=-aa(4)/rsq ++ aa(5)=aa(1)/rsq ++ aa(8)=0.d0 ++ ++ elseif(abs(aa(1)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(1)**2+aa(7)**2) ++ aa(2)=-aa(7)/rsq ++ aa(5)=0.d0 ++ aa(8)=aa(1)/rsq ++ ++ endif ++ ++ endif ++ ++ call images(imcon,0,1,1,cell,aa(2),aa(5),aa(8)) ++ ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++c group rotational matrix ++ ++ rot(1)=gaxs(id,1)*aa(1)+gaxs(id,4)*aa(2)+gaxs(id,7)*aa(3) ++ rot(2)=gaxs(id,2)*aa(1)+gaxs(id,5)*aa(2)+gaxs(id,8)*aa(3) ++ rot(3)=gaxs(id,3)*aa(1)+gaxs(id,6)*aa(2)+gaxs(id,9)*aa(3) ++ rot(4)=gaxs(id,1)*aa(4)+gaxs(id,4)*aa(5)+gaxs(id,7)*aa(6) ++ rot(5)=gaxs(id,2)*aa(4)+gaxs(id,5)*aa(5)+gaxs(id,8)*aa(6) ++ rot(6)=gaxs(id,3)*aa(4)+gaxs(id,6)*aa(5)+gaxs(id,9)*aa(6) ++ rot(7)=gaxs(id,1)*aa(7)+gaxs(id,4)*aa(8)+gaxs(id,7)*aa(9) ++ rot(8)=gaxs(id,2)*aa(7)+gaxs(id,5)*aa(8)+gaxs(id,8)*aa(9) ++ rot(9)=gaxs(id,3)*aa(7)+gaxs(id,6)*aa(8)+gaxs(id,9)*aa(9) ++ ++c determine quaternions from rotational matrix ++ ++ aq=rot(1)+rot(5) ++ bq=rot(2)-rot(4) ++ cq=rot(6)-rot(8) ++ dq=rot(2)+rot(4) ++ eq=rot(3)+rot(7) ++ fq=rot(6)+rot(8) ++ gq=rot(3)-rot(7) ++ hq=rot(1)-rot(5) ++ ++ q0(ig)=0.5d0*sqrt(aq+sqrt(aq*aq+bq*bq)) ++ ++ if(q0(ig).gt.1.d-4)then ++ ++ q1(ig)=-0.25d0*cq/q0(ig) ++ q2(ig)=0.25d0*gq/q0(ig) ++ q3(ig)=-0.25d0*bq/q0(ig) ++ ++ else ++ ++ q1(ig)=0.5d0*sqrt(hq+sqrt(hq*hq+dq*dq)) ++ ++ if(q1(ig).gt.1.d-4)then ++ ++ q2(ig)=0.25d0*dq/q1(ig) ++ q3(ig)=0.25d0*eq/q1(ig) ++ ++ else ++ ++ q2(ig)=0.5d0*sqrt(-hq+sqrt(hq*hq+dq*dq)) ++ ++ if(q2(ig).gt.1.d-4)then ++ ++ q3(ig)=0.25d0*fq/q2(ig) ++ ++ else ++ ++ q3(ig)=1.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c normalise quaternions ++ ++ rnorm=1.d0/sqrt(q0(ig)**2+q1(ig)**2+q2(ig)**2+q3(ig)**2) ++ q0(ig)=rnorm*q0(ig) ++ q1(ig)=rnorm*q1(ig) ++ q2(ig)=rnorm*q2(ig) ++ q3(ig)=rnorm*q3(ig) ++ ++ enddo ++ ++c test for redundant degrees of freedom ++c and ensure rotational inertias are non-zero ++ ++ degrot=0.d0 ++ ++ if(lsolva)then ++ degrot_sol(:)=0.d0 ++ endif ++ ++ do ig=1,ngrp ++ ++ id=lstgtp(ig) ++ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1)) ++ ++ if(rotall*rotinx(id,1).lt.1.d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ if(rotall*rotiny(id,1).lt.1.d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ if(rotall*rotinz(id,1).lt.1d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ enddo ++ ++c rotational degrees of freedom and rigid body contribution ++c to total degrees of freedom ++ ++ degrot=degrot+dble(ngrp)*3.d0 ++ degfre=degrot+dble(ngrp)*3.d0 ++ ++ if(lsolva)then ++ ++ fngrp=1 ++ lngrp=0 ++ ++ do itmols=1,mxtmls ++ ++ lngrp=lngrp+nummols(itmols)*numgrp(itmols) ++ ++ do ig=fngrp,lngrp ++ ++ id=lstgtp(ig) ++ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1)) ++ ++ if(rotall*rotinx(id,1).lt.1.d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ if(rotall*rotiny(id,1).lt.1.d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ if(rotall*rotinz(id,1).lt.1d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ enddo ++ ++ fngrp=lngrp+1 ++ ++ enddo ++ ++ endif ++ ++c summarise results ++ ++ if(idnode.eq.0)then ++ ++ if(gmass(1).gt.0.d0)then ++ ++ write(nrite,'(/,/,12x,a)')' summary of rigid body set up' ++ ++ do id=1,mxungp ++ ++ if(gmass(id).gt.0.d0)then ++ ++ write(nrite,'(/,a,i10)')' group of type ',id ++ write(nrite,'(12x,a,f20.10)')' total mass ', ++ x gmass(id) ++ write(nrite,'(12x,a,3f20.10)')' rot. inertia ', ++ x rotinx(id,1),rotiny(id,1),rotinz(id,1) ++ write(nrite,'(/,12x,a,3(8x,a7))')' site','a coord', ++ x 'b coord','c coord' ++ do j=1,numgsit(id) ++ write(nrite,'(12x,i5,1p,3e15.5)')j,gxx(id,j), ++ x gyy(id,j),gzz(id,j) ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c find number of unique groups ++ ++ ngp=0 ++ do ig=1,ngrp ++ ngp=max(ngp,lstgtp(ig)) ++ enddo ++ ++c calculate reciprocal of rotational inertias ++ ++ do id=1,ngp ++ ++ rotlim=max(1.d-2,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1))*1.d-5 ++ ++ if(rotinx(id,1).lt.rotlim)then ++ rotinx(id,2)=0.d0 ++ else ++ rotinx(id,2)=1.d0/rotinx(id,1) ++ endif ++ ++ if(rotiny(id,1).lt.rotlim)then ++ rotiny(id,2)=0.d0 ++ else ++ rotiny(id,2)=1.d0/rotiny(id,1) ++ endif ++ ++ if(rotinz(id,1).lt.rotlim)then ++ rotinz(id,2)=0.d0 ++ else ++ rotinz(id,2)=1.d0/rotinz(id,1) ++ endif ++ ++ enddo ++ ++c Check of quaternion set up with atomic positions ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c group type ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 ++ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) ++ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) ++ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) ++ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 ++ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) ++ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) ++ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) ++ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxt(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyt(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzt(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ ++ txx(jr)=xxx(i)-xxt(i) ++ tyy(jr)=yyy(i)-yyt(i) ++ tzz(jr)=zzz(i)-zzt(i) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,jr,cell,txx,tyy,tzz) ++ ++c set tolerance for testing quaternion setup. ++ ++ rsq=0.d0 ++ tol=1.d-2 ++ ++ do i=1,jr ++ ++ rrr=txx(i)**2+tyy(i)**2+tzz(i)**2 ++ if(rrr.gt.tol)then ++ ++ rsq=rrr ++ ++ endif ++ ++ enddo ++ ++c exit if error in set up ++ ++ safe=.true. ++ if(rsq.gt.tol)safe=.false. ++ if(mxnode.gt.1)call gstate(safe) ++ ++ if(.not.safe)call error(idnode,310) ++ ++c sort lstgot into ascending order ++ ++ call shellsort(jt,lstgot) ++ ++c check that no site is in more than 1 rigid group ++ ++ i=1 ++ safe=.true. ++ do while(i.lt.jt) ++ ++ i=i+1 ++ linear=.true. ++ do while(linear) ++ ++ linear=.false. ++ ++ if(lstgot(i).eq.lstgot(i-1))then ++ ++ linear=.true. ++ safe=.false. ++ jt=jt-1 ++ ++ do j=i,jt ++ lstgot(j)=lstgot(j+1) ++ enddo ++ ++ endif ++ ++ if(i.ge.jt)linear=.false. ++ ++ enddo ++ ++ enddo ++ ++ if(.not.safe)call error(idnode,320) ++ ++c list of 'free' sites ++ ++ ii=1 ++ jj=0 ++ do i=1,natms ++ ++ if(lstgot(ii).eq.i)then ++ ++ ii=ii+1 ++ ++ else ++ ++ if(lstfrz(i).eq.0)then ++ jj=jj+1 ++ lstfre(jj)=i ++ endif ++ ++ endif ++ ++ enddo ++ ++c number of free sites ++ ++ ntfree=jj ++ ++c list of atoms integrated on this node ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ jr=jr+numgsit(id) ++ ++ enddo ++ ++ do i=1,jr ++ lstme(i)=lstrgd(i) ++ enddo ++ ++c block parameters for free atoms ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++ do i=ifre1,ifre2 ++ ++ jr=jr+1 ++ lstme(jr)=lstfre(i) ++ ++ enddo ++ ++c exchange quaternion data with other nodes ++ ++ if(mxnode.gt.1)call merge4 ++ x (idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++ if(lsolva)lstgot_sol(:)=lstgot(:) ++ ++c deallocate work arrays ++ ++ deallocate (ind,lstgot,stat=fail(1)) ++ deallocate (txx,tyy,tzz,stat=fail(2)) ++ deallocate (xxt,yyt,zzt,stat=fail(3)) ++ deallocate (gaxs,rotmin,stat=fail(4)) ++ deallocate (accum,stat=fail(5)) ++ ++ return ++ end subroutine quatbook ++ ++ subroutine abort_field_read(kode,idnode,nfield) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting FIELD file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nfield ++ ++ if(idnode.eq.0)close (nfield) ++ ++ if(kode.eq.1)then ++ ++c end of field file error exit ++ ++ call error(idnode,52) ++ ++ elseif(kode.eq.2)then ++ ++c unrecognised directive in field file ++ ++ call error(idnode,4) ++ ++ endif ++ ++ return ++ end subroutine abort_field_read ++ ++ subroutine abort_control_read(kode,idnode,nread) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting CONTROL file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nread ++ ++ if(idnode.eq.0)close (nread) ++ ++ if(kode.eq.1)then ++ ++c end of control file error exit ++ ++ call error(idnode,53) ++ ++ elseif(kode.eq.2)then ++ ++c general error exit from field file processing ++ ++ call error(idnode,0) ++ ++ endif ++ ++ return ++ end subroutine abort_control_read ++ ++ subroutine abort_config_read(kode,idnode,nconf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting CONTROL file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nconf ++ ++ if(idnode.eq.0)close (nconf) ++ ++ if(kode.eq.1)then ++ ++c general error exit from field file processing ++ ++ call error(idnode,54) ++ ++ elseif(kode.eq.2)then ++ ++c end of config file error exit ++ ++ call error(idnode,55) ++ ++ endif ++ ++ return ++ end subroutine abort_config_read ++ ++ subroutine neutbook(lneut,idnode,natms,nneut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for neutral group bookkeeping ++c ++c copyright - daresbury laboratory ++c author - w. smith nov 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lneut,safe ++ integer idnode,natms,nneut,i ++ ++ safe=.true. ++ ++c neutral group bookkeeping: sites must be listed consecutively ++ ++ if(lneut)then ++ ++ if(lstneu(1).ne.1)call error(idnode,230) ++ ++ neulst(1)=1 ++ nneut=1 ++ ++ do i=2,natms ++ ++ safe=.false. ++ if(lstneu(i).eq.lstneu(i-1))safe=.true. ++ if(lstneu(i).eq.lstneu(i-1)+1)then ++ ++ safe=.true. ++ nneut=nneut+1 ++ if(nneut.gt.mxneut)call error(idnode,220) ++ neulst(nneut)=i ++ ++ endif ++ ++ if(.not.safe)call error(idnode,230) ++ ++ enddo ++ ++ neulst(nneut+1)=natms+1 ++ ++ endif ++ ++ return ++ ++ end subroutine neutbook ++ ++ subroutine intlist ++ x (lshmov,lcnb,idnode,mxnode,natms,nscons,ntangl,ntbond, ++ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the interaction lists ++c for the entire simulated system ++c ++c parallel replicated dat version : block data ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992 ++c amended - t.forester oct 1993 ++c amended - t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,safe1,lcnb,lchk,lfail ++ integer idnode,mxnode,natms,nscons,ntangl,ntbond,ntcons ++ integer ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf ++ integer ibonds,jbonds,kbonds,ipmf,jpmf,iangle,jangle,kangle ++ integer idihed,jdihed,kdihed,iinver,jinver,kinver,iteths ++ integer jteths,kteths,ishels,jshels,kshels,ntbon0,ntpmf0 ++ integer ntang0,ntdih0,ntinv0,nttet0,ntshl0,ntcon0,idum ++ integer itmols,isite,iconst,jconst,kconst,ibnd1,ibnd2,ipmf1 ++ integer ipmf2,iang1,iang2,idih1,idih2,iinv1,iinv2,itet1 ++ integer itet2,ishl1,ishl2,imols,lbonds,lpmf,jj,nnn,langle ++ integer ldihed,linver,lteths,lshels,i,ii,ntmp,klo,khi,ngrp ++ integer klo0,ifail,iloop,nnode,nscons0,nscons1,icon,fail ++ integer kcons,id,jdnode,lconst,itry,iatom,jatom,j,nfail ++ real(8) tol ++ ++ integer, allocatable :: itest(:),index(:),kscons(:) ++ integer, allocatable :: msite(:),mconst(:),listin(:) ++ ++ dimension fail(4) ++ ++ data fail/0,0,0,0/ ++ ++c allocate work arrays ++ ++ allocate (itest(mxtmls),index(mxtmls),stat=fail(1)) ++ allocate (msite(mxtmls),mconst(mxtmls),stat=fail(2)) ++ allocate (listin(mxatms),stat=fail(3)) ++ allocate (kscons(0:mxproc-1),stat=fail(4)) ++ do i=1,4 ++ if(fail(i).ne.0)call error(idnode,1800) ++ enddo ++ ++c initialise bookkeeping indices ++ ++ ibonds=0 ++ jbonds=0 ++ kbonds=0 ++ ipmf=0 ++ jpmf=0 ++ iangle=0 ++ jangle=0 ++ kangle=0 ++ idihed=0 ++ jdihed=0 ++ kdihed=0 ++ iinver=0 ++ jinver=0 ++ kinver=0 ++ iteths=0 ++ jteths=0 ++ kteths=0 ++ ishels=0 ++ jshels=0 ++ kshels=0 ++ safe=.true. ++ safe1=.true. ++ ++c find total number of bonds,pmf constraints,bond constraints, ++c angles,dihedrals,inversions, tethers,core-shells, in system ++c - ignoring frozen atoms ++ ++ ntbon0=0 ++ ntpmf0=0 ++ ntcon0=0 ++ ntang0=0 ++ ntdih0=0 ++ ntinv0=0 ++ nttet0=0 ++ ntshl0=0 ++ nscons=0 ++ ntcons=0 ++ ++ do itmols=1,ntpmls ++ ++ ntbon0=ntbon0+nummols(itmols)*numbonds(itmols) ++ ntpmf0=ntpmf0+nummols(itmols)*numpmf(itmols) ++ ntcon0=ntcon0+nummols(itmols)*numcon(itmols) ++ ntang0=ntang0+nummols(itmols)*numang(itmols) ++ ntdih0=ntdih0+nummols(itmols)*numdih(itmols) ++ ntinv0=ntinv0+nummols(itmols)*numinv(itmols) ++ nttet0=nttet0+nummols(itmols)*numteth(itmols) ++ ntshl0=ntshl0+nummols(itmols)*numshl(itmols) ++ ++ enddo ++ ++ isite=0 ++ iconst=0 ++ jconst=0 ++ kconst=0 ++ ++c first and last index of bonds, angles etc for this node ++ ++ ibnd1=(idnode*ntbon0)/mxnode+1 ++ ibnd2=((idnode+1)*ntbon0)/mxnode ++ ++ ipmf1=(idnode*ntpmf0)/mxnode+1 ++ ipmf2=((idnode+1)*ntpmf0)/mxnode ++ ntpmf=ntpmf0 ++ nspmf=ipmf2+1-ipmf1 ++ ++ iang1=(idnode*ntang0)/mxnode+1 ++ iang2=((idnode+1)*ntang0)/mxnode ++ ++ idih1=(idnode*ntdih0)/mxnode+1 ++ idih2=((idnode+1)*ntdih0)/mxnode ++ ++ iinv1=(idnode*ntinv0)/mxnode+1 ++ iinv2=((idnode+1)*ntinv0)/mxnode ++ ++ itet1=(idnode*nttet0)/mxnode+1 ++ itet2=((idnode+1)*nttet0)/mxnode ++ ++ ishl1=(idnode*ntshl0)/mxnode+1 ++ ishl2=((idnode+1)*ntshl0)/mxnode ++ ++c loop over molecule types ++ ++ do itmols=1,ntpmls ++ ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct bond constraint list later ++c construct chemical bond interaction list ++ ++ do lbonds=1,numbonds(itmols) ++ ++ ibonds=ibonds+1 ++ ++ if(ibonds.ge.ibnd1.and.ibonds.le.ibnd2)then ++ ++ jbonds=jbonds+1 ++ if(jbonds.le.mxbond)then ++ ++ listbnd(jbonds,1)=lbonds+kbonds ++ listbnd(jbonds,2)=lstbnd(lbonds+kbonds,1) ++ x +isite ++ listbnd(jbonds,3)=lstbnd(lbonds+kbonds,2) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,31) ++ ++c construct pmf site lists - no exclusions ++ ++ do lpmf=1,numpmf(itmols) ++ ++ ipmf=ipmf+1 ++ ++ if(ipmf.ge.ipmf1.and.ipmf.le.ipmf2)then ++ ++ jpmf=jpmf+1 ++ if(jpmf.le.mspmf)then ++ ++ nnn=npmf(1)+npmf(2) ++ if(nnn.le.mxspmf)then ++ ++ do jj=1,npmf(1)+npmf(2) ++ lstpmf(jj,jpmf)=indpmf(jj)+isite ++ enddo ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ else ++ ++ safe1=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe1) ++ if(.not.safe1)call error(idnode,458) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,460) ++ ++c construct valence angle interaction list ++ ++ do langle=1,numang(itmols) ++ ++ iangle=iangle+1 ++ ++ if(iangle.ge.iang1.and.iangle.le.iang2)then ++ ++ jangle=jangle+1 ++ if(jangle.le.mxangl)then ++ ++ listang(jangle,1)=langle+kangle ++ listang(jangle,2)=lstang(langle+kangle,1) ++ x +isite ++ listang(jangle,3)=lstang(langle+kangle,2) ++ x +isite ++ listang(jangle,4)=lstang(langle+kangle,3) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,51) ++ ++c construct dihedral angle interaction list ++ ++ do ldihed=1,numdih(itmols) ++ ++ idihed=idihed+1 ++ ++ if(idihed.ge.idih1.and.idihed.le.idih2)then ++ ++ jdihed=jdihed+1 ++ if(jdihed.le.mxdihd)then ++ ++ listdih(jdihed,1)=ldihed+kdihed ++ listdih(jdihed,2)=lstdih(ldihed+kdihed,1) ++ x +isite ++ listdih(jdihed,3)=lstdih(ldihed+kdihed,2) ++ x +isite ++ listdih(jdihed,4)=lstdih(ldihed+kdihed,3) ++ x +isite ++ listdih(jdihed,5)=lstdih(ldihed+kdihed,4) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,61) ++ ++c construct inversion potential list ++ ++ do linver=1,numinv(itmols) ++ ++ iinver=iinver+1 ++ ++ if(iinver.ge.iinv1.and.iinver.le.iinv2)then ++ ++ jinver=jinver+1 ++ if(jinver.le.mxinv)then ++ ++ listinv(jinver,1)=linver+kinver ++ listinv(jinver,2)=lstinv(linver+kinver,1) ++ x +isite ++ listinv(jinver,3)=lstinv(linver+kinver,2) ++ x +isite ++ listinv(jinver,4)=lstinv(linver+kinver,3) ++ x +isite ++ listinv(jinver,5)=lstinv(linver+kinver,4) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,77) ++ ++c construct tethered atoms interaction list ++ ++ do lteths=1,numteth(itmols) ++ ++ iteths=iteths+1 ++ ++ if(iteths.ge.itet1.and.iteths.le.itet2)then ++ ++ jteths=jteths+1 ++ if(jteths.le.msteth)then ++ ++ listtet(jteths,1)=lteths+kteths ++ listtet(jteths,2)=lsttet(lteths+kteths)+isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,63) ++ ++c construct core-shell list ++ ++ do lshels=1,numshl(itmols) ++ ++ ishels=ishels+1 ++ ++ if(ishels.ge.ishl1.and.ishels.le.ishl2)then ++ ++ jshels=jshels+1 ++ if(jshels.le.mxshl)then ++ ++ listshl(jshels,1)=lshels+kshels ++ listshl(jshels,2)=lstshl(lshels+kshels,1) ++ x +isite ++ listshl(jshels,3)=lstshl(lshels+kshels,2) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,59) ++ ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ kbonds=kbonds+numbonds(itmols) ++ kangle=kangle+numang(itmols) ++ kdihed=kdihed+numdih(itmols) ++ kinver=kinver+numinv(itmols) ++ kteths=kteths+numteth(itmols) ++ kshels=kshels+numshl(itmols) ++ ++ enddo ++ ++c store array counters for bookkeeping ++ ++ ntbond=ibonds ++ ntangl=iangle ++ ntdihd=idihed ++ ntinv=iinver ++ ntteth=iteths ++ ntshl=ishels ++ ++c pass bond constraint information to other nodes ++ ++ if(ntcon0.gt.0)then ++ ++ ntcons=ntcon0 ++ ++c find starting site no. and constraint no. for each molec. type ++ ++ msite(1)=0 ++ mconst(1)=0 ++ ++ do itmols=2,ntpmls ++ ++ msite(itmols)=msite(itmols-1)+numsit(itmols-1)* ++ x nummols(itmols-1) ++ mconst(itmols)=mconst(itmols-1)+numcon(itmols-1) ++ ++ enddo ++ ++c sort molecules into ascending order of number of constraints ++ ++ do i=1,ntpmls ++ ++ itest(i)=numcon(i) ++ index(i)=0 ++ ++ enddo ++ ++ call shellsort(ntpmls,itest) ++ ++ do i=1,ntpmls ++ ++ lchk=.true. ++ do j=1,ntpmls ++ ++ if(itest(i).eq.numcon(j))then ++ ++ if(lchk)then ++ index(i)=j ++ lchk=.false. ++ ++ endif ++ ++ do ii=1,i-1 ++ if(index(ii).eq.j)lchk=.true. ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c load balance to within 10% ++ ++ tol=1.0d0+(0.10d0)/2.d0 ++ kcons=(ntcons)/mxnode ++ ntmp=0 ++ ++c find smallest constrained molecule to allocate to a node ++ ++ do i=1,ntpmls ++ ++ if(ntmp.le.mxnode)then ++ ++ if(numcon(index(i)).gt.0)then ++ ntmp=ntmp+nummols(index(i)) ++ klo=max(0,kcons-numcon(index(i))/2) ++ khi=klo+numcon(index(i))+1 ++ endif ++ ++ endif ++ ++ enddo ++ ++c reset hi/lo limits if molecules contain too many constraints ++ ++ if(dble(khi)/dble(max(1,klo)).gt.tol)then ++ klo=nint(dble(kcons)/tol) ++ khi=nint(dble(kcons)*tol)+1 ++ endif ++ ++c store lo value for later ++ ++ klo0=klo ++ ++c begin assignment of constraints ---------------------------------- ++ ++ ifail=-1 ++ lfail=.true. ++ do while(lfail) ++ ++ ifail=ifail+1 ++ ++ if(ifail.gt.ntpmls)then ++ call error(idnode,432) ++ endif ++ ++ iconst=0 ++ jconst=0 ++ kconst=0 ++ lconst=0 ++ ++c zero running totals of constraints on each processor ++ ++ do id=0,mxnode-1 ++ kscons(id)=0 ++ enddo ++ ++ iloop=0 ++ lfail=.false. ++ iconst=0 ++ jconst=0 ++ nnode=0 ++ ++c assign difficult molecules in blocks ++ ++ if(ifail.gt.0)then ++ ++ nfail=0 ++ do i=1,ifail ++ ++ ii=ntpmls+1-i ++ nfail=nfail+nummols(index(ii))*numcon(index(ii)) ++ ++ enddo ++ ++c decide on number of processors to split over ++ ++ nnode=int(dble(nfail)/dble(max(kcons,1))+1.d0/tol) ++ nnode=max(2,nnode) ++ nnode=min(nnode,mxnode) ++ ++c assign to processors 0..nnode-1 ++ ++ do id=0,nnode-1 ++ ++ nscons0=(id*nfail)/nnode+1 ++ nscons1=((id+1)*nfail)/nnode ++ ++ kscons(id)=nscons1+1-nscons0 ++ ++ enddo ++ ++c this processors block ++ ++ nscons0=(idnode*nfail)/nnode+1 ++ nscons1=((idnode+1)*nfail)/nnode ++ ++c assign in blocks ++ ++ do itmols=ntpmls,ntpmls-ifail+1,-1 ++ ++ ii=index(itmols) ++ icon=numcon(ii) ++ kconst=mconst(ii) ++ ++ do imols=1,nummols(ii) ++ ++ isite=msite(ii)+(imols-1)*numsit(ii) ++ ++c construct bond constraint list ++ ++ do lconst=1,numcon(ii) ++ ++ iconst=iconst+1 ++ ++ if(iconst.ge.nscons0.and.iconst.le.nscons1)then ++ ++ jconst=jconst+1 ++ ++ if(jconst.le.mxcons)then ++ ++ listcon(jconst,1)=lconst+kconst ++ iatom=lstcon(lconst+kconst,1)+isite ++ jatom=lstcon(lconst+kconst,2)+isite ++ ++ listcon(jconst,2)=iatom ++ listcon(jconst,3)=jatom ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c assign non-problematic molecules ++ ++ jdnode=mod(nnode+1,mxnode) ++ ++ do itmols=ntpmls-ifail,1,-1 ++ ++ ii=index(itmols) ++ icon=numcon(ii) ++ kconst=mconst(ii) ++ ++ do imols=1,nummols(ii) ++ ++ itry=0 ++ lchk=.true. ++ do while(lchk) ++ ++ if(kscons(jdnode)+icon.le.klo)then ++ ++ if(jdnode.ne.idnode)then ++ kscons(jdnode)=kscons(jdnode)+icon ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.false. ++ else ++ ++c construct bond constraint list ++ ++ isite=msite(ii)+(imols-1)*numsit(ii) ++ do lconst=1,numcon(ii) ++ ++ jconst=jconst+1 ++ ++ if(jconst.le.mxcons)then ++ ++ listcon(jconst,1)=lconst+kconst ++ iatom=lstcon(lconst+kconst,1)+isite ++ jatom=lstcon(lconst+kconst,2)+isite ++ listcon(jconst,2)=iatom ++ listcon(jconst,3)=jatom ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ kscons(jdnode)=kscons(jdnode)+icon ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.false. ++ ++ endif ++ ++ else ++ ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.true. ++ itry=itry+1 ++ ++ endif ++ ++ if(lchk.and.itry.gt.mxnode)then ++ ++ klo=kcons ++ kcons=khi ++ itry=0 ++ iloop=iloop+1 ++ ++ endif ++ ++c split molecule across nodes if have to ++ ++ if(iloop.gt.3)then ++ lfail=.true. ++ kcons=ntcons/mxnode ++ klo=klo0 ++ lchk=.false. ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c check no node has less than minimum number ++ ++ do id=0,mxnode-1 ++ if(kscons(id).lt.klo0)then ++ lfail=.true. ++ endif ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)then ++ ++ if(mxnode.gt.1)call gimax(jconst,1,idum) ++ if(idnode.eq.0)write(nrite,'(a,i10,a,i10)') ++ x 'Number of constraints found ',jconst,'Max allowed ',mxcons ++ ++ call error(idnode,41) ++ ++ endif ++ ++ nscons=kscons(idnode) ++ ++ call passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++ endif ++ ++ if(npmf(1).gt.0)then ++ ++ call passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++ endif ++ ++c pass rigid body data ++ ++ lcnb=.false. ++ if(ntcons.gt.0.and.ngrp.gt.0)then ++ ++ call passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp, ++ x numgsit) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(itest,index,msite,stat=fail(1)) ++ deallocate(mconst,kscons,listin,stat=fail(2)) ++ ++ return ++ end subroutine intlist ++ ++ subroutine ensemble_selection ++ x (directive,lens,kill,idnode,keyens,mode,taut,taup) ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the ensemble and reading ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical kill,lens ++ integer keyens,idnode,idum,mode ++ real(8) taut,taup ++ ++ if(findstring('nve',directive,idum))then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'microcanonical ensemble')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('nvt',directive,idum))then ++ ++ if(findstring('evans',directive,idum))then ++ ++ keyens=1 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Evans Gaussian temperature constraints', ++ x ' in use')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('ber',directive,idum))then ++ ++ keyens=2 ++ taut=dblstr(directive,69,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen thermostat', ++ x /,1x,'thermostat relaxation time ',1p,e12.4)") ++ x taut ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=3 ++ taut=dblstr(directive,69,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4)") ++ x taut ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ elseif(findstring('npt',directive,idum))then ++ ++ if(findstring('ber',directive,idum))then ++ ++ keyens=4 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen isotropic N-P-T', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=5 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover (Melchionna) isotropic N-P-T ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ elseif(findstring('nst',directive,idum))then ++ ++ mode=0 ++ if(findstring('block',directive,idum))mode=1 ++ if(findstring('surf',directive,idum))mode=2 ++ if(findstring('slab',directive,idum))mode=3 ++ ++ if(findstring('ber',directive,idum))then ++ ++ keyens=6 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen anisotropic N-P-T', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=7 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover (Melchionna) anisotropic N-P-T ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ if(mode.eq.0)then ++ write(nrite,"(/,1x,'NST mode 0 X<>Y<>Z')") ++ elseif(mode.eq.1)then ++ write(nrite, ++ x "(/,1x,'NST mode 1 X<>Y<>Z (rectangular block)')") ++ elseif(mode.eq.2)then ++ write(nrite, ++ x "(/,1x,'NST mode 2 X=Y<>Z (liquid surface)')") ++ elseif(mode.eq.3)then ++ write(nrite, ++ x "(/,1x,'NST mode 3 X<>Y<>Z (solid slab)')") ++ endif ++ ++ endif ++ ++ elseif(findstring('pmf',directive,idum))then ++ ++ keyens=8 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'potential of mean force calculation (NVE)')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ call error(idnode,-436) ++ kill=.true. ++ ++ endif ++ ++ return ++ end subroutine ensemble_selection ++ ++ subroutine neb_option ++ x (directive,lneb,lminopt,idnode,numneb,keytol,sprneb, ++ x opttol,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for NEB option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit ++ character*1 directive(lenrec) ++ logical lneb,lminopt,endneb,safe ++ integer numneb,idnode,keytol,i,idum ++ real(8) sprneb,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ lminopt=.true. ++ lneb=.true. ++ endneb=.false. ++ numneb=intstr(directive,lenrec,idum) ++ if(numneb.eq.0)numneb=1 ++ numneb=min(maxneb,numneb) ++ ++ hyp_units=1.d0 ++ do while(.not.endneb) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endneb',directive,idum))then ++ endneb=.true. ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('basin_1',directive,idum))then ++ call striptext(directive,lenrec,1) ++ do i=1,numneb ++ bsn_1(i)=intstr(directive,lenrec,idum) ++ enddo ++ elseif(findstring('basin_2',directive,idum))then ++ call striptext(directive,lenrec,1) ++ do i=1,numneb ++ bsn_2(i)=intstr(directive,lenrec,idum) ++ enddo ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,1x,'NEB calculation controls')") ++ write(nrite,"(/,1x,'identity of basin 1 ', ++ x 10i10)")(bsn_1(i),i=1,numneb) ++ write(nrite,"(1x,'identity of basin 2 ', ++ x 10i10)")(bsn_2(i),i=1,numneb) ++ write(nrite, ++ x "(1x,'NEB spring constant ',e12.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'energy units ',2x,a8)") ++ x sprneb,opttol,cunit ++ ++ call print_optim(keytol) ++ ++ endif ++ ++c units conversion ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ return ++ end subroutine neb_option ++ ++ subroutine bpd_option ++ x (directive,seek,lbpd,ltad,lminopt,prechk,nebgo,keybpd,idnode, ++ x nblock,ntrack,keytol,ebias,vmin,catchrad,sprneb,opttol, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for bias potential ++c dynamics option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit,seek ++ character*1 directive(lenrec) ++ logical lbpd,ltad,lminopt,prechk,endbpd,safe,nebgo ++ integer keybpd,idnode,nblock,ntrack,keytol,idum ++ real(8) ebias,vmin,catchrad,sprneb,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ if(ltad)call error(idnode,2355) ++ lminopt=.true. ++ lbpd=.true. ++ endbpd=.false. ++ cunit=" dl_poly" ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'bias potential dynamics controls')") ++ ++ if(findstring('dyn',directive,idum))then ++ ++ keybpd=1 ++ hyp_units=energy_unit() ++ ebias=dblstr(directive,lenrec,idum) ++ vmin=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ if(idnode.eq.0)write(nrite,"( ++ x 1x,'dynamics option selected ', ++ x /,1x,'bias potential E_bias (kelvin)',f10.4, ++ x /,1x,'bias potential V_min (kelvin)',f10.4 ++ x /,1x,'energy units ',2x,a8)") ++ x ebias,vmin,cunit ++ ++ elseif(findstring('path',directive,idum))then ++ ++ keybpd=2 ++ nebgo=.true. ++ hyp_units=1.d0 ++ do while(.not.endbpd) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endbpd',directive,idum))then ++ endbpd=.true. ++ elseif(findstring('pre',directive,idum))then ++ prechk=.true. ++ if(findstring('false',directive,idum))prechk=.false. ++ elseif(findstring('noneb',directive,idum))then ++ nebgo=.false. ++ elseif(findstring('target',directive,idum))then ++ call getword(seek,directive,8,lenrec) ++ call getword(seek,directive,8,lenrec) ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('ebias',directive,idum))then ++ ebias=dblstr(directive,lenrec,idum) ++ elseif(findstring('vmin',directive,idum))then ++ vmin=dblstr(directive,lenrec,idum) ++ elseif(findstring('num_block',directive,idum))then ++ nblock=intstr(directive,lenrec,idum) ++ elseif(findstring('num_track',directive,idum))then ++ ntrack=intstr(directive,lenrec,idum) ++ elseif(findstring('catch_radius',directive,idum))then ++ catchrad=dblstr(directive,lenrec,idum) ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"( ++ x 1x,'dynamics with path analysis selected', ++ x /,1x,'bias potential E_bias (kelvin)',f10.4, ++ x /,1x,'bias potential V_min (kelvin)',f10.4, ++ x /,1x,'steps per time block ',i10, ++ x /,1x,'steps per tracking block ',i10, ++ x /,1x,'configuration catch radius (A)',f10.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'atom type to be tracked ',2x,a8, ++ x /,1x,'energy units ',2x,a8)") ++ x ebias,vmin,nblock,ntrack,catchrad,opttol,seek,cunit ++ if(nebgo)write(nrite, ++ x "(1x,'NEB spring constant ',e12.4)")sprneb ++ if(prechk)write(nrite, ++ x "(1x,'transition prechecking option selected')") ++ call print_optim(keytol) ++ ++ endif ++ ++c energy unit conversions ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ endif ++ ++ return ++ end subroutine bpd_option ++ ++ subroutine tad_option ++ x (directive,ltad,lbpd,lminopt,prechk,tadall,idnode,nblock, ++ x ntrack,blkout,keytol,catchrad,sprneb,tlow,deltad,opttol, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for TAD option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit ++ character*1 directive(lenrec) ++ logical ltad,lbpd,lminopt,prechk,tadall,endtad,safe ++ integer idnode,nblock,ntrack,blkout,keytol,idum ++ real(8) catchrad,sprneb,deltad,tlow,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ if(lbpd)call error(idnode,2355) ++ lminopt=.true. ++ ltad=.true. ++ endtad=.false. ++ hyp_units=1.d0 ++ ++ do while(.not.endtad) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endtad',directive,idum))then ++ endtad=.true. ++ elseif(findstring('pre',directive,idum))then ++ prechk=.true. ++ if(findstring('false',directive,idum))prechk=.false. ++ elseif(findstring('all',directive,idum))then ++ tadall=.true. ++ if(findstring('false',directive,idum))tadall=.false. ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('num_block',directive,idum))then ++ nblock=intstr(directive,lenrec,idum) ++ elseif(findstring('num_track',directive,idum))then ++ ntrack=intstr(directive,lenrec,idum) ++ elseif(findstring('blackout',directive,idum))then ++ blkout=intstr(directive,lenrec,idum) ++ elseif(findstring('catch_radius',directive,idum))then ++ catchrad=dblstr(directive,lenrec,idum) ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('deltad',directive,idum))then ++ deltad=dblstr(directive,lenrec,idum) ++ elseif(findstring('low_temp',directive,idum))then ++ tlow=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'TAD dynamics controls' ++ x /,1x,'steps per time block ',i10, ++ x /,1x,'steps per tracking block ',i10, ++ x /,1x,'steps in blackout periods ',i10, ++ x /,1x,'configuration catch radius ',1p,e12.4, ++ x /,1x,'NEB spring constant ',e12.4, ++ x /,1x,'stopping parameter ',e12.4, ++ x /,1x,'target low temperature ',e12.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'energy units ',2x,a8)") ++ x nblock,ntrack,blkout,catchrad,sprneb,deltad, ++ x tlow,opttol,cunit ++ if(prechk)write(nrite, ++ x "(1x,'transition prechecking option selected')") ++ if(tadall)write(nrite, ++ x "(1x,'option for all basins analysis selected')") ++ call print_optim(keytol) ++ ++ endif ++ ++c energy unit conversions ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ return ++ end subroutine tad_option ++ ++ subroutine metadyn_option ++ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, ++ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, ++ x locpe_scale,ref_W_aug,h_aug,wt_Dt) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for metadynamics option ++c copyright - daresbury laboratory ++c author - w. smith jan 2011 ++c ++c note: default values are set in metafreeze_module ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lmetadyn,endmet,lstein,ltet,lglobpe,llocpe,safe ++ integer idnode,idum,ncolvar,nq4,nq6,ntet,hkey,meta_step_int ++ real(8) globpe_scale,locpe_scale,ref_W_aug,h_aug,wt_Dt ++ ++ lmetadyn=.true. ++ endmet=.false. ++ ++ do while(.not.endmet) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endmet',directive,idum))then ++ endmet=.true. ++ elseif(findstring('ncolvar',directive,idum))then ++ ncolvar=intstr(directive,lenrec,idum) ++ elseif(findstring('lstein',directive,idum))then ++ lstein=.true. ++ if(findstring('false',directive,idum))lstein=.false. ++ elseif(findstring('ltet',directive,idum))then ++ ltet=.true. ++ if(findstring('false',directive,idum))ltet=.false. ++ elseif(findstring('lglobpe',directive,idum))then ++ lglobpe=.true. ++ if(findstring('false',directive,idum))lglobpe=.false. ++ elseif(findstring('llocpe',directive,idum))then ++ llocpe=.true. ++ if(findstring('false',directive,idum))llocpe=.false. ++ elseif(findstring('globpe_scale',directive,idum))then ++ globpe_scale=dblstr(directive,lenrec,idum) ++ elseif(findstring('locpe_scale',directive,idum))then ++ locpe_scale=dblstr(directive,lenrec,idum) ++ elseif(findstring('nq4',directive,idum))then ++ nq4=intstr(directive,lenrec,idum) ++ nq4=intstr(directive,lenrec,idum) ! do twice - number in name! ++ elseif(findstring('nq6',directive,idum))then ++ nq6=intstr(directive,lenrec,idum) ++ nq6=intstr(directive,lenrec,idum) ! do twice - number in name! ++ elseif(findstring('ntet',directive,idum))then ++ ntet=intstr(directive,lenrec,idum) ++ elseif(findstring('meta_step_int',directive,idum))then ++ meta_step_int=intstr(directive,lenrec,idum) ++ elseif(findstring('ref_w_aug',directive,idum))then ++ ref_W_aug=dblstr(directive,lenrec,idum) ++ elseif(findstring('h_aug',directive,idum))then ++ h_aug=dblstr(directive,lenrec,idum) ++ elseif(findstring('hkey',directive,idum))then ++ hkey=intstr(directive,lenrec,idum) ++ elseif(findstring('wt_dt',directive,idum))then ++ wt_dt=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'metadynamics controls' ++ x /,1x,'total number of collective variables',i10, ++ x /,1x,'steinhardt parameters option (Q4/Q6)',l10, ++ x /,1x,'tetrahedral parameters option (zeta)',l10, ++ x /,1x,'global potential parameter option ',l10, ++ x /,1x,'local potential parameter option ',l10, ++ x /,1x,'global potential param. scale factor',e12.4, ++ x /,1x,'local potential param. scale factor ',e12.4)") ++ x ncolvar,lstein,ltet,lglobpe,llocpe,globpe_scale,locpe_scale ++ ++ write(nrite, ++ x "( 1x,'number of Q4 atom pair types ',i10, ++ x /,1x,'number of Q6 atom pair types ',i10, ++ x /,1x,'number of zeta atom triplet types ',i10)") ++ x nq4,nq6,ntet ++ ++ write(nrite, ++ x "( 1x,'gaussian deposition interval ',i10, ++ x /,1x,'reference gaussian height ',e12.4, ++ x /,1x,'gaussian width parameter ',e12.4, ++ x /,1x,'height control key ',i10, ++ x /,1x,'well-tempered control parameter ',e12.4)") ++ x meta_step_int,ref_W_aug,h_aug,hkey,wt_Dt ++ ++ endif ++ ++ return ++ end subroutine metadyn_option ++ ++ subroutine ewald_selection ++ x (directive,lhke,lspme,lewald,lcut,lforc,kill,idnode,keyfce, ++ x imcon,nhko,nlatt,kmax1,kmax2,kmax3,alpha,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the ewald method and reading ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lhke,lspme,lewald,lcut,lforc,kill,safe ++ integer idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2,kmax3,idum ++ integer kmaxpow2 ++ real(8) alpha,rcut,eps,tol,fac,tol1 ++ ++ lhke=findstring('hke',directive,idum) ++ lspme=findstring('spme',directive,idum) ++ lewald=findstring('ewald',directive,idum) ++ if(lewald)keyfce=2 ++ if(lspme)keyfce=12 ++ if(lhke)keyfce=14 ++ if(idnode.eq.0)open(nconf,file='CONFIG') ++ call getrec(safe,idnode,nconf) ++ call getrec(safe,idnode,nconf) ++ imcon=intstr(record,lenrec,idum) ++ imcon=intstr(record,lenrec,idum) ++ if(.not.lhke.and.(imcon.eq.0.or.imcon.eq.6))then ++ ++ call error(idnode,-180) ++ kill=.true. ++ ++ endif ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Ewald sum precision ',7x,1p,e12.4)")eps ++ ++ if(lhke)then ++ ++ nhko=min(intstr(directive,lenrec,idum),3) ++ nlatt=min(intstr(directive,lenrec,idum),2) ++ if(nlatt.eq.0)nlatt=1 ++ if(nhko.eq.0)nhko=1 ++ ++ endif ++ ++ if(.not.lcut)then ++ call error(idnode,-433) ++ kill=.true. ++ else ++ ++c retreive cell vectors ++ ++ call getrec(safe,idnode,nconf) ++ cell(1)=dblstr(record,lenrec,idum) ++ cell(2)=dblstr(record,lenrec,idum) ++ cell(3)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ cell(4)=dblstr(record,lenrec,idum) ++ cell(5)=dblstr(record,lenrec,idum) ++ cell(6)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ cell(7)=dblstr(record,lenrec,idum) ++ cell(8)=dblstr(record,lenrec,idum) ++ cell(9)=dblstr(record,lenrec,idum) ++ ++c compute alpha and the kmax ++ ++ if(lewald.or.lspme)then ++ ++ call dcell(cell,celprp) ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) ++ fac=1.d0 ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x fac=2.d0**(1.d0/3.d0) ++ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) ++ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) ++ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) ++ ++ elseif(lhke)then ++ ++ if(nhko.eq.0)then ++ if(eps.le.1.d-6)then ++ alpha=3.46d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=3.14d0/rcut ++ else ++ alpha=2.76d0/rcut ++ endif ++ elseif(nhko.eq.1)then ++ if(eps.le.1.d-6)then ++ alpha=4.37d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.08d0/rcut ++ else ++ alpha=3.75d0/rcut ++ endif ++ elseif(nhko.eq.2)then ++ if(eps.le.1.d-6)then ++ alpha=5.01d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.74d0/rcut ++ else ++ alpha=4.44d0/rcut ++ endif ++ elseif(nhko.eq.3)then ++ if(eps.le.1.d-6)then ++ alpha=5.55d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=5.28d0/rcut ++ else ++ alpha=5.00d0/rcut ++ endif ++ endif ++ alpha=alpha/dble(2*nlatt+1) ++ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 ++ call dcell(cell,celprp) ++ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) ++ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) ++ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) ++ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) ++ kmax3=1 ++ ++ endif ++ ++ endif ++ ++ else ++ ++ alpha=dblstr(directive,lenrec,idum) ++ kmax1=intstr(directive,lenrec,idum) ++ kmax2=intstr(directive,lenrec,idum) ++ ++ if(lhke)then ++ ++ kmax3=1 ++ nhko=min(intstr(directive,lenrec,idum),3) ++ nlatt=min(intstr(directive,lenrec,idum),2) ++ ++ else ++ ++ kmax3=intstr(directive,lenrec,idum) ++ ++ endif ++ ++ endif ++ ++c if spme double kmax and set to next power of 2, with current upper ++c limit of 512. ++ ++ if(lspme)then ++ ++ kmaxpow2=1 ++ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax1=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax2=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax3=2 * kmaxpow2 ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ close(nconf) ++ ++ if(lspme)then ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : SPME ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") ++ x alpha,kmax1/2,kmax2/2,kmax3/2 ++ ++ elseif(lhke)then ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : Hautman-Klein-Ewald sum ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 ',2i5)") ++ x alpha,kmax1,kmax2 ++ ++ write(nrite, ++ x "(1x,'HKE expansion order ',7x,i10, ++ x /,1x,'HKE lattice control ',7x,i10)")nhko,nlatt ++ ++ else ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : Ewald sum ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") ++ x alpha,kmax1,kmax2,kmax3 ++ ++ endif ++ ++ endif ++ ++ if(lspme)then ++ ++c Initialize fft tables ++ ++CFFTW call fftw3d_f77_create_plan ++CFFTW x (fplan,kmaxd,kmaxe,kmaxf, ++CFFTW x FFTW_FORWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) ++CFFTW ++CFFTW call fftw3d_f77_create_plan ++CFFTW x (bplan,kmaxd,kmaxe,kmaxf, ++CFFTW x FFTW_BACKWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) ++ ++CSGIC call zzfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, ++CSGIC x dummy,1,1,ffttable,dummy,dummy ) ++ ++CCRAY call ccfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, ++CCRAY x dummy,1,1,ffttable,dummy,dummy ) ++ ++ endif ++ ++ if(lspme)then ++ ++ if(kmax1.gt.kmaxd.or.kmax2.gt.kmaxe.or.kmax3.gt.kmaxf)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ elseif(lhke)then ++ ++ if(kmax2.gt.kmaxb)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ else ++ ++ if(kmax2.gt.kmaxb.or.kmax3.gt.kmaxc)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ lforc=.true. ++ ++ return ++ end subroutine ewald_selection ++ ++ subroutine print_optim(keytol) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for printing the optimisation option ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer keytol ++ ++ if(keytol.eq.0)then ++ write(nrite, ++ x "(1x,'convergence to minimum force selected')") ++ elseif(keytol.eq.1)then ++ write(nrite, ++ x "(1x,'convergence to minimum energy selected')") ++ else ++ write(nrite, ++ x "(1x,'convergence to minimum position selected')") ++ endif ++ ++ return ++ end subroutine print_optim ++ ++ function energy_unit() ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for assigning energy conversion factors ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idum ++ real(8) energy_unit ++ ++ energy_unit=1.d0 ++ if(findstring('ev',record,idum))then ++ energy_unit=9648.530821d0 ++ elseif(findstring('kev',record,idum))then ++ energy_unit=9648530.821d0 ++ elseif(findstring('kcal',record,idum))then ++ energy_unit=418.4d0 ++ elseif(findstring('kj',record,idum))then ++ energy_unit=1.d2 ++ elseif(findstring('k',record,idum))then ++ energy_unit=boltz ++ endif ++ ++ return ++ end function energy_unit ++ ++ subroutine solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for solvation option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,endsol,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ endsol=.false. ++ ++ nsolva=intstr(directive,lenrec,idum) ++ isolva=intstr(directive,lenrec,idum) ++ ++ if(nsolva.eq.0.and.isolva.eq.0)then ++ ++ do while(.not.endsol) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endsol',directive,idum))then ++ endsol=.true. ++ elseif(findstring('enddec',directive,idum))then ++ endsol=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=max(intstr(directive,lenrec,idum),1) ++ endif ++ ++ enddo ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'solvation calculation selected', ++ x /,1x,'start of solvation calculation ',i10, ++ x /,1x,'solvation calculation interval ',i10)") ++ x nsolva,isolva ++ ++ endif ++ ++ return ++ end subroutine solvation_option ++ ++ subroutine free_energy_option(directive,lfree,lfrmas,idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for free energy option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lfree,lfrmas,endfre,safe ++ integer idnode,idum ++ ++ mfree=1 ++ kfree=1 ++ lfree=.true. ++ lfrmas=.false. ++ endfre=.false. ++ ++ do while(.not.endfre) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endfre',directive,idum))then ++ endfre=.true. ++ elseif(findstring('start',directive,idum))then ++ nfrn=intstr(directive,lenrec,idum) ++ elseif(findstring('interval',directive,idum))then ++ ifrn=intstr(directive,lenrec,idum) ++ elseif(findstring('lambda',directive,idum))then ++ pfree=dblstr(directive,lenrec,idum) ++ elseif(findstring('mix',directive,idum))then ++ mfree=intstr(directive,lenrec,idum) ++ elseif(findstring('expo',directive,idum))then ++ kfree=intstr(directive,lenrec,idum) ++ elseif(findstring('reset_mass',directive,idum))then ++ lfrmas=.true. ++ if(findstring('false',directive,idum))lfrmas=.false. ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(mfree.eq.1)kfree=1 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'free energy option selected', ++ x /,1x,'start of free energy calculation ',i10, ++ x /,1x,'sampling interval ',i10, ++ x /,1x,'free energy parameter (lambda) ',f10.3, ++ x /,1x,'mixing rule selected ',i10, ++ x /,1x,'mixing rule exponent ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10, ++ x /,1x,'mass scaling option ',l10)") ++ x nfrn,ifrn,pfree,mfree,kfree,ind_fre,lfrmas ++ ++ endif ++ ++c define free energy scaling parameters ++ ++ call freegen() ++ ++ return ++ end subroutine free_energy_option ++ ++ subroutine excitation_option ++ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for excitation option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,lexcite,lghost,endexc,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ lghost=.true. ++ lexcite=.true. ++ endexc=.false. ++ ++ do while(.not.endexc) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endexc',directive,idum))then ++ endexc=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=intstr(directive,lenrec,idum) ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'excitation option selected', ++ x /,1x,'energy decomposition start ',i10, ++ x /,1x,'energy decomposition interval ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10)") ++ x nsolva,isolva,ind_fre ++ ++ endif ++ ++ return ++ end subroutine excitation_option ++ ++ subroutine switching_option ++ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for switching option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,lswitch,lghost,endswi,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ lghost=.true. ++ lswitch=.true. ++ endswi=.false. ++ niswitch=0 ++ ++ do while(.not.endswi) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endswi',directive,idum))then ++ endswi=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=intstr(directive,lenrec,idum) ++ elseif(findstring('period',directive,idum))then ++ niswitch=max(intstr(directive,lenrec,idum),2) ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(niswitch.eq.0)niswitch=nsolva ++ nswitch=nsolva ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'switching option selected', ++ x /,1x,'energy decomposition start ',i10, ++ x /,1x,'energy decomposition interval ',i10, ++ x /,1x,'switching period ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10)") ++ x nsolva,isolva,niswitch,ind_fre ++ ++ endif ++ ++ return ++ end subroutine switching_option ++ ++ end module define_system_module ++ +diff -urN dl_class_1.9.orig/srcmod/define_system_module.f.preplumed dl_class_1.9/srcmod/define_system_module.f.preplumed +--- dl_class_1.9.orig/srcmod/define_system_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/define_system_module.f.preplumed 2011-10-17 17:32:15.000000000 +0200 +@@ -0,0 +1,5994 @@ ++ module define_system_module ++ ++c*********************************************************************** ++c ++c dl_poly module for utility subroutines and functions ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - p.-a. cazade oct 2007, solvation, free energy ++c and excitation ++c adapted - d. quigley nov 2010, metadynamics ++c ++c*********************************************************************** ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use dihedral_module ++ use ensemble_tools_module ++ use error_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use inversion_module ++ use metafreeze_module ++ use metal_module ++ use parse_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use vdw_module ++ ++ contains ++ ++ subroutine simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading in the simulation control ++c parameters ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992. ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c modified ++c author - t.forester may 1993 ++c amended - t.forester sept 1994 - dl_poly_1.1 ++c amended - t.forester nov 1994 - macro version ++c amended - w.smith dec 1994 - t3d adaptation ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit,seek ++ character*1 hms ++ character*1 directive(lenrec) ++ logical lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,lpsoc ++ logical ltscal,lzeql,loptim,ltraj,lfcap,lgofr,lpgr,lpres,safe ++ logical lstep,ltemp,lcut,ldelr,lprim,lforc,lens,lvdw,lrvdw,kill ++ logical lnsq,lzden,lewald,lspme,lhke,loop,lzero,nolink,newgau ++ logical lminim,lminopt,ltad,lneb,lhit,lbpd,prechk,tadall,nebgo ++ integer idnode,intsta,istraj,keyens,keyfce,keyres,nstbpo,nsbzdn ++ integer keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,khit,nhit ++ integer nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,ntrack ++ integer idum,imcon,keyver,keytol,nblock,blkout,numgau ++ integer minstp,numneb,i,keybpd,mode,nsolva,isolva,nofic ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,rlxtol,opttol ++ real(8) eps,tol,fm,densvar,delrdf,delzdn,zlen,ehit,hyp_units ++ real(8) catchrad,sprneb,deltad,tlow,xhit,yhit,zhit,ebias,vmin ++ real(8) prntim ++ ++CSGIC real(8) dummy ++CCRAY real(8) dummy ++CFFTWc FFTW instruction codes ++CFFTW ++CFFTW integer FFTW_FORWARD,FFTW_BACKWARD ++CFFTW parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) ++CFFTW ++CFFTW integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL ++CFFTW parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) ++CFFTW ++CFFTW integer FFTW_ESTIMATE,FFTW_MEASURE ++CFFTW parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) ++CFFTW ++CFFTW integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM ++CFFTW parameter (FFTW_OUT_OF_PLACE=0) ++CFFTW parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) ++CFFTW ++CFFTW integer FFTW_THREADSAFE ++CFFTW parameter (FFTW_THREADSAFE=128) ++CFFTW ++ ++c intitialize system variables: temperature,pressure,ensemble key ++c force key, cutoff, primary cutoff, verlet shell width, relative ++c dielectric constant,timestep,temperature scaling flag, ++c temp scaling interval ++ ++ mode=0 ++ nhko=0 ++ nlatt=0 ++ nsteql=0 ++ nstrun=0 ++ minstp=0 ++ keybpd=0 ++ keyres=0 ++ keyens=0 ++ keyver=0 ++ taut=0.d0 ++ nstbts=0 ++ nstbgr=0 ++ nsbzdn=0 ++ nstbpo=100 ++ nstack=mxstak ++ intsta=0 ++ nstraj=0 ++ istraj=1 ++ keytrj=0 ++ numgau=1 ++ alpha=0.d0 ++ kmax1=0 ++ kmax2=0 ++ kmax3=0 ++ nospl=min(8,mxspl) ++ isolva=1 ++ nsolva=0 ++ niswitch=0 ++ nswitch=0 ++ nofic=1000 ++ ++ fmax=1000.d0 ++ keyfce=0 ++ multt=1 ++ keytol=0 ++ tstep=0.d0 ++ temp=0.d0 ++ press=0.d0 ++ rcut=0.d0 ++ rprim=0.d0 ++ rvdw=0.d0 ++ delr=0.d0 ++ epsq=1.d0 ++ rlxtol=1.d0 ++ opttol=1.d0 ++ tolnce=1.d-8 ++ quattol=1.d-8 ++ timjob=0.d0 ++ timcls=0.d0 ++ delrdf=0.d0 ++ delzdn=0.d0 ++ zlen=0.d0 ++ ehit=0.d0 ++ xhit=0.d0 ++ yhit=0.d0 ++ zhit=0.d0 ++ vmin=0.d0 ++ ebias=0.d0 ++ catchrad=0.d0 ++ pfree=0.d0 ++ ++ lhit=.false. ++ lbpd=.false. ++ ltad=.false. ++ lneb=.false. ++ loop=.true. ++ lnfic=.false. ++ lpsoc=.false. ++ lzero=.false. ++ ltscal=.false. ++ lewald=.false. ++ lspme=.false. ++ lhke=.false. ++ lgofr=.false. ++ lpgr=.false. ++ lzeql=.true. ++ loptim=.false. ++ lminim=.false. ++ lminopt=.false. ++ ltraj=.false. ++ lfcap=.false. ++ ltemp=.false. ++ lstep=.false. ++ lcut=.false. ++ ldelr=.false. ++ lprim=.false. ++ lforc=.false. ++ lens=.false. ++ lvdw=.false. ++ lrvdw=.false. ++ lpres=.false. ++ kill=.false. ++ lnsq=.false. ++ lzden=.false. ++ nolink=.false. ++ newgau=.false. ++ prechk=.false. ++ tadall=.false. ++ lsolva=.false. ++ lfree=.false. ++ lfrmas=.false. ++ lexcite=.false. ++ lswitch=.false. ++ lghost=.false. ++ nebgo=.true. ++ seek='all ' ++ ++c open the simulation input file ++ ++ if(idnode.eq.0)open(nread,file='CONTROL',status='old') ++ ++c read job title ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ ++ call copystring(record,sysname,80) ++ if(idnode.eq.0)then ++ ++ write(nrite,"(3(1x,120('*'),/),1x,15('*'),5x,80a1,5x,15('*'),/, ++ x 3(1x,120('*'),/),/,/,1x,'SIMULATION CONTROL PARAMETERS',/)") ++ x sysname ++ ++ endif ++ ++c read and process directives from CONTROL file ++ ++ do while(loop) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ ++c convert to lowercase and strip out leading blanks ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.' ')then ++ ++c record is commented out ++ cycle ++ ++ elseif(findstring('redirect',directive,idum))then ++ ++c ignore this option in this context ++ cycle ++ ++ elseif(findstring('steps',directive,idum))then ++ ++c number of timesteps ++ ++ nstrun=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'selected number of timesteps',3x,i10)")nstrun ++ ++ elseif(findstring('integ',directive,idum))then ++ ++c choice of integration algorithm ++ ++ if(findstring('leapfrog',directive,idum))then ++ ++ keyver=0 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'leapfrog verlet integration selected')") ++ ++ elseif(findstring('velocity',directive,idum))then ++ ++ keyver=1 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'velocity verlet integration selected')") ++ ++ endif ++ ++ elseif(findstring('no fic',directive,idum))then ++ ++c cancel possible "flying ice cube" in Berendsen thermostats ++ ++ lnfic=.true. ++ nofic=intstr(directive,lenrec,idum) ++ ++ elseif(findstring('shells',directive,idum).and. ++ x findstring('on',directive,idum).and. ++ x findstring('cores',directive,idum))then ++ ++c put shells on cores at start - shell model only (else null) ++ ++ lpsoc=.true. ++ ++ elseif(findstring('densvar',directive,idum))then ++ ++c specify allowed density variation ++ ++ densvar=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'allowed density variation ',3x,1p,e12.4)") ++ x densvar ++ ++ elseif(findstring('no link',directive,idum))then ++ ++c switch off link cell option ++ ++ nolink=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'link cells option deactivated')") ++ ++ elseif(findstring('equil',directive,idum))then ++ ++c number of equilibration timesteps ++ ++ nsteql=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'equilibration period ',3x,i10)")nsteql ++ ++ elseif(findstring('restart',directive,idum))then ++ ++c restart control ++ ++ if(findstring('noscale',directive,idum))then ++ ++ keyres=3 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'noscale restart requested')") ++ ++ elseif(findstring('scale',directive,idum))then ++ ++ keyres=2 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'scaled restart requested')") ++ ++ else ++ ++ keyres=1 ++ if(idnode.eq.0)write(nrite,"(/,1x,'restart requested')") ++ ++ endif ++ ++ elseif(findstring('ensemble',directive,idum))then ++ ++c ensemble selection ++ ++ call ensemble_selection(directive,lens,kill,idnode,keyens, ++ x mode,taut,taup) ++ ++ elseif(findstring('regauss',directive,idum))then ++ ++c re-initialise velocities option (regaussing) ++ ++ newgau=.true. ++ numgau=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'regaussing option activated', ++ x /,1x,'regaussing interval set to ',3x,i10)") ++ x numgau ++ ++ elseif(findstring('scale',directive,idum))then ++ ++ nstbts=intstr(directive,lenrec,idum) ++ if(nstbts.gt.0)then ++ ltscal=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'temperature scaling on' ++ x /,1x,'temperature scaling interval',3x,i10)") ++ x nstbts ++ ++ endif ++ ++ elseif(findstring('rdf',directive,idum))then ++ ++ if(findstring('print',directive,idum))then ++ ++ lpgr=.true. ++ lpgr=(lgofr.and.lpgr) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'g(r) printing option on ')") ++ ++ else ++ ++ lgofr=.true. ++ nstbgr=intstr(directive,lenrec,idum) ++ delrdf=dblstr(directive,lenrec,idum) ++ if(nstbgr.eq.0)nstbgr=10 ++ if(delrdf.lt.1.d-8)delrdf=0.05d0 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'radial distribution functions on ', ++ x /,1x,'g(r) collection interval ',3x,i10)")nstbgr ++ write(nrite, ++ x "(1x,'g(r) bin width ',3x,1p,e12.4)") ++ x delrdf ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('zden',directive,idum))then ++ ++ lzden=.true. ++ nsbzdn=intstr(directive,lenrec,idum) ++ delzdn=dblstr(directive,lenrec,idum) ++ zlen=dblstr(directive,lenrec,idum) ++ if(nsbzdn.eq.0)nsbzdn=10 ++ if(delzdn.lt.1.d-8)then ++ zlen=0.1d0*dble(mxzdn) ++ delzdn=0.1d0 ++ elseif(zlen.lt.1.d-8)then ++ zlen=delzdn*dble(mxzdn) ++ endif ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'Z density profile requested', ++ x /,1x,'zdensity collection interval',3x,i10)")nsbzdn ++ write(nrite, ++ x "(1x,'zdensity bin width ',3x,1p,e12.4)") ++ x delzdn ++ write(nrite, ++ x "(1x,'zdensity range ',3x,1p,e12.4)") ++ x zlen ++ ++ endif ++ ++ elseif(findstring('collect',directive,idum))then ++ ++ lzeql=.false. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'equilibration included in overall averages')") ++ ++ elseif(findstring('neb',directive,idum))then ++ ++c activate nudged elastic band option ++ ++ call neb_option(directive,lneb,lminopt,idnode, ++ x numneb,keytol,sprneb,opttol,hyp_units) ++ ++ elseif(findstring('impact',directive,idum))then ++ ++c activate the impact option ++ ++ if(lhit)call error(idnode,516) ++ lhit=.true. ++ khit=intstr(directive,lenrec,idum) ++ nhit=intstr(directive,lenrec,idum) ++ ehit=dblstr(directive,lenrec,idum) ++ xhit=dblstr(directive,lenrec,idum) ++ yhit=dblstr(directive,lenrec,idum) ++ zhit=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,1x,'impact option selected')") ++ write(nrite,"( ++ x /,1x,'identity of impact atom ',i10, ++ x /,1x,'time step of impact ',i10, ++ x /,1x,'impact recoil energy (keV) ',1p,e12.4, ++ x /,1x,'impact direction (x component) ',1p,e12.4, ++ x /,1x,'impact direction (y component) ',1p,e12.4, ++ x /,1x,'impact direction (z component) ',1p,e12.4)") ++ x khit,nhit,ehit,xhit,yhit,zhit ++ ++ endif ++ ++c convert impact energy from keV to internal units ++ ++ ehit=ehit*9648530.821d0 ++ ++ elseif(findstring('bpd',directive,idum))then ++ ++c activate the BPD option ++ ++ call bpd_option(directive,seek,lbpd,ltad,lminopt,prechk, ++ x nebgo,keybpd,idnode,nblock,ntrack,keytol,ebias,vmin, ++ x catchrad,sprneb,opttol,hyp_units) ++ ++ elseif(findstring('tad',directive,idum))then ++ ++c activate temperature accelerated dynamics option ++ ++ call tad_option(directive,ltad,lbpd,lminopt,prechk,tadall, ++ x idnode,nblock,ntrack,blkout,keytol,catchrad,sprneb,tlow, ++ x deltad,opttol,hyp_units) ++ ++ elseif(findstring('minim',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ if(findstring('forc',directive,idum))keytol=0 ++ if(findstring('ener',directive,idum))keytol=1 ++ if(findstring('posi',directive,idum))keytol=2 ++ hyp_units=energy_unit() ++ minstp=intstr(directive,lenrec,idum) ++ opttol=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ lminim=.true. ++ loptim=.false. ++ lzero=.false. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'minimisation programme requested')") ++ write(nrite, ++ x "(1x,'structure minimisation interval ', ++ x 3x,i10)")minstp ++ call print_optim(keytol) ++ write(nrite, ++ x "(1x,'structure minimisation tolerance', ++ x 3x,1p,e12.4,1x,a8)")opttol,cunit ++ ++ endif ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ elseif(findstring('optim',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ if(findstring('forc',directive,idum))keytol=0 ++ if(findstring('ener',directive,idum))keytol=1 ++ if(findstring('posi',directive,idum))keytol=2 ++ hyp_units=energy_unit() ++ opttol=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ loptim=.true. ++ lminim=.false. ++ lzero=.false. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'structure optimisation requested')") ++ call print_optim(keytol) ++ write(nrite, ++ x "(1x,'tolerance for structure optimisation ', ++ x 3x,1p,e12.4,1x,a8)")opttol,cunit ++ ++ endif ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ elseif(findstring('zero',directive,idum))then ++ ++ if(lminopt)call error(idnode,225) ++ temp=1.d0 ++ lzero=.true. ++ loptim=.false. ++ lminim=.false. ++ ltemp=.true. ++ ltscal=.false. ++ lminopt=.true. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'zero K optimisation requested')") ++ write(nrite, ++ x "(' temperature reset to',1p,e12.4)")1.d0 ++ ++ endif ++ ++ else if(findstring('solva',directive,idum))then ++ ++ call solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++ else if(findstring('decomp',directive,idum))then ++ ++ call solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++ elseif(findstring('metafreeze',directive,idum).or. ++ x findstring('metadyn',directive,idum))then ++ ++c activate metadynamics option - d. quigley ++ ++ call metadyn_option ++ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, ++ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, ++ x locpe_scale,ref_W_aug,h_aug,wt_Dt) ++ ++ else if(findstring('free',directive,idum))then ++ ++ call free_energy_option(directive,lfree,lfrmas,idnode) ++ ++ else if(findstring('excite',directive,idum))then ++ ++ call excitation_option ++ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) ++ ++ else if(findstring('switch',directive,idum))then ++ ++ call switching_option ++ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) ++ ++ elseif(findstring('print',directive,idum))then ++ ++ nstbpo=intstr(directive,lenrec,idum) ++ nstbpo=max(nstbpo,1) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'data printing interval ',3x,i10)")nstbpo ++ ++ elseif(findstring('stack',directive,idum))then ++ ++ nstack=intstr(directive,lenrec,idum) ++ ++c reset stack limit if too large ++ ++ nstack=min(nstack,mxstak) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'data stacking interval ',3x,i10)")nstack ++ ++ elseif(findstring('stats',directive,idum))then ++ ++ intsta=intstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'statistics file interval ',3x,i10)")intsta ++ ++ elseif(findstring('traj',directive,idum))then ++ ++ ltraj=.true. ++ nstraj=intstr(directive,lenrec,idum) ++ istraj=max(intstr(directive,lenrec,idum),1) ++ keytrj=intstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'trajectory file option on ', ++ x /,1x,'trajectory file start ',3x,i10, ++ x /,1x,'trajectory file interval ',3x,i10 ++ x /,1x,'trajectory file info key ',3x,i10)") ++ x nstraj,istraj,keytrj ++ ++ elseif(findstring('ewald',directive,idum).or. ++ x findstring('spme',directive,idum).or. ++ x findstring('hke',directive,idum))then ++ ++c read Ewald or HK-Ewald or SPM-Ewald sum parameters ++ ++ call ewald_selection(directive,lhke,lspme,lewald,lcut, ++ x lforc,kill,idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2, ++ x kmax3,alpha,rcut) ++ ++ elseif(findstring('distan',directive,idum))then ++ ++ keyfce=4 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Distance dependent dielectric')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('coul',directive,idum))then ++ ++ keyfce=6 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Coulombic potential')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('shift',directive,idum))then ++ ++ keyfce=8 ++ alpha=0.d0 ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : Shifted Coulombic potential')") ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(.not.lcut)then ++ call error(idnode,-435) ++ kill=.true. ++ else ++ ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(1x,'Specified precision parameter : ',1p, ++ x e12.4)")eps ++ write(nrite, ++ x "(1x,'Calculated damping parameter: ',1p, ++ x e12.4)")alpha ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('damp',directive,idum))then ++ ++ alpha=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(1x,'Specified damping parameter : ',1p,e12.4)") ++ x alpha ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('reaction',directive,idum))then ++ ++ keyfce=10 ++ alpha=0.d0 ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'Electrostatics : reaction field')") ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(.not.lcut)then ++ call error(idnode,-435) ++ kill=.true. ++ else ++ ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(1x,'Specified precision parameter : ',1p, ++ x e12.4)")eps ++ write(nrite, ++ x "(1x,'Calculated damping parameter: ',1p, ++ x e12.4)")alpha ++ ++ endif ++ ++ endif ++ ++ elseif(findstring('damp',directive,idum))then ++ ++ alpha=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(1x,'Specified damping parameter : ',1p,e12.4)") ++ x alpha ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('cap',directive,idum))then ++ ++ lfcap=.true. ++ fm=dblstr(directive,lenrec,idum) ++ if(fm.gt.0.d0)fmax=fm ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'force capping :',16x,1p,e12.4,' kT/A')")fmax ++ ++ elseif(findstring('no vdw',directive,idum))then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'short-range potential terms off')") ++ lvdw=.true. ++ ++ elseif(findstring('no elec',directive,idum))then ++ ++ keyfce=0 ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'electrostatic potential terms off')") ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ ++ lforc=.true. ++ ++ elseif(findstring('mult',directive,idum))then ++ ++ multt=max(intstr(directive,lenrec,idum),1) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'multiple timestep interval ',3x,i10)")multt ++ ++ elseif(findstring('timestep',directive,idum))then ++ ++ lstep=.true. ++ tstep=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation timestep ',3x,1p,e12.4)")tstep ++ ++ elseif(findstring('temp',directive,idum))then ++ ++ ltemp=.true. ++ temp=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation temperature ',3x,1p,e12.4)")temp ++ ++ elseif(findstring('pres',directive,idum))then ++ ++ press=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'simulation pressure (katm) ',3x,1p,e12.4)")press ++ ++c convert from katm to internal units of pressure ++ ++ press=press/prsunt ++ lpres=.true. ++ ++ elseif(findstring('prim',directive,idum))then ++ ++c primary cutoff ++ ++ lprim=.true. ++ rprim=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'primary neighbour cut off ',3x,1p,e12.4)")rprim ++ ++ elseif(findstring('rvdw',directive,idum))then ++ ++c cutoff for short range potentials ++ ++ rvdw=dblstr(directive,lenrec,idum) ++ lrvdw=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'real space cut off (vdw) ',3x,1p,e12.4)")rvdw ++ ++ elseif(findstring('delr',directive,idum))then ++ ++c Verlet shell width ++ ++ ldelr=.true. ++ delr=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'border width of Verlet shell',3x,1p,e12.4)")delr ++ ++ elseif(findstring('cut',directive,idum))then ++ ++c cutoff ++ ++ lcut=.true. ++ rcut=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'real space cut off ',3x,1p,e12.4)")rcut ++ ++ elseif(findstring('eps',directive,idum))then ++ ++c relative dielectric constant ++ ++ epsq=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'relative dielectric constant',3x,1p,e12.4)")epsq ++ ++ elseif(findstring('rlxtol',directive,idum))then ++ ++c force tolerance for shell relaxation ++ ++ rlxtol=max(rlxtol,dblstr(directive,lenrec,idum)) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for shell relaxn. ',3x,1p,e12.4)")rlxtol ++ ++ elseif(findstring('shake',directive,idum))then ++ ++c tolerance for shake ++ ++ tolnce=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for SHAKE ',3x,1p,e12.4)")tolnce ++ ++ elseif(findstring('quaternion',directive,idum))then ++ ++c tolerance for quaternion integration ++ ++ quattol=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'tolerance for Quaternions ',3x,1p,e12.4)")quattol ++ ++ elseif(findstring('job time',directive,idum))then ++ ++c time for simulation (in seconds/minutes/hours/days or indefinite) ++ ++ if(findstring('indef',directive,idum))then ++ timjob=1.0d6*365.25d0*24.d0*60.d0*60.d0 ++ else ++ timjob=dblstr(directive,lenrec,idum) ++ if(findstring('m',directive,idum))then ++ timjob=6.0d1*timjob ++ elseif(findstring('h',directive,idum))then ++ timjob=3.6d3*timjob ++ elseif(findstring('d',directive,idum))then ++ timjob=8.64d4*timjob ++ endif ++ endif ++ ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'user allocated job time (',a1,') ',3x,f8.4)") ++ x hms,prntim ++ ++ elseif(findstring('close time',directive,idum))then ++ ++c time for winding up a job (in seconds) ++ ++ timcls=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'job closure time (s) ',3x,f8.3)")timcls ++ ++ elseif(findstring('all pairs',directive,idum))then ++ ++c full minimum image - N^2 interactions each timestep ++ ++ lnsq=.true. ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'All-pairs requested for electrostatics')") ++ ++ elseif(findstring('nospl',directive,idum))then ++ ++c set ewald_spme interpolation order ++ ++ nospl=intstr(directive,lenrec,idum) ++ ++ elseif(findstring('finish',directive,idum))then ++ ++c safe termination of reading CONTROL file ++ ++ loop=.false. ++ ++ else ++ ++c unrecognised directive in control file ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ enddo ++ ++c check on steps before temperature scaling ++ ++ if(nstbts.eq.0)nstbts=nstrun+1 ++ ++c conduct consistency checks on directives ++ ++ if(lminim)then ++ ++c ensure final configuration follows minimisation ++ ++ if(minstp.eq.0)minstp=nstrun ++ nstrun=minstp*(nstrun/minstp) ++ ++ endif ++ ++c check force activation options ++ ++ if(.not.lforc)then ++ ++c check if any forces are in operation ++ ++ if(.not.lvdw)then ++ ++ kill=.true. ++ call error(idnode,-383) ++ ++ endif ++ ++ else ++ ++c turn on short range forces ++ ++ if(lvdw)then ++ ++ if(keyfce.eq.0)then ++ ++ lcut=.true. ++ ldelr=.true. ++ ++ endif ++ ++ else ++ ++ keyfce=keyfce+1 ++ ++ endif ++ ++ endif ++ ++c if tad selected use only leap frog ++ ++ if(ltad.and.keyver.eq.1)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'switching to leapfrog for TAD dynamics')") ++ keyver=0 ++ ++ endif ++ ++c error checking ++ ++ if(lmetadyn.and.keyens.ne.3.and.keyens.ne.5.and.keyens.ne.7)then ++ ++ kill=.true. ++ call error(idnode,-2360) ++ ++ endif ++ ++ if(lsolva.or.lfree.or.lexcite.or.lswitch)then ++ ++ if(lspme)then ++ ++ kill=.true. ++ call error(idnode,-601) ++ ++ endif ++ ++ if(lhke)then ++ ++ kill=.true. ++ call error(idnode,-602) ++ ++ endif ++ ++ endif ++ ++ if(lghost.and.nstbgr.ne.isolva)then ++ ++ call warning(idnode,130,dble(isolva),0.d0,0.d0) ++ nstbgr=isolva ++ ++ endif ++ if(lfree.and.lgofr)then ++ ++ call warning(idnode,140,0.d0,0.d0,0.d0) ++ lgofr=.false. ++ lpgr=.false. ++ ++ endif ++ if(loptim)then ++ ++ temp=0.d0 ++ ++ elseif(.not.ltemp)then ++ ++ kill=.true. ++ call error(idnode,-380) ++ ++ endif ++ ++ if(.not.lstep)then ++ ++ kill=.true. ++ call error(idnode,-381) ++ ++ endif ++ ++ if(.not.lcut)then ++ ++ kill=.true. ++ call error(idnode,-382) ++ ++ endif ++ ++c check if van der Waals cutoff set ++ ++ if(.not.lrvdw.and.mod(keyfce,2).eq.1)then ++ ++ if(rcut.gt.0.d0)then ++ ++ rvdw=rcut ++ ++ else ++ ++ kill=.true. ++ call error(idnode,-402) ++ ++ endif ++ ++ endif ++ ++ if(.not.ldelr)then ++ ++ kill=.true. ++ call error(idnode,-384) ++ ++ endif ++ ++ if(multt.gt.1)then ++ ++ if(.not.lprim)then ++ ++ kill=.true. ++ call error(idnode,-385) ++ ++ elseif(rprim.gt.rcut)then ++ ++ kill=.true. ++ call error(idnode,-386) ++ ++ endif ++ ++ endif ++ ++c check settings in nvt ensemble ++ ++ if(keyens.ge.2.and.keyens.le.3)then ++ ++ if(taut.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-464) ++ ++ endif ++ ++ endif ++ ++c check settings in npt ensemble ++ ++ if(keyens.ge.4.and.keyens.le.7)then ++ ++ if(.not.lpres)then ++ ++ kill=.true. ++ call error(idnode,-387) ++ ++ endif ++ ++c check barostat and thermostat rates non zero ++ ++ if(taut.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-464) ++ ++ endif ++ if(taup.le.0.d0)then ++ ++ kill=.true. ++ call error(idnode,-466) ++ ++ endif ++ ++ endif ++ ++c check multiple timestep cutoffs are sensible ++ ++ if(multt.gt.1)then ++ if(rcut-rprim.lt.delr)then ++ ++ kill=.true. ++ call error(idnode,-398) ++ ++ endif ++ endif ++ ++c check rcut > rvdw (for verlet list constructor) ++ ++ if(rcut.lt.rvdw)then ++ ++ kill=.true. ++ call error(idnode,-400) ++ ++ endif ++ ++c check spme is not being used with incorrect pbc ++ ++ if(lspme)then ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++ kill=.true. ++ call error(idnode,-513) ++ ++ endif ++ ++ endif ++ ++c check on all-pairs calculation request ++ ++ if(lnsq)then ++ ++ if(multt.eq.1)then ++ ++ kill=.true. ++ call error(idnode,-422) ++ ++ endif ++ ++ if(keyfce/2.lt.2.or.keyfce/2.gt.3)then ++ ++ kill=.true. ++ call error(idnode,-424) ++ ++ endif ++ ++ endif ++ ++c cancel rdf option if no vdw or coulombic forces ++ ++ if(lgofr.and.keyfce.eq.0)then ++ ++ lgofr=.false. ++ call warning(idnode,120,0.d0,0.d0,0.d0) ++ ++ endif ++ ++ if(kill)call abort_control_read(2,idnode,nread) ++ ++c close CONTROL file ++ ++ if(idnode.eq.0)close(nread) ++ ++ return ++ end subroutine simdef ++ ++ subroutine sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading in the molecular specifications ++c of the system to be simulated ++c version for rigid unit data and neutral groups ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith may 1992. ++c amended - w.smith march 1994 ++c amended - t.forester april 1994 ++c amended - w.smith dec 1994 - getrec etc ++c amended - a.smondyrev may 2000 - keydih=5 for ++c ryckaert-bellemans potential in dihedrals ++c amended - a.smondyrev may 2000 - keydih=6 for ++c fluorinated ryckaert-bellemans potential in dihedrals ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lunits,lmols,lneut,ltable,lnsq,lshl,safe,lpmf ++ logical loop1,loop2,lsolva,lfree,lexcite,lswitch,lghost ++ ++ integer idnode,keyfce,keyfld,natms,ngrp,ntpatm,ntpmls ++ integer ntpvdw,ntptbp,ntpmet,ntpfbp,nshels,ksite ++ integer nsite,nconst,nangle,ndihed,ninver,nbonds ++ integer nteth,nspmf,itmols,i,idum,keyver ++ integer ntpter,keyshl,iatm,natmsr,ntghost ++ ++ real(8) dlrpot,engunit,rvdw,rcuttb,rctter,rcutfb ++ real(8) sumchg ++ ++ data loop1/.true./,loop2/.true./ ++ ++c initialise system counters: atomic site index, number of ++c constraints, bond angles, dihedrals, inversions, chemical bonds, ++c unique atom types, total number of atoms, ++c total number of rigid groups, number of tethered atoms, ++c number of three body potentials ++ ++ nsite=0 ++ nconst=0 ++ nangle=0 ++ ndihed=0 ++ ninver=0 ++ nbonds=0 ++ ntpatm=0 ++ natms=0 ++ ngrp=0 ++ nteth=0 ++ ntptbp=0 ++ ntpter=0 ++ ntpmet=0 ++ ntpvdw=0 ++ ntpfbp=0 ++ nshels=0 ++ nspmf=0 ++ keyfld=0 ++ keyshl=0 ++ ntghost=0 ++ natmsr=0 ++ ntcons_ghost=0 ++ ++ lunits=.false. ++ lmols=.false. ++ lneut=.false. ++ ltable=.false. ++ lmetab=.false. ++ lshl=.false. ++ lpmf=.false. ++ engunit=1.d0 ++ ++ numbonds(:)=0 ++ numpmf(:)=0 ++ numcon(:)=0 ++ numdih(:)=0 ++ numinv(:)=0 ++ numgrp(:)=0 ++ numsit(:)=0 ++ numteth(:)=0 ++ numshl(:)=0 ++ npmf(:)=0 ++ indpmf(:)=0 ++ ++c open force field data file ++ ++ if(idnode.eq.0)open (nfield,file='FIELD',status='old') ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,'SYSTEM SPECIFICATION')") ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read and process directives from field file ++ ++ do while(loop1) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c convert to lowercase and remove leading blanks ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.' ')then ++ ++c record is commented out ++ cycle ++ ++ elseif(findstring('units',record,idum))then ++ ++c identify energy unit for input/output ++ ++ lunits=.true. ++ call define_units(idnode,engunit) ++ ++c neutral group control option ++ ++ elseif(findstring('neut',record,idum))then ++ ++ lneut=.true. ++ if(idnode.eq.0) ++ x write(nrite,"(/,' neutral group implementation in use')") ++ ++c can't have neutral groups with all-pairs ++ ++ if(lnsq)call error(idnode,426) ++ ++c specify molecular species ++ ++ elseif(findstring('molecu',record,idum))then ++ ++c number of molecular types ++ ++ if(lmols)call error(idnode,11) ++ lmols=.true. ++ ntpmls=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,1x,'number of molecular types',6x,i10)") ++ x ntpmls ++ ++ if(ntpmls.gt.mxtmls)call error(idnode,10) ++ ++c initialise total system charge ++ ++ sumchg=0.d0 ++ ++c read in molecular characteristics ++ ++ do itmols=1,ntpmls ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'molecular species type',9x,i10)") ++ x itmols ++ ++c name of molecular species ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++ call copystring(record,molnam(1,itmols),40) ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,1x,'name of species:',13x,40a1)") ++ x (molnam(i,itmols),i=1,40) ++ ++c stop processing if energy unit has not been specified ++ ++ if(.not.lunits)call error(idnode,6) ++ ++c read molecular data ++ ++ loop2=.true. ++ ++ do while(loop2) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ ++ ksite=0 ++ ++ if(findstring('nummol',record,idum))then ++ ++ nummols(itmols)=intstr(record,lenrec,idum) ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'number of molecules ', ++ x 10x,i10)")nummols(itmols) ++ ++ elseif(findstring('atoms',record,idum))then ++ ++c read in atomic details ++ ++ call define_atoms ++ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read core - shell spring parameters ++ ++ elseif(findstring('shell',record,idum))then ++ ++ lshl=.true. ++ call define_core_shell ++ x (safe,idnode,itmols,nshels,nsite,keyshl, ++ x engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read chemical bond force constant and bondlength ++ ++ elseif(findstring('bonds',record,idum))then ++ ++ call define_bonds ++ x (safe,idnode,itmols,nbonds,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read bond atom indices and constraint bondlength ++ ++ elseif(findstring('constr',record,idum))then ++ ++ call define_constraints ++ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read pmf bond atom indices, weights and constraint bondlength ++ ++ elseif(findstring('pmf',record,idum))then ++ ++ if(lpmf)call error(idnode,484) ++ lpmf=.true. ++ call define_pmf(safe,idnode,itmols,nspmf) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular angular potential parameters ++ ++ elseif(findstring('angles',record,idum))then ++ ++ call define_angles ++ x (safe,idnode,itmols,nangle,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular dihedral potential parameters ++ ++ elseif(findstring('dihedr',record,idum))then ++ ++ call define_dihedrals ++ x (safe,idnode,itmols,ndihed,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read intramolecular inversion potential parameters ++ ++ elseif(findstring('invers',record,idum))then ++ ++ call define_inversions ++ x (safe,idnode,itmols,ninver,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read rigid body data ++ ++ elseif(findstring('rigid',record,idum))then ++ ++ call define_rigid_body ++ x (safe,lghost,idnode,itmols,ngrp,natmsr) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read tethered atom indices and tethering parameters ++ ++ elseif(findstring('teth',record,idum))then ++ ++ call define_tethers ++ x (safe,idnode,itmols,nteth,nsite,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c finish of data for one molecular type ++ ++ elseif(findstring('finish',record,idum))then ++ ++c running total of number of atoms in system ++ ++ natms=natms+nummols(itmols)*numsit(itmols) ++ if(natms.gt.mxatms)call error(idnode,75) ++ ++c check core-shell units are not both in same rigid body unit ++ ++ call check_shells(idnode,itmols,nshels,ngrp) ++ ++ loop2=.false. ++ ++ else ++ ++c error exit for unidentified directive in molecular data ++ ++ if(idnode.eq.0)write(nrite,'(12x,a)')record ++ call error(idnode,12) ++ ++ endif ++ ++ enddo ++ ++c construction of atmolt table for solvation calculation ++ ++ if(lsolva)then ++ ++ do iatm=natmsr+1,natms ++ atmolt(iatm)=itmols ++ enddo ++ natmsr=natms ++ ++ endif ++ ++ enddo ++ ++c construction of atm_fre table for free energy or excitation ++ ++ if(lfree.or.lexcite.or.lswitch)then ++ ++ atm_fre(:)=0 ++ if((ind_fre(1).ne.0).and.(ind_fre(2).ne.0))then ++ ++ do iatm=ind_fre(1),ind_fre(2) ++ atm_fre(iatm)=1 ++ enddo ++ ++ endif ++ ++ if((ind_fre(3).ne.0).and.(ind_fre(4).ne.0))then ++ ++ do iatm=ind_fre(3),ind_fre(4) ++ ++ atm_fre(iatm)=2 ++ if(lghost)ntghost=ntghost+1 ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c calculate system charge ++ ++ call check_syschg(idnode,ntpmls,sumchg) ++ ++c read in the nonbonded potential energy parameters ++ ++ elseif(findstring('vdw',record,idum))then ++ ++ call define_van_der_waals ++ x (safe,ltable,lunits,lmols,idnode,ntpvdw, ++ x ntpatm,keyfce,dlrpot,rvdw,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read in the metal potential energy parameters ++ ++ elseif(findstring('met',record,idum))then ++ ++ call define_metals ++ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rvdw,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read the three body potential energy parameters ++ ++ elseif(findstring('tbp',record,idum))then ++ ++ call define_three_body ++ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read the tersoff potential energy parameters ++ ++ elseif(findstring('tersoff',record,idum))then ++ ++ call define_tersoff ++ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read in the four body potential energy parameters ++ ++ elseif(findstring('fbp',record,idum))then ++ ++ call define_four_body ++ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, ++ x rcutfb,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c read external field data ++ ++ elseif(findstring('extern',record,idum))then ++ ++ call define_external_field ++ x (safe,lunits,idnode,keyfld,engunit) ++ if(.not.safe)call abort_field_read(1,idnode,nfield) ++ ++c normal end of FIELD file ++ ++ elseif(findstring('close',record,idum))then ++ ++ loop1=.false. ++ if(ntpvdw.eq.0.and.ntpmet.eq.0.and. ++ x mod(keyfce,2).eq.1)call error(idnode,145) ++ ++c error exit for unidentified directive ++ ++ else ++ ++ if(idnode.eq.0)write(nrite,'(100a)')record ++ call abort_field_read(2,idnode,nfield) ++ ++ endif ++ ++ enddo ++ ++c close force field file ++ ++ if(idnode.eq.0)close (nfield) ++ ++ ++ if(lshl.and.idnode.eq.0)then ++ ++ if(keyshl.eq.1)write(nrite, ++ x "(/,/,'adiabatic shell model in operation')") ++ ++ if(keyshl.eq.2)write(nrite, ++ x "(/,/,'relaxed shell model in operation')") ++ ++ endif ++ ++ if(lshl.and.keyshl.eq.0)call error(idnode,1951) ++ ++c if metadynamics and shell selected use only velocity verlet ++ ++ if(lshl.and.lmetadyn.and.keyver.eq.0)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'switching to velocity verlet for metadynamics')") ++ keyver=1 ++ ++ endif ++ ++ return ++ end subroutine sysdef ++ ++ subroutine sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading the configuration data file ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 atname(8) ++ ++ logical loglnk,safe,lneut,nolink,lfree,lfrmas ++ integer idnode,imcon,keyens,keyfce,keyres,levcfg,multt ++ integer ntpmls,i,indatm,indnam,indneu,k,ilx,ily,ilz ++ integer m,l,ncells,idum,mxnode ++ real(8) delr,rcut,volm,xcoord,ycoord,zcoord,totmas,xveloc ++ real(8) yveloc,zveloc,xforce,yforce,zforce,axx,rt3,xhi,yhi,zhi ++ real(8) width,dum1,dum2,test,com(3) ++ ++c open the system input file ++ ++ if(idnode.eq.0)open (nconf,file='CONFIG') ++ ++c read the CONFIG file header ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ ++ call copystring(record,cfgname,80) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'configuration file name: ',/,/,10x,80a1)")cfgname ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ ++ levcfg=intstr(record,lenrec,idum) ++ imcon=intstr(record,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'selected image convention',6x,i10)")imcon ++ ++c check config file contents for consistent data ++ ++ if((imcon.eq.0.or.imcon.eq.6).and. ++ x (keyfce/2.eq.1.or.keyfce/2.eq.6)) ++ x call error(idnode,180) ++ ++ if(imcon.eq.0.and.(.not.lneut).and.(keyfce.gt.1) ++ x .and.(multt.eq.1))call warning(idnode,30,0.d0,0.d0,0.d0) ++ ++ if(imcon.eq.0.and.(keyens.ge.4.and.keyens.le.7)) ++ x call error(idnode,390) ++ if(imcon.le.2.and.(keyens.eq.6.or.keyens.eq.7))imcon=3 ++ if(keyres.gt.0.and.levcfg.lt.1)call error(idnode,85) ++ ++c specify molecular dynamics simulation cell ++ ++ if(imcon.eq.0)then ++ ++c if no periodic boundaries - set zero values for cell ++c vectors and cell volume ++ ++ cell(:)=0.d0 ++ volm=0.d0 ++ ++ else ++ ++c read cell vectors ++ ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(1)=dblstr(record,lenrec,idum) ++ cell(2)=dblstr(record,lenrec,idum) ++ cell(3)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(4)=dblstr(record,lenrec,idum) ++ cell(5)=dblstr(record,lenrec,idum) ++ cell(6)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ if(.not.safe)call abort_config_read(1,idnode,nconf) ++ cell(7)=dblstr(record,lenrec,idum) ++ cell(8)=dblstr(record,lenrec,idum) ++ cell(9)=dblstr(record,lenrec,idum) ++ ++ endif ++ ++c read the atomic coordinates ++ ++ indatm=0 ++ indnam=0 ++ indneu=0 ++ safe=.true. ++ ++ do k=1,ntpmls ++ ++ do l=1,nummols(k) ++ ++ do m=1,numsit(k) ++ ++ indatm=indatm+1 ++ ++ if(indatm.gt.mxatms)call error(idnode,45) ++ ++ xxx(indatm)=0.d0 ++ yyy(indatm)=0.d0 ++ zzz(indatm)=0.d0 ++ vxx(indatm)=0.d0 ++ vyy(indatm)=0.d0 ++ vzz(indatm)=0.d0 ++ fxx(indatm)=0.d0 ++ fyy(indatm)=0.d0 ++ fzz(indatm)=0.d0 ++ ++ if(idnode.eq.0)then ++ ++ if(levcfg.eq.0)then ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ ++ elseif(levcfg.eq.1)then ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc ++ ++ else ++ ++ read(nconf,'(8a1)',end=100)atname ++ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord ++ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc ++ read(nconf,'(3f20.0)',end=100)xforce,yforce,zforce ++ ++ endif ++ ++c strip blanks off atom name ++ ++ call strip(atname,8) ++ ++ if(sitnam(indnam+m).eq.mkwd8(atname))then ++ ++ xxx(indatm)=xcoord ++ yyy(indatm)=ycoord ++ zzz(indatm)=zcoord ++ ++ if(levcfg.gt.0)then ++ ++ vxx(indatm)=xveloc ++ vyy(indatm)=yveloc ++ vzz(indatm)=zveloc ++ ++ endif ++ ++ if(levcfg.gt.1)then ++ ++ fxx(indatm)=xforce ++ fyy(indatm)=yforce ++ fzz(indatm)=zforce ++ ++ endif ++ ++ else ++ ++ write(nrite,"(/,/,'unidentified atom label :',8a1, ++ x ': atom number ',i5)")atname,indatm ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ call gstate(safe) ++ if(.not.safe)call error(idnode,25) ++ ++ ltype(indatm)=ltpsit(indnam+m) ++ weight(indatm)=wgtsit(indnam+m) ++ chge(indatm)=chgsit(indnam+m) ++ atmnam(indatm)=sitnam(indnam+m) ++ lstfrz(indatm)=lfzsit(indnam+m) ++ if(lneut)lstneu(indatm)=nugrp(indnam+m)+indneu ++ ++c reset atomic masses according to free energy definitions ++ ++ if(lfree)then ++ ++ weight_sav(indatm)=weight(indatm) ++ ++ if(lfrmas)then ++ ++ if(indatm.ge.ind_fre(1).and.indatm.le.ind_fre(2))then ++ weight(indatm)=lambda1*weight(indatm) ++ elseif(indatm.ge.ind_fre(3).and.indatm.le.ind_fre(4)) ++ x then ++ weight(indatm)=lambda2*weight(indatm) ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ indneu=indneu+nugrp(indnam+numsit(k)) ++ ++ enddo ++ ++ indnam=indnam+numsit(k) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ call gdsum(xxx,indatm,buffer) ++ call gdsum(yyy,indatm,buffer) ++ call gdsum(zzz,indatm,buffer) ++ ++ if(levcfg.gt.0)then ++ ++ call gdsum(vxx,indatm,buffer) ++ call gdsum(vyy,indatm,buffer) ++ call gdsum(vzz,indatm,buffer) ++ ++ endif ++ ++ if(levcfg.gt.1)then ++ ++ call gdsum(fxx,indatm,buffer) ++ call gdsum(fyy,indatm,buffer) ++ call gdsum(fzz,indatm,buffer) ++ ++ endif ++ ++ endif ++ ++c check integrity of cell vectors : for cubic, TO and RD cases ++c ie. cell(1)=cell(5)=cell(9) (or cell(9)/sqrt(2) for RD) ++ ++ if((imcon.eq.1).or.(imcon.eq.4).or.(imcon.eq.5))then ++ ++ axx=(abs(cell(1))+abs(cell(5)))/2.d0 ++ test=1.d-8*axx ++ if(abs(cell(1)-axx).gt.test)call error(idnode,410) ++ if(abs(cell(5)-axx).gt.test)call error(idnode,410) ++ if(imcon.eq.5)then ++ if(abs(cell(9)-axx*sqrt(2.d0)).gt.test) ++ x call error(idnode,410) ++ else ++ if(abs(cell(9)-axx).gt.test)call error(idnode,410) ++ endif ++ ++ endif ++ ++c check integrity of hexagonal prism cell vectors ++ ++ if(imcon.eq.7)then ++ ++ rt3=sqrt(3.d0) ++ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) ++ x call error(idnode,410) ++ ++ endif ++ ++c check 2D PBC for imcon=6 ++ ++ if(imcon.eq.6)then ++ ++ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) ++ ++ endif ++ ++c check for diagonal cell matrix if appropriate ++ ++ if((imcon.eq.1).or.(imcon.eq.2).or.(imcon.eq.4).or. ++ x (imcon.eq.5).or.(imcon.eq.7))then ++ ++ if(abs(cell(2)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(4)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) ++ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) ++ ++ endif ++ ++c put centre of mass at centre of coordinates if imcon=0 ++ ++ if(imcon.eq.0)then ++ ++ totmas=getmass(indatm,idnode,mxnode) ++ call getcom(indatm,idnode,mxnode,totmas,com) ++ ++ do i=1,indatm ++ ++ xxx(i)=xxx(i)-com(1) ++ yyy(i)=yyy(i)-com(2) ++ zzz(i)=zzz(i)-com(3) ++ ++ enddo ++ ++ endif ++ ++c set widths if unset - needed for check on link cells below ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++ xhi=abs(xxx(1)) ++ yhi=abs(yyy(1)) ++ zhi=abs(zzz(1)) ++ do i=2,indatm ++ ++ xhi=max(xhi,abs(xxx(i))) ++ yhi=max(yhi,abs(yyy(i))) ++ zhi=max(zhi,abs(zzz(i))) ++ ++ enddo ++ if(imcon.eq.0)then ++ ++ cell(1)=max(2.d0*xhi+rcut+delr,3.d0*(rcut+delr)) ++ cell(5)=max(2.d0*yhi+rcut+delr,3.d0*(rcut+delr)) ++ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) ++ ++ endif ++ ++ if(imcon.eq.6.and.cell(9).lt.1.d-6)then ++ ++ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) ++ ++ endif ++ ++ endif ++ ++c calculate dimensional properties of simulation cell ++ ++ call dcell(cell,celprp) ++ ++ if(imcon.eq.0)then ++ ++ volm=0.d0 ++ ++ elseif(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ else ++ ++ volm=celprp(10) ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,/,1x,'simulation cell vectors'/,/)") ++ write(nrite,"(21x,3f12.6)")cell ++ ++ write(nrite, ++ x "(/,/,1x,'system volume ',2x,1p,g22.12)")volm ++ ++ endif ++ ++c check value of cutoff and reset if necessary ++ ++ if(imcon.gt.0)then ++ ++ width=min(celprp(7),celprp(8),celprp(9))/2.d0 ++ if(imcon.eq.4)width=sqrt(3.d0)*cell(1)/4.d0 ++ if(imcon.eq.5)width=cell(1)/2.d0 ++ if(imcon.eq.6)width=min(celprp(7),celprp(8))/2.d0 ++ ++c halt program if potential cutoff exceeds cell width ++ ++ if(rcut.gt.width)call error(idnode,95) ++ ++ endif ++ ++c decide on whether to use link cells for verlet list constructor ++ ++ if(nolink)then ++ ++ loglnk=.false. ++ ++ else ++ ++ loglnk=.true. ++ ++ ilx=int(celprp(7)/(rcut+delr)) ++ ily=int(celprp(8)/(rcut+delr)) ++ ilz=int(celprp(9)/(rcut+delr)) ++ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. ++ ncells=ilx*ily*ilz ++ if(lneut.and.ncells.le.36)loglnk=.false. ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. ++ if(loglnk.and.ncells.gt.mxcell)then ++ ++ dum1=dble(ncells) ++ dum2=dble(mxcell) ++ call warning(idnode,90,dum1,dum2,dum2) ++ loglnk=.false. ++ ++ endif ++ ++ endif ++ ++ if(loglnk.and.idnode.eq.0) ++ x write(nrite,"(/,/,' link cell algorithm in use')") ++ ++ if(idnode.eq.0)close (nconf) ++ ++c ensure PBC compliance of starting structure ++ ++ if(keyres.eq.0.and.imcon.gt.0)then ++ ++ call images(imcon,idnode,mxnode,indatm,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,indatm,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ return ++ ++c error exit for config file read ++ ++ 100 call abort_config_read(2,idnode,nconf) ++ ++ end subroutine sysgen ++ ++ subroutine sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading the REVIVE file data and ++c defining the initial thermodynamic and structural accumulators. ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c adapted - d. quigley nov 2010, metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzden,lfree,lsolva,lghost,lpsoc ++ integer idnode,imcon,keyfce,keyres,mxnode,natms,nstep,numacc ++ integer numrdf,ntpatm,nzden,i,j,k,ntpmet,ntshl,ntpvdw ++ real(8) chip,chit,conint,elrc,engunit,virlrc,rvdw,volm ++ real(8) dnumrd,dnstep,dnumac,dnzden,virtot,vircom,tboost ++ real(8) chit_shl ++ ++c read or initialise accumulator arrays ++ ++ if(keyres.eq.1.and.idnode.eq.0)then ++ ++c read accumulator data from dump file ++ ++ open(nrest,file='REVOLD',form='unformatted') ++ ++ read(nrest) dnstep,dnumac,dnumrd,chit,chip,conint,dnzden, ++ x tboost,chit_shl ++ read(nrest) virtot,vircom,eta,strcns,strbod ++ read(nrest) stpval ++ read(nrest) sumval ++ read(nrest) ssqval ++ read(nrest) zumval ++ read(nrest) ravval ++ read(nrest) stkval ++ read(nrest) xx0,yy0,zz0 ++ read(nrest) xxs,yys,zzs ++ ++ if(lgofr) read(nrest)rdf ++ if(lzden) read(nrest)zdens ++ ++ nstep=nint(dnstep) ++ numacc=nint(dnumac) ++ numrdf=nint(dnumrd) ++ nzden=nint(dnzden) ++ close (nrest) ++ ++ else ++ ++c initialise step counters ++ ++ nstep=0 ++ numacc=0 ++ numrdf=0 ++ nzden=0 ++ ++c initialise temperature and pressure coupling parameters ++c and integral for conserved quantity ++ ++ chit=0.d0 ++ chip=0.d0 ++ conint=0.d0 ++ virtot=0.d0 ++ vircom=0.d0 ++ chit_shl=0.d0 ++ do i=1,9 ++ ++ eta(i)=0.d0 ++ strcns(i)=0.d0 ++ strbod(i)=0.d0 ++ ++ enddo ++ ++c initialise accumulator arrays ++ ++ do i=1,mxnstk ++ ++ stpval(i)=0.d0 ++ sumval(i)=0.d0 ++ ssqval(i)=0.d0 ++ zumval(i)=0.d0 ++ ravval(i)=0.d0 ++ ++ enddo ++ ++ do i=1,mxatms ++ ++ xx0(i)=0.d0 ++ yy0(i)=0.d0 ++ zz0(i)=0.d0 ++ xxs(i)=0.d0 ++ yys(i)=0.d0 ++ zzs(i)=0.d0 ++ ++ enddo ++ ++ do j=1,mxnstk ++ ++ do i=1,mxstak ++ ++ stkval(i,j)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ if(lgofr)then ++ ++ do i=1,mxxtyp ++ ++ do j=1,mxrdf ++ ++ rdf(j,i)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(lzden)then ++ ++ do i=1,mxatyp ++ ++ do j=1,mxzdn ++ zdens(j,i)=0.d0 ++ enddo ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c put shells on cores at start ++ ++ if(lpsoc.and.keyres.ne.1.and.ntshl.gt.0) ++ x call put_shells_on_cores(idnode,mxnode,ntshl) ++ ++c if restart then broadcast stored variables via a global sum ++ ++ if(keyres.eq.1.and.mxnode.gt.1)then ++ ++ if(mxbuff.lt.natms.or.mxbuff.lt.mxnstk*mxstak) ++ x call error(idnode,186) ++ ++ buffer(1)=chit ++ buffer(2)=chip ++ buffer(3)=conint ++ buffer(4)=dble(nstep) ++ buffer(5)=dble(numacc) ++ buffer(6)=dble(numrdf) ++ buffer(7)=dble(nzden) ++ buffer(8)=tboost ++ buffer(9)=virtot ++ buffer(10)=vircom ++ buffer(11)=chit_shl ++ call gdsum(buffer(1),11,buffer(12)) ++ chit=buffer(1) ++ chip=buffer(2) ++ conint=buffer(3) ++ nstep=nint(buffer(4)) ++ numacc=nint(buffer(5)) ++ numrdf=nint(buffer(6)) ++ nzden=nint(buffer(7)) ++ tboost=buffer(8) ++ virtot=buffer(9) ++ vircom=buffer(10) ++ chit_shl=buffer(11) ++ ++ call gdsum(eta,9,buffer) ++ call gdsum(strcns,9,buffer) ++ call gdsum(strbod,9,buffer) ++ call gdsum(stpval,mxnstk,buffer) ++ call gdsum(sumval,mxnstk,buffer) ++ call gdsum(ssqval,mxnstk,buffer) ++ call gdsum(zumval,mxnstk,buffer) ++ call gdsum(ravval,mxnstk,buffer) ++ call gdsum(stkval,mxnstk*mxstak,buffer) ++ call gdsum(xx0,natms,buffer) ++ call gdsum(yy0,natms,buffer) ++ call gdsum(zz0,natms,buffer) ++ call gdsum(xxs,natms,buffer) ++ call gdsum(yys,natms,buffer) ++ call gdsum(zzs,natms,buffer) ++ ++c for rdf table - broadcast and normalise ++ ++ if(lgofr)then ++ ++ do k=1,mxxtyp ++ ++ call gdsum(rdf(1,k),mxrdf,buffer) ++ ++ do j=1,mxrdf ++ rdf(j,k)=rdf(j,k)/dble(mxnode) ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(lzden)then ++ ++ do k=1,mxatyp ++ ++ call gdsum(zdens(1,k),mxzdn,buffer) ++ ++ do j=1,mxzdn ++ zdens(j,k)=zdens(j,k)/dble(mxnode) ++ enddo ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c number densities and long-range corrections ++ ++ elrc=0.d0 ++ virlrc=0.d0 ++ ++ if(imcon.eq.0.or.imcon.eq.6)volm=4.d0*pi/3.d0*rvdw**3 ++ ++ call lrcorrect ++ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, ++ x ntpatm,ntpvdw,elrc,engunit,virlrc,rvdw,volm) ++ ++ if(lmetab.or.ntpmet.eq.0)then ++ ++ elrcm(0)=0.d0 ++ vlrcm(0)=0.d0 ++ ++ else ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++ if(imcon.eq.0.or.imcon.eq.6)volm=0.d0 ++ ++ return ++ end subroutine sysinit ++ ++ subroutine systemp ++ x (idnode,imcon,keyres,mxnode,natms,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for setting the initial system temperature ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,keyres,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,ntshl,levcfg,i,io,k,keyshl ++ real(8) degfre,degshl,degrot,temp,tolnce,sigma,rsq ++ ++c number of degrees of freedom ++c 3 for com translation ++c 3 for angular momentum about origin (non-periodic systems only) ++ ++ degfre=dble(3*(ntfree-ntshl)-3-ntcons)+degfre ++ if(imcon.eq.0.or.imcon.eq.6)degfre=degfre-3.0d0 ++ if(imcon.eq.0.or.imcon.eq.6)degrot=max(0.d0,degrot-3.0d0) ++ degshl=dble(3*ntshl) ++ ++c lose one degree of freedom if temperature constrained ++c gaussian constraints ++ ++c if(keyens.eq.1)degfre=degfre-1.d0 ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,/,' total degrees of freedom ',f20.0,/, ++ x ' rotational degrees of freedom ',f20.0,/, ++ x ' shell pseudo degrees of freedom',f20.0)") ++ x degfre,degrot,degshl ++ if(degfre.lt.1.d0)call error(idnode,350) ++ ++c define reciprocal masses of atoms ++ ++ do i=1,natms ++ ++ if(lstfrz(i).ne.0.or.weight(i).lt.1.d-6)then ++ ++ rmass(i)=0.d0 ++ weight(i)=0.d0 ++ ++ else ++ ++ rmass(i)=1.d0/weight(i) ++ ++ endif ++ ++ enddo ++ ++c generate starting velocities ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++ if(keyres.eq.0)then ++ ++ call gauss(natms,vxx,vyy,vzz) ++ ++ do i=1,natms ++ ++ rsq=sqrt(rmass(i)) ++ vxx(i)=vxx(i)*rsq ++ vyy(i)=vyy(i)*rsq ++ vzz(i)=vzz(i)*rsq ++ ++ enddo ++ ++ if(ntcons.gt.0)call quench ++ x (imcon,idnode,mxnode,natms,nscons,tolnce) ++ ++ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ if(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ elseif(keyres.eq.1.or.keyres.eq.3)then ++ ++ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ elseif(keyres.eq.2)then ++ ++ if(ngrp.gt.0)then ++ ++ call vscaleg ++ x (idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ elseif(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c print out sample of initial configuration ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'sample of starting configuration',/)") ++ ++ io=(natms+19)/20 ++ if((levcfg.le.1).and.(idnode.eq.0)) ++ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',/,/)") ++ if((levcfg.eq.2).and.(idnode.eq.0)) ++ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)', ++ x 7x,'fx(i)',7x,'fy(i)',7x,'fz(i)',/,/)") ++ ++ do i=1,natms,io ++ ++ if(levcfg.le.1)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i) ++ ++ elseif(levcfg.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i), ++ x vxx(i),vyy(i),vzz(i),fxx(i),fyy(i),fzz(i) ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine systemp ++ ++ subroutine sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine defining global bookkeeping ++c arrays ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith july 1997 ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical loglnk,lneut,lshmov,lcnb,lsolva,lghost ++ integer idnode,imcon,mxnode,natms,nneut,ngrp,nscons,ntangl,i ++ integer ntbond,ntcons,ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,ii,isol,itmols,igsol,iggsol,natmsf,natmsl ++ integer ntghost,natms2 ++ real(8) degfre,degrot ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c neutral group bookkeeping ++ ++ call neutbook(lneut,idnode,natms,nneut) ++ ++c rigid body bookkeeping ++ ++ call quatbook ++ x (lsolva,idnode,imcon,mxnode,natms2,ngrp,ntpmls, ++ x ntfree,degfre,degrot) ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ ++ numcon(mxtmls)=numcon(mxtmls)+ntcons_ghost ++ numgrp(mxtmls)=numgrp(mxtmls)+ngrp_ghost ++ ++ endif ++ ++c construct list of excluded pair interactions ++ ++ if(lneut)then ++ ++ call exclude(idnode,mxnode,natms,ntpmls) ++ call excludeneu(idnode,mxnode,nneut) ++ ++ elseif(.not.lneut)then ++ ++ call exclude(idnode,mxnode,natms,ntpmls) ++ ++ if(loglnk)then ++ ++ call exclude_link(idnode,mxnode,ntpmls) ++ ++ else ++ ++ call exclude_atom(idnode,mxnode,natms,ntpmls) ++ ++ endif ++ ++ endif ++ ++c if excitation calculation, allow for ghost species ++ ++ if(lghost)then ++ ++ numcon(mxtmls)=numcon(mxtmls)-ntcons_ghost ++ numgrp(mxtmls)=numgrp(mxtmls)-ngrp_ghost ++ ++ endif ++ ++c construct interaction lists for bonded forces ++ ++ call intlist ++ x (lshmov,lcnb,idnode,mxnode,natms2,nscons,ntangl,ntbond, ++ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) ++ ++c adaptations for solvation and excitation simulations ++ ++ if(lsolva.or.lghost)then ++ ++ natmsf=0 ++ natmsl=0 ++ natm_sol(:)=0 ++ const_sol(:)=numcon(:)*nummols(:) ++ rigid_sol(:)=numgrp(:)*nummols(:) ++ ++ if(ngrp.eq.0)then ++ ++ do itmols=1,mxtmls ++ ++ natmsl=natmsl+numsit(itmols)*nummols(itmols) ++ ++ do isol=natmsf+1,natmsl ++ ++ if(lstfrz(isol).eq.0)then ++ natm_sol(itmols)=natm_sol(itmols)+1 ++ endif ++ ++ enddo ++ ++ natmsf=natmsl ++ ++ enddo ++ ++ else ++ ++ ii=1 ++ ++ do itmols=1,mxtmls ++ ++ natmsl=natmsl+numsit(itmols)*nummols(itmols) ++ ++ do isol=natmsf+1,natmsl ++ ++ if(lstgot_sol(ii).eq.isol)then ++ ii=ii+1 ++ else ++ ++ if(lstfrz(isol).eq.0)then ++ natm_sol(itmols)=natm_sol(itmols)+1 ++ endif ++ ++ endif ++ ++ enddo ++ ++ natmsf=natmsl ++ ++ enddo ++ ++ degrot_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 ++ degfre_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 ++ ++ endif ++ ++ if(lghost)natm_sol(mxtmls)=natm_sol(mxtmls)-ntghost ++ degfre_sol(:)=dble(3*(natm_sol(:))-const_sol(:))+degfre_sol(:) ++ ++ endif ++ ++ return ++ end subroutine sysbook ++ ++ subroutine define_units(idnode,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting energy units ++c ++c copyright - daresbury laboratory ++c author - w. smith august 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,idum,i ++ real(8) engunit ++ logical blank ++ ++ blank=.true. ++ ++ do i=6,lenrec ++ if(record(i).ne.' ')blank=.false. ++ enddo ++ ++ if(blank)then ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=dl_poly internal ', ++ x 'units ')") ++ ++ elseif(findstring('ev',record,idum))then ++ ++ engunit=9648.530821d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=electron volts ')") ++ ++ elseif(findstring('kev',record,idum))then ++ ++ engunit=9648530.821d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kilo electron volts ')") ++ ++ elseif(findstring('kcal',record,idum))then ++ ++ engunit=418.4d0 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kcal/ mol ')") ++ ++ elseif(findstring('kj',record,idum))then ++ ++ engunit=1.d2 ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kjoule/mol ')") ++ ++ elseif(findstring('k',record,idum))then ++ ++ engunit=boltz ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=kelvin ')") ++ ++ elseif(findstring('internal',record,idum))then ++ ++ if(idnode.eq.0) ++ x write(nrite,"(/,' energy units=dl_poly internal', ++ x ' units ')") ++ ++ else ++ ++ if(idnode.eq.0)write(nrite,'(a)')record ++ call error(idnode,5) ++ ++ endif ++ ++ return ++ end subroutine define_units ++ ++ subroutine quatbook ++ x (lsolva,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree, ++ x degfre,degrot) ++ ++c************************************************************************** ++c ++c dl_poly subroutine for setting up bookkeeping for rigid bodies ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c adapted - p.-a. cazade oct 2007, solvation etc ++c ++c************************************************************************* ++ ++ implicit none ++ ++ logical safe,pass1,pass2,linear,lsolva ++ integer fail,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree ++ integer i,igrp,jgrp,kgrp,jr,jt,igrp1,igrp2,itmols,imols,lgrp,id ++ integer ii,jj,isite,k,kk,ill,i1,i2,i3,j,ngp,ifre1,ifre2,ig,ij ++ integer fngrp,lngrp ++ real(8) degfre,degrot,dnorm,a1,rtall,rotall,rot,aa,rotinr,bb,rot1 ++ real(8) rsq,det,dettest,aq,bq,cq,dq,eq,fq,gq,hq,rnorm,tol,rotxyz ++ real(8) rotlim,rrr ++ ++ integer, allocatable :: ind(:,:),lstgot(:) ++ real(8), allocatable :: gaxs(:,:),rotmin(:),accum(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ dimension rot(9),aa(9),rotinr(3,3),bb(9),rot1(3,3),fail(5) ++ ++ data fail/0,0,0,0,0/ ++ ++c allocate working arrays ++ ++ allocate (ind(mxgrp,3),lstgot(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) ++ allocate (gaxs(mxungp,9),rotmin(mxungp),stat=fail(4)) ++ allocate (accum(mxungp),stat=fail(5)) ++ do i=1,5 ++ if(fail(i).ne.0)call error(idnode,1790) ++ enddo ++ ++c initialise bookkeeping indices ++ ++ igrp=0 ++ jgrp=0 ++ kgrp=0 ++ isite=0 ++ jr=0 ++ jt=0 ++ safe=.true. ++ degfre=0.d0 ++ degrot=0.d0 ++ ++c rigid body identifier ++ ++ do i=1,natms ++ lstbod(i)=0 ++ enddo ++ ++c number of rigid groups in system ++ ++ ngrp=0 ++ do itmols=1,ntpmls ++ ngrp=ngrp+nummols(itmols)*numgrp(itmols) ++ enddo ++ ++c block indices for groups ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c loop over molecule types ++ ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if(igrp.le.mxgrp)then ++ ++ lstgtp(igrp)=listyp(lgrp+kgrp) ++ id=listyp(lgrp+kgrp) ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2))then ++ ++ jgrp=jgrp+1 ++ ++ do jj=1,numgsit(id) ++ ++ jr=jr+1 ++ jt=jt+1 ++ ++ if(jr.le.mxatms.and.jt.le.mxatms)then ++ ++ lstrgd(jr)=lstgst(id,jj)+isite ++ lstgot(jt)=lstgst(id,jj)+isite ++ lstbod(lstgst(id,jj)+isite)=igrp ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ else ++ ++ do jj=1,numgsit(id) ++ ++ jt=jt+1 ++ if(jt.le.mxatms)then ++ ++ lstgot(jt)=lstgst(id,jj)+isite ++ lstbod(lstgst(id,jj)+isite)=igrp ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,304) ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ kgrp=kgrp+numgrp(itmols) ++ ++ enddo ++ ++ if(ngrp.eq.0)then ++ ++ j=0 ++ do i=1,natms ++ ++ if(lstfrz(i).eq.0)then ++ ++ j=j+1 ++ lstfre(j)=i ++ ++ endif ++ ++ enddo ++ ntfree=j ++ ++ else ++ ++c centre of mass of groups ++c assumes group dimensions are smaller than half box width ++ ++ do i=1,natms ++ lstme(i)=0 ++ enddo ++ ++ do id=1,mxungp ++ gmass(id)=0.d0 ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c working com is first site in group ++ ++ i=lstrgd(jr+1) ++ txx(ig)=xxx(i) ++ tyy(ig)=yyy(i) ++ tzz(ig)=zzz(i) ++ ++ id=lstgtp(ig) ++ safe=.false. ++ if(abs(gmass(id)).lt.1.d-10)safe=.true. ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ xxt(jr)=xxx(i)-txx(ig) ++ yyt(jr)=yyy(i)-tyy(ig) ++ zzt(jr)=zzz(i)-tzz(ig) ++ if(safe)gmass(id)=gmass(id)+weight(i) ++ ++ enddo ++ ++ enddo ++ ++c minimum image from working com ++ ++ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=0.d0 ++ gcmy(ig)=0.d0 ++ gcmz(ig)=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ gcmx(ig)=gcmx(ig)+weight(i)*xxt(jr) ++ gcmy(ig)=gcmy(ig)+weight(i)*yyt(jr) ++ gcmz(ig)=gcmz(ig)+weight(i)*zzt(jr) ++ ++ enddo ++ ++ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) ++ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) ++ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) ++ ++ enddo ++ ++c global communications ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++c make sure all nodes have same copy of gmass ++ ++ if(mxnode.gt.1)then ++ ++ do id=1,mxungp ++ ++ accum(id)=0.d0 ++ if(gmass(id).gt.0.d0)accum(id)=1.d0 ++ ++ enddo ++ ++ call gdsum(gmass(1),mxungp,buffer(1)) ++ call gdsum(accum(1),mxungp,buffer(1)) ++ ++ do id=1,mxungp ++ ++ dnorm=max(1.d0,accum(id)) ++ gmass(id)=gmass(id)/dnorm ++ ++ enddo ++ ++ endif ++ ++c find a group of each type on this node to ++c find principal axis system of the group type ++ ++ do id=1,mxungp ++ ++ jr=0 ++ ij=0 ++ safe=.false. ++ ++ do while(.not.safe.and.ij.lt.ngrp) ++ ++ ij=ij+1 ++ jr=jr+numgsit(lstgtp(ij)) ++ if(lstgtp(ij).eq.id)safe=.true. ++ ++ enddo ++ ++ if(safe)then ++ ++c rotational inertia accumulator ++ ++ do k=1,3 ++ ++ do kk=1,3 ++ ++ rotinr(k,kk)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstgot(jr) ++ ++ xxt(jr)=xxx(i)-gcmx(ij) ++ yyt(jr)=yyy(i)-gcmy(ij) ++ zzt(jr)=zzz(i)-gcmz(ij) ++ ++ call images(imcon,0,1,1,cell,xxt(jr),yyt(jr),zzt(jr)) ++ ++ rotinr(1,1)=rotinr(1,1)+weight(i)*(xxt(jr)**2) ++ rotinr(1,2)=rotinr(1,2)+weight(i)*xxt(jr)*yyt(jr) ++ rotinr(1,3)=rotinr(1,3)+weight(i)*xxt(jr)*zzt(jr) ++ rotinr(2,2)=rotinr(2,2)+weight(i)*(yyt(jr)**2) ++ rotinr(2,3)=rotinr(2,3)+weight(i)*yyt(jr)*zzt(jr) ++ rotinr(3,3)=rotinr(3,3)+weight(i)*(zzt(jr)**2) ++ ++ enddo ++ ++ rotinr(2,1)=rotinr(1,2) ++ rotinr(3,1)=rotinr(1,3) ++ rotinr(3,2)=rotinr(2,3) ++ ++ call jacobi(rotinr,rot1,3) ++ ++ rot(1)=rot1(1,1) ++ rot(4)=rot1(2,1) ++ rot(7)=rot1(3,1) ++ rot(2)=rot1(1,2) ++ rot(5)=rot1(2,2) ++ rot(8)=rot1(3,2) ++ rot(3)=rot1(1,3) ++ rot(6)=rot1(2,3) ++ rot(9)=rot1(3,3) ++ ++c rotational inertia accumulators ++ ++ rotinx(id,1)=0.d0 ++ rotiny(id,1)=0.d0 ++ rotinz(id,1)=0.d0 ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstgot(jr) ++ ++c site positions in principal axis system ++ ++ gxx(id,j)=rot(1)*xxt(jr)+rot(4)*yyt(jr)+rot(7)*zzt(jr) ++ gyy(id,j)=rot(2)*xxt(jr)+rot(5)*yyt(jr)+rot(8)*zzt(jr) ++ gzz(id,j)=rot(3)*xxt(jr)+rot(6)*yyt(jr)+rot(9)*zzt(jr) ++ ++c impose rounding ++ ++ if(abs(gxx(id,j)).lt.1.d-8)gxx(id,j)=0.d0 ++ if(abs(gyy(id,j)).lt.1.d-8)gyy(id,j)=0.d0 ++ if(abs(gzz(id,j)).lt.1.d-8)gzz(id,j)=0.d0 ++ ++c rotational inertia tensor of group type ++ ++ rotinx(id,1)=rotinx(id,1)+ ++ x weight(i)*(gyy(id,j)**2+gzz(id,j)**2) ++ rotiny(id,1)=rotiny(id,1)+ ++ x weight(i)*(gzz(id,j)**2+gxx(id,j)**2) ++ rotinz(id,1)=rotinz(id,1)+ ++ x weight(i)*(gxx(id,j)**2+gyy(id,j)**2) ++ ++ enddo ++ ++c set axis system such that: Ixx >=Iyy >=Izz ++ ++ rotxyz=max(rotinx(id,1),rotiny(id,1),rotinz(id,1)) ++ ++ if(rotxyz.ge.rotinx(id,1))then ++ ++ if(rotiny(id,1).ge.rotxyz)then ++ ++ do j=1,numgsit(id) ++ ++ a1=gxx(id,j) ++ gxx(id,j)=gyy(id,j) ++ gyy(id,j)=-a1 ++ ++ enddo ++ ++ rotiny(id,1)=rotinx(id,1) ++ rotinx(id,1)=rotxyz ++ ++ elseif(rotinz(id,1).ge.rotxyz)then ++ ++ do j=1,numgsit(id) ++ ++ a1=gxx(id,j) ++ gxx(id,j)=gzz(id,j) ++ gzz(id,j)=-a1 ++ ++ enddo ++ ++ rotinz(id,1)=rotinx(id,1) ++ rotinx(id,1)=rotxyz ++ ++ endif ++ ++ endif ++ ++ if(rotinz(id,1).gt.rotiny(id,1))then ++ ++ do j=1,numgsit(id) ++ ++ a1=gyy(id,j) ++ gyy(id,j)=gzz(id,j) ++ gzz(id,j)=-a1 ++ ++ enddo ++ ++ a1=rotinz(id,1) ++ rotinz(id,1)=rotiny(id,1) ++ rotiny(id,1)=a1 ++ ++ endif ++ ++c set up principal axis system in terms of site positions ++ ++c test for (near) linear unit ++ ++ ill=0 ++ rtall=(rotinx(id,1)+rotiny(id,1)+rotinz(id,1)) ++ ++ if(rtall.gt.1.d-5)then ++ rotall=rtall ++ else ++ rotall=1.d0 ++ endif ++ ++ rotmin(id)=min(rotinx(id,1),rotiny(id,1)) ++ rotmin(id)=min(rotmin(id),rotinz(id,1))/rotall ++ ++ if((rotinx(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ if((rotiny(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ if((rotinz(id,1)/rotall).lt.1.d-5)ill=ill+1 ++ ++ if(ill.ge.2)then ++ ++c point particle only ++ ++ ind(id,1)=1 ++ ind(id,2)=1 ++ ind(id,3)=1 ++ ++ do jj=1,9 ++ gaxs(id,jj)=0.d0 ++ enddo ++ ++ elseif(ill.eq.1)then ++ ++c linear molecule ++ ++ ind(id,1)=1 ++ ind(id,2)=2 ++ ind(id,3)=1 ++ ++ aa(1)=gxx(id,1)-gxx(id,2) ++ aa(4)=gyy(id,1)-gyy(id,2) ++ aa(7)=gzz(id,1)-gzz(id,2) ++ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) ++ ++ if(abs(aa(7)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(7)**2) ++ aa(2)=0.d0 ++ aa(5)=aa(7)/rsq ++ aa(8)=-aa(4)/rsq ++ ++ elseif(abs(aa(4)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(1)**2) ++ aa(2)=-aa(4)/rsq ++ aa(5)=aa(1)/rsq ++ aa(8)=0.d0 ++ ++ elseif(abs(aa(1)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(1)**2+aa(7)**2) ++ aa(2)=-aa(7)/rsq ++ aa(5)=0.d0 ++ aa(8)=aa(1)/rsq ++ ++ endif ++ ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++ call invert(aa,bb,det) ++ ++ if(abs(det).lt.1.d-5)call error(idnode,306) ++ ++ do j=1,9 ++ gaxs(id,j)=bb(j) ++ enddo ++ ++ elseif(ill.eq.0)then ++ ++c non-linear molecule ++ ++ i1=1 ++ i2=1 ++ i3=1 ++ pass1=.true. ++ dettest=1.d-1 ++ ++ do while(pass1.and.i2.lt.numgsit(id)-1) ++ ++ i2=i2+1 ++ i3=i2 ++ pass2=.true. ++ ++ do while(pass2.and.i3.lt.numgsit(id)) ++ ++ i3=i3+1 ++ ++ aa(1)=gxx(id,i1)-gxx(id,i2) ++ aa(4)=gyy(id,i1)-gyy(id,i2) ++ aa(7)=gzz(id,i1)-gzz(id,i2) ++ aa(2)=gxx(id,i1)-gxx(id,i3) ++ aa(5)=gyy(id,i1)-gyy(id,i3) ++ aa(8)=gzz(id,i1)-gzz(id,i3) ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++c invert matrix ++ ++ call invert(aa,bb,det) ++ ++c check on size of determinant - to see if the 3 sites are ++c too close to being linear for safety. ++ ++ pass2=abs(det).lt.dettest ++ ++ enddo ++ ++ pass1=abs(det).lt.dettest ++ ++ enddo ++ ++ if(abs(det).lt.dettest)call error(idnode,306) ++ ++c store indices used ++ ++ ind(id,1)=i1 ++ ind(id,2)=i2 ++ ind(id,3)=i3 ++ ++c store coefficients ++ ++ do j=1,9 ++ ++ gaxs(id,j)=bb(j) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c check that rigid unit does not contain frozen atoms ++ ++ safe=.true. ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ if(lstfrz(i).ne.0)safe=.false. ++ ++ enddo ++ ++ enddo ++ ++c global check on error condition ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,360) ++ ++c quaternions for all rigid groups in system ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ i1=lstrgd(jr+ind(id,1)) ++ i2=lstrgd(jr+ind(id,2)) ++ i3=lstrgd(jr+ind(id,3)) ++ ++ jr=jr+numgsit(id) ++ ++c group basis vectors ++ ++ aa(1)=xxx(i1)-xxx(i2) ++ aa(4)=yyy(i1)-yyy(i2) ++ aa(7)=zzz(i1)-zzz(i2) ++ ++ call images(imcon,0,1,1,cell,aa(1),aa(4),aa(7)) ++ ++ if(rotmin(id).gt.1.d-5)then ++ ++ aa(2)=xxx(i1)-xxx(i3) ++ aa(5)=yyy(i1)-yyy(i3) ++ aa(8)=zzz(i1)-zzz(i3) ++ ++ else ++ ++ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) ++ ++ if(abs(aa(7)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(7)**2) ++ aa(2)=0.d0 ++ aa(5)=aa(7)/rsq ++ aa(8)=-aa(4)/rsq ++ ++ elseif(abs(aa(4)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(4)**2+aa(1)**2) ++ aa(2)=-aa(4)/rsq ++ aa(5)=aa(1)/rsq ++ aa(8)=0.d0 ++ ++ elseif(abs(aa(1)/rsq).gt.0.5d0)then ++ ++ rsq=sqrt(aa(1)**2+aa(7)**2) ++ aa(2)=-aa(7)/rsq ++ aa(5)=0.d0 ++ aa(8)=aa(1)/rsq ++ ++ endif ++ ++ endif ++ ++ call images(imcon,0,1,1,cell,aa(2),aa(5),aa(8)) ++ ++ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) ++ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) ++ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) ++ ++c group rotational matrix ++ ++ rot(1)=gaxs(id,1)*aa(1)+gaxs(id,4)*aa(2)+gaxs(id,7)*aa(3) ++ rot(2)=gaxs(id,2)*aa(1)+gaxs(id,5)*aa(2)+gaxs(id,8)*aa(3) ++ rot(3)=gaxs(id,3)*aa(1)+gaxs(id,6)*aa(2)+gaxs(id,9)*aa(3) ++ rot(4)=gaxs(id,1)*aa(4)+gaxs(id,4)*aa(5)+gaxs(id,7)*aa(6) ++ rot(5)=gaxs(id,2)*aa(4)+gaxs(id,5)*aa(5)+gaxs(id,8)*aa(6) ++ rot(6)=gaxs(id,3)*aa(4)+gaxs(id,6)*aa(5)+gaxs(id,9)*aa(6) ++ rot(7)=gaxs(id,1)*aa(7)+gaxs(id,4)*aa(8)+gaxs(id,7)*aa(9) ++ rot(8)=gaxs(id,2)*aa(7)+gaxs(id,5)*aa(8)+gaxs(id,8)*aa(9) ++ rot(9)=gaxs(id,3)*aa(7)+gaxs(id,6)*aa(8)+gaxs(id,9)*aa(9) ++ ++c determine quaternions from rotational matrix ++ ++ aq=rot(1)+rot(5) ++ bq=rot(2)-rot(4) ++ cq=rot(6)-rot(8) ++ dq=rot(2)+rot(4) ++ eq=rot(3)+rot(7) ++ fq=rot(6)+rot(8) ++ gq=rot(3)-rot(7) ++ hq=rot(1)-rot(5) ++ ++ q0(ig)=0.5d0*sqrt(aq+sqrt(aq*aq+bq*bq)) ++ ++ if(q0(ig).gt.1.d-4)then ++ ++ q1(ig)=-0.25d0*cq/q0(ig) ++ q2(ig)=0.25d0*gq/q0(ig) ++ q3(ig)=-0.25d0*bq/q0(ig) ++ ++ else ++ ++ q1(ig)=0.5d0*sqrt(hq+sqrt(hq*hq+dq*dq)) ++ ++ if(q1(ig).gt.1.d-4)then ++ ++ q2(ig)=0.25d0*dq/q1(ig) ++ q3(ig)=0.25d0*eq/q1(ig) ++ ++ else ++ ++ q2(ig)=0.5d0*sqrt(-hq+sqrt(hq*hq+dq*dq)) ++ ++ if(q2(ig).gt.1.d-4)then ++ ++ q3(ig)=0.25d0*fq/q2(ig) ++ ++ else ++ ++ q3(ig)=1.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c normalise quaternions ++ ++ rnorm=1.d0/sqrt(q0(ig)**2+q1(ig)**2+q2(ig)**2+q3(ig)**2) ++ q0(ig)=rnorm*q0(ig) ++ q1(ig)=rnorm*q1(ig) ++ q2(ig)=rnorm*q2(ig) ++ q3(ig)=rnorm*q3(ig) ++ ++ enddo ++ ++c test for redundant degrees of freedom ++c and ensure rotational inertias are non-zero ++ ++ degrot=0.d0 ++ ++ if(lsolva)then ++ degrot_sol(:)=0.d0 ++ endif ++ ++ do ig=1,ngrp ++ ++ id=lstgtp(ig) ++ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1)) ++ ++ if(rotall*rotinx(id,1).lt.1.d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ if(rotall*rotiny(id,1).lt.1.d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ if(rotall*rotinz(id,1).lt.1d-5)then ++ degrot=degrot-1.d0 ++ endif ++ ++ enddo ++ ++c rotational degrees of freedom and rigid body contribution ++c to total degrees of freedom ++ ++ degrot=degrot+dble(ngrp)*3.d0 ++ degfre=degrot+dble(ngrp)*3.d0 ++ ++ if(lsolva)then ++ ++ fngrp=1 ++ lngrp=0 ++ ++ do itmols=1,mxtmls ++ ++ lngrp=lngrp+nummols(itmols)*numgrp(itmols) ++ ++ do ig=fngrp,lngrp ++ ++ id=lstgtp(ig) ++ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1)) ++ ++ if(rotall*rotinx(id,1).lt.1.d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ if(rotall*rotiny(id,1).lt.1.d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ if(rotall*rotinz(id,1).lt.1d-5)then ++ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 ++ endif ++ ++ enddo ++ ++ fngrp=lngrp+1 ++ ++ enddo ++ ++ endif ++ ++c summarise results ++ ++ if(idnode.eq.0)then ++ ++ if(gmass(1).gt.0.d0)then ++ ++ write(nrite,'(/,/,12x,a)')' summary of rigid body set up' ++ ++ do id=1,mxungp ++ ++ if(gmass(id).gt.0.d0)then ++ ++ write(nrite,'(/,a,i10)')' group of type ',id ++ write(nrite,'(12x,a,f20.10)')' total mass ', ++ x gmass(id) ++ write(nrite,'(12x,a,3f20.10)')' rot. inertia ', ++ x rotinx(id,1),rotiny(id,1),rotinz(id,1) ++ write(nrite,'(/,12x,a,3(8x,a7))')' site','a coord', ++ x 'b coord','c coord' ++ do j=1,numgsit(id) ++ write(nrite,'(12x,i5,1p,3e15.5)')j,gxx(id,j), ++ x gyy(id,j),gzz(id,j) ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c find number of unique groups ++ ++ ngp=0 ++ do ig=1,ngrp ++ ngp=max(ngp,lstgtp(ig)) ++ enddo ++ ++c calculate reciprocal of rotational inertias ++ ++ do id=1,ngp ++ ++ rotlim=max(1.d-2,rotinx(id,1)+rotiny(id,1)+ ++ x rotinz(id,1))*1.d-5 ++ ++ if(rotinx(id,1).lt.rotlim)then ++ rotinx(id,2)=0.d0 ++ else ++ rotinx(id,2)=1.d0/rotinx(id,1) ++ endif ++ ++ if(rotiny(id,1).lt.rotlim)then ++ rotiny(id,2)=0.d0 ++ else ++ rotiny(id,2)=1.d0/rotiny(id,1) ++ endif ++ ++ if(rotinz(id,1).lt.rotlim)then ++ rotinz(id,2)=0.d0 ++ else ++ rotinz(id,2)=1.d0/rotinz(id,1) ++ endif ++ ++ enddo ++ ++c Check of quaternion set up with atomic positions ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c group type ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 ++ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) ++ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) ++ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) ++ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 ++ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) ++ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) ++ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) ++ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxt(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyt(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzt(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ ++ txx(jr)=xxx(i)-xxt(i) ++ tyy(jr)=yyy(i)-yyt(i) ++ tzz(jr)=zzz(i)-zzt(i) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,jr,cell,txx,tyy,tzz) ++ ++c set tolerance for testing quaternion setup. ++ ++ rsq=0.d0 ++ tol=1.d-2 ++ ++ do i=1,jr ++ ++ rrr=txx(i)**2+tyy(i)**2+tzz(i)**2 ++ if(rrr.gt.tol)then ++ ++ rsq=rrr ++ ++ endif ++ ++ enddo ++ ++c exit if error in set up ++ ++ safe=.true. ++ if(rsq.gt.tol)safe=.false. ++ if(mxnode.gt.1)call gstate(safe) ++ ++ if(.not.safe)call error(idnode,310) ++ ++c sort lstgot into ascending order ++ ++ call shellsort(jt,lstgot) ++ ++c check that no site is in more than 1 rigid group ++ ++ i=1 ++ safe=.true. ++ do while(i.lt.jt) ++ ++ i=i+1 ++ linear=.true. ++ do while(linear) ++ ++ linear=.false. ++ ++ if(lstgot(i).eq.lstgot(i-1))then ++ ++ linear=.true. ++ safe=.false. ++ jt=jt-1 ++ ++ do j=i,jt ++ lstgot(j)=lstgot(j+1) ++ enddo ++ ++ endif ++ ++ if(i.ge.jt)linear=.false. ++ ++ enddo ++ ++ enddo ++ ++ if(.not.safe)call error(idnode,320) ++ ++c list of 'free' sites ++ ++ ii=1 ++ jj=0 ++ do i=1,natms ++ ++ if(lstgot(ii).eq.i)then ++ ++ ii=ii+1 ++ ++ else ++ ++ if(lstfrz(i).eq.0)then ++ jj=jj+1 ++ lstfre(jj)=i ++ endif ++ ++ endif ++ ++ enddo ++ ++c number of free sites ++ ++ ntfree=jj ++ ++c list of atoms integrated on this node ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ jr=jr+numgsit(id) ++ ++ enddo ++ ++ do i=1,jr ++ lstme(i)=lstrgd(i) ++ enddo ++ ++c block parameters for free atoms ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++ do i=ifre1,ifre2 ++ ++ jr=jr+1 ++ lstme(jr)=lstfre(i) ++ ++ enddo ++ ++c exchange quaternion data with other nodes ++ ++ if(mxnode.gt.1)call merge4 ++ x (idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++ if(lsolva)lstgot_sol(:)=lstgot(:) ++ ++c deallocate work arrays ++ ++ deallocate (ind,lstgot,stat=fail(1)) ++ deallocate (txx,tyy,tzz,stat=fail(2)) ++ deallocate (xxt,yyt,zzt,stat=fail(3)) ++ deallocate (gaxs,rotmin,stat=fail(4)) ++ deallocate (accum,stat=fail(5)) ++ ++ return ++ end subroutine quatbook ++ ++ subroutine abort_field_read(kode,idnode,nfield) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting FIELD file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nfield ++ ++ if(idnode.eq.0)close (nfield) ++ ++ if(kode.eq.1)then ++ ++c end of field file error exit ++ ++ call error(idnode,52) ++ ++ elseif(kode.eq.2)then ++ ++c unrecognised directive in field file ++ ++ call error(idnode,4) ++ ++ endif ++ ++ return ++ end subroutine abort_field_read ++ ++ subroutine abort_control_read(kode,idnode,nread) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting CONTROL file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nread ++ ++ if(idnode.eq.0)close (nread) ++ ++ if(kode.eq.1)then ++ ++c end of control file error exit ++ ++ call error(idnode,53) ++ ++ elseif(kode.eq.2)then ++ ++c general error exit from field file processing ++ ++ call error(idnode,0) ++ ++ endif ++ ++ return ++ end subroutine abort_control_read ++ ++ subroutine abort_config_read(kode,idnode,nconf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for aborting CONTROL file read ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer kode,idnode,nconf ++ ++ if(idnode.eq.0)close (nconf) ++ ++ if(kode.eq.1)then ++ ++c general error exit from field file processing ++ ++ call error(idnode,54) ++ ++ elseif(kode.eq.2)then ++ ++c end of config file error exit ++ ++ call error(idnode,55) ++ ++ endif ++ ++ return ++ end subroutine abort_config_read ++ ++ subroutine neutbook(lneut,idnode,natms,nneut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for neutral group bookkeeping ++c ++c copyright - daresbury laboratory ++c author - w. smith nov 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lneut,safe ++ integer idnode,natms,nneut,i ++ ++ safe=.true. ++ ++c neutral group bookkeeping: sites must be listed consecutively ++ ++ if(lneut)then ++ ++ if(lstneu(1).ne.1)call error(idnode,230) ++ ++ neulst(1)=1 ++ nneut=1 ++ ++ do i=2,natms ++ ++ safe=.false. ++ if(lstneu(i).eq.lstneu(i-1))safe=.true. ++ if(lstneu(i).eq.lstneu(i-1)+1)then ++ ++ safe=.true. ++ nneut=nneut+1 ++ if(nneut.gt.mxneut)call error(idnode,220) ++ neulst(nneut)=i ++ ++ endif ++ ++ if(.not.safe)call error(idnode,230) ++ ++ enddo ++ ++ neulst(nneut+1)=natms+1 ++ ++ endif ++ ++ return ++ ++ end subroutine neutbook ++ ++ subroutine intlist ++ x (lshmov,lcnb,idnode,mxnode,natms,nscons,ntangl,ntbond, ++ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the interaction lists ++c for the entire simulated system ++c ++c parallel replicated dat version : block data ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith july 1992 ++c amended - t.forester oct 1993 ++c amended - t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,safe1,lcnb,lchk,lfail ++ integer idnode,mxnode,natms,nscons,ntangl,ntbond,ntcons ++ integer ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf ++ integer ibonds,jbonds,kbonds,ipmf,jpmf,iangle,jangle,kangle ++ integer idihed,jdihed,kdihed,iinver,jinver,kinver,iteths ++ integer jteths,kteths,ishels,jshels,kshels,ntbon0,ntpmf0 ++ integer ntang0,ntdih0,ntinv0,nttet0,ntshl0,ntcon0,idum ++ integer itmols,isite,iconst,jconst,kconst,ibnd1,ibnd2,ipmf1 ++ integer ipmf2,iang1,iang2,idih1,idih2,iinv1,iinv2,itet1 ++ integer itet2,ishl1,ishl2,imols,lbonds,lpmf,jj,nnn,langle ++ integer ldihed,linver,lteths,lshels,i,ii,ntmp,klo,khi,ngrp ++ integer klo0,ifail,iloop,nnode,nscons0,nscons1,icon,fail ++ integer kcons,id,jdnode,lconst,itry,iatom,jatom,j,nfail ++ real(8) tol ++ ++ integer, allocatable :: itest(:),index(:),kscons(:) ++ integer, allocatable :: msite(:),mconst(:),listin(:) ++ ++ dimension fail(4) ++ ++ data fail/0,0,0,0/ ++ ++c allocate work arrays ++ ++ allocate (itest(mxtmls),index(mxtmls),stat=fail(1)) ++ allocate (msite(mxtmls),mconst(mxtmls),stat=fail(2)) ++ allocate (listin(mxatms),stat=fail(3)) ++ allocate (kscons(0:mxproc-1),stat=fail(4)) ++ do i=1,4 ++ if(fail(i).ne.0)call error(idnode,1800) ++ enddo ++ ++c initialise bookkeeping indices ++ ++ ibonds=0 ++ jbonds=0 ++ kbonds=0 ++ ipmf=0 ++ jpmf=0 ++ iangle=0 ++ jangle=0 ++ kangle=0 ++ idihed=0 ++ jdihed=0 ++ kdihed=0 ++ iinver=0 ++ jinver=0 ++ kinver=0 ++ iteths=0 ++ jteths=0 ++ kteths=0 ++ ishels=0 ++ jshels=0 ++ kshels=0 ++ safe=.true. ++ safe1=.true. ++ ++c find total number of bonds,pmf constraints,bond constraints, ++c angles,dihedrals,inversions, tethers,core-shells, in system ++c - ignoring frozen atoms ++ ++ ntbon0=0 ++ ntpmf0=0 ++ ntcon0=0 ++ ntang0=0 ++ ntdih0=0 ++ ntinv0=0 ++ nttet0=0 ++ ntshl0=0 ++ nscons=0 ++ ntcons=0 ++ ++ do itmols=1,ntpmls ++ ++ ntbon0=ntbon0+nummols(itmols)*numbonds(itmols) ++ ntpmf0=ntpmf0+nummols(itmols)*numpmf(itmols) ++ ntcon0=ntcon0+nummols(itmols)*numcon(itmols) ++ ntang0=ntang0+nummols(itmols)*numang(itmols) ++ ntdih0=ntdih0+nummols(itmols)*numdih(itmols) ++ ntinv0=ntinv0+nummols(itmols)*numinv(itmols) ++ nttet0=nttet0+nummols(itmols)*numteth(itmols) ++ ntshl0=ntshl0+nummols(itmols)*numshl(itmols) ++ ++ enddo ++ ++ isite=0 ++ iconst=0 ++ jconst=0 ++ kconst=0 ++ ++c first and last index of bonds, angles etc for this node ++ ++ ibnd1=(idnode*ntbon0)/mxnode+1 ++ ibnd2=((idnode+1)*ntbon0)/mxnode ++ ++ ipmf1=(idnode*ntpmf0)/mxnode+1 ++ ipmf2=((idnode+1)*ntpmf0)/mxnode ++ ntpmf=ntpmf0 ++ nspmf=ipmf2+1-ipmf1 ++ ++ iang1=(idnode*ntang0)/mxnode+1 ++ iang2=((idnode+1)*ntang0)/mxnode ++ ++ idih1=(idnode*ntdih0)/mxnode+1 ++ idih2=((idnode+1)*ntdih0)/mxnode ++ ++ iinv1=(idnode*ntinv0)/mxnode+1 ++ iinv2=((idnode+1)*ntinv0)/mxnode ++ ++ itet1=(idnode*nttet0)/mxnode+1 ++ itet2=((idnode+1)*nttet0)/mxnode ++ ++ ishl1=(idnode*ntshl0)/mxnode+1 ++ ishl2=((idnode+1)*ntshl0)/mxnode ++ ++c loop over molecule types ++ ++ do itmols=1,ntpmls ++ ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct bond constraint list later ++c construct chemical bond interaction list ++ ++ do lbonds=1,numbonds(itmols) ++ ++ ibonds=ibonds+1 ++ ++ if(ibonds.ge.ibnd1.and.ibonds.le.ibnd2)then ++ ++ jbonds=jbonds+1 ++ if(jbonds.le.mxbond)then ++ ++ listbnd(jbonds,1)=lbonds+kbonds ++ listbnd(jbonds,2)=lstbnd(lbonds+kbonds,1) ++ x +isite ++ listbnd(jbonds,3)=lstbnd(lbonds+kbonds,2) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,31) ++ ++c construct pmf site lists - no exclusions ++ ++ do lpmf=1,numpmf(itmols) ++ ++ ipmf=ipmf+1 ++ ++ if(ipmf.ge.ipmf1.and.ipmf.le.ipmf2)then ++ ++ jpmf=jpmf+1 ++ if(jpmf.le.mspmf)then ++ ++ nnn=npmf(1)+npmf(2) ++ if(nnn.le.mxspmf)then ++ ++ do jj=1,npmf(1)+npmf(2) ++ lstpmf(jj,jpmf)=indpmf(jj)+isite ++ enddo ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ else ++ ++ safe1=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe1) ++ if(.not.safe1)call error(idnode,458) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,460) ++ ++c construct valence angle interaction list ++ ++ do langle=1,numang(itmols) ++ ++ iangle=iangle+1 ++ ++ if(iangle.ge.iang1.and.iangle.le.iang2)then ++ ++ jangle=jangle+1 ++ if(jangle.le.mxangl)then ++ ++ listang(jangle,1)=langle+kangle ++ listang(jangle,2)=lstang(langle+kangle,1) ++ x +isite ++ listang(jangle,3)=lstang(langle+kangle,2) ++ x +isite ++ listang(jangle,4)=lstang(langle+kangle,3) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,51) ++ ++c construct dihedral angle interaction list ++ ++ do ldihed=1,numdih(itmols) ++ ++ idihed=idihed+1 ++ ++ if(idihed.ge.idih1.and.idihed.le.idih2)then ++ ++ jdihed=jdihed+1 ++ if(jdihed.le.mxdihd)then ++ ++ listdih(jdihed,1)=ldihed+kdihed ++ listdih(jdihed,2)=lstdih(ldihed+kdihed,1) ++ x +isite ++ listdih(jdihed,3)=lstdih(ldihed+kdihed,2) ++ x +isite ++ listdih(jdihed,4)=lstdih(ldihed+kdihed,3) ++ x +isite ++ listdih(jdihed,5)=lstdih(ldihed+kdihed,4) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,61) ++ ++c construct inversion potential list ++ ++ do linver=1,numinv(itmols) ++ ++ iinver=iinver+1 ++ ++ if(iinver.ge.iinv1.and.iinver.le.iinv2)then ++ ++ jinver=jinver+1 ++ if(jinver.le.mxinv)then ++ ++ listinv(jinver,1)=linver+kinver ++ listinv(jinver,2)=lstinv(linver+kinver,1) ++ x +isite ++ listinv(jinver,3)=lstinv(linver+kinver,2) ++ x +isite ++ listinv(jinver,4)=lstinv(linver+kinver,3) ++ x +isite ++ listinv(jinver,5)=lstinv(linver+kinver,4) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,77) ++ ++c construct tethered atoms interaction list ++ ++ do lteths=1,numteth(itmols) ++ ++ iteths=iteths+1 ++ ++ if(iteths.ge.itet1.and.iteths.le.itet2)then ++ ++ jteths=jteths+1 ++ if(jteths.le.msteth)then ++ ++ listtet(jteths,1)=lteths+kteths ++ listtet(jteths,2)=lsttet(lteths+kteths)+isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,63) ++ ++c construct core-shell list ++ ++ do lshels=1,numshl(itmols) ++ ++ ishels=ishels+1 ++ ++ if(ishels.ge.ishl1.and.ishels.le.ishl2)then ++ ++ jshels=jshels+1 ++ if(jshels.le.mxshl)then ++ ++ listshl(jshels,1)=lshels+kshels ++ listshl(jshels,2)=lstshl(lshels+kshels,1) ++ x +isite ++ listshl(jshels,3)=lstshl(lshels+kshels,2) ++ x +isite ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,59) ++ ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ kbonds=kbonds+numbonds(itmols) ++ kangle=kangle+numang(itmols) ++ kdihed=kdihed+numdih(itmols) ++ kinver=kinver+numinv(itmols) ++ kteths=kteths+numteth(itmols) ++ kshels=kshels+numshl(itmols) ++ ++ enddo ++ ++c store array counters for bookkeeping ++ ++ ntbond=ibonds ++ ntangl=iangle ++ ntdihd=idihed ++ ntinv=iinver ++ ntteth=iteths ++ ntshl=ishels ++ ++c pass bond constraint information to other nodes ++ ++ if(ntcon0.gt.0)then ++ ++ ntcons=ntcon0 ++ ++c find starting site no. and constraint no. for each molec. type ++ ++ msite(1)=0 ++ mconst(1)=0 ++ ++ do itmols=2,ntpmls ++ ++ msite(itmols)=msite(itmols-1)+numsit(itmols-1)* ++ x nummols(itmols-1) ++ mconst(itmols)=mconst(itmols-1)+numcon(itmols-1) ++ ++ enddo ++ ++c sort molecules into ascending order of number of constraints ++ ++ do i=1,ntpmls ++ ++ itest(i)=numcon(i) ++ index(i)=0 ++ ++ enddo ++ ++ call shellsort(ntpmls,itest) ++ ++ do i=1,ntpmls ++ ++ lchk=.true. ++ do j=1,ntpmls ++ ++ if(itest(i).eq.numcon(j))then ++ ++ if(lchk)then ++ index(i)=j ++ lchk=.false. ++ ++ endif ++ ++ do ii=1,i-1 ++ if(index(ii).eq.j)lchk=.true. ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c load balance to within 10% ++ ++ tol=1.0d0+(0.10d0)/2.d0 ++ kcons=(ntcons)/mxnode ++ ntmp=0 ++ ++c find smallest constrained molecule to allocate to a node ++ ++ do i=1,ntpmls ++ ++ if(ntmp.le.mxnode)then ++ ++ if(numcon(index(i)).gt.0)then ++ ntmp=ntmp+nummols(index(i)) ++ klo=max(0,kcons-numcon(index(i))/2) ++ khi=klo+numcon(index(i))+1 ++ endif ++ ++ endif ++ ++ enddo ++ ++c reset hi/lo limits if molecules contain too many constraints ++ ++ if(dble(khi)/dble(max(1,klo)).gt.tol)then ++ klo=nint(dble(kcons)/tol) ++ khi=nint(dble(kcons)*tol)+1 ++ endif ++ ++c store lo value for later ++ ++ klo0=klo ++ ++c begin assignment of constraints ---------------------------------- ++ ++ ifail=-1 ++ lfail=.true. ++ do while(lfail) ++ ++ ifail=ifail+1 ++ ++ if(ifail.gt.ntpmls)then ++ call error(idnode,432) ++ endif ++ ++ iconst=0 ++ jconst=0 ++ kconst=0 ++ lconst=0 ++ ++c zero running totals of constraints on each processor ++ ++ do id=0,mxnode-1 ++ kscons(id)=0 ++ enddo ++ ++ iloop=0 ++ lfail=.false. ++ iconst=0 ++ jconst=0 ++ nnode=0 ++ ++c assign difficult molecules in blocks ++ ++ if(ifail.gt.0)then ++ ++ nfail=0 ++ do i=1,ifail ++ ++ ii=ntpmls+1-i ++ nfail=nfail+nummols(index(ii))*numcon(index(ii)) ++ ++ enddo ++ ++c decide on number of processors to split over ++ ++ nnode=int(dble(nfail)/dble(max(kcons,1))+1.d0/tol) ++ nnode=max(2,nnode) ++ nnode=min(nnode,mxnode) ++ ++c assign to processors 0..nnode-1 ++ ++ do id=0,nnode-1 ++ ++ nscons0=(id*nfail)/nnode+1 ++ nscons1=((id+1)*nfail)/nnode ++ ++ kscons(id)=nscons1+1-nscons0 ++ ++ enddo ++ ++c this processors block ++ ++ nscons0=(idnode*nfail)/nnode+1 ++ nscons1=((idnode+1)*nfail)/nnode ++ ++c assign in blocks ++ ++ do itmols=ntpmls,ntpmls-ifail+1,-1 ++ ++ ii=index(itmols) ++ icon=numcon(ii) ++ kconst=mconst(ii) ++ ++ do imols=1,nummols(ii) ++ ++ isite=msite(ii)+(imols-1)*numsit(ii) ++ ++c construct bond constraint list ++ ++ do lconst=1,numcon(ii) ++ ++ iconst=iconst+1 ++ ++ if(iconst.ge.nscons0.and.iconst.le.nscons1)then ++ ++ jconst=jconst+1 ++ ++ if(jconst.le.mxcons)then ++ ++ listcon(jconst,1)=lconst+kconst ++ iatom=lstcon(lconst+kconst,1)+isite ++ jatom=lstcon(lconst+kconst,2)+isite ++ ++ listcon(jconst,2)=iatom ++ listcon(jconst,3)=jatom ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c assign non-problematic molecules ++ ++ jdnode=mod(nnode+1,mxnode) ++ ++ do itmols=ntpmls-ifail,1,-1 ++ ++ ii=index(itmols) ++ icon=numcon(ii) ++ kconst=mconst(ii) ++ ++ do imols=1,nummols(ii) ++ ++ itry=0 ++ lchk=.true. ++ do while(lchk) ++ ++ if(kscons(jdnode)+icon.le.klo)then ++ ++ if(jdnode.ne.idnode)then ++ kscons(jdnode)=kscons(jdnode)+icon ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.false. ++ else ++ ++c construct bond constraint list ++ ++ isite=msite(ii)+(imols-1)*numsit(ii) ++ do lconst=1,numcon(ii) ++ ++ jconst=jconst+1 ++ ++ if(jconst.le.mxcons)then ++ ++ listcon(jconst,1)=lconst+kconst ++ iatom=lstcon(lconst+kconst,1)+isite ++ jatom=lstcon(lconst+kconst,2)+isite ++ listcon(jconst,2)=iatom ++ listcon(jconst,3)=jatom ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ kscons(jdnode)=kscons(jdnode)+icon ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.false. ++ ++ endif ++ ++ else ++ ++ jdnode=mod(jdnode+1,mxnode) ++ lchk=.true. ++ itry=itry+1 ++ ++ endif ++ ++ if(lchk.and.itry.gt.mxnode)then ++ ++ klo=kcons ++ kcons=khi ++ itry=0 ++ iloop=iloop+1 ++ ++ endif ++ ++c split molecule across nodes if have to ++ ++ if(iloop.gt.3)then ++ lfail=.true. ++ kcons=ntcons/mxnode ++ klo=klo0 ++ lchk=.false. ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c check no node has less than minimum number ++ ++ do id=0,mxnode-1 ++ if(kscons(id).lt.klo0)then ++ lfail=.true. ++ endif ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)then ++ ++ if(mxnode.gt.1)call gimax(jconst,1,idum) ++ if(idnode.eq.0)write(nrite,'(a,i10,a,i10)') ++ x 'Number of constraints found ',jconst,'Max allowed ',mxcons ++ ++ call error(idnode,41) ++ ++ endif ++ ++ nscons=kscons(idnode) ++ ++ call passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++ endif ++ ++ if(npmf(1).gt.0)then ++ ++ call passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++ endif ++ ++c pass rigid body data ++ ++ lcnb=.false. ++ if(ntcons.gt.0.and.ngrp.gt.0)then ++ ++ call passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp, ++ x numgsit) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(itest,index,msite,stat=fail(1)) ++ deallocate(mconst,kscons,listin,stat=fail(2)) ++ ++ return ++ end subroutine intlist ++ ++ subroutine ensemble_selection ++ x (directive,lens,kill,idnode,keyens,mode,taut,taup) ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the ensemble and reading ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical kill,lens ++ integer keyens,idnode,idum,mode ++ real(8) taut,taup ++ ++ if(findstring('nve',directive,idum))then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'microcanonical ensemble')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('nvt',directive,idum))then ++ ++ if(findstring('evans',directive,idum))then ++ ++ keyens=1 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Evans Gaussian temperature constraints', ++ x ' in use')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('ber',directive,idum))then ++ ++ keyens=2 ++ taut=dblstr(directive,69,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen thermostat', ++ x /,1x,'thermostat relaxation time ',1p,e12.4)") ++ x taut ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=3 ++ taut=dblstr(directive,69,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4)") ++ x taut ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ elseif(findstring('npt',directive,idum))then ++ ++ if(findstring('ber',directive,idum))then ++ ++ keyens=4 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen isotropic N-P-T', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=5 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover (Melchionna) isotropic N-P-T ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ elseif(findstring('nst',directive,idum))then ++ ++ mode=0 ++ if(findstring('block',directive,idum))mode=1 ++ if(findstring('surf',directive,idum))mode=2 ++ if(findstring('slab',directive,idum))mode=3 ++ ++ if(findstring('ber',directive,idum))then ++ ++ keyens=6 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Berendsen anisotropic N-P-T', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ elseif(findstring('hoover',directive,idum))then ++ ++ keyens=7 ++ taut=dblstr(directive,lenrec,idum) ++ taup=dblstr(directive,lenrec,idum) ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Nose-Hoover (Melchionna) anisotropic N-P-T ', ++ x /,1x,'thermostat relaxation time ',1p,e12.4, ++ x /,1x,'barostat relaxation time ',1p,e12.4)") ++ x taut,taup ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ kill=.true. ++ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record ++ call error(idnode,-3) ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ if(mode.eq.0)then ++ write(nrite,"(/,1x,'NST mode 0 X<>Y<>Z')") ++ elseif(mode.eq.1)then ++ write(nrite, ++ x "(/,1x,'NST mode 1 X<>Y<>Z (rectangular block)')") ++ elseif(mode.eq.2)then ++ write(nrite, ++ x "(/,1x,'NST mode 2 X=Y<>Z (liquid surface)')") ++ elseif(mode.eq.3)then ++ write(nrite, ++ x "(/,1x,'NST mode 3 X<>Y<>Z (solid slab)')") ++ endif ++ ++ endif ++ ++ elseif(findstring('pmf',directive,idum))then ++ ++ keyens=8 ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'potential of mean force calculation (NVE)')") ++ if(lens)then ++ call error(idnode,-414) ++ kill=.true. ++ endif ++ lens=.true. ++ ++ else ++ ++ call error(idnode,-436) ++ kill=.true. ++ ++ endif ++ ++ return ++ end subroutine ensemble_selection ++ ++ subroutine neb_option ++ x (directive,lneb,lminopt,idnode,numneb,keytol,sprneb, ++ x opttol,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for NEB option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit ++ character*1 directive(lenrec) ++ logical lneb,lminopt,endneb,safe ++ integer numneb,idnode,keytol,i,idum ++ real(8) sprneb,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ lminopt=.true. ++ lneb=.true. ++ endneb=.false. ++ numneb=intstr(directive,lenrec,idum) ++ if(numneb.eq.0)numneb=1 ++ numneb=min(maxneb,numneb) ++ ++ hyp_units=1.d0 ++ do while(.not.endneb) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endneb',directive,idum))then ++ endneb=.true. ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('basin_1',directive,idum))then ++ call striptext(directive,lenrec,1) ++ do i=1,numneb ++ bsn_1(i)=intstr(directive,lenrec,idum) ++ enddo ++ elseif(findstring('basin_2',directive,idum))then ++ call striptext(directive,lenrec,1) ++ do i=1,numneb ++ bsn_2(i)=intstr(directive,lenrec,idum) ++ enddo ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,1x,'NEB calculation controls')") ++ write(nrite,"(/,1x,'identity of basin 1 ', ++ x 10i10)")(bsn_1(i),i=1,numneb) ++ write(nrite,"(1x,'identity of basin 2 ', ++ x 10i10)")(bsn_2(i),i=1,numneb) ++ write(nrite, ++ x "(1x,'NEB spring constant ',e12.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'energy units ',2x,a8)") ++ x sprneb,opttol,cunit ++ ++ call print_optim(keytol) ++ ++ endif ++ ++c units conversion ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ return ++ end subroutine neb_option ++ ++ subroutine bpd_option ++ x (directive,seek,lbpd,ltad,lminopt,prechk,nebgo,keybpd,idnode, ++ x nblock,ntrack,keytol,ebias,vmin,catchrad,sprneb,opttol, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for bias potential ++c dynamics option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit,seek ++ character*1 directive(lenrec) ++ logical lbpd,ltad,lminopt,prechk,endbpd,safe,nebgo ++ integer keybpd,idnode,nblock,ntrack,keytol,idum ++ real(8) ebias,vmin,catchrad,sprneb,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ if(ltad)call error(idnode,2355) ++ lminopt=.true. ++ lbpd=.true. ++ endbpd=.false. ++ cunit=" dl_poly" ++ if(idnode.eq.0) ++ x write(nrite,"(/,1x,'bias potential dynamics controls')") ++ ++ if(findstring('dyn',directive,idum))then ++ ++ keybpd=1 ++ hyp_units=energy_unit() ++ ebias=dblstr(directive,lenrec,idum) ++ vmin=dblstr(directive,lenrec,idum) ++ call getword(cunit,directive,8,lenrec) ++ if(idnode.eq.0)write(nrite,"( ++ x 1x,'dynamics option selected ', ++ x /,1x,'bias potential E_bias (kelvin)',f10.4, ++ x /,1x,'bias potential V_min (kelvin)',f10.4 ++ x /,1x,'energy units ',2x,a8)") ++ x ebias,vmin,cunit ++ ++ elseif(findstring('path',directive,idum))then ++ ++ keybpd=2 ++ nebgo=.true. ++ hyp_units=1.d0 ++ do while(.not.endbpd) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endbpd',directive,idum))then ++ endbpd=.true. ++ elseif(findstring('pre',directive,idum))then ++ prechk=.true. ++ if(findstring('false',directive,idum))prechk=.false. ++ elseif(findstring('noneb',directive,idum))then ++ nebgo=.false. ++ elseif(findstring('target',directive,idum))then ++ call getword(seek,directive,8,lenrec) ++ call getword(seek,directive,8,lenrec) ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('ebias',directive,idum))then ++ ebias=dblstr(directive,lenrec,idum) ++ elseif(findstring('vmin',directive,idum))then ++ vmin=dblstr(directive,lenrec,idum) ++ elseif(findstring('num_block',directive,idum))then ++ nblock=intstr(directive,lenrec,idum) ++ elseif(findstring('num_track',directive,idum))then ++ ntrack=intstr(directive,lenrec,idum) ++ elseif(findstring('catch_radius',directive,idum))then ++ catchrad=dblstr(directive,lenrec,idum) ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"( ++ x 1x,'dynamics with path analysis selected', ++ x /,1x,'bias potential E_bias (kelvin)',f10.4, ++ x /,1x,'bias potential V_min (kelvin)',f10.4, ++ x /,1x,'steps per time block ',i10, ++ x /,1x,'steps per tracking block ',i10, ++ x /,1x,'configuration catch radius (A)',f10.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'atom type to be tracked ',2x,a8, ++ x /,1x,'energy units ',2x,a8)") ++ x ebias,vmin,nblock,ntrack,catchrad,opttol,seek,cunit ++ if(nebgo)write(nrite, ++ x "(1x,'NEB spring constant ',e12.4)")sprneb ++ if(prechk)write(nrite, ++ x "(1x,'transition prechecking option selected')") ++ call print_optim(keytol) ++ ++ endif ++ ++c energy unit conversions ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ endif ++ ++ return ++ end subroutine bpd_option ++ ++ subroutine tad_option ++ x (directive,ltad,lbpd,lminopt,prechk,tadall,idnode,nblock, ++ x ntrack,blkout,keytol,catchrad,sprneb,tlow,deltad,opttol, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for TAD option ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 cunit ++ character*1 directive(lenrec) ++ logical ltad,lbpd,lminopt,prechk,tadall,endtad,safe ++ integer idnode,nblock,ntrack,blkout,keytol,idum ++ real(8) catchrad,sprneb,deltad,tlow,opttol,hyp_units ++ ++ if(lminopt)call error(idnode,225) ++ if(lbpd)call error(idnode,2355) ++ lminopt=.true. ++ ltad=.true. ++ endtad=.false. ++ hyp_units=1.d0 ++ ++ do while(.not.endtad) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endtad',directive,idum))then ++ endtad=.true. ++ elseif(findstring('pre',directive,idum))then ++ prechk=.true. ++ if(findstring('false',directive,idum))prechk=.false. ++ elseif(findstring('all',directive,idum))then ++ tadall=.true. ++ if(findstring('false',directive,idum))tadall=.false. ++ elseif(findstring('units',directive,idum))then ++ hyp_units=energy_unit() ++ call getword(cunit,directive,8,lenrec) ++ call getword(cunit,directive,8,lenrec) ++ elseif(findstring('num_block',directive,idum))then ++ nblock=intstr(directive,lenrec,idum) ++ elseif(findstring('num_track',directive,idum))then ++ ntrack=intstr(directive,lenrec,idum) ++ elseif(findstring('blackout',directive,idum))then ++ blkout=intstr(directive,lenrec,idum) ++ elseif(findstring('catch_radius',directive,idum))then ++ catchrad=dblstr(directive,lenrec,idum) ++ elseif(findstring('neb_spring',directive,idum))then ++ sprneb=dblstr(directive,lenrec,idum) ++ elseif(findstring('deltad',directive,idum))then ++ deltad=dblstr(directive,lenrec,idum) ++ elseif(findstring('low_temp',directive,idum))then ++ tlow=dblstr(directive,lenrec,idum) ++ elseif(findstring('forc',directive,idum))then ++ keytol=0 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('ener',directive,idum))then ++ keytol=1 ++ opttol=dblstr(directive,lenrec,idum) ++ elseif(findstring('posi',directive,idum))then ++ keytol=2 ++ opttol=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'TAD dynamics controls' ++ x /,1x,'steps per time block ',i10, ++ x /,1x,'steps per tracking block ',i10, ++ x /,1x,'steps in blackout periods ',i10, ++ x /,1x,'configuration catch radius ',1p,e12.4, ++ x /,1x,'NEB spring constant ',e12.4, ++ x /,1x,'stopping parameter ',e12.4, ++ x /,1x,'target low temperature ',e12.4, ++ x /,1x,'minimisation tolerance ',e12.4, ++ x /,1x,'energy units ',2x,a8)") ++ x nblock,ntrack,blkout,catchrad,sprneb,deltad, ++ x tlow,opttol,cunit ++ if(prechk)write(nrite, ++ x "(1x,'transition prechecking option selected')") ++ if(tadall)write(nrite, ++ x "(1x,'option for all basins analysis selected')") ++ call print_optim(keytol) ++ ++ endif ++ ++c energy unit conversions ++ ++ sprneb=sprneb*hyp_units ++ if(keytol.lt.2)opttol=opttol*hyp_units ++ ++ return ++ end subroutine tad_option ++ ++ subroutine metadyn_option ++ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, ++ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, ++ x locpe_scale,ref_W_aug,h_aug,wt_Dt) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for metadynamics option ++c copyright - daresbury laboratory ++c author - w. smith jan 2011 ++c ++c note: default values are set in metafreeze_module ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lmetadyn,endmet,lstein,ltet,lglobpe,llocpe,safe ++ integer idnode,idum,ncolvar,nq4,nq6,ntet,hkey,meta_step_int ++ real(8) globpe_scale,locpe_scale,ref_W_aug,h_aug,wt_Dt ++ ++ lmetadyn=.true. ++ endmet=.false. ++ ++ do while(.not.endmet) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(record(1).eq.'#'.or.record(1).eq.'&')then ++c information only - skip record ++ cycle ++ elseif(findstring('endmet',directive,idum))then ++ endmet=.true. ++ elseif(findstring('ncolvar',directive,idum))then ++ ncolvar=intstr(directive,lenrec,idum) ++ elseif(findstring('lstein',directive,idum))then ++ lstein=.true. ++ if(findstring('false',directive,idum))lstein=.false. ++ elseif(findstring('ltet',directive,idum))then ++ ltet=.true. ++ if(findstring('false',directive,idum))ltet=.false. ++ elseif(findstring('lglobpe',directive,idum))then ++ lglobpe=.true. ++ if(findstring('false',directive,idum))lglobpe=.false. ++ elseif(findstring('llocpe',directive,idum))then ++ llocpe=.true. ++ if(findstring('false',directive,idum))llocpe=.false. ++ elseif(findstring('globpe_scale',directive,idum))then ++ globpe_scale=dblstr(directive,lenrec,idum) ++ elseif(findstring('locpe_scale',directive,idum))then ++ locpe_scale=dblstr(directive,lenrec,idum) ++ elseif(findstring('nq4',directive,idum))then ++ nq4=intstr(directive,lenrec,idum) ++ nq4=intstr(directive,lenrec,idum) ! do twice - number in name! ++ elseif(findstring('nq6',directive,idum))then ++ nq6=intstr(directive,lenrec,idum) ++ nq6=intstr(directive,lenrec,idum) ! do twice - number in name! ++ elseif(findstring('ntet',directive,idum))then ++ ntet=intstr(directive,lenrec,idum) ++ elseif(findstring('meta_step_int',directive,idum))then ++ meta_step_int=intstr(directive,lenrec,idum) ++ elseif(findstring('ref_w_aug',directive,idum))then ++ ref_W_aug=dblstr(directive,lenrec,idum) ++ elseif(findstring('h_aug',directive,idum))then ++ h_aug=dblstr(directive,lenrec,idum) ++ elseif(findstring('hkey',directive,idum))then ++ hkey=intstr(directive,lenrec,idum) ++ elseif(findstring('wt_dt',directive,idum))then ++ wt_dt=dblstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'metadynamics controls' ++ x /,1x,'total number of collective variables',i10, ++ x /,1x,'steinhardt parameters option (Q4/Q6)',l10, ++ x /,1x,'tetrahedral parameters option (zeta)',l10, ++ x /,1x,'global potential parameter option ',l10, ++ x /,1x,'local potential parameter option ',l10, ++ x /,1x,'global potential param. scale factor',e12.4, ++ x /,1x,'local potential param. scale factor ',e12.4)") ++ x ncolvar,lstein,ltet,lglobpe,llocpe,globpe_scale,locpe_scale ++ ++ write(nrite, ++ x "( 1x,'number of Q4 atom pair types ',i10, ++ x /,1x,'number of Q6 atom pair types ',i10, ++ x /,1x,'number of zeta atom triplet types ',i10)") ++ x nq4,nq6,ntet ++ ++ write(nrite, ++ x "( 1x,'gaussian deposition interval ',i10, ++ x /,1x,'reference gaussian height ',e12.4, ++ x /,1x,'gaussian width parameter ',e12.4, ++ x /,1x,'height control key ',i10, ++ x /,1x,'well-tempered control parameter ',e12.4)") ++ x meta_step_int,ref_W_aug,h_aug,hkey,wt_Dt ++ ++ endif ++ ++ return ++ end subroutine metadyn_option ++ ++ subroutine ewald_selection ++ x (directive,lhke,lspme,lewald,lcut,lforc,kill,idnode,keyfce, ++ x imcon,nhko,nlatt,kmax1,kmax2,kmax3,alpha,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the ewald method and reading ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lhke,lspme,lewald,lcut,lforc,kill,safe ++ integer idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2,kmax3,idum ++ integer kmaxpow2 ++ real(8) alpha,rcut,eps,tol,fac,tol1 ++ ++ lhke=findstring('hke',directive,idum) ++ lspme=findstring('spme',directive,idum) ++ lewald=findstring('ewald',directive,idum) ++ if(lewald)keyfce=2 ++ if(lspme)keyfce=12 ++ if(lhke)keyfce=14 ++ if(idnode.eq.0)open(nconf,file='CONFIG') ++ call getrec(safe,idnode,nconf) ++ call getrec(safe,idnode,nconf) ++ imcon=intstr(record,lenrec,idum) ++ imcon=intstr(record,lenrec,idum) ++ if(.not.lhke.and.(imcon.eq.0.or.imcon.eq.6))then ++ ++ call error(idnode,-180) ++ kill=.true. ++ ++ endif ++ ++ if(findstring('precision',directive,idum))then ++ ++ eps=dblstr(directive,lenrec,idum) ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'Ewald sum precision ',7x,1p,e12.4)")eps ++ ++ if(lhke)then ++ ++ nhko=min(intstr(directive,lenrec,idum),3) ++ nlatt=min(intstr(directive,lenrec,idum),2) ++ if(nlatt.eq.0)nlatt=1 ++ if(nhko.eq.0)nhko=1 ++ ++ endif ++ ++ if(.not.lcut)then ++ call error(idnode,-433) ++ kill=.true. ++ else ++ ++c retreive cell vectors ++ ++ call getrec(safe,idnode,nconf) ++ cell(1)=dblstr(record,lenrec,idum) ++ cell(2)=dblstr(record,lenrec,idum) ++ cell(3)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ cell(4)=dblstr(record,lenrec,idum) ++ cell(5)=dblstr(record,lenrec,idum) ++ cell(6)=dblstr(record,lenrec,idum) ++ call getrec(safe,idnode,nconf) ++ cell(7)=dblstr(record,lenrec,idum) ++ cell(8)=dblstr(record,lenrec,idum) ++ cell(9)=dblstr(record,lenrec,idum) ++ ++c compute alpha and the kmax ++ ++ if(lewald.or.lspme)then ++ ++ call dcell(cell,celprp) ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) ++ fac=1.d0 ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x fac=2.d0**(1.d0/3.d0) ++ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) ++ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) ++ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) ++ ++ elseif(lhke)then ++ ++ if(nhko.eq.0)then ++ if(eps.le.1.d-6)then ++ alpha=3.46d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=3.14d0/rcut ++ else ++ alpha=2.76d0/rcut ++ endif ++ elseif(nhko.eq.1)then ++ if(eps.le.1.d-6)then ++ alpha=4.37d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.08d0/rcut ++ else ++ alpha=3.75d0/rcut ++ endif ++ elseif(nhko.eq.2)then ++ if(eps.le.1.d-6)then ++ alpha=5.01d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.74d0/rcut ++ else ++ alpha=4.44d0/rcut ++ endif ++ elseif(nhko.eq.3)then ++ if(eps.le.1.d-6)then ++ alpha=5.55d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=5.28d0/rcut ++ else ++ alpha=5.00d0/rcut ++ endif ++ endif ++ alpha=alpha/dble(2*nlatt+1) ++ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 ++ call dcell(cell,celprp) ++ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) ++ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) ++ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) ++ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) ++ kmax3=1 ++ ++ endif ++ ++ endif ++ ++ else ++ ++ alpha=dblstr(directive,lenrec,idum) ++ kmax1=intstr(directive,lenrec,idum) ++ kmax2=intstr(directive,lenrec,idum) ++ ++ if(lhke)then ++ ++ kmax3=1 ++ nhko=min(intstr(directive,lenrec,idum),3) ++ nlatt=min(intstr(directive,lenrec,idum),2) ++ ++ else ++ ++ kmax3=intstr(directive,lenrec,idum) ++ ++ endif ++ ++ endif ++ ++c if spme double kmax and set to next power of 2, with current upper ++c limit of 512. ++ ++ if(lspme)then ++ ++ kmaxpow2=1 ++ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax1=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax2=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ enddo ++ kmax3=2 * kmaxpow2 ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ close(nconf) ++ ++ if(lspme)then ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : SPME ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") ++ x alpha,kmax1/2,kmax2/2,kmax3/2 ++ ++ elseif(lhke)then ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : Hautman-Klein-Ewald sum ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 ',2i5)") ++ x alpha,kmax1,kmax2 ++ ++ write(nrite, ++ x "(1x,'HKE expansion order ',7x,i10, ++ x /,1x,'HKE lattice control ',7x,i10)")nhko,nlatt ++ ++ else ++ ++ write(nrite, ++ x "(/,1x,'Electrostatics : Ewald sum ')") ++ ++ write(nrite, ++ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, ++ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") ++ x alpha,kmax1,kmax2,kmax3 ++ ++ endif ++ ++ endif ++ ++ if(lspme)then ++ ++c Initialize fft tables ++ ++CFFTW call fftw3d_f77_create_plan ++CFFTW x (fplan,kmaxd,kmaxe,kmaxf, ++CFFTW x FFTW_FORWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) ++CFFTW ++CFFTW call fftw3d_f77_create_plan ++CFFTW x (bplan,kmaxd,kmaxe,kmaxf, ++CFFTW x FFTW_BACKWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) ++ ++CSGIC call zzfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, ++CSGIC x dummy,1,1,ffttable,dummy,dummy ) ++ ++CCRAY call ccfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, ++CCRAY x dummy,1,1,ffttable,dummy,dummy ) ++ ++ endif ++ ++ if(lspme)then ++ ++ if(kmax1.gt.kmaxd.or.kmax2.gt.kmaxe.or.kmax3.gt.kmaxf)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ elseif(lhke)then ++ ++ if(kmax2.gt.kmaxb)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ else ++ ++ if(kmax2.gt.kmaxb.or.kmax3.gt.kmaxc)then ++ ++ kill=.true. ++ call error(idnode,-185) ++ ++ endif ++ ++ endif ++ ++ if(lforc)then ++ call error(idnode,-416) ++ kill=.true. ++ endif ++ lforc=.true. ++ ++ return ++ end subroutine ewald_selection ++ ++ subroutine print_optim(keytol) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for printing the optimisation option ++c the required parameters ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer keytol ++ ++ if(keytol.eq.0)then ++ write(nrite, ++ x "(1x,'convergence to minimum force selected')") ++ elseif(keytol.eq.1)then ++ write(nrite, ++ x "(1x,'convergence to minimum energy selected')") ++ else ++ write(nrite, ++ x "(1x,'convergence to minimum position selected')") ++ endif ++ ++ return ++ end subroutine print_optim ++ ++ function energy_unit() ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for assigning energy conversion factors ++c copyright - daresbury laboratory ++c author - w. smith feb 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idum ++ real(8) energy_unit ++ ++ energy_unit=1.d0 ++ if(findstring('ev',record,idum))then ++ energy_unit=9648.530821d0 ++ elseif(findstring('kev',record,idum))then ++ energy_unit=9648530.821d0 ++ elseif(findstring('kcal',record,idum))then ++ energy_unit=418.4d0 ++ elseif(findstring('kj',record,idum))then ++ energy_unit=1.d2 ++ elseif(findstring('k',record,idum))then ++ energy_unit=boltz ++ endif ++ ++ return ++ end function energy_unit ++ ++ subroutine solvation_option ++ x (directive,lsolva,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for solvation option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,endsol,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ endsol=.false. ++ ++ nsolva=intstr(directive,lenrec,idum) ++ isolva=intstr(directive,lenrec,idum) ++ ++ if(nsolva.eq.0.and.isolva.eq.0)then ++ ++ do while(.not.endsol) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endsol',directive,idum))then ++ endsol=.true. ++ elseif(findstring('enddec',directive,idum))then ++ endsol=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=max(intstr(directive,lenrec,idum),1) ++ endif ++ ++ enddo ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'solvation calculation selected', ++ x /,1x,'start of solvation calculation ',i10, ++ x /,1x,'solvation calculation interval ',i10)") ++ x nsolva,isolva ++ ++ endif ++ ++ return ++ end subroutine solvation_option ++ ++ subroutine free_energy_option(directive,lfree,lfrmas,idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for free energy option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lfree,lfrmas,endfre,safe ++ integer idnode,idum ++ ++ mfree=1 ++ kfree=1 ++ lfree=.true. ++ lfrmas=.false. ++ endfre=.false. ++ ++ do while(.not.endfre) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endfre',directive,idum))then ++ endfre=.true. ++ elseif(findstring('start',directive,idum))then ++ nfrn=intstr(directive,lenrec,idum) ++ elseif(findstring('interval',directive,idum))then ++ ifrn=intstr(directive,lenrec,idum) ++ elseif(findstring('lambda',directive,idum))then ++ pfree=dblstr(directive,lenrec,idum) ++ elseif(findstring('mix',directive,idum))then ++ mfree=intstr(directive,lenrec,idum) ++ elseif(findstring('expo',directive,idum))then ++ kfree=intstr(directive,lenrec,idum) ++ elseif(findstring('reset_mass',directive,idum))then ++ lfrmas=.true. ++ if(findstring('false',directive,idum))lfrmas=.false. ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(mfree.eq.1)kfree=1 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'free energy option selected', ++ x /,1x,'start of free energy calculation ',i10, ++ x /,1x,'sampling interval ',i10, ++ x /,1x,'free energy parameter (lambda) ',f10.3, ++ x /,1x,'mixing rule selected ',i10, ++ x /,1x,'mixing rule exponent ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10, ++ x /,1x,'mass scaling option ',l10)") ++ x nfrn,ifrn,pfree,mfree,kfree,ind_fre,lfrmas ++ ++ endif ++ ++c define free energy scaling parameters ++ ++ call freegen() ++ ++ return ++ end subroutine free_energy_option ++ ++ subroutine excitation_option ++ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for excitation option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,lexcite,lghost,endexc,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ lghost=.true. ++ lexcite=.true. ++ endexc=.false. ++ ++ do while(.not.endexc) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endexc',directive,idum))then ++ endexc=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=intstr(directive,lenrec,idum) ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'excitation option selected', ++ x /,1x,'energy decomposition start ',i10, ++ x /,1x,'energy decomposition interval ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10)") ++ x nsolva,isolva,ind_fre ++ ++ endif ++ ++ return ++ end subroutine excitation_option ++ ++ subroutine switching_option ++ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading parameters for switching option ++c copyright - daresbury laboratory ++c authors - w. smith and p.-a. cazade jul 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 directive(lenrec) ++ logical lsolva,lswitch,lghost,endswi,safe ++ integer idnode,nsolva,isolva,idum ++ ++ lsolva=.true. ++ lghost=.true. ++ lswitch=.true. ++ endswi=.false. ++ niswitch=0 ++ ++ do while(.not.endswi) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abort_control_read(1,idnode,nread) ++ call lowcase(record,lenrec) ++ call strip(record,lenrec) ++ call copystring(record,directive,lenrec) ++ ++ if(findstring('endswi',directive,idum))then ++ endswi=.true. ++ elseif(findstring('start',directive,idum))then ++ nsolva=intstr(directive,lenrec,idum) ++ elseif(findstring('inter',directive,idum))then ++ isolva=intstr(directive,lenrec,idum) ++ elseif(findstring('period',directive,idum))then ++ niswitch=max(intstr(directive,lenrec,idum),2) ++ elseif(findstring('system_a',directive,idum))then ++ ind_fre(1)=intstr(directive,lenrec,idum) ++ ind_fre(2)=intstr(directive,lenrec,idum) ++ elseif(findstring('system_b',directive,idum))then ++ ind_fre(3)=intstr(directive,lenrec,idum) ++ ind_fre(4)=intstr(directive,lenrec,idum) ++ endif ++ ++ enddo ++ ++ if(niswitch.eq.0)niswitch=nsolva ++ nswitch=nsolva ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,1x,'switching option selected', ++ x /,1x,'energy decomposition start ',i10, ++ x /,1x,'energy decomposition interval ',i10, ++ x /,1x,'switching period ',i10, ++ x /,1x,'system A first atom ',i10, ++ x /,1x,'system A last atom ',i10, ++ x /,1x,'system B first atom ',i10, ++ x /,1x,'system B last atom ',i10)") ++ x nsolva,isolva,niswitch,ind_fre ++ ++ endif ++ ++ return ++ end subroutine switching_option ++ ++ end module define_system_module ++ +diff -urN dl_class_1.9.orig/srcmod/dihedral_module.f dl_class_1.9/srcmod/dihedral_module.f +--- dl_class_1.9.orig/srcmod/dihedral_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/dihedral_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1121 @@ ++ module dihedral_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining dihedral potential arrays ++c copyright - daresbury laboratory ++c ++c author - w. smith sep 2003 ++c adapted - p.-a. cazade oct 2007 : solvation, free energy, etc. ++c adapted - w.smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmdih(:,:) ++ integer, allocatable :: listdih(:,:) ++ integer, allocatable :: numdih(:),keydih(:),lstdih(:,:) ++ ++ save prmdih,listdih,numdih,keydih,lstdih ++ ++ contains ++ ++ subroutine alloc_dih_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(5) ++ ++ do i=1,5 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmdih(mxtdih,mxpdih),stat=fail(1)) ++ allocate (numdih(mxtmls),stat=fail(2)) ++ allocate (keydih(mxtdih),stat=fail(3)) ++ allocate (lstdih(mxtdih,4),stat=fail(4)) ++ allocate (listdih(mxdihd,5),stat=fail(5)) ++ ++ do i=1,5 ++ if(fail(i).gt.0)call error(idnode,1011) ++ enddo ++ ++ do i=1,mxtmls ++ numdih(i)=0 ++ enddo ++ ++ end subroutine alloc_dih_arrays ++ ++ subroutine define_dihedrals ++ x (safe,idnode,itmols,ndihed,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining dihedral angles ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,itmols,ndihed,nsite,ntmp,idih,idih1,i ++ integer iatm1,iatm2,iatm3,iatm4,idum,isite1,isite2,isite3 ++ integer isite4,ia,ja ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numdih(itmols)=numdih(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of dihedral angles', ++ x 6x,i10)")ntmp ++ write(nrite,"(/,/,1x,'dihedral angle details:', ++ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, ++ x 'index',5x,'index',5x,'f-const',7x,'angle', ++ x 8x,'trig',4x,'1-4 elec',5x,'1-4 vdw',/)") ++ endif ++ ++ idih1=numdih(itmols) ++ do idih=1,idih1 ++ ++c read dihedral bond angle potential parameters ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ iatm3=intstr(record,lenrec,idum) ++ iatm4=intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ isite3=nsite-numsit(itmols)+iatm3 ++ isite4=nsite-numsit(itmols)+iatm4 ++ ++ if(lfzsit(isite1)*lfzsit(isite2)* ++ x lfzsit(isite3)*lfzsit(isite4).ne.0)then ++ ++ numdih(itmols)=numdih(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ ndihed=ndihed+1 ++ ++ if(ndihed.gt.mxtdih)call error(idnode,60) ++ ++ if(keyword(1:4).eq.'cos ')then ++ keydih(ndihed)=1 ++ elseif(keyword(1:4).eq.'harm')then ++ keydih(ndihed)=2 ++ elseif(keyword(1:4).eq.'hcos')then ++ keydih(ndihed)=3 ++ elseif(keyword(1:4).eq.'cos3')then ++ keydih(ndihed)=4 ++ elseif(keyword(1:4).eq.'ryck')then ++ keydih(ndihed)=5 ++ elseif(keyword(1:4).eq.'rbf')then ++ keydih(ndihed)=6 ++ elseif(keyword(1:4).eq.'opls')then ++ keydih(ndihed)=7 ++ else ++ if(idnode.eq.0)write(nrite,*)message ++ call error(idnode,448) ++ endif ++ ++ lstdih(ndihed,1)=iatm1 ++ lstdih(ndihed,2)=iatm2 ++ lstdih(ndihed,3)=iatm3 ++ lstdih(ndihed,4)=iatm4 ++ prmdih(ndihed,1)=dblstr(record,lenrec,idum) ++ prmdih(ndihed,2)=dblstr(record,lenrec,idum) ++ prmdih(ndihed,3)=dblstr(record,lenrec,idum) ++ prmdih(ndihed,4)=dblstr(record,lenrec,idum) ++ prmdih(ndihed,5)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,4i10,1p,e12.4,0p,9f12.6)") ++ x keyword(1:4),(lstdih(ndihed,ia),ia=1,4), ++ x (prmdih(ndihed,ja),ja=1,mxpdih) ++ ++c convert energies to internal units and angles to radians ++ ++ prmdih(ndihed,1)=prmdih(ndihed,1)*engunit ++ ++ if(keydih(ndihed).eq.4)then ++ ++ prmdih(ndihed,2)=prmdih(ndihed,2)*engunit ++ prmdih(ndihed,3)=prmdih(ndihed,3)*engunit ++ ++ elseif(keydih(ndihed).eq.7)then ++ ++ prmdih(ndihed,2)=prmdih(ndihed,2)*engunit ++ prmdih(ndihed,3)=prmdih(ndihed,3)*engunit ++ prmdih(ndihed,4)=prmdih(ndihed,4)*engunit ++ prmdih(ndihed,5)=prmdih(ndihed,5)*(pi/180.d0) ++ ++ else ++ ++ prmdih(ndihed,2)=prmdih(ndihed,2)*(pi/180.d0) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_dihedrals ++ ++ subroutine dihfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntdihd,keyfce, ++ x dlrpot,epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe, ++ x virdih,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating dihedral energy and force ++c terms in molecular dynamics. ++c ++c version 3: scale factors for reduces electrostatic and vdw ++c 1-4 interactions. ++c ++c NOTE: assumes 1-4 interactions are in the exclude list ++c ++c block as opposed to stride version ++c ++c copyright - daresbury laboratory ++c author - w. smith mar 1992 ++c modified - t. forester dec 1993 ++c modified - t. forester jun 1995 - stress tensor added ++c modified - a. smondyrev may 2000 - ryckaert-bellemans potentials ++c modified - p.-a. cazade oct 2007 - solvation etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect ++ logical idrive,jdrive,kdrive,ldrive ++ integer i,k,ii,kk,ntdihd,idnode,mxnode,idih1,idih2,ia,ib ++ integer ic,id,imcon,ka,kb,l,keyfce,fail1,fail2,fail3,kkk ++ real(8) phi,twopi,rtwopi,dterm,srpot ++ real(8) engdih,virdih,engc14,engs14,virs14,rrbc,xab,yab,erc,fer ++ real(8) zab,xbc,ybc,zbc,xcd,ycd,zcd,pbx,pby,pbz,pb2,rpb1,rpb2 ++ real(8) pcx,pcy,pcz,pc2,rpc1,rpc2,pbpc,cosp,sinp,rsinp,exp1 ++ real(8) gamma,fax,fay,faz,fcx,fcy,fcz,fb1x,fb1y,fb1z,fd1x,fd1y ++ real(8) fd1z,scale,xad,yad,zad,rad,chgprd,coul,fcoul,fx,fy,fz ++ real(8) ppp,dlrpot,t1,t2,vk0,vk1,vk2,gk0,gk1,gk2,epsq,engcpe ++ real(8) vircpe,rcut,rvdw,engsrp,virsrp,xac,yac,zac,vcon,fcon ++ real(8) virc14,b0,rfld0,rfld1,rfld2,alpha,a1,a2,a3,a4,a5,pp,tt ++ real(8) cou14_vir,vdw14_vir,strs(6),strs_loc(6) ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ real(8), allocatable :: xdbc(:),ydbc(:),zdbc(:) ++ real(8), allocatable :: xdcd(:),ydcd(:),zdcd(:) ++ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ ++ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ ++ data fail1,fail2,fail3/0,0,0/ ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) ++ allocate (xdbc(msbad),ydbc(msbad),zdbc(msbad),stat=fail2) ++ allocate (xdcd(msbad),ydcd(msbad),zdcd(msbad),stat=fail3) ++ if(fail1.ne.0.or.fail2.ne.0.or.fail3.ne.0) ++ x call error(idnode,1060) ++ ++ twopi=2.d0*pi ++ rtwopi=1.d0/twopi ++ safe=.true. ++ ++c check size of work arrays ++ ++ if((ntdihd-mxnode+1)/mxnode.gt.msbad) call error(idnode,421) ++ ++c block indices ++ ++ idih1=(idnode*ntdihd)/mxnode+1 ++ idih2=((idnode+1)*ntdihd)/mxnode ++ ++c initialise accumulators ++ ++ engdih=0.d0 ++ virdih=0.d0 ++ dih_fre=0.d0 ++ dih_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(3)=.true. ++ dih_sol(:)=0.d0 ++ if(lexcite)dih_exc(:)=0.d0 ++ ++ endif ++ ++ if(keyfce/2.eq.4)then ++ ++c constant terms for shifted coulombic potential ++ ++ tt=1.d0/(1.d0+pp*alpha*rcut) ++ exp1=exp(-(alpha*rcut)**2) ++ vcon=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut ++ fcon=(vcon+2.d0*(alpha/sqrpi)*exp1)/rcut ++ ++ elseif(keyfce/2.eq.5)then ++ ++c constant terms for reaction field potential ++ ++ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) ++ rfld0=b0/rcut**3 ++ rfld1=(1.d0+b0*0.5d0)/rcut ++ rfld2=rfld0*0.5d0 ++ tt=1.d0/(1.d0+pp*alpha*rcut) ++ exp1=exp(-(alpha*rcut)**2) ++ vcon=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut ++ fcon=(vcon+2.d0*(alpha/sqrpi)*exp1)/rcut-rfld0*rcut ++ vcon=vcon+rfld2*rcut**2-rfld1 ++ ++ endif ++ ++c calculate bond vectors ++ ++ ii=0 ++ do i=idih1,idih2 ++ ++ ii=ii+1 ++ ++c indices of bonded atoms ++ ++ ia=listdih(ii,2) ++ ib=listdih(ii,3) ++ ic=listdih(ii,4) ++ id=listdih(ii,5) ++ ++c define components of bond vectors ++ ++ xdab(ii)=xxx(ia)-xxx(ib) ++ ydab(ii)=yyy(ia)-yyy(ib) ++ zdab(ii)=zzz(ia)-zzz(ib) ++ ++ xdbc(ii)=xxx(ib)-xxx(ic) ++ ydbc(ii)=yyy(ib)-yyy(ic) ++ zdbc(ii)=zzz(ib)-zzz(ic) ++ ++ xdcd(ii)=xxx(ic)-xxx(id) ++ ydcd(ii)=yyy(ic)-yyy(id) ++ zdcd(ii)=zzz(ic)-zzz(id) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ call images(imcon,0,1,ii,cell,xdbc,ydbc,zdbc) ++ call images(imcon,0,1,ii,cell,xdcd,ydcd,zdcd) ++ ++c zero dihedral energy accumulator ++ ++ engdih=0.d0 ++ virdih=0.d0 ++ ++c zero scaled 1-4 electrostatic and short range potential accumulators ++ ++ engc14=0.d0 ++ virc14=0.d0 ++ engs14=0.d0 ++ virs14=0.d0 ++ vdw14_vir=0.d0 ++ cou14_vir=0.d0 ++ ++c loop over all specified dihedrals ++ ++ ii=0 ++ do i=idih1,idih2 ++ ++c define components of bond vectors ++ ++ ii=ii+1 ++ ++ xab=xdab(ii) ++ yab=ydab(ii) ++ zab=zdab(ii) ++ ++ xbc=xdbc(ii) ++ ybc=ydbc(ii) ++ zbc=zdbc(ii) ++ rrbc=1.d0/sqrt(xbc*xbc+ybc*ybc+zbc*zbc) ++ ++ xcd=xdcd(ii) ++ ycd=ydcd(ii) ++ zcd=zdcd(ii) ++ ++ xac=xab+xbc ++ yac=yab+ybc ++ zac=zab+zbc ++ ++c construct first dihedral vector ++ ++ pbx=yab*zbc-zab*ybc ++ pby=zab*xbc-xab*zbc ++ pbz=xab*ybc-yab*xbc ++ pb2=pbx*pbx+pby*pby+pbz*pbz ++ rpb1=1.d0/sqrt(pb2) ++ rpb2=rpb1*rpb1 ++ ++c construct second dihedral vector ++ ++ pcx=ybc*zcd-zbc*ycd ++ pcy=zbc*xcd-xbc*zcd ++ pcz=xbc*ycd-ybc*xcd ++ pc2=pcx*pcx+pcy*pcy+pcz*pcz ++ rpc1=1.d0/sqrt(pc2) ++ rpc2=rpc1*rpc1 ++ ++c determine dihedral angle ++ ++ pbpc=pbx*pcx+pby*pcy+pbz*pcz ++ cosp=pbpc*rpb1*rpc1 ++ sinp=(xbc*(pcy*pbz-pcz*pby)+ybc*(pbx*pcz-pbz*pcx)+ ++ x zbc*(pcx*pby-pcy*pbx))*(rpb1*rpc1*rrbc) ++ ++ phi=atan2(sinp,cosp) ++ ++c avoid singularity in sinp ++ ++ sinp=sign(max(1.d-8,abs(sinp)),sinp) ++ rsinp=1.d0/sinp ++ ++c selection of potential energy function type ++ ++ kk=listdih(ii,1) ++ ++c calculate potential energy and scalar force term ++ ++ if(keydih(kk).eq.1)then ++ ++c key=1 for torsion dihedral potential ++ ++ dterm=prmdih(kk,1)*(1.d0+cos(prmdih(kk,3)*phi- ++ x prmdih(kk,2))) ++ gamma=-rpb1*rpc1*rsinp*prmdih(kk,1)*prmdih(kk,3)* ++ x sin(prmdih(kk,3)*phi-prmdih(kk,2)) ++ ++ else if(keydih(kk).eq.2)then ++ ++c key=2 for harmonic improper dihedral ++ ++ phi=phi-prmdih(kk,2) ++ phi=phi-nint(phi*rtwopi)*twopi ++ dterm=0.5d0*prmdih(kk,1)*(phi*phi) ++ gamma=rpb1*rpc1*rsinp*prmdih(kk,1)*phi ++ ++ else if(keydih(kk).eq.3)then ++ ++c key=3 for harmonic cosine dihedral ++ ++ dterm=0.5d0*prmdih(kk,1)*(cos(phi)- ++ x cos(prmdih(kk,2)))**2 ++ gamma=-rpb1*rpc1*prmdih(kk,1)*(cos(phi)-cos(prmdih(kk,2))) ++ ++ else if(keydih(kk).eq.4)then ++ ++c key=4 for 3-term cosine dihedral ++ ++ dterm=0.5d0*(prmdih(kk,1)*(1.d0+cos(phi))+ ++ x prmdih(kk,2)*(1.d0-cos(2.d0*phi))+prmdih(kk,3)* ++ x (1.d0+cos(3.d0*phi))) ++ gamma=-rpb1*rpc1*rsinp*0.5d0*(prmdih(kk,1)*sin(phi)- ++ x 2.d0*prmdih(kk,2)*sin(2.d0*phi)+3.d0*prmdih(kk,3)* ++ x sin(3.d0*phi)) ++ ++ else if(keydih(kk).eq.5)then ++ ++c key=5 for ryckaert-bellemans potential ++c chem.phys.lett., vol.30, p.123, 1975. ++c ATTENTION !!! Modified to have trans configuration ++c correspond to phi=180 rather than ++c phi=0 as in original form. ++ ++ dterm=prmdih(kk,1)*(1.116d0-1.462d0*cos(phi)- ++ x 1.578d0*(cos(phi))**2+0.368d0*(cos(phi))**3+ ++ x 3.156d0*(cos(phi))**4+3.788d0*(cos(phi))**5) ++ gamma=prmdih(kk,1)*(1.462d0+3.156d0*cos(phi)- ++ x 1.104d0*(cos(phi))**2-12.624d0*(cos(phi))**3- ++ x 18.94d0*(cos(phi))**4)*rpb1*rpc1 ++ ++ else if(keydih(kk).eq.6)then ++ ++c key=6 for fluorinated ryckaert-bellemans potential ++c Rice at al., JCP 104, 2101, (1996). ++ ++ dterm=prmdih(kk,1)*(3.55d0-2.78d0*cos(phi)- ++ x 3.56d0*(cos(phi))**2-1.64d0*(cos(phi))**3+ ++ x 7.13d0*(cos(phi))**4+12.84d0*(cos(phi))**5+ ++ x 9.67d0*exp(-56.d0*(phi-pi)**2)) ++ gamma=(prmdih(kk,1)*(2.78d0+7.12d0*cos(phi)+ ++ x 4.92d0*(cos(phi))**2-28.52d0*(cos(phi))**3- ++ x 64.2d0*(cos(phi))**4)-1083.04d0*(phi-pi)* ++ x exp(-56.0*(phi-pi)**2))*rpb1*rpc1 ++ ++ else if(keydih(kk).eq.7)then ++ ++c key=7 for opls cosine dihedral ++ ++ phi=phi-prmdih(kk,5) ++ dterm=prmdih(kk,1)+0.5d0*(prmdih(kk,2)* ++ x (1.d0+cos(phi))+prmdih(kk,3)*(1.d0-cos(2.d0*phi))+ ++ x prmdih(kk,4)*(1.d0+cos(3.d0*phi))) ++ gamma=-0.5d0*(prmdih(kk,2)*sin(phi)-2.d0*prmdih(kk,3)* ++ x sin(2.d0*phi)+3.d0*prmdih(kk,4)*sin(3.d0*phi))*rpb1* ++ x rpc1*rsinp ++ ++ else ++ ++c undefined potential ++ ++ safe=.false. ++ dterm=0.d0 ++ gamma=0.d0 ++ ++ endif ++ ++c indices of bonded atoms ++ ++ ia=listdih(ii,2) ++ ib=listdih(ii,3) ++ ic=listdih(ii,4) ++ id=listdih(ii,5) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ kdrive=driven(ltype(ic)) ++ ldrive=driven(ltype(id)) ++ ++ endif ++ ++c set selection control for angle potential ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. ++ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ ++ x atm_fre(id).eq.0) ++ ++ if(lsolva)then ++ dih_exc(atmolt(ia))=dih_exc(atmolt(ia))+dterm ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. ++ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ dih_fre=dih_fre-dterm ++ dterm=lambda1*dterm ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. ++ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ dih_fre=dih_fre+dterm ++ dterm=lambda2*dterm ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy ++ ++ engdih=engdih+dterm ++ ++c calculate solvation energy for dihedral term ++ ++ if(lsolva)then ++ dih_sol(atmolt(ia))=dih_sol(atmolt(ia))+dterm ++ endif ++ ++c calculate atomic forces for dihedral term ++ ++ fax=gamma*((-pcy*zbc+pcz*ybc)-pbpc*rpb2*(-pby*zbc+pbz*ybc)) ++ fay=gamma*(( pcx*zbc-pcz*xbc)-pbpc*rpb2*( pbx*zbc-pbz*xbc)) ++ faz=gamma*((-pcx*ybc+pcy*xbc)-pbpc*rpb2*(-pbx*ybc+pby*xbc)) ++ ++ fcx=gamma*((-pcy*zab+pcz*yab)-pbpc*rpb2*(-pby*zab+pbz*yab)) ++ fcy=gamma*(( pcx*zab-pcz*xab)-pbpc*rpb2*( pbx*zab-pbz*xab)) ++ fcz=gamma*((-pcx*yab+pcy*xab)-pbpc*rpb2*(-pbx*yab+pby*xab)) ++ ++ fb1x=gamma*((-pby*zcd+pbz*ycd)-pbpc*rpc2*(-pcy*zcd+pcz*ycd)) ++ fb1y=gamma*(( pbx*zcd-pbz*xcd)-pbpc*rpc2*( pcx*zcd-pcz*xcd)) ++ fb1z=gamma*((-pbx*ycd+pby*xcd)-pbpc*rpc2*(-pcx*ycd+pcy*xcd)) ++ ++ fd1x=gamma*((-pby*zbc+pbz*ybc)-pbpc*rpc2*(-pcy*zbc+pcz*ybc)) ++ fd1y=gamma*(( pbx*zbc-pbz*xbc)-pbpc*rpc2*( pcx*zbc-pcz*xbc)) ++ fd1z=gamma*((-pbx*ybc+pby*xbc)-pbpc*rpc2*(-pcx*ybc+pcy*xbc)) ++ ++ fxx(ia)=fxx(ia)+fax ++ fyy(ia)=fyy(ia)+fay ++ fzz(ia)=fzz(ia)+faz ++ ++ fxx(ib)=fxx(ib)-fax-fcx+fb1x ++ fyy(ib)=fyy(ib)-fay-fcy+fb1y ++ fzz(ib)=fzz(ib)-faz-fcz+fb1z ++ ++ fxx(ic)=fxx(ic)+fcx-fb1x-fd1x ++ fyy(ic)=fyy(ic)+fcy-fb1y-fd1y ++ fzz(ic)=fzz(ic)+fcz-fb1z-fd1z ++ ++ fxx(id)=fxx(id)+fd1x ++ fyy(id)=fyy(id)+fd1y ++ fzz(id)=fzz(id)+fd1z ++ ++c stress tensor for dihedral term ++ ++ strs(1)=strs(1)+xab*fax+xbc*(fb1x-fcx)-xcd*fd1x ++ strs(2)=strs(2)+yab*fax+ybc*(fb1x-fcx)-ycd*fd1x ++ strs(3)=strs(3)+zab*fax+zbc*(fb1x-fcx)-zcd*fd1x ++ strs(4)=strs(4)+yab*fay+ybc*(fb1y-fcy)-ycd*fd1y ++ strs(5)=strs(5)+yab*faz+ybc*(fb1z-fcz)-ycd*fd1z ++ strs(6)=strs(6)+zab*faz+zbc*(fb1z-fcz)-zcd*fd1z ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then ++ ++c local energy (no virial) ++ ++ eng_loc=eng_loc+dterm ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fax ++ fyy_loc(ia)=fyy_loc(ia)+fay ++ fzz_loc(ia)=fzz_loc(ia)+faz ++ ++ fxx_loc(ib)=fxx_loc(ib)-fax-fcx+fb1x ++ fyy_loc(ib)=fyy_loc(ib)-fay-fcy+fb1y ++ fzz_loc(ib)=fzz_loc(ib)-faz-fcz+fb1z ++ ++ fxx_loc(ic)=fxx_loc(ic)+fcx-fb1x-fd1x ++ fyy_loc(ic)=fyy_loc(ic)+fcy-fb1y-fd1y ++ fzz_loc(ic)=fzz_loc(ic)+fcz-fb1z-fd1z ++ ++ fxx_loc(id)=fxx_loc(id)+fd1x ++ fyy_loc(id)=fyy_loc(id)+fd1y ++ fzz_loc(id)=fzz_loc(id)+fd1z ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xab*fax+xbc*(fb1x-fcx)-xcd*fd1x ++ strs_loc(2)=strs_loc(2)+yab*fax+ybc*(fb1x-fcx)-ycd*fd1x ++ strs_loc(3)=strs_loc(3)+zab*fax+zbc*(fb1x-fcx)-zcd*fd1x ++ strs_loc(4)=strs_loc(4)+yab*fay+ybc*(fb1y-fcy)-ycd*fd1y ++ strs_loc(5)=strs_loc(5)+yab*faz+ybc*(fb1z-fcz)-ycd*fd1z ++ strs_loc(6)=strs_loc(6)+zab*faz+zbc*(fb1z-fcz)-zcd*fd1z ++ ++ endif ++ ++c calculate 1-4 dihedral interactions (coulombic and short ranged) ++c assumes 1-4 interactions are in the exclude list ++ ++ kk=listdih(ii,1) ++ ++c bypass OPLS 1-4 terms (not present) ++ ++ if(keydih(kk).ne.7)then ++ ++c 1-4 electrostatics : adjust by weighting factor ++ ++ scale=prmdih(kk,4) ++ ++ xad=xac+xcd ++ yad=yac+ycd ++ zad=zac+zcd ++ ++ rad=sqrt(xad**2+yad**2+zad**2) ++ ++c scaled charge product*dielectric ++ ++ chgprd=scale*chge(ia)*chge(id)*r4pie0 ++ coul=0.d0 ++ fcoul=0.d0 ++ ++c truncation of potential for all schemes except ewald sum ++ ++ if(abs(chgprd).gt.1.d-10.and.keyfce.gt.0)then ++ ++c electrostatics by ewald sum ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6.or.keyfce/2.eq.7)then ++ ++ coul=chgprd/(epsq*rad) ++ fcoul=coul/(rad**2) ++ ++c distance dependent dielectric ++ ++ elseif(rcut.gt.rad)then ++ ++ if(keyfce/2.eq.2)then ++ ++ coul=chgprd/(epsq*rad**2) ++ fcoul=2.0d0*coul/(rad**2) ++ ++c unmodified coulombic ++ ++ else if(keyfce/2.eq.3)then ++ ++ coul=chgprd/(epsq*rad) ++ fcoul=coul/(rad**2) ++ ++c truncated and shifted coulombic ++ ++ else if(keyfce/2.eq.4)then ++ ++ tt=1.d0/(1.d0+pp*alpha*rad) ++ exp1=exp(-(alpha*rad)**2) ++ erc=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rad ++ fer=(erc+2.d0*(alpha/sqrpi)*exp1)/rad**2 ++ ++c calculate potential energy and forces ++ ++ coul=chgprd*(erc-vcon+fcon*(rad-rcut))/epsq ++ fcoul=chgprd*(fer-fcon/rad)/epsq ++ ++c reaction field ++ ++ else if(keyfce/2.eq.5)then ++ ++ tt=1.d0/(1.d0+pp*alpha*rad) ++ exp1=exp(-(alpha*rad)**2) ++ erc=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rad ++ fer=(erc+2.d0*(alpha/sqrpi)*exp1)/rad**2 ++ coul=chgprd*(erc-vcon+fcon*(rad-rcut)+ ++ x rfld2*rad*rad-rfld1) ++ fcoul=chgprd*(fer-fcon/rad-rfld0) ++ ++ elseif(keyfce/2.eq.0)then ++ ++ coul=0.d0 ++ fcoul=0.d0 ++ ++ else ++ ++ call error(idnode,446) ++ ++ endif ++ ++ endif ++ ++c set selection control for coulombic 1-4 terms ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(ia),atmolt(id)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(id).ne.1))then ++ ++c set selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(id).eq.0) ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou14_vir=cou14_vir+fcoul*rad**2 ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou14_vir=cou14_vir-fcoul*rad**2 ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c electrostatic energy and virial for 1-4 term ++ ++ engc14=engc14+coul ++ virc14=virc14-fcoul*rad**2 ++ ++c solvation energy for coulombic 1-4 term ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c coulombic force for 1-4 term ++ ++ fx=fcoul*xad ++ fy=fcoul*yad ++ fz=fcoul*zad ++ ++ fxx(ia)=fxx(ia)+fx ++ fyy(ia)=fyy(ia)+fy ++ fzz(ia)=fzz(ia)+fz ++ ++ fxx(id)=fxx(id)-fx ++ fyy(id)=fyy(id)-fy ++ fzz(id)=fzz(id)-fz ++ ++c stress tensor for coulombic 1-4 term ++ ++ strs(1)=strs(1)+xad*fx ++ strs(2)=strs(2)+xad*fy ++ strs(3)=strs(3)+xad*fz ++ strs(4)=strs(4)+yad*fy ++ strs(5)=strs(5)+yad*fz ++ strs(6)=strs(6)+zad*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.ldrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-fcoul*rad**2 ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fx ++ fyy_loc(ia)=fyy_loc(ia)+fy ++ fzz_loc(ia)=fzz_loc(ia)+fz ++ ++ fxx_loc(id)=fxx_loc(id)-fx ++ fyy_loc(id)=fyy_loc(id)-fy ++ fzz_loc(id)=fzz_loc(id)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xad*fx ++ strs_loc(2)=strs_loc(2)+xad*fy ++ strs_loc(3)=strs_loc(3)+xad*fz ++ strs_loc(4)=strs_loc(4)+yad*fy ++ strs_loc(5)=strs_loc(5)+yad*fz ++ strs_loc(6)=strs_loc(6)+zad*fz ++ ++ endif ++ ++ endif ++ ++c 1-4 short ranged : adjust by weighting factor ++ ++ scale=prmdih(kk,5) ++ gamma=0.d0 ++ ++ if(mod(keyfce,2).eq.1)then ++ ++c atomic and potential function indices ++ ++ ka=max(ltype(ia),ltype(id)) ++ kb=min(ltype(ia),ltype(id)) ++ k=lstvdw((ka*(ka-1))/2+kb) ++ ++ if(abs(scale*vvv(1,k)).gt.1.d-10)then ++ ++c apply truncation of potential ++ ++ if(rvdw.gt.rad)then ++ ++c determine interpolation panel for force arrays ++ ++ l=int(rad/dlrpot) ++ ppp=rad/dlrpot-dble(l) ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0=vvv(l,k) ++ vk1=vvv(l+1,k) ++ vk2=vvv(l+2,k) ++ ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ ++ srpot=scale*(t1+(t2-t1)*ppp*0.5d0) ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=ggg(l,k) ++ gk1=ggg(l+1,k) ++ gk2=ggg(l+2,k) ++ ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ ++ gamma=scale*(t1+(t2-t1)*ppp*0.5d0)/(rad**2) ++ ++c set selection control for short ranged 1-4 terms ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(ia),atmolt(id)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(id).ne.1))then ++ ++c set selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(id).eq.0) ++ ++ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+srpot ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ vdw_fre=vdw_fre-srpot ++ vdw14_vir=vdw14_vir+gamma*rad**2 ++ srpot=lambda1*srpot ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ vdw_fre=vdw_fre+srpot ++ vdw14_vir=vdw14_vir-gamma*rad**2 ++ srpot=lambda2*srpot ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c short ranged energy and virial for 1-4 term ++ ++ engs14=engs14+srpot ++ virs14=virs14-gamma*rad**2 ++ ++c solvation energy for short ranged 1-4 term ++ ++ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+srpot ++ ++c short ranged forces for 1-4 term ++ ++ fx=gamma*xad ++ fy=gamma*yad ++ fz=gamma*zad ++ ++ fxx(ia)=fxx(ia)+fx ++ fyy(ia)=fyy(ia)+fy ++ fzz(ia)=fzz(ia)+fz ++ ++ fxx(id)=fxx(id)-fx ++ fyy(id)=fyy(id)-fy ++ fzz(id)=fzz(id)-fz ++ ++c stress tensor for short ranged 1-4 term ++ ++ strs(1)=strs(1)+xad*fx ++ strs(2)=strs(2)+xad*fy ++ strs(3)=strs(3)+xad*fz ++ strs(4)=strs(4)+yad*fy ++ strs(5)=strs(5)+yad*fz ++ strs(6)=strs(6)+zad*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.ldrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+srpot ++ vir_loc=vir_loc-gamma*rad**2 ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fx ++ fyy_loc(ia)=fyy_loc(ia)+fy ++ fzz_loc(ia)=fzz_loc(ia)+fz ++ ++ fxx_loc(id)=fxx_loc(id)-fx ++ fyy_loc(id)=fyy_loc(id)-fy ++ fzz_loc(id)=fzz_loc(id)-fz ++ ++c stress tensor for short ranged 1-4 term ++ ++ strs_loc(1)=strs_loc(1)+xad*fx ++ strs_loc(2)=strs_loc(2)+xad*fy ++ strs_loc(3)=strs_loc(3)+xad*fz ++ strs_loc(4)=strs_loc(4)+yad*fy ++ strs_loc(5)=strs_loc(5)+yad*fz ++ strs_loc(6)=strs_loc(6)+zad*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c sum contributions to potentials ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engdih ++ buffer(2)=engc14 ++ buffer(3)=virc14 ++ buffer(4)=engs14 ++ buffer(5)=virs14 ++ buffer(6)=dih_fre ++ buffer(7)=dih_vir ++ buffer(8)=vdw14_vir ++ buffer(9)=cou14_vir ++ call gdsum(buffer(1),9,buffer(10)) ++ engdih=buffer(1) ++ engc14=buffer(2) ++ virc14=buffer(3) ++ engs14=buffer(4) ++ virs14=buffer(5) ++ dih_fre=buffer(6) ++ dih_vir=buffer(7) ++ vdw14_vir=buffer(8) ++ cou14_vir=buffer(9) ++ ++ if(lsolva)then ++ ++ call gdsum(dih_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(dih_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ engcpe=engcpe+engc14 ++ vircpe=vircpe+virc14 ++ engsrp=engsrp+engs14 ++ virsrp=virsrp+virs14 ++ vdw_vir=vdw_vir+vdw14_vir ++ cou_vir=cou_vir+cou14_vir ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,448) ++ ++ deallocate (xdab,ydab,zdab,stat=fail1) ++ deallocate (xdbc,ydbc,zdbc,stat=fail2) ++ deallocate (xdcd,ydcd,zdcd,stat=fail3) ++ ++ return ++ end subroutine dihfrc ++ ++ end module dihedral_module +diff -urN dl_class_1.9.orig/srcmod/dlpoly.f dl_class_1.9/srcmod/dlpoly.f +--- dl_class_1.9.orig/srcmod/dlpoly.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/dlpoly.f 2015-11-16 17:39:33.860700901 +0100 +@@ -0,0 +1,969 @@ ++ program dlpoly_classic ++ ++c*********************************************************************** ++c ++c dl_poly classic is an stfc/ccp5 program package for the ++c dynamical simulation of molecular systems. ++c ++c dl_poly is the copyright of the stfc daresbury laboratory, ++c daresbury, warrington wa4 4ad. ++c ++c neither the stfc, daresbury laboratory, ccp5 nor the authors ++c of this package claim that it is free from errors and do not ++c accept liability for any loss or damage that may arise from ++c its use. it is the users responsibility to verify that the ++c package dl_poly is fit for the purpose the user intends for ++c it. ++c ++c users of this package are recommended to consult the dl_poly ++c user manual for the full description of its use and purpose. ++c ++c authors: w.smith and t.r.forester 1995 ++c copyright daresbury laboratory 1995 ++c ++c DL_POLY CLASSIC VERSION 1.9 ++c ++c*********************************************************************** ++ ++c declare required modules ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use define_system_module ++ use dihedral_module ++ use driver_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use forces_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use integrator_module ++ use inversion_module ++ use metal_module ++ use metafreeze_module ++ use nlist_builders_module ++ use pair_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ character*1 hms,dec ++ character*8 seek ++ ++ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle ++ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb ++ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd ++ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch ++ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect ++ ++ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn ++ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt ++ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj ++ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw ++ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp ++ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k ++ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit ++ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode ++ integer natms2,ntghost,nsolva,isolva,nofic ++ ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd ++ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint ++ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter ++ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom ++ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf ++ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim ++ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen ++ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol ++ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit ++ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl ++ real(8) engord,virord ++ ++c PLUMED modifications ++ real(8) energyUnits,lengthUnits,timeUnits ++ integer(8) get_comms ++c PLUMED modifications ++ ++ real(8), allocatable :: tbuffer(:) ++ integer :: plumedavaiable ++ ++ data timelp/0.d0/,lminnow/.false./,ntrack/10/ ++ data npage,lines/8,0/,recycle/.true./ ++ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ ++ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ ++ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ ++ ++c set up the communications ++ ++ call initcomms() ++ call gsync() ++ ++c determine processor identities ++ ++ call machine(idnode,mxnode) ++ ++c activate for limited-life executable ++ ++CBOMB call bomb(idnode,2008,6,30) ++ ++ allocate (tbuffer(10),stat=memr) ++ ++ call parset(redirect,idnode,mxnode,tbuffer) ++ ++c open main printing file ++ ++ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') ++ if(idnode.eq.0) write (nrite, ++ x "(/,20x,'DL_POLY Classic 1.9', ++ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode ++ ++c allocate arrays for each function ++ ++ call alloc_ang_arrays(idnode) ++ call alloc_bnd_arrays(idnode) ++ call alloc_config_arrays(idnode) ++ call alloc_csh_arrays(idnode) ++ call alloc_dih_arrays(idnode) ++ call alloc_ewald_arrays(idnode) ++ call alloc_exc_arrays(idnode) ++ call alloc_exi_arrays(idnode) ++ call alloc_fbp_arrays(idnode) ++ call alloc_fld_arrays(idnode) ++ call alloc_free_arrays(idnode) ++ call alloc_hke_arrays(idnode) ++ call alloc_hyper_arrays(idnode) ++ call alloc_inv_arrays(idnode) ++ call alloc_met_arrays(idnode) ++ call alloc_pair_arrays(idnode) ++ call alloc_pmf_arrays(idnode) ++ call alloc_prp_arrays(idnode) ++ call alloc_rgbdy_arrays(idnode) ++ call alloc_shake_arrays(idnode) ++ call alloc_site_arrays(idnode) ++ call alloc_sol_arrays(idnode) ++ call alloc_spme_arrays(idnode) ++ call alloc_tbp_arrays(idnode) ++ call alloc_ter_arrays(idnode) ++ call alloc_tet_arrays(idnode) ++ call alloc_vdw_arrays(idnode) ++ ++c start clock ++ ++ call timchk(0,tzero) ++ ++c input the control parameters defining the simulation ++ ++ call simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c input the system force field ++ ++ call sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) ++ ++c construct initial configuration of system ++ ++ call sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c construct initial bookkeeping arrays ++ ++ call sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c reset atom numbers for excitation simulation ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c set initial system temperature ++ ++ call systemp ++ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c read thermodynamic and structural data from restart file ++ ++ call sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c metadynamics by d. quigley ++ ++ if(lmetadyn) ++ x call define_metadynamics(idnode,mxnode,natms,temp) ++ ++c synchronise LRC, SIC and system charge terms for switching ++ ++ llswitch=.false. ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod((nstep-nswitch)/niswitch,2).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.true. ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c PLUMED modifications ++ if(lplumed)then ++ ++ call plumed_f_installed(plumedavaiable) ++ ++ if (plumedavaiable<=0) then ++ if(idnode.eq.0) write(nrite,*)"PLUMED NOT AVAILABLE" ++ stop ++ else ++ call plumed_f_gcreate() ++ call plumed_f_gcmd("setMPIFComm"//char(0),get_comms()) ++ call plumed_f_gcmd("setRealPrecision"//char(0),8) ++ energyUnits=0.01 ++ lengthUnits=0.1 ++ timeUnits=1 ++ call plumed_f_gcmd("setMDEnergyUnits"//char(0),energyUnits) ++ call plumed_f_gcmd("setMDLengthUnits"//char(0),lengthUnits) ++ call plumed_f_gcmd("setMDTimeUnits"//char(0),timeUnits) ++ call plumed_f_gcmd("setPlumedDat"//char(0),"plumed.dat"//char(0)) ++ call plumed_f_gcmd("setLogFile"//char(0),"PLUMED.OUT"//char(0)) ++ call plumed_f_gcmd("setNatoms"//char(0),natms) ++ call plumed_f_gcmd("setMDEngine"//char(0),"dlpoly2.20"//char(0)) ++ call plumed_f_gcmd("setTimestep"//char(0),tstep) ++ call plumed_f_gcmd("init"//char(0),0) ++ end if ++ endif ++ ++c PLUMED modifications ++ ++c zero long range component of stress ++ ++ do i=1,9 ++ stresl(i)=0.d0 ++ enddo ++ ++c zero contraint terms ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ if(lminim.or.loptim.or.ntcons.eq.0)then ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c define target kinetic energy ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++c metadynamics by d. quigley ++ ++ sigma_shl=boltz*degshl*0.5d0 ++ ++c convert BPD parameters to internal units ++ ++ if(lbpd)then ++ ++ ebias=0.5d0*boltz*degfre*ebias ++ vmin=0.5d0*boltz*degfre*vmin ++ ++ endif ++ ++c time check ++ ++ call timchk(1,tzero) ++ ++c control variable for structure optimizer ++ ++ keystr=0 ++ stropt=.false. ++ ++ if(lminim)then ++ ++c first step of minimisation programme ++ ++ if(idnode.eq.0)write(nrite,"(1x,120('-'))") ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++c calculate initial conditions for velocity verlet ++ ++ elseif(keyver.eq.1.and.nstep.eq.0)then ++ ++c kinetic stress tensor at start ++ ++ call dcell(cell,celprp) ++ width=min(celprp(7),celprp(8),celprp(9)) ++ call kinstress(natms,idnode,mxnode,stress) ++ engke=0.5d0*(stress(1)+stress(5)+stress(9)) ++ do i=1,9 ++ stress(i)=stress(i)/dble(mxnode) ++ enddo ++ ++c calculate initial forces ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++ endif ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++c construct the first reference state ++ ++ call hyper_start ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, ++ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, ++ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, ++ x hyp_units) ++ ++ endif ++ ++c perform selected NEB calculation ++ ++ if(lneb)then ++ ++ do i=1,numneb ++ ++ call neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), ++ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++ call scan_profile(nturn,estar) ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(1x,120('-'))") ++ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') ++ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ enddo ++ ++c bypass the MD cycle for this option ++ ++ recycle=.false. ++ ++ endif ++ ++c*********************************************************************** ++c start of molecular dynamics calculations ++c*********************************************************************** ++ ++ do while(recycle) ++ ++c increase step counter ++ ++ nstep=nstep+1 ++ recycle=(nstep.lt.nstrun) ++ ++c store velocities for free energy or solvation simulation ++ ++ if(keyver.eq.0)then ++ ++ if(lsolva)then ++ ++ vxo_sol(:)=vxx(:) ++ vyo_sol(:)=vyy(:) ++ vzo_sol(:)=vzz(:) ++ ++ elseif(lfree)then ++ ++ vxo_fre(:)=vxx(:) ++ vyo_fre(:)=vyy(:) ++ vzo_fre(:)=vzz(:) ++ ++ endif ++ ++ endif ++ ++c molecular switching option for excitation ++ ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod(nstep-nswitch,niswitch).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.not.llswitch ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c switch on the minimiser ++ ++ if(lminim)then ++ ++ lminnow=(mod(nstep,minstp).eq.0) ++ ++ endif ++ ++c conserved quantity (other than K + U) ++ ++ consv=0.d0 ++ ++c energy accumulators ++ ++ if(.not.lminnow)then ++ ++ engke=0.d0 ++ engrot=0.d0 ++ ++ endif ++ ++c calculate volume of simulation cell ++ ++ if(imcon.ne.0.and.imcon.ne.6)then ++ ++ call dcell(cell,celprp) ++ volm=celprp(10) ++ if(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ endif ++ ++ else ++ ++ volm=0.d0 ++ ++ endif ++ ++c reset sutton chen long range corrections (constant pressure only) ++ ++ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++c activate the impact option at designated time step ++ ++ if(lhit.and.nstep.eq.nhit)call impact ++ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) ++ ++c integrate equations of motion stage 1 of velocity verlet ++ ++ if(keyver.gt.0)then ++ ++ isw=1 ++ if(.not.loptim)then ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++ call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++ endif ++ ++ if(lminnow)then ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++ elseif(loptim.or.keyshl.ne.2)then ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++ else ++ ++ call shell_relaxation ++ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, ++ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, ++ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, ++ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, ++ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, ++ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, ++ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, ++ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, ++ x pass1,pass2,engord,virord) ++ ++ endif ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++c switching option for excitation simulation ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++c integrate equations of motion ++ ++ if(keyver.eq.0)then ++ ++c integrate equations of motion by leapfrog verlet ++ ++ if(.not.(loptim.or.lminnow))call lf_integrate ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) ++ ++ else if(keyver.gt.0)then ++ ++c integrate equations of motion by velocity verlet (stage 2) ++ ++ isw=2 ++ if(.not.loptim)call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ endif ++ ++c update the atomic positions for the ghost molecule ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++c long range correction adjustment for free energy and solvation ++ ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++c application of transition analysis procedures ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++ engtke=engke+engrot ++ call hyper_driver ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, ++ x tolnce,hyp_units,ebias,vmin) ++ ++ endif ++ ++c reset average boost factor in BPD during equilibration ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numbpd=0 ++ tboost=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate shell kinetic energy ++ ++ if(keyshl.eq.1)then ++ ++ call corshl(idnode,mxnode,ntshl,shlke) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++c apply temperature scaling ++ ++ if((ltscal.and.nstep.le.nsteql).and. ++ x mod(nstep-nsteql,nstbts).eq.0)then ++ ++ chit=0.d0 ++ chit_shl=0.d0 ++ chip=0.d0 ++ do i=1,9 ++ eta(i)=0.d0 ++ enddo ++ ++ if(keyshl.eq.1) then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c reset atom velocities at intervals if required ++ ++ if(newgau)then ++ ++ if(mod(nstep,numgau).eq.0)call regauss ++ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++ endif ++ ++c calculate physical quantities ++ ++ if(nstep.gt.0)call static ++ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) ++ ++c z density calculation ++ ++ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then ++ ++ call zden0(idnode,natms,mxnode,nzden,zlen) ++ ++ endif ++ ++c terminate program if boundary conditions violated ++ ++ if(imcon.gt.0.and.rcut.gt.width)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ call error(idnode,95) ++ ++ endif ++ ++c line-printer output every nstbpo steps ++ ++ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then ++ ++ call timchk(0,timelp) ++ if(idnode.eq.0)then ++ ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) ++ if(mod(lines,npage).eq.0) ++ x write(nrite,"(1x,120('-'), ++ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, ++ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', ++ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, ++ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', ++ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', ++ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, ++ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', ++ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', ++ x 7x,'press',/,/, ++ x 1x,120('-'))") ++ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)") ++ x nstep,(stpval(i),i=1,9), ++ x simtim,dec,(stpval(i),i=10,18), ++ x prntim,hms,(stpval(i),i=19,27) ++ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', ++ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ lines=lines+1 ++ ++ endif ++ ++c report end of equilibration period ++ ++ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then ++ ++ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) ++ x write(nrite,"(/,/,1x,'switching off temperature ', ++ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep ++ ltscal=.false. ++ ++ endif ++ ++c write trajectory data ++ ++ if(ltraj.and.nstep.ge.nstraj) then ++ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then ++ ++ call traject ++ x (ltraj,idnode,imcon,istraj,keytrj,natms, ++ x nstraj,nstep,tstep) ++ ++ endif ++ ++ endif ++ ++c write solvation energy file ++ ++ if(lsolva.and.nstep.ge.nsolva)then ++ ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ call solva_temp(idnode,mxnode,natms2,keyver) ++ call solvation_write(lexcite,lswitch,idnode,natms, ++ x nstep,nsolva,isolva,tstep,engunit,elrc) ++ ++ endif ++ ++ endif ++ ++c write free energy file ++ ++ if(lfree.and.nstep.ge.nfrn)then ++ ++ if(mod(nstep-nfrn,ifrn).eq.0)then ++ ++ call free_kinetic(lfrmas,idnode,mxnode,keyver) ++ call free_energy_write(idnode,nstep,engunit) ++ ++ endif ++ ++ endif ++ ++c save restart data in event of system crash ++ ++ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++ endif ++ ++c cycle time check ++ ++ call timchk(0,timelp) ++ recycle=(recycle.and.timjob-timelp.gt.timcls) ++ ++ enddo ++ ++c*********************************************************************** ++c end of molecular dynamics calculations ++c*********************************************************************** ++ ++c last time check ++ ++ call timchk(0,timelp) ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, ++ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") ++ x timelp,prntim,hms,timcls ++ ++c shell relaxation convergence statistics ++ ++ if(.not.loptim.and.keyshl.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'shell relaxation statistics : average cycles = ', ++ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 ++ ++ endif ++ ++c produce summary of simulation ++ ++c PLUMED ++ if(lplumed) call plumed_f_gcmd() ++c PLUMED ++ ++ levcfg=2 ++ if(loptim)levcfg=0 ++ if(.not.lneb)call result ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, ++ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, ++ x chit_shl) ++ ++c write hyperdynamics restart file ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++c close output channels ++ ++ if(idnode.eq.0) then ++ ++ close (nrite) ++ close (nstats) ++ close (nhist) ++ close (nevnt) ++ ++ endif ++ ++c terminate job ++ ++ call exitcomms() ++ ++ end +diff -urN dl_class_1.9.orig/srcmod/dlpoly.f~ dl_class_1.9/srcmod/dlpoly.f~ +--- dl_class_1.9.orig/srcmod/dlpoly.f~ 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/dlpoly.f~ 2015-11-16 17:31:56.327749683 +0100 +@@ -0,0 +1,969 @@ ++ program dlpoly_classic ++ ++c*********************************************************************** ++c ++c dl_poly classic is an stfc/ccp5 program package for the ++c dynamical simulation of molecular systems. ++c ++c dl_poly is the copyright of the stfc daresbury laboratory, ++c daresbury, warrington wa4 4ad. ++c ++c neither the stfc, daresbury laboratory, ccp5 nor the authors ++c of this package claim that it is free from errors and do not ++c accept liability for any loss or damage that may arise from ++c its use. it is the users responsibility to verify that the ++c package dl_poly is fit for the purpose the user intends for ++c it. ++c ++c users of this package are recommended to consult the dl_poly ++c user manual for the full description of its use and purpose. ++c ++c authors: w.smith and t.r.forester 1995 ++c copyright daresbury laboratory 1995 ++c ++c DL_POLY CLASSIC VERSION 1.9 ++c ++c*********************************************************************** ++ ++c declare required modules ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use define_system_module ++ use dihedral_module ++ use driver_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use forces_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use integrator_module ++ use inversion_module ++ use metal_module ++ use metafreeze_module ++ use nlist_builders_module ++ use pair_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ character*1 hms,dec ++ character*8 seek ++ ++ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle ++ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb ++ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd ++ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch ++ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect ++ ++ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn ++ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt ++ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj ++ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw ++ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp ++ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k ++ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit ++ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode ++ integer natms2,ntghost,nsolva,isolva,nofic ++ ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd ++ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint ++ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter ++ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom ++ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf ++ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim ++ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen ++ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol ++ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit ++ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl ++ real(8) engord,virord ++ ++c PLUMED modifications ++ real(8) energyUnits,lengthUnits,timeUnits ++ integer(8) get_comms ++c PLUMED modifications ++ ++ real(8), allocatable :: tbuffer(:) ++ integer :: plumedavaiable ++ ++ data timelp/0.d0/,lminnow/.false./,ntrack/10/ ++ data npage,lines/8,0/,recycle/.true./ ++ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ ++ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ ++ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ ++ ++c set up the communications ++ ++ call initcomms() ++ call gsync() ++ ++c determine processor identities ++ ++ call machine(idnode,mxnode) ++ ++c activate for limited-life executable ++ ++CBOMB call bomb(idnode,2008,6,30) ++ ++ allocate (tbuffer(10),stat=memr) ++ ++ call parset(redirect,idnode,mxnode,tbuffer) ++ ++c open main printing file ++ ++ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') ++ if(idnode.eq.0) write (nrite, ++ x "(/,20x,'DL_POLY Classic 1.9', ++ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode ++ ++c allocate arrays for each function ++ ++ call alloc_ang_arrays(idnode) ++ call alloc_bnd_arrays(idnode) ++ call alloc_config_arrays(idnode) ++ call alloc_csh_arrays(idnode) ++ call alloc_dih_arrays(idnode) ++ call alloc_ewald_arrays(idnode) ++ call alloc_exc_arrays(idnode) ++ call alloc_exi_arrays(idnode) ++ call alloc_fbp_arrays(idnode) ++ call alloc_fld_arrays(idnode) ++ call alloc_free_arrays(idnode) ++ call alloc_hke_arrays(idnode) ++ call alloc_hyper_arrays(idnode) ++ call alloc_inv_arrays(idnode) ++ call alloc_met_arrays(idnode) ++ call alloc_pair_arrays(idnode) ++ call alloc_pmf_arrays(idnode) ++ call alloc_prp_arrays(idnode) ++ call alloc_rgbdy_arrays(idnode) ++ call alloc_shake_arrays(idnode) ++ call alloc_site_arrays(idnode) ++ call alloc_sol_arrays(idnode) ++ call alloc_spme_arrays(idnode) ++ call alloc_tbp_arrays(idnode) ++ call alloc_ter_arrays(idnode) ++ call alloc_tet_arrays(idnode) ++ call alloc_vdw_arrays(idnode) ++ ++c start clock ++ ++ call timchk(0,tzero) ++ ++c input the control parameters defining the simulation ++ ++ call simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c input the system force field ++ ++ call sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) ++ ++c construct initial configuration of system ++ ++ call sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c construct initial bookkeeping arrays ++ ++ call sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c reset atom numbers for excitation simulation ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c set initial system temperature ++ ++ call systemp ++ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c read thermodynamic and structural data from restart file ++ ++ call sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c metadynamics by d. quigley ++ ++ if(lmetadyn) ++ x call define_metadynamics(idnode,mxnode,natms,temp) ++ ++c synchronise LRC, SIC and system charge terms for switching ++ ++ llswitch=.false. ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod((nstep-nswitch)/niswitch,2).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.true. ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c PLUMED modifications ++ if(lplumed)then ++ ++ call plumed_f_installed(plumedavaiable) ++ ++ if (plumedavaiable<=0) then ++ if(idnode.eq.0) write(nrite,*)"PLUMED NOT AVAILABLE" ++ stop ++ else ++ call plumed_f_gcreate() ++ call plumed_f_gcmd("setMPIFComm"//char(0),get_comms()) ++ call plumed_f_gcmd("setRealPrecision"//char(0),8) ++ energyUnits=0.01 ++ lengthUnits=0.1 ++ timeUnits=1 ++ call plumed_f_gcmd("setMDEnergyUnits"//char(0),energyUnits) ++ call plumed_f_gcmd("setMDLengthUnits"//char(0),lengthUnits) ++ call plumed_f_gcmd("setMDTimeUnits"//char(0),timeUnits) ++ call plumed_f_gcmd("setPlumedDat"//char(0),"plumed.dat"//char(0)) ++ call plumed_f_gcmd("setLogFile"//char(0),"PLUMED.OUT"//char(0)) ++ call plumed_f_gcmd("setNatoms"//char(0),natms) ++ call plumed_f_gcmd("setMDEngine"//char(0),"dlpoly2.20"//char(0)) ++ call plumed_f_gcmd("setTimestep"//char(0),tstep) ++ call plumed_f_gcmd("init"//char(0),0) ++ end if ++ endif ++ ++c PLUMED modifications ++ ++c zero long range component of stress ++ ++ do i=1,9 ++ stresl(i)=0.d0 ++ enddo ++ ++c zero contraint terms ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ if(lminim.or.loptim.or.ntcons.eq.0)then ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c define target kinetic energy ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++c metadynamics by d. quigley ++ ++ sigma_shl=boltz*degshl*0.5d0 ++ ++c convert BPD parameters to internal units ++ ++ if(lbpd)then ++ ++ ebias=0.5d0*boltz*degfre*ebias ++ vmin=0.5d0*boltz*degfre*vmin ++ ++ endif ++ ++c time check ++ ++ call timchk(1,tzero) ++ ++c control variable for structure optimizer ++ ++ keystr=0 ++ stropt=.false. ++ ++ if(lminim)then ++ ++c first step of minimisation programme ++ ++ if(idnode.eq.0)write(nrite,"(1x,120('-'))") ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++c calculate initial conditions for velocity verlet ++ ++ elseif(keyver.eq.1.and.nstep.eq.0)then ++ ++c kinetic stress tensor at start ++ ++ call dcell(cell,celprp) ++ width=min(celprp(7),celprp(8),celprp(9)) ++ call kinstress(natms,idnode,mxnode,stress) ++ engke=0.5d0*(stress(1)+stress(5)+stress(9)) ++ do i=1,9 ++ stress(i)=stress(i)/dble(mxnode) ++ enddo ++ ++c calculate initial forces ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++ endif ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++c construct the first reference state ++ ++ call hyper_start ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, ++ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, ++ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, ++ x hyp_units) ++ ++ endif ++ ++c perform selected NEB calculation ++ ++ if(lneb)then ++ ++ do i=1,numneb ++ ++ call neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), ++ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++ call scan_profile(nturn,estar) ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(1x,120('-'))") ++ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') ++ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ enddo ++ ++c bypass the MD cycle for this option ++ ++ recycle=.false. ++ ++ endif ++ ++c*********************************************************************** ++c start of molecular dynamics calculations ++c*********************************************************************** ++ ++ do while(recycle) ++ ++c increase step counter ++ ++ nstep=nstep+1 ++ recycle=(nstep.lt.nstrun) ++ ++c store velocities for free energy or solvation simulation ++ ++ if(keyver.eq.0)then ++ ++ if(lsolva)then ++ ++ vxo_sol(:)=vxx(:) ++ vyo_sol(:)=vyy(:) ++ vzo_sol(:)=vzz(:) ++ ++ elseif(lfree)then ++ ++ vxo_fre(:)=vxx(:) ++ vyo_fre(:)=vyy(:) ++ vzo_fre(:)=vzz(:) ++ ++ endif ++ ++ endif ++ ++c molecular switching option for excitation ++ ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod(nstep-nswitch,niswitch).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.not.llswitch ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c switch on the minimiser ++ ++ if(lminim)then ++ ++ lminnow=(mod(nstep,minstp).eq.0) ++ ++ endif ++ ++c conserved quantity (other than K + U) ++ ++ consv=0.d0 ++ ++c energy accumulators ++ ++ if(.not.lminnow)then ++ ++ engke=0.d0 ++ engrot=0.d0 ++ ++ endif ++ ++c calculate volume of simulation cell ++ ++ if(imcon.ne.0.and.imcon.ne.6)then ++ ++ call dcell(cell,celprp) ++ volm=celprp(10) ++ if(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ endif ++ ++ else ++ ++ volm=0.d0 ++ ++ endif ++ ++c reset sutton chen long range corrections (constant pressure only) ++ ++ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++c activate the impact option at designated time step ++ ++ if(lhit.and.nstep.eq.nhit)call impact ++ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) ++ ++c integrate equations of motion stage 1 of velocity verlet ++ ++ if(keyver.gt.0)then ++ ++ isw=1 ++ if(.not.loptim)then ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++ call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++ endif ++ ++ if(lminnow)then ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++ elseif(loptim.or.keyshl.ne.2)then ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++ else ++ ++ call shell_relaxation ++ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, ++ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, ++ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, ++ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, ++ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, ++ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, ++ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, ++ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, ++ x pass1,pass2,engord,virord) ++ ++ endif ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++c switching option for excitation simulation ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++c integrate equations of motion ++ ++ if(keyver.eq.0)then ++ ++c integrate equations of motion by leapfrog verlet ++ ++ if(.not.(loptim.or.lminnow))call lf_integrate ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) ++ ++ else if(keyver.gt.0)then ++ ++c integrate equations of motion by velocity verlet (stage 2) ++ ++ isw=2 ++ if(.not.loptim)call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ endif ++ ++c update the atomic positions for the ghost molecule ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++c long range correction adjustment for free energy and solvation ++ ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++c application of transition analysis procedures ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++ engtke=engke+engrot ++ call hyper_driver ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, ++ x tolnce,hyp_units,ebias,vmin) ++ ++ endif ++ ++c reset average boost factor in BPD during equilibration ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numbpd=0 ++ tboost=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate shell kinetic energy ++ ++ if(keyshl.eq.1)then ++ ++ call corshl(idnode,mxnode,ntshl,shlke) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++c apply temperature scaling ++ ++ if((ltscal.and.nstep.le.nsteql).and. ++ x mod(nstep-nsteql,nstbts).eq.0)then ++ ++ chit=0.d0 ++ chit_shl=0.d0 ++ chip=0.d0 ++ do i=1,9 ++ eta(i)=0.d0 ++ enddo ++ ++ if(keyshl.eq.1) then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c reset atom velocities at intervals if required ++ ++ if(newgau)then ++ ++ if(mod(nstep,numgau).eq.0)call regauss ++ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++ endif ++ ++c calculate physical quantities ++ ++ if(nstep.gt.0)call static ++ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) ++ ++c z density calculation ++ ++ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then ++ ++ call zden0(idnode,natms,mxnode,nzden,zlen) ++ ++ endif ++ ++c terminate program if boundary conditions violated ++ ++ if(imcon.gt.0.and.rcut.gt.width)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ call error(idnode,95) ++ ++ endif ++ ++c line-printer output every nstbpo steps ++ ++ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then ++ ++ call timchk(0,timelp) ++ if(idnode.eq.0)then ++ ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) ++ if(mod(lines,npage).eq.0) ++ x write(nrite,"(1x,120('-'), ++ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, ++ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', ++ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, ++ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', ++ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', ++ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, ++ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', ++ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', ++ x 7x,'press',/,/, ++ x 1x,120('-'))") ++ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)") ++ x nstep,(stpval(i),i=1,9), ++ x simtim,dec,(stpval(i),i=10,18), ++ x prntim,hms,(stpval(i),i=19,27) ++ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', ++ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ lines=lines+1 ++ ++ endif ++ ++c report end of equilibration period ++ ++ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then ++ ++ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) ++ x write(nrite,"(/,/,1x,'switching off temperature ', ++ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep ++ ltscal=.false. ++ ++ endif ++ ++c write trajectory data ++ ++ if(ltraj.and.nstep.ge.nstraj) then ++ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then ++ ++ call traject ++ x (ltraj,idnode,imcon,istraj,keytrj,natms, ++ x nstraj,nstep,tstep) ++ ++ endif ++ ++ endif ++ ++c write solvation energy file ++ ++ if(lsolva.and.nstep.ge.nsolva)then ++ ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ call solva_temp(idnode,mxnode,natms2,keyver) ++ call solvation_write(lexcite,lswitch,idnode,natms, ++ x nstep,nsolva,isolva,tstep,engunit,elrc) ++ ++ endif ++ ++ endif ++ ++c write free energy file ++ ++ if(lfree.and.nstep.ge.nfrn)then ++ ++ if(mod(nstep-nfrn,ifrn).eq.0)then ++ ++ call free_kinetic(lfrmas,idnode,mxnode,keyver) ++ call free_energy_write(idnode,nstep,engunit) ++ ++ endif ++ ++ endif ++ ++c save restart data in event of system crash ++ ++ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++ endif ++ ++c cycle time check ++ ++ call timchk(0,timelp) ++ recycle=(recycle.and.timjob-timelp.gt.timcls) ++ ++ enddo ++ ++c*********************************************************************** ++c end of molecular dynamics calculations ++c*********************************************************************** ++ ++c last time check ++ ++ call timchk(0,timelp) ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, ++ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") ++ x timelp,prntim,hms,timcls ++ ++c shell relaxation convergence statistics ++ ++ if(.not.loptim.and.keyshl.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'shell relaxation statistics : average cycles = ', ++ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 ++ ++ endif ++ ++c produce summary of simulation ++ ++ levcfg=2 ++ if(loptim)levcfg=0 ++ if(.not.lneb)call result ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, ++ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, ++ x chit_shl) ++ ++c PLUMED ++ if(lplumed) call plumed_f_gcmd() ++c PLUMED ++ ++c write hyperdynamics restart file ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++c close output channels ++ ++ if(idnode.eq.0) then ++ ++ close (nrite) ++ close (nstats) ++ close (nhist) ++ close (nevnt) ++ ++ endif ++ ++c terminate job ++ ++ call exitcomms() ++ ++ end +diff -urN dl_class_1.9.orig/srcmod/dlpoly.f.preplumed dl_class_1.9/srcmod/dlpoly.f.preplumed +--- dl_class_1.9.orig/srcmod/dlpoly.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/dlpoly.f.preplumed 2012-04-10 16:32:54.000000000 +0200 +@@ -0,0 +1,929 @@ ++ program dlpoly_classic ++ ++c*********************************************************************** ++c ++c dl_poly classic is an stfc/ccp5 program package for the ++c dynamical simulation of molecular systems. ++c ++c dl_poly is the copyright of the stfc daresbury laboratory, ++c daresbury, warrington wa4 4ad. ++c ++c neither the stfc, daresbury laboratory, ccp5 nor the authors ++c of this package claim that it is free from errors and do not ++c accept liability for any loss or damage that may arise from ++c its use. it is the users responsibility to verify that the ++c package dl_poly is fit for the purpose the user intends for ++c it. ++c ++c users of this package are recommended to consult the dl_poly ++c user manual for the full description of its use and purpose. ++c ++c authors: w.smith and t.r.forester 1995 ++c copyright daresbury laboratory 1995 ++c ++c DL_POLY CLASSIC VERSION 1.9 ++c ++c*********************************************************************** ++ ++c declare required modules ++ ++ use angles_module ++ use bonds_module ++ use config_module ++ use core_shell_module ++ use define_system_module ++ use dihedral_module ++ use driver_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use forces_module ++ use four_body_module ++ use hkewald_module ++ use hyper_dynamics_module ++ use integrator_module ++ use inversion_module ++ use metal_module ++ use metafreeze_module ++ use nlist_builders_module ++ use pair_module ++ use pmf_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use solvation_module ++ use spme_module ++ use temp_scalers_module ++ use tersoff_module ++ use tether_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ character*1 hms,dec ++ character*8 seek ++ ++ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle ++ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb ++ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd ++ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch ++ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect ++ ++ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn ++ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt ++ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj ++ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw ++ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp ++ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree ++ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k ++ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit ++ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode ++ integer natms2,ntghost,nsolva,isolva,nofic ++ ++ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup ++ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd ++ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint ++ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter ++ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom ++ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf ++ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim ++ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen ++ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol ++ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit ++ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl ++ real(8) engord,virord ++ real(8), allocatable :: tbuffer(:) ++ ++ data timelp/0.d0/,lminnow/.false./,ntrack/10/ ++ data npage,lines/8,0/,recycle/.true./ ++ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ ++ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ ++ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ ++ ++c set up the communications ++ ++ call initcomms() ++ call gsync() ++ ++c determine processor identities ++ ++ call machine(idnode,mxnode) ++ ++c activate for limited-life executable ++ ++CBOMB call bomb(idnode,2008,6,30) ++ ++ allocate (tbuffer(10),stat=memr) ++ ++ call parset(redirect,idnode,mxnode,tbuffer) ++ ++c open main printing file ++ ++ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') ++ if(idnode.eq.0) write (nrite, ++ x "(/,20x,'DL_POLY Classic 1.9', ++ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode ++ ++c allocate arrays for each function ++ ++ call alloc_ang_arrays(idnode) ++ call alloc_bnd_arrays(idnode) ++ call alloc_config_arrays(idnode) ++ call alloc_csh_arrays(idnode) ++ call alloc_dih_arrays(idnode) ++ call alloc_ewald_arrays(idnode) ++ call alloc_exc_arrays(idnode) ++ call alloc_exi_arrays(idnode) ++ call alloc_fbp_arrays(idnode) ++ call alloc_fld_arrays(idnode) ++ call alloc_free_arrays(idnode) ++ call alloc_hke_arrays(idnode) ++ call alloc_hyper_arrays(idnode) ++ call alloc_inv_arrays(idnode) ++ call alloc_met_arrays(idnode) ++ call alloc_pair_arrays(idnode) ++ call alloc_pmf_arrays(idnode) ++ call alloc_prp_arrays(idnode) ++ call alloc_rgbdy_arrays(idnode) ++ call alloc_shake_arrays(idnode) ++ call alloc_site_arrays(idnode) ++ call alloc_sol_arrays(idnode) ++ call alloc_spme_arrays(idnode) ++ call alloc_tbp_arrays(idnode) ++ call alloc_ter_arrays(idnode) ++ call alloc_tet_arrays(idnode) ++ call alloc_vdw_arrays(idnode) ++ ++c start clock ++ ++ call timchk(0,tzero) ++ ++c input the control parameters defining the simulation ++ ++ call simdef ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) ++ ++c input the system force field ++ ++ call sysdef ++ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, ++ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) ++ ++ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) ++ ++c construct initial configuration of system ++ ++ call sysgen ++ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, ++ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) ++ ++c construct initial bookkeeping arrays ++ ++ call sysbook ++ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, ++ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, ++ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, ++ x ntghost,degfre,degrot) ++ ++c reset atom numbers for excitation simulation ++ ++ if(lghost)then ++ natms2=natms-ntghost ++ else ++ natms2=natms ++ endif ++ ++c set initial system temperature ++ ++ call systemp ++ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, ++ x tolnce) ++ ++c read thermodynamic and structural data from restart file ++ ++ call sysinit ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, ++ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, ++ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) ++ ++c metadynamics by d. quigley ++ ++ if(lmetadyn) ++ x call define_metadynamics(idnode,mxnode,natms,temp) ++ ++c synchronise LRC, SIC and system charge terms for switching ++ ++ llswitch=.false. ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod((nstep-nswitch)/niswitch,2).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.true. ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c zero long range component of stress ++ ++ do i=1,9 ++ stresl(i)=0.d0 ++ enddo ++ ++c zero contraint terms ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ if(lminim.or.loptim.or.ntcons.eq.0)then ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c define target kinetic energy ++ ++ sigma=temp*boltz*degfre*0.5d0 ++ ++c metadynamics by d. quigley ++ ++ sigma_shl=boltz*degshl*0.5d0 ++ ++c convert BPD parameters to internal units ++ ++ if(lbpd)then ++ ++ ebias=0.5d0*boltz*degfre*ebias ++ vmin=0.5d0*boltz*degfre*vmin ++ ++ endif ++ ++c time check ++ ++ call timchk(1,tzero) ++ ++c control variable for structure optimizer ++ ++ keystr=0 ++ stropt=.false. ++ ++ if(lminim)then ++ ++c first step of minimisation programme ++ ++ if(idnode.eq.0)write(nrite,"(1x,120('-'))") ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++c calculate initial conditions for velocity verlet ++ ++ elseif(keyver.eq.1.and.nstep.eq.0)then ++ ++c kinetic stress tensor at start ++ ++ call dcell(cell,celprp) ++ width=min(celprp(7),celprp(8),celprp(9)) ++ call kinstress(natms,idnode,mxnode,stress) ++ engke=0.5d0*(stress(1)+stress(5)+stress(9)) ++ do i=1,9 ++ stress(i)=stress(i)/dble(mxnode) ++ enddo ++ ++c calculate initial forces ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++ endif ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++c construct the first reference state ++ ++ call hyper_start ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, ++ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, ++ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, ++ x hyp_units) ++ ++ endif ++ ++c perform selected NEB calculation ++ ++ if(lneb)then ++ ++ do i=1,numneb ++ ++ call neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), ++ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++ call scan_profile(nturn,estar) ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(1x,120('-'))") ++ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') ++ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ enddo ++ ++c bypass the MD cycle for this option ++ ++ recycle=.false. ++ ++ endif ++ ++c*********************************************************************** ++c start of molecular dynamics calculations ++c*********************************************************************** ++ ++ do while(recycle) ++ ++c increase step counter ++ ++ nstep=nstep+1 ++ recycle=(nstep.lt.nstrun) ++ ++c store velocities for free energy or solvation simulation ++ ++ if(keyver.eq.0)then ++ ++ if(lsolva)then ++ ++ vxo_sol(:)=vxx(:) ++ vyo_sol(:)=vyy(:) ++ vzo_sol(:)=vzz(:) ++ ++ elseif(lfree)then ++ ++ vxo_fre(:)=vxx(:) ++ vyo_fre(:)=vyy(:) ++ vzo_fre(:)=vzz(:) ++ ++ endif ++ ++ endif ++ ++c molecular switching option for excitation ++ ++ if(lswitch)then ++ ++ if(nstep.ge.nswitch)then ++ ++ if(mod(nstep-nswitch,niswitch).eq.0)then ++ ++ call switch_atm(lfrmas) ++ call switch(elrc,virlrc) ++ llswitch=.not.llswitch ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c switch on the minimiser ++ ++ if(lminim)then ++ ++ lminnow=(mod(nstep,minstp).eq.0) ++ ++ endif ++ ++c conserved quantity (other than K + U) ++ ++ consv=0.d0 ++ ++c energy accumulators ++ ++ if(.not.lminnow)then ++ ++ engke=0.d0 ++ engrot=0.d0 ++ ++ endif ++ ++c calculate volume of simulation cell ++ ++ if(imcon.ne.0.and.imcon.ne.6)then ++ ++ call dcell(cell,celprp) ++ volm=celprp(10) ++ if(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ endif ++ ++ else ++ ++ volm=0.d0 ++ ++ endif ++ ++c reset sutton chen long range corrections (constant pressure only) ++ ++ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) ++ ++ endif ++ ++c activate the impact option at designated time step ++ ++ if(lhit.and.nstep.eq.nhit)call impact ++ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) ++ ++c integrate equations of motion stage 1 of velocity verlet ++ ++ if(keyver.gt.0)then ++ ++ isw=1 ++ if(.not.loptim)then ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++ call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++ endif ++ ++ if(lminnow)then ++ ++ call minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++ elseif(loptim.or.keyshl.ne.2)then ++ ++ call molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, ++ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, ++ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, ++ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, ++ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, ++ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, ++ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, ++ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) ++ ++ else ++ ++ call shell_relaxation ++ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, ++ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, ++ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, ++ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, ++ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, ++ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, ++ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, ++ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, ++ x pass1,pass2,engord,virord) ++ ++ endif ++ ++c bias potential dynamics option - reset forces ++ ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++c switching option for excitation simulation ++ ++ if(llswitch)call copy_force(idnode,mxnode) ++ ++c integrate equations of motion ++ ++ if(keyver.eq.0)then ++ ++c integrate equations of motion by leapfrog verlet ++ ++ if(.not.(loptim.or.lminnow))call lf_integrate ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) ++ ++ else if(keyver.gt.0)then ++ ++c integrate equations of motion by velocity verlet (stage 2) ++ ++ isw=2 ++ if(.not.loptim)call vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) ++ ++ endif ++ ++c update the atomic positions for the ghost molecule ++ ++ if(lghost)call update_ghost(idnode,mxnode) ++ ++c long range correction adjustment for free energy and solvation ++ ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++ if(lfree.or.lghost) ++ x call lrcorrect_fre(lfree,volm,elrc,virlrc) ++ if(lsolva)call lrcorrect_sol(lghost,volm) ++ ++c application of transition analysis procedures ++ ++ if(ltad.or.(lbpd.and.keybpd.eq.2))then ++ ++ engtke=engke+engrot ++ call hyper_driver ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, ++ x tolnce,hyp_units,ebias,vmin) ++ ++ endif ++ ++c reset average boost factor in BPD during equilibration ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numbpd=0 ++ tboost=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate shell kinetic energy ++ ++ if(keyshl.eq.1)then ++ ++ call corshl(idnode,mxnode,ntshl,shlke) ++ ++ endif ++ ++c scale t=0 tether reference positions (constant pressure only) ++ ++ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then ++ ++ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++ endif ++ ++c apply temperature scaling ++ ++ if((ltscal.and.nstep.le.nsteql).and. ++ x mod(nstep-nsteql,nstbts).eq.0)then ++ ++ chit=0.d0 ++ chit_shl=0.d0 ++ chip=0.d0 ++ do i=1,9 ++ eta(i)=0.d0 ++ enddo ++ ++ if(keyshl.eq.1) then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++c reset atom velocities at intervals if required ++ ++ if(newgau)then ++ ++ if(mod(nstep,numgau).eq.0)call regauss ++ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++ endif ++ ++c calculate physical quantities ++ ++ if(nstep.gt.0)call static ++ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) ++ ++c z density calculation ++ ++ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then ++ ++ call zden0(idnode,natms,mxnode,nzden,zlen) ++ ++ endif ++ ++c terminate program if boundary conditions violated ++ ++ if(imcon.gt.0.and.rcut.gt.width)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ call error(idnode,95) ++ ++ endif ++ ++c line-printer output every nstbpo steps ++ ++ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then ++ ++ call timchk(0,timelp) ++ if(idnode.eq.0)then ++ ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) ++ if(mod(lines,npage).eq.0) ++ x write(nrite,"(1x,120('-'), ++ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, ++ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', ++ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, ++ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', ++ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', ++ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, ++ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', ++ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', ++ x 7x,'press',/,/, ++ x 1x,120('-'))") ++ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)") ++ x nstep,(stpval(i),i=1,9), ++ x simtim,dec,(stpval(i),i=10,18), ++ x prntim,hms,(stpval(i),i=19,27) ++ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', ++ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ lines=lines+1 ++ ++ endif ++ ++c report end of equilibration period ++ ++ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then ++ ++ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) ++ x write(nrite,"(/,/,1x,'switching off temperature ', ++ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep ++ ltscal=.false. ++ ++ endif ++ ++c write trajectory data ++ ++ if(ltraj.and.nstep.ge.nstraj) then ++ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then ++ ++ call traject ++ x (ltraj,idnode,imcon,istraj,keytrj,natms, ++ x nstraj,nstep,tstep) ++ ++ endif ++ ++ endif ++ ++c write solvation energy file ++ ++ if(lsolva.and.nstep.ge.nsolva)then ++ ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ call solva_temp(idnode,mxnode,natms2,keyver) ++ call solvation_write(lexcite,lswitch,idnode,natms, ++ x nstep,nsolva,isolva,tstep,engunit,elrc) ++ ++ endif ++ ++ endif ++ ++c write free energy file ++ ++ if(lfree.and.nstep.ge.nfrn)then ++ ++ if(mod(nstep-nfrn,ifrn).eq.0)then ++ ++ call free_kinetic(lfrmas,idnode,mxnode,keyver) ++ call free_energy_write(idnode,nstep,engunit) ++ ++ endif ++ ++ endif ++ ++c save restart data in event of system crash ++ ++ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then ++ ++ levcfg=2 ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++ endif ++ ++c cycle time check ++ ++ call timchk(0,timelp) ++ recycle=(recycle.and.timjob-timelp.gt.timcls) ++ ++ enddo ++ ++c*********************************************************************** ++c end of molecular dynamics calculations ++c*********************************************************************** ++ ++c last time check ++ ++ call timchk(0,timelp) ++ call get_prntime(hms,timjob,prntim) ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, ++ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") ++ x timelp,prntim,hms,timcls ++ ++c shell relaxation convergence statistics ++ ++ if(.not.loptim.and.keyshl.eq.2)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,/,1x,'shell relaxation statistics : average cycles = ', ++ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 ++ ++ endif ++ ++c produce summary of simulation ++ ++ levcfg=2 ++ if(loptim)levcfg=0 ++ if(.not.lneb)call result ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, ++ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, ++ x chit_shl) ++ ++c write hyperdynamics restart file ++ ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++c close output channels ++ ++ if(idnode.eq.0) then ++ ++ close (nrite) ++ close (nstats) ++ close (nhist) ++ close (nevnt) ++ ++ endif ++ ++c terminate job ++ ++ call exitcomms() ++ ++ end +diff -urN dl_class_1.9.orig/srcmod/driver_module.f dl_class_1.9/srcmod/driver_module.f +--- dl_class_1.9.orig/srcmod/driver_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/driver_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,498 @@ ++ module driver_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining simulation driver routines ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - d.quigley nov 2010 metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use forces_module ++ use nlist_builders_module ++ use optimiser_module ++ use temp_scalers_module ++ ++ implicit none ++ ++ integer, parameter :: mxpass=250 ++ ++ contains ++ ++ subroutine molecular_dynamics ++ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero,newlst, ++ x stropt,cycle,ltad,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,keyfld,keyshl,keystr,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp, ++ x ntpter,ntpvdw,ntshl,ntteth,ntcons,numrdf,nsolva,isolva, ++ x alpha,delr,dlrpot,drewd,elrc,engang,engbnd,engcpe,engdih, ++ x engfbp,engfld,enginv,engshl,engsrp,engtbp,engter,engtet, ++ x epsq,fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, ++ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih,virfbp,virfld, ++ x virinv,virlrc,virmet,virshl,virsrp,virtbp,virter,virtet,volm, ++ x engmet,virtot,engord,virord) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling subroutine calls in a standard ++c molecular dynamics simulation ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d.quigley nov 2010 metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero ++ logical newlst,stropt,cycle,ltad,lsolva,lfree,lghost ++ ++ integer idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons ++ integer keystr,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp ++ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql ++ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet ++ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,nsolva ++ integer isolva ++ ++ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd ++ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp ++ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp ++ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp ++ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp ++ real(8) virtbp,virter,virtet,volm,engmet,virtot ++ real(8) engord,virord ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces ++ ++ call force_manager ++ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c structure optimisation ++ ++ if(loptim.or.lzero)then ++ ++ call optimisation_selector ++ x (loptim,stropt,lzero,idnode,mxnode,natms,imcon,ntcons, ++ x nscons,ngrp,ntfree,keystr,keytol,engcfg,tstep,opttol) ++ ++ if(stropt.and.idnode.eq.0) ++ x write(nrite,"(/,/,1x,'structure optimisation converged ', ++ x 'at step ',i6,/,/,/,1x,120('-'))") nstep ++ ++ cycle=(cycle.and.(.not.stropt)) ++ ++ endif ++ ++c total virial (excluding constraint virial and c.o.m virial) ++c for npt routines note: virsrp already includes virlrc ++ ++ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet+virord ++ ++ return ++ end subroutine molecular_dynamics ++ ++ subroutine shell_relaxation ++ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, ++ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, ++ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, ++ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, ++ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, ++ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, ++ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, ++ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, ++ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, ++ x pass1,pass2,engord,virord) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling subroutine calls in a ++c relaxed shell molecular dynamics simulation ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d.quigley nov 2010 metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical,save :: lfirst = .true. ++ logical lfcap,lgofr,lneut,lnsq,loglnk,lzeql,ltad ++ logical newlst,relaxed,shgofr,lsolva,lfree,lghost ++ ++ integer idnode,imcon,keyfce,keyfld,keyshl ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms ++ integer nhko,nlatt,nneut,nospl,nstbgr,nstep,nsteql ++ integer ntangl,ntbond,ntdihd,ntinv,ntpfbp,ntpmet ++ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf ++ integer keyrlx,ntpmls,pass,nsolva,isolva,ia,ib,ishl ++ ++ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd ++ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp ++ real(8) engtbp,engter,engtet,epsq,fmax,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp ++ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp ++ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp ++ real(8) virtbp,virter,virtet,volm,engmet,virtot,rlxtol ++ real(8) pass0,pass1,pass2,engord,virord ++ ++ real(8),allocatable,dimension(:),save :: xdcs,ydcs,zdcs ++ ++ pass=0 ++ keyrlx=0 ++ shgofr=lgofr ++ relaxed=.false. ++ ++ if(lfirst)then ++ ++ allocate(xdcs(1:ntshl)) ++ allocate(ydcs(1:ntshl)) ++ allocate(zdcs(1:ntshl)) ++ lfirst = .false. ++ ++ else ++ ++ do ishl=1,ntshl ++ ++ ia=listshl(ishl,2) ++ ib=listshl(ishl,3) ++ xxx(ib)=xxx(ia)+xdcs(ishl) ++ yyy(ib)=yyy(ia)+ydcs(ishl) ++ zzz(ib)=zzz(ia)+zdcs(ishl) ++ ++ enddo ++ ++ endif ++ ++ do while(.not.relaxed.and.pass.le.mxpass) ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces ++ ++ call force_manager ++ x (newlst,lneut,lnsq,shgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c total virial (excluding constraint virial and c.o.m virial) ++c for npt routines note: virsrp already includes virlrc ++ ++ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet+virord ++ ++c relaxed shell option ++ ++ call relax_shells ++ x (relaxed,keyrlx,idnode,mxnode,natms,ntpmls,tstep, ++ x rlxtol) ++ ++ if(relaxed)then ++ ++ pass1=pass0*pass1 ++ pass0=pass0+1.d0 ++ pass1=pass1/pass0+pass/pass0 ++ pass2=max(dble(pass),pass2) ++c$$$ write(104,'("Relaxed shells before step: ",I5)')pass+1 ++ ++ endif ++ ++ pass=pass+1 ++ if(pass.gt.mxpass)call error(idnode,1950) ++ shgofr=.false. ++ ++c end of shell relaxation ++ ++ enddo ++ ++c store vector connecting the cores to the shells ++ ++ do ishl=1,ntshl ++ ++ ia=listshl(ishl,2) ++ ib=listshl(ishl,3) ++ xdcs(ishl)=xxx(ib)-xxx(ia) ++ ydcs(ishl)=yyy(ib)-yyy(ia) ++ zdcs(ishl)=zzz(ib)-zzz(ia) ++ ++ enddo ++ ++ call images(imcon,0,1,ntshl,cell,xdcs,ydcs,zdcs) ++ ++ return ++ end subroutine shell_relaxation ++ ++ subroutine minimiser ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, ++ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, ++ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, ++ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, ++ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, ++ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, ++ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, ++ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, ++ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, ++ x virtot,sigma,tolnce,engunit,engord,virord) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling subroutine calls in a ++c minimisation simulation ++c ++c copyright - daresbury laboratory ++c author - w. smith may 2007 ++c adapted - d.quigley nov 2010 metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lfcap,lneut,lnsq,loglnk,lzeql,newlst,stropt,shgofr ++ logical conopt,newjob,ltad,lsolva,lfree,lghost ++ ++ integer idnode,imcon,keyfce,keyfld,keyshl,keystr,pass,i ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,keytol ++ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql ++ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet ++ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,ntcons ++ integer fail,nsolva,isolva ++ ++ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd ++ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp ++ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter,sigma ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp ++ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp ++ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp,tolnce ++ real(8) virtbp,virter,virtet,volm,engmet,virtot,engcon ++ real(8) cfgmin,engunit,hnorm,grad0,grad1,ff1,sgn ++ real(8) engord,virord ++ ++ real(8), allocatable :: sxx(:),syy(:),szz(:) ++ ++ save cfgmin,newjob ++ ++ data newjob/.true./ ++ ++ pass=0 ++ keystr=0 ++ shgofr=.false. ++ stropt=.false. ++ ++c dummy variables ++ ++ ltad=.false. ++ lsolva=.false. ++ lfree=.false. ++ lghost=.false. ++ nsolva=0 ++ isolva=1 ++ ++c$$$c diagnostic printing (not usually active) ++c$$$ ++c$$$ if(idnode.eq.0)then ++c$$$ ++c$$$ write(nrite,"(1x,120('-'), ++c$$$ x /,/,1x,' pass',5x,'eng_cfg',5x,'eng_vdw',5x,'eng_cou', ++c$$$ x 5x,'eng_bnd',5x,'eng_ang',5x,'eng_dih',5x,'eng_tet', ++c$$$ x 5x,'eng_met',/,1x,120('-'))") ++c$$$ ++c$$$ endif ++ ++ do while(.not.stropt.and.pass.lt.mxpass) ++ ++ pass=pass+1 ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces ++ ++ call force_manager ++ x (newlst,lneut,lnsq,shgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c total virial (excluding constraint virial and c.o.m virial) ++c for npt routines note: virsrp already includes virlrc ++ ++ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet+virord ++ ++c conjugate gradient structure optimisation ++ ++ call strucopt ++ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++c$$$c diagnostic printing (not usually active) ++c$$$ ++c$$$ if(idnode.eq.0)then ++c$$$ ++c$$$ write(nrite,"(1x,i8,1p,8e12.4)") ++c$$$ x pass,engcfg/engunit,engsrp/engunit,engcpe/engunit, ++c$$$ x engbnd/engunit,engang/engunit,engdih/engunit,engtet/ ++c$$$ x engunit,engmet/engunit ++c$$$ write(nrite,"(1x,120('-'))") ++c$$$ ++c$$$ endif ++ ++c end of structure minimisation ++ ++ enddo ++ ++c ensure constraints are satisfied ++ ++ if(stropt.and.ntcons.gt.0)then ++ ++ allocate(sxx(mxatms),syy(mxatms),szz(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,9999) ++ ++c store current forces ++ ++ do i=1,natms ++ ++ sxx(i)=fxx(i) ++ syy(i)=fyy(i) ++ szz(i)=fzz(i) ++ ++ enddo ++ ++ keystr=0 ++ conopt=.false. ++ ++ do while(.not.conopt.and.pass.lt.mxpass) ++ ++ pass=pass+1 ++ engcon=0.d0 ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c conjugate gradient structure optimisation of constraint bonds ++ ++ call strucopt ++ x (conopt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,engcon,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++ enddo ++ ++c restore current forces ++ ++ do i=1,natms ++ ++ fxx(i)=sxx(i) ++ fyy(i)=syy(i) ++ fzz(i)=szz(i) ++ ++ enddo ++ ++ deallocate(sxx,syy,szz,stat=fail) ++ ++ endif ++ ++c write data summary ++ ++ if(idnode.eq.0)then ++ ++ if(stropt)then ++ ++ write(nrite,'(1x,"minimisation converged after ",i6," cycles" ++ x ," energy minimum: ",1pe12.4)')pass,engcfg/engunit ++ ++ else ++ ++ write(nrite,'(1x,"minimisation NOT converged after ",i6, ++ x " cycles")')pass ++ ++ endif ++ ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++c reset velocities after structure optimisation ++ ++ call regauss(idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++c write out minimised structure if lowest obtained so far ++ ++ if(newjob.or.cfgmin.gt.engcfg)then ++ ++ if(idnode.eq.0)call config_write('CFGMIN',0,imcon,natms,engcfg) ++ cfgmin=engcfg ++ newjob=.false. ++ ++ endif ++ ++ return ++ end subroutine minimiser ++ ++ end module driver_module +diff -urN dl_class_1.9.orig/srcmod/ensemble_tools_module.f dl_class_1.9/srcmod/ensemble_tools_module.f +--- dl_class_1.9.orig/srcmod/ensemble_tools_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/ensemble_tools_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1934 @@ ++ module ensemble_tools_module ++ ++c*********************************************************************** ++c ++c dl_poly module defining tools for ensemble simulations ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use core_shell_module ++ use property_module ++ use rigid_body_module ++ use utility_module ++ ++ contains ++ ++ function getmass(natms,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate total system mass ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,i,iatm0,iatm1 ++ real(8) getmass ++ ++ iatm0 = (idnode*natms)/mxnode+1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++ getmass=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ getmass=getmass+weight(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=getmass ++ call gdsum(buffer(1),1,buffer(2)) ++ getmass=buffer(1) ++ ++ endif ++ ++ return ++ end function getmass ++ ++ subroutine getcom(natms,idnode,mxnode,totmas,com) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system centre of mass ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,i,iatm0,iatm1 ++ real(8) totmas ++ ++ real(8) com(3) ++ ++ iatm0 = (idnode*natms)/mxnode+1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++ com(1)=0.d0 ++ com(2)=0.d0 ++ com(3)=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ com(1)=com(1)+weight(i)*xxx(i) ++ com(2)=com(2)+weight(i)*yyy(i) ++ com(3)=com(3)+weight(i)*zzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1) call gdsum(com,3,buffer) ++ ++ com(1)=com(1)/totmas ++ com(2)=com(2)/totmas ++ com(3)=com(3)/totmas ++ ++ return ++ end subroutine getcom ++ ++ subroutine getvom(natms,idnode,mxnode,totmas,vom) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system centre of mass ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,i,iatm0,iatm1 ++ real(8) totmas ++ ++ real(8) vom(3) ++ ++ iatm0 = (idnode*natms)/mxnode+1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++ vom(1)=0.d0 ++ vom(2)=0.d0 ++ vom(3)=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ vom(1)=vom(1)+weight(i)*vxx(i) ++ vom(2)=vom(2)+weight(i)*vyy(i) ++ vom(3)=vom(3)+weight(i)*vzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1) call gdsum(vom,3,buffer) ++ ++ vom(1)=vom(1)/totmas ++ vom(2)=vom(2)/totmas ++ vom(3)=vom(3)/totmas ++ ++ return ++ end subroutine getvom ++ ++ subroutine nvtscale ++ x (idnode,mxnode,natms,engke,sigma,tstep,qmass,taut,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NVT thermostat ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,i,iatm0,iatm1 ++ real(8) engke,sigma,tstep,qmass,chit,conint,scale,taut ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c update chit to 1/2 step ++ ++ chit=chit+tstep*(engke-sigma)/qmass ++ ++c thermostat the velocities ++ ++ scale=exp(-tstep*chit) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ engke=engke*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*qmass/taut**2 ++ ++c update chit to full step ++ ++ chit=chit+tstep*(engke-sigma)/qmass ++ ++ return ++ end subroutine nvtscale ++ ++ subroutine nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,tstep,pmass,qmass,taut, ++ x chip,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT thermostat ++c ++c copyright daresbury laboratory ++c author - w.smith july 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,i,iatm0,iatm1 ++ real(8) engke,temp,sigma,tstep,pmass,qmass,chip,chit,conint,scale ++ real(8) taut ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c update chit to 1/2 step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip**2-boltz*temp)/qmass ++ ++c thermostat the velocities ++ ++ scale=exp(-tstep*chit) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ engke=engke*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp) ++ ++c update chit to full step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip**2-boltz*temp)/qmass ++ ++ return ++ end subroutine nptscale_t ++ ++ subroutine nptscale_p ++ x (idnode,mxnode,natms,engke,tstep,pmass,chip,chit, ++ x volm,press,vircon,virtot) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT barostat ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,i,iatm0,iatm1 ++ real(8) engke,tstep,pmass,chip,press,vircon,virtot ++ real(8) volm,scale,chit ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c propagate chip to 1/2 step ++ ++ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon)- ++ x 3.d0*press*volm)/pmass-chip*chit) ++ ++c barostat the velocities ++ ++ scale=exp(-tstep*chip) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ engke=engke*scale**2 ++ ++c update volume parameter to full step ++ ++ volm=volm*exp(3.d0*tstep*chip) ++ ++c update chip to full step ++ ++ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon)- ++ x 3.d0*press*volm)/pmass-chip*chit) ++ ++ return ++ end subroutine nptscale_p ++ ++ subroutine nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x tstep,qmass,taut,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NVT thermostat ++c to atomic, group and quaternion momenta ++c ++c copyright daresbury laboratory ++c author - w.smith april 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 ++ integer ig ++ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut ++ real(8) conint,scale ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn+engrot ++ ++c update chit to 1/2 step ++ ++ chit=chit+tstep*(engke-sigma)/qmass ++ ++c thermostat scale parameter ++ ++ scale=exp(-tstep*chit) ++ ++c thermostat free atoms ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=scale*omx(ig) ++ omy(ig)=scale*omy(ig) ++ omz(ig)=scale*omz(ig) ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ engrot=engrot*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*qmass/taut**2 ++ ++c update chit to full step ++ ++ engke=engfke+engtrn+engrot ++ chit=chit+tstep*(engke-sigma)/qmass ++ ++ return ++ end subroutine nvtqscl ++ ++ subroutine nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp,sigma, ++ x tstep,pmass,qmass,taut,chip,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT thermostat ++c to atomic, group and quaternion momenta ++c ++c copyright daresbury laboratory ++c author - w.smith april 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 ++ integer ig ++ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut ++ real(8) conint,scale,chip,pmass,temp ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn+engrot ++ ++c update chit to 1/2 tstep ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip**2-boltz*temp)/qmass ++ ++c thermostat scale parameter ++ ++ scale=exp(-tstep*chit) ++ ++c thermostat free atoms ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=scale*omx(ig) ++ omy(ig)=scale*omy(ig) ++ omz(ig)=scale*omz(ig) ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ engrot=engrot*scale**2 ++ ++c update chi to full tstep ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp) ++ ++c update chit to full tstep ++ ++ engke=engfke+engtrn+engrot ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip**2-boltz*temp)/qmass ++ ++ return ++ end subroutine nptqscl_t ++ ++ subroutine nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,tstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT barostat ++c for system with atomic sites and rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,i,ngrp,ntfree,igrp1,igrp2,ifre1,ifre2 ++ integer j,ig ++ real(8) engke,tstep,pmass,chip,press,vircon,virtot ++ real(8) vircom,volm,scale,engtrn,engfke,chit ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c propagate chip to 1/2 tstep ++ ++ engke=engfke+engtrn ++ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon-vircom)- ++ x 3.d0*press*volm)/pmass-chip*chit) ++ ++c barostat the free atom velocities ++ ++ scale=exp(-tstep*chip) ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c barostat the group translational velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ ++c update volume parameter to full tstep ++ ++ volm=volm*exp(3.d0*tstep*chip) ++ ++c update chip to full tstep ++ ++ engke=engfke+engtrn ++ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon-vircom)- ++ x 3.d0*press*volm)/pmass-chip*chit) ++ ++ return ++ end subroutine nptqscl_p ++ ++ subroutine nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,tstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NST thermostat ++c ++c copyright daresbury laboratory ++c author - w.smith july 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,mode,i,iatm0,iatm1 ++ real(8) engke,temp,sigma,tstep,pmass,qmass,chip2,chit,conint,scale ++ real(8) taut,fac(0:3) ++ data fac/9.d0,3.d0,2.d0,5.d0/ ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate kinetic energy ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ engke=getkin(natms,idnode,mxnode) ++ ++c update chit to 1/2 step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++c thermostat the velocities ++ ++ scale=exp(-tstep*chit) ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ engke=engke*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) ++ ++c update chit to full step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++ return ++ end subroutine nstscale_t ++ ++ subroutine nstscale_p ++ x (idnode,mxnode,natms,mode,tstep,pmass,chit,press,volm) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT anisotropic barostat ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,mode,i,iatm0,iatm1 ++ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit ++ real(8) strkin(9),uni(9),celp(10) ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c propagate barostat momentum to 1/2 step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c barostat the velocities ++ ++ do i=iatm0,iatm1 ++ ++ txx=vxx(i) ++ tyy=vyy(i) ++ tzz=vzz(i) ++ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c new cell vectors ++ ++ call cell_update(tstep,cell,eta) ++ ++c update volume to full time step ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++c calculate kinetic energy and contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c propagate barostat momentum to full step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ return ++ end subroutine nstscale_p ++ ++ subroutine nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,tstep,pmass,qmass,taut,chit,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT thermostat ++c to atomic, group and quaternion momenta ++c ++c copyright daresbury laboratory ++c author - w.smith april 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 ++ integer ig,mode ++ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut ++ real(8) conint,scale,chip2,pmass,temp,fac(0:3) ++ data fac/9.d0,3.d0,2.d0,5.d0/ ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c calculate kinetic energy ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn+engrot ++ ++c update chit to 1/2 step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++c thermostat scale parameter ++ ++ scale=exp(-tstep*chit) ++ ++c thermostat free atoms ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=scale*omx(ig) ++ omy(ig)=scale*omy(ig) ++ omz(ig)=scale*omz(ig) ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ engrot=engrot*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) ++ ++c update chit to full step ++ ++ engke=engfke+engtrn+engrot ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++ return ++ end subroutine nstqscl_t ++ ++ subroutine nstqscl_p ++ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT anisotropic barostat ++c for system with atomic sites and rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith may 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j ++ integer mode ++ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit ++ real(8) strkin(9),strgrp(9),uni(9),celp(10) ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c propagate barostat momentum to 1/2 step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c subtract kinetic contribution from stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ do i=1,9 ++ stress(i)=stress(i)-strkin(i)-strgrp(i) ++ enddo ++ ++c barostat the free atom velocities ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ txx=vxx(i) ++ tyy=vyy(i) ++ tzz=vzz(i) ++ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c barostat the group translational velocities ++ ++ do ig=igrp1,igrp2 ++ ++ txx=gvxx(ig) ++ tyy=gvyy(ig) ++ tzz=gvzz(ig) ++ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c new cell vectors ++ ++ call cell_update(tstep,cell,eta) ++ ++c new system volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++c add new kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i) ++ enddo ++ ++c propagate barostat momentum to full step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ return ++ end subroutine nstqscl_p ++ ++ subroutine nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,tstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT thermostat ++c to atomic, group and quaternion momenta ++c ++c copyright daresbury laboratory ++c author - w.smith april 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 ++ integer ig,mode ++ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut ++ real(8) conint,scale,chip2,pmass,temp,fac(0:3) ++ real(8) strkin(9),strgrp(9) ++ data fac/9.d0,3.d0,2.d0,5.d0/ ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c remove old kinetic term from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strkin(i)-strgrp(i) ++ enddo ++ ++c calculate kinetic energy ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn+engrot ++ ++c update chit to 1/2 step ++ ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++c thermostat scale parameter ++ ++ scale=exp(-tstep*chit) ++ ++c thermostat free atoms ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=scale*omx(ig) ++ omy(ig)=scale*omy(ig) ++ omz(ig)=scale*omz(ig) ++ gvxx(ig)=scale*gvxx(ig) ++ gvyy(ig)=scale*gvyy(ig) ++ gvzz(ig)=scale*gvzz(ig) ++ ++ enddo ++ ++c scale kinetic energy ++ ++ engfke=engfke*scale**2 ++ engtrn=engtrn*scale**2 ++ engrot=engrot*scale**2 ++ ++c scale kinetic energy tensors ++ ++ do i=1,9 ++ ++ strkin(i)=strkin(i)*scale**2 ++ strgrp(i)=strgrp(i)*scale**2 ++ ++ enddo ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) ++ ++c update chit to full step ++ ++ engke=engfke+engtrn+engrot ++ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ ++ x pmass*chip2-boltz*temp*fac(mode))/qmass ++ ++c add new kinetic terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ return ++ end subroutine nstqscl_t2 ++ ++ subroutine nstqscl_p2 ++ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm, ++ x strkin,strgrp) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT anisotropic barostat ++c for system with atomic sites and rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith may 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j ++ integer mode ++ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit ++ real(8) strkin(9),strgrp(9),uni(9),celp(10) ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c propagate barostat momentum to 1/2 step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c subtract kinetic contribution from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strkin(i)-strgrp(i) ++ enddo ++ ++c barostat the free atom velocities ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ txx=vxx(i) ++ tyy=vyy(i) ++ tzz=vzz(i) ++ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c barostat the group translational velocities ++ ++ do ig=igrp1,igrp2 ++ ++ txx=gvxx(ig) ++ tyy=gvyy(ig) ++ tzz=gvzz(ig) ++ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) ++ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) ++ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) ++ ++ enddo ++ ++c new cell vectors ++ ++ call cell_update(tstep,cell,eta) ++ ++c new system volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++c add new kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i) ++ enddo ++ ++c propagate barostat momentum to full step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- ++ x press*volm*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ return ++ end subroutine nstqscl_p2 ++ ++ subroutine cell_update(tstep,cell,eta) ++ ++c*********************************************************************** ++c ++c dlpoly utility to update the cell vectors in the hoover ++c nst algorithms (velocity verlet version) ++c ++c copyright daresbury laboratory ++c author w.smith july 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i ++ real(8) tstep,cell(9),eta(9),ctmp(9),uni(9) ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ do i=1,9 ++ ctmp(i)=uni(i)+tstep*eta(i) ++ enddo ++ ++ call mat_mul(ctmp,cell,cell) ++ ++ return ++ end subroutine cell_update ++ ++ subroutine cell_propagate(tstep,cell,eta) ++ ++c*********************************************************************** ++c ++c dlpoly utility to update the cell vectors in the hoover ++c nst algorithms (leapfrog version) ++c ++c copyright daresbury laboratory ++c author w.smith july 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i ++ real(8) tstep ++ real(8) cell(9),eta(9),aaa(9),bbb(9),uni(9) ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ do i=1,9 ++ aaa(i)=tstep*eta(i) ++ enddo ++ ++ call mat_mul(aaa,aaa,bbb) ++ ++ do i=1,9 ++ bbb(i)=uni(i)+aaa(i)+0.5d0*bbb(i) ++ enddo ++ ++ call mat_mul(bbb,cell,cell) ++ ++ return ++ end subroutine cell_propagate ++ ++ subroutine nstqmtk_p ++ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm, ++ x engfke,engtrn,engrot,temp,sigma) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NPT anisotropic barostat ++c of martyna tobias and klein to atomic, group and quaternion ++c system with atomic sites and rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith may 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j ++ integer mode ++ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit,temp,sigma,degfre ++ real(8) engtke,engfke,engtrn,engrot,trace ++ real(8) strkin(9),strgrp(9),uni(9),ctmp(9) ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ degfre=2.d0*sigma/(temp*boltz) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c calculate kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c propagate barostat momentum to 1/2 step ++ ++ call invert(cell,ctmp,volm) ++ volm=abs(volm) ++ engtke=2.d0*(engfke+engtrn+engrot)/degfre ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)+strgrp(i)+ ++ x (engtke-press*volm)*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c barostat the free atom velocities ++ ++ trace=(eta(1)+eta(5)+eta(9))/degfre ++ ++ do j=ifre1,ifre2 ++ ++ i=lstfre(j) ++ txx=vxx(i) ++ tyy=vyy(i) ++ tzz=vzz(i) ++ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz+trace) ++ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz+trace) ++ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz+trace) ++ ++ enddo ++ ++c barostat the group translational velocities ++ ++ do ig=igrp1,igrp2 ++ ++ txx=gvxx(ig) ++ tyy=gvyy(ig) ++ tzz=gvzz(ig) ++ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz+trace) ++ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz+trace) ++ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz+trace) ++ ++ enddo ++ ++c update volume to full time step ++ ++ volm=volm*exp(tstep*(eta(1)+eta(5)+eta(9))) ++ ++c calculate kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate new kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=2.d0*(engfke+engtrn+engrot)/degfre ++ ++c propagate barostat momentum to full step ++ ++ do i=1,9 ++ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)+strgrp(i)+ ++ x (engtke-press*volm)*uni(i))/pmass-chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ return ++ end subroutine nstqmtk_p ++ ++ subroutine kinstr(idnode,mxnode,natms,tstep) ++ ++c*********************************************************************** ++c ++c dlpoly routine to calculate the kinetic energy contribution to ++c the stress tensor ++c ++c assumes velocities are half-timestep behind forces ++c ++c replicated data version / block data ++c ++c copyright daresbury laboratory 1994 ++c author t.forester may 1994 ++c amended t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,i,iatm1,iatm2 ++ real(8) tstep,vxt,vyt,vzt ++ ++c block indices ++ ++ iatm1 = (idnode*natms)/mxnode + 1 ++ iatm2 = ((idnode+1)*natms)/mxnode ++ ++ do i = iatm1,iatm2 ++ ++ if(rmass(i).gt.0.d0) then ++ ++ vxt = vxx(i)+fxx(i)*rmass(i)*tstep*0.5d0 ++ vyt = vyy(i)+fyy(i)*rmass(i)*tstep*0.5d0 ++ vzt = vzz(i)+fzz(i)*rmass(i)*tstep*0.5d0 ++ ++ stress(1)=stress(1)-weight(i)*vxt*vxt ++ stress(2)=stress(2)-weight(i)*vxt*vyt ++ stress(3)=stress(3)-weight(i)*vxt*vzt ++ stress(4)=stress(4)-weight(i)*vyt*vxt ++ stress(5)=stress(5)-weight(i)*vyt*vyt ++ stress(6)=stress(6)-weight(i)*vyt*vzt ++ stress(7)=stress(7)-weight(i)*vzt*vxt ++ stress(8)=stress(8)-weight(i)*vzt*vyt ++ stress(9)=stress(9)-weight(i)*vzt*vzt ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine kinstr ++ ++ function getkin(natms,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system kinetic energy ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,i,iatm0,iatm1 ++ real(8) getkin,engke ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ engke=0.d0 ++ ++ do i=iatm0,iatm1 ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ call gdsum(buffer(1),1,buffer(2)) ++ engke=buffer(1) ++ ++ endif ++ ++ getkin=0.5d0*engke ++ ++ return ++ end function getkin ++ ++ function getkinf(ntfree,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate kinetic energy of atoms not in ++c rigid bodies ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ntfree,idnode,mxnode,i,j,ifre0,ifre1 ++ real(8) getkinf,engke ++ ++ ifre0=(idnode*ntfree)/mxnode+1 ++ ifre1=((idnode+1)*ntfree)/mxnode ++ ++ engke=0.d0 ++ ++ do j=ifre0,ifre1 ++ ++ i=lstfre(j) ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ call gdsum(buffer(1),1,buffer(2)) ++ engke=buffer(1) ++ ++ endif ++ ++ getkinf=0.5d0*engke ++ ++ return ++ end function getkinf ++ ++ subroutine getking(ngrp,idnode,mxnode,engtrn,engrot) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system kinetic energy ++c for rigid groups only ++c ++c copyright daresbury laboratory ++c author - m.leslie february 2003 ++c amended - w.smith january 2005 : f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id ++ real(8) engtrn,engrot ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ engtrn=0.d0 ++ engrot=0.d0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c group kinetic energy ++ ++ engtrn=engtrn+ ++ x gmass(id)*(gvxx(ig)**2+gvyy(ig)**2+gvzz(ig)**2) ++ ++c rotational kinetic energy ++ ++ engrot=engrot+(rotinx(id,1)*omx(ig)**2 ++ x +rotiny(id,1)*omy(ig)**2 ++ x +rotinz(id,1)*omz(ig)**2) ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++ buffer(5)=engtrn ++ buffer(6)=engrot ++ call gdsum(buffer(5),2,buffer(1)) ++ engtrn=buffer(5) ++ engrot=buffer(6) ++ ++ endif ++ ++ engtrn=0.5d0*engtrn ++ engrot=0.5d0*engrot ++ ++ return ++ end subroutine getking ++ ++ function getkint(ngrp,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate translational kinetic energy ++c for rigid groups only ++c ++c copyright daresbury laboratory ++c author - w.smith october 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id ++ real(8) engtrn,getkint ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ engtrn=0.d0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c group kinetic energy ++ ++ engtrn=engtrn+ ++ x gmass(id)*(gvxx(ig)**2+gvyy(ig)**2+gvzz(ig)**2) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engtrn ++ call gdsum(buffer(1),1,buffer(2)) ++ engtrn=buffer(1) ++ ++ endif ++ ++ getkint=0.5d0*engtrn ++ ++ return ++ end function getkint ++ ++ function getkinr(ngrp,idnode,mxnode) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate rotational kinetic energy ++c for rigid groups only ++c ++c copyright daresbury laboratory ++c author - w.smith october 2005 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id ++ real(8) engrot,getkinr ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ engrot=0.d0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c rotational kinetic energy ++ ++ engrot=engrot+(rotinx(id,1)*omx(ig)**2 ++ x +rotiny(id,1)*omy(ig)**2 ++ x +rotinz(id,1)*omz(ig)**2) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engrot ++ call gdsum(buffer(1),1,buffer(2)) ++ engrot=buffer(1) ++ ++ endif ++ ++ getkinr=0.5d0*engrot ++ ++ return ++ end function getkinr ++ ++ subroutine kinstress(natms,idnode,mxnode,stresh) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate kinetic contribution to the ++c stress tensor ++c ++c copyright daresbury laboratory ++c author - w.smith november 2002 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,iatm0,iatm1,i ++ real(8) stresh(9) ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise stress tensor ++ ++ do i=1,9 ++ stresh(i)=0.d0 ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ do i=iatm0,iatm1 ++ ++ stresh(1)=stresh(1)+weight(i)*vxx(i)*vxx(i) ++ stresh(2)=stresh(2)+weight(i)*vxx(i)*vyy(i) ++ stresh(3)=stresh(3)+weight(i)*vxx(i)*vzz(i) ++ stresh(5)=stresh(5)+weight(i)*vyy(i)*vyy(i) ++ stresh(6)=stresh(6)+weight(i)*vyy(i)*vzz(i) ++ stresh(9)=stresh(9)+weight(i)*vzz(i)*vzz(i) ++ ++ enddo ++ ++ stresh(4)=stresh(2) ++ stresh(7)=stresh(3) ++ stresh(8)=stresh(6) ++ ++c global sum of stress tensor ++ ++ if(mxnode.gt.1) call gdsum(stresh,9,buffer) ++ ++ return ++ end subroutine kinstress ++ ++ subroutine kinstressg(ngrp,idnode,mxnode,stresh) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate kinetic contribution to the ++c stress tensor ++c ++c copyright daresbury laboratory ++c author - m.leslie february 2003 ++c ++c********************************************************************* ++ ++ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id ++ real(8) stresh(9) ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c initialise stress tensor ++ ++ do i=1,9 ++ stresh(i)=0.d0 ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ stresh(1)=stresh(1)+gmass(id)*gvxx(ig)*gvxx(ig) ++ stresh(2)=stresh(2)+gmass(id)*gvxx(ig)*gvyy(ig) ++ stresh(3)=stresh(3)+gmass(id)*gvxx(ig)*gvzz(ig) ++ stresh(5)=stresh(5)+gmass(id)*gvyy(ig)*gvyy(ig) ++ stresh(6)=stresh(6)+gmass(id)*gvyy(ig)*gvzz(ig) ++ stresh(9)=stresh(9)+gmass(id)*gvzz(ig)*gvzz(ig) ++ ++ enddo ++ ++ stresh(4)=stresh(2) ++ stresh(7)=stresh(3) ++ stresh(8)=stresh(6) ++ ++c global sum of stress tensor ++ ++ if(mxnode.gt.1) call gdsum(stresh,9,buffer) ++ ++ return ++ end subroutine kinstressg ++ ++ subroutine getkins(natms,idnode,mxnode,getkin) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate system kinetic energy ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005: f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer natms,idnode,mxnode,iatm0,iatm1,i ++ real(8) getkin,engke ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ engke=0.d0 ++ ++ do i=iatm0,iatm1 ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ call gdsum(buffer(1),1,buffer(2)) ++ engke=buffer(1) ++ ++ endif ++ ++ getkin=0.5d0*engke ++ ++ return ++ end subroutine getkins ++ ++ subroutine kinstressf(ntfree,idnode,mxnode,stresh) ++ ++c********************************************************************* ++c ++c dl_poly routine to calculate kinetic contribution to the ++c stress tensor for unconstrained atoms ++c ++c copyright daresbury laboratory ++c author - m.leslie february 2003 ++c amended - w.smith january 2005: f90 conversion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer ntfree,idnode,mxnode,i,ifre1,ifre2,ifre ++ real(8) stresh(9) ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c initialise stress tensor ++ ++ do i=1,9 ++ stresh(i)=0.d0 ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ stresh(1)=stresh(1)+weight(i)*vxx(i)*vxx(i) ++ stresh(2)=stresh(2)+weight(i)*vxx(i)*vyy(i) ++ stresh(3)=stresh(3)+weight(i)*vxx(i)*vzz(i) ++ stresh(5)=stresh(5)+weight(i)*vyy(i)*vyy(i) ++ stresh(6)=stresh(6)+weight(i)*vyy(i)*vzz(i) ++ stresh(9)=stresh(9)+weight(i)*vzz(i)*vzz(i) ++ ++ enddo ++ ++ stresh(4)=stresh(2) ++ stresh(7)=stresh(3) ++ stresh(8)=stresh(6) ++ ++c global sum of stress tensor ++ ++ if(mxnode.gt.1) call gdsum(stresh,9,buffer) ++ ++ return ++ end subroutine kinstressf ++ ++ subroutine nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,tstep,qmass_shl, ++ x taut,chit_shl,conint) ++ ++c********************************************************************* ++c ++c dl_poly routine to integrate and apply NVT thermostat ++c thermostats the core-shell relative motion ++c ++c copyright daresbury laboratory ++c author - w.smith october 2002 ++c amended - w.smith january 2005 : f90 conversion ++c adapted - d. quigley 2006 : core-shell motion ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl,i,ishl1,ishl2,j,k,m ++ real(8) shlke,sigma_shl,tstep,qmass_shl,chit_shl,conint ++ real(8) dvx,dvy,dvz,tmx,tmy,tmz,rmu,scale,taut ++ ++ ishl1=(idnode*ntshl)/mxnode+1 ++ ishl2=((idnode+1)*ntshl)/mxnode ++ ++c calculate kinetic energy ++ ++ call corshl(idnode,mxnode,ntshl,shlke) ++ ++c update chit to 1/2 step ++ ++ chit_shl=chit_shl+tstep*(shlke-sigma_shl)/qmass_shl ++ ++c thermostat the velocities ++ ++ scale=exp(-tstep*chit_shl) ++ ++ m=0 ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++ rmu=(weight(i)*weight(j))/(weight(i)+weight(j)) ++ ++ if(rmu.gt.0.d0)then ++ ++ dvx=vxx(j)-vxx(i) ++ dvy=vyy(j)-vyy(i) ++ dvz=vzz(j)-vzz(i) ++ ++ tmx=weight(i)*vxx(i)+weight(j)*vxx(j) ++ tmy=weight(i)*vyy(i)+weight(j)*vyy(j) ++ tmz=weight(i)*vzz(i)+weight(j)*vzz(j) ++ ++ vxx(i)=tmx/(weight(i)+weight(j))-scale*rmu*dvx/weight(i) ++ vxx(j)=tmx/(weight(i)+weight(j))+scale*rmu*dvx/weight(j) ++ vyy(i)=tmy/(weight(i)+weight(j))-scale*rmu*dvy/weight(i) ++ vyy(j)=tmy/(weight(i)+weight(j))+scale*rmu*dvy/weight(j) ++ vzz(i)=tmz/(weight(i)+weight(j))-scale*rmu*dvz/weight(i) ++ vzz(j)=tmz/(weight(i)+weight(j))+scale*rmu*dvz/weight(j) ++ ++ endif ++ ++ enddo ++ ++ shlke=shlke*scale**2 ++ ++c update chi to full step ++ ++ conint=conint+tstep*chit_shl*qmass_shl/taut**2 ++ ++c update chit to full step ++ ++ chit_shl=chit_shl+tstep*(shlke-sigma_shl)/qmass_shl ++ ++ if(mxnode.gt.1) call shlmerge(idnode,mxnode,ntshl) ++ ++ return ++ end subroutine nvtscale_shl ++ ++ end module ensemble_tools_module ++ +diff -urN dl_class_1.9.orig/srcmod/error_module.f dl_class_1.9/srcmod/error_module.f +--- dl_class_1.9.orig/srcmod/error_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/error_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1513 @@ ++ module error_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining bond potentials ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ contains ++ ++ subroutine error(idnode,iode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for printing error messages and bringing ++c about a controlled termination of the program ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c ++c warning - this routine terminates the job. user must ensure ++c that all nodes are informed of error condition before this ++c subroutine is called. e.g. using subroutine gstate(). ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ logical kill ++ integer idnode,iode,kode ++ ++ kill=(iode.ge.0) ++ kode = abs(iode) ++ ++ if(idnode.eq.0)then ++ ++ if(kill)then ++ write(nrite,'(/,/,1x,a,i5)') ++ x 'DL_POLY terminated due to error ', kode ++ ++ else ++ ++ write(nrite,'(/,/,1x,a,i5)') ++ x 'DL_POLY will terminate due to error ', kode ++ ++ endif ++ ++ if(kode.lt.50)then ++ ++ if(kode.eq. 0)then ++ ++c dummy entry ++ ++ elseif(kode.eq. 3)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown directive found in CONTROL file' ++ elseif(kode.eq. 4)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown directive found in FIELD file' ++ elseif(kode.eq. 5)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown energy unit requested' ++ elseif(kode.eq. 6)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - energy unit not specified' ++ elseif(kode.eq. 7)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - energy unit respecified' ++ elseif(kode.eq. 8)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - time step not specified' ++ elseif(kode.eq.10)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many molecule types specified' ++ elseif(kode.eq.11)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate molecule directive in FIELD file' ++ elseif(kode.eq.12)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown molecule directive in FIELD file' ++ elseif(kode.eq.13)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - molecular species not yet specified' ++ elseif(kode.eq.14)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many unique atom types specified' ++ elseif(kode.eq.15)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate pair potential specified' ++ elseif(kode.eq.16)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - strange exit from FIELD file processing' ++ elseif(kode.eq.17)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - strange exit from CONTROL file processing' ++ elseif(kode.eq.18)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate 3-body potential specified' ++ elseif(kode.eq.19)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate 4-body potential specified' ++ elseif(kode.eq.20)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many molecule sites specified' ++ elseif(kode.eq.21)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate tersoff potential specified' ++ elseif(kode.eq.22)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unsuitable radial increment in TABLE file' ++ elseif(kode.eq.23)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incompatible FIELD and TABLE file potentials' ++ elseif(kode.eq.24)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of file encountered in TABLE file' ++ elseif(kode.eq.25)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - wrong atom type found in CONFIG file' ++ elseif(kode.eq.26)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cutoff smaller than EAM potential range' ++ elseif(kode.eq.27)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incompatible FIELD and TABEAM file potentials' ++ elseif(kode.eq.28)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer too small in mettab' ++ elseif(kode.eq.29)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of file encountered in TABEAM file' ++ elseif(kode.eq.30)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many chemical bonds specified' ++ elseif(kode.eq.31)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many chemical bonds in system' ++ elseif(kode.eq.32)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - integer array memory allocation failure' ++ elseif(kode.eq.33)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - real array memory allocation failure' ++ elseif(kode.eq.34)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - character array memory allocation failure' ++ elseif(kode.eq.35)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - logical array memory allocation failure' ++ elseif(kode.eq.36)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - failed fmet array allocation in mettab' ++ elseif(kode.eq.40)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many bond constraints specified' ++ elseif(kode.eq.41)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many bond constraints in system' ++ elseif(kode.eq.42)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer too small in merge1' ++ elseif(kode.eq.45)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many atoms in CONFIG file' ++ elseif(kode.eq.46)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - ewlbuf array too small in ewald1' ++ elseif(kode.eq.47)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer too small in merge' ++ elseif(kode.eq.48)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer too small in fortab' ++ elseif(kode.eq.49)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - frozen core-shell unit specified' ++ endif ++ ++ elseif(kode.lt.100)then ++ ++ if(kode.eq.50)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many bond angles specified' ++ elseif(kode.eq.51)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many bond angles in system' ++ elseif(kode.eq.52)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of FIELD file encountered' ++ elseif(kode.eq.53)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of CONTROL file encountered' ++ elseif(kode.eq.54)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - problem reading CONFIG file' ++ elseif(kode.eq.55)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of CONFIG file encountered' ++ elseif(kode.eq.57)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many core-shell units specified' ++ elseif(kode.eq.59)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many core-shell units in system' ++ elseif(kode.eq.60)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many dihedral angles specified' ++ elseif(kode.eq.61)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many dihedral angles in system' ++ elseif(kode.eq.62)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many tethered atoms specified' ++ elseif(kode.eq.63)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many tethered atoms in system' ++ elseif(kode.eq.65)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many excluded pairs specified' ++ elseif(kode.eq.66)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect boundary condition for HK ewald' ++ elseif(kode.eq.67)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect boundary condition in thbfrc' ++ elseif(kode.eq.69)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many link cells required in thbfrc' ++ elseif(kode.eq.70)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - constraint bond quench failure' ++ elseif(kode.eq.71)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many metal potentials specified' ++ elseif(kode.eq.72)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - different metal potential types specified' ++ elseif(kode.eq.73)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many inversion potentials specified' ++ elseif(kode.eq.75)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many atoms in specified system' ++ elseif(kode.eq.77)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many inversion potentials in system' ++ elseif(kode.eq.79)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect boundary condition in fbpfrc' ++ elseif(kode.eq.80)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many pair potentials specified' ++ elseif(kode.eq.81)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in pair potential list' ++ elseif(kode.eq.82)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - calculated pair potential index too large' ++ elseif(kode.eq.83)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many three body potentials specified' ++ elseif(kode.eq.84)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in 3-body potential list' ++ elseif(kode.eq.85)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - required velocities not in CONFIG file' ++ elseif(kode.eq.86)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - calculated 3-body potential index too large' ++ elseif(kode.eq.87)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many link cells required in fbpfrc' ++ elseif(kode.eq.88)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many tersoff potentials specified' ++ elseif(kode.eq.89)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many four body potentials specified' ++ elseif(kode.eq.90)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - system total electric charge nonzero' ++ elseif(kode.eq.91)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in 4-body potential list' ++ elseif(kode.eq.92)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in tersoff potential list' ++ elseif(kode.eq.93)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cannot use shell model with rigid molecules' ++ elseif(kode.eq.95)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - potential cutoff exceeds half-cell width' ++ elseif(kode.eq.97)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cannot use shell model with neutral groups' ++ elseif(kode.eq.99)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cannot use shell model with constraints' ++ endif ++ ++ elseif(kode.lt.150)then ++ ++ if(kode.eq.100)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - forces working arrays too small' ++ elseif(kode.eq.101)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - calculated 4-body potential index too large' ++ elseif(kode.eq.102)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - parameter mxproc exceeded in shake arrays' ++ elseif(kode.eq.103)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - parameter mxlshp exceeded in shake arrays' ++ elseif(kode.eq.105)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - shake algorithm failed to converge' ++ elseif(kode.eq.106)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parlink ' ++ x //'subroutine' ++ elseif(kode.eq.107)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parlinkneu ' ++ x //'subroutine' ++ elseif(kode.eq.108)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parneulst ' ++ x //'subroutine' ++ elseif(kode.eq.109)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parlst_nsq ' ++ x //'subroutine' ++ elseif(kode.eq.110)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neighbour list array too small in parlst ' ++ x //'subroutine' ++ elseif(kode.eq.112)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - vertest array too small' ++ elseif(kode.eq.120)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - invalid determinant in matrix inversion' ++ elseif(kode.eq.130)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect octahedral boundary condition' ++ elseif(kode.eq.135)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect hexagonal prism boundary condition' ++ elseif(kode.eq.140)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect dodecahedral boundary condition' ++ elseif(kode.eq.141)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - duplicate metal potential specified' ++ elseif(kode.eq.142)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - interpolation outside range of metal '// ++ x 'potential attempted' ++ elseif(kode.eq.145)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - no van der waals potentials defined' ++ endif ++ ++ elseif(kode.lt.200)then ++ ++ if(kode.eq.150)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown van der waals potential selected' ++ elseif(kode.eq.151)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unknown metal potential selected' ++ elseif(kode.eq.153)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - metals not permitted with multiple timestep' ++ elseif(kode.eq.160)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unaccounted for atoms in exclude list ' ++ elseif(kode.eq.170)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many variables for statistic array ' ++ elseif(kode.eq.180)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - Ewald sum requested in non-periodic system' ++ elseif(kode.eq.185)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many reciprocal space vectors' ++ elseif(kode.eq.186)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer array too small in sysgen' ++ elseif(kode.eq.190)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - buffer array too small in splice' ++ endif ++ ++ elseif(kode.lt.250)then ++ ++ if(kode.eq.200)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - rdf buffer array too small in revive' ++ elseif(kode.eq.220)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many neutral groups in system' ++ elseif(kode.eq.225)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - multiple selection of optimisation options' ++ elseif(kode.eq.230)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neutral groups improperly arranged' ++ endif ++ ++ elseif(kode.lt.300)then ++ ++ if(kode.eq.250)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - Ewald sum requested with neutral groups' ++ elseif(kode.eq.260)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - parameter mxexcl exceeded in excludeneu routine' ++ endif ++ ++ elseif(kode.lt.350)then ++ ++ if(kode.eq.300)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect boundary condition in parlink' ++ elseif(kode.eq.301)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many rigid body types ' ++ elseif(kode.eq.302)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many sites in rigid body ' ++ elseif(kode.eq.303)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many rigid bodies specified' ++ elseif(kode.eq.304)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many rigid body sites in system ' ++ elseif(kode.eq.305)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - box size too small for link cells' ++ elseif(kode.eq.306)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - failed to find principal axis system' ++ elseif(kode.eq.310)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - quaternion setup failed ' ++ elseif(kode.eq.320)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - site in multiple rigid bodies' ++ elseif(kode.eq.321)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - quaternion integrator failed' ++ elseif(kode.eq.330)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - mxewld parameter incorrect' ++ elseif(kode.eq.331)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - mxhke parameter incorrect' ++ elseif(kode.eq.332)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - mxhko parameter too small' ++ elseif(kode.eq.340)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - invalid integration option requested' ++ endif ++ ++ elseif(kode.lt.400)then ++ ++ if(kode.eq.350)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too few degrees of freedom' ++ elseif(kode.eq.360)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - frozen atom found in rigid body' ++ elseif(kode.eq.380)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - simulation temperature not specified' ++ elseif(kode.eq.381)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - simulation timestep not specified' ++ elseif(kode.eq.382)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - simulation cutoff not specified' ++ elseif(kode.eq.383)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - simulation forces option not specified' ++ elseif(kode.eq.384)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - verlet strip width not specified' ++ elseif(kode.eq.385)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - primary cutoff not specified' ++ elseif(kode.eq.386)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - primary cutoff larger than rcut' ++ elseif(kode.eq.387)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - system pressure not specified' ++ elseif(kode.eq.388)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - npt incompatible with multiple timestep' ++ elseif(kode.eq.389)then ++ write(nrite,'(/,/,1x,a)') ++ x 'number of pimd beads not specified in field file' ++ elseif(kode.eq.390)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - npt ensemble requested in non-periodic system' ++ elseif(kode.eq.391)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - incorrect number of pimd beads in config file' ++ elseif(kode.eq.392)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many link cells requested' ++ elseif(kode.eq.394)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - minimum image arrays exceeded' ++ elseif(kode.eq.396)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - interpolation array exceeded' ++ elseif(kode.eq.398)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cutoff too small for rprim and delr' ++ endif ++ ++ elseif(kode.lt.450)then ++ ++ if(kode.eq.400)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - rvdw greater than cutoff' ++ elseif(kode.eq.402)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - van der waals cutoff unset' ++ elseif(kode.eq.410)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - cell not consistent with image convention' ++ elseif(kode.eq.412)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - mxxdf parameter too small for shake routine' ++ elseif(kode.eq.414)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - conflicting ensemble options in CONTROL file' ++ elseif(kode.eq.416)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - conflicting force options in CONTROL file' ++ elseif(kode.eq.418)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in bndfrc' ++ elseif(kode.eq.419)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in angfrc' ++ elseif(kode.eq.420)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in tethfrc' ++ elseif(kode.eq.421)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in dihfrc' ++ elseif(kode.eq.422)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - all-pairs must use multiple timestep' ++ elseif(kode.eq.423)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in shlfrc' ++ elseif(kode.eq.424)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - electrostatics incorrect for all-pairs' ++ elseif(kode.eq.425)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - transfer buffer array too small in shlmerge' ++ elseif(kode.eq.426)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - neutral groups not permitted with all-pairs' ++ elseif(kode.eq.427)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - bond vector work arrays too small in invfrc' ++ elseif(kode.eq.430)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - integration routine not available' ++ elseif(kode.eq.432)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - intlist failed to assign constraints ' ++ elseif(kode.eq.433)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - specify rcut before the Ewald sum precision' ++ elseif(kode.eq.434)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - illegal entry into STRESS related routine' ++ elseif(kode.eq.435)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - specify rcut before the coulomb precision' ++ elseif(kode.eq.436)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unrecognised ensemble ' ++ elseif(kode.eq.438)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - PMF constraints failed to converge' ++ elseif(kode.eq.440)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined angular potential' ++ elseif(kode.eq.442)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined three body potential' ++ elseif(kode.eq.443)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined four body potential' ++ elseif(kode.eq.444)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined bond potential' ++ elseif(kode.eq.445)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined many body potential' ++ elseif(kode.eq.446)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined electrostatic key in dihfrc' ++ elseif(kode.eq.447)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - 1-4 separation exceeds cutoff range' ++ elseif(kode.eq.448)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined dihedral potential' ++ elseif(kode.eq.449)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined inversion potential' ++ endif ++ ++ elseif(kode.lt.500)then ++ ++ if(kode.eq.450)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined tethering potential' ++ elseif(kode.eq.451)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - three body potential cutoff undefined' ++ elseif(kode.eq.452)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined pair potential' ++ elseif(kode.eq.453)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - four body potential cutoff undefined' ++ elseif(kode.eq.454)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined external field' ++ elseif(kode.eq.456)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - core and shell in same rigid unit' ++ elseif(kode.eq.458)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many PMF constraints - param. mspmf too ' ++ x //'small' ++ elseif(kode.eq.460)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - too many PMF sites - parameter mxspmf too small' ++ elseif(kode.eq.461)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - undefined metal potential' ++ elseif(kode.eq.462)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - PMF UNIT record expected' ++ elseif(kode.eq.463)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - unidentified atom in metal potential list' ++ elseif(kode.eq.464)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - thermostat time constant must be > 0.d0' ++ elseif(kode.eq.465)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - calculated pair potential index too large' ++ elseif(kode.eq.466)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - barostat time constant must be > 0.d0' ++ elseif(kode.eq.468)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - r0 too large for snm potential with current ' ++ x //'cutoff' ++ elseif(kode.eq.470)then ++ write(nrite,'(/,/,1x,a)') ++ x 'error - n= ',nsatms ++ call error(idnode,100) ++ ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++c variables for array bound checking ++ ++ ibig=0 ++ safe=.true. ++ ++c initialise excluded atom arrays ++ ++ do i=1,mxsite ++ ++ nexsit(i)=0 ++ ++ enddo ++ ++ do i=1,msatms ++ ++ nexatm(i)=0 ++ ++ enddo ++ ++ do j=1,mxexcl ++ ++ do i=1,mxsite ++ ++ lexsit(i,j)=0 ++ ++ enddo ++ ++ do i=1,msatms ++ ++ lexatm(i,j)=0 ++ ++ enddo ++ ++ enddo ++ ++ ++c loop over molecules in system ++ ++ ibonds=0 ++ iangle=0 ++ iconst=0 ++ idihdr=0 ++ invers=0 ++ igrp =0 ++ isite =0 ++ ishels=0 ++ ++ do itmols=1,ntpmls ++ ++c exclude sites on basis of chemical bonds ++ ++ do i=1,numbonds(itmols) ++ ++ ibonds=ibonds+1 ++ ++ if(keybnd(ibonds).gt.0)then ++ ++ ia=lstbnd(ibonds,1)+isite ++ ib=lstbnd(ibonds,2)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of bond constraints ++ ++ do i=1,numcon(itmols) ++ ++ iconst=iconst+1 ++ ia=lstcon(iconst,1)+isite ++ ib=lstcon(iconst,2)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++ enddo ++ ++c exclude sites on basis of bond angles ++ ++ do i=1,numang(itmols) ++ ++ iangle=iangle+1 ++ if(keyang(iangle).gt.0)then ++ ia=lstang(iangle,1)+isite ++ ib=lstang(iangle,2)+isite ++ ic=lstang(iangle,3)+isite ++ ++c check if already added to lists .. ++c ia - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++c ib - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib),mxexcl) ++ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib)=nexsit(ib)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ib,nexsit(ib))=ic-isite ++ lexsit(ic,nexsit(ic))=ib-isite ++ endif ++ endif ++ ++c ia - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ic-isite ++ lexsit(ic,nexsit(ic))=ia-isite ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude on basis of rigid groups ++ ++ do i=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ id=listyp(igrp) ++ ++ do jj=1,numgsit(id)-1 ++ ++ ia=lstgst(igrp,jj)+isite ++ ++ do jk=jj+1,numgsit(id) ++ ++ ib=lstgst(igrp,jk)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c exclude sites on basis of 1-4 dihedral angles ++ ++ do i=1,numdih(itmols) ++ ++ idihdr=idihdr+1 ++ ia=lstdih(idihdr,1)+isite ++ ib=lstdih(idihdr,2)+isite ++ ic=lstdih(idihdr,3)+isite ++ id=lstdih(idihdr,4)+isite ++ ++c check if already added to lists .. ++c ia - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++c ib - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib),mxexcl) ++ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib)=nexsit(ib)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ib,nexsit(ib))=ic-isite ++ lexsit(ic,nexsit(ic))=ib-isite ++ endif ++ endif ++ ++c ia - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ic-isite ++ lexsit(ic,nexsit(ic))=ia-isite ++ endif ++ endif ++ ++c id - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(id),mxexcl) ++ if(lexsit(id,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(id)=nexsit(id)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(id),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(id),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(id,nexsit(id))=ib-isite ++ lexsit(ib,nexsit(ib))=id-isite ++ endif ++ endif ++ ++c id - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(id),mxexcl) ++ if(lexsit(id,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(id)=nexsit(id)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(id),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(id),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(id,nexsit(id))=ic-isite ++ lexsit(ic,nexsit(ic))=id-isite ++ endif ++ endif ++ ++c ia - id interaction: may need to reset vdw and elec scale factors ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.id-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(id)=nexsit(id)+1 ++ if(max(nexsit(ia),nexsit(id)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(id)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=id-isite ++ lexsit(id,nexsit(id))=ia-isite ++ endif ++ ++ elseif(keydih(idihdr).ne.7)then ++ ++c if already excluded reset 1..4 vdw and coulombic scale factors ++ ++ check=((abs(prmdih(idihdr,4)).gt.1.d-10).or. ++ x (abs(prmdih(idihdr,5)).gt.1.d-10)) ++ ++ if(check)then ++ ++ a1=dble(itmols) ++ a2=dble(ia) ++ a3=dble(id) ++ call warning(idnode,20,a1,a2,a3) ++ ++ prmdih(idihdr,4)=0.d0 ++ prmdih(idihdr,5)=0.d0 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of inversion potentials ++ ++ do i=1,numinv(itmols) ++ ++ invers=invers+1 ++ ia=lstinv(invers,1)+isite ++ ib=lstinv(invers,2)+isite ++ ic=lstinv(invers,3)+isite ++ id=lstinv(invers,4)+isite ++ ++c check if already added to lists .. ++c ia - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++c ib - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib),mxexcl) ++ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib)=nexsit(ib)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ib,nexsit(ib))=ic-isite ++ lexsit(ic,nexsit(ic))=ib-isite ++ endif ++ endif ++ ++c ia - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ic-isite ++ lexsit(ic,nexsit(ic))=ia-isite ++ endif ++ endif ++ ++c id - ib interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(id),mxexcl) ++ if(lexsit(id,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(id)=nexsit(id)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(id),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(id),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(id,nexsit(id))=ib-isite ++ lexsit(ib,nexsit(ib))=id-isite ++ endif ++ endif ++ ++c id - ic interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(id),mxexcl) ++ if(lexsit(id,jz).eq.ic-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(id)=nexsit(id)+1 ++ nexsit(ic)=nexsit(ic)+1 ++ if(max(nexsit(id),nexsit(ic)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(id),nexsit(ic)) ++ safe=.false. ++ else ++ lexsit(id,nexsit(id))=ic-isite ++ lexsit(ic,nexsit(ic))=id-isite ++ endif ++ endif ++ ++c ia - id interaction ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.id-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(id)=nexsit(id)+1 ++ if(max(nexsit(ia),nexsit(id)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(id)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=id-isite ++ lexsit(id,nexsit(id))=ia-isite ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of core-shell units ++ ++ do i=1,numshl(itmols) ++ ++ ishels=ishels+1 ++ ++ ia=lstshl(ishels,1)+isite ++ ib=lstshl(ishels,2)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib-isite ++ lexsit(ib,nexsit(ib))=ia-isite ++ endif ++ endif ++ ++c exclude sites on basis of bonds to core-shell units ++ ++ ibonds=ibonds-numbonds(itmols) ++ do kk=1,numbonds(itmols) ++ ++ ibonds=ibonds+1 ++ ++ if(keybnd(ibonds).gt.0)then ++ ++ ia1=lstbnd(ibonds,1)+isite ++ ib1=lstbnd(ibonds,2)+isite ++ ++ if(ia.eq.ia1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib1),mxexcl) ++ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib1)=nexsit(ib1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ib1,nexsit(ib1))=ib-isite ++ lexsit(ib,nexsit(ib))=ib1-isite ++ endif ++ endif ++ ++ endif ++ ++ if(ia.eq.ib1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia1),mxexcl) ++ if(lexsit(ia1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia1)=nexsit(ia1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia1,nexsit(ia1))=ib-isite ++ lexsit(ib,nexsit(ib))=ia1-isite ++ endif ++ endif ++ ++ endif ++ ++ if(ib.eq.ia1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib1)=nexsit(ib1)+1 ++ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib1-isite ++ lexsit(ib1,nexsit(ib1))=ia-isite ++ endif ++ endif ++ ++ endif ++ if(ib.eq.ib1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ia1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ia1)=nexsit(ia1)+1 ++ if(max(nexsit(ia),nexsit(ia1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ia1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ia1-isite ++ lexsit(ia1,nexsit(ia1))=ia-isite ++ endif ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of constraint bonds to core-shell units ++ ++ iconst=iconst-numcon(itmols) ++ do kk=1,numcon(itmols) ++ ++ iconst=iconst+1 ++ ++ ia1=lstcon(iconst,1)+isite ++ ib1=lstcon(iconst,2)+isite ++ ++ if(ia.eq.ia1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib1),mxexcl) ++ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib1)=nexsit(ib1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ib1,nexsit(ib1))=ib-isite ++ lexsit(ib,nexsit(ib))=ib1-isite ++ endif ++ endif ++ ++ endif ++ ++ if(ia.eq.ib1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia1),mxexcl) ++ if(lexsit(ia1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia1)=nexsit(ia1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ia1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ia1,nexsit(ia1))=ib-isite ++ lexsit(ib,nexsit(ib))=ia1-isite ++ endif ++ endif ++ ++ endif ++ ++ if(ib.eq.ia1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib1)=nexsit(ib1)+1 ++ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib1-isite ++ lexsit(ib1,nexsit(ib1))=ia-isite ++ endif ++ endif ++ ++ endif ++ if(ib.eq.ib1)then ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ia1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ia1)=nexsit(ia1)+1 ++ if(max(nexsit(ia),nexsit(ia1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ia1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ia1-isite ++ lexsit(ia1,nexsit(ia1))=ia-isite ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++c exclude sites on basis of rigid units involving core or shell ++ ++ igrp=igrp-numgrp(itmols) ++ do kk=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ id=listyp(igrp) ++ ++ do jj=1,numgsit(id) ++ ++ ia1=lstgst(igrp,jj)+isite ++ if(ia1.eq.ia)then ++ ++ do jk=1,numgsit(id) ++ ++ if(jk.ne.jj)then ++ ib1=lstgst(igrp,jk)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ib1),mxexcl) ++ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ib1)=nexsit(ib1)+1 ++ nexsit(ib)=nexsit(ib)+1 ++ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ib1),nexsit(ib)) ++ safe=.false. ++ else ++ lexsit(ib1,nexsit(ib1))=ib-isite ++ lexsit(ib,nexsit(ib))=ib1-isite ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ if(ia1.eq.ib)then ++ ++ do jk=1,numgsit(id) ++ ++ if(jk.ne.jj)then ++ ib1=lstgst(igrp,jk)+isite ++ ++c check interaction not already included ++ ++ lchk=.true. ++ do jz=1,min(nexsit(ia),mxexcl) ++ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. ++ enddo ++ if(lchk)then ++ nexsit(ia)=nexsit(ia)+1 ++ nexsit(ib1)=nexsit(ib1)+1 ++ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then ++ ibig=max(ibig,nexsit(ia),nexsit(ib1)) ++ safe=.false. ++ else ++ lexsit(ia,nexsit(ia))=ib1-isite ++ lexsit(ib1,nexsit(ib1))=ia-isite ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ isite=isite+numsit(itmols) ++ ++ enddo ++ ++ ntpsit=isite ++ ++c check for exceeded array bounds ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)then ++ if(mxnode.gt.1)call gimax(ibig,1,jj) ++ if(idnode.eq.0)write(nrite,*)'mxexcl must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxexcl is currently ',mxexcl ++ call error(idnode,65) ++ endif ++ ++c remove redundant entries from exclusion list ++c (there shouldn't be any!) ++ ++ do i=1,ntpsit ++ ++ nlast=nexsit(i) ++ do j=1,nexsit(i)-1 ++ ++ if(j.lt.nlast)then ++ ++ kk=j ++ do k=j+1,nexsit(i) ++ ++ if(lexsit(i,j).eq.lexsit(i,k))then ++ ++ nlast=nlast-1 ++ lexsit(i,k)=0 ++ ++ else if(lexsit(i,k).gt.0)then ++ ++ kk=kk+1 ++ lexsav=lexsit(i,k) ++ lexsit(i,k)=0 ++ lexsit(i,kk)=lexsav ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ nexsit(i)=nlast ++ ++ enddo ++ ++ return ++ end subroutine exclude ++ ++ subroutine excludeneu(idnode,mxnode,nneut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the excluded pair ++c interaction list of the system to be simulated ++c part 2 - neutral group implementation ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk ++ integer idnode,mxnode,nneut,ibig,iatom,jatom,last,mpm2 ++ integer npm2,m,ii,im,itmols,inoff,isoff,isit,iolsit,jm,jtmols ++ integer jnoff,jsoff,jsit,jolsit,jn1,jno1,jsite,jsite0,in1,ino1 ++ integer jj0,isite,ij,idum,it ++ ++c construct excluded pair list for verlet neighbour correction ++ ++ ibig=0 ++ iatom=0 ++ jatom=0 ++ ++c generate all atomic pairs and check for exclusions ++c with Brode Ahlrichs ordering of groups ++ ++ last=nneut ++ lchk=.true. ++ mpm2=nneut/2+1 ++ npm2=(nneut-1)/2+1 ++ ++c outer loop over groups ++ ++ do m=1,mpm2 ++ ++ if(m.gt.npm2)last=mpm2-1 ++ ++c inner loop over groups - include intragroup interactions ++ ++ ii=0 ++ ++ do im=idnode+1,last,mxnode ++ ++ ii=ii+1 ++ ++c first site in neutral group ++ ++ itmols=1 ++ inoff=0 ++ isoff=0 ++ isit=numsit(itmols)*nummols(itmols) ++ iolsit=numsit(itmols) ++ ++c calculate j group indices ++ ++ jm=im+m-1 ++ if(jm.gt.nneut)jm=jm-nneut ++ ++c inner loop over neutral groups ++ ++ jtmols=1 ++ jnoff=0 ++ jsoff=0 ++ jsit=numsit(jtmols)*nummols(jtmols) ++ jolsit=numsit(jtmols) ++ ++c test first sites in neutral group ++ ++ jatom=neulst(jm) ++ ++c establish pointer to sets ++ ++ do while(jatom.gt.jsit) ++ ++ jtmols=jtmols+1 ++ jnoff=jsit ++ jsoff=jsoff+jolsit ++ jsit=jsit+nummols(jtmols)*numsit(jtmols) ++ jolsit=numsit(jtmols) ++ ++ enddo ++ ++ jn1=jatom-jnoff ++ jno1=(jn1/jolsit)*jolsit ++ jsite=jn1-jno1 ++ if(jsite.eq.0)then ++ jsite=jolsit ++ jno1=jno1-jolsit ++ endif ++ jsite=jsite+jsoff ++ jsite0=jsite-1 ++ ++ do iatom=neulst(im),neulst(im+1)-1 ++ ++c establish pointer to sets ++ ++ do while(iatom.gt.isit) ++ ++ itmols=itmols+1 ++ inoff=isit ++ isoff=isoff+iolsit ++ isit=isit+nummols(itmols)*numsit(itmols) ++ iolsit=numsit(itmols) ++ ++ enddo ++ ++ in1=iatom-inoff ++ ino1=(in1/iolsit)*iolsit ++ isite=in1-ino1 ++ if(isite.eq.0)then ++ isite=iolsit ++ ino1=ino1-iolsit ++ endif ++ isite=isite+isoff ++ ++c test im and jm are neutral groups on same molecule ++ ++ if((jnoff.eq.inoff).and.(ino1.eq.jno1))then ++ if(abs(im-jm).lt.iolsit)then ++ ++ jj0=neulst(jm) ++ jsite=jsite0 ++ ++c special case for im=jm (ie. same group) ++ ++ if(im.eq.jm)then ++ ++ jj0=iatom+1 ++ jsite=isite ++ ++ endif ++ ++c test for excluded interaction ++ ++ do jatom=jj0,neulst(jm+1)-1 ++ ++ jsite=jsite+1 ++ ++ do ij=1,nexsit(isite) ++ ++ if(lexsit(isite,ij).eq.jsite-jsoff)then ++ ++ it=nexatm(ii) ++ ++ if(it+2.gt.mxexcl)then ++ ++ ibig=max(it+2,ibig) ++ nexatm(ii)=it+2 ++ lchk=.false. ++ ++ else ++ ++ lexatm(ii,it+1)=iatom ++ lexatm(ii,it+2)=jatom ++ nexatm(ii)=nexatm(ii)+2 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ endif ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c global check ++ ++ call gstate(lchk) ++ if(.not.lchk)then ++ ++ if(mxnode.gt.1)call gimax(ibig,1,idum) ++ if(idnode.eq.0)write(nrite,*)'mxexcl must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxexcl is currently ',mxexcl ++ call error(idnode,260) ++ ++ endif ++ ++ return ++ end subroutine excludeneu ++ ++ subroutine exclude_link(idnode,mxnode,ntpmls) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the excluded pair ++c interaction list of the system to be simulated ++c ++c part 2 - link cell implementation ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith june 1992 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,ntpmls,iatom,jatom,lsite,ksite ++ integer itmols,imols,isite,kk,newatm,k ++ ++c construct excluded pair list for verlet neighbour correction ++ ++ iatom=0 ++ jatom=0 ++ lsite=0 ++ ksite=0 ++ ++ do itmols=1,ntpmls ++ ++ do imols=1,nummols(itmols) ++ ++ do isite=1,numsit(itmols) ++ ++ iatom=iatom+1 ++ ++ if(mod(iatom-1,mxnode).eq.idnode)then ++ ++ kk=0 ++ jatom=jatom+1 ++ ++ do k=1,nexsit(ksite+isite) ++ ++ newatm=lexsit(ksite+isite,k)+lsite ++ ++ kk=kk+1 ++ lexatm(jatom,kk)=newatm ++ ++ enddo ++ ++ nexatm(jatom)=kk ++ ++ endif ++ ++ enddo ++ ++ lsite=lsite+numsit(itmols) ++ ++ enddo ++ ++ ksite=ksite+numsit(itmols) ++ ++ enddo ++ ++ return ++ end subroutine exclude_link ++ ++ subroutine exclude_atom(idnode,mxnode,natms,ntpmls) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the excluded pair ++c interaction list of the system to be simulated ++c part 2 ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith june 1992 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,ntpmls,iatom,jatom,lsite ++ integer ksite,itmols,isite,imols,k,kk,newatm,j,latom,i,ii ++ ++c construct excluded pair list for verlet neighbour correction ++ ++ iatom=0 ++ jatom=0 ++ lsite=0 ++ ksite=0 ++ ++ do itmols=1,ntpmls ++ ++ do imols=1,nummols(itmols) ++ ++ do isite=1,numsit(itmols) ++ ++ iatom=iatom+1 ++ ++ if(mod(iatom-1,mxnode).eq.idnode)then ++ ++ kk=0 ++ jatom=jatom+1 ++ ++ do k=1,nexsit(ksite+isite) ++ ++ newatm=lexsit(ksite+isite,k)+lsite ++ ++c keep only brode-ahlrichs combinations of indices ++ ++ if(((newatm.gt.iatom).and. ++ x (newatm-iatom.le.natms/2)).or. ++ x ((newatm.lt.iatom).and. ++ x (newatm+natms-iatom.le.(natms-1)/2)))then ++ ++ kk=kk+1 ++ lexatm(jatom,kk)=newatm ++ ++ if(kk.gt.1)then ++ ++c sort the excluded atom list in ascending indices ++ ++ do j=kk,2,-1 ++ ++ if(lexatm(jatom,j).lt.lexatm(jatom,j-1)) ++ x then ++ latom=lexatm(jatom,j) ++ lexatm(jatom,j)=lexatm(jatom,j-1) ++ lexatm(jatom,j-1)=latom ++ endif ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ nexatm(jatom)=kk ++ ++ endif ++ ++ enddo ++ ++ lsite=lsite+numsit(itmols) ++ ++ enddo ++ ++ ksite=ksite+numsit(itmols) ++ ++ enddo ++ ++c final sort into brode-ahlrichs ordering ++ ++ ii=0 ++ do i=1+idnode,natms,mxnode ++ ++ ii=ii+1 ++ do j=1,nexatm(ii) ++ ++ if(lexatm(ii,1).lt.i)then ++ ++ latom=lexatm(ii,1) ++ ++ do k=1,nexatm(ii)-1 ++ ++ lexatm(ii,k)=lexatm(ii,k+1) ++ ++ enddo ++ ++ lexatm(ii,nexatm(ii))=latom ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine exclude_atom ++ ++ end module exclude_module ++ +diff -urN dl_class_1.9.orig/srcmod/external_field_module.f dl_class_1.9/srcmod/external_field_module.f +--- dl_class_1.9.orig/srcmod/external_field_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/external_field_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,347 @@ ++ module external_field_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining external field potential arrays ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use parse_module ++ use setup_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmfld(:) ++ ++ save prmfld ++ ++ contains ++ ++ subroutine alloc_fld_arrays(idnode) ++ ++ implicit none ++ ++ integer fail,idnode ++ ++ data fail/0/ ++ ++ allocate (prmfld(mxfld),stat=fail) ++ if(fail.ne.0)call error(idnode,1200) ++ ++ end subroutine alloc_fld_arrays ++ ++ subroutine define_external_field ++ x (safe,lunits,idnode,keyfld,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to define external fields ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c amended - p.-l. chau jun 2009 z-restraint option ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,keyfld,nfld,i,k,idum ++ real(8) engunit ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call strip(record,lenrec) ++ call lowcase(record,lenrec) ++ call copystring(record,message,80) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'elec') then ++ keyfld=1 ++ elseif(keyword(1:4).eq.'oshr') then ++ keyfld=2 ++ elseif(keyword(1:4).eq.'shrx') then ++ keyfld=3 ++ elseif(keyword(1:4).eq.'grav') then ++ keyfld=4 ++ elseif(keyword(1:4).eq.'magn') then ++ keyfld=5 ++ elseif(keyword(1:4).eq.'sphr') then ++ keyfld=6 ++ elseif(keyword(1:4).eq.'zbnd') then ++ keyfld=7 ++ elseif(keyword(1:4).eq.'zres') then ++ keyfld=9 ++ else ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,454) ++ endif ++ ++ do i=1,mxfld ++ prmfld(i)=0.d0 ++ enddo ++ ++ nfld=intstr(record,lenrec,idum) ++ if(nfld.eq.0)nfld=5 ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ do k=1,nfld ++ ++ prmfld(k)=dblstr(record,lenrec,idum) ++ if(idum.gt.lenrec.and.k.lt.nfld)then ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'external field key ',13x,a4, ++ x /,/,30x,'external field parameters')") keyword(1:4) ++ write(nrite,"(2(/,1x,1p,5e15.5))") prmfld ++ ++ endif ++ ++c convert to internal units ++ ++ if(keyfld.eq.1.or.keyfld.eq.4.or.keyfld.eq.5) then ++ ++ if(.not.lunits)call error(idnode,6) ++ ++ do i=1,3 ++ prmfld(i)=prmfld(i)*engunit ++ enddo ++ ++ elseif(keyfld.eq.2.or.keyfld.eq.6.or.keyfld.eq.7) then ++ ++ prmfld(1)=prmfld(1)*engunit ++ ++ elseif(keyfld.eq.9) then ++ ++ prmfld(3)=prmfld(3)*engunit ++ ++ endif ++ ++ return ++ end subroutine define_external_field ++ ++ subroutine extnfld ++ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) ++ ++c*********************************************************************** ++c ++c dl_poly routine for application of an external field ++c ++c replicated data version / block data ++c ++c copyright daresbury laboratory 1993 ++c author - t.forester october 1993 ++c amended - t.forester dec 1994 ++c amended - p.-l. chau jun 2009 z-restraint option ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,keyfld,mxnode,natms,iatm1,iatm2,i,j ++ integer istart,ifinish,numresat ++ real(8) engfld,virfld,rz,rrr,gamma,zdif,totwgt ++ real(8) com(3) ++ ++c energy and virial accumulators ++ ++ engfld=0.d0 ++ virfld=0.d0 ++ ++c block indices ++ ++ iatm1=(idnode*natms)/mxnode+1 ++ iatm2=((idnode+1)*natms)/mxnode ++ ++ if(keyfld.eq.1) then ++ ++c electric field: prmfld(1-3) are field components ++ ++ do i=iatm1,iatm2 ++ ++ fxx(i)=fxx(i)+chge(i)*prmfld(1) ++ fyy(i)=fyy(i)+chge(i)*prmfld(2) ++ fzz(i)=fzz(i)+chge(i)*prmfld(3) ++ ++ enddo ++ ++ elseif(keyfld.eq.2) then ++ ++c oscillating shear: orthorhombic box: Fx=a*cos(b.2.pi.z/L) ++ ++ rz=2.d0*pi/cell(9) ++ ++ do i=iatm1,iatm2 ++ ++ fxx(i)=fxx(i)+prmfld(1)*cos(prmfld(2)*zzz(i)*rz) ++ ++ enddo ++ ++ elseif(keyfld.eq.3.and.imcon.eq.6) then ++ ++c continuous shear of walls : 2D periodic box (imcon=6) ++c shear rate=prmfld(1) angstrom per ps for atoms at ++c abs(z) > prmfld(2) ++ ++ do i=iatm1,iatm2 ++ ++ if(abs(zzz(i)).gt.prmfld(2)) then ++ ++ vxx(i)=0.5d0*sign(prmfld(1),zzz(i)) ++ ++ endif ++ ++ enddo ++ ++ elseif(keyfld.eq.4) then ++ ++c gravitational field: field components given by prmfld(1-3) ++ ++ do i=iatm1,iatm2 ++ ++ fxx(i)=fxx(i)+prmfld(1)*weight(i) ++ fyy(i)=fyy(i)+prmfld(2)*weight(i) ++ fzz(i)=fzz(i)+prmfld(3)*weight(i) ++ ++ enddo ++ ++ elseif(keyfld.eq.5) then ++ ++c magnetic field: field components given by prmfld(1-3) ++ ++ do i=iatm1,iatm2 ++ ++ fxx(i)=fxx(i)+(vyy(i)*prmfld(3)-vzz(i)*prmfld(2)) ++ x *chge(i) ++ fyy(i)=fyy(i)+(vzz(i)*prmfld(1)-vxx(i)*prmfld(3)) ++ x *chge(i) ++ fzz(i)=fzz(i)+(vxx(i)*prmfld(2)-vyy(i)*prmfld(1)) ++ x *chge(i) ++ ++ enddo ++ ++ elseif(keyfld.eq.6) then ++ ++c containing sphere : r^(-n) potential ++ ++ do i=iatm1,iatm2 ++ ++ rrr=sqrt(xxx(i)**2+yyy(i)**2+zzz(i)**2) ++ if(rrr.gt.prmfld(4)) then ++ rrr=prmfld(2)-rrr ++ if(rrr.lt.0.d0) rrr=0.1d0 ++ ++ gamma =prmfld(1)*rrr**(-prmfld(3)) ++ engfld=engfld+gamma ++ ++ gamma=-prmfld(3)*gamma/((prmfld(2)-rrr)*rrr) ++ ++ fxx(i)=fxx(i)+gamma*xxx(i) ++ fyy(i)=fyy(i)+gamma*yyy(i) ++ fzz(i)=fzz(i)+gamma*zzz(i) ++ ++ endif ++ ++ enddo ++ ++ elseif(keyfld.eq.7) then ++ ++c repulsive wall (harmonic) starting at z0 ++ ++ do i=iatm1,iatm2 ++ ++ if(prmfld(3)*zzz(i).gt.prmfld(3)*prmfld(2)) then ++ ++ zdif=zzz(i)-prmfld(2) ++ gamma=-prmfld(1)*zdif ++ ++ fzz(i)=fzz(i)+gamma ++ engfld=engfld-gamma*zdif/2. ++ ++ endif ++ ++ enddo ++ ++ elseif(keyfld.eq.9) then ++ ++c keyfld=9. restrain molecule z-position ++c prmfld(1) is number of first atom of restrained molecule ++c prmfld(2) is number of last atom of restrained molecule ++c prmfld(3) is the restraining constant ++c prmfld(4) is z-min ++c prmfld(5) is z-max ++ ++ istart=nint(prmfld(1)) ++ ifinish=nint(prmfld(2)) ++ numresat=ifinish-istart+1 ++ ++c calculate the centre of mass of the molecule ++ ++ call getcom_mol(istart,ifinish,imcon,idnode,mxnode,totwgt,com) ++ ++c apply restraint force according to location ++ ++ if(com(3).lt.prmfld(4))then ++ ++c if centre of mass is below z-min, activate restraining force ++ ++ do i=istart,ifinish ++ ++ fzz(i)=fzz(i)-prmfld(3)*(weight(i)/totwgt)* ++ x (com(3)-prmfld(4)) ++ ++ enddo ++ ++ elseif(com(3).gt.prmfld(5))then ++ ++c if centre of mass if above z-max, activate restraining force ++ ++ do i=istart,ifinish ++ ++ fzz(i)=fzz(i)-prmfld(3)*(weight(i)/totwgt)* ++ x (com(3)-prmfld(5)) ++ ++ enddo ++ ++ endif ++ ++ else ++ ++c unidentified field potential error exit ++ ++ call error(idnode,454) ++ ++ endif ++ ++c global sum of external field potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engfld ++ buffer(2)=virfld ++ call gdsum(buffer(1),2,buffer(3)) ++ engfld=buffer(1) ++ virfld=buffer(2) ++ ++ endif ++ ++ return ++ end subroutine extnfld ++ ++ end module external_field_module +diff -urN dl_class_1.9.orig/srcmod/forces_module.f dl_class_1.9/srcmod/forces_module.f +--- dl_class_1.9.orig/srcmod/forces_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/forces_module.f 2015-11-16 17:18:13.442475750 +0100 +@@ -0,0 +1,2970 @@ ++ module forces_module ++ ++c*********************************************************************** ++c ++c dl_poly module for calculation of atomic forces ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - d. quigley : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use coulomb_module ++ use error_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use four_body_module ++ use hkewald_module ++ use metafreeze_module ++ use metal_module ++ use neu_coul_module ++ use nlist_builders_module ++ use pair_module ++ use property_module ++ use setup_module ++ use solvation_module ++ use spme_module ++ use tersoff_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ contains ++ ++ subroutine force_manager ++ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c********************************************************************* ++c ++c dl_poly subroutine to manage the calculation of the atomic forces ++c from all force field terms. ++c ++c copyright - daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva ++ logical lfree,lghost,llsolva ++ ++ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,numrdf ++ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ntpmet ++ integer i,nospl,multt,nneut,ntbond,ntangl,ntdihd,nsolva,isolva ++ integer ntinv,ntteth,ntshl,ntptbp,ntpfbp,ntpter,keyshl,keyfld ++ ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet ++ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp ++ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang,engdih ++ real(8) virdih,enginv,virinv,engtet,virtet,engshl,virshl,engfld ++ real(8) virfld,fmax,temp,shlke,engcfg,tmpeng,tmpvir,engord,virord ++ ++ llsolva=.false. ++ ++c initialize energy and virial accumulators ++ ++ engbnd=0.d0 ++ virbnd=0.d0 ++ engang=0.d0 ++ virang=0.d0 ++ engdih=0.d0 ++ virdih=0.d0 ++ enginv=0.d0 ++ virinv=0.d0 ++ engtbp=0.d0 ++ virtbp=0.d0 ++ engter=0.d0 ++ virter=0.d0 ++ engfbp=0.d0 ++ virfbp=0.d0 ++ engsrp=0.d0 ++ virsrp=0.d0 ++ engcpe=0.d0 ++ vircpe=0.d0 ++ engfld=0.d0 ++ virfld=0.d0 ++ engshl=0.d0 ++ virshl=0.d0 ++ shlke =0.d0 ++ engtet=0.d0 ++ virtet=0.d0 ++ engmet=0.d0 ++ virmet=0.d0 ++ virord=0.0d0 ++ engord=0.0d0 ++ ++ if(lmetadyn)then ++ ++ eng_loc=0.0d0 ++ vir_loc=0.0d0 ++ fxx_loc(:)=0.0d0 ++ fyy_loc(:)=0.0d0 ++ fzz_loc(:)=0.0d0 ++ stress_loc(:)=0.0d0 ++ ++ endif ++ ++c initialise free energy accumulators ++ ++ if(lfree)then ++ ++ ang_fre=0.d0 ++ bnd_fre=0.d0 ++ dih_fre=0.d0 ++ inv_fre=0.d0 ++ tbp_fre=0.d0 ++ fbp_fre=0.d0 ++ cou_fre=0.d0 ++ vdw_fre=0.d0 ++ shl_fre=0.d0 ++ ang_vir=0.d0 ++ bnd_vir=0.d0 ++ dih_vir=0.d0 ++ inv_vir=0.d0 ++ tbp_vir=0.d0 ++ fbp_vir=0.d0 ++ cou_vir=0.d0 ++ vdw_vir=0.d0 ++ shl_vir=0.d0 ++ eng_cfg_fre=0.d0 ++ vir_cfg_fre=0.d0 ++ ++ endif ++ ++c initialise solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ if(keyfce/2.gt.0)lcomp(6)=.true. ++ if(mod(keyfce,2).eq.1)lcomp(7)=.true. ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ llsolva=.true. ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c initialise the force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ if(nstep.gt.0)then ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++ endif ++ ++ if(keyfce.gt.0)then ++ ++c calculate pair forces, including coulombic forces ++ ++ if(lnsq)then ++ ++c multiple timestep - all-pairs ++ ++ call multiple_nsq ++ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp) ++ ++ elseif(.not.lneut)then ++ ++c single timestep ++ ++ if(multt.eq.1)then ++ ++ call forces ++ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw, ++ x ntpmet,natms,nstbgr,nstep,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw, ++ x vircpe,virsrp,volm,engmet,virmet) ++ ++ else ++ ++ call multiple ++ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, ++ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, ++ x rvdw,vircpe,virsrp,volm) ++ ++ endif ++ ++ elseif(lneut)then ++ ++c neutral groups ++ ++ if(multt.eq.1)then ++ ++ call forces_neu ++ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, ++ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, ++ x vircpe,virsrp) ++ ++ else ++ ++ call multiple_neu ++ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rprim,rcut,rvdw,alpha,vircpe,virsrp) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c add in long range corrections to energy and pressure ++ ++ engsrp=engsrp+elrc ++ virsrp=virsrp+virlrc ++ engmet=engmet+elrcm(0) ++ virmet=virmet+vlrcm(0) ++ if(lfree)then ++ vdw_fre=vdw_fre+elrc_fre ++ vdw_vir=vdw_vir+vlrc_fre ++ endif ++ ++c calculate three body forces ++ ++ if(ntptbp.gt.0)call thbfrc ++ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcuttb, ++ x engtbp,virtbp) ++ ++c calculate four body forces ++ ++ if(ntpfbp.gt.0)call fbpfrc ++ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcutfb, ++ x engfbp,virfbp) ++ ++c calculate tersoff potential forces ++ ++ if(ntpter.gt.0)call tersoff ++ x (idnode,mxnode,natms,imcon,rctter,engter,virter) ++ ++c calculate bond forces ++ ++ if(ntbond.gt.0)call bndfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntbond,epsq, ++ x engbnd,virbnd) ++ ++c calculate valence angle forces ++ ++ if(ntangl.gt.0)call angfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntangl,engang,virang) ++ ++c calculate dihedral forces ++ ++ if(ntdihd.gt.0)call dihfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntdihd,keyfce,dlrpot, ++ x epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe,virdih,virsrp) ++ ++c calculate inversion forces ++ ++ if(ntinv.gt.0)call invfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntinv,enginv,virinv) ++ ++c calculate tethered atom forces ++ ++ if(ntteth.gt.0)call tethfrc ++ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) ++ ++c calculate shell model forces ++ ++ if(keyshl.gt.0)call shlfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntshl,engshl,virshl) ++ ++c external field ++ ++ if(keyfld.gt.0)call extnfld ++ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) ++ ++c metadynamics option : use potential energy as order parameter ++ ++ if(lmetadyn)then ++ ++ tmpeng=engsrp+engcpe+engbnd+engang+engdih+engfld+ ++ x engtbp+engfbp+engshl+enginv+engter+engmet ++ ++ tmpvir=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet ++ ++ call metafreeze_driver ++ x (imcon,natms,temp,nstep,tmpeng,tmpvir,engord,virord) ++ ++ endif ++ ++c global summation of force arrays (basic replicated data strategy) ++ ++ call global_sum_forces(natms,mxnode,fxx,fyy,fzz) ++ ++c global sum of stress arrays ++ ++ if(mxnode.gt.1)call gdsum(stress,9,buffer) ++ ++c add long range correction to diagonal terms of stress tensor ++ ++ stress(1)=stress(1)-(virlrc+vlrcm(0))/3.d0 ++ stress(5)=stress(5)-(virlrc+vlrcm(0))/3.d0 ++ stress(9)=stress(9)-(virlrc+vlrcm(0))/3.d0 ++ ++c cap forces in equilibration mode ++ ++ if(nstep.le.nsteql.and.lfcap) ++ x call fcap(lfcap,natms,fmax,temp) ++ ++c total configuration energy ++ ++ engcfg=engsrp+engcpe+engbnd+engang+engdih+engfld+engtbp+ ++ x engfbp+engshl+enginv+engter+engmet ++ ++c PLUMED modifications ++ if(lplumed)then ++ call plumed_f_gcmd("setStep"//char(0),nstep) ++ call plumed_f_gcmd("setMasses"//char(0),weight) ++ call plumed_f_gcmd("setCharges"//char(0),chge) ++ call plumed_f_gcmd("setPositionsX"//char(0),xxx) ++ call plumed_f_gcmd("setPositionsY"//char(0),yyy) ++ call plumed_f_gcmd("setPositionsZ"//char(0),zzz) ++ call plumed_f_gcmd("setBox"//char(0),cell) ++ call plumed_f_gcmd("setEnergy"//char(0),engcfg) ++ call plumed_f_gcmd("setForcesX"//char(0),fxx) ++ call plumed_f_gcmd("setForcesY"//char(0),fyy) ++ call plumed_f_gcmd("setForcesZ"//char(0),fzz) ++ call plumed_f_gcmd("setVirial"//char(0),stress) ++ call plumed_f_gcmd("calc"//char(0) ) ++ endif ++c PLUMED modifications ++ ++c total derivative of the configurational free energy ++ ++ if(lfree)then ++ ++ eng_cfg_fre=dlambda*(ang_fre+bnd_fre+dih_fre+inv_fre+ ++ x tbp_fre+fbp_fre+cou_fre+vdw_fre+shl_fre) ++ vir_cfg_fre=dlambda*(ang_vir+bnd_vir+dih_vir+inv_vir+ ++ x tbp_vir+fbp_vir+cou_vir+vdw_vir+shl_vir) ++ ++ endif ++ ++c sum solvation and excitation energies for pair forces ++ ++ if(mxnode.gt.1)then ++ ++ if(llsolva)then ++ ++ call gdsum(vdw_sol,mxtmls_sol2,buffer) ++ call gdsum(cou_sol,mxtmls_sol2,buffer) ++ ++ if(lghost)then ++ ++ call gdsum(vdw_exc,mxtmls_exc2,buffer) ++ call gdsum(cou_exc,mxtmls_exc2,buffer) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c add long range corrections to solvation terms ++ ++ if(lsolva)then ++ ++ vdw_sol(:)=vdw_sol(:)+elrc_sol(:) ++ if(lghost)vdw_exc(:)=vdw_exc(:)+elrc_exc(:) ++ ++ endif ++ ++ return ++ end subroutine force_manager ++ ++ subroutine forces ++ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw,ntpmet,natms, ++ x nstbgr,nstep,nsteql,numrdf,nospl,nsolva,isolva,alpha,dlrpot, ++ x drewd,engcpe,engsrp,epsq,rcut,rvdw,vircpe,virsrp,volm,engmet, ++ x virmet) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c amended - t. forester sept 1994 ++c amended - w. smith june 1995 for metal potentials ++c ++c key: ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ Ewald sum : ewald1,2,3 ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ truncated and shifted coulombic : coul4 ++c = 10,11 ----- reaction field : coul3 ++c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3] ++c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzeql,loglnk,lewald,lspme,lhke,newjob,lcshft,safe ++ logical lsolva,lfree,lghost,llsolva ++ ++ integer idnode,imcon,keyfce,kmax1,kmax2,kmax3,nhko,nlatt ++ integer mxnode,ntpvdw,natms,nstbgr,nstep,nsteql,numrdf ++ integer ntpmet,nospl,nsolva,isolva,i,j,k,ii ++ ++ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw,eps ++ real(8) vircpe,virsrp,volm,engacc,engac1,viracc,engmet,virmet ++ ++ save newjob ++ ++ data newjob/.true./ ++ ++ safe=.true. ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ lhke=(keyfce/2.eq.7) ++ lspme=(keyfce/2.eq.6) ++ lewald=(keyfce/2.eq.1) ++ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) ++ ++c create ewald interpolation arrays ++ ++ if(newjob)then ++ ++ if(lhke)then ++ ++ call hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) ++ ++ else if(lewald.or.lspme.or.lcshft)then ++ ++ call erfcgen(alpha,drewd,rcut) ++ ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++c initialise force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c calculate local density in metals ++ ++ if(ntpmet.gt.0)then ++ ++ call metdens ++ x (idnode,imcon,mxnode,natms,engmet,virmet) ++ ++ stress(1)=stress(1)-virmet/3.d0 ++ stress(5)=stress(5)-virmet/3.d0 ++ stress(9)=stress(9)-virmet/3.d0 ++ ++ endif ++ ++c fourier contribution to coulombic forces in Ewald sum ++ ++ if(lewald)then ++ ++ call ewald1 ++ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, ++ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) ++ ++ engcpe=engcpe+engac1 ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c hautman-klein-ewald method ++ ++ if(lhke)then ++ ++c fourier terms of hk-ewald ++ ++ call hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engacc,viracc,alpha,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++c real space terms of hk-ewald ++ ++ call hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engacc,viracc, ++ x drewd,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c smoothed particle mesh ewald ++ ++ if(lspme)then ++ ++ call ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engac1,viracc,alpha,volm,epsq) ++ ++ engcpe=engcpe+engac1 ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c outer loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ilist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) ++ ++c square of distances ++ ++ do k=1,lentry(ii) ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c calculate metal forces and potential ++ ++ if(ntpmet.gt.0)then ++ ++ call metfrc(safe,i,lentry(ii),engacc,viracc) ++ ++ engmet=engmet+engacc ++ virmet=virmet+viracc ++ ++ endif ++ ++c calculate short range force and potential terms ++ ++ if(ntpvdw.gt.0.and.mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc, ++ x rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme)then ++ ++ call ewald2(llsolva,lfree,lghost,i,lentry(ii),engacc, ++ x viracc,drewd,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions ++ ++ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then ++ ++ if(mod(nstep,nstbgr).eq.0)then ++ ++ call rdf0(i,lentry(ii),rcut) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c check metal interpolation is safe ++ ++ if(ntpmet.gt.0)then ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,142) ++ ++ endif ++ ++c calculate corrections for intramolecular coulomb terms in ++c Ewald sum ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ eps=epsq ++ if(loglnk)eps=eps*2.0d0 ++ ++c outer loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,nexatm(ii) ++ ++ j=lexatm(ii,k) ++ jlist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) ++ ++c calculate correction terms ++ ++ if(lhke)then ++ ++ call hkewald3(i,ii,engacc,viracc,eps) ++ ++ else ++ ++ call ewald3 ++ x (llsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) ++ ++ endif ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ enddo ++ ++ endif ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then ++ ++ if(mod(nstep,nstbgr).eq.0)then ++ ++ numrdf=numrdf+1 ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=engmet ++ buffer(6)=virmet ++ buffer(7)=vdw_fre ++ buffer(8)=cou_fre ++ buffer(9)=vdw_vir ++ buffer(10)=cou_vir ++ call gdsum(buffer(1),10,buffer(11)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ engmet=buffer(5) ++ virmet=buffer(6) ++ vdw_fre=buffer(7) ++ cou_fre=buffer(8) ++ vdw_vir=buffer(9) ++ cou_vir=buffer(10) ++ ++ endif ++ ++ return ++ end subroutine forces ++ ++ subroutine forces_neu ++ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, ++ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, ++ x vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c neutral group implemenation - no Ewald sum option ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c ++c modified - t. forester april 1993 ++c key: ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ invalid ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ invalid ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzeql,newlst,lchk,lsolva,lfree,lghost,llsolva ++ ++ integer idnode,imcon,keyfce,mxnode,natms,nneut,nstbgr ++ integer nstep,nsteql,numrdf,i,fail,jneu,jj0,jj1,j ++ integer ibig,ia,ineu,isn,ik,nsolva,isolva ++ real(8) dlrpot,engcpe,engsrp,epsq,rcut,rvdw,vircpe ++ real(8) virsrp,engacc,viracc,anorm,alpha ++ ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ ++ dimension fail(2) ++ ++ data fail/0,0/ ++ ++c allocate working arrays ++ ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ do i=1,2 ++ if(fail(i).ne.0)call error(idnode,1820) ++ enddo ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c initialise force and stress arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c initialise energy and virial accumulators ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c intra group vectors com ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-xxx(jj0) ++ tyy(j)=yyy(j)-yyy(jj0) ++ tzz(j)=zzz(j)-zzz(jj0) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,natms,cell,txx,tyy,tzz) ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ xxx(j)=txx(j)+xxx(jj0) ++ yyy(j)=tyy(j)+yyy(jj0) ++ zzz(j)=tzz(j)+zzz(jj0) ++ ++ enddo ++ ++c centre of molecule ++ ++ uxx(jneu)=0.d0 ++ uyy(jneu)=0.d0 ++ uzz(jneu)=0.d0 ++ anorm=1.d0/dble(jj1-jj0+1) ++ ++ do j=jj0,jj1 ++ ++ uxx(jneu)=uxx(jneu)+xxx(j)*anorm ++ uyy(jneu)=uyy(jneu)+yyy(j)*anorm ++ uzz(jneu)=uzz(jneu)+zzz(j)*anorm ++ ++ enddo ++ ++c vector from site to geometric centre ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-uxx(jneu) ++ tyy(j)=yyy(j)-uyy(jneu) ++ tzz(j)=zzz(j)-uzz(jneu) ++ ++ enddo ++ ++ enddo ++ ++c outer loop over neutral groups ++ ++ lchk=.true. ++ ibig=0 ++ ia=0 ++ ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ newlst=.true. ++ ++ isn=1 ++ call neutlst ++ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrceneu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions ++ ++ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. ++ x mod(nstep,nstbgr).eq.0)then ++ ++ call rdf0neu(ik,rcut) ++ ++ endif ++ ++ enddo ++ ++c check on validity of call to neutlst ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ if(.not.lchk)then ++ call gimax(ibig,1,i) ++ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf ++ call error(idnode,478) ++ endif ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) ++ ++c counter for rdf statistics outside loop structure ++ ++ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. ++ x mod(nstep,nstbgr).eq.0)numrdf=numrdf+1 ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,stat=fail(2)) ++ ++ return ++ end subroutine forces_neu ++ ++ subroutine multiple ++ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, ++ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, ++ x rvdw,vircpe,virsrp,volm) ++c*************************************************************************** ++c ++c dl_poly subroutine for multiple time step algorithm ++c reciprocal space calculated on long time steps. ++c ++c copyright daresbury laboratory ++c ++c author t. forester, may 1993 ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ Ewald sum : ewald1,2,3,4 ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ truncated and shifted coulombic : coul4 ++c = 10,11 ----- reaction field : coul3 ++c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3,4] ++c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3,4 ++c ++c**************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=5 ++ ++ logical newplst,newlst,lgofr,lzeql,lgr,loglnk,lewald,lspme ++ logical lhke,newjob,lcshft,lsolva,lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt ++ integer mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,fail ++ integer numlsts,i,nstep0,nsolva,isolva,ii,k,j,ik ++ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,volm,stresp,engcpl,engacc,viracc,engac1 ++ real(8) vircpl,eps,ann,engsr1,viracl,engsrl,virsrl,virac2,engcp1 ++ real(8) vircp1,engacl,engac2,virsr1 ++ ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension stresp(9),fail(nnn) ++ ++ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 ++ save engsr1,virsr1,stresp,fpx,fpy,fpz,newjob ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data newjob/.true./ ++ data numlsts/-1/ ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ lhke=(keyfce/2.eq.7) ++ lspme=(keyfce/2.eq.6) ++ lewald=(keyfce/2.eq.1) ++ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) ++ if(newlst)nstep0=nstep ++ newplst=(newlst).or.(mod(nstep-nstep0,multt).eq.0) ++ ++c allocate working arrays ++ ++ if(newjob)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) ++ endif ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1840) ++ enddo ++ ++ endif ++ ++c create ewald interpolation arrays ++ ++ if(newjob)then ++ ++ if(lspme.or.lewald.or.lcshft)then ++ ++ call erfcgen(alpha,drewd,rcut) ++ ++ endif ++ ++ endif ++ ++ newjob=.false. ++ ++c divide neighbour list into primary and secondary neighbours ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call primlst(idnode,mxnode,natms,imcon,rprim) ++ ++ endif ++ ++c flag for accumulating rdfs ++ ++ lgr=.false. ++ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) ++ lgr=(lgr.and.(newplst.and.lgofr)) ++ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) ++ ++c zero force and stress arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c ********************PROCESS SECONDARY NEIGHBOURS****************** ++ ++ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then ++ ++c zero accumulators ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ engsrl=0.d0 ++ virsrl=0.d0 ++ llsolva=lsolva ++ if(lsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate fourier contribution to secondary coulombic forces ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ if(lewald)then ++ ++ call ewald1 ++ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, ++ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) ++ ++c hautman-klein-ewald method ++ ++ elseif(lhke)then ++ ++ call hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engac1,viracc,alpha,epsq) ++ ++c real space terms of hk-ewald ++ ++ call hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engac2, ++ x virac2,drewd,rcut,epsq) ++ ++ engac1=engac1+engac2 ++ viracc=viracc+virac2 ++ ++ elseif(lspme)then ++ ++c smoothed particle mesh ewald ++ ++ call ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engac1,viracc,alpha,volm,epsq) ++ ++ endif ++ ++ engcpl=engcpl+engac1 ++ vircpl=vircpl+viracc ++ ++c calculate corrections for intramolecular coulomb terms in ++c Ewald sum ++c note: if using link cells - have double counted excluded ++c interactions use temporary adjustment to relative dielectric ++c constant ++ ++ eps=epsq ++ if(loglnk)eps=epsq*2.0d0 ++ ++c calculate self interaction corrections for fourier contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,nexatm(ii) ++ ++ j=lexatm(ii,k) ++ jlist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) ++ ++c calculate correction terms ++ ++ if(lhke)then ++ ++ call hkewald3(i,ii,engacc,viracc,eps) ++ ++ else ++ ++ call ewald3 ++ x (lsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) ++ ++ endif ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ enddo ++ ++ endif ++ ++c calculate pair contributions to secondary neighbour forces ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of distance ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrl=engsrl+engacc ++ virsrl=virsrl+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme)then ++ ++ call ewald2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,drewd,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ endif ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ flx(i)=fxx(i) ++ fly(i)=fyy(i) ++ flz(i)=fzz(i) ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stress(i) ++ stress(i)=0.d0 ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol(:) ++ cou_sol_lng(:)=cou_sol(:) ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc(:) ++ cou_exc_lng(:)=cou_exc(:) ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c calculate pair force contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=-list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of distance ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ if(newplst.or. ++ x (mod(nstep-nstep0,multt).le.1))then ++ ++ if(lhke)then ++ ++ call hkewald4(i,ik,engacc,viracc,engacl,viracl,rcut,epsq) ++ ++ else ++ ++ call ewald4 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,engacl,viracl, ++ x drewd,rcut,epsq) ++ ++ endif ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ engcpl=engcpl+engacl ++ vircpl=vircpl+viracl ++ ++ else ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++ enddo ++ ++c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary neighbour contributions to force, energy etc ++ ++ if(newplst)then ++ ++ do i=1,natms ++ ++ fpx(i)=flx(i) ++ fpy(i)=fly(i) ++ fpz(i)=flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stresl(i) ++ enddo ++ ++ engsr1=engsrl ++ virsr1=virsrl ++ engcp1=engcpl ++ vircp1=vircpl ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol_lng(:) ++ cou_sol_put(:)=cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc_lng(:) ++ cou_exc_put(:)=cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c calculate force increments etc ++ ++ if(mod(nstep-nstep0,multt).eq.1)then ++ ++ do i=1,natms ++ ++ flx(i)=flx(i)-fpx(i) ++ fly(i)=fly(i)-fpy(i) ++ flz(i)=flz(i)-fpz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stresl(i)-stresp(i) ++ enddo ++ ++ virsrl=virsrl-virsr1 ++ engsrl=engsrl-engsr1 ++ vircpl=vircpl-vircp1 ++ engcpl=engcpl-engcp1 ++ ++c solvation and excitation increments ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) ++ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) ++ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c extrapolate long range terms ++ ++ ann=dble(mod(nstep-nstep0,multt)) ++ ++ do i=1,natms ++ ++ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) ++ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) ++ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresp(i)+stresl(i)*ann ++ enddo ++ ++ engsrp=engsr1+engsrl*ann+engsrp ++ virsrp=virsr1+virsrl*ann+virsrp ++ engcpe=engcp1+engcpl*ann+engcpe ++ vircpe=vircp1+vircpl*ann+vircpe ++ ++c solvation and excitation extrapolation ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) ++ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) ++ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++ return ++ end subroutine multiple ++ ++ subroutine multiple_neu ++ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rprim,rcut,rvdw,alpha,vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c neutral group implemenation - no Ewald sum option ++c multiple timestep option ++c ++c parallel replicated data version ++c ++c fpx,fpy,fpz : forces from electrostatics fron rprim < r <= rcut ++c fxx,fyy,fzz : total force ++c ++c copyright daresbury laboratory april 1994 ++c author - t. forester april 1993 ++c key: ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ invalid ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ invalid ++c = 10,11 ----- reaction field : coul3 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical lgofr,lzeql,newlst,newplst,lgr,lchk,newjob,lsolva ++ logical lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,multt,mxnode,natms,nneut,nstbgr ++ integer nstep,nsteql,numrdf,fail,i,numlsts,jneu,jj0,j ++ integer jj1,ineu,ia,isn,ibig,ik,nstep0,nsolva,isolva ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rprim,rcut,rvdw,vircpe ++ real(8) virsrp,engcpl,vircpl,engsrl,virsrl,anorm,ann,stresp ++ real(8) engacc,viracc,engsr1,virsr1,engcp1,vircp1,alpha ++ ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension fail(nnn),stresp(9) ++ ++ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 ++ save engsr1,virsr1,stresp,fpx,fpy,fpz ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data newjob/.true./ ++ data numlsts/-1/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ if(newjob)then ++ ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(3)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(4)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(5)) ++ ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(6)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(7)) ++ endif ++ ++ endif ++ newjob=.false. ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1850) ++ enddo ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c error if ewald sum requested ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) ++ ++c create list of primary and secondary neighbours ++ ++ if(newlst)nstep0=nstep ++ newplst=(mod(nstep-nstep0,multt).eq.0) ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) ++ ++ endif ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c zero force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress arrays ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c flag for accumulating rdfs ++ ++ lgr=.false. ++ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) ++ lgr=(lgr.and.(newplst.and.lgofr)) ++ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) ++ ++c intra group vectors com ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-xxx(jj0) ++ tyy(j)=yyy(j)-yyy(jj0) ++ tzz(j)=zzz(j)-zzz(jj0) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,natms,cell,txx,tyy,tzz) ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ xxx(j)=txx(j)+xxx(jj0) ++ yyy(j)=tyy(j)+yyy(jj0) ++ zzz(j)=tzz(j)+zzz(jj0) ++ ++ enddo ++ ++c centre of molecule ++ ++ uxx(jneu)=0.d0 ++ uyy(jneu)=0.d0 ++ uzz(jneu)=0.d0 ++ anorm=1.d0/dble(jj1-jj0+1) ++ ++ do j=jj0,jj1 ++ ++ uxx(jneu)=uxx(jneu)+xxx(j)*anorm ++ uyy(jneu)=uyy(jneu)+yyy(j)*anorm ++ uzz(jneu)=uzz(jneu)+zzz(j)*anorm ++ ++ enddo ++ ++c vector from site to geometric centre ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-uxx(jneu) ++ tyy(j)=yyy(j)-uyy(jneu) ++ tzz(j)=zzz(j)-uzz(jneu) ++ ++ enddo ++ ++ enddo ++ ++c ********************PROCESS SECONDARY NEIGHBOURS******************** ++ ++ lchk=.true. ++ ibig=0 ++ ia=0 ++ ++ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then ++ ++c zero accumulators for secondary neighbour energies and virial ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ engsrl=0.d0 ++ virsrl=0.d0 ++ ++c initialise solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c outer loop over neutral groups ++ ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ isn=-1 ++ call neutlst ++ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1.and.(rvdw.gt.rprim-delr))then ++ ++ call srfrceneu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrl=engsrl+engacc ++ virsrl=virsrl+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ else ++ ++ call error(idnode,250) ++ ++ endif ++ ++c accumulate radial distribution functions out to rcut ++ ++ if(lgr)then ++ call rdf0neu(ik,rcut) ++ endif ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ flx(i)=fxx(i) ++ fly(i)=fyy(i) ++ flz(i)=fzz(i) ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ ++ stresl(i)=stress(i) ++ stress(i)=0.d0 ++ ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol(:) ++ cou_sol_lng(:)=cou_sol(:) ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc(:) ++ cou_exc_lng(:)=cou_exc(:) ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++ ia=0 ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ isn=1 ++ call neutlst ++ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrceneu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions out to rcut ++ ++ if(lgr)then ++ call rdf0neu(ik,rcut) ++ endif ++ ++ enddo ++ ++c ******************END OF PRIMARY NEIGHBOUR PROCESSING************* ++ ++c check on validity of call to neutlst ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ if(.not.lchk)then ++ call gimax(ibig,1,i) ++ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf ++ call error(idnode,479) ++ endif ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary neighbour contributions to force, energy etc ++ ++ if(newplst)then ++ ++ do i=1,natms ++ ++ fpx(i)=flx(i) ++ fpy(i)=fly(i) ++ fpz(i)=flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stresl(i) ++ enddo ++ ++ engsr1=engsrl ++ virsr1=virsrl ++ engcp1=engcpl ++ vircp1=vircpl ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol_lng(:) ++ cou_sol_put(:)=cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc_lng(:) ++ cou_exc_put(:)=cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c calculate force increments etc ++ ++ if(mod(nstep-nstep0,multt).eq.1)then ++ ++ do i=1,natms ++ ++ flx(i)=flx(i)-fpx(i) ++ fly(i)=fly(i)-fpy(i) ++ flz(i)=flz(i)-fpz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stresl(i)-stresp(i) ++ enddo ++ ++ virsrl=virsrl-virsr1 ++ engsrl=engsrl-engsr1 ++ vircpl=vircpl-vircp1 ++ engcpl=engcpl-engcp1 ++ ++c solvation and excitation increments ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) ++ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) ++ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c extrapolate long range terms ++ ++ ann=dble(mod(nstep-nstep0,multt)) ++ ++ do i=1,natms ++ ++ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) ++ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) ++ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresl(i)*ann+stresp(i) ++ enddo ++ ++ engsrp=engsr1+engsrl*ann+engsrp ++ virsrp=virsr1+virsrl*ann+virsrp ++ engcpe=engcp1+engcpl*ann+engcpe ++ vircpe=vircp1+vircpl*ann+vircpe ++ ++c solvation and excitation extrapolation ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) ++ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) ++ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (txx,tyy,tzz,uxx,uyy,uzz,stat=fail(1)) ++ ++ return ++ end subroutine multiple_neu ++ ++ subroutine multiple_nsq ++ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for multiple time step algorithm ++c to be used with all-pairs option ++c ++c flx,fly,flz : forces from electrostatics from r > rcut ++c fpx,fpy,fpz : forces from electrostatics from rprim < r <= rcut ++c fxx,fyy,fzz : total force ++c ++c copyright daresbury laboratory 1993 ++c ++c author t. forester, may 1993 ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c Ewald sum --- not used ++c = 4,5 ------ Distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c truncated and shifted coulombic -- not used ++c reaction field - not used ++c ++c**************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=5 ++ logical newplst,newlst,lgofr,lzeql,lgr,lnsq,newjob,lsolva ++ logical lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,multt,mxnode,natms,nstep,nstbgr ++ integer nsteql,numrdf,fail,nstep0,ii,ik,k,numlsts,nsolva ++ integer isolva,i,j ++ real(8) delr,dlrpot,engcpe,engsrp,engcp3,epsq,rcut ++ real(8) rprim,rvdw,vircpe,virsrp,vircp3,rcut1,engcp2,vircp2 ++ real(8) engsr2,virsr2,stresp,engacc,viracc ++ ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension stresp(9),fail(nnn) ++ ++ save engsr2,virsr2,engcp2,vircp2,nstep0,numlsts,stresp,fpx,fpy,fpz ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data numlsts/-1/ ++ data newjob/.true./ ++ ++c allocate work arrays ++ ++ if(newjob)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) ++ endif ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1860) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++ if(lnsq)then ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c divide neighbour list into primary and secondary neighbours ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call primlst(idnode,mxnode,natms,imcon,rprim) ++ ++ endif ++ ++c flag for accumulating rdfs ++ ++ lgr=(lgofr.and.(.not.lzeql.or.(nstep-nsteql.gt.0))) ++ lgr=(lgr.and.newplst.and.(mod(numlsts,nstbgr).eq.0)) ++ ++c set extended cutoff for electrostatics - secondary shell ++ ++ rcut1=rcut+delr ++ ++ if(newlst)nstep0=nstep ++ newplst=(newlst.or.mod(nstep-nstep0,multt).eq.0) ++ ++c ********************PROCESS TERTIARY NEIGHBOURS********************* ++ ++ if(newplst)then ++ ++ call coul_nsq ++ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, ++ x engcp3,vircp3) ++ ++ endif ++ ++c ****************END OF TERTIARY NEIGHBOUR PROCESSING************** ++ ++c ********************PROCESS SECONDARY NEIGHBOURS******************** ++ ++ if(newplst)then ++ ++c zero accumulators for secondary neighbour energies and virial ++ ++ engcp2=0.d0 ++ vircp2=0.d0 ++ engsr2=0.d0 ++ virsr2=0.d0 ++ ++c zero secondary forces ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++ ii=0 ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic vectors ++ ++ ik=0 ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary condition only for interactions > rprim ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of interatomic distances ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c short range forces for secondary shell ++ ++ if((mod(keyfce,2).eq.1).and.(rvdw.gt.rprim-delr))then ++ ++ call srfrce ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsr2=engsr2+engacc ++ virsr2=virsr2+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then ++ ++ call error(idnode,424) ++ ++ elseif(keyfce/2.eq.2)then ++ ++c distance dependent dielectric ++ ++ call coul2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) ++ ++ engcp2=engcp2+engacc ++ vircp2=vircp2+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++c coulombic potential ++ ++ call coul0 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) ++ ++ engcp2=engcp2+engacc ++ vircp2=vircp2+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++c truncated shifted coulombic potential ++ ++ call error(idnode,424) ++ ++ endif ++ ++c accumulate radial distribution functions : out to rcut ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ fpx(i)=fxx(i) ++ fpy(i)=fyy(i) ++ fpz(i)=fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stress(i) ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol(:) ++ cou_sol_put(:)=cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc(:) ++ cou_exc_put(:)=cou_exc(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c zero primary forces ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c zero solvation and excitation arrays ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate primary pair force contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=-list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of interatomic distances ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions : out to rcut ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then ++ ++ call error(idnode,424) ++ ++ elseif(keyfce/2.eq.2)then ++ ++c distance dependent dielectric ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++c coulombic potential ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,424) ++ ++ endif ++ ++ enddo ++ ++c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary and tertiary neighbour contributions to ++c force, energy etc ++ ++ do i=1,natms ++ ++ fxx(i)=fxx(i)+fpx(i)+flx(i) ++ fyy(i)=fyy(i)+fpy(i)+fly(i) ++ fzz(i)=fzz(i)+fpz(i)+flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresp(i) ++ enddo ++ ++ engsrp=engsrp+engsr2 ++ virsrp=virsrp+virsr2 ++ ++ engcpe=engcpe+engcp2+engcp3 ++ vircpe=vircpe+vircp2+vircp3 ++ ++c calculate solvation and excitation arrays ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol(:)+vdw_sol_put(:)+vdw_sol_lng(:) ++ cou_sol(:)=cou_sol(:)+cou_sol_put(:)+cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc(:)+vdw_exc_put(:)+vdw_exc_lng(:) ++ cou_exc(:)=cou_exc(:)+cou_exc_put(:)+cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine multiple_nsq ++ ++ subroutine neutlst ++ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ll, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c*********************************************************************** ++c ++c dlpoly routine to create pair lists for neutral group ++c implementations. ++c loops over group ineu ++c ++c replicated data version ++c ++c copyright daresbury laboratory 1994 ++c author t.forester march 1994 ++c ++c isn = -1 => secondary neighbours ++c isn = 1 => primary neighbours - must contain excld interactions ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newlst,lchk,lexc ++ integer isn,imcon,idnode,ineu,ia,ll,i,jj,jj0,jj1 ++ integer fail,ibig,keyexc,lenia,j,jneu,in0,in1 ++ real(8) txx,tyy,tzz,uxx,uyy,uzz ++ ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1830) ++ ++ if(newlst)then ++ ++ ibig=0 ++ ++c set cutoff radius ++ ++ ll=0 ++ ++c number of excludes found ++ ++ if(isn.lt.0)then ++ keyexc=nexatm(ia)+2 ++ else ++ keyexc=1 ++ endif ++ ++c do centre - centre distances ++ ++ lenia=lentry(ia) ++ ++ do j=1,lenia ++ ++ jneu=abs(list(ia,j)) ++ xxt(j)=uxx(ineu)-uxx(jneu) ++ yyt(j)=uyy(ineu)-uyy(jneu) ++ zzt(j)=uzz(ineu)-uzz(jneu) ++ ++ enddo ++ ++ call images(imcon,0,1,lenia,cell,xxt,yyt,zzt) ++ ++c working intragroup vectors of central group ++c - for periodic boundaries ++ ++ in0=neulst(ineu) ++ in1=neulst(ineu+1)-1 ++ ++c loop over neutral groups sites of a ++ ++ ++c loop over groups in list ++ ++ do jj=1,lentry(ia) ++ ++ jneu=list(ia,jj)*isn ++ ++ if(jneu.gt.0)then ++ ++ do i=in0,in1 ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++ if(ineu.eq.jneu)jj0=i+1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++c reject atoms in excluded pair list ++ ++ lexc=.false. ++ ++ if(keyexc.lt.nexatm(ia))then ++ ++ if(lexatm(ia,keyexc).eq.i)then ++ if(lexatm(ia,keyexc+1).eq.j)then ++ lexc=.true. ++ keyexc=keyexc+2 ++ endif ++ endif ++ ++ endif ++ ++c reject frozen atom pairs ++ ++ if(lstfrz(i).ne.0)then ++ if(lstfrz(j).ne.0)lexc=.true. ++ endif ++ ++ if(.not.lexc)then ++ ++ ll=ll+1 ++ if(ll.le.mxxdf)then ++ ++ xdf(ll)=txx(i)+xxt(jj)-txx(j) ++ ydf(ll)=tyy(i)+yyt(jj)-tyy(j) ++ zdf(ll)=tzz(i)+zzt(jj)-tzz(j) ++ rsqdf(ll)=xdf(ll)**2+ydf(ll)**2+zdf(ll)**2 ++ ilist(ll)=i ++ jlist(ll)=j ++ ++ else ++ ++ lchk=.false. ++ ibig=max(ibig,ll) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail) ++ ++ return ++ end subroutine neutlst ++ ++ end module forces_module ++ +diff -urN dl_class_1.9.orig/srcmod/forces_module.f.preplumed dl_class_1.9/srcmod/forces_module.f.preplumed +--- dl_class_1.9.orig/srcmod/forces_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/forces_module.f.preplumed 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,2952 @@ ++ module forces_module ++ ++c*********************************************************************** ++c ++c dl_poly module for calculation of atomic forces ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - d. quigley : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use coulomb_module ++ use error_module ++ use ewald_module ++ use exclude_module ++ use external_field_module ++ use four_body_module ++ use hkewald_module ++ use metafreeze_module ++ use metal_module ++ use neu_coul_module ++ use nlist_builders_module ++ use pair_module ++ use property_module ++ use setup_module ++ use solvation_module ++ use spme_module ++ use tersoff_module ++ use three_body_module ++ use utility_module ++ use vdw_module ++ ++ contains ++ ++ subroutine force_manager ++ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c********************************************************************* ++c ++c dl_poly subroutine to manage the calculation of the atomic forces ++c from all force field terms. ++c ++c copyright - daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva ++ logical lfree,lghost,llsolva ++ ++ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,numrdf ++ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ntpmet ++ integer i,nospl,multt,nneut,ntbond,ntangl,ntdihd,nsolva,isolva ++ integer ntinv,ntteth,ntshl,ntptbp,ntpfbp,ntpter,keyshl,keyfld ++ ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet ++ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp ++ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang,engdih ++ real(8) virdih,enginv,virinv,engtet,virtet,engshl,virshl,engfld ++ real(8) virfld,fmax,temp,shlke,engcfg,tmpeng,tmpvir,engord,virord ++ ++ llsolva=.false. ++ ++c initialize energy and virial accumulators ++ ++ engbnd=0.d0 ++ virbnd=0.d0 ++ engang=0.d0 ++ virang=0.d0 ++ engdih=0.d0 ++ virdih=0.d0 ++ enginv=0.d0 ++ virinv=0.d0 ++ engtbp=0.d0 ++ virtbp=0.d0 ++ engter=0.d0 ++ virter=0.d0 ++ engfbp=0.d0 ++ virfbp=0.d0 ++ engsrp=0.d0 ++ virsrp=0.d0 ++ engcpe=0.d0 ++ vircpe=0.d0 ++ engfld=0.d0 ++ virfld=0.d0 ++ engshl=0.d0 ++ virshl=0.d0 ++ shlke =0.d0 ++ engtet=0.d0 ++ virtet=0.d0 ++ engmet=0.d0 ++ virmet=0.d0 ++ virord=0.0d0 ++ engord=0.0d0 ++ ++ if(lmetadyn)then ++ ++ eng_loc=0.0d0 ++ vir_loc=0.0d0 ++ fxx_loc(:)=0.0d0 ++ fyy_loc(:)=0.0d0 ++ fzz_loc(:)=0.0d0 ++ stress_loc(:)=0.0d0 ++ ++ endif ++ ++c initialise free energy accumulators ++ ++ if(lfree)then ++ ++ ang_fre=0.d0 ++ bnd_fre=0.d0 ++ dih_fre=0.d0 ++ inv_fre=0.d0 ++ tbp_fre=0.d0 ++ fbp_fre=0.d0 ++ cou_fre=0.d0 ++ vdw_fre=0.d0 ++ shl_fre=0.d0 ++ ang_vir=0.d0 ++ bnd_vir=0.d0 ++ dih_vir=0.d0 ++ inv_vir=0.d0 ++ tbp_vir=0.d0 ++ fbp_vir=0.d0 ++ cou_vir=0.d0 ++ vdw_vir=0.d0 ++ shl_vir=0.d0 ++ eng_cfg_fre=0.d0 ++ vir_cfg_fre=0.d0 ++ ++ endif ++ ++c initialise solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ if(keyfce/2.gt.0)lcomp(6)=.true. ++ if(mod(keyfce,2).eq.1)lcomp(7)=.true. ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++ llsolva=.true. ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c initialise the force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ if(nstep.gt.0)then ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++ endif ++ ++ if(keyfce.gt.0)then ++ ++c calculate pair forces, including coulombic forces ++ ++ if(lnsq)then ++ ++c multiple timestep - all-pairs ++ ++ call multiple_nsq ++ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp) ++ ++ elseif(.not.lneut)then ++ ++c single timestep ++ ++ if(multt.eq.1)then ++ ++ call forces ++ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw, ++ x ntpmet,natms,nstbgr,nstep,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw, ++ x vircpe,virsrp,volm,engmet,virmet) ++ ++ else ++ ++ call multiple ++ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, ++ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, ++ x rvdw,vircpe,virsrp,volm) ++ ++ endif ++ ++ elseif(lneut)then ++ ++c neutral groups ++ ++ if(multt.eq.1)then ++ ++ call forces_neu ++ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, ++ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, ++ x vircpe,virsrp) ++ ++ else ++ ++ call multiple_neu ++ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rprim,rcut,rvdw,alpha,vircpe,virsrp) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c add in long range corrections to energy and pressure ++ ++ engsrp=engsrp+elrc ++ virsrp=virsrp+virlrc ++ engmet=engmet+elrcm(0) ++ virmet=virmet+vlrcm(0) ++ if(lfree)then ++ vdw_fre=vdw_fre+elrc_fre ++ vdw_vir=vdw_vir+vlrc_fre ++ endif ++ ++c calculate three body forces ++ ++ if(ntptbp.gt.0)call thbfrc ++ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcuttb, ++ x engtbp,virtbp) ++ ++c calculate four body forces ++ ++ if(ntpfbp.gt.0)call fbpfrc ++ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcutfb, ++ x engfbp,virfbp) ++ ++c calculate tersoff potential forces ++ ++ if(ntpter.gt.0)call tersoff ++ x (idnode,mxnode,natms,imcon,rctter,engter,virter) ++ ++c calculate bond forces ++ ++ if(ntbond.gt.0)call bndfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntbond,epsq, ++ x engbnd,virbnd) ++ ++c calculate valence angle forces ++ ++ if(ntangl.gt.0)call angfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntangl,engang,virang) ++ ++c calculate dihedral forces ++ ++ if(ntdihd.gt.0)call dihfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntdihd,keyfce,dlrpot, ++ x epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe,virdih,virsrp) ++ ++c calculate inversion forces ++ ++ if(ntinv.gt.0)call invfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntinv,enginv,virinv) ++ ++c calculate tethered atom forces ++ ++ if(ntteth.gt.0)call tethfrc ++ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) ++ ++c calculate shell model forces ++ ++ if(keyshl.gt.0)call shlfrc ++ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntshl,engshl,virshl) ++ ++c external field ++ ++ if(keyfld.gt.0)call extnfld ++ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) ++ ++c metadynamics option : use potential energy as order parameter ++ ++ if(lmetadyn)then ++ ++ tmpeng=engsrp+engcpe+engbnd+engang+engdih+engfld+ ++ x engtbp+engfbp+engshl+enginv+engter+engmet ++ ++ tmpvir=vircpe+virsrp+virbnd+virtbp+virter+virfld+ ++ x virang+virshl+virtet+virmet ++ ++ call metafreeze_driver ++ x (imcon,natms,temp,nstep,tmpeng,tmpvir,engord,virord) ++ ++ endif ++ ++c global summation of force arrays (basic replicated data strategy) ++ ++ call global_sum_forces(natms,mxnode,fxx,fyy,fzz) ++ ++c global sum of stress arrays ++ ++ if(mxnode.gt.1)call gdsum(stress,9,buffer) ++ ++c add long range correction to diagonal terms of stress tensor ++ ++ stress(1)=stress(1)-(virlrc+vlrcm(0))/3.d0 ++ stress(5)=stress(5)-(virlrc+vlrcm(0))/3.d0 ++ stress(9)=stress(9)-(virlrc+vlrcm(0))/3.d0 ++ ++c cap forces in equilibration mode ++ ++ if(nstep.le.nsteql.and.lfcap) ++ x call fcap(lfcap,natms,fmax,temp) ++ ++c total configuration energy ++ ++ engcfg=engsrp+engcpe+engbnd+engang+engdih+engfld+engtbp+ ++ x engfbp+engshl+enginv+engter+engmet ++ ++c total derivative of the configurational free energy ++ ++ if(lfree)then ++ ++ eng_cfg_fre=dlambda*(ang_fre+bnd_fre+dih_fre+inv_fre+ ++ x tbp_fre+fbp_fre+cou_fre+vdw_fre+shl_fre) ++ vir_cfg_fre=dlambda*(ang_vir+bnd_vir+dih_vir+inv_vir+ ++ x tbp_vir+fbp_vir+cou_vir+vdw_vir+shl_vir) ++ ++ endif ++ ++c sum solvation and excitation energies for pair forces ++ ++ if(mxnode.gt.1)then ++ ++ if(llsolva)then ++ ++ call gdsum(vdw_sol,mxtmls_sol2,buffer) ++ call gdsum(cou_sol,mxtmls_sol2,buffer) ++ ++ if(lghost)then ++ ++ call gdsum(vdw_exc,mxtmls_exc2,buffer) ++ call gdsum(cou_exc,mxtmls_exc2,buffer) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c add long range corrections to solvation terms ++ ++ if(lsolva)then ++ ++ vdw_sol(:)=vdw_sol(:)+elrc_sol(:) ++ if(lghost)vdw_exc(:)=vdw_exc(:)+elrc_exc(:) ++ ++ endif ++ ++ return ++ end subroutine force_manager ++ ++ subroutine forces ++ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw,ntpmet,natms, ++ x nstbgr,nstep,nsteql,numrdf,nospl,nsolva,isolva,alpha,dlrpot, ++ x drewd,engcpe,engsrp,epsq,rcut,rvdw,vircpe,virsrp,volm,engmet, ++ x virmet) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c amended - t. forester sept 1994 ++c amended - w. smith june 1995 for metal potentials ++c ++c key: ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ Ewald sum : ewald1,2,3 ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ truncated and shifted coulombic : coul4 ++c = 10,11 ----- reaction field : coul3 ++c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3] ++c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzeql,loglnk,lewald,lspme,lhke,newjob,lcshft,safe ++ logical lsolva,lfree,lghost,llsolva ++ ++ integer idnode,imcon,keyfce,kmax1,kmax2,kmax3,nhko,nlatt ++ integer mxnode,ntpvdw,natms,nstbgr,nstep,nsteql,numrdf ++ integer ntpmet,nospl,nsolva,isolva,i,j,k,ii ++ ++ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw,eps ++ real(8) vircpe,virsrp,volm,engacc,engac1,viracc,engmet,virmet ++ ++ save newjob ++ ++ data newjob/.true./ ++ ++ safe=.true. ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ lhke=(keyfce/2.eq.7) ++ lspme=(keyfce/2.eq.6) ++ lewald=(keyfce/2.eq.1) ++ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) ++ ++c create ewald interpolation arrays ++ ++ if(newjob)then ++ ++ if(lhke)then ++ ++ call hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) ++ ++ else if(lewald.or.lspme.or.lcshft)then ++ ++ call erfcgen(alpha,drewd,rcut) ++ ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++c initialise force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c calculate local density in metals ++ ++ if(ntpmet.gt.0)then ++ ++ call metdens ++ x (idnode,imcon,mxnode,natms,engmet,virmet) ++ ++ stress(1)=stress(1)-virmet/3.d0 ++ stress(5)=stress(5)-virmet/3.d0 ++ stress(9)=stress(9)-virmet/3.d0 ++ ++ endif ++ ++c fourier contribution to coulombic forces in Ewald sum ++ ++ if(lewald)then ++ ++ call ewald1 ++ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, ++ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) ++ ++ engcpe=engcpe+engac1 ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c hautman-klein-ewald method ++ ++ if(lhke)then ++ ++c fourier terms of hk-ewald ++ ++ call hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engacc,viracc,alpha,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++c real space terms of hk-ewald ++ ++ call hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engacc,viracc, ++ x drewd,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c smoothed particle mesh ewald ++ ++ if(lspme)then ++ ++ call ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engac1,viracc,alpha,volm,epsq) ++ ++ engcpe=engcpe+engac1 ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c outer loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ilist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) ++ ++c square of distances ++ ++ do k=1,lentry(ii) ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c calculate metal forces and potential ++ ++ if(ntpmet.gt.0)then ++ ++ call metfrc(safe,i,lentry(ii),engacc,viracc) ++ ++ engmet=engmet+engacc ++ virmet=virmet+viracc ++ ++ endif ++ ++c calculate short range force and potential terms ++ ++ if(ntpvdw.gt.0.and.mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc, ++ x rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme)then ++ ++ call ewald2(llsolva,lfree,lghost,i,lentry(ii),engacc, ++ x viracc,drewd,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions ++ ++ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then ++ ++ if(mod(nstep,nstbgr).eq.0)then ++ ++ call rdf0(i,lentry(ii),rcut) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c check metal interpolation is safe ++ ++ if(ntpmet.gt.0)then ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,142) ++ ++ endif ++ ++c calculate corrections for intramolecular coulomb terms in ++c Ewald sum ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ eps=epsq ++ if(loglnk)eps=eps*2.0d0 ++ ++c outer loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,nexatm(ii) ++ ++ j=lexatm(ii,k) ++ jlist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) ++ ++c calculate correction terms ++ ++ if(lhke)then ++ ++ call hkewald3(i,ii,engacc,viracc,eps) ++ ++ else ++ ++ call ewald3 ++ x (llsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) ++ ++ endif ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ enddo ++ ++ endif ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then ++ ++ if(mod(nstep,nstbgr).eq.0)then ++ ++ numrdf=numrdf+1 ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=engmet ++ buffer(6)=virmet ++ buffer(7)=vdw_fre ++ buffer(8)=cou_fre ++ buffer(9)=vdw_vir ++ buffer(10)=cou_vir ++ call gdsum(buffer(1),10,buffer(11)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ engmet=buffer(5) ++ virmet=buffer(6) ++ vdw_fre=buffer(7) ++ cou_fre=buffer(8) ++ vdw_vir=buffer(9) ++ cou_vir=buffer(10) ++ ++ endif ++ ++ return ++ end subroutine forces ++ ++ subroutine forces_neu ++ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, ++ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, ++ x vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c neutral group implemenation - no Ewald sum option ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c ++c modified - t. forester april 1993 ++c key: ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ invalid ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ invalid ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzeql,newlst,lchk,lsolva,lfree,lghost,llsolva ++ ++ integer idnode,imcon,keyfce,mxnode,natms,nneut,nstbgr ++ integer nstep,nsteql,numrdf,i,fail,jneu,jj0,jj1,j ++ integer ibig,ia,ineu,isn,ik,nsolva,isolva ++ real(8) dlrpot,engcpe,engsrp,epsq,rcut,rvdw,vircpe ++ real(8) virsrp,engacc,viracc,anorm,alpha ++ ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ ++ dimension fail(2) ++ ++ data fail/0,0/ ++ ++c allocate working arrays ++ ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ do i=1,2 ++ if(fail(i).ne.0)call error(idnode,1820) ++ enddo ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c initialise force and stress arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c initialise energy and virial accumulators ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c intra group vectors com ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-xxx(jj0) ++ tyy(j)=yyy(j)-yyy(jj0) ++ tzz(j)=zzz(j)-zzz(jj0) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,natms,cell,txx,tyy,tzz) ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ xxx(j)=txx(j)+xxx(jj0) ++ yyy(j)=tyy(j)+yyy(jj0) ++ zzz(j)=tzz(j)+zzz(jj0) ++ ++ enddo ++ ++c centre of molecule ++ ++ uxx(jneu)=0.d0 ++ uyy(jneu)=0.d0 ++ uzz(jneu)=0.d0 ++ anorm=1.d0/dble(jj1-jj0+1) ++ ++ do j=jj0,jj1 ++ ++ uxx(jneu)=uxx(jneu)+xxx(j)*anorm ++ uyy(jneu)=uyy(jneu)+yyy(j)*anorm ++ uzz(jneu)=uzz(jneu)+zzz(j)*anorm ++ ++ enddo ++ ++c vector from site to geometric centre ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-uxx(jneu) ++ tyy(j)=yyy(j)-uyy(jneu) ++ tzz(j)=zzz(j)-uzz(jneu) ++ ++ enddo ++ ++ enddo ++ ++c outer loop over neutral groups ++ ++ lchk=.true. ++ ibig=0 ++ ia=0 ++ ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ newlst=.true. ++ ++ isn=1 ++ call neutlst ++ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrceneu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions ++ ++ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. ++ x mod(nstep,nstbgr).eq.0)then ++ ++ call rdf0neu(ik,rcut) ++ ++ endif ++ ++ enddo ++ ++c check on validity of call to neutlst ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ if(.not.lchk)then ++ call gimax(ibig,1,i) ++ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf ++ call error(idnode,478) ++ endif ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) ++ ++c counter for rdf statistics outside loop structure ++ ++ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. ++ x mod(nstep,nstbgr).eq.0)numrdf=numrdf+1 ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,stat=fail(2)) ++ ++ return ++ end subroutine forces_neu ++ ++ subroutine multiple ++ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, ++ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, ++ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, ++ x rvdw,vircpe,virsrp,volm) ++c*************************************************************************** ++c ++c dl_poly subroutine for multiple time step algorithm ++c reciprocal space calculated on long time steps. ++c ++c copyright daresbury laboratory ++c ++c author t. forester, may 1993 ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ Ewald sum : ewald1,2,3,4 ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ truncated and shifted coulombic : coul4 ++c = 10,11 ----- reaction field : coul3 ++c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3,4] ++c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3,4 ++c ++c**************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=5 ++ ++ logical newplst,newlst,lgofr,lzeql,lgr,loglnk,lewald,lspme ++ logical lhke,newjob,lcshft,lsolva,lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt ++ integer mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,fail ++ integer numlsts,i,nstep0,nsolva,isolva,ii,k,j,ik ++ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,volm,stresp,engcpl,engacc,viracc,engac1 ++ real(8) vircpl,eps,ann,engsr1,viracl,engsrl,virsrl,virac2,engcp1 ++ real(8) vircp1,engacl,engac2,virsr1 ++ ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension stresp(9),fail(nnn) ++ ++ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 ++ save engsr1,virsr1,stresp,fpx,fpy,fpz,newjob ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data newjob/.true./ ++ data numlsts/-1/ ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ lhke=(keyfce/2.eq.7) ++ lspme=(keyfce/2.eq.6) ++ lewald=(keyfce/2.eq.1) ++ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) ++ if(newlst)nstep0=nstep ++ newplst=(newlst).or.(mod(nstep-nstep0,multt).eq.0) ++ ++c allocate working arrays ++ ++ if(newjob)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) ++ endif ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1840) ++ enddo ++ ++ endif ++ ++c create ewald interpolation arrays ++ ++ if(newjob)then ++ ++ if(lspme.or.lewald.or.lcshft)then ++ ++ call erfcgen(alpha,drewd,rcut) ++ ++ endif ++ ++ endif ++ ++ newjob=.false. ++ ++c divide neighbour list into primary and secondary neighbours ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call primlst(idnode,mxnode,natms,imcon,rprim) ++ ++ endif ++ ++c flag for accumulating rdfs ++ ++ lgr=.false. ++ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) ++ lgr=(lgr.and.(newplst.and.lgofr)) ++ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) ++ ++c zero force and stress arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c ********************PROCESS SECONDARY NEIGHBOURS****************** ++ ++ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then ++ ++c zero accumulators ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ engsrl=0.d0 ++ virsrl=0.d0 ++ llsolva=lsolva ++ if(lsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate fourier contribution to secondary coulombic forces ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ if(lewald)then ++ ++ call ewald1 ++ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, ++ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) ++ ++c hautman-klein-ewald method ++ ++ elseif(lhke)then ++ ++ call hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engac1,viracc,alpha,epsq) ++ ++c real space terms of hk-ewald ++ ++ call hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engac2, ++ x virac2,drewd,rcut,epsq) ++ ++ engac1=engac1+engac2 ++ viracc=viracc+virac2 ++ ++ elseif(lspme)then ++ ++c smoothed particle mesh ewald ++ ++ call ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engac1,viracc,alpha,volm,epsq) ++ ++ endif ++ ++ engcpl=engcpl+engac1 ++ vircpl=vircpl+viracc ++ ++c calculate corrections for intramolecular coulomb terms in ++c Ewald sum ++c note: if using link cells - have double counted excluded ++c interactions use temporary adjustment to relative dielectric ++c constant ++ ++ eps=epsq ++ if(loglnk)eps=epsq*2.0d0 ++ ++c calculate self interaction corrections for fourier contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,nexatm(ii) ++ ++ j=lexatm(ii,k) ++ jlist(k)=j ++ ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) ++ ++c calculate correction terms ++ ++ if(lhke)then ++ ++ call hkewald3(i,ii,engacc,viracc,eps) ++ ++ else ++ ++ call ewald3 ++ x (lsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) ++ ++ endif ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ enddo ++ ++ endif ++ ++c calculate pair contributions to secondary neighbour forces ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of distance ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrl=engsrl+engacc ++ virsrl=virsrl+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme)then ++ ++ call ewald2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,drewd,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ endif ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ flx(i)=fxx(i) ++ fly(i)=fyy(i) ++ flz(i)=fzz(i) ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stress(i) ++ stress(i)=0.d0 ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol(:) ++ cou_sol_lng(:)=cou_sol(:) ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc(:) ++ cou_exc_lng(:)=cou_exc(:) ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c calculate pair force contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=-list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of distance ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++c (real space contributions to ewald sum) ++ ++ if(lewald.or.lspme.or.lhke)then ++ ++ if(newplst.or. ++ x (mod(nstep-nstep0,multt).le.1))then ++ ++ if(lhke)then ++ ++ call hkewald4(i,ik,engacc,viracc,engacl,viracl,rcut,epsq) ++ ++ else ++ ++ call ewald4 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,engacl,viracl, ++ x drewd,rcut,epsq) ++ ++ endif ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ engcpl=engcpl+engacl ++ vircpl=vircpl+viracl ++ ++ else ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++ elseif(keyfce/2.eq.2)then ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call coul4 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++ enddo ++ ++c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary neighbour contributions to force, energy etc ++ ++ if(newplst)then ++ ++ do i=1,natms ++ ++ fpx(i)=flx(i) ++ fpy(i)=fly(i) ++ fpz(i)=flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stresl(i) ++ enddo ++ ++ engsr1=engsrl ++ virsr1=virsrl ++ engcp1=engcpl ++ vircp1=vircpl ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol_lng(:) ++ cou_sol_put(:)=cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc_lng(:) ++ cou_exc_put(:)=cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c calculate force increments etc ++ ++ if(mod(nstep-nstep0,multt).eq.1)then ++ ++ do i=1,natms ++ ++ flx(i)=flx(i)-fpx(i) ++ fly(i)=fly(i)-fpy(i) ++ flz(i)=flz(i)-fpz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stresl(i)-stresp(i) ++ enddo ++ ++ virsrl=virsrl-virsr1 ++ engsrl=engsrl-engsr1 ++ vircpl=vircpl-vircp1 ++ engcpl=engcpl-engcp1 ++ ++c solvation and excitation increments ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) ++ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) ++ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c extrapolate long range terms ++ ++ ann=dble(mod(nstep-nstep0,multt)) ++ ++ do i=1,natms ++ ++ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) ++ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) ++ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresp(i)+stresl(i)*ann ++ enddo ++ ++ engsrp=engsr1+engsrl*ann+engsrp ++ virsrp=virsr1+virsrl*ann+virsrp ++ engcpe=engcp1+engcpl*ann+engcpe ++ vircpe=vircp1+vircpl*ann+vircpe ++ ++c solvation and excitation extrapolation ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) ++ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) ++ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++ return ++ end subroutine multiple ++ ++ subroutine multiple_neu ++ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, ++ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rprim,rcut,rvdw,alpha,vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating interatomic forces ++c using the verlet neighbour list ++c neutral group implemenation - no Ewald sum option ++c multiple timestep option ++c ++c parallel replicated data version ++c ++c fpx,fpy,fpz : forces from electrostatics fron rprim < r <= rcut ++c fxx,fyy,fzz : total force ++c ++c copyright daresbury laboratory april 1994 ++c author - t. forester april 1993 ++c key: ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c = 2,3 ------ invalid ++c = 4,5 ------ distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c = 8,9 ------ invalid ++c = 10,11 ----- reaction field : coul3 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical lgofr,lzeql,newlst,newplst,lgr,lchk,newjob,lsolva ++ logical lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,multt,mxnode,natms,nneut,nstbgr ++ integer nstep,nsteql,numrdf,fail,i,numlsts,jneu,jj0,j ++ integer jj1,ineu,ia,isn,ibig,ik,nstep0,nsolva,isolva ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rprim,rcut,rvdw,vircpe ++ real(8) virsrp,engcpl,vircpl,engsrl,virsrl,anorm,ann,stresp ++ real(8) engacc,viracc,engsr1,virsr1,engcp1,vircp1,alpha ++ ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension fail(nnn),stresp(9) ++ ++ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 ++ save engsr1,virsr1,stresp,fpx,fpy,fpz ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data newjob/.true./ ++ data numlsts/-1/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ if(newjob)then ++ ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(3)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(4)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(5)) ++ ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(6)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(7)) ++ endif ++ ++ endif ++ newjob=.false. ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1850) ++ enddo ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c error if ewald sum requested ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) ++ ++c create list of primary and secondary neighbours ++ ++ if(newlst)nstep0=nstep ++ newplst=(mod(nstep-nstep0,multt).eq.0) ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) ++ ++ endif ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c zero force arrays ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress arrays ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c flag for accumulating rdfs ++ ++ lgr=.false. ++ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) ++ lgr=(lgr.and.(newplst.and.lgofr)) ++ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) ++ ++c intra group vectors com ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-xxx(jj0) ++ tyy(j)=yyy(j)-yyy(jj0) ++ tzz(j)=zzz(j)-zzz(jj0) ++ ++ enddo ++ ++ enddo ++ ++ call images(imcon,0,1,natms,cell,txx,tyy,tzz) ++ ++ do jneu=1,nneut ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++ xxx(j)=txx(j)+xxx(jj0) ++ yyy(j)=tyy(j)+yyy(jj0) ++ zzz(j)=tzz(j)+zzz(jj0) ++ ++ enddo ++ ++c centre of molecule ++ ++ uxx(jneu)=0.d0 ++ uyy(jneu)=0.d0 ++ uzz(jneu)=0.d0 ++ anorm=1.d0/dble(jj1-jj0+1) ++ ++ do j=jj0,jj1 ++ ++ uxx(jneu)=uxx(jneu)+xxx(j)*anorm ++ uyy(jneu)=uyy(jneu)+yyy(j)*anorm ++ uzz(jneu)=uzz(jneu)+zzz(j)*anorm ++ ++ enddo ++ ++c vector from site to geometric centre ++ ++ do j=jj0,jj1 ++ ++ txx(j)=xxx(j)-uxx(jneu) ++ tyy(j)=yyy(j)-uyy(jneu) ++ tzz(j)=zzz(j)-uzz(jneu) ++ ++ enddo ++ ++ enddo ++ ++c ********************PROCESS SECONDARY NEIGHBOURS******************** ++ ++ lchk=.true. ++ ibig=0 ++ ia=0 ++ ++ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then ++ ++c zero accumulators for secondary neighbour energies and virial ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ engsrl=0.d0 ++ virsrl=0.d0 ++ ++c initialise solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c outer loop over neutral groups ++ ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ isn=-1 ++ call neutlst ++ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1.and.(rvdw.gt.rprim-delr))then ++ ++ call srfrceneu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrl=engsrl+engacc ++ virsrl=virsrl+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpl=engcpl+engacc ++ vircpl=vircpl+viracc ++ ++ else ++ ++ call error(idnode,250) ++ ++ endif ++ ++c accumulate radial distribution functions out to rcut ++ ++ if(lgr)then ++ call rdf0neu(ik,rcut) ++ endif ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ flx(i)=fxx(i) ++ fly(i)=fyy(i) ++ flz(i)=fzz(i) ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++ do i=1,9 ++ ++ stresl(i)=stress(i) ++ stress(i)=0.d0 ++ ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol(:) ++ cou_sol_lng(:)=cou_sol(:) ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc(:) ++ cou_exc_lng(:)=cou_exc(:) ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++ ia=0 ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++c calculate interatomic distances ++ ++ isn=1 ++ call neutlst ++ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c trap possible array bound exception ++ ++ ibig=max(ibig,ik) ++ if(ik.gt.mxxdf)ik=0 ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrceneu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.2)then ++ ++ call coul2neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++ call coul0neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,250) ++ ++ elseif(keyfce/2.eq.5)then ++ ++ call coul3neu ++ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ endif ++ ++c accumulate radial distribution functions out to rcut ++ ++ if(lgr)then ++ call rdf0neu(ik,rcut) ++ endif ++ ++ enddo ++ ++c ******************END OF PRIMARY NEIGHBOUR PROCESSING************* ++ ++c check on validity of call to neutlst ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ if(.not.lchk)then ++ call gimax(ibig,1,i) ++ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig ++ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf ++ call error(idnode,479) ++ endif ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary neighbour contributions to force, energy etc ++ ++ if(newplst)then ++ ++ do i=1,natms ++ ++ fpx(i)=flx(i) ++ fpy(i)=fly(i) ++ fpz(i)=flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stresl(i) ++ enddo ++ ++ engsr1=engsrl ++ virsr1=virsrl ++ engcp1=engcpl ++ vircp1=vircpl ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol_lng(:) ++ cou_sol_put(:)=cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc_lng(:) ++ cou_exc_put(:)=cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c calculate force increments etc ++ ++ if(mod(nstep-nstep0,multt).eq.1)then ++ ++ do i=1,natms ++ ++ flx(i)=flx(i)-fpx(i) ++ fly(i)=fly(i)-fpy(i) ++ flz(i)=flz(i)-fpz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresl(i)=stresl(i)-stresp(i) ++ enddo ++ ++ virsrl=virsrl-virsr1 ++ engsrl=engsrl-engsr1 ++ vircpl=vircpl-vircp1 ++ engcpl=engcpl-engcp1 ++ ++c solvation and excitation increments ++ ++ if(lsolva)then ++ ++ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) ++ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) ++ ++ if(lghost)then ++ ++ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) ++ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c extrapolate long range terms ++ ++ ann=dble(mod(nstep-nstep0,multt)) ++ ++ do i=1,natms ++ ++ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) ++ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) ++ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresl(i)*ann+stresp(i) ++ enddo ++ ++ engsrp=engsr1+engsrl*ann+engsrp ++ virsrp=virsr1+virsrl*ann+virsrp ++ engcpe=engcp1+engcpl*ann+engcpe ++ vircpe=vircp1+vircpl*ann+vircpe ++ ++c solvation and excitation extrapolation ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) ++ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) ++ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (txx,tyy,tzz,uxx,uyy,uzz,stat=fail(1)) ++ ++ return ++ end subroutine multiple_neu ++ ++ subroutine multiple_nsq ++ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, ++ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, ++ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for multiple time step algorithm ++c to be used with all-pairs option ++c ++c flx,fly,flz : forces from electrostatics from r > rcut ++c fpx,fpy,fpz : forces from electrostatics from rprim < r <= rcut ++c fxx,fyy,fzz : total force ++c ++c copyright daresbury laboratory 1993 ++c ++c author t. forester, may 1993 ++c ++c keyfce = odd ------ short range potentials calculated : srfrce ++c = 0,1 ------ no electrostatics ++c Ewald sum --- not used ++c = 4,5 ------ Distance dependent dielectric : coul2 ++c = 6,7 ------ coulombic : coul0 ++c truncated and shifted coulombic -- not used ++c reaction field - not used ++c ++c**************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=5 ++ logical newplst,newlst,lgofr,lzeql,lgr,lnsq,newjob,lsolva ++ logical lfree,lghost,llsolva ++ integer idnode,imcon,keyfce,multt,mxnode,natms,nstep,nstbgr ++ integer nsteql,numrdf,fail,nstep0,ii,ik,k,numlsts,nsolva ++ integer isolva,i,j ++ real(8) delr,dlrpot,engcpe,engsrp,engcp3,epsq,rcut ++ real(8) rprim,rvdw,vircpe,virsrp,vircp3,rcut1,engcp2,vircp2 ++ real(8) engsr2,virsr2,stresp,engacc,viracc ++ ++ real(8), allocatable :: fpx(:),fpy(:),fpz(:) ++ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) ++ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) ++ ++ dimension stresp(9),fail(nnn) ++ ++ save engsr2,virsr2,engcp2,vircp2,nstep0,numlsts,stresp,fpx,fpy,fpz ++ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put ++ ++ data numlsts/-1/ ++ data newjob/.true./ ++ ++c allocate work arrays ++ ++ if(newjob)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) ++ if(lsolva)then ++ ++ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) ++ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) ++ if(lghost)then ++ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) ++ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) ++ endif ++ ++ endif ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1860) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++ if(lnsq)then ++ ++ llsolva=.false. ++ if(lsolva)then ++ llsolva=(mod(nstep-nsolva,isolva).eq.0) ++ endif ++ ++c divide neighbour list into primary and secondary neighbours ++ ++ if(newplst)then ++ ++ numlsts=numlsts+1 ++ call primlst(idnode,mxnode,natms,imcon,rprim) ++ ++ endif ++ ++c flag for accumulating rdfs ++ ++ lgr=(lgofr.and.(.not.lzeql.or.(nstep-nsteql.gt.0))) ++ lgr=(lgr.and.newplst.and.(mod(numlsts,nstbgr).eq.0)) ++ ++c set extended cutoff for electrostatics - secondary shell ++ ++ rcut1=rcut+delr ++ ++ if(newlst)nstep0=nstep ++ newplst=(newlst.or.mod(nstep-nstep0,multt).eq.0) ++ ++c ********************PROCESS TERTIARY NEIGHBOURS********************* ++ ++ if(newplst)then ++ ++ call coul_nsq ++ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, ++ x engcp3,vircp3) ++ ++ endif ++ ++c ****************END OF TERTIARY NEIGHBOUR PROCESSING************** ++ ++c ********************PROCESS SECONDARY NEIGHBOURS******************** ++ ++ if(newplst)then ++ ++c zero accumulators for secondary neighbour energies and virial ++ ++ engcp2=0.d0 ++ vircp2=0.d0 ++ engsr2=0.d0 ++ virsr2=0.d0 ++ ++c zero secondary forces ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++ ii=0 ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic vectors ++ ++ ik=0 ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary condition only for interactions > rprim ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of interatomic distances ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c short range forces for secondary shell ++ ++ if((mod(keyfce,2).eq.1).and.(rvdw.gt.rprim-delr))then ++ ++ call srfrce ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsr2=engsr2+engacc ++ virsr2=virsr2+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then ++ ++ call error(idnode,424) ++ ++ elseif(keyfce/2.eq.2)then ++ ++c distance dependent dielectric ++ ++ call coul2 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) ++ ++ engcp2=engcp2+engacc ++ vircp2=vircp2+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++c coulombic potential ++ ++ call coul0 ++ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) ++ ++ engcp2=engcp2+engacc ++ vircp2=vircp2+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++c truncated shifted coulombic potential ++ ++ call error(idnode,424) ++ ++ endif ++ ++c accumulate radial distribution functions : out to rcut ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++ enddo ++ ++c store secondary forces and stress tensor ++ ++ do i=1,natms ++ ++ fpx(i)=fxx(i) ++ fpy(i)=fyy(i) ++ fpz(i)=fzz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stresp(i)=stress(i) ++ enddo ++ ++c store solvation and excitation arrays ++ ++ if(lsolva)then ++ ++ vdw_sol_put(:)=vdw_sol(:) ++ cou_sol_put(:)=cou_sol(:) ++ ++ if(lghost)then ++ ++ vdw_exc_put(:)=vdw_exc(:) ++ cou_exc_put(:)=cou_exc(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* ++ ++c ********************PROCESS PRIMARY NEIGHBOURS******************** ++ ++c zero accumulators for total energies and virials ++ ++ engcpe=0.d0 ++ engsrp=0.d0 ++ vircpe=0.d0 ++ virsrp=0.d0 ++ ++c zero primary forces ++ ++ do i=1,natms ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ enddo ++ ++c zero stress tensor ++ ++ do i=1,9 ++ stress(i)=0.d0 ++ enddo ++ ++c zero solvation and excitation arrays ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ ++ if(lghost)then ++ ++ vdw_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ ++ endif ++ ++ endif ++ ++c calculate primary pair force contributions ++ ++ ii=0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ ik=0 ++ ++ do k=1,lentry(ii) ++ ++ j=-list(ii,k) ++ ++ if(j.gt.0)then ++ ++ ik=ik+1 ++ ilist(ik)=j ++ xdf(ik)=xxx(i)-xxx(j) ++ ydf(ik)=yyy(i)-yyy(j) ++ zdf(ik)=zzz(i)-zzz(j) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) ++ ++c square of interatomic distances ++ ++ do k=1,ik ++ ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ ++ enddo ++ ++c accumulate radial distribution functions : out to rcut ++ ++ if(lgr)call rdf0(i,ik,rcut) ++ ++c calculate short range force and potential terms ++ ++ if(mod(keyfce,2).eq.1)then ++ ++ call srfrce ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) ++ ++ engsrp=engsrp+engacc ++ virsrp=virsrp+viracc ++ ++ endif ++ ++c calculate coulombic force and potential terms ++ ++ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then ++ ++ call error(idnode,424) ++ ++ elseif(keyfce/2.eq.2)then ++ ++c distance dependent dielectric ++ ++ call coul2 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.3)then ++ ++c coulombic potential ++ ++ call coul0 ++ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) ++ ++ engcpe=engcpe+engacc ++ vircpe=vircpe+viracc ++ ++ elseif(keyfce/2.eq.4)then ++ ++ call error(idnode,424) ++ ++ endif ++ ++ enddo ++ ++c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** ++ ++c counter for rdf statistics outside loop structure ++ ++ if(lgr)numrdf=numrdf+1 ++ ++c add in secondary and tertiary neighbour contributions to ++c force, energy etc ++ ++ do i=1,natms ++ ++ fxx(i)=fxx(i)+fpx(i)+flx(i) ++ fyy(i)=fyy(i)+fpy(i)+fly(i) ++ fzz(i)=fzz(i)+fpz(i)+flz(i) ++ ++ enddo ++ ++ do i=1,9 ++ stress(i)=stress(i)+stresp(i) ++ enddo ++ ++ engsrp=engsrp+engsr2 ++ virsrp=virsrp+virsr2 ++ ++ engcpe=engcpe+engcp2+engcp3 ++ vircpe=vircpe+vircp2+vircp3 ++ ++c calculate solvation and excitation arrays ++ ++ if(llsolva)then ++ ++ vdw_sol(:)=vdw_sol(:)+vdw_sol_put(:)+vdw_sol_lng(:) ++ cou_sol(:)=cou_sol(:)+cou_sol_put(:)+cou_sol_lng(:) ++ ++ if(lghost)then ++ ++ vdw_exc(:)=vdw_exc(:)+vdw_exc_put(:)+vdw_exc_lng(:) ++ cou_exc(:)=cou_exc(:)+cou_exc_put(:)+cou_exc_lng(:) ++ ++ endif ++ ++ endif ++ ++c sum up contributions to short range and coulombic potential ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engsrp ++ buffer(2)=virsrp ++ buffer(3)=engcpe ++ buffer(4)=vircpe ++ buffer(5)=vdw_fre ++ buffer(6)=cou_fre ++ buffer(7)=vdw_vir ++ buffer(8)=cou_vir ++ call gdsum(buffer(1),8,buffer(9)) ++ engsrp=buffer(1) ++ virsrp=buffer(2) ++ engcpe=buffer(3) ++ vircpe=buffer(4) ++ vdw_fre=buffer(5) ++ cou_fre=buffer(6) ++ vdw_vir=buffer(7) ++ cou_vir=buffer(8) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine multiple_nsq ++ ++ subroutine neutlst ++ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ll, ++ x txx,tyy,tzz,uxx,uyy,uzz) ++ ++c*********************************************************************** ++c ++c dlpoly routine to create pair lists for neutral group ++c implementations. ++c loops over group ineu ++c ++c replicated data version ++c ++c copyright daresbury laboratory 1994 ++c author t.forester march 1994 ++c ++c isn = -1 => secondary neighbours ++c isn = 1 => primary neighbours - must contain excld interactions ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newlst,lchk,lexc ++ integer isn,imcon,idnode,ineu,ia,ll,i,jj,jj0,jj1 ++ integer fail,ibig,keyexc,lenia,j,jneu,in0,in1 ++ real(8) txx,tyy,tzz,uxx,uyy,uzz ++ ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1830) ++ ++ if(newlst)then ++ ++ ibig=0 ++ ++c set cutoff radius ++ ++ ll=0 ++ ++c number of excludes found ++ ++ if(isn.lt.0)then ++ keyexc=nexatm(ia)+2 ++ else ++ keyexc=1 ++ endif ++ ++c do centre - centre distances ++ ++ lenia=lentry(ia) ++ ++ do j=1,lenia ++ ++ jneu=abs(list(ia,j)) ++ xxt(j)=uxx(ineu)-uxx(jneu) ++ yyt(j)=uyy(ineu)-uyy(jneu) ++ zzt(j)=uzz(ineu)-uzz(jneu) ++ ++ enddo ++ ++ call images(imcon,0,1,lenia,cell,xxt,yyt,zzt) ++ ++c working intragroup vectors of central group ++c - for periodic boundaries ++ ++ in0=neulst(ineu) ++ in1=neulst(ineu+1)-1 ++ ++c loop over neutral groups sites of a ++ ++ ++c loop over groups in list ++ ++ do jj=1,lentry(ia) ++ ++ jneu=list(ia,jj)*isn ++ ++ if(jneu.gt.0)then ++ ++ do i=in0,in1 ++ ++ jj0=neulst(jneu) ++ jj1=neulst(jneu+1)-1 ++ ++ if(ineu.eq.jneu)jj0=i+1 ++ ++c loop over jneu sites ++ ++ do j=jj0,jj1 ++ ++c reject atoms in excluded pair list ++ ++ lexc=.false. ++ ++ if(keyexc.lt.nexatm(ia))then ++ ++ if(lexatm(ia,keyexc).eq.i)then ++ if(lexatm(ia,keyexc+1).eq.j)then ++ lexc=.true. ++ keyexc=keyexc+2 ++ endif ++ endif ++ ++ endif ++ ++c reject frozen atom pairs ++ ++ if(lstfrz(i).ne.0)then ++ if(lstfrz(j).ne.0)lexc=.true. ++ endif ++ ++ if(.not.lexc)then ++ ++ ll=ll+1 ++ if(ll.le.mxxdf)then ++ ++ xdf(ll)=txx(i)+xxt(jj)-txx(j) ++ ydf(ll)=tyy(i)+yyt(jj)-tyy(j) ++ zdf(ll)=tzz(i)+zzt(jj)-tzz(j) ++ rsqdf(ll)=xdf(ll)**2+ydf(ll)**2+zdf(ll)**2 ++ ilist(ll)=i ++ jlist(ll)=j ++ ++ else ++ ++ lchk=.false. ++ ibig=max(ibig,ll) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail) ++ ++ return ++ end subroutine neutlst ++ ++ end module forces_module ++ +diff -urN dl_class_1.9.orig/srcmod/four_body_module.f dl_class_1.9/srcmod/four_body_module.f +--- dl_class_1.9.orig/srcmod/four_body_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/four_body_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,979 @@ ++ module four_body_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining four-body potential arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - w. smith aug 2008 : solvation, free energy, excitation ++c adapted - w. smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ ++ implicit none ++ ++ logical, allocatable :: filter(:) ++ real(8), allocatable :: prmfbp(:,:),rcut4b(:) ++ integer, allocatable :: lstfbp(:),ltpfbp(:),latfbp(:) ++ ++ save prmfbp,rcut4b,lstfbp,ltpfbp,latfbp,filter ++ ++ contains ++ ++ subroutine alloc_fbp_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(6) ++ ++ do i=1,6 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmfbp(mxfbp,mxpfbp),stat=fail(1)) ++ allocate (rcut4b(mxfbp),stat=fail(2)) ++ allocate (lstfbp(mxfbp),stat=fail(3)) ++ allocate (ltpfbp(mxfbp),stat=fail(4)) ++ allocate (latfbp(mxatms),stat=fail(5)) ++ allocate (filter(mxsite),stat=fail(6)) ++ ++ do i=1,6 ++ if(fail(i).gt.0)call error(idnode,1140) ++ enddo ++ ++ end subroutine alloc_fbp_arrays ++ ++ subroutine define_four_body ++ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, ++ x rcutfb,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining four body potentials ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits,lmols ++ character*8 keyword ++ character*8 atom0,atom1,atom2,atom3 ++ character*1 message(80) ++ integer idnode,ntpfbp,ntpatm,ifbp,itpfbp,keypot,katm0 ++ integer i,katm1,katm2,katm3,jtpatm,ka1,ka2,ka3,keyfbp,kfbp ++ integer j,fail,idum ++ real(8) rcutfb,engunit ++ real(8), allocatable :: parpot(:) ++ ++ data fail/0/ ++ ++ allocate (parpot(mxpfbp),stat=fail) ++ if(fail.ne.0)call error(idnode,1150) ++ ++ ntpfbp=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'number of specified four ', ++ x 'body potentials',i10)") ntpfbp ++ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ','atom 3 ', ++ x 'atom 4 ',3x,' key',30x,'parameters'/,/)") ++ ++ endif ++ if(ntpfbp.gt.mxfbp) call error(idnode,89) ++ if(.not.lunits) call error(idnode,6) ++ if(.not.lmols) call error(idnode,13) ++ ++ do i=1,mxsite ++ filter(i)=.false. ++ enddo ++ ++ do ifbp=1,mxfbp ++ lstfbp(ifbp)=0 ++ enddo ++ ++ do ifbp=1,mxfbp,mx3fbp ++ lstfbp(ifbp)=-1 ++ enddo ++ ++ rcutfb=0.d0 ++ ++ do itpfbp=1,ntpfbp ++ ++ do i=1,mxpfbp ++ parpot(i)=0.d0 ++ enddo ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++c Note the order!! atom0 is the central atom ++ ++ call copystring(record,message,80) ++ call getword(atom0,record,8,lenrec) ++ call getword(atom1,record,8,lenrec) ++ call getword(atom2,record,8,lenrec) ++ call getword(atom3,record,8,lenrec) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'harm') then ++ keypot=1 ++ elseif(keyword(1:4).eq.'hcos') then ++ keypot=2 ++ elseif(keyword(1:4).eq.'plan') then ++ keypot=3 ++ else ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,443) ++ endif ++ ++ parpot(1)=dblstr(record,lenrec,idum) ++ parpot(2)=dblstr(record,lenrec,idum) ++ parpot(3)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(16x,4a8,4x,a4,1x,1p,9e13.5)") ++ x atom0,atom1,atom2,atom3,keyword(1:4),(parpot(j),j=1,mxpfbp) ++ ++ katm0=0 ++ katm1=0 ++ katm2=0 ++ katm3=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm ++ if(atom3.eq.unqatm(jtpatm))katm3=jtpatm ++ ++ enddo ++ ++ if(katm0.eq.0.or.katm1.eq.0.or.katm2.eq.0.or. ++ x katm3.eq.0) call error(idnode,91) ++ ++ filter(katm0)=.true. ++ filter(katm1)=.true. ++ filter(katm2)=.true. ++ filter(katm3)=.true. ++ ++ ka1=max(katm1,katm2,katm3) ++ ka3=min(katm1,katm2,katm3) ++ ka2=katm1+katm2+katm3-ka1-ka3 ++ keyfbp=ka3+(ka2*(ka2-1))/2+(ka1*(ka1**2-1))/6+ ++ x (katm0-1)*mx3fbp ++ ++ if(keyfbp.gt.mxfbp) call error(idnode,101) ++ ++c convert parameters to internal units ++ ++ parpot(1)=parpot(1)*engunit ++ parpot(2)=parpot(2)*(pi/180.d0) ++ ++ if(keypot.eq.2)then ++ ++ parpot(2)=cos(parpot(2)) ++ ++ endif ++ ++ if(lstfbp(keyfbp).gt.0) call error(idnode,19) ++ lstfbp(keyfbp)=itpfbp ++ ltpfbp(itpfbp)=keypot ++ kfbp=mx3fbp*((keyfbp-1)/mx3fbp)+1 ++ if(lstfbp(kfbp).lt.0)lstfbp(kfbp)=0 ++ ++c calculate max four body cutoff ++ ++ rcutfb=max(rcutfb,parpot(3)) ++ rcut4b(itpfbp)=parpot(3) ++ ++c store four body potential parameters ++ ++ do i=1,mxpfbp ++ prmfbp(itpfbp,i)=parpot(i) ++ enddo ++ ++ enddo ++ ++ if(rcutfb.lt.1.d-6)call error(idnode,453) ++ ++ deallocate (parpot,stat=fail) ++ ++ return ++ end subroutine define_four_body ++ ++ subroutine fbpfrc ++ x (lsolva,lfree,lexcite,idnode,mxnode,natms,imcon,rcutfb, ++ x engfbp,virfbp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating four body inversion forces ++c arising from the inversion angle between three atoms around a ++c nominated central atom ++c ++c Note: the subroutine converts coordinates to reduced units ++c to avoid a call to images.f. The link cell algorithm used ++c here necessitates a parallelepiped cell geometry ++c ++c copyright - daresbury laboratory 1996 ++c author - w.smith july 1996 ++c adapted - w.smith aug 2008 solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect,lskip ++ logical idrive,jdrive,kdrive,ldrive ++ integer idnode,mxnode,natms,imcon,nix,niy,niz ++ integer i,j,k,nbx,nby,nbz,ncells,ix,iy,iz,icell,jx,jy ++ integer jz,jj,kk,ia,ib,ifbp,jfbp,kfbp,jklbd,kkfbp,ktyp,ii ++ integer ic,ll,id,lfbp,l,limit,jcell,kkk ++ real(8) rcutfb,engfbp,virfbp,vbn,vcn,pterm,xm,ym,zm ++ real(8) strs,cprp,det,xdc,ydc,zdc,sxx,syy,szz,sxab,strs_loc ++ real(8) syab,szab,xab,yab,zab,rab2,sxac,syac,szac,xac,yac ++ real(8) zac,rac2,sxad,syad,szad,xad,yad,zad,rad2,rrab,rrac ++ real(8) rrad,rbc,rcd,rdb,ubx,uby,ubz,ubn,rub,vbx,vby,vbz ++ real(8) rvb,wwb,ucx,ucy,ucz,ucn,ruc,vcx,vcy,vcz,rvc,wwc ++ real(8) udx,udy,udz,udn,rud,vdx,vdy,vdz,vdn,rvd,wwd,cosb ++ real(8) cosc,cosd,thb,thc,thd,gamb,gamc,gamd,rubc,rubd ++ real(8) rucd,rucb,rudb,rudc,rvbc,rvbd,rvcd,rvcb,rvdb,rvdc ++ real(8) fax,fay,faz,fbx,fby,fbz,fcx,fcy,fcz,fdx,fdy,fdz ++ dimension cprp(10),strs(6),nix(27),niy(27),niz(27),strs_loc(6) ++ ++ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, ++ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ ++ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, ++ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ ++ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ++ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ ++ ++ lskip=(lfree.or.lexcite) ++ ++c flag for undefined potentials ++ ++ safe=.true. ++ ++c initialise accumulators ++ ++ engfbp=0.d0 ++ virfbp=0.d0 ++ fbp_fre=0.d0 ++ fbp_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(9)=.true. ++ en4_sol(:)=0.d0 ++ if(lexcite)en4_exc(:)=0.d0 ++ ++ endif ++ ++c create mock cell vectors for non-periodic system ++ ++ if(imcon.eq.0) then ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ do i=1,natms ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ enddo ++ ++ cell(1)=2.d0*xm+rcutfb ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(5)=2.d0*ym+rcutfb ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ cell(9)=2.d0*zm+rcutfb ++ ++ endif ++ ++c check for appropriate boundary conditions ++ ++ if(imcon.gt.3)call error(idnode,79) ++ call invert(cell,rcell,det) ++ call dcell(cell,cprp) ++ ++c calculate link cell numbers ++ ++ nbx=int(cprp(7)/(rcutfb+1.d-6)) ++ nby=int(cprp(8)/(rcutfb+1.d-6)) ++ nbz=int(cprp(9)/(rcutfb+1.d-6)) ++ ncells=nbx*nby*nbz ++ if(ncells.gt.mxcell) then ++ ++ if(idnode.eq.0) write(nrite,'(a,i6)') ++ x 'number of required link cells in routine fbpfrc is ',ncells ++ write(nrite,'(a,i6)') ++ x 'number of default link cells in routine fbpfrc is ',mxcell ++ call error(idnode,87) ++ ++ endif ++ ++c transform atomic coordinates and construct link cells ++ ++ do l=1,ncells ++ ++ lct(l)=0 ++ lst(l)=0 ++ ++ enddo ++ ++ xdc=dble(nbx) ++ ydc=dble(nby) ++ zdc=dble(nbz) ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ xxx(i)=sxx ++ yyy(i)=syy ++ zzz(i)=szz ++ ++ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) ++ iy=min(int(ydc*(syy+0.5d0)),nby-1) ++ iz=min(int(zdc*(szz+0.5d0)),nbz-1) ++ k=1+ix+nbx*(iy+nby*iz) ++ lst(k)=lst(k)+1 ++ link(i)=lct(k) ++ lct(k)=i ++ ++ endif ++ ++ enddo ++ ++c loop over central atoms of inversion ++ ++ ix=0 ++ iy=1 ++ iz=1 ++ do icell=1,ncells ++ ++ ix=ix+1 ++ if(ix.gt.nbx)then ++ ix=1 ++ iy=iy+1 ++ if(iy.gt.nby)then ++ iy=1 ++ iz=iz+1 ++ endif ++ endif ++ ++ k=0 ++ do kk=1,27 ++ ++ jx=ix+nix(kk) ++ jy=iy+niy(kk) ++ jz=iz+niz(kk) ++ ++ if(jx.gt.nbx)jx=1 ++ if(jy.gt.nby)jy=1 ++ if(jz.gt.nbz)jz=1 ++ if(jx.lt.1)jx=jx+nbx ++ if(jy.lt.1)jy=jy+nby ++ if(jz.lt.1)jz=jz+nbz ++ ++ jcell=jx+nbx*(jy-1+nby*(jz-1)) ++ j=lct(jcell) ++ ++ do ii=1,lst(jcell) ++ ++ k=k+1 ++ latfbp(k)=j ++ j=link(j) ++ ++ enddo ++ ++ enddo ++ ++ limit=k ++ ++ do ii=1,lst(icell) ++ ++ ia=latfbp(ii) ++ if(lmetadyn)idrive=driven(ltype(ia)) ++ ifbp=mx3fbp*(ltype(ia)-1) ++ if(mod(ia,mxnode).eq.idnode.and.lstfbp(ifbp+1).ge.0)then ++ ++ do jj=1,limit-2 ++ ++ ib=latfbp(jj) ++ if(lmetadyn)jdrive=driven(ltype(ib)) ++ ++ do kk=jj+1,limit-1 ++ ++ ic=latfbp(kk) ++ if(lmetadyn)kdrive=driven(ltype(ic)) ++ ++ do ll=kk+1,limit ++ ++ id=latfbp(ll) ++ if(lmetadyn)ldrive=driven(ltype(id)) ++ ++ if(lskip)then ++ ++ if((atm_fre(ia).eq.1.or.atm_fre(ib).eq.1.or. ++ x atm_fre(ic).eq.1.or.atm_fre(id).eq.1).and. ++ x (atm_fre(ia).eq.2.or.atm_fre(ib).eq.2.or. ++ x atm_fre(ic).eq.2.or.atm_fre(id).eq.2))cycle ++ ++ endif ++ ++ jfbp=max(ltype(ib),ltype(ic),ltype(id)) ++ lfbp=min(ltype(ib),ltype(ic),ltype(id)) ++ kfbp=ltype(ib)+ltype(ic)+ltype(id)-jfbp-lfbp ++ jklbd=ifbp+lfbp+(kfbp*(kfbp-1))/2+(jfbp*(jfbp**2-1))/6 ++ kkfbp=lstfbp(jklbd) ++ if(kkfbp.gt.0)then ++ ++ sxab=xxx(ib)-xxx(ia) ++ sxab=sxab-nint(sxab) ++ syab=yyy(ib)-yyy(ia) ++ syab=syab-nint(syab) ++ szab=zzz(ib)-zzz(ia) ++ szab=szab-nint(szab) ++ ++ xab=cell(1)*sxab+cell(4)*syab+cell(7)*szab ++ if(abs(xab).lt.rcutfb)then ++ ++ yab=cell(2)*sxab+cell(5)*syab+cell(8)*szab ++ if(abs(yab).lt.rcutfb)then ++ ++ zab=cell(3)*sxab+cell(6)*syab+cell(9)*szab ++ if(abs(zab).lt.rcutfb)then ++ ++ rab2=xab*xab+yab*yab+zab*zab ++ ++ sxac=xxx(ic)-xxx(ia) ++ sxac=sxac-nint(sxac) ++ syac=yyy(ic)-yyy(ia) ++ syac=syac-nint(syac) ++ szac=zzz(ic)-zzz(ia) ++ szac=szac-nint(szac) ++ ++ xac=cell(1)*sxac+cell(4)*syac+cell(7)*szac ++ if(abs(xac).lt.rcutfb)then ++ ++ yac=cell(2)*sxac+cell(5)*syac+cell(8)*szac ++ if(abs(yac).lt.rcutfb)then ++ ++ zac=cell(3)*sxac+cell(6)*syac+cell(9)*szac ++ if(abs(zac).lt.rcutfb)then ++ ++ rac2=xac*xac+yac*yac+zac*zac ++ ++ sxad=xxx(id)-xxx(ia) ++ sxad=sxad-nint(sxad) ++ syad=yyy(id)-yyy(ia) ++ syad=syad-nint(syad) ++ szad=zzz(id)-zzz(ia) ++ szad=szad-nint(szad) ++ ++ xad=cell(1)*sxad+cell(4)*syad+cell(7)*szad ++ if(abs(xad).lt.rcutfb)then ++ ++ yad=cell(2)*sxad+cell(5)*syad+cell(8)*szad ++ if(abs(yad).lt.rcutfb)then ++ ++ zad=cell(3)*sxad+cell(6)*syad+cell(9)*szad ++ if(abs(zad).lt.rcutfb)then ++ ++ rad2=xad*xad+yad*yad+zad*zad ++ ++ if(rcut4b(kkfbp)**2.ge.max(rab2,rac2,rad2))then ++ ++ rrab=1.d0/sqrt(rab2) ++ rrac=1.d0/sqrt(rac2) ++ rrad=1.d0/sqrt(rad2) ++ ++ rbc=xab*xac+yab*yac+zab*zac ++ rcd=xac*xad+yac*yad+zac*zad ++ rdb=xad*xab+yad*yab+zad*zab ++ ++c calculate bond-angle-plane vectors ++ ++ ubx=xac*rrac+xad*rrad ++ uby=yac*rrac+yad*rrad ++ ubz=zac*rrac+zad*rrad ++ ubn=1.d0/sqrt(ubx**2+uby**2+ubz**2) ++ ubx=ubn*ubx ++ uby=ubn*uby ++ ubz=ubn*ubz ++ rub=xab*ubx+yab*uby+zab*ubz ++ ++ vbx=xac*rrac-xad*rrad ++ vby=yac*rrac-yad*rrad ++ vbz=zac*rrac-zad*rrad ++ vbn=1.d0/sqrt(vbx**2+vby**2+vbz**2) ++ vbx=vbn*vbx ++ vby=vbn*vby ++ vbz=vbn*vbz ++ rvb=xab*vbx+yab*vby+zab*vbz ++ wwb=sqrt(rub**2+rvb**2) ++ ++ ucx=xad*rrad+xab*rrab ++ ucy=yad*rrad+yab*rrab ++ ucz=zad*rrad+zab*rrab ++ ucn=1.d0/sqrt(ucx**2+ucy**2+ucz**2) ++ ucx=ucn*ucx ++ ucy=ucn*ucy ++ ucz=ucn*ucz ++ ruc=xac*ucx+yac*ucy+zac*ucz ++ ++ vcx=xad*rrad-xab*rrab ++ vcy=yad*rrad-yab*rrab ++ vcz=zad*rrad-zab*rrab ++ vcn=1.d0/sqrt(vcx**2+vcy**2+vcz**2) ++ vcx=vcn*vcx ++ vcy=vcn*vcy ++ vcz=vcn*vcz ++ rvc=xac*vcx+yac*vcy+zac*vcz ++ wwc=sqrt(ruc**2+rvc**2) ++ ++ udx=xab*rrab+xac*rrac ++ udy=yab*rrab+yac*rrac ++ udz=zab*rrab+zac*rrac ++ udn=1.d0/sqrt(udx**2+udy**2+udz**2) ++ udx=udn*udx ++ udy=udn*udy ++ udz=udn*udz ++ rud=xad*udx+yad*udy+zad*udz ++ ++ vdx=xab*rrab-xac*rrac ++ vdy=yab*rrab-yac*rrac ++ vdz=zab*rrab-zac*rrac ++ vdn=1.d0/sqrt(vdx**2+vdy**2+vdz**2) ++ vdx=vdn*vdx ++ vdy=vdn*vdy ++ vdz=vdn*vdz ++ rvd=xad*vdx+yad*vdy+zad*vdz ++ wwd=sqrt(rud**2+rvd**2) ++ ++c calculate inversion angle cosines ++ ++ cosb=wwb*rrab ++ cosc=wwc*rrac ++ cosd=wwd*rrad ++ if(abs(cosb).gt.1.d0)cosb=sign(1.d0,cosb) ++ if(abs(cosc).gt.1.d0)cosc=sign(1.d0,cosc) ++ if(abs(cosd).gt.1.d0)cosd=sign(1.d0,cosd) ++ ++c select potential energy function type ++ ++ ktyp=ltpfbp(kkfbp) ++ ++c calculate potential energy and scalar force term ++ ++ if(ktyp.eq.1)then ++ ++c key=1 for harmonic potential ++ ++ thb=acos(cosb) ++ thc=acos(cosc) ++ thd=acos(cosd) ++ ++ pterm=0.5d0*prmfbp(kkfbp,1)* ++ x ((thb-prmfbp(kkfbp,2))**2+ ++ x (thc-prmfbp(kkfbp,2))**2+ ++ x (thd-prmfbp(kkfbp,2))**2)/3.d0 ++ ++ gamb=0.d0 ++ if(abs(thb).gt.1.d-12)gamb=prmfbp(kkfbp,1)* ++ x (thb-prmfbp(kkfbp,2))/(3.d0*sin(thb)) ++ gamc=0.d0 ++ if(abs(thc).gt.1.d-12)gamc=prmfbp(kkfbp,1)* ++ x (thc-prmfbp(kkfbp,2))/(3.d0*sin(thc)) ++ gamd=0.d0 ++ if(abs(thd).gt.1.d-12)gamd=prmfbp(kkfbp,1)* ++ x (thd-prmfbp(kkfbp,2))/(3.d0*sin(thd)) ++ ++ else if(ktyp.eq.2)then ++ ++c key=2 for harmonic cosine inversion potential ++ ++ pterm=0.5d0*prmfbp(kkfbp,1)* ++ x ((cosb-prmfbp(kkfbp,2))**2+ ++ x (cosc-prmfbp(kkfbp,2))**2+ ++ x (cosd-prmfbp(kkfbp,2))**2)/3.d0 ++ ++ gamb=-prmfbp(kkfbp,1)*(cosb-prmfbp(kkfbp,2))/3.d0 ++ gamc=-prmfbp(kkfbp,1)*(cosc-prmfbp(kkfbp,2))/3.d0 ++ gamd=-prmfbp(kkfbp,1)*(cosd-prmfbp(kkfbp,2))/3.d0 ++ ++ else if(ktyp.eq.3)then ++ ++c key=3 for planar inversion potentials ++ ++ pterm=prmfbp(kkfbp,1)* ++ x (3.d0-cosb-cosc-cosd)/3.d0 ++ ++ gamb=-prmfbp(kkfbp,1)/3.d0 ++ gamc=-prmfbp(kkfbp,1)/3.d0 ++ gamd=-prmfbp(kkfbp,1)/3.d0 ++ ++ else ++ ++c undefined potential ++ ++ safe=.false. ++ pterm=0.d0 ++ gamb=0.d0 ++ gamc=0.d0 ++ gamd=0.d0 ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set quadruple index ++ ++ if(lsolva) ++ x kkk=loc4(atmolt(ia),atmolt(ib),atmolt(ic),atmolt(id)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. ++ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ ++ x atm_fre(id).eq.0) ++ ++ if(lsolva)en4_exc(kkk)=en4_exc(kkk)+pterm ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. ++ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ fbp_fre=fbp_fre-pterm ++ pterm=lambda1*pterm ++ gamb=lambda1*gamb ++ gamc=lambda1*gamc ++ gamd=lambda1*gamd ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. ++ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ fbp_fre=fbp_fre+pterm ++ pterm=lambda2*pterm ++ gamb=lambda2*gamb ++ gamc=lambda2*gamc ++ gamd=lambda2*gamd ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential ++ ++ engfbp=engfbp+pterm ++ ++ if(lsolva)en4_sol(kkk)=en4_sol(kkk)+pterm ++ ++c calculate bond and u,v scalar products ++ ++ rubc=xab*ucx+yab*ucy+zab*ucz ++ rubd=xab*udx+yab*udy+zab*udz ++ rucd=xac*udx+yac*udy+zac*udz ++ rucb=xac*ubx+yac*uby+zac*ubz ++ rudb=xad*ubx+yad*uby+zad*ubz ++ rudc=xad*ucx+yad*ucy+zad*ucz ++ ++ rvbc=xab*vcx+yab*vcy+zab*vcz ++ rvbd=xab*vdx+yab*vdy+zab*vdz ++ rvcd=xac*vdx+yac*vdy+zac*vdz ++ rvcb=xac*vbx+yac*vby+zac*vbz ++ rvdb=xad*vbx+yad*vby+zad*vbz ++ rvdc=xad*vcx+yad*vcy+zad*vcz ++ ++c calculate atomic forces ++ ++ fbx=gamb*(-cosb*xab*rrab**2+rrab*(rub*ubx+rvb*vbx)/wwb) ++ x +(ruc*ucn*rrab*(xac-ruc*ucx-(rbc-ruc*rubc)*xab*rrab**2) ++ x - rvc*vcn*rrab*(xac-rvc*vcx-(rbc-rvc*rvbc)*xab*rrab**2)) ++ x * gamc*rrac/wwc ++ x +(rud*udn*rrab*(xad-rud*udx-(rdb-rud*rubd)*xab*rrab**2) ++ x + rvd*vdn*rrab*(xad-rvd*vdx-(rdb-rvd*rvbd)*xab*rrab**2)) ++ x * gamd*rrad/wwd ++ ++ fby=gamb*(-cosb*yab*rrab**2+rrab*(rub*uby+rvb*vby)/wwb) ++ x +(ruc*ucn*rrab*(yac-ruc*ucy-(rbc-ruc*rubc)*yab*rrab**2) ++ x - rvc*vcn*rrab*(yac-rvc*vcy-(rbc-rvc*rvbc)*yab*rrab**2)) ++ x * gamc*rrac/wwc ++ x +(rud*udn*rrab*(yad-rud*udy-(rdb-rud*rubd)*yab*rrab**2) ++ x + rvd*vdn*rrab*(yad-rvd*vdy-(rdb-rvd*rvbd)*yab*rrab**2)) ++ x * gamd*rrad/wwd ++ ++ fbz=gamb*(-cosb*zab*rrab**2+rrab*(rub*ubz+rvb*vbz)/wwb) ++ x +(ruc*ucn*rrab*(zac-ruc*ucz-(rbc-ruc*rubc)*zab*rrab**2) ++ x - rvc*vcn*rrab*(zac-rvc*vcz-(rbc-rvc*rvbc)*zab*rrab**2)) ++ x * gamc*rrac/wwc ++ x +(rud*udn*rrab*(zad-rud*udz-(rdb-rud*rubd)*zab*rrab**2) ++ x + rvd*vdn*rrab*(zad-rvd*vdz-(rdb-rvd*rvbd)*zab*rrab**2)) ++ x * gamd*rrad/wwd ++ ++ fcx=gamc*(-cosc*xac*rrac**2+rrac*(ruc*ucx+rvc*vcx)/wwc) ++ x +(rud*udn*rrac*(xad-rud*udx-(rcd-rud*rucd)*xac*rrac**2) ++ x - rvd*vdn*rrac*(xad-rvd*vdx-(rcd-rvd*rvcd)*xac*rrac**2)) ++ x * gamd*rrad/wwd ++ x +(rub*ubn*rrac*(xab-rub*ubx-(rbc-rub*rucb)*xac*rrac**2) ++ x + rvb*vbn*rrac*(xab-rvb*vbx-(rbc-rvb*rvcb)*xac*rrac**2)) ++ x * gamb*rrab/wwb ++ ++ fcy=gamc*(-cosc*yac*rrac**2+rrac*(ruc*ucy+rvc*vcy)/wwc) ++ x +(rud*udn*rrac*(yad-rud*udy-(rcd-rud*rucd)*yac*rrac**2) ++ x - rvd*vdn*rrac*(yad-rvd*vdy-(rcd-rvd*rvcd)*yac*rrac**2)) ++ x * gamd*rrad/wwd ++ x +(rub*ubn*rrac*(yab-rub*uby-(rbc-rub*rucb)*yac*rrac**2) ++ x + rvb*vbn*rrac*(yab-rvb*vby-(rbc-rvb*rvcb)*yac*rrac**2)) ++ x * gamb*rrab/wwb ++ ++ fcz=gamc*(-cosc*zac*rrac**2+rrac*(ruc*ucz+rvc*vcz)/wwc) ++ x +(rud*udn*rrac*(zad-rud*udz-(rcd-rud*rucd)*zac*rrac**2) ++ x - rvd*vdn*rrac*(zad-rvd*vdz-(rcd-rvd*rvcd)*zac*rrac**2)) ++ x * gamd*rrad/wwd ++ x +(rub*ubn*rrac*(zab-rub*ubz-(rbc-rub*rucb)*zac*rrac**2) ++ x + rvb*vbn*rrac*(zab-rvb*vbz-(rbc-rvb*rvcb)*zac*rrac**2)) ++ x * gamb*rrab/wwb ++ ++ fdx=gamd*(-cosd*xad*rrad**2+rrad*(rud*udx+rvd*vdx)/wwd) ++ x +(rub*ubn*rrad*(xab-rub*ubx-(rdb-rub*rudb)*xad*rrad**2) ++ x - rvb*vbn*rrad*(xab-rvb*vbx-(rdb-rvb*rvdb)*xad*rrad**2)) ++ x * gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(xac-ruc*ucx-(rcd-ruc*rudc)*xad*rrad**2) ++ x + rvc*vcn*rrad*(xac-rvc*vcx-(rcd-rvc*rvdc)*xad*rrad**2)) ++ x * gamc*rrac/wwc ++ ++ fdy=gamd*(-cosd*yad*rrad**2+rrad*(rud*udy+rvd*vdy)/wwd) ++ x +(rub*ubn*rrad*(yab-rub*uby-(rdb-rub*rudb)*yad*rrad**2) ++ x - rvb*vbn*rrad*(yab-rvb*vby-(rdb-rvb*rvdb)*yad*rrad**2)) ++ x * gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(yac-ruc*ucy-(rcd-ruc*rudc)*yad*rrad**2) ++ x + rvc*vcn*rrad*(yac-rvc*vcy-(rcd-rvc*rvdc)*yad*rrad**2)) ++ x * gamc*rrac/wwc ++ ++ fdz=gamd*(-cosd*zad*rrad**2+rrad*(rud*udz+rvd*vdz)/wwd) ++ x +(rub*ubn*rrad*(zab-rub*ubz-(rdb-rub*rudb)*zad*rrad**2) ++ x - rvb*vbn*rrad*(zab-rvb*vbz-(rdb-rvb*rvdb)*zad*rrad**2)) ++ x * gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(zac-ruc*ucz-(rcd-ruc*rudc)*zad*rrad**2) ++ x + rvc*vcn*rrad*(zac-rvc*vcz-(rcd-rvc*rvdc)*zad*rrad**2)) ++ x * gamc*rrac/wwc ++ ++ fax=-(fbx+fcx+fdx) ++ fay=-(fby+fcy+fdy) ++ faz=-(fbz+fcz+fdz) ++ ++ fxx(ia)=fxx(ia)+fax ++ fyy(ia)=fyy(ia)+fay ++ fzz(ia)=fzz(ia)+faz ++ ++ fxx(ib)=fxx(ib)+fbx ++ fyy(ib)=fyy(ib)+fby ++ fzz(ib)=fzz(ib)+fbz ++ ++ fxx(ic)=fxx(ic)+fcx ++ fyy(ic)=fyy(ic)+fcy ++ fzz(ic)=fzz(ic)+fcz ++ ++ fxx(id)=fxx(id)+fdx ++ fyy(id)=fyy(id)+fdy ++ fzz(id)=fzz(id)+fdz ++ ++c stress tensor calculation for inversion terms ++ ++ strs(1)=strs(1)+xab*fbx+xac*fcx+xad*fdx ++ strs(2)=strs(2)+yab*fbx+yac*fcx+yad*fdx ++ strs(3)=strs(3)+zab*fbx+zac*fcx+zad*fdx ++ strs(4)=strs(4)+yab*fby+yac*fcy+yad*fdy ++ strs(5)=strs(5)+yab*fbz+yac*fcz+yad*fdz ++ strs(6)=strs(6)+zab*fbz+zac*fcz+zad*fdz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then ++ ++c local energy (no virial) ++ ++ eng_loc=eng_loc+pterm ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fax ++ fyy_loc(ia)=fyy_loc(ia)+fay ++ fzz_loc(ia)=fzz_loc(ia)+faz ++ ++ fxx_loc(ib)=fxx_loc(ib)+fbx ++ fyy_loc(ib)=fyy_loc(ib)+fby ++ fzz_loc(ib)=fzz_loc(ib)+fbz ++ ++ fxx_loc(ic)=fxx_loc(ic)+fcx ++ fyy_loc(ic)=fyy_loc(ic)+fcy ++ fzz_loc(ic)=fzz_loc(ic)+fcz ++ ++ fxx_loc(id)=fxx_loc(id)+fdx ++ fyy_loc(id)=fyy_loc(id)+fdy ++ fzz_loc(id)=fzz_loc(id)+fdz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xab*fbx+xac*fcx+xad*fdx ++ strs_loc(2)=strs_loc(2)+yab*fbx+yac*fcx+yad*fdx ++ strs_loc(3)=strs_loc(3)+zab*fbx+zac*fcx+zad*fdx ++ strs_loc(4)=strs_loc(4)+yab*fby+yac*fcy+yad*fdy ++ strs_loc(5)=strs_loc(5)+yab*fbz+yac*fcz+yad*fdz ++ strs_loc(6)=strs_loc(6)+zab*fbz+zac*fcz+zad*fdz ++ ++ endif ++ ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ ++ enddo ++ enddo ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,443) ++ ++c global sum of four body potential and virial ++ ++ buffer(1)=engfbp ++ buffer(2)=virfbp ++ buffer(3)=fbp_fre ++ buffer(4)=fbp_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engfbp=buffer(1) ++ virfbp=buffer(2) ++ fbp_fre=buffer(3) ++ fbp_vir=buffer(4) ++ ++c sum up solvation energies ++ ++ if(lsolva)then ++ ++ call gdsum(en4_sol,mxtmls_sol4,buffer(1)) ++ if(lexcite)call gdsum(en4_exc,mxtmls_exc4,buffer(1)) ++ ++ endif ++ ++c restore coordinate array to original representation ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=xxx(i) ++ syy=yyy(i) ++ szz=zzz(i) ++ ++ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz ++ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz ++ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz ++ ++ endif ++ ++ enddo ++ ++c restore cell vector ++ ++ if(imcon.eq.0) then ++ cell(1)=0.d0 ++ cell(5)=0.d0 ++ cell(9)=0.d0 ++ endif ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine fbpfrc ++ ++ end module four_body_module +diff -urN dl_class_1.9.orig/srcmod/hkewald_module.f dl_class_1.9/srcmod/hkewald_module.f +--- dl_class_1.9.orig/srcmod/hkewald_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/hkewald_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1292 @@ ++ module hkewald_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining hautman-klein ewald sum arrays ++c copyright - daresbury laboratory ++c author - w. smith nov 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use exclude_module ++ use error_module ++ use pair_module ++ use property_module ++ use setup_module ++ ++ implicit none ++ ++ real(8), allocatable :: ahk(:),crn(:,:) ++ real(8), allocatable :: elc(:,:),els(:,:) ++ real(8), allocatable :: emc(:,:),ems(:,:) ++ real(8), allocatable :: zzn(:),zzd(:) ++ real(8), allocatable :: hon(:,:),znp(:,:) ++ real(8), allocatable :: dhn(:,:),zgs(:) ++ real(8), allocatable :: fon(:,:),zgc(:) ++ real(8), allocatable :: ckc(:),cks(:) ++ real(8), allocatable :: pp(:),sss(:) ++ ++ save ahk,crn,elc,els,emc,ems,zzn,zzd,hon,znp,dhn,zgs ++ save fon,zgc,ckc,cks,pp,sss ++ ++ contains ++ ++ subroutine alloc_hke_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=9 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (ahk(0:mxhko),crn(0:mxhko,0:mxhko),stat=fail(1)) ++ allocate (elc(mxewld,0:1),els(mxewld,0:1),stat=fail(2)) ++ allocate (emc(mxewld,0:kmaxb),ems(mxewld,0:kmaxb),stat=fail(3)) ++ allocate (zzn(mxxdf),zzd(mxxdf),stat=fail(4)) ++ allocate (hon(mxgrid,0:mxhko),znp(mxhke,0:2*mxhko),stat=fail(5)) ++ allocate (dhn(mxgrid,0:mxhko),zgs(0:2*mxhko),stat=fail(6)) ++ allocate (fon(mxegrd,0:7),zgc(0:2*mxhko),stat=fail(7)) ++ allocate (ckc(mxewld),cks(mxewld),stat=fail(8)) ++ allocate (pp(2*mxhko),sss(mxxdf),stat=fail(9)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1730) ++ enddo ++ ++ end subroutine alloc_hke_arrays ++ ++ subroutine hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for generating convergence function ++c arrays for hautman klein ewald method (up to order 3 only) ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith february 2000 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,idnode,nhko,nlatt,k ++ real(8) alpha,drewd,rcut,ecut,den,fac,ss1,aaa,ss2 ++ ++ if(nhko.gt.mxhko)call error(idnode,332) ++ ++c define effective cutoff ++ ++ ecut=rcut*dble(2*nlatt+1) ++ ++c define grid resolution for potential arrays ++ ++ drewd=ecut/dble(mxegrd-4) ++ ++c calculate HKE coefficients ++ ++ ahk(0)=1.d0 ++ ++ do i=1,nhko ++ ++ ahk(i)=-0.25d0*ahk(i-1)*dble(2*i*(2*i-1))/dble(i*i) ++ ++ enddo ++ ++c generate convergence function arrays ++ ++ do i=1,mxegrd ++ ++ hon(i,0)=0.d0 ++ hon(i,1)=dble(i-1)*drewd ++ hon(i,2)=(2.d0*alpha/sqrpi)*exp(-(alpha*hon(i,1))**2) ++ ++ enddo ++ ++c generate error function and derivatives by recursion ++ ++ do k=100,1,-1 ++ ++ den=1.d0/dble(2*k-1) ++ fac=(2.d0*alpha**2)**(k-1) ++ ++ do i=1,mxegrd ++ ++ hon(i,0)=den*(hon(i,0)*hon(i,1)**2+fac*hon(i,2)) ++ ++ enddo ++ ++ if(k.le.2*nhko+2)then ++ ++ do i=1,mxegrd ++ ++ fon(i,k-1)=hon(i,0) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c zeroth order function ++c note: hon(1,0)=2.d0*alpha/sqrpi ++ ++ do i=1,mxegrd ++ ++ hon(i,0)= fon(i,0) ++ dhn(i,0)=-fon(i,1) ++ ++ enddo ++ ++ if(nhko.eq.0)then ++ ++ ss1=dble(mxegrd-1)*drewd ++ aaa=abs(1.d0-hon(mxegrd,nhko)*ss1) ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,100,aaa,0.d0,0.d0) ++ ++ endif ++ ++ return ++ ++ endif ++ ++c first order function ++c note: hon(1,1)=8.d0*alpha**3/(3.d0*sqrpi) ++ ++ do i=1,mxegrd ++ ++ ss2=(dble(i-1)*drewd)**2 ++ ++ hon(i,1)=-(2.d0*fon(i,1)-fon(i,2)*ss2) ++ dhn(i,1)= (4.d0*fon(i,2)-fon(i,3)*ss2) ++ ++ enddo ++ ++ if(nhko.eq.1)then ++ ++ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,100,aaa,0.d0,0.d0) ++ ++ endif ++ ++ return ++ ++ endif ++ ++c second order function ++c note: hon(1,2)=64.d0*alpha**5/(45.d0*sqrpi) ++ ++ do i=1,mxegrd ++ ++ ss2=(dble(i-1)*drewd)**2 ++ ++ hon(i,2)=(8.d0*fon(i,2)+ss2*(-8.d0*fon(i,3)+ss2*fon(i,4)))/9.d0 ++ dhn(i,2)=(-24.d0*fon(i,3)+ss2*(12.d0*fon(i,4)-ss2*fon(i,5))) ++ x /9.d0 ++ ++ enddo ++ ++ if(nhko.eq.2)then ++ ++ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,100,aaa,0.d0,0.d0) ++ ++ endif ++ ++ return ++ ++ endif ++ ++c third order function (enough for anyone!) ++c note: hon(1,3)=768.d0*alpha**7/(14175.d0*sqrpi) ++ ++ do i=1,mxegrd ++ ++ ss2=(dble(i-1)*drewd)**2 ++ ++ hon(i,3)=-(48.d0*fon(i,3)+ss2*(-72.d0*fon(i,4)+ss2*( ++ x 18.d0*fon(i,5)-ss2*fon(i,6))))/225.d0 ++ dhn(i,3)= (192.d0*fon(i,4)+ss2*(-144.d0*fon(i,5)+ss2*( ++ x 24.d0*fon(i,6)-ss2*fon(i,7))))/225.d0 ++ ++ enddo ++ ++ if(nhko.eq.3)then ++ ++ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,100,aaa,0.d0,0.d0) ++ ++ endif ++ ++ return ++ ++ endif ++ ++ return ++ end subroutine hkgen ++ ++ subroutine hkewald1 ++ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, ++ x engcpe,vircpe,alpha,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces in a ++c periodic system using Hautman Klein Ewald method ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith february 2000 ++c ++c part 1 - reciprocal space terms (fourier part) ++c ++c note - in loop over all k vectors k=2pi(ll/cl,mm/cl) ++c the values of ll and mm are selected so that the symmetry of ++c reciprocal lattice is taken into account i.e. the following ++c rules apply. ++c ++c ll ranges over the values 0 to kmax1 only. ++c ++c mm ranges over 1 to kmax2 when ll=0 and over ++c -kmax2 to kmax2 otherwise. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,mxnode,natms,imcon,nhko,kmax1,kmax2,i ++ integer iatm0,iatm1,j,k,limit,mmin,l,ll,m,mm,n ++ real(8) engcpe,vircpe,alpha,epsq,twopi,ralph,area,rarea ++ real(8) det,rcpcut,rcpct2,aaa,engsic,pm1,pm2,term,ssx,ssy ++ real(8) tmp,rkx1,rky1,rkx2,rky2,rksq,rkk,fac,eterm,fng,fn0,gaus ++ real(8) bkk,force0,forcez,pterm,scale,cprop,omg,cs ++c$$$ real(8) erfc ++ ++ dimension cprop(10),omg(9) ++ ++ save newjob,engsic ++ ++ data newjob/.true./ ++ ++c initialise coulombic potential energy ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ if(alpha.lt.1.d-8)return ++ ++c set working parameters ++ ++ twopi=2.d0*pi ++ ralph=0.5d0/alpha ++ call dcell(cell,cprop) ++ area=cprop(1)*cprop(2)*sqrt(1.d0-cprop(4)**2) ++ rarea=pi/area ++ ++c set up atoms numbers for nodes ++ ++ iatm0 = (idnode*natms)/mxnode + 1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++c initalize stress tensor working arrays ++ ++ do i = 1,9 ++ ++ omg(i) = 0.d0 ++ ++ enddo ++ ++c construct reciprocal lattice vectors and set k vector range ++ ++ call invert(cell,rcell,det) ++ if(abs(det).lt.1.d-6)call error(idnode,120) ++ call dcell(rcell,cprop) ++ rcpcut=min(dble(kmax1)*cprop(7),dble(kmax2)*cprop(8))* ++ x 1.05d0*twopi ++ rcpct2=rcpcut**2 ++ ++c compute quantities for first entry ++ ++ if(newjob)then ++ ++ newjob=.false. ++ ++c pbc check and array bound checks ++ ++ if(imcon.ne.6)call error(idnode,66) ++ if(mxhke.ne.msatms) call error(idnode,331) ++ if(mxewld.ne.msatms) call error(idnode,330) ++ ++c check hk screening function at cutoff ++ ++ aaa=cerfr(ralph,rcpcut) ++c$$$ aaa=erfc(ralph*rcpcut)/rcpcut ++ ++ if(aaa.gt.1.d-4)then ++ ++ call warning(idnode,105,aaa,0.d0,0.d0) ++c call error(idnode,487) ++ ++ endif ++ ++c calculate self interaction correction ++ ++ engsic=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ engsic=engsic+chge(i)**2 ++ ++ enddo ++ ++ engsic=-r4pie0*alpha*engsic/(sqrpi*epsq) ++ ++c binomial coefficients ++ ++ k=0 ++ crn(0,0)=0.5d0 ++ do i=1,2*nhko ++ ++ pp(i)=1.d0 ++ pm1=pp(1) ++ ++ do j=2,i ++ ++ pm2=pp(j) ++ pp(j)=pm2+pm1 ++ pm1=pm2 ++ ++ enddo ++ ++ if(mod(i,2).eq.0)then ++ ++ k=k+1 ++ do j=0,k ++ ++ term=pp(j+1)*(-1.d0)**j ++ crn(j,k)=term ++ crn(k,j)=term ++ ++ enddo ++ ++ crn(k,k)=0.5d0*crn(k,k) ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++c calculate and store powers of z_i ++ ++ i=0 ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ znp(i,0)=1.d0 ++ znp(i,1)=zzz(j) ++ ++ enddo ++ ++ limit=i ++ ++ do k=2,2*nhko ++ ++ do i=1,limit ++ ++ znp(i,k)=znp(i,k-1)*znp(i,1) ++ ++ enddo ++ ++ enddo ++ ++c calculate and store exponential factors ++ ++ i=0 ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ elc(i,0)=1.d0 ++ emc(i,0)=1.d0 ++ els(i,0)=0.d0 ++ ems(i,0)=0.d0 ++ ssx=rcell(1)*xxx(j)+rcell(4)*yyy(j) ++ ssy=rcell(2)*xxx(j)+rcell(5)*yyy(j) ++ elc(i,1)=cos(twopi*ssx) ++ emc(i,1)=cos(twopi*ssy) ++ els(i,1)=sin(twopi*ssx) ++ ems(i,1)=sin(twopi*ssy) ++ ++ enddo ++ ++ do l=2,kmax2 ++ ++ do i=1,limit ++ ++ emc(i,l)=emc(i,l-1)*emc(i,1)-ems(i,l-1)*ems(i,1) ++ ems(i,l)=ems(i,l-1)*emc(i,1)+emc(i,l-1)*ems(i,1) ++ ++ enddo ++ ++ enddo ++ ++c start of main loop over k vectors ++ ++ mmin=1 ++ ++ do ll=0,kmax1 ++ ++ l=ll ++ tmp = twopi*dble(ll) ++ rkx1=tmp*rcell(1) ++ rky1=tmp*rcell(4) ++ ++c put cos(i,L) terms into cos(i,0) array ++ ++ if(l.eq.1) then ++ ++ do i=1,limit ++ ++ elc(i,0)=elc(i,1) ++ els(i,0)=els(i,1) ++ ++ enddo ++ ++ elseif(l.gt.1) then ++ ++ do i=1,limit ++ ++ cs=elc(i,0) ++ elc(i,0)=cs*elc(i,1)-els(i,0)*els(i,1) ++ els(i,0)=els(i,0)*elc(i,1)+cs*els(i,1) ++ ++ enddo ++ ++ endif ++ ++ do mm=mmin,kmax2 ++ ++ m=iabs(mm) ++ tmp = twopi*dble(mm) ++ rkx2=rkx1+tmp*rcell(2) ++ rky2=rky1+tmp*rcell(5) ++ ++c test on magnitude of k vector ++ ++ rksq=rkx2*rkx2+rky2*rky2 ++ ++ if(rksq.le.rcpct2)then ++ ++c calculate exp(ikr) terms and product with charges ++ ++ i=0 ++ ++ if(mm.ge.0)then ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ ckc(i)=chge(j)*(elc(i,0)*emc(i,m)-els(i,0)*ems(i,m)) ++ cks(i)=chge(j)*(els(i,0)*emc(i,m)+ems(i,m)*elc(i,0)) ++ ++ enddo ++ ++ else ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ ++ ckc(i)=chge(j)*(elc(i,0)*emc(i,m)+els(i,0)*ems(i,m)) ++ cks(i)=chge(j)*(els(i,0)*emc(i,m)-ems(i,m)*elc(i,0)) ++ ++ enddo ++ ++ endif ++ ++c calculate sum of products of powers of z_i and q_i exp(ik.s_i) ++ ++ do k=0,2*nhko ++ ++ zgc(k)=0.d0 ++ zgs(k)=0.d0 ++ ++ do i=1,limit ++ ++ zgc(k)=zgc(k)+ckc(i)*znp(i,k) ++ zgs(k)=zgs(k)+cks(i)*znp(i,k) ++ ++ enddo ++ ++ enddo ++ ++c perform global summation of zgc and zgs arrays ++ ++ if(mxnode.gt.1)then ++ ++ call gdsum(zgc(0),2*nhko+1,buffer) ++ call gdsum(zgs(0),2*nhko+1,buffer) ++ ++ endif ++ ++c calculate 0th order screening function ++ ++ rkk=sqrt(rksq) ++ fn0=cerfr(ralph,rkk) ++c$$$ fn0=erfc(ralph*rkk)/rkk ++ gaus=exp(-(ralph*rkk)**2)/(alpha*sqrpi) ++ ++c sum terms for orders of the screening function ++ ++ fac=1.d0 ++ ++ do k=0,nhko ++ ++c sum over z_i binomial contributions ++ ++ eterm=0.d0 ++ fng=fac*fn0 ++ do m=0,k ++ ++ n=2*k-m ++ ++c sum energy terms ++ ++ eterm=eterm+crn(m,k)*(zgc(m)*zgc(n)+zgs(m)*zgs(n)) ++ ++c calculate force contribution to each site ++ ++ i=0 ++ bkk=-fng*crn(m,k) ++ ++ do j=iatm0,iatm1 ++ ++ i=i+1 ++ force0=bkk*(znp(i,n)*(zgs(m)*ckc(i)-zgc(m)*cks(i))+ ++ x znp(i,m)*(zgs(n)*ckc(i)-zgc(n)*cks(i))) ++ fxx(j)=fxx(j)+rkx2*force0 ++ fyy(j)=fyy(j)+rky2*force0 ++ ++ omg(3)=omg(3)+rkx2*force0*zzz(j) ++ omg(6)=omg(6)+rky2*force0*zzz(j) ++ ++ if(k.gt.0)then ++ ++ if(m.eq.0)then ++ ++ forcez=bkk*dble(n)*znp(i,n-1)*(zgc(m)*ckc(i)+ ++ x zgs(m)*cks(i)) ++ ++ else ++ ++ forcez=bkk*(dble(m)*znp(i,m-1)*(zgc(n)*ckc(i)+ ++ x zgs(n)*cks(i))+dble(n)*znp(i,n-1)*(zgc(m)* ++ x ckc(i)+zgs(m)*cks(i))) ++ ++ endif ++ ++ omg(9)=omg(9)+forcez*zzz(j) ++ fzz(j)=fzz(j)+forcez ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c accumulate potential energy and stress tensor ++ ++ engcpe=engcpe+fng*eterm ++ pterm=(dble(2*k-1)*fng-fac*gaus)/rksq ++ omg(1)=omg(1)+eterm*(fng+pterm*rkx2*rkx2) ++ omg(5)=omg(5)+eterm*(fng+pterm*rky2*rky2) ++ omg(2)=omg(2)+eterm*pterm*rky2*rkx2 ++ fac=fac*rksq/(dble(2*(k+1))*dble(2*k+1)) ++ ++c end of loop over orders of screening function ++ ++ enddo ++ ++c end of if-block for rksq < rcpct2 ++ ++ endif ++ ++c end of inner loop over reciprocal lattice vectors ++ ++ enddo ++ ++ mmin=-kmax2 ++ ++c end of outer loop over reciprocal lattice vectors ++ ++ enddo ++ ++ engcpe=engcpe/dble(mxnode) ++ do i = 1,9 ++ ++ omg(i) = omg(i)/dble(mxnode) ++ ++ enddo ++ ++c add self interaction correction to potential ++ ++ scale=4.d0*rarea*r4pie0/epsq ++ engcpe=scale*engcpe+engsic ++ ++c virial term ++ ++ vircpe=vircpe-scale*(omg(1)+omg(5)+omg(9)) ++ ++c calculate final forces ++ ++ do i=iatm0,iatm1 ++ ++ fxx(i)=scale*fxx(i) ++ fyy(i)=scale*fyy(i) ++ fzz(i)=scale*fzz(i) ++ ++ enddo ++ ++c calculate stress tensor (symmetrical) ++ ++ stress(1) = stress(1)+scale*omg(1) ++ stress(2) = stress(2)+scale*omg(2) ++ stress(3) = stress(3)+scale*omg(3) ++ stress(4) = stress(4)+scale*omg(2) ++ stress(5) = stress(5)+scale*omg(5) ++ stress(6) = stress(6)+scale*omg(6) ++ stress(7) = stress(7)+scale*omg(3) ++ stress(8) = stress(8)+scale*omg(6) ++ stress(9) = stress(9)+scale*omg(9) ++ ++ return ++ end subroutine hkewald1 ++ ++ subroutine hkewald2 ++ x (idnode,mxnode,nhko,nlatt,imcon,natms,engcpe, ++ x vircpe,drewd,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating real-space contributions to ++c the hautman-klein-ewald electrostatic method ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith may 2000 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,nhko,nlatt,imcon,natms,nix,niy ++ integer nboxes,i,j,k,n,m,ma,mpm2,npm2,ii,l0,l1,l2,last ++ real(8) engcpe,vircpe,drewd,rcut,epsq ++ real(8) step,rcsq,rdrewd,strs1,strs2,strs3 ++ real(8) strs5,strs6,strs9,dcx,dcy,udx,udy,fac,chgea,chgprd ++ real(8) ddx,ddy,ssx,ssy,ssq,coul,fcoul,rrr,ppp,vk0,vk1,vk2 ++ real(8) eterm,t1,t2,egamma,fx,fy,fz,det ++ ++ dimension nix(25),niy(25) ++ ++ data nix/ 0, 1, 1, 0,-1,-1,-1, 0, 1, 2, 2, ++ x 2, 1, 0,-1,-2,-2,-2,-2,-2,-1, 0, 1, 2, 2/ ++ data niy/ 0, 0, 1, 1, 1, 0,-1,-1,-1, 0, 1, ++ x 2, 2, 2, 2, 2, 1, 0,-1,-2,-2,-2,-2,-2,-1/ ++ ++CDIR$ CACHE_ALIGN fi ++ ++c check boundary condition ++ ++ if(imcon.ne.6)call error(idnode,66) ++ ++c number of neighbouring real space cells ++ ++ if(nlatt.gt.2)call error(idnode,488) ++ step=dble(2*nlatt+1) ++ nboxes=(2*nlatt+1)**2 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c set cutoff condition for pair forces ++ ++ rcsq=(step*rcut)**2 ++ ++c reciprocal of interpolation interval ++ ++ rdrewd = 1.d0/drewd ++ ++c reciprocal cell ++ ++ call invert(cell,rcell,det) ++ do i=1,9 ++ ++ rcell(i)=rcell(i)/step ++ ++ enddo ++ ++c initialise stress tensor accumulators ++ strs3 = 0.d0 ++ strs6 = 0.d0 ++ strs9 = 0.d0 ++ strs1 = 0.d0 ++ strs2 = 0.d0 ++ strs5 = 0.d0 ++ ++c loop over image cells, starting with central cell ++ ++ ma=1 ++ mpm2=natms/2 ++ npm2=(natms-1)/2 ++ ++ do k=1,nboxes ++ ++ last=natms ++ dcx=dble(nix(k)) ++ dcy=dble(niy(k)) ++ udx=cell(1)*dcx+cell(4)*dcy ++ udy=cell(2)*dcx+cell(5)*dcy ++ ++c outer loop over atoms ++ ++ do m=ma,mpm2 ++ ++ fac=r4pie0/epsq ++ if(m.eq.0)fac=fac*0.5d0 ++ if(m.gt.npm2)last=mpm2 ++ ++c set initial array values ++ ++ ii=0 ++ do i=idnode+1,last,mxnode ++ ++ ii=ii+1 ++ chgea=fac*chge(i) ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ chgprd=chgea*chge(j) ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++ zzn(ii)=1.d0 ++ zzd(ii)=0.d0 ++ ++c calculate interatomic separation ++ ++ ddx=xxx(i)-xxx(j)+udx ++ ddy=yyy(i)-yyy(j)+udy ++ ssx=rcell(1)*ddx+rcell(4)*ddy ++ ssy=rcell(2)*ddx+rcell(5)*ddy ++ ssx=ssx-nint(ssx) ++ ssy=ssy-nint(ssy) ++ xdf(ii)=step*(ssx*cell(1)+ssy*cell(4)) ++ ydf(ii)=step*(ssx*cell(2)+ssy*cell(5)) ++ zdf(ii)=zzz(i)-zzz(j) ++ rsqdf(ii)=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c loop over HK orders ++ ++ do n=0,nhko ++ ++c inner loop over atoms ++ ++ ii=0 ++ do i=idnode+1,last,mxnode ++ ++ ii=ii+1 ++ chgea = fac*chge(i) ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ chgprd=chgea*chge(j) ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++c apply truncation of potential ++ ++ ssq=rsqdf(ii)-zdf(ii)*zdf(ii) ++ ++ if(rcsq.gt.ssq)then ++ ++c calculate potential energy and virial ++ ++ coul=0.d0 ++ fcoul=0.d0 ++ rrr = sqrt(rsqdf(ii)) ++ sss(ii)=sqrt(ssq) ++ ++ if(n.eq.0)then ++ ++ coul = chgprd/rrr ++ fcoul = coul/rsqdf(ii) ++ ++ endif ++ ++c interpolation parameters ++ ++ l0=int(sss(ii)*rdrewd) ++ ppp=sss(ii)*rdrewd-dble(l0) ++ l0=l0+1 ++ l1=l0+1 ++ l2=l0+2 ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0 = hon(l0,n) ++ vk1 = hon(l1,n) ++ vk2 = hon(l2,n) ++ t1 = vk0 + (vk1 - vk0)*ppp ++ t2 = vk1 + (vk2 - vk1)*(ppp - 1.0d0) ++ ++ eterm=(t1+(t2-t1)*ppp*0.5d0)*ahk(n)*chgprd ++ engcpe=engcpe+coul-eterm*zzn(ii) ++ ++c calculate forces using 3pt interpolation ++ ++ vk0 = dhn(l0,n) ++ vk1 = dhn(l1,n) ++ vk2 = dhn(l2,n) ++ ++ t1 = vk0 + (vk1 - vk0)*ppp ++ t2 = vk1 + (vk2 - vk1)*(ppp - 1.0d0) ++ ++c calculate in-plane forces ++ ++ egamma=fcoul+ ++ x (t1+(t2-t1)*ppp*0.5d0)*chgprd*zzn(ii)*ahk(n) ++ fx=egamma*xdf(ii) ++ fy=egamma*ydf(ii) ++ ++c calculate perpendicular forces ++ ++ fz=fcoul*zdf(ii)+2.d0*dble(n)*eterm*zzd(ii) ++ ++c add to force accumulators ++ ++ fxx(i)=fxx(i)+fx ++ fyy(i)=fyy(i)+fy ++ fzz(i)=fzz(i)+fz ++ ++ fxx(j)=fxx(j)-fx ++ fyy(j)=fyy(j)-fy ++ fzz(j)=fzz(j)-fz ++ ++c reset zzn array for next order of convergence function ++ ++ zzd(ii)=zzn(ii)*zdf(ii) ++ zzn(ii)=zzd(ii)*zdf(ii) ++ ++c calculate stress tensor ++ ++ strs1 = strs1 + xdf(ii)*fx ++ strs2 = strs2 + xdf(ii)*fy ++ strs3 = strs3 + xdf(ii)*fz ++ strs5 = strs5 + ydf(ii)*fy ++ strs6 = strs6 + ydf(ii)*fz ++ strs9 = strs9 + zdf(ii)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ ma=0 ++ ++ enddo ++ ++c calculate virial ++ ++ vircpe=vircpe-(strs1+strs5+strs9) ++ ++c complete stress tensor ++ ++ stress(1) = stress(1) + strs1 ++ stress(2) = stress(2) + strs2 ++ stress(3) = stress(3) + strs3 ++ stress(4) = stress(4) + strs2 ++ stress(5) = stress(5) + strs5 ++ stress(6) = stress(6) + strs6 ++ stress(7) = stress(7) + strs3 ++ stress(8) = stress(8) + strs6 ++ stress(9) = stress(9) + strs9 ++ ++ return ++ end subroutine hkewald2 ++ ++ subroutine hkewald3(iatm,ik,engcpe,vircpe,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating exclusion corrections to ++c the hautman-klein-ewald electrostatic method ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith may 2000 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer iatm,ik,m,jatm ++ real(8) engcpe,vircpe,epsq,fx,fy,fz,strs1,strs2,strs3 ++ real(8) strs5,strs6,strs9,chgea,chgprd,rrr,rsq,coul,fcoul ++ ++CDIR$ CACHE_ALIGN fi ++ ++c initialise stress tensor accumulators ++ ++ strs1 = 0.d0 ++ strs2 = 0.d0 ++ strs3 = 0.d0 ++ strs5 = 0.d0 ++ strs6 = 0.d0 ++ strs9 = 0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ chgea=chge(iatm)/epsq*r4pie0 ++ ++ if(abs(chgea).gt.1.d-10)then ++ ++ do m=1,nexatm(ik) ++ ++c atomic index and charge product ++ ++ jatm=lexatm(ik,m) ++ chgprd=chgea*chge(jatm) ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=xdf(m)**2+ydf(m)**2+zdf(m)**2 ++ rrr = sqrt(rsq) ++ ++c calculate potential energy and virial ++ ++ coul = chgprd/rrr ++ engcpe = engcpe - coul ++ ++c calculate forces ++ ++ fcoul = coul/rsq ++ fx = fcoul*xdf(m) ++ fy = fcoul*ydf(m) ++ fz = fcoul*zdf(m) ++ ++ fxx(iatm) = fxx(iatm) - fx ++ fyy(iatm) = fyy(iatm) - fy ++ fzz(iatm) = fzz(iatm) - fz ++ ++ fxx(jatm) = fxx(jatm) + fx ++ fyy(jatm) = fyy(jatm) + fy ++ fzz(jatm) = fzz(jatm) + fz ++ ++c calculate stress tensor ++ ++ strs1 = strs1 - xdf(m)*fx ++ strs2 = strs2 - xdf(m)*fy ++ strs3 = strs3 - xdf(m)*fz ++ strs5 = strs5 - ydf(m)*fy ++ strs6 = strs6 - ydf(m)*fz ++ strs9 = strs9 - zdf(m)*fz ++ ++ endif ++ ++ enddo ++ ++c virial ++ ++ vircpe=vircpe-engcpe ++ ++c complete stress tensor ++ ++ stress(1) = stress(1) + strs1 ++ stress(2) = stress(2) + strs2 ++ stress(3) = stress(3) + strs3 ++ stress(4) = stress(4) + strs2 ++ stress(5) = stress(5) + strs5 ++ stress(6) = stress(6) + strs6 ++ stress(7) = stress(7) + strs3 ++ stress(8) = stress(8) + strs6 ++ stress(9) = stress(9) + strs9 ++ ++ endif ++ ++ return ++ end subroutine hkewald3 ++ ++ subroutine hkewald4(iatm,ik,engcpe,vircpe,engcpl,vircpl,rcut,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces in a ++c periodic system using the hautman-klein-ewald method ++c ++c modified to allow direct calculation of primary (short-range) ++c interactions for multiple-time step corrections ++ ++c primary neighbours are taken out of the Ewald sum ++c electrostatics are evaluated directly instead ++c ++c parallel replicated data version - real space terms ++c ++c copyright - daresbury laboratory 2000 ++c author - w. smith july 2000 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer iatm,ik,m,jatm ++ real(8) engcpe,vircpe,engcpl,vircpl,rcut,epsq ++ real(8) fi,fli,rcsq,strs1,strs2,strs3,strs5,strs6 ++ real(8) strs9,strl1,strl2,strl3,strl5,strl6,strl9,chgea,chgprd ++ real(8) rsq,rrr,coul,egamma,fx,fy,fz ++ ++ dimension fi(3),fli(3) ++ ++CDIR$ CACHE_ALIGN fi ++CDIR$ CACHE_ALIGN fli ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++ engcpl=0.d0 ++ vircpl=0.d0 ++ ++c initialise stress tensor accumulators ++ ++ strs1 = 0.d0 ++ strs2 = 0.d0 ++ strs3 = 0.d0 ++ strs5 = 0.d0 ++ strs6 = 0.d0 ++ strs9 = 0.d0 ++ strl1 = 0.d0 ++ strl2 = 0.d0 ++ strl3 = 0.d0 ++ strl5 = 0.d0 ++ strl6 = 0.d0 ++ strl9 = 0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ chgea=chge(iatm)/epsq*r4pie0 ++ if(abs(chgea).gt.1.d-10)then ++ ++c temporary arrays for cache aligning ++ ++ fi(1) = fxx(iatm) ++ fi(2) = fyy(iatm) ++ fi(3) = fzz(iatm) ++ ++ fli(1) = flx(iatm) ++ fli(2) = fly(iatm) ++ fli(3) = flz(iatm) ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ jatm=ilist(m) ++ chgprd=chgea*chge(jatm) ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ ++ if(rcsq.gt.rsq)then ++ ++c coulombic energy ++ ++ rrr = sqrt(rsq) ++ coul = chgprd/rrr ++ ++c sum contributions to the totals ++ ++ engcpe = engcpe + coul ++ engcpl = engcpl - coul ++ vircpe = vircpe - coul ++ vircpl = vircpl + coul ++ ++c calculate coulombic forces ++ ++ egamma = coul/rsq ++ ++ fx = egamma*xdf(m) ++ fy = egamma*ydf(m) ++ fz = egamma*zdf(m) ++ ++c add in contributions to instantaneous force ++ ++ fi(1) = fi(1) + fx ++ fi(2) = fi(2) + fy ++ fi(3) = fi(3) + fz ++ ++ fxx(jatm) = fxx(jatm) - fx ++ fyy(jatm) = fyy(jatm) - fy ++ fzz(jatm) = fzz(jatm) - fz ++ ++c add in contributions to the long-range force ++ ++ fli(1) = fli(1) - fx ++ fli(2) = fli(2) - fy ++ fli(3) = fli(3) - fz ++ ++ flx(jatm) = flx(jatm) + fx ++ fly(jatm) = fly(jatm) + fy ++ flz(jatm) = flz(jatm) + fz ++ ++c calculate long and short range stress tensors ++ ++ strs1 = strs1 + xdf(m)*fx ++ strl1 = strl1 - xdf(m)*fx ++ strs2 = strs2 + xdf(m)*fy ++ strl2 = strl2 - xdf(m)*fy ++ strs3 = strs3 + xdf(m)*fz ++ strl3 = strl3 - xdf(m)*fz ++ strs5 = strs5 + ydf(m)*fy ++ strl5 = strl5 - ydf(m)*fy ++ strs6 = strs6 + ydf(m)*fz ++ strl6 = strl6 - ydf(m)*fz ++ strs9 = strs9 + zdf(m)*fz ++ strl9 = strl9 - zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c copy back temporaries ++ ++ fxx(iatm) = fi(1) ++ fyy(iatm) = fi(2) ++ fzz(iatm) = fi(3) ++ ++ flx(iatm) = fli(1) ++ fly(iatm) = fli(2) ++ flz(iatm) = fli(3) ++ ++c complete stress tensor ++ ++ stresl(1) = stresl(1) + strl1 ++ stresl(2) = stresl(2) + strl2 ++ stresl(3) = stresl(3) + strl3 ++ stresl(4) = stresl(4) + strl2 ++ stresl(5) = stresl(5) + strl5 ++ stresl(6) = stresl(6) + strl6 ++ stresl(7) = stresl(7) + strl3 ++ stresl(8) = stresl(8) + strl6 ++ stresl(9) = stresl(9) + strl9 ++ ++ stress(1) = stress(1) + strs1 ++ stress(2) = stress(2) + strs2 ++ stress(3) = stress(3) + strs3 ++ stress(4) = stress(4) + strs2 ++ stress(5) = stress(5) + strs5 ++ stress(6) = stress(6) + strs6 ++ stress(7) = stress(7) + strs3 ++ stress(8) = stress(8) + strs6 ++ stress(9) = stress(9) + strs9 ++ ++ endif ++ ++ return ++ end subroutine hkewald4 ++ ++ function cerfr(alpha,rrr) ++ ++c*********************************************************************** ++c ++c dl_poly function for generating complementary error function ++c divided by r ++c ++c copyright - daresbury laboratory 2001 ++c author - w. smith february 2001 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer k ++ real(8) cerfr,sqrpi,h0,h1,alpha,rrr,rr2,fac ++ ++ sqrpi=1.7724538509055159d0 ++ ++c starting values ++ ++ h0=0.d0 ++ h1=(2.d0*alpha/sqrpi)*exp(-(alpha*rrr)**2) ++ ++c generate function by recursion ++ ++ rr2=rrr*rrr ++ do k=100,1,-1 ++ ++ fac=(2.d0*alpha**2)**(k-1) ++ h0=(h0*rr2+fac*h1)/dble(2*k-1) ++ ++ enddo ++ ++ cerfr=1.d0/rrr-h0 ++ ++ return ++ end function cerfr ++ ++ end module hkewald_module ++ +diff -urN dl_class_1.9.orig/srcmod/hyper_dynamics_module.f dl_class_1.9/srcmod/hyper_dynamics_module.f +--- dl_class_1.9.orig/srcmod/hyper_dynamics_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/hyper_dynamics_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,2821 @@ ++ module hyper_dynamics_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining hyperdynamics routines ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use forces_module ++ use nlist_builders_module ++ use optimiser_module ++ use property_module ++ use setup_module ++ use shake_module ++ use temp_scalers_module ++ use vv_motion_module ++ ++ implicit none ++ ++ integer, parameter :: mxtrn=10 ++ integer, parameter :: mxbsn=1000 ++ integer, parameter :: mxneb=8 ++ integer, parameter :: mxdiffs=300 ++ integer, parameter :: hyper_tag=35000 ++ ++ integer numbsn,numpro,numtrk,ndiff,maxtrk,numdark,home_bsn,numbpd ++ integer nbsa(mxbsn),nbsb(mxbsn),ktrn(mxtrn) ++ real(8) xtrn(mxtrn),ytrn(mxtrn) ++ real(8) tstop,tkeres,timhyp,timres,tboost,boost,vbase ++ ++ integer, allocatable :: idabsn(:),keymin(:) ++ real(8), allocatable :: xbas(:),ybas(:),zbas(:) ++ real(8), allocatable :: xchk(:),ychk(:),zchk(:) ++ real(8), allocatable :: xres(:),yres(:),zres(:) ++ real(8), allocatable :: vxrs(:),vyrs(:),vzrs(:) ++ real(8), allocatable :: fxrs(:),fyrs(:),fzrs(:) ++ real(8), allocatable :: xhyp(:),yhyp(:),zhyp(:) ++ real(8), allocatable :: vxhp(:),vyhp(:),vzhp(:) ++ real(8), allocatable :: fxhp(:),fyhp(:),fzhp(:) ++ real(8), allocatable :: xdiffs(:),ydiffs(:),zdiffs(:) ++ real(8), allocatable :: celneb(:,:),path(:),optk(:,:) ++ real(8), allocatable :: xneb(:),yneb(:),zneb(:),engneb(:) ++ real(8), allocatable :: fxneb(:),fyneb(:),fzneb(:) ++ real(8), allocatable :: hxneb(:),hyneb(:),hzneb(:) ++ real(8), allocatable :: taux(:),tauy(:),tauz(:) ++ real(8), allocatable :: track(:) ++ ++ integer bsn_1(maxneb),bsn_2(maxneb) ++ real(8) strhyp(9),strres(9),engbsn(2) ++ real(8) celbas(9),celhyp(9),celchk(9),celres(9) ++ ++ save numbsn,numtrk,numpro,ndiff,numdark,timres ++ save xbas,ybas,zbas,xchk,ychk,zchk,timhyp,vbase ++ save xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs ++ save xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp ++ save celbas,celhyp,celres,celchk,strhyp,strres ++ save idabsn,nbsa,nbsb,xdiffs,ydiffs,zdiffs,tkeres ++ save xneb,yneb,zneb,engneb,taux,tauy,tauz,keymin ++ save fxneb,fyneb,fzneb,hxneb,hyneb,hzneb,path ++ save optk,tstop,tboost,boost,numbpd ++ ++ contains ++ ++ subroutine alloc_hyper_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining hyperdynamics arrays and ++c initialising control variables ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ ++ integer i,fail,idnode,nebmax ++ dimension fail(nnn) ++ ++ nebmax=msatms*(mxneb+1) ++ ++c initialise control variables ++ ++ numbpd=0 ++ numtrk=0 ++ numbsn=0 ++ numpro=0 ++ ndiff=0 ++ numdark=0 ++ home_bsn=0 ++ tkeres=0.d0 ++ tstop=1.d30 ++ timhyp=0.d0 ++ timres=0.d0 ++ boost=1.d0 ++ tboost=0.d0 ++ vbase=-huge(1.d0) ++ do i=1,maxneb ++ bsn_1(i)=0 ++ bsn_2(i)=0 ++ enddo ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (xbas(msatms),ybas(msatms),zbas(msatms),stat=fail(1)) ++ allocate (xchk(msatms),ychk(msatms),zchk(msatms),stat=fail(2)) ++ allocate (xres(msatms),yres(msatms),zres(msatms),stat=fail(3)) ++ allocate (vxrs(msatms),vyrs(msatms),vzrs(msatms),stat=fail(4)) ++ allocate (fxrs(msatms),fyrs(msatms),fzrs(msatms),stat=fail(5)) ++ allocate (xhyp(msatms),yhyp(msatms),zhyp(msatms),stat=fail(6)) ++ allocate (vxhp(msatms),vyhp(msatms),vzhp(msatms),stat=fail(7)) ++ allocate (fxhp(msatms),fyhp(msatms),fzhp(msatms),stat=fail(8)) ++ allocate (xdiffs(mxdiffs),ydiffs(mxdiffs),zdiffs(mxdiffs), ++ x stat=fail(9)) ++ allocate (idabsn(mxdiffs),keymin(0:mxneb),stat=fail(10)) ++ allocate (xneb(nebmax),yneb(nebmax),zneb(nebmax),stat=fail(11)) ++ allocate (fxneb(nebmax),fyneb(nebmax),fzneb(nebmax),stat=fail(12)) ++ allocate (taux(msatms),tauy(msatms),tauz(msatms),stat=fail(13)) ++ allocate (engneb(0:mxneb),celneb(9,0:mxneb),path(0:mxneb), ++ x stat=fail(14)) ++ allocate (hxneb(nebmax),hyneb(nebmax),hzneb(nebmax),stat=fail(15)) ++ allocate (optk(5,0:mxneb),stat=fail(16)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)then ++ if(idnode.eq.0)write(nrite,'(10i5)')fail ++ call error(idnode,1115) ++ endif ++ enddo ++ ++ end subroutine alloc_hyper_arrays ++ ++ subroutine hyper_start ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, ++ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, ++ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, ++ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, ++ x hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for starting a hyperdynamics simulation ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,savflg ++ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt ++ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond ++ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,i,j ++ integer ntpvdw,ntshl,ntteth,numblock,iatm0,iatm1,ntcons ++ integer ktol,pass,fail,ntrack ++ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,engcfg ++ real(8) virlrc,cvgerr,dum,otol,cgerr,sigma,hyp_units ++ ++c allocate track array for BPD ++ ++ if(lbpd)then ++ allocate (track(0:nblock/ntrack),stat=fail) ++ endif ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c current block number ++ ++ numblock=nstep/nblock ++ ++c open hyperdynamics journal file ++ ++ if(idnode.eq.0) ++ x open(nevnt,file="EVENTS",form='formatted',position='append') ++ ++c set up hyperdynamics for simulation start ++ ++ if(nstep.eq.0)then ++ ++c initialise bias potential boost factor ++ ++ numbpd=0 ++ boost=1.d0 ++ tboost=0.d0 ++ ++c set basin difference markers ++ ++ do i=1,mxbsn ++ ++ nbsa(i)=0 ++ nbsb(i)=0 ++ ++ enddo ++ ++c store the starting configuration ++ ++ savflg=.true. ++ tkeres=sigma ++ call store_config(savflg,idnode,mxnode,natms,strres,celres, ++ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) ++ ++c minimise starting structure ++ ++ call define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,engcfg,cvgerr) ++ ++c define zero energy for BPD dynamics mode ++ ++ vbase=engcfg ++ ++c write events entry for minimisation ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x engcfg/hyp_units,cvgerr/hyp_units ++ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x engcfg/hyp_units,cvgerr/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++c save minimised starting structure as basin file ++ ++ call write_reference_config ++ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode,engcfg) ++ ++c save details of starting home basin ++ ++ engbsn(1)=engcfg ++ ++ do i=1,9 ++ celbas(i)=cell(i) ++ enddo ++ ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ enddo ++ ++c restore the starting configuration ++ ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strres,celres, ++ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) ++ ++ else ++ ++c restore previous data from hyperdynamics backup file ++ ++ call hyper_open(ltad,idnode,mxnode,natms,nsteql) ++ ++c reset home basin for hyperdynamics (home basin is 0 for TAD) ++ ++ if(lbpd)home_bsn=numbsn-1 ++ ++c store the current configuration ++ ++ savflg=.true. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++c read minimised starting structure from home basin file ++ ++ call read_reference_config ++ x ('CFGBSN','BASINS',nbsn,home_bsn,natms,imcon,idnode,engcfg) ++ ++c save details of current home basin ++ ++ engbsn(1)=engcfg ++ ++ do i=1,9 ++ celbas(i)=cell(i) ++ enddo ++ ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ enddo ++ ++c restore the current configuration ++ ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++ endif ++ ++ return ++ end subroutine hyper_start ++ ++ subroutine hyper_driver ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, ++ x tolnce,hyp_units,ebias,vmin) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for implementing a hyperdynamics simulation ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 seek ++ logical lbpd,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb ++ logical lrefmin,same,savflg,recycle,scan,prechk,tadall,nebgo ++ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol,ntrack ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt ++ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond ++ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw ++ integer ntshl,ntteth,blkout,numblock,bsn1,bsn2,itrack ++ integer nturn,ntcons,mdiff,newbsn,iatm0,iatm1,pass,i,j,itrk ++ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,catchrad ++ real(8) cvgerr,estar,engcfg,cfgtmp,engcpe,engsrp,catch ++ real(8) vircpe,engmet,virmet,virlrc,engtbp,virtbp,dum ++ real(8) engfbp,virfbp,engter,virter,engbnd,virbnd,engang ++ real(8) virang,engdih,virdih,enginv,virinv,engtet,virtet ++ real(8) engshl,shlke,virshl,engfld,virfld,virsrp,sprneb ++ real(8) deltad,deltal,tlow,timhop,timlow,engtke,tolnce,hyp_units ++ real(8) ebias,vmin ++ ++ data bsn1,bsn2/0,0/ ++ ++c control variables ++ ++ lneb=.false. ++ numblock=nstep/nblock ++ maxtrk=nblock/ntrack ++ if(numdark.eq.0)numdark=nsteql ++ lrefmin=(mod(nstep,nblock).eq.0) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c BPD/TAD simulation time ++ ++ timhyp=timhyp+tstep ++ ++c track the tboost value ++ ++ if(mod(nstep,ntrack).eq.0)track(mod(numtrk,maxtrk))=tboost ++ ++c provisional check for transition - compare current config with ++c the reference state (not in dark period) ++ ++ same=.true. ++ scan=.false. ++ if(prechk.and.(mod(nstep,ntrack).eq.0).and. ++ x (lbpd.or.(ltad.and.(nstep.gt.numdark))))then ++ ++ catch=0.65d0*catchrad ++ call check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catch) ++ ++ if(.not.same.and.idnode.eq.0)then ++ ++ write(nevnt,'("PRE",i10)')nstep ++ write(nrite,'(1x,"PRE",i10)')nstep ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ endif ++ ++ if(.not.same.or.lrefmin)then ++ ++c store the current configuration ++ ++ savflg=.true. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++c minimise current structure ++ ++ call define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) ++ ++c write events entry for minimisation ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x cfgtmp/hyp_units,cvgerr/hyp_units ++ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x cfgtmp/hyp_units,cvgerr/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++c confirm any transition ++ ++ if(ltad)scan=.true. ++ call check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catchrad) ++ ++c transition detected - proceed with transition analysis ++ ++ if(.not.same)then ++ ++c store new basin energy ++ ++ engbsn(2)=cfgtmp ++ ++c save new minimised state (bias potential dynamics only) ++ ++ if(lbpd)then ++ ++ do i=1,9 ++ celres(i)=cell(i) ++ enddo ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xres(j)=xxx(i) ++ yres(j)=yyy(i) ++ zres(j)=zzz(i) ++ ++ enddo ++ ++ endif ++ ++c record transition (for TAD only if outside blackout period) ++ ++ if(lbpd.or.nstep.gt.numdark)then ++ ++c check if transition results in unique new basin (TAD only) ++ ++ if(ltad)call check_basins(newbsn,mdiff,mxnode) ++ ++c analysis of new basin ++ ++ if(lbpd.or.tadall.or.newbsn.eq.numbsn)then ++ ++c set difference counters and pointers (TAD only) ++ ++ if(ltad)then ++ ++ if(numbsn.gt.mxbsn)call error(idnode,2330) ++ ++ ndiff=mdiff ++ ++ if(numbsn.gt.1)then ++ nbsa(numbsn)=nbsb(numbsn-1)+1 ++ else ++ nbsa(numbsn)=1 ++ endif ++ ++ nbsb(numbsn)=mdiff ++ ++ endif ++ ++c save the basin file and store basin energy ++ ++ call write_reference_config ++ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode, ++ x cfgtmp) ++ ++c determine minimum (reaction) path and activation energy ++ ++ if(nebgo)call neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn1, ++ x bsn2,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,cfgtmp,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++c analyse the transition - determine e-star and destination state ++ ++ if(nebgo)call transition_properties ++ x (seek,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,nturn,numbsn,alpha,delr,dlrpot, ++ x drewd,elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr,estar, ++ x catchrad,hyp_units) ++ ++c estimate time of transition from past trajectory ++ ++ call transition_time ++ x (seek,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl, ++ x ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp, ++ x ntpter,ntrack,ntpvdw,ntshl,ntteth,ntcons,itrk, ++ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, ++ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,cfgtmp,cvgerr,catchrad,timhop,hyp_units) ++ ++c update TAD control variables ++ ++ if(ltad)then ++ ++c update blackout period ++ ++ numdark=nblock*((nstep+blkout)/nblock+1) ++ ++c calculate stopping time ++ ++ timlow=timhop*exp(-(estar/temp-estar/tlow)/boltz) ++ tstop=min(tstop,deltad*(timlow/deltad)**(tlow/temp)) ++ ++c write transition data for TAD only ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("TRA",i10,3i6,1p,4e14.5)') ++ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, ++ x timhop,timlow,tstop ++ write(nevnt,'("BLK",2i10)')nstep,numdark ++ write(nrite,'(1x,"TRA",i10,3i6,1p,4e14.5)') ++ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, ++ x timhop,timlow,tstop ++ write(nrite,'(1x,"BLK",2i10)')nstep,numdark ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ elseif(nebgo.and.idnode.eq.0)then ++ ++c write transition data for bias potential dynamics with NEB ++ ++ write(nevnt,'("TRA",i10,3i6,1p,3e14.5)') ++ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, ++ x timhop,timhop*tboost ++ write(nrite,'(1x,"TRA",i10,3i6,1p,3e14.5)') ++ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, ++ x timhop,timhop*tboost ++ write(nrite,"(1x,120('-'))") ++ ++ numbpd=0 ++ tboost=0.0 ++ ++ elseif(idnode.eq.0)then ++ ++c write transition data for bias potential dynamics without NEB ++ ++ write(nevnt,'("TRA",i10,2i6,1p,3e14.5)') ++ x nstep,home_bsn,numbsn-1,ebias/hyp_units, ++ x timhop,timhop*tboost ++ write(nrite,'(1x,"TRA",i10,2i6,1p,3e14.5)') ++ x nstep,home_bsn,numbsn-1,ebias/hyp_units, ++ x timhop,timhop*tboost ++ write(nrite,"(1x,120('-'))") ++ ++ numbpd=0 ++ tboost=0.0 ++ ++ endif ++ ++ else ++ ++c update blackout period when transition not unique (TAD only) ++ ++ numdark=nblock*((nstep+blkout)/nblock+1) ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("TRR",i10,3i6)')nstep,home_bsn,newbsn ++ write(nevnt,'("BLK",2i10)')nstep,numdark ++ write(nrite,'(1x,"TRR",i10,3i6)')nstep,home_bsn,newbsn ++ write(nrite,'(1x,"BLK",2i10)')nstep,numdark ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ endif ++ ++c actions when new basin has been visited before (TAD only) ++ ++ elseif(ltad)then ++ ++c ignore dark transition and extend blackout period (TAD only) ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("TRI",i10)')nstep ++ write(nrite,'(1x,"TRI",i10)')nstep ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ if(nstep.le.nsteql)then ++ ++ nsteql=nsteql+blkout ++ numdark=nsteql+blkout ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("EQL",2i10)')nstep,nsteql ++ write(nrite,'(1x,"EQL",2i10)')nstep,nsteql ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ else ++ ++ numdark=nblock*((nstep+blkout)/nblock+1) ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("BLK",3i10)')nstep,numdark ++ write(nrite,'(1x,"BLK",3i10)')nstep,numdark ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ if(ltad)then ++ ++c return to the block starting state after transition (TAD only) ++ ++ timhyp=timres ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strres,celres, ++ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) ++ ++c scramble the velocities (and conserve system energy) ++ ++ call regauss(idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, ++ x ntshl,keyshl,tkeres,temp,tolnce) ++ ++ elseif(lbpd)then ++ ++c reset reference state to new basin (bias potential dynamics only) ++ ++ home_bsn=home_bsn+1 ++ engbsn(1)=engbsn(2) ++ ++ do i=1,9 ++ celbas(i)=celres(i) ++ enddo ++ ++ call invert(celbas,rcell,dum) ++ ++ do i=1,iatm1-iatm0+1 ++ ++ xbas(i)=rcell(1)*xres(i)+rcell(4)*yres(i)+rcell(7)*zres(i) ++ ybas(i)=rcell(2)*xres(i)+rcell(5)*yres(i)+rcell(8)*zres(i) ++ zbas(i)=rcell(3)*xres(i)+rcell(6)*yres(i)+rcell(9)*zres(i) ++ ++ enddo ++ ++c restore current hyperdynamics configuration ++ ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++c reset boost factor ++ ++ numbpd=0 ++ tboost=0.d0 ++ ++ endif ++ ++c no transition detected so restore current trajectory ++ ++ else ++ ++c restore the current configuration ++ ++ savflg=.false. ++ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, ++ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) ++ ++c save the block configuration as reset state (TAD only) ++ ++ if(ltad.and.lrefmin)then ++ ++ savflg=.true. ++ tkeres=engtke ++ timres=timhyp ++ call store_config(savflg,idnode,mxnode,natms,strres,celres, ++ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c close down if TAD stopping time reached ++ ++ if(ltad.and.tstop.lt.timhyp)recycle=.false. ++ ++c write a tracking file ++ ++ if(mod(nstep,ntrack).eq.0)then ++ ++ itrack=mod(numtrk,maxtrk) ++ call write_reference_config ++ x ('CFGTRK','TRACKS',ntrk,itrack,natms,imcon,idnode,engcfg) ++ ++ numtrk=numtrk+1 ++ ++ endif ++ ++ return ++ end subroutine hyper_driver ++ ++ subroutine define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,engcfg,cvgerr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling subroutine calls for a ++c structural minimisation to define a minimum state for ++c hyperdynamics simulations ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lfcap,nogofr,lneut,lnsq,loglnk,stropt,lzeql ++ logical newlst,ltad,lsolva,lfree,lexcite ++ ++ integer idnode,imcon,keyfce,keyfld,keyshl,keytol ++ integer keystr,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp ++ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql ++ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet ++ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf ++ integer nblock,pass,mxpass,mstep,ntcons,nsolva,isolva ++ ++ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd ++ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp ++ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp ++ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp ++ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp ++ real(8) virtbp,virter,virtet,volm,engmet,cfgold,cvgerr ++ real(8) hnorm,grad0,grad1,ff1,sgn,engord,virord ++ ++ data mxpass/1000/ ++ ++c control variables ++ ++ pass=0 ++ keystr=0 ++ numrdf=0 ++ ltad=.true. ++ engcfg=1.d30 ++ stropt=.false. ++ nogofr=.false. ++ ++c dummy variables ++ ++ lsolva=.false. ++ lfree=.false. ++ lexcite=.false. ++ nsolva=0 ++ isolva=1 ++ engord=0.d0 ++ virord=0.d0 ++ ++c relax the current structure ++ ++ do while(.not.stropt.and.pass.lt.mxpass) ++ ++ pass=pass+1 ++ cfgold=engcfg ++ mstep=nstep+pass ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces ++ ++ call force_manager ++ x (newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lexcite,idnode,mxnode,natms,imcon,mstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c structure optimisation ++ ++ call strucopt ++ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++ cvgerr=abs(engcfg-cfgold) ++ ++ enddo ++ ++ return ++ end subroutine define_minimum_state ++ ++ subroutine write_reference_config ++ x (fnam,direct,nfil,nnn,natms,imcon,idnode,engcfg) ++ ++c*********************************************************************** ++c ++c dlpoly utility to write a minimum structure file in CONFIG ++c format ++c ++c copyright daresbury laboratory ++c author w.smith june 2006 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ character*6 fnam ++ character*4 tail ++ character*6 direct ++ integer nfil,nnn,i,natms,imcon,idnode,levcfg ++ real(8) engcfg ++ ++ levcfg=0 ++ ++c node zero handles i/o ++ ++ if(idnode.eq.0)then ++ ++c write configuration data to new configuration file ++ ++ write(tail,'(i4.4)')nnn ++ open(nfil,file=direct//'/'//fnam//tail,form='formatted') ++ ++ write(nfil,'(a10)')fnam//tail ++ write(nfil,'(3i10,g20.12)') levcfg,imcon,natms,engcfg ++ ++ if(imcon.gt.0) write(nfil,'(3f20.12)') cell ++ ++ do i=1,natms ++ ++ write(nfil,'(a8,i10)') atmnam(i),i ++ write(nfil,'(3g20.10)') xxx(i),yyy(i),zzz(i) ++ ++ enddo ++ ++ close (nfil) ++ ++ endif ++ ++ nnn=nnn+1 ++ ++ return ++ end subroutine write_reference_config ++ ++ subroutine read_reference_config ++ x (fnam,direct,nfil,nnn,natms,imcon,idnode,engcfg) ++ ++c*********************************************************************** ++c ++c dlpoly utility to read a reference structure file in CONFIG ++c format ++c ++c copyright daresbury laboratory ++c author w.smith february 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ character*6 fnam ++ character*4 tail ++ character*6 direct ++ integer nfil,nnn,i,natms,imcon,idnode,levcfg ++ real(8) engcfg ++ ++c node zero handles i/o ++ ++ if(idnode.eq.0)then ++ ++c read configuration data from configuration file on proc 0 ++ ++ write(tail,'(i4.4)')nnn ++ open(nfil,file=direct//'/'//fnam//tail,form='formatted') ++ ++ read(nfil,*) ++ read(nfil,'(3i10,g20.12)')levcfg,imcon,natms,engcfg ++ buffer(1)=dble(levcfg) ++ buffer(2)=dble(imcon) ++ buffer(3)=dble(natms) ++ buffer(4)=engcfg ++ if(imcon.gt.0) read(nfil,'(3f20.12)') cell ++ do i=1,9 ++ buffer(i+4)=cell(i) ++ enddo ++ call gdsum(buffer(1),13,buffer(14)) ++ ++ do i=1,natms ++ ++ read(nfil,'(a8)') atmnam(i) ++ read(nfil,'(3g20.10)') xxx(i),yyy(i),zzz(i) ++ ++ enddo ++ ++ close (nfil) ++ ++ else ++ ++c gather data from configuration file on procs > 0 ++ ++ do i=1,13 ++ buffer(i)=0.d0 ++ enddo ++ call gdsum(buffer(1),13,buffer(14)) ++ ++ levcfg=nint(buffer(1)) ++ imcon=nint(buffer(2)) ++ natms=nint(buffer(3)) ++ engcfg=buffer(4) ++ do i=1,9 ++ cell(i)=buffer(i+4) ++ enddo ++ do i=1,natms ++ xxx(i)=0.d0 ++ yyy(i)=0.d0 ++ zzz(i)=0.d0 ++ enddo ++ ++ endif ++ ++c global gather of atomic coordinates ++ ++ call gdsum(xxx,natms,buffer) ++ call gdsum(yyy,natms,buffer) ++ call gdsum(zzz,natms,buffer) ++ ++ return ++ end subroutine read_reference_config ++ ++ subroutine store_config(lsave,idnode,mxnode,natms,strold,celold, ++ x xold,yold,zold,vxold,vyold,vzold,fxold,fyold,fzold) ++ ++c*********************************************************************** ++c ++c dlpoly hyperdynamics routine for storing the current ++c configuration ++c ++c copyright daresbury laboratory ++c author w.smith sep 2006 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical lsave ++ integer idnode,mxnode,natms,iatm0,iatm1,i,j ++ ++ real(8) strold(9),celold(9) ++ real(8) xold(msatms),yold(msatms),zold(msatms) ++ real(8) vxold(msatms),vyold(msatms),vzold(msatms) ++ real(8) fxold(msatms),fyold(msatms),fzold(msatms) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ if(lsave)then ++ ++c save cell and stress tensors ++ ++ do i=1,9 ++ ++ celold(i)=cell(i) ++ strold(i)=stress(i) ++ ++ enddo ++ ++c save configuration ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xold(j)=xxx(i) ++ yold(j)=yyy(i) ++ zold(j)=zzz(i) ++ vxold(j)=vxx(i) ++ vyold(j)=vyy(i) ++ vzold(j)=vzz(i) ++ fxold(j)=fxx(i) ++ fyold(j)=fyy(i) ++ fzold(j)=fzz(i) ++ ++ enddo ++ ++ else ++ ++c restore cell and stress tensors ++ ++ do i=1,9 ++ ++ cell(i)=celold(i) ++ stress(i)=strold(i) ++ ++ enddo ++ ++c restore configuration ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxx(i)=xold(j) ++ yyy(i)=yold(j) ++ zzz(i)=zold(j) ++ vxx(i)=vxold(j) ++ vyy(i)=vyold(j) ++ vzz(i)=vzold(j) ++ fxx(i)=fxold(j) ++ fyy(i)=fyold(j) ++ fzz(i)=fzold(j) ++ ++ enddo ++ ++c replication of full configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine store_config ++ ++ subroutine check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catchrad) ++ ++c*********************************************************************** ++c ++c dlpoly hyperdynamics routine for checking when a transition ++c has occured in a configuration ++c ++c copyright daresbury laboratory ++c author w.smith sep 2006 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ character*8 seek ++ logical same,safe,scan,all ++ integer idnode,mxnode,natms,imcon,nblock,mdiff ++ integer iatm0,iatm1,i,j ++ real(8) catchrad,catch2,rr2,dum,sxx,syy,szz,txx,tyy,tzz,pp2 ++ ++ all=(seek.eq.'all ') ++ ++c flag for comparing structures ++ ++ same=.true. ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise search parameters ++ ++ catch2=catchrad**2 ++ ++c construct coordinate check arrays ++ ++ do i=1,9 ++ celchk(i)=cell(i) ++ enddo ++ ++c store structure in reduced coordinates (target atoms only) ++ ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ if(all.or.atmnam(i).eq.seek)then ++ ++ xchk(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ychk(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zchk(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ endif ++ ++ enddo ++ ++c compare current structure with reference basin ++ ++ j=0 ++ pp2=0.d0 ++ safe=.true. ++ mdiff=ndiff ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ if(all.or.atmnam(i).eq.seek)then ++ ++c calculate separations in reduced units ++ ++ sxx=xchk(j)-xbas(j) ++ syy=ychk(j)-ybas(j) ++ szz=zchk(j)-zbas(j) ++ ++c calculate minimum image separations ++ ++ sxx=sxx-nint(sxx) ++ syy=syy-nint(syy) ++ szz=szz-nint(szz) ++ ++c set trial structure at minimum displacements from reference ++ ++ xchk(j)=xbas(j)+sxx ++ ychk(j)=ybas(j)+syy ++ zchk(j)=zbas(j)+szz ++ ++c calculate atomic separations in real coordinates ++ ++ txx=(celchk(1)*xchk(j)+celchk(4)*ychk(j)+celchk(7)*zchk(j)) ++ x -(celbas(1)*xbas(j)+celbas(4)*ybas(j)+celbas(7)*zbas(j)) ++ tyy=(celchk(2)*xchk(j)+celchk(5)*ychk(j)+celchk(8)*zchk(j)) ++ x -(celbas(2)*xbas(j)+celbas(5)*ybas(j)+celbas(8)*zbas(j)) ++ tzz=(celchk(3)*xchk(j)+celchk(6)*ychk(j)+celchk(9)*zchk(j)) ++ x -(celbas(3)*xbas(j)+celbas(6)*ybas(j)+celbas(9)*zbas(j)) ++ ++c calculate total structural difference ++ ++ rr2=txx**2+tyy**2+tzz**2 ++ pp2=max(pp2,rr2) ++ ++c identify and store the displaced atoms ++ ++ if(scan.and.rr2.ge.catch2)then ++ ++ mdiff=mdiff+1 ++ ++ if(mdiff.le.mxdiffs)then ++ ++ idabsn(mdiff)=i ++ xdiffs(mdiff)=txx ++ ydiffs(mdiff)=tyy ++ zdiffs(mdiff)=tzz ++ ++ else ++ ++ safe=.false. ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c global check on diffs arrays ++ ++ if(scan)then ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)then ++ ++ if(idnode.eq.0)write(nrite, ++ x "(/,1x,'number of current diffs',i10)")mdiff ++ call error(idnode,2340) ++ ++ endif ++ ++ endif ++ ++c global transition check ++ ++ same=(pp2.lt.catch2) ++ if(mxnode.gt.1)call gstate(same) ++ ++ return ++ end subroutine check_for_transition ++ ++ subroutine check_basins(newbsn,mdiff,mxnode) ++ ++c*********************************************************************** ++c ++c dlpoly hyperdynamics routine for checking that a new basin is not ++c one already known ++c ++c copyright daresbury laboratory ++c author w.smith jan 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical same ++ integer newbsn,ia,ib,ic,id,ibsn,i,j,k,mxnode,mdiff ++ ++ ibsn=1 ++ newbsn=0 ++ ib=mdiff ++ ia=ndiff+1 ++ same=.false. ++ do while(.not.same.and.ibsn.lt.numbsn) ++ ++ ic=nbsa(ibsn) ++ id=nbsb(ibsn) ++ ++ if(ib-ia.eq.id-ic)then ++ ++ same=.true. ++ ++ do k=0,ib-ia ++ ++ i=ia+k ++ j=ic+k ++ ++ if(.not.((idabsn(i).eq.idabsn(j)).and. ++ x (abs(xdiffs(i)-xdiffs(j)).lt.0.1d0).and. ++ x (abs(ydiffs(i)-ydiffs(j)).lt.0.1d0).and. ++ x (abs(zdiffs(i)-zdiffs(j)).lt.0.1d0)))same=.false. ++ ++ enddo ++ ++ endif ++ ++c check if same on all processors ++ ++ if(mxnode.gt.1)call gstate(same) ++ if(same)newbsn=ibsn ++ ++ ibsn=ibsn+1 ++ ++ enddo ++ ++c if not same - must be new basin! ++ ++ if(.not.same)newbsn=numbsn ++ ++ return ++ end subroutine check_basins ++ ++ subroutine neb_driver ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn1, ++ x bsn2,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, ++ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, ++ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, ++ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, ++ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, ++ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep,opttol,sprneb,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for controlling a nudged elastic band ++c calculation ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lneb,newlst,lneut,lnsq,stropt ++ logical lzeql,loglnk,lfcap ++ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,mstep ++ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw ++ integer ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl ++ integer keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nscons ++ integer ngrp,keytol,ntfree,iatm0,iatm1,iatm2,ntcons ++ integer i,j,k,n,pass,mxpass,nkinks,bsn1,bsn2,itrk ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet ++ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp ++ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtet,virtet,engshl ++ real(8) shlke,virshl,engfld,virfld,engcfg,fmax,temp,tstep ++ real(8) sprneb,opttol,hyp_units,fac,xxn,yyn,zzn,tol,cvg,dum ++ ++ data mxpass/100/ ++ ++c control variables ++ ++ stropt=.false. ++ do n=0,mxneb ++ ++ keymin(n)=0 ++ do i=1,5 ++ optk(i,n)=0.d0 ++ enddo ++ ++ enddo ++ if(lneb)numpro=-(100*bsn1+bsn2) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++c read in the required start and end point configurations ++ ++ if(lneb)then ++ ++c read data for first reference structure ++ ++ call read_reference_config ++ x ('CFGBSN','BASINS',nbsn,bsn1,natms,imcon,idnode,engcfg) ++ ++ engbsn(1)=engcfg ++ ++ do i=1,9 ++ celbas(i)=cell(i) ++ enddo ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ enddo ++ ++c read data for second reference structure ++ ++ call read_reference_config ++ x ('CFGBSN','BASINS',nbsn,bsn2,natms,imcon,idnode,engcfg) ++ ++ engbsn(2)=engcfg ++ ++ do i=1,9 ++ celchk(i)=cell(i) ++ enddo ++ call invert(cell,rcell,dum) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xchk(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ ychk(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ zchk(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ enddo ++ ++ endif ++ ++c construct initial `bead' configurations in chain ++ ++ k=0 ++ do n=0,mxneb ++ ++ j=0 ++ fac=dble(n)/dble(mxneb) ++ ++c construct linear mix of cell vectors ++ ++ do i=1,9 ++ celneb(i,n)=(1.d0-fac)*celbas(i)+fac*celchk(i) ++ enddo ++ ++c construct beads by linear interpolation ++ ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ k=k+1 ++ ++ xxn=xbas(j)+fac*((xchk(j)-xbas(j))-nint(xchk(j)-xbas(j))) ++ yyn=ybas(j)+fac*((ychk(j)-ybas(j))-nint(ychk(j)-ybas(j))) ++ zzn=zbas(j)+fac*((zchk(j)-zbas(j))-nint(zchk(j)-zbas(j))) ++ xneb(k)=celneb(1,n)*xxn+celneb(4,n)*yyn+celneb(7,n)*zzn ++ yneb(k)=celneb(2,n)*xxn+celneb(5,n)*yyn+celneb(8,n)*zzn ++ zneb(k)=celneb(3,n)*xxn+celneb(6,n)*yyn+celneb(9,n)*zzn ++ ++ enddo ++ ++ enddo ++ ++c start of NEB optimisation ++ ++ pass=0 ++ safe=.false. ++ do while(.not.safe.and.pass.lt.mxpass) ++ ++ pass=pass+1 ++ safe=.true. ++ mstep=nstep+pass ++ ++c calculate system forces on all beads ++ ++ call neb_system_forces ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,mxnode, ++ x natms,mstep,imcon,nstbgr,nsteql,keyfce,kmax1,kmax2, ++ x kmax3,nhko,nlatt,ntpvdw,ntpmet,nospl,multt,nneut,ntptbp, ++ x ntpfbp,ntpter,keyshl,keyfld,ntbond,ntangl,ntdihd,ntinv, ++ x ntteth,ntshl,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep) ++ ++c calculate spring forces on all beads ++ ++ call neb_spring_forces(idnode,mxnode,natms,nkinks,sprneb) ++ ++c energy minimisation of each bead ++ ++ do n=0,mxneb ++ ++c construct cell vectors for nth bead ++ ++ do i=1,9 ++ cell(i)=celneb(i,n) ++ enddo ++ ++c construct coordinate and force arrays for nth bead ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ xxx(i)=xneb(k) ++ yyy(i)=yneb(k) ++ zzz(i)=zneb(k) ++ fxx(i)=fxneb(k) ++ fyy(i)=fyneb(k) ++ fzz(i)=fzneb(k) ++ ++ enddo ++ ++c restore search direction vector if keymin > 0 ++ ++ if(keymin(n).gt.0)then ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ hhx(i)=hxneb(k) ++ hhy(i)=hyneb(k) ++ hhz(i)=hzneb(k) ++ ++ enddo ++ ++ endif ++ ++c form complete global arrays ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ if(keymin(n).gt.0) ++ x call merge(idnode,mxnode,natms,mxbuff,hhx,hhy,hhz,buffer) ++ ++ endif ++ ++c structure optimisation ++ ++ call strucopt ++ x (stropt,keymin(n),keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,10.d0*opttol,engneb(n),optk(1,n), ++ x optk(2,n),optk(3,n),optk(4,n),optk(5,n)) ++ safe=safe.and.stropt ++ stropt=.false. ++ ++c update coordinate arrays for nth bead ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ xneb(k)=xxx(i) ++ yneb(k)=yyy(i) ++ zneb(k)=zzz(i) ++ hxneb(k)=hhx(i) ++ hyneb(k)=hhy(i) ++ hzneb(k)=hhz(i) ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c convergence check ++ ++c$$$ if(.not.safe)then ++c$$$ ++c$$$ call error(idnode,2320) ++c$$$ ++c$$$ else ++ ++c save neb profile ++ ++ call write_profile(idnode,mxnode,natms,hyp_units) ++ ++c write neb summary ++ ++ if(idnode.eq.0)then ++ ++ if(lneb)then ++ ++ write(nrite,'(/,1x,"summary of NEB calculation",/)') ++ write(nrite,'(1x,"path and energy for state",i4, ++ x " ---> state",i4," transition")')bsn1,bsn2 ++ write(nrite,'(1x,"convergence status :",l4)')safe ++ write(nrite,'(1x,"obtained after ",i4," iterations",/)')pass ++ ++ do n=0,mxneb ++ write(nrite,'(6x,1p,2e14.6)')path(n),engneb(n)/hyp_units ++ enddo ++ ++ else ++ ++ write(nevnt,'("NEB",i10,3i6,1p,2e14.5)') ++ x nstep,pass,mxpass,mxneb+1,engbsn(1)/hyp_units, ++ x engbsn(2)/hyp_units ++ write(nrite,'(1x,"NEB",i10,3i6,1p,2e14.5)') ++ x nstep,pass,mxpass,mxneb+1,engbsn(1)/hyp_units, ++ x engbsn(2)/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ endif ++ ++c$$$ endif ++ ++c end of NEB optimisation ++ ++ return ++ end subroutine neb_driver ++ ++ subroutine neb_system_forces ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,mxnode, ++ x natms,mstep,imcon,nstbgr,nsteql,keyfce,kmax1,kmax2, ++ x kmax3,nhko,nlatt,ntpvdw,ntpmet,nospl,multt,nneut,ntptbp, ++ x ntpfbp,ntpter,keyshl,keyfld,ntbond,ntangl,ntdihd,ntinv, ++ x ntteth,ntshl,delr,dlrpot,engcpe,engsrp,epsq, ++ x rcut,rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, ++ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, ++ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, ++ x engang,virang,engdih,virdih,enginv,virinv,engtet, ++ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, ++ x temp,tstep) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating system forces in a nudged ++c elastic band calculation ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,ltad ++ logical lsolva,lfree,lexcite ++ integer idnode,mxnode,natms,imcon,nstbgr,nsteql,mstep ++ integer numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw ++ integer ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl ++ integer keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl ++ integer iatm0,iatm1,iatm2,i,k,n,nsolva,isolva ++ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw ++ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet ++ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp ++ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang ++ real(8) engdih,virdih,enginv,virinv,engtet,virtet,engshl ++ real(8) shlke,virshl,engfld,virfld,engcfg,fmax,temp,tstep ++ real(8) engord,virord ++ ++ numrdf=0 ++ ltad=.true. ++ nogofr=.false. ++ ++c dummy variables ++ ++ lsolva=.false. ++ lfree=.false. ++ lexcite=.false. ++ nsolva=0 ++ isolva=1 ++ engord=0.d0 ++ virord=0.d0 ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++c calculate system forces for all beads ++ ++ do n=0,mxneb ++ ++c construct cell vectors for one bead ++ ++ do i=1,9 ++ cell(i)=celneb(i,n) ++ enddo ++ ++c construct coordinate array for one bead ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ xxx(i)=xneb(k) ++ yyy(i)=yneb(k) ++ zzz(i)=zneb(k) ++ ++ enddo ++ ++c form complete global arrays ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c construct verlet neighbour list ++ ++ call nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c calculate atomic forces for one bead ++ ++ call force_manager ++ x (newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,lsolva,lfree, ++ x lexcite,idnode,mxnode,natms,imcon,mstep,nstbgr,nsteql, ++ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, ++ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, ++ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, ++ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, ++ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, ++ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, ++ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, ++ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, ++ x engcfg,fmax,temp,engord,virord) ++ ++c store configuration energy of bead ++ ++ engneb(n)=engcfg ++ ++c frozen atoms option ++ ++ call freeze(natms) ++ ++c allocate forces to bead atoms ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ fxneb(k)=fxx(i) ++ fyneb(k)=fyy(i) ++ fzneb(k)=fzz(i) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine neb_system_forces ++ ++ subroutine neb_spring_forces(idnode,mxnode,natms,nkinks,sprneb) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating spring forces in a nudged ++c elastic band calculation ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,j,k,n,kp,km,idnode,mxnode,natms,iatm0,iatm1,iatm2 ++ integer nkinks ++ real(8) rp2,rm2,tau2,fpar,vv0,vp1,vm1,aaa,bbb,txx,tyy,tzz ++ real(8) uxx,uyy,uzz,wxx,wyy,wzz,sxx,syy,szz,rxx,ryy,rzz ++ real(8) sprneb,fac,kink,det ++ real(8) rcella(9),rcellb(9),rcellc(9),cella(9),cellb(9),cellc(9) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++c energies of first and last basins ++ ++ engneb(0)=engbsn(1) ++ engneb(mxneb)=engbsn(2) ++ ++c calculate spring tangents for all beads ++ ++ nkinks=0 ++ do n=1,mxneb-1 ++ ++ rp2=0.d0 ++ rm2=0.d0 ++ tau2=0.d0 ++ fpar=0.d0 ++ kink=0.d0 ++ vv0=engneb(n) ++ vp1=engneb(n+1) ++ vm1=engneb(n-1) ++ ++c calculate tangent vector and scalar product with system force ++ ++ if(vp1.gt.vv0.and.vv0.gt.vm1)then ++ ++ aaa=1.d0 ++ bbb=0.d0 ++ ++ else if(vp1.lt.vv0.and.vv0.lt.vm1)then ++ ++ aaa=0.d0 ++ bbb=1.d0 ++ ++ else if(vp1.gt.vm1)then ++ ++ aaa=max(abs(vp1-vv0),abs(vv0-vm1)) ++ bbb=min(abs(vp1-vv0),abs(vv0-vm1)) ++ ++ else ++ ++ aaa=min(abs(vp1-vv0),abs(vv0-vm1)) ++ bbb=max(abs(vp1-vv0),abs(vv0-vm1)) ++ ++ endif ++ ++c invert cell matrices ++ ++ do i=1,9 ++ cella(i)=celneb(i,n-1) ++ cellb(i)=celneb(i,n) ++ cellc(i)=celneb(i,n+1) ++ enddo ++ call invert(cella,rcella,det) ++ call invert(cellb,rcellb,det) ++ call invert(cellc,rcellc,det) ++ ++ j=0 ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ k=k+1 ++ km=k-iatm2 ++ ++c calculate first spring vector (pbc corrected) ++ ++ sxx=rcellb(1)*xneb(k)+rcellb(4)*yneb(k)+rcellb(7)*zneb(k) ++ syy=rcellb(2)*xneb(k)+rcellb(5)*yneb(k)+rcellb(8)*zneb(k) ++ szz=rcellb(3)*xneb(k)+rcellb(6)*yneb(k)+rcellb(9)*zneb(k) ++ rxx=rcella(1)*xneb(km)+rcella(4)*yneb(km)+rcella(7)*zneb(km) ++ ryy=rcella(2)*xneb(km)+rcella(5)*yneb(km)+rcella(8)*zneb(km) ++ rzz=rcella(3)*xneb(km)+rcella(6)*yneb(km)+rcella(9)*zneb(km) ++ rxx=rxx-nint(rxx-sxx) ++ ryy=ryy-nint(ryy-syy) ++ rzz=rzz-nint(rzz-szz) ++ txx=xneb(k)- ++ x (rxx*celneb(1,n-1)+ryy*celneb(4,n-1)+rzz*celneb(7,n-1)) ++ tyy=yneb(k)- ++ x (rxx*celneb(2,n-1)+ryy*celneb(5,n-1)+rzz*celneb(8,n-1)) ++ tzz=zneb(k)- ++ x (rxx*celneb(3,n-1)+ryy*celneb(6,n-1)+rzz*celneb(9,n-1)) ++ ++c calculate second spring vector (pbc corrected) ++ ++ kp=k+iatm2 ++ rxx=rcellc(1)*xneb(kp)+rcellc(4)*yneb(kp)+rcellc(7)*zneb(kp) ++ ryy=rcellc(2)*xneb(kp)+rcellc(5)*yneb(kp)+rcellc(8)*zneb(kp) ++ rzz=rcellc(3)*xneb(kp)+rcellc(6)*yneb(kp)+rcellc(9)*zneb(kp) ++ rxx=rxx-nint(rxx-sxx) ++ ryy=ryy-nint(ryy-syy) ++ rzz=rzz-nint(rzz-szz) ++ uxx=-xneb(k)+ ++ x rxx*celneb(1,n+1)+ryy*celneb(4,n+1)+rzz*celneb(7,n+1) ++ uyy=-yneb(k)+ ++ x rxx*celneb(2,n+1)+ryy*celneb(5,n+1)+rzz*celneb(8,n+1) ++ uzz=-zneb(k)+ ++ x rxx*celneb(3,n+1)+ryy*celneb(6,n+1)+rzz*celneb(9,n+1) ++ ++ rp2=rp2+uxx*uxx+uyy*uyy+uzz*uzz ++ rm2=rm2+txx*txx+tyy*tyy+tzz*tzz ++ wxx=aaa*uxx+bbb*txx ++ wyy=aaa*uyy+bbb*tyy ++ wzz=aaa*uzz+bbb*tzz ++ taux(j)=wxx ++ tauy(j)=wyy ++ tauz(j)=wzz ++ tau2=tau2+wxx*wxx+wyy*wyy+wzz*wzz ++ fpar=fpar+wxx*fxneb(k)+wyy*fyneb(k)+wzz*fzneb(k) ++ kink=kink+txx*uxx+tyy*uyy+tzz*uzz ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=rp2 ++ buffer(2)=rm2 ++ buffer(3)=tau2 ++ buffer(4)=fpar ++ buffer(5)=kink ++ call gdsum(buffer(1),5,buffer(6)) ++ rp2=buffer(1) ++ rm2=buffer(2) ++ tau2=buffer(3) ++ fpar=buffer(4) ++ kink=buffer(5) ++ ++ endif ++ ++c check for kinking of NEB ++ ++ kink=cos(kink/sqrt(rp2*rm2)) ++ if(kink.lt.0.5d0)nkinks=nkinks+1 ++ ++c calculate final forces ++ ++ j=0 ++ k=n*iatm2 ++ tau2=sqrt(tau2) ++ fac=(sprneb*(sqrt(rp2)-sqrt(rm2))-fpar/tau2)/tau2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ k=k+1 ++ fxneb(k)=fxneb(k)+fac*taux(j) ++ fyneb(k)=fyneb(k)+fac*tauy(j) ++ fzneb(k)=fzneb(k)+fac*tauz(j) ++ ++ enddo ++ ++ enddo ++ ++c abort if kinks detected ++ ++ if(nkinks.gt.0)then ++ ++ if(idnode.eq.0) ++ x write(nrite,'(1x,"number of kinks detected ",i6)')nkinks ++ call error(idnode,2350) ++ ++ endif ++ ++ return ++ end subroutine neb_spring_forces ++ ++ subroutine transition_properties ++ x (seek,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons,kmax1, ++ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut,nospl, ++ x nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree, ++ x ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth, ++ x nturn,numbsn,alpha,delr,dlrpot,drewd,elrc,virlrc,epsq, ++ x fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,cfgtmp,cvgerr,estar,catchrad,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for analysing the NEB path and determining ++c the destination state (if not end of chain). ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 seek ++ logical lfcap,lneut,lnsq,loglnk,lzeql,newlst,ltad,scan,same ++ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt ++ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond ++ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,pass ++ integer ntpvdw,ntshl,ntteth,nturn,i,k,n,iatm0,iatm1,iatm2 ++ integer numblock,numbsn,mdiff ++ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter ++ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp ++ real(8) virlrc,cvgerr,estar,catchrad,hyp_units ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++c analyse neb profile ++ ++ call scan_profile(nturn,estar) ++ ++c determine true new state from first maximum ++ ++ if(nturn.gt.1)then ++ ++ i=1 ++ do while(ktrn(i).ge.0) ++ i=i+1 ++ enddo ++ n=-ktrn(i) ++ ++c construct cell vectors for nth bead ++ ++ do i=1,9 ++ cell(i)=celneb(i,n) ++ enddo ++ ++c construct coordinate force arrays for nth bead ++ ++ k=n*iatm2 ++ do i=iatm0,iatm1 ++ ++ k=k+1 ++ xxx(i)=xneb(k) ++ yyy(i)=yneb(k) ++ zzz(i)=zneb(k) ++ ++ enddo ++ ++c now minimise structure - this is correct new state ++ ++ call define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) ++ ++c write events entry for minimisation ++ ++ numblock=nstep/nblock ++ ++ if(idnode.eq.0)then ++ ++ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x cfgtmp/hyp_units,cvgerr/hyp_units ++ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') ++ x nstep,pass,numblock,keytol,opttol/hyp_units, ++ x cfgtmp/hyp_units,cvgerr/hyp_units ++ write(nrite,"(1x,120('-'))") ++ ++ endif ++ ++ if(ltad)then ++ ++c determine differences for new state (TAD only) ++ ++ scan=.true. ++ call check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catchrad) ++ ++c set difference counters and pointers ++ ++ if(numbsn.gt.mxbsn)call error(idnode,2330) ++ ++ ndiff=mdiff ++ ++ if(numbsn.gt.1)then ++ nbsa(numbsn)=nbsb(numbsn-1)+1 ++ else ++ nbsa(numbsn)=1 ++ endif ++ ++ nbsb(numbsn)=mdiff ++ ++c save minimised starting structure as basin file ++ ++ call write_reference_config ++ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode,cfgtmp) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine transition_properties ++ ++ subroutine write_profile(idnode,mxnode,natms,hyp_units) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing profile file for NEB path ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2007 ++c ++c*********************************************************************** ++ ++ character*4 tail ++ integer idnode,mxnode,natms,i,j,k,n,iatm0,iatm1,iatm2 ++ real(8) hyp_units ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ iatm2=iatm1-iatm0+1 ++ ++ if(idnode.eq.0)then ++ ++c open profile data file ++ ++ if(numpro.lt.0)then ++ ++ write(tail,'(i4.4)')iabs(numpro) ++ open(npro,file='PROFILES'//'/'//'PRX'//tail//'.XY', ++ x form='formatted') ++ ++ else ++ ++ write(tail,'(i4.4)')numpro ++ open(npro,file='PROFILES'//'/'//'PRO'//tail//'.XY', ++ x form='formatted') ++ ++ endif ++ ++ endif ++ ++c calculate path ++ ++ path(0)=0.d0 ++ if(idnode.eq.0)write(npro,'(1p,2e14.6)')path(0), ++ x engneb(0)/hyp_units ++ ++ do n=1,mxneb ++ ++ path(n)=0.d0 ++ k=n*iatm2 ++ j=(n-1)*iatm2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ k=k+1 ++ path(n)=(xneb(k)-xneb(j))**2+(yneb(k)-yneb(j))**2+ ++ x (zneb(k)-zneb(j))**2+path(n) ++ ++ enddo ++ ++ if(mxnode.gt.1)call gdsum(path(n),1,buffer(1)) ++ ++ path(n)=sqrt(path(n))+path(n-1) ++ if(idnode.eq.0)write(npro,'(1p,2e14.6)')path(n), ++ x engneb(n)/hyp_units ++ ++ enddo ++ ++ numpro=numpro+1 ++ ++ if(idnode.eq.0)close(npro) ++ ++ return ++ end subroutine write_profile ++ ++ subroutine scan_profile(nturn,estar) ++ ++c********************************************************************* ++c ++c dl_poly routine for analysing neb energy profile ++c ++c copyright - daresbury laboratory ++c author - w.smith january 2007 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer, parameter :: nscan=100 ++ ++ integer i,np,n1,n2,npnts,fail,nturn ++ real(8) di,dj,rpd,uu,vv,v0,ss,estar ++ real(8), allocatable :: aa(:),dd(:),gg(:),zz(:) ++ ++c allocate working arrays ++ ++ allocate (aa(0:mxneb),dd(0:mxneb),gg(0:mxneb),zz(0:mxneb), ++ x stat=fail) ++ ++ npnts=mxneb+1 ++ n1=npnts-1 ++ n2=npnts-2 ++ ++c calculate spline coefficients ++ ++ gg(0)=0.d0 ++ dd(0)=path(1)-path(0) ++ ++ do i=1,n1-1 ++ ++ dd(i)=path(i+1)-path(i) ++ gg(i)=2.d0*(path(i+1)-path(i-1)) ++ zz(i)=6.d0*((engneb(i+1)-engneb(i))/dd(i)- ++ x (engneb(i)-engneb(i-1))/dd(i-1)) ++ ++ enddo ++ ++ gg(n1)=0.d0 ++ dd(n1)=0.d0 ++ aa(0)=0.d0 ++ aa(1)=dd(1)/gg(1) ++ ++ do i=2,n2-1 ++ ++ gg(i)=gg(i)-dd(i-1)*aa(i-1) ++ aa(i)=dd(i)/gg(i) ++ ++ enddo ++ ++ gg(n1-1)=gg(n1-1)-dd(n2-1)*aa(n2-1) ++ gg(1)=zz(1)/gg(1) ++ ++ do i=2,n1-1 ++ gg(i)=(zz(i)-dd(i-1)*gg(i-1))/gg(i) ++ enddo ++ ++ do i=1,n2-1 ++ gg(n1-i)=gg(n1-i)-aa(n1-i)*gg(npnts-i) ++ enddo ++ ++c now scan across the profile locating maxima and minima ++ ++ np=1 ++ nturn=0 ++ ss=1.d0 ++ v0=engneb(0) ++ rpd=(path(npnts-1)-path(0))/dble(nscan) ++ ++ do i=2,nscan-1 ++ ++ uu=rpd*dble(i)+path(0) ++ ++ do while(np.lt.npnts.and.uu.gt.path(np)) ++ np=np+1 ++ enddo ++ ++ di=uu-path(np-1) ++ dj=path(np)-uu ++ vv=(di*engneb(np)+dj*engneb(np-1)-di*dj* ++ x ((dd(np-1)+dj)*gg(np-1)+(dd(np-1)+di)*gg(np))/6.d0)/dd(np-1) ++ ++ if(ss.gt.0.d0.and.vv.le.v0)then ++ ++ nturn=nturn+1 ++ xtrn(nturn)=uu ++ ytrn(nturn)=vv ++ ktrn(nturn)=np ++ ++ else if(ss.lt.0.d0.and.vv.gt.v0)then ++ ++ nturn=nturn+1 ++ xtrn(nturn)=uu ++ ytrn(nturn)=vv ++ ktrn(nturn)=-np ++ ++ endif ++ ++ ss=sign(1.d0,vv-v0) ++ v0=vv ++ ++ enddo ++ ++c estimated activation energy ++ ++ i=1 ++ do while(ktrn(i).lt.0) ++ i=i+1 ++ enddo ++ estar=ytrn(i)-engbsn(1) ++ ++c deallocate working arrays ++ ++ deallocate (aa,dd,gg,zz,stat=fail) ++ ++ return ++ end subroutine scan_profile ++ ++ subroutine transition_time ++ x (seek,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3, ++ x multt,mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntrack,ntpvdw,ntshl,ntteth, ++ x ntcons,itrk,alpha,delr,dlrpot,drewd,elrc,virlrc,epsq, ++ x fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, ++ x tstep,volm,cfgtmp,cvgerr,catchrad,timhop,hyp_units) ++ ++c********************************************************************* ++c ++c dl_poly routine for estimating the time of a transition ++c from a backlog of previous configurations ++c ++c copyright - daresbury laboratory ++c author - w.smith february 2007 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ character*8 seek ++ logical same,minflg,lfcap,lneut,lnsq,loglnk,scan ++ logical lzeql,newlst ++ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol ++ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt ++ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond ++ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter ++ integer ntpvdw,ntshl,ntteth,ntcons,ntrack,itrk,mdiff,pass ++ integer nback,ntry,numblock ++ real(8) alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol ++ real(8) rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep ++ real(8) volm,cfgtmp,cvgerr,eng,tol,catchrad,timhop,hyp_units ++ ++c determine starting tracking file ++ ++ nback=min(numtrk,maxtrk) ++ ++c search track files for transition ++ ++ itrk=0 ++ same=.false. ++ ++ do while(.not.same.and.itrk.le.nback) ++ ++ itrk=itrk+1 ++ ntry=mod(numtrk-itrk,maxtrk) ++ ++ call read_reference_config ++ x ('CFGTRK','TRACKS',ntrk,ntry,natms,imcon,idnode,eng) ++ ++ call define_minimum_state ++ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, ++ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, ++ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, ++ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, ++ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, ++ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, ++ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, ++ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) ++ ++c write events entry for minimisation (normally deactivated) ++ ++c$$$ if(idnode.eq.0)then ++c$$$ ++c$$$ numblock=nstep/nblock ++c$$$ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') ++c$$$ x nstep,pass,numblock,keytol,opttol/hyp_units, ++c$$$ x cfgtmp/hyp_units,cvgerr/hyp_units ++c$$$ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') ++c$$$ x nstep,pass,numblock,keytol,opttol/hyp_units, ++c$$$ x cfgtmp/hyp_units,cvgerr/hyp_units ++c$$$ write(nrite,"(1x,120('-'))") ++c$$$ ++c$$$ endif ++ ++c check if still in base state ++ ++ scan=.false. ++ call check_for_transition ++ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, ++ x catchrad) ++ ++ enddo ++ ++ timhop=timhyp-tstep*dble(ntrack)*(dble(itrk)-0.5d0) ++ tboost=track(ntry) ++ ++ return ++ end subroutine transition_time ++ ++ subroutine scramble_velocities(idnode,natms) ++ ++c*********************************************************************** ++c ++c dlpoly hyperdynamics routine for randomising velocities after a ++c transition has occured (use with identical species only) ++c ++c copyright daresbury laboratory ++c author w.smith jan 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer idnode,natms,i,j,k,m,n ++ real(8) vvv ++ ++ do j=1,10 ++ ++ do i=1,natms ++ ++ k=int(natms*duni())+1 ++ vvv=vxx(i) ++ vxx(i)=vxx(k) ++ vxx(k)=vvv ++ m=int(natms*duni())+1 ++ vvv=vyy(i) ++ vyy(i)=vyy(m) ++ vyy(m)=vvv ++ n=int(natms*duni())+1 ++ vvv=vzz(i) ++ vzz(i)=vzz(n) ++ vzz(n)=vvv ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine scramble_velocities ++ ++ subroutine hyper_close(ltad,idnode,mxnode,natms,nsteql) ++ ++c*********************************************************************** ++c ++c dlpoly routine for saving hyperdynamics restart data ++c ++c copyright daresbury laboratory ++c author w.smith dec 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical ltad ++ integer idnode,mxnode,natms,nsteql ++ integer iatm0,iatm1,i,j,k,n,last,ierr,netdif ++ real(8) buff(2) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c total number of atomic differences ++ ++ buff(1)=dble(ndiff) ++ call gdsum(buff(1),1,buff(2)) ++ netdif=nint(buff(1)) ++ ++ if(idnode.eq.0)then ++ ++c open hyperdynamics restart file ++ ++ open(nhrs,file="HYPREV",form="unformatted") ++ ++c write control variables ++ ++ write(nhrs)ltad,dble(numbsn),dble(numtrk),dble(numpro), ++ x dble(netdif),dble(numdark),dble(nsteql),dble(numbpd), ++ x timhyp,timres,tstop,tkeres,tboost,vbase,strres,celres ++ write(nhrs)track ++ endif ++ ++ if(ltad.and.numbsn.gt.1)then ++ ++c load basin difference data ++ ++ n=0 ++ do i=1,numbsn-1 ++ ++ do j=nbsa(i),nbsb(i) ++ ++ buffer(n+1)=dble(idabsn(j)) ++ buffer(n+2)=dble(i) ++ buffer(n+3)=xdiffs(j) ++ buffer(n+4)=ydiffs(j) ++ buffer(n+5)=zdiffs(j) ++ n=n+5 ++ ++ enddo ++ ++ enddo ++ last=n ++ ++c write basin difference data ++ ++ do k=1,mxnode-1 ++ ++ if(idnode.eq.0)then ++ ++ ++ call csend(hyper_tag+k,buff,1,k,ierr) ++ call crecv(2*hyper_tag+k,buff,1) ++ call crecv(3*hyper_tag+k,buffer(last+1),nint(buff(1))) ++ last=nint(buff(1))+last ++ ++ elseif(k.eq.idnode)then ++ ++ call crecv(hyper_tag+k,buff,1) ++ buff(1)=dble(last) ++ call csend(2*hyper_tag+k,buff,1,0,ierr) ++ call csend(3*hyper_tag+k,buffer,last,0,ierr) ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)write(nhrs)(buffer(i),i=1,last) ++ call gsync() ++ ++ endif ++ ++c load reference block configuration data ++ ++ j=0 ++ k=1 ++ do i=iatm0,iatm1 ++ ++ buffer(j+1)=xres(k) ++ buffer(j+2)=yres(k) ++ buffer(j+3)=zres(k) ++ j=j+3 ++ k=k+1 ++ ++ enddo ++ last=j ++ ++c write reference block configuration data ++ ++ do k=1,mxnode-1 ++ ++ if(idnode.eq.0)then ++ ++ call csend(hyper_tag+k,buff,1,k,ierr) ++ call crecv(2*hyper_tag+k,buff,1) ++ call crecv(3*hyper_tag+k,buffer(last+1),nint(buff(1))) ++ last=nint(buff(1))+last ++ ++ elseif(k.eq.idnode)then ++ ++ call crecv(hyper_tag+k,buff,1) ++ buff(1)=dble(last) ++ call csend(2*hyper_tag+k,buff,1,0,ierr) ++ call csend(3*hyper_tag+k,buffer,last,0,ierr) ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)then ++ ++ write(nhrs)(buffer(i),i=1,last) ++ close(nhrs) ++ ++ endif ++ call gsync() ++ ++ return ++ end subroutine hyper_close ++ ++ subroutine hyper_open(ltad,idnode,mxnode,natms,nsteql) ++ ++c*********************************************************************** ++c ++c dlpoly routine for reading hyperdynamics restart data ++c ++c copyright daresbury laboratory ++c author w.smith dec 2007 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical ltad,mtad ++ integer idnode,mxnode,natms,nsteql ++ integer iatm0,iatm1,i,j,k,n,last,netdif,ierr ++ real(8) buff(1) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c restore control variables ++ ++ mtad=.true. ++ if(idnode.eq.0)then ++ ++c open hyperdynamics restart file ++ ++ open(nhrs,file="HYPOLD",form="unformatted") ++ ++ read(nhrs)mtad,(buffer(i),i=1,30) ++ read(nhrs)track ++ ++ else ++ ++ do i=1,30 ++ buffer(i)=0.d0 ++ enddo ++ track(:)=0.d0 ++ ++ endif ++ ++c check restart file is tad compatible ++ ++ call gstate(mtad) ++ if(ltad.and.(.not.mtad))call error(idnode,2341) ++ ++ call gdsum(buffer(1),31,buffer(32)) ++ ++ numbsn=nint(buffer(1)) ++ numtrk=nint(buffer(2)) ++ numpro=nint(buffer(3)) ++ netdif=nint(buffer(4)) ++ numdark=nint(buffer(5)) ++ nsteql=nint(buffer(6)) ++ numbpd=nint(buffer(7)) ++ timhyp=buffer(8) ++ timres=buffer(9) ++ tstop=buffer(10) ++ tkeres=buffer(11) ++ tboost=buffer(12) ++ vbase=buffer(13) ++ do i=1,9 ++ ++ strres(i)=buffer(i+13) ++ celres(i)=buffer(i+22) ++ ++ enddo ++ last=size(track) ++ call gdsum(track,last,buffer) ++ ++ if(ltad.and.numbsn.gt.1)then ++ ++c restore basin difference data ++ ++ last=5*netdif ++ if(idnode.eq.0)read(nhrs)(buffer(i),i=1,last) ++ ++ do k=1,mxnode-1 ++ ++ if(idnode.eq.0)then ++ ++ call csend(hyper_tag+k,buffer,last,k,ierr) ++ ++ elseif(k.eq.idnode)then ++ ++ call crecv(hyper_tag+k,buffer,last) ++ ++ endif ++ ++ enddo ++ ++c reject nonlocal basin difference data ++ ++ j=0 ++ do i=1,last,5 ++ ++ n=nint(buffer(i)) ++ if(n.ge.iatm0.and.n.le.iatm1)then ++ ++ buffer(j+1)=buffer(i) ++ buffer(j+2)=buffer(i+1) ++ buffer(j+3)=buffer(i+2) ++ buffer(j+4)=buffer(i+3) ++ buffer(j+5)=buffer(i+4) ++ j=j+5 ++ ++ endif ++ ++ enddo ++ last=j ++ ++c unload basin difference data ++ ++ n=0 ++ nbsa(1)=1 ++ do i=1,numbsn-1 ++ ++ if(i.gt.1)nbsa(i)=n+1 ++ ++ do j=1,last,5 ++ ++ if(nint(buffer(j+1)).eq.i)then ++ ++ n=n+1 ++ idabsn(n)=nint(buffer(j)) ++ xdiffs(n)=buffer(j+2) ++ ydiffs(n)=buffer(j+3) ++ zdiffs(n)=buffer(j+4) ++ ++ endif ++ ++ enddo ++ ++ nbsb(i)=n ++ ++ enddo ++ ndiff=n ++ call gsync() ++ ++ endif ++ ++c retrieve reference block configuration data ++ ++ last=3*natms ++ if(idnode.eq.0)read(nhrs)(buffer(i),i=1,last) ++ ++ do k=1,mxnode-1 ++ ++c read reference block configuration data ++ ++ if(idnode.eq.0)then ++ ++ call csend(hyper_tag+k,buffer,last,k,ierr) ++ ++ elseif(k.eq.idnode)then ++ ++ call crecv(hyper_tag+k,buffer,last) ++ ++ endif ++ ++ enddo ++ ++c unload reference block configuration data ++ ++ n=1 ++ j=3*(iatm0-1) ++ do i=iatm0,iatm1 ++ ++ xres(n)=buffer(j+1) ++ yres(n)=buffer(j+2) ++ zres(n)=buffer(j+3) ++ j=j+3 ++ n=n+1 ++ ++ enddo ++ ++ if(idnode.eq.0)close(nhrs) ++ call gsync() ++ ++ return ++ end subroutine hyper_open ++ ++ subroutine bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for scaling forces in a bias potential dynamics ++c simulation using hamelberg, mongan and mccammon factor ++c J. Chem. Phys. 120 (2004) 11919 ++c ++c copyright - daresbury laboratory ++c author - w. smith jan 2008 ++c ++c*********************************************************************** ++ ++ integer i,natms,mynode,keybpd ++ real(8) alpha,vmin,ebias,beta,temp,engcfg,eboost,hscale ++ real(8) engtmp ++ ++ boost=1.d0 ++ numbpd=numbpd+1 ++ ++c reset potential energy wrt base level ++ ++ if(keybpd.eq.1)then ++ engtmp=engcfg-vbase ++ else ++ engtmp=engcfg-engbsn(1) ++ endif ++ ++ if(ebias.gt.engtmp)then ++ ++c bias potental boost ++ ++ alpha=ebias*(ebias-vmin)/vmin ++ beta=1.d0/(boltz*temp*dble(natms)) ++ eboost=(ebias-engtmp)**2/(alpha+ebias-engtmp) ++ boost=exp(beta*eboost) ++ ++c bias potential forces scaling factor ++ ++ hscale=(alpha/(alpha+ebias-engtmp))**2 ++ ++c scale forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxx(i)*hscale ++ fyy(i)=fyy(i)*hscale ++ fzz(i)=fzz(i)*hscale ++ ++ enddo ++ ++ endif ++ ++c accumulative average of boost factor ++ ++ tboost=boost/dble(numbpd)+dble(numbpd-1)*tboost/dble(numbpd) ++ ++ return ++ end subroutine bpd_forces ++ ++ end module hyper_dynamics_module +diff -urN dl_class_1.9.orig/srcmod/integrator_module.f dl_class_1.9/srcmod/integrator_module.f +--- dl_class_1.9.orig/srcmod/integrator_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/integrator_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,624 @@ ++ module integrator_module ++ ++c*********************************************************************** ++c ++c dl_poly module for selecting verlet integration schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use error_module ++ use lf_motion_module ++ use lf_rotation1_module ++ use lf_rotation2_module ++ use pmf_module ++ use temp_scalers_module ++ use vv_motion_module ++ use vv_rotation1_module ++ use vv_rotation2_module ++ ++ contains ++ ++ subroutine lf_integrate ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the integration algorithm ++c to solve the the equations of motion. based on the leapfrog ++c verlet algorithm ++c ++c copyright - daresbury laboratory ++c author - w. smith december 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,safep,safeq,lcnb,lshmov,lnfic ++ integer idnode,mxnode,imcon,natms,ngrp,keyens,nscons,nofic ++ integer ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nstep ++ real(8) tstep,engke,engrot,tolnce,quattol,vircon,vircom ++ real(8) virtot,temp,press,volm,sigma,taut,taup,chit,chip ++ real(8) consv,conint,elrc,virlrc,virpmf ++ ++ safe=.true. ++ safeq=.true. ++ safep=.true. ++ ++ if(ngrp.eq.0) then ++ ++ if(keyens.eq.0) then ++ ++c verlet leapfrog ++ ++ call nve_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,tolnce,tstep,vircon) ++ ++ else if(keyens.eq.1) then ++ ++c Evans Gaussian Temperature constraints ++ ++ call nvt_e1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,tolnce,tstep,vircon) ++ ++ else if(keyens.eq.2) then ++ ++c Berendsen thermostat ++ ++ call nvt_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,taut,sigma,tolnce,tstep,vircon) ++ ++ else if(keyens.eq.3) then ++ ++c Nose-Hoover thermostat ++ ++ call nvt_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon) ++ ++ elseif(keyens.eq.4) then ++ ++c Berendsen thermostat and isotropic barostat ++ ++ call npt_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, ++ x tstep,virtot,vircon,volm) ++ ++ else if(keyens.eq.5) then ++ ++c Nose-Hoover thermostat and isotropic barostat ++ ++ call npt_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,chip,chit,conint,consv,elrc,engke,virlrc,press, ++ x taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm) ++ ++ else if(keyens.eq.6) then ++ ++c Berendsen thermostat and barostat (cell shape varying) ++ ++ call nst_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,mode,elrc,engke,virlrc,press,taup,taut,sigma, ++ x tolnce,tstep,vircon,volm) ++ ++ else if(keyens.eq.7) then ++ ++c Nose-Hoover thermostat and barostat (cell shape varying) ++ ++ call nst_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,mode,chit,conint,consv,elrc,engke,virlrc,press, ++ x taup,taut,sigma,temp,tolnce,tstep,vircon,volm) ++ ++ elseif(keyens.eq.8) then ++ ++c Potential of mean force in NVE ++ ++ call pmflf ++ x (safe,safep,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) ++ ++ endif ++ ++ elseif(ngrp.gt.0) then ++ ++c apply rigid body equations of motion ++ ++ if(keyens.eq.0) then ++ ++ if(.not.lcnb) then ++ ++ call nveq_1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon) ++ ++ else ++ ++ call nveq_2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon) ++ ++ endif ++ ++ elseif(keyens.eq.1) then ++ ++c invalid option ++ ++ call error(idnode,430) ++ ++ elseif(keyens.eq.2) then ++ ++ if(.not.lcnb) then ++ ++ call nvtq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, ++ x tstep,vircom,vircon) ++ ++ else ++ ++ call nvtq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, ++ x tstep,vircom,vircon) ++ ++ endif ++ ++ elseif(keyens.eq.3) then ++ ++ if(.not.lcnb) then ++ ++ call nvtq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,chit,consv,conint,engke,engrot,quattol, ++ x sigma,taut,tolnce,tstep,vircom,vircon) ++ ++ else ++ ++ call nvtq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,conint,consv,chit,engke,engrot,quattol, ++ x sigma,taut,tolnce,tstep,vircom,vircon) ++ ++ endif ++ ++ elseif(keyens.eq.4) then ++ ++ if(.not.lcnb) then ++ ++ call nptq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,virtot,vircom, ++ x vircon,volm) ++ ++ else ++ ++ call nptq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon, ++ x virtot,volm) ++ ++ endif ++ ++ elseif(keyens.eq.5) then ++ ++ if(.not.lcnb) then ++ ++ call nptq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,virtot,vircom,vircon,volm) ++ ++ else ++ ++ call nptq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,vircom,vircon,virtot,volm) ++ ++ endif ++ ++ elseif(keyens.eq.6) then ++ ++ if(.not.lcnb) then ++ ++ call nstq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) ++ ++ else ++ ++ call nstq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) ++ ++ endif ++ ++ elseif(keyens.eq.7) then ++ ++ if(.not.lcnb) then ++ ++ call nstq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,vircom,vircon,volm) ++ ++ else ++ ++ call nstq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,vircom,vircon,volm) ++ ++ endif ++ ++ else ++ ++c invalid option ++ ++ call error(idnode,430) ++ ++ endif ++ ++ endif ++ ++c check on convergence of pmf-shake ++ ++ if(ntpmf.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safep) ++ if(.not.safep) call error(idnode,438) ++ ++ endif ++ ++c check on convergence of shake ++ ++ if(ntcons.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,105) ++ ++ endif ++ ++c check on convergence of quaternion algorithm ++ ++ if(ngrp.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safeq) ++ if(.not.safeq) call error(idnode,321) ++ ++ endif ++ ++c eliminate "flying ice cube" in long simulations (Berendsen) ++ ++ if(lnfic.and.(keyens.eq.2.or.keyens.eq.4.or.keyens.eq.6))then ++ ++ if(mod(nstep,nofic).eq.0)then ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine lf_integrate ++ ++ subroutine vv_integrate ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint,elrc, ++ x virlrc,virpmf,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for selecting the integration algorithm ++c to solve the the equations of motion. based on the velocity ++c verlet algorithm ++c ++c copyright - daresbury laboratory ++c author - w. smith february 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,safep,lcnb,lshmov,lnfic ++ integer isw,idnode,mxnode,imcon,natms,ngrp,keyens,nscons ++ integer ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nstep,nofic ++ integer ntshl,keyshl ++ real(8) tstep,engke,engrot,tolnce,vircon,vircom ++ real(8) virtot,temp,press,volm,sigma,taut,taup,chit,chip ++ real(8) consv,conint,elrc,virlrc,virpmf,chit_shl,sigma_shl ++ ++ if(ngrp.eq.0) then ++ ++ if(keyens.eq.0) then ++ ++c verlet leapfrog ++ ++ call nvevv_1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,tstep,engke,tolnce,vircon) ++ ++ else if(keyens.eq.1) then ++ ++c Evans Gaussian Temperature constraints ++ ++ call nvtvv_e1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,tstep,engke,tolnce,vircon) ++ ++ else if(keyens.eq.2) then ++ ++c Berendsen thermostat ++ ++ call nvtvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,tstep,taut,sigma,engke,tolnce,vircon) ++ ++ else if(keyens.eq.3) then ++ ++c Nose-Hoover thermostat ++ ++ call nvtvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntshl,keyshl,tstep,taut,sigma,chit,consv, ++ x conint,engke,tolnce,vircon,chit_shl,sigma_shl) ++ ++ elseif(keyens.eq.4) then ++ ++c Berendsen thermostat and isotropic barostat ++ ++ call nptvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,tstep,taut,taup,sigma,engke,press,elrc, ++ x virlrc,tolnce,virtot,vircon,volm) ++ ++ else if(keyens.eq.5) then ++ ++c Nose-Hoover thermostat and isotropic barostat ++ ++ call nptvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,ntshl,keyshl,tstep,taut,taup,sigma,temp, ++ x chip,chit,consv,conint,engke,elrc,tolnce,vircon, ++ x virtot,virlrc,volm,press,chit_shl,sigma_shl) ++ ++ else if(keyens.eq.6) then ++ ++c Berendsen thermostat and barostat (cell shape varying) ++ ++ call nstvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,mode,tstep,taut,taup,sigma,engke,press, ++ x elrc,virlrc,tolnce,vircon,volm) ++ ++ else if(keyens.eq.7) then ++ ++c Nose-Hoover thermostat and barostat (cell shape varying) ++ ++ call nstvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,mode,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chit,consv,conint,engke,elrc,tolnce,vircon, ++ x virlrc,volm,press,chit_shl,sigma_shl) ++ ++ elseif(keyens.eq.8) then ++ ++c Potential of mean force in NVE ++ ++ call pmfvv ++ x (safe,safep,lshmov,isw,idnode,mxnode,imcon,natms,nscons, ++ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) ++ ++ endif ++ ++ elseif(ngrp.gt.0) then ++ ++c apply rigid body equations of motion ++ ++ if(keyens.eq.0) then ++ ++ if(.not.lcnb) then ++ ++ call nveqvv_1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) ++ ++ else ++ ++ call nveqvv_2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) ++ ++ endif ++ ++ elseif(keyens.eq.1) then ++ ++c invalid option ++ ++ call error(idnode,430) ++ ++ elseif(keyens.eq.2) then ++ ++ if(.not.lcnb) then ++ ++ call nvtqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, ++ x vircom,vircon) ++ ++ else ++ ++ call nvtqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, ++ x vircom,vircon) ++ ++ endif ++ ++ elseif(keyens.eq.3) then ++ ++ if(.not.lcnb) then ++ ++ call nvtqvv_h1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke, ++ x engrot,taut,sigma,tolnce,tstep,vircom,vircon,chit_shl, ++ x sigma_shl) ++ ++ else ++ ++ call nvtqvv_h2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke, ++ x engrot,taut,sigma,tolnce,tstep,vircom,vircon,chit_shl, ++ x sigma_shl) ++ ++ endif ++ ++ elseif(keyens.eq.4) then ++ ++ if(.not.lcnb) then ++ ++ call nptqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) ++ ++ else ++ ++ call nptqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) ++ ++ endif ++ ++ elseif(keyens.eq.5) then ++ ++ if(.not.lcnb) then ++ ++ call nptqvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircon,virtot,virlrc,vircom,volm,press,chit_shl, ++ x sigma_shl) ++ ++ else ++ ++ call nptqvv_h2 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircom,vircon,virtot,virlrc,volm,press,chit_shl, ++ x sigma_shl) ++ ++ endif ++ ++ elseif(keyens.eq.6) then ++ ++ if(.not.lcnb) then ++ ++ call nstqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup, ++ x sigma,tolnce,tstep,vircom,vircon,elrc,virlrc,volm) ++ ++ else ++ ++ call nstqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup, ++ x sigma,tolnce,tstep,vircom,vircon,elrc,virlrc,volm) ++ ++ endif ++ ++ elseif(keyens.eq.7) then ++ ++ if(.not.lcnb) then ++ ++ call nstqvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, ++ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircon,virlrc,vircom,volm,press,chit_shl,sigma_shl) ++ ++ else ++ ++ call nstqvv_h2 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, ++ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircom,vircon,virlrc,volm,press,chit_shl,sigma_shl) ++ ++ endif ++ ++ else ++ ++c invalid option ++ ++ call error(idnode,430) ++ ++ endif ++ ++ endif ++ ++c check on convergence of pmf-shake ++ ++ if(ntpmf.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safep) ++ if(.not.safep) call error(idnode,438) ++ ++ endif ++ ++c check on convergence of shake ++ ++ if(ntcons.gt.0) then ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,105) ++ ++ endif ++ ++c eliminate "flying ice cube" in long simulations (Berendsen) ++ ++ if(lnfic.and.(keyens.eq.2.or.keyens.eq.4.or.keyens.eq.6))then ++ ++ if(mod(nstep,nofic).eq.0)then ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine vv_integrate ++ ++ end module integrator_module +diff -urN dl_class_1.9.orig/srcmod/inversion_module.f dl_class_1.9/srcmod/inversion_module.f +--- dl_class_1.9.orig/srcmod/inversion_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/inversion_module.f 2011-08-16 14:42:52.000000000 +0200 +@@ -0,0 +1,828 @@ ++ module inversion_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining inversion potential arrays ++c copyright - daresbury laboratory ++c ++c author - w. smith sep 2003 ++c adapted - w. smith jun 2008 : solvation, free energy, excitation ++c adapted - w. smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use solvation_module ++ ++ implicit none ++ ++ real(8), allocatable :: prminv(:,:) ++ integer, allocatable :: listinv(:,:) ++ integer, allocatable :: numinv(:),keyinv(:),lstinv(:,:) ++ ++ save prminv,listinv,numinv,keyinv,lstinv ++ ++ contains ++ ++ subroutine alloc_inv_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(5) ++ ++ do i=1,5 ++ fail(i)=0 ++ enddo ++ ++ allocate (prminv(mxtinv,mxpinv),stat=fail(1)) ++ allocate (numinv(mxtmls),stat=fail(2)) ++ allocate (keyinv(mxtinv),stat=fail(3)) ++ allocate (lstinv(mxtinv,4),stat=fail(4)) ++ allocate (listinv(mxinv,5),stat=fail(5)) ++ ++ do i=1,5 ++ if(fail(i).gt.0)call error(idnode,1120) ++ enddo ++ ++ do i=1,mxtmls ++ numinv(i)=0 ++ enddo ++ ++ end subroutine alloc_inv_arrays ++ ++ subroutine define_inversions ++ x (safe,idnode,itmols,ninver,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining inversion angle potentials ++c note: includes calcite planar potential which is not strictly ++c an inversion potential and is different in implementation ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ integer idnode,itmols,ninver,nsite,ntmp,inv,inv1,i ++ integer iatm1,iatm2,iatm3,iatm4,isite1,isite2,isite3,isite4 ++ integer ia,ja,idum ++ real(8) engunit ++ ++ ntmp=intstr(record,lenrec,idum) ++ numinv(itmols)=numinv(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of inversion terms', ++ x 6x,i10)")ntmp ++ write(nrite,"(/,/,1x,'inversion potential details:', ++ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, ++ x 'index',5x,'index',5x,'f-const',7x,'angle',/)") ++ endif ++ ++ inv1=numinv(itmols) ++ do inv=1,inv1 ++ ++c read inversion potential parameters ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ iatm1=intstr(record,lenrec,idum) ++ iatm2=intstr(record,lenrec,idum) ++ iatm3=intstr(record,lenrec,idum) ++ iatm4=intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ isite2=nsite-numsit(itmols)+iatm2 ++ isite3=nsite-numsit(itmols)+iatm3 ++ isite4=nsite-numsit(itmols)+iatm4 ++ ++ if(lfzsit(isite1)*lfzsit(isite2)* ++ x lfzsit(isite3)*lfzsit(isite4).ne.0)then ++ ++ numinv(itmols)=numinv(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ ninver=ninver+1 ++ ++ if(ninver.gt.mxtinv)call error(idnode,73) ++ ++ if(keyword(1:4).eq.'harm')then ++ keyinv(ninver)=1 ++ elseif(keyword(1:4).eq.'hcos')then ++ keyinv(ninver)=2 ++ elseif(keyword(1:4).eq.'plan')then ++ keyinv(ninver)=3 ++ elseif(keyword(1:4).eq.'calc')then ++ keyinv(ninver)=4 ++ else ++ if(idnode.eq.0)write(nrite,*)record ++ call error(idnode,449) ++ endif ++ ++ lstinv(ninver,1)=iatm1 ++ lstinv(ninver,2)=iatm2 ++ lstinv(ninver,3)=iatm3 ++ lstinv(ninver,4)=iatm4 ++ prminv(ninver,1)=dblstr(record,lenrec,idum) ++ prminv(ninver,2)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,4i10,1p,e12.4,0p,9f12.6)") ++ x keyword(1:4),(lstinv(ninver,ia),ia=1,4), ++ x (prminv(ninver,ja),ja=1,mxpinv) ++ ++c convert energies to internal units and angles to radians ++ ++ prminv(ninver,1)=prminv(ninver,1)*engunit ++ ++ if(keyinv(ninver).eq.2)then ++ ++ prminv(ninver,2)=cos(prminv(ninver,2)*(pi/180.d0)) ++ ++ elseif(keyinv(ninver).eq.4)then ++ ++ prminv(ninver,2)=prminv(ninver,2)*engunit ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_inversions ++ ++ subroutine invfrc ++ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntinv,enginv,virinv) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating inversion energy and force ++c terms in molecular dynamics. ++c ++c copyright - daresbury laboratory 1996 ++c author - w. smith may 1996 ++c modified - w.smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect,lcalcite ++ logical idrive,jdrive,kdrive,ldrive ++ integer idnode,imcon,mxnode,ntinv,fail1,fail2 ++ integer fail3,inv1,inv2,i,ii,ia,id,kk,ib,ic ++ real(8) strs(6),strs_loc(6) ++ real(8) xab,yab,zab,rab2,rrab,xac,yac,zac,rac2,rrac,xad,yad ++ real(8) zad,rad2,rrad,rbc,rcd,rdb,ubx,uby,ubz,ubn,rub,vbx ++ real(8) vby,vbz,rvb,wwb,ucx,ucy,ucz,ucn,vcx,vcy,vcz,rvc,wwc ++ real(8) udx,udy,udz,udn,vdx,vdy,vdz,vdn,rvd,wwd,cosb,cosc ++ real(8) cosd,thb,thc,thd,gamb,gamc,gamd,rubc,rubd,rucd,rucb ++ real(8) rudb,rudc,rvbc,rvbd,rvcd,rvcb,rvdb,rvdc,fax,fay,faz ++ real(8) fbx,fby,fbz,fcx,fcy,fcz,fdx,fdy,fdz,vbn,vcn,ruc,rud ++ real(8) uuu,uu2,uun,uux,uuy,uuz,enginv,virinv,omega,gamma ++ real(8) gamvir ++ ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ real(8), allocatable :: xdac(:),ydac(:),zdac(:) ++ real(8), allocatable :: xdad(:),ydad(:),zdad(:) ++ ++ data fail1,fail2,fail3/0,0,0/ ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) ++ allocate (xdac(msbad),ydac(msbad),zdac(msbad),stat=fail2) ++ allocate (xdad(msbad),ydad(msbad),zdad(msbad),stat=fail3) ++ if(fail1.ne.0.or.fail2.ne.0.or.fail3.ne.0) ++ x call error(idnode,1130) ++ ++c check size of work arrays ++ ++ if((ntinv-mxnode+1)/mxnode.gt.msbad)call error(idnode,427) ++ ++c block indices ++ ++ inv1=(idnode*ntinv)/mxnode+1 ++ inv2=((idnode+1)*ntinv)/mxnode ++ ++ safe=.true. ++ ++c initialise accumulators ++ ++ enginv=0.d0 ++ virinv=0.d0 ++ inv_fre=0.d0 ++ inv_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(4)=.true. ++ inv_sol(:)=0.d0 ++ if(lexcite)inv_exc(:)=0.d0 ++ ++ endif ++ ++c calculate bond vectors ++ ++ ii=0 ++ do i=inv1,inv2 ++ ++ ii=ii+1 ++ ++c potential energy function type ++ ++ kk=listinv(ii,1) ++ ++c indices of bonded atoms ++ ++ ia=listinv(ii,2) ++ ib=listinv(ii,3) ++ ic=listinv(ii,4) ++ id=listinv(ii,5) ++ ++c define components of bond vectors ++ ++ xdab(ii)=xxx(ib)-xxx(ia) ++ ydab(ii)=yyy(ib)-yyy(ia) ++ zdab(ii)=zzz(ib)-zzz(ia) ++ ++ if(keyinv(kk).eq.4)then ++ ++ xdac(ii)=xxx(ic)-xxx(ib) ++ ydac(ii)=yyy(ic)-yyy(ib) ++ zdac(ii)=zzz(ic)-zzz(ib) ++ ++ xdad(ii)=xxx(id)-xxx(ib) ++ ydad(ii)=yyy(id)-yyy(ib) ++ zdad(ii)=zzz(id)-zzz(ib) ++ ++ else ++ ++ xdac(ii)=xxx(ic)-xxx(ia) ++ ydac(ii)=yyy(ic)-yyy(ia) ++ zdac(ii)=zzz(ic)-zzz(ia) ++ ++ xdad(ii)=xxx(id)-xxx(ia) ++ ydad(ii)=yyy(id)-yyy(ia) ++ zdad(ii)=zzz(id)-zzz(ia) ++ ++ endif ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ call images(imcon,0,1,ii,cell,xdac,ydac,zdac) ++ call images(imcon,0,1,ii,cell,xdad,ydad,zdad) ++ ++c loop over all specified inversions ++ ++ ii=0 ++ do i=inv1,inv2 ++ ++ ii=ii+1 ++ ++c select potential energy function type ++ ++ kk=listinv(ii,1) ++ lcalcite=(keyinv(kk).eq.4) ++ ++c define components of bond vectors ++ ++ xab=xdab(ii) ++ yab=ydab(ii) ++ zab=zdab(ii) ++ rab2=xab*xab+yab*yab+zab*zab ++ rrab=1.d0/sqrt(rab2) ++ ++ xac=xdac(ii) ++ yac=ydac(ii) ++ zac=zdac(ii) ++ rac2=xac*xac+yac*yac+zac*zac ++ rrac=1.d0/sqrt(rac2) ++ ++ xad=xdad(ii) ++ yad=ydad(ii) ++ zad=zdad(ii) ++ rad2=xad*xad+yad*yad+zad*zad ++ rrad=1.d0/sqrt(rad2) ++ ++ if(lcalcite)then ++ ++c calculate vector normal to plane ++ ++ uux=yac*zad-zac*yad ++ uuy=zac*xad-xac*zad ++ uuz=xac*yad-yac*xad ++ uun=1.d0/sqrt(uux**2+uuy**2+uuz**2) ++ uux=uun*uux ++ uuy=uun*uuy ++ uuz=uun*uuz ++ uuu=xab*uux+yab*uuy+zab*uuz ++ ++ else ++ ++c scalar products of bond vectors ++ ++ rbc=xab*xac+yab*yac+zab*zac ++ rcd=xac*xad+yac*yad+zac*zad ++ rdb=xad*xab+yad*yab+zad*zab ++ ++c calculate bond-angle-plane vectors ++ ++ ubx=xac*rrac+xad*rrad ++ uby=yac*rrac+yad*rrad ++ ubz=zac*rrac+zad*rrad ++ ubn=1.d0/sqrt(ubx**2+uby**2+ubz**2) ++ ubx=ubn*ubx ++ uby=ubn*uby ++ ubz=ubn*ubz ++ rub=xab*ubx+yab*uby+zab*ubz ++ ++ vbx=xac*rrac-xad*rrad ++ vby=yac*rrac-yad*rrad ++ vbz=zac*rrac-zad*rrad ++ vbn=1.d0/sqrt(vbx**2+vby**2+vbz**2) ++ vbx=vbn*vbx ++ vby=vbn*vby ++ vbz=vbn*vbz ++ rvb=xab*vbx+yab*vby+zab*vbz ++ wwb=sqrt(rub**2+rvb**2) ++ ++ ucx=xad*rrad+xab*rrab ++ ucy=yad*rrad+yab*rrab ++ ucz=zad*rrad+zab*rrab ++ ucn=1.d0/sqrt(ucx**2+ucy**2+ucz**2) ++ ucx=ucn*ucx ++ ucy=ucn*ucy ++ ucz=ucn*ucz ++ ruc=xac*ucx+yac*ucy+zac*ucz ++ ++ vcx=xad*rrad-xab*rrab ++ vcy=yad*rrad-yab*rrab ++ vcz=zad*rrad-zab*rrab ++ vcn=1.d0/sqrt(vcx**2+vcy**2+vcz**2) ++ vcx=vcn*vcx ++ vcy=vcn*vcy ++ vcz=vcn*vcz ++ rvc=xac*vcx+yac*vcy+zac*vcz ++ wwc=sqrt(ruc**2+rvc**2) ++ ++ udx=xab*rrab+xac*rrac ++ udy=yab*rrab+yac*rrac ++ udz=zab*rrab+zac*rrac ++ udn=1.d0/sqrt(udx**2+udy**2+udz**2) ++ udx=udn*udx ++ udy=udn*udy ++ udz=udn*udz ++ rud=xad*udx+yad*udy+zad*udz ++ ++ vdx=xab*rrab-xac*rrac ++ vdy=yab*rrab-yac*rrac ++ vdz=zab*rrab-zac*rrac ++ vdn=1.d0/sqrt(vdx**2+vdy**2+vdz**2) ++ vdx=vdn*vdx ++ vdy=vdn*vdy ++ vdz=vdn*vdz ++ rvd=xad*vdx+yad*vdy+zad*vdz ++ wwd=sqrt(rud**2+rvd**2) ++ ++c calculate inversion angle cosines ++ ++ cosb=wwb*rrab ++ cosc=wwc*rrac ++ cosd=wwd*rrad ++ ++ endif ++ ++c calculate potential energy and scalar force term ++ ++ if(keyinv(kk).eq.1)then ++ ++c key=1 for harmonic inversion potential ++ ++ thb=acos(cosb) ++ thc=acos(cosc) ++ thd=acos(cosd) ++ omega=0.5d0*prminv(kk,1)*((thb-prminv(kk,2))**2+ ++ x (thc-prminv(kk,2))**2+(thd-prminv(kk,2))**2)/3.d0 ++ gamvir=0.d0 ++ ++ gamb=0.d0 ++ if(abs(thb).gt.1.d-12) ++ x gamb=prminv(kk,1)*(thb-prminv(kk,2))/(3.d0*sin(thb)) ++ gamc=0.d0 ++ if(abs(thc).gt.1.d-12) ++ x gamc=prminv(kk,1)*(thc-prminv(kk,2))/(3.d0*sin(thc)) ++ gamd=0.d0 ++ if(abs(thd).gt.1.d-12) ++ x gamd=prminv(kk,1)*(thd-prminv(kk,2))/(3.d0*sin(thd)) ++ ++ else if(keyinv(kk).eq.2)then ++ ++c key=2 for harmonic cosine inversion potential ++ ++ omega=0.5d0*prminv(kk,1)*((cosb-prminv(kk,2))**2+ ++ x (cosc-prminv(kk,2))**2+(cosb-prminv(kk,2))**2)/3.d0 ++ gamvir=0.d0 ++ ++ gamb=-prminv(kk,1)*(cosb-prminv(kk,2))/3.d0 ++ gamc=-prminv(kk,1)*(cosc-prminv(kk,2))/3.d0 ++ gamd=-prminv(kk,1)*(cosd-prminv(kk,2))/3.d0 ++ ++ else if(keyinv(kk).eq.3)then ++ ++c key=3 for planar inversion potentials ++ ++ omega=prminv(kk,1)*((1.d0-cosb)+(1.d0-cosc)+(1.d0-cosd))/3.d0 ++ gamvir=0.d0 ++ ++ gamb=prminv(kk,1)/3.d0 ++ gamc=prminv(kk,1)/3.d0 ++ gamd=prminv(kk,1)/3.d0 ++ ++ else if(keyinv(kk).eq.4)then ++ ++c key=4 for planar calcite potential ++ ++ uu2=uuu*uuu ++ omega=uu2*(prminv(kk,1)+prminv(kk,2)*uu2) ++ gamvir=uu2*(2.d0*prminv(kk,1)+4.d0*prminv(kk,2)*uu2) ++ gamma=-uuu*(2.d0*prminv(kk,1)+4.d0*prminv(kk,2)*uu2) ++ ++ else ++ ++c undefined potential ++ ++ safe=.false. ++ gamvir=0.d0 ++ gamb=0.d0 ++ gamc=0.d0 ++ gamd=0.d0 ++ ++ endif ++ ++c indices of bonded atoms ++ ++ ia=listinv(ii,2) ++ ib=listinv(ii,3) ++ ic=listinv(ii,4) ++ id=listinv(ii,5) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ kdrive=driven(ltype(ic)) ++ ldrive=driven(ltype(id)) ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. ++ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ ++ x atm_fre(id).eq.0) ++ ++ if(lsolva)then ++ inv_exc(atmolt(ia))=inv_exc(atmolt(ia))+omega ++ endif ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. ++ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ inv_fre=inv_fre-omega ++ omega=lambda1*omega ++ gamb=lambda1*gamb ++ gamc=lambda1*gamc ++ gamd=lambda1*gamd ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. ++ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ inv_fre=inv_fre+omega ++ omega=lambda2*omega ++ gamb=lambda2*gamb ++ gamc=lambda2*gamc ++ gamd=lambda2*gamd ++ ++ endif ++ ++ endif ++ ++c calculate bond and u,v scalar products ++ ++ if(.not.lcalcite)then ++ ++ rubc=xab*ucx+yab*ucy+zab*ucz ++ rubd=xab*udx+yab*udy+zab*udz ++ rucd=xac*udx+yac*udy+zac*udz ++ rucb=xac*ubx+yac*uby+zac*ubz ++ rudb=xad*ubx+yad*uby+zad*ubz ++ rudc=xad*ucx+yad*ucy+zad*ucz ++ ++ rvbc=xab*vcx+yab*vcy+zab*vcz ++ rvbd=xab*vdx+yab*vdy+zab*vdz ++ rvcd=xac*vdx+yac*vdy+zac*vdz ++ rvcb=xac*vbx+yac*vby+zac*vbz ++ rvdb=xad*vbx+yad*vby+zad*vbz ++ rvdc=xad*vcx+yad*vcy+zad*vcz ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ enginv=enginv+omega ++ virinv=virinv+gamvir ++ ++c calculate solvation energy ++ ++ if(lsolva)then ++ inv_sol(atmolt(ia))=inv_sol(atmolt(ia))+omega ++ endif ++ ++c calculate atomic forces ++ ++ if(lcalcite)then ++ ++ fax=-gamma*uux ++ fay=-gamma*uuy ++ faz=-gamma*uuz ++ ++ fcx=gamma*uun*((yad*zab-zad*yab)-uuu*(yad*uuz-zad*uuy)) ++ fcy=gamma*uun*((zad*xab-xad*zab)-uuu*(zad*uux-xad*uuz)) ++ fcz=gamma*uun*((xad*yab-yad*xab)-uuu*(xad*uuy-yad*uux)) ++ ++ fdx=gamma*uun*((yab*zac-zab*yac)-uuu*(zac*uuy-yac*uuz)) ++ fdy=gamma*uun*((zab*xac-xab*zac)-uuu*(xac*uuz-zac*uux)) ++ fdz=gamma*uun*((xab*yac-yab*xac)-uuu*(yac*uux-xac*uuy)) ++ ++ fbx=-(fax+fcx+fdx) ++ fby=-(fay+fcy+fdy) ++ fbz=-(faz+fcz+fdz) ++ ++c stress tensor calculation for calcite terms ++ ++ strs(1)=strs(1)+uuu*gamma*uux*uux ++ strs(2)=strs(2)+uuu*gamma*uux*uuy ++ strs(3)=strs(3)+uuu*gamma*uux*uuz ++ strs(4)=strs(4)+uuu*gamma*uuy*uuy ++ strs(5)=strs(5)+uuu*gamma*uuy*uuz ++ strs(6)=strs(6)+uuu*gamma*uuz*uuz ++ ++ else ++ ++ fbx=gamb*(-cosb*xab*rrab**2+rrab*(rub*ubx+rvb*vbx)/wwb) ++ x +(ruc*ucn*rrab*(xac-ruc*ucx-(rbc-ruc*rubc)*xab*rrab**2) ++ x -rvc*vcn*rrab*(xac-rvc*vcx-(rbc-rvc*rvbc)*xab*rrab**2)) ++ x *gamc*rrac/wwc ++ x +(rud*udn*rrab*(xad-rud*udx-(rdb-rud*rubd)*xab*rrab**2) ++ x +rvd*vdn*rrab*(xad-rvd*vdx-(rdb-rvd*rvbd)*xab*rrab**2)) ++ x *gamd*rrad/wwd ++ ++ fby=gamb*(-cosb*yab*rrab**2+rrab*(rub*uby+rvb*vby)/wwb) ++ x +(ruc*ucn*rrab*(yac-ruc*ucy-(rbc-ruc*rubc)*yab*rrab**2) ++ x -rvc*vcn*rrab*(yac-rvc*vcy-(rbc-rvc*rvbc)*yab*rrab**2)) ++ x *gamc*rrac/wwc ++ x +(rud*udn*rrab*(yad-rud*udy-(rdb-rud*rubd)*yab*rrab**2) ++ x +rvd*vdn*rrab*(yad-rvd*vdy-(rdb-rvd*rvbd)*yab*rrab**2)) ++ x *gamd*rrad/wwd ++ ++ fbz=gamb*(-cosb*zab*rrab**2+rrab*(rub*ubz+rvb*vbz)/wwb) ++ x +(ruc*ucn*rrab*(zac-ruc*ucz-(rbc-ruc*rubc)*zab*rrab**2) ++ x -rvc*vcn*rrab*(zac-rvc*vcz-(rbc-rvc*rvbc)*zab*rrab**2)) ++ x *gamc*rrac/wwc ++ x +(rud*udn*rrab*(zad-rud*udz-(rdb-rud*rubd)*zab*rrab**2) ++ x +rvd*vdn*rrab*(zad-rvd*vdz-(rdb-rvd*rvbd)*zab*rrab**2)) ++ x *gamd*rrad/wwd ++ ++ fcx=gamc*(-cosc*xac*rrac**2+rrac*(ruc*ucx+rvc*vcx)/wwc) ++ x +(rud*udn*rrac*(xad-rud*udx-(rcd-rud*rucd)*xac*rrac**2) ++ x -rvd*vdn*rrac*(xad-rvd*vdx-(rcd-rvd*rvcd)*xac*rrac**2)) ++ x *gamd*rrad/wwd ++ x +(rub*ubn*rrac*(xab-rub*ubx-(rbc-rub*rucb)*xac*rrac**2) ++ x +rvb*vbn*rrac*(xab-rvb*vbx-(rbc-rvb*rvcb)*xac*rrac**2)) ++ x *gamb*rrab/wwb ++ ++ fcy=gamc*(-cosc*yac*rrac**2+rrac*(ruc*ucy+rvc*vcy)/wwc) ++ x +(rud*udn*rrac*(yad-rud*udy-(rcd-rud*rucd)*yac*rrac**2) ++ x -rvd*vdn*rrac*(yad-rvd*vdy-(rcd-rvd*rvcd)*yac*rrac**2)) ++ x *gamd*rrad/wwd ++ x +(rub*ubn*rrac*(yab-rub*uby-(rbc-rub*rucb)*yac*rrac**2) ++ x +rvb*vbn*rrac*(yab-rvb*vby-(rbc-rvb*rvcb)*yac*rrac**2)) ++ x *gamb*rrab/wwb ++ ++ fcz=gamc*(-cosc*zac*rrac**2+rrac*(ruc*ucz+rvc*vcz)/wwc) ++ x +(rud*udn*rrac*(zad-rud*udz-(rcd-rud*rucd)*zac*rrac**2) ++ x -rvd*vdn*rrac*(zad-rvd*vdz-(rcd-rvd*rvcd)*zac*rrac**2)) ++ x *gamd*rrad/wwd ++ x +(rub*ubn*rrac*(zab-rub*ubz-(rbc-rub*rucb)*zac*rrac**2) ++ x +rvb*vbn*rrac*(zab-rvb*vbz-(rbc-rvb*rvcb)*zac*rrac**2)) ++ x *gamb*rrab/wwb ++ ++ fdx=gamd*(-cosd*xad*rrad**2+rrad*(rud*udx+rvd*vdx)/wwd) ++ x +(rub*ubn*rrad*(xab-rub*ubx-(rdb-rub*rudb)*xad*rrad**2) ++ x -rvb*vbn*rrad*(xab-rvb*vbx-(rdb-rvb*rvdb)*xad*rrad**2)) ++ x *gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(xac-ruc*ucx-(rcd-ruc*rudc)*xad*rrad**2) ++ x +rvc*vcn*rrad*(xac-rvc*vcx-(rcd-rvc*rvdc)*xad*rrad**2)) ++ x *gamc*rrac/wwc ++ ++ fdy=gamd*(-cosd*yad*rrad**2+rrad*(rud*udy+rvd*vdy)/wwd) ++ x +(rub*ubn*rrad*(yab-rub*uby-(rdb-rub*rudb)*yad*rrad**2) ++ x -rvb*vbn*rrad*(yab-rvb*vby-(rdb-rvb*rvdb)*yad*rrad**2)) ++ x *gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(yac-ruc*ucy-(rcd-ruc*rudc)*yad*rrad**2) ++ x +rvc*vcn*rrad*(yac-rvc*vcy-(rcd-rvc*rvdc)*yad*rrad**2)) ++ x *gamc*rrac/wwc ++ ++ fdz=gamd*(-cosd*zad*rrad**2+rrad*(rud*udz+rvd*vdz)/wwd) ++ x +(rub*ubn*rrad*(zab-rub*ubz-(rdb-rub*rudb)*zad*rrad**2) ++ x -rvb*vbn*rrad*(zab-rvb*vbz-(rdb-rvb*rvdb)*zad*rrad**2)) ++ x *gamb*rrab/wwb ++ x +(ruc*ucn*rrad*(zac-ruc*ucz-(rcd-ruc*rudc)*zad*rrad**2) ++ x +rvc*vcn*rrad*(zac-rvc*vcz-(rcd-rvc*rvdc)*zad*rrad**2)) ++ x *gamc*rrac/wwc ++ ++ fax=-(fbx+fcx+fdx) ++ fay=-(fby+fcy+fdy) ++ faz=-(fbz+fcz+fdz) ++ ++c stress tensor calculation for inversion terms ++ ++ strs(1)=strs(1)+xab*fbx+xac*fcx+xad*fdx ++ strs(2)=strs(2)+yab*fbx+yac*fcx+yad*fdx ++ strs(3)=strs(3)+zab*fbx+zac*fcx+zad*fdx ++ strs(4)=strs(4)+yab*fby+yac*fcy+yad*fdy ++ strs(5)=strs(5)+yab*fbz+yac*fcz+yad*fdz ++ strs(6)=strs(6)+zab*fbz+zac*fcz+zad*fdz ++ ++ endif ++ ++ fxx(ia)=fxx(ia)+fax ++ fyy(ia)=fyy(ia)+fay ++ fzz(ia)=fzz(ia)+faz ++ ++ fxx(ib)=fxx(ib)+fbx ++ fyy(ib)=fyy(ib)+fby ++ fzz(ib)=fzz(ib)+fbz ++ ++ fxx(ic)=fxx(ic)+fcx ++ fyy(ic)=fyy(ic)+fcy ++ fzz(ic)=fzz(ic)+fcz ++ ++ fxx(id)=fxx(id)+fdx ++ fyy(id)=fyy(id)+fdy ++ fzz(id)=fzz(id)+fdz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc+gamvir ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fax ++ fyy_loc(ia)=fyy_loc(ia)+fay ++ fzz_loc(ia)=fzz_loc(ia)+faz ++ ++ fxx_loc(ib)=fxx_loc(ib)+fbx ++ fyy_loc(ib)=fyy_loc(ib)+fby ++ fzz_loc(ib)=fzz_loc(ib)+fbz ++ ++ fxx_loc(ic)=fxx_loc(ic)+fcx ++ fyy_loc(ic)=fyy_loc(ic)+fcy ++ fzz_loc(ic)=fzz_loc(ic)+fcz ++ ++ fxx_loc(id)=fxx_loc(id)+fdx ++ fyy_loc(id)=fyy_loc(id)+fdy ++ fzz_loc(id)=fzz_loc(id)+fdz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xab*fbx+xac*fcx+xad*fdx ++ strs_loc(2)=strs_loc(2)+yab*fbx+yac*fcx+yad*fdx ++ strs_loc(3)=strs_loc(3)+zab*fbx+zac*fcx+zad*fdx ++ strs_loc(4)=strs_loc(4)+yab*fby+yac*fcy+yad*fdy ++ strs_loc(5)=strs_loc(5)+yab*fbz+yac*fcz+yad*fdz ++ strs_loc(6)=strs_loc(6)+zab*fbz+zac*fcz+zad*fdz ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,449) ++ ++c sum contributions over all nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=enginv ++ buffer(2)=virinv ++ buffer(3)=inv_fre ++ buffer(4)=inv_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ enginv=buffer(1) ++ virinv=buffer(2) ++ inv_fre=buffer(3) ++ inv_vir=buffer(4) ++ ++ if(lsolva)then ++ ++ call gdsum(inv_sol(1),mxtmls,buffer(1)) ++ if(lexcite)call gdsum(inv_exc(1),mxtmls,buffer(1)) ++ ++ endif ++ ++ endif ++ ++ deallocate (xdab,ydab,zdab,stat=fail1) ++ deallocate (xdac,ydac,zdac,stat=fail2) ++ deallocate (xdad,ydad,zdad,stat=fail3) ++ ++ return ++ end subroutine invfrc ++ ++ end module inversion_module +diff -urN dl_class_1.9.orig/srcmod/lf_motion_module.f dl_class_1.9/srcmod/lf_motion_module.f +--- dl_class_1.9.orig/srcmod/lf_motion_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/lf_motion_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,2994 @@ ++ module lf_motion_module ++ ++c*********************************************************************** ++c ++c dl_poly module for verlet leap frog integration schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use property_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ contains ++ ++ subroutine rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,stresh) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for applying bond constraint corrections after ++c atomic integration. ++c Must be used in conjunction with integration algorithms ++c ++c assume bond vectors dxx,dyy,dzz are input ++c dxx =xxx(i) - xxx(j) etc ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith august 1992. ++c amended - t. forester march 1994. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,icyc,i,j,k ++ real(8) tolnce,tstep,vircon,stresh,dxx,dyy,dzz,strs1,strs2 ++ real(8) strs3,strs5,strs6,strs9,tstep2,esig,esig1 ++ real(8) dis,amti,amtj,omega2,gamma,gammi,gammj,dli,dlj ++ real(8) dxt,dyt,dzt,txx,tyy,tzz,xxt,yyt,zzt ++ ++ dimension stresh(9) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ ++c test size of work arrays ++ ++ safe=.true. ++ if(mxxdf.lt.nscons)safe=.false. ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,412) ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c accumulators for stress tensor ++ ++ vircon=0.d0 ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ safe=.false. ++ ++ do while(.not.safe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate temporary bond vector ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c calculate maximum error in bondlength ++ ++ esig=0.d0 ++ ++ do k=1,nscons ++ ++c set bond parameter ++ ++ dis=prmcon(listcon(k,1)) ++ esig1=abs(dxt(k)**2+dyt(k)**2+dzt(k)**2-dis**2)/dis ++ esig=max(esig,esig1) ++ ++ enddo ++ ++ esig=esig*0.5d0 ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++c bypass calculations if all tolerances satisfied ++ ++ if(.not.safe)then ++ ++c initialise increment arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint forces ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c set constraint parameters ++ ++ dis=prmcon(listcon(k,1)) ++ omega2=dis*dis ++ amti= tstep2/weight(i) ++ amtj=-tstep2/weight(j) ++ ++ if(lstfrz(i).ne.0) amti=0.d0 ++ if(lstfrz(j).ne.0) amtj=0.d0 ++ ++c constraint force parameter ++ ++ gamma=(omega2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/ ++ x (-2.d0*(amti-amtj)* ++ x (dxx(k)*dxt(k)+dyy(k)*dyt(k)+dzz(k)*dzt(k))) ++ ++c accumulate bond virial ++ ++ vircon=vircon+gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ ++ strs1=strs1-gamma*dxx(k)*dxx(k) ++ strs2=strs2-gamma*dxx(k)*dyy(k) ++ strs3=strs3-gamma*dxx(k)*dzz(k) ++ strs5=strs5-gamma*dyy(k)*dyy(k) ++ strs6=strs6-gamma*dyy(k)*dzz(k) ++ strs9=strs9-gamma*dzz(k)*dzz(k) ++ ++c improve approximate atomic positions ++ ++ gammi=-gamma*amti ++ xxt(i)=xxt(i)+dxx(k)*gammi ++ yyt(i)=yyt(i)+dyy(k)*gammi ++ zzt(i)=zzt(i)+dzz(k)*gammi ++ ++ gammj=-gamma*amtj ++ xxt(j)=xxt(j)+dxx(k)*gammj ++ yyt(j)=yyt(j)+dyy(k)*gammj ++ zzt(j)=zzt(j)+dzz(k)*gammj ++ ++ enddo ++ ++c transport temporary positions to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov) call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ dlj=1.d0/dble(listme(j)) ++ ++ xxx(i)=xxx(i)+xxt(i)*dli ++ yyy(i)=yyy(i)+yyt(i)*dli ++ zzz(i)=zzz(i)+zzt(i)*dli ++ xxx(j)=xxx(j)+xxt(j)*dlj ++ yyy(j)=yyy(j)+yyt(j)*dlj ++ zzz(j)=zzz(j)+zzt(j)*dlj ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c error exit for non-convergence ++ ++ if(.not.safe)return ++ ++c complete stress tensor ++ ++ stresh(1)=strs1 ++ stresh(2)=strs2 ++ stresh(3)=strs3 ++ stresh(4)=strs2 ++ stresh(5)=strs5 ++ stresh(6)=strs6 ++ stresh(7)=strs3 ++ stresh(8)=strs6 ++ stresh(9)=strs9 ++ ++c splice coordinate arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(stresh,9,buffer) ++ call splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ return ++ end subroutine rdshake_1 ++ ++ subroutine nve_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,tolnce,tstep,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics. Verlet leapfrog With RD-SHAKE ++c ++c parallel replicated data version : block data ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith august 1992. ++c amended - t.forester sept 1994 ++c amended - t.forester dec 1994 : block data ++c amended - w.smith oct 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,iatm0 ++ integer iatm1,i,j,k ++ real(8) engke,tolnce,tstep,vircon,strkin,rstep ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),fail(7) ++ ++c allocate working arrays ++ ++ do i=1,7 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(7)) ++ do i=1,7 ++ if(fail(i).ne.0)call error(idnode,1380) ++ enddo ++ ++ safe=.false. ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c move atoms by leapfrog algorithm ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c update velocities ++ ++ uxx(i)=vxx(i)+tstep*rmass(i)*fxx(i) ++ uyy(i)=vyy(i)+tstep*rmass(i)*fyy(i) ++ uzz(i)=vzz(i)+tstep*rmass(i)*fzz(i) ++ ++c update positions ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++c calculate velocity correction ++ ++ j=0 ++ rstep=1.d0/tstep ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=(xxx(i)-xxo(j))*rstep ++ uyy(i)=(yyy(i)-yyo(j))*rstep ++ uzz(i)=(zzz(i)-zzo(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=(uxx(i)-vxo(j))*weight(i)*rstep ++ fyy(i)=(uyy(i)-vyo(j))*weight(i)*rstep ++ fzz(i)=(uzz(i)-vzo(j))*weight(i)*rstep ++ ++ enddo ++ ++ endif ++ ++c calculate full timestep velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=0.5d0*(vxx(i)+uxx(i)) ++ vyy(i)=0.5d0*(vyy(i)+uyy(i)) ++ vzz(i)=0.5d0*(vzz(i)+uzz(i)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nve_1 ++ ++ subroutine nvt_e1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,tolnce,tstep,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Evans ++c thermostat. ++c Comp. Phys. reports 1, 299, (1984) ++c ++c parallel replicated data version : block data ++c ++c for systems using bond CONSTRAINTS. ++c ++c copyright - daresbury laboratory ++c author - t forester july 1993 ++c amended - w.smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,iatm0 ++ integer iatm1,i,j,k,iter,mxiter ++ real(8) engke,tolnce,tstep,vircon,strkin ++ real(8) rstep,chit,viracc,strcon,vdotf ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),strcon(9),fail(7) ++ ++c allocate working arrays ++ ++ do i=1,7 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(7)) ++ do i=1,7 ++ if(fail(i).ne.0)call error(idnode,1390) ++ enddo ++ ++ safe=.false. ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial positions and velocities ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c begin temperature control iteration ++ ++ mxiter=3 ++ if(ntcons.eq.0)mxiter=2 ++ chit=0.d0 ++ ++ do iter=1,mxiter ++ ++c move atoms by leapfrog algorithm ++ ++ j=0 ++ ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c update velocities ++ ++ uxx(i)=vxo(j)+tstep*(rmass(i)*fxx(i)-chit*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(rmass(i)*fyy(i)-chit*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(rmass(i)*fzz(i)-chit*vzz(i)) ++ ++c update positions ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c merge configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=(xxx(i)-xxo(j))*rstep ++ uyy(i)=(yyy(i)-yyo(j))*rstep ++ uzz(i)=(zzz(i)-zzo(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=(uxx(i)-vxo(j))*weight(i)*rstep ++ fyy(i)=(uyy(i)-vyo(j))*weight(i)*rstep ++ fzz(i)=(uzz(i)-vzo(j))*weight(i)*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy and evans thermostat parameter ++ ++ engke=0.d0 ++ vdotf=0.d0 ++ do i=iatm0,iatm1 ++ ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ buffer(2)=vdotf ++ call gdsum(buffer(1),2,buffer(3)) ++ engke=buffer(1) ++ vdotf=buffer(2) ++ ++ endif ++ chit=vdotf/engke ++ engke=0.5d0*engke ++ ++c end of thermal constraint iteration ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nvt_e1 ++ ++ subroutine nvt_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x engke,taut,sigma,tolnce,tstep,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat. ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester may 1993 ++c amended : t.forester sept 1994 ++c amended : t.forester dec 1994 : block data ++c amended - w.smith oct 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail ++ integer iatm0,iatm1,i,j,k,maxit,iter ++ real(8) engke,taut,sigma,tolnce,tstep,vircon,strkin,viracc ++ real(8) rstep,rtsq,chit0,strcon ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),fail(8),strcon(9) ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1400) ++ enddo ++ ++ safe=.false. ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c estimate kinetic energy at full timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=3 ++ if(ntcons.eq.0) maxit=maxit-1 ++ do iter=1,maxit ++ ++c temperature scaling coefficient - taut is the decay constant ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++c unconstrained new positions with thermostat ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++c store uncorrected positions ++ ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0.and.iter.eq.1)then ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c calculate kinetic energy ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c estimate velocity at the full step ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nvt_b1 ++ ++ subroutine nvt_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, ++ x chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat. ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c copyright - daresbury laboratory ++c author - t. forester may 1993 ++c amended - w.smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,i,j,k ++ integer iatm0,iatm1,maxit,iter ++ real(8) chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon ++ real(8) strkin,rstep,rtsq,qmass,chitp,chit0,viracc ++ real(8) chitnew,strcon ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),fail(8),strcon(9) ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1410) ++ enddo ++ ++ safe=.false. ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c estimate velocities at full time step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy at full time step ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c propagate chit ++ ++ chitp=2.d0*(engke-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=4 ++ if(ntcons.eq.0) maxit=maxit-1 ++ ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-chit0*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-chit0*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-chit0*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++c store uncorrected positions ++ ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0.and.iter.eq.1)then ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c improved prediction of chit ++ ++ chitp=2.d0*(engke-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c update thermostat ++ ++ chit=chitnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*qmass/taut**2 ++ consv=conint+0.5d0*qmass*chit0**2 ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nvt_h1 ++ ++ subroutine npt_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, ++ x tstep,virtot,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat and isotropic pressure control ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version ++c ++c for systems using bond CONSTRAINTS. Frozen atoms feb 1994 ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester dec 1993 ++c amended - w.smith oct 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons ++ integer fail,i,j,k,iatm0,iatm1,maxit,iter ++ real(8) elrc,engke,virlrc,press,taup,taut,sigma,tolnce,tstep ++ real(8) virtot,vircon,volm,strkin,beta,volm0,cell0 ++ real(8) elrc0,virlrc0,rstep,rtsq,psyst,chip0,scale ++ real(8) chit0,viracc,strcon ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),cell0(9),fail(8),strcon(9) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0 ++ ++ data newjob/.true./ ++ data beta/7.3728d-3/ ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1420) ++ enddo ++ ++ safe=.false. ++ ++c store initial values of volume and long range corrections ++ ++ if(newjob)then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1430) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise constraint virial terms ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial cell vectors ++ ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c estimate velocity at full timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy at current timestep ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c pressure control variable - taup is pressure relaxation time ++ ++ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ ++c temperature scaling coefficient - taut is temperature relaxation time ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=5 ++ if(ntcons.eq.0)maxit=maxit-1 ++ ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+scale*xxo(j) ++ yyy(i)=tstep*uyy(i)+scale*yyo(j) ++ zzz(i)=tstep*uzz(i)+scale*zzo(j) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c store integrated positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c estimate new cell tensor ++ ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c improved prediction of chip and chit ++ ++ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c update volume ++ ++ volm=volm*chip0 ++ ++c scale cell vectors - isotropic ++ ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c construct scaling tensor (for use with tethers) ++ ++ do i=2,8 ++ eta(i)=0.d0 ++ enddo ++ eta(1)=scale ++ eta(5)=scale ++ eta(9)=scale ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine npt_b1 ++ ++ subroutine npt_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,chip,chit,conint,consv,elrc,engke,virlrc,press, ++ x taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat+piston. ++c ++c reference: Melchionna, Ciccotti and Holian, ++c Mol Phys 1993, 78, p533 ++c ++c parallel replicated data version ++c ++c for systems using bond constraints (using atomic pressure) ++c ++c copyright daresbury laboratory 1995 ++c author - s. melchionna april 1995 ++c and - t. forester april 1995 ++c amended - w. smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons ++ integer i,j,k,iatm0,iatm1,fail,maxit,iter ++ real(8) chip,chit,conint,consv,elrc,engke,virlrc,press ++ real(8) taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm ++ real(8) strcon,volm0,elrc0,virlrc0,rstep,rtsq,qmass ++ real(8) chipnew,chitp,chitnew,chit0,volnew,scale,viracc,vold ++ real(8) cons1,cons2,cons3,strkin,cell0 ++ real(8) pmass,totmas,chipp,chip0,com,vom ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strcon(9),fail(8),strkin(9),com(3),vom(3),cell0(9) ++ ++ save newjob,volm0,elrc0,virlrc0,cell0,dens0 ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1440) ++ enddo ++ ++ safe=.false. ++ ++c store initial values of volume, long range corrections etc ++ ++ if(newjob)then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1450) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c estimate kinetic energy at current timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c estimate velocity at the full step ++ ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c propagate chip ++ ++ chipp=(2.d0*engke-virtot-vircon-3.d0*press*volm)/pmass- ++ x chit*chip ++ chipnew=chip+tstep*chipp ++ chip0=0.5d0*(chip+chipnew) ++ ++c propagate chit ++ ++ chitp=(2.d0*(engke-sigma)+pmass*chip**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=5 ++ if(ntcons.eq.0) maxit=maxit-1 ++ ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*(uxx(i)+ ++ x chipnew*((xxx(i)+xxo(j))*0.5d0-com(1))) ++ yyy(i)=yyo(j)+tstep*(uyy(i)+ ++ x chipnew*((yyy(i)+yyo(j))*0.5d0-com(2))) ++ zzz(i)=zzo(j)+tstep*(uzz(i)+ ++ x chipnew*((zzz(i)+zzo(j))*0.5d0-com(3))) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c store integrated positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c estimate new cell tensor ++ ++ volnew=volm*exp(3.d0*tstep*chipnew) ++ scale=(volnew/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c improved prediction of chip and chit ++ ++ chipp=(2.d0*engke-virtot-vircon-3.d0*press*volm)/pmass- ++ x chit0*chip0 ++ chipnew=chip+tstep*chipp ++ chip0=0.5d0*(chip+chipnew) ++ ++ chitp=(2.d0*(engke-sigma)+pmass*chip0**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++c update volume ++ ++ vold=volm ++ volm=volm*exp(3.d0*tstep*chipnew) ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=2,8 ++ eta(i)=0.d0 ++ enddo ++ eta(1)=chipnew ++ eta(5)=chipnew ++ eta(9)=chipnew ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ chip=chipnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) ++ cons1=0.5d0*qmass*chit0**2 ++ cons2=press*vold ++ cons3=0.5d0*pmass*chip0**2 ++ consv=conint+cons1+cons2+cons3 ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c updated velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine npt_h1 ++ ++ subroutine nst_b1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,mode,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, ++ x tstep,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat and anisotropic pressure control ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version ++c ++c for systems using bond CONSTRAINTS. Frozen atoms feb 1994 ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester december 1993 ++c amended - w. smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons,mode ++ integer fail,i,j,k,iatm0,iatm1,maxit,iter ++ real(8) elrc,engke,virlrc,press,taup,taut,sigma,tolnce,tstep ++ real(8) vircon,volm,beta,volm0,elrc0,virlrc0,rstep,rtsq,chit0 ++ real(8) viracc,strkin,strcon,cell0,stres0,uni ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),strcon(9),cell0(9),fail(8),stres0(9),uni(9) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data beta/7.3728d-3/ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1460) ++ enddo ++ ++ safe=.false. ++ ++c store initial values of volume, long range corrections etc ++ ++ if(newjob)then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1470) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store original cell vectors and stress tensor ++ ++ do i=1,9 ++ ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c estimate kinetic energy at current timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c current estimate of stres tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i) ++ enddo ++ ++c initial estimate of eta matrix and chit ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=5 ++ if(ntcons.eq.0)maxit=maxit-1 ++ ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+ ++ x eta(1)*xxo(j)+eta(4)*yyo(j)+eta(7)*zzo(j) ++ yyy(i)=tstep*uyy(i)+ ++ x eta(2)*xxo(j)+eta(5)*yyo(j)+eta(8)*zzo(j) ++ zzz(i)=tstep*uzz(i)+ ++ x eta(3)*xxo(j)+eta(6)*yyo(j)+eta(9)*zzo(j) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c store integrated positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c estimate new cell parameters ++ ++ call mat_mul(eta,cell0,cell) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c accumulate constraint virial terms ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strcns(i)+strkin(i) ++ enddo ++ ++c improved calculation of eta matrix and chit ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c end of thermostat and barostat iterations ++ ++ enddo ++ ++c update volume ++ ++ volm=volm*eta(1)*eta(5)*eta(9) ++ ++c adjust cell vectors - anisotropic ++ ++ call mat_mul(eta,cell0,cell) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c restore half step velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nst_b1 ++ ++ subroutine nst_h1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, ++ x ntcons,mode,chit,conint,consv,elrc,engke,virlrc,press, ++ x taup,taut,sigma,temp,tolnce,tstep,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat+piston. ++c ++c Parrinello - Rahman type : changing cell shape. ++c ++c reference: Melchionna, Ciccotti and Holian, ++c Mol Phys 1993, 78, p533 ++c ++c parallel replicated data version ++c ++c for systems using bond constraints (using atomic pressure) ++c ++c copyright daresbury laboratory 1995 ++c author - t. forester june 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons ++ integer fail,i,j,k,iatm0,iatm1,maxit,iter,mode ++ real(8) chip,chit,conint,consv,elrc,engke,virlrc,press ++ real(8) taup,taut,sigma,temp,tolnce,tstep,vircon,volm ++ real(8) strcon,strkin,etanew,eta0,cell0,volm0,elrc0,virlrc0 ++ real(8) rstep,rtsq,pmass,qmass,totmas,com,vom,uni,fac ++ real(8) chitp,chitnew,chit0,xxa,yya,zza,etadot ++ real(8) viracc,cons1,cons2,cons3,vold,stres0 ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ dimension strkin(9),strcon(9),fail(8),com(3),vom(3) ++ dimension etanew(9),eta0(9),cell0(9),stres0(9),uni(9) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0 ++ ++ data newjob/.true./,uni/1.d0,3*0.d0,1.d0,3*0.d0,1.d0/ ++ ++c allocate working arrays ++ ++ do i=1,8 ++ fail(i)=0 ++ enddo ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) ++ do i=1,8 ++ if(fail(i).ne.0)call error(idnode,1480) ++ enddo ++ ++ safe=.false. ++ ++c store initial values of volume, long range corrections etc ++ ++ if(newjob)then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1490) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ newjob=.false. ++ ++ endif ++ ++c set up block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c initialise constraint virial accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store original cell vectors and stress tensor ++ ++ do i=1,9 ++ ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c estimate kinetic energy at current timestep ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c estimate position at current time step ++ ++ xxx(i)=xxo(j)+tstep*(vxo(j)+tstep*rmass(i)*fxx(i)) ++ yyy(i)=yyo(j)+tstep*(vyo(j)+tstep*rmass(i)*fyy(i)) ++ zzz(i)=zzo(j)+tstep*(vzo(j)+tstep*rmass(i)*fzz(i)) ++ ++c estimate velocity at the full step ++ ++ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c initial estimate of stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i) ++ enddo ++ ++c propagation of eta ++ ++ fac=9.d0 ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ fac=5.d0 ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ fac=3.d0 ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ fac=2.d0 ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=0.5d0*(etanew(i)+eta(i)) ++ enddo ++ ++c propagate chit ++ ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ chitp=(2.d0*(engke-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ maxit=5 ++ if(ntcons.eq.0) maxit=maxit-1 ++ do iter=1,maxit ++ ++c unconstrained new positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(eta0(1)+chit0)*vxx(i)- ++ x eta0(4)*vyy(i)-eta0(7)*vzz(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(eta0(5)+chit0)*vyy(i)- ++ x eta0(2)*vxx(i)-eta0(8)*vzz(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(eta0(9)+chit0)*vzz(i)- ++ x eta0(3)*vxx(i)-eta0(6)*vyy(i)) ++ ++c advance positions using leapfrog ++ ++ xxa=(xxx(i)+xxo(j))*0.5d0-com(1) ++ yya=(yyy(i)+yyo(j))*0.5d0-com(2) ++ zza=(zzz(i)+zzo(j))*0.5d0-com(3) ++ ++ xxx(i)=xxo(j)+tstep*(uxx(i)+ ++ x etanew(1)*xxa+etanew(4)*yya+etanew(7)*zza) ++ yyy(i)=yyo(j)+tstep*(uyy(i)+ ++ x etanew(2)*xxa+etanew(5)*yya+etanew(8)*zza) ++ zzz(i)=zzo(j)+tstep*(uzz(i)+ ++ x etanew(3)*xxa+etanew(6)*yya+etanew(9)*zza) ++ ++ enddo ++ ++c start of bond constraint procedures ++ ++ if(ntcons.eq.0)safe=.true. ++ if(ntcons.gt.0)then ++ ++c store integrated positions ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c estimate new cell parameters ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ call cell_propagate(tstep,cell,etanew) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strcns(i)+strkin(i) ++ enddo ++ ++c improved prediction of eta ++ ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit0*eta0(i)) ++ enddo ++ if(mode.gt.0)then ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=0.5d0*(etanew(i)+eta(i)) ++ enddo ++ ++c improved prediction of chit ++ ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ chitp=(2.d0*(engke-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ do i=1,9 ++ eta(i)=etanew(i) ++ enddo ++ ++c update volume ++ ++ chip=eta(1)+eta(5)+eta(9) ++ vold=volm ++ volm=volm*exp(tstep*chip) ++ ++c adjust cell vectors - anisotropic ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ call cell_propagate(tstep,cell,eta) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c conserved quantity less kinetic and potential energy ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) ++ cons1=0.5d0*qmass*chit0**2 ++ cons2=press*vold ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ cons3=0.5d0*pmass*etadot ++ consv=conint+cons1+cons2+cons3 ++ ++c restore half step velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) ++ ++ return ++ end subroutine nst_h1 ++ ++ end module lf_motion_module +diff -urN dl_class_1.9.orig/srcmod/lf_rotation1_module.f dl_class_1.9/srcmod/lf_rotation1_module.f +--- dl_class_1.9.orig/srcmod/lf_rotation1_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/lf_rotation1_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,5315 @@ ++ module lf_rotation1_module ++ ++c*********************************************************************** ++c ++c dl_poly module 1 for verlet leap frog rotational integration ++c schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use lf_motion_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ contains ++ ++ subroutine update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c*********************************************************************** ++c ++c dlpoly routine to update the quaternion arrays as part of ++c the leapfrog algorithm ++c ++c copyright daresbury laboratory ++c author - w.smith october 2005 ++c based on - t.forester oct. 1993 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safeq ++ integer igrp1,igrp2,jg,itq,ig ++ real(8) qn0,qn1,qn2,qn3,qn0a,qn1a,qn2a,qn3a,qn0b,qn1b,qn2b,qn3b ++ real(8) rnorm,tstep,quattol,eps ++ real(8) opx(msgrp),opy(msgrp),opz(msgrp) ++ real(8) oqx(msgrp),oqy(msgrp),oqz(msgrp) ++ ++ jg=0 ++ safeq=.true. ++ ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c first iteration of new quaternions (lab fixed) ++ ++ qn0=q0(ig)+(-q1(ig)*opx(jg)-q2(ig)*opy(jg)-q3(ig)*opz(jg)) ++ x *tstep*pt5 ++ qn1=q1(ig)+( q0(ig)*opx(jg)-q3(ig)*opy(jg)+q2(ig)*opz(jg)) ++ x *tstep*pt5 ++ qn2=q2(ig)+( q3(ig)*opx(jg)+q0(ig)*opy(jg)-q1(ig)*opz(jg)) ++ x *tstep*pt5 ++ qn3=q3(ig)+(-q2(ig)*opx(jg)+q1(ig)*opy(jg)+q0(ig)*opz(jg)) ++ x *tstep*pt5 ++ ++ qn0b=0.d0 ++ qn1b=0.d0 ++ qn2b=0.d0 ++ qn3b=0.d0 ++ ++ itq=0 ++ eps=1.0d9 ++ do while((itq.lt.mxquat).and.(eps.gt.quattol)) ++ ++ itq=itq+1 ++ ++ qn0a=pt5*(-q1(ig)*opx(jg)-q2(ig)*opy(jg)-q3(ig)*opz(jg)) ++ x +pt5*(-qn1*oqx(jg)-qn2*oqy(jg)-qn3*oqz(jg)) ++ qn1a=pt5*( q0(ig)*opx(jg)-q3(ig)*opy(jg)+q2(ig)*opz(jg)) ++ x + pt5*( qn0*oqx(jg)-qn3*oqy(jg)+qn2*oqz(jg)) ++ qn2a=pt5*( q3(ig)*opx(jg)+q0(ig)*opy(jg)-q1(ig)*opz(jg)) ++ x + pt5*( qn3*oqx(jg)+qn0*oqy(jg)-qn1*oqz(jg)) ++ qn3a=pt5*(-q2(ig)*opx(jg)+q1(ig)*opy(jg)+q0(ig)*opz(jg)) ++ x + pt5*(-qn2*oqx(jg)+qn1*oqy(jg)+qn0*oqz(jg)) ++ ++ qn0=q0(ig)+pt5*qn0a*tstep ++ qn1=q1(ig)+pt5*qn1a*tstep ++ qn2=q2(ig)+pt5*qn2a*tstep ++ qn3=q3(ig)+pt5*qn3a*tstep ++ ++ rnorm=1.d0/sqrt(qn0**2+qn1**2+qn2**2+qn3**2) ++ qn0=qn0*rnorm ++ qn1=qn1*rnorm ++ qn2=qn2*rnorm ++ qn3=qn3*rnorm ++ ++c convergence test ++ ++ eps=sqrt(((qn0a-qn0b)**2+(qn1a-qn1b)**2+(qn2a-qn2b)**2 ++ x +(qn3a-qn3b)**2)*tstep**2) ++ ++ qn0b=qn0a ++ qn1b=qn1a ++ qn2b=qn2a ++ qn3b=qn3a ++ ++ enddo ++ ++ if(itq.ge.mxquat) safeq=.false. ++ ++c store new quaternions ++ ++ q0(ig)=qn0 ++ q1(ig)=qn1 ++ q2(ig)=qn2 ++ q3(ig)=qn3 ++ ++ enddo ++ ++ return ++ end subroutine update_quaternions ++ ++ subroutine nveq_1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame ++c omx,omy,omz = angular velocity in body fixed frame (principal axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newjob ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer fail,i,igrp,igrp1,igrp2,idum,ifre1,ifre2,j,ifre ++ integer jg,ig,k,id,jr ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) strkin,rot,rstep,rtsq,engtrn,vaa,vbb,vcc ++ real(8) trx,try,trz,delx,dely,delz,engfke ++ real(8) strgrp,tqx,tqy,tqz,fmx,fmy,fmz ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension strkin(9),strgrp(9),rot(9),fail(nnn) ++ ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(12)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1500) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(i)=vxo(j)+tstep*rmass(i)*fxx(i) ++ uyy(i)=vyo(j)+tstep*rmass(i)*fyy(i) ++ uzz(i)=vzo(j)+tstep*rmass(i)*fzz(i) ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++c calculate force and velocity corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational rigid body motion ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) ++ uyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) ++ uzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcmx(ig)+tstep*uxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*uyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*uzz(ig) ++ ++c estimate velocity at full time step ++ ++ gvxx(ig)=0.5d0*(gvxx(ig)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyy(ig)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzz(ig)+uzz(ig)) ++ ++ enddo ++ ++c calculate rigid body translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c total translational kinetic energy ++ ++ engke=engtrn+engfke ++ ++c calculate rigid body kinetic stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore rigid body half timestep velocity ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx=0.d0 ++ tqy=0.d0 ++ tqz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx=tqx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy=tqy+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz=tqz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c store current angular velocity ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx*rot(1)+tqy*rot(4)+tqz*rot(7))*rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) ++ try=(tqx*rot(2)+tqy*rot(5)+tqz*rot(8))*rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) ++ trz=(tqx*rot(3)+tqy*rot(6)+tqz*rot(9))*rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+delx*pt5 ++ opy(jg)=omy(ig)+dely*pt5 ++ opz(jg)=omz(ig)+delz*pt5 ++ ++ enddo ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omx(ig)+delx ++ uyy(ig)=omy(ig)+dely ++ uzz(ig)=omz(ig)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omx(ig)+delx*1.5d0 ++ oqy(jg)=omy(ig)+dely*1.5d0 ++ oqz(jg)=omz(ig)+delz*1.5d0 ++ ++c angular velocity at timestep n ++ ++ omx(ig)=omx(ig)+pt5*delx ++ omy(ig)=omy(ig)+pt5*dely ++ omz(ig)=omz(ig)+pt5*delz ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies - relative to c.o.m ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate(opx,opy,opz,xxt,yyt,zzt,stat=fail(1)) ++ deallocate(oqx,oqy,oqz,dtx,dty,dtz,stat=fail(2)) ++ deallocate(dxx,dyy,dzz,uxx,uyy,uzz,stat=fail(3)) ++ deallocate(txx,tyy,tzz,dxt,dyt,dzt,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,xx1,yy1,zz1,stat=fail(5)) ++ deallocate(vxo,vyo,vzo,gcxo,gcyo,gczo,stat=fail(6)) ++ ++ return ++ end subroutine nveq_1 ++ ++ subroutine nvtq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, ++ x tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat. ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame ++c omx,omy,omz = angular velocity in body fixed frame (principle axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,safeq,newjob ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer i,fail,igrp,igrp1,igrp2,ifre,ifre1,ifre2,jg,ig ++ integer j,k,jr,id,mxiter,iter,idum ++ real(8) engke,engrot,quattol,sigma,taut,tolnce,tstep,vircom ++ real(8) vircon,strkin,strgrp,rot,rstep,rtsq ++ real(8) engtrn,trx,try,trz,chit0,rgmas,engfke ++ real(8) vaa,vbb,vcc,engtot,viracc,strcon ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++ dimension strkin(9),strgrp(9),strcon(9),rot(9),fail(nnn) ++ ++ save igrp1,igrp2,ifre1,ifre2,newjob ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1510) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c initialise constraint virial terms ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacements ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c estimate velocity and temperature at half-time step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate kinetic energy of rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translation kinetic energy of rigid bodies ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rigid body rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c temperature scaling coefficient - taut is the relaxation time ++ ++ engtot=engfke+engrot+engtrn ++ chit0= sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=2 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+xxo(j) ++ yyy(i)=tstep*vyy(i)+yyo(j) ++ zzz(i)=tstep*uzz(i)+zzo(j) ++ ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0.and.iter.eq.1) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate force and velocity corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ if(iter.eq.mxiter)call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ********: rigid body motion - thermostated :************ ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 ++ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 ++ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 ++ ++c update positions ++ ++ gcmx(ig)=gcxo(jg)+tstep*uxx(ig) ++ gcmy(ig)=gcyo(jg)+tstep*uyy(ig) ++ gcmz(ig)=gczo(jg)+tstep*uzz(ig) ++ ++c calculate full step velocities ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 ++ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 ++ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 ++ uyy(ig)=(omyo(jg)+tstep*try)*chit0 ++ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 ++ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 ++ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 ++ ++ enddo ++ ++c calculate rigid body rotational energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c total translational kinetic energy ++ ++ engke=engtrn+engfke ++ ++c total kinetic energy ++ ++ engtot=engke+engrot ++ ++c improved prediction of chit ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c end of thermostat/barostat iterations ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nvtq_b1 ++ ++ subroutine nvtq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,chit,consv,conint,engke,engrot,quattol, ++ x sigma,taut,tolnce,tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat. ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame ++c omx,omy,omz = angular velocity in body fixed frame (principle axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,safeq,newjob ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer fail,i,idum,igrp,igrp1,igrp2,ifre,ifre1,ifre2 ++ integer j,k,ig,jg,jr,id,iter,mxiter ++ real(8) chit,consv,conint,engke,engrot,quattol,sigma,taut ++ real(8) tolnce,tstep,vircom,vircon,strkin,strgrp,strcon,rot ++ real(8) rstep,rtsq,qmass,engtrn,cons1,engtot,vaa,vbb,vcc ++ real(8) chit0,chitnew,chitp,viracc,rgmas,trx,try,trz,delx ++ real(8) dely,delz,engfke ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension strkin(9),strgrp(9),strcon(9),rot(9),fail(nnn) ++ ++ save igrp1,igrp2,ifre1,ifre2,qmass,newjob ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1520) ++ enddo ++ ++ if(newjob)then ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c initialise constraint virial terms ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacements ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c estimate velocity and temperature at half-time step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate kinetic energy of rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translation kinetic energy of rigid bodies ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rigid body rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c propagate chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chitp=2.d0*(engtot-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=4 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-chit0*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-chit0*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-chit0*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0.and.iter.eq.1) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate force and velocity corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++ if(iter.eq.mxiter)then ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++ endif ++ ++c ********: rigid body motion - thermostated :************ ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas-chit0*gvxx(ig)) ++ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas-chit0*gvyy(ig)) ++ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas-chit0*gvzz(ig)) ++ ++c update positions ++ ++ gcmx(ig)=gcxo(jg)+tstep*uxx(ig) ++ gcmy(ig)=gcyo(jg)+tstep*uyy(ig) ++ gcmz(ig)=gczo(jg)+tstep*uzz(ig) ++ ++c calculate full step velocities ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ if(iter.eq.mxiter)then ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++ endif ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ safeq=.true. ++ engrot=0.d0 ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omxo(jg)+delx ++ uyy(ig)=omyo(jg)+dely ++ uzz(ig)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c calculate rigid body rotational energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c improved prediction of chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chitp=2.d0*(engtot-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update thermostat variable ++ ++ chit=chitnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*qmass/taut**2 ++ cons1=0.5d0*qmass*chit0**2 ++ consv=conint+cons1 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nvtq_h1 ++ ++ subroutine nptq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,virtot,vircom, ++ x vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat and barostat. ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principl axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob,safeq ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ntpatm,i,fail,igrp,igrp1,igrp2,idum,ifre,ifre1 ++ integer ifre2,j,jg,ig,jr,k,id,iter,mxiter ++ real(8) elrc,engke,engrot,virlrc,press,quattol,sigma,taup,taut ++ real(8) tolnce,tstep,virtot,vircom,vircon,volm,rot,engfke,uni ++ real(8) cell0,beta,volm0,elrc0,virlrc0,rstep,rtsq ++ real(8) engtrn,trx,try,trz,chip0,scale,engtot,chit0,viracc,czero ++ real(8) rgmas,vaa,vbb,vcc,strkin,strcon,strgrp,psyst ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension fail(nnn),rot(9),cell0(9),czero(9),uni(9) ++ dimension strcon(9),strgrp(9),strkin(9) ++ ++ save newjob,volm0,elrc0,virlrc0,cell0,dens0,igrp1,igrp2 ++ save ifre1,ifre2 ++ ++ data newjob/.true./,beta/7.3728d-3/ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1530) ++ enddo ++ ++ if(newjob) then ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1540) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c constraint stress tensor accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c current cell vectors ++ ++ do i=1,9 ++ czero(i)=cell(i) ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacements ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c estimate velocity and temperature at half-time step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate kinetic energy of rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translation kinetic energy of rigid bodies ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rigid body rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c pressure control variable - taup is the relaxation time ++ ++ engke=engfke+engtrn ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ ++c temperature scaling coefficient - taut is the relaxation time ++ ++ engtot=engke+engrot ++ chit0= sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=5 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+scale*xxo(j) ++ yyy(i)=tstep*uyy(i)+scale*yyo(j) ++ zzz(i)=tstep*uzz(i)+scale*zzo(j) ++ ++ enddo ++ ++c estimate new cell tensor ++ ++ do i=1,9 ++ cell(i)=scale*czero(i) ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate force correction ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ if(iter.eq.mxiter)call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ********: rigid body motion - thermostated :************ ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 ++ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 ++ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 ++ ++c update positions : ++ ++ gcmx(ig)=scale*gcxo(jg)+tstep*uxx(ig) ++ gcmy(ig)=scale*gcyo(jg)+tstep*uyy(ig) ++ gcmz(ig)=scale*gczo(jg)+tstep*uzz(ig) ++ ++c calculate full step velocities ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 ++ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 ++ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 ++ uyy(ig)=(omyo(jg)+tstep*try)*chit0 ++ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 ++ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 ++ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 ++ ++ enddo ++ ++c calculate rigid body rotational energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c total translational kinetic energy ++ ++ engke=engtrn+engfke ++ ++c total kinetic energy ++ ++ engtot=engke+engrot ++ ++c improved pressure control variable ++ ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ ++c improved temperature scaling coefficient ++ ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c end of thermostat/barostat iterations ++ ++ enddo ++ ++c scale cell vectors ++ ++ scale=((chip0*volm)/volm0)**(1.d0/3.d0) ++ ++ do i=1,9 ++ cell(i)=scale*cell0(i) ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=1,9 ++ eta(i)=scale*uni(i) ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nptq_b1 ++ ++ subroutine nptq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,virtot,vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover ++c thermostat and barostat (Melchionna et al variant) ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principl axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newjob ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ntpatm,fail,i,igrp,igrp1,igrp2,ifre,ifre1,ifre2 ++ integer j,k,ig,jg,jr,id,iter,mxiter,idum ++ real(8) chip,chit,consv,conint,elrc,engke,engrot,virlrc,press ++ real(8) quattol,sigma,taup,taut,temp,tolnce,tstep,virtot,vircom ++ real(8) vircon,volm,cell0,rot,volm0,elrc0,rtsq,uni ++ real(8) virlrc0,strkin,rstep,qmass,pmass,strgrp,strcon ++ real(8) trx,try,trz,chipp,chipnew,chip0,engtot,chitp ++ real(8) chitnew,chit0,volnew,scale,viracc,rgmas ++ real(8) vaa,vbb,vcc,vold,cons1,cons2,cons3,delx,dely,delz ++ real(8) engtrn,totmas,com,vom,engfke ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension fail(nnn),rot(9),cell0(9),uni(9) ++ dimension strkin(9),strcon(9),strgrp(9),com(3),vom(3) ++ ++ save newjob,volm0,elrc0,virlrc0,cell0,dens0,pmass,qmass ++ save igrp1,igrp2,ifre1,ifre2,totmas ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1550) ++ enddo ++ ++ if(newjob) then ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1560) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c temporary stress tensor accumulators ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++c correction to velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacements ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c estimate velocity at full step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate kinetic energy of rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translation kinetic energy of rigid bodies ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rigid body rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c propagate chip ++ ++ engke=engfke+engtrn ++ chipp=(2.d0*engke-virtot-vircon-vircom-3.d0*press*volm)/pmass- ++ x chit*chip ++ chipnew=chip+tstep*chipp ++ chip0=0.5d0*(chip+chipnew) ++ ++c propagate chit ++ ++ engtot=engke+engrot ++ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=5 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)*vxx(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)*vyy(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxx(i)=xxo(j)+tstep*(uxx(i)+ ++ x chipnew*((xxx(i)+xxo(j))*0.5d0-com(1))) ++ yyy(i)=yyo(j)+tstep*(uyy(i)+ ++ x chipnew*((yyy(i)+yyo(j))*0.5d0-com(2))) ++ zzz(i)=zzo(j)+tstep*(uzz(i)+ ++ x chipnew*((zzz(i)+zzo(j))*0.5d0-com(3))) ++ ++ enddo ++ ++c estimate new cell parameters ++ ++ volnew=volm*exp(3.d0*tstep*chipnew) ++ scale=(volnew/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate force correction ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ if(iter.eq.mxiter)then ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++ endif ++ ++c ********: rigid body motion - thermostated :*********** ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas-(chit0+chip0)* ++ x gvxx(ig)) ++ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas-(chit0+chip0)* ++ x gvyy(ig)) ++ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas-(chit0+chip0)* ++ x gvzz(ig)) ++ ++c advance positions using leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*(uxx(ig)+ ++ x chipnew*((gcmx(ig)+gcxo(jg))*0.5d0-com(1))) ++ gcmy(ig)=gcyo(jg)+tstep*(uyy(ig)+ ++ x chipnew*((gcmy(ig)+gcyo(jg))*0.5d0-com(2))) ++ gcmz(ig)=gczo(jg)+tstep*(uzz(ig)+ ++ x chipnew*((gcmz(ig)+gczo(jg))*0.5d0-com(3))) ++ ++c calculate full step velocities ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate kinetic energy and stress tensor ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omxo(jg)+delx ++ uyy(ig)=omyo(jg)+dely ++ uzz(ig)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c calculate rigid body rotational energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c improved prediction of chip ++ ++ engke=engfke+engtrn ++ chipp=(2.d0*engke-virtot-vircom-vircon-3.d0*press*volm)/pmass- ++ x chit0*chip0 ++ chipnew=chip+tstep*chipp ++ chip0=0.5d0*(chip+chipnew) ++ ++c improved prediction of chit ++ ++ engtot=engke+engrot ++ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat iterations ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update volume ++ ++ vold=volm ++ volm=volm*exp(3.d0*tstep*chipnew) ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=1,9 ++ eta(i)=chipnew*uni(i) ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ chip=chipnew ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) ++ cons1=0.5d0*qmass*chit0**2 ++ cons2=press*vold ++ cons3=0.5d0*pmass*chip0**2 ++ consv=conint+cons1+cons2+cons3 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nptq_h1 ++ ++ subroutine nstq_b1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Berendsen ++c thermostat and barostat. (cell may change shape). ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principl axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob,safeq ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ntpatm,fail,i,idum,igrp,igrp1,igrp2,ifre,ifre1,mode ++ integer ifre2,j,k,ig,jg,jr,id,iter,mxiter ++ real(8) elrc,engke,engrot,virlrc,press,quattol,sigma,taup,taut ++ real(8) tolnce,tstep,vircom,vircon,volm,beta,uni,cell0 ++ real(8) volm0,elrc0,virlrc0,rot,rstep,rtsq,engfke ++ real(8) engtrn,trx,try,trz,engtot,chit0,rgmas ++ real(8) vaa,vbb,vcc,viracc,strkin,strcon,strgrp,stres0 ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension strkin(9),strcon(9),strgrp(9),stres0(9),rot(9) ++ dimension fail(nnn),uni(9),cell0(9) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0 ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./, beta/7.3728d-3/ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxxdf),yyo(mxxdf),zzo(mxxdf),stat=fail(9)) ++ allocate (xx1(mxxdf),yy1(mxxdf),zz1(mxxdf),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1570) ++ enddo ++ ++ if(newjob) then ++ ++c store initial values of volume, long range corrections etc ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1580) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe= (igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c temporary stress tensor accumulators and new cell ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++c construct current bond vectors - required by shake ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from coms ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c estimate velocity at half-time step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c estimate kinetic energy of free atoms ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c stress tensor of free atoms ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c estimate translational kinetic energy of rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c forces on centre of mass ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) ++ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) ++ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) ++ ++ enddo ++ ++c translational kinetic energy of rigid body ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c stress tensor of rigid body ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velocity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c calculate rotational kinetic energy of rigid bodies ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c find eta - taup is the relaxation time ++ ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c temperature scaling coefficient - taut is the relaxation time ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=5 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(i)+eta(1)*xxo(j)+eta(4)*yyo(j)+eta(7)*zzo(j) ++ yyy(i)=tstep*uyy(i)+eta(2)*xxo(j)+eta(5)*yyo(j)+eta(8)*zzo(j) ++ zzz(i)=tstep*uzz(i)+eta(3)*xxo(j)+eta(6)*yyo(j)+eta(9)*zzo(j) ++ ++ enddo ++ ++c estimate new cell tensor ++ ++ call mat_mul(eta,cell0,cell) ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate current stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ if(iter.eq.mxiter)then ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++ endif ++ ++c ********: rigid body motion - thermostated :*********** ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 ++ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 ++ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 ++ ++c update positions : ++ ++ gcmx(ig)=tstep*uxx(ig)+eta(1)*gcxo(jg)+eta(4)*gcyo(jg)+ ++ x eta(7)*gczo(jg) ++ gcmy(ig)=tstep*uyy(ig)+eta(2)*gcxo(jg)+eta(5)*gcyo(jg)+ ++ x eta(8)*gczo(jg) ++ gcmz(ig)=tstep*uzz(ig)+eta(3)*gcxo(jg)+eta(6)*gcyo(jg)+ ++ x eta(9)*gczo(jg) ++ ++c full step com velocity ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate rigid body kinetic energy and stress tensor ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 ++ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 ++ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 ++ uyy(ig)=(omyo(jg)+tstep*try)*chit0 ++ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 ++ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 ++ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c complete stress tensor - add all contributions ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) ++ enddo ++ ++c improved prediction of eta and chit ++ ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++c end of thermostat/barostat iterations ++ ++ enddo ++ ++c update cell vectors ++ ++ call mat_mul(eta,cell0,cell) ++ ++c update volume ++ ++ volm=volm*eta(1)*eta(5)*eta(9) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nstq_b1 ++ ++ subroutine nstq_h1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke,engrot, ++ x virlrc,press,quattol,sigma,taup,taut,temp,tolnce,tstep, ++ x vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - verlet leapfrog with Hoover like ++c thermostat and barostat. (cell may change shape). ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principle axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob,safeq ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ntpatm,fail,i,igrp,igrp1,igrp2,ifre,ifre1,ifre2 ++ integer j,k,ig,jg,jr,id,iter,mxiter,idum,mode ++ real(8) chit,conint,consv,elrc,engke,engrot,virlrc,press,quattol ++ real(8) sigma,taup,taut,temp,tolnce,tstep,vircom,vircon,volm ++ real(8) strkin,strcon,strgrp,eta0,etanew,rot,cell0,volm0,stres0 ++ real(8) elrc0,virlrc0,rstep,rtsq,qmass,pmass,totmas ++ real(8) engtrn,trx,try,trz,engtot,engfke,fac,etadot ++ real(8) chitp,chitnew,chit0,xxa,yya,zza,viracc,rgmas,uni ++ real(8) delx,dely,delz,vold,cons1,cons2,cons3 ++ real(8) vaa,vbb,vcc,chip,com,vom ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ dimension eta0(9),etanew(9),rot(9),cell0(9),fail(nnn),uni(9) ++ dimension strkin(9),strcon(9),strgrp(9),stres0(9),com(3),vom(3) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0,pmass,qmass,totmas ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1590) ++ enddo ++ ++ if(newjob) then ++ ++c store initial values of volume, long range corrections etc ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1600) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c calculate total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c initialise stress tensor accumulators ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++c correction to velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c estimate velocity at full step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c estimate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c estimate stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c estimate rigid body translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=gvxo(jg)+pt5*tstep/gmass(id)*fmx(jg) ++ gvyy(ig)=gvyo(jg)+pt5*tstep/gmass(id)*fmy(jg) ++ gvzz(ig)=gvzo(jg)+pt5*tstep/gmass(id)*fmz(jg) ++ ++ enddo ++ ++c rigid body translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c rigid body stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate rgid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+pt5*tstep*trx ++ opy(jg)=omy(ig)+pt5*tstep*try ++ opz(jg)=omz(ig)+pt5*tstep*trz ++ ++ enddo ++ ++c store angular velcoity at timestep n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c calculate rotational kinetic energy of rigid bodies ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c propagate eta ++ ++ fac=9.d0 ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit*eta(i)) ++ enddo ++ if(mode.gt.0)then ++ fac=5.d0 ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ fac=3.d0 ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ fac=2.d0 ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=0.5d0*(etanew(i)+eta(i)) ++ enddo ++ ++c propagate chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c begin iterations !!----------------------------------------------- ++ ++ mxiter=5 ++ if(ntcons.eq.0) mxiter=mxiter-1 ++ ++ do iter=1,mxiter ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)- ++ x (chit0+eta0(1))*vxx(i)-eta0(4)*vyy(i)-eta0(7)*vzz(i)) ++ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)- ++ x eta0(2)*vxx(i)-(eta0(5)+chit0)*vyy(i)-eta0(8)*vzz(i)) ++ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)- ++ x eta0(3)*vxx(i)-eta0(6)*vyy(i)-(eta0(9)+chit0)*vzz(i)) ++ ++c advance positions using leapfrog ++ ++ xxa=(xxx(i)+xxo(j))*0.5d0-com(1) ++ yya=(yyy(i)+yyo(j))*0.5d0-com(2) ++ zza=(zzz(i)+zzo(j))*0.5d0-com(3) ++ ++ xxx(i)=xxo(j)+tstep*(uxx(i)+ ++ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) ++ yyy(i)=yyo(j)+tstep*(uyy(i)+ ++ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) ++ zzz(i)=zzo(j)+tstep*(uzz(i)+ ++ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) ++ ++ enddo ++ ++c estimate new cell parameters ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ call cell_propagate(tstep,cell,etanew) ++ ++ if(ntcons.eq.0) safe=.true. ++ if(ntcons.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint correction ++ ++ call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++c contribution to constraint virial ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c calculate other constraint corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate corrected velocity ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate velocity at the full step ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free half step velocity ++ ++ if(iter.eq.mxiter)then ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++ endif ++ ++c ********: rigid body motion - thermostated :*********** ++ ++c ***** step 1 : integrate centre of mass motion ********* ++ ++ jg =0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate thermostated velocities ++ ++ rgmas=1.d0/gmass(id) ++ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas- ++ x (chit0+eta0(1))*gvxx(ig)-eta0(4)*gvyy(ig)-eta0(7)*gvzz(ig)) ++ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas- ++ x eta0(2)*gvxx(ig)-(eta0(5)+chit0)*gvyy(ig)-eta0(8)*gvzz(ig)) ++ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas- ++ x eta0(3)*gvxx(ig)-eta0(6)*gvyy(ig)-(eta0(9)+chit0)*gvzz(ig)) ++ ++c advance positions using leapfrog ++ ++ xxa=(gcmx(ig)+gcxo(jg))*0.5d0-com(1) ++ yya=(gcmy(ig)+gcyo(jg))*0.5d0-com(2) ++ zza=(gcmz(ig)+gczo(jg))*0.5d0-com(3) ++ ++ gcmx(ig)=gcxo(jg)+tstep*(uxx(ig)+ ++ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) ++ gcmy(ig)=gcyo(jg)+tstep*(uyy(ig)+ ++ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) ++ gcmz(ig)=gczo(jg)+tstep*(uzz(ig)+ ++ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) ++ ++c full step com velocity ++ ++ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) ++ ++ enddo ++ ++c calculate rigid body kinetic energy and stress tensor ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ if(iter.eq.mxiter)then ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++ endif ++ ++c ****** step 2 : integrate rotational motion ********** ++ ++ jg=0 ++ safeq=.true. ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omxo(jg)+delx ++ uyy(ig)=omyo(jg)+dely ++ uzz(ig)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c complete stress tensor - add all contributions ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) ++ enddo ++ ++c improved prediction of eta and chit ++ ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit0*eta0(i)) ++ enddo ++ if(mode.gt.0)then ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=0.5d0*(etanew(i)+eta(i)) ++ enddo ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=0.5d0*(chit+chitnew) ++ ++c end of thermostat/barostat iterations ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ do i=1,9 ++ eta(i)=etanew(i) ++ enddo ++ ++c update volume ++ ++ chip=eta(1)+eta(5)+eta(9) ++ vold=volm ++ volm=volm*exp(tstep*chip) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c conserved quantity less kinetic and potential energy ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) ++ cons1=0.5d0*qmass*chit0**2 ++ cons2=press*vold ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ cons3=0.5d0*pmass*etadot ++ consv=conint+cons1+cons2+cons3 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0) ++ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) ++ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) ++ ++ return ++ end subroutine nstq_h1 ++ ++ end module lf_rotation1_module +diff -urN dl_class_1.9.orig/srcmod/lf_rotation2_module.f dl_class_1.9/srcmod/lf_rotation2_module.f +--- dl_class_1.9.orig/srcmod/lf_rotation2_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/lf_rotation2_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,5007 @@ ++ module lf_rotation2_module ++ ++c*********************************************************************** ++c ++c dl_poly module 2 for verlet leap frog rotational integration ++c schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use lf_rotation1_module ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ contains ++ ++ subroutine nveq_2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principal axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) rot,strkin,strcon,strgrp,engfke,engtrn ++ real(8) delx,dely,delz,trx,try,trz,vaa,vbb,vcc,viracc ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ ++ save newjob,igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1620) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c accumulators for constraint and virial stress tensor ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c start of shake cycle ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=1 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(j)=vxo(j)+tstep*rmass(i)*fxx(i) ++ uyy(j)=vyo(j)+tstep*rmass(i)*fyy(i) ++ uzz(j)=vzo(j)+tstep*rmass(i)*fzz(i) ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(i)+tstep*uxx(j) ++ yyy(i)=yyo(i)+tstep*uyy(j) ++ zzz(i)=zzo(i)+tstep*uzz(j) ++ ++c estimate full step velocities ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(jg)=gvxo(jg)+tstep/gmass(id)*fmx(jg) ++ uyy(jg)=gvyo(jg)+tstep/gmass(id)*fmy(jg) ++ uzz(jg)=gvzo(jg)+tstep/gmass(id)*fmz(jg) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*uxx(jg) ++ gcmy(ig)=gcyo(jg)+tstep*uyy(jg) ++ gcmz(ig)=gczo(jg)+tstep*uzz(jg) ++ ++c centre of mass velocities at full step ++ ++ gvxx(ig)=pt5*(uxx(jg)+gvxo(jg)) ++ gvyy(ig)=pt5*(uyy(jg)+gvyo(jg)) ++ gvzz(ig)=pt5*(uzz(jg)+gvzo(jg)) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++ opx(jg)=omxo(jg)+delx*pt5 ++ opy(jg)=omyo(jg)+dely*pt5 ++ opz(jg)=omzo(jg)+delz*pt5 ++ ++ enddo ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=omxo(jg)+delx ++ uyy(jg)=omyo(jg)+dely ++ uzz(jg)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++c angular velocity at time step n ++ ++ omx(ig)=opx(jg) ++ omy(ig)=opy(jg) ++ omz(ig)=opz(jg) ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c total kinetic energy ++ ++ engke=engfke+engtrn ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,fmx,fmy,fmz,stat=fail(5)) ++ deallocate (tqx,tqy,tqz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nveq_2 ++ ++ subroutine nvtq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, ++ x tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Berendsen thermostat. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,engfke ++ real(8) rot,strkin,strgrp,strcon,engtrn,trx,try,trz ++ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,engtot,chit0 ++ real(8) sigma,taut ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ ++ save chit0,igrp1,igrp2,ifre1,ifre2,newjob ++ ++ data chit0/1.d0/,newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1630) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c accumulators for constraint stress and virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c shake and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=2 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(i)+tstep*uxx(j) ++ yyy(i)=yyo(i)+tstep*uyy(j) ++ zzz(i)=zzo(i)+tstep*uzz(j) ++ ++c calculate full time velocity ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c update centre of mass velocities ++ ++ gvxx(ig)=gvxo(jg)+tstep/gmass(id)*fmx(jg) ++ gvyy(ig)=gvyo(jg)+tstep/gmass(id)*fmy(jg) ++ gvzz(ig)=gvzo(jg)+tstep/gmass(id)*fmz(jg) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c advance velocity by leapfrog ++ ++ gvxx(ig)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 ++ gvyy(ig)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 ++ gvzz(ig)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=gcyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=gczo(jg)+tstep*gvzz(ig) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++ opx(jg)=(omxo(jg)+delx*pt5) ++ opy(jg)=(omyo(jg)+dely*pt5) ++ opz(jg)=(omzo(jg)+delz*pt5) ++ ++ enddo ++ ++c scaled angular velocity at timestep n ++ ++ omx(ig)=opx(jg)*chit0 ++ omy(ig)=opy(jg)*chit0 ++ omz(ig)=opz(jg)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 ++ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 ++ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 ++ ++c angular velocity at full time step ++ ++ uxx(jg)=(omxo(jg)+delx)*chit0 ++ uyy(jg)=(omyo(jg)+dely)*chit0 ++ uzz(jg)=(omzo(jg)+delz)*chit0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c new estimate of chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nvtq_b2 ++ ++ subroutine nvtq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,conint,consv,chit,engke,engrot,quattol, ++ x sigma,taut,tolnce,tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Hoover thermostat. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame (input) ++c omx,omy,omz = angular velocity in body fixed frame (principal axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,engtot ++ real(8) rot,strkin,strcon,strgrp,engtrn,engfke,trx,try,trz ++ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,sigma,taut,chit0 ++ real(8) chitnew,chitp,conint,consv,chit,qmass ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ ++ save newjob,igrp1,igrp2,ifre1,ifre2,qmass ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1640) ++ enddo ++ ++ if(newjob)then ++ ++c mass parameters for thermostat ++ ++ qmass=2.d0*sigma*taut**2 ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atoms displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c initial thermostat variable ++ ++ chit0=chit ++ ++c accumulators for constraint stress and virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c shake iterations and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=3 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0)* ++ x pt5*(vxx(i)+vxo(j))) ++ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0)* ++ x pt5*(vyy(i)+vyo(j))) ++ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0)* ++ x pt5*(vzz(i)+vzo(j))) ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(i)+tstep*uxx(j) ++ yyy(i)=yyo(i)+tstep*uyy(j) ++ zzz(i)=zzo(i)+tstep*uzz(j) ++ ++c estimate full step velocities ++ ++ vxx(i)=pt5*(vxo(j)+uxx(j)) ++ vyy(i)=pt5*(vyo(j)+uyy(j)) ++ vzz(i)=pt5*(vzo(j)+uzz(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)-chit0* ++ x pt5*(gvxx(ig)+gvxo(jg))) ++ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)-chit0* ++ x pt5*(gvyy(ig)+gvyo(jg))) ++ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)-chit0* ++ x pt5*(gvzz(ig)+gvzo(jg))) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*uxx(jg) ++ gcmy(ig)=gcyo(jg)+tstep*uyy(jg) ++ gcmz(ig)=gczo(jg)+tstep*uzz(jg) ++ ++c centre of mass velocities at half-step ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omxo(jg)+pt5*tstep*trx ++ opy(jg)=omyo(jg)+pt5*tstep*try ++ opz(jg)=omzo(jg)+pt5*tstep*trz ++ ++ enddo ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=omxo(jg)+delx ++ uyy(jg)=omyo(jg)+dely ++ uzz(jg)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c new estimate of chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chitp=2.d0*(engtot-sigma)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=pt5*(chit+chitnew) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10.and.icyc.gt.3)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c update thermostat variable ++ ++ chit=chitnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*qmass/taut**2 ++ consv=conint+pt5*qmass*chit0**2 ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nvtq_h2 ++ ++ subroutine nptq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon, ++ x virtot,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Berendsen thermostat and barostat. ++c (cell may change volume) ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith sep 1999 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) rot,strkin,strgrp,strcon,engtrn,engfke,trx,try,trz ++ real(8) delx,dely,delz,czero ++ real(8) vaa,vbb,vcc,viracc,beta,elrc,virlrc,press,engtot ++ real(8) sigma,taup,taut,virtot,volm,cell0,elrc0,virlrc0 ++ real(8) chit0,volm0,chip0,psyst,scale ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ dimension cell0(9),czero(9) ++ ++ save newjob,volm0,elrc0,virlrc0,czero,chit0,chip0,dens0 ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./ ++ data beta/7.3728d-3/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1670) ++ enddo ++ ++c store initial values of volume and long range corrections ++ ++ if(newjob) then ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1660) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ do i=1,9 ++ czero(i)=cell(i) ++ enddo ++ newjob=.false. ++ ++ chit0=1.d0 ++ chip0=1.d0 ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c set constraint stress and virial and inital cell vectors ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c length scaling parameter ++ ++ scale=chip0**(1.d0/3.d0) ++ ++c shake iterations and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=3 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore cell vectors ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(i)*scale+tstep*uxx(j) ++ yyy(i)=yyo(i)*scale+tstep*uyy(j) ++ zzz(i)=zzo(i)*scale+tstep*uzz(j) ++ ++c estimate full step velocity ++ ++ vxx(i)=pt5*(vxo(j)+uxx(j)) ++ vyy(i)=pt5*(vyo(j)+uyy(j)) ++ vzz(i)=pt5*(vzo(j)+uzz(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(jg)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 ++ uyy(jg)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 ++ uzz(jg)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)*scale+tstep*uxx(jg) ++ gcmy(ig)=gcyo(jg)*scale+tstep*uyy(jg) ++ gcmz(ig)=gczo(jg)*scale+tstep*uzz(jg) ++ ++c centre of mass velocities at full step ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=(omxo(jg)+pt5*delx) ++ opy(jg)=(omyo(jg)+pt5*dely) ++ opz(jg)=(omzo(jg)+pt5*delz) ++ ++ enddo ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=opx(jg)*chit0 ++ omy(ig)=opy(jg)*chit0 ++ omz(ig)=opz(jg)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 ++ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 ++ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=(omxo(jg)+delx)*chit0 ++ uyy(jg)=(omyo(jg)+dely)*chit0 ++ uzz(jg)=(omzo(jg)+delz)*chit0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c pressure control variable ++ ++ engke=engfke+engtrn ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ chip0=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip0**(1.d0/3.d0) ++ ++c new estimate of chit ++ ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++c new cell parameters ++ ++ do i=1,9 ++ cell(i)=scale*cell0(i) ++ enddo ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c scale cell vectors ++ ++ scale=((chip0*volm)/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=scale*czero(i) ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=2,8 ++ eta(i)=0.d0 ++ enddo ++ eta(1)=scale ++ eta(5)=scale ++ eta(9)=scale ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nptq_b2 ++ ++ subroutine nptq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, ++ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, ++ x tstep,vircom,vircon,virtot,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Hoover thermostat and barostat. ++c (cell may change volume) ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,com ++ real(8) rot,strkin,strcon,strgrp,vom,engtrn,trx,try,trz ++ real(8) delx,dely,delz,engfke ++ real(8) vaa,vbb,vcc,viracc,pmass,qmass,totmas,czero ++ real(8) chip,chit,consv,conint,elrc,virlrc,press,sigma,taup,taut ++ real(8) temp,virtot,cell0,volm0,elrc0,virlrc0 ++ real(8) chit0,chip0,chipnew,chipp,engtot,chitnew,chitp,volnew ++ real(8) scale,volm,vold,cons1,cons2,cons3 ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ dimension czero(9),cell0(9),com(3),vom(3) ++ ++ save newjob,volm0,elrc0,virlrc0,czero,dens0,pmass,qmass ++ save igrp1,igrp2,ifre1,ifre2,totmas ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1670) ++ enddo ++ ++ if(newjob) then ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1680) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ do i=1,9 ++ czero(i)=cell(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++c calculate system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c initial thermostat and barostat variables ++ ++ chit0=chit ++ chip0=chip ++ chipnew=chip ++ ++c initialise constraint stress and virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ ++ enddo ++ ++c shake iterations and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=4 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore cell vectors ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)* ++ x pt5*(vxx(i)+vxo(j))) ++ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)* ++ x pt5*(vyy(i)+vyo(j))) ++ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)* ++ x pt5*(vzz(i)+vzo(j))) ++ ++c advance position using leapfrog ++ ++ xxx(i)=xxo(i)+tstep*(uxx(j)+ ++ x chipnew*((xxx(i)+xxo(i))*pt5-com(1))) ++ yyy(i)=yyo(i)+tstep*(uyy(j)+ ++ x chipnew*((yyy(i)+yyo(i))*pt5-com(2))) ++ zzz(i)=zzo(i)+tstep*(uzz(j)+ ++ x chipnew*((zzz(i)+zzo(i))*pt5-com(3))) ++ ++c estimate full step velocity ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c calculate kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)-(chit0+chip0)* ++ x pt5*(gvxx(ig)+gvxo(jg))) ++ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)-(chit0+chip0)* ++ x pt5*(gvyy(ig)+gvyo(jg))) ++ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)-(chit0+chip0)* ++ x pt5*(gvzz(ig)+gvzo(jg))) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcxo(jg)+tstep*(uxx(jg)+ ++ x chipnew*((gcxo(jg)+gcmx(ig))*pt5-com(1))) ++ gcmy(ig)=gcyo(jg)+tstep*(uyy(jg)+ ++ x chipnew*((gcyo(jg)+gcmy(ig))*pt5-com(2))) ++ gcmz(ig)=gczo(jg)+tstep*(uzz(jg)+ ++ x chipnew*((gczo(jg)+gcmz(ig))*pt5-com(3))) ++ ++c estimate full step velocities ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omxo(jg)+pt5*tstep*trx ++ opy(jg)=omyo(jg)+pt5*tstep*try ++ opz(jg)=omzo(jg)+pt5*tstep*trz ++ ++ enddo ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=omxo(jg)+delx ++ uyy(jg)=omyo(jg)+dely ++ uzz(jg)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c new estimate of chip and chit ++ ++ engke=engfke+engtrn ++ chipp=(2.d0*engke-virtot-vircom-vircon-3.d0*press*volm)/pmass- ++ x chit0*chip0 ++ chipnew=chip+tstep*chipp ++ chip0=pt5*(chip+chipnew) ++ ++ engtot=engke+engrot ++ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=pt5*(chit+chitnew) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++c estimate new cell tensor ++ ++ volnew=volm*exp(3.d0*tstep*chipnew) ++ scale=(volnew/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=czero(i)*scale ++ enddo ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c update volume ++ ++ vold=volm ++ volm=volm*exp(3.d0*tstep*chipnew) ++ ++c scale cell vectors-isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=czero(i)*scale ++ enddo ++ ++c construct scaling tensor (for later!) ++ ++ do i=2,8 ++ eta(i)=0.d0 ++ enddo ++ eta(1)=chipnew ++ eta(5)=chipnew ++ eta(9)=chipnew ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ chip=chipnew ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) ++ cons1=pt5*qmass*chit0**2 ++ cons2=press*vold ++ cons3=pt5*pmass*chip0**2 ++ consv=conint+cons1+cons2+cons3 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nptq_h2 ++ ++ subroutine nstq_b2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, ++ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints. Rigid body sites and constraint sites may ++c coincide. ++c ++c verlet leapfrog with Berendsen thermostat and barostat. ++c (cell may change shape) ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith nov 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob,safeq,newstep,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons,mode ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) rot,strkin,strcon,strgrp,engtrn,trx,try,trz ++ real(8) delx,dely,delz,engfke ++ real(8) vaa,vbb,vcc,viracc,elrc,virlrc,press,sigma ++ real(8) taup,taut,volm,cell0,volm0,elrc0,chit0,uni ++ real(8) beta,stres0,engtot,virlrc0 ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) ++ dimension cell0(9),uni(9),stres0(9) ++ ++ save newjob,volm0,elrc0,virlrc0,chit0,dens0 ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ data beta/7.3728d-3/ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1690) ++ enddo ++ ++c store initial values of volume, long range corrections etc ++ ++ if(newjob) then ++ ++ chit0=1.d0 ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1700) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c set virial, strain and stress tensors ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ eta(i)=uni(i) ++ strcns(i)=0.d0 ++ cell0(i)=cell(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c shake iterations and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=4 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 ++ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 ++ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 ++ ++c update positions ++ ++ xxx(i)=tstep*uxx(j)+eta(1)*xxo(i)+eta(4)*yyo(i)+eta(7)*zzo(i) ++ yyy(i)=tstep*uyy(j)+eta(2)*xxo(i)+eta(5)*yyo(i)+eta(8)*zzo(i) ++ zzz(i)=tstep*uzz(j)+eta(3)*xxo(i)+eta(6)*yyo(i)+eta(9)*zzo(i) ++ ++c calculate velocity at full time step ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ********: rigid body motion - thermostated :*********** ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c calculate thermostated velocities ++ ++ uxx(jg)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 ++ uyy(jg)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 ++ uzz(jg)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 ++ ++c update positions ++ ++ gcmx(ig)=tstep*uxx(jg)+ ++ x eta(1)*gcxo(jg)+eta(4)*gcyo(jg)+eta(7)*gczo(jg) ++ gcmy(ig)=tstep*uyy(jg)+ ++ x eta(2)*gcxo(jg)+eta(5)*gcyo(jg)+eta(8)*gczo(jg) ++ gcmz(ig)=tstep*uzz(jg)+ ++ x eta(3)*gcxo(jg)+eta(6)*gcyo(jg)+eta(9)*gczo(jg) ++ ++c centre of mass velocities at full step ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=(omxo(jg)+pt5*delx) ++ opy(jg)=(omyo(jg)+pt5*dely) ++ opz(jg)=(omzo(jg)+pt5*delz) ++ ++ enddo ++ ++c scaled angular velocity at time step n ++ ++ omx(ig)=opx(jg)*chit0 ++ omy(ig)=opy(jg)*chit0 ++ omz(ig)=opz(jg)*chit0 ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 ++ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 ++ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=(omxo(jg)+delx)*chit0 ++ uyy(jg)=(omyo(jg)+dely)*chit0 ++ uzz(jg)=(omzo(jg)+delz)*chit0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c calculate total stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c calculate new cell tensor ++ ++ call mat_mul(eta,cell0,cell) ++ ++c calculate eta tensor ++ ++ do i=1,9 ++ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c new estimate of chit ++ ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c update volume ++ ++ volm=volm*eta(1)*eta(5)*eta(9) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nstq_b2 ++ ++ subroutine nstq_h2 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke,engrot, ++ x virlrc,press,quattol,sigma,taup,taut,temp,tolnce,tstep, ++ x vircom,vircon,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints- rigid body sites and constraint sites ++c may coincide. ++c ++c verlet leapfrog with Hoover like thermostat and barostat. ++c (cell may change shape) ++c ++c parallel replicated data version : block data ++c ++c for systems using bond constraints ++c ++c tqx,tqy,tqz=torque in lab fixed frame (input) ++c omx,omy,omz=angular velocity in body fixed frame (principal axis) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1995 ++c author t.forester june 1995 ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newstep,newjob,cycle ++ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons ++ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 ++ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm,mode ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) rot,strkin,strcon,strgrp,engtrn,vxt,vyt,vzt,trx,try,trz ++ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,com,fac,etadot ++ real(8) chit,conint,consv,virlrc,elrc,press,sigma,taut,taup ++ real(8) volm,eta0,etanew,cell0,volm0,elrc0,virlrc0,pmass,qmass ++ real(8) totmas,chit0,xxa,yya,zza,chip,chitp,vom,engfke ++ real(8) chitnew,vold,cons1,cons2,cons3,temp,uni ++ real(8) stres0,engtot ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: fmx(:),fmy(:),fmz(:) ++ real(8), allocatable :: tqx(:),tqy(:),tqz(:) ++ real(8), allocatable :: omxo(:),omyo(:),omzo(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) ++ ++ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn),vom(3) ++ dimension cell0(9),eta0(9),etanew(9),stres0(9),uni(9),com(3) ++ ++ save newjob,volm0,elrc0,virlrc0,dens0,pmass,qmass ++ save igrp1,igrp2,ifre1,ifre2,totmas ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) ++ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) ++ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) ++ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) ++ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), ++ x stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1710) ++ enddo ++ ++ if(newjob) then ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ qmass=2.0d0*sigma*taut**2 ++ pmass=2.0d0*sigma*taup**2 ++ ++c store initial values of volume, long range corrections etc ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ fail(1)=0 ++ allocate (dens0(mxatyp),stat=fail(1)) ++ if(fail(1).ne.0)call error(idnode,1720) ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++c system total mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ cycle=.true. ++ ++c ensure total momentum is zero ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++c correction to velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ omxo(jg)=omx(ig) ++ omyo(jg)=omy(ig) ++ omzo(jg)=omz(ig) ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ gvxo(jg)=gvxx(ig) ++ gvyo(jg)=gvyy(ig) ++ gvzo(jg)=gvzz(ig) ++ qn0(jg)=q0(ig) ++ qn1(jg)=q1(ig) ++ qn2(jg)=q2(ig) ++ qn3(jg)=q3(ig) ++ ++ enddo ++ ++c calculate centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c calculate atom displacement from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxo(i)-gcxo(jg) ++ dty(jr)=yyo(i)-gcyo(jg) ++ dtz(jr)=zzo(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c initial thermostat and barostat variables and new cell ++ ++ chit0=chit ++ do i=1,9 ++ ++ eta0(i)=eta(i) ++ cell0(i)=cell(i) ++ ++ enddo ++ ++c initialise constraint stress and virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ stres0(i)=stress(i) ++ ++ enddo ++ ++c shake and thermostat iterations start here ++ ++ icyc=0 ++ mxshak1=mxshak ++ if(ntcons.eq.0)mxshak1=4 ++ do while(cycle.and.icyc.le.mxshak1) ++ ++ icyc=icyc+1 ++ ++c restore cell vectors ++ ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c restore original quaternions for this step ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ q0(ig)=qn0(jg) ++ q1(ig)=qn1(jg) ++ q2(ig)=qn2(jg) ++ q3(ig)=qn3(jg) ++ ++ enddo ++ ++c integrate unconstrained new positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity using leapfrog ++ ++ vxt=pt5*(vxx(i)+vxo(j)) ++ vyt=pt5*(vyy(i)+vyo(j)) ++ vzt=pt5*(vzz(i)+vzo(j)) ++ ++ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)- ++ x (eta0(1)+chit0)*vxt-eta0(4)*vyt-eta0(7)*vzt) ++ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)- ++ x eta0(2)*vxt-(eta0(5)+chit0)*vyt-eta0(8)*vzt) ++ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)- ++ x eta0(3)*vxt-eta0(6)*vyt-(eta0(9)+chit0)*vzt) ++ ++c advance positions using leapfrog ++ ++ xxa=(xxx(i)+xxo(i))*pt5-com(1) ++ yya=(yyy(i)+yyo(i))*pt5-com(2) ++ zza=(zzz(i)+zzo(i))*pt5-com(3) ++ ++ xxx(i)=xxo(i)+tstep*(uxx(j)+ ++ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) ++ yyy(i)=yyo(i)+tstep*(uyy(j)+ ++ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) ++ zzz(i)=zzo(i)+tstep*(uzz(j)+ ++ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) ++ ++c estimate full step velocities ++ ++ vxx(i)=pt5*(uxx(j)+vxo(j)) ++ vyy(i)=pt5*(uyy(j)+vyo(j)) ++ vzz(i)=pt5*(uzz(j)+vzo(j)) ++ ++ enddo ++ ++c kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore half step velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=uxx(j) ++ vyy(i)=uyy(j) ++ vzz(i)=uzz(j) ++ ++ enddo ++ ++c ********: rigid body motion - thermostated :************ ++ ++c translational kinetic energy ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate centre of mass forces ++ ++ fmx(jg)=0.d0 ++ fmy(jg)=0.d0 ++ fmz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ fmx(jg)=fmx(jg)+fxx(i) ++ fmy(jg)=fmy(jg)+fyy(i) ++ fmz(jg)=fmz(jg)+fzz(i) ++ ++ enddo ++ ++c calculate thermostated velocities ++ ++ vxt=pt5*(gvxx(ig)+gvxo(jg)) ++ vyt=pt5*(gvyy(ig)+gvyo(jg)) ++ vzt=pt5*(gvzz(ig)+gvzo(jg)) ++ ++ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)- ++ x (chit0+eta0(1))*vxt-eta0(4)*vyt-eta0(7)*vzt) ++ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)- ++ x eta0(2)*vxt-(eta0(5)+chit0)*vyt-eta0(8)*vzt) ++ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)- ++ x eta0(3)*vxt-eta0(6)*vyt-(eta0(9)+chit0)*vzt) ++ ++c advance positions using leapfrog ++ ++ xxa=(gcmx(ig)+gcxo(jg))*pt5-com(1) ++ yya=(gcmy(ig)+gcyo(jg))*pt5-com(2) ++ zza=(gcmz(ig)+gczo(jg))*pt5-com(3) ++ ++ gcmx(ig)=gcxo(jg)+tstep*(uxx(jg)+ ++ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) ++ gcmy(ig)=gcyo(jg)+tstep*(uyy(jg)+ ++ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) ++ gcmz(ig)=gczo(jg)+tstep*(uzz(jg)+ ++ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) ++ ++c estimate full step velocities ++ ++ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) ++ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) ++ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gvxx(ig)=uxx(jg) ++ gvyy(ig)=uyy(jg) ++ gvzz(ig)=uzz(jg) ++ ++ enddo ++ ++c calculate rigid body stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx(jg)=0.d0 ++ tqy(jg)=0.d0 ++ tqz(jg)=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c angular velocity at time step n (first guess) ++ ++ opx(jg)=omxo(jg) ++ opy(jg)=omyo(jg) ++ opz(jg)=omzo(jg) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* ++ x rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* ++ x rotinx(id,2) ++ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* ++ x rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* ++ x rotiny(id,2) ++ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* ++ x rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* ++ x rotinz(id,2) ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omxo(jg)+pt5*tstep*trx ++ opy(jg)=omyo(jg)+pt5*tstep*try ++ opz(jg)=omzo(jg)+pt5*tstep*trz ++ ++ enddo ++ ++c correction due to thermostat ++ ++ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) ++ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) ++ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) ++ ++c angular velocity at time step n ++ ++ omx(ig)=omxo(jg)+delx*pt5 ++ omy(ig)=omyo(jg)+dely*pt5 ++ omz(ig)=omzo(jg)+delz*pt5 ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(jg)=omxo(jg)+delx ++ uyy(jg)=omyo(jg)+dely ++ uzz(jg)=omzo(jg)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omxo(jg)+delx*1.5d0 ++ oqy(jg)=omyo(jg)+dely*1.5d0 ++ oqz(jg)=omzo(jg)+delz*1.5d0 ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step velocities ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(jg) ++ omy(ig)=uyy(jg) ++ omz(ig)=uzz(jg) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge new atomic coordinates ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c calculate total stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++c propagate eta ++ ++ fac=9.d0 ++ do i=1,9 ++ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- ++ x chit0*eta0(i)) ++ enddo ++ if(mode.gt.0)then ++ fac=5.d0 ++ etanew(3)=0.d0 ++ etanew(6)=0.d0 ++ etanew(7)=0.d0 ++ etanew(8)=0.d0 ++ if(mode.lt.3)then ++ fac=3.d0 ++ etanew(2)=0.d0 ++ etanew(4)=0.d0 ++ if(mode.eq.2)then ++ fac=2.d0 ++ etanew(1)=0.5d0*(etanew(1)+etanew(5)) ++ etanew(5)=etanew(1) ++ endif ++ endif ++ endif ++ do i=1,9 ++ eta0(i)=pt5*(etanew(i)+eta(i)) ++ enddo ++ ++c propagate chit ++ ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ engke=engfke+engtrn ++ engtot=engke+engrot ++ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass ++ chitnew=chit+tstep*chitp ++ chit0=pt5*(chit+chitnew) ++ ++c estimate new cell parameters ++ ++ call cell_propagate(tstep,cell,etanew) ++ ++ if(ntcons.gt.0) then ++ ++c apply constraint correction ++ ++ newstep=.false. ++ if(icyc.eq.1)newstep=.true. ++ ++ call qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ if(abs(viracc).le.1.d-10)cycle=.false. ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++ enddo ++ ++c update thermostat and barostat variables ++ ++ chit=chitnew ++ do i=1,9 ++ eta(i)=etanew(i) ++ enddo ++ ++c update volume ++ ++ chip=eta(1)+eta(5)+eta(9) ++ vold=volm ++ volm=volm*exp(tstep*chip) ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c conserved quantity less kinetic and potential energy ++ ++ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) ++ cons1=pt5*qmass*chit0**2 ++ cons2=press*vold ++ etadot=sdot0(9,eta0,eta0) ++ if(mode.eq.2)etadot=etadot-eta0(1)**2 ++ cons3=pt5*pmass*etadot ++ consv=conint+cons1+cons2+cons3 ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c merge new quaternions ++ ++ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) ++ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) ++ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) ++ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) ++ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) ++ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) ++ ++ return ++ end subroutine nstq_h2 ++ ++ subroutine qshake ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,stresh) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for appling bond constraint corrections after ++c atomic integration. Assumes rigid bodies connected by constraints ++c If this is not so use rdshake_1 instead ++c Must be used in conjunction with leapfrog integration algorithms ++c ++c copyright - daresbury laboratory 1995 ++c author - t. forester june 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newstep,newjob ++ integer fail,idnode,imcon,mxnode,natms,nscons,i,j,k ++ integer ik,ig,id,jj ++ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,txx,tyy ++ real(8) tzz,xxt,yyt,zzt,stresh,tstep2,esig,dis,dis2 ++ real(8) xxa,yya,zza,tax,tay,taz,doti,amti,amtj ++ real(8) trx,try,trz,vix,viy,viz,vxi,vyi,vzi ++ real(8) vjx,vjy,vjz,vxj,vyj,vzj,gamma,dli,dlj,rot ++ ++ real(8), allocatable :: redmass(:),esig1(:) ++ ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ dimension stresh(9),rot(9) ++ ++ save newjob,esig1,redmass ++ ++ data newjob/.true./,fail/0/ ++ ++ if(newjob)then ++ ++ allocate (redmass(mxcons),esig1(mxcons),stat=fail) ++ if(fail.ne.0)call error(idnode,1610) ++ newjob=.false. ++ ++ endif ++ ++c constraint virial ++ ++ vircon=0.d0 ++ ++c accumulators for stress tensor ++ ++ do i=1,9 ++ stresh(i)=0.d0 ++ enddo ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c one iteration of constraint (shake) algorithm ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate temporary bond vector ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c calculate maximum error in bondlength ++ ++ esig=0.d0 ++ do k=1,nscons ++ ++c set bond parameter ++ ++ dis=prmcon(listcon(k,1)) ++ dis2=dis*dis ++ esig1(k)=0.5d0*(dis2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/dis2 ++ esig=max(esig,abs(esig1(k))) ++ ++ enddo ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++c terminate iteration if all tolerances satisfied ++ ++ if (.not.safe) then ++ ++c initialise force increment arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint forces ++ ++ ik=0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c assign effective reduced mass ++ ++ if(newstep) then ++ ++ ig=lstbod(i) ++ ++ if(ig.eq.0) then ++ ++ amti=rmass(i) ++ ++ else ++ ++ ik=ik+1 ++ id=lstgtp(ig) ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ jj=lstcsit(ik) ++ ++c site to com in lab frame ++ ++ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+ ++ x gzz(id,jj)*rot(3)) ++ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+ ++ x gzz(id,jj)*rot(6)) ++ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+ ++ x gzz(id,jj)*rot(9)) ++ ++c find cross product between interatomic vector and vector to com ++ ++ tax=yya*dzz(k)-zza*dyy(k) ++ tay=zza*dxx(k)-xxa*dzz(k) ++ taz=xxa*dyy(k)-yya*dxx(k) ++ ++c transform to body fixed frame ++ ++ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) ++ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) ++ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) ++ ++c direction of induced velocites in body frame ++ ++ vix=try*gzz(id,jj)-trz*gyy(id,jj) ++ viy=trz*gxx(id,jj)-trx*gzz(id,jj) ++ viz=trx*gyy(id,jj)-try*gxx(id,jj) ++ ++c transform to lab frame ++ ++ vxi=vix*rot(1)+viy*rot(2)+viz*rot(3) ++ vyi=vix*rot(4)+viy*rot(5)+viz*rot(6) ++ vzi=vix*rot(7)+viy*rot(8)+viz*rot(9) ++ ++c find dot product between induced translational and rotational velocities ++ ++ doti=abs(vxi*dxx(k)+vyi*dyy(k)+vzi*dzz(k)) ++ doti=doti/dis2 ++ ++ amti=(1.d0/gmass(id)+doti) ++ ++ endif ++ ++ ig=lstbod(j) ++ if(ig.eq.0) then ++ ++ amtj=rmass(j) ++ ++ else ++ ++ ik=ik+1 ++ id=lstgtp(ig) ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ jj=lstcsit(ik) ++ ++c site to com in lab frame ++ ++ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+ ++ x gzz(id,jj)*rot(3)) ++ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+ ++ x gzz(id,jj)*rot(6)) ++ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+ ++ x gzz(id,jj)*rot(9)) ++ ++c find cross product between interatomic vector and vector to com ++ ++ tax =yya*dzz(k)-zza*dyy(k) ++ tay =zza*dxx(k)-xxa*dzz(k) ++ taz =xxa*dyy(k)-yya*dxx(k) ++ ++c transform to body fixed frame ++ ++ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) ++ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) ++ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) ++ ++c direction of induced velocites in body frame ++ ++ vjx=try*gzz(id,jj)-trz*gyy(id,jj) ++ vjy=trz*gxx(id,jj)-trx*gzz(id,jj) ++ vjz=trx*gyy(id,jj)-try*gxx(id,jj) ++ ++c transform to lab frame ++ ++ vxj=vjx*rot(1)+vjy*rot(2)+vjz*rot(3) ++ vyj=vjx*rot(4)+vjy*rot(5)+vjz*rot(6) ++ vzj=vjx*rot(7)+vjy*rot(8)+vjz*rot(9) ++ ++c find dot product between induced translational and rotational velocities ++ ++ doti=abs(vxj*dxx(k)+vyj*dyy(k)+vzj*dzz(k)) ++ doti=doti/dis2 ++ ++ amtj=(1.d0/gmass(id)+doti) ++ ++ endif ++ ++ redmass(k)=1.d0/(amti+amtj)/tstep2 ++ ++ endif ++ ++c constraint force parameter ++ ++ gamma=esig1(k)*redmass(k) ++ ++c accumulate bond virial ++ ++ vircon=vircon-gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ ++ stresh(1)=stresh(1)+gamma*dxx(k)*dxx(k) ++ stresh(2)=stresh(2)+gamma*dxx(k)*dyy(k) ++ stresh(3)=stresh(3)+gamma*dxx(k)*dzz(k) ++ stresh(5)=stresh(5)+gamma*dyy(k)*dyy(k) ++ stresh(6)=stresh(6)+gamma*dyy(k)*dzz(k) ++ stresh(9)=stresh(9)+gamma*dzz(k)*dzz(k) ++ ++c improved atomic force ++ ++ xxt(i)=xxt(i)+dxx(k)*gamma ++ yyt(i)=yyt(i)+dyy(k)*gamma ++ zzt(i)=zzt(i)+dzz(k)*gamma ++ ++ xxt(j)=xxt(j)-dxx(k)*gamma ++ yyt(j)=yyt(j)-dyy(k)*gamma ++ zzt(j)=zzt(j)-dzz(k)*gamma ++ ++ enddo ++ ++c transport temporary positions to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov) call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ dlj=1.d0/dble(listme(j)) ++ ++ fxx(i)=fxx(i)+xxt(i)*dli ++ fyy(i)=fyy(i)+yyt(i)*dli ++ fzz(i)=fzz(i)+zzt(i)*dli ++ fxx(j)=fxx(j)+xxt(j)*dlj ++ fyy(j)=fyy(j)+yyt(j)*dlj ++ fzz(j)=fzz(j)+zzt(j)*dlj ++ ++ enddo ++ ++c complete (symmetrical) stress tensor ++ ++ stresh(4)=stresh(2) ++ stresh(7)=stresh(3) ++ stresh(8)=stresh(6) ++ ++c splice force arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(stresh,9,buffer) ++ call splice ++ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine qshake ++ ++ end module lf_rotation2_module +diff -urN dl_class_1.9.orig/srcmod/Makefile dl_class_1.9/srcmod/Makefile +--- dl_class_1.9.orig/srcmod/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/Makefile 2015-11-16 17:18:13.342474971 +0100 +@@ -0,0 +1,101 @@ ++# Master makefile for DL_POLY Classic ++# Author: W. Smith January Dec 2010 ++# ++#======================================================================= ++# Define default settings ++#======================================================================= ++ ++include ../Plumed.inc ++ ++ ++BINROOT = ../execute ++CC := $(MPICC) ++EX = DLPOLY.X ++EXE = $(BINROOT)/$(EX) ++FC := $(MPIF90) ++SHELL=/bin/sh ++TYPE=par ++ ++#===================================================================== ++# Define object files ++ ++OBJ_MOD = parse_module.o setup_module.o error_module.o \ ++ site_module.o config_module.o pair_module.o utility_module.o \ ++ metafreeze_module.o solvation_module.o tether_module.o \ ++ vdw_module.o property_module.o rigid_body_module.o \ ++ angles_module.o bonds_module.o shake_module.o \ ++ inversion_module.o dihedral_module.o core_shell_module.o \ ++ exclude_module.o ewald_module.o coulomb_module.o\ ++ external_field_module.o four_body_module.o \ ++ hkewald_module.o metal_module.o ensemble_tools_module.o \ ++ temp_scalers_module.o three_body_module.o spme_module.o \ ++ tersoff_module.o neu_coul_module.o \ ++ nlist_builders_module.o forces_module.o \ ++ lf_motion_module.o lf_rotation1_module.o \ ++ lf_rotation2_module.o vv_motion_module.o \ ++ vv_rotation1_module.o vv_rotation2_module.o \ ++ pmf_module.o integrator_module.o optimiser_module.o \ ++ hyper_dynamics_module.o driver_module.o \ ++ define_system_module.o ++ ++OBJ_SRC = dlpoly.o ++ ++OBJ_PAR = basic_comms.o merge_tools.o pass_tools.o ++ ++#===================================================================== ++# Define targets ++all: ++ @echo "Error - please specify a target machine!" ++ @echo "Permissible targets for this Makefile are:" ++ @echo " " ++ @echo "gfortran (parallel)" ++ @echo "woodcrest (parallel)" ++ @echo " " ++ @echo "Please examine Makefile for details" ++ ++# system specific targets follow : ++ ++#================== GNU Fortran, MPI version ============================== ++gfortran: ++ $(MAKE) FC="$(MPIF90)" LD="$(MPIF90) -o" \ ++ LDFLAGS="$(LDFLAGS)" \ ++ FFLAGS="-c $(FFLAGS)" \ ++ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) ++ ++#================= Woodcrest ========================================= ++woodcrest: ++ $(MAKE) LD="mpif90 -o" LDFLAGS="" \ ++ FC=mpif90 FFLAGS="-c -O3" \ ++ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) ++ ++#===================================================================== ++# Default code for parallel (MPI) execution ++ ++par: check $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) $(PLUMED_DEPENDENCIES) ++ $(LD) $(EX) $(LDFLAGS) $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) $(PLUMED_LOAD) ++ mv $(EX) $(EXE) ++ ++#===================================================================== ++# Check that a machine has been specified ++check: ++ @if test $(FC) = "undefined";\ ++ then echo "You must specify a target machine!"; \ ++ exit 99;\ ++ fi ++ ++#===================================================================== ++# Clean up the source directory ++clean: ++ rm -f $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) *.mod ++ ++#===================================================================== ++# Declare dependencies ++.f.o: ++ $(FC) $(FFLAGS) $*.f ++.c.o: ++ $(CC) -c $*.c ++ ++#===================================================================== ++# Declare dependency on module files ++ ++$(OBJ_SRC): $(OBJ_MOD) +diff -urN dl_class_1.9.orig/srcmod/Makefile.plumedbck dl_class_1.9/srcmod/Makefile.plumedbck +--- dl_class_1.9.orig/srcmod/Makefile.plumedbck 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/Makefile.plumedbck 2015-11-16 17:17:11.322040795 +0100 +@@ -0,0 +1,98 @@ ++# Master makefile for DL_POLY Classic ++# Author: W. Smith January Dec 2010 ++# ++#======================================================================= ++# Define default settings ++#======================================================================= ++ ++BINROOT = ../execute ++CC := $(MPICC) ++EX = DLPOLY.X ++EXE = $(BINROOT)/$(EX) ++FC := $(MPIF90) ++SHELL=/bin/sh ++TYPE=par ++ ++#===================================================================== ++# Define object files ++ ++OBJ_MOD = parse_module.o setup_module.o error_module.o \ ++ site_module.o config_module.o pair_module.o utility_module.o \ ++ metafreeze_module.o solvation_module.o tether_module.o \ ++ vdw_module.o property_module.o rigid_body_module.o \ ++ angles_module.o bonds_module.o shake_module.o \ ++ inversion_module.o dihedral_module.o core_shell_module.o \ ++ exclude_module.o ewald_module.o coulomb_module.o\ ++ external_field_module.o four_body_module.o \ ++ hkewald_module.o metal_module.o ensemble_tools_module.o \ ++ temp_scalers_module.o three_body_module.o spme_module.o \ ++ tersoff_module.o neu_coul_module.o \ ++ nlist_builders_module.o forces_module.o \ ++ lf_motion_module.o lf_rotation1_module.o \ ++ lf_rotation2_module.o vv_motion_module.o \ ++ vv_rotation1_module.o vv_rotation2_module.o \ ++ pmf_module.o integrator_module.o optimiser_module.o \ ++ hyper_dynamics_module.o driver_module.o \ ++ define_system_module.o ++ ++OBJ_SRC = dlpoly.o ++ ++OBJ_PAR = basic_comms.o merge_tools.o pass_tools.o ++ ++#===================================================================== ++# Define targets ++all: ++ @echo "Error - please specify a target machine!" ++ @echo "Permissible targets for this Makefile are:" ++ @echo " " ++ @echo "gfortran (parallel)" ++ @echo "woodcrest (parallel)" ++ @echo " " ++ @echo "Please examine Makefile for details" ++ ++# system specific targets follow : ++ ++#================== GNU Fortran, MPI version ============================== ++gfortran: ++ $(MAKE) FC="$(MPIF90)" LD="$(MPIF90) -o" \ ++ LDFLAGS="$(LDFLAGS)" \ ++ FFLAGS="-c $(FFLAGS)" \ ++ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) ++ ++#================= Woodcrest ========================================= ++woodcrest: ++ $(MAKE) LD="mpif90 -o" LDFLAGS="" \ ++ FC=mpif90 FFLAGS="-c -O3" \ ++ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) ++ ++#===================================================================== ++# Default code for parallel (MPI) execution ++ ++par: check $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) ++ $(LD) $(EX) $(LDFLAGS) $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) ++ mv $(EX) $(EXE) ++ ++#===================================================================== ++# Check that a machine has been specified ++check: ++ @if test $(FC) = "undefined";\ ++ then echo "You must specify a target machine!"; \ ++ exit 99;\ ++ fi ++ ++#===================================================================== ++# Clean up the source directory ++clean: ++ rm -f $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) *.mod ++ ++#===================================================================== ++# Declare dependencies ++.f.o: ++ $(FC) $(FFLAGS) $*.f ++.c.o: ++ $(CC) -c $*.c ++ ++#===================================================================== ++# Declare dependency on module files ++ ++$(OBJ_SRC): $(OBJ_MOD) +diff -urN dl_class_1.9.orig/srcmod/merge_tools.f dl_class_1.9/srcmod/merge_tools.f +--- dl_class_1.9.orig/srcmod/merge_tools.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/merge_tools.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,670 @@ ++ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for merging coordinate arrays across ++c a number of processors ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith november 1992. ++c MPI version - t. forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ use error_module ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nbuff,nsize,ierr,iatm1,iatm2 ++ integer j,i,k,jdnode,kdnode,katm1,katm2,iatm,katm ++ real*8 xxx(natms),yyy(natms),zzz(natms),buffer(nbuff) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++c check that buffer is large enough ++ ++ nsize=(natms+mxnode-1)/mxnode ++ if(nbuff.lt.6*nsize)call error(idnode,47) ++ ++c load initial transfer buffer ++ ++ j=0 ++ ++c set up this nodes atoms ++ ++ iatm1 = (idnode*natms)/mxnode + 1 ++ iatm2 = ((idnode+1)*natms)/mxnode ++ ++ iatm = iatm2-iatm1+1 ++ ++ do i=iatm1,iatm2 ++ ++ buffer(j+1)=xxx(i) ++ buffer(j+2)=yyy(i) ++ buffer(j+3)=zzz(i) ++ j=j+3 ++ ++ enddo ++ ++ ++ call gsync() ++ ++c identity of neighbour node for systolic transfer ++ ++ jdnode=mod(idnode+1,mxnode) ++ ++ do k=1,mxnode-1 ++ ++c identity of node of origin of incoming data ++ ++ kdnode=mod(idnode+mxnode-k,mxnode) ++ ++c identity of incoming atoms ++ ++ katm1 = (kdnode*natms)/mxnode + 1 ++ katm2 = ((kdnode+1)*natms)/mxnode ++ katm = katm2-katm1 + 1 ++ ++c systolic data pulse to transfer data ++ ++ call MPI_IRECV(buffer(3*nsize+1),3*nsize,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Merge_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(buffer(1),3*nsize,MPI_DOUBLE_PRECISION,jdnode, ++ x Merge_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++c merge the incoming data into current arrays ++ ++ j=3*nsize ++ ++ do i=katm1,katm2 ++ ++ xxx(i)=buffer(j+1) ++ yyy(i)=buffer(j+2) ++ zzz(i)=buffer(j+3) ++ j=j+3 ++ ++ enddo ++ ++c shift new data to start of buffer ++ ++ do i=1,3*nsize ++ ++ buffer(i)=buffer(3*nsize+i) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for merging together coordinate arrays ++c across a number of processors during rigid body algorithm ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - t.forester november 1993 ++c systolic pulse version. T3D t.forester sept 1994 ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ logical safe ++ integer idnode,mxnode,natms,ierr,i,j,k,l,mxb,nout,nin ++ integer nin1,jdnode,j1,kdnode ++ integer lstme(natms) ++ real*8 xxx(mxatms),yyy(mxatms),zzz(mxatms),buffer(mxbuff) ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++ ++ safe =.true. ++ ++c load up buffers ++ ++ j=1 ++ l=1 ++ do while(lstme(l).gt.0.and.l.le.natms) ++ ++ i=lstme(l) ++ buffer(j+1)=dble(i) ++ buffer(j+2)=xxx(i) ++ buffer(j+3)=yyy(i) ++ buffer(j+4)=zzz(i) ++ j=j+4 ++ l=l+1 ++ ++ enddo ++ ++c length of message ++ ++ buffer(1) = dble(j) ++ ++c array position for incoming messages ++ ++ mxb = mxbuff/2 ++ ++c load initial transfer buffer ++ ++ call gsync() ++ ++c identity of neighbour node for systolic transfer ++ ++ jdnode=mod(idnode+1,mxnode) ++ ++ do k=1,mxnode-1 ++ ++c identity of node of origin of incoming data ++ ++ kdnode=mod(idnode+mxnode-k,mxnode) ++ ++c out going message size ++ ++ nout = nint(buffer(1)) ++ ++ call MPI_IRECV(nin,1,MPI_INTEGER, ++ x MPI_ANY_SOURCE,Merge1_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(nout,1,MPI_INTEGER,jdnode, ++ x Merge1_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++ call MPI_IRECV(buffer(mxb),nin,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Merge1_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(buffer(1),nout,MPI_DOUBLE_PRECISION,jdnode, ++ x Merge1_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++c check buffer array not exceeded ++ ++ if(nin.gt.mxbuff-mxb) safe =.false. ++ ++c position of first data element in incoming array ++ ++ nin1 = (nin-1)/4 ++ j = mxb+1 ++ ++ do j1=1,nin1 ++ ++ i = nint(buffer(j)) ++ xxx(i)=buffer(j+1) ++ yyy(i)=buffer(j+2) ++ zzz(i)=buffer(j+3) ++ j=j+4 ++ ++ enddo ++ ++c shift new data to start of buffer ++ ++ do i=1,nin ++ ++ buffer(i)=buffer(mxb-1+i) ++ ++ enddo ++ ++ enddo ++ ++c global check ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,47) ++ ++ return ++ end ++ ++ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for merging coordinate arrays across ++c a number of processors ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t.forester february 1994 ++c T3D version - sept 1994 t.forester ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c********************************************************************* ++ ++ use error_module ++ ++ implicit none ++ ++ integer idnode,mxnode,ngrp,nbuff,ierr,nsize,i,j,igrp1,igrp2 ++ integer k,jdnode,kdnode,kgrp1,kgrp2 ++ real*8 q0(ngrp),q1(ngrp),q2(ngrp),q3(ngrp),buffer(nbuff) ++ ++ include "comms.inc" ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++ ++c check that buffer is large enough ++ ++ nsize=(ngrp+mxnode-1)/mxnode ++ if(nbuff.lt.8*nsize)call error(idnode,47) ++ ++c load initial transfer buffer ++ ++ j=0 ++ ++ igrp1 = (idnode*ngrp)/mxnode+1 ++ igrp2 = ((idnode+1)*ngrp)/mxnode ++ ++ do i=igrp1,igrp2 ++ ++ buffer(j+1)=q0(i) ++ buffer(j+2)=q1(i) ++ buffer(j+3)=q2(i) ++ buffer(j+4)=q3(i) ++ j=j+4 ++ ++ enddo ++ ++ call gsync() ++ ++c identity of neighbour node for systolic transfer ++ ++ jdnode=mod(idnode+1,mxnode) ++ ++ do k=1,mxnode-1 ++ ++c identity of node of origin of incoming data ++ ++ kdnode=mod(idnode+mxnode-k,mxnode) ++ ++c identity of incoming groups ++ ++ kgrp1 = (kdnode*ngrp)/mxnode+1 ++ kgrp2 = ((kdnode+1)*ngrp)/mxnode ++ ++ call MPI_IRECV(buffer(4*nsize+1),4*nsize,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Merge4_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(buffer(1),4*nsize,MPI_DOUBLE_PRECISION,jdnode, ++ x Merge4_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++c merge the incoming data into current arrays ++ ++ j=4*nsize ++ ++ do i=kgrp1,kgrp2 ++ ++ q0(i)=buffer(j+1) ++ q1(i)=buffer(j+2) ++ q2(i)=buffer(j+3) ++ q3(i)=buffer(j+4) ++ j=j+4 ++ ++ enddo ++ ++c shift new data to start of buffer ++ ++ do i=1,4*nsize ++ ++ buffer(i)=buffer(4*nsize+i) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine shlmerge(idnode,mxnode,ntshl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for merging core-shell velocity data ++c to restore data replication on all nodes ++c ++c copyright - daresbury laboratory 1993 ++c author - w. smith february 1993 ++c MPI version - w. smith june 1995 ++c CPP version - w. smith june 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use config_module ++ use core_shell_module ++ use error_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer idnode,mxnode,ntshl,ierr,i,j,k,n,m,ishl1,ishl2,nsize ++ integer jdnode,kshl1,kshl2,kdnode ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++c check that buffer is large enough ++ ++ nsize=8*((ntshl+mxnode-1)/mxnode) ++ ++ if(mxbuff.lt.2*nsize)call error(idnode,425) ++ ++c block indices ++ ++ ishl1 = (idnode*ntshl)/mxnode+1 ++ ishl2 = ((idnode+1)*ntshl)/mxnode ++ ++c load initial transfer buffer ++ ++ n=0 ++ m=0 ++ ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++c indices of core and shell ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ buffer(n+1)=dble(i) ++ buffer(n+2)=dble(j) ++ buffer(n+3)=vxx(i) ++ buffer(n+4)=vyy(i) ++ buffer(n+5)=vzz(i) ++ buffer(n+6)=vxx(j) ++ buffer(n+7)=vyy(j) ++ buffer(n+8)=vzz(j) ++ n=n+8 ++ ++ enddo ++ ++ call gsync() ++ ++c identity of neighbour node for systolic transfer ++ ++ jdnode=mod(idnode+1,mxnode) ++ ++ do k=1,mxnode-1 ++ ++c identity of node of origin of incoming data ++ ++ kdnode=mod(idnode+mxnode-k,mxnode) ++ ++c systolic data pulse to transfer data ++ ++ call MPI_IRECV(buffer(nsize+1),nsize,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Shell_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(buffer(1),nsize,MPI_DOUBLE_PRECISION,jdnode, ++ x Shell_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++c merge the incoming data into current arrays ++ ++ n=nsize ++ ++c block indices ++ ++ kshl1 = (kdnode*ntshl)/mxnode+1 ++ kshl2 = ((kdnode+1)*ntshl)/mxnode ++ ++ do m=kshl1,kshl2 ++ ++ i=nint(buffer(n+1)) ++ j=nint(buffer(n+2)) ++ ++ vxx(i)=buffer(n+3) ++ vyy(i)=buffer(n+4) ++ vzz(i)=buffer(n+5) ++ vxx(j)=buffer(n+6) ++ vyy(j)=buffer(n+7) ++ vzz(j)=buffer(n+8) ++ ++ n=n+8 ++ ++ enddo ++ ++c shift new data to start of buffer ++ ++ do i=1,nsize ++ ++ buffer(i)=buffer(nsize+i) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for passing coordinate updates between ++c nodes during the shake iteration cycle ++c ++c parallel replicated data algorithm ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith august 1992. ++c MPI version - t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ integer idnode, mxnode, natms,ierr,i,k,j0,k0,n,jdnode,j ++ integer lishap(mxlshp),lashap(mxproc) ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++ real*8 xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ real*8 txx(mxatms),tyy(mxatms),tzz(mxatms) ++ real*8 buffer(mxbuff) ++ ++c store increments to be transferred ++ ++ do i=1,natms ++ ++ txx(i)=xxt(i) ++ tyy(i)=yyt(i) ++ tzz(i)=zzt(i) ++ ++ enddo ++ ++c transfer coordinate data to all nodes ++ ++ call gsync() ++ ++ do k=1,mxnode-1 ++ ++ i=0 ++ j0=0 ++ if(k.gt.1)j0=lashap(k-1) ++ ++ do j=j0+1,lashap(k) ++ ++ buffer(i+1)=txx(lishap(j)) ++ buffer(i+2)=tyy(lishap(j)) ++ buffer(i+3)=tzz(lishap(j)) ++ i=i+3 ++ ++ enddo ++ ++c inter node communication ++ ++ k0=0 ++ ++ if(k+1.lt.mxnode)k0=lashap(mxnode-k-1) ++ n=3*(lashap(mxnode-k)-k0) ++ jdnode=mod(idnode+k,mxnode) ++ ++c check for zero length messages ++ ++ if(n.gt.0) call MPI_IRECV(buffer(i+1),n,MPI_DOUBLE_PRECISION, ++ x MPI_ANY_SOURCE,Shmove_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ if(i.gt.0) call MPI_SEND(buffer(1),i,MPI_DOUBLE_PRECISION, ++ x jdnode,Shmove_tag+k,MPI_COMM_WORLD,ierr) ++ ++ if(n.gt.0) call MPI_WAIT(request,status,ierr) ++ ++c consolidate transferred data ++ ++ do j=k0+1,lashap(mxnode-k) ++ ++ xxt(lishap(j))=xxt(lishap(j))+buffer(i+1) ++ yyt(lishap(j))=yyt(lishap(j))+buffer(i+2) ++ zzt(lishap(j))=zzt(lishap(j))+buffer(i+3) ++ i=i+3 ++ ++ enddo ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for splicing together coordinate arrays ++c across a number of processors during shake algorithm ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - w. smith march 1993 ++c ++c second version of splice ++c ++c********************************************************************* ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ integer idnode,natms,listme,listot,j,n3,i,lastot ++ real*8 xxx,yyy,zzz,buffer ++ ++ dimension listme(mxatms),listot(mxatms) ++ dimension xxx(natms),yyy(natms),zzz(natms) ++ dimension buffer(mxbuff) ++ ++c check buffer size ++ ++ if(mxbuff.lt.6*natms) call error(idnode,190) ++ ++c load initial transfer buffers ++ ++ j=3*natms ++ n3=3*natms ++ ++ do i=1,natms ++ ++ if(listot(i).gt.0)then ++ ++ if(listme(i).gt.0)then ++ ++ buffer(j+1)=xxx(i) ++ buffer(j+2)=yyy(i) ++ buffer(j+3)=zzz(i) ++ ++ else ++ ++ buffer(j+1)=0.d0 ++ buffer(j+2)=0.d0 ++ buffer(j+3)=0.d0 ++ ++ endif ++ ++ j=j+3 ++ ++ endif ++ ++ enddo ++ ++ lastot=j-n3 ++ ++c splice constraint coordinates ++ ++ if(lastot.gt.0) call gdsum(buffer(n3+1),lastot,buffer(1)) ++ ++c reconstitute coordinate arrays ++ ++ j=n3 ++ ++ do i=1,natms ++ ++ if(listot(i).gt.0)then ++ ++ xxx(i)=buffer(j+1)/dble(listot(i)) ++ yyy(i)=buffer(j+2)/dble(listot(i)) ++ zzz(i)=buffer(j+3)/dble(listot(i)) ++ ++ j=j+3 ++ ++ endif ++ ++ enddo ++ ++ return ++ end +diff -urN dl_class_1.9.orig/srcmod/metafreeze_module.f dl_class_1.9/srcmod/metafreeze_module.f +--- dl_class_1.9.orig/srcmod/metafreeze_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/metafreeze_module.f 2011-07-26 18:53:41.000000000 +0200 +@@ -0,0 +1,3990 @@ ++ module metafreeze_module ++ ++c--------------------------------------------------------------------- ++c ++c Metafreeze module for metadynamics ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c Adapted for dl_poly classic w. smith dec 2010 ++c ++c--------------------------------------------------------------------- ++ ++ implicit none ++ ++c Minimise usage by making everything private ++ ++ private ++ ++c--------------------------------------------------------------------- ++c P u b l i c R o u t i n e s ++c ... unless exposed here. ++c--------------------------------------------------------------------- ++ ++ public :: define_metadynamics ! Called to intitialise this module ++ public :: metafreeze_driver ! Called at every MD time-step ++ ++c--------------------------------------------------------------------- ++c P u b l i c V a r i a b l e s ++c--------------------------------------------------------------------- ++ ++ public :: lmetadyn ! Is this a metadynamics calculation? ++ public :: driven ! Is this atom site involved in metadynamics ++ public :: lstein,ltet,lglobpe,llocpe,ncolvar,nq4,nq6,ntet,hkey ++ public :: meta_step_int,globpe_scale,locpe_scale,ref_W_aug ++ public :: h_aug,wt_Dt ++ ++c------------------------------------ ++c Populated from CONTROL file ++c------------------------------------ ++ ++ logical,save :: lmetadyn =.false. ! Master metadynamics flag ++ ++c------------------------------------------------------- ++c Energy, virial, stress and forces from 'local' pe ++c Populated by dlpoly energy routines ++c------------------------------------------------------- ++ ++ ++ public :: eng_loc,vir_loc,stress_loc ++ public :: fxx_loc,fyy_loc,fzz_loc ++ ++c---------------------------------------------------------------------- ++c Data accumulated for local potential energy (computed elsewhere) ++c---------------------------------------------------------------------- ++ ++ real(8),save :: eng_loc,vir_loc ++ real(8),dimension(9),save :: stress_loc ++ real(8),allocatable,dimension(:),save :: fxx_loc,fyy_loc,fzz_loc ++ ++c--------------------------------------------------------------------- ++c P r i v a t e V a r i a b l e s ++c--------------------------------------------------------------------- ++ ++c---------------------------------------------------------------- ++c Collective variables and derivatives of v_aug w.r.t colvars ++c---------------------------------------------------------------- ++ ++ integer,parameter :: maxhis = 150000 ! Size of history arrays ++ real(8),allocatable,dimension(:),save :: colvar,dcolvar ++ real(8),allocatable,dimension(:),save :: colvar_scale ++ ++c---------------------------------------------------------------- ++c Positions and heights of previous Gaussians in colvar space ++c---------------------------------------------------------------- ++ ++ real(8),allocatable,dimension(:,:),save :: colvar_his ++ real(8),allocatable,dimension(:),save :: w_aug ++ ++c------------------------------ ++c Read from CONTROL file ++c------------------------------ ++ ++ integer,save :: ncolvar = 0 ! Total number of collvars ++ logical,save :: lstein =.false. ! Q4/Q6 collective variables ++ logical,save :: ltet =.false. ! Tetrahedral order parameter ++ logical,save :: lglobpe =.false. ! Global potential energy ++ logical,save :: llocpe =.false. ! Local potential energy ++ ++ integer,save :: nq4 = 0 ! Number of Q4 pair types ++ integer,save :: nq6 = 0 ! Number of Q6 pair types ++ integer,save :: ntet = 0 ! Number of zeta triplets ++ ++ real(8),save :: globpe_scale = 1.0d0 ! Scaling factors for local ++ real(8),save :: locpe_scale = 1.0d0 ! and global pe colvars ++ ++ real(8),save :: ref_W_aug=1.0d0 ! Reference Gaussian height ++ real(8),save :: h_aug=1.0d0 ! Gaussian width ++ integer,save :: hkey=0 ! Height control scheme ++ real(8),save :: wt_Dt=100.0d0 ! "Well-tempered" parameter ++ integer,save :: meta_step_int=5 ! interval between depositions ++ ++c---------------------------------------- ++c Read from STEINHARDT or TETRAHEDRAL ++c---------------------------------------- ++ ++c Global Steinhardt order parameters ++ ++ real(8),allocatable,dimension(:),save :: q4_global ++ real(8),allocatable,dimension(:),save :: q6_global ++ ++c Global Tetrahedral order parameters ++ ++ real(8),allocatable,dimension(:),save :: zeta_global ++ ++c Bookkeeping arrays for order parameter computation ++ ++ character(8),allocatable,dimension(:,:),save :: q4label ++ character(8),allocatable,dimension(:,:),save :: q6label ++ character(8),allocatable,dimension(:),save :: zetalabel ++ ++c Inner and outer cutoffs ++ ++ real(8),allocatable,dimension(:,:),save :: q4cutoff ++ real(8),allocatable,dimension(:,:),save :: q6cutoff ++ real(8),allocatable,dimension(:,:),save :: zetacutoff ++ ++c Scaling factors for q4 and q6 ++ ++ real(8),allocatable,dimension(:),save :: q4scale ++ real(8),allocatable,dimension(:),save :: q6scale ++ real(8),allocatable,dimension(:),save :: zetascale ++ ++c Number of nearest neighbours for q4, q6 and zeta ++ ++ integer,allocatable,dimension(:),save :: q4nn,q6nn ++ integer,allocatable,dimension(:),save :: zetann ++ ++c------------------------------------------------------------ ++c Arrays holding data for computation of order parameters ++c------------------------------------------------------------ ++ ++c Steinhardt site-site interaction arrays ++ ++ integer,allocatable,dimension(:,:),save :: q4site ++ integer,allocatable,dimension(:,:),save :: q6site ++ integer,allocatable,dimension(:) ,save :: zetasite ++ ++c Number of included sites ++ ++ integer,allocatable,dimension(:),save :: q4ninc ++ integer,allocatable,dimension(:),save :: q6ninc ++ integer,allocatable,dimension(:),save :: zetaninc ++ ++c Real and imaginary parts of q4bar and q6bar ++ ++ real(8),allocatable,dimension(:,:),save :: ReQ6bar,ImQ6bar ++ real(8),allocatable,dimension(:,:),save :: ReQ4bar,ImQ4bar ++ ++c Max number of entries in co-ordination shell ++ ++ integer,parameter :: mxflist = 50 ++ integer :: mxninc ++ ++c Full neighbour list for Tetrahedral order parameter ++ ++ integer,allocatable,dimension(:) ,save :: nflist ++ integer,allocatable,dimension(:,:),save :: flist ++ ++c------------------------------------- ++c Internal bookkeeping ++c------------------------------------- ++ ++ logical,allocatable,dimension(:),save :: driven ! Metadynamics option ++ integer,save :: meta_step=1 ! Current metadynamics step number ++ real(8),save :: meta_energy ! Value of metadynamics bias potential ++ ++ integer,save :: wl_nbins=30 ! Number of bins for WL recursion ++ integer,save :: wl_cycle=0 ! Current WL cycle ++ real(8),save :: wl_range=0.175 ! range of WL ++ real(8),allocatable,dimension(:),save :: wl_bin ! WL bins ++ ++c-------------------------------------- ++c Miscellaneous internal variables ++c-------------------------------------- ++ ++ integer,allocatable,dimension(:) :: buff ! Comms buffer ++ ++c File units ++ ++ integer,save :: stn = 91 ! STEINHARDT ++ integer,save :: mtd = 92 ! METADYNAMICS ++ integer,save :: zta = 93 ! ZETA ++ integer,save :: wlb = 94 ! WL_BINS.DAT ++ ++c Error flag ++ ++ integer,dimension(100) :: ierr = 0 ++ ++c Local store of comms variables ++c Assuming no task farming, comms will require changing if farmed ++ ++ integer, save :: myrank,commsize ++ logical, save :: onroot ++ real(8),save :: kt ++ ++ contains ++ ++ Subroutine Metafreeze_Driver ++ x (imcon,natms,temp,nstep,engcfg,virtot,engord,virord) ++ ++c--------------------------------------------------------------------- ++c Top level metadynamics routine called after evaluation of all ++c other energetic and force terms within the main molecular ++c dynamics loop. ++c ++c 1. Computes the ncolvar order parameters ++c 2. Deposits a new Gaussian at the current collective variables ++c as the current number of steps reaches meta_step_int ++c 3. Computed the bias potential and its derivative w.r.t. the ++c ncolvar collective variables. ++c 4. Computes the forces stresses and virial resulting from the ++c bias ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ use setup_module, only : boltz ++ use config_module, only : fxx,fyy,fzz,stress ++ ++ implicit none ++ ++ integer,intent(in) :: nstep,imcon,natms ++ real(8),intent(in) :: engcfg,virtot,temp ++ real(8),intent(out) :: engord,virord ++ ++c Local variables ++ ++ integer :: k,iq,itet,ibin,nfail,my_meta_step ++ integer,save :: nlastg = 0 ++ real(8) :: height,buff1,wl_mean ++ logical :: flat,safe ++ ++c------------------------------------------------------ ++c Compute order parameters / collective variables ++c------------------------------------------------------ ++ ++c Steinhardt order parameters ++ ++ if ( nq4>0.or.nq6>0 ) call compute_steinhardt(imcon,natms) ++ ++ k = 1 ++ do iq = 1,nq4 ++ colvar(k) = q4_global(iq) ++ k = k + 1 ++ end do ++ do iq = 1,nq6 ++ colvar(k) = q6_global(iq) ++ k = k + 1 ++ end do ++ ++c Tetrahedral order parameters ++ ++ if ( ntet > 0 ) then ++ call compute_tet_nlist(imcon,natms) ++ call compute_tetrahedral(imcon,natms) ++ end if ++ ++ do itet = 1,ntet ++ colvar(k) = zeta_global(itet) ++ k = k + 1 ++ end do ++ ++c Energy order parameters ++ ++ if (lglobpe) then ++ colvar(k) = engcfg ++ k = k + 1 ++ end if ++ if (llocpe) then ++ ++c Global reduction of local virial and energy ++ ++ if ( commsize > 1 ) call gdsum(eng_loc,1,buff1) ++ if ( commsize > 1 ) call gdsum(vir_loc,1,buff1) ++ colvar(k) = eng_loc ++ k = k + 1 ++ end if ++ ++ if ( k-1/=ncolvar ) call Mfrz_Error(2500,0.d0) ++ ++ if ( hkey==1 ) then ++ k = int(dble(wl_nbins)*colvar(1)/wl_range) + 1 ++ if ( k < wl_nbins) wl_bin(k) = wl_bin(k) + 1.0d0 ++ end if ++ ++c-------------------------------------------------------- ++c Deposit a new Gaussian if now is the correct time ++c-------------------------------------------------------- ++ ++ if ( (mod(nstep,meta_step_int)==0).and.(nstep>nlastg) ) then ++ nlastg = nstep ! Avoid multiple depositions at the ++ ! same timestep (relaxed shell model) ++ ++ select case (hkey) ++ ++ case(0) ++ ++c Always deposit Gaussians of the same height ++ ++ height = ref_W_aug ++ ++ case(1) ++ ++c Wang-Landau style recursion ++ ++ open(unit=wlb,file='WL_BINS.DAT',status='replace') ++ ++ do ibin = 1,wl_nbins ++ write(wlb,*)ibin,wl_bin(ibin) ++ end do ++ ++ close(wlb) ++ ++ if ( ncolvar/=1 ) then ++ call Mfrz_Error(2501,0.d0) ++ else ++ ++ height = ref_W_aug*(0.5d0**dble(wl_cycle)) ++ ++ nfail = 0 ++ wl_mean = 0.d0 ++ do ibin = 6,wl_nbins-5 ++ wl_mean = wl_mean + wl_bin(ibin) ++ nfail = nfail + 1 ++ end do ++ wl_mean = wl_mean/dble(nfail) ++ ++ nfail = 0 ++ flat = .true. ++ do ibin = 6,wl_nbins-5 ++ if ( wl_bin(ibin) < 0.8d0*wl_mean ) then ++ if ( nfail > 2 ) flat = .false. ++ nfail = nfail + 1 ++ end if ++ end do ++ ++ if ( flat.and.(sum(wl_bin)>50.0d0) ) then ++ wl_cycle = wl_cycle + 1 ++ wl_bin = 0.0d0 ++ end if ++ ++ height = ref_W_aug*(0.5d0**dble(wl_cycle)) ++ ++ end if ++ ++ case(2) ++ ++c Well-tempered metadynamics ++ ++ meta_energy = 0.0d0 ++ call compute_bias_potential() ++ ++ height = ref_W_aug*exp(-meta_energy/wt_Dt) ++ ++ case default ++ ++ call Mfrz_Error(2502,0.d0) ++ ++ end select ++ ++ call deposit_gaussian(height,temp) ++ my_meta_step = (meta_step-1)/commsize + 1 ++ safe = ( maxhis >= my_meta_step ) ++ call gstate(safe) ++ if ( .not.safe ) call Mfrz_Error(2503,0.d0) ++ ++ end if ++ ++c----------------------------------------------------------- ++c Compute the bias potential and its derivatives w.r.t. ++c to the ncolvar collective variables. ++c----------------------------------------------------------- ++ ++ call compute_bias_potential() ++ ++c----------------------------------------------------------- ++c Add in the forces, stresses and virial contributions ++c from this derivative. ++c----------------------------------------------------------- ++ ++ virord = 0.0d0 ! Zero the virial ++ ++c Must compute contributions from pe order parameters ++c first before we change any forces. ++ ++ k = nq4+nq6+ntet+1 ++ ++c Energy order parameters ++ ++ if (lglobpe) then ++ ++ fxx(:) = fxx(:)*(1.0d0+dcolvar(k)) ++ fyy(:) = fyy(:)*(1.0d0+dcolvar(k)) ++ fzz(:) = fzz(:)*(1.0d0+dcolvar(k)) ++ ++c correct for later summation: ++ ++ virord = virord+dcolvar(k)*virtot/dble(commsize) ++ stress = stress*(1.0d0+dcolvar(k)) ++ ++ end if ++ if (llocpe) then ++ ++ fxx(:) = fxx(:) + fxx_loc(:)*dcolvar(k) ++ fyy(:) = fyy(:) + fyy_loc(:)*dcolvar(k) ++ fzz(:) = fzz(:) + fzz_loc(:)*dcolvar(k) ++ ++c correct for later summation: ++ ++ virord = virord + dcolvar(k)*vir_loc/dble(commsize) ++ stress = stress + stress_loc*dcolvar(k) ++ ++ end if ++ ++c Steinhardt order parameters ++ ++ if ( nq4>0.or.nq6>0 ) call ++ x compute_steinhardt_forces(imcon,natms,engord,virord) ++ ++c Tetrahedral order parameters ++ ++ if ( ntet > 0 ) call ++ x compute_tetrahedral_forces(imcon,natms,engord,virord) ++ ++c global reduction of virord ++ ++ if ( commsize > 1 ) call gdsum(virord,1,buff1) ++ ++ engord = meta_energy ++ ++ return ++ ++ end Subroutine Metafreeze_Driver ++ ++ Subroutine Deposit_Gaussian(height,temp) ++ ++c--------------------------------------------------------------------- ++c ++c Deposits a new Gaussian at the current collective variables and ++c appends to the METADYNAMICs file. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ use setup_module, only : boltz ++ ++ implicit none ++ ++ real(8),intent(in) :: height,temp ++ integer :: my_meta_step ++ character(11) :: fmtstring ++ ++c store current order parameters and Gaussian height ++ ++ if ( mod(meta_step-1,commsize) == myrank ) then ++ ++ my_meta_step = (meta_step-1)/commsize + 1 ++ w_aug(my_meta_step) = height ++ colvar_his(:,my_meta_step) = colvar(:) ++ ++ end if ++ ++ if (onroot) then ++ ++c Create format string ++ ++ write(fmtstring,'("(I8,",I1,"E15.6)")')ncolvar+1 ++ ++c write METADYNAMICS file ++ ++ open(unit=mtd,file='METADYNAMICS',status='old',position= ++ x 'append',iostat=ierr(1)) ++ write(unit=mtd,fmt=fmtstring)meta_step,colvar(:), ++ x height/(temp*boltz) ++ close(unit=mtd) ++ ++ end if ++ ++ meta_step = meta_step+1 ++ ++ return ++ ++ end Subroutine Deposit_Gaussian ++ ++ Subroutine Compute_Bias_Potential() ++ ++c--------------------------------------------------------------------- ++c ++c Computes the augmenting bias potential as a function of the ++c collective variables. Also computes the derivative of the bias ++c potential w.r.t. the collective variables required to compute ++c the metadynamics forces. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ implicit none ++ ++ integer :: istep,ic,k,my_meta_step ++ real(8) :: vsq,exp1,dWpsq ++ real(8),allocatable,dimension(:) :: buff1,buff2 ++ ++ allocate(buff1(1:2*(ncolvar+1)),stat=ierr(1)) ++ allocate(buff2(1:2*(ncolvar+1)),stat=ierr(2)) ++ ++ if (any(ierr/=0)) call Mfrz_Error(2504,0.d0) ++ ++c Set squared-width of gaussians ++ ++ dWpsq = 1.0d0/h_aug**2 ++ meta_energy = 0.0d0 ++ ++c Zero accumulators of derivative w.r.t. each order parameter ++ ++ dcolvar(:) = 0.0d0 ++ my_meta_step = (meta_step-1)/commsize + 1 ++ do istep=1,my_meta_step ++ ++ vsq = 0.0d0 ++ do ic = 1,ncolvar ++ vsq = vsq + ( colvar_scale(ic)*(colvar(ic) - ++ x colvar_his(ic,istep)) )**2 ++ end do ++ exp1 = w_aug(istep)*exp(-0.5d0*vsq*dWpsq) ++ do ic = 1,ncolvar ++ dcolvar(ic) = dcolvar(ic) - (colvar_scale(ic)**2)*exp1* ++ x (colvar(ic) - colvar_his(ic,istep))*dWpsq ++ end do ++ ++ meta_energy = meta_energy + exp1 ++ ++ end do ++ ++ buff1(1) = meta_energy ++ k = 2 ++ do ic = 1,ncolvar ++ buff1(k) = dcolvar(ic) ++ k = k + 1 ++ end do ++ ++ if ( commsize > 1 ) then ++ call gdsum(buff1,ncolvar+1,buff2) ++ end if ++ ++ meta_energy = buff1(1) ++ ++ k = 2 ++ do ic=1,ncolvar ++ dcolvar(ic) = buff1(k) ++ k = k + 1 ++ end do ++ ++ deallocate(buff1,buff2,stat=ierr(1)) ++ ++ return ++ ++ end Subroutine Compute_Bias_Potential ++ ++ Subroutine Define_Metadynamics(tm,ts,natms,temp) ++ ++c--------------------------------------------------------------------- ++c Processes the metadynamics input file. This is done in several ++c stages. ++c 1. Process the metadynamics control data read from the CONTROL ++c file, which defines the number of collective variables and ++c indicates if we need to read from auxilliary input files ++c (e.g. STEINHARDT or ZETA) which define order parameters. ++c 2. Read and process these auxilliary files. ++c 3. Process the information obtained from the CONTROL file which ++c controls the properties of the Gaussians used to build the ++c bias potential. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c Adapted w. smith - jan 2011 ++c ++c--------------------------------------------------------------------- ++ ++ use site_module ++ use config_module, only : ltype ++ use parse_module ++ ++ implicit none ++ ++ integer,intent(in) :: tm,ts,natms ++ real(8),intent(in) :: temp ++ ++c Local variables ++ ++ integer :: isite,jsite,ilin,i,iq,iatm0,iatm1,istrd,iatm,k,n,idum ++ logical :: lexist,go,safe ++ real(8) :: waug,dummy(1) ++ ++c Allocate the driven list. Modifications elsewhere in DLPOLY always ++c check if sites are driven (for accumulation of local PE) and hence ++c this should be allocated if this is a metadynamics run or not. ++ ++ allocate(driven(1:size(unqatm)),stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2505,0.d0) ++ driven = .false. ++ ++c Do nothing else if the metafreeze flag has not been set in CONTROL ++ ++ if (.not.lmetadyn) then ++ return ++ end if ++ ++c Make local copy of rank and communicator size and set onroot flag ++ ++ myrank=tm ++ commsize = ts ++ onroot = (myrank==0) ++ ++c$$$ DEBUG ++cc$$$ if (onroot) write(0,'("================================")') ++cc$$$ if (onroot) write(0,'("Available sites from site module")') ++cc$$$ if (onroot) write(0,'("================================")') ++cc$$$ if (onroot) then ++cc$$$ do isite = 1,size(unqatm) ++cc$$$ write(0,'("Site index ",i4,": ",a8)')isite,unqatm(isite) ++cc$$$ end do ++cc$$$ end if ++ ++c Cannot bias the global and local PE in the same run. ++ ++ if ( lglobpe.and.llocpe ) call Mfrz_Error(2509,0.d0) ++ ++c Allocate local force arrays if anything is driven. ++ ++ allocate(fxx_loc(1:mxatms),stat=ierr(1)) ++ allocate(fyy_loc(1:mxatms),stat=ierr(2)) ++ allocate(fzz_loc(1:mxatms),stat=ierr(3)) ++ if (any(ierr/=0)) call Mfrz_Error(2510,0.d0) ++ ++c Allocate arrays to hold collective variables ++ ++ allocate( colvar(1:ncolvar),stat=ierr(1)) ++ allocate(dcolvar(1:ncolvar),stat=ierr(2)) ++ allocate(colvar_his(1:ncolvar,1:maxhis),stat=ierr(3)) ++ allocate(colvar_scale(1:ncolvar),stat=ierr(4)) ++ allocate(w_aug(1:maxhis),stat=ierr(5)) ++ if (any(ierr/=0)) call Mfrz_Error(2511,0.d0) ++ ++c Allocate Wang-Landau bin array ++ ++ allocate(wl_bin(1:wl_nbins),stat=ierr(1)) ++ if (any(ierr/=0)) call Mfrz_Error(2512,0.d0) ++ wl_bin = 0.0d0 ++ ++c------------------------------------------------------------- ++c Process Steinhardt order parameter settings if present ++c------------------------------------------------------------- ++ ++ if ( lstein ) then ++ ++ allocate(q4label(1:2,1:nq4),stat=ierr(1)) ++ allocate(q6label(1:2,1:nq6),stat=ierr(2)) ++ allocate(q4cutoff(1:2,1:nq4),stat=ierr(3)) ++ allocate(q6cutoff(1:2,1:nq6),stat=ierr(4)) ++ allocate(q4scale(1:nq4),stat=ierr(5)) ++ allocate(q6scale(1:nq6),stat=ierr(6)) ++ allocate(q4nn(1:nq4),stat=ierr(7)) ++ allocate(q6nn(1:nq6),stat=ierr(8)) ++ allocate(q4ninc(1:nq4),stat=ierr(9)) ++ allocate(q6ninc(1:nq6),stat=ierr(10)) ++ allocate(buff(1:max(nq4,nq6)),stat=ierr(11)) ++ allocate(q4_global(1:nq4),stat=ierr(12)) ++ allocate(q6_global(1:nq6),stat=ierr(13)) ++ allocate(ReQ4Bar(-4:+4,1:nq4),stat=ierr(14)) ++ allocate(ImQ4Bar(-4:+4,1:nq4),stat=ierr(15)) ++ allocate(ReQ6Bar(-6:+6,1:nq6),stat=ierr(16)) ++ allocate(ImQ6Bar(-6:+6,1:nq6),stat=ierr(17)) ++ if (any(ierr/=0)) call Mfrz_Error(2515,0.d0) ++ ++c Open STEINHARDT file and process ++ ++ if (onroot) then ++ open(unit=stn,file='STEINHARDT',status='old',iostat=ierr(1)) ++ else ++ ierr(1)=0 ++ endif ++ call gisum(ierr(1),1,ierr(2)) ++ if ( ierr(1)/=0 ) call Mfrz_Error(2516,0.d0) ++ ++ ilin = 1 ++ safe=.true. ++ if (nq4>0) then ++ call getrec(safe,myrank,stn) ! Ignore q4 comment line ++ ilin = ilin + 1 ++ do i = 1,nq4 ++ call getrec(safe,myrank,stn) ++ if (safe) then ++ call getword(q4label(1,i),record,8,lenrec) ++ call getword(q4label(2,i),record,8,lenrec) ++ q4cutoff(1,i)=dblstr(record,lenrec,idum) ++ q4cutoff(2,i)=dblstr(record,lenrec,idum) ++ q4scale(i)=dblstr(record,lenrec,idum) ++ q4nn(i)=intstr(record,lenrec,idum) ++ ierr(ilin)=0 ++ else ++ ierr(ilin)=1 ++ endif ++ ilin = ilin + 1 ++ end do ++ end if ++ if (nq6>0) then ++ call getrec(safe,myrank,stn) ! Ignore q6 comment line ++ ilin = ilin + 1 ++ do i = 1,nq6 ++ call getrec(safe,myrank,stn) ++ if (safe) then ++ call getword(q6label(1,i),record,8,lenrec) ++ call getword(q6label(2,i),record,8,lenrec) ++ q6cutoff(1,i)=dblstr(record,lenrec,idum) ++ q6cutoff(2,i)=dblstr(record,lenrec,idum) ++ q6scale(i)=dblstr(record,lenrec,idum) ++ q6nn(i)=intstr(record,lenrec,idum) ++ ierr(ilin)=0 ++ else ++ ierr(ilin)=1 ++ endif ++ ilin = ilin + 1 ++ end do ++ end if ++ if (onroot) close(unit=stn) ++ ++ call gisum(ierr(1),ilin-1,ierr(ilin)) ++ do i = 1,ilin-1 ++ if (ierr(i)/=0) then ++ call Mfrz_Error(2521,dble(i)) ++ end if ++ end do ++ ++c Create array indicating which site-site connections use ++c which set of q4 cut-offs, scaling factors and num neighbours. ++ ++ allocate(q4site(1:size(unqatm),1:size(unqatm)),stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2517,0.d0) ++ q4site(:,:) = 0 ++ ++ do isite = 1,size(unqatm) ++ do jsite = isite,size(unqatm) ++ do iq = 1,nq4 ++ if ((q4label(1,iq)==unqatm(isite)).and. ++ x q4label(2,iq)==unqatm(jsite)) then ++ q4site(jsite,isite) = iq ++ q4site(isite,jsite) = iq ++ driven(jsite) = .true. ++ driven(isite) = .true. ++ end if ++ end do ++ end do ++ end do ++ ++ allocate(q6site(1:size(unqatm),1:size(unqatm)),stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2518,0.d0) ++ q6site(:,:) = 0 ++ do isite = 1,size(unqatm) ++ do jsite = isite,size(unqatm) ++ do iq = 1,nq6 ++ if ((q6label(1,iq)==unqatm(isite)).and. ++ x q6label(2,iq)==unqatm(jsite)) then ++ q6site(jsite,isite) = iq ++ q6site(isite,jsite) = iq ++ driven(jsite) = .true. ++ driven(isite) = .true. ++ end if ++ end do ++ end do ++ end do ++ ++c Count number of included sites ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ q4ninc = 0 ++ q6ninc = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ isite = ltype(iatm) ++ ++ do iq = 1,nq4 ++ if (unqatm(isite)==q4label(1,iq)) q4ninc(iq) = q4ninc(iq) + 1 ++ end do ++ do iq = 1,nq6 ++ if (unqatm(isite)==q6label(1,iq)) q6ninc(iq) = q6ninc(iq) + 1 ++ end do ++ ++ end do ++ ++ if ( commsize > 0 ) then ++ if (nq4>0) call gisum(q4ninc,nq4,buff(1:nq4)) ++ if (nq6>0) call gisum(q6ninc,nq6,buff(1:nq6)) ++ end if ++ ++ deallocate(buff,stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2519,0.d0) ++ ++ end if ! end if steinhardt order parameters ++ ++ if ( ltet ) then ++ ++ allocate(zetacutoff(1:2,1:ntet),stat=ierr(1)) ++ allocate(zeta_global(1:ntet),stat=ierr(2)) ++ allocate(zetascale(1:ntet),stat=ierr(3)) ++ allocate(zetalabel(1:ntet),stat=ierr(4)) ++ allocate(zetann(1:ntet),stat=ierr(5)) ++ allocate(zetaninc(1:ntet),stat=ierr(6)) ++ allocate(buff(1:ntet),stat=ierr(7)) ++ if (any(ierr/=0)) call Mfrz_Error(2522,0.d0) ++ ++c Open ZETA file and process ++ ++ if (onroot) then ++ open(unit=zta,file='ZETA',status='old',iostat=ierr(1)) ++ else ++ ierr(1)=0 ++ endif ++ call gisum(ierr(1),1,ierr(2)) ++ if ( ierr(1)/=0 ) call Mfrz_Error(2523,0.d0) ++ ++ ilin = 1 ++ safe=.true. ++ if (ntet>0) then ++ call getrec(safe,myrank,zta) ! Ignore comment line ++ ilin = ilin + 1 ++ do i = 1,ntet ++ read(unit=zta,fmt=*,iostat=ierr(ilin)) ++ x zetalabel(i),zetacutoff(:,i),zetascale(i),zetann(i) ++ call getrec(safe,myrank,zta) ++ if (safe) then ++ call getword(zetalabel(i),record,8,lenrec) ++ zetacutoff(1,i)=dblstr(record,lenrec,idum) ++ zetacutoff(2,i)=dblstr(record,lenrec,idum) ++ zetascale(i)=dblstr(record,lenrec,idum) ++ zetann(i)=intstr(record,lenrec,idum) ++ ierr(ilin)=0 ++ else ++ ierr(ilin)=1 ++ endif ++ ilin = ilin + 1 ++ end do ++ end if ++ if (onroot) close(unit=zta) ++ ++ call gisum(ierr(1),ilin-1,ierr(ilin)) ++ do i = 1,ilin-1 ++ if (ierr(i)/=0) then ++ call Mfrz_Error(2529,dble(i)) ++ end if ++ end do ++ ++c Create array indicating which site-site connections use ++c which set of q4 cut-offs, scaling factors and num neighbours. ++ ++ allocate(zetasite(1:size(unqatm)),stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2524,0.d0) ++ zetasite(:) = 0 ++ ++ do isite = 1,size(unqatm) ++ do iq = 1,ntet ++ if (zetalabel(iq)==unqatm(isite)) then ++ zetasite(isite) = iq ++ driven(isite) = .true. ++ end if ++ end do ++ end do ++ ++c Count number of included sites ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ zetaninc(:) = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ isite = ltype(iatm) ++ ++ do iq = 1,ntet ++ if (unqatm(isite)==zetalabel(iq)) ++ x zetaninc(iq) = zetaninc(iq) + 1 ++ end do ++ end do ++ ++ if (commsize>1) then ++ if (ntet>0) call gisum(zetaninc,ntet,buff) ++ end if ++ ++c$$$ do iq = 1,ntet ++c$$$ write(0,'("Number of sites for zeta type ",I5," : ",I5)') ++c$$$ x iq,zetaninc(iq) ++c$$$ end do ++ ++ mxninc = max(100,2*maxval(zetaninc)/commsize) ++ allocate(nflist(1:mxninc),stat=ierr(1)) ++ allocate(flist(1:mxflist,1:mxninc),stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2525,0.d0) ++ ++ deallocate(buff,stat=ierr(1)) ++ if (ierr(1)/=0) call Mfrz_Error(2519,0.d0) ++ ++ end if ! end if tetrahedral order parameters ++ ++c Check total number of collective variables (ncolvar) matches total ++c number specified by nq4, nq6, ntet and potential energy flags. ++ ++ k = 0 ++ if (llocpe ) k = k + 1 ++ if (lglobpe ) k = k + 1 ++ k = k + ntet + nq4 + nq6 ++ if ( k /= ncolvar ) call Mfrz_Error(2527,0.d0) ++ ++c populate colvar_scale ++ ++ k = 1 ++ do iq = 1,nq4 ++ colvar_scale(k) = q4scale(iq) ++ k = k + 1 ++ end do ++ do iq = 1,nq6 ++ colvar_scale(k) = q6scale(iq) ++ k = k + 1 ++ end do ++ do iq = 1,ntet ++ colvar_scale(k) = zetascale(iq) ++ k = k + 1 ++ end do ++ if (lglobpe) then ++ colvar_scale(k) = globpe_scale ++ k = k + 1 ++ end if ++ if (llocpe) then ++ colvar_scale(k) = locpe_scale ++ k = k + 1 ++ end if ++ ++ ++c Convert into internal units ++ ++ wt_Dt = wt_Dt*temp*boltz ++ ref_W_aug = ref_W_aug*temp*boltz ++ kt = temp*boltz ++ ++c--------------------------------------------------------------------- ++c Purge the METADYNAMICS file or re-open and read if this is a ++c restart. N.B. we assume a restart if REVOLD if present and ++c ignore keyres. ++c--------------------------------------------------------------------- ++ ++ if (onroot) then ++ inquire(file='REVOLD',exist=lexist) ++ else ++ lexist=.true. ++ endif ++ call gstate(lexist) ++ ++ if (lexist) then ++ ++c read contents of METADYNAMICS file ++ ++ if (onroot) then ++ ++ open(unit=mtd,file='METADYNAMICS',status='old',iostat=ierr(1)) ++ ++ k = 0 ++ do ++ read(unit=mtd,fmt=*,end=10)meta_step,colvar(:),waug ++ waug = waug*temp*boltz ++ if (k == 0) then ++ n = (meta_step-1)/commsize + 1 ++ colvar_his(:,n)=colvar(:) ++ w_aug(n)=waug ++ else ++ dummy(1)=dble(meta_step) ++ call csend(17947,dummy,1,k,idum) ++ call csend(17948,colvar,ncolvar,k,ierr(3)) ++ dummy(1)=waug ++ call csend(17949,dummy,1,k,ierr(4)) ++ end if ++ ++ k = k + 1 ++ if (k == commsize) k = 0 ++ end do ++ ++ 10 close(unit=mtd) ++ ++ do k=1,commsize-1 ++ dummy(1)=-dble(meta_step) ++ call csend(17947,dummy,1,k,ierr(2)) ++ end do ++ ++ else ++ ++ go = .true. ++ do while(go) ++ ++ call crecv(17947,dummy,1) ++ meta_step=nint(dummy(1)) ++ ierr(2)=0 ++ ++ if ( meta_step < 0 ) then ++ meta_step = -meta_step ++ go = .false. ++ else ++ call crecv(17948,colvar,ncolvar) ++ ierr(3)=0 ++ call crecv(17949,dummy,1) ++ waug=dummy(1) ++ ierr(4)=0 ++ n = (meta_step-1)/commsize + 1 ++ colvar_his(:,n)=colvar(:) ++ w_aug(n)=waug ++ end if ++ ++ enddo ++ ++ end if ++ call gisum(ierr(1),4,ierr(5)) ++ do i=1,4 ++ if (ierr(i)/=0) call Mfrz_Error(2531,0.d0) ++ enddo ++ meta_step = meta_step + 1 ++ ++ else ++ ++c purge any existing METADYNAMICS file ++ ++ if (onroot) then ++ ++ open(unit=mtd,file='METADYNAMICS',status='replace', ++ x iostat=ierr(1)) ++ close(unit=mtd) ++ ++ end if ++ ++ end if ++ ++ return ++ ++ end Subroutine Define_Metadynamics ++ ++ Function Fc(r,inner_cut,outer_cut) ++ ++c--------------------------------------------------------------------- ++c ++c Computes the smooth cut-off function used when computing an order ++c parameter as a function of pair separation. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ implicit none ++ ++ real(8),parameter :: Pi=3.141592653589793238462643383279502884d0 ++ real(8),intent(in) :: r,inner_cut,outer_cut ++ real(8) :: fc ++ ++ if ( r > outer_cut ) then ++ fc = 0.0d0 ++ elseif ( r > inner_cut ) then ++ fc = 0.5d0*cos((r-inner_cut)*Pi/(outer_cut-inner_cut))+0.5d0 ++ elseif ( r <= inner_cut ) then ++ fc = 1.0d0 ++ else ++ call Mfrz_Error(2532,r) ++ end if ++ ++ return ++ ++ end Function Fc ++ ++ Function Dfc(r,inner_cut,outer_cut) ++ ++c--------------------------------------------------------------------- ++c Computes the derivative of the smooth cut-off function used when ++c computing an order parameter as a function of pair separation. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley ++c ++c--------------------------------------------------------------------- ++ ++ implicit none ++ ++ real(8),parameter :: Pi=3.141592653589793238462643383279502884d0 ++ real(8),intent(in) :: r,inner_cut,outer_cut ++ real(8) :: dfc ++ ++ if ( r > outer_cut ) then ++ dfc = 0.0d0 ++ elseif ( r > inner_cut ) then ++ dfc = -0.5d0*sin((r-inner_cut)*Pi/(outer_cut-inner_cut)) ++ x *Pi/(outer_cut-inner_cut) ++ else ++ dfc = 0.0d0 ++ end if ++ ++ return ++ ++ end Function Dfc ++ ++ subroutine compute_steinhardt(imcon,natms) ++ ++c--------------------------------------------------------------------- ++c ++c Computes nq4 Q4 and nq6 Q6 global order parameters. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use setup_module, only : mxlist ++ use utility_module, only : images ++ ++ implicit none ++ ++c Arguments ++ ++ integer,intent(in) :: imcon,natms ++ ++c sqrt(pi/13) , sqrt(pi/9) , 1/3 ++ ++ real(8),parameter :: rpibtt = 0.491590249d0 ++ real(8),parameter :: rpibn = 0.590817950d0 ++ real(8),parameter :: third = 1.0d0/3.0d0 ++ ++c Prefactors for spherical harmonics with l = 6 ++ ++ real(8),parameter :: ypre6m6 = 0.48308411358006625446748d0 ++ real(8),parameter :: ypre6m5 = 1.67345245810009801701312d0 ++ real(8),parameter :: ypre6m4 = 0.35678126285399802686271d0 ++ real(8),parameter :: ypre6m3 = 0.65139048586771575166665d0 ++ real(8),parameter :: ypre6m2 = 0.32569524293385787583333d0 ++ real(8),parameter :: ypre6m1 = 0.41197551630114082055201d0 ++ real(8),parameter :: ypre6m0 = 0.06356920226762842462964d0 ++ real(8),parameter :: ypre6p1 = -0.41197551630114082055201d0 ++ real(8),parameter :: ypre6p2 = 0.32569524293385787583333d0 ++ real(8),parameter :: ypre6p3 = -0.65139048586771575166665d0 ++ real(8),parameter :: ypre6p4 = 0.35678126285399802686271d0 ++ real(8),parameter :: ypre6p5 = -1.67345245810009801701312d0 ++ real(8),parameter :: ypre6p6 = 0.48308411358006625446748d0 ++ ++c Prefactors for spherical harmonics with l = 4 ++ ++ real(8),parameter :: ypre4m4 = 0.44253269244498261159038d0 ++ real(8),parameter :: ypre4m3 = 1.25167147089835228968013d0 ++ real(8),parameter :: ypre4m2 = 0.33452327177864460416856d0 ++ real(8),parameter :: ypre4m1 = 0.47308734787878004013351d0 ++ real(8),parameter :: ypre4m0 = 0.10578554691520430930396d0 ++ real(8),parameter :: ypre4p1 = -0.47308734787878004013351d0 ++ real(8),parameter :: ypre4p2 = 0.33452327177864460416856d0 ++ real(8),parameter :: ypre4p3 = -1.25167147089835228968013d0 ++ real(8),parameter :: ypre4p4 = 0.44253269244498261159038d0 ++ ++c Maximum no. of entries in solvation list ++ ++ integer :: maxneigh ++ ++c Solvation shell information - Q4 ++ ++ real(8),allocatable,dimension(:) :: solvx4,solvy4,solvz4 ++ real(8),allocatable,dimension(:) :: solvrmag4,solvimag4,solvrsq4 ++ integer,allocatable,dimension(:) :: solvlist4,solvtype4 ++ integer :: isolvmax4 ++ ++c Solvation shell information - Q6 ++ ++ real(8),allocatable,dimension(:) :: solvx6,solvy6,solvz6 ++ real(8),allocatable,dimension(:) :: solvrmag6,solvimag6,solvrsq6 ++ integer,allocatable,dimension(:) :: solvlist6,solvtype6 ++ integer :: isolvmax6 ++ ++c separation vectors and powers thereof ++ ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ real(8) :: x,y,z ++ real(8) :: x2,y2,z2,x3,y3,z3 ++ real(8) :: x4,y4,z4,x5,y5,z5 ++ real(8) :: x6,y6,z6 ++ real(8) :: invrc,invrs ++ ++c Comms buffers ++ ++ real(8),allocatable,dimension(:) :: buff1,buff2 ++ ++c Temporaries ++ ++ real(8) :: tmpsq,f_ij,df_ij,ReYlm,ImYlm,tmpvar ++ ++c Loop counters ++ ++ integer :: iatm1,iatm0,iatm,isite,istrd,ii,isolv4,isolv6,isolv ++ integer :: idi,idj,limit,nn,k,jatm,jsite,q4type,q6type ++ integer :: itype,jtype,l,m,iq ++ ++ maxneigh = 100 ! Max number of atoms in coordination shell ++ ++ ierr = 0 ! Error flags ++ ++ allocate(xdf(1:mxlist),stat=ierr(1)) ++ allocate(ydf(1:mxlist),stat=ierr(2)) ++ allocate(zdf(1:mxlist),stat=ierr(3)) ++ ++ allocate(solvx4(1:maxneigh),stat=ierr(4)) ++ allocate(solvy4(1:maxneigh),stat=ierr(5)) ++ allocate(solvz4(1:maxneigh),stat=ierr(6)) ++ allocate(solvrmag4(1:maxneigh),stat=ierr(7)) ++ allocate(solvimag4(1:maxneigh),stat=ierr(8)) ++ allocate(solvrsq4 (1:maxneigh),stat=ierr(9)) ++ allocate(solvlist4(1:maxneigh),stat=ierr(10)) ++ allocate(solvtype4(1:maxneigh),stat=ierr(11)) ++ ++ allocate(solvx6(1:maxneigh),stat=ierr(12)) ++ allocate(solvy6(1:maxneigh),stat=ierr(13)) ++ allocate(solvz6(1:maxneigh),stat=ierr(14)) ++ allocate(solvrmag6(1:maxneigh),stat=ierr(15)) ++ allocate(solvimag6(1:maxneigh),stat=ierr(16)) ++ allocate(solvrsq6 (1:maxneigh),stat=ierr(17)) ++ allocate(solvlist6(1:maxneigh),stat=ierr(18)) ++ allocate(solvtype6(1:maxneigh),stat=ierr(19)) ++ if (any(ierr/=0)) call Mfrz_Error(2533,0.d0) ++ ++ allocate(buff1(1:18*nq4+26*nq6),stat=ierr(1)) ++ allocate(buff2(1:18*nq4+26*nq6),stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2534,0.d0) ++ ++c Zero accumulators used in Steinhardt order parameters ++ ++ ReQ6bar = 0.0d0 ++ ImQ6bar = 0.0d0 ++ ReQ4bar = 0.0d0 ++ ImQ4bar = 0.0d0 ++ ++c Set atoms looped over by current rank ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++c -------------------------------------------------------------- ++c Build a list of the required connections to iatm. This ++c differs depending on the version of DLPOLY we are using. ++c Note that excluded pairs will NOT have connections ++c computed and are therefore not included in computation ++c of these order parameters. ++c--------------------------------------------------------------- ++ ++ ii = ii + 1 ++ isite=ltype(iatm) ++ limit=lentry(ii) ++ nn = 0 ++ do k = 1,limit ++ ++ jatm = list(ii,k) ++ jsite = ltype(jatm) ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ xdf(nn)=xxx(jatm)-xxx(iatm) ++ ydf(nn)=yyy(jatm)-yyy(iatm) ++ zdf(nn)=zzz(jatm)-zzz(iatm) ++ ++ end do ++ ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ nn = 0 ++ isolvmax4 = 0 ++ isolvmax6 = 0 ++ isolv4 = 0 ++ isolv6 = 0 ++ do k = 1,limit ++ jatm = list(ii,k) ++ jsite = ltype(jatm) ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ q4type = q4site(jsite,isite) ++ q6type = q6site(jsite,isite) ++ ++ tmpsq = xdf(nn)*xdf(nn)+ydf(nn)*ydf(nn)+zdf(nn)*zdf(nn) ++ ++ if (nq4>0) then ++ ++c Add to solvation lists if within cut-off ++ ++ if ( tmpsq < q4cutoff(2,q4type)**2 ) then ++ isolv4 = isolv4 + 1 ++ solvlist4(isolv4) = jatm ++ solvrsq4(isolv4) = tmpsq ++ solvrmag4(isolv4) = sqrt(tmpsq) ++ solvimag4(isolv4) = 1.0d0/solvrmag4(isolv4) ++ solvx4(isolv4) = xdf(nn) ++ solvy4(isolv4) = ydf(nn) ++ solvz4(isolv4) = zdf(nn) ++ solvtype4(isolv4) = q4type ++ end if ++ end if ++ ++ if (nq6>0) then ++ ++c Add to solvation lists if within cut-off ++ ++ if ( tmpsq < q6cutoff(2,q6type)**2 ) then ++ isolv6 = isolv6 + 1 ++ solvlist6(isolv6) = jatm ++ solvrsq6(isolv6) = tmpsq ++ solvrmag6(isolv6) = sqrt(tmpsq) ++ solvimag6(isolv6) = 1.0d0/solvrmag6(isolv6) ++ solvx6(isolv6) = xdf(nn) ++ solvy6(isolv6) = ydf(nn) ++ solvz6(isolv6) = zdf(nn) ++ solvtype6(isolv6) = q6type ++ end if ++ end if ++ isolvmax4 = isolv4 ++ isolvmax6 = isolv6 ++ if ((isolv4>maxneigh) .or. (isolv6>maxneigh)) ++ x call Mfrz_Error(2535,0.d0) ++ ++ end do ! end loop over k ++ ++c--------------------------------------------------------- ++c Compute Q4 Steinhardt order parameters ++c--------------------------------------------------------- ++ ++ if ( (nq4>0).and.isolvmax4>0 ) then ++ ++ do isolv4 = 1,isolvmax4 ++ ++ jatm = solvlist4(isolv4) ++ itype = solvtype4(isolv4) ++ ++ invrc = solvimag4(isolv4)**6 ++ invrs = solvimag4(isolv4)**4 ++ ++ x = solvx4(isolv4) ++ y = solvy4(isolv4) ++ z = solvz4(isolv4) ++ ++ f_ij = fc(solvrmag4(isolv4),q4cutoff(1,itype), ++ x q4cutoff(2,itype)) ++ ++ x2 = x*x ++ y2 = y*y ++ z2 = z*z ++ ++ x3 = x2*x ++ y3 = y2*y ++ z3 = z2*z ++ ++ x4 = x2*x2 ++ y4 = y2*y2 ++ z4 = z2*z2 ++ ++ x5 = x4*x ++ y5 = y4*y ++ z5 = z4*z ++ ++ x6 = x4*x2 ++ y6 = y4*y2 ++ z6 = z4*z2 ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(-4) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre4m4*invrs*(x4-6.d0*x2*y2+y4) ++ ImYlm = ypre4m4*invrs*(-4.d0*x3*y+4.d0*x*y3) ++ ++ ReQ4bar(-4,itype) = ReQ4bar(-4,itype) + f_ij*ReYlm ++ ImQ4bar(-4,itype) = ImQ4bar(-4,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(-3) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre4m3*invrs*z*(x3-3.d0*x*y2) ++ ImYlm = ypre4m3*invrs*z*(-3.d0*x2*y+y3) ++ ++ ReQ4bar(-3,itype) = ReQ4bar(-3,itype) + f_ij*ReYlm ++ ImQ4bar(-3,itype) = ImQ4bar(-3,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(-2) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre4m2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) ++ ImYlm = ypre4m2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y ++ ++ ReQ4bar(-2,itype) = ReQ4bar(-2,itype) + f_ij*ReYlm ++ ImQ4bar(-2,itype) = ImQ4bar(-2,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(-1) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x ++ ImYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y ++ ++ ReQ4bar(-1,itype) = ReQ4bar(-1,itype) + f_ij*ReYlm ++ ImQ4bar(-1,itype) = ImQ4bar(-1,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(0) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre4m0*invrs*(8.d0*z4-24.d0*z2*x2-24.d0*z2*y2+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++ ReQ4bar(0,itype) = ReQ4bar(0,itype) + f_ij*ReYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(1) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre4p1*invrs*z*(-4.d0*z2+3.d0*x2+3.0d0*y2)*x ++ ImYlm = -ypre4p1*invrs*z*(-4.d0*z2+3.d0*x2+3.0d0*y2)*y ++ ++ ReQ4bar(+1,itype) = ReQ4bar(+1,itype) + f_ij*ReYlm ++ ImQ4bar(+1,itype) = ImQ4bar(+1,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(2) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre4p2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) ++ ImYlm = -ypre4p2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y ++ ++ ReQ4bar(+2,itype) = ReQ4bar(+2,itype) + f_ij*ReYlm ++ ImQ4bar(+2,itype) = ImQ4bar(+2,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(3) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre4p3*invrs*z*(x3-3.d0*x*y2) ++ ImYlm = ypre4p3*invrs*z*(3.d0*x2*y-y3) ++ ++ ReQ4bar(+3,itype) = ReQ4bar(+3,itype) + f_ij*ReYlm ++ ImQ4bar(+3,itype) = ImQ4bar(+3,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary contribution to Q4bar(4) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre4p4*invrs*(x4-6.d0*x2*y2+y4) ++ ImYlm = ypre4p4*invrs*(4.d0*x3*y-4.d0*x*y3) ++ ++ ReQ4bar(+4,itype) = ReQ4bar(+4,itype) + f_ij*ReYlm ++ ImQ4bar(+4,itype) = ImQ4bar(+4,itype) + f_ij*ImYlm ++ ++ end do ! end loop over connection list for iatm ++ ++ end if ! end if computing Q4 ++ ++c------------------------------------------------ ++c Compute Q6 Steinhardt order parameters ++c------------------------------------------------ ++ ++ if ( (nq6>0).and.isolvmax6>0 ) then ++ ++ do isolv6 = 1,isolvmax6 ++ ++ jatm = solvlist6(isolv6) ++ itype = solvtype6(isolv6) ++ ++ invrc = solvimag6(isolv6)**6 ++ invrs = solvimag6(isolv6)**4 ++ ++ x = solvx6(isolv6) ++ y = solvy6(isolv6) ++ z = solvz6(isolv6) ++ ++ f_ij = fc(solvrmag6(isolv6),q6cutoff(1,itype), ++ x q6cutoff(2,itype)) ++ ++ x2 = x*x ++ y2 = y*y ++ z2 = z*z ++ ++ x3 = x2*x ++ y3 = y2*y ++ z3 = z2*z ++ ++ x4 = x2*x2 ++ y4 = y2*y2 ++ z4 = z2*z2 ++ ++ x5 = x4*x ++ y5 = y4*y ++ z5 = z4*z ++ ++ x6 = x4*x2 ++ y6 = y4*y2 ++ z6 = z4*z2 ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-6) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m6*invrc*(x6-15.0d0*x4*y2+15.0d0*x2*y4-y6) ++ ImYlm = ypre6m6*invrc*(-6.0d0*x5*y+20.0d0*x3*y3-6.0d0*x*y5) ++ ++ ReQ6bar(-6,itype) = ReQ6bar(-6,itype) + f_ij*ReYlm ++ ImQ6bar(-6,itype) = ImQ6bar(-6,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-5) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre6m5*invrc*z*(-x5+10.0d0*x3*y2-5.0d0*x*y4) ++ ImYlm = -ypre6m5*invrc*z*(5.0d0*x4*y-10.0d0*x2*y3+y5) ++ ++ ReQ6bar(-5,itype) = ReQ6bar(-5,itype) + f_ij*ReYlm ++ ImQ6bar(-5,itype) = ImQ6bar(-5,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-4) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(x4-6.0d0*x2*y2+y4) ++ ImYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(-4.0d0*x3*y- ++ x 4.0d0*x*y3) ++ ++ ReQ6bar(-4,itype) = ReQ6bar(-4,itype) + f_ij*ReYlm ++ ImQ6bar(-4,itype) = ImQ6bar(-4,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-3) ++c---------------------------------------------------------- ++ ++ ReYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* ++ x (-x3+3.0d0*x*y2) ++ ImYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* ++ x (3.0d0*x2*y-y3) ++ ++ ReQ6bar(-3,itype) = ReQ6bar(-3,itype) + f_ij*ReYlm ++ ImQ6bar(-3,itype) = ImQ6bar(-3,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-2) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m2*invrc*(16.0d0*z4-16.0d0*z2*x2-16.0d0*z2*y2+ ++ x x4+2.0d0*x2*y2+y4)*(x2-y2) ++ ImYlm = -ypre6m2*invrc*2.0d0*(16.0d0*z4-16.0d0*z2*x2-16.0d0* ++ x z2*y2+x4+2.0d0*x2*y2+y4)*x*y ++ ++ ReQ6bar(-2,itype) = ReQ6bar(-2,itype) + f_ij*ReYlm ++ ImQ6bar(-2,itype) = ImQ6bar(-2,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(-1) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ ++ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x ++ ImYlm = -ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ ++ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y ++ ++ ReQ6bar(-1,itype) = ReQ6bar(-1,itype) + f_ij*ReYlm ++ ImQ6bar(-1,itype) = ImQ6bar(-1,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(0) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6m0*invrc*(16.0d0*z6-120.0d0*z4*x2-120.0d0*z4* ++ x y2+90.0d0*z2*x4+180.0d0*z2*x2*y2+90.0d0*z2*y4-5.0d0 ++ x *x6-15.0d0*x4*y2-15.0d0*x2*y4-5.0d0*y6) ++ ++ ReQ6bar(0,itype) = ReQ6bar(0,itype) + f_ij*ReYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(1) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6p1*invrc*z*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ ++ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x ++ ImYlm = ypre6p1*invrc*z*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ ++ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y ++ ++ ReQ6bar(1,itype) = ReQ6bar(1,itype) + f_ij*ReYlm ++ ImQ6bar(1,itype) = ImQ6bar(1,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(2) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6p2*invrc*(16.d0*z4-16.d0*z2*x2-16.d0*z2*y2+ ++ x x4+2.d0*x2*y2+y4)*(x2-y2) ++ ImYlm = 2.d0*ypre6p2*invrc*(16.d0*z4-16.d0*z2*x2-16.d0*z2*y2+ ++ x x4+2.d0*x2*y2+y4)*x*y ++ ++ ReQ6bar(2,itype) = ReQ6bar(2,itype) + f_ij*ReYlm ++ ImQ6bar(2,itype) = ImQ6bar(2,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(3) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6p3*invrc*z*(8.d0*z2-3.d0*x2-3.d0*y2)* ++ x (x3-3.d0*x*y2) ++ ImYlm = ypre6p3*invrc*z*(8.d0*z2-3.d0*x2-3.d0*y2)* ++ x (3.d0*x2*y-y3) ++ ++ ReQ6bar(3,itype) = ReQ6bar(3,itype) + f_ij*ReYlm ++ ImQ6bar(3,itype) = ImQ6bar(3,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(4) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6p4*invrc*(10.d0*z2-x2-y2)*(x4-6.d0*x2*y2+y4) ++ ImYlm = ypre6p4*invrc*(10.d0*z2-x2-y2)*(4.d0*x3*y-4.d0*x*y3) ++ ++ ReQ6bar(4,itype) = ReQ6bar(4,itype) + f_ij*ReYlm ++ ImQ6bar(4,itype) = ImQ6bar(4,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(5) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6p5*invrc*z*(x5-10.d0*x3*y2+5.d0*x*y4) ++ ImYlm = ypre6p5*invrc*z*(5.d0*x4*y-10.d0*x2*y3+y5) ++ ++ ReQ6bar(5,itype) = ReQ6bar(5,itype) + f_ij*ReYlm ++ ImQ6bar(5,itype) = ImQ6bar(5,itype) + f_ij*ImYlm ++ ++c---------------------------------------------------------- ++c Real and imaginary conribution to Q6bar(6) ++c---------------------------------------------------------- ++ ++ ReYlm = ypre6p6*invrc*(x6-15.d0*x4*y2+15.d0*x2*y4-y6) ++ ImYlm = ypre6p6*invrc*(6.d0*x5*y-20.d0*x3*y3+6.d0*x*y5) ++ ++ ReQ6bar(6,itype) = ReQ6bar(6,itype) + f_ij*ReYlm ++ ImQ6bar(6,itype) = ImQ6bar(6,itype) + f_ij*ImYlm ++ ++ end do ! end loop over connection list for iatm ++ ++ end if ! end if computing Q6 ++ ++ end do ! end loop over iatm ++ ++c----------------------------------------------- ++c Global summation of order parameters ++c----------------------------------------------- ++ ++ l = 1 ++ do itype = 1,nq4 ++ do m = -4,4 ++ buff1(l) = ReQ4bar(m,itype) ++ l = l + 1 ++ end do ++ do m = -4,4 ++ buff1(l) = ImQ4bar(m,itype) ++ l = l + 1 ++ end do ++ end do ++ do itype = 1,nq6 ++ do m = -6,6 ++ buff1(l) = ReQ6bar(m,itype) ++ l = l + 1 ++ end do ++ do m = -6,6 ++ buff1(l) = ImQ6bar(m,itype) ++ l = l + 1 ++ end do ++ end do ++ ++ if (commsize>1) call gdsum(buff1,18*nq4+26*nq6,buff2) ++ ++ l = 1 ++ do itype = 1,nq4 ++ do m = -4,4 ++ ReQ4bar(m,itype) = buff1(l) ++ l = l + 1 ++ end do ++ do m = -4,4 ++ ImQ4bar(m,itype) = buff1(l) ++ l = l + 1 ++ end do ++ end do ++ do itype = 1,nq6 ++ do m = -6,6 ++ ReQ6bar(m,itype) = buff1(l) ++ l = l + 1 ++ end do ++ do m = -6,6 ++ ImQ6bar(m,itype) = buff1(l) ++ l = l + 1 ++ end do ++ end do ++ ++c--------------------------------------------------- ++c Final computation of global order parameters ++c--------------------------------------------------- ++ ++ l = 1 ++ do iq = 1,nq4 ++ tmpvar = 0.0d0 ++ do m = 1,18 ++ tmpvar = tmpvar + buff1(l)**2 ++ l = l + 1 ++ end do ++ q4_global(iq) = 4.0d0*rpibn*sqrt(tmpvar)/ ++ x dble(q4ninc(iq)*q4nn(iq)) ++ end do ++ ++ do iq = 1,nq6 ++ tmpvar = 0.0d0 ++ do m = 1,26 ++ tmpvar = tmpvar + buff1(l)**2 ++ l = l + 1 ++ end do ++ q6_global(iq) = 4.0d0*rpibtt*sqrt(tmpvar)/ ++ x dble(q6ninc(iq)*q6nn(iq)) ++ end do ++ ++c Tidy up ++ ++ deallocate(xdf,stat=ierr(1)) ++ deallocate(ydf,stat=ierr(2)) ++ deallocate(zdf,stat=ierr(3)) ++ ++ deallocate(solvx4,stat=ierr(4)) ++ deallocate(solvy4,stat=ierr(5)) ++ deallocate(solvz4,stat=ierr(6)) ++ deallocate(solvrmag4,stat=ierr(7)) ++ deallocate(solvimag4,stat=ierr(8)) ++ deallocate(solvrsq4 ,stat=ierr(9)) ++ deallocate(solvlist4,stat=ierr(10)) ++ deallocate(solvtype4,stat=ierr(11)) ++ ++ deallocate(solvx6,stat=ierr(12)) ++ deallocate(solvy6,stat=ierr(13)) ++ deallocate(solvz6,stat=ierr(14)) ++ deallocate(solvrmag6,stat=ierr(15)) ++ deallocate(solvimag6,stat=ierr(16)) ++ deallocate(solvrsq6 ,stat=ierr(17)) ++ deallocate(solvlist6,stat=ierr(18)) ++ deallocate(solvtype6,stat=ierr(19)) ++ if (any(ierr/=0)) call Mfrz_Error(2536,0.d0) ++ ++ deallocate(buff1,stat=ierr(1)) ++ deallocate(buff2,stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2537,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Steinhardt ++ ++ Subroutine Compute_Steinhardt_Forces(imcon,natms,engord,virord) ++ ++c--------------------------------------------------------------------- ++c ++c Computes forces from nq4 Q4 and nq6 Q6 global order parameters. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use setup_module, only : mxlist ++ use utility_module, only : images ++ implicit none ++ ++c Arguments ++ ++ integer,intent(in) :: imcon,natms ++ ++ real(8),intent(inout) :: engord,virord ++ ++c sqrt(pi/13) , sqrt(pi/9) , 1/3 ++ ++ real(8),parameter :: rpibtt = 0.491590249d0 ++ real(8),parameter :: rpibn = 0.590817950d0 ++ real(8),parameter :: third = 1.0d0/3.0d0 ++ ++c Prefactors for spherical harmonics with l = 6 ++ ++ real(8),parameter :: ypre6m6 = 0.48308411358006625446748d0 ++ real(8),parameter :: ypre6m5 = 1.67345245810009801701312d0 ++ real(8),parameter :: ypre6m4 = 0.35678126285399802686271d0 ++ real(8),parameter :: ypre6m3 = 0.65139048586771575166665d0 ++ real(8),parameter :: ypre6m2 = 0.32569524293385787583333d0 ++ real(8),parameter :: ypre6m1 = 0.41197551630114082055201d0 ++ real(8),parameter :: ypre6m0 = 0.06356920226762842462964d0 ++ real(8),parameter :: ypre6p1 = -0.41197551630114082055201d0 ++ real(8),parameter :: ypre6p2 = 0.32569524293385787583333d0 ++ real(8),parameter :: ypre6p3 = -0.65139048586771575166665d0 ++ real(8),parameter :: ypre6p4 = 0.35678126285399802686271d0 ++ real(8),parameter :: ypre6p5 = -1.67345245810009801701312d0 ++ real(8),parameter :: ypre6p6 = 0.48308411358006625446748d0 ++ ++c Prefactors for speherical harmonics with l = 4 ++ ++ real(8),parameter :: ypre4m4 = 0.44253269244498261159038d0 ++ real(8),parameter :: ypre4m3 = 1.25167147089835228968013d0 ++ real(8),parameter :: ypre4m2 = 0.33452327177864460416856d0 ++ real(8),parameter :: ypre4m1 = 0.47308734787878004013351d0 ++ real(8),parameter :: ypre4m0 = 0.10578554691520430930396d0 ++ real(8),parameter :: ypre4p1 = -0.47308734787878004013351d0 ++ real(8),parameter :: ypre4p2 = 0.33452327177864460416856d0 ++ real(8),parameter :: ypre4p3 = -1.25167147089835228968013d0 ++ real(8),parameter :: ypre4p4 = 0.44253269244498261159038d0 ++ ++c Maximum no. of entries in solvation list ++ ++ integer :: maxneigh ++ ++c Solvation shell information - Q4 ++ ++ real(8),allocatable,dimension(:) :: solvx4,solvy4,solvz4 ++ real(8),allocatable,dimension(:) :: solvrmag4,solvimag4,solvrsq4 ++ integer,allocatable,dimension(:) :: solvlist4,solvtype4 ++ integer :: isolvmax4 ++ ++c Solvation shell information - Q6 ++ ++ real(8),allocatable,dimension(:) :: solvx6,solvy6,solvz6 ++ real(8),allocatable,dimension(:) :: solvrmag6,solvimag6,solvrsq6 ++ integer,allocatable,dimension(:) :: solvlist6,solvtype6 ++ integer :: isolvmax6 ++ ++c Prefactors arising from derivative of bias potential ++ ++ real(8),allocatable,dimension(:) :: q4prefactor,q6prefactor ++ ++c Separation vectors and powers thereof ++ ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ real(8) :: x,y,z ++ real(8) :: x2,y2,z2,x3,y3,z3 ++ real(8) :: x4,y4,z4,x5,y5,z5 ++ real(8) :: x6,y6,z6 ++ real(8) :: invrc,invrs,invrq ++ ++c Comms buffers ++ ++ real(8),allocatable,dimension(:) :: buff1,buff2 ++ ++c Temporaries ++ ++ real(8) :: tmpsq,f_ij,df_ij,ReYlm,ImYlm,tmpvar,invrN ++ real(8) :: fx,fy,fz,fx2,fy2,fz2,prefactor2,fx1,fy1,fz1 ++ real(8) :: strs1,strs2,strs3,strs4,strs5,strs6,strs7,strs8,strs9 ++ ++ integer :: iatm1,iatm0,iatm,isite,istrd,ii,isolv4,isolv6,isolv ++ integer :: idi,idj,limit,nn,k,jatm,jsite,q4type,q6type ++ integer :: itype,jtype,l,m,iq ++ ++ maxneigh = 500 ! Max number of atoms in coordination shell ++ ++ ierr = 0 ! Error flags ++ ++ allocate(xdf(1:mxlist),stat=ierr(1)) ++ allocate(ydf(1:mxlist),stat=ierr(2)) ++ allocate(zdf(1:mxlist),stat=ierr(3)) ++ ++ allocate(solvx4(1:maxneigh),stat=ierr(4)) ++ allocate(solvy4(1:maxneigh),stat=ierr(5)) ++ allocate(solvz4(1:maxneigh),stat=ierr(6)) ++ allocate(solvrmag4(1:maxneigh),stat=ierr(7)) ++ allocate(solvimag4(1:maxneigh),stat=ierr(8)) ++ allocate(solvrsq4 (1:maxneigh),stat=ierr(9)) ++ allocate(solvlist4(1:maxneigh),stat=ierr(10)) ++ allocate(solvtype4(1:maxneigh),stat=ierr(11)) ++ ++ allocate(solvx6(1:maxneigh),stat=ierr(12)) ++ allocate(solvy6(1:maxneigh),stat=ierr(13)) ++ allocate(solvz6(1:maxneigh),stat=ierr(14)) ++ allocate(solvrmag6(1:maxneigh),stat=ierr(15)) ++ allocate(solvimag6(1:maxneigh),stat=ierr(16)) ++ allocate(solvrsq6 (1:maxneigh),stat=ierr(17)) ++ allocate(solvlist6(1:maxneigh),stat=ierr(18)) ++ allocate(solvtype6(1:maxneigh),stat=ierr(19)) ++ if (any(ierr/=0)) call Mfrz_Error(2538,0.d0) ++ ++ allocate(buff1(1:18*nq4+26*nq6),stat=ierr(1)) ++ allocate(buff2(1:18*nq4+26*nq6),stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2534,0.d0) ++ ++ allocate(q4prefactor(1:nq4),stat=ierr(1)) ++ allocate(q6prefactor(1:nq6),stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2540,0.d0) ++ ++c Compute the prefactors associated from dV_aug/d_q4 ++ ++ k = 1 ++ do iq = 1,nq4 ++ invrN = 1.0d0/dble(q4ninc(iq)*q4nn(iq)) ++ q4prefactor(iq) = -16.0d0*(rpibn**2)*(invrN**2)*dcolvar(k)/ ++ x Q4_global(iq) ++ k = k + 1 ++ end do ++ ++c Compute the prefactors associated from dV_aug/d_q6 ++ ++ do iq = 1,nq6 ++ invrN = 1.0d0/dble(q6ninc(iq)*q6nn(iq)) ++ q6prefactor(iq) = -16.0d0*(rpibtt**2)*(invrN**2)*dcolvar(k)/ ++ x Q6_global(iq) ++ k = k + 1 ++ end do ++ ++c Set atoms looper over by current rank ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ strs1 = 0.0d0 ++ strs2 = 0.0d0 ++ strs3 = 0.0d0 ++ strs4 = 0.0d0 ++ strs5 = 0.0d0 ++ strs6 = 0.0d0 ++ strs7 = 0.0d0 ++ strs8 = 0.0d0 ++ strs9 = 0.0d0 ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++c--------------------------------------------------------------- ++c Build a list of the required connections to iatm. This ++c differs depending on the version of DLPOLY we are using. ++c Note that excluded pairs will NOT have connections ++c computed. ++c--------------------------------------------------------------- ++ ++ ii = ii + 1 ++ isite=ltype(iatm) ++ limit=lentry(ii) ++ ++ nn = 0 ++ do k = 1,limit ++ ++ jatm = list(ii,k) ++ jsite = ltype(jatm) ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ xdf(nn)=xxx(jatm)-xxx(iatm) ++ ydf(nn)=yyy(jatm)-yyy(iatm) ++ zdf(nn)=zzz(jatm)-zzz(iatm) ++ ++ end do ++ ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ ++ nn = 0 ++ isolvmax4 = 0 ++ isolvmax6 = 0 ++ isolv4 = 0 ++ isolv6 = 0 ++ do k = 1,limit ++ jatm = list(ii,k) ++ jsite = ltype(jatm) ++ ++ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle ++ ++ nn = nn + 1 ++ ++ q4type = q4site(jsite,isite) ++ q6type = q6site(jsite,isite) ++ ++ tmpsq = xdf(nn)*xdf(nn)+ydf(nn)*ydf(nn)+zdf(nn)*zdf(nn) ++ if (nq4>0) then ++ ++c Add to solvation lists if within cut-off ++ ++ if ( tmpsq < q4cutoff(2,q4type)**2 ) then ++ isolv4 = isolv4 + 1 ++ solvlist4(isolv4) = jatm ++ solvrsq4(isolv4) = tmpsq ++ solvrmag4(isolv4) = sqrt(tmpsq) ++ solvimag4(isolv4) = 1.0d0/solvrmag4(isolv4) ++ solvx4(isolv4) = xdf(nn) ++ solvy4(isolv4) = ydf(nn) ++ solvz4(isolv4) = zdf(nn) ++ solvtype4(isolv4) = q4type ++ end if ++ end if ++ ++ if (nq6>0) then ++ ++c Add to solvation lists if within cut-off ++ ++ if ( tmpsq < q6cutoff(2,q6type)**2 ) then ++ isolv6 = isolv6 + 1 ++ solvlist6(isolv6) = jatm ++ solvrsq6(isolv6) = tmpsq ++ solvrmag6(isolv6) = sqrt(tmpsq) ++ solvimag6(isolv6) = 1.0d0/solvrmag6(isolv6) ++ solvx6(isolv6) = xdf(nn) ++ solvy6(isolv6) = ydf(nn) ++ solvz6(isolv6) = zdf(nn) ++ solvtype6(isolv6) = q6type ++ end if ++ end if ++ isolvmax4 = isolv4 ++ isolvmax6 = isolv6 ++ if ((isolv4>maxneigh) .or. (isolv6>maxneigh)) ++ x call Mfrz_Error(2535,0.d0) ++ ++ end do ! end loop over k ++ ++c--------------------------------------------------------- ++c--------------------------------------------------------- ++c Compute forces arising from Q4 order parameters ++c--------------------------------------------------------- ++c--------------------------------------------------------- ++ ++ if ( (nq4>0).and.isolvmax4>0 ) then ++ ++ do isolv4 = 1,isolvmax4 ++ ++ jatm = solvlist4(isolv4) ++ itype = solvtype4(isolv4) ++ ++ invrc = solvimag4(isolv4)**6 ++ invrq = solvimag4(isolv4)**8 ++ invrs = solvimag4(isolv4)**4 ++ ++ x = solvx4(isolv4) ++ y = solvy4(isolv4) ++ z = solvz4(isolv4) ++ ++ f_ij = fc(solvrmag4(isolv4),q4cutoff(1,itype), ++ x q4cutoff(2,itype)) ++ df_ij = dfc(solvrmag4(isolv4),q4cutoff(1,itype), ++ x q4cutoff(2,itype)) ++ ++ x2 = x*x ++ y2 = y*y ++ z2 = z*z ++ ++ x3 = x2*x ++ y3 = y2*y ++ z3 = z2*z ++ ++ x4 = x2*x2 ++ y4 = y2*y2 ++ z4 = z2*z2 ++ ++ x5 = x4*x ++ y5 = y4*y ++ z5 = z4*z ++ ++ x6 = x4*x2 ++ y6 = y4*y2 ++ z6 = z4*z2 ++ ++ fx = 0.0d0 ++ fy = 0.0d0 ++ fz = 0.0d0 ++ ++c------------------------------------- ++c Gradient of f_ij w.r.t. r_{j} ++c------------------------------------- ++ ++ fx2 = df_ij*x*solvimag4(isolv4) ++ fy2 = df_ij*y*solvimag4(isolv4) ++ fz2 = df_ij*z*solvimag4(isolv4) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -4 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre4m4*invrs*(x4-6.d0*x2*y2+y4) ++ ImYlm = ypre4m4*invrs*(-4.d0*x3*y+4.d0*x*y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = -4 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(-4,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{4,-4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrc*ypre4m4*4.d0*x*(4.d0*x2*y2-4.d0*y4+z2*x2- ++ x 3.d0*z2*y2) ++ fy1 = -invrc*ypre4m4*4.d0*y*(4.d0*x4-4.d0*x2*y2+3.d0* ++ x z2*x2-z2*y2) ++ fz1 = -invrc*ypre4m4*4.d0*z*(x4-6.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -4 (imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ImQ4bar(-4,itype) ++ ++c---------------------------------------------- ++c Gradient of Im(Y_{4,-4}) w.r.t r_{j} ++c---------------------------------------------- ++ ++ fx1 = invrc*ypre4m4*4.d0*y*(x4-6.d0*x2*y2-3.d0*z2*x2+ ++ x y4+z2*y2) ++ fy1 = -invrc*ypre4m4*4.d0*x*(-6.d0*x2*y2+y4+x4+z2*x2- ++ x 3.d0*z2*y2) ++ fz1 = invrc*ypre4m4*16.d0*x*y*z*(x2-y2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -3 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre4m3*invrs*z*(x3-3.d0*x*y2) ++ ImYlm = ypre4m3*invrs*z*(-3.d0*x2*y+y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = -3 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(-3,itype) ++ ++c--------------------------------------------- ++c Gradient of Re(Y_{4,-3}) w.r.t r_{j} ++c--------------------------------------------- ++ ++ fx1 = -invrc*ypre4m3*z*(x4-12.d0*x2*y2-3.d0*z2*x2+ ++ x 3.d0*y4+3.d0*z2*y2) ++ fy1 = -invrc*ypre4m3*2.d0*z*x*y*(5.0d0*x2-3.d0*y2+ ++ x 3.d0*z2) ++ fz1 = invrc*ypre4m3*x*(x2-3.d0*y2)*(x2+y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = -3 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ImQ4bar(-3,itype) ++ ++c-------------------------------------------------- ++c Gradient of Im(Y_{4,-3}) w.r.t r_{j} ++c-------------------------------------------------- ++ ++ fx1 = invrc*ypre4m3*2.d0*z*x*y*(3.d0*x2-5.d0*y2-3.0d0*z2) ++ fy1 = -invrc*ypre4m3*z*(-12.d0*x2*y2+y4+3.d0*x4+3.d0*z2*x2 ++ x -3.d0*z2*y2) ++ fz1 = -invrc*ypre4m3*y*(3.d0*x2-y2)*(x2+y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -2 ++c-------------------------------------------------------- ++ ++ ReYlm = -ypre4m2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) ++ ImYlm = ypre4m2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y ++ ++c-------------------------------------------------- ++c Force contributions from m = -2 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(-2,itype) ++ ++c--------------------------------------------- ++c Gradient of Re(Y_{4,-2}) w.r.t r_{j} ++c--------------------------------------------- ++ ++ fx1 = -invrc*ypre4m2*4.d0*x*(4.d0*z2*x2+y4-9.d0*z2*y2- ++ x 3.d0*z4+x2*y2) ++ fy1 = invrc*ypre4m2*4.d0*y*(x4-9.d0*z2*x2+4.d0*z2*y2- ++ x 3.d0*z4+x2*y2) ++ fz1 = invrc*ypre4m2*4.d0*z*(x2-y2)*(4.d0*x2+4.d0*y2- ++ x 3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = -2 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ImQ4bar(-2,itype) ++ ++c----------------------------------------- ++c Gradient of Im(Y_{4,-2}) w.r.t r_{j} ++c----------------------------------------- ++ ++ fx1 = -invrc*ypre4m2*2.d0*y*(x4-21.d0*z2*x2+5.d0*z2*y2+ ++ x 6.d0*z4-y4) ++ fy1 = invrc*ypre4m2*2.d0*x*(-y4+21.d0*z2*y2-5.d0*z2*x2 ++ x -6.d0*z4+x4) ++ fz1 = -invrc*ypre4m2*8.d0*z*x*y*(4.d0*x2+4.d0*y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -1 ++c-------------------------------------------------------- ++ ++ ReYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x ++ ImYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y ++ ++c-------------------------------------------------- ++c Force contributions from m = -1 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(-1,itype) ++ ++c---------------------------------------- ++c Gradient of Re(Y_{4,-1}) w.r.t r_{j} ++c---------------------------------------- ++ ++ fx1 = invrc*ypre4m1*z*(3.d0*x4-21.d0*z2*x2+z2*y2+4.d0*z4- ++ x 3.d0*y4) ++ fy1 = invrc*ypre4m1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) ++ fz1 = -invrc*ypre4m1*x*(-21.d0*x2*z2-21.d0*z2*y2+4.d0*z4+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = -1 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ImQ4bar(-1,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{4,-1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -invrc*ypre4m1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) ++ fy1 = invrc*ypre4m1*z*(-3.d0*y4+21.d0*z2*y2-z2*x2-4.d0*z4+ ++ x 3.d0*x4) ++ fz1 = invrc*ypre4m1*y*(-21.d0*z2*x2-21.d0*z2*y2+4.d0*z4+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Real spherical harmonics for m = 0 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre4m0*invrs*(8.d0*z4-24.d0*z2*x2-24.d0*z2*y2+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++c-------------------------------------------------- ++c Force contributions from m = 0 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(0,itype) ++ ++c------------------------------------------- ++c Gradient of Re(Y_{4,0}) w.r.t r_{j} ++c------------------------------------------- ++ ++ fx1 = 20.d0*ypre4m0*invrc*z2*(-4.d0*z2+3.d0*x2+3.d0*y2)*x ++ fy1 = 20.d0*ypre4m0*invrc*z2*(-4.d0*z2+3.d0*x2+3.d0*y2)*y ++ fz1 = -20.d0*ypre4m0*invrc*z*(-4.d0*z2*x2-4.d0*z2*y2+3.d0* ++ x x4+6.d0*x2*y2+3.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = +1 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x ++ ImYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y ++ ++c-------------------------------------------------- ++c Force contributions from m = +1 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(+1,itype) ++ ++c------------------------------------------- ++c Gradient of Re(Y_{4,+1}) w.r.t r_{j} ++c------------------------------------------- ++ ++ fx1 = invrc*ypre4p1*z*(3.d0*x4-21.d0*z2*x2+z2*y2+4.d0*z4- ++ x 3.d0*y4) ++ fy1 = invrc*ypre4p1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) ++ fz1 = -invrc*ypre4p1*x*(-21.d0*x2*z2-21.d0*z2*y2+4.d0*z4+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------ ++c Force contributions from m = +1 (imaginary part) ++c------------------------------------------------------ ++ ++ prefactor2 = q4prefactor(itype)*ImQ4bar(+1,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{4,+1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrc*ypre4p1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) ++ fy1 = -invrc*ypre4p1*z*(-3.d0*y4+21.d0*z2*y2-z2*x2-4.d0*z4 ++ x +3.d0*x4) ++ fz1 = -invrc*ypre4p1*y*(-21.d0*z2*x2-21.d0*z2*y2+4.d0*z4+ ++ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = 2 ++c-------------------------------------------------------- ++ ++ ReYlm = -ypre4p2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) ++ ImYlm = -ypre4p2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y ++ ++c-------------------------------------------------- ++c Force contributions from m = 2 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(+2,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{4,+2}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -invrc*ypre4p2*4.d0*x*(4.d0*z2*x2+y4-9.d0*z2*y2- ++ x 3.d0*z4+x2*y2) ++ fy1 = invrc*ypre4p2*4.d0*y*(x4-9.d0*z2*x2+4.d0*z2*y2- ++ x 3.d0*z4+x2*y2) ++ fz1 = invrc*ypre4p2*4.d0*z*(x2-y2)*(4.d0*x2+4.d0*y2- ++ x 3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = 2 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ImQ4bar(+2,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{4,+2}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrc*ypre4p2*2.d0*y*(x4-21.d0*z2*x2+5.d0*z2*y2+ ++ x 6.d0*z4-y4) ++ fy1 = -invrc*ypre4p2*2.d0*x*(-y4+21.d0*z2*y2-5.d0*z2*x2 ++ x -6.d0*z4+x4) ++ fz1 = invrc*ypre4p2*8.d0*z*x*y*(4.d0*x2+4.d0*y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = 3 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre4p3*invrs*z*(x3-3.d0*x*y2) ++ ImYlm = -ypre4p3*invrs*z*(-3.d0*x2*y+y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = +3 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(+3,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{4,+3}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -invrc*ypre4p3*z*(x4-12.d0*x2*y2-3.d0*z2*x2+3.d0*y4 ++ x +3.d0*z2*y2) ++ fy1 = -invrc*ypre4p3*2.d0*z*x*y*(5.0d0*x2-3.d0*y2+3.d0*z2) ++ fz1 = invrc*ypre4p3*x*(x2-3.d0*y2)*(x2+y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = +3 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ImQ4bar(+3,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{4,+3}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -invrc*ypre4p3*2.d0*z*x*y*(3.d0*x2-5.d0*y2-3.0d0*z2) ++ fy1 = invrc*ypre4p3*z*(-12.d0*x2*y2+y4+3.d0*x4+3.d0*z2*x2 ++ x -3.d0*z2*y2) ++ fz1 = invrc*ypre4p3*y*(3.d0*x2-y2)*(x2+y2-3.d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = +4 ++c------------------------------------------------------------- ++ ++ ReYlm = ypre4p4*invrs*(x4-6.d0*x2*y2+y4) ++ ImYlm = -ypre4p4*invrs*(-4.d0*x3*y+4.d0*x*y3) ++ ++c------------------------------------------------------- ++c Force contributions from m = +4 (real part) ++c------------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ReQ4bar(+4,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{4,-4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrc*ypre4p4*4.d0*x*(4.d0*x2*y2-4.d0*y4+z2*x2- ++ x 3.d0*z2*y2) ++ fy1 = -invrc*ypre4p4*4.d0*y*(4.d0*x4-4.d0*x2*y2+3.d0* ++ x z2*x2-z2*y2) ++ fz1 = -invrc*ypre4p4*4.d0*z*(x4-6.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c------------------------------------------------------- ++c Force contributions from m = -4 (imaginary part) ++c------------------------------------------------------- ++ ++ prefactor2 = q4prefactor(itype)*ImQ4bar(+4,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{4,-4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -invrc*ypre4p4*4.d0*y*(x4-6.d0*x2*y2-3.d0*z2*x2+ ++ x y4+z2*y2) ++ fy1 = invrc*ypre4p4*4.d0*x*(-6.d0*x2*y2+y4+x4+z2*x2- ++ x 3.d0*z2*y2) ++ fz1 = -invrc*ypre4p4*16.d0*x*y*z*(x2-y2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c Add into global force and stress arrays ++ ++ fxx(jatm) = fxx(jatm) + fx ++ fyy(jatm) = fyy(jatm) + fy ++ fzz(jatm) = fzz(jatm) + fz ++ fxx(iatm) = fxx(iatm) - fx ++ fyy(iatm) = fyy(iatm) - fy ++ fzz(iatm) = fzz(iatm) - fz ++ ++c Virial ++ ++ virord = virord - (fx*x + fy*y + fz*z) ++ ++c Stress ++ ++ strs1=strs1+x*fx ++ strs2=strs2+x*fy ++ strs3=strs3+x*fz ++ strs5=strs5+y*fy ++ strs6=strs6+y*fz ++ strs9=strs9+z*fz ++ ++ end do ! end loop over connection list for iatm ++ ++ end if ! end of computing Q4 ++ ++c--------------------------------------------------------- ++c--------------------------------------------------------- ++c Compute forces arising from Q6 order parameters ++c--------------------------------------------------------- ++c--------------------------------------------------------- ++ ++ if ( (nq6>0).and.isolvmax6>0 ) then ++ ++ do isolv6 = 1,isolvmax6 ++ ++ jatm = solvlist6(isolv6) ++ itype = solvtype6(isolv6) ++ ++ invrc = solvimag6(isolv6)**6 ++ invrq = solvimag6(isolv6)**8 ++ invrs = solvimag6(isolv6)**4 ++ ++ x = solvx6(isolv6) ++ y = solvy6(isolv6) ++ z = solvz6(isolv6) ++ ++ f_ij = fc(solvrmag6(isolv6),q6cutoff(1,itype), ++ x q6cutoff(2,itype)) ++ df_ij = dfc(solvrmag6(isolv6),q6cutoff(1,itype), ++ x q6cutoff(2,itype)) ++ ++ x2 = x*x ++ y2 = y*y ++ z2 = z*z ++ ++ x3 = x2*x ++ y3 = y2*y ++ z3 = z2*z ++ ++ x4 = x2*x2 ++ y4 = y2*y2 ++ z4 = z2*z2 ++ ++ x5 = x4*x ++ y5 = y4*y ++ z5 = z4*z ++ ++ x6 = x4*x2 ++ y6 = y4*y2 ++ z6 = z4*z2 ++ ++ fx = 0.0d0 ++ fy = 0.0d0 ++ fz = 0.0d0 ++ ++c---------------------------------------- ++c Gradient of f_ij w.r.t. r_{j} ++c---------------------------------------- ++ ++ fx2 = df_ij*x*solvimag6(isolv6) ++ fy2 = df_ij*y*solvimag6(isolv6) ++ fz2 = df_ij*z*solvimag6(isolv6) ++ ++c----------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -6 ++c----------------------------------------------------------- ++ ++ ReYlm = ypre6m6*invrc*(x6-15.0d0*x4*y2+15.0d0*x2*y4-y6) ++ ImYlm = ypre6m6*invrc*(-6.0d0*x5*y+20.0d0*x3*y3-6.0d0* ++ x x*y5) ++ ++c----------------------------------------------------- ++c Force contributions from m = -6 (real part) ++c----------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(-6,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-6}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrq*ypre6m6*6.0d0*x*(6.0d0*x4*y2-20.0d0*x2*y4+ ++ x 6.0d0*y6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fy1 = -invrq*ypre6m6*6.0d0*y*(6.0d0*x6-20.0d0*x4*y2+6.0d0 ++ x *x2*y4+5.0d0*z2*x4-10.0d0*z2*x2*y2-z2*y4) ++ fz1 = -invrq*ypre6m6*6.0d0*z*(x6-15.0d0*x4*y2+15.0d0*x2* ++ x y4-y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c---------------------------------------------------------- ++c Force contributions from m = -6 (Imaginary part) ++c---------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(-6,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-6}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -invrq*ypre6m6*6.0d0*y*(-x6+15.0d0*x4*y2-15.0d0*x2* ++ x y4+5.0d0*z2*x4-10.0d0*z2*x2*y2+y6+z2*y4) ++ fy1 = -invrq*ypre6m6*6.0d0*x*(-15.0d0*x4*y2+15.0d0*x2*y4- ++ x y6+x6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fz1 = invrq*ypre6m6*12.0d0*x*y*z*(3.0d0*x4-10.0d0*x2*y2+ ++ x 3.0d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c--------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -5 ++c--------------------------------------------------------- ++ ++ ReYlm = -ypre6m5*invrc*z*(-x5+10.0d0*x3*y2-5.0d0*x*y4) ++ ImYlm = -ypre6m5*invrc*z*(5.0d0*x4*y-10.0d0*x2*y3+y5) ++ ++c-------------------------------------------------- ++c Force contributions from m = -5 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(-5,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-5}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = ypre6m5*invrq*z*(-x6+35.0d0*x4*y2-55.d0*x2*y4+ ++ x 5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*y6+5.0d0*z2*y4) ++ fy1 = -2.0d0*ypre6m5*invrq*x*y*z*(13.0d0*x4-30.0d0*x2 ++ x *y2+5.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) ++ fz1 = -ypre6m5*invrq*x*(x4-10.0d0*x2*y2+5.0d0*y4)* ++ x (-x2-y2+5.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -5 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(-5,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-5}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -2.0d0*ypre6m5*invrq*x*y*z*(-5.0d0*x4+30.0d0*x2*y2 ++ x -13.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) ++ fy1 = -ypre6m5*invrq*z*(-55.0d0*x4*y2+35.0d0*x2*y4-y6+ ++ x 5.0d0*x6+5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fz1 = ypre6m5*invrq*y*(5.0d0*x4-10.0d0*x2*y2+y4)* ++ x (-x2-y2+5.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -4 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(x4-6.0d0*x2*y2+y4) ++ ImYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(-4.0d0*x3*y-4.0d0* ++ x x*y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = -4 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(-4,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.0d0*ypre6m4*invrq*x*(-8.0d0*x4*y2-13.0d0*z2*x4+ ++ x 150.0d0*z2*x2*y2+8.0d0*y6-85.0d0*z2*y4+20.0d0*z4* ++ x x2-60.0d0*z4*y2) ++ fy1 =-2.0d0*ypre6m4*invrq*y*(-8.0d0*x6+85.0d0*z2*x4+8.0d0 ++ x *x2*y4-150.0d0*z2*x2*y2+13.0d0*z2*y4+60.0d0*z4*x2- ++ x 20.0d0*z4*y2) ++ fz1 =-2.0d0*ypre6m4*invrq*z*(x4-6.0d0*x2*y2+y4)*(-13.0d0 ++ x *x2-13.0d0*y2+20.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -4 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(-4,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -2.0d0*ypre6m4*invrq*y*(x4-6.0d0*x2*y2+y4)*(-13.0d0 ++ x *x2-13.0d0*y2+20.0d0*z2) ++ fy1 = -4.0d0*ypre6m4*invrq*x*(5.0d0*x4*y2-80.0d0*z2*x2*y2 ++ x -y6+35.0d0*z2*y4+9.0d0*z2*x4+10.0d0*z4*x2-30.0d0*z4 ++ x *y2-x6+5.0d0*x2*y4) ++ fz1 = 8.0d0*ypre6m4*invrq*z*x*y*(x2-y2)*(-13.0d0*x2- ++ x 13.0d0*y2+20.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -3 ++c-------------------------------------------------------- ++ ++ ReYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* ++ x (-x3+3.0d0*x*y2) ++ ImYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* ++ x (3.0d0*x2*y-y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = -3 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(-3,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-3}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 3.d0*ypre6m3*invrq*z*(x6-11.d0*x4*y2-13.d0*z2*x4- ++ x 9.d0*x2*y4+54.d0*z2*x2*y2+8.d0*z4*x2-5.d0*z2*y4- ++ x 8.d0*z4*y2+3.d0*y6) ++ fy1 = -6.d0*ypre6m3*invrq*z*x*y*(-5.d0*x4-2.d0*x2*y2+14.d0 ++ x *z2*x2+3.d0*y4-22.d0*z2*y2+8.d0*z4) ++ fz1 = -3.d0*ypre6m3*invrq*x*(x2-3.d0*y2)*(-13.d0*z2*x2- ++ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -3 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(-3,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-3}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -6.d0*ypre6m3*invrq*z*x*y*(3.d0*x4-2.d0*x2*y2-22.d0 ++ x *z2*x2-5.d0*y4+14.d0*z2*y2+8.d0*z4) ++ fy1 = -3.d0*ypre6m3*invrq*z*(9.d0*x4*y2+11.d0*x2*y4-54.d0 ++ x *z2*x2*y2-y6+13.d0*z2*y4+5.d0*z2*x4+8.d0*z4*x2-8.d0 ++ x *z4*y2-3.d0*x6) ++ fz1 = 3.d0*ypre6m3*invrq*z*(3.d0*x2-y2)*(-13.d0*z2*x2- ++ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -2 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6m2*invrc*(16.0d0*z4-16.0d0*z2*x2-16.0d0*z2 ++ x *y2+x4+2.0d0*x2*y2+y4)*(x2-y2) ++ ImYlm = -ypre6m2*invrc*2.0d0*(16.0d0*z4-16.0d0*z2*x2- ++ x 16.0d0*z2*y2+x4+2.0d0*x2*y2+y4)*x*y ++ ++c-------------------------------------------------- ++c Force contributions from m = -2 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(-2,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-2}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.d0*ypre6m2*invrq*x*( 19.d0*z2*x4-64.d0*z4*x2- ++ x 49.d0*z2*y4+64.d0*z4*y2+2.d0*x4*y2+4.d0*x2*y4+ ++ x 2.d0*y6+16.d0*z6-30.d0*z2*x2*y2) ++ fy1 = -2.d0*ypre6m2*invrq*y*(-49.d0*z2*x4+64.d0*z4*x2+ ++ x 19.d0*z2*y4-64.d0*z4*y2+2.d0*x6+4.d0*x4*y2+2.d0* ++ x x2*y4+16.d0*z6-30.d0*z2*x2*y2) ++ fz1 = -2.d0*ypre6m2*invrq*z*(x2-y2)*(-64.d0*z2*x2-64.d0 ++ x *z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -2 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(-2,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-2}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -2.d0*ypre6m2*invrq*y*(53.d0*z2*x4+38.d0*z2*x2* ++ x y2-128.d0*z4*x2-x6-x4*y2+x2*y4+16.d0*z6-15.d0* ++ x z2*y4+y6) ++ fy1 = -2.d0*ypre6m2*invrq*x*(38.d0*z2*x2*y2+53.d0*z2* ++ x y4-128.d0*z4*y2+x4*y2-x2*y4-y6+16.d0*z6-15.d0* ++ x z2*x4+x6) ++ fz1 = 4.d0*ypre6m2*invrq*z*x*y*(-64.d0*z2*x2-64.d0* ++ x z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = -1 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2 ++ x +5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x ++ ImYlm = -ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2 ++ x +5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y ++ ++c-------------------------------------------------- ++c Force contributions from m = -1 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(-1,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,-1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = ypre6m1*invrq*z*(85.d0*x2*x4+70.d0*z2*x2*y2 ++ x -100.d0*z4*x2-5.d0*x6-5.d0*x4*y2+5.d0*x2*y4-12.d0 ++ x *z4*y2+8.d0*z6-15.d0*z2*y4+5.d0*y6) ++ fy1 = -2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0*z2* ++ x y2+44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) ++ fz1 = -ypre6m1*invrq*x*(-100.d0*z4*x2-100.d0*z4*y2+ ++ x 8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0*z2*y4- ++ x 5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = -1 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(-1,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,-1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0* ++ x z2*y2+44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) ++ fy1 = -ypre6m1*invrq*z*(70.d0*z2*x2*y2+85.d0*z2 ++ x *y4-100.d0*z4*y2+5.d0*x4*y2-5.d0*x2*y4-5.d0*y6 ++ x -12.d0*z4*x2+8.d0*z6-15.d0*z2*x4+5.d0*x6) ++ fz1 = ypre6m1*invrq*y*(-100.d0*z4*x2-100.d0*z4 ++ x *y2+8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0* ++ x z2*y4-5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real spherical harmonics for m = 0 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6m0*invrc*(16.0d0*z6-120.0d0*z4*x2-120.0d0 ++ x *z4*y2+90.0d0*z2*x4+180.0d0*z2*x2*y2+90.0d0*z2*y4 ++ x -5.0d0*x6-15.0d0*x4*y2-15.0d0*x2*y4-5.0d0*y6) ++ ++c-------------------------------------------------- ++c Force contributions from m = 0 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(0,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,0}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -42.d0*ypre6m0*invrq*z2*(8.d0*z4-20.d0*z2*x2-20.d0 ++ x *z2*y2+5.d0*x4+10.d0*x2*y2+5.d0*y4)*x ++ fy1 = -42.d0*ypre6m0*invrq*z2*(8.d0*z4-20.d0*z2*x2-20.d0 ++ x *z2*y2+5.d0*x4+10.d0*x2*y2+5.d0*y2)*y ++ fz1 = 42.d0*ypre6m0*invrq*z*(8.d0*z4*x2+8.d0*z4*y2-20.d0 ++ x *z2*x4-40.d0*z2*x2*y2-20.d0*z2*y4+5.d0*x6+15.d0*x4* ++ x y2+15.d0*x2*y4+5.d0*y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = +1 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6p1*invrc*z*(8.0d0*z4-20.0d0*z2*x2-20.0d0 ++ x *z2*y2+5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x ++ ImYlm = ypre6p1*invrc*z*(8.0d0*z4-20.0d0*z2*x2-20.0d0 ++ x *z2*y2+5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y ++ ++c-------------------------------------------------- ++c Force contributions from m = +1 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(1,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = ypre6p1*invrq*z*(85.d0*x2*x4+70.d0*z2*x2*y2- ++ x 100.d0*z4*x2-5.d0*x6-5.d0*x4*y2+5.d0*x2*y4-12.d0* ++ x z4*y2+8.d0*z6-15.d0*z2*y4+5.d0*y6) ++ fy1 = -2.d0*ypre6p1*invrq*z*x*y*(-50.d0*z2*x2-50.d0*z2*y2 ++ x +44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) ++ fz1 = -ypre6p1*invrq*x*(-100.d0*z4*x2-100.d0*z4*y2+ ++ x 8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0*z2*y4- ++ x 5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = 1 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(1,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,1}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = -2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0*z2*y2+ ++ x 44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) ++ fy1 = ypre6m1*invrq*z*(70.d0*z2*x2*y2+85.d0*z2*y4- ++ x 100.d0*z4*y2+5.d0*x4*y2-5.d0*x2*y4-5.d0*y6-12.d0*z4 ++ x *x2+8.d0*z6-15.d0*z2*x4+5.d0*x6) ++ fz1 = -ypre6m1*invrq*y*(-100.d0*z4*x2-100.d0*z4*y2+ ++ x 8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0*z2*y4- ++ x 5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = +2 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6p2*invrc*(16.d0*z4-16.d0*z2*x2-16.d0* ++ x z2*y2+x4+2.d0*x2*y2+y4)*(x2-y2) ++ ImYlm = 2.d0*ypre6p2*invrc*(16.d0*z4-16.d0*z2*x2-16.d0* ++ x z2*y2+x4+2.d0*x2*y2+y4)*x*y ++ ++c-------------------------------------------------- ++c Force contributions from m = +2 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(2,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,2}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.d0*ypre6p2*invrq*x*( 19.d0*z2*x4-64.d0*z4*x2- ++ x 49.d0*z2*y4+64.d0*z4*y2+2.d0*x4*y2+4.d0*x2*y4+ ++ x 2.d0*y6+16.d0*z6-30.d0*z2*x2*y2) ++ fy1 = -2.d0*ypre6p2*invrq*y*(-49.d0*z2*x4+64.d0*z4*x2+ ++ x 19.d0*z2*y4-64.d0*z4*y2+2.d0*x6+4.d0*x4*y2+2.d0 ++ x *x2*y4+16.d0*z6-30.d0*z2*x2*y2) ++ fz1 = -2.d0*ypre6p2*invrq*z*(x2-y2)*(-64.d0*z2*x2-64.d0 ++ x *z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = 2 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(2,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,2}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.d0*ypre6p2*invrq*y*(53.d0*z2*x4+38.d0*z2*x2*y2- ++ x 128.d0*z4*x2-x6-x4*y2+x2*y4+16.d0*z6-15.d0*z2*y4+y6) ++ fy1 = 2.d0*ypre6p2*invrq*x*(38.d0*z2*x2*y2+53.d0*z2*y4- ++ x 128.d0*z4*y2+x4*y2-x2*y4-y6+16.d0*z6-15.d0*z2*x4+x6) ++ fz1 = -4.d0*ypre6p2*invrq*z*x*y*(-64.d0*z2*x2-64.d0*z2*y2+ ++ x 16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = +3 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6p3*invrc*z*(8.d0*z2-3.d0*x2-3.d0*y2)* ++ x (x3-3.d0*x*y2) ++ ImYlm = ypre6p3*invrc*z*(8.d0*z2-3.d0*x2-3.d0*y2)* ++ x (3.d0*x2*y-y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = +3 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(3,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,3}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 3.d0*ypre6p3*invrq*z*(x6-11.d0*x4*y2-13.d0*z2*x4- ++ x 9.d0*x2*y4+54.d0*z2*x2*y2+8.d0*z4*x2-5.d0*z2*y4- ++ x 8.d0*z4*y2+3.d0*y6) ++ fy1 = -6.d0*ypre6p3*invrq*z*x*y*(-5.d0*x4-2.d0*x2*y2+ ++ x 14.d0*z2*x2+3.d0*y4-22.d0*z2*y2+8.d0*z4) ++ fz1 = -3.d0*ypre6p3*invrq*x*(x2-3.d0*y2)*(-13.d0*z2*x2- ++ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = 3 (Imaginary part ) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(3,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,3}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 6.d0*ypre6p3*invrq*z*x*y*(3.d0*x4-2.d0*x2*y2-22.d0 ++ x *z2*x2-5.d0*y4+14.d0*z2*y2+8.d0*z4) ++ fy1 = 3.d0*ypre6p3*invrq*z*(9.d0*x4*y2+11.d0*x2*y4-54.d0 ++ x *z2*x2*y2-y6+13.d0*z2*y4+5.d0*z2*x4+8.d0*z4*x2-8.d0 ++ x *z4*y2-3.d0*x6) ++ fz1 = -3.d0*ypre6p3*invrq*z*(3.d0*x2-y2)*(-13.d0*z2*x2- ++ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = +4 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6p4*invrc*(10.d0*z2-x2-y2)*(x4-6.d0*x2*y2+y4) ++ ImYlm = ypre6p4*invrc*(10.d0*z2-x2-y2)*(4.d0*x3*y-4.d0* ++ x x*y3) ++ ++c-------------------------------------------------- ++c Force contributions from m = +4 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(4,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.0d0*ypre6p4*invrq*x*(-8.0d0*x4*y2-13.0d0*z2*x4+ ++ x 150.0d0*z2*x2*y2+8.0d0*y6-85.0d0*z2*y4+20.0d0*z4*x2 ++ x -60.0d0*z4*y2) ++ fy1 =-2.0d0*ypre6p4*invrq*y*(-8.0d0*x6+85.0d0*z2*x4+8.0d0 ++ x *x2*y4-150.0d0*z2*x2*y2+13.0d0*z2*y4+60.0d0*z4*x2- ++ x 20.0d0*z4*y2) ++ fz1 =-2.0d0*ypre6p4*invrq*z*(x4-6.0d0*x2*y2+y4)*(-13.0d0* ++ x x2-13.0d0*y2+20.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = 4 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(4,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,4}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.0d0*ypre6p4*invrq*y*(x4-6.0d0*x2*y2+y4)*(-13.0d0 ++ x *x2-13.0d0*y2+20.0d0*z2) ++ fy1 = 4.0d0*ypre6p4*invrq*x*(5.0d0*x4*y2-80.0d0*z2*x2*y2 ++ x -y6+35.0d0*z2*y4+9.0d0*z2*x4+10.0d0*z4*x2-30.0d0*z4 ++ x *y2-x6+5.0d0*x2*y4) ++ fz1 = -8.0d0*ypre6p4*invrq*z*x*y*(x2-y2)*(-13.0d0*x2- ++ x 13.0d0*y2+20.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = +5 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6p5*invrc*z*(x5-10.d0*x3*y2+5.d0*x*y4) ++ ImYlm = ypre6p5*invrc*z*(5.d0*x4*y-10.d0*x2*y3+y5) ++ ++c-------------------------------------------------- ++c Force contributions from m = +5 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(5,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,5}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = ypre6p5*invrq*z*(-x6+35.0d0*x4*y2-55*x2*y4 ++ x +5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*y6+5.0d0*z2*y4) ++ fy1 = -2.0d0*ypre6p5*invrq*x*y*z*(13.0d0*x4-30.0d0*x2*y2 ++ x +5.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) ++ fz1 = -ypre6p5*invrq*x*(x4-10.0d0*x2*y2+5.0d0*y4)* ++ x (-x2-y2+5.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = 5 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(5,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,5}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = 2.0d0*ypre6p5*invrq*x*y*z*(-5.0d0*x4+30.0d0*x2*y2- ++ x 13.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) ++ fy1 = +ypre6p5*invrq*z*(-55.0d0*x4*y2+35.0d0*x2*y4- ++ x y6+5.0d0*x6+5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fz1 = -ypre6p5*invrq*y*(5.0d0*x4-10.0d0*x2*y2+y4)* ++ x (-x2-y2+5.0d0*z2) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c-------------------------------------------------------- ++c Real and imaginary spherical harmonics for m = +6 ++c-------------------------------------------------------- ++ ++ ReYlm = ypre6p6*invrc*(x6-15.d0*x4*y2+15.d0*x2*y4-y6) ++ ImYlm = ypre6p6*invrc*(6.d0*x5*y-20.d0*x3*y3+6.d0*x*y5) ++ ++c-------------------------------------------------- ++c Force contributions from m = +6 (real part) ++c-------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ReQ6bar(6,itype) ++ ++c-------------------------------------------- ++c Gradient of Re(Y_{6,6}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrq*ypre6p6*6.0d0*x*(6.0d0*x4*y2-20.0d0*x2*y4+ ++ x 6.0d0*y6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fy1 = -invrq*ypre6p6*6.0d0*y*(6.0d0*x6-20.0d0*x4*y2+ ++ x 6.0d0*x2*y4+5.0d0*z2*x4-10.0d0*z2*x2*y2-z2*y4) ++ fz1 = -invrq*ypre6p6*6.0d0*z*(x6-15.0d0*x4*y2+15.0d0*x2 ++ x *y4-y6) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) ++ ++c-------------------------------------------------------- ++c Force contributions from m = 6 (Imaginary part) ++c-------------------------------------------------------- ++ ++ prefactor2 = q6prefactor(itype)*ImQ6bar(6,itype) ++ ++c-------------------------------------------- ++c Gradient of Im(Y_{6,6}) w.r.t r_{j} ++c-------------------------------------------- ++ ++ fx1 = invrq*ypre6p6*6.0d0*y*(-x6+15.0d0*x4*y2-15.0d0* ++ x x2*y4+5.0d0*z2*x4-10.0d0*z2*x2*y2+y6+z2*y4) ++ fy1 = invrq*ypre6p6*6.0d0*x*(-15.0d0*x4*y2+15.0d0*x2* ++ x y4-y6+x6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) ++ fz1 = -invrq*ypre6p6*12.0d0*x*y*z*(3.0d0*x4-10.0d0*x2* ++ x y2+3.0d0*y4) ++ ++ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) ++ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) ++ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) ++ ++c Add into global force and stress arrays ++ ++ fxx(jatm) = fxx(jatm) + fx ++ fyy(jatm) = fyy(jatm) + fy ++ fzz(jatm) = fzz(jatm) + fz ++ fxx(iatm) = fxx(iatm) - fx ++ fyy(iatm) = fyy(iatm) - fy ++ fzz(iatm) = fzz(iatm) - fz ++ ++c Virial ++ ++ virord = virord - (fx*x + fy*y + fz*z) ++ ++c Stress ++ ++ strs1=strs1+x*fx ++ strs2=strs2+x*fy ++ strs3=strs3+x*fz ++ strs5=strs5+y*fy ++ strs6=strs6+y*fz ++ strs9=strs9+z*fz ++ ++ end do ! end loop over connection list for iatm ++ ++ end if ! end of computing Q6 ++ ++ ++ end do ! end loop over iatm ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs1 ++ stress(2)=stress(2)+strs2 ++ stress(3)=stress(3)+strs3 ++ stress(4)=stress(4)+strs2 ++ stress(5)=stress(5)+strs5 ++ stress(6)=stress(6)+strs6 ++ stress(7)=stress(7)+strs3 ++ stress(8)=stress(8)+strs6 ++ stress(9)=stress(9)+strs9 ++ ++c tidy up ++ ++ ierr = 0 ++ ++ deallocate(xdf,stat=ierr(1)) ++ deallocate(ydf,stat=ierr(2)) ++ deallocate(zdf,stat=ierr(3)) ++ ++ deallocate(solvx4,stat=ierr(4)) ++ deallocate(solvy4,stat=ierr(5)) ++ deallocate(solvz4,stat=ierr(6)) ++ deallocate(solvrmag4,stat=ierr(7)) ++ deallocate(solvimag4,stat=ierr(8)) ++ deallocate(solvrsq4 ,stat=ierr(9)) ++ deallocate(solvlist4,stat=ierr(10)) ++ deallocate(solvtype4,stat=ierr(11)) ++ ++ deallocate(solvx6,stat=ierr(12)) ++ deallocate(solvy6,stat=ierr(13)) ++ deallocate(solvz6,stat=ierr(14)) ++ deallocate(solvrmag6,stat=ierr(15)) ++ deallocate(solvimag6,stat=ierr(16)) ++ deallocate(solvrsq6 ,stat=ierr(17)) ++ deallocate(solvlist6,stat=ierr(18)) ++ deallocate(solvtype6,stat=ierr(19)) ++ if (any(ierr/=0)) call Mfrz_Error(2536,0.d0) ++ ++ deallocate(buff1,stat=ierr(1)) ++ deallocate(buff2,stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2537,0.d0) ++ ++ deallocate(q4prefactor,stat=ierr(1)) ++ deallocate(q6prefactor,stat=ierr(2)) ++ if (any(ierr/=0)) call Mfrz_Error(2540,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Steinhardt_Forces ++ ++ Subroutine Compute_Tet_Nlist(imcon,natms) ++ ++c--------------------------------------------------------------------- ++c ++c The existing neighbour list is not known by all nodes and ++c therefore we compute a new one from scratch rather than trying ++c to merge a full neighbour list across all MPI tasks or restore ++c symmetry. ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use utility_module, only : images ++ ++ implicit none ++ integer,intent(in) :: imcon,natms ++ integer :: nlast,megatm ++ ++ integer :: iatm0,iatm1,istrd,iatm,jatm,nn,itype,jtype ++ integer :: ninclude,ifi,ii,ztype,nnn,k ++ real(8) :: rsq,rangesq ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ ninclude = maxval(zetaninc) ++ ++ nlast = natms ++ megatm = natms ++ ++ nnn = int(dble(ninclude*nlast*1.2)/dble(megatm)) ++ ++ allocate(xdf(1:nnn),stat=ierr(1)) ++ allocate(ydf(1:nnn),stat=ierr(2)) ++ allocate(zdf(1:nnn),stat=ierr(3)) ++ if (any(ierr/=0)) call Mfrz_Error(2541,0.d0) ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ itype = ltype(iatm) ++ ++ ztype = zetasite(itype) ++ if ( ztype==0 ) cycle ++ ++ nn = 0 ! Number of images to compute ++ ii = ii + 1 ! index for this list ++ ifi = 0 ! index for entries in this list ++ ++ if (ii>mxninc) call Mfrz_Error(2542,0.d0) ++ ++ do jatm = 1,nlast ++ ++ jtype = ltype(jatm) ++ ++ if ( itype/=jtype ) cycle ++ if ( iatm == jatm ) cycle ++ ++ nn = nn + 1 ++ xdf(nn) = xxx(iatm) - xxx(jatm) ! separation vector ++ ydf(nn) = yyy(iatm) - yyy(jatm) ++ zdf(nn) = zzz(iatm) - zzz(jatm) ++ ++ end do ++ ++ if ( nn > nnn ) call Mfrz_Error(2543,0.d0) ++ ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ ++ nn = 0 ++ do jatm = 1,nlast ++ ++ jtype = ltype(jatm) ++ ++ if ( itype/=jtype ) cycle ++ if ( iatm == jatm ) cycle ++ ++ nn = nn + 1 ++ rsq = xdf(nn)*xdf(nn) + ydf(nn)*ydf(nn) + zdf(nn)*zdf(nn) ++ ++ rangesq = zetacutoff(2,ztype)**2 ++ ++ if ( rsq < rangesq ) then ++ ++ ifi = ifi + 1 ++ flist(ifi,ii) = jatm ++ ++ end if ++ ++ end do ++ if ( ifi > mxflist ) call Mfrz_Error(2544,0.d0) ++ nflist(ii) = ifi ++ ++ end do ! end loop over iatm ++ ++ deallocate(xdf,stat=ierr(1)) ++ deallocate(ydf,stat=ierr(2)) ++ deallocate(zdf,stat=ierr(3)) ++ if (any(ierr/=0))call Mfrz_Error(2545,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Tet_Nlist ++ ++ Subroutine Compute_Tetrahedral(imcon,natms) ++ ++c--------------------------------------------------------------------- ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use utility_module, only : images ++ ++ implicit none ++ integer,intent(in) :: imcon,natms ++ ++ integer :: iatm0,iatm1,istrd,iatm,jatm,nn,itype,jtype ++ integer :: ninclude,ifi,ii,k,ztype,mm,katm,ktype,it ++ real(8) :: f_ij,f_ik,r_ij,r_ik,x,y,z,dot ++ real(8),parameter :: third=1.0d0/3.0d0 ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ real(8),allocatable,dimension(:) :: buff1 ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ allocate(xdf(1:mxflist),stat=ierr(1)) ++ allocate(ydf(1:mxflist),stat=ierr(2)) ++ allocate(zdf(1:mxflist),stat=ierr(3)) ++ allocate(buff1(1:ntet),stat=ierr(4)) ++ if (any(ierr/=0)) call Mfrz_Error(2546,0.d0) ++ ++ zeta_global(:) = 0.0d0 ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ itype = ltype(iatm) ++ ++c no tetrahedral contributions from this atom type? ++ ++ ztype = zetasite(itype) ++ if ( ztype == 0 ) cycle ++ ++ ii = ii + 1 ! index for this list ++ ++ do k = 1,nflist(ii) ++ ++ jatm = flist(k,ii) ++ ++ xdf(k) = xxx(jatm) - xxx(iatm) ! separation vector ++ ydf(k) = yyy(jatm) - yyy(iatm) ++ zdf(k) = zzz(jatm) - zzz(iatm) ++ ++ end do ++ ++ nn = nflist(ii) ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ ++ do k = 1,nflist(ii) ++ ++ jatm = flist(k,ii) ++ ++ r_ij = sqrt(xdf(k)*xdf(k) + ydf(k)*ydf(k) + zdf(k)*zdf(k)) ++ f_ij = fc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ ++ x = xdf(k) ; y = ydf(k) ; z = zdf(k) ++ ++c loop over all other entries katm ++ ++ do mm = k+1,nflist(ii) ++ ++c katm also in solvation shell of iatm ++ ++ katm = flist(mm,ii) ++ ++ r_ik = sqrt(xdf(mm)*xdf(mm) + ydf(mm)*ydf(mm) + ++ x zdf(mm)*zdf(mm)) ++ f_ik = fc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ ++c The node holding the central atom keeps the contrib ++ ++ dot = (x*xdf(mm) + y*ydf(mm) + z*zdf(mm)) / (r_ij*r_ik) + ++ x third ++ zeta_global(ztype) = zeta_global(ztype) + f_ij*f_ik*dot*dot ++ end do ++ end do ++ ++ end do ++ ++ call gdsum(zeta_global(1),ntet,buff1(1:ntet)) ++ ++ do it = 1,ntet ++ zeta_global(it) = 1.0d0 - zeta_global(it)/dble(zetaninc(it)* ++ x zetann(it)) ++ end do ++ ++ deallocate(xdf ,stat=ierr(1)) ++ deallocate(ydf ,stat=ierr(2)) ++ deallocate(zdf ,stat=ierr(3)) ++ deallocate(buff1,stat=ierr(4)) ++ if (any(ierr/=0)) call Mfrz_Error(2547,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Tetrahedral ++ ++ Subroutine Compute_Tetrahedral_Forces(imcon,natms,engord,virord) ++ ++c--------------------------------------------------------------------- ++c ++c Author D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use config_module ++ use site_module ++ use utility_module, only : images ++ ++ implicit none ++ integer,intent(in) :: imcon,natms ++ real(8),intent(inout) :: engord,virord ++ ++ integer :: iatm,jatm,katm,iatm0,iatm1,istrd,nn ++ integer :: ii,k,m,itet,itype,jtype,ztype,it ++ ++ real(8),parameter :: third = 1.0d0/3.0d0 ++ real(8) :: strs1,strs2,strs3,strs5,strs6,strs9 ++ real(8) :: xj,yj,zj,xk,yk,zk,tmpvar,tmpvar2,dot ++ real(8) :: r_ij,r_ik,f_ij,f_ik,df_ij,df_ik ++ real(8) :: invrij,invrik,ctheta ++ real(8) :: fxj,fyj,fzj,fxk,fyk,fzk ++ ++ real(8),dimension(3) :: rij_hat,rik_hat ++ ++ real(8),allocatable,dimension(:) :: xdf,ydf,zdf ++ real(8),allocatable,dimension(:) :: tetprefactor ++ ++ iatm0 = myrank+1 ++ iatm1 = natms ++ istrd = commsize ++ ++ allocate(xdf(1:mxflist),stat=ierr(1)) ++ allocate(ydf(1:mxflist),stat=ierr(2)) ++ allocate(zdf(1:mxflist),stat=ierr(3)) ++ allocate(tetprefactor(1:ntet),stat=ierr(4)) ++ if (any(ierr/=0)) call Mfrz_Error(2548,0.d0) ++ ++c Compute the prefactor ++ ++ k = nq4+nq6+1 ++ do it = 1,ntet ++ tetprefactor = dcolvar(k)/dble(zetaninc(it)*zetann(it)) ++ k = k + 1 ++ end do ++ ++c zero contribution to the stress tensor ++ ++ strs1=0.0d0 ++ strs2=0.0d0 ++ strs3=0.0d0 ++ strs5=0.0d0 ++ strs6=0.0d0 ++ strs9=0.0d0 ++ ++ ii = 0 ++ do iatm = iatm0,iatm1,istrd ++ ++ itype = ltype(iatm) ++ ++c no tetrahedral contributions from this atom type? ++ ++ ztype = zetasite(itype) ++ if ( ztype == 0 ) cycle ++ ++ ii = ii + 1 ! index for this list ++ ++ do k = 1,nflist(ii) ++ ++ jatm = flist(k,ii) ++ ++ xdf(k) = xxx(jatm) - xxx(iatm) ! separation vector ++ ydf(k) = yyy(jatm) - yyy(iatm) ++ zdf(k) = zzz(jatm) - zzz(iatm) ++ ++ end do ++ ++ nn = nflist(ii) ++ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) ++ ++ do k = 1,nflist(ii) ++ ++ jatm = flist(k,ii) ++ ++ r_ij = sqrt(xdf(k)*xdf(k) + ydf(k)*ydf(k) + zdf(k)*zdf(k)) ++ f_ij = fc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ df_ij = dfc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ ++ xj = xdf(k) ; yj = ydf(k) ; zj = zdf(k) ++ ++ invrij = 1.0d0/r_ij ++ ++ rij_hat(1) = xj*invrij ++ rij_hat(2) = yj*invrij ++ rij_hat(3) = zj*invrij ++ ++ do m = k + 1,nflist(ii) ++ ++ r_ik = sqrt(xdf(m)*xdf(m) + ydf(m)*ydf(m) + zdf(m)*zdf(m)) ++ f_ik = fc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ df_ik = dfc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) ++ ++ xk = xdf(m) ; yk = ydf(m) ; zk = zdf(m) ++ ++ invrik = 1.0d0/r_ik ++ ++ rik_hat(1) = xk*invrik ++ rik_hat(2) = yk*invrik ++ rik_hat(3) = zk*invrik ++ ++ ctheta = dot_product(rij_hat,rik_hat) ++ dot = ctheta + third ++ ++ tmpvar = 2.0d0*dot*f_ij*f_ik*tetprefactor(ztype)*invrij ++ tmpvar2 = tetprefactor(ztype)*dot*dot*df_ij*f_ik ++ ++c force between atom i and atom j due to second term ++c i.e. ( f_ij*f_ik*dot*dot ) ++ ++ fxj = tmpvar*(rik_hat(1) - rij_hat(1)*ctheta) + ++ x tmpvar2*rij_hat(1) ++ fyj = tmpvar*(rik_hat(2) - rij_hat(2)*ctheta) + ++ x tmpvar2*rij_hat(2) ++ fzj = tmpvar*(rik_hat(3) - rij_hat(3)*ctheta) + ++ x tmpvar2*rij_hat(3) ++ ++ tmpvar = 2.0d0*dot*f_ij*f_ik*tetprefactor(ztype)*invrik ++ tmpvar2 = tetprefactor(ztype)*dot*dot*df_ik*f_ij ++ ++c force between atom i and atom k due to second term ++c i.e ( f_ij*f_ik*dot*dot ) ++ ++ fxk = tmpvar*(rij_hat(1) - rik_hat(1)*ctheta) + ++ x tmpvar2*rik_hat(1) ++ fyk = tmpvar*(rij_hat(2) - rik_hat(2)*ctheta) + ++ x tmpvar2*rik_hat(2) ++ fzk = tmpvar*(rij_hat(3) - rik_hat(3)*ctheta) + ++ x tmpvar2*rik_hat(3) ++ ++c Add in to forces, virial and stress tensor ++ ++ katm = flist(m,ii) ++ ++ fxx(iatm) = fxx(iatm) + fxj + fxk ++ fyy(iatm) = fyy(iatm) + fyj + fyk ++ fzz(iatm) = fzz(iatm) + fzj + fzk ++ ++ fxx(jatm) = fxx(jatm) - fxj ++ fyy(jatm) = fyy(jatm) - fyj ++ fzz(jatm) = fzz(jatm) - fzj ++ ++ fxx(katm) = fxx(katm) - fxk ++ fyy(katm) = fyy(katm) - fyk ++ fzz(katm) = fzz(katm) - fzk ++ ++ virord = virord - fxj*xj - fyj*yj - fzj*zj ++ virord = virord - fxk*xk - fyk*yk - fzk*zk ++ ++ strs1 = strs1 + xk*fxk + xj*fxj ++ strs2 = strs2 + xk*fyk + xj*fyj ++ strs3 = strs3 + xk*fzk + xj*fzj ++ strs5 = strs5 + yk*fyk + yj*fyj ++ strs6 = strs6 + yk*fzk + yj*fzj ++ strs9 = strs9 + zk*fzk + zj*fzj ++ ++ end do ++ end do ++ end do ++ ++c Complete stress tensor ++ ++ stress(1)=stress(1)+strs1 ++ stress(2)=stress(2)+strs2 ++ stress(3)=stress(3)+strs3 ++ stress(4)=stress(4)+strs2 ++ stress(5)=stress(5)+strs5 ++ stress(6)=stress(6)+strs6 ++ stress(7)=stress(7)+strs3 ++ stress(8)=stress(8)+strs6 ++ stress(9)=stress(9)+strs9 ++ ++ ++c Tidy up ++ ++ deallocate(xdf,stat=ierr(1)) ++ deallocate(ydf,stat=ierr(2)) ++ deallocate(zdf,stat=ierr(3)) ++ if (any(ierr/=0)) call Mfrz_Error(2547,0.d0) ++ ++ return ++ ++ end Subroutine Compute_Tetrahedral_Forces ++ ++ Subroutine Mfrz_Error(kode,arg) ++ ++c--------------------------------------------------------------------- ++c ++c Author W. Smith Daresbury Laboratory January 2011 ++c Adapted from D. Quigley - University of Warwick ++c Copyright D. Quigley October 2008 ++c ++c--------------------------------------------------------------------- ++ ++ use setup_module, only : nrite,nhist,nread,nconf,nstats, ++ x nrest,nfield,ntable,nevnt ++ ++ implicit none ++ integer,intent(in) :: kode ++ real(8),intent(in) :: arg ++ ++ if(onroot)then ++ ++ if(kode.eq.2500)then ++ ++ write(nrite,"( ++ x 'Error in number of collective variables - '// ++ x 'ncolvar too small?' ++ x )") ++ ++ elseif(kode.eq.2501)then ++ ++ write(nrite,"( ++ x 'Wang-Landau style recursion not yet implemented'// ++ x 'for ncolvar > 1' ++ x )") ++ ++ elseif(kode.eq.2502)then ++ ++ write(nrite,"('Unrecognised Gaussian height scheme')") ++ ++ elseif(kode.eq.2503)then ++ ++ write(nrite,"('Error maxhis exceeded in metadynamics')") ++ ++ elseif(kode.eq.2504)then ++ ++ write(nrite,"( ++ x 'Error allocating comms buffer in compute_bias_potential' ++ x )") ++ ++ elseif(kode.eq.2505)then ++ ++ write(nrite,"('Error allocating driven array')") ++ ++ elseif(kode.eq.2506)then ++ ++ write(nrite,"('Could not open METACONTROL')") ++ ++ elseif(kode.eq.2508)then ++ ++ write(nrite,"('Comms error in metadynamics setup')") ++ ++ elseif(kode.eq.2509)then ++ ++ write(nrite,"( ++ x 'Cannot bias local and global PE in same run' ++ x )") ++ ++ elseif(kode.eq.2510)then ++ ++ write(nrite,"('Error allocating local force arrays')") ++ ++ elseif(kode.eq.2511)then ++ ++ write(nrite,"( ++ x 'Error allocating collective variables arrays' ++ x )") ++ ++ elseif(kode.eq.2512)then ++ ++ write(nrite,"('Error allocating Wang-Landau bins')") ++ ++ elseif(kode.eq.2515)then ++ ++ write(nrite,"( ++ x 'Error allocating Steinhardt parameter arrays' ++ x )") ++ ++ elseif(kode.eq.2516)then ++ ++ write(nrite,"('Could not open STEINHARDT')") ++ ++ elseif(kode.eq.2517)then ++ ++ write(nrite,"('Error allocating q4site')") ++ ++ elseif(kode.eq.2518)then ++ ++ write(nrite,"('Error allocating q6site')") ++ ++ elseif(kode.eq.2519)then ++ ++ write(nrite,"('Error deallocating buff')") ++ ++ elseif(kode.eq.2521)then ++ ++ write(nrite,"('Error reading line ',i5,' of STEINHARDT' ++ x )")nint(arg) ++ ++ elseif(kode.eq.2522)then ++ ++ write(nrite,"( ++ x 'Error allocating Steinhardt parameter arrays' ++ x )") ++ ++ elseif(kode.eq.2523)then ++ ++ write(nrite,"('Could not open ZETA')") ++ ++ elseif(kode.eq.2524)then ++ ++ write(nrite,"('Error allocating zetasite')") ++ ++ elseif(kode.eq.2525)then ++ ++ write(nrite,"('Error allocating full neighbour list')") ++ ++ elseif(kode.eq.2527)then ++ ++ write(nrite,"( ++ x 'Number of collective variables incorrect for specified'// ++ x 'order parameters' ++ x )") ++ ++ elseif(kode.eq.2529)then ++ ++ write(nrite,"('Error reading line ',i5,' of ZETA' ++ x )")nint(arg) ++ ++ elseif(kode.eq.2531)then ++ ++ write(nrite,"('Comms error on reading METADYNAMICS')") ++ ++ elseif(kode.eq.2532)then ++ ++ write(nrite,"('Error in fc function - out of range')") ++ write(nrite,"('Value of r was ',1p,e14.6)")arg ++ ++ elseif(kode.eq.2533)then ++ ++ write(nrite,"( ++ x 'Error allocating solvation arrays for metadynamics' ++ x )") ++ ++ elseif(kode.eq.2534)then ++ ++ write(nrite,"('Error allocating comms buffer arrays')") ++ ++ elseif(kode.eq.2535)then ++ ++ write(nrite,"('Solvation list overrun')") ++ ++ elseif(kode.eq.2536)then ++ ++ write(nrite,"( ++ x 'Error deallocating solvation arrays for metadynamics' ++ x )") ++ ++ elseif(kode.eq.2537)then ++ ++ write(nrite,"('Error deallocating comms buffer arrays')") ++ ++ elseif(kode.eq.2538)then ++ ++ write(nrite,"( ++ x 'Error allocating solvation arrays for metadynamics' ++ x )") ++ ++ elseif(kode.eq.2540)then ++ ++ write(nrite,"('Error allocating force prefactor arrays')") ++ ++ elseif(kode.eq.2541)then ++ ++ write(nrite,"( ++ x 'Memory allocation error in compute_tet_nlist' ++ x )") ++ ++ elseif(kode.eq.2542)then ++ ++ write(nrite,"( ++ x 'Error in metafreeze_module.f90 mxninc too small' ++ x )") ++ ++ elseif(kode.eq.2543)then ++ ++ write(nrite,"('nnn too small in compute_tet_nlist')") ++ ++ elseif(kode.eq.2544)then ++ ++ write(nrite,"('mxflist too small in metafreeze_module')") ++ ++ elseif(kode.eq.2545)then ++ ++ write(nrite,"( ++ x 'Memory deallocation error in compute_tet_nlist' ++ x )") ++ ++ elseif(kode.eq.2546)then ++ ++ write(nrite,"( ++ x 'Memory allocation error in compute_tet_nlist' ++ x )") ++ ++ elseif(kode.eq.2547)then ++ ++ write(nrite,"( ++ x 'Memory deallocation error in compute_tet_nlist' ++ x )") ++ ++ elseif(kode.eq.2548)then ++ ++ write(nrite,"( ++ x 'Memory allocation error in compute_tet_nlist' ++ x )") ++ ++ endif ++ ++c close all i/o channels ++ ++ close (nrite) ++ close (nhist) ++ close (nread) ++ close (nconf) ++ close (nstats) ++ close (nrest) ++ close (nfield) ++ close (ntable) ++ close (nevnt) ++ close (stn) ++ close (zta) ++ close (mtd) ++ ++ endif ++ ++c shut down communications ++ ++ call gsync() ++ call exitcomms() ++ ++ end Subroutine Mfrz_Error ++ ++ end module metafreeze_module ++ +diff -urN dl_class_1.9.orig/srcmod/metal_module.f dl_class_1.9/srcmod/metal_module.f +--- dl_class_1.9.orig/srcmod/metal_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/metal_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1669 @@ ++ module metal_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining metal potential arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use pair_module ++ use parse_module ++ use property_module ++ use setup_module ++ use site_module ++ use utility_module ++ ++ implicit none ++ ++ logical lmetab ++ integer, allocatable :: ltpmet(:),lstmet(:) ++ real(8), allocatable :: prmmet(:,:),vmet(:,:,:),dmet(:,:,:) ++ real(8), allocatable :: rho(:),elrcm(:),vlrcm(:),fmet(:,:,:) ++ ++ save lmetab,ltpmet,lstmet,prmmet,vmet,dmet,fmet,rho,elrcm,vlrcm ++ ++ contains ++ ++ subroutine alloc_met_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ integer i,fail,idnode ++ ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (ltpmet(mxmet),stat=fail(1)) ++ allocate (lstmet(mxmet),stat=fail(2)) ++ allocate (prmmet(mxmet,mxpmet),stat=fail(3)) ++ allocate (vmet(mxgrid,mxmet,2),stat=fail(4)) ++ allocate (dmet(mxgrid,mxmet,2),stat=fail(5)) ++ allocate (rho(mxatms),stat=fail(6)) ++ allocate (elrcm(0:mxsmet),stat=fail(7)) ++ allocate (vlrcm(0:mxsmet),stat=fail(8)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1280) ++ enddo ++ ++ end subroutine alloc_met_arrays ++ ++ subroutine define_metals ++ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rmet,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining metal potentials ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits,lmols ++ character*8 keyword ++ character*8 atom1,atom2 ++ character*1 message(80) ++ integer idnode,ntpmet,ntpatm,idum,imet,j ++ integer keypot,numpar,katm1,katm2,keymet,ntab,i,fail,itpmet ++ integer jtpatm ++ real(8) rmet,engunit ++ ++ real(8), allocatable :: parpot(:) ++ allocate (parpot(mxpmet),stat=fail) ++ ++ ntpmet=intstr(record,lenrec,idum) ++ ++ lmetab=.false. ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'number of specified metal ', ++ x 'potentials',i10)") ntpmet ++ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ',3x, ++ x ' key',30x,'parameters'/,/)") ++ ++ endif ++ ++ if(ntpmet.ge.mxmet) call error(idnode,71) ++ if(.not.lunits) call error(idnode,6) ++ if(.not.lmols) call error(idnode,13) ++ ++ do imet=1,mxmet ++ lstmet(imet)=0 ++ ltpmet(imet)=0 ++ enddo ++ ++ do itpmet=1,ntpmet ++ ++ do i=1,mxpmet ++ parpot(i)=0.d0 ++ enddo ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call getword(atom1,record,8,lenrec) ++ call getword(atom2,record,8,lenrec) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'stch') then ++ keypot=1 ++ numpar=5 ++ else if(keyword(1:4).eq.'fnsc') then ++ keypot=2 ++ numpar=7 ++ else if(keyword(1:4).eq.'gupt') then ++ keypot=3 ++ numpar=5 ++ elseif(keyword(1:4).eq.'eam ') then ++ keypot=999 ++ lmetab=.true. ++ numpar=0 ++ else ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,461) ++ endif ++ ++ if(.not.lmetab)then ++ ++ parpot(1)=dblstr(record,lenrec,idum) ++ parpot(2)=dblstr(record,lenrec,idum) ++ parpot(3)=dblstr(record,lenrec,idum) ++ parpot(4)=dblstr(record,lenrec,idum) ++ parpot(5)=dblstr(record,lenrec,idum) ++ parpot(6)=dblstr(record,lenrec,idum) ++ parpot(7)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(16x,2a8,2x,a4,3x,1p,9e13.5)") ++ x atom1,atom2,keyword(1:4),(parpot(j),j=1,numpar) ++ ++ endif ++ ++ katm1=0 ++ katm2=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm ++ ++ enddo ++ ++ if(katm1.eq.0.or.katm2.eq.0) then ++ call error(idnode,463) ++ endif ++ ++ keymet=loc2(katm1,katm2) ++ ++c convert energies to internal unit ++ ++ if(keymet.ge.mxmet) call error(idnode,465) ++ ++ parpot(1)=parpot(1)*engunit ++ ++ if(keypot.eq.2)then ++ ++ parpot(2)=parpot(2)*engunit ++ parpot(3)=parpot(3)*engunit ++ parpot(5)=parpot(5)*engunit ++ ++ endif ++ ++ if(keypot.eq.3)then ++ parpot(4)=parpot(4)*engunit ++ endif ++ ++ if(lstmet(keymet).ne.0) call error(idnode,141) ++ lstmet(keymet)=itpmet ++ ltpmet(itpmet)=keypot ++ if(itpmet.gt.1)then ++ if(keypot.ne.ltpmet(itpmet-1))call error(idnode,72) ++ endif ++ ++ if(.not.lmetab)then ++ ++ do i=1,numpar ++ prmmet(itpmet,i)=parpot(i) ++ enddo ++ ++ endif ++ ++ enddo ++ ++c check for unspecified atom-atom potentials ++ ++ ntab=(ntpatm*(ntpatm+1))/2 ++ ++ if(ntpmet.lt.ntab) then ++ ++ call warning(idnode,110,0.d0,0.d0,0.d0) ++ ++ do i=1,ntab ++ if(lstmet(i).eq.0) lstmet(i)=ntpmet+1 ++ enddo ++ ++c set zero potential for undefined interactions ++ ++ do i=1,mxmet ++ ++ vmet(1,i,1)=0.d0 ++ vmet(1,i,2)=0.d0 ++ dmet(1,i,1)=0.d0 ++ dmet(1,i,2)=0.d0 ++ ++ enddo ++ ++ endif ++ ++c generate metal force arrays ++ ++ call metgen(idnode,ntpatm,rmet) ++ ++ if(lmetab) ++ x call mettab(ntpatm,idnode,rmet,engunit) ++ ++ deallocate (parpot,stat=fail) ++ ++ return ++ end subroutine define_metals ++ ++ subroutine metdens ++ x (idnode,imcon,mxnode,natms,engmet,virden) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating local density in metals ++c using the verlet neighbour list and sutton-chen potentials ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1995 ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer idnode,imcon,mxnode,natms,i,j,k,ii,k0,l ++ real(8) engmet,engtmp,virden,rhosqr,rrr,ppp,fk0,fk1,fk2,t1,t2 ++ ++ safe=.true. ++ ++c initialise energy accumulator ++ ++ engmet=0.d0 ++ virden=0.d0 ++ ++c initialise density array ++ ++ do i=1,natms ++ rho(i)=0.d0 ++ enddo ++ ++c calculate local atomic density ++ ++ ii=0 ++ ++c outer loop over atoms ++ ++ do i=idnode+1,natms,mxnode ++ ++ ii=ii+1 ++ ++c calculate interatomic distances ++ ++ do k=1,lentry(ii) ++ ++ j=list(ii,k) ++ ilist(k)=j ++ xdf(k)=xxx(i)-xxx(j) ++ ydf(k)=yyy(i)-yyy(j) ++ zdf(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary conditions ++ ++ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) ++ ++c square of distances ++ ++ do k=1,lentry(ii) ++ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 ++ enddo ++ ++ if(lmetab)then ++ ++c calculate EAM density contributions ++ ++ call eamden(safe,i,lentry(ii)) ++ ++ else ++ ++c calculate FS density contributions ++ ++ call fsden(safe,i,lentry(ii)) ++ ++ endif ++ ++ enddo ++ ++c global sum of local atomic densities ++ ++ if(mxnode.gt.1)call gdsum(rho,natms,buffer) ++ ++c calculate embedding energy ++ ++ if(lmetab)then ++ ++c density terms for eam potentials ++ ++ do i=1,natms ++ ++ if(rho(i).gt.0.d0)then ++ ++ k0=ltype(i) ++ rrr=rho(i)-fmet(2,k0,1) ++ l=min(nint(rrr/fmet(4,k0,1)),int(fmet(1,k0,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ ++ else ++ ++ ppp=(rrr/fmet(4,k0,1))-dble(l) ++ ++c calculate embedding energy using 3-point interpolation ++ ++ fk0=fmet(l-1,k0,1) ++ fk1=fmet(l,k0,1) ++ fk2=fmet(l+1,k0,1) ++ ++ t1=fk1+(fk1-fk0)*ppp ++ t2=fk1+(fk2-fk1)*ppp ++ if(ppp.lt.0.d0)then ++ engtmp=-(t1+0.5d0*(t2-t1)*(ppp+1.d0)) ++ else ++ engtmp=-(t2+0.5d0*(t2-t1)*(ppp-1.d0)) ++ endif ++ ++ engmet=engmet+engtmp ++ ++c calculate derivative of embedding function wrt density using 3-point ++c interpolation - store result in rho array ++ ++ fk0=fmet(l-1,k0,2) ++ fk1=fmet(l,k0,2) ++ fk2=fmet(l+1,k0,2) ++ ++ t1=fk1+(fk1-fk0)*ppp ++ t2=fk1+(fk2-fk1)*ppp ++ if(ppp.lt.0.d0)then ++ rho(i)=(t1+0.5d0*(t2-t1)*(ppp+1.d0)) ++ else ++ rho(i)=(t2+0.5d0*(t2-t1)*(ppp-1.d0)) ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ else ++ ++c analytical square root of density dependence ++ ++ do i=1,natms ++ ++ if(rho(i).gt.0.d0)then ++ ++ rhosqr=sqrt(rho(i)+elrcm(ltype(i))) ++ engmet=engmet+rhosqr ++ rho(i)=0.5d0/rhosqr ++ virden=virden+vlrcm(ltype(i))/rhosqr ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ engmet=-engmet/dble(mxnode) ++ virden=virden/dble(mxnode) ++ ++c check interpolation is safe ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,142) ++ ++ return ++ end subroutine metdens ++ ++ subroutine fsden(safe,iatm,ik) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating local atomic density ++c for FS type metal potentials ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer iatm,jatm,ik,m,k0,l ++ real(8) rdr,ai,aj,ab,rsq,rrr,ppp,t1,t2 ++ real(8) vk0,vk1,vk2,density ++ ++c start of primary loop for density ++ ++ ai=dble(ltype(iatm)) ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ jatm=ilist(m) ++ ++ aj=dble(ltype(jatm)) ++ if(ai.gt.aj) then ++ ab=ai*(ai-1.d0)*0.5d0+aj+0.5d0 ++ else ++ ab=aj*(aj-1.d0)*0.5d0+ai+0.5d0 ++ endif ++ ++ k0=lstmet(int(ab)) ++ ++ if((ltpmet(k0).ge.1).and.(abs(dmet(1,k0,1)).gt.0.d0))then ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++c apply cutoff condition ++ ++ if(rsq.le.dmet(3,k0,1)**2)then ++ ++c interpolation parameters ++ ++ rdr=1.d0/dmet(4,k0,1) ++ rrr=sqrt(rsq)-dmet(2,k0,1) ++ l=min(nint(rrr*rdr),int(dmet(1,k0,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ ++ else ++ ++ ppp=rrr*rdr-dble(l) ++ ++c calculate density using 3-point interpolation ++ ++ vk0=dmet(l-1,k0,1) ++ vk1=dmet(l,k0,1) ++ vk2=dmet(l+1,k0,1) ++ ++ t1=vk1+ppp*(vk1-vk0) ++ t2=vk1+ppp*(vk2-vk1) ++ if(ppp.lt.0.d0)then ++ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ if(ai.gt.aj)then ++ ++ rho(iatm)=rho(iatm)+density*dmet(1,k0,2) ++ rho(jatm)=rho(jatm)+density*dmet(2,k0,2) ++ ++ else ++ ++ rho(iatm)=rho(iatm)+density*dmet(2,k0,2) ++ rho(jatm)=rho(jatm)+density*dmet(1,k0,2) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine fsden ++ ++ subroutine eamden(safe,iatm,ik) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating local atomic density ++c for EAM type metal potentials ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ logical safe ++ integer iatm,jatm,ik,m,l,ktyp1,ktyp2 ++ real(8) rdr,rsq,rrr,ppp,t1,t2 ++ real(8) vk0,vk1,vk2,density ++ ++c start of primary loop for density ++ ++ ktyp1=ltype(iatm) ++ ++ do m=1,ik ++ ++c first metal atom density ++ ++ jatm=ilist(m) ++ ktyp2=ltype(jatm) ++ ++ if(abs(dmet(1,ktyp2,1)).gt.0.d0)then ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++ if(rsq.le.dmet(3,ktyp2,1)**2)then ++ ++c interpolation parameters ++ ++ rdr=1.d0/dmet(4,ktyp2,1) ++ rrr=sqrt(rsq)-dmet(2,ktyp2,1) ++ l=min(nint(rrr*rdr),int(dmet(1,ktyp2,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ ++ else ++ ++ ppp=rrr*rdr-dble(l) ++ ++c calculate density using 3-point interpolation ++ ++ vk0=dmet(l-1,ktyp2,1) ++ vk1=dmet(l,ktyp2,1) ++ vk2=dmet(l+1,ktyp2,1) ++ ++ t1=vk1+ppp*(vk1-vk0) ++ t2=vk1+ppp*(vk2-vk1) ++ if(ppp.lt.0.d0)then ++ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ rho(iatm)=rho(iatm)+density ++ if(ktyp1.eq.ktyp2)rho(jatm)=rho(jatm)+density ++ ++ endif ++ ++ endif ++ ++ endif ++ ++c second metal atom density ++ ++ if(ktyp1.ne.ktyp2)then ++ ++ if(abs(dmet(1,ktyp1,1)).gt.0.d0)then ++ ++c apply truncation of potential ++ ++ if(rsq.le.dmet(3,ktyp1,1)**2)then ++ ++c interpolation parameters ++ ++ rdr=1.d0/dmet(4,ktyp1,1) ++ rrr=sqrt(rsq)-dmet(2,ktyp1,1) ++ l=min(nint(rrr*rdr),int(dmet(1,ktyp1,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ ++ else ++ ++ ppp=rrr*rdr-dble(l) ++ ++c calculate density using 3-point interpolation ++ ++ vk0=dmet(l-1,ktyp1,1) ++ vk1=dmet(l,ktyp1,1) ++ vk2=dmet(l+1,ktyp1,1) ++ ++ t1=vk1+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*ppp ++ if(ppp.lt.0.d0)then ++ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ rho(jatm)=rho(jatm)+density ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine eamden ++ ++ subroutine metfrc(safe,iatm,ik,engmet,virmet) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating metal forces ++c for EAM and FS potentials using a verlet neighbour list ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer iatm,jatm,ik,m,k0,l,ld,ktyp1,ktyp2 ++ real(8) engmet,virmet,strs ++ real(8) rdr,rsq,rrr,ppp,vk0,vk1,vk2,t1,t2,gk0,gk1,gk2 ++ real(8) gamma,gamma1,gamma2,gamma3,fx,fy,fz,fi ++ dimension fi(3),strs(6) ++ ++CDIR$ CACHE_ALIGN fi ++ ++c initialise potential energy and virial ++ ++ engmet=0.d0 ++ virmet=0.d0 ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ ++c store forces for iatm ++ ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ktyp1=ltype(iatm) ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ jatm=ilist(m) ++ ktyp2=ltype(jatm) ++ k0=lstmet(loc2(ktyp1,ktyp2)) ++ ++ if((ltpmet(k0).gt.0).and.(abs(vmet(1,k0,1)).gt.0.d0))then ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++ if(rsq.le.vmet(3,k0,1)**2)then ++ ++c interpolation parameters ++ ++ rdr=1.d0/vmet(4,k0,1) ++ rrr=sqrt(rsq)-vmet(2,k0,1) ++ l=min(nint(rrr*rdr),int(vmet(1,k0,1))-1) ++ if(l.lt.1)then ++ ++ safe=.false. ++ gamma1=0.d0 ++ ++ else ++ ++ ppp=rrr*rdr-dble(l) ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0=vmet(l-1,k0,1) ++ vk1=vmet(l,k0,1) ++ vk2=vmet(l+1,k0,1) ++ ++ t1=vk1+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*ppp ++ if(ppp.lt.0.d0)then ++ engmet=engmet+t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ engmet=engmet+t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++c calculate pair forces using 3-point interpolation ++ ++ gk0=vmet(l-1,k0,2) ++ gk1=vmet(l,k0,2) ++ gk2=vmet(l+1,k0,2) ++ ++ t1=gk1+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*ppp ++ if(ppp.lt.0.d0)then ++ gamma1=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ gamma1=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ endif ++ ++c calculate embedding forces using 3-point interpolation ++ ++ if(lmetab)then ++ ++ if(rsq.le.dmet(3,ktyp2,1)**2)then ++ ++ rdr=1.d0/dmet(4,ktyp2,1) ++ rrr=sqrt(rsq)-dmet(2,ktyp2,1) ++ ld=min(nint(rrr*rdr),int(dmet(1,ktyp2,1))-1) ++ if(ld.lt.1)then ++ ++ safe=.false. ++ gamma2=0.d0 ++ ++ else ++ ++ ppp=rrr*rdr-dble(ld) ++ ++ gk0=dmet(ld-1,ktyp2,2) ++ gk1=dmet(ld,ktyp2,2) ++ gk2=dmet(ld+1,ktyp2,2) ++ ++ t1=gk1+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*ppp ++ if(ppp.lt.0.d0)then ++ gamma2=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ gamma2=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ endif ++ ++ else ++ ++ gamma2=0.d0 ++ ++ endif ++ ++ if(ktyp1.eq.ktyp2)then ++ ++ gamma3=gamma2 ++ ++ elseif(rsq.le.dmet(3,ktyp1,1)**2)then ++ ++ rdr=1.d0/dmet(4,ktyp1,1) ++ rrr=sqrt(rsq)-dmet(2,ktyp1,1) ++ ld=min(nint(rrr*rdr),int(dmet(1,ktyp1,1))-1) ++ if(ld.lt.1)then ++ ++ safe=.false. ++ gamma3=0.d0 ++ ++ else ++ ++ ppp=rrr*rdr-dble(ld) ++ gk0=dmet(ld-1,ktyp1,2) ++ gk1=dmet(ld,ktyp1,2) ++ gk2=dmet(ld+1,ktyp1,2) ++ ++ t1=gk1+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*ppp ++ if(ppp.lt.0.d0)then ++ gamma3=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ gamma3=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ endif ++ ++ else ++ ++ gamma3=0.d0 ++ ++ endif ++ ++ gamma=(gamma1+(gamma2*rho(iatm)+gamma3*rho(jatm)))/rsq ++ ++ else ++ ++ if(safe.and.rsq.le.dmet(3,k0,1)**2)then ++ ++ gk0=dmet(l-1,k0,2) ++ gk1=dmet(l,k0,2) ++ gk2=dmet(l+1,k0,2) ++ ++ t1=gk1+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*ppp ++ if(ppp.lt.0.d0)then ++ gamma2=t1+0.5d0*(t2-t1)*(ppp+1.d0) ++ else ++ gamma2=t2+0.5d0*(t2-t1)*(ppp-1.d0) ++ endif ++ ++ else ++ ++ gamma2=0.d0 ++ ++ endif ++ ++ if(ktyp1.gt.ktyp2)then ++ ++ gamma=(gamma1-gamma2*(rho(iatm)*dmet(1,k0,2)+ ++ x rho(jatm)*dmet(2,k0,2)))/rsq ++ ++ else ++ ++ gamma=(gamma1-gamma2*(rho(iatm)*dmet(2,k0,2)+ ++ x rho(jatm)*dmet(1,k0,2)))/rsq ++ ++ endif ++ ++ endif ++ ++c calculate forces ++ ++ fx=gamma*xdf(m) ++ fy=gamma*ydf(m) ++ fz=gamma*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++c calculate virial ++ ++ virmet=virmet-gamma*rsq ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ return ++ end subroutine metfrc ++ ++ subroutine metgen(idnode,ntpatm,rmet) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for generating potential energy and ++c force arrays for metal potentials ++c ++c copyright - daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,kmet,mmet,katm1,katm2,ntpatm,imet,nmet ++ integer idnode,nnn,mmm ++ real(8) dlrpot,rmet,rrr,eps,sig,cc0,cc1,cc2,ccc ++ real(8) ddd,bet,cut1,cut2,aaa,rr0,ppp,qqq ++ ++c define grid resolution for potential arrays ++ ++ dlrpot=rmet/dble(mxgrid-1) ++ ++c construct arrays for metal potentials ++ ++ kmet=0 ++ do katm1=1,ntpatm ++ ++ do katm2=1,katm1 ++ ++ kmet=kmet+1 ++ imet=lstmet(kmet) ++ ++ if(ltpmet(imet).gt.0)then ++ ++c store array specification parameters ++ ++ vmet(1,imet,1)=dble(mxgrid) ++ vmet(2,imet,1)=0.d0 ++ vmet(3,imet,1)=rmet ++ vmet(4,imet,1)=dlrpot ++ ++ do i=1,4 ++ ++ vmet(i,imet,2)=vmet(i,imet,1) ++ dmet(i,imet,1)=vmet(i,imet,1) ++ dmet(i,imet,2)=0.d0 ++ ++ enddo ++ ++ if(ltpmet(imet).eq.1)then ++ ++c sutton-chen potentials ++ ++ eps=prmmet(imet,1) ++ sig=prmmet(imet,2) ++ nnn=nint(prmmet(imet,3)) ++ mmm=nint(prmmet(imet,4)) ++ ++ do i=5,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ vmet(i,imet,1)=eps*(sig/rrr)**nnn ++ vmet(i,imet,2)=dble(nnn)*eps*(sig/rrr)**nnn ++ dmet(i,imet,1)=(sig/rrr)**mmm ++ dmet(i,imet,2)=dble(mmm)*(sig/rrr)**mmm ++ ++ enddo ++ ++ if(katm1.eq.katm2)then ++ ++ dmet(1,imet,2)=(prmmet(imet,1)*prmmet(imet,5))**2 ++ dmet(2,imet,2)=(prmmet(imet,1)*prmmet(imet,5))**2 ++ ++ else ++ ++ nmet=lstmet((katm1*(katm1+1))/2) ++ mmet=lstmet((katm2*(katm2+1))/2) ++ dmet(1,imet,2)=(prmmet(nmet,1)*prmmet(nmet,5))**2 ++ dmet(2,imet,2)=(prmmet(mmet,1)*prmmet(mmet,5))**2 ++ ++ endif ++ ++ else if(ltpmet(imet).eq.2)then ++ ++c finnis sinclair potentials ++ ++ cc0=prmmet(imet,1) ++ cc1=prmmet(imet,2) ++ cc2=prmmet(imet,3) ++ ccc=prmmet(imet,4) ++ ddd=prmmet(imet,6) ++ bet=prmmet(imet,7) ++ cut1=ccc+4.d0*dlrpot ++ cut2=ddd+4.d0*dlrpot ++ ++ do i=5,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ vmet(i,imet,1)=0.d0 ++ vmet(i,imet,2)=0.d0 ++ dmet(i,imet,1)=0.d0 ++ dmet(i,imet,2)=0.d0 ++ ++ if(rrr.le.cut1)then ++ ++ vmet(i,imet,1)=(cc0+cc1*rrr+cc2*rrr*rrr)*(rrr-ccc)**2 ++ vmet(i,imet,2)=-rrr*(2.d0*(cc0+cc1*rrr+cc2*rrr*rrr)* ++ x (rrr-ccc)+(cc1+2.d0*cc2*rrr)*(rrr-ccc)**2) ++ ++ endif ++ ++ if(rrr.le.cut2)then ++ ++ dmet(i,imet,1)=(rrr-ddd)**2+bet*(rrr-ddd)**3/ddd ++ dmet(i,imet,2)=-rrr*(2.d0*(rrr-ddd)+ ++ x 3.d0*bet*(rrr-ddd)**2/ddd) ++ ++ endif ++ ++ enddo ++ ++ if(katm1.eq.katm2)then ++ ++ dmet(1,imet,2)=prmmet(imet,5)**2 ++ dmet(2,imet,2)=prmmet(imet,5)**2 ++ ++ else ++ ++ nmet=lstmet((katm1*(katm1+1))/2) ++ mmet=lstmet((katm2*(katm2+1))/2) ++ dmet(1,imet,2)=prmmet(nmet,5)**2 ++ dmet(2,imet,2)=prmmet(mmet,5)**2 ++ ++ endif ++ ++ else if(ltpmet(imet).eq.3)then ++ ++c gupta potentials ++ ++ aaa=prmmet(imet,1) ++ rr0=prmmet(imet,2) ++ ppp=prmmet(imet,3) ++ qqq=prmmet(imet,5) ++ ++ do i=5,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ vmet(i,imet,1)=aaa*exp(-ppp*(rrr-rr0)/rr0) ++ vmet(i,imet,2)=vmet(i,imet,1)*rrr*ppp/rr0 ++ dmet(i,imet,1)=exp(-2.d0*qqq*(rrr-rr0)/rr0) ++ dmet(i,imet,2)=2.d0*dmet(i,imet,1)*rrr*qqq/rr0 ++ ++ enddo ++ ++ dmet(1,imet,2)=prmmet(imet,4)**2 ++ dmet(2,imet,2)=prmmet(imet,4)**2 ++ ++ else if(.not.lmetab)then ++ ++ call error(idnode,151) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine metgen ++ ++ subroutine lrcmetal ++ x (idnode,imcon,natms,ntpatm,engunit,rmet,volm) ++ ++c************************************************************************* ++c ++c DL_POLY subroutine to evaluate long-range corrections to ++c pressure and energy in a periodic metal system. ++c ++c copyright daresbury laboratory ++c author - w. smith june 1995 ++c amended - w. smith march 2006 ++c ++c*************************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,imcon,natms,ntpatm,i,ka,j ++ integer kmet,k0,k1,k2 ++ real(8) engunit,rmet,volm,twopi,forpi,eps,sig,nnn,mmm,ccc ++ real(8) elrcm0,elrcm1,elrcm2,vlrcm0,vlrcm1,vlrcm2,aaa,rr0,ppp ++ real(8) zet,qqq,eee ++ ++ save newjob ++ data newjob/.true./ ++ ++ twopi=2.0d0*pi ++ forpi=4.0d0*pi ++ ++c initalise counter arrays ++ ++ do i=1,mxsmet ++ numtyp(i)=0 ++ enddo ++ ++c evaluate species populations in system ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ numtyp(ka)=numtyp(ka)+1 ++ ++ enddo ++ ++c number densities ++ ++ do i=1,ntpatm ++ dens(i)=dble(numtyp(i))/volm ++ enddo ++ ++c long range corrections to density, energy and pressure ++ ++ do i=0,mxsmet ++ ++ elrcm(i)=0.d0 ++ vlrcm(i)=0.d0 ++ ++ enddo ++ ++ if(imcon.ne.0.and.imcon.ne.6) then ++ ++ kmet=0 ++ do i=1,ntpatm ++ ++ do j=1,i ++ ++ elrcm0=0.d0 ++ elrcm1=0.d0 ++ elrcm2=0.d0 ++ vlrcm0=0.d0 ++ vlrcm1=0.d0 ++ vlrcm2=0.d0 ++ ++ kmet=kmet+1 ++ k0=lstmet(kmet) ++ ++ if(ltpmet(k0).eq.1) then ++ ++c sutton-chen potentials ++ ++ eps=prmmet(k0,1) ++ sig=prmmet(k0,2) ++ nnn=prmmet(k0,3) ++ mmm=prmmet(k0,4) ++ ccc=prmmet(k0,5) ++ ++ elrcm0=eps*sig**3*(sig/rmet)**(nnn-3.d0)/(nnn-3.d0) ++ vlrcm0=eps*nnn*sig**3*(sig/rmet)**(nnn-3.d0)/(nnn-3.d0) ++ if(i.ne.j) then ++ elrcm0=elrcm0*2.d0 ++ vlrcm0=vlrcm0*2.d0 ++ endif ++ elrcm(0)=elrcm(0)+twopi*volm*dens(i)*dens(j)*elrcm0 ++ vlrcm(0)=vlrcm(0)-twopi*volm*dens(i)*dens(j)*vlrcm0 ++ ++ if(i.eq.j) then ++ ++ elrcm1=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (eps*ccc)**2 ++ elrcm(i)=elrcm(i)+forpi*dens(i)*elrcm1 ++ ++ vlrcm1=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (eps*ccc)**2 ++ vlrcm(i)=vlrcm(i)+twopi*dens(i)*vlrcm1 ++ ++ else ++ ++ k1=lstmet((i*(i+1))/2) ++ k2=lstmet((j*(j+1))/2) ++ elrcm1=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (prmmet(k1,1)*prmmet(k1,5))**2 ++ elrcm2=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (prmmet(k2,1)*prmmet(k2,5))**2 ++ elrcm(i)=elrcm(i)+forpi*dens(j)*elrcm1 ++ elrcm(j)=elrcm(j)+forpi*dens(i)*elrcm2 ++ ++ vlrcm1=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (prmmet(k1,1)*prmmet(k1,5))**2 ++ vlrcm2=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* ++ x (prmmet(k2,1)*prmmet(k2,5))**2 ++ vlrcm(i)=vlrcm(i)+twopi*dens(j)*vlrcm1 ++ vlrcm(j)=vlrcm(j)+twopi*dens(i)*vlrcm2 ++ ++ endif ++ ++ else if(ltpmet(k0).eq.3) then ++ ++c gupta potentials ++ ++ aaa=prmmet(k0,1) ++ rr0=prmmet(k0,2) ++ ppp=prmmet(k0,3) ++ zet=prmmet(k0,4) ++ qqq=prmmet(k0,5) ++ eee=exp(-ppp*(rmet-rr0)/rr0) ++ ++ elrcm0=aaa*(rr0/ppp)*(rmet**2+2.d0*rmet*(rr0/ppp)+ ++ x 2.d0*(rr0/ppp)**2)*eee ++ vlrcm0=aaa*(rmet**3+3.d0*rmet**2*(rr0/ppp)+ ++ x 6.d0*rmet*(rr0/ppp)**2+6.d0*(rr0/rmet)**3)*eee ++ if(i.ne.j) then ++ elrcm0=elrcm0*2.d0 ++ vlrcm0=vlrcm0*2.d0 ++ endif ++ elrcm(0)=elrcm(0)+twopi*volm*dens(i)*dens(j)*elrcm0 ++ vlrcm(0)=vlrcm(0)-twopi*volm*dens(i)*dens(j)*vlrcm0 ++ ++ eee=exp(-2.d0*qqq*(rmet-rr0)/rr0) ++ ++ if(i.eq.j) then ++ ++ elrcm1=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ ++ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee*zet**2 ++ elrcm(i)=elrcm(i)+forpi*dens(i)*elrcm1 ++ ++ vlrcm1=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ ++ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* ++ x eee*zet**2 ++ vlrcm(i)=vlrcm(i)+twopi*dens(i)*vlrcm1 ++ ++ else ++ ++ elrcm1=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ ++ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee* ++ x zet**2 ++ elrcm2=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ ++ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee* ++ x zet**2 ++ elrcm(i)=elrcm(i)+forpi*dens(j)*elrcm1 ++ elrcm(j)=elrcm(j)+forpi*dens(i)*elrcm2 ++ ++ vlrcm1=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ ++ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* ++ x eee*zet**2 ++ vlrcm2=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ ++ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* ++ x eee*zet**2 ++ vlrcm(i)=vlrcm(i)+twopi*dens(j)*vlrcm1 ++ vlrcm(j)=vlrcm(j)+twopi*dens(i)*vlrcm2 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(newjob)then ++ ++ newjob=.false. ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,/, ++ x 'long range corrections for metal potentials',/)") ++ write(nrite, ++ x "('short range energy and virial corrections:', ++ x 1p,2e15.6,/)") ++ x elrcm(0)/engunit,vlrcm(0)/engunit ++ write(nrite, ++ x "('density dependent energy and virial corrections',/)") ++ ++ do i=1,ntpatm ++ ++ kmet=lstmet((i*(i+1))/2) ++ if(lstmet(kmet).gt.0)then ++ ++ write(nrite,"(25x,a8,1p,2e15.6)")unqatm(i), ++ x elrcm(i)/engunit,vlrcm(i)/engunit ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine lrcmetal ++ ++ subroutine mettab(ntpatm,idnode,rmet,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for reading potential energy and ++c force arrays for EAM metal forces only ++c ++c copyright - daresbury laboratory ++c author - w. smith march 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 atom1,atom2,type ++ integer idnode,ntpatm,idum,fail ++ integer imet,katm1,katm2,jtpatm,i,j,k,ktype ++ integer numpot,numpts,ipot ++ real(8) rmet,engunit,start,finish ++ data fail/0/ ++ ++c allocate embedding array ++ ++ allocate(fmet(mxgrid,mxmet,2),stat=fail) ++ if(fail.ne.0)call error(idnode,36) ++ ++c define zero function for undefined interactions ++ ++ do i=1,mxmet ++ ++ fmet(1,i,1)=0.d0 ++ fmet(1,i,2)=0.d0 ++ ++ enddo ++ ++ if(idnode.eq.0)open (ntable,file='TABEAM') ++ ++c skip header record ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_eamtable_read(idnode,ntable) ++ ++c read number of potential functions in file ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_eamtable_read(idnode,ntable) ++ numpot=intstr(record,lenrec,idum) ++ ++ do ipot=1,numpot ++ ++c read data type, atom labels, number of points, start and end ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_eamtable_read(idnode,ntable) ++ ++c indentify data type ++ ++ ktype=1 ++ if(findstring('dens',record,idum).or. ++ x findstring('DENS',record,idum))ktype=2 ++ if(findstring('embe',record,idum).or. ++ x findstring('EMBE',record,idum))ktype=3 ++ call getword(type,record,8,lenrec) ++ ++c identify atom types ++ ++ call getword(atom1,record,8,lenrec) ++ if(ktype.eq.1)then ++ call getword(atom2,record,8,lenrec) ++ else ++ atom2=atom1 ++ endif ++ ++c data specifiers ++ ++ numpts=intstr(record,lenrec,idum) ++ start=dblstr(record,lenrec,idum) ++ finish=dblstr(record,lenrec,idum) ++ ++c check atom indentities ++ ++ katm1=0 ++ katm2=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm ++ ++ enddo ++ ++ if(katm1.eq.0.or.katm2.eq.0) then ++ if(idnode.eq.0) ++ x write(nrite,'(a)') ' **** '//atom1//' *** '//atom2//' ****' ++ call error(idnode,81) ++ endif ++ ++c check array dimensions ++ ++ if(mxbuff.lt.numpts+4)then ++ ++ if(idnode.eq.0) ++ x write(nrite,*) 'mxbuff must be >=',numpts+4,' in mettab' ++ call error(idnode,28) ++ ++ endif ++ ++c store working parameters (start shifted for DL_POLY interpolation) ++ ++ buffer(1)=dble(numpts+4) ++ buffer(4)=(finish-start)/dble(numpts-1) ++ buffer(2)=start-5.d0*buffer(4) ++ buffer(3)=finish ++ if(idnode.eq.0) ++ x write(nrite,"(16x,2a8,2x,a4,3x,1p,4e13.5)") ++ x atom1,atom2,type,dble(numpts),start,finish,buffer(4) ++ ++c read potential arrays ++ ++ k=4 ++ do j=1,(numpts+3)/4 ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_eamtable_read(idnode,ntable) ++ buffer(k+1)=dblstr(record,lenrec,idum) ++ buffer(k+2)=dblstr(record,lenrec,idum) ++ buffer(k+3)=dblstr(record,lenrec,idum) ++ buffer(k+4)=dblstr(record,lenrec,idum) ++ k=k+4 ++ ++ enddo ++ ++c copy data to internal arrays ++ ++ if(ktype.eq.1)then ++ ++c check range against specified cutoff ++ ++ if(rmet.lt.finish)call error(idnode,26) ++ ++c identify potential ++ ++ imet=lstmet(loc2(katm1,katm2)) ++ ++c pair potential terms ++ ++ vmet(1,imet,1)=buffer(1) ++ vmet(2,imet,1)=buffer(2) ++ vmet(3,imet,1)=buffer(3) ++ vmet(4,imet,1)=buffer(4) ++ ++ do i=5,mxgrid ++ ++ if(i-4.gt.numpts)then ++ vmet(i,imet,1)=0.d0 ++ else ++ vmet(i,imet,1)=buffer(i)*engunit ++ buffer(i)=buffer(i)*engunit ++ endif ++ ++ enddo ++ ++c calculate derivative of pair potential function ++ ++ call metal_deriv(imet,vmet,buffer) ++ ++c adapt derivatives for use in interpolation ++ ++ do i=5,numpts+4 ++ vmet(i,imet,2)=-(dble(i)*buffer(4)+buffer(2))* ++ x vmet(i,imet,2) ++ enddo ++ ++ else if(ktype.eq.2)then ++ ++c check range against specified cutoff ++ ++ if(rmet.lt.finish)call error(idnode,26) ++ ++c density terms ++ ++ dmet(1,katm1,1)=buffer(1) ++ dmet(2,katm1,1)=buffer(2) ++ dmet(3,katm1,1)=buffer(3) ++ dmet(4,katm1,1)=buffer(4) ++ ++ do i=5,mxgrid ++ ++ if(i-4.gt.numpts)then ++ dmet(i,katm1,1)=0.d0 ++ else ++ dmet(i,katm1,1)=buffer(i) ++ endif ++ ++ enddo ++ ++c calculate derivative of density function ++ ++ call metal_deriv(katm1,dmet,buffer) ++ ++c adapt derivatives for use in interpolation ++ ++ dmet(1,katm1,2)=0.d0 ++ dmet(2,katm1,2)=0.d0 ++ dmet(3,katm1,2)=0.d0 ++ dmet(4,katm1,2)=0.d0 ++ do i=5,numpts+4 ++ dmet(i,katm1,2)=-(dble(i)*buffer(4)+buffer(2))* ++ x dmet(i,katm1,2) ++ enddo ++ ++ else if(ktype.eq.3)then ++ ++c embedding function arrays ++ ++ fmet(1,katm1,1)=buffer(1) ++ fmet(2,katm1,1)=buffer(2) ++ fmet(3,katm1,1)=buffer(3) ++ fmet(4,katm1,1)=buffer(4) ++ ++ do i=5,mxgrid ++ ++ if(i-4.gt.numpts)then ++ fmet(i,katm1,1)=0.d0 ++ else ++ fmet(i,katm1,1)=buffer(i)*engunit ++ buffer(i)=buffer(i)*engunit ++ endif ++ ++ enddo ++ ++c calculate derivative of embedding function ++ ++ call metal_deriv(katm1,fmet,buffer) ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)close (ntable) ++ ++ if(idnode.eq.0)write(nrite,'(/,/,1x,a)') ++ x 'potential tables read from TABEAM file' ++ ++ return ++ end subroutine mettab ++ ++ subroutine metal_deriv(ityp,vvv,buffer) ++ ++c********************************************************************** ++c ++c calculate numerical derivatives of tabulated EAM metal potentials ++c ++c copyright - daresbury laboratory ++c author - w.smith march 2006 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer ityp,i,npt ++ real(8) vvv,buffer,delmet,aa0,aa1,aa2,aa3,aa4,d1y,d2y,d3y,d4y ++ real(8) f0,f1,f2,f3,f4 ++ ++ dimension vvv(mxgrid,mxmet,2),buffer(mxbuff) ++ ++c interpolation parameters ++ ++ vvv(1,ityp,2)=buffer(1) ++ vvv(2,ityp,2)=buffer(2) ++ vvv(3,ityp,2)=buffer(3) ++ vvv(4,ityp,2)=buffer(4) ++ ++c construct interpolation table ++ ++ delmet=buffer(4) ++ npt=nint(buffer(1))-2 ++ do i=7,npt ++ ++ aa0=buffer(i) ++ f0=buffer(i-2)/aa0 ++ f1=buffer(i-1)/aa0 ++ f2=1.d0 ++ f3=buffer(i+1)/aa0 ++ f4=buffer(i+2)/aa0 ++ ++c calculate numerical differences for 5-point interpolation ++ ++ d1y=(f1-f0) ++ d2y=(f2-f1)-(f1-f0) ++ d3y=(f3-f0)+3.d0*(f1-f2) ++ d4y=(f4-f3)+3.d0*(f2-f3)+3.d0*(f2-f1)+(f0-f1) ++ ++c calculate polynomial coefficients ++ ++ aa0=aa0/delmet ++ aa4=d4y/24.d0 ++ aa3=(d3y+12.d0*aa4)/6.d0 ++ aa2=(d2y+6.d0*aa3-14.d0*aa4)/2.d0 ++ aa1=d1y+3.d0*aa2-7.d0*aa3+15.d0*aa4 ++ ++c calculate derivatives ++ ++ vvv(i,ityp,2)=aa1*aa0 ++ ++c derivatives at extremes of range ++ ++ if(i.eq.7)then ++ ++ vvv(5,ityp,2)=(aa1-4.d0*aa2+12.d0*aa3-32.d0*aa4)*aa0 ++ vvv(6,ityp,2)=(aa1-2.d0*aa2+3.d0*aa3-4.d0*aa4)*aa0 ++ ++ else if(i.eq.npt)then ++ ++ vvv(npt+1,ityp,2)=(aa1+2.d0*aa2+3.d0*aa3+4.d0*aa4)*aa0 ++ vvv(npt+2,ityp,2)=(aa1+4.d0*aa2+12.d0*aa3+32.d0*aa4)*aa0 ++ ++ endif ++ ++ enddo ++ ++c set derivatives to zero beyond end point of function ++ ++ do i=npt+3,mxgrid ++ vvv(i,ityp,2)=0.d0 ++ enddo ++ ++ return ++ end subroutine metal_deriv ++ ++ subroutine abort_eamtable_read(idnode,ntable) ++ ++c*********************************************************************** ++c ++c dl_poly error exit subroutine for reading TABEAM file ++c ++c copyright - daresbury laboratory ++c author - w. smith mar 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ integer idnode,ntable ++ ++ if(idnode.eq.0)close (ntable) ++ ++ call error(idnode,29) ++ ++ end subroutine abort_eamtable_read ++ ++ end module metal_module +diff -urN dl_class_1.9.orig/srcmod/neu_coul_module.f dl_class_1.9/srcmod/neu_coul_module.f +--- dl_class_1.9.orig/srcmod/neu_coul_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/neu_coul_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,731 @@ ++ module neu_coul_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining neutral group coulomb terms ++c copyright - daresbury laboratory ++c ++c author - w. smith aug 2006 ++c adapted - p.-a. cazade oct 2007 : solvation, free energy etc ++c adapted - w. smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use ewald_module ++ use metafreeze_module ++ use pair_module ++ use setup_module ++ use solvation_module ++ ++ contains ++ ++ subroutine coul0neu ++ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic force. ++c 1/r potential, no truncation or damping. ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lexcite,lselect,lskip,idrive,jdrive ++ integer ik,m,iatm,jatm,kkk ++ real(8) engcpe,vircpe,epsq,chgprd,rsq,rrr,coul,reps,fcoul ++ real(8) fx,fy,fz ++ real(8) strs(6),strs_loc(6) ++ ++ lskip=(lfree.or.lexcite) ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ reps=r4pie0/epsq ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ iatm=ilist(m) ++ jatm=jlist(m) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(iatm)) ++ jdrive=driven(ltype(jatm)) ++ ++ endif ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chge(jatm)*chge(iatm)*reps ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++ rsq=rsqdf(m) ++ rrr=sqrt(rsq) ++ ++c calculate coulomb energy and force ++ ++ coul=chgprd/rrr ++ fcoul=coul/rsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+coul ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-coul ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate forces ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fxx(iatm)=fxx(iatm)+fx ++ fyy(iatm)=fyy(iatm)+fy ++ fzz(iatm)=fzz(iatm)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local definitions ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-coul ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine coul0neu ++ ++ subroutine coul2neu ++ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces ++c assuming a distance dependant dielectric `constant'. ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lexcite,lselect,lskip,idrive,jdrive ++ integer ik,m,iatm,jatm,kkk ++ real(8) engcpe,vircpe,epsq,fx,fy,fz,chgprd,rrsq,coul,egamma ++ real(8) strs(6),strs_loc(6) ++ ++ lskip=(lfree.or.lexcite) ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ iatm=ilist(m) ++ jatm=jlist(m) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(iatm)) ++ jdrive=driven(ltype(jatm)) ++ ++ endif ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chge(iatm)*chge(jatm)*r4pie0/epsq ++ ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate potential energy ++ ++ rrsq=1.d0/rsqdf(m) ++ coul=chgprd*rrsq ++ egamma=2.d0*coul*rrsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+2.d0*coul ++ coul=lambda1*coul ++ egamma=lambda1*egamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-2.d0*coul ++ coul=lambda2*coul ++ egamma=lambda2*egamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and Virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-2.d0*coul ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate forces ++ ++ fx=egamma*xdf(m) ++ fy=egamma*ydf(m) ++ fz=egamma*zdf(m) ++ ++ fxx(iatm)=fxx(iatm)+fx ++ fyy(iatm)=fyy(iatm)+fy ++ fzz(iatm)=fzz(iatm)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local definitions ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-2.d0*coul ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine coul2neu ++ ++ subroutine coul3neu ++ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq,rcut,alpha) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic force. ++c reaction field potential ++c Ref: M Neumann, J Chem Phys, 82, 5633, (1985) ++c adapted for fennell-gezelter coulombic model ++c by w.smith june 2007 ++c Ref: CJ Fennell and JD Gezelter, J Chem Phys, ++c 124, 234104, (2006) ++c adapted for solvation, free energy and excitation ++c - p.-a. cazade oct 2007 ++c ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1995 ++c author - t. forester february 1995 ++c stress tensor - t.forester feb 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lexcite,lselect,lskip,newjob,idrive,jdrive ++ integer ik,m,iatm,jatm,kkk ++ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,erc1,fer1 ++ real(8) rcsq,b0,rfld0,rfld1,rfld2,chgprd,rsq,coul,omega,fcoul ++ real(8) fx,fy,fz,rrr,alpha,a1,a2,a3,a4,a5,pp,tt,exp1 ++ real(8) strs(6),strs_loc(6) ++ ++ save newjob,b0,rfld0,rfld1,rfld2,vcon,fcon ++ ++ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ ++ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ ++ data newjob/.true./ ++ ++ if(newjob)then ++ ++c reaction field terms ++ ++ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) ++ rfld0=b0/rcut**3 ++ rfld1=(1.d0+b0*0.5d0)/rcut ++ rfld2=rfld0*0.5d0 ++ ++c screened coulomb terms ++ ++ tt=1.d0/(1.d0+pp*alpha*rcut) ++ exp1=exp(-(alpha*rcut)**2) ++ erc1=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut ++ fer1=(erc1+2.d0*(alpha/sqrpi)*exp1)/(rcut*rcut) ++ vcon=erc1+rfld2*rcut**2-rfld1 ++ fcon=rcut*fer1-rfld0*rcut ++ ++ endif ++ ++ lskip=(lfree.or.lexcite) ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic index and charge product ++ ++ iatm=ilist(m) ++ jatm=jlist(m) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(iatm)) ++ jdrive=driven(ltype(jatm)) ++ ++ endif ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ chgprd=chge(jatm)*chge(iatm)*r4pie0 ++ if(abs(chgprd).gt.1.d-10)then ++ ++c calculate interatomic distance ++ ++ rsq=rsqdf(m) ++ rrr=sqrt(rsq) ++ ++c error function terms ++ ++ tt=1.d0/(1.d0+pp*alpha*rrr) ++ exp1=exp(-(alpha*rrr)**2) ++ erc1=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rrr ++ fer1=(erc1+2.d0*(alpha/sqrpi)*exp1)/rsq ++ ++c calculate potential energy ++ ++ omega=erc1-vcon+fcon*(rrr-rcut) ++ coul=chgprd*(omega+rfld2*rsq-rfld1) ++ ++c calculate forces ++ ++ fcoul=chgprd*(fer1-fcon/rrr-rfld0) ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre-coul ++ cou_vir=cou_vir+fcoul*rsq ++ coul=lambda1*coul ++ fcoul=lambda1*fcoul ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ cou_fre=cou_fre+coul ++ cou_vir=cou_vir-fcoul*rsq ++ coul=lambda2*coul ++ fcoul=lambda2*fcoul ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate coulombic energy and virial ++ ++ engcpe=engcpe+coul ++ vircpe=vircpe-fcoul*rsq ++ ++c calculate solvation energy ++ ++ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul ++ ++c calculate coulombic force ++ ++ fx=fcoul*xdf(m) ++ fy=fcoul*ydf(m) ++ fz=fcoul*zdf(m) ++ ++ fxx(iatm)=fxx(iatm)+fx ++ fyy(iatm)=fyy(iatm)+fy ++ fzz(iatm)=fzz(iatm)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local definitions ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+coul ++ vir_loc=vir_loc-fcoul*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine coul3neu ++ ++ end module neu_coul_module +diff -urN dl_class_1.9.orig/srcmod/nlist_builders_module.f dl_class_1.9/srcmod/nlist_builders_module.f +--- dl_class_1.9.orig/srcmod/nlist_builders_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/nlist_builders_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,2216 @@ ++ module nlist_builders_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining neighbourlist builder routines ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use exclude_module ++ use pair_module ++ use setup_module ++ use utility_module ++ ++ contains ++ ++ subroutine nlist_driver ++ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, ++ x nneut,keyfce,rcut,delr,tstep) ++ ++c********************************************************************* ++c ++c dl_poly subroutine to select and implement neighbour list ++c builders for short range force calculations ++c ++c copyright - daresbury laboratory ++c author - w. smith june 2006 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,lneut,lnsq,loglnk,newjob,ltad ++ integer natms,idnode,mxnode,imcon,nneut,keyfce ++ real(8) rcut,delr,tstep ++ ++ save newjob ++ ++ data newjob/.true./ ++ ++c skip if no pair force calculations required ++ ++ if(keyfce.gt.0)then ++ ++c test for updating the Verlet list ++ ++ if(ltad)then ++ ++ call vertest2(newlst,idnode,mxnode,natms,imcon,delr,tstep) ++ ++ else ++ ++ call vertest(newlst,idnode,mxnode,natms,delr,tstep) ++ ++ endif ++ ++c set up nonbonded interaction (verlet) list ++ ++ newlst=(newjob.or.newlst) ++ ++ if(newlst)then ++ ++ if(.not.lneut)then ++ ++ if(lnsq)then ++ ++c calculate distant interactions explicitly ++ ++ call parlst_nsq(newlst,natms,idnode,mxnode,imcon,rcut) ++ ++ elseif(loglnk)then ++ ++c ignore real space distant interactions ++ ++ call parlink ++ x (newlst,natms,idnode,mxnode,imcon,rcut,delr) ++ ++ else ++ ++ call parlst ++ x (newlst,natms,idnode,mxnode,imcon,rcut,delr) ++ ++ endif ++ ++ else ++ ++ if(.not.loglnk)then ++ ++ call parneulst ++ x (newlst,lneut,nneut,idnode,mxnode,imcon,rcut, ++ x delr) ++ ++ else ++ ++ call parlinkneu ++ x (newlst,natms,nneut,idnode,mxnode,imcon, ++ x rcut,delr) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ newjob=.false. ++ ++ return ++ end subroutine nlist_driver ++ ++ subroutine parlst(newlst,natms,idnode,mxnode,imcon,rcut,delr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on the brode-ahlrichs scheme ++c frozen atoms taken into account ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w.smith march 1992 ++c modified - t.forester october 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst,lfrzi,ldo ++ integer natms,idnode,mxnode,imcon,ibig,last,mpm2 ++ integer npm2,idum,i,m,ii,j ++ real(8) rcut,delr,rclim,rsq ++ ++ ++ if(newlst)then ++ ++ ibig=0 ++ ++c check size of work array ++ ++ if(mxxdf.lt.(natms+1)/2)then ++ if(idnode.eq.0) write(nrite,*) 'mxxdf must be greater than ', ++ x (natms+1)/2 ++ call error(idnode,474) ++ endif ++ ++c set control variables ++ ++ last=natms ++ lchk=.true. ++ mpm2=natms/2 ++ npm2=(natms-1)/2 ++ ++c set cutoff radius ++ ++ rclim=(rcut+delr)**2 ++ ++c construct pair force neighbour list ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ noxatm(i)=1 ++ ++ enddo ++ ++c outer loop over atoms ++ ++ do m=1,mpm2 ++ ++ if(m.gt.npm2)last=mpm2 ++ ++c inner loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ ii=ii+1 ++ xdf(ii)=xxx(i)-xxx(j) ++ ydf(ii)=yyy(i)-yyy(j) ++ zdf(ii)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c apply minimum image convention ++ ++ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) ++ ++c allocate atoms to neighbour list ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++ lfrzi=(lstfrz(i).ne.0) ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ ii=ii+1 ++ ++c reject atoms in excluded pair list ++ ++ if((nexatm(ii).gt.0).and.(lexatm(ii,noxatm(ii)).eq.j)) ++ x then ++ ++ noxatm(ii)=min(noxatm(ii)+1,nexatm(ii)) ++ ++c reject frozen atom pairs ++ ++ else ++ ++ ldo=.true. ++ if(lfrzi)ldo=(lstfrz(j).eq.0) ++ ++ if(ldo)then ++ ++c calculate interatomic distance ++ ++ if(imcon.eq.6)then ++ ++ rsq=xdf(ii)*xdf(ii)+ydf(ii)*ydf(ii) ++ ++ else ++ ++ rsq=xdf(ii)*xdf(ii)+ydf(ii)*ydf(ii)+zdf(ii)*zdf(ii) ++ ++ endif ++ ++c running check of neighbour list array capacity ++ ++ if(rsq.lt.rclim)then ++ ++ lentry(ii)=lentry(ii)+1 ++ ++ if(lentry(ii).gt.mxlist)then ++ ++ lchk=.false. ++ ibig=max(lentry(ii),ibig) ++ ++ endif ++ ++c compile neighbour list array ++ ++ if(lchk)then ++ ++ list(ii,lentry(ii))=j ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ ++ if(.not.lchk)then ++ ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) ' mxlist must be at least ',ibig ++ write(nrite,*) ' mxlist is currently ',mxlist ++ endif ++ call error(idnode,110) ++ ++ endif ++ ++c check all excluded atoms are accounted for ++ ++ do i=1,ii ++ ++ if(nexatm(i).gt.0.and.noxatm(i).ne.nexatm(i))lchk=.false. ++ ++ enddo ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ ++ if(.not.lchk) call error(idnode,160) ++ ++ endif ++ ++ return ++ end subroutine parlst ++ ++ subroutine parlink(newlst,natms,idnode,mxnode,imcon,rcut,delr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on link-cell method. ++c frozen atoms taken into account ++c ++c to be used with the link version of exclude :exclude_link ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1993 ++c author - t. forester september 1993. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst,linc,newjob,lfrzi,ldo ++ integer natms,idnode,mxnode,imcon,idum,nix,niy,niz,fail ++ integer i,ibig,irat,nsbcll,ilx,ily,ilz,ncells,ix,iy,iz,j,icell ++ integer ic,ii,kc,ik,jx,jy,jz,jc,ixl ++ real(8) rcut,delr,rcsq,xm,ym,zm,det,xdc,ydc,zdc,tx,ty,tz ++ real(8) cx,cy,cz,sxd,syd,szd,xd,yd,zd,rsq ++ ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ ++ dimension nix(508),niy(508),niz(508) ++ ++ save newjob ++ data newjob/.true./ ++ ++ data nix/0,1,0,0,-1,1,0,-1,1,0,-1,1,-1,1,2,0,0,-2,2,-1,1,0,-2,2,0, ++ x 0,-1,1,0,-1,1,-2,2,-2,2,-1,1,-1,1,-1,1,-2,2,0,-2,2,0,-2,2,-2,2, ++ x -1,1,-2,2,-2,2,-1,1,-2,2,-2,2,3,0,0,-3,3,-1,1,0,-3,3,0,0,-1,1,0, ++ x -1,1,-3,3,-3,3,-1,1,-1,1,-1,1,-3,3,-2,2,0,-3,3,0,0,-2,2,0,-2,2, ++ x -3,3,-3,3,-2,2,-1,1,-3,3,-3,3,-1,1,-1,1,-2,2,-2,2,-1,1,-2,2,-3,3, ++ x -3,3,-2,2,-2,2,-2,2,-3,3,0,-3,3,0,-3,3,-3,3,-1,1,-3,3,-3,3,-1,1, ++ x -3,3,-3,3,-2,2,-3,3,-3,3,-2,2,-3,3,-3,3,4,0,0,-4,4,-1,1,0,-4,4,0, ++ x 0,-1,1,0,-1,1,-4,4,-4,4,-1,1,-1,1,-1,1,-4,4,-2,2,0,-4,4,0,0,-2,2, ++ x 0,-2,2,-4,4,-4,4,-2,2,-1,1,-4,4,-4,4,-1,1,-1,1,-2,2,-2,2,-1,1,-2, ++ x 2,-4,4,-4,4,-2,2,-2,2,-2,2,-4,4,-3,3,0,-4,4,0,0,-3,3,0,-3,3,-4,4, ++ x -4,4,-3,3,-1,1,-4,4,-4,4,-1,1,-1,1,-3,3,-3,3,-1,1,-3,3,-4,4,-4,4, ++ x -3,3,-2,2,-4,4,-4,4,-2,2,-2,2,-3,3,-3,3,-2,2,-3,3,-4,4,-4,4,-3,3, ++ x -3,3,-3,3,-4,4,0,-4,4,0,-4,4,-4,4,-1,1,-4,4,-4,4,-1,1,-4,4,-4,4, ++ x -2,2,-4,4,-4,4,-2,2,-4,4,-4,4,-3,3,-4,4,-4,4,-3,3,5,0,0,-5,5,-1, ++ x 1,0,-5,5,0,0,-1,1,0,-1,1,-5,5,-5,5,-1,1,-1,1,-1,1,-5,5,-2,2,0,-5, ++ x 5,0,0,-2,2,0,-2,2,-5,5,-5,5,-2,2,-1,1,-5,5,-5,5,-1,1,-1,1,-2,2, ++ x -2,2,-1,1,-2,2,-5,5,-5,5,-2,2,-2,2,-2,2,-5,5,-3,3,0,-5,5,0,0,-3, ++ x 3,0,-3,3,-5,5,-5,5,-3,3,-1,1,-5,5,-5,5,-1,1,-1,1,-3,3,-3,3,-1,1, ++ x -3,3,-5,5,-5,5,-3,3,-2,2,-5,5,-5,5,-2,2,-2,2,-3,3,-3,3,-2,2,-3,3, ++ x -5,5,-5,5,-3,3,-3,3,-3,3/ ++ data niy/ 0,0,1,0,1,1,-1,0,0,1,-1,-1,1,1,0,2,0,1,1,2,2,-2,0,0,2, ++ x -1,0,0,1,-2,-2,-1,-1,1,1,2,2,-1,-1,1,1,2,2,-2,0,0,2,-2,-2,2,2,-2, ++ x -2,-1,-1,1,1,2,2,-2,-2,2,2,0,3,0,1,1,3,3,-3,0,0,3,-1,0,0,1,-3,-3, ++ x -1,-1,1,1,3,3,-1,-1,1,1,2,2,3,3,-3,0,0,3,-2,0,0,2,-3,-3,-2,-2,2, ++ x 2,3,3,-3,-3,-1,-1,1,1,3,3,-2,-2,-1,-1,1,1,2,2,-3,-3,-2,-2,2,2,3, ++ x 3,-2,-2,2,2,3,3,-3,0,0,3,-3,-3,3,3,-3,-3,-1,-1,1,1,3,3,-3,-3,3,3, ++ x -3,-3,-2,-2,2,2,3,3,-3,-3,3,3,0,4,0,1,1,4,4,-4,0,0,4,-1,0,0,1,-4, ++ x -4,-1,-1,1,1,4,4,-1,-1,1,1,2,2,4,4,-4,0,0,4,-2,0,0,2,-4,-4,-2,-2, ++ x 2,2,4,4,-4,-4,-1,-1,1,1,4,4,-2,-2,-1,-1,1,1,2,2,-4,-4,-2,-2,2,2, ++ x 4,4,-2,-2,2,2,3,3,4,4,-4,0,0,4,-3,0,0,3,-4,-4,-3,-3,3,3,4,4,-4, ++ x -4,-1,-1,1,1,4,4,-3,-3,-1,-1,1,1,3,3,-4,-4,-3,-3,3,3,4,4,-4,-4, ++ x -2,-2,2,2,4,4,-3,-3,-2,-2,2,2,3,3,-4,-4,-3,-3,3,3,4,4,-3,-3,3,3, ++ x 4,4,-4,0,0,4,-4,-4,4,4,-4,-4,-1,-1,1,1,4,4,-4,-4,4,4,-4,-4,-2,-2, ++ x 2,2,4,4,-4,-4,4,4,-4,-4,-3,-3,3,3,4,4,0,5,0,1,1,5,5,-5,0,0,5,-1, ++ x 0,0,1,-5,-5,-1,-1,1,1,5,5,-1,-1,1,1,2,2,5,5,-5,0,0,5,-2,0,0,2,-5, ++ x -5,-2,-2,2,2,5,5,-5,-5,-1,-1,1,1,5,5,-2,-2,-1,-1,1,1,2,2,-5,-5, ++ x -2,-2,2,2,5,5,-2,-2,2,2,3,3,5,5,-5,0,0,5,-3,0,0,3,-5,-5,-3,-3,3, ++ x 3,5,5,-5,-5,-1,-1,1,1,5,5,-3,-3,-1,-1,1,1,3,3,-5,-5,-3,-3,3,3,5, ++ x 5,-5,-5,-2,-2,2,2,5,5,-3,-3,-2,-2,2,2,3,3,-5,-5,-3,-3,3,3,5,5,-3, ++ x -3,3,3/ ++ data niz/0,0,0,1,0,0,1,1,1,1,1,1,1,1,0,0,2,0,0,0,0,1,1,1,1,2,2,2, ++ x 2,1,1,1,1,1,1,1,1,2,2,2,2,0,0,2,2,2,2,1,1,1,1,2,2,2,2,2,2,2,2,2, ++ x 2,2,2,0,0,3,0,0,0,0,1,1,1,1,3,3,3,3,1,1,1,1,1,1,1,1,3,3,3,3,0,0, ++ x 0,0,2,2,2,2,3,3,3,3,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3, ++ x 3,3,2,2,2,2,2,2,2,2,3,3,3,3,0,0,3,3,3,3,1,1,1,1,3,3,3,3,3,3,3,3, ++ x 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,0,0,4,0,0,0,0,1,1,1,1,4,4,4,4,1, ++ x 1,1,1,1,1,1,1,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,1,1,1,1,1,1,1,1,2, ++ x 2,2,2,2,2,2,2,4,4,4,4,4,4,4,4,2,2,2,2,2,2,2,2,4,4,4,4,0,0,0,0,3, ++ x 3,3,3,4,4,4,4,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,2, ++ x 2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,4, ++ x 4,4,4,0,0,4,4,4,4,1,1,1,1,4,4,4,4,4,4,4,4,2,2,2,2,4,4,4,4,4,4,4, ++ x 4,3,3,3,3,4,4,4,4,4,4,4,4,0,0,5,0,0,0,0,1,1,1,1,5,5,5,5,1,1,1,1, ++ x 1,1,1,1,5,5,5,5,0,0,0,0,2,2,2,2,5,5,5,5,1,1,1,1,1,1,1,1,2,2,2,2, ++ x 2,2,2,2,5,5,5,5,5,5,5,5,2,2,2,2,2,2,2,2,5,5,5,5,0,0,0,0,3,3,3,3, ++ x 5,5,5,5,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,2,2,2,2, ++ x 2,2,2,2,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,5,5,5,5/ ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1890) ++ ++ if(newlst)then ++ ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x call error(idnode,300) ++ lchk=.true. ++ ibig=0 ++ ++c zero link arrays ++ ++ do i=1,natms ++ link(i)=0 ++ enddo ++ ++c construct pair force neighbour list ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ ++ enddo ++ ++c real space cut off ++ ++ rcsq=(rcut+delr)**2 ++ ++c create mock cell vector for non-periodic system ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++c find maximum x,y,z postions ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ ++ do i=1,natms ++ ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ ++ enddo ++ ++ if(imcon.eq.0)then ++ ++ cell(1)=max(2.d0*xm+rcut+delr,3.d0*(rcut+delr)) ++ cell(5)=max(2.d0*ym+rcut+delr,3.d0*(rcut+delr)) ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ ++ endif ++ ++ cell(9)=max(2.d0*zm+rcut+delr,3.d0*(rcut+delr),cell(9)) ++ ++ endif ++ ++ call dcell(cell,celprp) ++ call invert(cell,rcell,det) ++ ++c ratio of link cell length to cut off diameter - max value is 5 ++ ++c irat=nint((rcut+delr)/rlink) ++c irat=min(max(irat,1),5) ++ ++ irat=1 ++ ++ ++c number of subcells ++ ++ if (irat.eq.1)then ++ ++ nsbcll=14 ++ ++ elseif(irat.eq.2)then ++ ++ nsbcll=63 ++ ++ elseif(irat.eq.3)then ++ ++ nsbcll=156 ++ ++ elseif(irat.eq.4)then ++ ++ nsbcll=307 ++ ++ elseif(irat.eq.5)then ++ ++ nsbcll=508 ++ ++ endif ++ ++ ilx=int(celprp(7)*dble(irat)/(rcut+delr)) ++ ily=int(celprp(8)*dble(irat)/(rcut+delr)) ++ ilz=int(celprp(9)*dble(irat)/(rcut+delr)) ++ ++c check there are enough link cells ++ ++ linc=.true. ++ if(ilx.lt.2*irat+1)linc=.false. ++ if(ily.lt.2*irat+1)linc=.false. ++ if(ilz.lt.2*irat+1)linc=.false. ++ if(.not.linc) call error(idnode,305) ++ ncells=ilx*ily*ilz ++ if(ncells.gt.mxcell) call error(idnode,392) ++ ++c calculate link cell indices ++ ++ do i=1,ncells ++ ++ lct(i)=0 ++ ++ enddo ++ ++c link-cell cutoff for reduced space ++ ++ xdc=dble(ilx) ++ ydc=dble(ily) ++ zdc=dble(ilz) ++ ++c reduced space coordinates ++ if(newjob)then ++ ++ newjob=.false. ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++ if(mxnode.gt.1) call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ do i=1,natms ++ ++ tx=xxx(i) ++ ty=yyy(i) ++ tz=zzz(i) ++ ++ uxx(i)=(rcell(1)*tx+rcell(4)*ty+rcell(7)*tz)+0.5d0 ++ uyy(i)=(rcell(2)*tx+rcell(5)*ty+rcell(8)*tz)+0.5d0 ++ uzz(i)=(rcell(3)*tx+rcell(6)*ty+rcell(9)*tz)+0.5d0 ++ ++ enddo ++ ++c link neighbours ++ ++ do i=1,natms ++ ++ ix=min(int(xdc*uxx(i)),ilx-1) ++ iy=min(int(ydc*uyy(i)),ily-1) ++ iz=min(int(zdc*uzz(i)),ilz-1) ++ ++ icell=1+ix+ilx*(iy+ily*iz) ++ ++ j=lct(icell) ++ lct(icell)=i ++ link(i)=j ++ ++ enddo ++ ++c set control variables for loop over subcells ++ ++ ix=1 ++ iy=1 ++ iz=1 ++ ++c primary loop over subcells ++ ++ do ic=1,ncells ++ ++ ii=lct(ic) ++ if(ii.gt.0)then ++ ++c secondary loop over subcells ++ ++ ik=0 ++ ++ do kc=1,nsbcll ++ ++ i=ii ++ ++ cx=0.d0 ++ cy=0.d0 ++ cz=0.d0 ++ jx=ix+nix(kc) ++ jy=iy+niy(kc) ++ jz=iz+niz(kc) ++ ++c minimum image convention ++ ++ if(jx.gt.ilx)then ++ ++ jx=jx-ilx ++ cx=1.d0 ++ ++ elseif(jx.lt.1)then ++ ++ jx=jx+ilx ++ cx=-1.d0 ++ ++ endif ++ ++ if(jy.gt.ily)then ++ ++ jy=jy-ily ++ cy=1.d0 ++ ++ elseif(jy.lt.1)then ++ ++ jy=jy+ily ++ cy=-1.d0 ++ ++ endif ++ ++ if(jz.gt.ilz)then ++ ++ jz=jz-ilz ++ cz=1.d0 ++ ++ elseif(jz.lt.1)then ++ ++ jz=jz+ilz ++ cz=-1.d0 ++ ++ endif ++ ++c index of neighbouring cell ++ ++ jc=jx+ilx*((jy-1)+ily*(jz-1)) ++ j=lct(jc) ++ ++c ignore if empty ++ ++ if(j.gt.0)then ++ ++ do while(i.ne.0) ++ ++c test if site is of interest to this node ++ ++ if(mod(i-1,mxnode).eq.idnode)then ++ ++ ++c i's index for this processor ++ ik=((i-1)/mxnode)+1 ++ ++c test if i is a frozen atom ++ ++ lfrzi=(lstfrz(i).ne.0) ++ ++ if(ic.eq.jc) j=link(i) ++ if(j.gt.0)then ++ ++ do while(j.ne.0) ++ ++c test of frozen atom pairs ++ ++ ldo=.true. ++ if(lfrzi)ldo=(lstfrz(j).eq.0) ++ ++ if(ldo)then ++ ++c distance in real space : minimum image applied ++ ++ sxd=uxx(j)-uxx(i)+cx ++ syd=uyy(j)-uyy(i)+cy ++ szd=uzz(j)-uzz(i)+cz ++ ++ xd=cell(1)*sxd+cell(4)*syd+cell(7)*szd ++ yd=cell(2)*sxd+cell(5)*syd+cell(8)*szd ++ zd=cell(3)*sxd+cell(6)*syd+cell(9)*szd ++ ++ if(imcon.eq.6)then ++ ++ rsq=xd**2+yd**2 ++ ++ else ++ ++ rsq=xd**2+yd**2+zd**2 ++ ++ endif ++ ++c test of distance ++ if(rcsq.gt.rsq)then ++ ++c test for excluded atom ++ ++ linc=.true. ++ do ixl=1,nexatm(ik) ++ ++ if(lexatm(ik,ixl).eq.j) linc=.false. ++ ++ enddo ++ ++ if(linc)then ++ ++ lentry(ik)=lentry(ik)+1 ++ ++ if(lentry(ik).gt.mxlist)then ++ ++ ibig=max(ibig,lentry(ik)) ++ lchk=.false. ++ ++ else ++ ++ list(ik,lentry(ik))=j ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ j=link(j) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ j=lct(jc) ++ i=link(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ ix=ix+1 ++ if(ix.gt.ilx)then ++ ++ ix=1 ++ iy=iy+1 ++ ++ if(iy.gt.ily)then ++ ++ iy=1 ++ iz=iz+1 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ ++ if(.not.lchk)then ++ ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) ' mxlist must be >= ',ibig ++ write(nrite,*) ' mxlist is currenty ',mxlist ++ endif ++ call error(idnode,106) ++ ++ endif ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (uxx,uyy,uzz,stat=fail) ++ ++ return ++ end subroutine parlink ++ ++ subroutine parneulst(newlst,lneut,nneut,idnode,mxnode,imcon, ++ x rcut,delr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on the brode-ahlrichs scheme ++c frozen atoms taken into account ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - t.forester april 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst,lneut,safe,lfrzi ++ integer nneut,idnode,mxnode,imcon,idum,fail,mpm2,npm2,ibig ++ integer i,ill,ia,im,jmlast,jmwrap,nuei1,nuei2,ii,jm1,jm,jj0,jj2 ++ integer j,ii1 ++ real(8) rcut,delr,rclim,fi,rrr,rcl1 ++ ++ logical, allocatable :: lms(:) ++ dimension fi(3) ++ ++ data fail/0/ ++ ++C DIR$ CACHE_ALIGN fi ++ ++c allocate work arrays ++ ++ allocate (lms(mxneut),stat=fail) ++ if(fail.ne.0)call error(idnode,1910) ++ ++ if(newlst.and.lneut)then ++ ++c set control variables ++ ++ safe=.true. ++ lchk= .true. ++ mpm2=(nneut+2)/2 ++ npm2=(nneut+1)/2 ++ ++c set cutoff radius ++ ++ rcl1=(rcut+delr) ++ rclim=(rcut+delr)**2 ++ ibig=0 ++ ill=0 ++ ++c construct pair force neighbour list: neutral groups ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ ++ enddo ++ ++ ++c outer loop over groups ++ ++ ia=0 ++ ++ do im=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ if(im.ge.mpm2) mpm2=npm2 ++ ++ lms(1)=.false. ++ do j=2,mpm2 ++ lms(j)=.true. ++ enddo ++ ++ jmlast=min(nneut,im+mpm2-1) ++ jmwrap=max(0,im+mpm2-1-nneut) ++ ++c loop over atomic pairs ++ ++ nuei1=neulst(im) ++ nuei2=neulst(im+1)-1 ++ ++ do i=nuei1,nuei2 ++ ++ fi(1)=xxx(i) ++ fi(2)=yyy(i) ++ fi(3)=zzz(i) ++ lfrzi=(lstfrz(i).eq.0) ++ ++ ii=0 ++ jm1=1 ++ do jm=im+1,jmlast ++ ++ jm1=jm1+1 ++ if(lms(jm1))then ++ ++ jj0=neulst(jm) ++ jj2=neulst(jm+1)-1 ++ ++ do j=jj0,jj2 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ ++ xdf(ii)=fi(1)-xxx(j) ++ ydf(ii)=fi(2)-yyy(j) ++ zdf(ii)=fi(3)-zzz(j) ++ ++ else ++ ++ ibig=max(ibig,ii) ++ safe=.false. ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ do jm=1,jmwrap ++ ++ jm1=jm1+1 ++ if(lms(jm1))then ++ ++ jj0=neulst(jm) ++ jj2=neulst(jm+1)-1 ++ ++ do j=jj0,jj2 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ ++ xdf(ii)=fi(1)-xxx(j) ++ ydf(ii)=fi(2)-yyy(j) ++ zdf(ii)=fi(3)-zzz(j) ++ ++ else ++ ++ safe=.false. ++ ibig=max(ibig,ii) ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c apply minimum image convention ++ ++ ii1=min(ii,mxxdf) ++ call images(imcon,0,1,ii1,cell,xdf,ydf,zdf) ++ ++c search for those in cutoff ++ ++ ii=0 ++ jm1=1 ++ do jm=im+1,jmlast ++ ++ jm1=jm1+1 ++ if(lms(jm1))then ++ ++ jj0=neulst(jm) ++ jj2=neulst(jm+1)-1 ++ ++ do j=jj0,jj2 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ ++ if(lms(jm1))then ++ ++ if(lfrzi)then ++ if(abs(zdf(ii)).lt.rcl1)then ++ if(abs(ydf(ii)).lt.rcl1)then ++ if(abs(xdf(ii)).lt.rcl1)then ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ if(rrr.lt.rclim) lms(jm1)=.false. ++ endif ++ endif ++ endif ++ ++ elseif(lstfrz(j).eq.0)then ++ if(abs(zdf(ii)).lt.rcl1)then ++ if(abs(ydf(ii)).lt.rcl1)then ++ if(abs(xdf(ii)).lt.rcl1)then ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ if(rrr.lt.rclim) lms(jm1)=.false. ++ endif ++ endif ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ do jm=1,jmwrap ++ ++ jm1=jm1+1 ++ if(lms(jm1))then ++ ++ jj0=neulst(jm) ++ jj2=neulst(jm+1)-1 ++ ++ do j=jj0,jj2 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ ++ if(lms(jm1))then ++ ++ if(lfrzi)then ++ ++ if(abs(zdf(ii)).lt.rcl1)then ++ if(abs(ydf(ii)).lt.rcl1)then ++ if(abs(xdf(ii)).lt.rcl1)then ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ if(rrr.lt.rclim) lms(jm1)=.false. ++ endif ++ endif ++ endif ++ ++ elseif(lstfrz(j).eq.0)then ++ ++ if(abs(zdf(ii)).lt.rcl1)then ++ if(abs(ydf(ii)).lt.rcl1)then ++ if(abs(xdf(ii)).lt.rcl1)then ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ if(rrr.lt.rclim) lms(jm1)=.false. ++ endif ++ endif ++ endif ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c compile neighbour list for ia ++c with running check of neighbour list array capacity ++ ++ jm1=0 ++ do jm=im,jmlast ++ ++ jm1=jm1+1 ++ if(.not.lms(jm1))then ++ ++ lentry(ia)=lentry(ia)+1 ++ if(lentry(ia).le.mxlist)then ++ ++ list(ia,lentry(ia))=jm ++ ++ else ++ ++ ill=max(ill,lentry(ia)) ++ lchk=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ do jm=1,jmwrap ++ ++ jm1=jm1+1 ++ if(.not.lms(jm1))then ++ ++ lentry(ia)=lentry(ia)+1 ++ if(lentry(ia).le.mxlist)then ++ ++ list(ia,lentry(ia))=jm ++ ++ else ++ ++ ill=max(ill,lentry(ia)) ++ lchk=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ if(.not.lchk)then ++ ++ call gimax(ill,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) ' mxlist must be at least ',ill ++ write(nrite,*) ' mxlist is currently ',mxlist ++ endif ++ call error(idnode,108) ++ ++ endif ++ ++c terminate job if work arrays exceeded ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*)'mxxdf must be at least ',ibig ++ write(nrite,*)'mxxdf is currently ',mxxdf ++ endif ++ call error(idnode,476) ++ endif ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(lms,stat=fail) ++ ++ return ++ end subroutine parneulst ++ ++ subroutine parlinkneu ++ x (newlst,natms,nneut,idnode,mxnode,imcon,rcut,delr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on link-cell method with neutral groups ++c frozen atoms taken into account ++c ++c to be used with the link version of exclude :excludeneu_link ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1996 ++c author - t. forester january 1996. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst,linc,newjob,lfrzi,ldo,swop ++ integer natms,nneut,idnode,mxnode,imcon,idum,fail,ibig ++ integer nix,niy,niz,i,irat,nsbcll,ilx,ily,ilz,ncells,ix,iy,iz ++ integer icell,j,ic,ii,kc,jx,jy,jz,jc,ineu,ik,jneu,ineua,jneua ++ integer ika,jneua1,i1,j1 ++ real(8) rcut,delr,rcsq,xm,ym,zm,det,xdc,ydc,zdc,tx,ty,tz ++ real(8) cx,cy,cz,sxd,syd,szd,rsq,xd,yd,zd ++ ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ ++ dimension nix(14),niy(14),niz(14) ++ ++ save newjob ++ ++ data newjob/.true./ ++ data nix/0,1,0,0,-1,1,0,-1,1,0,-1,1,-1,1/ ++ data niy/ 0,0,1,0,1,1,-1,0,0,1,-1,-1,1,1/ ++ data niz/0,0,0,1,0,0,1,1,1,1,1,1,1,1/ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1900) ++ ++ lchk=.true. ++ ibig=0 ++ if(newlst)then ++ ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x call error(idnode,300) ++ ++c zero link arrays ++ ++ do i=1,natms ++ ++ link(i)=0 ++ ++ enddo ++ ++c construct pair force neighbour list ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ ++ enddo ++ ++c real space cut off ++ ++ rcsq=(rcut+delr)**2 ++c ++c create mock cell vector for non-periodic system ++ ++ if(imcon.eq.0.or.imcon.eq.6)then ++ ++c find maximum x,y,z postions ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ ++ do i=1,natms ++ ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ ++ enddo ++ ++ if(imcon.eq.0)then ++ ++ cell(1)=max(2.d0*xm+rcut+delr,3.d0*(rcut+delr)) ++ cell(5)=max(2.d0*ym+rcut+delr,3.d0*(rcut+delr)) ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ ++ endif ++ ++ cell(9)=max(2.d0*zm+rcut+delr,3.d0*(rcut+delr),cell(9)) ++ ++ endif ++ ++ call dcell(cell,celprp) ++ call invert(cell,rcell,det) ++ ++c ratio of link cell length to cut off diameter ++ ++ irat=1 ++ ++c number of subcells ++ ++ nsbcll=14 ++ ++ ilx=int(celprp(7)*dble(irat)/(rcut+delr)) ++ ily=int(celprp(8)*dble(irat)/(rcut+delr)) ++ ilz=int(celprp(9)*dble(irat)/(rcut+delr)) ++c ++c check there are enough link cells ++ ++ linc=.false. ++ if(ilx.lt.2*irat+1) linc=.true. ++ if(ily.lt.2*irat+1) linc=.true. ++ if(ilz.lt.2*irat+1) linc=.true. ++ if(linc) call error(idnode,305) ++ ++ ncells=ilx*ily*ilz ++ if(ncells.gt.mxcell)then ++ ++ if(idnode.eq.0) write(nrite,*) 'mxcell must be >= ',ncells ++ call error(idnode,392) ++ ++ endif ++ ++c calculate link cell indices ++ ++ do i=1,ncells ++ ++ lct(i)=0 ++ ++ enddo ++ ++c link-cell cutoff for reduced space ++ ++ xdc=dble(ilx) ++ ydc=dble(ily) ++ zdc=dble(ilz) ++ ++c reduced space coordinates ++ if(newjob)then ++ ++ newjob=.false. ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++ if(mxnode.gt.1) call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++ do i=1,natms ++ ++ tx=xxx(i) ++ ty=yyy(i) ++ tz=zzz(i) ++ ++ uxx(i)=(rcell(1)*tx+rcell(4)*ty+rcell(7)*tz)+0.5d0 ++ uyy(i)=(rcell(2)*tx+rcell(5)*ty+rcell(8)*tz)+0.5d0 ++ uzz(i)=(rcell(3)*tx+rcell(6)*ty+rcell(9)*tz)+0.5d0 ++ ++ enddo ++ ++c link neighbours ++ ++ do i=1,natms ++ ++ ix=min(int(xdc*uxx(i)),ilx-1) ++ iy=min(int(ydc*uyy(i)),ily-1) ++ iz=min(int(zdc*uzz(i)),ilz-1) ++ ++ icell=1+ix+ilx*(iy+ily*iz) ++ ++ j=lct(icell) ++ lct(icell)=i ++ link(i)=j ++ ++ enddo ++ ++c set control variables for loop over subcells ++ ++ ix=1 ++ iy=1 ++ iz=1 ++ ++c primary loop over subcells ++ ++ do ic=1,ncells ++ ++ ii=lct(ic) ++ if(ii.gt.0)then ++ ++c secondary loop over subcells ++ ++ do kc=1,nsbcll ++ ++ i=ii ++ ++ cx=0.d0 ++ cy=0.d0 ++ cz=0.d0 ++ jx=ix+nix(kc) ++ jy=iy+niy(kc) ++ jz=iz+niz(kc) ++ ++c minimum image convention ++ ++ if(jx.gt.ilx)then ++ ++ jx=jx-ilx ++ cx=1.d0 ++ ++ elseif(jx.lt.1)then ++ ++ jx=jx+ilx ++ cx=-1.d0 ++ ++ endif ++ ++ if(jy.gt.ily)then ++ ++ jy=jy-ily ++ cy=1.d0 ++ ++ elseif(jy.lt.1)then ++ ++ jy=jy+ily ++ cy=-1.d0 ++ ++ endif ++ ++ if(jz.gt.ilz)then ++ ++ jz=jz-ilz ++ cz=1.d0 ++ ++ elseif(jz.lt.1)then ++ ++ jz=jz+ilz ++ cz=-1.d0 ++ ++ endif ++ ++c index of neighbouring cell ++ ++ jc=jx+ilx*((jy-1)+ily*(jz-1)) ++ j=lct(jc) ++ ++c ignore if empty ++ ++ if(j.gt.0)then ++ ++ do while(i.ne.0) ++ ++c test if site is of interest to this node ++ ++ ineu=lstneu(i) ++ ik=0 ++ ++c i's group index for this processor ++ ++ if(mod(ineu-1,mxnode).eq.idnode) ++ x ik=((ineu-1)/mxnode)+1 ++ ++c test if i is a frozen atom ++ ++ lfrzi=(lstfrz(i).ne.0) ++ ++ if(ic.eq.jc) j=link(i) ++ if(j.gt.0)then ++ ++ do while(j.ne.0) ++ ++ jneu=lstneu(j) ++ ++c swop tests for switching of group indices, ++c ldo for 'doing' interaction ++ ++ swop=.false. ++ ldo=(ik.gt.0) ++ jneua=jneu ++ ineua=ineu ++ ika=ik ++ ++c keep only Brode-Ahlrichs pairs ++ ++ if(jneua.ge.ineua)then ++ ++ if(jneua-ineua.gt.nneut/2)then ++ ++ swop=(mod(jneu-1,mxnode).eq.idnode) ++ if(swop)then ++ ldo=((nneut+ineua-jneua).le.(nneut-1)/2) ++ else ++ ldo=.false. ++ endif ++ ++ endif ++ ++ elseif(nneut+jneua-ineua.gt.(nneut-1)/2)then ++ ++ swop=(mod(jneu-1,mxnode).eq.idnode) ++ if(swop)then ++ ldo=((ineua-jneua).le.nneut/2) ++ else ++ ldo=.false. ++ endif ++ ++ endif ++ ++ if(swop.and.ldo)then ++ jneua=ineu ++ ineua=jneu ++ ika=((jneu-1)/mxnode)+1 ++ endif ++ ++c test of frozen atom pairs ++ ++ if(lfrzi.and.ldo)ldo=(lstfrz(j).eq.0) ++ ++c check we haven't already included this group in the list ... ++ ++ jneua1=0 ++ do while ++ x (ldo.and.jneua1.lt.min(lentry(ika),mxlist)) ++ ++ jneua1=jneua1+1 ++ if(list(ika,jneua1).eq.jneua) ldo=.false. ++ ++ enddo ++ ++ if(ldo)then ++ ++c distance in real space : minimum image applied ++ ++ sxd=uxx(j)-uxx(i)+cx ++ syd=uyy(j)-uyy(i)+cy ++ szd=uzz(j)-uzz(i)+cz ++ ++ xd=cell(1)*sxd+cell(4)*syd+cell(7)*szd ++ yd=cell(2)*sxd+cell(5)*syd+cell(8)*szd ++ zd=cell(3)*sxd+cell(6)*syd+cell(9)*szd ++ ++ rsq=xd*xd+yd*yd+zd*zd ++ ++c test of distance ++ ++ if(rsq.lt.rcsq)then ++ ++ lentry(ika)=lentry(ika)+1 ++ if(lentry(ika).gt.mxlist)then ++ ++ ibig=max(ibig,lentry(ika)) ++ lchk=.false. ++ ++ else ++ ++ list(ika,lentry(ika))=jneua ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ j=link(j) ++ ++ enddo ++ ++ endif ++ ++ j=lct(jc) ++ i=link(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ ix=ix+1 ++ if(ix.gt.ilx)then ++ ++ ix=1 ++ iy=iy+1 ++ ++ if(iy.gt.ily)then ++ ++ iy=1 ++ iz=iz+1 ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ ++ if(.not.lchk)then ++ ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*)'mxlist must be at least ',ibig ++ write(nrite,*)'mxlist is currently ',mxlist ++ endif ++ call error(idnode,107) ++ ++ endif ++ ++c sort list into order .. ++c use link as a work array ++ ++ ik=0 ++ do i=1+idnode,nneut,mxnode ++ ++ ik=ik+1 ++ do j=1,lentry(ik) ++ ++ link(j)=list(ik,j) ++ ++ enddo ++ call shellsort(lentry(ik),link) ++ ++c ensure Brode-Ahlrichs ordering ++ ++ i1=lentry(ik)+1 ++ j1=0 ++ do j=1,lentry(ik) ++ ++ if(link(j).ge.i)then ++ ++ j1=j1+1 ++ list(ik,j1)=link(j) ++ i1=min(i1,j) ++ ++ endif ++ ++ enddo ++ ++ do j=1,i1-1 ++ ++ j1=j1+1 ++ list(ik,j1)=link(j) ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (uxx,uyy,uzz,stat=fail) ++ ++ return ++ end subroutine parlinkneu ++ ++ subroutine parlst_nsq ++ x (newlst,natms,idnode,mxnode,imcon,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing the verlet neighbour ++c list based on the brode-ahlrichs scheme ++c frozen atom option included ++c ++c to be used with multiple_nsq ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c adapted - w.smith aug 2008 - solvation, excitation etc ++c ++c stress tensor : t.forester may 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lchk,newlst ++ integer natms,idnode,mxnode,imcon,ibig,i,last,mpm2 ++ integer npm2,m,ii,j,idum ++ real(8) rcut,rclim,rsq,rrr ++ ++ if(newlst)then ++ ++ ibig=0 ++ ++c check size of work array ++ ++ if(mxxdf.lt.(natms+1)/2)then ++ if(idnode.eq.0) write(nrite,*) 'mxxdf must be greater than ', ++ x (natms+1)/2 ++ call error(idnode,475) ++ endif ++ ++c set control variables ++ ++ last=natms ++ lchk=.true. ++ mpm2=natms/2 ++ npm2=(natms-1)/2 ++ ++c set cutoff radius - ignore border width ++ ++ rclim=(rcut)**2 ++ ++c construct pair force neighbour list ++ ++ do i=1,msatms ++ ++ lentry(i)=0 ++ noxatm(i)=1 ++ ++ enddo ++ ++c outer loop over atoms ++ ++ do m=1,mpm2 ++ ++ if(m.gt.npm2)last=mpm2 ++ ++c inner loop over atoms ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++c calculate interatomic displacements ++ ++ ii=ii+1 ++ xdf(ii)=xxx(i)-xxx(j) ++ ydf(ii)=yyy(i)-yyy(j) ++ zdf(ii)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c apply minimum image convention ++ ++ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) ++ ++c allocate atoms to neighbour list ++ ++ ii=0 ++ ++ do i=idnode+1,last,mxnode ++ ++c calculate atom indices ++ ++ j=i+m ++ if(j.gt.natms)j=j-natms ++ ++ ii=ii+1 ++ if((nexatm(ii).gt.0).and.(lexatm(ii,noxatm(ii)).eq.j)) ++ x then ++ ++ noxatm(ii)=min(noxatm(ii)+1,nexatm(ii)) ++ ++ elseif(lstfrz(i).eq.0.or.lstfrz(j).eq.0)then ++ ++c reject frozen atoms and calculate interatomic distance ++ ++ rsq=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ ++c running check of neighbour list array capacity ++ ++ if(rsq.lt.rclim)then ++ ++ lentry(ii)=lentry(ii)+1 ++ ++ if(lentry(ii).gt.mxlist)then ++ ++ ibig=max(ibig,lentry(ii)) ++ lchk=.false. ++ ++ endif ++ ++c compile neighbour list array ++ ++ if(lchk)then ++ ++ list(ii,lentry(ii))=j ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c terminate job if neighbour list array exceeded ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ ++ if(.not.lchk)then ++ ++ call gisum(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) ' mxlist must be >= ',ibig ++ write(nrite,*) ' mxlist is currenty ',mxlist ++ endif ++ call error(idnode,109) ++ ++ endif ++ ++c check all excluded atoms are accounted for ++ ++ do i=1,ii ++ ++ if(nexatm(i).gt.0.and.noxatm(i).ne.nexatm(i))lchk=.false. ++ ++ enddo ++ ++ if(mxnode.gt.1)call gstate(lchk) ++ ++ if(.not.lchk) call error(idnode,160) ++ ++ endif ++ ++ return ++ end subroutine parlst_nsq ++ ++ subroutine primlst(idnode,mxnode,natms,imcon,rprim) ++ ++c********************************************************************* ++c ++c dlpoly routine to split interaction list into primary and ++c secondary neighbours for use with multiple timestep method ++c ++c copyright daresbury laboratory ++c author - t. forester february 1993 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,imcon,ii,k,j,i ++ real(8) rprim,rprim2,rsq ++ ++ rprim2=rprim*rprim ++ ii=0 ++ ++ do i=1+idnode,natms,mxnode ++ ++ ii=ii+1 ++ ++ do j=1,lentry(ii) ++ ++ k=iabs(list(ii,j)) ++ xdf(j)=xxx(i)-xxx(k) ++ ydf(j)=yyy(i)-yyy(k) ++ zdf(j)=zzz(i)-zzz(k) ++ ++ enddo ++ ++c apply minimum image convention ++ ++ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) ++ ++c assign atoms as primary or secondary ++ ++ ++ do j=1,lentry(ii) ++ ++c calculate interatomic distance ++ ++ rsq=xdf(j)**2+ydf(j)**2+zdf(j)**2 ++ ++ if(rsq.lt.rprim2)then ++ ++c compile primary neighbour list array : -ve indices ++ ++ list(ii,j)=-iabs(list(ii,j)) ++ ++ else ++ ++c compile secondary neighbour list array : +ve indices ++ ++ list(ii,j)=iabs(list(ii,j)) ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine primlst ++ ++ subroutine prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) ++ ++c*********************************************************************** ++c ++c dlpoly routine to partition neutral group list into ++c primary and secondary groups ++c loops over group ineu ++c ++c replicated data version ++c ++c copyright daresbury laboratory 1994 ++c author t.forester april 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newlst,lchk,ldo ++ integer imcon,idnode,mxnode,nneut,ineu,ia,jj,ibig,ii ++ integer jj0,jneu,j,i,idum ++ real(8) rprim,rclim,xi,yi,zi,rrr ++ ++ lchk=.true. ++ ++ if(newlst)then ++ ++c set primary cutoff limit ++ ++ rclim=rprim*rprim ++ ++c set list to negative - signal for seconary shell ++ ++ ia=0 ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++ do jj=1,lentry(ia) ++ ++ list(ia,jj)=-abs(list(ia,jj)) ++ ++ enddo ++ ++ enddo ++ ++c loop over neutral group ineu sites ++ ++ lchk=.true. ++ ibig=0 ++ ++ ia=0 ++ do ineu=idnode+1,nneut,mxnode ++ ++ ia=ia+1 ++ ++ ii=0 ++ do i=neulst(ineu),neulst(ineu+1)-1 ++ ++ xi=xxx(i) ++ yi=yyy(i) ++ zi=zzz(i) ++ ++ do jj=1,lentry(ia) ++ ++ jneu=-list(ia,jj) ++ jj0=neulst(jneu) ++ ++ if(ineu.eq.jneu) jj0=i+1 ++ ++c loop over jneu sites ++ ++ do j=jj0,neulst(jneu+1)-1 ++ ++ ii=ii+1 ++ if(ii.le.mxxdf)then ++ xdf(ii)=xi-xxx(j) ++ ydf(ii)=yi-yyy(j) ++ zdf(ii)=zi-zzz(j) ++ else ++ lchk=.false. ++ ibig=ii ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c apply minimum image convention ++ ++ ii=min(ii,mxxdf) ++ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) ++ ++c allocate groups to primary or secondary shell ++c on basis of closest atom-atom interactions ++ ++ ii=0 ++ do i=neulst(ineu),neulst(ineu+1)-1 ++ ++ do jj=1,lentry(ia) ++ ++ jneu=list(ia,jj) ++ ldo=(jneu.lt.0) ++ if(ldo)then ++ jneu=-jneu ++ jj0=neulst(jneu) ++ if(ineu.eq.jneu) jj0=i+1 ++ ++c loop over jneu sites ++ ++ do j=jj0,neulst(jneu+1)-1 ++ ++ if(ldo)then ++ ++ ii=min(ii+1,mxxdf) ++ ++ if(abs(xdf(ii)).lt.rprim)then ++ if(abs(ydf(ii)).lt.rprim)then ++ if(abs(zdf(ii)).lt.rprim)then ++ ++c calculate interatomic distance ++ ++ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 ++ ++c put in primary list if found any interaction close enough ++ ++ if(rrr.le.rclim)then ++ ldo=.false. ++ list(ia,jj)=jneu ++ endif ++ ++ endif ++ endif ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) call gstate(lchk) ++ if(.not.lchk)then ++ ++ call gimax(ibig,1,idum) ++ if(idnode.eq.0)then ++ write(nrite,*) 'mxxdf must be at least ',ibig ++ write(nrite,*) 'mxxdf is currently ',mxxdf ++ endif ++ call error(idnode,477) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine prneulst ++ ++ subroutine vertest(newlst,idnode,mxnode,natms,delr,tstep) ++ ++c********************************************************************* ++c ++c DL_POLY subroutime to test for updating of Verlet list ++c replicated data version ++c ++c copyright daresbury laboratory 1993 ++c author - t. forester may 1993 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,newjob ++ integer idnode,mxnode,natms,i,j,k,moved,ibuff,fail ++ real(8) rmax,dr,delr,tstep ++ ++ real(8), allocatable :: xold(:),yold(:),zold(:) ++ ++ save newjob,xold,yold,zold ++ ++ data newjob/.true./,fail/0/ ++ ++ if((natms+mxnode-1)/mxnode.gt.msatms) call error(idnode,112) ++ ++ if(newjob)then ++ ++c set up initial arrays ++ ++ allocate (xold(msatms),yold(msatms),zold(msatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1930) ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xold(j)=0.d0 ++ yold(j)=0.d0 ++ zold(j)=0.d0 ++ ++ enddo ++ ++ newjob=.false. ++ newlst=.true. ++ ++ else ++ ++c integrate velocities ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xold(j)=xold(j)+vxx(i) ++ yold(j)=yold(j)+vyy(i) ++ zold(j)=zold(j)+vzz(i) ++ ++ enddo ++ ++c maximum displacement ++ ++ rmax=(delr/2.d0)**2 ++ ++c test atomic displacements ++ ++ moved=0 ++ ++ do k=1,j ++ ++ dr=tstep**2*(xold(k)**2+yold(k)**2+zold(k)**2) ++ if(dr.gt.rmax) moved=moved+1 ++ ++ enddo ++ ++c global sum of moved atoms ++ ++ if(mxnode.gt.1) call gisum(moved,1,ibuff) ++ ++c test for new verlet list ++ ++ newlst=(moved.ge.2) ++ ++c update stored positions ++ ++ if(newlst)then ++ ++ do k=1,j ++ ++ xold(k)=0.d0 ++ yold(k)=0.d0 ++ zold(k)=0.d0 ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine vertest ++ ++ subroutine vertest2(newlst,idnode,mxnode,natms,imcon,delr,tstep) ++ ++c********************************************************************* ++c ++c DL_POLY subroutime to test for updating of Verlet list ++c replicated data version (version 2) ++c ++c copyright daresbury laboratory ++c author - w.smith 2007 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical newlst,newjob ++ integer idnode,mxnode,natms,imcon,i,j,k,moved,ibuff,fail ++ real(8) rmax,dr,delr,tstep ++ ++ real(8), allocatable :: xold(:),yold(:),zold(:) ++ real(8), allocatable :: xdif(:),ydif(:),zdif(:) ++ ++ save newjob,xold,yold,zold ++ ++ data newjob/.true./,fail/0/ ++ ++ if((natms+mxnode-1)/mxnode.gt.msatms) call error(idnode,112) ++ ++c set up initial arrays ++ ++ allocate (xdif(msatms),ydif(msatms),zdif(msatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1930) ++ ++ if(newjob)then ++ ++ allocate (xold(msatms),yold(msatms),zold(msatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1930) ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xold(j)=xxx(i) ++ yold(j)=yyy(i) ++ zold(j)=zzz(i) ++ ++ enddo ++ ++ newjob=.false. ++ newlst=.true. ++ ++ else ++ ++c calculate atomic shifts ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xdif(j)=xxx(i)-xold(j) ++ ydif(j)=yyy(i)-yold(j) ++ zdif(j)=zzz(i)-zold(j) ++ ++ enddo ++ ++c minimum image calculation ++ ++ call images(imcon,0,1,j,cell,xdif,ydif,zdif) ++ ++c maximum displacement ++ ++ rmax=(delr/2.d0)**2 ++ ++c test atomic displacements ++ ++ moved=0 ++ ++ do k=1,j ++ ++ dr=(xdif(k)**2+ydif(k)**2+zdif(k)**2) ++ if(dr.gt.rmax)moved=moved+1 ++ ++ enddo ++ ++c global sum of moved atoms ++ ++ if(mxnode.gt.1) call gisum(moved,1,ibuff) ++ ++c test for new verlet list ++ ++ newlst=(moved.ge.2) ++ ++c update stored positions ++ ++ if(newlst)then ++ ++ j=0 ++ do i=idnode+1,natms,mxnode ++ ++ j=j+1 ++ xold(j)=xxx(i) ++ yold(j)=yyy(i) ++ zold(j)=zzz(i) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c deallocate arrays ++ ++ deallocate(xdif,ydif,zdif,stat=fail) ++ ++ return ++ end subroutine vertest2 ++ ++ end module nlist_builders_module +diff -urN dl_class_1.9.orig/srcmod/optimiser_module.f dl_class_1.9/srcmod/optimiser_module.f +--- dl_class_1.9.orig/srcmod/optimiser_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/optimiser_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1144 @@ ++ module optimiser_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining structural optimiser routines ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: ggx(:),ggy(:),ggz(:) ++ real(8), allocatable :: hhx(:),hhy(:),hhz(:) ++ real(8), allocatable :: oxx(:),oyy(:),ozz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ ++ save hhx,hhy,hhz ++ ++ contains ++ ++ subroutine optimisation_selector ++ x (loptim,stropt,lzero,idnode,mxnode,natms,imcon,ntcons, ++ x nscons,ngrp,ntfree,keystr,keytol,engcfg,tstep,opttol) ++ ++c*********************************************************************** ++c ++c dl_poly routine for selecting and running a nominated ++c structure optimisation algorithm using energy minimisation ++c ++c copyright - daresbury laboratory ++c author - w. smith june 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical loptim,stropt,lzero ++ integer idnode,mxnode,natms,imcon,nscons,ngrp,ntfree,keystr ++ integer keytol,ntcons ++ real(8) engcfg,tstep,opttol,hnorm,grad0,grad1,ff1,sgn ++ ++ save grad0,grad1,ff1,sgn,hnorm ++ ++ stropt=.false. ++ ++ if(loptim)then ++ ++c conjugate gradient structure optimisation ++ ++ call strucopt ++ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++ else if(lzero)then ++ ++c zero kelvin structure optimisation ++ ++ call zero_kelvin ++ x (stropt,idnode,mxnode,imcon,natms,ngrp,ntfree,opttol) ++ ++ endif ++ ++ return ++ end subroutine optimisation_selector ++ ++ subroutine zero_kelvin ++ x (stropt,idnode,mxnode,imcon,natms,ngrp,ntfree,opttol) ++ ++c*********************************************************************** ++c ++c dl_poly routine for zero Kelvin temperature optimization ++c if velocity.Force < 0 then velocity is set to zero in ++c preparation for integration of equations of motion ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1994 ++c author t.forester march 1994 ++c amended t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical stropt ++ integer idnode,mxnode,imcon,natms,ngrp,ntfree,fail,i ++ integer iatm0,iatm1,igrp1,igrp2,ifre1,ifre2,jr,ig,j,id ++ real(8) dot,fsq,fcomx,fcomy,fcomz,trx,try,trz,tax,tay,taz ++ real(8) rot,ggg,opttol ++ ++ dimension rot(9) ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1920) ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c check for convergence of forces ++ ++ ggg=0.d0 ++ do i=iatm0,iatm1 ++ ggg=ggg+fxx(i)**2+fyy(i)**2+fzz(i)**2 ++ enddo ++ ++ if(mxnode.gt.1)then ++ buffer(1)=ggg ++ call gdsum(buffer(1),1,buffer(2)) ++ ggg=buffer(1) ++ endif ++ ++c check convergence condition for forces ++ ++ if(opttol.ge.abs(ggg)/dble(natms))then ++ ++ stropt=.true. ++ return ++ ++ endif ++ ++ if(ngrp.eq.0) then ++ ++c take component of velocity in direction of force ++ ++ do i=iatm0,iatm1 ++ ++ dot=vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ if(dot.lt.0.d0) then ++ ++ vxx(i)=0.d0 ++ vyy(i)=0.d0 ++ vzz(i)=0.d0 ++ ++ else ++ ++c take component of velocity in direction of force ++ ++ fsq=(fxx(i)**2+fyy(i)**2+fzz(i)**2) ++ fsq=dot/max(1.d-10,fsq) ++ vxx(i)=fxx(i)*fsq ++ vyy(i)=fyy(i)*fsq ++ vzz(i)=fzz(i)*fsq ++ ++ endif ++ ++ enddo ++ ++ else ++ ++c block indices for groups and free atoms ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++ do j=ifre1,ifre2 ++ ++c reset atomic velocities ++ ++ i=lstfre(j) ++ ++ dot=vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ if(dot.lt.0.d0) then ++ ++ vxx(i)=0.d0 ++ vyy(i)=0.d0 ++ vzz(i)=0.d0 ++ ++ else ++ ++c take component of velocity in direction of force ++ ++ fsq=(fxx(i)**2+fyy(i)**2+fzz(i)**2) ++ fsq=dot/max(1.d-10,fsq) ++ vxx(i)=fxx(i)*fsq ++ vyy(i)=fyy(i)*fsq ++ vzz(i)=fzz(i)*fsq ++ ++ endif ++ ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c reset rigid body velocites (linear and angular) ++ ++ fcomx=0.d0 ++ fcomy=0.d0 ++ fcomz=0.d0 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c forces on com ++ ++ fcomx=fcomx+fxx(i) ++ fcomy=fcomy+fyy(i) ++ fcomz=fcomz+fzz(i) ++ ++ enddo ++ ++ dot=gvxx(ig)*fcomx+gvyy(ig)*fcomy+gvzz(ig)*fcomz ++ if(dot.lt.0.d0) then ++ ++ gvxx(ig)=0.d0 ++ gvyy(ig)=0.d0 ++ gvzz(ig)=0.d0 ++ ++ else ++ ++c take component of velocity in direction of force ++ ++ fsq=(fcomx**2+fcomy**2+fcomz**2) ++ fsq=dot/max(1.d-10,fsq) ++ gvxx(ig)=fcomx*fsq ++ gvyy(ig)=fcomy*fsq ++ gvzz(ig)=fcomz*fsq ++ ++ endif ++ ++ enddo ++ ++c site to com distances ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ do j=1,numgsit(lstgtp(ig)) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxt(jr)=xxx(i)-gcmx(ig) ++ yyt(jr)=yyy(i)-gcmy(ig) ++ zzt(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) ++ ++c calculate torques in lab frame ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ trx=0.d0 ++ try=0.d0 ++ trz=0.d0 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ trx=trx+yyt(jr)*fzz(i)-zzt(jr)*fyy(i) ++ try=try+zzt(jr)*fxx(i)-xxt(jr)*fzz(i) ++ trz=trz+xxt(jr)*fyy(i)-yyt(jr)*fxx(i) ++ ++ enddo ++ ++ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 ++ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) ++ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) ++ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) ++ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 ++ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) ++ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) ++ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) ++ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 ++ ++c transform to body fixed frame ++ ++ tax=(trx*rot(1)+try*rot(4)+trz*rot(7))*rotinx(id,2) ++ tay=(trx*rot(2)+try*rot(5)+trz*rot(8))*rotiny(id,2) ++ taz=(trx*rot(3)+try*rot(6)+trz*rot(9))*rotinz(id,2) ++ ++ dot=omx(ig)*tax+omy(ig)*tay+omz(ig)*taz ++ if(dot.le.0.d0) then ++ ++ omx(ig)=0.d0 ++ omy(ig)=0.d0 ++ omz(ig)=0.d0 ++ ++ else ++ ++c take component of velocity in direction of torque ++ ++ fsq=(tax**2+tay**2+taz**2) ++ fsq=dot/max(1.d-10,fsq) ++ omx(ig)=tax*fsq ++ omy(ig)=tay*fsq ++ omz(ig)=taz*fsq ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail) ++ ++ return ++ end subroutine zero_kelvin ++ ++ subroutine strucopt ++ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, ++ x imcon,ngrp,ntfree,tstep,opttol,fnew,hnorm,grad0,grad1, ++ x ff1,sgn) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for optimising molecular structures ++c based on conjugate gradient method ++c ++c copyright - daresbury laboratory ++c author - w. smith dec 2005 ++c ++c note. basis of minimisation criterion : ++c keytol=0 : absolute force ++c keytol=1 : absolute energy ++c keytol=2 : absolute displacement ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ ++ logical stropt,newjob,engchk ++ integer keystr,keytol,idnode,mxnode,natms,i,j,k ++ integer iatm0,iatm1,fail,ngrp,ntcons,nscons,jr ++ integer imcon,ig,jf,id,ntfree,igrp1,igrp2,ifre1,ifre2 ++ real(8) hnorm,grad0,grad1,grad2,ff1,stride,tstep,step ++ real(8) ggg,fnew,fff,gam2,sgn,opttol,dischk ++ ++ dimension fail(nnn) ++ ++ save iatm0,iatm1,igrp1,igrp2,engchk,ifre1,ifre2,newjob ++ ++ data newjob/.true./,engchk/.false./ ++ ++c define initial data ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ if(newjob)then ++ allocate(hhx(mxatms),hhy(mxatms),hhz(mxatms),stat=fail(1)) ++ endif ++ allocate(ggx(mxatms),ggy(mxatms),ggz(mxatms),stat=fail(2)) ++ allocate(oxx(mxatms),oyy(mxatms),ozz(mxatms),stat=fail(3)) ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(4)) ++ if(ngrp.gt.0)then ++ ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(6)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ if(ngrp.eq.0) ++ x allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(dxx(mxatms),dyy(mxatms),dzz(mxatms),stat=fail(7)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) ++ ++ endif ++ ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1925) ++ enddo ++ ++ if(newjob)then ++ ++c define atoms for this node ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++ newjob=.false. ++ ++ endif ++ ++c step length for relaxation ++ ++ if(ntcons.gt.0)then ++ step=tstep**2 ++ else ++ step=10.d0*tstep**2 ++ endif ++ ++c current system configuration energy ++ ++ fff=fnew ++ ++c initialise conjugate gradient position arrays ++ ++ do i=1,natms ++ ++ oxx(i)=xxx(i) ++ oyy(i)=yyy(i) ++ ozz(i)=zzz(i) ++ ggx(i)=0.d0 ++ ggy(i)=0.d0 ++ ggz(i)=0.d0 ++ ++ enddo ++ ++c define constraint bonds ++ ++ if(ntcons.gt.0)then ++ ++c calculate constraint bond vector ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c calculate pseudo forces for constraint bonds ++ ++ call pseudo_shake(nscons,natms,mxnode,fff) ++ ++ do i=1,natms ++ ++ ggx(i)=fxx(i)+ggx(i) ++ ggy(i)=fyy(i)+ggy(i) ++ ggz(i)=fzz(i)+ggz(i) ++ ++ enddo ++ ++ else ++ ++ do i=1,natms ++ ++ ggx(i)=fxx(i) ++ ggy(i)=fyy(i) ++ ggz(i)=fzz(i) ++ ++ enddo ++ ++ endif ++ ++c calculate pseudo forces for rigid bodies ++ ++ if(ngrp.gt.0)call torque_split ++ x (ngrp,idnode,mxnode,imcon,ggx,ggy,ggz,txx,tyy,tzz, ++ x uxx,uyy,uzz,dtx,dty,dtz) ++ ++c determine magnitude of 3N force vector ++ ++ ggg=0.d0 ++ ++ if(ngrp.eq.0)then ++ ++ do i=iatm0,iatm1 ++ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 ++ enddo ++ ++ else ++ ++ do jf=ifre1,ifre2 ++ ++ i=lstfre(jf) ++ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 ++ ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ buffer(1)=ggg ++ call gdsum(buffer(1),1,buffer(2)) ++ ggg=buffer(1) ++ endif ++ ggg=sqrt(ggg) ++ ++c check convergence condition for forces ++ ++ if(keytol.eq.0.and.opttol.ge.abs(ggg)/dble(natms))stropt=.true. ++ ++ if(keystr.eq.0) then ++ ++c set original search direction ++ ++ ff1=fff ++ hnorm=ggg ++ grad0=ggg ++ grad1=ggg ++ ++ if(ngrp.eq.0)then ++ ++ do i=iatm0,iatm1 ++ ++ hhx(i)=ggx(i) ++ hhy(i)=ggy(i) ++ hhz(i)=ggz(i) ++ oxx(i)=oxx(i)+step*hhx(i) ++ oyy(i)=oyy(i)+step*hhy(i) ++ ozz(i)=ozz(i)+step*hhz(i) ++ ++ enddo ++ ++ else ++ ++ do jf=ifre1,ifre2 ++ ++ i=lstfre(jf) ++ hhx(i)=ggx(i) ++ hhy(i)=ggy(i) ++ hhz(i)=ggz(i) ++ ++ enddo ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ hhx(i)=ggx(i) ++ hhy(i)=ggy(i) ++ hhz(i)=ggz(i) ++ ++ enddo ++ ++ enddo ++ ++ call turn_rigid_body ++ x (igrp1,igrp2,ifre1,ifre2,step,hhx,hhy,hhz, ++ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) ++ ++ endif ++ ++ keystr=1 ++ sgn=1.d0 ++ ++ elseif(keystr.eq.1)then ++ ++c check convergence condition for energy ++ ++ if(engchk.and.keytol.eq.1.and. ++ x opttol.ge.abs(fff-ff1))stropt=.true. ++ engchk=.false. ++ ++c line search along chosen direction ++ ++ ff1=fff ++ grad2=grad1 ++ grad1=0.d0 ++ do i=iatm0,iatm1 ++ grad1=grad1+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) ++ enddo ++ if(mxnode.gt.1)then ++ buffer(1)=grad1 ++ call gdsum(buffer(1),1,buffer(2)) ++ grad1=buffer(1) ++ endif ++ grad1=sgn*grad1/hnorm ++ ++c linear extrapolation to minimum ++ ++ stride=sgn*step ++ if(grad1.lt.0.d0)then ++ ++ keystr=2 ++ stride=sgn*step*grad1/(grad2-grad1) ++ ++ endif ++ ++ if(ngrp.eq.0)then ++ ++ do i=iatm0,iatm1 ++ ++ oxx(i)=oxx(i)+stride*hhx(i) ++ oyy(i)=oyy(i)+stride*hhy(i) ++ ozz(i)=ozz(i)+stride*hhz(i) ++ ++ enddo ++ ++ else ++ ++ call turn_rigid_body ++ x (igrp1,igrp2,ifre1,ifre2,stride,hhx,hhy,hhz, ++ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) ++ ++ endif ++ ++ elseif(keystr.eq.2)then ++ ++c construct conjugate search vector ++ ++ ff1=fff ++ gam2=(ggg/grad0)**2 ++ hnorm=0.d0 ++ grad0=ggg ++ grad1=0.d0 ++ do i=iatm0,iatm1 ++ ++ hhx(i)=ggx(i)+gam2*hhx(i) ++ hhy(i)=ggy(i)+gam2*hhy(i) ++ hhz(i)=ggz(i)+gam2*hhz(i) ++ hnorm=hnorm+hhx(i)**2+hhy(i)**2+hhz(i)**2 ++ grad1=grad1+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) ++ ++ enddo ++ if(mxnode.gt.1)then ++ ++ buffer(1)=hnorm ++ buffer(2)=grad1 ++ call gdsum(buffer(1),2,buffer(3)) ++ hnorm=buffer(1) ++ grad1=buffer(2) ++ ++ endif ++ hnorm=sqrt(hnorm) ++ grad1=grad1/hnorm ++ sgn=sign(1.d0,grad1) ++ grad1=sgn*grad1 ++ stride=sgn*step ++ ++ if(ngrp.eq.0)then ++ ++ do i=iatm0,iatm1 ++ ++ oxx(i)=oxx(i)+stride*hhx(i) ++ oyy(i)=oyy(i)+stride*hhy(i) ++ ozz(i)=ozz(i)+stride*hhz(i) ++ ++ enddo ++ ++ else ++ ++ call turn_rigid_body ++ x (igrp1,igrp2,ifre1,ifre2,stride,hhx,hhy,hhz, ++ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) ++ ++ endif ++ ++ engchk=.true. ++ keystr=1 ++ ++ endif ++ ++c merge coordinate arrays ++ ++ if(mxnode.gt.1)then ++ ++ if(ngrp.eq.0)then ++ ++ call merge ++ x (idnode,mxnode,natms,mxbuff,oxx,oyy,ozz,buffer) ++ ++ else ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,oxx,oyy,ozz,buffer) ++ ++ endif ++ ++ endif ++ ++c reassign atomic positions and calculate max displacement ++ ++ dischk=0.d0 ++ do i=1,natms ++ ++ dischk=max(dischk,(xxx(i)-oxx(i))**2+ ++ x (yyy(i)-oyy(i))**2+(zzz(i)-ozz(i))**2) ++ ++ xxx(i)=oxx(i) ++ yyy(i)=oyy(i) ++ zzz(i)=ozz(i) ++ ++ enddo ++ ++c check convergence condition for position ++ ++ if(keytol.eq.2.and.keystr.gt.0.and. ++ x opttol.ge.sqrt(dischk))stropt=.true. ++ ++c deallocate working arrays ++ ++ deallocate(ggx,ggy,ggz,dtx,dty,dtz,oxx,oyy,ozz,stat=fail(1)) ++ if(ngrp.gt.0)then ++ deallocate(txx,tyy,tzz,uxx,uyy,uzz,stat=fail(2)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(3)) ++ if(ngrp.eq.0)deallocate(txx,tyy,tzz,stat=fail(4)) ++ ++ endif ++ ++ return ++ end subroutine strucopt ++ ++ subroutine pseudo_shake(nscons,natms,mxnode,fff) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine treating rigid bonds as stiff harmonic bonds ++c suitable for conjugate gradient minimisation ++c ++c copyright - daresbury laboratory ++c author - w. smith may 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ real(8), parameter :: harm=1.d6 ++ ++ integer i,j,k,natms,nscons,mxnode ++ real(8) fff,engbnd,dis,rrr,gamma ++ ++c calculate energy and force ++ ++ engbnd=0.d0 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dis=prmcon(listcon(k,1)) ++ rrr=sqrt(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ engbnd=engbnd+0.5d0*harm*(rrr-dis)**2 ++ gamma=harm*(rrr-dis)/rrr ++ ggx(i)=ggx(i)-dxx(k)*gamma ++ ggy(i)=ggy(i)-dyy(k)*gamma ++ ggz(i)=ggz(i)-dzz(k)*gamma ++ ++ ggx(j)=ggx(j)+dxx(k)*gamma ++ ggy(j)=ggy(j)+dyy(k)*gamma ++ ggz(j)=ggz(j)+dzz(k)*gamma ++ ++ enddo ++ ++c global sum of pseudo forces ++ ++ call global_sum_forces(natms,mxnode,ggx,ggy,ggz) ++ if(mxnode.gt.1)then ++ buffer(1)=engbnd ++ call gdsum(buffer(1),1,buffer(2)) ++ engbnd=buffer(1) ++ endif ++ fff=fff+engbnd ++ ++ return ++ end subroutine pseudo_shake ++ ++ subroutine torque_split ++ x (ngrp,idnode,mxnode,imcon,ggx,ggy,ggz,txx,tyy,tzz, ++ x uxx,uyy,uzz,dtx,dty,dtz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for resolving torques into equivalent atomic ++c forces suitable for conjugate gradient minimisation ++c ++c copyright - daresbury laboratory ++c author - w. smith may 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,j,ig,id,jr,jrs,ngrp,igrp1,igrp2,idnode,imcon,mxnode ++ ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,trq,txx,tyy,tzz ++ real(8) ggx,ggy,ggz,tmp,taq,scale ++ real(8) uxx,uyy,uzz,dtx,dty,dtz ++ ++ dimension ggx(mxatms),ggy(mxatms),ggz(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) ++ dimension dtx(mxatms),dty(mxatms),dtz(mxatms) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c calculate centres of mass of rigid bodies ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c working com is first site in group ++ ++ i=lstrgd(jr+1) ++ txx(ig)=xxx(i) ++ tyy(ig)=yyy(i) ++ tzz(ig)=zzz(i) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ uxx(jr)=xxx(i)-txx(ig) ++ uyy(jr)=yyy(i)-tyy(ig) ++ uzz(jr)=zzz(i)-tzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c minimum image from working com ++ ++ call images(imcon,0,1,jr,cell,uxx,uyy,uzz) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=0.d0 ++ gcmy(ig)=0.d0 ++ gcmz(ig)=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ gcmx(ig)=gcmx(ig)+weight(i)*uxx(jr) ++ gcmy(ig)=gcmy(ig)+weight(i)*uyy(jr) ++ gcmz(ig)=gcmz(ig)+weight(i)*uzz(jr) ++ ++ enddo ++ ++c final centre of mass ++ ++ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) ++ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) ++ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) ++ ++ enddo ++ ++c calculate atom displacements from rigid body com ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c resolve rigid body forces and torques to orthogonal atomic basis ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+ggx(i) ++ fmy=fmy+ggy(i) ++ fmz=fmz+ggz(i) ++ ++ enddo ++ fmx=fmx/dble(numgsit(id)) ++ fmy=fmy/dble(numgsit(id)) ++ fmz=fmz/dble(numgsit(id)) ++ ++c calculate torque on rigid body ++ ++ jr=jrs ++ tqx=0.d0 ++ tqy=0.d0 ++ tqz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx=tqx+dty(jr)*ggz(i)-dtz(jr)*ggy(i) ++ tqy=tqy+dtz(jr)*ggx(i)-dtx(jr)*ggz(i) ++ tqz=tqz+dtx(jr)*ggy(i)-dty(jr)*ggx(i) ++ ++ enddo ++ ++c magnitude of torque ++ ++ trq=sqrt(tqx**2+tqy**2+tqz**2) ++ ++c construct unit vectors for new site forces ++ ++ jr=jrs ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ txx(i)=dty(jr)*tqz-tqy*dtz(jr) ++ tyy(i)=dtz(jr)*tqx-tqz*dtx(jr) ++ tzz(i)=dtx(jr)*tqy-tqx*dty(jr) ++ tmp=sqrt(txx(i)**2+tyy(i)**2+tzz(i)**2) ++ if(tmp.gt.1.d-10)then ++ ++ txx(i)=txx(i)/tmp ++ tyy(i)=tyy(i)/tmp ++ tzz(i)=tzz(i)/tmp ++ ++ else ++ ++ txx(i)=0.d0 ++ tyy(i)=0.d0 ++ tzz(i)=0.d0 ++ ++ endif ++ ++ enddo ++ ++c construct unit vectors for site location ++ ++ jr=jrs ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ uxx(i)=(tyy(i)*tqz-tqy*tzz(i))/trq ++ uyy(i)=(tzz(i)*tqx-tqz*txx(i))/trq ++ uzz(i)=(txx(i)*tqy-tqx*tyy(i))/trq ++ ++ enddo ++ ++c scale unit vectors to working lengths ++ ++ jr=jrs ++ taq=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ tmp=dtx(jr)*uxx(i)+dty(jr)*uyy(i)+dtz(jr)*uzz(i) ++ taq=taq+tmp**2 ++ txx(i)=tmp*txx(i) ++ tyy(i)=tmp*tyy(i) ++ tzz(i)=tmp*tzz(i) ++ uxx(i)=tmp*uxx(i) ++ uyy(i)=tmp*uyy(i) ++ uzz(i)=tmp*uzz(i) ++ ++ enddo ++ ++c calculate force scale factor ++ ++ scale=trq/taq ++ ++c final site forces ++ ++ jr=jrs ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ txx(i)=scale*txx(i) ++ tyy(i)=scale*tyy(i) ++ tzz(i)=scale*tzz(i) ++ ggx(i)=fmx ++ ggy(i)=fmy ++ ggz(i)=fmz ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine torque_split ++ ++ subroutine turn_rigid_body ++ x (igrp1,igrp2,ifre1,ifre2,step,hhx,hhy,hhz, ++ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) ++ ++c*********************************************************************** ++c ++c dl_poly routine for updating positions of atoms in a rigid body ++c during a conjugate gradient minimisation ++c ++c copyright daresbury laboratory ++c author w.smith may 2006 ++c ++c note: coz=cos(theta)-1 ++c zin=sin(theta)/theta ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,j,jr,jf,ig,id,igrp1,igrp2,ifre1,ifre2 ++ real(8) step,hhx,hhy,hhz,uxx,uyy,uzz,txx,tyy,tzz ++ real(8) oxx,oyy,ozz,uuu,ttt,the2,coz,zin ++ ++ dimension hhx(mxatms),hhy(mxatms),hhz(mxatms) ++ dimension oxx(mxatms),oyy(mxatms),ozz(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) ++ ++c update free atom positions ++ ++ do jf=ifre1,ifre2 ++ ++ i=lstfre(jf) ++ oxx(i)=oxx(i)+step*hhx(i) ++ oyy(i)=oyy(i)+step*hhy(i) ++ ozz(i)=ozz(i)+step*hhz(i) ++ ++ enddo ++ ++c update rigid body atoms ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ uuu=uxx(i)**2+uyy(i)**2+uzz(i)**2 ++ if(uuu.gt.1.d-10)then ++ ++ ttt=txx(i)**2+tyy(i)**2+tzz(i)**2 ++ the2=(ttt/uuu)*step**2 ++ ++ coz=-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0- ++ x the2/132.d0)/90.d0)/56.d0)/30.d0)/12.d0)/2.d0 ++ zin=-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0- ++ x the2/156.d0)/110.d0)/72.d0)/42.d0)/20.d0)/6.d0+1.d0 ++ ++ oxx(i)=oxx(i)+coz*uxx(i)+step*(hhx(i)+zin*txx(i)) ++ oyy(i)=oyy(i)+coz*uyy(i)+step*(hhy(i)+zin*tyy(i)) ++ ozz(i)=ozz(i)+coz*uzz(i)+step*(hhz(i)+zin*tzz(i)) ++ ++ else ++ ++ oxx(i)=oxx(i)+step*hhx(i) ++ oyy(i)=oyy(i)+step*hhy(i) ++ ozz(i)=ozz(i)+step*hhz(i) ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine turn_rigid_body ++ ++ end module optimiser_module +diff -urN dl_class_1.9.orig/srcmod/pair_module.f dl_class_1.9/srcmod/pair_module.f +--- dl_class_1.9.orig/srcmod/pair_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/pair_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,46 @@ ++ module pair_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining atom pair data ++c copyright - daresbury laboratory ++c author - w. smith mar 2004 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ integer, allocatable :: ilist(:),jlist(:) ++ real(8), allocatable :: xdf(:),ydf(:),zdf(:) ++ real(8), allocatable :: rsqdf(:) ++ ++ save ilist,jlist,xdf,ydf,zdf,rsqdf ++ ++ contains ++ ++ subroutine alloc_pair_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=6 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ allocate (ilist(mxxdf),stat=fail(1)) ++ allocate (jlist(mxxdf),stat=fail(2)) ++ allocate (xdf(mxxdf),stat=fail(3)) ++ allocate (ydf(mxxdf),stat=fail(4)) ++ allocate (zdf(mxxdf),stat=fail(5)) ++ allocate (rsqdf(mxxdf),stat=fail(6)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1940) ++ enddo ++ ++ end subroutine alloc_pair_arrays ++ ++ end module pair_module +diff -urN dl_class_1.9.orig/srcmod/parse_module.f dl_class_1.9/srcmod/parse_module.f +--- dl_class_1.9.orig/srcmod/parse_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/parse_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,585 @@ ++ module parse_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining parsing arrays ++c copyright - daresbury laboratory ++c author - w. smith jan 2004 ++c ++c*********************************************************************** ++ ++ integer, parameter :: lenrec=150 ++ character*1 record(lenrec) ++ save record ++ ++ contains ++ ++ subroutine getrec(safe,idnode,ifile) ++ ++c********************************************************************* ++c ++c dl_poly subroutine to read a character string on one node ++c and broadcast it to all other nodes ++c ++c copyright daresbury laboratory 1994 ++c author w.smith december 1994 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical safe ++ ++ character*150 line ++ integer export,import,idnode,ifile,i ++ dimension export(lenrec),import(lenrec) ++ ++ safe=.true. ++ ++ call gsync() ++ ++ if(idnode.eq.0)then ++ ++ read(ifile,'(a150)',end=100)line ++ ++ do i=1,lenrec ++ ++ record(i)=line(i:i) ++ export(i)=ichar(line(i:i)) ++ ++ enddo ++ ++ call gstate(safe) ++ call gisum(export,lenrec,import) ++ ++ return ++ ++ 100 safe=.false. ++ ++ call gstate(safe) ++ ++ else ++ ++ call gstate(safe) ++ if(.not.safe)return ++ ++ do i=1,lenrec ++ ++ export(i)=0 ++ ++ enddo ++ ++ call gisum(export,lenrec,import) ++ ++ do i=1,lenrec ++ ++ record(i)=char(export(i)) ++ ++ enddo ++ ++ return ++ ++ endif ++ ++ end subroutine getrec ++ ++ integer function intstr(word,len,lst) ++ ++c*********************************************************************** ++c ++c dl_poly function for extracting integers from a ++c character string ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith may 1994. ++c ++c parameters: ++c word - input character string ++c len - working length of character string ++c lst - location of space character at end of ++c integer string ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical flag,count,final ++ character*1 n,word,ksn ++ integer lst,len,j,isn ++ ++ dimension n(0:9),word(len) ++ data n/'0','1','2','3','4','5','6','7','8','9'/ ++ ++ isn=1 ++ lst=0 ++ ksn='+' ++ intstr=0 ++ flag=.false. ++ final=.false. ++ count=.false. ++ ++ do while(lst.lt.len.and.(.not.final)) ++ ++ lst=lst+1 ++ flag=.false. ++ ++ do j=0,9 ++ ++ if(n(j).eq.word(lst))then ++ ++ intstr=10*intstr+j ++ count=.true. ++ flag=.true. ++ ++ endif ++ ++ enddo ++ ++ if(count.and.(.not.flag))final=.true. ++ if(flag.and.ksn.eq.'-')isn=-1 ++ ksn=word(lst) ++ ++ enddo ++ ++ intstr=isn*intstr ++ ++ do j=lst,len ++ word(j-lst+1)=word(j) ++ enddo ++ do j=len-lst+2,len ++ word(j)=' ' ++ enddo ++ ++ return ++ end function intstr ++ ++ real(8) function dblstr(word,len,lst) ++ ++c*********************************************************************** ++c ++c dl_poly function for extracting double precisions from a ++c character string. ++c modified from dl_poly function intstr ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith may 1994. ++c modified - t. forester april 1994 ++c ++c parameters: ++c word - input character string ++c len - working length of character string ++c lst - location of space character at end of ++c double precision string ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 n,word,ksn,dot,d,e ++ logical flag,ldot,start,final ++ integer len,lst,iexp,idum,i,j,fail ++ real(8) sn,ten,one ++ dimension n(0:9),word(len) ++ character*1, allocatable :: work(:) ++ ++ data n/'0','1','2','3','4','5','6','7','8','9'/ ++ data dot/'.'/ ++ data d/'d'/ ++ data e/'e'/ ++ ++ allocate(work(len),stat=fail) ++ ++ lst=0 ++ sn=1.d0 ++ ksn='+' ++ ten=10.d0 ++ one=1.d0 ++ ++ dblstr=0.d0 ++ iexp=0 ++ idum=0 ++ start=.false. ++ ldot=.false. ++ final=.false. ++ ++ do while(lst.lt.len.and.(.not.final)) ++ ++ lst=lst+1 ++ flag=.false. ++ ++ do j=0,9 ++ ++ if(n(j).eq.word(lst))then ++ ++ dblstr=ten*dblstr+one*dble(j) ++ flag=.true. ++ start=.true. ++ ++ endif ++ ++ enddo ++ ++ if(dot.eq.word(lst))then ++ ++ flag=.true. ++ ten=1.d0 ++ ldot=.true. ++ start=.true. ++ ++ endif ++ ++ if(flag.and.ksn.eq.'-') sn=-1.d0 ++ if(ldot) one=one/10.d0 ++ ksn=word(lst) ++ if(ksn.eq."D")ksn="d" ++ if(ksn.eq."E")ksn="e" ++ ++ if(start)then ++ ++ if(d.eq.ksn.or.e.eq.ksn)then ++ ++ do i=1,len-lst ++ work(i)=word(i+lst) ++ enddo ++ iexp=intstr(work,len-lst,idum) ++ final=.true. ++ ++ endif ++ ++ if(.not.flag)final=.true. ++ ++ endif ++ ++ enddo ++ ++ dblstr=sn*dblstr*(10.d0**iexp) ++ lst=lst+idum ++ ++ do j=lst,len ++ word(j-lst+1)=word(j) ++ enddo ++ do j=len-lst+2,len ++ word(j)=' ' ++ enddo ++ ++ deallocate(work,stat=idum) ++ ++ return ++ end function dblstr ++ ++ subroutine strip(string,imax) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to strip blanks from start of a string ++c maximum length is 255 characters ++c ++c copyright daresbury laboratory 1993 ++c author t.forester july 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,imax,j ++ character*1 string(imax) ++ ++ do i=1,imax ++ ++ if(string(1).eq.' ')then ++ ++ do j=1,imax-1 ++ ++ string(j)=string(j+1) ++ ++ enddo ++ ++ string(imax)=' ' ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine strip ++ ++ subroutine lowcase(string,length) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to lowercase a string of up to 255 characters. ++c Transportable to non-ASCII machines ++c ++c copyright daresbury laboratory 1993 ++c author t. forester july 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 string(*) ++ character*1 letter ++ integer i,length ++ ++ do i=1,min(255,length) ++ ++ letter=string(i) ++ ++ if(letter.eq.'A')then ++ letter='a' ++ else if(letter.eq.'B')then ++ letter='b' ++ else if(letter.eq.'C')then ++ letter='c' ++ else if(letter.eq.'D')then ++ letter='d' ++ else if(letter.eq.'E')then ++ letter='e' ++ else if(letter.eq.'F')then ++ letter='f' ++ else if(letter.eq.'G')then ++ letter='g' ++ else if(letter.eq.'H')then ++ letter='h' ++ else if(letter.eq.'I')then ++ letter='i' ++ else if(letter.eq.'J')then ++ letter='j' ++ else if(letter.eq.'K')then ++ letter='k' ++ else if(letter.eq.'L')then ++ letter='l' ++ else if(letter.eq.'M')then ++ letter='m' ++ else if(letter.eq.'N')then ++ letter='n' ++ else if(letter.eq.'O')then ++ letter='o' ++ else if(letter.eq.'P')then ++ letter='p' ++ else if(letter.eq.'Q')then ++ letter='q' ++ else if(letter.eq.'R')then ++ letter='r' ++ else if(letter.eq.'S')then ++ letter='s' ++ else if(letter.eq.'T')then ++ letter='t' ++ else if(letter.eq.'U')then ++ letter='u' ++ else if(letter.eq.'V')then ++ letter='v' ++ else if(letter.eq.'W')then ++ letter='w' ++ else if(letter.eq.'X')then ++ letter='x' ++ else if(letter.eq.'Y')then ++ letter='y' ++ else if(letter.eq.'Z')then ++ letter='z' ++ endif ++ ++ string(i)=letter ++ ++ enddo ++ ++ return ++ end subroutine lowcase ++ ++ subroutine copystring(oldstr,newstr,length) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to copy one string into another ++c ++c copyright daresbury laboratory ++c author w. smith jan 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 newstr(*),oldstr(*) ++ integer i,length ++ ++ do i=1,length ++ ++ newstr(i)=oldstr(i) ++ ++ enddo ++ ++ return ++ end subroutine copystring ++ ++ logical function findstring(seek,string,here) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to find an explicit string in an input record ++c note: variable `seek' is a character string while variable ++c `string' is a character*1 array i.e. code is application specific ++c ++c copyright daresbury laboratory ++c author w.smith jan 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,n,m,here ++ character*(*) seek ++ character*1 string(lenrec) ++ ++ m=lenrec ++ n=len(seek) ++ findstring=.false. ++ ++ here=0 ++ do while(here.le.m-n.and.(.not.findstring)) ++ ++ findstring=.true. ++ ++ do i=1,n ++ if(seek(i:i).ne.string(here+i))findstring=.false. ++ enddo ++ ++ here=here+1 ++ ++ enddo ++ ++ return ++ end function findstring ++ ++ subroutine striptext(string,length,nwords) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to strip leading text from a data record ++c ++c copyright daresbury laboratory ++c author w.smith jan 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical final ++ integer length,nwords,i,j,k ++ character*1 string(length) ++ ++ do k=1,nwords ++ ++ i=0 ++ final=.false. ++ ++ do while(.not.final.and.i.lt.length) ++ ++ i=i+1 ++ ++ if(string(1).eq.' ')then ++ ++ final=.true. ++ ++ else ++ ++ do j=1,length-1 ++ ++ string(j)=string(j+1) ++ ++ enddo ++ ++ string(length)=' ' ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine striptext ++ ++ subroutine getword(word,string,len1,len2) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to fetch an 8 character word from a string ++c while ignoring leading blanks ++c ++c copyright daresbury laboratory ++c author w.smith jan 2004 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical final ++ character*8 word ++ integer len1,len2,i,j,k ++ character*1 wrdseq(len1),string(len2) ++ ++ do i=1,len1 ++ wrdseq(i)=' ' ++ enddo ++ ++ i=0 ++ k=0 ++ final=.false. ++ ++ do while(.not.final.and.i.lt.len2) ++ ++ i=i+1 ++ ++ if(string(1).eq.' ')then ++ ++ if(k.gt.0)final=.true. ++ ++ else ++ ++ k=k+1 ++ wrdseq(k)=string(1) ++ if(k.eq.len1)final=.true. ++ ++ endif ++ ++ do j=1,len2-1 ++ ++ string(j)=string(j+1) ++ ++ enddo ++ ++ string(len2)=' ' ++ ++ enddo ++ ++ word=mkwd8(wrdseq) ++ ++ return ++ end subroutine getword ++ ++ character*8 function mkwd8(string) ++ ++c*********************************************************************** ++c ++c DL_POLY routine to make an 8 character word from a string ++c ++c copyright daresbury laboratory ++c author w.smith nov 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i ++ character*1 string(*) ++ ++ do i=1,8 ++ mkwd8(i:i)=string(i) ++ enddo ++ ++ return ++ end function mkwd8 ++ ++ end module parse_module ++ ++ +diff -urN dl_class_1.9.orig/srcmod/pass_tools.f dl_class_1.9/srcmod/pass_tools.f +--- dl_class_1.9.orig/srcmod/pass_tools.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/pass_tools.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,318 @@ ++ subroutine passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for passing information about bond ++c constraints between nodes ++c ++c parallel replicated data version assuming direct node-node ++c connection (i.e. this version may be intel specific) ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith august 1992. ++c MPI version t.forester may 1995 ++c CPP version - w.smith may 1995 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ logical safe,lshmov ++ integer idnode,mxnode,natms,nscons,lashap,lishap,listme,ierr ++ integer listin,listot,listcon,lstfrz,i,j,k,jdnode,idum ++ ++ dimension listme(mxatms),listin(mxatms),listot(mxatms) ++ dimension lishap(mxlshp),lashap(mxproc),listcon(mxcons,3) ++ dimension lstfrz(mxatms) ++ ++ integer status(MPI_STATUS_SIZE), request ++ ++CMPIU define MPI_SEND MPI_SEND_ ++CMPIU define MPI_IRECV MPI_IRECV_ ++CMPIU define MPI_WAIT MPI_WAIT_ ++ ++ if(mxproc.lt.mxnode)call error(idnode,102) ++ ++ safe=.true. ++ ++ do i=1,natms ++ ++ listme(i)=0 ++ ++ enddo ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ listme(i)=listme(i)+1 ++ listme(j)=listme(j)+1 ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ j=0 ++ call gsync() ++ do k=1,mxnode-1 ++ ++ jdnode=mod(idnode+mxnode-k,mxnode) ++ ++ call MPI_IRECV(listin,natms,MPI_INTEGER, ++ x MPI_ANY_SOURCE,Passcon_tag+k,MPI_COMM_WORLD,request,ierr) ++ ++ call MPI_SEND(listme,natms,MPI_INTEGER,jdnode, ++ x Passcon_tag+k,MPI_COMM_WORLD,ierr) ++ ++ call MPI_WAIT(request,status,ierr) ++ ++ do i=1,natms ++ ++ if((listme(i).gt.0).and.(listin(i).gt.0.and. ++ x lstfrz(i).eq.0))then ++ ++ j=j+1 ++ if(j.gt.mxlshp)then ++ ++ safe=.false. ++ ++ else ++ ++ lishap(j)=i ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ lashap(k)=j ++ ++ enddo ++ ++ endif ++ ++c check for global error condition ++ ++ if(mxnode.gt.1) call gstate(safe) ++ ++ if(.not.safe)call error(idnode,103) ++ ++ if(mxnode.gt.1) then ++ call gisum(j,1,idum) ++ if(idnode.eq.0) write(nrite,'(/,a,14x,i10)') ++ x ' shared atoms from passcon',j/2 ++ lshmov = (j.gt.0) ++ endif ++ ++c keep record of all atoms subject to constraints ++ ++ do i=1,natms ++ ++ if(listme(i).gt.0)then ++ ++ listot(i)=1 ++ ++ else ++ ++ listot(i)=0 ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gisum(listot,natms,listin) ++ ++ return ++ end ++ ++ subroutine passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for passing information about PMF ++c constraints between nodes ++c ++c parallel replicated data version assuming direct node-node ++c connection (i.e. this version may be intel specific) ++c ++c copyright - daresbury laboratory 1995 ++c author - t.forester august 1995. ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf ++ integer npmf,i,j,k ++ ++ dimension listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) ++ dimension lstpmf(mxspmf,mspmf),npmf(2) ++ ++ if(mxproc.lt.mxnode)call error(idnode,102) ++ if(mxpmf.lt.natms) call error(idnode,490) ++ ++ do i=1,natms ++ ++ listpm(i)=0 ++ ++ enddo ++ ++ do k=1,nspmf ++ ++ do j = 1,npmf(1)+npmf(2) ++ ++ i=lstpmf(j,k) ++ listpm(i)= 1 ++ ++ enddo ++ ++ enddo ++c ++c keep record of all atoms subject to pmf constraints ++ ++ do i=1,natms ++ ++ if(listpm(i).gt.0)then ++ ++ lstpmt(i)=1 ++ ++ else ++ ++ lstpmt(i)=0 ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)call gisum(lstpmt,natms,listin) ++ ++ return ++ end ++ ++ subroutine passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for passing information about rigid body ++c atoms involved in bond constraints between nodes ++c ++c parallel replicated data version assuming direct node-node ++c connection ++c ++c copyright - daresbury laboratory 1995 ++c author - t. forester december 1995. ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ ++ implicit none ++ ++ include "comms.inc" ++ ++ logical lcnb,safe ++ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,listin ++ integer listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp ++ integer numgsit,igrp1,igrp2,i,jr,igrp,itmols,imols,lgrp,id ++ integer jj,ik,j,k ++ ++ dimension listin(mxatms) ++ dimension listcon(mxcons,3),lstcsit(2*mxcons) ++ dimension lstout(mxatms),lstrgd(mxgatm) ++ dimension nummols(mxtmls),numgrp(mxtmls),numgsit(mxungp) ++ dimension lstgtp(mxgrp) ++ ++ integer status(MPI_STATUS_SIZE) ++ ++ if(mxproc.lt.mxnode)call error(idnode,102) ++ ++c block indices for groups ++ ++ igrp1 = (idnode*ngrp)/mxnode + 1 ++ igrp2 = ((idnode+1)*ngrp)/mxnode ++ ++c locate site indices of atoms in constraints ++ ++ do i = 1,natms ++ listin(i) = 0 ++ enddo ++ ++c loop over molecule types ++ ++ jr = 0 ++ igrp = 0 ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then ++ ++ id = lstgtp(igrp) ++ do jj = 1,numgsit(id) ++ ++ jr = jr +1 ++ i = lstrgd(jr) ++ listin(i) = jj ++ ++ enddo ++ endif ++ enddo ++ enddo ++ enddo ++ ++ if(mxnode.gt.1) call gisum(listin,natms,lstout) ++ ++ safe = .true. ++ ik = 0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ if(listin(i).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(i) ++ safe = .false. ++ endif ++ ++ if(listin(j).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(j) ++ safe = .false. ++ endif ++ ++ enddo ++ ++c lcnb flags bodies connected by constraints ++ ++ if(mxnode.gt.1) call gstate(safe) ++ lcnb = (.not.safe) ++ ++ return ++ end ++ ++ ++ +diff -urN dl_class_1.9.orig/srcmod/pmf_module.f dl_class_1.9/srcmod/pmf_module.f +--- dl_class_1.9.orig/srcmod/pmf_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/pmf_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1911 @@ ++ module pmf_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining potential of mean force arrays ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use ensemble_tools_module ++ use lf_motion_module ++ use lf_rotation1_module ++ use parse_module ++ use property_module ++ use setup_module ++ use shake_module ++ use vv_motion_module ++ use utility_module ++ ++ implicit none ++ ++ integer npmf ++ real(8) prmpmf,pmfnrm ++ real(8), allocatable :: pmfwght(:) ++ integer, allocatable :: numpmf(:) ++ integer, allocatable :: indpmf(:) ++ integer, allocatable :: listpm(:) ++ integer, allocatable :: lstpmt(:) ++ integer, allocatable :: lstpmf(:,:) ++ ++ dimension npmf(2),pmfnrm(2) ++ ++ save npmf,prmpmf,pmfnrm,pmfwght,numpmf,indpmf,listpm ++ save lstpmt,lstpmf ++ ++ contains ++ ++ subroutine alloc_pmf_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for allocating pmf arrays ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=6 ++ ++ integer i,idnode,fail ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (pmfwght(mxspmf),stat=fail(1)) ++ allocate (indpmf(mxspmf),stat=fail(2)) ++ allocate (numpmf(mxtmls),stat=fail(3)) ++ allocate (listpm(mxpmf),stat=fail(4)) ++ allocate (lstpmt(mxpmf),stat=fail(5)) ++ allocate (lstpmf(mxspmf,mspmf),stat=fail(6)) ++ ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1210) ++ enddo ++ ++ do i=1,mxtmls ++ numpmf(i)=0 ++ enddo ++ ++ end subroutine alloc_pmf_arrays ++ ++ subroutine define_pmf(safe,idnode,itmols,nspmf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining pmf units ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer idnode,itmols,nspmf,ipmf,jpmf,iatm1,idum ++ real(8) wght ++ ++ numpmf(itmols)=1 ++ prmpmf=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) then ++ write(nrite,"(/,1x,' PMF bondlength :', ++ x 5x,f20.10)") prmpmf ++ write(nrite, ++ x "(/,/,12x,'unit, site and weight details:' ++ x ,/,/,16x,'unit',6x,'index',5x,'weight')") ++ endif ++ ++ do ipmf=1,2 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ call strip(record,lenrec) ++ call lowcase(record,lenrec) ++ if(.not.findstring('pmf unit',record,idum)) ++ x call error(idnode,462) ++ npmf(ipmf)=intstr(record,lenrec,idum) ++ ++ do jpmf=1,npmf(ipmf) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ iatm1=intstr(record,lenrec,idum) ++ wght=dblstr(record,lenrec,idum) ++ if(wght.le.1.d-10) wght=1.d0 ++ ++ nspmf=nspmf+1 ++ ++ if(nspmf.gt.mxspmf) call error(idnode,460) ++ ++ indpmf(nspmf)=iatm1 ++ pmfwght(nspmf)=wght ++ ++ if(idnode.eq.0) then ++ ++ if(jpmf.eq.1) then ++ write(nrite,"(16x,i5,i10,f12.6)") ++ x ipmf,indpmf(nspmf),pmfwght(nspmf) ++ else ++ write(nrite,"(21x,i10,f12.6)") ++ x indpmf(nspmf),pmfwght(nspmf) ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine define_pmf ++ ++ subroutine pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, ++ x dxp,dyp,dzp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing vectors for PMF calculations ++c ++c copyright - daresbury laboratory ++c adapted by w.smith october 2005 ++c original by t.forester aug 1995 ++c ++c set variable img true for PBC shifted vectors ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical img ++ integer nspmf,imcon,k,jj,kk,ipmf,i,i1,i2 ++ ++ real(8) xxx(mxatms),yyy(mxatms),zzz(mxatms) ++ real(8) xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ real(8) xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) ++ real(8) dxp(mspmf),dyp(mspmf),dzp(mspmf),cell(9) ++ ++ do k=1,nspmf ++ ++ jj=0 ++ kk=0 ++ ++c calculate difference vectors ++ ++ do ipmf=1,2 ++ ++ i1=lstpmf(jj+1,k) ++ ++c position difference vectors ++ ++ do i=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i2=lstpmf(jj,k) ++ xxt(i)=xxx(i2)-xxx(i1) ++ yyt(i)=yyy(i2)-yyy(i1) ++ zzt(i)=zzz(i2)-zzz(i1) ++ ++ enddo ++ ++c correct for periodic images - assume less than half box length ++ ++ if(img)call images(imcon,0,1,npmf(ipmf),cell,xxt,yyt,zzt) ++ ++c create weighted coordinate ++ ++ xxa(ipmf,k)=0.d0 ++ yya(ipmf,k)=0.d0 ++ zza(ipmf,k)=0.d0 ++ ++ do i=1,npmf(ipmf) ++ ++ kk=kk+1 ++ xxa(ipmf,k)=xxa(ipmf,k)+pmfwght(kk)*xxt(i) ++ yya(ipmf,k)=yya(ipmf,k)+pmfwght(kk)*yyt(i) ++ zza(ipmf,k)=zza(ipmf,k)+pmfwght(kk)*zzt(i) ++ ++ enddo ++ ++ xxa(ipmf,k)=xxa(ipmf,k)/pmfnrm(ipmf)+xxx(i1) ++ yya(ipmf,k)=yya(ipmf,k)/pmfnrm(ipmf)+yyy(i1) ++ zza(ipmf,k)=zza(ipmf,k)/pmfnrm(ipmf)+zzz(i1) ++ ++ enddo ++ ++ dxp(k)=xxa(2,k)-xxa(1,k) ++ dyp(k)=yya(2,k)-yya(1,k) ++ dzp(k)=zza(2,k)-zza(1,k) ++ ++ enddo ++ ++c periodic boundary condition for pmf vectors ++ ++ if(img)call images(imcon,0,1,nspmf,cell,dxp,dyp,dzp) ++ ++ return ++ end subroutine pmf_vectors ++ ++ subroutine pmflf ++ x (safe,safep,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics. Verlet leapfrog With RD-SHAKE ++c and PMF_SHAKE - for potential of mean force calculations. ++c ++c parallel replicated data version : block data ++c adapted from dl_poly routine nve_1.f ++c ++c copyright - daresbury laboratory 1995 ++c author - t.forester aug 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ ++ logical safe,lshmov,safep,unsafe,img ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,nspmf,ntpmf ++ integer fail,iatm0,iatm1,i,j,k,jj,ii,ipmf,icyc ++ real(8) engke,tolnce,tstep,vircon,virpmf,strpmf,summas ++ real(8) rstep,viracc,strkin,strcon ++ ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) ++ real(8), allocatable :: dxp(:),dyp(:),dzp(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ dimension strpmf(9),strcon(9),strkin(9),summas(2),fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(1)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(2)) ++ allocate(xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(3)) ++ allocate(uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(4)) ++ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(5)) ++ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(8)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1220) ++ enddo ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c constraint virials ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ ++c temporary stress tensor accumulators ++ ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ strpmf(i)=0.d0 ++ ++ enddo ++ ++c store initial values of position ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c calculate mass terms for PMF units ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ summas(ipmf)=0.d0 ++ pmfnrm(ipmf)=0.d0 ++ ++ do i=1,npmf(ipmf) ++ ++ jj=jj+1 ++ ii=lstpmf(jj,1) ++ summas(ipmf)=summas(ipmf)+weight(ii) ++ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) ++ ++ enddo ++ ++ enddo ++ ++c calculate PMF bond constraints and store initial positions ++ ++ img=.true. ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, ++ x xxa,yya,zza,dxp,dyp,dzp) ++ ++c move atoms by leapfrog algorithm ++ ++ safe=(ntcons.eq.0) ++ safep=(ntpmf.eq.0) ++ ++ j=0 ++ do i=iatm0,iatm1 ++ ++ j=j+1 ++ ++c update velocities ++ ++ uxx(i)=vxx(i)+tstep*rmass(i)*fxx(i) ++ uyy(i)=vyy(i)+tstep*rmass(i)*fyy(i) ++ uzz(i)=vzz(i)+tstep*rmass(i)*fzz(i) ++ ++c update positions ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++c RDSHAKE procedure ++ ++ if(ntcons.gt.0.or.ntpmf.gt.0) then ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply constraint corrections - iteratively ++ ++ icyc=0 ++ unsafe=.true. ++ ++ do while(unsafe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c apply bond constraints ++ ++ viracc=0.d0 ++ if(ntcons.gt.0)call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c apply pmf constraints ++ ++ viracc=0.d0 ++ if(ntpmf.gt.0)call pmf_shake ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x viracc,xxt,yyt,zzt,strcon,summas,dxp,dyp,dzp, ++ x xxa,yya,zza) ++ ++ virpmf=virpmf+viracc ++ do i=1,9 ++ strpmf(i)=strpmf(i)+strcon(i) ++ enddo ++ ++ unsafe=(.not.(safe.and.safep.and.abs(viracc).lt.1.d-10)) ++ ++ enddo ++ ++ safep=.not.unsafe ++ ++c calculate velocity correction ++ ++ j=0 ++ rstep=1.d0/tstep ++ do i=iatm0,iatm1 ++ ++c update corrected velocity ++ ++ j=j+1 ++ uxx(i)=(xxx(i)-xxo(j))*rstep ++ uyy(i)=(yyy(i)-yyo(j))*rstep ++ uzz(i)=(zzz(i)-zzo(j))*rstep ++ ++c calculate the corrected forces ++ ++ fxx(i)=(uxx(i)-vxx(i))*weight(i)*rstep ++ fyy(i)=(uyy(i)-vyy(i))*weight(i)*rstep ++ fzz(i)=(uzz(i)-vzz(i))*weight(i)*rstep ++ ++ enddo ++ ++ endif ++ ++c calculate velocity at full time step ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=0.5d0*(vxx(i)+uxx(i)) ++ vyy(i)=0.5d0*(vyy(i)+uyy(i)) ++ vzz(i)=0.5d0*(vzz(i)+uzz(i)) ++ ++ enddo ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c total contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strpmf(i)+strcns(i)+strkin(i) ++ enddo ++ ++c add pmf and constraint virials ++ ++ vircon=vircon+virpmf ++ ++c restore half step velocity ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(1)) ++ deallocate(uxx,uyy,uzz,dxp,dyp,dzp,stat=fail(2)) ++ deallocate(txx,tyy,tzz,xxo,yyo,zzo,stat=fail(3)) ++ deallocate(dxt,dyt,dzt,xxa,yya,zza,stat=fail(4)) ++ ++ return ++ end subroutine pmflf ++ ++ subroutine pmflfq_1 ++ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, ++ x vircon,safep,nspmf,ntpmf,virpmf) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using implicit leapfrog quaternion algorithm ++c plus bond constraints - PROVIDED rigid body sites ++c and constraint sites do not coincide. ++c ++c parallel replicated data version : block data ++c ++c tqx,tqy,tqz = torque in lab fixed frame ++c omx,omy,omz = angular velocity in body fixed frame (principal axis) ++c rotinx,y,z = rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory 1993 ++c author t.forester october 1993 ++c amended t.forester dec 1994 : block data ++c amended w.smith sep 1999 : euler equation ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=14 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,safeq,lshmov,newjob,safep,unsafe,img ++ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer fail,i,igrp,igrp1,igrp2,idum,ifre1,ifre2,j,ifre ++ integer jg,ig,k,id,jr,nspmf,ntpmf,jj,ii,ipmf,icyc ++ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon ++ real(8) strkin,rot,rstep,rtsq,engtrn,vaa,vbb,vcc,virpmf ++ real(8) trx,try,trz,delx,dely,delz,engfke,viracc ++ real(8) strgrp,tqx,tqy,tqz,fmx,fmy,fmz ++ real(8) strpmf,strcon,summas ++ ++ real(8), allocatable :: opx(:),opy(:),opz(:) ++ real(8), allocatable :: oqx(:),oqy(:),oqz(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xx1(:),yy1(:),zz1(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) ++ ++ ++ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) ++ real(8), allocatable :: dxp(:),dyp(:),dzp(:) ++ ++ dimension strkin(9),strgrp(9),rot(9),fail(nnn) ++ ++ dimension strpmf(9),strcon(9),summas(2) ++ ++ save igrp1,igrp2,ifre1,ifre2 ++ ++ data newjob/.true./ ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) ++ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) ++ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) ++ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) ++ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) ++ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) ++ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) ++ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(12)) ++ ++ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(13)) ++ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(14)) ++ ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1500) ++ enddo ++ ++ if(newjob)then ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ newjob=.false. ++ ++ endif ++ ++ safe=.false. ++ ++c constraint virials ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ ++c temporary stress tensor accumulators ++ ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ strpmf(i)=0.d0 ++ ++ enddo ++ ++c store initial values of position and velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ xxo(j)=xxx(i) ++ yyo(j)=yyy(i) ++ zzo(j)=zzz(i) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ gcxo(jg)=gcmx(ig) ++ gcyo(jg)=gcmy(ig) ++ gczo(jg)=gcmz(ig) ++ ++ enddo ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c calculate mass terms for PMF units ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ summas(ipmf)=0.d0 ++ pmfnrm(ipmf)=0.d0 ++ ++ do i=1,npmf(ipmf) ++ ++ jj=jj+1 ++ ii=lstpmf(jj,1) ++ summas(ipmf)=summas(ipmf)+weight(ii) ++ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) ++ ++ enddo ++ ++ enddo ++ ++c calculate PMF bond constraints and store initial positions ++ ++ img=.true. ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, ++ x xxa,yya,zza,dxp,dyp,dzp) ++ ++c move atoms by leapfrog algorithm ++ ++ safe=(ntcons.eq.0) ++ safep=(ntpmf.eq.0) ++ ++c calculate atom displacements from rigid body com ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcxo(jg) ++ dty(jr)=yyy(i)-gcyo(jg) ++ dtz(jr)=zzz(i)-gczo(jg) ++ ++ enddo ++ ++ enddo ++ ++c minimum images ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c integrate 'free' particles ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c advance velocity by leapfrog ++ ++ uxx(i)=vxo(j)+tstep*rmass(i)*fxx(i) ++ uyy(i)=vyo(j)+tstep*rmass(i)*fyy(i) ++ uzz(i)=vzo(j)+tstep*rmass(i)*fzz(i) ++ ++c advance position by leapfrog ++ ++ xxx(i)=xxo(j)+tstep*uxx(i) ++ yyy(i)=yyo(j)+tstep*uyy(i) ++ zzz(i)=zzo(j)+tstep*uzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0.or.ntpmf.gt.0) then ++ ++c store integrated positions ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ j=j+1 ++ xx1(j)=xxx(i) ++ yy1(j)=yyy(i) ++ zz1(j)=zzz(i) ++ ++ enddo ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply constraint corrections - iteratively ++ ++ icyc=0 ++ unsafe=.true. ++ ++ do while(unsafe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c apply bond constraints ++ ++ viracc=0.d0 ++ if(ntcons.gt.0)call rdshake_1 ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++c apply pmf constraints ++ ++ viracc=0.d0 ++ if(ntpmf.gt.0)call pmf_shake ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x viracc,xxt,yyt,zzt,strcon,summas,dxp,dyp,dzp, ++ x xxa,yya,zza) ++ ++ virpmf=virpmf+viracc ++ do i=1,9 ++ strpmf(i)=strpmf(i)+strcon(i) ++ enddo ++ ++ unsafe=(.not.(safe.and.safep.and.abs(viracc).lt.1.d-10)) ++ ++ enddo ++ ++ safep=.not.unsafe ++ ++c calculate force and velocity corrections ++ ++ j=0 ++ rstep=1.d0/tstep ++ rtsq=1.d0/tstep**2 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++c calculate force correction ++ ++ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq ++ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq ++ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq ++ ++c calculate velocity correction ++ ++ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep ++ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep ++ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep ++ ++ enddo ++ ++c end of shake corrections ++ ++ endif ++ ++c estimate full step velocity ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ ++ vxx(i)=0.5d0*(uxx(i)+vxo(j)) ++ vyy(i)=0.5d0*(uyy(i)+vyo(j)) ++ vzz(i)=0.5d0*(uzz(i)+vzo(j)) ++ ++ enddo ++ ++c calculate new kinetic energy at current timestep ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ ++c restore free atom half step velocity ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=uxx(i) ++ vyy(i)=uyy(i) ++ vzz(i)=uzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++c translational rigid body motion ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++c calculate net force on rigid body ++ ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c advance velocity by leapfrog ++ ++ uxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) ++ uyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) ++ uzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) ++ ++c advance position by leapfrog ++ ++ gcmx(ig)=gcmx(ig)+tstep*uxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*uyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*uzz(ig) ++ ++c estimate velocity at full time step ++ ++ gvxx(ig)=0.5d0*(gvxx(ig)+uxx(ig)) ++ gvyy(ig)=0.5d0*(gvyy(ig)+uyy(ig)) ++ gvzz(ig)=0.5d0*(gvzz(ig)+uzz(ig)) ++ ++ enddo ++ ++c calculate rigid body translational kinetic energy ++ ++ engtrn=getkint(ngrp,idnode,mxnode) ++ ++c total translational kinetic energy ++ ++ engke=engtrn+engfke ++ ++c calculate ridid body kinetic stress tensor ++ ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c restore rigid body half timestep velocity ++ ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=uxx(ig) ++ gvyy(ig)=uyy(ig) ++ gvzz(ig)=uzz(ig) ++ ++ enddo ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate torques in lab frame ++ ++ jr=0 ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ id=lstgtp(ig) ++ ++ tqx=0.d0 ++ tqy=0.d0 ++ tqz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ tqx=tqx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ tqy=tqy+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ tqz=tqz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c store current angular velocity ++ ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ ++c iterate angular velocity for time step n (e. yezdimer) ++ ++ do i=1,5 ++ ++ trx=(tqx*rot(1)+tqy*rot(4)+tqz*rot(7))*rotinx(id,2) ++ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) ++ try=(tqx*rot(2)+tqy*rot(5)+tqz*rot(8))*rotiny(id,2) ++ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) ++ trz=(tqx*rot(3)+tqy*rot(6)+tqz*rot(9))*rotinz(id,2) ++ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) ++ ++ delx=tstep*trx ++ dely=tstep*try ++ delz=tstep*trz ++ ++c improved angular velocity at time step n ++ ++ opx(jg)=omx(ig)+delx*pt5 ++ opy(jg)=omy(ig)+dely*pt5 ++ opz(jg)=omz(ig)+delz*pt5 ++ ++ enddo ++ ++c angular velocity at time step n+1/2 ++ ++ uxx(ig)=omx(ig)+delx ++ uyy(ig)=omy(ig)+dely ++ uzz(ig)=omz(ig)+delz ++ ++c angular velocity at time step n+1 (needed for quat algorithm) ++ ++ oqx(jg)=omx(ig)+delx*1.5d0 ++ oqy(jg)=omy(ig)+dely*1.5d0 ++ oqz(jg)=omz(ig)+delz*1.5d0 ++ ++c angular velocity at timestep n ++ ++ omx(ig)=omx(ig)+pt5*delx ++ omy(ig)=omy(ig)+pt5*dely ++ omz(ig)=omz(ig)+pt5*delz ++ ++ enddo ++ ++c rotational kinetic energy ++ ++ engrot=getkinr(ngrp,idnode,mxnode) ++ ++c restore half step angular velocity ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ opx(jg)=omx(ig) ++ opy(jg)=omy(ig) ++ opz(jg)=omz(ig) ++ omx(ig)=uxx(ig) ++ omy(ig)=uyy(ig) ++ omz(ig)=uzz(ig) ++ ++ enddo ++ ++c assign new quaternions ++ ++ call update_quaternions ++ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) ++ ++c complete stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i)+ ++ x strpmf(i) ++ enddo ++ ++c add pmf and constraint virials ++ ++ vircon=vircon+virpmf ++ ++c minimum images of group positions and particle positions ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c new atomic positions for atoms in rigid bodies - relative to c.o.m ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1) then ++ ++c merge new group coordinates and velocities ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c ensure all atoms are within cell boundaries ++ ++ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) ++ ++c deallocate work arrays ++ ++ deallocate(opx,opy,opz,xxt,yyt,zzt,stat=fail(1)) ++ deallocate(oqx,oqy,oqz,dtx,dty,dtz,stat=fail(2)) ++ deallocate(dxx,dyy,dzz,uxx,uyy,uzz,stat=fail(3)) ++ deallocate(txx,tyy,tzz,dxt,dyt,dzt,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,xx1,yy1,zz1,stat=fail(5)) ++ deallocate(vxo,vyo,vzo,gcxo,gcyo,gczo,stat=fail(6)) ++ deallocate(dxp,dyp,dzp,xxa,yya,zza,stat=fail(7)) ++ ++ return ++ end subroutine pmflfq_1 ++ ++ subroutine pmf_shake ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x virpmf,xxt,yyt,zzt,strpmf,summas,dxp,dyp,dzp, ++ x xxa,yya,zza) ++ ++c*********************************************************************** ++c ++c dlpoly constraint subroutine for potential of mean force calc. ++c accummulates constraint force to maintain reaction coordinate ++c ++c assume bond vectors dxp,dyp,dzp are input ++c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc ++c ++c copyright daresbury laboratory 1995 ++c author t.forester august 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safep,img ++ integer idnode,mxnode,imcon,natms,nspmf,fail,icyc,k,jj ++ integer ii,i,ipmf ++ real(8) tstep,tolnce,virpmf,xxt,yyt,zzt,strpmf,summas ++ real(8) dxp,dyp,dzp,xxa,yya,zza,amt,strs1,strs2,strs3,strs5 ++ real(8) strs6,strs9,tstep2,dis,omega2,eps,gamma,gammi ++ ++ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) ++ dimension amt(2),strpmf(9),summas(2) ++ ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:),dsq(:) ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),dsq(mspmf), ++ x stat=fail) ++ if(fail.ne.0)call error(idnode,1230) ++ ++ if(mxcons.lt.nspmf) call error(idnode,492) ++ if(mspmf .lt.nspmf) call error(idnode,458) ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c accumulators for strpmf tensor ++ ++ virpmf=0.d0 ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ safep=.false. ++ ++ do while(.not.safep.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c calculate bond constraint length ++ ++ img=.true. ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, ++ x xxa,yya,zza,dxt,dyt,dzt) ++ ++ amt(1)= tstep2/summas(1) ++ amt(2)=-tstep2/summas(2) ++ ++ eps=0.d0 ++ dis=prmpmf ++ omega2=dis*dis ++ ++ do k=1,nspmf ++ ++ dsq(k)=dxt(k)**2+dyt(k)**2+dzt(k)**2 ++ eps=max(eps,abs((omega2-dsq(k))/(2.0d0*dis))) ++ ++ enddo ++ ++c check convergence condition ++ ++ safep=(eps.le.tolnce) ++ ++c bypass calculations if converged ++ ++ if(.not.safep)then ++ ++ do k=1,nspmf ++ ++ gamma=(omega2-dsq(k))/(-2.d0*(amt(2)-amt(1))* ++ x (dxp(k)*dxt(k)+dyp(k)*dyt(k)+dzp(k)*dzt(k))) ++ ++c accumulate pmf virial ++ ++ virpmf=virpmf+gamma*(dxp(k)**2+dyp(k)**2+dzp(k)**2) ++ ++ strs1=strs1-gamma*dxp(k)*dxp(k) ++ strs2=strs2-gamma*dxp(k)*dyp(k) ++ strs3=strs3-gamma*dxp(k)*dzp(k) ++ strs5=strs5-gamma*dyp(k)*dyp(k) ++ strs6=strs6-gamma*dyp(k)*dzp(k) ++ strs9=strs9-gamma*dzp(k)*dzp(k) ++ ++c improve approximate atomic positions ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ gammi=-gamma*amt(ipmf) ++ ++ do ii=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i=lstpmf(jj,k) ++ ++ xxx(i)=xxx(i)+dxp(k)*gammi ++ yyy(i)=yyy(i)+dyp(k)*gammi ++ zzz(i)=zzz(i)+dzp(k)*gammi ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c complete strpmf tensor ++ ++ strpmf(1)=strs1 ++ strpmf(2)=strs2 ++ strpmf(3)=strs3 ++ strpmf(4)=strs2 ++ strpmf(5)=strs5 ++ strpmf(6)=strs6 ++ strpmf(7)=strs3 ++ strpmf(8)=strs6 ++ strpmf(9)=strs9 ++ ++c splice coordinate arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=virpmf ++ call gdsum(buffer(1),1,buffer(2)) ++ virpmf=buffer(1) ++ call gdsum(strpmf,9,buffer) ++ call splice ++ x (idnode,natms,listpm,lstpmt,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(dxt,dyt,dzt,dsq,stat=fail) ++ ++ return ++ end subroutine pmf_shake ++ ++ subroutine pmfvv ++ x (safe,safep,lshmov,isw,idnode,mxnode,imcon,natms,nscons, ++ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics. Velocity Verlet With PMF_RATTLE ++c for potential of mean force calculations. ++c ++c copyright - daresbury laboratory ++c adapted by w.smith october 2005 ++c original by t.forester aug 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical safe,lshmov,safep,unsafe,newjob,img ++ integer idnode,imcon,mxnode,natms,nscons,ntcons,nspmf,ntpmf ++ integer isw,mxtop ++ integer fail,iatm0,iatm1,i,j,k,jj,i1,ipmf,icyc ++ real(8) engke,tolnce,tstep,vircon,virpmf,strcon,summas ++ real(8) viracc,strpmf,strkin ++ ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxp(:),dyp(:),dzp(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) ++ ++ dimension strcon(9),strpmf(9),strkin(9),summas(2),fail(nnn) ++ save summas,newjob,strpmf ++ data newjob/.true./ ++ ++c set default safety flags ++ ++ safe=(ntcons.eq.0) ++ safep=(ntpmf.eq.0) ++ if(safe.and.safep)return ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ mxtop=max(mxcons,mspmf) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(1)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(2)) ++ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(3)) ++ allocate(dxt(mxtop),dyt(mxtop),dzt(mxtop),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(6)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1220) ++ enddo ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate mass terms for PMF units ++ ++ if(newjob)then ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ summas(ipmf)=0.d0 ++ pmfnrm(ipmf)=0.d0 ++ ++ do i=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i1=lstpmf(jj,1) ++ summas(ipmf)=summas(ipmf)+weight(i1) ++ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) ++ ++ enddo ++ ++ enddo ++ ++ newjob=.false. ++ ++ endif ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c calculate PMF bond constraints and store initial positions ++ ++ img=.true. ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, ++ x dxp,dyp,dzp) ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ if(isw.eq.1)then ++ ++c constraint virials ++ ++ vircon=0.d0 ++ virpmf=0.d0 ++ ++c temporary stress tensor accumulators ++ ++ do i=1,9 ++ ++ strcns(i)=0.d0 ++ strpmf(i)=0.d0 ++ ++ enddo ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c apply constraint corrections - iteratively ++ ++ icyc=0 ++ unsafe=.true. ++ ++ do while(unsafe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ if(isw.eq.1)then ++ ++c apply bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcon) ++ ++ vircon=vircon+viracc ++ do i=1,9 ++ strcns(i)=strcns(i)+strcon(i) ++ enddo ++ ++ endif ++ ++c apply pmf constraints ++ ++ if(ntpmf.gt.0)then ++ ++ safep=.false. ++ call pmf_rattle_r ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x viracc,summas,xxt,yyt,zzt,xxa,yya,zza,dxp,dyp,dzp, ++ x dxt,dyt,dzt,strcon) ++ ++ virpmf=virpmf+viracc ++ do i=1,9 ++ strpmf(i)=strpmf(i)+strcon(i) ++ enddo ++ ++ endif ++ ++ unsafe=(.not.(safe.and.safep.and.abs(viracc).le.1.d-10)) ++ ++ endif ++ ++ if(isw.eq.2)then ++ ++c apply rattle velocity constraints ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ ++ endif ++ ++c apply pmf velocity constraints ++ ++ if(ntpmf.gt.0)then ++ ++ safep=.false. ++ call pmf_rattle_v ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x summas,dxp,dyp,dzp,xxt,yyt,zzt,xxa,yya,zza,dxt,dyt,dzt) ++ ++ endif ++ ++ unsafe=(.not.(safe.and.safep)) ++ ++ endif ++ ++ enddo ++ ++ safep=(.not.unsafe) ++ ++c periodic boundary condition ++ ++ if(isw.eq.1)call images ++ x (imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++ if(isw.eq.2)then ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c total contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strpmf(i)+strcns(i)+strkin(i) ++ enddo ++ ++c add pmf and constraint virials ++ ++ vircon=vircon+virpmf ++ ++ endif ++ ++c global exchange of configuration data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ if(isw.eq.1)call merge ++ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ if(ntcons.gt.0)call merge ++ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(1)) ++ deallocate(dxp,dyp,dzp,dxt,dyt,dzt,stat=fail(2)) ++ deallocate(txx,tyy,tzz,xxa,yya,zza,stat=fail(3)) ++ ++ return ++ end subroutine pmfvv ++ ++ subroutine pmf_rattle_r ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, ++ x virpmf,summas,xxt,yyt,zzt,xxa,yya,zza,dxp,dyp,dzp, ++ x dxt,dyt,dzt,strpmf) ++ ++c*********************************************************************** ++c ++c dlpoly constraint subroutine for potential of mean force calc. ++c accumulates constraint force to maintain reaction coordinate. ++c velocity verlet adaptation ++c ++c assume bond vectors dxp,dyp,dzp are input ++c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc ++c ++c copyright daresbury laboratory ++c adapted by w.smith october 2005 ++c original t.forester august 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safep,img ++ integer idnode,mxnode,imcon,natms,nspmf,icyc,k,jj ++ integer i1,i,ipmf ++ real(8) tstep,tolnce,virpmf,xxt,yyt,zzt,strpmf,summas,gamma ++ real(8) dxp,dyp,dzp,xxa,yya,zza,amt,tstep2,dis,omega2,eps,gammi ++ real(8) strs1,strs2,strs3,strs5,strs6,strs9,dxt,dyt,dzt,dsq ++ ++ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) ++ dimension amt(2),strpmf(9),summas(2) ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c pmf virial ++ ++ virpmf=0.d0 ++ ++c accumulators for stress tensor ++ ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c array bound check ++ ++ if(mxcons.lt.nspmf) call error(idnode,492) ++ if(mspmf .lt.nspmf) call error(idnode,458) ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ img=.true. ++ safep=.false. ++ dis=prmpmf ++ omega2=dis*dis ++ amt(1)= tstep2/summas(1) ++ amt(2)=-tstep2/summas(2) ++ ++ do while(.not.safep.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, ++ x dxt,dyt,dzt) ++ ++c check convergence ++ ++ eps=0.d0 ++ ++ do k=1,nspmf ++ ++ dsq=dxt(k)**2+dyt(k)**2+dzt(k)**2 ++ eps=max(eps,abs((omega2-dsq)/dis)) ++ ++ enddo ++ ++ eps=eps*0.5d0 ++ ++c verification of convergence ++ ++ safep=(eps.lt.tolnce) ++ ++c bypass calculations if converged ++ ++ if(.not.safep)then ++ ++ do k=1,nspmf ++ ++ dsq=dxt(k)**2+dyt(k)**2+dzt(k)**2 ++ gamma=(omega2-dsq)/(-(amt(2)-amt(1))* ++ x (dxp(k)*dxt(k)+dyp(k)*dyt(k)+dzp(k)*dzt(k))) ++ ++c accumulate pmf virial ++ ++ virpmf=virpmf+gamma*(dxp(k)**2+dyp(k)**2+dzp(k)**2) ++ ++ strs1=strs1-gamma*dxp(k)*dxp(k) ++ strs2=strs2-gamma*dxp(k)*dyp(k) ++ strs3=strs3-gamma*dxp(k)*dzp(k) ++ strs5=strs5-gamma*dyp(k)*dyp(k) ++ strs6=strs6-gamma*dyp(k)*dzp(k) ++ strs9=strs9-gamma*dzp(k)*dzp(k) ++ ++c improve approximate atomic positions and velocities ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ gammi=-0.5d0*gamma*amt(ipmf) ++ ++ do i1=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i=lstpmf(jj,k) ++ ++ xxx(i)=xxx(i)+dxp(k)*gammi ++ yyy(i)=yyy(i)+dyp(k)*gammi ++ zzz(i)=zzz(i)+dzp(k)*gammi ++ vxx(i)=vxx(i)+dxp(k)*gammi/tstep ++ vyy(i)=vyy(i)+dyp(k)*gammi/tstep ++ vzz(i)=vzz(i)+dzp(k)*gammi/tstep ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ strpmf(1)=strs1 ++ strpmf(2)=strs2 ++ strpmf(3)=strs3 ++ strpmf(4)=strs2 ++ strpmf(5)=strs5 ++ strpmf(6)=strs6 ++ strpmf(7)=strs3 ++ strpmf(8)=strs6 ++ strpmf(9)=strs9 ++ ++c splice coordinate and velocity arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=virpmf ++ call gdsum(buffer(1),1,buffer(2)) ++ virpmf=buffer(1) ++ call gdsum(strpmf,9,buffer) ++ call splice ++ x (idnode,natms,listpm,lstpmt,xxx,yyy,zzz,buffer) ++ call splice ++ x (idnode,natms,listpm,lstpmt,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++ return ++ end subroutine pmf_rattle_r ++ ++ subroutine pmf_rattle_v ++ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce,summas, ++ x dxp,dyp,dzp,vxt,vyt,vzt,vxa,vya,vza,vxp,vyp,vzp) ++ ++c*********************************************************************** ++c ++c dlpoly constraint subroutine for potential of mean force calc. ++c accumulates velocity correction for second constraint condition ++c velocity verlet adaptation ++c ++c assume bond vectors dxp,dyp,dzp are input ++c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc ++c ++c copyright daresbury laboratory ++c author w.smith october 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safep,img ++ integer idnode,mxnode,imcon,natms,nspmf,icyc,k,jj ++ integer i1,i,ipmf ++ real(8) tstep,tolnce,summas,gamma,vxt,vyt,vzt,vxa,vya,vza ++ real(8) vxp,vyp,vzp,dxp,dyp,dzp,amt,omega,eps,gammi,tolvel ++ ++ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) ++ dimension vxp(mspmf),vyp(mspmf),vzp(mspmf) ++ dimension vxt(mxatms),vyt(mxatms),vzt(mxatms) ++ dimension vxa(2,mspmf),vya(2,mspmf),vza(2,mspmf) ++ dimension amt(2),summas(2) ++ ++c constraint convergence tolerance ++ ++ tolvel=tolnce/tstep ++ ++c array bound check ++ ++ if(mxcons.lt.nspmf) call error(idnode,492) ++ if(mspmf .lt.nspmf) call error(idnode,458) ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ img=.false. ++ safep=.false. ++ amt(1)= 0.5d0*tstep/summas(1) ++ amt(2)=-0.5d0*tstep/summas(2) ++ ++ do while(.not.safep.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ call pmf_vectors ++ x (img,nspmf,imcon,cell,vxx,vyy,vzz,vxt,vyt,vzt,vxa,vya,vza, ++ x vxp,vyp,vzp) ++ ++c check convergence ++ ++ eps=0.d0 ++ do k=1,nspmf ++ ++ omega=dxp(k)*vxp(k)+dyp(k)*vyp(k)+dzp(k)*vzp(k) ++ eps=max(eps,abs(omega)/prmpmf) ++ ++ enddo ++ ++c verification of convergence ++ ++ safep=(eps.lt.tolvel) ++ ++c bypass calculations if converged ++ ++ if(.not.safep)then ++ ++ do k=1,nspmf ++ ++ omega=dxp(k)*vxp(k)+dyp(k)*vyp(k)+dzp(k)*vzp(k) ++ gamma=omega/((amt(2)-amt(1))* ++ x (dxp(k)**2+dyp(k)**2+dzp(k)**2)) ++ ++c improve approximate atomic velocities ++ ++ jj=0 ++ do ipmf=1,2 ++ ++ gammi=-gamma*amt(ipmf) ++ ++ do i1=1,npmf(ipmf) ++ ++ jj=jj+1 ++ i=lstpmf(jj,k) ++ ++ vxx(i)=vxx(i)+dxp(k)*gammi ++ vyy(i)=vyy(i)+dyp(k)*gammi ++ vzz(i)=vzz(i)+dzp(k)*gammi ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c splice velocity arrays across nodes ++ ++ if(mxnode.gt.1)call splice ++ x (idnode,natms,listpm,lstpmt,vxx,vyy,vzz,buffer) ++ ++ return ++ end subroutine pmf_rattle_v ++ ++ end module pmf_module +diff -urN dl_class_1.9.orig/srcmod/property_module.f dl_class_1.9/srcmod/property_module.f +--- dl_class_1.9.orig/srcmod/property_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/property_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,1318 @@ ++ module property_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining simulation property data ++c copyright - daresbury laboratory ++c author - w. smith nov 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use pair_module ++ use setup_module ++ use site_module ++ use tether_module ++ use utility_module ++ use vdw_module ++ ++ implicit none ++ ++ real(8), allocatable :: rdf(:,:),zdens(:,:) ++ real(8), allocatable :: stpval(:),sumval(:) ++ real(8), allocatable :: ssqval(:),zumval(:) ++ real(8), allocatable :: ravval(:),stkval(:,:) ++ real(8), allocatable :: xx0(:),yy0(:),zz0(:) ++ real(8), allocatable :: amsd(:) ++ ++ save rdf,zdens,stpval,sumval,ssqval,xx0,yy0,zz0 ++ save zumval,ravval,stkval ++ ++ contains ++ ++ subroutine alloc_prp_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=6 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (zdens(mxzdn,mxatyp),stat=fail(1)) ++ allocate (rdf(mxrdf,mxxtyp),amsd(mxatyp),stat=fail(2)) ++ allocate (stpval(mxnstk),sumval(mxnstk),stat=fail(3)) ++ allocate (ssqval(mxnstk),zumval(mxnstk),stat=fail(4)) ++ allocate (ravval(mxnstk),stkval(mxstak,mxnstk),stat=fail(5)) ++ allocate (xx0(mxatms),yy0(mxatms),zz0(mxatms),stat=fail(6)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1740) ++ enddo ++ ++ end subroutine alloc_prp_arrays ++ ++ subroutine result ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit,conint, ++ x rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost,chit_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing simulation summary and ++c saving the restart data ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith dec 1992. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*1 hms,dec ++ logical lgofr,lpgr,lzden,check,ltad,lbpd,goprint ++ ++ integer idnode,imcon,keyens,mxnode,natms,nzden,nstep,ntpatm ++ integer levcfg,numacc,numrdf,keybpd,i,iadd,io,j ++ real(8) chip,chit,conint,rcut,tstep,volm,timelp,avvol,zlen,dc ++ real(8) engcfg,virtot,vircom,prntim,simtim,tboost,chit_shl ++ ++c save restart data ++ ++ call revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++c for TAD and BPD system averages not generally meaningful ++c useful only for BPD in configurational sampling mode ++ ++ goprint=.not.(ltad.or.(lbpd.and.keybpd.gt.1)) ++ ++ if(goprint)then ++ ++c calculate final fluctuations ++ ++ do i=1,mxnstk ++ ssqval(i)=sqrt(max(0.d0,ssqval(i))) ++ enddo ++ ++c final averages and fluctuations ++ ++ call timchk(0,timelp) ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,1x,'run terminated after',i8,' steps.', ++ x ' final averages calculated over',i8,' steps.',/,/)") ++ x nstep,numacc ++ write(nrite,"(1x,120('-'), ++ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x,'eng_cfg', ++ x 5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd',5x,'eng_ang',5x, ++ x 'eng_dih',5x,'eng_tet',/,1x,'time ',5x,' eng_pv',4x, ++ x 'temp_rot',5x,'vir_cfg',5x,'vir_vdw',5x,'vir_cou',5x, ++ x 'vir_bnd',5x,'vir_ang',5x,'vir_con',5x,'vir_tet',/, ++ x 1x,'cpu time',6x,'volume',4x,'temp_shl',5x,'eng_shl', ++ x 5x,'vir_shl',7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', ++ x 7x,'press',/,/, ++ x 1x,120('-'))") ++ ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) ++ write(nrite,'(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)') ++ x nstep,(sumval(i),i=1,9), ++ x simtim,dec,(sumval(i),i=10,18), ++ x prntim,hms,(sumval(i),i=19,27) ++ write(nrite,"(/,1x,' r.m.s. ',1p,9e12.4,/,1x,'fluctn. ', ++ x 1p,9e12.4,/,9x,9e12.4)") (ssqval(i),i=1,27) ++ write(nrite,"(1x,120('-'))") ++ ++c write out bias potential boost factor ++ ++ if(lbpd)write(nrite,"(/,/,1x, ++ x 'calculated bias potential boost factor',1p,e16.8)")tboost ++ ++ if(numacc.gt.0)then ++ iadd=27 ++ ++c write out estimated diffusion coefficients ++ ++ if(numacc.gt.0)then ++ ++ write(nrite,"(/,/,12x,'Approximate 3D Diffusion', ++ x ' coefficients (10^-9 m^2 / s)',/,/,12x,'atom',7x, ++ x ' D ')") ++ ++ do i=1,ntpatm ++ ++ iadd=iadd+1 ++ dc=(ravval(iadd)-sumval(iadd))/ ++ x (3.d0*dble(numacc-min(mxnstk,numacc-1))*tstep)*10.d0 ++ if(dc.lt.1d-10) dc=0.d0 ++ if(lbpd)dc=dc/tboost ++ write(nrite,'(12x,a8,1p,e13.4)') unqatm(i),dc ++ ++ enddo ++ ++ endif ++ ++c print out average pressure tensor ++ ++ write(nrite,"(/,/,16x,'Average pressure tensor', ++ x 39x,'r.m.s. fluctuations ',/)") ++ ++ do i=iadd,iadd+6,3 ++ write(nrite,'(9x,1p,3e12.4,24x,3e12.4)') ++ x (sumval(i+j),j=1,3),(ssqval(i+j),j=1,3) ++ enddo ++ iadd=iadd+9 ++ ++ write(nrite,'(/,12x,a,1p,e12.4)') 'trace/3. ', ++ x (sumval(iadd)+sumval(iadd-4)+sumval(iadd-8))/3.d0 ++ ++c write out mean cell vectors for npt ++ ++ if(keyens.gt.3.and.(keyens.le.7))then ++ ++ write(nrite,"(/,/,17x,'Average cell vectors', ++ x 41x,'r.m.s. fluctuations ',/)") ++ ++ do i=iadd,iadd+6,3 ++ write(nrite,'(3f20.10,9x,1p,3e12.4)') ++ x (sumval(i+j),j=1,3),(ssqval(i+j),j=1,3) ++ enddo ++ iadd=iadd+9 ++ ++ endif ++ ++c write out remaining registers ++ ++ check=.false. ++ do i=iadd+1,mxnstk ++ ++ if((abs(sumval(i)).gt.1.d-10).or. ++ x (abs(ssqval(i)).gt.1.d-10)) check=.true. ++ ++ enddo ++ ++ if(check)then ++ ++ write(nrite,"(/,/,12x, ++ x 'Remaining non-zero statistics registers ',/,/,12x, ++ x 'Register',7x,'Average value',8x,'r.m.s. fluc.')") ++ ++ do i=iadd+1,mxnstk ++ ++ if((abs(sumval(i)).gt.1.d-10).or. ++ x (abs(ssqval(i)).gt.1.d-10)) ++ x write(nrite,'(10x,i10,2f20.10)') i,sumval(i),ssqval(i) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c print out sample of final configuration ++ ++ write(nrite,"(/,/,1x,'sample of final configuration',/)") ++ write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', ++ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',7x,'fx(i)',7x, ++ x 'fy(i)',7x,'fz(i)',/,/)") ++ io=(natms+19)/20 ++ ++ do i=1,natms,io ++ ++ write(nrite,"(1x,i6,1p,3e12.4,3e12.4,3e12.4)") ++ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i), ++ x fxx(i),fyy(i),fzz(i) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c bypass printing averages for certain tad and bpd options ++ ++ if(goprint)then ++ ++c average volume ++ ++ avvol=sumval(19) ++ if(imcon.eq.0.or.imcon.eq.6)then ++ avvol=4.d0*pi/3.d0*rcut**3 ++ volm=avvol ++ endif ++ ++c calculate and print radial distribution functions ++ ++ if(lgofr.and.lpgr.and.(numrdf.gt.0))then ++ ++c scale densities for average volume ++ ++ do i=1,ntpatm ++ dens(i)=dens(i)*(volm/avvol) ++ enddo ++ ++ call rdf1 ++ x (lpgr,idnode,mxnode,ntpatm,numrdf,avvol,rcut) ++ ++ endif ++ ++ if(lzden.and.lpgr.and.(nzden.gt.0))then ++ call zden1(lpgr,idnode,mxnode,ntpatm,nzden,avvol,zlen) ++ endif ++ ++ if(imcon.eq.0)volm=0.d0 ++ ++ endif ++ ++c print final time check ++ ++ call timchk(1,timelp) ++ ++ return ++ end subroutine result ++ ++ subroutine diffsn0(idnode,natms,mxnode,tstep) ++ ++c*********************************************************************** ++c ++c DL_POLY routine for calculating displacements of sites from ++c t=0 positions ++c ++c use diffsn1 for mean squared displacements ++c ++c parallel version - replicated data. ++c ++c copyright daresbury laboratory 1993 ++c ++c author - t. forester june 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,natms,mxnode,iatm1,iatm2,i ++ real(8) tstep ++ ++ save newjob,iatm1,iatm2 ++ data newjob/.true./ ++ ++ if(newjob)then ++ ++ newjob=.false. ++ iatm1=(idnode*natms)/mxnode+1 ++ iatm2=((idnode+1)*natms)/mxnode ++ ++ endif ++ ++ do i=iatm1,iatm2 ++ ++ xx0(i)=xx0(i)+vxx(i)*tstep ++ yy0(i)=yy0(i)+vyy(i)*tstep ++ zz0(i)=zz0(i)+vzz(i)*tstep ++ ++ enddo ++ ++ return ++ end subroutine diffsn0 ++ ++ subroutine diffsn1(idnode,natms,ntpatm,mxnode) ++ ++c*********************************************************************** ++c ++c DL_POLY routine for calculating mean squared displacements ++c ++c displacements calculated in diffsn0 ++c ++c parallel version - replicated data. ++c ++c copyright daresbury laboratory 1993 ++c ++c author - t. forester june 1993 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,natms,ntpatm,mxnode,iatm1,iatm2,k,i ++ ++ save newjob,iatm1,iatm2 ++ ++ data newjob/.true./ ++ ++ if(newjob)then ++ ++ newjob=.false. ++ iatm1=(idnode*natms)/mxnode+1 ++ iatm2=((idnode+1)*natms)/mxnode ++ ++ endif ++ ++c running sum of squared displacements ++ ++ do k=1,ntpatm ++ ++ amsd(k)=0.d0 ++ ++ enddo ++ ++c calculate square of displacements for each atom type ++ ++ do i=iatm1,iatm2 ++ ++ k=ltype(i) ++ amsd(k)=amsd(k)+xx0(i)**2+yy0(i)**2+zz0(i)**2 ++ ++ enddo ++ ++c global sum - replicated data strategy ++ ++ if(mxnode.gt.1)then ++ ++ do k=1,ntpatm ++ ++ buffer(k+ntpatm)=amsd(k) ++ ++ enddo ++ ++ call gdsum(buffer(1+ntpatm),ntpatm,buffer(1)) ++ ++ do k=1,ntpatm ++ ++ amsd(k)=buffer(k+ntpatm) ++ ++ enddo ++ ++ endif ++ ++c mean squared displacement ++ ++ do k=1,ntpatm ++ ++ amsd(k)=amsd(k)/dble(max(numtyp(k),1)) ++ ++ enddo ++ ++ return ++ end subroutine diffsn1 ++ ++ subroutine rdf0(iatm,ik,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for accumulating statistic for radial ++c distribution functions. ++c double precision accumulators ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer iatm,ik,m,jatm,ll,k ++ real(8) rcut,rcsq,rdelr,ai,aj,rsq,rrr ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut*rcut ++ ++c grid interval for rdf tables ++ ++ rdelr=dble(mxrdf)/rcut ++ ++c set up atom iatm type ++ ++ ai=ltype(iatm) ++ ++c start of primary loop for rdf accumulation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ jatm=ilist(m) ++ ++ aj=ltype(jatm) ++ if(ai.gt.aj)then ++ k=int(ai*(ai-1.d0)*0.5d0+aj+0.5d0) ++ else ++ k=int(aj*(aj-1.d0)*0.5d0+ai+0.5d0) ++ endif ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ ll=int(rrr*rdelr+0.999999d0) ++ ++c accumulate statistics ++ ++ if(ll.le.mxrdf)rdf(ll,k)=rdf(ll,k)+1.d0 ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine rdf0 ++ ++ subroutine rdf1 ++ x (lpgr,idnode,mxnode,ntpatm,numrdf,volm,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating radial distribution functions ++c from accumulated data. ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,ntpatm,numrdf,ia,ib,k,j ++ real(8) volm,factor,sum,rrr,dvol,gofr,rcut,delrdf ++ ++ logical lpgr,zero ++ ++ if(idnode.eq.0) write(nrite, ++ x "(/,/,12X,'RADIAL DISTRIBUTION FUNCTIONS',/,/, ++ x 'calculated using ',i10,' configurations')") numrdf ++ ++ if(lpgr)then ++ ++c open RDF file and write headers ++ ++ if(idnode.eq.0)then ++ ++ open(nrdfdt,file='RDFDAT') ++ ++ write(nrdfdt,'(80a1)')cfgname ++ write(nrdfdt,'(2i10)')mxxtyp,mxrdf ++ ++ endif ++ ++c default bin width ++ ++ delrdf=rcut/dble(mxrdf) ++ ++c construct rdf tables ++ ++ do ia=1,ntpatm ++ ++ do ib=ia,ntpatm ++ ++ k=(ib*(ib-1))/2+ia ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,'g(r) :',2a8,/,/,8x,'r',6x,'g(r)',9x,'n(r)',/)") ++ x unqatm(ia),unqatm(ib) ++ write(nrdfdt,'(2a8)')unqatm(ia),unqatm(ib) ++ ++ endif ++ ++c global sum of data on all nodes ++ ++ if(mxnode.gt.1) call gdsum(rdf(1,k),mxrdf,buffer) ++ ++c normalisation factor ++ ++ factor=volm*dens(ia)*dens(ib)*dble(numrdf) ++ if((ia.eq.ib).and.(volm*dens(ia).gt.1.d0)) ++ x factor=factor*0.5d0 ++ ++c running integration of rdf ++ ++ sum=0.d0 ++ ++c loop over distances ++ ++ zero=.true. ++ ++ do j=1,mxrdf ++ ++ if(zero.and.(j.lt.mxrdf-3)) ++ x zero=(rdf(j+2,k).le.0.d0) ++ ++ rrr=(dble(j)-0.5d0)*delrdf ++ dvol=4.d0*pi*(delrdf*rrr*rrr+(delrdf**3)/12.d0) ++ ++ gofr=rdf(j,k)/(factor*dvol) ++ sum=sum+gofr*dvol*dens(ib) ++ ++c print out information ++ ++ if(idnode.eq.0)then ++ ++ write(nrdfdt,"(1p,2e14.6)")rrr,gofr ++ if(.not.zero) ++ x write(nrite,"(f10.4,1p,2e14.6)")rrr,gofr,sum ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ if(idnode.eq.0)close (nrdfdt) ++ ++ endif ++ ++ return ++ end subroutine rdf1 ++ ++ subroutine static ++ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for accumulating periodic data during the ++c molecular dynamics simulation and computing the rolling averages ++c ++c copyright daresbury laboratory 1992 ++c ++c author - w. smith august 1992 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lbpd,lzeql,newjob ++ integer idnode,intsta,imcon,keyens,natms,nstack,nstep,j ++ integer nsteql,ntpatm,numacc,mxnode,i,iadd,k,kstak ++ integer nblock,keybpd,numbpd ++ real(8) consv,degfre,degrot,engang,engbnd,engcpe,engdih ++ real(8) enginv,engke,engrot,engsrp,engunit,engcfg,stpeng ++ real(8) stpeth,stpprs,stptmp,stpvir,stpvol,tstep,virbnd ++ real(8) engfbp,vircom,vircon,vircpe,virsrp,engfld,virfld ++ real(8) engtbp,virtbp,virpmf,virshl,engshl,engtet,virtet ++ real(8) degshl,shlke,virang,width,sclnv1,sclnv2,stprot ++ real(8) stpcns,stpshl,zistk,engmet,virmet,engter,virter ++ real(8) tbold,aterm,bterm,cterm,boost,tboost ++ ++ save newjob ++ ++ data newjob/.true./ ++ ++c open statistics file for append ++ ++ if(newjob.and.idnode.eq.0.and.intsta.gt.0)then ++ ++ open(nstats,file='STATIS',position='append') ++ newjob=.false. ++ ++ endif ++ ++ if(idnode.eq.0.and.nstep.eq.intsta.and.intsta.gt.0)then ++ ++ write(nstats,'(80a1)') cfgname ++ if(abs(engunit-9648.530821d0).le.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=electron Volts ')") ++ if(abs(engunit-9648530.821d0).le.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=kilo electron Volts ')") ++ if(abs(engunit-418.4d0).le.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=kcal/mol ')") ++ if(abs(engunit-1.d2).le.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=kjoule/mol ')") ++ if(abs(engunit-boltz).lt.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=kelvin ')") ++ if(abs(engunit-1.d0).lt.1.d-10) write(nstats, ++ x "(' ENERGY UNITS=DL_POLY Internal Units ')") ++ ++ endif ++ ++c calculate cell volume and minimum cell half-width ++ ++ if(imcon.eq.0)then ++ ++ width=0.d0 ++ ++ stpvol=0.d0 ++ do i=1,10 ++ celprp(i)=0.d0 ++ enddo ++ ++ else ++ ++ call dcell(cell,celprp) ++ stpvol=celprp(10) ++ width=min(celprp(7),celprp(8),celprp(9))/2.d0 ++ ++ if(imcon.eq.4)then ++ ++ stpvol=0.5d0*celprp(10) ++ width=sqrt(3.d0)*cell(1)/4.d0 ++ ++ elseif(imcon.eq.5)then ++ ++ stpvol=0.5d0*celprp(10) ++ width=cell(1)/2.d0 ++ ++ elseif(imcon.eq.6)then ++ ++ width=min(celprp(7),celprp(8))/2.d0 ++ ++ elseif(imcon.eq.7)then ++ ++ stpvol=0.5d0*celprp(10) ++ ++ endif ++ ++ endif ++ ++c energetic properties of system ++ ++ stpvir=virsrp+vircpe+virbnd+vircon+vircom+virtbp+virang ++ x +virshl+virtet+virter+virmet+virfld ++ stpeng=engcfg+engke+engrot ++ stprot=2.d0*engrot/(boltz*max(1.d0,degrot)) ++ stpshl=2.d0*shlke/(boltz*max(1.d0,degshl)) ++ stptmp=2.d0*(engke+engrot)/(boltz*degfre) ++ stpprs=0.d0 ++ if(imcon.gt.0)stpprs=(2.d0*engke-stpvir)/(3.d0*stpvol) ++ stpeth=stpeng+stpprs*stpvol ++ stpcns=stpeng+consv ++ ++c convert pressure to units of katm ++ ++ stpprs=stpprs*prsunt ++ ++c calculate mean squared displacements ++c atomic displacements from origin of production run ++ ++ if((.not.lzeql).or.(nstep.gt.nsteql))then ++ ++ call diffsn0(idnode,natms,mxnode,tstep) ++ call diffsn1(idnode,natms,ntpatm,mxnode) ++ ++ endif ++ ++c zero statistics arrays ++ ++ if((nstep.le.0).or.(numacc.eq.0))then ++ ++ numacc=0 ++ ++ do i=1,mxnstk ++ ++ stpval(i)=0.d0 ++ sumval(i)=0.d0 ++ ssqval(i)=0.d0 ++ ++ enddo ++ ++ do i=1,mxatms ++ ++ xx0(i)=0.d0 ++ yy0(i)=0.d0 ++ zz0(i)=0.d0 ++ ++ enddo ++ ++ endif ++ ++c store current values in statistics array ++ ++ stpval(1) =stpcns/engunit ++ stpval(2) =stptmp ++ stpval(3) =engcfg/engunit ++ stpval(4) =(engsrp+engmet+engter)/engunit ++ stpval(5) =engcpe/engunit ++ stpval(6) =engbnd/engunit ++ stpval(7) =(engang+engtbp)/engunit ++ stpval(8) =(engdih+enginv+engfbp)/engunit ++ stpval(9) =engtet/engunit ++ stpval(10)=stpeth/engunit ++ stpval(11)=stprot ++ stpval(12)=stpvir/engunit ++ stpval(13)=(virsrp+virmet+virter)/engunit ++ stpval(14)=vircpe/engunit ++ stpval(15)=virbnd/engunit ++ stpval(16)=(virtbp+virang)/engunit ++ stpval(17)=vircon/engunit ++ stpval(18)=virtet/engunit ++ stpval(19)=stpvol ++ stpval(20)=stpshl ++ stpval(21)=engshl/engunit ++ stpval(22)=virshl/engunit ++ stpval(23)=acos(celprp(6))*180.d0/pi ++ stpval(24)=acos(celprp(5))*180.d0/pi ++ stpval(25)=acos(celprp(4))*180.d0/pi ++ stpval(26)=virpmf/engunit ++ stpval(27)=stpprs ++ ++ iadd=27 ++ ++c mean squared displacements ++ ++ if((.not.lzeql).or.(nstep.gt.nsteql))then ++ ++ do k=1,ntpatm ++ ++ stpval(iadd+k)=amsd(k) ++ ++ enddo ++ ++ endif ++ ++ iadd=iadd+ntpatm ++ ++c stress tensor ++ ++ if(abs(stpvol).le.1.d-10) stpvol=1.d0 ++ do i=1,9 ++ stpval(iadd+i)=stress(i)*prsunt/(stpvol) ++ enddo ++ iadd=iadd+9 ++ ++c cell vectors ++ ++ if(keyens.gt.3.and.(keyens.le.7))then ++ do i=1,9 ++ stpval(iadd+i)=cell(i) ++ enddo ++ iadd=iadd+9 ++ endif ++ ++c check on number of variables for stack - ++ ++ if(iadd.gt.mxnstk) call error(idnode,170) ++ ++c accumulate totals over steps ++ ++ numacc=numacc+1 ++ sclnv2=1.d0/dble(numacc) ++ sclnv1=dble(numacc-1)/dble(numacc) ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++c calculate true thermodynamic averages in bias potential system ++c note integers numacc and numbpd should be equal in this case ++ ++ tbold=tboost*dble(numbpd)/dble(numbpd-1)-boost/dble(numbpd-1) ++ cterm=0.d0 ++ do i=1,mxnstk ++ ++ aterm=sumval(i)*tbold ++ bterm=ssqval(i)*tbold**2 ++ if(tbold.gt.0.d0)cterm=(bterm+aterm**2)/tbold ++ ssqval(i)=(sclnv1*(sclnv1*bterm+boost*sclnv2*(cterm+ ++ x (tbold*stpval(i)-2.d0*aterm)*stpval(i))))/tboost**2 ++ sumval(i)=(sclnv1*aterm+boost*sclnv2*stpval(i))/tboost ++ ++ enddo ++ ++ else ++ ++c calculate true thermodynamic averages in normal system ++ ++ do i=1,mxnstk ++ ++ ssqval(i)=sclnv1*(ssqval(i)+sclnv2*(stpval(i)-sumval(i))**2) ++ sumval(i)=sclnv1*sumval(i)+sclnv2*stpval(i) ++ ++ enddo ++ ++ endif ++ ++c write statistics file ++ ++ if(idnode.eq.0.and.intsta.gt.0)then ++ ++ if(mod(nstep,intsta).eq.0)then ++ ++ write(nstats,'(i10,1p,e14.6,0p,i10,/,(1p,5e14.6))') ++ x nstep,nstep*tstep,iadd,(stpval(k),k=1,iadd) ++ call flush(nstats) ++c$$$c write option for Excel spreadsheet ++c$$$ write(nstats,'(i10,1p,e14.6,0p,i10,300(1p,5e14.6))') ++c$$$ x nstep,nstep*tstep,iadd,(stpval(k),k=1,iadd) ++ ++ endif ++ ++ endif ++ ++c zero rolling average accumulators ++ ++ if(nstep.le.0)then ++ ++ numacc=0 ++ ++ do i=1,mxnstk ++ ++ zumval(i)=0.d0 ++ ++ do j=1,mxstak ++ ++ stkval(j,i)=0.d0 ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c store quantities in stack ++ ++ kstak=mod(nstep-1,nstack)+1 ++ ++ if(nstep.gt.nstack)then ++ ++ do i=1,mxnstk ++ ++ zumval(i)=zumval(i)-stkval(kstak,i) ++ ++ enddo ++ ++ endif ++ ++ do i=1,mxnstk ++ ++ stkval(kstak,i)=stpval(i) ++ zumval(i)=zumval(i)+stpval(i) ++ ++ enddo ++ ++c calculate rolling averages ++ ++ zistk=min(nstack,nstep) ++ ++ do i=1,mxnstk ++ ++ ravval(i)=zumval(i)/zistk ++ ++ enddo ++ ++c zero accumulators during equilibration period ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numacc=0 ++ do i=1,mxnstk ++ ++ sumval(i)=0.d0 ++ ssqval(i)=0.d0 ++ ++ enddo ++ ++ endif ++ ++c close statistics file at regular intervals ++ ++ if(.not.newjob.and.mod(nstep,ndump).eq.0)then ++ ++ if(idnode.eq.0)close (nstats) ++ newjob=.true. ++ ++ endif ++ ++ return ++ end subroutine static ++ ++ subroutine revive ++ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, ++ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, ++ x tboost,chit_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing restart files at job termination ++c or at selected intervals in simulation ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith dec 1992. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lgofr,lzden ++ integer idnode,imcon,mxnode,natms,nstep,nzden,numacc,numrdf ++ integer levcfg,nsum,nbuff,i,j ++ real(8) chip,chit,conint,tstep,engcfg,rmxnode,virtot,vircom ++ real(8) tboost,chit_shl ++ ++ if(mxnode.gt.1)then ++ ++c merge displacement data ++ ++ call merge(idnode,mxnode,natms,mxbuff,xx0,yy0,zz0,buffer) ++ ++c globally sum rdf information before saving ++ ++ if(lgofr)then ++ ++c maximum rdfs that can be summed in each step ++ ++ nsum=mxbuff/mxrdf ++ if(nsum.eq.0) call error(idnode,200) ++ ++ nbuff=nsum*mxrdf ++ ++ do i=1,mxxtyp,nsum ++ ++ if((mxxtyp+1-i).lt.nsum) nbuff=(mxxtyp+1-i)*mxrdf ++ call gdsum(rdf(1,i),nbuff,buffer) ++ ++ enddo ++ ++ endif ++ ++c globally sum zden information before saving ++ ++ if(lzden)then ++ ++c maximum zdfs that can be summed in each step ++ ++ nsum=mxbuff/mxzdn ++ if(nsum.eq.0) call error(idnode,200) ++ ++ nbuff=nsum*mxzdn ++ ++ do i =1,mxatyp,nsum ++ ++ if((mxatyp+1-i).lt.nsum) nbuff=(mxatyp+1-i)*mxzdn ++ call gdsum(zdens(1,i),nbuff,buffer) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c node 0 handles i/o ++ ++ if(idnode.eq.0)then ++ ++c write configuration data to new configuration file ++ ++ call config_write('REVCON',levcfg,imcon,natms,engcfg) ++ ++c write accumulator data to dump file ++ ++ open(nrest,file='REVIVE',form='unformatted') ++ ++ write(nrest) dble(nstep),dble(numacc),dble(numrdf),chit, ++ x chip,conint,dble(nzden),tboost,chit_shl ++ write(nrest) virtot,vircom,eta,strcns,strbod ++ write(nrest) stpval ++ write(nrest) sumval ++ write(nrest) ssqval ++ write(nrest) zumval ++ write(nrest) ravval ++ write(nrest) stkval ++ write(nrest) xx0,yy0,zz0 ++ write(nrest) xxs,yys,zzs ++ if(lgofr) write(nrest) rdf ++ if(lzden) write(nrest) zdens ++ ++ close (nrest) ++ ++ endif ++ ++c divide rdf data between nodes ++ ++ rmxnode=1.d0/dble(mxnode) ++ ++ if(lgofr)then ++ ++ do i=1,mxxtyp ++ ++ do j=1,mxrdf ++ ++ rdf(j,i)=rdf(j,i)*rmxnode ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++c divide zdensity data between nodes ++ ++ if(lzden)then ++ ++ do i=1,mxatyp ++ ++ do j=1,mxzdn ++ ++ zdens(j,i)=zdens(j,i)*rmxnode ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine revive ++ ++ subroutine zden0(idnode,natms,mxnode,nzden,zlen) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for accumulating statistic for density profile ++c zlen=length of cell in z direction ++c ++c double precision accumulators ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nzden,iatm,ll,k ++ real(8) zlen,zleno2,rzdn ++ ++c accumulator ++ ++ nzden=nzden+1 ++ ++c half of z length ++ ++ zleno2=zlen*0.5d0 ++ ++c grid interval for density profiles ++ ++ rzdn=dble(mxzdn)/zlen ++ ++c set up atom iatm type ++ ++ do iatm=idnode+1,natms,mxnode ++ ++ k =ltype(iatm) ++ ++ ll=int((zzz(iatm)+zleno2)*rzdn+1.0d0) ++ ++c accumulate statistic ++ ++ if(ll.gt.0.and.ll.le.mxzdn)zdens(ll,k)=zdens(ll,k)+1.d0 ++ ++ enddo ++ ++ return ++ end subroutine zden0 ++ ++ subroutine zden1 ++ x (lpgr,idnode,mxnode,ntpatm,nzden,volm,zlen) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating Z density profile ++c from accumulated data. ++c double precision version ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lpgr ++ integer idnode,mxnode,ntpatm,nzden,k,j ++ real(8) volm,zlen,delzdn,dvolz,factor,sum,rrr,rho ++ ++ if(idnode.eq.0) write(nrite, ++ x "(/,/,12X,'Z DENSITY PROFILES',/,/, ++ x 'calculated using ',i10,' configurations')") nzden ++ ++ if(lpgr)then ++ ++c open Z density file and write headers ++ ++ if(idnode.eq.0)then ++ ++ open(nzdndt,file='ZDNDAT') ++ ++ write(nzdndt,'(80a1)')cfgname ++ write(nzdndt,'(2i10)')ntpatm,mxzdn ++ ++ endif ++ ++c volume of z strip (arbitrary) ++ ++ delzdn=zlen/dble(mxzdn) ++ dvolz=(volm/zlen)*delzdn ++ ++c normalisation factor ++ ++ nzden=max(nzden,1) ++ factor=1.d0/(dble(nzden)*dvolz) ++ ++ do k=1,ntpatm ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,'rho(r) :',a8,/,/,8x,'r',6x,'rho',9x,'n(r)',/)") ++ x unqatm(k) ++ write(nzdndt,'(a8)')unqatm(k) ++ ++ endif ++ ++c global sum of data on all nodes ++ ++ if(mxnode.gt.1)call gdsum(zdens(1,k),mxzdn,buffer) ++ ++c running integration of z-density ++ ++ sum=0.d0 ++ ++c loop over distances ++ ++ do j=1,mxzdn ++ ++ rrr=(dble(j)-0.5d0)*delzdn-zlen*0.5d0 ++ rho=zdens(j,k)*factor ++ sum=sum+rho*dvolz ++ ++c print out information ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(f10.4,1p,2e14.6)") rrr,rho,sum ++ write(nzdndt,"(1p,2e14.6)") rrr,rho ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ if(idnode.eq.0)close (nzdndt) ++ ++ endif ++ ++ return ++ end subroutine zden1 ++ ++ subroutine rdf0neu(ik,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for accumulating statistic for radial ++c distribution functions. ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1994 ++c author - t. forester march 1994 ++c amended t. forester april 1994 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer ik,m,iatm,jatm,ll,k ++ real(8) rcut,a0,a1,a2,a3,a4,a5,rcsq,rrcsq,sqlim,rdelr ++ real(8) ai,aj,rsq,rrr,sss ++ ++ data a0,a1,a2,a3,a4,a5/.0837557783d0,2.9399054d0,-7.8475201d0, ++ x 14.1328992d0,-12.6228528d0,4.32084948d0/ ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ rrcsq=1.d0/rcsq ++ sqlim=0.01d0*rcsq ++ ++c grid interval for rdf tables ++ ++ rdelr=dble(mxrdf)/rcut ++ ++c start of primary loop for rdf accumulation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ iatm=ilist(m) ++ ai=ltype(iatm) ++ ++ jatm=jlist(m) ++ aj=ltype(jatm) ++ ++ if(ai.gt.aj)then ++ ll=int(ai*(ai-1.d0)*0.5d0+aj+0.5d0) ++ k=lstvdw(ll) ++ else ++ ll=int(aj*(aj-1.d0)*0.5d0+ai+0.5d0) ++ k=lstvdw(ll) ++ endif ++ ++ rsq=rsqdf(m) ++ ++ if(rcsq.gt.rsq)then ++ ++c determine interpolation panel for rdf table ++ ++ if(rsq.lt.sqlim)then ++ ++ rrr=sqrt(rsq) ++ ++ else ++ ++c interpolate square-root by polynomial plus newton-raphson ++ ++ sss=rsq*rrcsq ++ rrr=1.d0/ ++ x (a0 +sss*(a1+sss*(a2+sss*(a3+sss*(a4+sss*a5))))) ++ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr) ++ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr) ++ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr)*sss*rcut ++ ++ endif ++ ++ ll=int(rrr*rdelr+0.999999d0) ++ ++c accumulate statistics ++ ++ rdf(ll,k)=rdf(ll,k)+1.d0 ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine rdf0neu ++ ++ end module property_module +diff -urN dl_class_1.9.orig/srcmod/rigid_body_module.f dl_class_1.9/srcmod/rigid_body_module.f +--- dl_class_1.9.orig/srcmod/rigid_body_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/rigid_body_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,243 @@ ++ module rigid_body_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining rigid body arrays ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use parse_module ++ use setup_module ++ use site_module ++ use solvation_module ++ ++ implicit none ++ ++ real(8), allocatable :: omx(:),omy(:),omz(:) ++ real(8), allocatable :: gcmx(:),gcmy(:),gcmz(:) ++ real(8), allocatable :: gvxx(:),gvyy(:),gvzz(:),gmass(:) ++ real(8), allocatable :: q0(:),q1(:),q2(:),q3(:) ++ real(8), allocatable :: gxx(:,:),gyy(:,:),gzz(:,:) ++ real(8), allocatable :: rotinx(:,:),rotiny(:,:),rotinz(:,:) ++ integer, allocatable :: lstrgd(:),numgsit(:),lstgtp(:) ++ integer, allocatable :: listyp(:),lstgst(:,:),lstfre(:) ++ integer, allocatable :: lstme(:),lstbod(:),lstcsit(:) ++ ++ save omx,omy,omz,gcmx,gcmy,gcmz,gvxx,gvyy,gvzz,gmass ++ save q0,q1,q2,q3,gxx,gyy,gzz,rotinx,rotiny,rotinz ++ save lstrgd,numgsit,lstgtp,listyp,lstgst,lstfre,lstme ++ save lstbod,lstcsit ++ ++ contains ++ ++ subroutine alloc_rgbdy_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (omx(mxgrp),omy(mxgrp),omz(mxgrp),stat=fail(1)) ++ allocate (gcmx(mxgrp),gcmy(mxgrp),gcmz(mxgrp),stat=fail(2)) ++ allocate (gvxx(mxgrp),gvyy(mxgrp),gvzz(mxgrp),stat=fail(3)) ++ allocate (q0(mxgrp),q1(mxgrp),q2(mxgrp),q3(mxgrp),stat=fail(4)) ++ allocate (gxx(mxungp,mxngp),gyy(mxungp,mxngp),stat=fail(5)) ++ allocate (gzz(mxungp,mxngp),gmass(mxungp),stat=fail(6)) ++ allocate (rotinx(mxungp,2),rotiny(mxungp,2),stat=fail(7)) ++ allocate (rotinz(mxungp,2),lstgtp(mxgrp),stat=fail(8)) ++ allocate (lstrgd(mxgatm),numgsit(mxungp),stat=fail(9)) ++ allocate (listyp(mxungp),lstgst(mxungp,mxngp),stat=fail(10)) ++ allocate (lstfre(mxatms),lstme(mxatms),stat=fail(11)) ++ allocate (lstbod(mxatms),lstcsit(2*mxcons),stat=fail(12)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1013) ++ enddo ++ ++ end subroutine alloc_rgbdy_arrays ++ ++ subroutine define_rigid_body ++ x (safe,lghost,idnode,itmols,ngrp,natmsr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining rigid bodies ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c adapted - p-a cazade oct 2007, solvation, excitation etc. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lghost,site_test ++ integer idnode,itmols,ngrp,ntmp,idum,igrp ++ integer j,site,natmsr ++ ++ ngrp_ghost=0 ++ ntmp=intstr(record,lenrec,idum) ++ numgrp(itmols)=numgrp(itmols)+ntmp ++ if(idnode.eq.0) then ++ write(nrite,"(/,1x,'number of rigid units ', ++ x 6x,i10)") ntmp ++ write(nrite,"(/,' rigid body details:',/,/,21x, ++ x 6x,'unit',3x,'indices',/) ") ++ endif ++ ++ do igrp=1,numgrp(itmols) ++ ++ ngrp=ngrp+1 ++ site_test=.true. ++ ++ if(ngrp.gt.mxungp) call error(idnode,301) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ numgsit(ngrp)=intstr(record,lenrec,idum) ++ if(numgsit(ngrp).gt.mxngp) ++ x call error (idnode,302) ++ ++ listyp(ngrp)=ngrp ++ ++ do j=1,numgsit(ngrp) ++ ++ site=intstr(record,lenrec,idum) ++ ++ if(site.eq.0)then ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ site=intstr(record,lenrec,idum) ++ ++ endif ++ ++ lstgst(ngrp,j)=site ++ ++ if(lghost)then ++ ++ if(site_test)then ++ ++ if(site+natmsr.ge.ind_fre(3))then ++ ++ site_test=.false. ++ ngrp_ghost=ngrp_ghost+1 ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0) ++ x write(nrite,"(21x,10i10,100(/,21x,10i10))") ++ x listyp(ngrp),(lstgst(ngrp,j),j=1, ++ x numgsit(ngrp)) ++ ++ enddo ++ ++ numgrp(itmols)=numgrp(itmols)-ngrp_ghost ++ ngrp=ngrp-ngrp_ghost ++ ++ return ++ end subroutine define_rigid_body ++ ++ subroutine bodystress ++ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c*********************************************************************** ++c ++c dlpoly routine to calculate rigid body contributions to the ++c stress tensor ++c ++c copyright daresbury laboratory ++c author w.smith aug 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i,j,ig,id,jr,igrp1,igrp2,idnode,mxnode,ngrp ++ real(8) vircom,strbod,dtx,dty,dtz ++ ++ dimension dtx(mxatms),dty(mxatms),dtz(mxatms),strbod(9) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c zero stress tensor accumulators ++ ++ vircom=0.d0 ++ do i=1,9 ++ strbod(i)=0.d0 ++ enddo ++ ++c convert atomic virial to molecular ++c note convention: virial(atom-atom)=-sum(Ri.Fi) ++c : virial(com-com)=-sum(Rcom.Fcom) so ++c virial(com-com)=virial(atom-atom)+sum((Ri-Rcom).Fi) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ vircom=vircom+ ++ x (dtx(jr)*fxx(i)+dty(jr)*fyy(i)+dtz(jr)*fzz(i)) ++ ++c stress tensor : rigid body contributions ++ ++ strbod(1)=strbod(1)-dtx(jr)*fxx(i) ++ strbod(2)=strbod(2)-dtx(jr)*fyy(i) ++ strbod(3)=strbod(3)-dtx(jr)*fzz(i) ++ strbod(4)=strbod(4)-dty(jr)*fxx(i) ++ strbod(5)=strbod(5)-dty(jr)*fyy(i) ++ strbod(6)=strbod(6)-dty(jr)*fzz(i) ++ strbod(7)=strbod(7)-dtz(jr)*fxx(i) ++ strbod(8)=strbod(8)-dtz(jr)*fyy(i) ++ strbod(9)=strbod(9)-dtz(jr)*fzz(i) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ call gdsum(strbod,9,buffer) ++ buffer(1)=vircom ++ call gdsum(buffer(1),1,buffer(2)) ++ vircom=buffer(1) ++ ++ endif ++ ++c symmetrise stress tensor ++ ++ strbod(2)=0.5d0*(strbod(2)+strbod(4)) ++ strbod(4)=strbod(2) ++ strbod(3)=0.5d0*(strbod(3)+strbod(7)) ++ strbod(7)=strbod(3) ++ strbod(6)=0.5d0*(strbod(6)+strbod(8)) ++ strbod(8)=strbod(6) ++ ++ return ++ end subroutine bodystress ++ ++ end module rigid_body_module +diff -urN dl_class_1.9.orig/srcmod/serial.f dl_class_1.9/srcmod/serial.f +--- dl_class_1.9.orig/srcmod/serial.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/serial.f 2015-11-16 17:18:13.452475827 +0100 +@@ -0,0 +1,543 @@ ++ subroutine initcomms() ++ ++c********************************************************************* ++c ++c dummy initcomms routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ return ++ end ++ ++ integer*8 function get_comms() ++c********************************************************************* ++c ++c dummy machine routine for serial DL_POLY with PLUMED ++c ++c******************************************************************** ++ ++ implicit none ++ ++ get_comms=0 ++ ++ return ++ end ++ ++ subroutine machine(idnode,mxnode) ++ ++c********************************************************************* ++c ++c dummy machine routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode ++ ++ idnode=0 ++ mxnode=1 ++ ++ return ++ end ++ ++ integer function mynode() ++ ++c********************************************************************* ++c ++c dummy mynode routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ mynode=0 ++ ++ return ++ end ++ ++ integer function nodedim() ++ ++c********************************************************************* ++c ++c dummy nodedim routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ nodedim=0 ++ ++ return ++ end ++ ++ integer function numnodes() ++ ++c********************************************************************* ++c ++c dummy numnodes routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ numnodes=1 ++ ++ return ++ end ++ ++ subroutine csend(msgtag,buf,length,pe,idum) ++ ++c********************************************************************* ++c ++c dummy csend routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ integer msgtag,length,pe,idum ++ ++ real(8) buf(*) ++ ++ return ++ end ++ ++ subroutine crecv(msgtag,buf,length) ++ ++c********************************************************************* ++c ++c dummy crecv routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer msgtag,length ++ real(8) buf(*) ++ ++ return ++ end ++ ++ subroutine gisum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy isum for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ integer aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gdsum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ real(8) aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gimax(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ integer aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gstate(check) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical check ++ ++ return ++ end ++ ++ subroutine gsync() ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ return ++ end ++ ++ subroutine exitcomms() ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ stop ++ end ++ ++ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ implicit none ++ ++ integer idnode,mxnode,natms,nbuff ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms ++ integer lstme(*) ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ngrp,nbuff ++ real(8) q0(*),q1(*),q2(*),q3(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine shlmerge(idnode,mxnode,ntshl) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl ++ ++ return ++ end ++ ++ subroutine shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode, mxnode, natms ++ integer lishap(*),lashap(*) ++ real(8) xxt(*),yyt(*),zzt(*),txx(*),tyy(*),tzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,natms ++ integer listme(*),listot(*) ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ logical lshmov ++ integer idnode,mxnode,natms,nscons,i,j,k ++ integer lashap(mxproc),lishap(mxlshp),listme(mxatms) ++ integer listin(mxatms),listot(mxatms),listcon(mxcons,3) ++ integer lstfrz(mxatms) ++ ++ do i=1,natms ++ listme(i)=0 ++ enddo ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ listme(i)=listme(i)+1 ++ listme(j)=listme(j)+1 ++ ++ enddo ++ ++c keep record of all atoms subject to constraints ++ ++ do i=1,natms ++ ++ if(listme(i).gt.0)then ++ listot(i)=1 ++ else ++ listot(i)=0 ++ endif ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use error_module ++ use setup_module ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nspmf,i,j,k ++ integer listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) ++ integer lstpmf(mxspmf,mspmf),npmf(2) ++ ++ if(mxpmf.lt.natms) call error(idnode,490) ++ ++ do i=1,natms ++ listpm(i)=0 ++ enddo ++ ++ do k=1,nspmf ++ ++ do j = 1,npmf(1)+npmf(2) ++ ++ i=lstpmf(j,k) ++ listpm(i)= 1 ++ ++ enddo ++ ++ enddo ++ ++c keep record of all atoms subject to pmf constraints ++ ++ do i=1,natms ++ ++ if(listpm(i).gt.0)then ++ lstpmt(i)=1 ++ else ++ lstpmt(i)=0 ++ endif ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ logical lcnb ++ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,jj,id,igrp1,igrp2 ++ integer i,j,k,jr,igrp,itmols,imols,ik,lgrp ++ integer listin(mxatms),listcon(mxcons,3),lstrgd(mxgatm) ++ integer lstout(mxatms),lstcsit(2*mxcons),numgsit(mxungp) ++ integer lstgtp(mxgrp),nummols(mxtmls),numgrp(mxtmls) ++ ++c block indices for groups ++ ++ igrp1 = (idnode*ngrp)/mxnode + 1 ++ igrp2 = ((idnode+1)*ngrp)/mxnode ++ ++c locate site indices of atoms in constraints ++ ++ do i = 1,natms ++ listin(i) = 0 ++ enddo ++ ++c loop over molecule types ++ ++ jr = 0 ++ igrp = 0 ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then ++ ++ id = lstgtp(igrp) ++ do jj = 1,numgsit(id) ++ ++ jr = jr +1 ++ i = lstrgd(jr) ++ listin(i) = jj ++ ++ enddo ++ endif ++ enddo ++ enddo ++ enddo ++ ++ lcnb = .true. ++ ik = 0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ if(listin(i).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(i) ++ lcnb = .false. ++ endif ++ ++ if(listin(j).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(j) ++ lcnb = .false. ++ endif ++ ++ enddo ++ ++c lcnb flags bodies connected by constraints ++ ++ lcnb = (.not.lcnb) ++ ++ return ++ end ++ +diff -urN dl_class_1.9.orig/srcmod/serial.f.preplumed dl_class_1.9/srcmod/serial.f.preplumed +--- dl_class_1.9.orig/srcmod/serial.f.preplumed 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/serial.f.preplumed 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,529 @@ ++ subroutine initcomms() ++ ++c********************************************************************* ++c ++c dummy initcomms routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ return ++ end ++ ++ subroutine machine(idnode,mxnode) ++ ++c********************************************************************* ++c ++c dummy machine routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode ++ ++ idnode=0 ++ mxnode=1 ++ ++ return ++ end ++ ++ integer function mynode() ++ ++c********************************************************************* ++c ++c dummy mynode routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ mynode=0 ++ ++ return ++ end ++ ++ integer function nodedim() ++ ++c********************************************************************* ++c ++c dummy nodedim routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ nodedim=0 ++ ++ return ++ end ++ ++ integer function numnodes() ++ ++c********************************************************************* ++c ++c dummy numnodes routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ numnodes=1 ++ ++ return ++ end ++ ++ subroutine csend(msgtag,buf,length,pe,idum) ++ ++c********************************************************************* ++c ++c dummy csend routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c******************************************************************** ++ ++ implicit none ++ ++ integer msgtag,length,pe,idum ++ ++ real(8) buf(*) ++ ++ return ++ end ++ ++ subroutine crecv(msgtag,buf,length) ++ ++c********************************************************************* ++c ++c dummy crecv routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer msgtag,length ++ real(8) buf(*) ++ ++ return ++ end ++ ++ subroutine gisum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy isum for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ integer aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gdsum(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ real(8) aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gimax(aaa,nnn,bbb) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nnn ++ integer aaa(*),bbb(*) ++ ++ return ++ end ++ ++ subroutine gstate(check) ++ ++c*********************************************************************** ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical check ++ ++ return ++ end ++ ++ subroutine gsync() ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ return ++ end ++ ++ subroutine exitcomms() ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ stop ++ end ++ ++ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ implicit none ++ ++ integer idnode,mxnode,natms,nbuff ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,natms ++ integer lstme(*) ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ngrp,nbuff ++ real(8) q0(*),q1(*),q2(*),q3(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine shlmerge(idnode,mxnode,ntshl) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl ++ ++ return ++ end ++ ++ subroutine shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode, mxnode, natms ++ integer lishap(*),lashap(*) ++ real(8) xxt(*),yyt(*),zzt(*),txx(*),tyy(*),tzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,natms ++ integer listme(*),listot(*) ++ real(8) xxx(*),yyy(*),zzz(*),buffer(*) ++ ++ return ++ end ++ ++ subroutine passcon ++ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, ++ x listin,listot,listcon,lstfrz) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ logical lshmov ++ integer idnode,mxnode,natms,nscons,i,j,k ++ integer lashap(mxproc),lishap(mxlshp),listme(mxatms) ++ integer listin(mxatms),listot(mxatms),listcon(mxcons,3) ++ integer lstfrz(mxatms) ++ ++ do i=1,natms ++ listme(i)=0 ++ enddo ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ listme(i)=listme(i)+1 ++ listme(j)=listme(j)+1 ++ ++ enddo ++ ++c keep record of all atoms subject to constraints ++ ++ do i=1,natms ++ ++ if(listme(i).gt.0)then ++ listot(i)=1 ++ else ++ listot(i)=0 ++ endif ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine passpmf ++ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use error_module ++ use setup_module ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,nspmf,i,j,k ++ integer listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) ++ integer lstpmf(mxspmf,mspmf),npmf(2) ++ ++ if(mxpmf.lt.natms) call error(idnode,490) ++ ++ do i=1,natms ++ listpm(i)=0 ++ enddo ++ ++ do k=1,nspmf ++ ++ do j = 1,npmf(1)+npmf(2) ++ ++ i=lstpmf(j,k) ++ listpm(i)= 1 ++ ++ enddo ++ ++ enddo ++ ++c keep record of all atoms subject to pmf constraints ++ ++ do i=1,natms ++ ++ if(listpm(i).gt.0)then ++ lstpmt(i)=1 ++ else ++ lstpmt(i)=0 ++ endif ++ ++ enddo ++ ++ return ++ end ++ ++ subroutine passquat ++ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, ++ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) ++ ++c********************************************************************* ++c ++c dummy routine for serial DL_POLY ++c copyright daresbury laboratory ++c author - w.smith ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ logical lcnb ++ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,jj,id,igrp1,igrp2 ++ integer i,j,k,jr,igrp,itmols,imols,ik,lgrp ++ integer listin(mxatms),listcon(mxcons,3),lstrgd(mxgatm) ++ integer lstout(mxatms),lstcsit(2*mxcons),numgsit(mxungp) ++ integer lstgtp(mxgrp),nummols(mxtmls),numgrp(mxtmls) ++ ++c block indices for groups ++ ++ igrp1 = (idnode*ngrp)/mxnode + 1 ++ igrp2 = ((idnode+1)*ngrp)/mxnode ++ ++c locate site indices of atoms in constraints ++ ++ do i = 1,natms ++ listin(i) = 0 ++ enddo ++ ++c loop over molecule types ++ ++ jr = 0 ++ igrp = 0 ++ do itmols=1,ntpmls ++ ++c loop over molecules in system ++ ++ do imols=1,nummols(itmols) ++ ++c construct rigid body site list: each processor has a different copy ++ ++ do lgrp=1,numgrp(itmols) ++ ++ igrp=igrp+1 ++ ++ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then ++ ++ id = lstgtp(igrp) ++ do jj = 1,numgsit(id) ++ ++ jr = jr +1 ++ i = lstrgd(jr) ++ listin(i) = jj ++ ++ enddo ++ endif ++ enddo ++ enddo ++ enddo ++ ++ lcnb = .true. ++ ik = 0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ if(listin(i).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(i) ++ lcnb = .false. ++ endif ++ ++ if(listin(j).ne.0) then ++ ik = ik + 1 ++ lstcsit(ik) = listin(j) ++ lcnb = .false. ++ endif ++ ++ enddo ++ ++c lcnb flags bodies connected by constraints ++ ++ lcnb = (.not.lcnb) ++ ++ return ++ end ++ +diff -urN dl_class_1.9.orig/srcmod/setup_module.f dl_class_1.9/srcmod/setup_module.f +--- dl_class_1.9.orig/srcmod/setup_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/setup_module.f 2011-07-11 17:09:10.000000000 +0200 +@@ -0,0 +1,1664 @@ ++ module setup_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining default array sizes ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c note the following internal units apply everywhere ++c ++c unit of time (to) = 1 x 10**(-12) seconds ++c unit of length (lo) = 1 x 10**(-10) metres ++c unit of mass (mo) = 1.6605402 x 10**(-27) kilograms ++c unit of charge (qo) = 1.60217733 x 10**(-19) coulombs ++c unit of energy (eo) = 1.6605402 x 10**(-23) joules ++c unit of pressure (po) = 1.6605402 x 10**( 7) pascals ++c ++c********************************************************************* ++ ++ use parse_module ++ ++ implicit none ++ ++c FIXED PARAMETERS ++ ++c standard pi values ++ ++ real(8), parameter :: pi=3.141592653589793d0 ++ real(8), parameter :: sqrpi=1.7724538509055159d0 ++ ++c conversion factor for coulombic terms in internal units ++c i.e. (unit(charge)**2/(4 pi eps0 unit(length))/unit(energy) ++ ++ real(8), parameter :: r4pie0=138935.4835d0 ++ ++c boltzmann constant in internal units ++ ++ real(8), parameter :: boltz=8.31451115d-1 ++ ++c planck's constant in internal units ++ ++ real(8), parameter :: hbar=6.350780719d0 ++ ++c conversion factor for pressure from internal units to katm ++ ++ real(8), parameter :: prsunt=0.163882576d0 ++ ++c main input channel ++ ++ integer, parameter :: nread=5 ++ ++c main output channel ++ ++ integer, parameter :: nrite=6 ++ ++c force field input channel ++ ++ integer, parameter :: nfield=9 ++ ++c configuration file input channel ++ ++ integer, parameter :: nconf=10 ++ ++c statistical data file output channel ++ ++ integer, parameter :: nstats=20 ++ ++c trajectory history file channel ++ ++ integer, parameter :: nhist=21 ++ ++c acummulators restart dump file ++ ++ integer, parameter :: nrest=22 ++ ++c tabulated potential file channel ++ ++ integer, parameter :: ntable=23 ++ ++c rdf file channel number ++ ++ integer, parameter :: nrdfdt=24 ++ ++c z density file channel number ++ ++ integer, parameter :: nzdndt=25 ++ ++c hyperdynamics reference basin file ++ ++ integer, parameter :: nbsn=30 ++ ++c neb reaction path profile file ++ ++ integer, parameter :: npro=31 ++ ++c hyperdynamics events journal file ++ ++ integer, parameter :: nevnt=33 ++ ++c hyperdynamics tracking file ++ ++ integer, parameter :: ntrk=32 ++ ++c hyperdynamics restart file ++ ++ integer, parameter :: nhrs=35 ++ ++c free energy data file ++ ++ integer, parameter :: nfrnwr=41 ++ ++c solvation data file ++ ++ integer, parameter :: nsolwr=43 ++ ++c data dumping interval in event of system crash ++ ++ integer, parameter :: ndump=1000 ++ ++c maximum number of neb calculations ++ ++ integer, parameter :: maxneb=10 ++ ++c array allocation parameters (set by subroutine parset) ++ ++ integer kmaxa,kmaxb,kmaxc,minnode,msatms,msbad,msgrp ++ integer mspmf,msteth,mxangl,mxatms,mxbond,mxbuff,mxcell ++ integer mxcons,mxdihd,mxewld,mxexcl,mxfbp,mxfld,mxgatm,mxgrid ++ integer mxgrp,mxinv,mxlist,mxlshp,mxneut,mxngp,mxnstk,mxpang ++ integer mxpbnd,mxpdih,mxpfbp,mxpinv,mxpmf,mxproc,mxptbp,mxpvdw ++ integer mxrdf,mxzdn,mxshl,mxsite,mxspmf,mxstak,mxtang,mxtbnd ++ integer mxtbp,mxtcon,mxtdih,mxteth,mxtinv,mxtmls,mxtshl,mxungp ++ integer mxvdw,mxxdf,mx2tbp,mx3fbp,mxebuf,mxquat,mxshak,mxspl ++ integer kmaxd,kmaxe,kmaxf,mxspme,mxftab,mxhko,mxegrd,mxhke ++ integer mxmet,mxsmet,mxpmet,mxter,mxpter,mxatyp,mxxtyp ++ integer mxtmls_fre,mxewld_fre,mxebuf_fre,mxatms_fre,mxatyp_exc ++ integer mxtmls_exc,mxtmls_sol,mxebuf_sol,mxatms_sol ++ ++ save kmaxa,kmaxb,kmaxc,minnode,msatms,msbad,msgrp ++ save mspmf,msteth,mxangl,mxatms,mxbond,mxbuff,mxcell ++ save mxcons,mxdihd,mxewld,mxexcl,mxfbp,mxfld,mxgatm,mxgrid ++ save mxgrp,mxinv,mxlist,mxlshp,mxneut,mxngp,mxnstk,mxpang ++ save mxpbnd,mxpdih,mxpfbp,mxpinv,mxpmf,mxproc,mxptbp,mxpvdw ++ save mxrdf,mxzdn,mxshl,mxsite,mxspmf,mxstak,mxtang,mxtbnd ++ save mxtbp,mxtcon,mxtdih,mxteth,mxtinv,mxtmls,mxtshl,mxungp ++ save mxvdw,mxxdf,mx2tbp,mx3fbp,mxebuf,mxquat,mxshak,mxspl ++ save kmaxd,kmaxe,kmaxf,mxspme,mxftab,mxhko,mxegrd,mxhke ++ save mxmet,mxsmet,mxpmet,mxter,mxpter,mxatyp,mxxtyp ++ save mxtmls_fre,mxewld_fre,mxebuf_fre,mxatms_fre,mxatyp_exc ++ save mxtmls_exc,mxtmls_sol,mxebuf_sol,mxatms_sol ++ ++ contains ++ ++ subroutine parset(redirect,idnode,mxnode,buffer) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to determine required array sizes for ++c allocation of memory manager ++c ++c copyright daresbury laboratory 1997 ++c author - w.smith june 1997 ++c ++c*********************************************************************** ++ ++ logical loglnk,lewald,lspme,lhke,nolink,lcshft ++ logical lsolva,lfree,lfrmas,lghost,redirect ++ real(8) cell,celprp,rctbp,rcfbp,volm,xhi,yhi,zhi,rcut,rvdw ++ real(8) densvar,delr,cut,dens,ratio,drdf,dzdn,rcter,buffer ++ real(8) zlen ++ integer imcon,nhko,ilx,ily,ilz,ncells ++ integer idnode,mxnode,mxn1 ++ ++ dimension cell(9),celprp(10),buffer(10) ++ ++ lhke=.false. ++ lspme=.false. ++ lewald=.false. ++ lcshft=.false. ++ nolink=.false. ++ redirect=.false. ++ mxtmls_sol=1 ++ mxebuf_sol=1 ++ mxatms_sol=1 ++ mxtmls_fre=1 ++ mxewld_fre=1 ++ mxebuf_fre=1 ++ mxatms_fre=1 ++ mxatyp_exc=1 ++ mxtmls_exc=1 ++ ++c specify maximum and minimum nodes ++ ++ mxproc=mxnode ++ minnode=mxnode ++ ++c scan the FIELD file data ++ ++ call fldscan(idnode,mxn1,rctbp,rcfbp,rcter) ++ ++c scan CONFIG file data ++ ++ call cfgscan ++ x (idnode,nconf,imcon,volm,xhi,yhi,zhi,cell,buffer) ++ ++c scan CONTROL file data ++ ++ call conscan ++ x (redirect,lewald,lspme,lhke,nolink,lcshft,lsolva,lfree,lfrmas, ++ x lghost,idnode,imcon,nhko,rcut,rvdw,delr,densvar,drdf,dzdn, ++ x zlen,cell) ++ ++c set dimension of working coordinate arrays ++ ++ msatms=max(1,(mxatms+minnode-1)/minnode) ++ if(lsolva)mxatms_sol=mxatms ++ if(lfree.or.lghost)mxatms_fre=mxatms ++ ++c maximum number of molecule types ++ ++ mxtmls=max(mxtmls,1) ++ if(lsolva)mxtmls_sol=mxtmls ++ if(lfree)mxtmls_fre=mxtmls ++ if(lghost)then ++ ++ mxtmls_exc=mxtmls ++ mxtmls_fre=mxtmls ++ ++ endif ++ ++c maximum number of specified bondlength constraints ++ ++ mxtcon=max(mxtcon,1) ++ ++c maximum number of chemical bond potentials ++ ++ mxtbnd=max(mxtbnd,1) ++ ++c maximum number of different bond angle potentials ++ ++ mxtang=max(mxtang,1) ++ ++c maximum number of different torsional potentials ++ ++ mxtdih=max(mxtdih,1) ++ ++c maximum number of different inversion potentials ++ ++ mxtinv=max(mxtinv,1) ++ ++c maximum number of unique rigid body units ++ ++ mxungp=max(mxungp,1) ++ ++c maximum number of tethered atom potentials ++ ++ mxteth=max(mxteth,1) ++ ++c maximum number of core-shell units ++ ++ mxshl=max(mxshl,1) ++ ++c set maximum number of unique atom types ++ ++ mxatyp=max(1,mxatyp) ++ mxxtyp=(mxatyp*(mxatyp+1))/2 ++ if(lghost)mxatyp_exc=mxatyp ++ ++c maximum number of vdw potentials ++ ++ mxvdw=max(mxvdw,1)+1 ++ ++c maximum number of metal potentials ++ ++ mxmet=max(mxmet,1)+1 ++ mxsmet=mxatyp ++ ++c maximum number of tersoff potentials ++ ++ if(mxter.gt.0)then ++ ++ mxter=mxatyp ++ ++ endif ++ ++c maximum number of three body potentials ++ ++ if(mxtbp.eq.0)then ++ ++ mx2tbp=0 ++ ++ else ++ ++ mx2tbp=(mxatyp*(mxatyp+1))/2 ++ mxtbp=mx2tbp*mxatyp ++ ++ endif ++ ++c maximum number of four body potentials ++ ++ if(mxfbp.eq.0)then ++ ++ mx3fbp=0 ++ ++ else ++ ++ mx3fbp=(mxatyp*(mxatyp+1)*(mxatyp+2))/6 ++ mxfbp=mxatyp*mx3fbp ++ ++ endif ++ ++c maximum number of angular potential parameters ++ ++ mxpang=6 ++ ++c maximum number of three body potential parameters ++ ++ mxptbp=mxpang+1 ++ ++c maximum number of four body potential parameters ++ ++ mxpfbp=3 ++ ++c maximum number of parameters for dihedrals ++ ++ mxpdih=5 ++ ++c maximum number of parameters for inversion potentials ++ ++ mxpinv=2 ++ ++c maximum number of parameters for bond potentials ++ ++ mxpbnd=4 ++ ++c maximum number of parameters for vdw potentials ++ ++ mxpvdw=6 ++ ++c maximum number of parameters for metal potentials ++ ++ mxpmet=7 ++ ++c maximum number of parameters for tersoff potential ++ ++ mxpter=11 ++ ++c maximum number of external field parameters ++ ++ mxfld=10 ++ ++c maximum number of excluded atoms per atom ++ ++ mxexcl=max(mxexcl,1) ++ ++c maximum number of different sites in system ++ ++ mxsite=max(mxsite,1) ++ ++c maximum number of chemical bonds per node ++ ++ mxbond=max(1,(mxbond+minnode-1)/minnode) ++ ++c maximum number of bond angles per node ++ ++ mxangl=max(1,(mxangl+minnode-1)/minnode) ++ ++c maximum number of torsion angles per node ++ ++ mxdihd=max(1,(mxdihd+minnode-1)/minnode) ++ ++c maximum number of inversion potentials per node ++ ++ mxinv=max(1,(mxinv+minnode-1)/minnode) ++ ++c maximum number of constraints per node ++ ++ mxcons=max(1,2*((mxcons+minnode-1)/minnode)) ++ ++c maximum number of tethered atoms per node ++ ++ msteth=max(1,(msteth+minnode-1)/minnode) ++ ++c maximum size for working arrays for bonds, angles, dihedrals ++c inversion potentials, tethers and core-shell units ++ ++ msbad=max(mxbond,mxangl,mxdihd,mxinv,msteth,mxshl) ++ ++c maximum number of grid points in potentials arrays ++ ++ if(mxgrid.eq.0)then ++ ++ mxgrid=max(1000,int(rvdw/0.01d0+0.5d0)+4) ++ ++ endif ++ ++ mxegrd=0 ++ if(lewald.or.lspme.or.lhke.or.lcshft)mxegrd=mxgrid ++ ++c maximum dimension of rdf arrays ++ ++ mxrdf=max(128,int(rcut/drdf)) ++ ++c maximum dimension of zdensity arrays ++ ++ mxzdn=max(128,int(zlen/dzdn)) ++ ++c maximum number of rigid groups in system ++ ++ mxgrp=max(mxgrp,1) ++ ++c maximum number of rigid groups per node ++ ++ msgrp=max(1,(mxgrp+minnode-1)/minnode) ++ ++c maximum number of sites per rigid unit ++ ++ mxngp=max(mxngp,3) ++ ++c maximum number of sites in rigid units ++ ++ mxgatm=max(1,mxgatm) ++ ++c maximum number of timesteps in stack arrays ++ ++ mxstak=max(100,mxstak) ++ ++c maximum number of variables in stack arrays ++ ++ mxnstk=45+mxatyp ++ ++c dimension of shake shared atoms array ++ ++ mxlshp=max(mxcons*2,1) ++ ++c set dimension of working arrays in ewald sum ++ ++ mxewld=1 ++ mxebuf=1 ++ if(lewald)then ++ ++ mxftab=1 ++ mxewld=msatms ++ mxebuf=(2*kmaxa+1)*(2*kmaxb+1)*(2*kmaxc+1)-1 ++ if(lfree.or.lghost)mxebuf=3*mxebuf ++ if(mxnode.le.16.and.mxebuf.le.5000)mxebuf=1 ++ ++ endif ++ ++c set dimension of working arrays in spme ++ ++ mxspme=1 ++ if(lspme)then ++ ++ mxspme=mxatms ++ mxftab=2*(kmaxd+kmaxe+kmaxf) ++ ++ endif ++ ++c set dimension of working arrays for HK ewald ++ ++ mxhko=1 ++ mxhke=1 ++ if(lhke)then ++ ++ mxhko=2 ++ mxewld=msatms ++ mxhke=msatms ++ if(nhko.gt.0)mxhko=max(2,nhko) ++ mxebuf=(2*kmaxa+1)*(2*kmaxb+1)-1 ++ if(mxnode.le.16.and.mxebuf.le.5000)mxebuf=1 ++ ++ endif ++ ++ if(lsolva)mxebuf_sol=mxebuf ++ if(lfree.or.lghost)then ++ ++ mxebuf_fre=mxebuf ++ mxewld_fre=mxewld ++ ++ endif ++ ++c maximum dimension of principal transfer buffer ++ ++ mxbuff=max(6*mxatms,8*(mxcons+1),8*(mxgrp+1),mxnstk*mxstak, ++ x mxebuf,mxgrid,2*kmaxa*kmaxb*kmaxc,2*kmaxd*kmaxe*kmaxf, ++ x 10000) ++ ++c maximum size of verlet neighbour/link cell list for each atom ++c decide if link-cells in use or not ++ ++ cut=rcut+delr ++ dens=dble(mxatms)/volm ++ ratio=1.5d0*dens*(4.d0*pi/3.d0)*cut**3 ++ mxlist=min(nint(ratio),(mxatms+1)/2) ++ if(imcon.eq.0) then ++ ++ cell(1)=max(xhi+2.d0*cut,3.d0*cut) ++ cell(5)=max(yhi+2.d0*cut,3.d0*cut) ++ cell(9)=max(zhi+2.d0*cut,3.d0*cut) ++ ++ endif ++ if(imcon.eq.6)then ++ ++ cell(9)=max(zhi+2.d0*cut,3.d0*cut,cell(9)) ++ ++ endif ++ ++ if(nolink)then ++ ++ loglnk=.false. ++ ++ else ++ ++ loglnk=.true. ++ call dcell(cell,celprp) ++ ilx=int(celprp(7)/cut) ++ ily=int(celprp(8)/cut) ++ ilz=int(celprp(9)/cut) ++ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. ++ ncells=ilx*ily*ilz ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. ++ if(mxneut.gt.0.and.ncells.le.36) loglnk=.false. ++ ++ endif ++ ++ mxcell=1 ++ if(loglnk)then ++ ++ mxlist=14*nint(1.5d0*dens*celprp(10)/dble(ncells)) ++ mxcell=(ilx+2)*(ily+2)*(ilz+2) ++ ++ endif ++ ++ if(mxneut.gt.0)mxlist=(mxneut+1)/2 ++ mxlist=2*mxlist ++ if(mxtbp.gt.0.or.mxfbp.gt.0.or.mxter.gt.0)then ++ ++ if(mxtbp.gt.0)cut=min(cut,rctbp) ++ if(mxfbp.gt.0)cut=min(cut,rcfbp) ++ if(mxter.gt.0)cut=min(cut,rcter) ++ ilx=max(3,int(celprp(7)/cut)) ++ ily=max(3,int(celprp(8)/cut)) ++ ilz=max(3,int(celprp(9)/cut)) ++ mxcell=max(mxcell,(ilx+2)*(ily+2)*(ilz+2)) ++ ++ endif ++ mxcell=int(dble(mxcell)*densvar/100.d0) ++ mxlist=int(dble(mxlist)*densvar/100.d0) ++ mxlist=max(500,mxlist) ++ ++c maximum size for coordinate difference arrays ++ ++ mxxdf=max(mxlist,mxatms,mxcons,mxn1*mxn1*(mxneut+1)/2) ++ ++c maximum number of core-shell unit types ++ ++ mxtshl=max(mxtshl,1) ++ ++c potential of mean force array parameter ++ ++ mxpmf=max(mxpmf,1) ++ ++c number of pmf constraints on a processor ++ ++ mspmf=max(1,(mxpmf+minnode-1)/minnode) ++ ++c maximum number of sites to define pmf units ++ ++ mxspmf=max(mxspmf,1) ++ ++c maximum iterations in quaternion integration ++ ++ mxquat=100 ++ ++c maximum number of shake cycles ++ ++ mxshak=100 ++ ++c maximum b-spline interpolation order ++ ++ mxspl=12 ++ ++c increment mxneut ++ ++ if(mxneut.gt.0)mxneut=mxneut+1 ++ ++ return ++ ++ end subroutine parset ++ ++ subroutine fldscan(idnode,mxn1,rctbp,rcfbp,rcter) ++ ++c*********************************************************************** ++c ++c dl_poly routine for scanning the field file to determine the ++c required parameters ++c ++c copyright - daresbury laboratory 1994 ++c author - w. smith november 1994 ++c ++c*********************************************************************** ++ ++ integer, parameter :: mmk=1000 ++ ++ character*8 name,keyword,chr(mmk) ++ logical check,ltable,lmetab,safe,lneut,loop1,loop2 ++ real(8) rctbp,rcter,rcfbp,rct,ppp ++ integer mxn1,nxn1,idnode,nold ++ integer itmols,ksite,numsit,isite,nrept,ifrz,i,j ++ integer ishls,ibonds,numcon,numang,icon,iang,idih,numdih ++ integer numinv,iinv,numgrp,kgrp,numgsit,numteth,iteth ++ integer ipmf,jpmf,npmf,itpvdw,itptbp,itpfbp ++ integer itpter,k,nfld,nummols,idum,numshl,nneu ++ integer numbonds,itpmet,iii,ngrid ++ ++ mxtmls=0 ++ mxatms=0 ++ mxgrp=0 ++ mxtcon=0 ++ mxtbnd=0 ++ mxtang=0 ++ mxtdih=0 ++ mxtinv=0 ++ mxpmf=0 ++ mxspmf=0 ++ mxungp=0 ++ mxngp=0 ++ mxneut=0 ++ mxmet=0 ++ mxatyp=0 ++ mxn1=0 ++ nxn1=0 ++ nold=-1 ++ mxgatm=0 ++ mxteth=0 ++ msteth=0 ++ mxvdw=0 ++ mxtbp=0 ++ mxter=0 ++ mxexcl=0 ++ mxsite=0 ++ mxbond=0 ++ mxcons=0 ++ mxangl=0 ++ mxdihd=0 ++ mxinv=0 ++ mxshl=0 ++ mxtshl=0 ++ mxfbp=0 ++ mxgrid=0 ++ rctbp=0.d0 ++ rcter=0.d0 ++ rcfbp=0.d0 ++ safe=.true. ++ loop1=.true. ++ loop2=.true. ++ lneut=.false. ++ ltable=.false. ++ lmetab=.false. ++ ++c open force field data file ++ ++ if(idnode.eq.0)open (nfield,file='FIELD') ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++c read and process directives from field file ++ ++ do while(loop1) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ ++ if(findstring('neut',record,idum))then ++ ++ lneut=.true. ++ ++ elseif(findstring('molecu',record,idum))then ++ ++ mxtmls=intstr(record,lenrec,idum) ++ ++ do itmols=1,mxtmls ++ ++ loop2=.true. ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ do while(loop2) ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ ++ ksite=0 ++ ++ if(findstring('nummol',record,idum))then ++ ++ nummols=intstr(record,lenrec,idum) ++ ++ elseif(findstring('atoms',record,idum))then ++ ++ numsit=intstr(record,lenrec,idum) ++ mxatms=mxatms+numsit*nummols ++ mxsite=mxsite+numsit ++ ksite=0 ++ do isite=1,numsit ++ ++ if(ksite.lt.numsit)then ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ call getword(name,record,8,lenrec) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ nrept=intstr(record,lenrec,idum) ++ ifrz=intstr(record,lenrec,idum) ++ nneu=intstr(record,lenrec,idum) ++ if(nrept.eq.0)nrept=1 ++ if(lneut)then ++ if(nneu.ne.nold) nxn1=0 ++ nxn1=nxn1+nrept ++ mxn1=max(mxn1,nxn1) ++ nold=nneu ++ endif ++ ++ if(mxatyp.eq.0)then ++ ++ mxatyp=1 ++ chr(1)=name ++ ++ else ++ ++ check=.true. ++ do j=1,mxatyp ++ ++ if(name.eq.chr(j))check=.false. ++ ++ enddo ++ if(check)then ++ ++ mxatyp=mxatyp+1 ++ if(mxatyp.le.mmk)chr(mxatyp)=name ++ ++ endif ++ ++ endif ++ if(nrept.eq.0)nrept=1 ++ ksite=ksite+nrept ++ ++ endif ++ ++ enddo ++ ++ if(mmk.lt.mxatyp)call abortscan(34,idnode) ++ ++ if(lneut)mxneut=mxneut+nneu*nummols ++ ++ elseif(findstring('shell',record,idum))then ++ ++ numshl=intstr(record,40,idum) ++ mxtshl=mxtshl+numshl ++ mxshl=mxshl+nummols*numshl ++ ++ do ishls=1,numshl ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('bonds',record,idum))then ++ ++ numbonds=intstr(record,lenrec,idum) ++ mxtbnd=mxtbnd+numbonds ++ mxbond=mxbond+nummols*numbonds ++ ++ do ibonds=1,numbonds ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('constr',record,idum))then ++ ++ numcon=intstr(record,lenrec,idum) ++ mxtcon=mxtcon+numcon ++ mxcons=mxcons+nummols*numcon ++ ++ do icon=1,numcon ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('angles',record,idum))then ++ ++ numang=intstr(record,lenrec,idum) ++ mxtang=mxtang+numang ++ mxangl=mxangl+nummols*numang ++ ++ do iang=1,numang ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('dihedr',record,idum))then ++ ++ numdih=intstr(record,lenrec,idum) ++ mxtdih=mxtdih+numdih ++ mxdihd=mxdihd+nummols*numdih ++ ++ do idih=1,numdih ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('invers',record,idum))then ++ ++ numinv=intstr(record,lenrec,idum) ++ mxtinv=mxtinv+numinv ++ mxinv=mxinv+nummols*numinv ++ ++ do iinv=1,numinv ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('rigid',record,idum))then ++ ++ numgrp=intstr(record,lenrec,idum) ++ mxungp=mxungp+numgrp ++ mxgrp=mxgrp+numgrp*nummols ++ ++ do kgrp=1,numgrp ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ numgsit=intstr(record,lenrec,idum) ++ mxgatm=mxgatm+numgsit*nummols ++ mxngp=max(mxngp,numgsit) ++ do j=1,numgsit ++ ++ iii=intstr(record,lenrec,idum) ++ if(iii.eq.0)then ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ iii=intstr(record,lenrec,idum) ++ endif ++ ++ enddo ++ ++ enddo ++ ++ elseif(findstring('teth',record,idum))then ++ ++ numteth=intstr(record,lenrec,idum) ++ mxteth=mxteth+numteth ++ msteth=msteth+numteth*nummols ++ ++ do iteth=1,numteth ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ elseif(findstring('pmf',record,idum))then ++ ++ do ipmf=1,2 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ npmf=intstr(record,lenrec,idum) ++ mxspmf=mxspmf+npmf ++ ++ do jpmf=1,npmf ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ enddo ++ ++ enddo ++ ++ mxpmf=mxpmf+nummols ++ ++ elseif(findstring('finish',record,idum))then ++ ++ loop2=.false. ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ elseif(findstring('vdw',record,idum))then ++ ++ if(findstring('tab',record,idum))ltable=.true. ++ mxvdw=intstr(record,lenrec,idum) ++ do itpvdw=1,mxvdw ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ if(findstring('tab',record,idum))ltable=.true. ++ ++ enddo ++ mxvdw=max(mxvdw,(mxatyp*(mxatyp+1))/2) ++ ++ if(ltable)then ++ ++ if(idnode.eq.0)open(ntable,file='TABLE') ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ mxgrid=max(mxgrid,intstr(record,lenrec,idum)) ++ ++ close (ntable) ++ ++ endif ++ ++ elseif(findstring('metal',record,idum))then ++ ++ if(findstring('eam',record,idum))lmetab=.true. ++ mxmet=intstr(record,lenrec,idum) ++ do itpmet=1,mxmet ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call lowcase(record,lenrec) ++ if(findstring('eam',record,idum))lmetab=.true. ++ ++ enddo ++ mxmet=max(mxmet,(mxatyp*(mxatyp+1))/2) ++ ++ if(lmetab)then ++ ++ if(idnode.eq.0)open(ntable,file='TABEAM') ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ do i=1,intstr(record,lenrec,idum) ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ ngrid=intstr(record,lenrec,idum) ++ mxgrid=max(mxgrid,ngrid+4) ++ do j=1,(ngrid+3)/4 ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abortscan(24,idnode) ++ ++ enddo ++ ++ enddo ++ ++ close (ntable) ++ ++ endif ++ ++ elseif(findstring('tbp',record,idum))then ++ ++ mxtbp=intstr(record,lenrec,idum) ++ ++ do itptbp=1,mxtbp ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(keyword,record,4,lenrec) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ rct=dblstr(record,lenrec,idum) ++ rctbp=max(rctbp,rct) ++ ++ enddo ++ ++ elseif(findstring('fbp',record,idum))then ++ ++ mxfbp=intstr(record,lenrec,idum) ++ do itpfbp=1,mxfbp ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(name,record,8,lenrec) ++ call getword(keyword,record,4,lenrec) ++ ppp=dblstr(record,lenrec,idum) ++ ppp=dblstr(record,lenrec,idum) ++ rct=dblstr(record,lenrec,idum) ++ rcfbp=max(rcfbp,rct) ++ ++ enddo ++ ++ elseif(findstring('tersof',record,idum))then ++ ++ mxter=intstr(record,lenrec,idum) ++ ++ do itpter=1,mxter ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ rct=dblstr(record,lenrec,idum) ++ rcter=max(rcter,rct) ++ ++ enddo ++ ++ elseif(findstring('extern',record,idum))then ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ nfld=intstr(record,lenrec,idum) ++ if(nfld.eq.0)nfld=5 ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ ++ do k=1,nfld ++ ++ ppp=dblstr(record,lenrec,idum) ++ if(idum.gt.lenrec.and.k.lt.nfld)then ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)call abortscan(52,idnode) ++ endif ++ ++ enddo ++ ++ elseif(findstring('close',record,idum))then ++ ++ loop1=.false. ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)close (nfield) ++ ++ if(mxpmf.gt.0)mxpmf=mxatms ++ if(mxtcon.gt.0)mxexcl=max(mxexcl,6) ++ if(mxtbnd.gt.0)mxexcl=max(mxexcl,6) ++ if(mxtang.gt.0)mxexcl=max(mxexcl,16) ++ if(mxtdih.gt.0)mxexcl=max(mxexcl,50) ++ if(mxtinv.gt.0)mxexcl=max(mxexcl,50) ++ if(mxneut.gt.0)mxexcl=max(mxexcl,10*mxn1*mxn1) ++ if(mxgrp.gt.0)mxexcl=max(mxexcl,mxngp) ++ ++ return ++ ++ end subroutine fldscan ++ ++ subroutine cfgscan ++ x (idnode,nconf,imcon,volm,xhi,yhi,zhi,cell,buffer) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for scanning the initial configuration ++c file to determine the number of atoms present ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith june 1997 ++c ++c note: volm is volume containing all particles, not system volume ++c ++c*********************************************************************** ++ ++ character*80 header ++ character*8 name ++ logical lvolm ++ real(8) cell,celprp,buffer,extra,volm,xhi,yhi,zhi ++ real(8) xxx,yyy,zzz,uuu,vvv,www,coz ++ integer idnode,nconf,imcon,i,levcfg ++ dimension cell(9),celprp(10),buffer(10),extra(5) ++ ++ imcon=0 ++ xhi=0.d0 ++ yhi=0.d0 ++ zhi=0.d0 ++ volm=0.d0 ++ do i=1,9 ++ ++ cell(i)=0.d0 ++ ++ enddo ++ if(idnode.eq.0)then ++ ++ open (nconf,file='CONFIG') ++ ++c read the CONFIG file header ++ ++ read(nconf,'(a80)',end=100)header ++ read(nconf,'(2i10)',end=100)levcfg,imcon ++ lvolm=(imcon.eq.0.or.imcon.eq.6) ++ ++c specify molecular dynamics simulation cell ++ ++ if(imcon.gt.0)then ++ ++ read(nconf,'(3f20.0)',end=100)cell(1),cell(2),cell(3) ++ read(nconf,'(3f20.0)',end=100)cell(4),cell(5),cell(6) ++ read(nconf,'(3f20.0)',end=100)cell(7),cell(8),cell(9) ++ call dcell(cell,celprp) ++ ++ endif ++ ++ if(.not.lvolm)then ++ ++ volm=celprp(10) ++ ++ if(imcon.eq.4)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.5)then ++ ++ volm=0.5d0*celprp(10) ++ ++ elseif(imcon.eq.7)then ++ ++ volm=0.5d0*celprp(10) ++ ++ endif ++ ++ endif ++ ++ i=0 ++ do while(.true.) ++ ++ i=i+1 ++ if(levcfg.eq.0)then ++ ++ read(nconf,'(a8)',end=100) name ++ read(nconf,'(3f20.0)')xxx,yyy,zzz ++ ++ else if(levcfg.eq.1)then ++ ++ read(nconf,'(a8)',end=100) name ++ read(nconf,'(3f20.0)')xxx,yyy,zzz ++ read(nconf,'(3f20.0)')uuu,vvv,www ++ ++ else ++ ++ read(nconf,'(a8)',end=100) name ++ read(nconf,'(3f20.0)')xxx,yyy,zzz ++ read(nconf,'(3f20.0)')uuu,vvv,www ++ read(nconf,'(3f20.0)')uuu,vvv,www ++ ++ endif ++ ++ if(lvolm)then ++ ++ if(i.eq.1)then ++ ++ xhi=abs(xxx) ++ yhi=abs(yyy) ++ zhi=abs(zzz) ++ ++ else ++ ++ xhi=max(xhi,abs(xxx)) ++ yhi=max(yhi,abs(yyy)) ++ zhi=max(zhi,abs(zzz)) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ 100 continue ++ ++ if(imcon.eq.0)then ++ ++ volm=8.d0*xhi*yhi*zhi ++ ++ else if(imcon.eq.6)then ++ ++ coz=(cell(1)*cell(4)+cell(2)*cell(5)+cell(3)*cell(6))/ ++ x (celprp(1)*celprp(2)) ++ volm=2.d0*zhi*celprp(1)*celprp(2)*sqrt(1.d0-coz**2) ++ ++ endif ++ ++ close (nconf) ++ ++ endif ++ ++ extra(1)=dble(imcon) ++ extra(2)=xhi ++ extra(3)=yhi ++ extra(4)=zhi ++ extra(5)=volm ++ call gdsum(extra,5,buffer) ++ call gdsum(cell,9,buffer) ++ imcon=nint(extra(1)) ++ xhi=extra(2) ++ yhi=extra(3) ++ zhi=extra(4) ++ volm=extra(5) ++ ++ return ++ ++ end subroutine cfgscan ++ ++ subroutine conscan ++ x (redirect,lewald,lspme,lhke,nolink,lcshft,lsolva,lfree,lfrmas, ++ x lghost,idnode,imcon,nhko,rcut,rvdw,delr,densvar,drdf,dzdn, ++ x zlen,cell) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for scanning the contents of the control file ++c ++c copyright - daresbury laboratory 1997 ++c author - w. smith june 1997 ++c ++c*********************************************************************** ++ ++ logical safe,lewald,lspme,lhke,peek,nolink,lcshft,lmetad ++ logical lsolva,lfree,lfrmas,lghost,redirect ++ real(8) cell,celprp,rcut,rvdw,delr,eps,alpha,fac,tol,tol1 ++ real(8) densvar,drdf,dzdn,zlen ++ integer nhko,idnode,imcon,idum,jmp ++ integer nlatt,kmax1,kmax2,kmax3,kmaxpow2 ++ dimension celprp(10),cell(9) ++ ++ nhko=0 ++ mxstak=0 ++ kmaxa=0 ++ kmaxb=1 ++ kmaxc=1 ++ kmaxd=1 ++ kmaxe=1 ++ kmaxf=1 ++ rcut=0.d0 ++ rvdw=0.d0 ++ delr=0.d0 ++ drdf=0.05d0 ++ dzdn=0.05d0 ++ zlen=0.d0 ++ densvar=1.d2 ++ peek=.true. ++ lhke=.false. ++ lspme=.false. ++ lewald=.false. ++ lcshft=.false. ++ nolink=.false. ++ lghost=.false. ++ lfree=.false. ++ lfrmas=.false. ++ lsolva=.false. ++ lmetad=.false. ++ redirect=.false. ++ ++c open the simulation input file ++ ++ if(idnode.eq.0)open (nread,file='CONTROL') ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abortscan(17,idnode) ++ ++ do while(peek) ++ ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abortscan(17,idnode) ++ call lowcase(record,lenrec) ++ if(record(1).ne.'#')then ++ ++ if(findstring('stack',record,idum))then ++ ++ mxstak=intstr(record,lenrec,idum) ++ ++ elseif(findstring('no link',record,idum))then ++ ++ nolink=.true. ++ ++ elseif(findstring('metafreeze',record,idum))then ++ ++ lmetad=.true. ++ do while(lmetad) ++ call getrec(safe,idnode,nread) ++ if(.not.safe)call abortscan(17,idnode) ++ call lowcase(record,lenrec) ++ lmetad=.not.findstring('endmet',record,idum) ++ enddo ++ ++ elseif(findstring('redirect',record,idum))then ++ ++ redirect=.true. ++ ++ elseif(findstring('densvar',record,idum))then ++ ++ densvar=dblstr(record,lenrec,idum) ++ ++ elseif(findstring('shift',record,idum).or. ++ x findstring('reaction',record,idum))then ++ ++ lcshft=.true. ++ ++ elseif(findstring('ewald',record,idum).or. ++ x findstring('spme',record,idum).or. ++ x findstring('hke',record,idum))then ++ ++c read Ewald or HK-Ewald or SPM-Ewald sum parameters ++ ++ lhke=findstring('hke',record,idum) ++ lspme=findstring('spme',record,idum) ++ lewald=findstring('ewald',record,idum) ++ ++ if(findstring('precision',record,idum))then ++ ++ eps=dblstr(record,lenrec,idum) ++ if(lhke) then ++ ++ nhko=intstr(record,lenrec,idum) ++ nlatt=intstr(record,lenrec,idum) ++ nlatt=min(nlatt,2) ++ ++ endif ++ ++ if(rcut.lt.1.d-6)rcut=10.d0 ++ ++c compute alpha and the kmax ++ ++ if(lewald.or.lspme)then ++ ++ call dcell(cell,celprp) ++ eps=min(abs(eps),0.5d0) ++ tol=sqrt(abs(log(eps*rcut))) ++ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut ++ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) ++ fac=1.d0 ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) ++ x fac=2.d0**(1.d0/3.d0) ++ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) ++ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) ++ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) ++ ++ elseif(lhke)then ++ ++ if(nhko.eq.0)then ++ if(eps.le.1.d-6)then ++ alpha=3.46d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=3.14d0/rcut ++ else ++ alpha=2.76d0/rcut ++ endif ++ elseif(nhko.eq.1)then ++ if(eps.le.1.d-6)then ++ alpha=4.37d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.08d0/rcut ++ else ++ alpha=3.75d0/rcut ++ endif ++ elseif(nhko.eq.2)then ++ if(eps.le.1.d-6)then ++ alpha=5.01d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=4.74d0/rcut ++ else ++ alpha=4.44d0/rcut ++ endif ++ elseif(nhko.eq.3)then ++ if(eps.le.1.d-6)then ++ alpha=5.55d0/rcut ++ elseif(eps.le.1.d-5)then ++ alpha=5.28d0/rcut ++ else ++ alpha=5.00d0/rcut ++ endif ++ endif ++ alpha=alpha/dble(2*nlatt+1) ++ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 ++ call dcell(cell,celprp) ++ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) ++ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) ++ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) ++ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) ++ kmax3=1 ++ ++ endif ++ ++ else ++ ++ alpha=dblstr(record,lenrec,idum) ++ kmax1=intstr(record,lenrec,idum) ++ kmax2=intstr(record,lenrec,idum) ++ ++ if(lhke)then ++ ++ kmax3=1 ++ nhko=intstr(record,lenrec,idum) ++ ++ else ++ ++ kmax3=intstr(record,lenrec,idum) ++ ++ endif ++ ++ endif ++ ++c for spme double kmax and set to next power of 2, with current ++c upper limit of 512 ++ ++ if(lspme)then ++ ++ kmaxpow2=1 ++ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ end do ++ kmaxd=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ end do ++ kmaxe=2 * kmaxpow2 ++ ++ kmaxpow2=1 ++ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) ++ kmaxpow2=kmaxpow2 * 2 ++ end do ++ kmaxf=2 * kmaxpow2 ++ ++ elseif(lhke) then ++ ++ kmaxa=kmax1 ++ kmaxb=kmax2 ++ kmaxc=1 ++ ++ else ++ ++ kmaxa=kmax1 ++ kmaxb=kmax2 ++ kmaxc=kmax3 ++ ++ endif ++ ++ elseif(findstring('cut',record,idum))then ++ ++ rcut=dblstr(record,lenrec,idum) ++ ++ elseif(findstring('rvdw',record,idum))then ++ ++ rvdw=dblstr(record,lenrec,idum) ++ ++ elseif(findstring('delr',record,idum))then ++ ++ delr=dblstr(record,100,idum) ++ ++ else if(findstring('rdf',record,idum))then ++ ++ if(.not.findstring('print',record,idum))then ++ ++ jmp=intstr(record,lenrec,idum) ++ drdf=dblstr(record,lenrec,idum) ++ ++ endif ++ ++ else if(findstring('zden',record,idum))then ++ ++ jmp=intstr(record,lenrec,idum) ++ dzdn=dblstr(record,lenrec,idum) ++ zlen=dblstr(record,lenrec,idum) ++ if(dzdn.lt.1.d-8)then ++ ++ dzdn=0.1d0 ++ zlen=0.1d0*dble(128) ++ ++ elseif(zlen.lt.1.d-8)then ++ ++ zlen=dzdn*dble(128) ++ ++ endif ++ ++ elseif(findstring('solva',record,idum))then ++ ++ lsolva=.true. ++ ++ elseif(findstring('decomp',record,idum))then ++ ++ lsolva=.true. ++ ++ elseif(findstring('free',record,idum))then ++ ++ lfree=.true. ++ ++ elseif(findstring('excit',record,idum))then ++ ++ lghost=.true. ++ lsolva=.true. ++ ++ elseif(findstring('reset_mass',record,idum))then ++ ++ lfrmas=.true. ++ ++ elseif(findstring('switch',record,idum))then ++ ++ lghost=.true. ++ lsolva=.true. ++ ++ elseif(findstring('finish',record,idum))then ++ ++ peek=.false. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)close (nread) ++ if(abs(rvdw).le.1.d-10)rvdw=rcut ++ if(drdf.lt.1.d-8)drdf=0.05d0 ++ if(dzdn.lt.1.d-8)dzdn=0.05d0 ++ ++ return ++ ++ end subroutine conscan ++ ++ subroutine abortscan(key,idnode) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for controlled exit of file scan ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c********************************************************************* ++ ++ integer key,idnode ++ ++ write(nrite,'(/,/,1x,a,i5)') ++ x 'DL_POLY terminated due to error ', key ++ ++ if(key.eq.17)then ++ ++ write(nrite,'(/,/,1x,a)') ++ x 'error - strange exit from CONTROL file processing' ++ ++ else if(key.eq.52)then ++ ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of FIELD file encountered' ++ ++ else if(key.eq.24)then ++ ++ write(nrite,'(/,/,1x,a)') ++ x 'error - end of file encountered in TABLE file' ++ ++ else if(key.eq.34)then ++ ++ write(nrite,'(/,/,1x,a)') ++ x 'error - character array memory allocation failure' ++ ++ endif ++ ++ if(idnode.eq.0) then ++ close (nrite) ++ close (nhist) ++ close (nread) ++ close (nconf) ++ close (nstats) ++ close (nrest) ++ close (nfield) ++ close (ntable) ++ endif ++ ++ call gsync() ++ call exitcomms() ++ ++ return ++ end subroutine abortscan ++ ++ subroutine dcell(aaa,bbb) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to calculate the dimensional properties of ++c a simulation cell specified by the input matrix aaa. ++c the results are returned in the array bbb, with : ++c ++c bbb(1 to 3) - lengths of cell vectors ++c bbb(4 to 6) - cosines of cell angles ++c bbb(7 to 9) - perpendicular cell widths ++c bbb(10) - cell volume ++c ++c copyright daresbury laboratory 1992 ++c author - w. smith july 1992 ++c ++c*********************************************************************** ++ ++ real(8) aaa,bbb,axb1,axb2,axb3,bxc1,bxc2,bxc3,cxa1,cxa2,cxa3 ++ ++ dimension aaa(9),bbb(10) ++ ++c calculate lengths of cell vectors ++ ++ bbb(1)=sqrt(aaa(1)*aaa(1)+aaa(2)*aaa(2)+aaa(3)*aaa(3)) ++ bbb(2)=sqrt(aaa(4)*aaa(4)+aaa(5)*aaa(5)+aaa(6)*aaa(6)) ++ bbb(3)=sqrt(aaa(7)*aaa(7)+aaa(8)*aaa(8)+aaa(9)*aaa(9)) ++ ++c calculate cosines of cell angles ++ ++ bbb(4)=(aaa(1)*aaa(4)+aaa(2)*aaa(5)+aaa(3)*aaa(6))/(bbb(1)*bbb(2)) ++ bbb(5)=(aaa(1)*aaa(7)+aaa(2)*aaa(8)+aaa(3)*aaa(9))/(bbb(1)*bbb(3)) ++ bbb(6)=(aaa(4)*aaa(7)+aaa(5)*aaa(8)+aaa(6)*aaa(9))/(bbb(2)*bbb(3)) ++ ++c calculate vector products of cell vectors ++ ++ axb1=aaa(2)*aaa(6)-aaa(3)*aaa(5) ++ axb2=aaa(3)*aaa(4)-aaa(1)*aaa(6) ++ axb3=aaa(1)*aaa(5)-aaa(2)*aaa(4) ++ bxc1=aaa(5)*aaa(9)-aaa(6)*aaa(8) ++ bxc2=aaa(6)*aaa(7)-aaa(4)*aaa(9) ++ bxc3=aaa(4)*aaa(8)-aaa(5)*aaa(7) ++ cxa1=aaa(8)*aaa(3)-aaa(2)*aaa(9) ++ cxa2=aaa(1)*aaa(9)-aaa(3)*aaa(7) ++ cxa3=aaa(2)*aaa(7)-aaa(1)*aaa(8) ++ ++c calculate volume of cell ++ ++ bbb(10)=abs(aaa(1)*bxc1+aaa(2)*bxc2+aaa(3)*bxc3) ++ ++c calculate cell perpendicular widths ++ ++ bbb(7)=bbb(10)/sqrt(bxc1*bxc1+bxc2*bxc2+bxc3*bxc3) ++ bbb(8)=bbb(10)/sqrt(cxa1*cxa1+cxa2*cxa2+cxa3*cxa3) ++ bbb(9)=bbb(10)/sqrt(axb1*axb1+axb2*axb2+axb3*axb3) ++ ++ return ++ end subroutine dcell ++ ++ end module setup_module +diff -urN dl_class_1.9.orig/srcmod/shake_module.f dl_class_1.9/srcmod/shake_module.f +--- dl_class_1.9.orig/srcmod/shake_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/shake_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,152 @@ ++ module shake_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining bond shake arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use error_module ++ use parse_module ++ use setup_module ++ use site_module ++ use solvation_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmcon(:) ++ integer, allocatable :: listcon(:,:),listot(:) ++ integer, allocatable :: numcon(:),lstcon(:,:) ++ integer, allocatable :: listme(:),lishap(:),lashap(:) ++ ++ save prmcon,listcon,listot,numcon,lstcon,listme,lishap,lashap ++ ++ contains ++ ++ subroutine alloc_shake_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (prmcon(mxtcon),stat=fail(1)) ++ allocate (numcon(mxtmls),stat=fail(2)) ++ allocate (lstcon(mxtcon,2),stat=fail(3)) ++ allocate (listcon(mxcons,3),stat=fail(4)) ++ allocate (listme(mxatms),stat=fail(5)) ++ allocate (lishap(mxlshp),stat=fail(6)) ++ allocate (lashap(mxproc),stat=fail(7)) ++ allocate (listot(mxatms),stat=fail(8)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1070) ++ enddo ++ ++ do i=1,mxtmls ++ numcon(i)=0 ++ enddo ++ ++ end subroutine alloc_shake_arrays ++ ++ subroutine define_constraints ++ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining constraints ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c adapted - p-a cazade oct 2007, solvation, excitation etc. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lghost ++ character*1 message(80) ++ integer idnode,itmols,nconst,nsite,ntmp,icnst ++ integer icnst1,iatm1,iatm2,isite1,isite2,idum,i ++ integer isol1,isol2,natmsr ++ ++ ntmp=intstr(record,lenrec,idum) ++ numcon(itmols)=numcon(itmols)+ntmp ++ if(idnode.eq.0) then ++ write(nrite,"(/,1x,'number of bond constraints', ++ x 5x,i10)") ntmp ++ write(nrite,"(/,/,1x,'constraint bond details:', ++ x /,/,21x,5x,'index',5x,'index',2x,'bondlength',/) ++ x ") ++ endif ++ ++ icnst1 = numcon(itmols) ++ do icnst=1,icnst1 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ iatm1 = intstr(record,lenrec,idum) ++ iatm2 = intstr(record,lenrec,idum) ++ ++c test for frozen atom pairs(:) ++ ++ isite1 = nsite - numsit(itmols) + iatm1 ++ isite2 = nsite - numsit(itmols) + iatm2 ++ if(lghost)then ++ ++ isol1=natmsr+iatm1 ++ isol2=natmsr+iatm2 ++ ++ endif ++ ++ if(lfzsit(isite1)*lfzsit(isite2).ne.0) then ++ ++ numcon(itmols) = numcon(itmols) -1 ++ if(idnode.eq.0) write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ nconst=nconst+1 ++ ++ if(nconst.gt.mxtcon) call error(idnode,40) ++ ++ lstcon(nconst,1)= iatm1 ++ lstcon(nconst,2)= iatm2 ++ prmcon(nconst)=dblstr(record,lenrec,idum) ++ ++ if(lghost)then ++ ++ if((isol1.ge.ind_fre(3)).or.(isol2.ge.ind_fre(3)))then ++ ++ numcon(itmols)=numcon(itmols)-1 ++ ntcons_ghost=ntcons_ghost+1 ++ ++ endif ++ ++ endif ++ ++ if(idnode.eq.0) ++ x write(nrite,"(21x,2i10,f12.6)") ++ x lstcon(nconst,1),lstcon(nconst,2), ++ x prmcon(nconst) ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_constraints ++ ++ end module shake_module +diff -urN dl_class_1.9.orig/srcmod/site_module.f dl_class_1.9/srcmod/site_module.f +--- dl_class_1.9.orig/srcmod/site_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/site_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,233 @@ ++ module site_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining atomic/site arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use error_module ++ use parse_module ++ use setup_module ++ ++ implicit none ++ ++ character*1, allocatable :: molnam(:,:) ++ character*8, allocatable :: sitnam(:),unqatm(:) ++ real(8), allocatable :: dens(:),chgsit(:),wgtsit(:) ++ integer, allocatable :: nexsit(:),lfzsit(:),numsit(:),ltpsit(:) ++ integer, allocatable :: nugrp(:),lexsit(:,:),numgrp(:) ++ integer, allocatable :: numtyp(:),numfrz(:),nummols(:) ++ ++ save numtyp,numfrz,dens,chgsit,wgtsit,sitnam,unqatm,nexsit ++ save lfzsit,numsit,ltpsit,nugrp,lexsit,numgrp,molnam,nummols ++ ++ contains ++ ++ subroutine alloc_site_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=16 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (chgsit(mxsite),stat=fail(1)) ++ allocate (wgtsit(mxsite),stat=fail(2)) ++ allocate (nexsit(mxsite),stat=fail(3)) ++ allocate (lfzsit(mxsite),stat=fail(4)) ++ allocate (nugrp(mxsite) ,stat=fail(5)) ++ allocate (ltpsit(mxsite),stat=fail(6)) ++ allocate (numsit(mxtmls),stat=fail(7)) ++ allocate (lexsit(mxsite,mxexcl),stat=fail(8)) ++ allocate (sitnam(mxsite),stat=fail(9)) ++ allocate (unqatm(mxsite),stat=fail(10)) ++ allocate (numgrp(mxtmls),stat=fail(11)) ++ allocate (numtyp(mxatyp),stat=fail(12)) ++ allocate (numfrz(mxatyp),stat=fail(13)) ++ allocate (dens(mxatyp),stat=fail(14)) ++ allocate (nummols(mxtmls),stat=fail(15)) ++ allocate (molnam(40,mxtmls),stat=fail(16)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1090) ++ enddo ++ ++ do i=1,mxtmls ++ numsit(i)=0 ++ enddo ++ ++ end subroutine alloc_site_arrays ++ ++ subroutine define_atoms ++ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining atom types in system ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ character*8 atom1 ++ character*1 message(80) ++ logical lneut,safe,atmchk ++ integer idnode,itmols,nsite,ksite,ntpatm,isite,nrept ++ integer ifrz,neugp,irept,jsite,idum ++ real(8) weight,charge ++ ++ numsit(itmols)=intstr(record,lenrec,idum) ++ if(idnode.eq.0) then ++ write(nrite,"(/,1x,'number of atoms/sites', ++ x 10x,i10)") numsit(itmols) ++ if(.not.lneut) ++ x write(nrite,"(/,/,1x,'atomic characteristics:', ++ x /,/,21x,' site',5x,'name',10x,'mass',8x, ++ x 'charge',4x,'repeat',4x,'freeze'/)") ++ if(lneut) ++ x write(nrite,"(/,/,1x,'atomic characteristics:',/ ++ x /,21x,' site',5x,'name',10x,'mass',8x,'charge', ++ x 4x,'repeat',4x,'freeze',3x,'chg grp')") ++ ++ endif ++ ++ do isite=1,numsit(itmols) ++ ++ if(ksite.lt.numsit(itmols))then ++ ++c read atom name, site number, mass, charge, freeze option ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call getword(atom1,record,8,lenrec) ++ weight=dblstr(record,lenrec,idum) ++ charge=dblstr(record,lenrec,idum) ++ nrept=intstr(record,lenrec,idum) ++ ifrz =intstr(record,lenrec,idum) ++ neugp=intstr(record,lenrec,idum) ++ if(nrept.eq.0)nrept=1 ++ ksite=ksite+nrept ++ ++ if(idnode.eq.0) then ++ ++ if(.not.lneut) then ++ ++ write(nrite, ++ x "(21x,i5,5x,a8,2f12.5,2i10)") ++ x nsite+1,atom1,weight,charge,nrept, ++ x ifrz ++ ++ else ++ ++ write(nrite, ++ x "(21x,i5,5x,a8,2f12.5,3i10)") ++ x nsite+1,atom1,weight,charge,nrept, ++ x ifrz,neugp ++ ++ endif ++ ++ endif ++ ++ do irept=1,nrept ++ ++ nsite=nsite+1 ++ if(nsite.gt.mxsite) call error(idnode,20) ++ ++ sitnam(nsite)=atom1 ++ wgtsit(nsite)=weight ++ chgsit(nsite)=charge ++ lfzsit(nsite)=ifrz ++ nugrp(nsite)=neugp ++ ++ enddo ++ ++c establish list of unique atom types ++ ++ atmchk=.true. ++ ++ do jsite=1,ntpatm ++ ++ if(atom1.eq.unqatm(jsite)) then ++ ++ atmchk=.false. ++ do irept=nsite,nsite-nrept+1,-1 ++ ++ ltpsit(irept)=jsite ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ if(atmchk)then ++ ++ ntpatm=ntpatm+1 ++ if(ntpatm.gt.mxatyp)call error(idnode,14) ++ unqatm(ntpatm)=atom1 ++ ++ do irept=nsite,nsite-nrept+1,-1 ++ ++ ltpsit(irept)=ntpatm ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_atoms ++ ++ subroutine check_syschg(idnode,ntpmls,sumchg) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for checking the system charge ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,ntpmls,jsite,itmols,lsite ++ real(8) sumchg ++ ++ jsite=0 ++ do itmols=1,ntpmls ++ ++ do lsite=1,numsit(itmols) ++ ++ jsite=jsite+1 ++ sumchg=sumchg+dble(nummols(itmols))*chgsit(jsite) ++ ++ enddo ++ ++ enddo ++ ++ if(abs(sumchg).gt.1.0d-6) then ++ ++ call warning(idnode,60,sumchg,0.d0,0.d0) ++ ++ endif ++ ++ return ++ end subroutine check_syschg ++ ++ end module site_module +diff -urN dl_class_1.9.orig/srcmod/solvation_module.f dl_class_1.9/srcmod/solvation_module.f +--- dl_class_1.9.orig/srcmod/solvation_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/solvation_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,996 @@ ++ module solvation_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining decomposition of energy arrays ++c to calculate solvation energies ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ use setup_module ++ use error_module ++ use config_module ++ ++ implicit none ++ ++ logical lcomp(9) ++ ++ integer mxtmls_sol2,mxtmls_sol3,mxtmls_sol4 ++ integer ntcons_ghost,ngrp_ghost,nswitch,niswitch ++ integer mxtmls_exc2,mxtmls_exc3,mxtmls_exc4 ++ integer nfrn,ifrn,mfree,kfree,ind_fre(4) ++ ++ real(8) pfree,lambda1,lambda2,dlambda,eng_kin_fre ++ real(8) elrc2,virlrc2,engsic0,engsic2,elrc_sav,qfix_fre ++ real(8) virlrc_sav,volm_sav,elrc_fre,elrc_fre_sav,vlrc_fre ++ real(8) qchg0,qchg1,qchg2,ang_fre,bnd_fre,dih_fre ++ real(8) inv_fre,tbp_fre,fbp_fre,cou_fre,elrc2_sav ++ real(8) vdw_fre,eng_cfg_fre,shl_fre,virlrc2_sav,vlrc_fre_sav ++ real(8) qchg_sav,vir_cfg_fre,ang_vir,bnd_vir,dih_vir ++ real(8) inv_vir,tbp_vir,fbp_vir,cou_vir,vdw_vir,shl_vir ++ ++ integer, allocatable :: atm_fre(:) ++ integer, allocatable :: atmolt(:),rigid_sol(:),const_sol(:) ++ integer, allocatable :: lstgot_sol(:),natm_sol(:) ++ ++ real(8), allocatable :: elrc_sol(:),elrc_sol_sav(:),shl_sol(:) ++ real(8), allocatable :: cou_sol(:),vdw_sol(:),bnd_sol(:) ++ real(8), allocatable :: ckc_sol_sum(:),cks_sol_sum(:) ++ real(8), allocatable :: cou_sol_sic(:),ebuf_sol1(:),inv_sol(:) ++ real(8), allocatable :: ang_sol(:),dih_sol(:),en3_sol(:) ++ real(8), allocatable :: qfix_sol(:),ebuf_sol2(:),en4_sol(:) ++ real(8), allocatable :: vdw_sol_lng(:),cou_sol_lng(:) ++ real(8), allocatable :: degfre_sol(:),degrot_sol(:),temp_sol(:) ++ real(8), allocatable :: vxo_sol(:),vyo_sol(:),vzo_sol(:) ++ real(8), allocatable :: ckc1(:),cks1(:),ckc2(:),cks2(:) ++ real(8), allocatable :: ckc_fre_sum(:),cks_fre_sum(:) ++ real(8), allocatable :: ebuf_exc1(:),ebuf_exc2(:) ++ real(8), allocatable :: vxo_fre(:),vyo_fre(:),vzo_fre(:) ++ real(8), allocatable :: elrc_exc(:),elrc_exc_sav(:) ++ real(8), allocatable :: cou_exc(:),vdw_exc(:),bnd_exc(:) ++ real(8), allocatable :: ang_exc(:),dih_exc(:),en4_exc(:) ++ real(8), allocatable :: vdw_exc_lng(:),cou_exc_lng(:) ++ real(8), allocatable :: shl_exc(:),en3_exc(:),inv_exc(:) ++ real(8), allocatable :: qfix_exc(:),cou_exc_sic(:),weight_sav(:) ++ ++ save atmolt,rigid_sol,const_sol,lstgot_sol,natm_sol,elrc_sol ++ save elrc_sol_sav,cou_sol,vdw_sol,bnd_sol,ckc_sol_sum,cks_sol_sum ++ save cou_sol_sic,ebuf_sol1,en4_sol,ang_sol,dih_sol,en3_sol ++ save qfix_sol,ebuf_sol2,shl_sol,vdw_sol_lng,cou_sol_lng,degfre_sol ++ save degrot_sol,inv_sol,temp_sol,vxo_sol,vyo_sol,vzo_sol ++ save mxtmls_sol2,mxtmls_sol3,mxtmls_sol4,lcomp ++ ++ save nfrn,ifrn,mfree,kfree,pfree,lambda1,lambda2,dlambda ++ save eng_kin_fre,elrc2,virlrc2,engsic0,engsic2,cks_fre_sum ++ save virlrc_sav,volm_sav,elrc_fre,elrc_fre_sav,qchg1,qchg2 ++ save ang_fre,bnd_fre,dih_fre,inv_fre,tbp_fre,fbp_fre,qchg0 ++ save cou_fre,vdw_fre,eng_cfg_fre,elrc2_sav,elrc_sav,vlrc_fre ++ save ang_vir,bnd_vir,dih_vir,inv_vir,tbp_vir,fbp_vir,cou_vir ++ save vdw_vir,shl_vir,vir_cfg_fre,qfix_fre,virlrc2_sav ++ save ind_fre,atm_fre,ckc1,cks1,ckc2,cks2,ckc_fre_sum ++ save ebuf_exc1,ebuf_exc2,vxo_fre,vyo_fre,vzo_fre,vlrc_fre_sav ++ save weight_sav ++ ++ save ntcons_ghost,ngrp_ghost,qchg_sav,nswitch,niswitch ++ save mxtmls_exc2,mxtmls_exc3,mxtmls_exc4 ++ save cou_exc,vdw_exc,bnd_exc,ang_exc,dih_exc,en4_exc,vdw_exc_lng ++ save cou_exc_lng,shl_exc,en3_exc,inv_exc,elrc_exc,elrc_exc_sav ++ save qfix_exc,cou_exc_sic ++ ++ contains ++ ++ subroutine alloc_sol_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine for allocating solvation module arrays ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=37 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ mxtmls_sol2=((mxtmls_sol+1)*mxtmls_sol)/2 ++ mxtmls_sol3=(((mxtmls_sol+3)*mxtmls_sol+2)*mxtmls_sol)/6 ++ mxtmls_sol4=((((mxtmls_sol+6)*mxtmls_sol+11)*mxtmls_sol+6)* ++ x mxtmls_sol)/24 ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (cou_sol(mxtmls_sol2),stat=fail(1)) ++ allocate (vdw_sol(mxtmls_sol2),stat=fail(2)) ++ allocate (shl_sol(mxtmls_sol),stat=fail(3)) ++ allocate (ebuf_sol1(mxebuf_sol),stat=fail(4)) ++ allocate (cou_sol_sic(mxtmls_sol2),stat=fail(5)) ++ allocate (cks_sol_sum(mxtmls_sol),stat=fail(6)) ++ allocate (ckc_sol_sum(mxtmls_sol),stat=fail(7)) ++ allocate (bnd_sol(mxtmls_sol),stat=fail(8)) ++ allocate (ang_sol(mxtmls_sol),stat=fail(9)) ++ allocate (dih_sol(mxtmls_sol),stat=fail(10)) ++ allocate (atmolt(mxatms_sol),stat=fail(11)) ++ allocate (en3_sol(mxtmls_sol3),stat=fail(12)) ++ allocate (en4_sol(mxtmls_sol4),stat=fail(13)) ++ allocate (qfix_sol(mxtmls_sol),stat=fail(14)) ++ allocate (elrc_sol(mxtmls_sol2),stat=fail(15)) ++ allocate (elrc_sol_sav(mxtmls_sol2),stat=fail(16)) ++ allocate (ebuf_sol2(mxebuf_sol),stat=fail(23)) ++ allocate (rigid_sol(mxtmls_sol),stat=fail(24)) ++ allocate (const_sol(mxtmls_sol),stat=fail(25)) ++ allocate (degfre_sol(mxtmls_sol),stat=fail(26)) ++ allocate (degrot_sol(mxtmls_sol),stat=fail(27)) ++ allocate (natm_sol(mxtmls_sol),stat=fail(28)) ++ allocate (lstgot_sol(mxatms_sol),stat=fail(29)) ++ allocate (temp_sol(mxtmls_sol),stat=fail(30)) ++ allocate (vxo_sol(mxatms_sol),stat=fail(31)) ++ allocate (vyo_sol(mxatms_sol),stat=fail(32)) ++ allocate (vzo_sol(mxatms_sol),stat=fail(33)) ++ allocate (vdw_sol_lng(mxtmls_sol2),stat=fail(34)) ++ allocate (cou_sol_lng(mxtmls_sol2),stat=fail(35)) ++ allocate (inv_sol(mxtmls_sol),stat=fail(36)) ++ allocate (weight_sav(mxatms_fre),stat=fail(37)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1030) ++ enddo ++ ++c initialise accumulators ++ ++ lcomp(:)=.false. ++ elrc_sol(:)=0.d0 ++ cou_sol(:)=0.d0 ++ vdw_sol(:)=0.d0 ++ en3_sol(:)=0.d0 ++ en4_sol(:)=0.d0 ++ bnd_sol(:)=0.d0 ++ ang_sol(:)=0.d0 ++ dih_sol(:)=0.d0 ++ inv_sol(:)=0.d0 ++ ++ return ++ end subroutine alloc_sol_arrays ++ ++ subroutine solva_temp(idnode,mxnode,natms,keyver) ++ ++c*********************************************************************** ++c ++c dl_poly routine for solvation module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,ii,idnode,mxnode,natms,keyver ++ real(8) vvx,vvy,vvz ++ ++ temp_sol(:)=0.d0 ++ ++ do i=idnode+1,natms,mxnode ++ ++ if(keyver.eq.0)then ++ ++ vvx=0.5d0*(vxx(i)+vxo_sol(i)) ++ vvy=0.5d0*(vyy(i)+vyo_sol(i)) ++ vvz=0.5d0*(vzz(i)+vzo_sol(i)) ++ ++ else ++ ++ vvx=vxx(i) ++ vvy=vyy(i) ++ vvz=vzz(i) ++ ++ endif ++ ++ temp_sol(atmolt(i))=temp_sol(atmolt(i))+weight(i)* ++ x (vvx*vvx+vvy*vvy+vvz*vvz)/(boltz*degfre_sol(atmolt(i))) ++ ++ enddo ++ ++c global sum ++ ++ if(mxnode.gt.1)call gdsum(temp_sol,mxtmls_sol,buffer) ++ ++ return ++ end subroutine solva_temp ++ ++ subroutine alloc_free_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine to allocate free energy arrays ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w.smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (ebuf_exc1(mxebuf_fre),stat=fail(1)) ++ allocate (ckc1(mxewld_fre),stat=fail(2)) ++ allocate (cks1(mxewld_fre),stat=fail(3)) ++ allocate (ckc2(mxewld_fre),stat=fail(4)) ++ allocate (cks2(mxewld_fre),stat=fail(5)) ++ allocate (cks_fre_sum(mxtmls_fre),stat=fail(6)) ++ allocate (ckc_fre_sum(mxtmls_fre),stat=fail(7)) ++ allocate (atm_fre(mxatms_fre),stat=fail(8)) ++ allocate (ebuf_exc2(mxebuf_fre),stat=fail(9)) ++ allocate (vxo_fre(mxatms_fre),stat=fail(10)) ++ allocate (vyo_fre(mxatms_fre),stat=fail(11)) ++ allocate (vzo_fre(mxatms_fre),stat=fail(12)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1030) ++ enddo ++ ++ return ++ ++ end subroutine alloc_free_arrays ++ ++ subroutine lrcorrect_fre(lfree,volm,elrc,virlrc) ++ ++c*********************************************************************** ++c ++c dl_poly routine for free energy module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w.smith aug 2008 ++c ++c*********************************************************************** ++ ++ logical lfree ++ real(8) volm,elrc,virlrc ++ ++ elrc=elrc_sav*(volm_sav/volm) ++ elrc2=elrc2_sav*(volm_sav/volm) ++ virlrc=virlrc_sav*(volm_sav/volm) ++ virlrc2=virlrc2_sav*(volm_sav/volm) ++ if(lfree)then ++ elrc_fre=elrc_fre_sav*(volm_sav/volm) ++ vlrc_fre=vlrc_fre_sav*(volm_sav/volm) ++ endif ++ ++ end subroutine lrcorrect_fre ++ ++ subroutine free_kinetic(lfrmas,idnode,mxnode,keyver) ++ ++c*********************************************************************** ++c ++c dl_poly routine for free energy module ++c calculate kinetic energy difference between states ++c ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008: parallel version ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lfrmas ++ integer i,idnode,mxnode,keyver ++ real(8) fac ++ ++ fac=dlambda ++ eng_kin_fre=0.d0 ++ ++ if(keyver.eq.0)then ++ ++ if(lfrmas)fac=dlambda/lambda1 ++ do i=ind_fre(1)+idnode,ind_fre(2),mxnode ++ ++ eng_kin_fre=eng_kin_fre- ++ x fac*weight(i)*((vxx(i)+vxo_fre(i))**2+ ++ x (vyy(i)+vyo_fre(i))**2+(vzz(i)+vzo_fre(i))**2) ++ ++ enddo ++ ++ if(lfrmas)fac=dlambda/lambda2 ++ do i=ind_fre(3)+idnode,ind_fre(4),mxnode ++ ++ eng_kin_fre=eng_kin_fre+ ++ x fac*weight(i)*((vxx(i)+vxo_fre(i))**2+ ++ x (vyy(i)+vyo_fre(i))**2+(vzz(i)+vzo_fre(i))**2) ++ ++ enddo ++ ++ eng_kin_fre=eng_kin_fre/8.d0 ++ ++ else ++ ++ if(lfrmas)fac=dlambda/lambda1 ++ do i=ind_fre(1)+idnode,ind_fre(2),mxnode ++ ++ eng_kin_fre=eng_kin_fre-fac*weight(i)*(vxx(i)**2+ ++ x vyy(i)**2+vzz(i)**2) ++ ++ enddo ++ ++ if(lfrmas)fac=dlambda/lambda2 ++ do i=ind_fre(3)+idnode,ind_fre(4),mxnode ++ ++ eng_kin_fre=eng_kin_fre+fac*weight(i)*(vxx(i)**2+ ++ x vyy(i)**2+vzz(i)**2) ++ ++ enddo ++ ++ eng_kin_fre=eng_kin_fre/2.d0 ++ ++ endif ++ ++c global sum ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=eng_kin_fre ++ call gdsum(buffer(1),1,buffer(2)) ++ eng_kin_fre=buffer(1) ++ ++ endif ++ ++ return ++ end subroutine free_kinetic ++ ++ subroutine freegen() ++ ++c*********************************************************************** ++c ++c dl_poly routine for free energy module: select mixing scheme ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w.smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,j,fac1,fac2 ++ real(8) sigma1,sigma2,acc,arg,gss,tt,pp,a1,a2,a3,a4,a5,err ++ ++ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ ++ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ ++ ++ if(mfree.eq.1)then ++ ++c linear mixing ++ ++ lambda1=(1.d0-pfree) ++ lambda2=pfree ++ dlambda=1.d0 ++ ++ elseif(mfree.eq.2)then ++ ++c nonlinear mixing ++ ++ lambda1=(1.d0-pfree)**kfree ++ lambda2=(1.d0-(1.d0-pfree)**kfree) ++ dlambda=dble(kfree)*(1.d0-pfree)**(kfree-1) ++ ++ elseif(mfree.eq.3)then ++ ++c trigonmetric mixing ++ ++ lambda2=0.5d0*(1.d0+sin(pi*(pfree-0.5d0))) ++ lambda1=1.d0-lambda2 ++ dlambda=0.5d0*pi*cos(pi*(pfree-0.5d0)) ++ ++ elseif(mfree.eq.4)then ++ ++c error function mixing ++ ++ acc=12.d0 ++ arg=2.d0*sqrt(2.302585093*acc) ++ gss=exp(-(arg*(pfree-0.5d0))**2) ++ tt=1.d0/(1.d0+pp*arg*abs(pfree-0.5d0)) ++ err=1.d0-tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*gss ++ lambda2=0.5d0*(1.d0+sign(err,(pfree-0.5d0))) ++ lambda1=1.d0-lambda2 ++ dlambda=gss*arg/sqrpi ++ ++ elseif(mfree.eq.5)then ++ ++c polynomial mixing ++ ++ sigma1=0.d0 ++ ++ do i=0,kfree-1 ++ ++ fac1=1 ++ fac2=1 ++ ++ do j=0,i-1 ++ ++ fac1=fac1*(kfree-1+i-j) ++ fac2=fac2*(i-j) ++ ++ enddo ++ ++ sigma1=sigma1+(dble(fac1/fac2))*pfree**i ++ ++ enddo ++ ++ lambda1=sigma1*(1.d0-pfree)**kfree ++ lambda2=1.d0-lambda1 ++ dlambda=sigma1*kfree*(1.d0-pfree)**(kfree-1) ++ ++ sigma2=0.d0 ++ ++ do i=1,kfree-1 ++ ++ fac1=1 ++ fac2=1 ++ ++ do j=0,i-1 ++ ++ fac1=fac1*(kfree-1+i-j) ++ fac2=fac2*(i-j) ++ ++ enddo ++ ++ sigma2=sigma2+(dble(fac1*i/fac2))*pfree**(i-1) ++ ++ enddo ++ ++ dlambda=dlambda-sigma2*(1.d0-pfree)**kfree ++ ++ else ++ ++c spline kernel mixing ++ ++ arg=pfree-0.5d0 ++ lambda2=2.d0*pfree-8.d0*arg**3*(1.d0-abs(arg))-0.5d0 ++ lambda1=1.d0-lambda2 ++ dlambda=2.d0+arg**2*(32.d0*abs(arg)-24.d0) ++ ++ endif ++ ++ return ++ end subroutine freegen ++ ++ subroutine free_energy_write(idnode,nstep,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing free energy file at selected ++c intervals in simulation ++c ++c copyright - daresbury laboratory ++c author - p.-a. cazade dec 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob ++ integer idnode,natms,nstep ++ real(8) engunit ++ ++ save newjob ++ data newjob/.true./ ++ ++ if(idnode.eq.0)then ++ ++c open the FREENG file if new job or file closed ++ ++ if(newjob)then ++ ++ newjob = .false. ++ open(nfrnwr,file='FREENG',position='append') ++ ++ endif ++ ++ if(nstep.eq.nfrn.or.nstep.eq.ifrn)then ++ ++ write(nfrnwr,'(80a1)')cfgname ++ ++ if(abs(engunit-9648.530821d0).le.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=electron Volts ')") ++ if(abs(engunit-418.4d0).le.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=kcal/mol ')") ++ if(abs(engunit-1.d2).le.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=kjoule/mol ')") ++ if(abs(engunit-boltz).lt.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=kelvin ')") ++ if(abs(engunit-1.d0).lt.1.d-10) write(nfrnwr, ++ x "(' ENERGY UNITS=DL_POLY Internal UNITS ')") ++ ++ write(nfrnwr,'(1p,4e16.8)')pfree,lambda1,lambda2,dlambda ++ ++ endif ++ ++ if(mod(nstep-nfrn,ifrn).eq.0)then ++ ++ write(nfrnwr,"(i10,1p,2e16.8)") ++ x nstep,eng_cfg_fre/engunit,vir_cfg_fre/engunit ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine free_energy_write ++ ++ subroutine alloc_exi_arrays(idnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine to allocate excited state arrays ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ integer, parameter :: nnn=15 ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ mxtmls_exc2=((mxtmls_exc+1)*mxtmls_exc)/2 ++ mxtmls_exc3=(((mxtmls_exc+3)*mxtmls_exc+2)*mxtmls_exc)/6 ++ mxtmls_exc4=((((mxtmls_exc+6)*mxtmls_exc+11)*mxtmls_exc+6)* ++ x mxtmls_exc)/24 ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (cou_exc(mxtmls_exc2),stat=fail(1)) ++ allocate (vdw_exc(mxtmls_exc2),stat=fail(2)) ++ allocate (bnd_exc(mxtmls_exc),stat=fail(3)) ++ allocate (ang_exc(mxtmls_exc),stat=fail(4)) ++ allocate (dih_exc(mxtmls_exc),stat=fail(5)) ++ allocate (en3_exc(mxtmls_exc3),stat=fail(6)) ++ allocate (en4_exc(mxtmls_exc4),stat=fail(7)) ++ allocate (shl_exc(mxtmls_exc),stat=fail(8)) ++ allocate (vdw_exc_lng(mxtmls_exc2),stat=fail(9)) ++ allocate (cou_exc_lng(mxtmls_exc2),stat=fail(10)) ++ allocate (inv_exc(mxtmls_exc),stat=fail(11)) ++ allocate (elrc_exc(mxtmls_exc2),stat=fail(12)) ++ allocate (elrc_exc_sav(mxtmls_exc2),stat=fail(13)) ++ allocate (qfix_exc(mxtmls_exc),stat=fail(14)) ++ allocate (cou_exc_sic(mxtmls_exc2),stat=fail(15)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1030) ++ enddo ++ ++c initialise accumulators ++ ++ bnd_exc(:)=0.d0 ++ ang_exc(:)=0.d0 ++ dih_exc(:)=0.d0 ++ inv_exc(:)=0.d0 ++ en3_exc(:)=0.d0 ++ en4_exc(:)=0.d0 ++ elrc_exc(:)=0.d0 ++ cou_exc(:)=0.d0 ++ vdw_exc(:)=0.d0 ++ ++ return ++ end subroutine alloc_exi_arrays ++ ++ subroutine update_ghost(idnode,mxnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine for excited state module ++c update the positions of ghost atoms ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,ii,idnode,mxnode ++ ++ if(ind_fre(1).lt.ind_fre(3))then ++ ++ ii=ind_fre(3) ++ ++ do i=ind_fre(1),ind_fre(2) ++ ++ xxx(ii)=xxx(i) ++ yyy(ii)=yyy(i) ++ zzz(ii)=zzz(i) ++ ++ ii=ii+1 ++ ++ enddo ++ ++ else ++ ++ ii=ind_fre(1) ++ ++ do i=ind_fre(3),ind_fre(4) ++ ++ xxx(ii)=xxx(i) ++ yyy(ii)=yyy(i) ++ zzz(ii)=zzz(i) ++ ++ ii=ii+1 ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine update_ghost ++ ++ subroutine copy_force(idnode,mxnode) ++ ++c*********************************************************************** ++c ++c dl_poly routine for excited state module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer i,ii,idnode,mxnode ++ ++ ii=ind_fre(3) ++ ++ do i=ind_fre(1),ind_fre(2) ++ ++ fxx(ii)=fxx(i) ++ fyy(ii)=fyy(i) ++ fzz(ii)=fzz(i) ++ ++ ii=ii+1 ++ ++ enddo ++ ++ return ++ end subroutine copy_force ++ ++ subroutine switch(elrc,virlrc) ++c*********************************************************************** ++c ++c dl_poly routine for switching system in excitation simulation ++c copyright - daresbury laboratory ++c author - w. smith sep 2008 ++c adapted from p.-a. cazade oct 2007 ++c ++c*********************************************************************** ++ ++ real(8) :: swap,elrc,virlrc ++ real(8), allocatable :: cou_sic_swp(:),qfix_swp(:) ++ real(8), allocatable :: elrc_swp(:) ++ ++ allocate(cou_sic_swp(mxtmls_exc2),qfix_swp(mxtmls_exc)) ++ allocate(elrc_swp(mxtmls_exc2)) ++ ++ swap=elrc ++ elrc=elrc2 ++ elrc2=swap ++ ++ swap=engsic0 ++ engsic0=engsic2 ++ engsic2=swap ++ ++ swap=virlrc ++ virlrc=virlrc2 ++ virlrc2=swap ++ ++ swap=elrc_sav ++ elrc_sav=elrc2_sav ++ elrc2_sav=swap ++ ++ swap=virlrc_sav ++ virlrc_sav=virlrc2_sav ++ virlrc2_sav=swap ++ ++ swap=qchg0 ++ qchg0=qchg2 ++ qchg2=swap ++ ++ cou_sic_swp(:)=cou_sol_sic(:) ++ cou_sol_sic(:)=cou_exc_sic(:) ++ cou_exc_sic(:)=cou_sic_swp(:) ++ ++ qfix_swp(:)=qfix_sol(:) ++ qfix_sol(:)=qfix_exc(:) ++ qfix_exc(:)=qfix_swp(:) ++ ++ elrc_swp(:)=elrc_sol(:) ++ elrc_sol(:)=elrc_exc(:) ++ elrc_exc(:)=elrc_swp(:) ++ ++ elrc_swp(:)=elrc_sol_sav(:) ++ elrc_sol_sav(:)=elrc_exc_sav(:) ++ elrc_exc_sav(:)=elrc_swp(:) ++ ++ deallocate(elrc_swp,cou_sic_swp,qfix_swp) ++ ++ return ++ ++ end subroutine switch ++ ++ subroutine lrcorrect_sol(lghost,volm) ++ ++c*********************************************************************** ++c ++c dl_poly routine for excited state module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ logical :: lghost ++ real(8) :: volm ++ ++ elrc_sol(:)=elrc_sol_sav(:)*(volm_sav/volm) ++ if(lghost)elrc_exc(:)=elrc_exc_sav(:)*(volm_sav/volm) ++ ++ return ++ end subroutine lrcorrect_sol ++ ++ subroutine switch_atm(lfrmas) ++ ++c*********************************************************************** ++c ++c dl_poly routine for excitation module ++c copyright - daresbury laboratory ++c author - p.-a. cazade oct 2007 ++c adapted - w.smith aug 2008 ++c ++c*********************************************************************** ++ ++ logical lfrmas ++ integer i,at1_swap,at2_swap ++ ++ at1_swap=ind_fre(1) ++ at2_swap=ind_fre(2) ++ ind_fre(1)=ind_fre(3) ++ ind_fre(2)=ind_fre(4) ++ ind_fre(3)=at1_swap ++ ind_fre(4)=at2_swap ++ ++ if(lfrmas)then ++ ++ do i=ind_fre(1),ind_fre(2) ++ ++ atm_fre(i)=1 ++ weight(i)=lambda1*weight_sav(i) ++ ++ enddo ++ ++ do i=ind_fre(3),ind_fre(4) ++ ++ atm_fre(i)=2 ++ weight(i)=lambda2*weight_sav(i) ++ ++ enddo ++ ++ else ++ ++ do i=ind_fre(1),ind_fre(2) ++ atm_fre(i)=1 ++ enddo ++ ++ do i=ind_fre(3),ind_fre(4) ++ atm_fre(i)=2 ++ enddo ++ ++ endif ++ ++ return ++ end subroutine switch_atm ++ ++ subroutine solvation_write ++ x (lexcite,lswitch,idnode,natms,nstep,nsolva,isolva, ++ x tstep,engunit,elrc) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing solva file at selected ++c intervals in simulation ++c ++c copyright - daresbury laboratory ++c author - p.-a. cazade jun 2007 ++c adapted - w. smith aug 2008 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob,lexcite,lswitch ++ integer idnode,natms,nstep,nsolva,isolva,i,j,k ++ integer mxtmls2,mxtmls3,mxtmls4 ++ real(8) tstep,engunit,elrc ++ character*80 aa,bb,cc,dd ++ ++ save newjob ++ data newjob/.true./ ++ ++ mxtmls2=((mxtmls+1)*mxtmls)/2 ++ mxtmls3=(((mxtmls+3)*mxtmls+2)*mxtmls)/6 ++ mxtmls4=((((mxtmls+6)*mxtmls+11)*mxtmls+6)*mxtmls)/24 ++ ++ if(idnode.eq.0)then ++ ++c open the SOLVAT file if new job or file closed ++ ++ if(newjob)then ++ ++ newjob=.false. ++ open(nsolwr,file='SOLVAT',position='append') ++ ++ endif ++ ++c write file header block ++ ++ if(nstep.eq.nsolva.or.nstep.eq.isolva)then ++ ++ write(nsolwr,'(80a1)')cfgname ++ ++ if(abs(engunit-9648.530821d0).le.1.d-10)write(nsolwr, ++ x "('ENERGY UNITS=electron Volts ')") ++ if(abs(engunit-418.4d0).le.1.d-10) write(nsolwr, ++ x "('ENERGY UNITS=kcal/mol ')") ++ if(abs(engunit-1.d2).le.1.d-10) write(nsolwr, ++ x "('ENERGY UNITS=kjoule/mol ')") ++ if(abs(engunit-boltz).lt.1.d-10) write(nsolwr, ++ x "('ENERGY UNITS=kelvin ')") ++ if(abs(engunit-1.d0).lt.1.d-10) write(nsolwr, ++ x "('ENERGY UNITS=DL_POLY Internal UNITS ')") ++ ++ write(nsolwr,'(2i10)')natms,mxtmls ++ write(nsolwr,'(1x,11a4)')' lex','lsw',' bnd',' ang', ++ x ' dih',' inv',' shl',' cou',' vdw',' 3bd',' 4bd' ++ write(nsolwr,'(11l4)')lexcite,lswitch,lcomp ++ ++ endif ++ ++c write out periodic data ++ ++ if(mod(nstep-nsolva,isolva).eq.0)then ++ ++c mark start of time step data ++ ++ if(lexcite)then ++ write(nsolwr,'("timestep",i10,f12.5,1p,2e14.6)') ++ x nstep,tstep,elrc/engunit,elrc2/engunit ++ else ++ write(nsolwr,'("timestep",i10,f12.5,1p,e14.6)') ++ x nstep,tstep,elrc/engunit ++ endif ++ ++c write intramolecular data ++ ++ write(nsolwr,'(1p,5e14.6)')temp_sol ++ if(lcomp(1))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')bnd_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')bnd_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')bnd_sol(:)/engunit ++ endif ++ endif ++ if(lcomp(2))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')ang_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')ang_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')ang_sol(:)/engunit ++ endif ++ endif ++ if(lcomp(3))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')dih_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')dih_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')dih_sol(:)/engunit ++ endif ++ endif ++ if(lcomp(4))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')inv_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')inv_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')inv_sol(:)/engunit ++ endif ++ endif ++ ++c write core-shell data ++ ++ if(lcomp(5))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')shl_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')shl_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')shl_sol(:)/engunit ++ endif ++ endif ++ ++c write coulombic data ++ ++ if(lcomp(6))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')cou_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')cou_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')cou_sol(:)/engunit ++ endif ++ endif ++ ++c write vdw data ++ ++ if(lcomp(7))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')vdw_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')vdw_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')vdw_sol(:)/engunit ++ endif ++ endif ++ ++c write 3-body data ++ ++ if(lcomp(8))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')en3_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')en3_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')en3_sol(:)/engunit ++ endif ++ endif ++ ++c write 4-body data ++ ++ if(lcomp(9))then ++ if(lexcite)then ++ write(nsolwr,'(1p,5e14.6)')en4_sol(:)/engunit ++ write(nsolwr,'(1p,5e14.6)')en4_exc(:)/engunit ++ else ++ write(nsolwr,'(1p,5e14.6)')en4_sol(:)/engunit ++ endif ++ endif ++ ++ endif ++ ++c close SOLVAT file at regular intervals ++ ++ if(.not.newjob.and.mod(nstep,ndump).eq.0)then ++ ++ close(nsolwr) ++ newjob=.true. ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine solvation_write ++ ++ end module solvation_module +diff -urN dl_class_1.9.orig/srcmod/spme_module.f dl_class_1.9/srcmod/spme_module.f +--- dl_class_1.9.orig/srcmod/spme_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/spme_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1175 @@ ++ module spme_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining spme arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use setup_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: csp(:),qqc(:,:,:),ffttable(:) ++ real(8), allocatable :: bspx(:,:), bspy(:,:), bspz(:,:) ++ real(8), allocatable :: bsdx(:,:), bsdy(:,:), bsdz(:,:) ++ integer, allocatable :: key1(:),key2(:),key3(:) ++ complex(8), allocatable :: ww1(:), ww2(:), ww3(:) ++ complex(8), allocatable :: qqq(:,:,:) ++ complex(8), allocatable :: bscx(:), bscy(:),bscz(:) ++CFFTW pointer, save :: fplan, bplan ++ ++ save csp,qqc,qqq,ww1,ww2,ww3,bscx,bscy,bscz,ffttable ++ save bspx,bspy,bspz,bsdx,bsdy,bsdz,key1,key2,key3 ++ ++ contains ++ ++ subroutine alloc_spme_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=9 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate (csp(mxspl),ffttable(mxftab),stat=fail(1)) ++ allocate (bspx(mxspme,mxspl),bspy(mxspme,mxspl),stat=fail(2)) ++ allocate (bspz(mxspme,mxspl),bsdx(mxspme,mxspl),stat=fail(3)) ++ allocate (bsdy(mxspme,mxspl),bsdz(mxspme,mxspl),stat=fail(4)) ++ allocate (bscx(kmaxd),bscy(kmaxe),bscz(kmaxf),stat=fail(5)) ++ allocate (key1(kmaxd),key2(kmaxe),key3(kmaxf),stat=fail(6)) ++ allocate (ww1(kmaxd),ww2(kmaxe),ww3(kmaxf),stat=fail(7)) ++ allocate (qqc(kmaxd,kmaxe,kmaxf),stat=fail(8)) ++ allocate (qqq(kmaxd,kmaxe,kmaxf),stat=fail(9)) ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1750) ++ enddo ++ ++ end subroutine alloc_spme_arrays ++ ++ subroutine bspcoe(nospl,kmax1,kmax2,kmax3) ++ ++c********************************************************************** ++c ++c dl_poly subroutine to calculate B-spline coefficients for ++c Euler exponential splines. ++c ++c copyright - daresbury laboratory 1998 ++c author - w. smith july 1998 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nospl,kmax1,kmax2,kmax3,k,i,j ++ complex(8) ccc ++ ++c calculate B-splines at knots ++ ++ csp(1)=0.d0 ++ csp(2)=1.d0 ++ ++ do k=3,nospl ++ ++ csp(k)=0.d0 ++ ++ do j=k,2,-1 ++ ++ csp(j)=(dble(j-1)*csp(j)+dble(k-j+1)*csp(j-1))/dble(k-1) ++ ++ enddo ++ ++ enddo ++ ++c calculate B-spline coefficients ++ ++ do i=0,kmax1-1 ++ ++ ccc=(0.d0,0.d0) ++ ++ do k=0,nospl-2 ++ ++ ccc=ccc+csp(k+2)*ww1(mod(i*k,kmax1)+1) ++ ++ enddo ++ ++ bscx(i+1)=ww1(mod(i*(nospl-1),kmax1)+1)/ccc ++ ++ enddo ++ ++ do i=0,kmax2-1 ++ ++ ccc=(0.d0,0.d0) ++ ++ do k=0,nospl-2 ++ ++ ccc=ccc+csp(k+2)*ww2(mod(i*k,kmax2)+1) ++ ++ enddo ++ ++ bscy(i+1)=ww2(mod(i*(nospl-1),kmax2)+1)/ccc ++ ++ enddo ++ ++ do i=0,kmax3-1 ++ ++ ccc=(0.d0,0.d0) ++ ++ do k=0,nospl-2 ++ ++ ccc=ccc+csp(k+2)*ww3(mod(i*k,kmax3)+1) ++ ++ enddo ++ ++ bscz(i+1)=ww3(mod(i*(nospl-1),kmax3)+1)/ccc ++ ++ enddo ++ ++ return ++ end subroutine bspcoe ++ ++ subroutine bspgen(idnode,mxnode,natms,nospl,txx,tyy,tzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to calculate B-splines for SPME method ++c ++c copyright - daresbury laboratory 1998 ++c author - w. smith july 1998 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer nospl,natms,idnode,mxnode,iatm0,iatm1,i,j,k ++ real(8) aaa,bbb,ccc,txx,tyy,tzz ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ ++c set up atoms numbers for nodes ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c construct B-splines ++ ++ do i=iatm0,iatm1 ++ ++ bsdx(i,1)=1.d0 ++ bsdy(i,1)=1.d0 ++ bsdz(i,1)=1.d0 ++ bsdx(i,2)=-1.d0 ++ bsdy(i,2)=-1.d0 ++ bsdz(i,2)=-1.d0 ++ bspx(i,1)=txx(i)-int(txx(i)) ++ bspy(i,1)=tyy(i)-int(tyy(i)) ++ bspz(i,1)=tzz(i)-int(tzz(i)) ++ bspx(i,2)=1.d0-txx(i)+int(txx(i)) ++ bspy(i,2)=1.d0-tyy(i)+int(tyy(i)) ++ bspz(i,2)=1.d0-tzz(i)+int(tzz(i)) ++ ++ enddo ++ ++ do k=3,nospl ++ ++ do i=iatm0,iatm1 ++ ++ bspx(i,k)=0.d0 ++ bspy(i,k)=0.d0 ++ bspz(i,k)=0.d0 ++ ++ enddo ++ ++ do j=k,2,-1 ++ ++ if(k.eq.nospl)then ++ ++ do i=iatm0,iatm1 ++ ++ bsdx(i,j)=bspx(i,j)-bspx(i,j-1) ++ bsdy(i,j)=bspy(i,j)-bspy(i,j-1) ++ bsdz(i,j)=bspz(i,j)-bspz(i,j-1) ++ ++ enddo ++ ++ endif ++ ++ do i=iatm0,iatm1 ++ ++ aaa=txx(i)+dble(j-1)-int(txx(i)) ++ bbb=tyy(i)+dble(j-1)-int(tyy(i)) ++ ccc=tzz(i)+dble(j-1)-int(tzz(i)) ++ bspx(i,j)=(aaa*bspx(i,j)+(dble(k)-aaa)*bspx(i,j-1))/ ++ x dble(k-1) ++ bspy(i,j)=(bbb*bspy(i,j)+(dble(k)-bbb)*bspy(i,j-1))/ ++ x dble(k-1) ++ bspz(i,j)=(ccc*bspz(i,j)+(dble(k)-ccc)*bspz(i,j-1))/ ++ x dble(k-1) ++ ++ enddo ++ ++ enddo ++ ++ if(k.eq.nospl)then ++ ++ do i=iatm0,iatm1 ++ ++ bsdx(i,1)=bspx(i,1) ++ bsdy(i,1)=bspy(i,1) ++ bsdz(i,1)=bspz(i,1) ++ ++ enddo ++ ++ endif ++ ++ do i=iatm0,iatm1 ++ ++ bspx(i,1)=(txx(i)-int(txx(i)))*bspx(i,1)/dble(k-1) ++ bspy(i,1)=(tyy(i)-int(tyy(i)))*bspy(i,1)/dble(k-1) ++ bspz(i,1)=(tzz(i)-int(tzz(i)))*bspz(i,1)/dble(k-1) ++ ++ enddo ++ ++ enddo ++ ++ return ++ end subroutine bspgen ++ ++ subroutine ewald_spme ++ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, ++ x engcpe,vircpe,alpha,volm,epsq) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces in a ++c periodic system using the smoothed particle mesh ewald method ++c due to Essmann et al J. Chem. Phys. 103 (1995) 8577. ++c ++c parallel replicated data version (part 1) ++c ++c copyright - daresbury laboratory 1998 ++c author - w. smith july 1998 ++c additional FFT code - j. geronowicz sept 1999 ++c ++c part 1 - reciprocal space terms (fourier part) ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical newjob,lconsw ++ ++ integer idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl ++ integer npass,i,nnn,ipass,l,ll,k,kk,j,jj,fail,iatm0,iatm1 ++ real(8) engcpe,vircpe,alpha,volm,epsq,omg,bb1,bb2,bb3,qchg ++ real(8) twopi,engsic,rvolm,ralph,shiftx,shifty,shiftz,det,qfix ++ real(8) tx,ty,tz,rcpcut,rcpct2,rkx1,rky1,rkz1,rkx2,rky2,rkz2 ++ real(8) rkx3,rky3,rkz3,rksq,akv,eng1,den,scal1,tmp,rclprp ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++CESSL integer inc2,inc3 ++CSGIC real(8) nauxfft(4) ++ ++ dimension omg(9),rclprp(10) ++ complex(8) cpetot,vterm ++ save newjob,engsic,qchg,iatm0,iatm1 ++ ++ data newjob/.true./,fail/0/ ++CSGIC data nauxfft/3,0,0,0/ ++ ++c allocate temporary arrays ++ ++ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1760) ++ ++ npass=1 ++ lconsw=.true. ++ twopi=2.d0*pi ++ ++ if(newjob)then ++ ++ newjob=.false. ++ ++c set up atoms numbers for nodes ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c calculate self interaction correction and net system charge ++ ++ qchg=0.d0 ++ engsic=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ qchg=qchg+chge(i) ++ engsic=engsic+chge(i)**2 ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=qchg ++ buffer(2)=engsic ++ call gdsum(buffer(1),2,buffer(3)) ++ qchg =buffer(1) ++ engsic=buffer(2) ++ ++ endif ++ ++ engsic=-r4pie0/epsq*alpha*engsic/sqrpi ++ ++c initialise the complex exponential arrays ++ ++CCRAY call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) ++CESSL call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) ++CFFTW call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) ++CSGIC call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) ++ ++c initialise the default fft routine ++ ++ call dlpfft3(1,1,kmax1,kmax2,kmax3,key1,key2,key3, ++ x ww1,ww2,ww3,qqq) ++ ++c calculate B-spline coefficients ++ ++ call bspcoe(nospl,kmax1,kmax2,kmax3) ++ ++ endif ++ ++c initialise coulombic potential energy ++ ++ engcpe=0.d0 ++ vircpe=0.d0 ++ ++c initalize stress tensor working arrays ++ ++ do i = 1,9 ++ omg(i) = 0.d0 ++ enddo ++ ++c set working parameters ++ ++ rvolm=twopi/volm ++ ralph=-0.25d0/alpha**2 ++ ++c set switch for TO, RD and HP boundary conditions ++ ++ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) then ++ ++ npass=2 ++ lconsw=.false. ++ rvolm=0.5d0*rvolm ++ shiftx=0.5d0*dble(kmax1) ++ shifty=0.5d0*dble(kmax2) ++ shiftz=0.5d0*dble(kmax3) ++ if(imcon.eq.7)shiftz=0.d0 ++ ++ endif ++ ++c convert cell coordinates to fractional coordinates ++ ++ call invert(cell,rcell,det) ++ if(abs(det).lt.1.d-6)call error(idnode,120) ++ ++ do i=iatm0,iatm1 ++ ++ txx(i)=dble(kmax1)*(rcell(1)*xxx(i)+rcell(4)*yyy(i)+ ++ x rcell(7)*zzz(i)+0.5d0) ++ tyy(i)=dble(kmax2)*(rcell(2)*xxx(i)+rcell(5)*yyy(i)+ ++ x rcell(8)*zzz(i)+0.5d0) ++ tzz(i)=dble(kmax3)*(rcell(3)*xxx(i)+rcell(6)*yyy(i)+ ++ x rcell(9)*zzz(i)+0.5d0) ++ ++ enddo ++ ++c construct B-splines for atoms ++ ++ call bspgen(idnode,mxnode,natms,nospl,txx,tyy,tzz) ++ ++c zero 3D charge array ++ ++ nnn=kmaxd*kmaxe*kmaxf ++ call set_block(nnn,0.d0,qqc) ++ ++c construct 3D charge array ++ ++ do ipass=1,npass ++ ++ do i=iatm0,iatm1 ++ ++ do l=1,nospl ++ ++ ll=int(tzz(i))-l+2 ++ if(ll.gt.kmax3)ll=1 ++ if(ll.lt.1)ll=ll+kmax3 ++ do k=1,nospl ++ ++ kk=int(tyy(i))-k+2 ++ if(kk.gt.kmax2)kk=1 ++ if(kk.lt.1)kk=kk+kmax2 ++ ++ do j=1,nospl ++ ++ jj=int(txx(i))-j+2 ++ if(jj.gt.kmax1)jj=1 ++ if(jj.lt.1)jj=jj+kmax1 ++ ++ qqc(jj,kk,ll)=qqc(jj,kk,ll)+ ++ x chge(i)*bspx(i,j)*bspy(i,k)*bspz(i,l) ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ if(.not.lconsw)then ++ ++ do i=iatm0,iatm1 ++ ++ tx=txx(i)-shiftx ++ ty=tyy(i)-shifty ++ tz=tzz(i)-shiftz ++ txx(i)=txx(i)-sign(shiftx,tx) ++ tyy(i)=tyy(i)-sign(shifty,ty) ++ tzz(i)=tzz(i)-sign(shiftz,tz) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c global sum of charge array ++ ++ if(mxnode.gt.1) call gdsum(qqc,nnn,buffer) ++ ++c load charge array into complex array for FFT ++ ++ call cpy_rtc(nnn,qqc,qqq) ++ ++c calculate inverse 3D FFT of charge array (in place). ++ ++CFFTW call fftwnd_f77_one(fplan,qqq,0) ++ ++CESSL inc2=kmaxd ++CESSL inc3=kmaxd*kmaxe ++CESSL call dcft3(qqq,inc2,inc3,qqq,inc2,inc3,kmax1,kmax2,kmax3, ++CESSL x -1,1.d0,buffer,mxbuff) ++ ++CSGIC call zzfft3d( -1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, ++CSGIC x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) ++ ++CCRAY call ccfft3d( -1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, ++CCRAY x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) ++ ++ call dlpfft3(0,1,kmax1,kmax2,kmax3,key1,key2,key3, ++ x ww1,ww2,ww3,qqq) ++ ++c set reciprocal space cutoff ++ ++ call dcell(rcell,rclprp) ++ ++ rcpcut=0.5d0*min(dble(kmax1)*rclprp(7),dble(kmax2)*rclprp(8), ++ x dble(kmax3)*rclprp(9)) ++ rcpcut=rcpcut*1.05d0*twopi ++ rcpct2=rcpcut**2 ++ ++c calculate convolution of charge array with gaussian function ++ ++ do l=1,kmax3 ++ ++ ll=l-1 ++ if(l.gt.kmax3/2)ll=l-kmax3-1 ++ tmp=twopi*dble(ll) ++ rkx1=tmp*rcell(3) ++ rky1=tmp*rcell(6) ++ rkz1=tmp*rcell(9) ++ bb3=real(bscz(l)*conjg(bscz(l))) ++ ++ do k=1,kmax2 ++ ++ kk=k-1 ++ if(k.gt.kmax2/2)kk=k-kmax2-1 ++ tmp=twopi*dble(kk) ++ rkx2=rkx1+tmp*rcell(2) ++ rky2=rky1+tmp*rcell(5) ++ rkz2=rkz1+tmp*rcell(8) ++ bb2=bb3*real(bscy(k)*conjg(bscy(k))) ++ ++ do j=1,kmax1 ++ ++ jj=j-1 ++ if(j.gt.kmax1/2)jj=j-kmax1-1 ++ tmp=twopi*dble(jj) ++ rkx3=rkx2+tmp*rcell(1) ++ rky3=rky2+tmp*rcell(4) ++ rkz3=rkz2+tmp*rcell(7) ++ bb1=bb2*real(bscx(j)*conjg(bscx(j))) ++ ++ rksq=rkx3*rkx3+rky3*rky3+rkz3*rkz3 ++ ++ if(rksq.gt.1.d-6.and.rksq.le.rcpct2)then ++ ++ vterm=bb1*exp(ralph*rksq)/rksq*qqq(j,k,l) ++ akv=2.d0*(1.d0/rksq-ralph)*real(vterm*conjg(qqq(j,k,l))) ++ omg(1)=omg(1)-rkx3*rkx3*akv ++ omg(5)=omg(5)-rky3*rky3*akv ++ omg(9)=omg(9)-rkz3*rkz3*akv ++ omg(2)=omg(2)-rkx3*rky3*akv ++ omg(3)=omg(3)-rkx3*rkz3*akv ++ omg(6)=omg(6)-rky3*rkz3*akv ++ qqq(j,k,l)=vterm ++ ++ else ++ ++ qqq(j,k,l)=(0.d0,0.d0) ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++CFFTW call fftwnd_f77_one(bplan,qqq,0) ++CESSL call dcft3(qqq,inc2,inc3,qqq,inc2,inc3,kmax1,kmax2,kmax3, ++CESSL x 1,1.d0,buffer,mxbuff) ++ ++CSGIC call zzfft3d( 1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, ++CSGIC x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) ++ ++CCRAY call ccfft3d( 1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, ++CCRAY x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) ++ ++ call dlpfft3(0,-1,kmax1,kmax2,kmax3,key1,key2,key3, ++ x ww1,ww2,ww3,qqq) ++ ++c calculate atomic forces ++ ++ call spme_for ++ x (idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,rvolm, ++ x epsq,txx,tyy,tzz) ++ ++c complete product of charge array and its gaussian convolution ++ ++ call ele_prd(nnn,qqq,qqc,qqq) ++ ++c correction for charged systems ++ ++ qfix=-(0.5d0*pi*r4pie0/epsq)*((qchg/alpha)**2/volm)/ ++ x dble(mxnode) ++ ++c calculate total energy ++ ++ call scl_csum(nnn,cpetot,qqq) ++ ++ eng1=real(cpetot) ++ den=1.d0/dble(npass) ++ engcpe=engcpe+(den*rvolm*r4pie0*eng1/epsq+engsic)/ ++ x dble(mxnode)+qfix ++ ++c calculate stress tensor (symmetrical) ++ ++ scal1=den*rvolm*r4pie0/(epsq*dble(mxnode)) ++ stress(1) = stress(1)+scal1*(omg(1)+eng1)+qfix ++ stress(2) = stress(2)+scal1*omg(2) ++ stress(3) = stress(3)+scal1*omg(3) ++ stress(4) = stress(4)+scal1*omg(2) ++ stress(5) = stress(5)+scal1*(omg(5)+eng1)+qfix ++ stress(6) = stress(6)+scal1*omg(6) ++ stress(7) = stress(7)+scal1*omg(3) ++ stress(8) = stress(8)+scal1*omg(6) ++ stress(9) = stress(9)+scal1*(omg(9)+eng1)+qfix ++ ++c virial term ++ ++ vircpe=vircpe-scal1*(omg(1)+omg(5)+omg(9)+3.d0*eng1)-3.d0*qfix ++ ++c deallocate temporary arrays ++ ++ deallocate (txx,tyy,tzz,stat=fail) ++ ++ return ++ end subroutine ewald_spme ++ ++ subroutine spme_for ++ x (idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,rvolm, ++ x epsq,txx,tyy,tzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating coulombic forces in a ++c periodic system using smoothed particle mesh ewald method ++c ++c parallel replicated data version (part 1) ++c ++c copyright - daresbury laboratory 1998 ++c author - w. smith oct 1998 ++c ++c part 1 - reciprocal space terms (fourier part) ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,i,ll ++ integer iatm0,iatm1,kk,k,j,jj,l ++ real(8) rvolm,epsq,txx,tyy,tzz,fff,fac,bdx,bdy,bdz ++ real(8) det,qsum ++ ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension fff(3) ++ ++ fac=-2.d0*rvolm*r4pie0/epsq ++ call invert(cell,rcell,det) ++ ++c set up atom numbers for nodes ++ ++ iatm0 = (idnode*natms)/mxnode + 1 ++ iatm1 = ((idnode+1)*natms)/mxnode ++ ++c calculate forces ++ ++ do i=iatm0,iatm1 ++ ++ fxx(i)=0.d0 ++ fyy(i)=0.d0 ++ fzz(i)=0.d0 ++ ++ do l=1,nospl ++ ++ ll=int(tzz(i))-l+2 ++ if(ll.gt.kmax3)ll=1 ++ if(ll.lt.1)ll=ll+kmax3 ++ ++ do k=1,nospl ++ ++ kk=int(tyy(i))-k+2 ++ if(kk.gt.kmax2)kk=1 ++ if(kk.lt.1)kk=kk+kmax2 ++ ++ do j=1,nospl ++ ++ jj=int(txx(i))-j+2 ++ if(jj.gt.kmax1)jj=1 ++ if(jj.lt.1)jj=jj+kmax1 ++ ++ qsum=real(qqq(jj,kk,ll)) ++ bdx=qsum*bsdx(i,j)*bspy(i,k)*bspz(i,l)*dble(kmax1) ++ bdy=qsum*bspx(i,j)*bsdy(i,k)*bspz(i,l)*dble(kmax2) ++ bdz=qsum*bspx(i,j)*bspy(i,k)*bsdz(i,l)*dble(kmax3) ++ ++ fxx(i)=fxx(i)+fac*chge(i)*(bdx*rcell(1)+bdy*rcell(2)+ ++ x bdz*rcell(3)) ++ fyy(i)=fyy(i)+fac*chge(i)*(bdx*rcell(4)+bdy*rcell(5)+ ++ x bdz*rcell(6)) ++ fzz(i)=fzz(i)+fac*chge(i)*(bdx*rcell(7)+bdy*rcell(8)+ ++ x bdz*rcell(9)) ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++ enddo ++ ++c remove COM drift arising from SPME approximations ++ ++ fff(1)=0.d0 ++ fff(2)=0.d0 ++ fff(3)=0.d0 ++ ++ do i=iatm0,iatm1 ++ ++ fff(1)=fff(1)+fxx(i) ++ fff(2)=fff(2)+fyy(i) ++ fff(3)=fff(3)+fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)call gdsum(fff,3,buffer) ++ ++ fff(1)=fff(1)/dble(natms) ++ fff(2)=fff(2)/dble(natms) ++ fff(3)=fff(3)/dble(natms) ++ ++ do i=iatm0,iatm1 ++ ++ fxx(i)=fxx(i)-fff(1) ++ fyy(i)=fyy(i)-fff(2) ++ fzz(i)=fzz(i)-fff(3) ++ ++ enddo ++ ++ return ++ end subroutine spme_for ++ ++ subroutine dlpfft3 ++ x (ind,isw,ndiv1,ndiv2,ndiv3,key1,key2,key3,ww1,ww2,ww3,aaa) ++ ++c*********************************************************************** ++c ++c dl-poly 3D fast fourier transform routine (in place) ++c ++c copyright daresbury laboratory 1998 ++c author w smith july 1998 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lkx,lky,lkz ++ integer ind,isw,ndiv1,ndiv2,ndiv3,key1,key2,key3,i,idm,kkk ++ integer nu1,nu2,nu3,iii,jjj,j,jj2,num,l,kk1,k12,k ++ real(8) tpi,arg ++ ++ dimension key1(ndiv1),key2(ndiv2),key3(ndiv3) ++ complex(8) ww1(ndiv1),ww2(ndiv2),ww3(ndiv3) ++ complex(8) ttt,aaa(ndiv1,ndiv2,ndiv3) ++ save nu1,nu2,nu3 ++ ++ data tpi/6.283185307179586d0/ ++ ++ if(ind.gt.0)then ++ ++c check FFT array dimensions ++ ++ idm=1 ++ lkx=.true. ++ lky=.true. ++ lkz=.true. ++ ++ do i=1,30 ++ ++ idm=2*idm ++ ++ if(idm.eq.ndiv1)then ++ ++ lkx=.false. ++ nu1=i ++ ++ endif ++ if(idm.eq.ndiv2)then ++ ++ lky=.false. ++ nu2=i ++ ++ endif ++ if(idm.eq.ndiv3)then ++ ++ lkz=.false. ++ nu3=i ++ ++ endif ++ ++ enddo ++ ++ if(lkx.or.lky.or.lkz)then ++ ++ write(*,*)'error - FFT array not 2**N' ++ stop ++ ++ endif ++ ++c set reverse bit address arrays ++ ++ do kkk=1,ndiv1 ++ ++ iii=0 ++ jjj=kkk-1 ++ ++ do j=1,nu1 ++ ++ jj2=jjj/2 ++ iii=2*(iii-jj2)+jjj ++ jjj=jj2 ++ ++ enddo ++ ++ key1(kkk)=iii+1 ++ ++ enddo ++ ++ do kkk=1,ndiv2 ++ ++ iii=0 ++ jjj=kkk-1 ++ ++ do j=1,nu2 ++ ++ jj2=jjj/2 ++ iii=2*(iii-jj2)+jjj ++ jjj=jj2 ++ ++ enddo ++ ++ key2(kkk)=iii+1 ++ ++ enddo ++ ++ do kkk=1,ndiv3 ++ ++ iii=0 ++ jjj=kkk-1 ++ ++ do j=1,nu3 ++ ++ jj2=jjj/2 ++ iii=2*(iii-jj2)+jjj ++ jjj=jj2 ++ ++ enddo ++ ++ key3(kkk)=iii+1 ++ ++ enddo ++ ++c initialise complex exponential factors ++ ++ ww1(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv1/2 ++ ++ arg=(tpi/dble(ndiv1))*dble(i) ++ ww1(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww1(ndiv1+1-i)=conjg(ww1(i+1)) ++ ++ enddo ++ ++ ww2(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv2/2 ++ ++ arg=(tpi/dble(ndiv2))*dble(i) ++ ww2(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww2(ndiv2+1-i)=conjg(ww2(i+1)) ++ ++ enddo ++ ++ ww3(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv3/2 ++ ++ arg=(tpi/dble(ndiv3))*dble(i) ++ ww3(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww3(ndiv3+1-i)=conjg(ww3(i+1)) ++ ++ enddo ++ ++ return ++ ++ endif ++ ++c take conjugate of exponentials if required ++ ++ if(isw.lt.0)then ++ ++ do i=1,ndiv1 ++ ++ ww1(i)=conjg(ww1(i)) ++ ++ enddo ++ ++ do i=1,ndiv2 ++ ++ ww2(i)=conjg(ww2(i)) ++ ++ enddo ++ ++ do i=1,ndiv3 ++ ++ ww3(i)=conjg(ww3(i)) ++ ++ enddo ++ ++ endif ++ ++c perform fourier transform in X direction ++ ++ kkk=0 ++ num=ndiv1/2 ++ ++ do l=1,nu1 ++ ++ do while(kkk.lt.ndiv1) ++ ++ do i=1,num ++ ++ iii=key1(kkk/num+1) ++ kk1=kkk+1 ++ k12=kk1+num ++ ++ do j=1,ndiv2 ++ ++ do k=1,ndiv3 ++ ++ ttt=aaa(k12,j,k)*ww1(iii) ++ aaa(k12,j,k)=aaa(kk1,j,k)-ttt ++ aaa(kk1,j,k)=aaa(kk1,j,k)+ttt ++ ++ enddo ++ ++ enddo ++ ++ kkk=kkk+1 ++ ++ enddo ++ ++ kkk=kkk+num ++ ++ enddo ++ ++ kkk=0 ++ num=num/2 ++ ++ enddo ++ ++c unscramble the fft using bit address array ++ ++ do kkk=1,ndiv1 ++ ++ iii=key1(kkk) ++ ++ if(iii.gt.kkk)then ++ ++ do j=1,ndiv2 ++ ++ do k=1,ndiv3 ++ ++ ttt=aaa(kkk,j,k) ++ aaa(kkk,j,k)=aaa(iii,j,k) ++ aaa(iii,j,k)=ttt ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c perform fourier transform in Y direction ++ ++ kkk=0 ++ num=ndiv2/2 ++ ++ do l=1,nu2 ++ ++ do while(kkk.lt.ndiv2) ++ ++ do i=1,num ++ ++ iii=key2(kkk/num+1) ++ kk1=kkk+1 ++ k12=kk1+num ++ ++ do j=1,ndiv1 ++ ++ do k=1,ndiv3 ++ ++ ttt=aaa(j,k12,k)*ww2(iii) ++ aaa(j,k12,k)=aaa(j,kk1,k)-ttt ++ aaa(j,kk1,k)=aaa(j,kk1,k)+ttt ++ ++ enddo ++ ++ enddo ++ ++ kkk=kkk+1 ++ ++ enddo ++ ++ kkk=kkk+num ++ ++ enddo ++ ++ kkk=0 ++ num=num/2 ++ ++ enddo ++ ++c unscramble the fft using bit address array ++ ++ do kkk=1,ndiv2 ++ ++ iii=key2(kkk) ++ ++ if(iii.gt.kkk)then ++ ++ do j=1,ndiv1 ++ ++ do k=1,ndiv3 ++ ++ ttt=aaa(j,kkk,k) ++ aaa(j,kkk,k)=aaa(j,iii,k) ++ aaa(j,iii,k)=ttt ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c perform fourier transform in Z direction ++ ++ kkk=0 ++ num=ndiv3/2 ++ ++ do l=1,nu3 ++ ++ do while(kkk.lt.ndiv3) ++ ++ do i=1,num ++ ++ iii=key3(kkk/num+1) ++ kk1=kkk+1 ++ k12=kk1+num ++ ++ do j=1,ndiv1 ++ ++ do k=1,ndiv2 ++ ++ ttt=aaa(j,k,k12)*ww3(iii) ++ aaa(j,k,k12)=aaa(j,k,kk1)-ttt ++ aaa(j,k,kk1)=aaa(j,k,kk1)+ttt ++ ++ enddo ++ ++ enddo ++ ++ kkk=kkk+1 ++ ++ enddo ++ ++ kkk=kkk+num ++ ++ enddo ++ ++ kkk=0 ++ num=num/2 ++ ++ enddo ++ ++c unscramble the fft using bit address array ++ ++ do kkk=1,ndiv3 ++ ++ iii=key3(kkk) ++ ++ if(iii.gt.kkk)then ++ ++ do j=1,ndiv1 ++ ++ do k=1,ndiv2 ++ ++ ttt=aaa(j,k,kkk) ++ aaa(j,k,kkk)=aaa(j,k,iii) ++ aaa(j,k,iii)=ttt ++ ++ enddo ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c restore exponentials to unconjugated values if necessary ++ ++ if(isw.lt.0)then ++ ++ do i=1,ndiv1 ++ ++ ww1(i)=conjg(ww1(i)) ++ ++ enddo ++ ++ do i=1,ndiv2 ++ ++ ww2(i)=conjg(ww2(i)) ++ ++ enddo ++ ++ do i=1,ndiv3 ++ ++ ww3(i)=conjg(ww3(i)) ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine dlpfft3 ++ ++ subroutine spl_cexp(ndiv1,ndiv2,ndiv3,ww1,ww2,ww3) ++ ++c*********************************************************************** ++c ++c dl-poly routine to create complex exponential arrays for ++c b-splines ++c ++c copyright daresbury laboratory 1998 ++c author w smith oct 1998 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer ndiv1,ndiv2,ndiv3,i ++ real(8) tpi,arg ++ complex(8) ww1(ndiv1),ww2(ndiv2),ww3(ndiv3) ++ ++ data tpi/6.283185307179586d0/ ++ ++c initialise complex exponential factors ++ ++ ww1(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv1/2 ++ ++ arg=(tpi/dble(ndiv1))*dble(i) ++ ww1(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww1(ndiv1+1-i)=conjg(ww1(i+1)) ++ ++ enddo ++ ++ ww2(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv2/2 ++ ++ arg=(tpi/dble(ndiv2))*dble(i) ++ ww2(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww2(ndiv2+1-i)=conjg(ww2(i+1)) ++ ++ enddo ++ ++ ww3(1)=(1.d0,0.d0) ++ ++ do i=1,ndiv3/2 ++ ++ arg=(tpi/dble(ndiv3))*dble(i) ++ ww3(i+1)=cmplx(cos(arg),sin(arg),kind=8) ++ ww3(ndiv3+1-i)=conjg(ww3(i+1)) ++ ++ enddo ++ ++ return ++ end subroutine spl_cexp ++ ++ end module spme_module +diff -urN dl_class_1.9.orig/srcmod/temp_scalers_module.f dl_class_1.9/srcmod/temp_scalers_module.f +--- dl_class_1.9.orig/srcmod/temp_scalers_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/temp_scalers_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,768 @@ ++ module temp_scalers_module ++ ++c*********************************************************************** ++c ++c dl_poly module for temperature scaling routines ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ use config_module ++ use core_shell_module ++ use error_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use utility_module ++ ++ contains ++ ++ subroutine quench(imcon,idnode,mxnode,natms,nscons,tolnce) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for quenching the bond energies in the ++c initial structure of a molecule defined by constraints ++c ++c copyright - daresbury laboratory 1992 ++c author w.smith november 1992 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical safe ++ integer imcon,idnode,mxnode,natms,nscons,i,j,k,icyc ++ integer fail ++ real(8) tolnce,ddd,esig,vvv,ww1,ww2 ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: uxx(:),uyy(:),uzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++ dimension fail(3) ++ ++ data fail/0,0,0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) ++ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(3)) ++ ++ do i=1,3 ++ if(fail(i).ne.0)call error(idnode,1770) ++ enddo ++ ++c calculate bond vectors ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c normalise bond vectors ++ ++ do k=1,nscons ++ ++ ddd=sqrt(dxt(k)**2+dyt(k)**2+dzt(k)**2) ++ ++ dxt(k)=dxt(k)/ddd ++ dyt(k)=dyt(k)/ddd ++ dzt(k)=dzt(k)/ddd ++ ++ enddo ++ ++c start of quenching cycle ++ ++ icyc=0 ++ safe=.false. ++ do while(.not.safe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c initialise velocity correction arrays ++ ++ do i=1,natms ++ ++ uxx(i)=0.d0 ++ uyy(i)=0.d0 ++ uzz(i)=0.d0 ++ ++ enddo ++ ++c calculate velocity corrections and error ++ ++ esig=0.d0 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ vvv=dxt(k)*(vxx(i)-vxx(j))+dyt(k)*(vyy(i)-vyy(j))+ ++ x dzt(k)*(vzz(i)-vzz(j)) ++ ++ esig=max(esig,abs(vvv)) ++ ++ ww1=weight(j)*vvv/(weight(i)+weight(j)) ++ ww2=weight(i)*vvv/(weight(i)+weight(j)) ++ uxx(i)=uxx(i)-ww1*dxt(k) ++ uyy(i)=uyy(i)-ww1*dyt(k) ++ uzz(i)=uzz(i)-ww1*dzt(k) ++ uxx(j)=uxx(j)+ww2*dxt(k) ++ uyy(j)=uyy(j)+ww2*dyt(k) ++ uzz(j)=uzz(j)+ww2*dzt(k) ++ ++ enddo ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++ if(.not.safe)then ++ ++c transport velocity adjustments to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ call shmove ++ x (idnode,mxnode,natms,lashap,lishap,uxx,uyy,uzz, ++ x xxt,yyt,zzt,buffer) ++ ++ endif ++ ++c update velocities ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ vxx(i)=vxx(i)+uxx(i)/dble(listme(i)) ++ vyy(i)=vyy(i)+uyy(i)/dble(listme(i)) ++ vzz(i)=vzz(i)+uzz(i)/dble(listme(i)) ++ vxx(j)=vxx(j)+uxx(j)/dble(listme(j)) ++ vyy(j)=vyy(j)+uyy(j)/dble(listme(j)) ++ vzz(j)=vzz(j)+uzz(j)/dble(listme(j)) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c error exit if quenching fails ++ ++ if(.not.safe)call error(idnode,70) ++ ++c splice velocity arrays across nodes ++ ++ if(mxnode.gt.1) call splice ++ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail(1)) ++ deallocate (uxx,uyy,uzz,stat=fail(2)) ++ deallocate (dxt,dyt,dzt,stat=fail(3)) ++ ++ return ++ end subroutine quench ++ ++ subroutine quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to convert atomic velocities to rigid body ++c c.o.m. and angular velocity ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1993. ++c author - t.forester nov 1993. ++c amended - t.forester dec 1994 : block data. ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,mxnode,natms,ngrp,fail,ig,jr,id ++ integer igrp1,igrp2,i,j ++ real(8) rot,wxx,wyy,wzz ++ ++ dimension rot(9) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ ++ data fail/0/ ++ ++c allocate work arrays ++ ++ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) ++ if(fail.ne.0)call error(idnode,1780) ++ ++c block indices for groups ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c translate atomic velocites to com velocity & angular velocity ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ gvxx(ig)=0.d0 ++ gvyy(ig)=0.d0 ++ gvzz(ig)=0.d0 ++ omx(ig)=0.d0 ++ omy(ig)=0.d0 ++ omz(ig)=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr =jr+1 ++ i =lstrgd(jr) ++ ++c centre of mass momentum ++ ++ gvxx(ig)=gvxx(ig)+weight(i)*vxx(i) ++ gvyy(ig)=gvyy(ig)+weight(i)*vyy(i) ++ gvzz(ig)=gvzz(ig)+weight(i)*vzz(i) ++ ++c distance to c.o.m of molecule ++ ++ xxt(jr)=xxx(i)-gcmx(ig) ++ yyt(jr)=yyy(i)-gcmy(ig) ++ zzt(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++c centre of mass velocity ++ ++ gvxx(ig)=gvxx(ig)/gmass(id) ++ gvyy(ig)=gvyy(ig)/gmass(id) ++ gvzz(ig)=gvzz(ig)/gmass(id) ++ ++ enddo ++ ++ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c rotational matrix ++ ++ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 ++ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) ++ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) ++ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) ++ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 ++ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) ++ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) ++ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) ++ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 ++ ++c angular momentum accumulators ++ ++ wxx=0.d0 ++ wyy=0.d0 ++ wzz=0.d0 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr =jr+1 ++ i =lstrgd(jr) ++ ++ wxx=wxx+weight(i)*(yyt(jr)*vzz(i)-zzt(jr)*vyy(i)) ++ wyy=wyy+weight(i)*(zzt(jr)*vxx(i)-xxt(jr)*vzz(i)) ++ wzz=wzz+weight(i)*(xxt(jr)*vyy(i)-yyt(jr)*vxx(i)) ++ ++ enddo ++ ++c angular velocity in body fixed frame ++ ++ omx(ig)=(rot(1)*wxx+rot(4)*wyy+rot(7)*wzz)*rotinx(id,2) ++ omy(ig)=(rot(2)*wxx+rot(5)*wyy+rot(8)*wzz)*rotiny(id,2) ++ omz(ig)=(rot(3)*wxx+rot(6)*wyy+rot(9)*wzz)*rotinz(id,2) ++ ++ jr=jr-numgsit(id) ++ do j=1,numgsit(id) ++ ++ jr=jr +1 ++ i=lstrgd(jr) ++ ++c site velocity in body frame ++ ++ wxx=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ wyy=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ wzz=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*wxx+rot(2)*wyy+rot(3)*wzz+gvxx(ig) ++ vyy(i)=rot(4)*wxx+rot(5)*wyy+rot(6)*wzz+gvyy(ig) ++ vzz(i)=rot(7)*wxx+rot(8)*wyy+rot(9)*wzz+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,omx,omy,omz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c deallocate work arrays ++ ++ deallocate (xxt,yyt,zzt,stat=fail) ++ ++ return ++ end subroutine quatqnch ++ ++ subroutine vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for scaling the velocity arrays to the ++c desired temperature ++c ++c zeroes angular momentum in non-periodic system. ++c ++c parallel replicated data version : block data ++c ++c copyright daresbury laboratory 1992. ++c author - w.smith july 1992 ++c amended - t.forester oct 1993 ++c amended - t.forester dec 1994 : block data ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,imcon,natms,ngrp,iatm1,iatm2,i ++ real(8) sigma,roti,rotinv,cmx,cmy,cmz,cmvx,cmvy,cmvz,sysmas ++ real(8) amx,amy,amz,det,scale,rsq,wxx,wyy,wzz,sumke ++ ++ dimension roti(9),rotinv(9) ++ ++c block indices ++ ++ iatm1=(idnode*natms)/mxnode+1 ++ iatm2=((idnode+1)*natms)/mxnode ++ ++c calculate centre of mass position and motion of the system ++ ++ cmx=0.d0 ++ cmy=0.d0 ++ cmz=0.d0 ++ cmvx=0.d0 ++ cmvy=0.d0 ++ cmvz=0.d0 ++ sysmas=0.d0 ++ ++ do i=iatm1,iatm2 ++ ++ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then ++ ++ cmx=cmx+weight(i)*xxx(i) ++ cmy=cmy+weight(i)*yyy(i) ++ cmz=cmz+weight(i)*zzz(i) ++ sysmas=sysmas+weight(i) ++ cmvx=cmvx+vxx(i)*weight(i) ++ cmvy=cmvy+vyy(i)*weight(i) ++ cmvz=cmvz+vzz(i)*weight(i) ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ buffer(8)=sysmas ++ buffer(9)=cmx ++ buffer(10)=cmy ++ buffer(11)=cmz ++ buffer(12)=cmvx ++ buffer(13)=cmvy ++ buffer(14)=cmvz ++ call gdsum(buffer(8),7,buffer(1)) ++ sysmas= buffer(8) ++ cmx=buffer(9) ++ cmy=buffer(10) ++ cmz=buffer(11) ++ cmvx=buffer(12) ++ cmvy=buffer(13) ++ cmvz=buffer(14) ++ endif ++ ++ cmx=cmx/sysmas ++ cmy=cmy/sysmas ++ cmz=cmz/sysmas ++ ++ cmvx=cmvx/sysmas ++ cmvy=cmvy/sysmas ++ cmvz=cmvz/sysmas ++ ++c remove centre of mass motion ++ ++ do i=1,natms ++ ++ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then ++ ++ vxx(i)=vxx(i)-cmvx ++ vyy(i)=vyy(i)-cmvy ++ vzz(i)=vzz(i)-cmvz ++ ++ else ++ ++ vxx(i)=0.d0 ++ vyy(i)=0.d0 ++ vzz(i)=0.d0 ++ ++ endif ++ ++ enddo ++ ++c zero angular momentum about centre of mass - non-periodic system ++ ++ if(imcon.eq.0)then ++ ++c move to centre of mass origin ++ ++ do i=1,natms ++ ++ xxx(i)=xxx(i)-cmx ++ yyy(i)=yyy(i)-cmy ++ zzz(i)=zzz(i)-cmz ++ ++ enddo ++ ++c angular momentum accumulators ++ ++ amx=0.d0 ++ amy=0.d0 ++ amz=0.d0 ++ ++c rotational inertia accumulators ++ ++ do i=1,9 ++ roti(i)=0.d0 ++ enddo ++ ++ do i=iatm1,iatm2 ++ ++ amx=amx+weight(i)*(yyy(i)*vzz(i)-zzz(i)*vyy(i)) ++ amy=amy+weight(i)*(zzz(i)*vxx(i)-xxx(i)*vzz(i)) ++ amz=amz+weight(i)*(xxx(i)*vyy(i)-yyy(i)*vxx(i)) ++ ++ rsq=xxx(i)**2+yyy(i)**2+zzz(i)**2 ++ roti(1)=roti(1)+weight(i)*(xxx(i)*xxx(i)-rsq) ++ roti(2)=roti(2)+weight(i)* xxx(i)*yyy(i) ++ roti(3)=roti(3)+weight(i)* xxx(i)*zzz(i) ++ roti(5)=roti(5)+weight(i)*(yyy(i)*yyy(i)-rsq) ++ roti(6)=roti(6)+weight(i)* yyy(i)*zzz(i) ++ roti(9)=roti(9)+weight(i)*(zzz(i)*zzz(i)-rsq) ++ ++ enddo ++ ++c complete rotational inertia matrix ++ ++ roti(4)=roti(2) ++ roti(7)=roti(3) ++ roti(8)=roti(6) ++ ++c global sum ++ ++ if(mxnode.gt.1)then ++ buffer(13)=amx ++ buffer(14)=amy ++ buffer(15)=amz ++ do i=1,9 ++ buffer(15+i)=roti(i) ++ enddo ++ call gdsum(buffer(13),12,buffer(1)) ++ amx=buffer(13) ++ amy=buffer(14) ++ amz=buffer(15) ++ do i=1,9 ++ roti(i)=buffer(15+i) ++ enddo ++ endif ++ ++c invert rotational inertia matrix ++ ++ call invert (roti,rotinv,det) ++ ++c correction to angular velocity ++ ++ wxx=rotinv(1)*amx+rotinv(2)*amy+rotinv(3)*amz ++ wyy=rotinv(4)*amx+rotinv(5)*amy+rotinv(6)*amz ++ wzz=rotinv(7)*amx+rotinv(8)*amy+rotinv(9)*amz ++ ++c correction to linear velocity ++ ++ do i=1,natms ++ ++ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then ++ ++ vxx(i)=vxx(i)+(wyy*zzz(i)-wzz*yyy(i)) ++ vyy(i)=vyy(i)+(wzz*xxx(i)-wxx*zzz(i)) ++ vzz(i)=vzz(i)+(wxx*yyy(i)-wyy*xxx(i)) ++ ++ endif ++ ++ enddo ++ ++c reset positions to original reference frame ++ ++ do i=1,natms ++ ++ xxx(i)=xxx(i)+cmx ++ yyy(i)=yyy(i)+cmy ++ zzz(i)=zzz(i)+cmz ++ ++ enddo ++ ++ endif ++ ++c calculate temperature ++ ++ sumke=0.d0 ++ ++ do i=iatm1,iatm2 ++ ++ sumke=sumke+weight(i)* ++ x (vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ ++ enddo ++ ++ sumke=0.5d0*sumke ++ if(mxnode.gt.1)then ++ buffer(1)=sumke ++ call gdsum(buffer(1),1,buffer(2)) ++ sumke=buffer(1) ++ endif ++ ++c apply temperature scaling ++ ++ scale=1.d0 ++ if(sumke.gt.1.d-6)scale=sqrt(sigma/sumke) ++ ++ do i=1,natms ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++ if(ngrp.gt.0)then ++ call quatqnch(idnode,imcon,mxnode,natms,ngrp) ++ ++ endif ++ ++ return ++ end subroutine vscaleg ++ ++ subroutine shlqnch(idnode,mxnode,ntshl,temp) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for quenching the internal bond energies ++c in ions defined by shell model ++c ++c copyright - daresbury laboratory 1994 ++c author w.smith july 1994 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m ++ real(8) temp,pke,rmu,dvx,dvy,dvz,tmx,tmy,tmz,scl ++ ++c permitted core-shell internal kinetic energy ++ ++ pke=boltz*temp*1.d-4 ++ ++c block indices ++ ++ ishl1 = (idnode*ntshl)/mxnode+1 ++ ishl2 = ((idnode+1)*ntshl)/mxnode ++ ++c calculate core and shell velocities from total momentum ++ ++ m=0 ++ do k=ishl1,ishl2 ++ ++ m=m+1 ++ ++ i=listshl(m,2) ++ j=listshl(m,3) ++ ++ rmu=(weight(i)*weight(j))/(weight(i)+weight(j)) ++ ++ if(rmu.gt.0.d0)then ++ ++ dvx=vxx(j)-vxx(i) ++ dvy=vyy(j)-vyy(i) ++ dvz=vzz(j)-vzz(i) ++ ++ scl=sqrt(pke/(rmu*(dvx*dvx+dvy*dvy+dvz*dvz))) ++ ++ tmx=weight(i)*vxx(i)+weight(j)*vxx(j) ++ tmy=weight(i)*vyy(i)+weight(j)*vyy(j) ++ tmz=weight(i)*vzz(i)+weight(j)*vzz(j) ++ ++ vxx(i)=tmx/(weight(i)+weight(j))-scl*rmu*dvx/weight(i) ++ vxx(j)=tmx/(weight(i)+weight(j))+scl*rmu*dvx/weight(j) ++ vyy(i)=tmy/(weight(i)+weight(j))-scl*rmu*dvy/weight(i) ++ vyy(j)=tmy/(weight(i)+weight(j))+scl*rmu*dvy/weight(j) ++ vzz(i)=tmz/(weight(i)+weight(j))-scl*rmu*dvz/weight(i) ++ vzz(j)=tmz/(weight(i)+weight(j))+scl*rmu*dvz/weight(j) ++ ++ endif ++ ++ enddo ++ ++ if(mxnode.gt.1) call shlmerge(idnode,mxnode,ntshl) ++ ++ return ++ end subroutine shlqnch ++ ++ subroutine regauss ++ x (idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, ++ x ntshl,keyshl,sigma,temp,tolnce) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for resetting the system velocities ++c ++c copyright - daresbury laboratory ++c author - w. smith may 2007 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,imcon,mxnode,natms,ngrp,nscons ++ integer ntcons,ntshl,i,k,keyshl ++ real(8) temp,tolnce,sigma,rsq ++ ++c set atomic velocities from gaussian distribution ++ ++ call gauss(natms,vxx,vyy,vzz) ++ ++ do i=1,natms ++ ++ rsq=sqrt(rmass(i)) ++ vxx(i)=vxx(i)*rsq ++ vyy(i)=vyy(i)*rsq ++ vzz(i)=vzz(i)*rsq ++ ++ enddo ++ ++ if(ntcons.gt.0)call quench ++ x (imcon,idnode,mxnode,natms,nscons,tolnce) ++ ++ if(ngrp.gt.0)call quatqnch ++ x (idnode,imcon,mxnode,natms,ngrp) ++ ++ if(keyshl.eq.1)then ++ ++ do k=1,4 ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ call shlqnch(idnode,mxnode,ntshl,temp) ++ ++ enddo ++ ++ else ++ ++ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) ++ ++ endif ++ ++ return ++ end subroutine regauss ++ ++ subroutine impact(khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) ++ ++c********************************************************************* ++c ++c DLPOLY routinue for impacting a selected atom with a specified ++c recoil energy ++c ++c copyright daresbury laboratory ++c author w.smith september 2007 ++c ++c********************************************************************* ++ ++ use config_module ++ use ensemble_tools_module ++ ++ implicit none ++ ++ integer i,khit,natms,idnode,mxnode,iatm0,iatm1 ++ real(8) ehit,vxo,vyo,vzo,xhit,yhit,zhit,fac,smass,vel ++ ++c store original particle velocity ++ ++ vxo=vxx(khit) ++ vyo=vyy(khit) ++ vzo=vzz(khit) ++ ++c determine recoil velocity ++ ++ vel=sqrt(2.d0*ehit/(weight(khit)*(xhit**2+yhit**2+zhit**2))) ++ ++c reassign particle velocity ++ ++ vxx(khit)=vel*xhit ++ vyy(khit)=vel*yhit ++ vzz(khit)=vel*zhit ++ ++c determine system mass ++ ++ smass=getmass(natms,idnode,mxnode) ++ ++c calculate net system velocity ++ ++ vxo=(vxx(khit)-vxo)*weight(khit)/smass ++ vyo=(vyy(khit)-vyo)*weight(khit)/smass ++ vzo=(vzz(khit)-vzo)*weight(khit)/smass ++ ++c reset system net velocity to zero ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vxo ++ vyy(i)=vyy(i)-vyo ++ vzz(i)=vzz(i)-vzo ++ ++ enddo ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ return ++ end subroutine impact ++ ++ end module temp_scalers_module +diff -urN dl_class_1.9.orig/srcmod/tersoff_module.f dl_class_1.9/srcmod/tersoff_module.f +--- dl_class_1.9.orig/srcmod/tersoff_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/tersoff_module.f 2011-04-16 16:13:06.000000000 +0200 +@@ -0,0 +1,1011 @@ ++ module tersoff_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining tersoff potential arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith dec 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use parse_module ++ use setup_module ++ use site_module ++ use utility_module ++ ++ implicit none ++ ++ logical, allocatable :: filter(:) ++ integer, allocatable :: lstter(:),ltpter(:),lattsf(:) ++ real(8), allocatable :: prmter(:,:),prmter2(:,:) ++ real(8), allocatable :: vmbp(:,:,:),gmbp(:,:,:) ++ real(8), allocatable :: xtf(:),ytf(:),ztf(:),rtf(:) ++ real(8), allocatable :: ert(:),eat(:),grt(:),gat(:) ++ real(8), allocatable :: scr(:),gcr(:),gam(:),gvr(:) ++ ++ save xtf,ytf,ztf,rtf,ert,eat,grt,gat,scr,gcr,gam,filter ++ save prmter,prmter2,lstter,ltpter,lattsf,vmbp,gmbp ++ ++ contains ++ ++ subroutine alloc_ter_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=20 ++ ++ integer i,fail,idnode,npairs ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ npairs=(mxter*(mxter+1))/2 ++ allocate (prmter(mxter,mxpter),stat=fail(1)) ++ allocate (prmter2(2,npairs),stat=fail(2)) ++ allocate (lstter(mxter),stat=fail(3)) ++ allocate (ltpter(mxter),stat=fail(4)) ++ allocate (lattsf(mxatms),stat=fail(5)) ++ allocate (xtf(mxatms),stat=fail(6)) ++ allocate (ytf(mxatms),stat=fail(7)) ++ allocate (ztf(mxatms),stat=fail(8)) ++ allocate (rtf(mxatms),stat=fail(9)) ++ allocate (ert(mxatms),stat=fail(10)) ++ allocate (eat(mxatms),stat=fail(11)) ++ allocate (grt(mxatms),stat=fail(12)) ++ allocate (gat(mxatms),stat=fail(13)) ++ allocate (scr(mxatms),stat=fail(14)) ++ allocate (gcr(mxatms),stat=fail(15)) ++ allocate (gam(mxatms),stat=fail(16)) ++ allocate (gvr(mxatms),stat=fail(17)) ++ allocate (vmbp(mxgrid,npairs,3),stat=fail(18)) ++ allocate (gmbp(mxgrid,npairs,3),stat=fail(19)) ++ allocate (filter(mxsite),stat=fail(20)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1945) ++ enddo ++ ++ end subroutine alloc_ter_arrays ++ ++ subroutine define_tersoff ++ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining tersoff potentials ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits,lmols ++ character*8 keyword ++ character*8 atom0,atom1 ++ character*1 message(80) ++ integer fail,idnode,ntpter,ntpatm,i,idum,j,itpter ++ integer keypot,jtpatm,k,katm0,katm1,icross,npairs,ktyp ++ real(8) rctter,engunit ++ real(8), allocatable :: parpot(:) ++ data fail/0/ ++ ++ allocate (parpot(mxpter),stat=fail) ++ if(fail.ne.0)call error(idnode,1955) ++ ++ ntpter=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'number of specified tersoff ', ++ x 'atom potentials',i10)") ntpter ++ write(nrite,"(/,/,16x,'atom ',3x,' key',30x, ++ x 'parameters'/,/)") ++ ++ endif ++ if(ntpter.gt.mxter) call error(idnode,88) ++ if(.not.lunits) call error(idnode,6) ++ if(.not.lmols) call error(idnode,13) ++ ++ rctter=0.d0 ++ ++ do i=1,mxter ++ lstter(i)=-1 ++ enddo ++ ++ do i=1,mxsite ++ filter(i)=.false. ++ enddo ++ ++ k=0 ++ do i=1,mxter ++ do j=1,i ++ ++ k=k+1 ++ prmter2(1,k)=0.d0 ++ prmter2(2,k)=0.d0 ++ ++ enddo ++ enddo ++ ++ do itpter=1,ntpter ++ ++ do i=1,mxpter ++ parpot(i)=0.d0 ++ enddo ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call copystring(record,message,80) ++ call getword(atom0,record,8,lenrec) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'ters') then ++ ++ keypot=1 ++ ++ else ++ ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,1972) ++ ++ endif ++ ++ parpot(1)=dblstr(record,lenrec,idum) ! A_i ++ parpot(2)=dblstr(record,lenrec,idum) ! a_i ++ parpot(3)=dblstr(record,lenrec,idum) ! B_i ++ parpot(4)=dblstr(record,lenrec,idum) ! b_i ++ parpot(5)=dblstr(record,lenrec,idum) ! R_i ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ parpot(6)=dblstr(record,lenrec,idum) ! S_i ++ parpot(7)=dblstr(record,lenrec,idum) ! beta_i ++ parpot(8)=dblstr(record,lenrec,idum) ! eta_i ++ parpot(9)=dblstr(record,lenrec,idum) ! c_i ++ parpot(10)=dblstr(record,lenrec,idum) ! d_i ++ parpot(11)=dblstr(record,lenrec,idum) ! h_i ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(16x,a8,2x,a4,2x,1p,5e13.5)") ++ x atom0,keyword(1:4),(parpot(j),j=1,5) ++ write(nrite,"(32x,1p,5e13.5)")(parpot(j),j=6,mxpter) ++ ++ endif ++ ++ katm0=0 ++ ++ do jtpatm=1,ntpatm ++ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm ++ enddo ++ ++ if(katm0.eq.0)call error(idnode,92) ++ ++ filter(katm0)=.true. ++ ++c convert parameters to internal units ++ ++ if(keypot.eq.1)then ++ ++ parpot(1)=parpot(1)*engunit ++ parpot(3)=parpot(3)*engunit ++ ++ endif ++ if(lstter(katm0).gt.-1) call error(idnode,21) ++ lstter(katm0)=itpter ++ ltpter(itpter)=keypot ++ ++c calculate max tersoff cutoff ++ ++ rctter=max(rctter,parpot(6)) ++ ++c store tersoff single atom potential parameters ++ ++ do i=1,mxpter ++ prmter(itpter,i)=parpot(i) ++ enddo ++ ++ enddo ++ ++ if(rctter.lt.1.d-6)call error(idnode,1953) ++ ++c start processing double atom potential parameters ++ ++ npairs=(ntpter*(ntpter+1))/2 ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,"(/,/,1x,'number of tersoff ', ++ x 'cross terms',i10)") npairs ++ write(nrite,"(/,/,16x,'atom ','atom ',10x, ++ x 'parameters'/,/)") ++ ++ endif ++ ++ do icross=1,npairs ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++ call getword(atom0,record,8,lenrec) ++ call getword(atom1,record,8,lenrec) ++ ++ parpot(1)=dblstr(record,lenrec,idum) ! chi_ij ++ parpot(2)=dblstr(record,lenrec,idum) ! omega_ij ++ ++ katm0=0 ++ katm1=0 ++ ++ do jtpatm=1,ntpatm ++ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ enddo ++ ++ if(katm0.eq.0.or.katm1.eq.0)call error(idnode,92) ++ ++ filter(katm0)=.true. ++ filter(katm1)=.true. ++ ++ ktyp=loc2(lstter(katm0),lstter(katm1)) ++ prmter2(1,ktyp)=parpot(1) ++ prmter2(2,ktyp)=parpot(2) ++ ++ if(idnode.eq.0)write(nrite,"(16x,a8,a8,1p,2e13.5)") ++ x atom0,atom1,(parpot(j),j=1,2) ++ ++ enddo ++ ++c generate tersoff interpolation arrays ++ ++ call tergen(ntpatm,rctter) ++ ++ return ++ end subroutine define_tersoff ++ ++ subroutine tergen(ntpatm,rctter) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for generating potential energy and ++c force arrays for tersoff forces only ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w. smith dec 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer ntpatm,katm0,katm1,ipt,jpt,kpt,i ++ real(8) dlrpot,rctter,baij,saij,bbij,sbij,rij,sij,att,arg ++ real(8) rrr,rep ++ ++c define grid resolution for potential arrays ++ ++ dlrpot=rctter/dble(mxgrid-4) ++ ++c construct arrays for all types of short ranged potential ++ ++ do katm0=1,ntpatm ++ ++ if(filter(katm0))then ++ ++ ipt=lstter(katm0) ++ ++ do katm1=1,katm0 ++ ++ if(filter(katm1))then ++ ++ jpt=lstter(katm1) ++ ++ if((ltpter(ipt).eq.1).and.(ltpter(jpt).eq.1))then ++ ++ kpt=loc2(ipt,jpt) ++ ++c define tersoff parameters ++ ++ baij=sqrt(prmter(ipt,1)*prmter(jpt,1)) ++ saij=0.5d0*(prmter(ipt,2)+prmter(jpt,2)) ++ bbij=sqrt(prmter(ipt,3)*prmter(jpt,3)) ++ sbij=0.5d0*(prmter(ipt,4)+prmter(jpt,4)) ++ rij=sqrt(prmter(ipt,5)*prmter(jpt,5)) ++ sij=sqrt(prmter(ipt,6)*prmter(jpt,6)) ++ ++c store potential cutoff ++ ++ vmbp(1,kpt,1)=sij ++ ++c calculate screening function ++ ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ ++ if(rrr.le.rij)then ++ ++ vmbp(i,kpt,1)=1.d0 ++ gmbp(i,kpt,1)=0.d0 ++ ++ else ++ ++ arg=pi*(rrr-rij)/(sij-rij) ++ vmbp(i,kpt,1)=0.5d0*(1.d0+cos(arg)) ++ gmbp(i,kpt,1)=0.5d0*pi*rrr*sin(arg)/(sij-rij) ++ ++ endif ++ ++ enddo ++ ++c calculate screened repulsion function ++ ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ ++ rep=baij*exp(-saij*rrr) ++ vmbp(i,kpt,2)=rep*vmbp(i,kpt,1) ++ gmbp(i,kpt,2)=rep*(gmbp(i,kpt,1)+ ++ x saij*rrr*vmbp(i,kpt,1)) ++ ++ enddo ++ ++c calculate screened attraction function ++ ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ ++ att=bbij*exp(-sbij*rrr) ++ vmbp(i,kpt,3)=att*vmbp(i,kpt,1) ++ gmbp(i,kpt,3)=att*(gmbp(i,kpt,1)+ ++ x sbij*rrr*vmbp(i,kpt,1)) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine tergen ++ ++ subroutine tersoff ++ x (idnode,mxnode,natms,imcon,rctter,engter,virter) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating potential and forces ++c due to a tersoff potential ++c ++c Note: the subroutine converts coordinates to reduced units ++c to avoid a call to images.f. The link cell algorithm used ++c here necessitates a parallelepiped, cubic or orthorhombic ++c cell geometry ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w.smith dec 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer idnode,mxnode,natms,imcon,nix,niy,niz,i,j,nbx ++ integer nby,nbz,ncells,l,ix,iy,iz,k,icell,kk,jx,jy,jz,jcell,iter ++ integer limit,ii,iatm ++ real(8) rctter,engter,virter,xm,ym,zm,det,cprp ++ real(8) xdc,ydc,zdc,sxx,syy,szz,strs ++ ++ dimension nix(27),niy(27),niz(27),cprp(10),strs(6) ++ ++ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, ++ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ ++ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, ++ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ ++ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ++ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ ++ ++c flag for undefined potentials ++ ++ safe=.true. ++ ++c initialise potential energy and virial ++ ++ engter=0.d0 ++ virter=0.d0 ++ ++c create mock cell vectors for non-periodic system ++ ++ if(imcon.eq.0) then ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ ++ do i=1,natms ++ ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ ++ enddo ++ ++ cell(1)=2.d0*xm+rctter ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(5)=2.d0*ym+rctter ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ cell(9)=2.d0*zm+rctter ++ ++ endif ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ ++c check for appropriate boundary conditions ++ ++ if(imcon.gt.3)call error(idnode,1974) ++ call invert(cell,rcell,det) ++ call dcell(cell,cprp) ++ ++c calculate link cell numbers ++ ++ nbx=int(cprp(7)/(rctter+1.d-6)) ++ nby=int(cprp(8)/(rctter+1.d-6)) ++ nbz=int(cprp(9)/(rctter+1.d-6)) ++ if(nbx.lt.3.or.nby.lt.3.or.nbz.lt.3)then ++ ++ if(idnode.eq.0)then ++ ++ write(nrite,'(a,3i5)') ++ x 'tersoff link cell decomposition is',nbx,nby,nbz ++ ++ endif ++ ++ call error(idnode,1977) ++ ++ endif ++ ncells=nbx*nby*nbz ++ ++ if(ncells.gt.mxcell) then ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,'(a,i6)') ++ x 'number of required link cells in tersoff.f is ',ncells ++ write(nrite,'(a,i6)') ++ x 'number of default link cells in tersoff.f is ',mxcell ++ call error(idnode,1976) ++ ++ endif ++ ++ endif ++ ++c transform atomic coordinates and construct link cells ++ ++ do l=1,ncells ++ ++ lct(l)=0 ++ lst(l)=0 ++ ++ enddo ++ ++ xdc=dble(nbx) ++ ydc=dble(nby) ++ zdc=dble(nbz) ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ xxx(i)=sxx ++ yyy(i)=syy ++ zzz(i)=szz ++ ++ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) ++ iy=min(int(ydc*(syy+0.5d0)),nby-1) ++ iz=min(int(zdc*(szz+0.5d0)),nbz-1) ++ k=1+ix+nbx*(iy+nby*iz) ++ lst(k)=lst(k)+1 ++ link(i)=lct(k) ++ lct(k)=i ++ ++ endif ++ ++ enddo ++ ++c loop over central atoms of angles ++ ++ ix=0 ++ iy=1 ++ iz=1 ++ do icell=1,ncells ++ ++ ix=ix+1 ++ if(ix.gt.nbx)then ++ ix=1 ++ iy=iy+1 ++ if(iy.gt.nby)then ++ iy=1 ++ iz=iz+1 ++ endif ++ endif ++ ++c construct mini-list of neighbour cell contents ++ ++ k=0 ++ do kk=1,27 ++ ++ jx=ix+nix(kk) ++ jy=iy+niy(kk) ++ jz=iz+niz(kk) ++ ++ if(jx.gt.nbx)jx=1 ++ if(jy.gt.nby)jy=1 ++ if(jz.gt.nbz)jz=1 ++ if(jx.lt.1)jx=jx+nbx ++ if(jy.lt.1)jy=jy+nby ++ if(jz.lt.1)jz=jz+nbz ++ ++ jcell=jx+nbx*(jy-1+nby*(jz-1)) ++ j=lct(jcell) ++ ++ do ii=1,lst(jcell) ++ ++ k=k+1 ++ lattsf(k)=j ++ j=link(j) ++ ++ enddo ++ ++ enddo ++ ++ limit=k ++ ++ do ii=1,lst(icell) ++ ++ iatm=lattsf(ii) ++ iter=lstter(ltype(iatm)) ++ ++ if(mod(iatm,mxnode).eq.idnode.and.iter.ge.0)then ++ ++c construct working arrays by interpolation ++ ++ call terint(iatm,limit,rctter) ++ ++c calculate three body (attractive) terms ++ ++ call tersoff3(ii,limit,engter,virter,strs) ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c calculate stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,1978) ++ ++c global sum of three body potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engter ++ buffer(2)=virter ++ call gdsum(buffer(1),2,buffer(3)) ++ engter=buffer(1) ++ virter=buffer(2) ++ ++ endif ++ ++c remove effect of double counting ++ ++ engter=0.5d0*engter ++ virter=0.5d0*virter ++ ++c restore coordinate array to original representation ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=xxx(i) ++ syy=yyy(i) ++ szz=zzz(i) ++ ++ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz ++ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz ++ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz ++ ++ endif ++ ++ enddo ++ ++c restore cell vector ++ ++ if(imcon.eq.0) then ++ cell(1)=0.d0 ++ cell(5)=0.d0 ++ cell(9)=0.d0 ++ endif ++ ++ return ++ end subroutine tersoff ++ ++ subroutine terint(iatm,limit,rctter) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for constructing working arrays for ++c a tersoff potential using interpolation ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w.smith dec 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer iatm,jatm,jj,limit,iter,jter,jjter,ll ++ real(8) rctter,sxij,syij,szij,ppp,t1,t2,rdr ++ real(8) vk0,vk1,vk2,gk0,gk1,gk2 ++ ++ rdr=dble(mxgrid-4)/rctter ++ iter=lstter(ltype(iatm)) ++ ++c initialise working arrays ++ ++ do jj=1,limit ++ ++ xtf(jj)=0.d0 ++ ytf(jj)=0.d0 ++ ztf(jj)=0.d0 ++ rtf(jj)=0.d0 ++ ert(jj)=0.d0 ++ eat(jj)=0.d0 ++ grt(jj)=0.d0 ++ gat(jj)=0.d0 ++ scr(jj)=0.d0 ++ gcr(jj)=0.d0 ++ ++ enddo ++ ++c construct working arrays ++ ++ do jj=1,limit ++ ++ jatm=lattsf(jj) ++ jter=lstter(ltype(jatm)) ++ ++ if(jatm.ne.iatm.and.jter.ge.0)then ++ ++ sxij=xxx(jatm)-xxx(iatm) ++ sxij=sxij-nint(sxij) ++ syij=yyy(jatm)-yyy(iatm) ++ syij=syij-nint(syij) ++ szij=zzz(jatm)-zzz(iatm) ++ szij=szij-nint(szij) ++ ++ xtf(jj)=cell(1)*sxij+cell(4)*syij+cell(7)*szij ++ ytf(jj)=cell(2)*sxij+cell(5)*syij+cell(8)*szij ++ ztf(jj)=cell(3)*sxij+cell(6)*syij+cell(9)*szij ++ rtf(jj)=sqrt(xtf(jj)**2+ytf(jj)**2+ztf(jj)**2) ++ xtf(jj)=xtf(jj)/rtf(jj) ++ ytf(jj)=ytf(jj)/rtf(jj) ++ ztf(jj)=ztf(jj)/rtf(jj) ++ ++ jjter=loc2(iter,jter) ++ if(rtf(jj).le.vmbp(1,jjter,1))then ++ ++ ll=int(rdr*rtf(jj)) ++ ppp=rtf(jj)*rdr-dble(ll) ++ ++c interpolate screening function ++ ++ vk0=vmbp(ll,jjter,1) ++ vk1=vmbp(ll+1,jjter,1) ++ vk2=vmbp(ll+2,jjter,1) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ scr(jj)=t1+(t2-t1)*ppp*0.5d0 ++ ++c interpolate derivative of screening function ++ ++ gk0=gmbp(ll,jjter,1) ++ gk1=gmbp(ll+1,jjter,1) ++ gk2=gmbp(ll+2,jjter,1) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ gcr(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) ++ ++c interpolate repulsive component of energy ++ ++ vk0=vmbp(ll,jjter,2) ++ vk1=vmbp(ll+1,jjter,2) ++ vk2=vmbp(ll+2,jjter,2) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ ert(jj)=t1+(t2-t1)*ppp*0.5d0 ++ ++c interpolate derivative of repulsive function ++ ++ gk0=gmbp(ll,jjter,2) ++ gk1=gmbp(ll+1,jjter,2) ++ gk2=gmbp(ll+2,jjter,2) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ grt(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) ++ ++c interpolate attractive component of energy ++ ++ vk0=vmbp(ll,jjter,3) ++ vk1=vmbp(ll+1,jjter,3) ++ vk2=vmbp(ll+2,jjter,3) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ eat(jj)=t1+(t2-t1)*ppp*0.5d0 ++ ++c interpolate derivative of attractive function ++ ++ gk0=gmbp(ll,jjter,3) ++ gk1=gmbp(ll+1,jjter,3) ++ gk2=gmbp(ll+2,jjter,3) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ gat(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine terint ++ ++ subroutine tersoff3(ii,limit,engter,virter,strs) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating three body contributions ++c to a tersoff potential and tersoff potential, virial and ++c atomic forces ++c ++c based on potential form defined in: ++c J. Tersoff, Phys. Rev. B 39 (1989) 5566. ++c ++c copyright - daresbury laboratory ++c author - w.smith dec 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical flag ++ integer iatm,jatm,katm,limit,ii,jj,kk ++ integer iter,jter,kter,jjter,kkter ++ real(8) cost,gtheta,ci,di,hi,gamma,gam_j,gam_k,eterm,gterm,strs ++ real(8) fxa,fya,fza,fxc,fyc,fzc,engter,virter,vterm,gam_ij,bi,ei ++ ++ dimension strs(6) ++ ++ iatm=lattsf(ii) ++ iter=lstter(ltype(iatm)) ++ ++ bi=prmter(iter,7) ++ ei=prmter(iter,8) ++ ci=prmter(iter,9) ++ di=prmter(iter,10) ++ hi=prmter(iter,11) ++ ++ do jj=1,limit ++ ++ jatm=lattsf(jj) ++ jter=lstter(ltype(jatm)) ++ if(jter.ge.0.and.iatm.ne.jatm)then ++ ++ jjter=loc2(iter,jter) ++ if(rtf(jj).le.vmbp(1,jjter,1))then ++ ++ flag=.false. ++ ++c potential energy and virial terms ++ ++ vterm=0.d0 ++ eterm=0.d0 ++ ++c initialise work arrays ++ ++ do kk=1,limit ++ ++ gam(kk)=0.d0 ++ gvr(kk)=0.d0 ++ ++ enddo ++ ++c calculate bond factor ++ ++ do kk=1,limit ++ ++ katm=lattsf(kk) ++ kter=lstter(ltype(katm)) ++ if(kter.ge.0.and.iatm.ne.katm.and.jatm.ne.katm)then ++ ++ kkter=loc2(iter,kter) ++ ++ if(rtf(kk).le.vmbp(1,kkter,1))then ++ ++ cost=(xtf(jj)*xtf(kk)+ytf(jj)*ytf(kk)+ztf(jj)*ztf(kk)) ++ gtheta=1.d0+(ci/di)**2-ci**2/(di**2+(hi-cost)**2) ++ eterm=eterm+gtheta*prmter2(2,kkter)*scr(kk) ++ vterm=vterm+gtheta*prmter2(2,kkter)*gcr(kk)*rtf(kk) ++ gvr(kk)=2.d0*ci**2*(hi-cost)/(di**2+(hi-cost)**2)**2 ++ gam(kk)=gtheta ++ flag=.true. ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ if(flag)then ++ ++c tersoff energy and virial ++ ++ gam_ij=prmter2(1,jjter)*(1.d0+(bi*eterm)**ei)**(-0.5d0/ei) ++ gamma=0.5d0*prmter2(1,jjter)*bi*(bi*eterm)**(ei-1.d0)* ++ x eat(jj)*(1.d0+(bi*eterm)**ei)**(-0.5d0/ei-1.d0) ++ engter=engter+ert(jj)-gam_ij*eat(jj) ++ virter=virter+gamma*vterm+(grt(jj)-gam_ij*gat(jj))*rtf(jj) ++ ++c calculate 3-body forces ++ ++ do kk=1,limit ++ ++ katm=lattsf(kk) ++ kter=lstter(ltype(katm)) ++ if(kter.ge.0.and.iatm.ne.katm.and.jatm.ne.katm)then ++ ++ kkter=loc2(iter,kter) ++ if(rtf(kk).le.vmbp(1,kkter,1))then ++ ++ gam_j=0.5d0*gamma*prmter2(2,kkter)*scr(kk)*gvr(kk) ++ gam_k=0.5d0*gamma*prmter2(2,kkter)*gcr(kk)*gam(kk) ++ ++c calculate contribution to atomic forces ++ ++ cost=(xtf(jj)*xtf(kk)+ytf(jj)*ytf(kk)+ ++ x ztf(jj)*ztf(kk)) ++ ++ fxa=gam_j*(xtf(kk)-xtf(jj)*cost)/rtf(jj) ++ fya=gam_j*(ytf(kk)-ytf(jj)*cost)/rtf(jj) ++ fza=gam_j*(ztf(kk)-ztf(jj)*cost)/rtf(jj) ++ ++ fxc=gam_j*(xtf(jj)-xtf(kk)*cost)/rtf(kk)- ++ x gam_k*xtf(kk) ++ fyc=gam_j*(ytf(jj)-ytf(kk)*cost)/rtf(kk)- ++ x gam_k*ytf(kk) ++ fzc=gam_j*(ztf(jj)-ztf(kk)*cost)/rtf(kk)- ++ x gam_k*ztf(kk) ++ ++ fxx(jatm)=fxx(jatm)+fxa ++ fyy(jatm)=fyy(jatm)+fya ++ fzz(jatm)=fzz(jatm)+fza ++ ++ fxx(iatm)=fxx(iatm)-(fxa+fxc) ++ fyy(iatm)=fyy(iatm)-(fya+fyc) ++ fzz(iatm)=fzz(iatm)-(fza+fzc) ++ ++ fxx(katm)=fxx(katm)+fxc ++ fyy(katm)=fyy(katm)+fyc ++ fzz(katm)=fzz(katm)+fzc ++ ++c calculate contributions to stress tensor ++ ++ strs(1)=strs(1)+(fxa*xtf(jj)*rtf(jj)+ ++ x fxc*xtf(kk)*rtf(kk)) ++ strs(2)=strs(2)+(fxa*ytf(jj)*rtf(jj)+ ++ x fxc*ytf(kk)*rtf(kk)) ++ strs(3)=strs(3)+(fxa*ztf(jj)*rtf(jj)+ ++ x fxc*ztf(kk)*rtf(kk)) ++ strs(4)=strs(4)+(fya*ytf(jj)*rtf(jj)+ ++ x fyc*ytf(kk)*rtf(kk)) ++ strs(5)=strs(5)+(fya*ztf(jj)*rtf(jj)+ ++ x fyc*ztf(kk)*rtf(kk)) ++ strs(6)=strs(6)+(fza*ztf(jj)*rtf(jj)+ ++ x fzc*ztf(kk)*rtf(kk)) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ else ++ ++ gam_ij=prmter2(1,jjter) ++ engter=engter+ert(jj)-gam_ij*eat(jj) ++ virter=virter+(grt(jj)-gam_ij*gat(jj))*rtf(jj) ++ ++ endif ++ ++c calculate two body force terms ++ ++ gterm=0.5d0*(grt(jj)-gam_ij*gat(jj)) ++ fxx(iatm)=fxx(iatm)+xtf(jj)*gterm ++ fyy(iatm)=fyy(iatm)+ytf(jj)*gterm ++ fzz(iatm)=fzz(iatm)+ztf(jj)*gterm ++ fxx(jatm)=fxx(jatm)-xtf(jj)*gterm ++ fyy(jatm)=fyy(jatm)-ytf(jj)*gterm ++ fzz(jatm)=fzz(jatm)-ztf(jj)*gterm ++ ++c calculate contributions to stress tensor ++ ++ strs(1)=strs(1)-gterm*rtf(jj)*xtf(jj)*xtf(jj) ++ strs(2)=strs(2)-gterm*rtf(jj)*xtf(jj)*ytf(jj) ++ strs(3)=strs(3)-gterm*rtf(jj)*xtf(jj)*ztf(jj) ++ strs(4)=strs(4)-gterm*rtf(jj)*ytf(jj)*ytf(jj) ++ strs(5)=strs(5)-gterm*rtf(jj)*ytf(jj)*ztf(jj) ++ strs(6)=strs(6)-gterm*rtf(jj)*ztf(jj)*ztf(jj) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine tersoff3 ++ ++ end module tersoff_module +diff -urN dl_class_1.9.orig/srcmod/tether_module.f dl_class_1.9/srcmod/tether_module.f +--- dl_class_1.9.orig/srcmod/tether_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/tether_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,447 @@ ++ module tether_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining tether potential arrays ++c ++c copyright - daresbury laboratory ++c author - w. smith oct 2003 ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use parse_module ++ use setup_module ++ use site_module ++ use utility_module ++ ++ implicit none ++ ++ real(8), allocatable :: prmtet(:,:) ++ integer, allocatable :: listtet(:,:) ++ integer, allocatable :: numteth(:),keytet(:),lsttet(:) ++ real(8), allocatable :: xxs(:),yys(:),zzs(:) ++ ++ save prmtet,lsttet,listtet,numteth,keytet,xxs,yys,zzs ++ ++ contains ++ ++ subroutine alloc_tet_arrays(idnode) ++ ++ implicit none ++ ++ integer, parameter :: nnn=8 ++ ++ integer i,fail,idnode ++ dimension fail(nnn) ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate (prmtet(mxteth,mxpbnd),stat=fail(1)) ++ allocate (numteth(mxtmls),stat=fail(2)) ++ allocate (keytet(mxteth),stat=fail(3)) ++ allocate (lsttet(mxteth),stat=fail(4)) ++ allocate (listtet(msteth,2),stat=fail(5)) ++ allocate (xxs(mxatms),stat=fail(6)) ++ allocate (yys(mxatms),stat=fail(7)) ++ allocate (zzs(mxatms),stat=fail(8)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1260) ++ enddo ++ ++ do i=1,mxtmls ++ numteth(i)=0 ++ enddo ++ ++ end subroutine alloc_tet_arrays ++ ++ subroutine define_tethers ++ x (safe,idnode,itmols,nteth,nsite,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining tether bonds ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ character*8 keyword ++ character*1 message(80) ++ real(8) engunit ++ integer idnode,itmols,nteth,nsite,ntmp,iteth,iteth1,idum ++ integer iatm1,isite1,j,i ++ ++ ntmp=intstr(record,lenrec,idum) ++ numteth(itmols)=numteth(itmols)+ntmp ++ if(idnode.eq.0)then ++ write(nrite,"(/,1x,'number of tethered atoms ', ++ x 6x,i10)")ntmp ++ write(nrite,"(/,' tethered atom details:',/,/, ++ x 21x,7x,'key',6x,'atom',19x,'parameters',/) ") ++ endif ++ ++ iteth1=numteth(itmols) ++ do iteth=1,iteth1 ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ call strip(record,lenrec) ++ call copystring(record,message,80) ++ call lowcase(record,4) ++ call getword(keyword,record,4,lenrec) ++ ++ iatm1=intstr(record,lenrec,idum) ++ ++c test for frozen atom ++ ++ isite1=nsite-numsit(itmols)+iatm1 ++ ++ if(lfzsit(isite1).ne.0)then ++ ++ numteth(itmols)=numteth(itmols)-1 ++ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') ++ x '*** frozen *** ',(message(i),i=1,40) ++ ++ else ++ ++ nteth=nteth+1 ++ if(nteth.gt.mxteth)call error(idnode,62) ++ ++ if(keyword(1:4).eq.'harm')then ++ keytet(nteth)=1 ++ elseif(keyword(1:4).eq.'rhrm')then ++ keytet(nteth)=2 ++ elseif(keyword(1:4).eq.'quar')then ++ keytet(nteth)=3 ++ else ++ if(idnode.eq.0)write(nrite,*)message ++ call error(idnode,450) ++ endif ++ ++ lsttet(nteth)=iatm1 ++ prmtet(nteth,1)=dblstr(record,lenrec,idum) ++ prmtet(nteth,2)=dblstr(record,lenrec,idum) ++ prmtet(nteth,3)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(27x,a4,i10,1p,9e12.4)") ++ x keyword(1:4),lsttet(nteth), ++ x (prmtet(nteth,j),j=1,mxpbnd) ++ ++c convert energy units to internal units ++ ++ if(abs(keytet(nteth)).eq.1)then ++ prmtet(nteth,1)=prmtet(nteth,1)*engunit ++ elseif(abs(keytet(nteth)).eq.2)then ++ prmtet(nteth,1)=prmtet(nteth,1)*engunit ++ elseif(abs(keytet(nteth)).eq.3)then ++ prmtet(nteth,1)=prmtet(nteth,1)*engunit ++ prmtet(nteth,2)=prmtet(nteth,2)*engunit ++ prmtet(nteth,3)=prmtet(nteth,3)*engunit ++ endif ++ ++ endif ++ ++ enddo ++ ++ return ++ end subroutine define_tethers ++ ++ subroutine tethfrc ++ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) ++ ++c*********************************************************************** ++c ++c dl_poly routine to tether atoms to initial positions ++c includes stress tensor ++c ++c replicated data version : block data ++c ++c copyright daresbury laboratory 1994 ++c author t.forester feb 1994 ++c amended t.forester dec 1994 : block data ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe ++ integer idnode,mxnode,imcon,natms,nstep,ntteth,i,ii,ia,kk ++ integer itet1,itet2,fail ++ ++ real(8) engtet,virtet,rab ++ real(8) rrab,omega,gamma ++ ++ real(8), allocatable :: xdab(:),ydab(:),zdab(:) ++ ++ data safe/.true./ ++ ++ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail) ++ if(fail.ne.0)call error(idnode,1270) ++ ++c set up reference positions at start of job ++ ++ if(nstep.le.1)then ++ ++ do i=1,natms ++ ++ xxs(i)=xxx(i) ++ yys(i)=yyy(i) ++ zzs(i)=zzz(i) ++ ++ enddo ++ ++ endif ++ ++c check size of work arrays ++ ++ if((ntteth-mxnode+1)/mxnode.gt.msbad) call error(idnode,420) ++ ++c block indices ++ ++ itet1=(idnode*ntteth)/mxnode+1 ++ itet2=((idnode+1)*ntteth)/mxnode ++ ++ ii=0 ++ do i=itet1,itet2 ++ ++ ii=ii+1 ++ ++c atomic index ++ ++ ia= listtet(ii,2) ++ ++c tether vector ++ ++ xdab(ii)=xxx(ia)-xxs(ia) ++ ydab(ii)=yyy(ia)-yys(ia) ++ zdab(ii)=zzz(ia)-zzs(ia) ++ ++ enddo ++ ++c ignore periodic boundary condition ++ ++ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) ++ ++c zero tether energy and virial accumulators ++ ++ engtet=0.d0 ++ virtet=0.d0 ++ ++c loop over all specified tethered atoms ++ ++ ii=0 ++ do i=itet1,itet2 ++ ++ ii=ii+1 ++ ++c define components of bond vector ++ ++ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) ++ ++c check for possible zero length vector ++ ++ if(rab.lt.1.d-10)then ++ ++ rrab =0.d0 ++ ++ else ++ ++ rrab=1.d0/rab ++ ++ endif ++ ++c index of potential function parameters ++ ++ kk=listtet(ii,1) ++ ++c calculate scalar constant terms ++ ++ if(keytet(kk).eq.1)then ++ ++c harmonic function ++ ++ omega=0.5d0*prmtet(kk,1)*rab**2 ++ gamma=prmtet(kk,1) ++ ++ elseif(keytet(kk).eq.2)then ++ ++c restrained harmonic: ++ ++ omega=0.5d0*prmtet(kk,1)*(min(rab,prmtet(kk,2)))**2 ++ x +prmtet(kk,1)*prmtet(kk,2)* ++ x (sign(max(rab-prmtet(kk,2),0.d0),rab)) ++ gamma=prmtet(kk,1)*(sign(min(rab,prmtet(kk,2)),rab))*rrab ++ ++ elseif(keytet(kk).eq.3)then ++ ++c quartic potential ++ ++ omega=0.5d0*prmtet(kk,1)*rab**2 + ++ x 1.d0/3.d0*prmtet(kk,2)*rab**3+ ++ x 0.25d0*prmtet(kk,3)*rab**4 ++ gamma=(prmtet(kk,1)*rab + ++ x prmtet(kk,2)*rab**2 + ++ x prmtet(kk,3)*rab**3)*rrab ++ ++ else ++ safe=.false. ++ omega=0.d0 ++ gamma=0.d0 ++ endif ++ ++ gamma=-gamma ++ ++c calculate tether energy and virial ++ ++ engtet=engtet+omega ++ virtet=virtet-gamma*rab*rab ++ ++c index of atom ++ ++ ia=listtet(ii,2) ++ ++c calculate atomic forces ++ ++ fxx(ia)=fxx(ia)+gamma*xdab(ii) ++ fyy(ia)=fyy(ia)+gamma*ydab(ii) ++ fzz(ia)=fzz(ia)+gamma*zdab(ii) ++ ++c stress tensor ++ ++ stress(1)=stress(1)+xdab(ii)*gamma*xdab(ii) ++ stress(2)=stress(2)+xdab(ii)*gamma*ydab(ii) ++ stress(3)=stress(3)+xdab(ii)*gamma*zdab(ii) ++ stress(4)=stress(4)+ydab(ii)*gamma*xdab(ii) ++ stress(5)=stress(5)+ydab(ii)*gamma*ydab(ii) ++ stress(6)=stress(6)+ydab(ii)*gamma*zdab(ii) ++ stress(7)=stress(7)+zdab(ii)*gamma*xdab(ii) ++ stress(8)=stress(8)+zdab(ii)*gamma*ydab(ii) ++ stress(9)=stress(9)+zdab(ii)*gamma*zdab(ii) ++ ++ enddo ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1)call gstate(safe) ++ if(.not.safe)call error(idnode,450) ++ ++c sum contributions to potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(3)=engtet ++ buffer(4)=virtet ++ ++ call gdsum(buffer(3),2,buffer(1)) ++ ++ engtet=buffer(3) ++ virtet=buffer(4) ++ ++ endif ++ ++ deallocate (xdab,ydab,zdab,stat=fail) ++ ++ return ++ end subroutine tethfrc ++ ++ subroutine xscale(idnode,mxnode,natms,keyens,imcon,tstep) ++ ++c*********************************************************************** ++c ++c dl_poly routine to scale positions with change in box shape ++c ++c parallel replicated data version ++c ++c copyright daresbury laboratory 1995 ++c author t.forester october 1995 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,natms,keyens,imcon,iatm0,iatm1,i ++ real(8) tstep,xa,ya,za,totmas,xcmo,ycmo,zcmo ++ ++c assign block of atoms to processor ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ if((keyens.eq.4).or.(keyens.eq.6))then ++ ++c berendsen npt/nst ++ ++ do i=iatm0,iatm1 ++ ++ xa=eta(1)*xxs(i)+eta(2)*yys(i)+eta(3)*zzs(i) ++ ya=eta(4)*xxs(i)+eta(5)*yys(i)+eta(6)*zzs(i) ++ za=eta(7)*xxs(i)+eta(8)*yys(i)+eta(9)*zzs(i) ++ ++ xxs(i)=xa ++ yys(i)=ya ++ zzs(i)=za ++ ++ enddo ++ ++ elseif(keyens.eq.5.or.keyens.eq.7)then ++ ++c hoover npt/nst ++ ++ totmas=0.d0 ++ do i=1,natms ++ if(rmass(i).gt.0.d0)totmas=totmas+weight(i) ++ enddo ++ ++ xcmo=0.d0 ++ ycmo=0.d0 ++ zcmo=0.d0 ++ ++ do i=1,natms ++ ++ if(rmass(i).gt.0.d0)then ++ ++ xcmo=xcmo+weight(i)*xxs(i) ++ ycmo=ycmo+weight(i)*yys(i) ++ zcmo=zcmo+weight(i)*zzs(i) ++ ++ endif ++ ++ enddo ++ xcmo=xcmo/totmas ++ ycmo=ycmo/totmas ++ zcmo=zcmo/totmas ++ ++ do i=iatm0,iatm1 ++ ++ xa=xxs(i)-xcmo ++ ya=yys(i)-ycmo ++ za=zzs(i)-zcmo ++ ++ xxs(i)=xxs(i)+tstep*(eta(1)*xa+eta(2)*ya+eta(3)*za) ++ yys(i)=yys(i)+tstep*(eta(2)*xa+eta(5)*ya+eta(6)*za) ++ zzs(i)=zzs(i)+tstep*(eta(3)*xa+eta(6)*ya+eta(9)*za) ++ ++ enddo ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxs,yys,zzs) ++ ++ endif ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxs,yys,zzs,buffer) ++ ++ return ++ end subroutine xscale ++ ++ end module tether_module ++ +diff -urN dl_class_1.9.orig/srcmod/three_body_module.f dl_class_1.9/srcmod/three_body_module.f +--- dl_class_1.9.orig/srcmod/three_body_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/three_body_module.f 2011-02-21 10:56:11.000000000 +0100 +@@ -0,0 +1,882 @@ ++ module three_body_module ++ ++c*********************************************************************** ++c ++c dl_poly module for defining three-body potential arrays ++c copyright - daresbury laboratory ++c author - w. smith sep 2003 ++c adapted - w. smith aug 2008 : solvation, free energy excitation ++c adapted - w. smith jan 2011 : metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use error_module ++ use metafreeze_module ++ use parse_module ++ use setup_module ++ use site_module ++ use solvation_module ++ use utility_module ++ ++ implicit none ++ ++ logical, allocatable :: filter(:) ++ real(8), allocatable :: prmtbp(:,:),rcut3b(:) ++ integer, allocatable :: lsttbp(:),ltptbp(:),lattbp(:) ++ ++ save prmtbp,rcut3b,lsttbp,ltptbp,lattbp,filter ++ ++ contains ++ ++ subroutine alloc_tbp_arrays(idnode) ++ ++ implicit none ++ ++ integer i,fail,idnode ++ dimension fail(6) ++ ++ do i=1,6 ++ fail(i)=0 ++ enddo ++ ++ allocate (prmtbp(mxtbp,mxptbp),stat=fail(1)) ++ allocate (rcut3b(mxtbp),stat=fail(2)) ++ allocate (lsttbp(mxtbp),stat=fail(3)) ++ allocate (ltptbp(mxtbp),stat=fail(4)) ++ allocate (lattbp(mxatms),stat=fail(5)) ++ allocate (filter(mxsite),stat=fail(6)) ++ ++ do i=1,6 ++ if(fail(i).gt.0)call error(idnode,1170) ++ enddo ++ ++ end subroutine alloc_tbp_arrays ++ ++ subroutine define_three_body ++ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for defining three body potentials ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2003 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lunits,lmols ++ character*8 keyword ++ character*8 atom0,atom1,atom2 ++ character*1 message(80) ++ integer idnode,ntptbp,ntpatm,fail,i,itbp,itptbp,keypot ++ integer idum,katm1,katm2,katm0,j,keytbp,ktbp,jtpatm ++ real(8) rcuttb,engunit ++ real(8), allocatable :: parpot(:) ++ ++ data fail/0/ ++ ++ allocate (parpot(mxptbp),stat=fail) ++ if(fail.ne.0)call error(idnode,1180) ++ ++ ntptbp=intstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,"(/,/,1x,'number of specified three ', ++ x 'body potentials',i10)") ntptbp ++ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ','atom 3 ', ++ x 3x,' key',30x,'parameters'/,/)") ++ ++ endif ++ if(ntptbp.gt.mxtbp) call error(idnode,83) ++ if(.not.lunits) call error(idnode,6) ++ if(.not.lmols) call error(idnode,13) ++ ++ do i=1,mxsite ++ filter(i)=.false. ++ enddo ++ ++ do itbp=1,mxtbp ++ lsttbp(itbp)=0 ++ enddo ++ ++ do itbp=1,mxtbp,mx2tbp ++ lsttbp(itbp)=-1 ++ enddo ++ ++ rcuttb=0.d0 ++ ++ do itptbp=1,ntptbp ++ ++ do i=1,mxptbp ++ parpot(i)=0.d0 ++ enddo ++ ++ call getrec(safe,idnode,nfield) ++ if(.not.safe)return ++ ++c Note the order!! atom0 is central ++ ++ call copystring(record,message,80) ++ call getword(atom1,record,8,lenrec) ++ call getword(atom0,record,8,lenrec) ++ call getword(atom2,record,8,lenrec) ++ call lowcase(record,lenrec) ++ call getword(keyword,record,4,lenrec) ++ ++ if(keyword(1:4).eq.'harm') then ++ keypot=0 ++ elseif(keyword(1:4).eq.'thrm') then ++ keypot=1 ++ elseif(keyword(1:4).eq.'shrm') then ++ keypot=2 ++ elseif(keyword(1:4).eq.'bvs1') then ++ keypot=3 ++ elseif(keyword(1:4).eq.'bvs2') then ++ keypot=4 ++ elseif(keyword(1:4).eq.'hbnd') then ++ keypot=5 ++ else ++ if(idnode.eq.0) write(nrite,*) message ++ call error(idnode,442) ++ endif ++ ++ parpot(1)=dblstr(record,lenrec,idum) ++ parpot(2)=dblstr(record,lenrec,idum) ++ parpot(3)=dblstr(record,lenrec,idum) ++ parpot(4)=dblstr(record,lenrec,idum) ++ parpot(5)=dblstr(record,lenrec,idum) ++ ++ if(idnode.eq.0) ++ x write(nrite,"(16x,3a8,4x,a4,1x,1p,9e13.5)") ++ x atom1,atom0,atom2,keyword(1:4),(parpot(j),j=1,mxptbp) ++ ++ katm0=0 ++ katm1=0 ++ katm2=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm ++ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm ++ ++ enddo ++ ++ if(katm0.eq.0.or.katm1.eq.0.or.katm2.eq.0) ++ x call error(idnode,84) ++ ++ filter(katm0)=.true. ++ filter(katm1)=.true. ++ filter(katm2)=.true. ++ ++ keytbp=(max(katm1,katm2)*(max(katm1,katm2)-1))/2+ ++ x min(katm1,katm2)+(katm0-1)*mx2tbp ++ ++ if(keytbp.gt.mxtbp) call error(idnode,86) ++ ++c convert parameters to internal units ++ ++ parpot(1)=parpot(1)*engunit ++ if(keypot.ne.5)parpot(2)=parpot(2)*(pi/180.d0) ++ ++ if(lsttbp(keytbp).gt.0) call error(idnode,18) ++ lsttbp(keytbp)=itptbp ++ ltptbp(itptbp)=keypot ++ ktbp=mx2tbp*((keytbp-1)/mx2tbp)+1 ++ if(lsttbp(ktbp).lt.0)lsttbp(ktbp)=0 ++ ++c calculate max three body cutoff ++ ++ rcuttb=max(rcuttb,parpot(5)) ++ rcut3b(itptbp)=parpot(5) ++ ++c store three body potential parameters ++ ++ do i=1,4 ++ prmtbp(itptbp,i)=parpot(i) ++ enddo ++ if(mxptbp.ge.6) then ++ do i=6,mxptbp ++ prmtbp(itptbp,i-1)=parpot(i-1) ++ enddo ++ endif ++ enddo ++ ++ if(rcuttb.lt.1.d-6)call error(idnode,451) ++ ++ deallocate (parpot,stat=fail) ++ ++ return ++ end subroutine define_three_body ++ ++ subroutine thbfrc ++ x (lsolva,lfree,lexcite,idnode,mxnode,natms,imcon,rcuttb, ++ x engtbp,virtbp) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating three body forces arising ++c from the included angle between three atoms ++c ++c Note: the subroutine converts coordinates to reduced units ++c to avoid a call to images.f. The link cell algorithm used ++c here necessitates a parallelepiped cell geometry ++c ++c copyright - daresbury laboratory 1994 ++c author - w.smith mar 1994 ++c adapted - w.smith aug 2008 solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lsolva,lfree,lexcite,lselect,lskip ++ logical idrive,jdrive,kdrive ++ integer idnode,mxnode,natms,imcon,nix,niy,niz ++ integer i,nbx,nby,nbz,ncells,l,ix,iy,iz,k,icell,kk,jx,jy,jz ++ integer j,jcell,ii,itbp,limit,last,ktbp,jtbp,jktbp,kktbp ++ integer ia,ib,ic,ktyp,jj,jk,kkk ++ real(8) rcuttb,engtbp,virtbp,tterm,uterm,xm,ym,zm,cprp,det ++ real(8) xdc,ydc,zdc,sxx,syy,szz,sxab,syab,szab,xab,yab,zab ++ real(8) rab,sxbc,sybc,szbc,xbc,ybc,zbc,rbc,xac,yac,zac,rac ++ real(8) rrab,rrbc,rrac,cost,sint,theta,pterm,gamma,vterm ++ real(8) gamsa,gamsb,gamsc,scrn,fxa,fya,fza,fxc,fyc,fzc,strs ++ real(8) strs_loc ++ ++ dimension nix(27),niy(27),niz(27),cprp(10),strs(6),strs_loc(9) ++ ++ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, ++ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ ++ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, ++ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ ++ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, ++ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ ++ ++ lskip=(lfree.or.lexcite) ++ ++c flag for undefined potentials ++ ++ safe=.true. ++ ++c initialise accumulators ++ ++ engtbp=0.d0 ++ virtbp=0.d0 ++ tbp_fre=0.d0 ++ tbp_vir=0.d0 ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++ if(lsolva)then ++ ++ lcomp(8)=.true. ++ en3_sol(:)=0.d0 ++ if(lexcite)en3_exc(:)=0.d0 ++ ++ endif ++ ++c create mock cell vectors for non-periodic system ++ ++ if(imcon.eq.0) then ++ ++ xm=0.d0 ++ ym=0.d0 ++ zm=0.d0 ++ do i=1,natms ++ xm=max(xm,abs(xxx(i))) ++ ym=max(ym,abs(yyy(i))) ++ zm=max(zm,abs(zzz(i))) ++ enddo ++ ++ cell(1)=2.d0*xm+rcuttb ++ cell(2)=0.d0 ++ cell(3)=0.d0 ++ cell(4)=0.d0 ++ cell(5)=2.d0*ym+rcuttb ++ cell(6)=0.d0 ++ cell(7)=0.d0 ++ cell(8)=0.d0 ++ cell(9)=2.d0*zm+rcuttb ++ ++ endif ++ ++c check for appropriate boundary conditions ++ ++ if(imcon.gt.3)call error(idnode,67) ++ call invert(cell,rcell,det) ++ call dcell(cell,cprp) ++ ++c calculate link cell numbers ++ ++ nbx=int(cprp(7)/(rcuttb+1.d-6)) ++ nby=int(cprp(8)/(rcuttb+1.d-6)) ++ nbz=int(cprp(9)/(rcuttb+1.d-6)) ++ ncells=nbx*nby*nbz ++ if(ncells.gt.mxcell) then ++ ++ if(idnode.eq.0) then ++ ++ write(nrite,'(a,i6)') ++ x 'number of required link cells in routine thbfrc is ',ncells ++ write(nrite,'(a,i6)') ++ x 'number of default link cells in routine thbfrc is ',mxcell ++ call error(idnode,69) ++ ++ endif ++ ++ endif ++ ++c transform atomic coordinates and construct link cells ++ ++ do l=1,ncells ++ ++ lct(l)=0 ++ lst(l)=0 ++ ++ enddo ++ ++ xdc=dble(nbx) ++ ydc=dble(nby) ++ zdc=dble(nbz) ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) ++ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) ++ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) ++ ++ xxx(i)=sxx ++ yyy(i)=syy ++ zzz(i)=szz ++ ++ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) ++ iy=min(int(ydc*(syy+0.5d0)),nby-1) ++ iz=min(int(zdc*(szz+0.5d0)),nbz-1) ++ k=1+ix+nbx*(iy+nby*iz) ++ lst(k)=lst(k)+1 ++ link(i)=lct(k) ++ lct(k)=i ++ ++ endif ++ ++ enddo ++ ++c loop over central atoms of angles ++ ++ ix=0 ++ iy=1 ++ iz=1 ++ do icell=1,ncells ++ ++ ix=ix+1 ++ if(ix.gt.nbx)then ++ ix=1 ++ iy=iy+1 ++ if(iy.gt.nby)then ++ iy=1 ++ iz=iz+1 ++ endif ++ endif ++ ++c construct mini-list of neighbour cell contents ++ ++ k=0 ++ do kk=1,27 ++ ++ jx=ix+nix(kk) ++ jy=iy+niy(kk) ++ jz=iz+niz(kk) ++ ++ if(jx.gt.nbx)jx=1 ++ if(jy.gt.nby)jy=1 ++ if(jz.gt.nbz)jz=1 ++ if(jx.lt.1)jx=jx+nbx ++ if(jy.lt.1)jy=jy+nby ++ if(jz.lt.1)jz=jz+nbz ++ ++ jcell=jx+nbx*(jy-1+nby*(jz-1)) ++ j=lct(jcell) ++ ++ do ii=1,lst(jcell) ++ ++ k=k+1 ++ lattbp(k)=j ++ j=link(j) ++ ++ enddo ++ ++ enddo ++ ++ limit=k ++ ++ do ii=1,lst(icell) ++ ++ i=lattbp(ii) ++ itbp=mx2tbp*(ltype(i)-1) ++ if(mod(i,mxnode).eq.idnode.and.lsttbp(itbp+1).ge.0)then ++ ++ last=limit ++ ++ do kk=1,limit/2 ++ ++ if(kk.gt.(limit-1)/2)last=limit/2 ++ ++ do jj=1,last ++ ++ j=lattbp(jj) ++ jk=jj+kk ++ if(jk.gt.limit)jk=jk-limit ++ k=lattbp(jk) ++ if(i.ne.j.and.i.ne.k)then ++ ++ jtbp=max(ltype(j),ltype(k)) ++ ktbp=min(ltype(j),ltype(k)) ++ jktbp=itbp+(jtbp*(jtbp-1))/2+ktbp ++ kktbp=lsttbp(jktbp) ++ if(kktbp.gt.0)then ++ ++c make labels etc consistent with angfrc.f ++ ++ ia=j ++ ib=i ++ ic=k ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(ia)) ++ jdrive=driven(ltype(ib)) ++ kdrive=driven(ltype(ic)) ++ ++ endif ++ ++ if(lskip)then ++ ++ if((atm_fre(ia).eq.1.or.atm_fre(ib).eq.1.or. ++ x atm_fre(ic).eq.1).and.(atm_fre(ia).eq.2.or. ++ x atm_fre(ib).eq.2.or.atm_fre(ic).eq.2))cycle ++ ++ endif ++ ++ sxab=xxx(ia)-xxx(ib) ++ sxab=sxab-nint(sxab) ++ syab=yyy(ia)-yyy(ib) ++ syab=syab-nint(syab) ++ szab=zzz(ia)-zzz(ib) ++ szab=szab-nint(szab) ++ ++ xab=cell(1)*sxab+cell(4)*syab+cell(7)*szab ++ if(abs(xab).lt.rcuttb)then ++ ++ yab=cell(2)*sxab+cell(5)*syab+cell(8)*szab ++ if(abs(yab).lt.rcuttb)then ++ ++ zab=cell(3)*sxab+cell(6)*syab+cell(9)*szab ++ if(abs(zab).lt.rcuttb)then ++ ++ sxbc=xxx(ic)-xxx(ib) ++ sxbc=sxbc-nint(sxbc) ++ sybc=yyy(ic)-yyy(ib) ++ sybc=sybc-nint(sybc) ++ szbc=zzz(ic)-zzz(ib) ++ szbc=szbc-nint(szbc) ++ ++ xbc=cell(1)*sxbc+cell(4)*sybc+cell(7)*szbc ++ if(abs(xbc).lt.rcuttb)then ++ ++ ybc=cell(2)*sxbc+cell(5)*sybc+cell(8)*szbc ++ if(abs(ybc).lt.rcuttb)then ++ ++ zbc=cell(3)*sxbc+cell(6)*sybc+cell(9)*szbc ++ if(abs(zbc).lt.rcuttb)then ++ ++ ktyp=ltptbp(kktbp) ++ rab=sqrt(xab*xab+yab*yab+zab*zab) ++ rbc=sqrt(xbc*xbc+ybc*ybc+zbc*zbc) ++ ++ if(rcut3b(kktbp).ge.max(rab,rbc))then ++ ++ xac=xab-xbc ++ yac=yab-ybc ++ zac=zab-zbc ++ rac=sqrt(xac*xac+yac*yac+zac*zac) ++ ++ rrab=1.d0/rab ++ rrbc=1.d0/rbc ++ rrac=1.d0/rac ++ ++c normalise direction vectors ++ ++ xab=xab*rrab ++ yab=yab*rrab ++ zab=zab*rrab ++ ++ xbc=xbc*rrbc ++ ybc=ybc*rrbc ++ zbc=zbc*rrbc ++ ++ xac=xac*rrac ++ yac=yac*rrac ++ zac=zac*rrac ++ ++ cost=(xab*xbc+yab*ybc+zab*zbc) ++ if(abs(cost).gt.1.d0)cost=sign(1.d0,cost) ++ if(ktyp.ne.5)then ++ ++ sint=max(1.d-8,sqrt(1.d0-cost*cost)) ++ theta=acos(cost) ++ ++ endif ++ ++ if(ktyp.eq.0)then ++ ++c harmonic angle potential ++ ++ pterm=0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 ++ gamma=prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint ++ ++ vterm=0.d0 ++ gamsa=0.d0 ++ gamsc=0.d0 ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.1)then ++ ++c truncated harmonic valence angle potential ++ ++ scrn=exp(-(rab**8+rbc**8)/prmtbp(kktbp,3)**8) ++ pterm=scrn*0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 ++ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmtbp(kktbp,3)**8 ++ gamma=scrn*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint ++ gamsa=(8.d0*pterm/prmtbp(kktbp,3)**8)*rab**7 ++ gamsc=(8.d0*pterm/prmtbp(kktbp,3)**8)*rbc**7 ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.2)then ++ ++c screened harmonic valence angle potential ++ ++ scrn=exp(-(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4))) ++ pterm=scrn*0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 ++ vterm=-pterm*(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4)) ++ gamma=scrn*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint ++ gamsa=(pterm/prmtbp(kktbp,3)) ++ gamsc=(pterm/prmtbp(kktbp,4)) ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.3)then ++ ++c screened vessal potential type 1 ++ ++ scrn=exp(-(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4))) ++ pterm=scrn*prmtbp(kktbp,1)/ ++ x (8.d0*(prmtbp(kktbp,2)-pi)**2)* ++ x ((prmtbp(kktbp,2)-pi)**2-(theta-pi)**2)**2 ++ vterm=-pterm*(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4)) ++ gamma=scrn*prmtbp(kktbp,1)/ ++ x (2.d0*(prmtbp(kktbp,2)-pi)**2)* ++ x ((prmtbp(kktbp,2)-pi)**2-(theta-pi)**2)*(theta-pi)/sint ++ gamsa=(pterm/prmtbp(kktbp,3)) ++ gamsc=(pterm/prmtbp(kktbp,4)) ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.4)then ++ ++c truncated vessal potential type 2 - use with sw1 ++ ++ scrn=exp(-(rab**8+rbc**8)/prmtbp(kktbp,4)**8) ++ pterm=scrn*prmtbp(kktbp,1)*(theta**prmtbp(kktbp,3)* ++ x (theta-prmtbp(kktbp,2))**2*(theta+prmtbp(kktbp,2)- ++ x 2.d0*pi)**2-0.5d0*prmtbp(kktbp,3)*pi**(prmtbp(kktbp,3) ++ x -1.d0)*(theta-prmtbp(kktbp,2))**2*(pi- ++ x prmtbp(kktbp,2))**3) ++ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmtbp(kktbp,4)**8 ++ gamma=scrn*prmtbp(kktbp,1)*(theta**(prmtbp(kktbp,3)-1.d0)* ++ x (theta-prmtbp(kktbp,2))*(theta+prmtbp(kktbp,2)- ++ x 2.d0*pi)*((prmtbp(kktbp,3)+4.d0)*theta**2-2.d0*pi* ++ x (prmtbp(kktbp,3)+2.d0)*theta+prmtbp(kktbp,3)* ++ x prmtbp(kktbp,2)*(2.d0*pi-prmtbp(kktbp,2)))- ++ x prmtbp(kktbp,3)*pi**(prmtbp(kktbp,3)-1.d0)* ++ x (theta-prmtbp(kktbp,2))*(pi-prmtbp(kktbp,2))**3)/sint ++ gamsa=(8.d0*pterm/prmtbp(kktbp,4)**8)*rab**7 ++ gamsc=(8.d0*pterm/prmtbp(kktbp,4)**8)*rbc**7 ++ gamsb=0.d0 ++ ++ elseif(ktyp.eq.5)then ++ ++ if(min(rab,rbc).lt.1.5d0)then ++ ++ scrn=(5.d0*(prmtbp(kktbp,2)/rac)**2-6.d0)* ++ x (prmtbp(kktbp,2)/rac)**10 ++ tterm=prmtbp(kktbp,1)*cost**4 ++ pterm=scrn*tterm ++ uterm=60.d0*((prmtbp(kktbp,2)/rac)**2-1.d0)* ++ x (prmtbp(kktbp,2)/rac)**10 ++ vterm=tterm*uterm ++ gamma=scrn*4.d0*prmtbp(kktbp,1)*cost**3 ++ gamsb=tterm*uterm/rac ++ gamsa=0.d0 ++ gamsc=0.d0 ++ ++ endif ++ ++ else ++ ++ safe=.false. ++ pterm=0.d0 ++ vterm=0.d0 ++ gamma=0.d0 ++ gamsa=0.d0 ++ gamsb=0.d0 ++ gamsc=0.d0 ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set triple index ++ ++ if(lsolva)kkk=loc3(atmolt(ia),atmolt(ib),atmolt(ic)) ++ ++ if(lexcite)then ++ ++c selected excitation option ++ ++ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1) ++ x .and.(atm_fre(ic).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic).eq.0) ++ ++ if(lsolva)en3_exc(kkk)=en3_exc(kkk)+pterm ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1) ++ x .or.(atm_fre(ic).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ tbp_fre=tbp_fre-pterm ++ tbp_vir=tbp_vir-vterm ++ pterm=lambda1*pterm ++ vterm=lambda1*vterm ++ gamma=lambda1*gamma ++ gamsa=lambda1*gamsa ++ gamsb=lambda1*gamsb ++ gamsc=lambda1*gamsc ++ ++ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2) ++ x .or.(atm_fre(ic).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ tbp_fre=tbp_fre+pterm ++ tbp_vir=tbp_vir+vterm ++ pterm=lambda2*pterm ++ vterm=lambda2*vterm ++ gamma=lambda2*gamma ++ gamsa=lambda2*gamsa ++ gamsb=lambda2*gamsb ++ gamsc=lambda2*gamsc ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential and virial ++ ++ engtbp=engtbp+pterm ++ virtbp=virtbp+vterm ++ ++ if(lsolva)en3_sol(kkk)=en3_sol(kkk)+pterm ++ ++c calculate atomic forces ++ ++ fxa=gamma*(xbc-xab*cost)*rrab+gamsa*xab+gamsb*xac ++ fya=gamma*(ybc-yab*cost)*rrab+gamsa*yab+gamsb*yac ++ fza=gamma*(zbc-zab*cost)*rrab+gamsa*zab+gamsb*zac ++ ++ fxc=gamma*(xab-xbc*cost)*rrbc+gamsc*xbc-gamsb*xac ++ fyc=gamma*(yab-ybc*cost)*rrbc+gamsc*ybc-gamsb*yac ++ fzc=gamma*(zab-zbc*cost)*rrbc+gamsc*zbc-gamsb*zac ++ ++ fxx(ia)=fxx(ia)+fxa ++ fyy(ia)=fyy(ia)+fya ++ fzz(ia)=fzz(ia)+fza ++ ++ fxx(ib)=fxx(ib)-fxa-fxc ++ fyy(ib)=fyy(ib)-fya-fyc ++ fzz(ib)=fzz(ib)-fza-fzc ++ ++ fxx(ic)=fxx(ic)+fxc ++ fyy(ic)=fyy(ic)+fyc ++ fzz(ic)=fzz(ic)+fzc ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+rab*xab*fxa+rbc*xbc*fxc ++ strs(2)=strs(2)+rab*xab*fya+rbc*xbc*fyc ++ strs(3)=strs(3)+rab*xab*fza+rbc*xbc*fzc ++ strs(4)=strs(4)+rab*yab*fya+rbc*ybc*fyc ++ strs(5)=strs(5)+rab*yab*fza+rbc*ybc*fzc ++ strs(6)=strs(6)+rab*zab*fza+rbc*zbc*fzc ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn)then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+pterm ++ vir_loc=vir_loc+vterm ++ ++c local forces ++ ++ fxx_loc(ia)=fxx_loc(ia)+fxa ++ fyy_loc(ia)=fyy_loc(ia)+fya ++ fzz_loc(ia)=fzz_loc(ia)+fza ++ ++ fxx_loc(ib)=fxx_loc(ib)-fxa-fxc ++ fyy_loc(ib)=fyy_loc(ib)-fya-fyc ++ fzz_loc(ib)=fzz_loc(ib)-fza-fzc ++ ++ fxx_loc(ic)=fxx_loc(ic)+fxc ++ fyy_loc(ic)=fyy_loc(ic)+fyc ++ fzz_loc(ic)=fzz_loc(ic)+fzc ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+rab*xab*fxa+rbc*xbc*fxc ++ strs_loc(2)=strs_loc(2)+rab*xab*fya+rbc*xbc*fyc ++ strs_loc(3)=strs_loc(3)+rab*xab*fza+rbc*xbc*fzc ++ strs_loc(4)=strs_loc(4)+rab*yab*fya+rbc*ybc*fyc ++ strs_loc(5)=strs_loc(5)+rab*yab*fza+rbc*ybc*fzc ++ strs_loc(6)=strs_loc(6)+rab*zab*fza+rbc*zbc*fzc ++ ++ endif ++ ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ enddo ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++c check for undefined potentials ++ ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe) call error(idnode,442) ++ ++c global sum of three body potential and virial ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engtbp ++ buffer(2)=virtbp ++ buffer(3)=tbp_fre ++ buffer(4)=tbp_vir ++ call gdsum(buffer(1),4,buffer(5)) ++ engtbp=buffer(1) ++ virtbp=buffer(2) ++ tbp_fre=buffer(3) ++ tbp_vir=buffer(4) ++ ++c sum up solvation energies ++ ++ if(lsolva)then ++ ++ call gdsum(en3_sol,mxtmls_sol3,buffer(1)) ++ if(lexcite)call gdsum(en3_exc,mxtmls_exc3,buffer(1)) ++ ++ endif ++ ++ endif ++ ++c restore coordinate array to original representation ++ ++ do i=1,natms ++ ++ if(filter(ltype(i)))then ++ ++ sxx=xxx(i) ++ syy=yyy(i) ++ szz=zzz(i) ++ ++ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz ++ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz ++ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz ++ ++ endif ++ ++ enddo ++ ++c restore cell vector ++ ++ if(imcon.eq.0) then ++ cell(1)=0.d0 ++ cell(5)=0.d0 ++ cell(9)=0.d0 ++ endif ++ ++ return ++ ++ end subroutine thbfrc ++ ++ end module three_body_module +diff -urN dl_class_1.9.orig/srcmod/utility_module.f dl_class_1.9/srcmod/utility_module.f +--- dl_class_1.9.orig/srcmod/utility_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/utility_module.f 2010-12-22 13:27:23.000000000 +0100 +@@ -0,0 +1,1612 @@ ++ module utility_module ++ ++c*********************************************************************** ++c ++c dl_poly module for utility subroutines and functions ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ contains ++ ++ subroutine global_sum_forces(natms,mxnode,gxx,gyy,gzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to perform global sum of atomic forces as ++c requred by replicated data strategy ++c ++c copyright - daresbury laboratory ++c author - w.smith december 2005 ++c ++c*********************************************************************** ++ ++ use config_module ++ ++ implicit none ++ ++ integer natms,mxnode,i,j ++ real(8) gxx(*),gyy(*),gzz(*) ++ ++ if(mxnode.gt.1) then ++ ++ j=0 ++ do i=1,natms ++ ++ buffer(j+1)=gxx(i) ++ buffer(j+2)=gyy(i) ++ buffer(j+3)=gzz(i) ++ j=j+3 ++ ++ enddo ++ call gdsum(buffer(1),3*natms,buffer(3*natms+1)) ++ j=0 ++ do i=1,natms ++ ++ gxx(i)=buffer(j+1) ++ gyy(i)=buffer(j+2) ++ gzz(i)=buffer(j+3) ++ j=j+3 ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine global_sum_forces ++ ++ subroutine images ++ x (imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating the minimum image ++c of atom pairs within a specified MD cell ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992. ++c T3D optimised version. t.forester july 1994 ++c ++c for ++c imcon=0 no boundary conditions apply ++c imcon=1 standard cubic boundaries apply ++c imcon=2 orthorhombic boundaries apply ++c imcon=3 parallelepiped boundaries apply ++c imcon=4 truncated octahedron boundaries apply ++c imcon=5 rhombic dodecahedron boundaries apply ++c imcon=6 x-y parallelogram boundary conditions : no periodicity in z ++c imcon=7 hexagonal prism boundaries apply ++c ++c note: in all cases the centre of the cell is at (0,0,0) ++c warning - replicated data version: does not re-merge ++c coordinate arrays ++c ++c*********************************************************************** ++ ++ use error_module ++ ++ implicit none ++ ++ integer imcon,idnode,mxnode,natms,iatm1,iatm2,i ++ real(8) cell,xxx,yyy,zzz,aaa,bbb,ccc,det,rt2,rt3,ssx ++ real(8) ssy,ssz,ddd,xss,yss,zss,rcell ++ ++ dimension xxx(*),yyy(*),zzz(*) ++ dimension cell(9),rcell(9) ++ ++ data rt2/1.41421356623d0/,rt3/1.7320508075d0/ ++ ++ if(imcon.gt.0) then ++ ++c block indices ++ ++ iatm1 = (idnode*natms)/mxnode+1 ++ iatm2 = ((idnode+1)*natms)/mxnode ++ ++ endif ++ ++ if(imcon.eq.1)then ++ ++c standard cubic boundary conditions ++ ++ ++ aaa=1.d0/cell(1) ++ ++ do i=iatm1,iatm2 ++ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) ++ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) ++ zzz(i)=zzz(i)-cell(1)*nint(aaa*zzz(i)) ++ enddo ++ ++ else if(imcon.eq.2)then ++ ++c rectangular (slab) boundary conditions ++ ++ aaa=1.d0/cell(1) ++ bbb=1.d0/cell(5) ++ ccc=1.d0/cell(9) ++ ++ do i=iatm1,iatm2 ++ ++ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) ++ yyy(i)=yyy(i)-cell(5)*nint(bbb*yyy(i)) ++ zzz(i)=zzz(i)-cell(9)*nint(ccc*zzz(i)) ++ ++ enddo ++ ++ else if(imcon.eq.3)then ++ ++c parallelepiped boundary conditions ++ ++ call invert(cell,rcell,det) ++ ++ do i=iatm1,iatm2 ++ ++ ssx=(rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i)) ++ ssy=(rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i)) ++ ssz=(rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i)) ++ ++ xss=ssx-nint(ssx) ++ yss=ssy-nint(ssy) ++ zss=ssz-nint(ssz) ++ ++ xxx(i)=(cell(1)*xss+cell(4)*yss+cell(7)*zss) ++ yyy(i)=(cell(2)*xss+cell(5)*yss+cell(8)*zss) ++ zzz(i)=(cell(3)*xss+cell(6)*yss+cell(9)*zss) ++ ++ enddo ++ ++ else if(imcon.eq.4)then ++ ++c truncated octahedral boundary conditions ++ ++ if(.not.(abs(cell(1)-cell(5)).lt.1.d-6.and. ++ x abs(cell(5)-cell(9)).lt.1.d-6)) call error(idnode,130) ++ ++ aaa=1.d0/cell(1) ++ ++ do i=iatm1,iatm2 ++ ++ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) ++ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) ++ zzz(i)=zzz(i)-cell(1)*nint(aaa*zzz(i)) ++ ++ if((abs(xxx(i))+abs(yyy(i))+abs(zzz(i))).ge. ++ x (0.75d0*cell(1)))then ++ ++ xxx(i)=xxx(i)-0.5d0*sign(cell(1),xxx(i)) ++ yyy(i)=yyy(i)-0.5d0*sign(cell(1),yyy(i)) ++ zzz(i)=zzz(i)-0.5d0*sign(cell(1),zzz(i)) ++ ++ endif ++ ++ enddo ++ ++ else if(imcon.eq.5)then ++ ++c rhombic dodecahedral boundary conditions ++ ++ if(.not.(abs(cell(1)-cell(5)).lt.1.d-6.and. ++ x abs(cell(9)-cell(1)*rt2).lt.1.d-6)) ++ x call error(idnode,140) ++ ++ aaa=1.d0/cell(1) ++ bbb=1.d0/cell(9) ++ ++ do i=iatm1,iatm2 ++ ++ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) ++ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) ++ zzz(i)=zzz(i)-cell(9)*nint(bbb*zzz(i)) ++ ++ if((abs(xxx(i))+abs(yyy(i))+abs(rt2*zzz(i))).ge. ++ x cell(1))then ++ ++ xxx(i)=xxx(i)-0.5d0*sign(cell(1),xxx(i)) ++ yyy(i)=yyy(i)-0.5d0*sign(cell(1),yyy(i)) ++ zzz(i)=zzz(i)-0.5d0*sign(cell(9),zzz(i)) ++ ++ endif ++ ++ enddo ++ ++ else if(imcon.eq.6) then ++ ++c x-y boundary conditions ++ ++ det = cell(1)*cell(5) - cell(2)*cell(4) ++ ++ if(abs(det).lt.1.d-6)call error(idnode,120) ++ ++ det = 1.d0/det ++ ++ rcell(1) = det*cell(5) ++ rcell(2) = -det*cell(2) ++ rcell(4) = -det*cell(4) ++ rcell(5) = det*cell(1) ++ ++ do i=iatm1,iatm2 ++ ++ ssx = rcell(1)*xxx(i) + rcell(4)*yyy(i) ++ ssy = rcell(2)*xxx(i) + rcell(5)*yyy(i) ++ ++ xss = ssx - nint(ssx) ++ yss = ssy - nint(ssy) ++ ++ xxx(i)=cell(1)*xss + cell(4)*yss ++ yyy(i)=cell(2)*xss + cell(5)*yss ++ ++ enddo ++ ++ else if(imcon.eq.7) then ++ ++c hexagonal prism boundary conditions ++ ++ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) ++ x call error(idnode,135) ++ ++ aaa=cell(1)/(rt3*2.d0) ++ bbb=cell(1)/rt3 ++ ccc=rt3/cell(1) ++ ddd=1.d0/cell(9) ++ ++ do i=iatm1,iatm2 ++ ++ yyy(i)=yyy(i)-bbb*nint(ccc*yyy(i)) ++ zzz(i)=zzz(i)-cell(9)*nint(ddd*zzz(i)) ++ ++ if((abs(yyy(i))+abs(rt3*xxx(i))).ge.bbb)then ++ ++ xxx(i)=xxx(i)-rt3*sign(aaa,xxx(i)) ++ yyy(i)=yyy(i)-sign(aaa,yyy(i)) ++ ++ endif ++ ++ enddo ++ ++ endif ++ ++ return ++ end subroutine images ++ ++ subroutine config_write(fname,levcfg,imcon,natms,engcfg) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for writing CONFIG files ++c ++c copyright - daresbury laboratory ++c author - w. smith aug 2007 ++c ++c*********************************************************************** ++ ++ use config_module ++ use setup_module ++ ++ implicit none ++ ++ character*6 fname ++ ++ integer i,natms,levcfg,imcon,nstep ++ real(8) engcfg ++ ++ open(nconf,file=fname,form='formatted') ++ ++ write(nconf,'(80a1)') cfgname ++ write(nconf,'(3i10,1p,g20.12)') levcfg,imcon,natms,engcfg ++ if(imcon.gt.0) write(nconf,'(3f20.12)') cell ++ ++ do i=1,natms ++ ++ write(nconf,'(a8,i10)') atmnam(i),i ++ write(nconf,'(3g20.10)') xxx(i),yyy(i),zzz(i) ++ if(levcfg.gt.0)write(nconf,'(3g20.12)') ++ x vxx(i),vyy(i),vzz(i) ++ if(levcfg.gt.1)write(nconf,'(3g20.12)') ++ x fxx(i),fyy(i),fzz(i) ++ ++ enddo ++ ++ close (nconf) ++ ++ return ++ end subroutine config_write ++ ++ subroutine bomb(idnode,nyr,nmn,ndy) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to set an expiry date in a compiled program ++c ++c copyright - daresbury laboratory ++c author - w. smith oct 2002 ++c ++c*********************************************************************** ++ ++ use setup_module ++ ++ implicit none ++ ++ logical safe ++ integer info(8) ++ character*12 dat,tim,zon ++ integer idnode,nyr,nmn,ndy ++ ++ safe=.true. ++ ++ call date_and_time(dat,tim,zon,info) ++ ++ if(info(1).gt.nyr)then ++ ++ safe=.false. ++ ++ else if(info(1).eq.nyr)then ++ ++ if(info(2).gt.nmn)then ++ ++ safe=.false. ++ ++ else if(info(2).eq.nmn)then ++ ++ if(info(3).ge.ndy)safe=.false. ++ ++ endif ++ ++ endif ++ ++ if(.not.safe)then ++ ++ if(idnode.eq.0)write(nrite,'(a,/,a)') ++ x 'THE EXPIRY DATE OF THIS EXECUTABLE HAS PASSED.', ++ X 'PLEASE CONTACT W.SMITH@DL.AC.UK FOR A NEW LICENCE' ++ ++ call exitcomms() ++ ++ endif ++ ++ return ++ end subroutine bomb ++ ++ subroutine cpy_rtc(nnn,aaa,bbb) ++ ++c********************************************************************** ++c ++c dl_poly subroutine for copying a real array into a complex array ++c of the same dimension ++c ++c copyright daresbury laboratory 1998 ++c author w.smith oct 1998 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i,nnn ++ real(8) aaa(*) ++ complex(8) bbb(*) ++ ++ do i=1,nnn ++ ++ bbb(i)=cmplx(aaa(i),0.d0,kind=8) ++ ++ enddo ++ ++ return ++ end subroutine cpy_rtc ++ ++ function duni() ++ ++c********************************************************************* ++c ++c dl_poly random number generator based on the universal ++c random number generator of marsaglia, zaman and tsang ++c (stats and prob. lett. 8 (1990) 35-39.) it must be ++c called once to initialise parameters u,c,cd,cm ++c ++c copyright daresbury laboratory 1992 ++c author - w.smith july 1992 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical new ++ integer ir,jr,i,j,k,l,m,ii,jj ++ real(4) s,t,u,c,cd,cm,uni ++ real(8) duni ++ dimension u(97) ++ save u,c,cd,cm,uni,ir,jr,new ++ data new/.true./ ++ ++ if(new)then ++ ++c initial values of i,j,k must be in range 1 to 178 (not all 1) ++c initial value of l must be in range 0 to 168. ++ ++ i=12 ++ j=34 ++ k=56 ++ l=78 ++c ++ ir=97 ++ jr=33 ++ new=.false. ++ ++ do 200 ii=1,97 ++ s=0.0 ++ t=0.5 ++ do 100 jj=1,24 ++ m=mod(mod(i*j,179)*k,179) ++ i=j ++ j=k ++ k=m ++ l=mod(53*l+1,169) ++ if(mod(l*m,64).ge.32)s=s+t ++ t=0.5*t ++ 100 continue ++ u(ii)=s ++ 200 continue ++ c = 362436.0/16777216.0 ++ cd= 7654321.0/16777216.0 ++ cm=16777213.0/16777216.0 ++ else ++ ++c calculate random number ++ uni=u(ir)-u(jr) ++ if(uni.lt.0.0)uni=uni+1.0 ++ u(ir)=uni ++ ir=ir-1 ++ if(ir.eq.0)ir=97 ++ jr=jr-1 ++ if(jr.eq.0)jr=97 ++ c=c-cd ++ if(c.lt.0.0)c=c+cm ++ uni=uni-c ++ if(uni.lt.0.0)uni=uni+1.0 ++ duni=dble(uni) ++ endif ++ ++ return ++ end function duni ++ ++ subroutine ele_prd(nnn,aaa,bbb,ccc) ++ ++c********************************************************************** ++c ++c dl_poly subroutine for element by element product of ++c a real array (bbb) and a complex array (ccc) ++c ++c copyright daresbury laboratory 1998 ++c author w.smith july 1998 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer i,nnn ++ real(8) bbb(*) ++ complex(8) aaa(*),ccc(*) ++ ++ do i=1,nnn ++ ++ aaa(i)=bbb(i)*ccc(i) ++ ++ enddo ++ ++ return ++ end subroutine ele_prd ++ ++ subroutine gauss(natms,vxx,vyy,vzz) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for constructing velocity arrays ++c with a gaussian distribution of unit variance. ++c ++c based on the Box-Muller method ++c ++c note - this version uses a universal random number ++c generator, which generates pseudo-random numbers between ++c 0 and 1. it is based on the algorithm of marsaglia, zaman ++c and tsang in: stats and prob. lett. 8 (1990) 35-39. ++c ++c copyright daresbury laboratory 2007 ++c author - w. smith nov 2007 ++c ++c********************************************************************* ++ ++ use setup_module ++ ++ implicit none ++ ++ integer natms,i ++ real(8) vxx,vyy,vzz,rrr,rr1,rr2 ++ ++ dimension vxx(natms),vyy(natms),vzz(natms) ++ ++c initialise random number generator ++ ++ rrr=duni() ++ ++c calculate gaussian random numbers ++ ++ do i=1,2*(natms/2),2 ++ ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vxx(i)=rr1*cos(rr2) ++ vxx(i+1)=rr1*sin(rr2) ++ ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vyy(i)=rr1*cos(rr2) ++ vyy(i+1)=rr1*sin(rr2) ++ ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vzz(i)=rr1*cos(rr2) ++ vzz(i+1)=rr1*sin(rr2) ++ ++ enddo ++ if(mod(natms,2).ne.0)then ++ ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vxx(natms)=rr1*cos(rr2) ++ vyy(natms)=rr1*sin(rr2) ++ rr1=sqrt(-2.d0*log(duni())) ++ rr2=2.d0*pi*duni() ++ vzz(natms)=rr1*cos(rr2) ++ ++ endif ++ ++ return ++ end subroutine gauss ++ ++ subroutine invert(a,b,d) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine to invert a 3 * 3 matrix using cofactors ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith april 1992 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ real(8) a,b,d,r ++ ++ dimension a(9),b(9) ++ ++c calculate adjoint matrix ++ b(1)=a(5)*a(9)-a(6)*a(8) ++ b(2)=a(3)*a(8)-a(2)*a(9) ++ b(3)=a(2)*a(6)-a(3)*a(5) ++ b(4)=a(6)*a(7)-a(4)*a(9) ++ b(5)=a(1)*a(9)-a(3)*a(7) ++ b(6)=a(3)*a(4)-a(1)*a(6) ++ b(7)=a(4)*a(8)-a(5)*a(7) ++ b(8)=a(2)*a(7)-a(1)*a(8) ++ b(9)=a(1)*a(5)-a(2)*a(4) ++ ++c calculate determinant ++ d=a(1)*b(1)+a(4)*b(2)+a(7)*b(3) ++ r=0.d0 ++ if(abs(d).gt.0.d0)r=1.d0/d ++ ++c complete inverse matrix ++ b(1)=r*b(1) ++ b(2)=r*b(2) ++ b(3)=r*b(3) ++ b(4)=r*b(4) ++ b(5)=r*b(5) ++ b(6)=r*b(6) ++ b(7)=r*b(7) ++ b(8)=r*b(8) ++ b(9)=r*b(9) ++ ++ return ++ end subroutine invert ++ ++ subroutine jacobi(a,v,n) ++ ++c*********************************************************************** ++c ++c diagonalisation of real symmetric matices by jacobi method ++c ++c input parameters: ++c ++c a(n,n) is the matrix to be diagonalised ++c v(n,n) is the eigenvector matrix ++c n is the dimension of the matrices ++c ++c jacobi processes lower triangle only (upper triangle unchanged) ++c ++c variable rho sets absolute tolerance on convergence ++c variable tes is a moving tolerance that diminishes ++c on each pass until at true convergence tesdlrpot) .or. (ngrid-4 /= nint(cutpot/delpot))) then ++ ++ if (idnode == 0) write(nrite,"( ++ x 'expected radial increment : ',1p,e15.7,/, ++ x 'TABLE radial increment : ',1p,e15.7,/,/, ++ x 'expected number of grid points : ',0p,i10,/, ++ x 'grid points in TABLE : ',i10)") ++ x dlrpot, delpot, mxgrid, ngrid ++ ++ call error(idnode,22) ++ ++ endif ++ ++ if(cutpot.lt.rcut) call error(idnode,504) ++ if(abs(1.d0-(delpot/dlrpot)).gt.1.0d-8) then ++ if(idnode.eq.0) write(nrite, ++ x "(/,' TABLE arrays resized for mxgrid=',i10)") mxgrid ++ endif ++ ++c read potential arrays for all pairs ++ ++ do ivdw=1,ntpvdw ++ ++c read potential arrays if potential not already defined ++ ++ if(ltpvdw(ivdw).eq.0)then ++ ++c read pair potential labels and long range corrections ++ ++ call getrec(safe,idnode,ntable) ++ if(.not.safe)call abort_table_read(idnode,ntable) ++ ++ call getword(atom1,record,8,lenrec) ++ call getword(atom2,record,8,lenrec) ++ prmvdw(ivdw,1)=dblstr(record,lenrec,idum) ++ prmvdw(ivdw,2)=dblstr(record,lenrec,idum) ++ ++ katom1=0 ++ katom2=0 ++ ++ do jtpatm=1,ntpatm ++ ++ if(atom1.eq.unqatm(jtpatm))katom1=jtpatm ++ if(atom2.eq.unqatm(jtpatm))katom2=jtpatm ++ ++ enddo ++ ++ if(katom1.eq.0.or.katom2.eq.0)then ++ if(idnode.eq.0) ++ x write(nrite,'(a)') '****',atom1,'***',atom2,'****' ++ call error(idnode,81) ++ endif ++ ++ keyvdw=loc2(katom1,katom2) ++ ++ if(lstvdw(keyvdw).ne.ivdw) call error(idnode,23) ++ ++c read potential arrays ++ ++ if(mxbuff.lt.ngrid) then ++ ++ if(idnode.eq.0) ++ x write(nrite,*) 'mxbuff must be >=',ngrid,' in fortab' ++ call error(idnode,48) ++ ++ endif ++ ++c read in potential arrays ++ ++ do i=1,(ngrid+3)/4 ++ ++ l=min(4,ngrid-(i-1)*4) ++ if (idnode == 0) then ++ read(unit=ntable, fmt=*, end=100) ++ x (buffer((i-1)*4+j),j=1,l) ++ else ++ buffer((i-1)*4+1:(i-1)*4+l)=0.0d0 ++ endif ++ ++ enddo ++ call gdsum(buffer(1:ngrid),ngrid,buffer(ngrid+1:2*ngrid)) ++ ++c reconstruct arrays using 3pt interpolation ++ ++ rdr=1.d0/delpot ++ vvv(1,ivdw)=1.d0 ++ ggg(1,ivdw)=0.d0 ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ vk0=buffer(l) ++ vk1=buffer(l+1) ++ vk2=buffer(l+2) ++ ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ vvv(i,ivdw)=t1+(t2-t1)*ppp*0.5d0 ++ ++ enddo ++ ++c read in force arrays ++ ++ do i=1,(ngrid+3)/4 ++ ++ l=min(4,ngrid-(i-1)*4) ++ if (idnode == 0) then ++ read(unit=ntable, fmt=*, end=100) ++ x (buffer((i-1)*4+j),j=1,l) ++ else ++ buffer((i-1)*4+1:(i-1)*4+l)=0.0d0 ++ endif ++ ++ enddo ++ call gdsum(buffer(1:ngrid),ngrid,buffer(ngrid+1:2*ngrid)) ++ ++c reconstruct ggg arrays using 3pt interpolation ++ ++ do i=2,mxgrid ++ ++ rrr=dble(i)*dlrpot ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ vk0=buffer(l) ++ vk1=buffer(l+1) ++ vk2=buffer(l+2) ++ ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ ++ ggg(i,ivdw)=t1+(t2-t1)*ppp*0.5d0 ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c convert to internal units ++ ++ do k=1,ntpvdw ++ ++ if(ltpvdw(k).eq.0)then ++ ++ do i=1,mxgrid ++ ++ vvv(i,k)=vvv(i,k)*engunit ++ ggg(i,k)=ggg(i,k)*engunit ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++ if(idnode.eq.0)close (ntable) ++ ++ if(idnode.eq.0)write(nrite,'(/,/,1x,a)') ++ x 'potential tables read from TABLE file' ++ ++ return ++ ++c end of file error exit ++ ++ 100 call abort_table_read(idnode,ntable) ++ ++ end subroutine fortab ++ ++ subroutine abort_table_read(idnode,ntable) ++ ++c*********************************************************************** ++c ++c dl_poly error exit subroutine for reading TABLE file ++c ++c copyright - daresbury laboratory ++c author - w. smith sept 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ integer idnode,ntable ++ ++ if(idnode.eq.0)close (ntable) ++ ++ call error(idnode,24) ++ ++ end subroutine abort_table_read ++ ++ subroutine srfrce ++ x (lsolva,lfree,lghost,iatm,ik,engsrp,virsrp,rcut,dlrpot) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating short range force and ++c potential energy terms using verlet neighbour list ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992 ++c ++c version 3 ++c author - t. forester june 1993 ++c stress tensor added t.forester may 1994 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer iatm,ik,m,jatm,k,l,kkk ++ real(8) engsrp,virsrp,rcut,dlrpot ++ real(8) ab,rrr,rsq,ppp,t1,t2,vk0,vk1,vk2,gk0,gk1,gk2,gamma ++ real(8) fi,rcsq,rdr,ai,aj,fx,fy,fz,omega ++ real(8) strs(6),strs_loc(6) ++ ++ dimension fi(3) ++ ++CDIR$ CACHE_ALIGN fi ++ ++ lskip=(lfree.or.lghost) ++ if(lmetadyn)idrive=driven(ltype(iatm)) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c interpolation spacing ++ ++ rdr=1.d0/dlrpot ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engsrp=0.d0 ++ virsrp=0.d0 ++ ++c store forces for iatm ++ ++ ai=dble(ltype(iatm)) ++ fi(1)=fxx(iatm) ++ fi(2)=fyy(iatm) ++ fi(3)=fzz(iatm) ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ jatm=ilist(m) ++ if(lmetadyn)jdrive=driven(ltype(jatm)) ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ aj=dble(ltype(jatm)) ++ ++ if(ai.gt.aj) then ++ ab=ai*(ai-1.d0)*0.5d0+aj+0.5d0 ++ else ++ ab=aj*(aj-1.d0)*0.5d0+ai+0.5d0 ++ endif ++ ++ k=lstvdw(int(ab)) ++ ++ if((ltpvdw(k).lt.100).and.(abs(vvv(1,k)).gt.1.d-10))then ++ ++c apply truncation of potential ++ ++ rsq=rsqdf(m) ++ ++ if(rcsq.gt.rsq)then ++ ++ rrr=sqrt(rsq) ++ l=int(rrr*rdr) ++ ppp=rrr*rdr-dble(l) ++ ++ if(l.eq.0)then ++ ++ omega=vvv(1,k) ++ gamma=ggg(1,k) ++ ++ else ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0=vvv(l,k) ++ vk1=vvv(l+1,k) ++ vk2=vvv(l+2,k) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ omega=t1+(t2-t1)*ppp*0.5d0 ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=ggg(l,k) ++ gk1=ggg(l+1,k) ++ gk2=ggg(l+2,k) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ gamma=(t1+(t2-t1)*ppp*0.5d0)/rsq ++ ++ endif ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+omega ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ vdw_fre=vdw_fre-omega ++ vdw_vir=vdw_vir+gamma*rsq ++ omega=lambda1*omega ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ vdw_fre=vdw_fre+omega ++ vdw_vir=vdw_vir-gamma*rsq ++ omega=lambda2*omega ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential and virial ++ ++ engsrp=engsrp+omega ++ virsrp=virsrp-gamma*rsq ++ ++ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+omega ++ ++c calculate forces ++ ++ fx=gamma*xdf(m) ++ fy=gamma*ydf(m) ++ fz=gamma*zdf(m) ++ ++ fi(1)=fi(1)+fx ++ fi(2)=fi(2)+fy ++ fi(3)=fi(3)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc-gamma*rsq ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c load temps back to fxx(iatm) etc ++ ++ fxx(iatm)=fi(1) ++ fyy(iatm)=fi(2) ++ fzz(iatm)=fi(3) ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine srfrce ++ ++ subroutine lrcorrect ++ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, ++ x ntpatm,ntpvdw,elrc,engunit,virlrc,rcut,volm) ++ ++c************************************************************************* ++c ++c DL_POLY subroutine to evaluate long-range corrections to ++c pressure and energy in a periodic system. ++c ++c copyright daresbury laboratory 1993 ++c author - t. forester may 1993 ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*************************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=10 ++ logical lsolva,lfree,lghost ++ integer idnode,imcon,keyfce,natms,ntpatm,i,ka,ntpvdw ++ integer ivdw,j,k,it,jt,kt,fail ++ real(8) natyp,nbtyp,nctyp,ndtyp,nafrz,nbfrz,ncfrz,ndfrz ++ real(8) elrc,engunit,virlrc,rcut,volm,twopi,eadd,padd ++ real(8) denprd,aaa,bbb,ccc,ddd,eee,eps,sig,rr0,ann,amm ++ real(8) denprd1,denprd2,denprd3,denprdf ++ integer, allocatable :: numtyp_sol0(:,:),numfrz_sol0(:,:) ++ integer, allocatable :: numtyp_sol1(:,:),numfrz_sol1(:,:) ++ integer, allocatable :: numtyp_sol2(:,:),numfrz_sol2(:,:) ++ integer, allocatable :: numtyp_fre(:,:),numfrz_fre(:,:) ++ real(8), allocatable :: elrc_sol0(:),elrc_exc0(:) ++ ++ dimension fail(nnn) ++ ++ twopi=2.0d0*pi ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ if(lfree.or.lghost)then ++ ++ allocate (numtyp_fre(mxatyp,0:2),stat=fail(1)) ++ allocate (numfrz_fre(mxatyp,0:2),stat=fail(2)) ++ allocate (elrc_exc0(mxtmls_exc2),stat=fail(3)) ++ ++ endif ++ ++ if(lsolva)then ++ ++ allocate (elrc_sol0(mxtmls_sol2),stat=fail(4)) ++ allocate (numtyp_sol0(mxatyp,mxtmls),stat=fail(5)) ++ allocate (numfrz_sol0(mxatyp,mxtmls),stat=fail(6)) ++ ++ if(lghost)then ++ ++ allocate (numtyp_sol1(mxatyp,mxtmls),stat=fail(7)) ++ allocate (numfrz_sol1(mxatyp,mxtmls),stat=fail(8)) ++ allocate (numtyp_sol2(mxatyp,mxtmls),stat=fail(9)) ++ allocate (numfrz_sol2(mxatyp,mxtmls),stat=fail(10)) ++ ++ endif ++ ++ endif ++ ++ do i=1,nnn ++ if(fail(i).ne.0)call error(idnode,1015) ++ enddo ++ ++c initalise counter arrays ++ ++ do i=1,ntpatm ++ ++ numtyp(i)=0 ++ numfrz(i)=0 ++ ++ enddo ++ ++ if(lfree.or.lghost)then ++ ++ numtyp_fre(:,:)=0 ++ numfrz_fre(:,:)=0 ++ ++ endif ++ ++ if(lsolva)then ++ ++ numtyp_sol0(:,:)=0 ++ numfrz_sol0(:,:)=0 ++ ++ if(lghost)then ++ ++ numtyp_sol1(:,:)=0 ++ numfrz_sol1(:,:)=0 ++ numtyp_sol2(:,:)=0 ++ numfrz_sol2(:,:)=0 ++ ++ endif ++ ++ endif ++ ++c evaluate number density in system ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ numtyp(ka)=numtyp(ka)+1 ++ if(lstfrz(i).ne.0)numfrz(ka)=numfrz(ka)+1 ++ ++ enddo ++ ++ if(lfree.or.lghost)then ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ numtyp_fre(ka,atm_fre(i))=numtyp_fre(ka,atm_fre(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_fre(ka,atm_fre(i))=numfrz_fre(ka,atm_fre(i))+1 ++ ++ enddo ++ ++ endif ++ ++ if(lsolva)then ++ ++ if(lghost)then ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ ++ if(atm_fre(i).eq.0)then ++ ++ numtyp_sol0(ka,atmolt(i))=numtyp_sol0(ka,atmolt(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_sol0(ka,atmolt(i))=numfrz_sol0(ka,atmolt(i))+1 ++ ++ elseif(atm_fre(i).eq.1)then ++ ++ numtyp_sol1(ka,atmolt(i))=numtyp_sol1(ka,atmolt(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_sol1(ka,atmolt(i))=numfrz_sol1(ka,atmolt(i))+1 ++ ++ elseif(atm_fre(i).eq.2)then ++ ++ numtyp_sol2(ka,atmolt(i))=numtyp_sol2(ka,atmolt(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_sol2(ka,atmolt(i))=numfrz_sol2(ka,atmolt(i))+1 ++ ++ endif ++ ++ enddo ++ ++ else ++ ++ do i=1,natms ++ ++ ka=ltype(i) ++ numtyp_sol0(ka,atmolt(i))=numtyp_sol0(ka,atmolt(i))+1 ++ if(lstfrz(i).ne.0) ++ x numfrz_sol0(ka,atmolt(i))=numfrz_sol0(ka,atmolt(i))+1 ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c number densities ++ ++ do i=1,ntpatm ++ dens(i)=dble(numtyp(i))/volm ++ enddo ++ ++c long range corrections to energy and pressure ++ ++ elrc=0.d0 ++ elrc2=0.d0 ++ virlrc=0.d0 ++ virlrc2=0.d0 ++ denprdf=0.d0 ++ volm_sav=0.d0 ++ elrc_fre=0.d0 ++ vlrc_fre=0.d0 ++ ++ if(imcon.ne.0.and.imcon.ne.6.and.ntpvdw.gt.0) then ++ ++ if(mod(keyfce,2).eq.1) then ++ ++ ivdw=0 ++ ++ do i=1,ntpatm ++ ++ do j=1,i ++ ++ eadd=0.d0 ++ padd=0.d0 ++ ++ ivdw=ivdw+1 ++ k=lstvdw(ivdw) ++ ++ if(ltpvdw(k).eq.0) then ++ ++c tabulated potential ++ ++ eadd=prmvdw(k,1) ++ padd=-prmvdw(k,2) ++ ++ else if(ltpvdw(k).eq.1) then ++ ++c 12-6 potential ++ ++ aaa=prmvdw(k,1) ++ bbb=prmvdw(k,2) ++ ++ eadd=aaa/(9.d0*rcut**9)-bbb/(3.d0*rcut**3) ++ padd=12.d0*aaa/(9.d0*rcut**9)-6.d0*bbb/(3.d0*rcut**3) ++ ++ else if(ltpvdw(k).eq.2) then ++ ++c Lennard Jones potential ++ ++ eps=prmvdw(k,1) ++ sig=prmvdw(k,2) ++ ++ eadd=4.d0*eps*(sig**12/(9.d0*rcut**9)- ++ x sig**6/(3.d0*rcut**3)) ++ padd=4.d0*eps*(12.d0*sig**12/(9.d0*rcut**9)- ++ x 2.d0*sig**6/(rcut**3)) ++ ++ else if(ltpvdw(k).eq.3) then ++ ++c n - m potential ++ ++ eps=prmvdw(k,1) ++ ann=prmvdw(k,2) ++ amm=prmvdw(k,3) ++ rr0=prmvdw(k,4) ++ ++ eadd=eps/(ann-amm)*(amm*rr0**ann/((ann-3.d0)* ++ x rcut**(ann-3.d0))-ann*rr0**amm/((amm-3.0d0)* ++ x rcut**(amm-3.d0))) ++ padd=eps/(ann-amm)*ann*amm*(rr0**ann/((ann-3.d0)* ++ x rcut**(ann-3.d0))-rr0**amm/((amm-3.0d0)* ++ x rcut**(amm-3.d0))) ++ ++ else if(ltpvdw(k).eq.4) then ++ ++c buckingham exp - 6 potential ++ ++ ccc=prmvdw(k,3) ++ ++ eadd=-ccc/(3.d0*rcut**3) ++ padd=-2.d0*ccc/(rcut**3) ++ ++ else if(ltpvdw(k).eq.5) then ++ ++c born huggins meyer exp -6 - 8 potential ++ ++ ddd=prmvdw(k,4) ++ eee=prmvdw(k,5) ++ ++ eadd=-ddd/(3.d0*rcut**3)-eee/(5.d0*rcut**5) ++ padd=-2.d0*ddd/(rcut**3)-8.d0*eee/(5.d0*rcut**5) ++ ++ else if(ltpvdw(k).eq.6) then ++ ++c hydrogen bond 12 - 10 potential ++ ++ aaa=prmvdw(k,1) ++ bbb=prmvdw(k,2) ++ ++ eadd=aaa/(9.d0*rcut**9)-bbb/(7.d0*rcut**7) ++ padd=12.d0*aaa/(9.d0*rcut**9)-1.d1*bbb/(7.d0*rcut**7) ++ ++ endif ++ ++ if(i.ne.j) then ++ ++ eadd=eadd*2.d0 ++ padd=padd*2.d0 ++ ++ endif ++ ++ if(.not.(lfree.or.lghost))then ++ ++ denprd=twopi*(dble(numtyp(i))*dble(numtyp(j))- ++ x dble(numfrz(i))*dble(numfrz(j)))/volm**2 ++ ++ else ++ ++ nafrz=dble(numfrz_fre(i,0)+numfrz_fre(i,1)) ++ natyp=dble(numtyp_fre(i,0)+numtyp_fre(i,1)) ++ nbfrz=dble(numfrz_fre(j,0)+numfrz_fre(j,1)) ++ nbtyp=dble(numtyp_fre(j,0)+numtyp_fre(j,1)) ++ ncfrz=dble(numfrz_fre(i,0)+numfrz_fre(i,2)) ++ nctyp=dble(numtyp_fre(i,0)+numtyp_fre(i,2)) ++ ndfrz=dble(numfrz_fre(j,0)+numfrz_fre(j,2)) ++ ndtyp=dble(numtyp_fre(j,0)+numtyp_fre(j,2)) ++ ++ if(lghost)then ++ ++ denprd=twopi*(natyp*nbtyp-nafrz*nbfrz)/volm**2 ++ denprd3=twopi*(nctyp*ndtyp-ncfrz*ndfrz)/volm**2 ++ ++ elseif(lfree)then ++ ++ denprd1=twopi*(natyp*nbtyp-nafrz*nbfrz)/volm**2 ++ denprd2=twopi*(nctyp*ndtyp-ncfrz*ndfrz)/volm**2 ++ denprd=lambda1*denprd1+lambda2*denprd2 ++ denprd3=lambda2*denprd1+lambda1*denprd2 ++ denprdf=denprd2-denprd1 ++ ++ endif ++ ++ endif ++ ++ elrc=elrc+volm*denprd*eadd ++ virlrc=virlrc-denprd*padd*volm ++ ++ if(lfree.or.lghost)then ++ ++ elrc2=elrc2+volm*denprd3*eadd ++ virlrc2=virlrc2-denprd3*padd*volm ++ if(lfree)then ++ elrc_fre=elrc_fre+volm*denprdf*eadd ++ vlrc_fre=vlrc_fre-denprdf*padd*volm ++ endif ++ ++ endif ++ ++ if(lsolva)then ++ ++ elrc_sol0(:)=0.d0 ++ if(lghost)elrc_exc0(:)=0.d0 ++ ++ do it=1,mxtmls ++ ++ do jt=1,mxtmls ++ ++ kt=loc2(it,jt) ++ ++ if(lghost)then ++ ++ natyp=dble(numtyp_sol0(i,it)+numtyp_sol1(i,it)) ++ nbtyp=dble(numtyp_sol0(j,jt)+numtyp_sol1(j,jt)) ++ nafrz=dble(numfrz_sol0(i,it)+numfrz_sol1(i,it)) ++ nbfrz=dble(numfrz_sol0(j,jt)+numfrz_sol1(j,jt)) ++ ++ elrc_sol0(kt)=elrc_sol0(kt)+twopi*(natyp* ++ x nbtyp-nafrz*nbfrz)/volm**2 ++ ++ nctyp=dble(numtyp_sol0(i,it)+numtyp_sol2(i,it)) ++ ndtyp=dble(numtyp_sol0(j,jt)+numtyp_sol2(j,jt)) ++ ncfrz=dble(numfrz_sol0(i,it)+numfrz_sol2(i,it)) ++ ndfrz=dble(numfrz_sol0(j,jt)+numfrz_sol2(j,jt)) ++ ++ elrc_exc0(kt)=elrc_exc0(kt)+twopi*(nctyp* ++ x ndtyp-ncfrz*ndfrz)/volm**2 ++ ++ else ++ ++ natyp=dble(numtyp_sol0(i,it)) ++ nbtyp=dble(numtyp_sol0(j,jt)) ++ nafrz=dble(numfrz_sol0(i,it)) ++ nbfrz=dble(numfrz_sol0(j,jt)) ++ ++ elrc_sol0(kt)=elrc_sol0(kt)+twopi*(natyp* ++ x nbtyp-nafrz*nbfrz)/volm**2 ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ if(lghost)then ++ ++ elrc_sol(:)=elrc_sol(:)+volm*eadd*elrc_sol0(:) ++ elrc_exc(:)=elrc_exc(:)+volm*eadd*elrc_exc0(:) ++ ++ else ++ ++ elrc_sol(:)=elrc_sol(:)+volm*eadd*elrc_sol0(:) ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++ enddo ++ ++ if(lfree.or.lghost)then ++ ++ elrc_sav=elrc ++ elrc2_sav=elrc2 ++ virlrc_sav=virlrc ++ virlrc2_sav=virlrc2 ++ elrc_fre_sav=elrc_fre ++ vlrc_fre_sav=vlrc_fre ++ ++ endif ++ ++ volm_sav=volm ++ ++ if(lghost)then ++ ++ elrc_sol_sav(:)=elrc_sol(:) ++ elrc_exc_sav(:)=elrc_exc(:) ++ ++ elseif(lsolva)then ++ ++ elrc_sol_sav(:)=elrc_sol(:) ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ if(idnode.eq.0)then ++ ++ write(nrite, ++ x "(/,/,'long range correction for: vdw energy ',e15.6,/, ++ x 25x,': vdw pressure',e15.6)")elrc/engunit, ++ x prsunt*virlrc/(-3.d0*volm) ++ ++ if(lghost) ++ x write(nrite, ++ x "(/,/,'long range correction for: vdw energy ',e15.6,/, ++ x 25x,': vdw pressure',e15.6)")elrc2/engunit, ++ x prsunt*virlrc2/(-3.d0*volm) ++ ++ endif ++ ++c deallocate work arrays ++ ++ if(lfree.or.lghost) ++ x deallocate (elrc_exc0,numtyp_fre,numfrz_fre,stat=fail(1)) ++ ++ if(lsolva)then ++ ++ deallocate (elrc_sol0,numtyp_sol0,numfrz_sol0,stat=fail(2)) ++ ++ if(lghost)then ++ ++ deallocate (numtyp_sol1,numfrz_sol1,stat=fail(3)) ++ deallocate (numtyp_sol2,numfrz_sol2,stat=fail(4)) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine lrcorrect ++ ++ ++ subroutine srfrceneu ++ x (lsolva,lfree,lghost,ik,engsrp,virsrp,dlrpot,rcut) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for calculating short range force and ++c potential energy terms using verlet neighbour list ++c neutral group implementation ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory 1992 ++c author - w. smith march 1992 ++c ++c neutral groups ++c author - t. forester march 1994 ++c ++c adapted - p.-a. cazade oct 2007: solvation, free energy etc ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive ++ integer ik,m,iatm,jatm,l,k,kkk ++ real(8) engsrp,virsrp,dlrpot,rcut,rcsq,fx,fy,fz,omega,omega_exc ++ real(8) rrr,ppp,vk0,vk1,vk2,t1,t2,gk0,gk1,gk2,rdlpot,gamma ++ real(8) ai,aj,ak,rsq,strs(6),strs_loc(6) ++ ++ lskip=(lfree.or.lghost) ++ ++c set cutoff condition for pair forces ++ ++ rcsq=rcut**2 ++ ++c reciprocal of interpolation spacing ++ ++ rdlpot=1.d0/dlrpot ++ ++c initialise stress tensor accumulators ++ ++ strs(:)=0.d0 ++ strs_loc(:)=0.d0 ++ ++c initialise potential energy and virial ++ ++ engsrp=0.d0 ++ virsrp=0.d0 ++ ++c start of primary loop for forces evaluation ++ ++ do m=1,ik ++ ++c atomic and potential function indices ++ ++ iatm=ilist(m) ++ jatm=jlist(m) ++ ++c metadynamics local definitions ++ ++ if(lmetadyn)then ++ ++ idrive=driven(ltype(iatm)) ++ jdrive=driven(ltype(jatm)) ++ ++ endif ++ ++ if(lskip)then ++ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle ++ endif ++ ++ aj=ltype(jatm) ++ ai=ltype(iatm) ++ ++ if(ai.gt.aj) then ++ ak=(ai*(ai-1.d0)*0.5d0+aj+0.5d0) ++ else ++ ak=(aj*(aj-1.d0)*0.5d0+ai+0.5d0) ++ endif ++ k=lstvdw(int(ak)) ++ ++ if(abs(vvv(1,k)).gt.1.d-10)then ++ ++ rsq=rsqdf(m) ++ ++ if(rsq.lt.rcsq) then ++ ++ rrr=sqrt(rsq) ++ ++c determine interpolation panel for force arrays ++ ++ l=int(rrr*rdlpot) ++ ppp=rrr*rdlpot-dble(l) ++ ++c calculate interaction energy using 3-point interpolation ++ ++ vk0=vvv(l,k) ++ vk1=vvv(l+1,k) ++ vk2=vvv(l+2,k) ++ t1=vk0+(vk1-vk0)*ppp ++ t2=vk1+(vk2-vk1)*(ppp-1.0d0) ++ omega=t1+(t2-t1)*ppp*0.5d0 ++ ++c calculate forces using 3-point interpolation ++ ++ gk0=ggg(l,k) ++ gk1=ggg(l+1,k) ++ gk2=ggg(l+2,k) ++ t1=gk0+(gk1-gk0)*ppp ++ t2=gk1+(gk2-gk1)*(ppp-1.0d0) ++ gamma=(t1+(t2-t1)*ppp*0.5d0)/rsq ++ ++c set selection control ++ ++ lselect=.true. ++ ++c set double index ++ ++ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) ++ ++ if(lghost)then ++ ++c selected excitation option ++ ++ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then ++ ++c reset selection control ++ ++ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) ++ ++ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+omega ++ ++ endif ++ ++ elseif(lfree)then ++ ++c selected free energy option ++ ++ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then ++ ++c set hamiltonian mixing parameter ++ ++ omega=lambda1*omega ++ gamma=lambda1*gamma ++ ++ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then ++ ++c set hamiltonian mixing parameter ++ ++ omega=lambda2*omega ++ gamma=lambda2*gamma ++ ++ endif ++ ++ endif ++ ++ if(lselect)then ++ ++c calculate potential energy and virial ++ ++ engsrp=omega+engsrp ++ virsrp=virsrp-gamma*rsq ++ ++ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+omega ++ ++ fx=gamma*xdf(m) ++ fy=gamma*ydf(m) ++ fz=gamma*zdf(m) ++ ++ fxx(iatm)=fxx(iatm)+fx ++ fyy(iatm)=fyy(iatm)+fy ++ fzz(iatm)=fzz(iatm)+fz ++ ++ fxx(jatm)=fxx(jatm)-fx ++ fyy(jatm)=fyy(jatm)-fy ++ fzz(jatm)=fzz(jatm)-fz ++ ++c calculate stress tensor ++ ++ strs(1)=strs(1)+xdf(m)*fx ++ strs(2)=strs(2)+xdf(m)*fy ++ strs(3)=strs(3)+xdf(m)*fz ++ strs(4)=strs(4)+ydf(m)*fy ++ strs(5)=strs(5)+ydf(m)*fz ++ strs(6)=strs(6)+zdf(m)*fz ++ ++ endif ++ ++c metadynamics local parameters ++ ++ if(lmetadyn.and.(idrive.or.jdrive))then ++ ++c local energy and virial ++ ++ eng_loc=eng_loc+omega ++ vir_loc=vir_loc-gamma*rsq ++ ++c local forces ++ ++ fxx_loc(iatm)=fxx_loc(iatm)+fx ++ fyy_loc(iatm)=fyy_loc(iatm)+fy ++ fzz_loc(iatm)=fzz_loc(iatm)+fz ++ ++ fxx_loc(jatm)=fxx_loc(jatm)-fx ++ fyy_loc(jatm)=fyy_loc(jatm)-fy ++ fzz_loc(jatm)=fzz_loc(jatm)-fz ++ ++c local stress tensor ++ ++ strs_loc(1)=strs_loc(1)+xdf(m)*fx ++ strs_loc(2)=strs_loc(2)+xdf(m)*fy ++ strs_loc(3)=strs_loc(3)+xdf(m)*fz ++ strs_loc(4)=strs_loc(4)+ydf(m)*fy ++ strs_loc(5)=strs_loc(5)+ydf(m)*fz ++ strs_loc(6)=strs_loc(6)+zdf(m)*fz ++ ++ endif ++ ++ endif ++ ++ endif ++ ++ enddo ++ ++c complete stress tensor ++ ++ stress(1)=stress(1)+strs(1) ++ stress(2)=stress(2)+strs(2) ++ stress(3)=stress(3)+strs(3) ++ stress(4)=stress(4)+strs(2) ++ stress(5)=stress(5)+strs(4) ++ stress(6)=stress(6)+strs(5) ++ stress(7)=stress(7)+strs(3) ++ stress(8)=stress(8)+strs(5) ++ stress(9)=stress(9)+strs(6) ++ ++ if(lmetadyn)then ++ ++ stress_loc(1)=stress_loc(1)+strs_loc(1) ++ stress_loc(2)=stress_loc(2)+strs_loc(2) ++ stress_loc(3)=stress_loc(3)+strs_loc(3) ++ stress_loc(4)=stress_loc(4)+strs_loc(2) ++ stress_loc(5)=stress_loc(5)+strs_loc(4) ++ stress_loc(6)=stress_loc(6)+strs_loc(5) ++ stress_loc(7)=stress_loc(7)+strs_loc(3) ++ stress_loc(8)=stress_loc(8)+strs_loc(5) ++ stress_loc(9)=stress_loc(9)+strs_loc(6) ++ ++ endif ++ ++ return ++ end subroutine srfrceneu ++ ++ end module vdw_module +diff -urN dl_class_1.9.orig/srcmod/vv_motion_module.f dl_class_1.9/srcmod/vv_motion_module.f +--- dl_class_1.9.orig/srcmod/vv_motion_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/vv_motion_module.f 2011-02-22 12:46:30.000000000 +0100 +@@ -0,0 +1,3031 @@ ++ module vv_motion_module ++ ++c*********************************************************************** ++c ++c dl_poly module for velocity verlet integration schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use metafreeze_module,only : lmetadyn ++ use property_module ++ use setup_module ++ use shake_module ++ use site_module ++ use utility_module ++ ++ contains ++ ++ subroutine rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,stresh) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for applying bond constraint corrections after ++c atomic integration. rattle algorithm ++c must be used in conjunction with integration algorithms ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical check,safe,lshmov ++ integer idnode,imcon,mxnode,natms,nscons,icyc,i,j,k ++ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,esig ++ real(8) txx,tyy,tzz,xxt,yyt,zzt,stresh,dx,dy,dz,dis,omega2 ++ real(8) strs1,strs2,strs3,strs5,strs6,strs9,amti,amtj,gamma ++ real(8) gammi,gammj,dli,dlj ++ ++ dimension stresh(9) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ ++c constraint virial ++ ++ vircon=0.d0 ++ ++c accumulators for stress tensor ++ ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c test size of work arrays ++ ++ check=.true. ++ if(mxxdf.lt.nscons)check=.false. ++ if(mxnode.gt.1)call gstate(check) ++ if(.not.check)call error(idnode,412) ++ ++c application of constraint (shake) algorithm ++ ++ icyc=0 ++ safe=.false. ++ ++ do while(.not.safe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate temporary bond vector ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c calculate maximum error in bondlength ++ ++ esig=0.d0 ++ ++ do k=1,nscons ++ ++c set bond parameter ++ ++ dx=dxt(k) ++ dy=dyt(k) ++ dz=dzt(k) ++ dis=prmcon(listcon(k,1)) ++ esig=max(esig,abs(dx*dx+dy*dy+dz*dz-dis*dis)/dis) ++ ++ enddo ++ ++ esig=esig*0.5d0 ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++c bypass calculations if all tolerances satisfied ++ ++ if(.not.safe)then ++ ++c initialise increment arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint forces ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c set constraint parameters ++ ++ dis=prmcon(listcon(k,1)) ++ omega2= dis*dis ++ amti= tstep*rmass(i) ++ amtj=-tstep*rmass(j) ++ ++c constraint force parameter ++ ++ dx=dxt(k) ++ dy=dyt(k) ++ dz=dzt(k) ++ ++ gamma=(omega2-(dx*dx+dy*dy+dz*dz))/ ++ x (-tstep*(amti-amtj)*(dxx(k)*dx+dyy(k)*dy+dzz(k)*dz)) ++ ++c accumulate bond virial ++ ++ vircon=vircon+gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ ++ strs1=strs1-gamma*dxx(k)*dxx(k) ++ strs2=strs2-gamma*dxx(k)*dyy(k) ++ strs3=strs3-gamma*dxx(k)*dzz(k) ++ strs5=strs5-gamma*dyy(k)*dyy(k) ++ strs6=strs6-gamma*dyy(k)*dzz(k) ++ strs9=strs9-gamma*dzz(k)*dzz(k) ++ ++c improve approximate constraint force ++ ++ gammi=-0.5d0*gamma*amti ++ xxt(i)=xxt(i)+dxx(k)*gammi ++ yyt(i)=yyt(i)+dyy(k)*gammi ++ zzt(i)=zzt(i)+dzz(k)*gammi ++ ++ gammj=-0.5d0*gamma*amtj ++ xxt(j)=xxt(j)+dxx(k)*gammj ++ yyt(j)=yyt(j)+dyy(k)*gammj ++ zzt(j)=zzt(j)+dzz(k)*gammj ++ ++ enddo ++ ++c sum up constraint forces across nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov)call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.0d0/dble(listme(i)) ++ dlj=1.0d0/dble(listme(j)) ++ ++ xxx(i)=xxx(i)+tstep*dli*xxt(i) ++ yyy(i)=yyy(i)+tstep*dli*yyt(i) ++ zzz(i)=zzz(i)+tstep*dli*zzt(i) ++ xxx(j)=xxx(j)+tstep*dlj*xxt(j) ++ yyy(j)=yyy(j)+tstep*dlj*yyt(j) ++ zzz(j)=zzz(j)+tstep*dlj*zzt(j) ++ ++ vxx(i)=vxx(i)+dli*xxt(i) ++ vzz(i)=vzz(i)+dli*zzt(i) ++ vyy(i)=vyy(i)+dli*yyt(i) ++ vxx(j)=vxx(j)+dlj*xxt(j) ++ vyy(j)=vyy(j)+dlj*yyt(j) ++ vzz(j)=vzz(j)+dlj*zzt(j) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c error exit for non-convergence ++ ++ if(.not.safe)return ++ ++c complete stress tensor ++ ++ stresh(1)=strs1 ++ stresh(2)=strs2 ++ stresh(3)=strs3 ++ stresh(4)=strs2 ++ stresh(5)=strs5 ++ stresh(6)=strs6 ++ stresh(7)=strs3 ++ stresh(8)=strs6 ++ stresh(9)=strs9 ++ ++c splice coordinate arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(stresh,9,buffer) ++ call splice ++ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) ++ call splice ++ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++ return ++ end subroutine rdrattle_r ++ ++ subroutine rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ ++c********************************************************************* ++c ++c dl_poly subroutine for applying a bond constraints to ++c the velocities of the constrained atoms using the rattle ++c procedure (replicated data version) ++c ++c copyright - daresbury laboratory ++c author w.smith october 2002 ++c ++c********************************************************************* ++ ++ implicit none ++ ++ logical safe ++ integer idnode,mxnode,natms,nscons,icyc ++ integer i,j,k ++ real(8) tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt ++ real(8) esig,amti,amtj,gamma,gammi,gammj,dli,dlj,tolvel ++ ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ ++c constraint convergence tolerance ++ ++ tolvel=tolnce/tstep ++ ++c start of rattle cycle ++ ++ icyc=0 ++ safe=.false. ++ ++ do while(.not.safe.and.icyc.lt.mxshak) ++ ++ icyc=icyc+1 ++ ++c initialise velocity correction arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate velocity constraint corrections ++ ++ esig=0.d0 ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ amti= 0.5d0*tstep*rmass(i) ++ amtj=-0.5d0*tstep*rmass(j) ++ ++c calculate constraint force parameter ++ ++ gamma=(dxx(k)*(vxx(i)-vxx(j))+dyy(k)*(vyy(i)-vyy(j))+ ++ x dzz(k)*(vzz(i)-vzz(j)))/((amti-amtj)* ++ x (dxx(k)**2+dyy(k)**2+dzz(k)**2)) ++ esig=max(esig,abs(gamma)) ++ ++c improve approximate constraint force ++ ++ gammi=-gamma*amti ++ xxt(i)=xxt(i)+gammi*dxx(k) ++ yyt(i)=yyt(i)+gammi*dyy(k) ++ zzt(i)=zzt(i)+gammi*dzz(k) ++ gammj=-gamma*amtj ++ xxt(j)=xxt(j)+gammj*dxx(k) ++ yyt(j)=yyt(j)+gammj*dyy(k) ++ zzt(j)=zzt(j)+gammj*dzz(k) ++ ++ enddo ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolvel) ++ if(mxnode.gt.1)then ++ ++ call gstate(safe) ++ ++ endif ++ ++c terminate iteration if constraints satisfied ++ ++ if(.not.safe)then ++ ++c transport velocity adjustments to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++c update velocities ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ vxx(i)=vxx(i)+dli*xxt(i) ++ vyy(i)=vyy(i)+dli*yyt(i) ++ vzz(i)=vzz(i)+dli*zzt(i) ++ dlj=1.d0/dble(listme(j)) ++ vxx(j)=vxx(j)+dlj*xxt(j) ++ vyy(j)=vyy(j)+dlj*yyt(j) ++ vzz(j)=vzz(j)+dlj*zzt(j) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c error exit if rattle fails ++ ++ if(.not.safe)return ++ ++c splice velocity arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ call splice ++ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++ return ++ end subroutine rdrattle_v ++ ++ subroutine nvevv_1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x tstep,engke,tolnce,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c nve ensemble ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=4 ++ ++ logical safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,i,j,k ++ integer iatm0,iatm1 ++ real(8) tstep,engke,tolnce,vircon ++ integer fail(nnn) ++ real(8) strkin(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++ safe=.true. ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1980) ++ enddo ++ ++ endif ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ if(ntcons.gt.0) ++ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c update velocities for first and second stages ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strkin(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) ++ ++ endif ++ ++ return ++ end subroutine nvevv_1 ++ ++ subroutine nvtvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x tstep,taut,sigma,engke,tolnce,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c nvt ensemble - Berendsen thermostat (n.b. not symplectic) ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=4 ++ ++ logical safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons ++ integer i,j,k,iatm0,iatm1 ++ real(8) tstep,taut,sigma,engke,tolnce,vircon,chit ++ integer fail(nnn) ++ real(8) strkin(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++ safe=.true. ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,1990) ++ enddo ++ ++ endif ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ if(ntcons.gt.0) ++ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c first pass of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c second pass of velocity verlet algorithm ++ ++ else ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ enddo ++ ++ engke=engke*chit**2 ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz, ++ x buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) ++ ++ endif ++ ++ return ++ end subroutine nvtvv_b1 ++ ++ subroutine nvtvv_e1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x tstep,engke,tolnce,vircon) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c nvt ensemble - evans thermostat ++c Comp. Phys. reports 1, 299, (1984) ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=4 ++ ++ logical safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons ++ integer i,j,k,iatm0,iatm1 ++ real(8) tstep,engke,tolnce,vircon,vdotf,scale,chit ++ integer fail(nnn) ++ real(8) strkin(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++ safe=.true. ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2000) ++ enddo ++ ++ endif ++ ++ if(ntcons.eq.0)safe=.true. ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ if(ntcons.gt.0) ++ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy and evans thermostat parameter ++ ++ engke=0.d0 ++ vdotf=0.d0 ++ do i=iatm0,iatm1 ++ ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ buffer(2)=vdotf ++ call gdsum(buffer(1),2,buffer(3)) ++ engke=buffer(1) ++ vdotf=buffer(2) ++ ++ endif ++ engke=0.5d0*engke ++ chit=0.5d0*vdotf/engke ++ ++c thermostat the velocities ++ ++ scale=(1.d0-0.5d0*tstep*chit) ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate kinetic energy and evans thermostat parameter ++ ++ engke=0.d0 ++ vdotf=0.d0 ++ do i=iatm0,iatm1 ++ ++ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) ++ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) ++ ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++ buffer(1)=engke ++ buffer(2)=vdotf ++ call gdsum(buffer(1),2,buffer(3)) ++ engke=buffer(1) ++ vdotf=buffer(2) ++ ++ endif ++ engke=0.5d0*engke ++ chit=0.5d0*vdotf/engke ++ scale=(1.d0-0.5d0*tstep*chit) ++ ++c scale velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=scale*vxx(i) ++ vyy(i)=scale*vyy(i) ++ vzz(i)=scale*vzz(i) ++ ++ enddo ++ ++ engke=engke*scale**2 ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) ++ ++ endif ++ ++ return ++ end subroutine nvtvv_e1 ++ ++ subroutine nvtvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x ntshl,keyshl,tstep,taut,sigma,chit,consv,conint,engke, ++ x tolnce,vircon,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c nvt ensemble - nose-hoover thermostat ++c Molecular Physics 87 (1996) 1117 ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith october 2002 ++c amended - w. smith january 2005 : f90 conversion ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=4 ++ ++ logical safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons ++ integer i,j,k,iatm0,iatm1 ++ real(8) tstep,taut,sigma,chit,consv,conint,engke,tolnce,vircon ++ real(8) hstep,qmass ++ integer fail(nnn) ++ real(8) strkin(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ safe=.true. ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2010) ++ enddo ++ ++ endif ++ ++c inertia parameter for Nose-Hoover thermostat ++ ++ hstep=0.5d0*tstep ++ qmass=2.d0*sigma*taut**2 ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ if(ntcons.gt.0) ++ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c integrate and apply nvt thermostat ++ ++ call nvtscale ++ x (idnode,mxnode,natms,engke,sigma,hstep,qmass,taut, ++ x chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c integrate and apply nvt thermostat ++ ++ call nvtscale ++ x (idnode,mxnode,natms,engke,sigma,hstep,qmass,taut, ++ x chit,conint) ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ consv=conint+0.5d0*qmass*chit**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) ++ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) ++ ++ endif ++ ++ return ++ end subroutine nvtvv_h1 ++ ++ subroutine nptvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,tstep,taut,taup,sigma,engke,press,elrc, ++ x virlrc,tolnce,virtot,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c npt ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith december 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical newjob,safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm ++ integer i,j,k,iatm0,iatm1,mxiter,iter,kk ++ real(8) tstep,taut,taup,sigma,engke,press,elrc,virlrc,tolnce ++ real(8) virtot,vircon,volm,volm0,elrc0,virlrc0,psyst ++ real(8) chit,chip,scale,beta ++ ++ integer fail(nnn) ++ real(8) strkin(9),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./,beta/7.3728d-3/ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2020) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(4)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(5)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(6)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(7)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2030) ++ enddo ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy ++ ++ engke=getkin(natms,idnode,mxnode) ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ do i=iatm0,iatm1 ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++ endif ++ ++c iteration required if ntcons > 0 and isw = 1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++ scale=1.d0 ++ ++ if(iter.eq.mxiter)then ++ ++c calculate system pressure ++ ++ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) ++ ++c apply Berendsen barostat taup is relaxation time ++ ++ chip=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip**(1.d0/3.d0) ++ volm=chip*volm ++ ++c reset cell parameters for new volume ++ ++ do i=1,9 ++ cell(i)=scale*cell(i) ++ enddo ++ ++ endif ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=scale*xxx(i)+tstep*vxx(i) ++ yyy(i)=scale*yyy(i)+tstep*vyy(i) ++ zzz(i)=scale*zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++ if(iter.lt.mxiter)then ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor for tethered bonds ++ ++ do i=1,9 ++ eta(i)=scale*uni(i) ++ enddo ++ ++c second pass of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c apply Berendsen thermostat taut is relaxation time ++ ++ engke=getkin(natms,idnode,mxnode) ++ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nptvv_b1 ++ ++ subroutine nptvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x ntpatm,ntshl,keyshl,tstep,taut,taup,sigma,temp,chip,chit, ++ x consv,conint,engke,elrc,tolnce,vircon,virtot,virlrc,volm, ++ x press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c npt ensemble - Melchionna, Ciccotti and Holian ++c Molecular Physics 78 (1993) 533 ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith november 2002 ++c amended - w. smith january 2005: f90 conversion ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ integer, parameter :: ncyc=5 ++ ++ logical safe,lshmov,newjob ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm ++ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,icyc ++ real(8) tstep,taup,taut,sigma,temp,chip,chit,consv,conint ++ real(8) engke,elrc,tolnce,vircon,virtot,virlrc,volm,press ++ real(8) volm0,elrc0,virlrc0,hstep,qstep,totmas,qmass,pmass ++ real(8) vzero,chit0,chip0,cons0,scale,fstep ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ integer fail(nnn) ++ real(8) cell0(9),com(3),vom(3),strkin(9),uni(9) ++ ++ save newjob,totmas,volm0,elrc0,virlrc0,dens0 ++ save cell0,iatm0,iatm1,hstep,qstep,fstep,pmass,qmass ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2040) ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c inertia parameter for Nose-Hoover thermostat and barostat ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2050) ++ enddo ++ ++ endif ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metdynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c store current integration variables if ntcons > 0 ++ ++ if(ntcons.gt.0)then ++ ++ vzero=volm ++ chit0=chit ++ chip0=chip ++ cons0=conint ++ do i=iatm0,iatm1 ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++ endif ++ ++c iteration necessary if ntcons > 0 and isw = 1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++c volume integration parameter ++ ++ do icyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, ++ x taut,chip,chit,conint) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptscale_p ++ x (idnode,mxnode,natms,engke,fstep,pmass,chip,chit, ++ x volm,press,vircon,virtot) ++ ++c integrate and apply npt thermostat ++ ++ call nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, ++ x taut,chip,chit,conint) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c update positions ++ ++ scale=exp(tstep*chip) ++ do i=iatm0,iatm1 ++ ++ xxx(i)=scale*(xxx(i)-com(1))+tstep*vxx(i)+com(1) ++ yyy(i)=scale*(yyy(i)-com(2))+tstep*vyy(i)+com(2) ++ zzz(i)=scale*(zzz(i)-com(3))+tstep*vzz(i)+com(3) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c restore original integration parameters if iter < mxiter ++ ++ if(iter.lt.mxiter)then ++ ++ volm=vzero ++ chit=chit0 ++ chip=chip0 ++ conint=cons0 ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++ do icyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, ++ x taut,chip,chit,conint) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptscale_p ++ x (idnode,mxnode,natms,engke,fstep,pmass,chip,chit, ++ x volm,press,vircon,virtot) ++ ++c integrate and apply npt thermostat ++ ++ call nptscale_t ++ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, ++ x taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ consv=conint+0.5d0*qmass*chit**2+ ++ x 0.5d0*pmass*chip**2+press*volm ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor (for tethered atoms) ++ ++ do i=1,9 ++ eta(i)=chip*uni(i) ++ enddo ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nptvv_h1 ++ ++ subroutine nstvv_b1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, ++ x ntcons,ntpatm,mode,tstep,taut,taup,sigma,engke,press,elrc, ++ x virlrc,tolnce,vircon,volm) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c anisotropic npt ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith december 2002 ++c amended - w. smith january 2005 : f90 conversion ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ ++ logical newjob,safe,lshmov ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm ++ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,mode ++ real(8) tstep,taut,taup,sigma,engke,press,elrc,virlrc,tolnce,beta ++ real(8) vircon,volm,volm0,elrc0,virlrc0,chit ++ real(8) xtmp,ytmp,ztmp ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ integer fail(nnn) ++ real(8) uni(9),strkin(9),celp(10) ++ ++ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./,beta/7.3728d-3/ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2060) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(4)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(5)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(6)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(7)) ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2070) ++ enddo ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c extract previous constraint terms from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ do i=iatm0,iatm1 ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++ endif ++ ++c iteration required if ntcons > 0 and isw = 1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++c zero scaling matrix ++ ++ do i=1,9 ++ eta(i)=uni(i) ++ enddo ++ ++ if(iter.eq.mxiter)then ++ ++c calculate Berendsen barostat - taup is relaxation time ++ ++ do i=1,9 ++ eta(i)=tstep*beta*(stress(i)+strcns(i)- ++ x press*volm*uni(i))/(taup*volm)+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c reset cell parameters for new volume ++ ++ call mat_mul(eta,cell,cell) ++ ++c calculate new volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++ endif ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ xtmp=eta(1)*xxx(i)+eta(4)*yyy(i)+eta(7)*zzz(i) ++ ytmp=eta(2)*xxx(i)+eta(5)*yyy(i)+eta(8)*zzz(i) ++ ztmp=eta(3)*xxx(i)+eta(6)*yyy(i)+eta(9)*zzz(i) ++ xxx(i)=tstep*vxx(i)+xtmp ++ yyy(i)=tstep*vyy(i)+ytmp ++ zzz(i)=tstep*vzz(i)+ztmp ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++ if(iter.lt.mxiter)then ++ ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c second pass of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c apply Berendsen thermostat taut is relaxation time ++ ++ engke=getkin(natms,idnode,mxnode) ++ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxo,yyo,zzo,stat=fail(1)) ++ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nstvv_b1 ++ ++ subroutine nstvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, ++ x ntpatm,mode,ntshl,keyshl,tstep,taut,taup,sigma,temp,chit, ++ x consv,conint,engke,elrc,tolnce,vircon,virlrc,volm,press, ++ x chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for integrating newtonian equations of ++c motion in molecular dynamics - velocity verlet incorporating ++c bond constraints via the shake/rattle algorithm ++c ++c anisotropic npt ensemble - Melchionna, Ciccotti and Holian ++c Molecular Physics 78 (1993) 533 ++c ++c parallel replicated data version ++c ++c copyright - daresbury laboratory ++c author - w. smith november 2002 ++c amended - w. smith january 2005 : f90 conversion ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=7 ++ integer, parameter :: ncyc=5 ++ ++ logical safe,lshmov,newjob ++ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm ++ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,icyc,mode ++ real(8) tstep,taup,taut,sigma,temp,chit,consv,conint,chit0 ++ real(8) engke,elrc,tolnce,vircon,virlrc,volm,press,volm0 ++ real(8) elrc0,virlrc0,hstep,qstep,totmas,qmass,pmass ++ real(8) cons0,cxx,cyy,czz,chip2,fstep ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ ++ integer fail(nnn) ++ real(8) com(3),vom(3),czero(9),strkin(9),eta0(9),celp(10) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metdynamics shell thermostat variables ++ ++ data newjob/.true./ ++ ++ save newjob,totmas,volm0,elrc0,virlrc0,dens0 ++ save iatm0,iatm1,hstep,qstep,pmass,qmass,fstep ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2080) ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c system total mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c inertia parameter for Nose-Hoover thermostat and barostat ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2090) ++ enddo ++ ++ endif ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metdynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ chit0=chit ++ cons0=conint ++ do i=1,9 ++ ++ czero(i)=cell(i) ++ eta0(i)=eta(i) ++ ++ enddo ++ do i=iatm0,iatm1 ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++ endif ++ ++c subtract kinetic terms from stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ do i=1,9 ++ stress(i)=stress(i)-strkin(i) ++ enddo ++ ++c iteration necessary if ntcons > 0 and isw = 1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++c calculate current volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++ do icyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c metdynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstscale_p ++ x (idnode,mxnode,natms,mode,fstep,pmass,chit,press,volm) ++ ++c integrate and apply nst thermostat ++ ++ call nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c update positions ++ ++ do i=iatm0,iatm1 ++ ++ cxx=xxx(i)-com(1) ++ cyy=yyy(i)-com(2) ++ czz=zzz(i)-com(3) ++ ++ xxx(i)=xxx(i)+ ++ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ yyy(i)=yyy(i)+ ++ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ zzz(i)=zzz(i)+ ++ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c subtract old constraint terms from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++c correct constraint bonds using rattle ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++c add new constraint terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c restore original integration parameters if iter < mxiter ++ ++ if(iter.lt.mxiter)then ++ ++ chit=chit0 ++ conint=cons0 ++ do i=1,9 ++ ++ cell(i)=czero(i) ++ eta(i)=eta0(i) ++ ++ enddo ++ do i=iatm0,iatm1 ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c second stage of velocity verlet algorithm ++ ++ else ++ ++c update velocities ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++ if(ntcons.gt.0)then ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c add constraint terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i) ++ enddo ++ ++c correct constraint bond velocities using rattle ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++ do icyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstscale_p ++ x (idnode,mxnode,natms,mode,fstep,pmass,chit,press,volm) ++ ++c integrate and apply nst thermostat ++ ++ call nstscale_t ++ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, ++ x pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=iatm0,iatm1 ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++c merge velocity data ++ ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstress(natms,idnode,mxnode,strkin) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ if(mxnode.gt.1) ++ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c deallocate working arrays ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nstvv_h1 ++ ++ end module vv_motion_module ++ +diff -urN dl_class_1.9.orig/srcmod/vv_rotation1_module.f dl_class_1.9/srcmod/vv_rotation1_module.f +--- dl_class_1.9.orig/srcmod/vv_rotation1_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/vv_rotation1_module.f 2011-02-22 12:46:30.000000000 +0100 +@@ -0,0 +1,4701 @@ ++ module vv_rotation1_module ++ ++c*********************************************************************** ++c ++c dl_poly module 1 for velocity verlet rotational integration ++c schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use metafreeze_module, only : lmetadyn ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use vv_motion_module ++ use utility_module ++ ++ contains ++ ++ subroutine rotate_omega ++ x (idnode,mxnode,ngrp,tstep,p0,p1,p2,p3,dtx,dty,dtz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for updating the angular velocity and momentum ++c for rigid bodies ++c ++c copyright - daresbury laboratory ++c author - w. smith sept 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer idnode,mxnode,ngrp,i,j,jr,jrs,ig,igrp1,igrp2,id ++ real(8) ftx,fty,ftz,fmx,fmy,fmz,tstep,tqx,tqy,tqz,tq0,tq1,tq2,tq3 ++ ++ real(8) p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp) ++ real(8) dtx(mxatms),dty(mxatms),dtz(mxatms),rot(9) ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ tq1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ tq2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ tq3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=p0(ig)+tq0*tstep ++ p1(ig)=p1(ig)+tq1*tstep ++ p2(ig)=p2(ig)+tq2*tstep ++ p3(ig)=p3(ig)+tq3*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) ++ ++ enddo ++ ++ return ++ end subroutine rotate_omega ++ ++ subroutine nosquish(ig,tstep,qq0,qq1,qq2,qq3,pp0,pp1,pp2,pp3) ++ ++c*********************************************************************** ++c ++c dlpoly routine to implement the symplectic no_squish quaternion ++c algorithm of miller et al j.chem.phys 116 (2002) 8649 ++c ++c copyright daresbury laboratory ++c author m. leslie jan 2004 ++c amended w.smith mar 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer m,ig,id ++ real(8) zetax,zetay,zetaz,tstep,cs,sn,trstep ++ ++ integer, parameter :: mrot=10 ++ real(8), parameter :: ov4=0.25d0 ++ real(8), parameter :: ov8=0.125d0 ++ ++ real(8) qq0(*),qq1(*),qq2(*),qq3(*) ++ real(8) pp0(*),pp1(*),pp2(*),pp3(*) ++ ++ real(8) qn1(0:3),pq2(0:3),qn2(0:3),pq3(0:3) ++ real(8) qn3(0:3),pq4(0:3) ++ ++c rotational time step ++ ++ trstep=tstep/dble(mrot) ++ ++c rotation: iterate over mrot rotational time steps ++ ++ id=lstgtp(ig) ++ ++ do m=1,mrot ++ ++ zetaz=ov8*rotinz(id,2)*trstep* ++ x (-pp0(ig)*qq3(ig)+pp1(ig)*qq2(ig)- ++ x pp2(ig)*qq1(ig)+pp3(ig)*qq0(ig)) ++ cs=cos(zetaz) ++ sn=sin(zetaz) ++ qn1(0)=cs*qq0(ig)-sn*qq3(ig) ++ qn1(1)=cs*qq1(ig)+sn*qq2(ig) ++ qn1(2)=cs*qq2(ig)-sn*qq1(ig) ++ qn1(3)=cs*qq3(ig)+sn*qq0(ig) ++ pq2(0)=cs*pp0(ig)-sn*pp3(ig) ++ pq2(1)=cs*pp1(ig)+sn*pp2(ig) ++ pq2(2)=cs*pp2(ig)-sn*pp1(ig) ++ pq2(3)=cs*pp3(ig)+sn*pp0(ig) ++ ++ zetay=ov8*rotiny(id,2)*trstep* ++ x (-pq2(0)*qn1(2)-pq2(1)*qn1(3)+ ++ x pq2(2)*qn1(0)+pq2(3)*qn1(1)) ++ cs=cos(zetay) ++ sn=sin(zetay) ++ qn2(0)=cs*qn1(0)-sn*qn1(2) ++ qn2(1)=cs*qn1(1)-sn*qn1(3) ++ qn2(2)=cs*qn1(2)+sn*qn1(0) ++ qn2(3)=cs*qn1(3)+sn*qn1(1) ++ pq3(0)=cs*pq2(0)-sn*pq2(2) ++ pq3(1)=cs*pq2(1)-sn*pq2(3) ++ pq3(2)=cs*pq2(2)+sn*pq2(0) ++ pq3(3)=cs*pq2(3)+sn*pq2(1) ++ ++ zetax=ov4*rotinx(id,2)*trstep* ++ x (-pq3(0)*qn2(1)+pq3(1)*qn2(0)+ ++ x pq3(2)*qn2(3)-pq3(3)*qn2(2)) ++ cs=cos(zetax) ++ sn=sin(zetax) ++ qn3(0)=cs*qn2(0)-sn*qn2(1) ++ qn3(1)=cs*qn2(1)+sn*qn2(0) ++ qn3(2)=cs*qn2(2)+sn*qn2(3) ++ qn3(3)=cs*qn2(3)-sn*qn2(2) ++ pq4(0)=cs*pq3(0)-sn*pq3(1) ++ pq4(1)=cs*pq3(1)+sn*pq3(0) ++ pq4(2)=cs*pq3(2)+sn*pq3(3) ++ pq4(3)=cs*pq3(3)-sn*pq3(2) ++ ++ zetay=ov8*rotiny(id,2)*trstep* ++ x (-pq4(0)*qn3(2)-pq4(1)*qn3(3)+ ++ x pq4(2)*qn3(0)+pq4(3)*qn3(1)) ++ cs=cos(zetay) ++ sn=sin(zetay) ++ qn2(0)=cs*qn3(0)-sn*qn3(2) ++ qn2(1)=cs*qn3(1)-sn*qn3(3) ++ qn2(2)=cs*qn3(2)+sn*qn3(0) ++ qn2(3)=cs*qn3(3)+sn*qn3(1) ++ pq3(0)=cs*pq4(0)-sn*pq4(2) ++ pq3(1)=cs*pq4(1)-sn*pq4(3) ++ pq3(2)=cs*pq4(2)+sn*pq4(0) ++ pq3(3)=cs*pq4(3)+sn*pq4(1) ++ ++ zetaz=ov8*rotinz(id,2)*trstep* ++ x (-pq3(0)*qn2(3)+pq3(1)*qn2(2)- ++ x pq3(2)*qn2(1)+pq3(3)*qn2(0)) ++ cs=cos(zetaz) ++ sn=sin(zetaz) ++ qq0(ig)=cs*qn2(0)-sn*qn2(3) ++ qq1(ig)=cs*qn2(1)+sn*qn2(2) ++ qq2(ig)=cs*qn2(2)-sn*qn2(1) ++ qq3(ig)=cs*qn2(3)+sn*qn2(0) ++ pp0(ig)=cs*pq3(0)-sn*pq3(3) ++ pp1(ig)=cs*pq3(1)+sn*pq3(2) ++ pp2(ig)=cs*pq3(2)-sn*pq3(1) ++ pp3(ig)=cs*pq3(3)+sn*pq3(0) ++ ++ enddo ++ ++ return ++ end subroutine nosquish ++ ++ subroutine nveqvv_1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author m. leslie jan 2004 ++c amended w.smith jan 2005: f90 conversion ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr ++ integer id,ifre,jrs,idum,ig ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) tqx,tqy,tqz,ftx,fty,ftz ++ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz ++ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,engfke ++ ++ integer, parameter :: nnn=6 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ ++ save newjob,p0,p1,p2,p3 ++ ++ data newjob/.true./ ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2100) ++ enddo ++ ++ newjob=.false. ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++c operations common to first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*pt5*tstep ++ p1(ig)=p1(ig)+qt1*pt5*tstep ++ p2(ig)=p2(ig)+qt2*pt5*tstep ++ p3(ig)=p3(ig)+qt3*pt5*tstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c merge centre of mass velocities from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) ++ ++ enddo ++ ++c merge centre of mass position from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nveqvv_1 ++ ++ subroutine nvtqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, ++ x vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c nvt ensemble - Berendsen thermostat (n.b. not symplectic) ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith mar 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr ++ integer id,ifre,jrs,idum,ig,iatm0,iatm1 ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) tqx,tqy,tqz,ftx,fty,ftz ++ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz ++ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke ++ real(8) chit,engfke ++ ++ integer, parameter :: nnn=6 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ ++ save newjob,p0,p1,p2,p3 ++ ++ data newjob/.true./ ++ ++c atom block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2120) ++ enddo ++ ++ newjob=.false. ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++c operations common to first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*pt5*tstep ++ p1(ig)=p1(ig)+qt1*pt5*tstep ++ p2(ig)=p2(ig)+qt2*pt5*tstep ++ p3(ig)=p3(ig)+qt3*pt5*tstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algoritm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities ++ ++ do i=iatm0,iatm1 ++ ++ if(lstfrz(i).eq.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c exchange position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c merge group velocities from all processors ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nvtqvv_b1 ++ ++ subroutine nvtqvv_h1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke,engrot, ++ x taut,sigma,tolnce,tstep,vircom,vircon,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c nvt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith april 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=6 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr ++ integer id,ig,ifre,jrs,idum ++ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep ++ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn ++ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc ++ real(8) engfke ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newjob,p0,p1,p2,p3 ++ ++ data newjob/.true./ ++ ++c timestep parameters ++ ++ hstep=pt5*tstep ++ ++c nose-hoover inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2140) ++ enddo ++ ++ newjob=.false. ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c apply thermostat for first stage ++ ++ if(isw.eq.1)then ++ ++ call nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x hstep,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ endif ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++c operations common to first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*hstep ++ p1(ig)=p1(ig)+qt1*hstep ++ p2(ig)=p2(ig)+qt2*hstep ++ p3(ig)=p3(ig)+qt3*hstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) ++ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) ++ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algoritm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxx(i)+tstep*vxx(i) ++ yyy(i)=yyy(i)+tstep*vyy(i) ++ zzz(i)=zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c apply thermostat for second stage and calculate kinetic energy ++ ++ call nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x hstep,qmass,taut,chit,conint) ++ ++ engke=engfke+engtrn ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ consv=conint+0.5d0*qmass*chit**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c merge group velocities from all processors ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ endif ++ ++ return ++ end subroutine nvtqvv_h1 ++ ++ subroutine nptqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c npt ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith april 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr,kk ++ integer id,ifre,jrs,idum,ig,iatm0,iatm1,ntpatm,iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) tqx,tqy,tqz,ftx,fty,ftz ++ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz ++ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke ++ real(8) chit,chip,beta,volm,volm0,elrc,elrc0,virlrc,virlrc0 ++ real(8) virtot,psyst,press,taup,scale,engfke ++ ++ integer, parameter :: nnn=11 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ ++ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./,beta/7.3728d-3/ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2160) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c atom block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ if(isw.eq.1)then ++ ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(6)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(7)) ++ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp),stat=fail(8)) ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(10)) ++ ++ endif ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(11)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2170) ++ enddo ++ ++ newjob=.false. ++ if(ntcons.gt.0)safe=.false. ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn ++ ++c calculate quaternion momenta at start of time step ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c rigid body motion for first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*pt5*tstep ++ p1(ig)=p1(ig)+qt1*pt5*tstep ++ p2(ig)=p2(ig)+qt2*pt5*tstep ++ p3(ig)=p3(ig)+qt3*pt5*tstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ c0(ig)=p0(ig) ++ c1(ig)=p1(ig) ++ c2(ig)=p2(ig) ++ c3(ig)=p3(ig) ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ ++ enddo ++ ++ endif ++ ++c iteration required if ntcons > 0 ++ ++ mxiter=1 ++ if(ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++ scale=1.d0 ++ ++ if(iter.eq.mxiter)then ++ ++c calculate system pressure ++ ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ ++c apply Berendsen barostat ++ ++ chip=1.d0+beta*tstep*(psyst-press)/taup ++ scale=chip**(1.d0/3.d0) ++ volm=chip*volm ++ ++c reset cell parameters for new volume ++ ++ do i=1,9 ++ cell(i)=scale*cell(i) ++ enddo ++ ++ endif ++ ++c update centre of mass position ++ ++ do ig=igrp1,igrp2 ++ ++ gcmx(ig)=scale*gcmx(ig)+tstep*gvxx(ig) ++ gcmy(ig)=scale*gcmy(ig)+tstep*gvyy(ig) ++ gcmz(ig)=scale*gcmz(ig)+tstep*gvzz(ig) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=gcmx(ig)+ ++ x rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ yyy(i)=gcmy(ig)+ ++ x rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ zzz(i)=gcmz(ig)+ ++ x rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=scale*xxx(i)+tstep*vxx(i) ++ yyy(i)=scale*yyy(i)+tstep*vyy(i) ++ zzz(i)=scale*zzz(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++ if(iter.lt.mxiter)then ++ ++ do i=1,natms ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ p0(ig)=c0(ig) ++ p1(ig)=c1(ig) ++ p2(ig)=c2(ig) ++ p3(ig)=c3(ig) ++ gcmx(ig)=gxo(ig) ++ gcmy(ig)=gyo(ig) ++ gcmz(ig)=gzo(ig) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor for tethered bonds ++ ++ do i=1,9 ++ eta(i)=scale*uni(i) ++ enddo ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities ++ ++ do i=iatm0,iatm1 ++ ++ if(lstfrz(i).eq.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c merge group velocities from all processors ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ if(isw.eq.1)then ++ ++ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,c0,c1,c2,c3,stat=fail(5)) ++ deallocate(gxo,gyo,gzo,stat=fail(6)) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine nptqvv_b1 ++ ++ subroutine nptqvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircon,virtot,virlrc,vircom,volm,press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c npt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith may 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ integer, parameter :: ncyc=5 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr ++ integer id,ig,ifre,jrs,idum,mxiter,iter,ntpatm,kk,icyc ++ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep ++ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn ++ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc ++ real(8) taup,temp,press,virtot,vzero,chit0,chip0,cons0 ++ real(8) chip,volm,elrc,elrc0,virlrc,virlrc0,qstep,pmass,totmas ++ real(8) volm0,scale,cxx,cyy,czz,engfke,fstep ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),cell0(9),com(3),vom(3),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: oxo(:),oyo(:),ozo(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newjob,hstep,qstep,fstep,pmass,qmass ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,volm0,elrc0,virlrc0 ++ save totmas,dens0,cell0 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2200) ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c nose-hoover thermostat and barostat inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ ++ if(ntcons.gt.0)then ++ ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(2)) ++ allocate(oxo(mxgrp),oyo(mxgrp),ozo(mxgrp),stat=fail(3)) ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(4)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(5)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(9)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(10)) ++ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(11)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(12)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2210) ++ enddo ++ ++ newjob=.false. ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=1,natms ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=1,ngrp ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store current integration variables if ntcons > 0 ++ ++ if(ntcons.gt.0)then ++ ++ vzero=volm ++ chit0=chit ++ chip0=chip ++ cons0=conint ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ oxo(ig)=omx(ig) ++ oyo(ig)=omy(ig) ++ ozo(ig)=omz(ig) ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ gvxo(ig)=gvxx(ig) ++ gvyo(ig)=gvyy(ig) ++ gvzo(ig)=gvzz(ig) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c iteration necessary if ntcons > 0 and isw=1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++ if(isw.eq.1)then ++ ++ do icyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++ engke=engfke+engtrn ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c calculate quaternion momenta ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*hstep ++ p1(ig)=p1(ig)+qt1*hstep ++ p2(ig)=p2(ig)+qt2*hstep ++ p3(ig)=p3(ig)+qt3*hstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ cxx=gcmx(ig)-com(1) ++ cyy=gcmy(ig)-com(2) ++ czz=gcmz(ig)-com(3) ++ gcmx(ig)=gcmx(ig)+tstep*(gvxx(ig)+chip*cxx) ++ gcmy(ig)=gcmy(ig)+tstep*(gvyy(ig)+chip*cyy) ++ gcmz(ig)=gcmz(ig)+tstep*(gvzz(ig)+chip*czz) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ cxx=xxx(i)-com(1) ++ cyy=yyy(i)-com(2) ++ czz=zzz(i)-com(3) ++ xxx(i)=xxx(i)+tstep*(vxx(i)+chip*cxx) ++ yyy(i)=yyy(i)+tstep*(vyy(i)+chip*cyy) ++ zzz(i)=zzz(i)+tstep*(vzz(i)+chip*czz) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++c restore original integration parameters if iter < mxiter ++ ++ if(iter.lt.mxiter)then ++ ++ volm=vzero ++ chit=chit0 ++ chip=chip0 ++ conint=cons0 ++ do i=1,natms ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ omx(ig)=oxo(ig) ++ omy(ig)=oyo(ig) ++ omz(ig)=ozo(ig) ++ gcmx(ig)=gxo(ig) ++ gcmy(ig)=gyo(ig) ++ gcmz(ig)=gzo(ig) ++ gvxx(ig)=gvxo(ig) ++ gvyy(ig)=gvyo(ig) ++ gvzz(ig)=gvzo(ig) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c operations for second stage only ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ do icyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++ engke=engfke+engtrn ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/volm0)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c calculate conserved variable ++ ++ consv=conint+0.5d0*qmass*chit**2+press*volm ++ x +0.5d0*pmass*chip**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c end of iteration cycle ++ ++ enddo ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor (for tethered atoms) ++ ++ do i=1,9 ++ eta(i)=chip*uni(i) ++ enddo ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,oxo,oyo,ozo,stat=fail(5)) ++ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(6)) ++ deallocate(gxo,gyo,gzo,gvxo,gvyo,gvzo,stat=fail(7)) ++ ++ endif ++ ++ return ++ end subroutine nptqvv_h1 ++ ++ subroutine nstqvv_b1 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,volm) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c nst ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith may 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr,kk,mode ++ integer id,ifre,jrs,idum,ig,iatm0,iatm1,ntpatm,iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engfke ++ real(8) tqx,tqy,tqz,ftx,fty,ftz ++ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz ++ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke ++ real(8) chit,beta,volm,volm0,elrc,elrc0,virlrc,virlrc0 ++ real(8) press,taup,xtmp,ytmp,ztmp ++ ++ integer, parameter :: nnn=11 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ real(8) celp(10),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ ++ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data newjob/.true./,beta/7.3728d-3/ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++ safe=.true. ++ ++ if(newjob)then ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2240) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c atom block indices ++ ++ iatm0=(idnode*natms)/mxnode+1 ++ iatm1=((idnode+1)*natms)/mxnode ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) ++ ++ if(isw.eq.1)then ++ ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(6)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(7)) ++ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp),stat=fail(8)) ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(10)) ++ ++ endif ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(11)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2250) ++ enddo ++ ++ newjob=.false. ++ if(ntcons.gt.0)safe=.false. ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn ++ ++c calculate quaternion momenta at start of time step ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities 1/2 time step first and second stages ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c rigid body motion for first and second stages ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*pt5*tstep ++ p1(ig)=p1(ig)+qt1*pt5*tstep ++ p2(ig)=p2(ig)+qt2*pt5*tstep ++ p3(ig)=p3(ig)+qt3*pt5*tstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c store current integration variables ++ ++ if(ntcons.gt.0)then ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ c0(ig)=p0(ig) ++ c1(ig)=p1(ig) ++ c2(ig)=p2(ig) ++ c3(ig)=p3(ig) ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ ++ enddo ++ ++ endif ++ ++c extract previous constraint terms from stress tensor ++ ++ if(isw.eq.1)then ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++ endif ++ ++c iteration required if ntcons > 0 ++ ++ mxiter=1 ++ if(ntcons.gt.0)mxiter=2 ++ do iter=1,mxiter ++ ++c zero scaling matrix ++ ++ do i=1,9 ++ eta(i)=uni(i) ++ enddo ++ ++ if(iter.eq.mxiter)then ++ ++c calculate Berendsen barostat ++ ++ do i=1,9 ++ eta(i)=tstep*beta*(stress(i)+strcns(i)- ++ x press*volm*uni(i))/(taup*volm)+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c reset cell parameters for new volume ++ ++ call mat_mul(eta,cell,cell) ++ ++c calculate new volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++ endif ++ ++c update centre of mass position ++ ++ do ig=igrp1,igrp2 ++ ++ xtmp=eta(1)*gcmx(ig)+eta(4)*gcmy(ig)+eta(7)*gcmz(ig) ++ ytmp=eta(2)*gcmx(ig)+eta(5)*gcmy(ig)+eta(8)*gcmz(ig) ++ ztmp=eta(3)*gcmx(ig)+eta(6)*gcmy(ig)+eta(9)*gcmz(ig) ++ gcmx(ig)=tstep*gvxx(ig)+xtmp ++ gcmy(ig)=tstep*gvyy(ig)+ytmp ++ gcmz(ig)=tstep*gvzz(ig)+ztmp ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=gcmx(ig)+ ++ x rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ yyy(i)=gcmy(ig)+ ++ x rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ zzz(i)=gcmz(ig)+ ++ x rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=tstep*vxx(i)+ ++ x eta(1)*xxx(i)+eta(4)*yyy(i)+eta(7)*zzz(i) ++ yyy(i)=tstep*vyy(i)+ ++ x eta(2)*xxx(i)+eta(5)*yyy(i)+eta(8)*zzz(i) ++ zzz(i)=tstep*vzz(i)+ ++ x eta(3)*xxx(i)+eta(6)*yyy(i)+eta(9)*zzz(i) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++ endif ++ ++ if(iter.lt.mxiter)then ++ ++ do i=1,natms ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ p0(ig)=c0(ig) ++ p1(ig)=c1(ig) ++ p2(ig)=c2(ig) ++ p3(ig)=c3(ig) ++ gcmx(ig)=gxo(ig) ++ gcmy(ig)=gyo(ig) ++ gcmz(ig)=gzo(ig) ++ ++ enddo ++ ++ endif ++ ++ enddo ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c end of first stage of velocity verlet algorithm ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++ endif ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities ++ ++ do i=iatm0,iatm1 ++ ++ if(lstfrz(i).eq.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c merge group velocities from all processors ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) ++ ++ if(isw.eq.1)then ++ ++ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,c0,c1,c2,c3,stat=fail(5)) ++ deallocate(gxo,gyo,gzo,stat=fail(6)) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine nstqvv_b1 ++ ++ subroutine nstqvv_h1 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, ++ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircon,virlrc,vircom,volm,press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly routine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - provided rigid body sites ++c and constraint sites do not coincide. ++c ++c nst ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith may 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ integer, parameter :: nnn=12 ++ integer, parameter :: ncyc=5 ++ real(8), parameter :: pt5=0.5d0 ++ ++ logical safe,lshmov,newjob ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree ++ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr,mode ++ integer id,ig,ifre,jrs,idum,mxiter,iter,ntpatm,kk,icyc ++ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep ++ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn ++ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc ++ real(8) taup,temp,press,vzero,chit0,cons0 ++ real(8) chip2,volm,elrc,elrc0,virlrc,virlrc0,qstep,pmass,totmas ++ real(8) volm0,cxx,cyy,czz,engfke,fstep ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),com(3),vom(3) ++ real(8) czero(9),eta0(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: oxo(:),oyo(:),ozo(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newjob,hstep,qstep,fstep,pmass,qmass ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,volm0,elrc0,virlrc0 ++ save totmas,dens0 ++ ++ data newjob/.true./ ++ ++ safe=.true. ++ if(newjob)then ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2280) ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c nose-hoover thermostat and barostat inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ endif ++ ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) ++ if(ntcons.gt.0)then ++ ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(2)) ++ allocate(oxo(mxgrp),oyo(mxgrp),ozo(mxgrp),stat=fail(3)) ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(4)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(5)) ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(9)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(10)) ++ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(11)) ++ ++ endif ++ if(newjob)then ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(12)) ++ endif ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2290) ++ enddo ++ ++ newjob=.false. ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++ if(ntcons.gt.0)then ++ ++c construct current bond vectors ++ ++ do k=1,nscons ++ ++c indices of atoms in bond ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate current bond vector ++ ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition for bond vectors ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=1,natms ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=1,ngrp ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store current integration variables if ntcons > 0 ++ ++ if(ntcons.gt.0)then ++ ++ vzero=volm ++ chit0=chit ++ cons0=conint ++ do i=1,9 ++ ++ eta0(i)=eta(i) ++ czero(i)=cell(i) ++ ++ enddo ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ oxo(ig)=omx(ig) ++ oyo(ig)=omy(ig) ++ ozo(ig)=omz(ig) ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ gvxo(ig)=gvxx(ig) ++ gvyo(ig)=gvyy(ig) ++ gvzo(ig)=gvzz(ig) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c iteration necessary if ntcons > 0 and isw=1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++ if(isw.eq.1)then ++ ++ do icyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, ++ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstqscl_p ++ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit, ++ x press,volm) ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, ++ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++ engke=engfke+engtrn ++ ++c calculate quaternion momenta ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c update free atom velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* Rigid body motion **************************** ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c calculate com force arrays ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) ++ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) ++ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) ++ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) ++ ++c update quaternion momenta by 1/2 time step ++ ++ p0(ig)=p0(ig)+qt0*hstep ++ p1(ig)=p1(ig)+qt1*hstep ++ p2(ig)=p2(ig)+qt2*hstep ++ p3(ig)=p3(ig)+qt3*hstep ++ ++c update centre of mass velocity by 1/2 time step ++ ++ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) ++ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) ++ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c move centre of mass by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ cxx=gcmx(ig)-com(1) ++ cyy=gcmy(ig)-com(2) ++ czz=gcmz(ig)-com(3) ++ gcmx(ig)=gcmx(ig)+ ++ x tstep*(gvxx(ig)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ gcmy(ig)=gcmy(ig)+ ++ x tstep*(gvyy(ig)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ gcmz(ig)=gcmz(ig)+ ++ x tstep*(gvzz(ig)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c rotate rigid groups: nosquish algorithm ++ ++ do ig=igrp1,igrp2 ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ enddo ++ ++c new atomic positions for atoms in rigid bodies-relative to c.o.m ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) ++ x +gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) ++ x +gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) ++ x +gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ k=k+1 ++ i=lstfre(ifre) ++ cxx=xxx(i)-com(1) ++ cyy=yyy(i)-com(2) ++ czz=zzz(i)-com(3) ++ xxx(i)=xxx(i)+ ++ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ yyy(i)=yyy(i)+ ++ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ zzz(i)=zzz(i)+ ++ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++ enddo ++ ++c merge position data ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply shake corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c subtract old constraint terms from stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++c correct constraint bonds using rattle ++ ++ safe=.false. ++ call rdrattle_r ++ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, ++ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, ++ x txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ if(.not.safe)return ++ ++c add new constraint terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c restore original integration parameters if iter < mxiter ++ ++ if(iter.lt.mxiter)then ++ ++ volm=vzero ++ chit=chit0 ++ conint=cons0 ++ do i=1,9 ++ ++ eta(i)=eta0(i) ++ cell(i)=czero(i) ++ ++ enddo ++ do i=1,natms ++ ++ xxx(i)=xxo(i) ++ yyy(i)=yyo(i) ++ zzz(i)=zzo(i) ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ do ig=1,ngrp ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ omx(ig)=oxo(ig) ++ omy(ig)=oyo(ig) ++ omz(ig)=ozo(ig) ++ gcmx(ig)=gxo(ig) ++ gcmy(ig)=gyo(ig) ++ gcmz(ig)=gzo(ig) ++ gvxx(ig)=gvxo(ig) ++ gvyy(ig)=gvyo(ig) ++ gvzz(ig)=gvzo(ig) ++ ++ enddo ++ ++ endif ++ ++ endif ++ ++c operations for second stage only ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotation matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities from all nodes ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c correct constraint bond velocities using rattle ++ ++ if(ntcons.gt.0)then ++ ++ safe=.false. ++ call rdrattle_v ++ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, ++ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) ++ if(.not.safe)return ++ ++c add constraint terms to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c kinetic terms for stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strkin(i)+strgrp(i)+strbod(i) ++ enddo ++ ++ do icyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, ++ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstqscl_p ++ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit, ++ x press,volm) ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, ++ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++ engke=engfke+engtrn ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c end of second stage of velocity verlet algorithm ++ ++ endif ++ ++c end of iteration cycle ++ ++ enddo ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do kk=1,ntpatm ++ dens(kk)=dens0(kk)*(volm0/volm) ++ enddo ++ ++c deallocate working arrays ++ ++ deallocate(dtx,dty,dtz,stat=fail(1)) ++ ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(3)) ++ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(4)) ++ deallocate(xxo,yyo,zzo,oxo,oyo,ozo,stat=fail(5)) ++ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(6)) ++ deallocate(gxo,gyo,gzo,gvxo,gvyo,gvzo,stat=fail(7)) ++ ++ endif ++ ++ return ++ end subroutine nstqvv_h1 ++ ++ end module vv_rotation1_module ++ +diff -urN dl_class_1.9.orig/srcmod/vv_rotation2_module.f dl_class_1.9/srcmod/vv_rotation2_module.f +--- dl_class_1.9.orig/srcmod/vv_rotation2_module.f 1970-01-01 01:00:00.000000000 +0100 ++++ dl_class_1.9/srcmod/vv_rotation2_module.f 2011-02-22 12:46:30.000000000 +0100 +@@ -0,0 +1,5924 @@ ++ module vv_rotation2_module ++ ++c*********************************************************************** ++c ++c dl_poly module 2 for velocity verlet rotational integration ++c schemes ++c copyright - daresbury laboratory ++c author - w. smith aug 2006 ++c adapted - d. quigley - metadynamics ++c ++c*********************************************************************** ++ ++ use config_module ++ use ensemble_tools_module ++ use error_module ++ use metafreeze_module, only : lmetadyn ++ use property_module ++ use rigid_body_module ++ use setup_module ++ use shake_module ++ use site_module ++ use vv_rotation1_module ++ use utility_module ++ ++ contains ++ ++ subroutine qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,stresh) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for applying bond constraint corrections after ++c atomic integration in the velocity verlet scheme. assumes rigid ++c bodies connected by constraints. must be used in conjunction with ++c velocity verlet integration algorithm. note the iteration is ++c handled by the calling routine. ++c ++c copyright - daresbury laboratory ++c author - w. smith february 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newstep,newjob ++ integer fail,idnode,imcon,mxnode,natms,nscons,i,j,k,ik ++ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,txx,tyy ++ real(8) tzz,xxt,yyt,zzt,stresh,strs1,strs2,strs3,strs5,strs6 ++ real(8) strs9,tstep2,esig,dis2,tqa,tqb,gamma,dli,dlj ++ ++ real(8), allocatable :: esig1(:),ggx(:),ggy(:),ggz(:) ++ ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) ++ dimension stresh(9),tqa(3),tqb(3) ++ ++ save newjob,esig1,ggx,ggy,ggz ++ ++ data newjob/.true./,fail/0/ ++ ++ if(newjob)then ++ ++ allocate (esig1(mxcons),ggx(mxcons),ggy(mxcons),ggz(mxcons), ++ x stat=fail) ++ if(fail.ne.0)call error(idnode,1615) ++ newjob=.false. ++ ++ endif ++ ++c accumulators for stress tensor ++ ++ strs1=0.d0 ++ strs2=0.d0 ++ strs3=0.d0 ++ strs5=0.d0 ++ strs6=0.d0 ++ strs9=0.d0 ++ ++c timestep squared ++ ++ tstep2=tstep*tstep ++ ++c constraint bond vectors are dxx,dyy,dzz (input) ++ ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++c calculate temporary bond vector ++ ++ dxt(k)=xxx(i)-xxx(j) ++ dyt(k)=yyy(i)-yyy(j) ++ dzt(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++c periodic boundary condition ++ ++ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) ++ ++c calculate maximum error in bondlength ++ ++ esig=0.d0 ++ do k=1,nscons ++ ++ dis2=prmcon(listcon(k,1))**2 ++ esig1(k)=(dis2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/dis2 ++ esig=max(esig,abs(esig1(k))) ++ ++ enddo ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolnce) ++ ++ if(mxnode.gt.1)call gstate(safe) ++ ++c continue if any tolerances unsatisfied ++ ++ if(.not.safe)then ++ ++c initialise force increment arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint forces ++ ++ ik=0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dis2=prmcon(listcon(k,1))**2 ++ ++ if(newstep)then ++ ++ call pivot(1,i,k,ik,tqa,dxx,dyy,dzz) ++ call pivot(1,j,k,ik,tqb,dxx,dyy,dzz) ++ ++ ggx(k)=tstep2*(tqa(1)+tqb(1))/dis2 ++ ggy(k)=tstep2*(tqa(2)+tqb(2))/dis2 ++ ggz(k)=tstep2*(tqa(3)+tqb(3))/dis2 ++ ++ endif ++ ++c constraint force parameter ++ ++ gamma=esig1(k)/(dxt(k)*ggx(k)+dyt(k)*ggy(k)+dzt(k)*ggz(k)) ++ ++c accumulate bond virial ++ ++ vircon=vircon-gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) ++ ++ strs1=strs1+gamma*dxx(k)*dxx(k) ++ strs2=strs2+gamma*dxx(k)*dyy(k) ++ strs3=strs3+gamma*dxx(k)*dzz(k) ++ strs5=strs5+gamma*dyy(k)*dyy(k) ++ strs6=strs6+gamma*dyy(k)*dzz(k) ++ strs9=strs9+gamma*dzz(k)*dzz(k) ++ ++c improved atomic force ++ ++ xxt(i)=xxt(i)+dxx(k)*gamma ++ yyt(i)=yyt(i)+dyy(k)*gamma ++ zzt(i)=zzt(i)+dzz(k)*gamma ++ xxt(j)=xxt(j)-dxx(k)*gamma ++ yyt(j)=yyt(j)-dyy(k)*gamma ++ zzt(j)=zzt(j)-dzz(k)*gamma ++ ++ enddo ++ ++c transport temporary positions to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov) call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ dlj=1.d0/dble(listme(j)) ++ ++ fxx(i)=fxx(i)+xxt(i)*dli ++ fyy(i)=fyy(i)+yyt(i)*dli ++ fzz(i)=fzz(i)+zzt(i)*dli ++ fxx(j)=fxx(j)+xxt(j)*dlj ++ fyy(j)=fyy(j)+yyt(j)*dlj ++ fzz(j)=fzz(j)+zzt(j)*dlj ++ ++ enddo ++ ++c complete stress tensor ++ ++ stresh(1)=stresh(1)+strs1 ++ stresh(2)=stresh(2)+strs2 ++ stresh(3)=stresh(3)+strs3 ++ stresh(4)=stresh(4)+strs2 ++ stresh(5)=stresh(5)+strs5 ++ stresh(6)=stresh(6)+strs6 ++ stresh(7)=stresh(7)+strs3 ++ stresh(8)=stresh(8)+strs6 ++ stresh(9)=stresh(9)+strs9 ++ ++c splice force arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ call splice ++ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++ ++ endif ++ ++ return ++ end subroutine qrattle_r ++ ++ subroutine qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for applying bond constraint corrections after ++c atomic integration in the velocity verlet scheme. assumes rigid ++c bodies connected by constraints. must be used in conjunction with ++c velocity verlet integration algorithm. note the iteration is ++c handled by the calling routine. ++c ++c copyright - daresbury laboratory ++c author - w. smith february 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ logical safe,lshmov,newstep,newjob ++ integer fail,idnode,mxnode,natms,nscons,i,j,k,ik ++ real(8) tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz,tqa,tqb ++ real(8) xxt,yyt,zzt,tstep2,esig,gamma,dli,dlj ++ real(8) tolvel ++ ++ real(8), allocatable :: esig2(:),hhx(:),hhy(:),hhz(:) ++ ++ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) ++ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) ++ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ dimension tqa(3),tqb(3) ++ ++ save newjob,esig2,hhx,hhy,hhz ++ ++ data newjob/.true./,fail/0/ ++ ++ if(newjob)then ++ ++ allocate (esig2(mxcons),hhx(mxcons),hhy(mxcons),hhz(mxcons), ++ x stat=fail) ++ if(fail.ne.0)call error(idnode,1625) ++ newjob=.false. ++ ++ endif ++ ++c constraint bond vectors are dxx,dyy,dzz (input) ++ ++c half timestep ++ ++ tstep2=tstep/2.d0 ++ ++c tolerance for velocity convergence ++ ++ tolvel=tolnce/tstep ++ ++c calculate maximum error in constraint ++ ++ esig=0.d0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ esig2(k)=(dxx(k)*(vxx(i)-vxx(j))+dyy(k)*(vyy(i)-vyy(j))+ ++ x dzz(k)*(vzz(i)-vzz(j))) ++ esig=max(esig,abs(esig2(k))) ++ ++ enddo ++ ++c global verification of convergence ++ ++ safe=(esig.lt.tolvel) ++ ++ if(mxnode.gt.1)then ++ call gstate(safe) ++ endif ++ ++c continue if all tolerances satisfied else return to calling routine ++ ++ if(.not.safe)then ++ ++c initialise velocity correction arrays ++ ++ do i=1,natms ++ ++ xxt(i)=0.d0 ++ yyt(i)=0.d0 ++ zzt(i)=0.d0 ++ ++ enddo ++ ++c calculate constraint correction ++ ++ ik=0 ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ if(newstep)then ++ ++ call pivot(2,i,k,ik,tqa,dxx,dyy,dzz) ++ call pivot(2,j,k,ik,tqb,dxx,dyy,dzz) ++ ++ hhx(k)=tstep2*(tqa(1)+tqb(1)) ++ hhy(k)=tstep2*(tqa(2)+tqb(2)) ++ hhz(k)=tstep2*(tqa(3)+tqb(3)) ++ ++ endif ++ ++c constraint force parameter ++ ++ gamma=esig2(k)/(dxx(k)*hhx(k)+dyy(k)*hhy(k)+dzz(k)*hhz(k)) ++ ++c improved atomic force ++ ++ xxt(i)=xxt(i)-dxx(k)*gamma ++ yyt(i)=yyt(i)-dyy(k)*gamma ++ zzt(i)=zzt(i)-dzz(k)*gamma ++ xxt(j)=xxt(j)+dxx(k)*gamma ++ yyt(j)=yyt(j)+dyy(k)*gamma ++ zzt(j)=zzt(j)+dzz(k)*gamma ++ ++ enddo ++ ++c transport temporary positions to other nodes ++ ++ if(mxnode.gt.1)then ++ ++ if(lshmov) call shmove ++ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, ++ x txx,tyy,tzz,buffer) ++ ++ endif ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ ++ dli=1.d0/dble(listme(i)) ++ dlj=1.d0/dble(listme(j)) ++ ++ fxx(i)=fxx(i)+dli*xxt(i) ++ fyy(i)=fyy(i)+dli*yyt(i) ++ fzz(i)=fzz(i)+dli*zzt(i) ++ fxx(j)=fxx(j)+dlj*xxt(j) ++ fyy(j)=fyy(j)+dlj*yyt(j) ++ fzz(j)=fzz(j)+dlj*zzt(j) ++ ++ enddo ++ ++c splice force arrays across nodes ++ ++ if(mxnode.gt.1)then ++ ++ call splice ++ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine qrattle_v ++ ++ subroutine pivot(k,i,kk,ik,tqq,dxx,dyy,dzz) ++ ++c*********************************************************************** ++c ++c dl_poly subroutine for computing pivot vector for velocity ++c corrections to bonds between rigid bodies ++c must be used in conjunction with qrattle routines: ++c if k=1 - use with qrattle_r ++c if k=2 - use with qrattle_v ++c ++c copyright - daresbury laboratory ++c author - w. smith february 2005 ++c ++c*********************************************************************** ++ ++ implicit none ++ ++ integer k,i,kk,ik,ig,id,jj ++ real(8) xxa,yya,zza,tax,tay,taz,trx,try,trz,vix,viy,viz ++ real(8) rot(9),tqq(3),dxx(mxcons),dyy(mxcons),dzz(mxcons) ++ ++ ig=lstbod(i) ++ ++ if(ig.eq.0)then ++ ++c atoms in constraint bonds ++ ++ tqq(1)=dxx(kk)*rmass(i) ++ tqq(2)=dyy(kk)*rmass(i) ++ tqq(3)=dzz(kk)*rmass(i) ++ ++ else ++ ++c terms for rigid body atoms ++ ++ ik=ik+1 ++ id=lstgtp(ig) ++ ++ tqq(1)=dxx(kk)/gmass(id) ++ tqq(2)=dyy(kk)/gmass(id) ++ tqq(3)=dzz(kk)/gmass(id) ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ jj=lstcsit(ik) ++ ++c com-site vector in lab frame ++ ++ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+gzz(id,jj)*rot(3)) ++ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+gzz(id,jj)*rot(6)) ++ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+gzz(id,jj)*rot(9)) ++ ++c cross product of com-site vector and interatomic vector ++ ++ tax=yya*dzz(kk)-zza*dyy(kk) ++ tay=zza*dxx(kk)-xxa*dzz(kk) ++ taz=xxa*dyy(kk)-yya*dxx(kk) ++ ++c transform to body fixed frame ++ ++ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) ++ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) ++ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) ++ ++ if(k.eq.1)then ++ ++c direction of induced velocites in body frame ++ ++ vix=try*gzz(id,jj)-trz*gyy(id,jj) ++ viy=trz*gxx(id,jj)-trx*gzz(id,jj) ++ viz=trx*gyy(id,jj)-try*gxx(id,jj) ++ ++c transform to lab frame ++ ++ tqq(1)=tqq(1)+vix*rot(1)+viy*rot(2)+viz*rot(3) ++ tqq(2)=tqq(2)+vix*rot(4)+viy*rot(5)+viz*rot(6) ++ tqq(3)=tqq(3)+vix*rot(7)+viy*rot(8)+viz*rot(9) ++ ++ elseif(k.eq.2)then ++ ++c transform to lab frame ++ ++ tqq(1)=tqq(1)+trx*rot(1)+try*rot(2)+trz*rot(3) ++ tqq(2)=tqq(2)+trx*rot(4)+try*rot(5)+trz*rot(6) ++ tqq(3)=tqq(3)+trx*rot(7)+try*rot(8)+trz*rot(9) ++ ++ endif ++ ++ endif ++ ++ return ++ end subroutine pivot ++ ++ subroutine nveqvv_2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith jan 2005 ++c amended w.smith feb 2005: qrattle added ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,jrs,icyc,mxshk,idum,ig ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) engtrn ++ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3 ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ ++ save newstep,newjob,p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data newjob/.true./ ++ ++c set array allocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) ++ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(3)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(4)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(5)) ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) ++ if(isw.eq.2)then ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) ++ endif ++ ++c check array allocation error flags ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2110) ++ enddo ++ ++c initialise constraint virial ++ ++ if(isw.eq.1)then ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) ++ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) ++ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*pt5*tstep ++ p1(ig)=c1(jg)+tq1*pt5*tstep ++ p2(ig)=c2(jg)+tq2*pt5*tstep ++ p3(ig)=c3(jg)+tq3*pt5*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxo(i)+tstep*vxx(i) ++ yyy(i)=yyo(i)+tstep*vyy(i) ++ zzz(i)=zzo(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge free atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++ if(isw.eq.2)then ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ ++ engke=engke+engtrn ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c restore forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ if(isw.eq.2)then ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ endif ++ ++ return ++ end subroutine nveqvv_2 ++ ++ subroutine nvtqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, ++ x vircom,vircon) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c nvt ensemble - Berendsen thermostat (n.b. not symplectic) ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith mar 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,jrs,icyc,mxshk,idum,ig ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke ++ real(8) engtrn ++ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,taut,sigma,chit ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ ++ save newstep,newjob,p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data newjob/.true./ ++ ++c set array alocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) ++ allocate(vxo(msatms),vyo(msatms),vzo(mxatms),stat=fail(3)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(4)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(5)) ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) ++ if(isw.eq.2)then ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) ++ endif ++ ++c check array allocation error flags ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2130) ++ enddo ++ ++c initialise constraint virial ++ ++ if(isw.eq.1)then ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) ++ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) ++ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*pt5*tstep ++ p1(ig)=c1(jg)+tq1*pt5*tstep ++ p2(ig)=c2(jg)+tq2*pt5*tstep ++ p3(ig)=c3(jg)+tq3*pt5*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxo(i)+tstep*vxx(i) ++ yyy(i)=yyo(i)+tstep*vyy(i) ++ zzz(i)=zzo(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engke+engtrn+engrot ++ engke=engke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ if(lstfrz(i).ne.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c restore forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ if(isw.eq.2)then ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ endif ++ ++ return ++ end subroutine nvtqvv_b2 ++ ++ subroutine nvtqvv_h2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke,engrot, ++ x taut,sigma,tolnce,tstep,vircom,vircon,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c nvt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith april 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,jrs,icyc,mxshk,idum,ig ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) engtrn,vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,engfke ++ real(8) taut,sigma,chit,hstep,qmass,conint,consv ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9) ++ ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newstep,newjob,p0,p1,p2,p3,hstep,qmass,ifre1,ifre2 ++ save igrp1,igrp2 ++ ++ data newjob/.true./ ++ ++c set array allocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c timestep parameters ++ ++ hstep=pt5*tstep ++ ++c nose-hoover inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) ++ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(3)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(4)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(5)) ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) ++ if(isw.eq.2)then ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) ++ endif ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2150) ++ enddo ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c initialise constraint virial ++ ++ if(isw.eq.1)then ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c apply thermostat for first stage ++ ++ if(isw.eq.1)then ++ ++ call nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x hstep,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) ++ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) ++ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*pt5*tstep ++ p1(ig)=c1(jg)+tq1*pt5*tstep ++ p2(ig)=c2(jg)+tq2*pt5*tstep ++ p3(ig)=c3(jg)+tq3*pt5*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=xxo(i)+tstep*vxx(i) ++ yyy(i)=yyo(i)+tstep*vyy(i) ++ zzz(i)=zzo(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ else ++ ++c second stage of velocity verlet algorithm ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c apply thermostat for second stage and calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++c rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c apply thermostat for second stage and calculate kinetic energy ++ ++ call nvtqscl ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, ++ x hstep,qmass,taut,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ engke=engfke+engtrn ++ ++c conserved quantity less kinetic and potential energy terms ++ ++ consv=conint+0.5d0*qmass*chit**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c restore forces if isw = 2 ++ ++ if(isw.eq.2)then ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ if(isw.eq.2)then ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ endif ++ ++ return ++ end subroutine nvtqvv_h2 ++ ++ subroutine nptqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c npt ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith sep 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,jrs,icyc,mxshk,idum,ig,ntpatm ++ integer iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke,engtrn ++ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz,volm0 ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,taut,sigma,chit ++ real(8) volm,elrc0,elrc,virlrc0,virlrc,scale,psyst,virtot,chip ++ real(8) beta,press,taup,engfke,vzero ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),cell0(9),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++ save newstep,newjob,volm0,elrc0,virlrc0,dens0 ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./,beta/7.3728d-3/ ++ ++c set array alocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2180) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(3)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ endif ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(8)) ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(9)) ++ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(11)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(12)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(13)) ++ ++c check array allocation error flags ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2190) ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c cell parameters ++ ++ vzero=volm ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engke=engfke+engtrn ++ ++ endif ++ ++c -------------- start of barostat iteration cycle ----------------- ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++ if(isw.eq.1)then ++ ++c restore cell parameters ++ ++ volm=vzero ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c calculate system pressure ++ ++ vircon=-(strcns(1)+strcns(5)+strcns(9)) ++ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) ++ ++c apply Berendsen barostat ++ ++ chip=1.d0+beta*tstep*(psyst-press)/taup ++ chip=1.d0 ++ scale=chip**(1.d0/3.d0) ++ volm=chip*volm ++ ++c reset cell parameters for new volume ++ ++ do i=1,9 ++ cell(i)=scale*cell(i) ++ enddo ++ ++c reset constraint virial ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) ++ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) ++ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*pt5*tstep ++ p1(ig)=c1(jg)+tq1*pt5*tstep ++ p2(ig)=c2(jg)+tq2*pt5*tstep ++ p3(ig)=c3(jg)+tq3*pt5*tstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=scale*gxo(jg)+tstep*gvxx(ig) ++ gcmy(ig)=scale*gyo(jg)+tstep*gvyy(ig) ++ gcmz(ig)=scale*gzo(jg)+tstep*gvzz(ig) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=scale*xxo(i)+tstep*vxx(i) ++ yyy(i)=scale*yyo(i)+tstep*vyy(i) ++ zzz(i)=scale*zzo(i)+tstep*vzz(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c rigid body contribution to stress tensor ++ ++ if(isw.eq.2)call bodystress ++ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c restore forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++c -------------- end of barostat iteration cycle ---------------- ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor for tethered bonds ++ ++ do i=1,9 ++ eta(i)=uni(i)*scale ++ enddo ++ ++ endif ++ ++ if(isw.eq.2)then ++ ++c calculate kinetic energy ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ if(lstfrz(i).ne.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,fxo,fyo,fzo,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ ++ return ++ end subroutine nptqvv_b2 ++ ++ subroutine nptqvv_h2 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, ++ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircom,vircon,virtot,virlrc,volm,press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c npt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith april 2005 ++c adapted d.quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr ++ integer id,ifre,icyc,mxshk,idum,ig,ntpatm ++ integer jcyc,iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) engtrn,vaa,vbb,vcc,opx,opy,opz,engfke ++ real(8) taut,taup,sigma,chit,hstep,qmass,conint,consv ++ real(8) cxx,cyy,czz,scale,virtot,press,chip,temp ++ real(8) volm,pmass,totmas,qstep,fstep,volm0,elrc ++ real(8) virlrc,elrc0,virlrc0,chit0,chip0,vzero,cons0 ++ ++ integer, parameter :: nnn=16 ++ integer, parameter :: ncyc=5 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),cell0(9),com(3),vom(3),uni(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: vx1(:),vy1(:),vz1(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: oxo(:),oyo(:),ozo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gvx1(:),gvy1(:),gvz1(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newstep,newjob,p0,p1,p2,p3,hstep,fstep,qmass,ifre1,ifre2 ++ save igrp1,igrp2,volm0,elrc0,virlrc0,qstep,dens0,totmas ++ save pmass ++ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ data newjob/.true./ ++ ++c set array allocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2220) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c nose-hoover thermostat and barostat inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(3)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(8)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(9)) ++ allocate(vx1(mxatms),vy1(mxatms),vz1(mxatms),stat=fail(10)) ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(11)) ++ allocate(oxo(mxatms),oyo(mxatms),ozo(mxatms),stat=fail(12)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp), ++ x stat=fail(13)) ++ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp), ++ x stat=fail(14)) ++ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(15)) ++ allocate(gvx1(mxgrp),gvy1(mxgrp),gvz1(mxgrp),stat=fail(16)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2230) ++ enddo ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c store key config data at start of timestep ++ ++ vzero=volm ++ chit0=chit ++ chip0=chip ++ cons0=conint ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++ if(isw.eq.1)then ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=1,natms ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=1,ngrp ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c store rigid body positions ++ ++ do ig=1,ngrp ++ ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ do i=1,natms ++ ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++c store forces ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, angular and cartesian velocities ++ ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ oxo(ig)=omx(ig) ++ oyo(ig)=omy(ig) ++ ozo(ig)=omz(ig) ++ gvxo(ig)=gvxx(ig) ++ gvyo(ig)=gvyy(ig) ++ gvzo(ig)=gvzz(ig) ++ ++ enddo ++ ++c iteration necessary if ntcons > 0 and isw=1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++c integration of barostat and thermostat (part 1) ++ ++ if(isw.eq.1)then ++ ++c restore cell parameters ++ ++ volm=vzero ++ chit=chit0 ++ chip=chip0 ++ conint=cons0 ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c restore free atom velocities ++ ++ do i=1,natms ++ ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++c restore rigid body quaternions angular and cartesian velocities ++ ++ do ig=1,ngrp ++ ++ omx(ig)=oxo(ig) ++ omy(ig)=oyo(ig) ++ omz(ig)=ozo(ig) ++ gvxx(ig)=gvxo(ig) ++ gvyy(ig)=gvyo(ig) ++ gvzz(ig)=gvzo(ig) ++ ++ enddo ++ ++c current constraint virial ++ ++ vircon=-(strcns(1)+strcns(5)+strcns(9)) ++ ++ do jcyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engke=engfke+engtrn ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/vzero)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++c reset constraint virial and stress ++ ++ vircon=0.d0 ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++c calculate quaternion momenta ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-b1(ig)*opx-b2(ig)*opy-b3(ig)*opz) ++ p1(ig)=2.0d0*( b0(ig)*opx-b3(ig)*opy+b2(ig)*opz) ++ p2(ig)=2.0d0*( b3(ig)*opx+b0(ig)*opy-b1(ig)*opz) ++ p3(ig)=2.0d0*(-b2(ig)*opx+b1(ig)*opy+b0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store intermediate velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vx1(i)=vxx(i) ++ vy1(i)=vyy(i) ++ vz1(i)=vzz(i) ++ ++ enddo ++ do ig=igrp1,igrp2 ++ ++ c0(ig)=p0(ig) ++ c1(ig)=p1(ig) ++ c2(ig)=p2(ig) ++ c3(ig)=p3(ig) ++ gvx1(ig)=gvxx(ig) ++ gvy1(ig)=gvyy(ig) ++ gvz1(ig)=gvzz(ig) ++ ++ enddo ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vx1(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vy1(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vz1(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c restore rigid body quaternions, angular momenta and velocities ++ ++ do ig=igrp1,igrp2 ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ p0(ig)=c0(ig) ++ p1(ig)=c1(ig) ++ p2(ig)=c2(ig) ++ p3(ig)=c3(ig) ++ gvxx(ig)=gvx1(ig) ++ gvyy(ig)=gvy1(ig) ++ gvzz(ig)=gvz1(ig) ++ ++ enddo ++ ++c calculate new rigid body velocities ++ ++ call rotate_omega ++ x (idnode,mxnode,ngrp,hstep,p0,p1,p2,p3,dtx,dty,dtz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c update centre of mass position by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ cxx=gxo(ig)-com(1) ++ cyy=gyo(ig)-com(2) ++ czz=gzo(ig)-com(3) ++ gcmx(ig)=gxo(ig)+tstep*(gvxx(ig)+chip*cxx) ++ gcmy(ig)=gyo(ig)+tstep*(gvyy(ig)+chip*cyy) ++ gcmz(ig)=gzo(ig)+tstep*(gvzz(ig)+chip*czz) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ cxx=xxo(i)-com(1) ++ cyy=yyo(i)-com(2) ++ czz=zzo(i)-com(3) ++ xxx(i)=xxo(i)+tstep*(vxx(i)+chip*cxx) ++ yyy(i)=yyo(i)+tstep*(vyy(i)+chip*cyy) ++ zzz(i)=zzo(i)+tstep*(vzz(i)+chip*czz) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c integration of barostat and thermostat (part 2) ++ ++ if(isw.eq.2)then ++ ++c current constraint virial ++ ++ vircon=-(strcns(1)+strcns(5)+strcns(9)) ++ ++ do jcyc=1,ncyc ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply npt barostat ++ ++ call nptqscl_p ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, ++ x chip,chit,volm,press,vircon,virtot,vircom) ++ ++c integrate and apply npt thermostat ++ ++ call nptqscl_t ++ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engke=engfke+engtrn ++ ++c scale cell vectors - isotropic ++ ++ scale=(volm/vzero)**(1.d0/3.d0) ++ do i=1,9 ++ cell(i)=cell0(i)*scale ++ enddo ++ ++ endif ++ ++c restore forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++c -------------- end of barostat iteration cycle ---------------- ++ ++ enddo ++ ++ if(isw.eq.2)then ++ ++c calculate conserved variable ++ ++ consv=conint+0.5d0*qmass*chit**2+press*volm ++ x +0.5d0*pmass*chip**2 ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c merge velocity arrays ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++c construct scaling tensor (for tethered atoms) ++ ++ do i=1,9 ++ eta(i)=chip*uni(i) ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c exchange position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(oxo,oyo,ozo,dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ ++ return ++ end subroutine nptqvv_h2 ++ ++ subroutine nstqvv_b2 ++ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, ++ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup,sigma, ++ x tolnce,tstep,vircom,vircon,elrc,virlrc,volm) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c nst ensemble - Berendsen thermostat and barostat ++c (n.b. not symplectic) ++c ++c isothermal compressibility (beta) set to that of liquid water ++c = 0.007372 dlpoly units ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith sep 2005 ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr ++ integer id,ifre,icyc,mxshk,idum,ig,ntpatm,mode ++ integer iter,mxiter,jrs ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke ++ real(8) engtrn,taut,sigma,chit ++ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz,volm0 ++ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3 ++ real(8) volm,elrc0,elrc,virlrc0,virlrc ++ real(8) beta,press,taup,engfke,hstep,vzero ++ ++ integer, parameter :: nnn=13 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),uni(9),celp(10) ++ real(8) cell0(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ ++ save newstep,newjob,volm0,elrc0,virlrc0,dens0 ++ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,hstep ++ ++ data newjob/.true./,beta/7.3728d-3/ ++ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ ++ ++c set array alocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c timestep parameters ++ ++ hstep=pt5*tstep ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2260) ++ ++c store initial values of volume and long range corrections ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ ++ newjob=.false. ++ ++ endif ++ ++c allocate working arrays ++ ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(3)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ endif ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(8)) ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(9)) ++ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) ++ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(11)) ++ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), ++ x stat=fail(12)) ++ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), ++ x stat=fail(13)) ++ ++c check array allocation error flags ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2270) ++ enddo ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c calculate quaternion momenta at start of time step ++ ++ if(isw.eq.1)then ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) ++ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) ++ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) ++ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store key config data at start of time step ++ ++ if(isw.eq.1)then ++ ++c cell parameters ++ ++ vzero=volm ++ do i=1,9 ++ cell0(i)=cell(i) ++ enddo ++ ++c atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c rigid body positions ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ gxo(j)=gcmx(i) ++ gyo(j)=gcmy(i) ++ gzo(j)=gcmz(i) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxo(j)=vxx(i) ++ vyo(j)=vyy(i) ++ vzo(j)=vzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, momenta and cartesian velocities ++ ++ j=0 ++ do i=igrp1,igrp2 ++ ++ j=j+1 ++ b0(j)=q0(i) ++ b1(j)=q1(i) ++ b2(j)=q2(i) ++ b3(j)=q3(i) ++ c0(j)=p0(i) ++ c1(j)=p1(i) ++ c2(j)=p2(i) ++ c3(j)=p3(i) ++ gvxo(j)=gvxx(i) ++ gvyo(j)=gvyy(i) ++ gvzo(j)=gvzz(i) ++ ++ enddo ++ ++c store forces ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++c extract previous constraint terms from stress tensor ++ ++ if(isw.eq.1)then ++ ++ do i=1,9 ++ stress(i)=stress(i)-strcns(i) ++ enddo ++ ++ endif ++ ++c -------------- start of barostat iteration cycle ----------------- ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++ do i=1,9 ++ eta(i)=uni(i) ++ enddo ++ ++ if(isw.eq.1)then ++ ++c restore cell parameters ++ ++ volm=vzero ++ do i=1,9 ++ cell(i)=cell0(i) ++ enddo ++ ++c calculate Berendsen barostat ++ ++ do i=1,9 ++ eta(i)=tstep*beta*((stress(i)+strcns(i))/volm- ++ x press*uni(i))/taup+uni(i) ++ enddo ++ if(mode.gt.0)then ++ eta(3)=0.d0 ++ eta(6)=0.d0 ++ eta(7)=0.d0 ++ eta(8)=0.d0 ++ if(mode.lt.3)then ++ eta(2)=0.d0 ++ eta(4)=0.d0 ++ if(mode.eq.2)then ++ eta(1)=0.5d0*(eta(1)+eta(5)) ++ eta(5)=eta(1) ++ endif ++ endif ++ endif ++ ++c reset cell parameters for new volume ++ ++ call mat_mul(eta,cell,cell) ++ ++c calculate new volume ++ ++ call dcell(cell,celp) ++ volm=celp(10) ++ ++c reset constraint virial ++ ++ vircon=0.d0 ++ ++ do i=1,9 ++ strcns(i)=0.d0 ++ enddo ++ ++ endif ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ j=0 ++ do ifre=ifre1,ifre2 ++ ++ j=j+1 ++ i=lstfre(ifre) ++ vxx(i)=vxo(j)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vyo(j)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vzo(j)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c operations common to first and second stages ++ ++ jg=0 ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c fmx,fmy,fmz represent force on c.o.m. ++ ++ jrs=jr ++ fmx=0.d0 ++ fmy=0.d0 ++ fmz=0.d0 ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ fmx=fmx+fxx(i) ++ fmy=fmy+fyy(i) ++ fmz=fmz+fzz(i) ++ ++ enddo ++ ++c current rotational matrix ++ ++ jg=jg+1 ++ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) ++ ++c calculate torque in principal frame ++ ++ jr=jrs ++ ftx=0.d0 ++ fty=0.d0 ++ ftz=0.d0 ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) ++ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) ++ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) ++ ++ enddo ++ ++ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) ++ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) ++ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) ++ ++c calculate quaternion torques ++ ++ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) ++ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) ++ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) ++ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) ++ ++c update quaternion momentum by half timestep ++ ++ p0(ig)=c0(jg)+tq0*hstep ++ p1(ig)=c1(jg)+tq1*hstep ++ p2(ig)=c2(jg)+tq2*hstep ++ p3(ig)=c3(jg)+tq3*hstep ++ ++c update centre of mass velocity by half timestep ++ ++ gvxx(ig)=gvxo(jg)+fmx*hstep/gmass(id) ++ gvyy(ig)=gvyo(jg)+fmy*hstep/gmass(id) ++ gvzz(ig)=gvzo(jg)+fmz*hstep/gmass(id) ++ ++ enddo ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++ jg=0 ++ do ig=igrp1,igrp2 ++ ++ jg=jg+1 ++ ++c update centre of mass position by full time step ++ ++ gcmx(ig)=tstep*gvxx(ig)+ ++ x eta(1)*gxo(jg)+eta(4)*gyo(jg)+eta(7)*gzo(jg) ++ gcmy(ig)=tstep*gvyy(ig)+ ++ x eta(2)*gxo(jg)+eta(5)*gyo(jg)+eta(8)*gzo(jg) ++ gcmz(ig)=tstep*gvzz(ig)+ ++ x eta(3)*gxo(jg)+eta(6)*gyo(jg)+eta(9)*gzo(jg) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ q0(ig)=b0(jg) ++ q1(ig)=b1(jg) ++ q2(ig)=b2(jg) ++ q3(ig)=b3(jg) ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ xxx(i)=tstep*vxx(i)+ ++ x eta(1)*xxo(i)+eta(4)*yyo(i)+eta(7)*zzo(i) ++ yyy(i)=tstep*vyy(i)+ ++ x eta(2)*xxo(i)+eta(5)*yyo(i)+eta(8)*zzo(i) ++ zzz(i)=tstep*vzz(i)+ ++ x eta(3)*xxo(i)+eta(6)*yyo(i)+eta(9)*zzo(i) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c rigid body contribution to stress tensor ++ ++ if(isw.eq.2)call bodystress ++ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c restore forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++c -------------- end of barostat iteration cycle ---------------- ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++ endif ++ ++c calculate kinetic energy ++ ++ if(isw.eq.2)then ++ ++ engfke=getkinf(ntfree,idnode,mxnode) ++ call getking(ngrp,idnode,mxnode,engtrn,engrot) ++ engtke=engfke+engtrn+engrot ++ engke=engfke+engtrn ++ ++c apply Berendsen thermostat - taut is the relaxation time ++ ++ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) ++ ++ engke=engke*chit**2 ++ engtrn=engtrn*chit**2 ++ engrot=engrot*chit**2 ++ ++c thermostat velocities of free particles ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ if(lstfrz(i).ne.0)then ++ ++ vxx(i)=chit*vxx(i) ++ vyy(i)=chit*vyy(i) ++ vzz(i)=chit*vzz(i) ++ ++ endif ++ ++ enddo ++ ++c thermostat rigid body velocities ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ omx(ig)=chit*omx(ig) ++ omy(ig)=chit*omy(ig) ++ omz(ig)=chit*omz(ig) ++ gvxx(ig)=chit*gvxx(ig) ++ gvyy(ig)=chit*gvyy(ig) ++ gvzz(ig)=chit*gvzz(ig) ++ ++ enddo ++ ++c kinetic contribution to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) ++ enddo ++ ++ endif ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,fxo,fyo,fzo,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ ++ return ++ end subroutine nstqvv_b2 ++ ++ subroutine nstqvv_h2 ++ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, ++ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, ++ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, ++ x vircom,vircon,virlrc,volm,press,chit_shl,sigma_shl) ++ ++c*********************************************************************** ++c ++c dlpoly subroutine to integrate rigid body equations of motion ++c using the symplectic no_squish quaternion algorithm of ++c miller et al j.chem.phys 116 (2002) 8649 ++c plus bond constraints - including rigid body sites linked ++c by constraint sites (qrattle algorithm) ++c ++c nst ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 ++c ++c parallel replicated data version : block data ++c ++c omx,omy,omz=angular velocity in body fixed frame (principal axes) ++c rotinx,y,z =rotational inertia in body fixed frame ++c ++c copyright daresbury laboratory ++c author w.smith sept 2005 ++c adapted d. quigley : metadynamics ++c ++c********************************************************************** ++ ++ implicit none ++ ++ logical newstep,safe,lshmov,newjob ++ ++ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons ++ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr ++ integer id,ifre,icyc,mxshk,idum,ig,ntpatm,mode ++ integer jcyc,iter,mxiter ++ ++ real(8) engke,engrot,tolnce,tstep,vircom,vircon ++ real(8) engtrn,engfke ++ real(8) vaa,vbb,vcc,opx,opy,opz ++ real(8) taut,taup,sigma,chit,hstep,qmass,conint,consv ++ real(8) cxx,cyy,czz,press,chip2,temp ++ real(8) volm,pmass,totmas,qstep,fstep,volm0,elrc ++ real(8) virlrc,elrc0,virlrc0,chit0,vzero,cons0 ++ ++ integer, parameter :: nnn=16 ++ integer, parameter :: ncyc=5 ++ real(8), parameter :: pt5=0.5d0 ++ ++ integer fail(nnn) ++ real(8) rot(9),strkin(9),strgrp(9),com(3),vom(3) ++ real(8) cell0(9),eta0(9),stres0(9) ++ ++ real(8), allocatable :: dens0(:) ++ real(8), allocatable :: xxo(:),yyo(:),zzo(:) ++ real(8), allocatable :: vxo(:),vyo(:),vzo(:) ++ real(8), allocatable :: vx1(:),vy1(:),vz1(:) ++ real(8), allocatable :: fxo(:),fyo(:),fzo(:) ++ real(8), allocatable :: gxo(:),gyo(:),gzo(:) ++ real(8), allocatable :: oxo(:),oyo(:),ozo(:) ++ real(8), allocatable :: dxx(:),dyy(:),dzz(:) ++ real(8), allocatable :: txx(:),tyy(:),tzz(:) ++ real(8), allocatable :: xxt(:),yyt(:),zzt(:) ++ real(8), allocatable :: dxt(:),dyt(:),dzt(:) ++ real(8), allocatable :: dtx(:),dty(:),dtz(:) ++ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) ++ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) ++ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) ++ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) ++ real(8), allocatable :: gvx1(:),gvy1(:),gvz1(:) ++ ++c metadynamics shell thermostat variables ++ ++ integer ntshl,keyshl ++ real(8) sigma_shl ++ ++ logical,save :: lfirst=.true. ++ real(8) :: chit_shl ++ real(8),save :: qmass_shl ++ real(8) :: shlke ++ ++c end metadynamics shell thermostat variables ++ ++ save newstep,newjob,p0,p1,p2,p3,hstep,fstep,qmass,ifre1,ifre2 ++ save igrp1,igrp2,volm0,elrc0,virlrc0,qstep,dens0,totmas ++ save pmass ++ ++ data newjob/.true./ ++ ++c set array allocation error flags ++ ++ do i=1,nnn ++ fail(i)=0 ++ enddo ++ ++c assign initial parameters ++ ++ if(newjob)then ++ ++c store intitial parameters ++ ++ volm0=volm ++ elrc0=elrc ++ virlrc0=virlrc ++ hstep=0.5d0*tstep ++ fstep=0.5d0*tstep/dble(ncyc) ++ qstep=0.25d0*tstep/dble(ncyc) ++ ++c allocate density storage array ++ ++ fail(1)=0 ++ allocate(dens0(mxatyp),stat=fail(1)) ++ if(fail(1).gt.0)call error(idnode,2220) ++ ++ do i=1,ntpatm ++ dens0(i)=dens(i) ++ enddo ++ ++c total system mass ++ ++ totmas=getmass(natms,idnode,mxnode) ++ ++c nose-hoover thermostat and barostat inertia parameter ++ ++ qmass=2.d0*sigma*taut**2 ++ pmass=2.d0*sigma*taup**2 ++ ++c free atom block indices ++ ++ ifre1=(idnode*ntfree)/mxnode+1 ++ ifre2=((idnode+1)*ntfree)/mxnode ++ ++c group block indices ++ ++ igrp1=(idnode*ngrp)/mxnode+1 ++ igrp2=((idnode+1)*ngrp)/mxnode ++ ++c check work arrays are large enough ++ ++ safe=(igrp2-igrp1+1.le.msgrp) ++ if(mxnode.gt.1) call gstate(safe) ++ if(.not.safe)then ++ igrp=igrp2-igrp1+1 ++ call gimax(igrp,1,idum) ++ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp ++ call error(idnode,506) ++ endif ++ ++ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) ++ newjob=.false. ++ ++ endif ++ ++ if(ntcons.gt.0)safe=.false. ++ ++c allocate working arrays ++ ++ if(isw.eq.1)then ++ ++ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) ++ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(3)) ++ ++ endif ++ if(ntcons.gt.0)then ++ ++ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) ++ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) ++ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) ++ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) ++ ++ endif ++ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(8)) ++ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(9)) ++ allocate(vx1(mxatms),vy1(mxatms),vz1(mxatms),stat=fail(10)) ++ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(11)) ++ allocate(oxo(mxatms),oyo(mxatms),ozo(mxatms),stat=fail(12)) ++ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp), ++ x stat=fail(13)) ++ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp), ++ x stat=fail(14)) ++ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(15)) ++ allocate(gvx1(mxgrp),gvy1(mxgrp),gvz1(mxgrp),stat=fail(16)) ++ ++ do i=1,nnn ++ if(fail(i).gt.0)call error(idnode,2230) ++ enddo ++ ++ if(lmetadyn.and.lfirst.and.(ntshl>0))then ++ if(idnode.eq.0)then ++ write(*,*)"Warning - Metadynamics Modification" ++ write(*,*)"=========================" ++ write(*,*)"Coupling core-shell motion thermostat at 1 K" ++ endif ++ lfirst=.false. ++c use same relaxation time for global and core-shell? ++ qmass_shl=2.d0*sigma_shl*taut**2 ++ endif ++ ++c construct current bond vectors ++ ++ if(ntcons.gt.0)then ++ ++ do k=1,nscons ++ ++ i=listcon(k,2) ++ j=listcon(k,3) ++ dxx(k)=xxx(i)-xxx(j) ++ dyy(k)=yyy(i)-yyy(j) ++ dzz(k)=zzz(i)-zzz(j) ++ ++ enddo ++ ++ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) ++ ++ endif ++ ++c atom displacement from rigid body centre of mass ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++ dtx(jr)=xxx(i)-gcmx(ig) ++ dty(jr)=yyy(i)-gcmy(ig) ++ dtz(jr)=zzz(i)-gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c periodic boundary condition for displacement vectors ++ ++ call images(imcon,0,1,jr,cell,dtx,dty,dtz) ++ ++c store key config data at start of timestep ++ ++ vzero=volm ++ chit0=chit ++ cons0=conint ++ do i=1,9 ++ ++ cell0(i)=cell(i) ++ eta0(i)=eta(i) ++ stres0(i)=stress(i) ++ ++ enddo ++ ++ if(isw.eq.1)then ++ ++c remove system centre of mass velocity ++ ++ call getvom(natms,idnode,mxnode,totmas,vom) ++ ++ do i=1,natms ++ ++ vxx(i)=vxx(i)-vom(1) ++ vyy(i)=vyy(i)-vom(2) ++ vzz(i)=vzz(i)-vom(3) ++ ++ enddo ++ ++ do ig=1,ngrp ++ ++ gvxx(ig)=gvxx(ig)-vom(1) ++ gvyy(ig)=gvyy(ig)-vom(2) ++ gvzz(ig)=gvzz(ig)-vom(3) ++ ++ enddo ++ ++c store atom positions ++ ++ do i=1,natms ++ ++ xxo(i)=xxx(i) ++ yyo(i)=yyy(i) ++ zzo(i)=zzz(i) ++ ++ enddo ++ ++c store rigid body positions ++ ++ do ig=1,ngrp ++ ++ gxo(ig)=gcmx(ig) ++ gyo(ig)=gcmy(ig) ++ gzo(ig)=gcmz(ig) ++ ++ enddo ++ ++ endif ++ ++c store free atom velocities ++ ++ do i=1,natms ++ ++ vxo(i)=vxx(i) ++ vyo(i)=vyy(i) ++ vzo(i)=vzz(i) ++ ++ enddo ++ ++c store forces ++ ++ do i=1,natms ++ ++ fxo(i)=fxx(i) ++ fyo(i)=fyy(i) ++ fzo(i)=fzz(i) ++ ++ enddo ++ ++c store rigid body quaternions, angular and cartesian velocities ++ ++ do ig=1,ngrp ++ ++ b0(ig)=q0(ig) ++ b1(ig)=q1(ig) ++ b2(ig)=q2(ig) ++ b3(ig)=q3(ig) ++ oxo(ig)=omx(ig) ++ oyo(ig)=omy(ig) ++ ozo(ig)=omz(ig) ++ gvxo(ig)=gvxx(ig) ++ gvyo(ig)=gvyy(ig) ++ gvzo(ig)=gvzz(ig) ++ ++ enddo ++ ++c iteration necessary if ntcons > 0 and isw=1 ++ ++ mxiter=1 ++ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 ++ do iter=1,mxiter ++ ++c integration of barostat and thermostat (part 1) ++ ++ if(isw.eq.1)then ++ ++c restore cell parameters ++ ++ volm=vzero ++ chit=chit0 ++ conint=cons0 ++ do i=1,9 ++ ++ cell(i)=cell0(i) ++ eta(i)=eta0(i) ++ ++ enddo ++ ++c restore free atom velocities ++ ++ do i=1,natms ++ ++ vxx(i)=vxo(i) ++ vyy(i)=vyo(i) ++ vzz(i)=vzo(i) ++ ++ enddo ++ ++c restore rigid body quaternions angular and cartesian velocities ++ ++ do ig=1,ngrp ++ ++ omx(ig)=oxo(ig) ++ omy(ig)=oyo(ig) ++ omz(ig)=ozo(ig) ++ gvxx(ig)=gvxo(ig) ++ gvyy(ig)=gvyo(ig) ++ gvzz(ig)=gvzo(ig) ++ ++ enddo ++ ++c kinetic contributions to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++ do jcyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstqscl_p2 ++ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit,press, ++ x volm,strkin,strgrp) ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engke=engfke+engtrn ++ ++c reset constraint virial and stress ++ ++ vircon=0.d0 ++ do i=1,9 ++ ++ stress(i)=stress(i)-strcns(i)-strbod(i) ++ strcns(i)=0.d0 ++ ++ enddo ++ ++c calculate quaternion momenta ++ ++ do ig=igrp1,igrp2 ++ ++ id=lstgtp(ig) ++ opx=omx(ig)*rotinx(id,1) ++ opy=omy(ig)*rotiny(id,1) ++ opz=omz(ig)*rotinz(id,1) ++ p0(ig)=2.0d0*(-b1(ig)*opx-b2(ig)*opy-b3(ig)*opz) ++ p1(ig)=2.0d0*( b0(ig)*opx-b3(ig)*opy+b2(ig)*opz) ++ p2(ig)=2.0d0*( b3(ig)*opx+b0(ig)*opy-b1(ig)*opz) ++ p3(ig)=2.0d0*(-b2(ig)*opx+b1(ig)*opy+b0(ig)*opz) ++ ++ enddo ++ ++ endif ++ ++c store intermediate velocities ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vx1(i)=vxx(i) ++ vy1(i)=vyy(i) ++ vz1(i)=vzz(i) ++ ++ enddo ++ do ig=igrp1,igrp2 ++ ++ c0(ig)=p0(ig) ++ c1(ig)=p1(ig) ++ c2(ig)=p2(ig) ++ c3(ig)=p3(ig) ++ gvx1(ig)=gvxx(ig) ++ gvy1(ig)=gvyy(ig) ++ gvz1(ig)=gvzz(ig) ++ ++ enddo ++ ++c -------------- start of shake iteration cycle ------------------- ++ ++ icyc=0 ++ mxshk=1 ++ safe=.false. ++ newstep=.true. ++ if(ntcons.gt.0)mxshk=mxshak ++ ++ do while(.not.safe.and.icyc.lt.mxshk) ++ ++ icyc=icyc+1 ++ ++c update velocities of free atoms 1/2 timestep ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ vxx(i)=vx1(i)+hstep*rmass(i)*fxx(i) ++ vyy(i)=vy1(i)+hstep*rmass(i)*fyy(i) ++ vzz(i)=vz1(i)+hstep*rmass(i)*fzz(i) ++ ++ enddo ++ ++c ************* rigid body motion **************************** ++ ++c restore rigid body quaternions, angular momenta and velocities ++ ++ do ig=igrp1,igrp2 ++ ++ q0(ig)=b0(ig) ++ q1(ig)=b1(ig) ++ q2(ig)=b2(ig) ++ q3(ig)=b3(ig) ++ p0(ig)=c0(ig) ++ p1(ig)=c1(ig) ++ p2(ig)=c2(ig) ++ p3(ig)=c3(ig) ++ gvxx(ig)=gvx1(ig) ++ gvyy(ig)=gvy1(ig) ++ gvzz(ig)=gvz1(ig) ++ ++ enddo ++ ++c calculate new rigid body velocities ++ ++ call rotate_omega ++ x (idnode,mxnode,ngrp,hstep,p0,p1,p2,p3,dtx,dty,dtz) ++ ++c first stage of velocity verlet algorithm ++ ++ if(isw.eq.1)then ++ ++c calculate system centre of mass ++ ++ call getcom(natms,idnode,mxnode,totmas,com) ++ ++c update centre of mass position by full time step ++ ++ do ig=igrp1,igrp2 ++ ++ cxx=gxo(ig)-com(1) ++ cyy=gyo(ig)-com(2) ++ czz=gzo(ig)-com(3) ++ gcmx(ig)=gxo(ig)+ ++ x tstep*(gvxx(ig)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ gcmy(ig)=gyo(ig)+ ++ x tstep*(gvyy(ig)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ gcmz(ig)=gzo(ig)+ ++ x tstep*(gvzz(ig)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++c calculate rotation of rigid groups: nosquish algorithm ++ ++ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) ++ ++ enddo ++ ++c merge group coms from all nodes ++ ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++c new atomic positions for atoms in rigid bodies - relative to com ++ ++ k=0 ++ do ig=igrp1,igrp2 ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++ id=lstgtp(ig) ++ do j=1,numgsit(id) ++ ++ k=k+1 ++ i=lstme(k) ++ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ ++ x rot(3)*gzz(id,j)+gcmx(ig) ++ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ ++ x rot(6)*gzz(id,j)+gcmy(ig) ++ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ ++ x rot(9)*gzz(id,j)+gcmz(ig) ++ ++ enddo ++ ++ enddo ++ ++c update positions of free particles to full time step ++ ++ do ifre=ifre1,ifre2 ++ ++ i=lstfre(ifre) ++ cxx=xxo(i)-com(1) ++ cyy=yyo(i)-com(2) ++ czz=zzo(i)-com(3) ++ xxx(i)=xxo(i)+ ++ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) ++ yyy(i)=yyo(i)+ ++ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) ++ zzz(i)=zzo(i)+ ++ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) ++ ++ enddo ++ ++c merge atom positions ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ ++c apply rattle corrections to bond constraints ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ call qrattle_r ++ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, ++ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, ++ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) ++ ++ endif ++ ++c end of first stage ++ ++ endif ++ ++c second stage of velocity verlet algorithm ++ ++ if(isw.eq.2)then ++ ++ jr=0 ++ do ig=igrp1,igrp2 ++ ++c new angular momenta and velocities ++ ++ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ ++ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) ++ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ ++ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) ++ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- ++ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) ++ ++ id=lstgtp(ig) ++ ++ omx(ig)=opx*rotinx(id,2) ++ omy(ig)=opy*rotiny(id,2) ++ omz(ig)=opz*rotinz(id,2) ++ ++c new rotational matrix ++ ++ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) ++ ++c new atomic velocites ++ ++ do j=1,numgsit(id) ++ ++ jr=jr+1 ++ i=lstrgd(jr) ++ ++c new atomic velocites in body frame ++ ++ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) ++ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) ++ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) ++ ++c new atomic velocites in lab frame ++ ++ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) ++ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) ++ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) ++ ++ enddo ++ ++ enddo ++ ++c merge velocities and forces from all nodes ++ ++ if(ntcons.gt.0)then ++ ++ if(mxnode.gt.1)then ++ ++ call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ call merge1 ++ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) ++ ++ endif ++ ++c correct constraint bond velocities using rattle ++ ++ call qrattle_v ++ x (newstep,safe,lshmov,idnode,mxnode,natms, ++ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, ++ x xxt,yyt,zzt) ++ ++ endif ++ ++c end of second stage ++ ++ endif ++ ++ newstep=.false. ++ ++ enddo ++ ++c check shake convergence ++ ++ if(.not.safe)call error(idnode,105) ++ ++c sum constraint virial and stress across processors ++ ++ if(mxnode.gt.1.and.isw.eq.1)then ++ ++ buffer(1)=vircon ++ call gdsum(buffer(1),1,buffer(2)) ++ vircon=buffer(1) ++ call gdsum(strcns,9,buffer) ++ ++ endif ++ ++c -------------- end of shake iteration cycle ------------------- ++ ++c calculate rigid body contribution to stress tensor ++ ++ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) ++ ++c add new constraint terms to stress tensor ++ ++ if(isw.eq.1)then ++ ++ do i=1,9 ++ stress(i)=stress(i)+strcns(i)+strbod(i) ++ enddo ++ ++ endif ++ ++c integration of barostat and thermostat (part 2) ++ ++ if(isw.eq.2)then ++ ++c kinetic contributions to stress tensor ++ ++ call kinstressf(ntfree,idnode,mxnode,strkin) ++ call kinstressg(ngrp,idnode,mxnode,strgrp) ++ ++c add kinetic and body contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) ++ enddo ++ ++ do jcyc=1,ncyc ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++c integrate and apply nst barostat ++ ++ call nstqscl_p2 ++ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit,press, ++ x volm,strkin,strgrp) ++ ++c integrate and apply nst thermostat ++ ++ call nstqscl_t2 ++ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, ++ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) ++ ++c metadynamics shell thermostat ++c ==================================================== ++c Must first merge update velocities as the core-shell ++c velocites are not distributed according to the same ++c rules. ++c ==================================================== ++ if(lmetadyn.and.keyshl.eq.1)then ++ if(mxnode.gt.1)call merge ++ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) ++ call nvtscale_shl ++ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, ++ x taut,chit_shl,conint) ++ endif ++ ++ enddo ++ ++c translational kinetic energy ++ ++ engke=engfke+engtrn ++ ++c sum up all contributions to stress tensor ++ ++ do i=1,9 ++ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) ++ enddo ++ ++ endif ++ ++c restore forces ++ ++ do i=1,natms ++ ++ fxx(i)=fxo(i) ++ fyy(i)=fyo(i) ++ fzz(i)=fzo(i) ++ ++ enddo ++ ++c -------------- end of barostat iteration cycle ---------------- ++ ++ enddo ++ ++ if(isw.eq.2)then ++ ++c calculate conserved variable ++ ++ chip2=sdot0(9,eta,eta) ++ if(mode.eq.2)chip2=chip2-eta(1)**2 ++ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm ++ ++c metadynamics shell thermostat ++ ++ if(lmetadyn.and.keyshl.eq.1)then ++ consv=consv+0.5d0*qmass_shl*chit_shl**2 ++ endif ++ ++c merge velocity arrays ++ ++ if(mxnode.gt.1)call merge1 ++ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c adjust long range corrections and number density ++ ++ elrc=elrc0*(volm0/volm) ++ virlrc=virlrc0*(volm0/volm) ++ do k=1,ntpatm ++ dens(k)=dens0(k)*(volm0/volm) ++ enddo ++ ++ if(mxnode.gt.1)then ++ ++c merge new group coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) ++ ++c merge new atomic coordinates and velocities ++ ++ if(isw.eq.1) ++ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) ++ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) ++ ++ endif ++ ++c periodic boundary condition ++ ++ if(isw.eq.2)then ++ ++ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) ++ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) ++ ++c merge position data ++ ++ if(mxnode.gt.1)then ++ ++ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) ++ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) ++ ++ endif ++ ++ endif ++ ++c deallocate working arrays ++ ++ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) ++ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) ++ deallocate(dtx,dty,dtz,stat=fail(3)) ++ if(isw.eq.1)then ++ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) ++ endif ++ if(ntcons.gt.0)then ++ ++ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) ++ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) ++ ++ endif ++ if(isw.eq.2)then ++ deallocate(fxo,fyo,fzo,stat=fail(7)) ++ endif ++ ++ return ++ end subroutine nstqvv_h2 ++ ++ end module vv_rotation2_module diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-foss-2015b.eb b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-foss-2015b.eb new file mode 100644 index 0000000000..ab0d6b9ba8 --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-foss-2015b.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'GMP' +version = '6.0.0a' + +homepage = 'http://gmplib.org/' +description = """GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + +toolchain = {'name': 'foss', 'version': '2015b'} +toolchainopts = {'pic': True, 'precise': True} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = [GNU_SOURCE] + +# enable C++ interface +configopts = '--enable-cxx' + +runtest = 'check' + +sanity_check_paths = { + 'files': ['lib/libgmp.%s' % SHLIB_EXT, 'include/gmp.h'], + 'dirs': [], +} + +moduleclass = 'math' + diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb new file mode 100644 index 0000000000..ed67148304 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb @@ -0,0 +1,18 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions and least-squares fitting.""" + +toolchain = {'name': 'foss', 'version': '2015b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/guile/guile-1.8.8-foss-2015b.eb b/easybuild/easyconfigs/g/guile/guile-1.8.8-foss-2015b.eb new file mode 100644 index 0000000000..ad804aa4b1 --- /dev/null +++ b/easybuild/easyconfigs/g/guile/guile-1.8.8-foss-2015b.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'guile' +version = '1.8.8' + +homepage = 'http://www.gnu.org/software/guile' +description = """Guile is the GNU Ubiquitous Intelligent Language for Extensions, + the official extension language for the GNU operating system.""" + +toolchain = {'name': 'foss', 'version': '2015b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [ + ('libtool', '2.4.6', '', ('GNU', '4.9.3-2.25')), + ('GMP', '6.0.0a'), + ('libunistring', '0.9.3'), + ('pkg-config', '0.27.1'), + ('libffi', '3.0.13'), + ('libreadline', '6.3'), +] + +configopts = " --enable-error-on-warning=no" + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["guile", 'guile-config', 'guile-snarf', 'guile-tools']] + ["lib/libguile.a", "include/libguile.h"], + 'dirs': [] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb b/easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb new file mode 100644 index 0000000000..dac06d1c8d --- /dev/null +++ b/easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'libffi' +version = '3.0.13' + +homepage = 'http://sourceware.org/libffi/' +description = """The libffi library provides a portable, high level programming interface to various calling +conventions. This allows a programmer to call any function specified by a call interface description at run-time.""" + +toolchain = {'name': 'foss', 'version': '2015b'} + +source_urls = [ + 'ftp://sourceware.org/pub/libffi/', + 'http://www.mirrorservice.org/sites/sourceware.org/pub/libffi/', +] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['libffi-%(version)s_include-xmmintrin.patch'] + +sanity_check_paths = { + 'files': [('lib/libffi.%s' % SHLIB_EXT, 'lib64/libffi.%s' % SHLIB_EXT), ('lib/libffi.a', 'lib64/libffi.a')], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.11-foss-2015b.eb b/easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.11-foss-2015b.eb new file mode 100644 index 0000000000..2fd935d0b5 --- /dev/null +++ b/easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.11-foss-2015b.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'libmatheval' +version = '1.1.11' + +homepage = 'http://www.gnu.org/software/libmatheval/' +description = """GNU libmatheval is a library (callable from C and Fortran) to parse + and evaluate symbolic expressions input as text.""" + +toolchain = {'name': 'foss', 'version': '2015b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [ + ('flex', '2.5.39'), + ('Bison', '3.0.4'), + ('byacc', '20150711'), + ('guile', '1.8.8'), +] + +configopts = '--with-pic ' + +# fix for guile-config being broken because shebang line contains full path to bin/guile +configopts += 'GUILE_CONFIG="$EBROOTGUILE/bin/guile -e main -s $EBROOTGUILE/bin/guile-config"' + +sanity_check_paths = { + 'files': ['lib/libmatheval.a', 'include/matheval.h'], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb b/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb new file mode 100644 index 0000000000..91f9c37650 --- /dev/null +++ b/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'libunistring' +version = '0.9.3' + +homepage = 'http://www.gnu.org/software/libunistring/' +description = """This library provides functions for manipulating Unicode strings and for manipulating C strings + according to the Unicode standard.""" + +toolchain = {'name': 'foss', 'version': '2015b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +patches = ['libunistring_icc_builtin_nan-inf.patch'] + +parallel = 1 + +sanity_check_paths = { + 'files' : ['lib/libunistring.a', 'lib/libunistring.so'] + + ['include/uni%s.h' % x for x in ['case', 'conv', 'ctype', 'lbrk', 'name', 'norm', + 'stdio', 'str', 'types', 'wbrk', 'width']], + 'dirs' : ['include/unistring'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb new file mode 100644 index 0000000000..b66775c7a6 --- /dev/null +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'M4' +version = '1.4.17' + +homepage = 'http://www.gnu.org/software/m4/m4.html' +description = """GNU M4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 compatible + although it has some extensions (for example, handling more than 9 positional parameters to macros). + GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc.""" + +toolchain = {'name': 'foss', 'version': '2015b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = "--enable-cxx" + +sanity_check_paths = { + 'files': ["bin/m4"], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/p/PLUMED/PLUMED-2.1.4-foss-2015b.eb b/easybuild/easyconfigs/p/PLUMED/PLUMED-2.1.4-foss-2015b.eb new file mode 100644 index 0000000000..fc4323d74a --- /dev/null +++ b/easybuild/easyconfigs/p/PLUMED/PLUMED-2.1.4-foss-2015b.eb @@ -0,0 +1,42 @@ +# by Ward Poelmans + +easyblock = 'ConfigureMake' + +name = 'PLUMED' +version = '2.1.4' + +homepage = 'http://www.plumed-code.org' +description = """PLUMED is an open source library for free energy calculations in molecular systems which + works together with some of the most popular molecular dynamics engines. Free energy calculations can be + performed as a function of many order parameters with a particular focus on biological problems, using + state of the art methods such as metadynamics, umbrella sampling and Jarzynski-equation based steered MD. + The software, written in C++, can be easily interfaced with both fortran and C/C++ codes. +""" + +toolchain = {'name': 'foss', 'version': '2015b'} +toolchainopts = {'usempi': 'True'} + +source_urls = ['https://github.com/plumed/plumed2/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), + ('GSL', '1.16'), + ('libmatheval', '1.1.11'), +] + +preconfigopts = 'FC=$MPIF90 LIBS="$LIBLAPACK $LIBS" ' +configopts = ' --exec-prefix=%(installdir)s --enable-gsl' +prebuildopts = 'source sourceme.sh && ' + +sanity_check_paths = { + 'files': ['bin/plumed', 'lib/libplumedKernel.so', 'lib/libplumed.so'], + 'dirs': ['lib/plumed'] +} + +modextrapaths = { + 'PLUMED_KERNEL': 'lib/libplumedKernel.so', + 'PLUMED_ROOT': 'lib/plumed', +} + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-foss-2015b.eb b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-foss-2015b.eb new file mode 100644 index 0000000000..73c06e7f1b --- /dev/null +++ b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-foss-2015b.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'pkg-config' +version = '0.27.1' + +homepage = 'http://www.freedesktop.org/wiki/Software/pkg-config/' +description = """pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the + correct compiler options on the command line so an application can use + gcc -o test test.c `pkg-config --libs --cflags glib-2.0` + for instance, rather than hard-coding values on where to find glib (or other libraries).""" + +# don't use PAX, it might break. +tar_config_opts = True + +toolchain = {'name': 'foss', 'version': '2015b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://pkgconfig.freedesktop.org/releases/'] + +configopts = " --with-internal-glib" + +sanity_check_paths = { + 'files': ['bin/pkg-config'], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From bf480ff21168394c545130e497ad7d433053a889 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 17 Nov 2015 10:16:01 +0100 Subject: [PATCH 044/741] Move DL_POLY 1.9 with PLUMED 2.2 from intel to foss The PLUMED module does not get along with intel mpi. Only foss seems to work. --- ...-2.2.0.eb => DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/d/DL_POLY_Classic/{DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb => DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb} (95%) diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb similarity index 95% rename from easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb rename to easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb index caf84040c2..e386c9a274 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2015b-PLUMED-2.2.0.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb @@ -7,7 +7,7 @@ homepage = 'http://ccpforge.cse.rl.ac.uk/gf/project/dl_poly_classic/' description = """DL_POLY Classic is a freely available molecular dynamics program developed from the DL_POLY_2 package. This version does not install the java gui.""" -toolchain = {'name': 'intel', 'version': '2015b'} +toolchain = {'name': 'foss', 'version': '2015b'} sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] -- GitLab From 5069c91268b9cfc3785279bed3a78e9ac445d217 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 17 Nov 2015 10:53:43 +0100 Subject: [PATCH 045/741] Add PLUMED 2.2 and 2.1 for intel & foss --- .../p/PLUMED/PLUMED-2.1.4-intel-2015b.eb | 42 +++++++++++++++++++ .../p/PLUMED/PLUMED-2.2.0-foss-2015b.eb | 42 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 easybuild/easyconfigs/p/PLUMED/PLUMED-2.1.4-intel-2015b.eb create mode 100644 easybuild/easyconfigs/p/PLUMED/PLUMED-2.2.0-foss-2015b.eb diff --git a/easybuild/easyconfigs/p/PLUMED/PLUMED-2.1.4-intel-2015b.eb b/easybuild/easyconfigs/p/PLUMED/PLUMED-2.1.4-intel-2015b.eb new file mode 100644 index 0000000000..ec5fd48964 --- /dev/null +++ b/easybuild/easyconfigs/p/PLUMED/PLUMED-2.1.4-intel-2015b.eb @@ -0,0 +1,42 @@ +# by Ward Poelmans + +easyblock = 'ConfigureMake' + +name = 'PLUMED' +version = '2.1.4' + +homepage = 'http://www.plumed-code.org' +description = """PLUMED is an open source library for free energy calculations in molecular systems which + works together with some of the most popular molecular dynamics engines. Free energy calculations can be + performed as a function of many order parameters with a particular focus on biological problems, using + state of the art methods such as metadynamics, umbrella sampling and Jarzynski-equation based steered MD. + The software, written in C++, can be easily interfaced with both fortran and C/C++ codes. +""" + +toolchain = {'name': 'intel', 'version': '2015b'} +toolchainopts = {'usempi': 'True'} + +source_urls = ['https://github.com/plumed/plumed2/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), + ('GSL', '1.16'), + ('libmatheval', '1.1.11'), +] + +preconfigopts = 'FC=$MPIF90 LIBS="$LIBLAPACK $LIBS" ' +configopts = ' --exec-prefix=%(installdir)s --enable-gsl' +prebuildopts = 'source sourceme.sh && ' + +sanity_check_paths = { + 'files': ['bin/plumed', 'lib/libplumedKernel.so', 'lib/libplumed.so'], + 'dirs': ['lib/plumed'] +} + +modextrapaths = { + 'PLUMED_KERNEL': 'lib/libplumedKernel.so', + 'PLUMED_ROOT': 'lib/plumed', +} + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/p/PLUMED/PLUMED-2.2.0-foss-2015b.eb b/easybuild/easyconfigs/p/PLUMED/PLUMED-2.2.0-foss-2015b.eb new file mode 100644 index 0000000000..c12f858946 --- /dev/null +++ b/easybuild/easyconfigs/p/PLUMED/PLUMED-2.2.0-foss-2015b.eb @@ -0,0 +1,42 @@ +# by Ward Poelmans + +easyblock = 'ConfigureMake' + +name = 'PLUMED' +version = '2.2.0' + +homepage = 'http://www.plumed-code.org' +description = """PLUMED is an open source library for free energy calculations in molecular systems which + works together with some of the most popular molecular dynamics engines. Free energy calculations can be + performed as a function of many order parameters with a particular focus on biological problems, using + state of the art methods such as metadynamics, umbrella sampling and Jarzynski-equation based steered MD. + The software, written in C++, can be easily interfaced with both fortran and C/C++ codes. +""" + +toolchain = {'name': 'foss', 'version': '2015b'} +toolchainopts = {'usempi': 'True'} + +source_urls = ['https://github.com/plumed/plumed2/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), + ('GSL', '1.16'), + ('libmatheval', '1.1.11'), +] + +preconfigopts = 'FC=$MPIF90 LIBS="$LIBLAPACK $LIBS" ' +configopts = ' --exec-prefix=%(installdir)s --enable-gsl' +prebuildopts = 'source sourceme.sh && ' + +sanity_check_paths = { + 'files': ['bin/plumed', 'lib/libplumedKernel.so', 'lib/libplumed.so'], + 'dirs': ['lib/plumed'] +} + +modextrapaths = { + 'PLUMED_KERNEL': 'lib/libplumedKernel.so', + 'PLUMED_ROOT': 'lib/plumed', +} + +moduleclass = 'chem' -- GitLab From 4a843c0ab1fd84f5bc356bede4d22b8dab1e9e64 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 2 Dec 2015 20:10:45 +0100 Subject: [PATCH 046/741] Fix remarks --- easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb | 2 -- .../easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb | 2 -- 2 files changed, 4 deletions(-) diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb b/easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb index dac06d1c8d..e22ff76c36 100644 --- a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb +++ b/easybuild/easyconfigs/l/libffi/libffi-3.0.13-foss-2015b.eb @@ -15,8 +15,6 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -patches = ['libffi-%(version)s_include-xmmintrin.patch'] - sanity_check_paths = { 'files': [('lib/libffi.%s' % SHLIB_EXT, 'lib64/libffi.%s' % SHLIB_EXT), ('lib/libffi.a', 'lib64/libffi.a')], 'dirs': [], diff --git a/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb b/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb index 91f9c37650..acf2b33dbf 100644 --- a/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb +++ b/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-foss-2015b.eb @@ -12,8 +12,6 @@ toolchain = {'name': 'foss', 'version': '2015b'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] -patches = ['libunistring_icc_builtin_nan-inf.patch'] - parallel = 1 sanity_check_paths = { -- GitLab From b5c913f955d3b047e39ae8f04c14a8a3a6b789f1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 16 Jan 2016 11:15:43 +0100 Subject: [PATCH 047/741] fix remarks --- .../m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb index 213b10dd3a..d1f506aa9d 100644 --- a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb +++ b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb @@ -14,7 +14,7 @@ connected to the treatment of highly degenerate states.""" toolchain = {'name': 'dummy', 'version': 'dummy'} -source_urls = ['http://www.kvant.kemi.uu.se/molcas/'] +# download requires registration, see http://www.kvant.kemi.uu.se/molcas/ sources = ['%(namelower)s-%(version)s%(versionsuffix)s.tgz'] unpack_options = "--transform='s,^%(namelower)s-%(version)s%(versionsuffix)s,%(namelower)s_files,'" @@ -26,10 +26,11 @@ postinstallcmds = [ 'cp %(installdir)s/%(namelower)s_files/sbin/molcas.driver %(installdir)s/bin/molcas', ] +modextravars = {'MOLCAS': '%(installdir)s/%(namelower)s_files'} + sanity_check_paths = { 'files': ['bin/molcas'], 'dirs': ['bin'], } moduleclass = 'chem' -modextravars = {'MOLCAS': '%(installdir)s/%(namelower)s_files'} -- GitLab From d2838453775eea122fc9e83d88c597679979f10a Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Tue, 26 Jan 2016 12:06:24 +1300 Subject: [PATCH 048/741] Add Java as a dependency --- .../i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb index 100020fb13..56dc7ea9cd 100644 --- a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb +++ b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb @@ -15,11 +15,18 @@ Kremer, Quanren Xiong, and John Heumann at the University of Colorado.""" toolchain = {'name': 'dummy', 'version': 'dummy'} toolchainopts = {'openmp': True} -dependencies = [('CUDA', '6.0.37')] source_urls = ['http://bio3d.colorado.edu/imod/AMD64-RHEL5/'] sources = ['%(namelower)s_%(version)s%(versionsuffix)s.csh'] +java = 'Java' +javaver = '1.8.0_40' + +dependencies = [ + ('CUDA', '6.0.37'), + (java, javaver), +] + install_cmd = "tcsh %(namelower)s_%(version)s%(versionsuffix)s.csh" # -dir: Choose location of installation directory @@ -28,26 +35,29 @@ install_cmd = "tcsh %(namelower)s_%(version)s%(versionsuffix)s.csh" installopts = "-dir %(installdir)s -skip -yes" # The assumption by the install script is that installdir will be something -# like /usr/local. So it prefixes the install location with a lot of specific -# directories that are surplus to requirements. -postinstallcmds = [ "mv %(installdir)s/%(name)s/* %(installdir)s/.", - "rm -r %(installdir)s/%(name)s %(installdir)s/%(namelower)s_%(version)s" - ] +# like /usr/local. So it creates, within the specified install location, a +# number of additional directories within which to install IMOD. We will, +# therefore, move the contents of these directories up and throw away the +# directories themselves. Doing so apparently is not a problem so long as +# IMOD_DIR (see below) is correctly set in the module. +postinstallcmds = [ + "mv %(installdir)s/%(name)s/* %(installdir)s/.", + "rm -r %(installdir)s/%(name)s %(installdir)s/%(namelower)s_%(version)s", +] sanity_check_paths = { 'files': ['IMOD-linux.sh', 'IMOD-linux.csh', 'installIMOD'], 'dirs': ['bin', 'lib'] } -# Assuming the system java /usr/java can be used. If not, we can -# cross that bridge. modextravars = { 'IMOD_DIR' : "$root", - 'IMOD_JAVADIR' : "/usr/java", + 'IMOD_JAVADIR' : os.getenv('EBROOTJAVA'), 'IMOD_PLUGIN_DIR' : "$root/lib/imodplug", 'FOR_DISABLE_STACK_TRACE' : 1, 'IMOD_QTLIBDIR' : "$root/qtlib" } modaliases = {'subm' : "submfg $* &"} modloadmsg = """Please set the environment variable IMOD_CALIB_DIR if appropriate.""" + moduleclass = 'vis' -- GitLab From 54ea3dda2e54e6e0a92ac20c44fc8fdc6d8bc156 Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Tue, 26 Jan 2016 12:22:43 +1300 Subject: [PATCH 049/741] Added explanations for unpack_options and postinstallcmds --- .../m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb index d1f506aa9d..2bf90d3dc1 100644 --- a/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb +++ b/easybuild/easyconfigs/m/Molcas/Molcas-8.0-15.06.18_CentOS_6.6_x86_64.eb @@ -16,11 +16,20 @@ toolchain = {'name': 'dummy', 'version': 'dummy'} # download requires registration, see http://www.kvant.kemi.uu.se/molcas/ sources = ['%(namelower)s-%(version)s%(versionsuffix)s.tgz'] + +# The Molcas installation procedure creates a binary in a separate directory, +# but that binary depends on being able to find the originally extracted files. +# Because we don't want to rely on root privileges, and we do want to use +# EasyBuild paths, this means we need to extract Molcas to a subdirectory of +# the proposed installation directory. unpack_options = "--transform='s,^%(namelower)s-%(version)s%(versionsuffix)s,%(namelower)s_files,'" buildininstalldir = True skipsteps = ['install'] +# For the same reason as the tarball needs an extraction prefix, we need to +# finish up the installation by taking the Molcas driver and moving it to an +# EasyBuild style binary directory. postinstallcmds = [ 'mkdir -p %(installdir)s/bin', 'cp %(installdir)s/%(namelower)s_files/sbin/molcas.driver %(installdir)s/bin/molcas', -- GitLab From 3d46bcfd86d9d374e5218083ef4f2ce80d3da28a Mon Sep 17 00:00:00 2001 From: Benjamin Roberts Date: Wed, 2 Mar 2016 15:11:31 +1300 Subject: [PATCH 050/741] Move things into the EasyBlock --- .../i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb index 56dc7ea9cd..0f356768c8 100644 --- a/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb +++ b/easybuild/easyconfigs/i/IMOD/IMOD-4.7.15_RHEL6-64_CUDA6.0.eb @@ -1,5 +1,3 @@ -easyblock = 'Binary' - name = 'IMOD' version = '4.7.15' versionsuffix = '_RHEL6-64_CUDA6.0' @@ -27,37 +25,4 @@ dependencies = [ (java, javaver), ] -install_cmd = "tcsh %(namelower)s_%(version)s%(versionsuffix)s.csh" - -# -dir: Choose location of installation directory -# -skip: do not attempt to deploy resource files in /etc -# -yes: do not prompt for confirmation -installopts = "-dir %(installdir)s -skip -yes" - -# The assumption by the install script is that installdir will be something -# like /usr/local. So it creates, within the specified install location, a -# number of additional directories within which to install IMOD. We will, -# therefore, move the contents of these directories up and throw away the -# directories themselves. Doing so apparently is not a problem so long as -# IMOD_DIR (see below) is correctly set in the module. -postinstallcmds = [ - "mv %(installdir)s/%(name)s/* %(installdir)s/.", - "rm -r %(installdir)s/%(name)s %(installdir)s/%(namelower)s_%(version)s", -] - -sanity_check_paths = { - 'files': ['IMOD-linux.sh', 'IMOD-linux.csh', 'installIMOD'], - 'dirs': ['bin', 'lib'] -} - -modextravars = { - 'IMOD_DIR' : "$root", - 'IMOD_JAVADIR' : os.getenv('EBROOTJAVA'), - 'IMOD_PLUGIN_DIR' : "$root/lib/imodplug", - 'FOR_DISABLE_STACK_TRACE' : 1, - 'IMOD_QTLIBDIR' : "$root/qtlib" -} -modaliases = {'subm' : "submfg $* &"} -modloadmsg = """Please set the environment variable IMOD_CALIB_DIR if appropriate.""" - moduleclass = 'vis' -- GitLab From 99d0f6d114d00a6526741abad4f07dbde9814973 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Sun, 13 Mar 2016 15:15:12 +0100 Subject: [PATCH 051/741] Update libint to 2016a and deps --- ....9.eb => Libint-2.0.5-intel-2016a-Python-2.7.11.eb} | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) rename easybuild/easyconfigs/l/Libint/{Libint-2.0.5-intel-2015a-Python-2.7.9.eb => Libint-2.0.5-intel-2016a-Python-2.7.11.eb} (74%) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2016a-Python-2.7.11.eb similarity index 74% rename from easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb rename to easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2016a-Python-2.7.11.eb index 91014bdb21..c56a331e40 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2015a-Python-2.7.9.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2016a-Python-2.7.11.eb @@ -1,24 +1,24 @@ name = 'Libint' version = '2.0.5' # Some stuff that uses Libint (PSI) needs Boost-Python, so we inherit the versionsuffix here: #1421 -versionsuffix = '-Python-2.7.9' +versionsuffix = '-Python-2.7.11' homepage = 'https://github.com/evaleev/libint' description = """Libint library is used to evaluate the traditional (electron repulsion) and certain novel two-body matrix elements (integrals) over Cartesian Gaussian functions used in modern atomic and molecular theory.""" -toolchain = {'name': 'intel', 'version': '2015a'} +toolchain = {'name': 'intel', 'version': '2016a'} toolchainopts = {'pic': True} sources = ['release-%s.tar.gz' % '-'.join(version.split('.'))] source_urls = ['https://github.com/evaleev/libint/archive/'] dependencies = [ - ('GMP', '6.0.0a', '', ('GCC', '4.9.2')), - ('Boost', '1.57.0', versionsuffix), + ('GMP', '6.1.0'), + ('Boost', '1.60.0', versionsuffix), ] -builddependencies = [('Autotools', '20150119', '', ('GCC', '4.9.2'))] +builddependencies = [('Autotools', '20150215')] # no exec perm on the autogen.sh script preconfigopts = 'sh autogen.sh && ' -- GitLab From 3c1b969cc8fcdeb5b03f4fc67de55c4ec7164353 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Sun, 13 Mar 2016 15:16:19 +0100 Subject: [PATCH 052/741] Drop unused GMP --- .../g/GMP/GMP-6.0.0a-intel-2015a.eb | 26 ------------------- 1 file changed, 26 deletions(-) delete mode 100644 easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb b/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb deleted file mode 100644 index 70c2a1cb32..0000000000 --- a/easybuild/easyconfigs/g/GMP/GMP-6.0.0a-intel-2015a.eb +++ /dev/null @@ -1,26 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GMP' -version = '6.0.0a' - -homepage = 'http://gmplib.org/' -description = """GMP is a free library for arbitrary precision arithmetic, -operating on signed integers, rational numbers, and floating point numbers. """ - -toolchain = {'name': 'intel', 'version': '2015a'} -toolchainopts = {'precise': True} - -sources = [SOURCELOWER_TAR_BZ2] -source_urls = ['http://ftp.gnu.org/gnu/gmp'] - -# enable C++ interface -configopts = '--enable-cxx' - -runtest = 'check' - -sanity_check_paths = { - 'files': ['lib/libgmp.%s' % SHLIB_EXT, 'include/gmp.h'], - 'dirs': [], -} - -moduleclass = 'math' -- GitLab From 46c14aa7795447b96c6714043a15b2a03210f153 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 22 Mar 2016 12:09:24 +0100 Subject: [PATCH 053/741] {math}[foss-2016a] Octave 4.0.0 (REVIEW) --- .../a/arpack-ng/arpack-ng-3.3.0-foss-2016a.eb | 25 ++++++++ .../o/Octave/Octave-4.0.0-foss-2016a.eb | 58 +++++++++++++++++++ .../q/Qhull/Qhull-2015.2-foss-2016a.eb | 37 ++++++++++++ ...uiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb | 24 ++++++++ 4 files changed, 144 insertions(+) create mode 100644 easybuild/easyconfigs/a/arpack-ng/arpack-ng-3.3.0-foss-2016a.eb create mode 100644 easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb create mode 100644 easybuild/easyconfigs/q/Qhull/Qhull-2015.2-foss-2016a.eb create mode 100644 easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb diff --git a/easybuild/easyconfigs/a/arpack-ng/arpack-ng-3.3.0-foss-2016a.eb b/easybuild/easyconfigs/a/arpack-ng/arpack-ng-3.3.0-foss-2016a.eb new file mode 100644 index 0000000000..939e49dbc0 --- /dev/null +++ b/easybuild/easyconfigs/a/arpack-ng/arpack-ng-3.3.0-foss-2016a.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'arpack-ng' +version = '3.3.0' + +homepage = 'http://forge.scilab.org/index.php/p/arpack-ng/' +description = """ARPACK is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'opt': True, 'pic': True, 'usempi': True} + +source_urls = ['https://github.com/opencollab/arpack-ng/archive/'] +sources = ['%(version)s.tar.gz'] + +builddependencies = [('Autotools', '20150215')] + +preconfigopts = "sh bootstrap && " +configopts = '--with-pic --with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK"' + +sanity_check_paths = { + 'files': ["lib/libarpack.a", "lib/libarpack.so"], + 'dirs': [] +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb b/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb new file mode 100644 index 0000000000..bf4776d474 --- /dev/null +++ b/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb @@ -0,0 +1,58 @@ +easyblock = 'ConfigureMake' + +name = 'Octave' +version = '4.0.0' + +homepage = 'http://www.gnu.org/software/octave/' +description = """GNU Octave is a high-level interpreted language, primarily intended for numerical computations.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [ + ('Bison', '3.0.4'), + ('flex', '2.6.0'), + ('Autotools', '20150215'), + ('libtool', '2.4.6'), + ('gperf', '3.0.4'), +] + +dependencies = [ + ('libX11', '1.6.3'), + ('libXext', '1.3.3'), + ('libXft', '2.3.2'), + ('PCRE', '8.38'), + ('ncurses', '6.0'), + ('libreadline', '6.3'), + ('arpack-ng', '3.3.0'), + ('cURL', '7.47.0'), + ('FLTK', '1.3.3'), + ('fontconfig', '2.11.94'), + ('freetype', '2.6.2'), + ('GLPK', '4.58'), + ('GL2PS', '1.3.9'), + ('gnuplot', '5.0.3'), + ('Java', '1.8.0_72', '', True), + ('zlib', '1.2.8'), + ('Mesa', '11.1.2'), + ('libGLU', '9.0.0'), + ('Qhull', '2015.2'), + ('Qt', '4.8.7'), + ('HDF5', '1.8.16', '-serial'), + ('qrupdate', '1.1.2'), + ('SuiteSparse', '4.5.1', '-METIS-5.1.0'), + ('GraphicsMagick', '1.3.23'), +] + +configopts = '--with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" ' + +sanity_check_paths = { + 'files': ['bin/octave'], + 'dirs': [] +} + +sanity_check_commands = [('octave', '--eval "1+2"')] + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-foss-2016a.eb b/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-foss-2016a.eb new file mode 100644 index 0000000000..c145ad7bf0 --- /dev/null +++ b/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-foss-2016a.eb @@ -0,0 +1,37 @@ +easyblock = 'CMakeMake' + +name = 'Qhull' +version = '2015.2' + +homepage = 'http://www.qhull.org' +description = """ +Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, +furthest-site Delaunay triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, +and higher dimensions. Qhull implements the Quickhull algorithm for computing the convex hull. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +# Recently changed the Unix version numbering see http://www.qhull.org/src/Changes.txt +# and https://github.com/Homebrew/homebrew-science/issues/3353 +sources = ['%(namelower)s-%(version_major)s-src-7.%(version_minor)s.0.tgz'] +source_urls = ['http://www.qhull.org/download/'] + +patches = [ + 'Qhull_pkgconfig.patch', +] + +builddependencies = [('CMake', '3.4.3')] + +sanity_check_paths = { + 'files': ['bin/qhull', 'lib/libqhull.%s' % SHLIB_EXT, 'lib/pkgconfig/qhull.pc'], + 'dirs': [], +} + +modextrapaths = { + 'CPATH': ['qhull/include'], +} + +parallel = 1 + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb new file mode 100644 index 0000000000..7b07d451fc --- /dev/null +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb @@ -0,0 +1,24 @@ +name = 'SuiteSparse' +version = '4.5.1' + +homepage = 'http://faculty.cse.tamu.edu/davis/suitesparse.html' +description = """SuiteSparse is a collection of libraries manipulate sparse matrices.""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'opt': True, 'unroll': True, 'pic': True} + +source_urls = ['http://faculty.cse.tamu.edu/davis/SuiteSparse/'] +sources = [SOURCE_TAR_GZ] + +metis = 'METIS' +metis_ver = '5.1.0' +versionsuffix = '-%s-%s' % (metis, metis_ver) +dependencies = [(metis, metis_ver)] + +preconfigopts = 'LAPACK="$LIBLAPACK" ' +prebuildopts = 'LAPACK="$LIBLAPACK" ' +preinstallopts = 'LAPACK="$LIBLAPACK" ' + +maxparallel = 1 + +moduleclass = 'numlib' -- GitLab From dac87e7edf7d9008f3446ec222660d8d80a6963d Mon Sep 17 00:00:00 2001 From: RvDijk Date: Mon, 9 May 2016 15:33:42 +0200 Subject: [PATCH 054/741] gensim with foss2016a --- .../gensim-0.12.4-foss-2016a-Python-2.7.11.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/g/gensim/gensim-0.12.4-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/g/gensim/gensim-0.12.4-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/g/gensim/gensim-0.12.4-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..4c0e09b879 --- /dev/null +++ b/easybuild/easyconfigs/g/gensim/gensim-0.12.4-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,20 @@ +easyblock = 'PythonPackage' + +name = 'gensim' +version = '0.12.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/gensim' +description = """Gensim is a Python library for topic modelling, document indexing and similarity retrieval with + large corpora.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.11'), +] + +moduleclass = 'lib' -- GitLab From 071a61763eb77f420ab71153d85c722f878b8ede Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Fri, 13 May 2016 12:37:09 +0200 Subject: [PATCH 055/741] remove pre*=LAPACK="$LIBLAPACK" option --- .../s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb index 7b07d451fc..6a80824b3c 100644 --- a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.1-foss-2016a-METIS-5.1.0.eb @@ -15,10 +15,6 @@ metis_ver = '5.1.0' versionsuffix = '-%s-%s' % (metis, metis_ver) dependencies = [(metis, metis_ver)] -preconfigopts = 'LAPACK="$LIBLAPACK" ' -prebuildopts = 'LAPACK="$LIBLAPACK" ' -preinstallopts = 'LAPACK="$LIBLAPACK" ' - maxparallel = 1 moduleclass = 'numlib' -- GitLab From 58fa2bf2a417c3407aff5c7d6a34b02589753a67 Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Fri, 20 May 2016 13:01:44 -0400 Subject: [PATCH 056/741] Create x264-20160304-goolf-1.7.20.eb --- .../x/x264/x264-20160304-goolf-1.7.20.eb | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb b/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb new file mode 100644 index 0000000000..de24dff5a1 --- /dev/null +++ b/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'x264' +version = '20160304' + +homepage = 'http://www.videolan.org/developers/x264.html' +description = """x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 + AVC compression format, and is released under the terms of the GNU GPL.""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} + +source_urls = ['http://ftp.videolan.org/pub/videolan/x264/snapshots/'] +sources = ['x264-snapshot-%(version)s-2245-stable.tar.bz2'] + +dependencies = [('Yasm', '1.3.0')] + +configopts = " --enable-shared --enable-static " + +sanity_check_paths = { + 'files': ['bin/x264', 'include/x264_config.h', 'include/x264.h', 'lib/libx264.a', 'lib/libx264.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'vis' -- GitLab From 4c9d1810e9ae2837506c88c385c52b834c926d32 Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Fri, 20 May 2016 13:05:20 -0400 Subject: [PATCH 057/741] Create x265-1.9-goolf-1.7.20.eb for goolf --- .../easyconfigs/x/x265-1.9-goolf-1.7.20.eb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 easybuild/easyconfigs/x/x265-1.9-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/x/x265-1.9-goolf-1.7.20.eb b/easybuild/easyconfigs/x/x265-1.9-goolf-1.7.20.eb new file mode 100644 index 0000000000..8c4df77f6d --- /dev/null +++ b/easybuild/easyconfigs/x/x265-1.9-goolf-1.7.20.eb @@ -0,0 +1,26 @@ +easyblock = 'CMakeMake' + +name = 'x265' +version = '1.9' + +homepage = 'http://www.videolan.org/developers/x265.html' +description = """x265 is a free software library and application for encoding video streams into the H.265 + AVC compression format, and is released under the terms of the GNU GPL.""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} + + +source_urls = ['http://ftp.videolan.org/pub/videolan/x265/'] +sources = ['x265_%(version)s.tar.gz'] + +dependencies = [('CMake', '2.8.11'), + ('Yasm','1.3.0'),] + +start_dir = 'source' + +sanity_check_paths = { + 'files': ['bin/x265', 'include/x265_config.h', 'include/x265.h', 'lib/libx265.a', 'lib/libx265.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'vis' -- GitLab From 049151f640c7228f3c86b817be2d192a6325888a Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Fri, 20 May 2016 15:27:57 -0400 Subject: [PATCH 058/741] Create Yasm-1.3.0-goolf-1.7.20.eb you place the Yasm-1.3.0.tar.gz here $EASYBUILD_PREFIX/software/EasyBuild/2.6.0/lib/python2.7/site-packages/easybuild_easyconfigs-2.6.0-py2.7.egg/easybuild/easyconfigs/y/Yasm/y/Yasm$ --- .../y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb b/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb new file mode 100644 index 0000000000..250d77f32c --- /dev/null +++ b/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'Yasm' +version = '1.3.0' +#versionsuffix = '-20141219' + +description = "Yasm-1.3.0: Complete rewrite of the NASM assembler with BSD license" + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://www.tortall.net/projects/yasm/releases/'] + +homepage = 'http://www.tortall.net/projects/yasm/' + +toolchain = {'name': 'goolf', 'version': '1.7.20'} + +sanity_check_paths = { + 'files': [], ## fixme + 'dirs': ['.'], ## fixme +} + +parallel = 1 # this is a very conservative choice ## fixme +moduleclass = 'base' # please change this from base to right category ## fixme -- GitLab From ac4b898a536211cc8be7b3923dab5c6bad527149 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 23 May 2016 18:41:09 +0200 Subject: [PATCH 059/741] fix location of x265 easyconfig + minor style fixes --- .../easyconfigs/x/{ => x265}/x265-1.9-goolf-1.7.20.eb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename easybuild/easyconfigs/x/{ => x265}/x265-1.9-goolf-1.7.20.eb (88%) diff --git a/easybuild/easyconfigs/x/x265-1.9-goolf-1.7.20.eb b/easybuild/easyconfigs/x/x265/x265-1.9-goolf-1.7.20.eb similarity index 88% rename from easybuild/easyconfigs/x/x265-1.9-goolf-1.7.20.eb rename to easybuild/easyconfigs/x/x265/x265-1.9-goolf-1.7.20.eb index 8c4df77f6d..44548e3d8d 100644 --- a/easybuild/easyconfigs/x/x265-1.9-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/x/x265/x265-1.9-goolf-1.7.20.eb @@ -9,12 +9,13 @@ description = """x265 is a free software library and application for encoding vi toolchain = {'name': 'goolf', 'version': '1.7.20'} - source_urls = ['http://ftp.videolan.org/pub/videolan/x265/'] sources = ['x265_%(version)s.tar.gz'] -dependencies = [('CMake', '2.8.11'), - ('Yasm','1.3.0'),] +builddependencies = [('CMake', '2.8.11')] +dependencies = [ + ('Yasm','1.3.0'), +] start_dir = 'source' -- GitLab From f788f6e4f9ffce5eb1ec14e895c572788dfc8b2d Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Sat, 4 Jun 2016 09:01:35 +0400 Subject: [PATCH 060/741] adding easyconfigs for anaconda and condacreate --- .../easyconfigs/a/Anaconda/anaconda-2.4.0.eb | 42 +++++++++++++++++++ .../c/CondaCreate/condacreate-1.0.eb | 37 ++++++++++++++++ .../c/CondaCreate/requirements.txt | 1 + 3 files changed, 80 insertions(+) create mode 100644 easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb create mode 100644 easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb create mode 100644 easybuild/easyconfigs/c/CondaCreate/requirements.txt diff --git a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb new file mode 100644 index 0000000000..bd6762a52c --- /dev/null +++ b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb @@ -0,0 +1,42 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Authors:: Jillian Rowe +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_anaconda' + +name = "anaconda" +version = "2-4.0.0" +variant = "Linux-x86_64" + +homepage = "https://www.continuum.io/" +description = """Built to complement the rich, open source Python community, +the Anaconda platform provides an enterprise-ready data analytics platform +that empowers companies to adopt a modern open data science analytics architecture. +""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +anaconda_version = 2 + +source_urls = ["http://repo.continuum.io/archive/Anaconda%s-%s.sh" % (version, variant)] +sources = ["Anaconda%s-%s.sh" % (version, variant)] +checksums = [ '31ed3ef07435d7068e1e03be49381b13' ] + +license_file = 'LICENSE.txt' + +sanity_check_paths = { + 'files': ["bin/pydoc"], + 'dirs': [] +} + +modextravars = { + 'ANACONDA_LICENSE': license_file, +} + +moduleclass = 'lang' +##Trailing comment diff --git a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb new file mode 100644 index 0000000000..be9caec900 --- /dev/null +++ b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb @@ -0,0 +1,37 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2013-2015 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# Markus Geimer +# License:: 3-clause BSD +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_CondaCreate' + +name = "condacreate-env" +version = "1.0" +variant = "Linux-x86_64" + +homepage = "https://github.com/bioconda/bioconda-recipes" +description = """ Conda is a platform- and language-independent package manager that sports easy distribution, installation and version management of software. The bioconda channel is a Conda channel providing bioinformatics related packages. This repository hosts the corresponding recipes. """ + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['requirements.txt'] + +requirements = sources[0] +channels = 'bioconda' + +builddependencies = [('anaconda', '2-4.0.0')] + +sanity_check_paths = { + 'files': ["bin/cpanm"], + 'dirs': [] +} + +moduleclass = 'tools' +##Trailing comment diff --git a/easybuild/easyconfigs/c/CondaCreate/requirements.txt b/easybuild/easyconfigs/c/CondaCreate/requirements.txt new file mode 100644 index 0000000000..3806bb01ca --- /dev/null +++ b/easybuild/easyconfigs/c/CondaCreate/requirements.txt @@ -0,0 +1 @@ +perl-app-cpanminus -- GitLab From fb5150e9d1dcc67c922cfa1c5de748b0d1ccef5f Mon Sep 17 00:00:00 2001 From: Xavier Besseron Date: Sat, 4 Jun 2016 15:30:00 +0200 Subject: [PATCH 061/741] modify easyconfig ParaView-4.4.0-intel-2016a.eb, add easyconfig ParaView-4.4.0-foss-2016a.eb --- .../p/ParaView/ParaView-4.4.0-foss-2016a.eb | 47 +++++++++++++++++++ .../p/ParaView/ParaView-4.4.0-intel-2016a.eb | 2 + 2 files changed, 49 insertions(+) create mode 100644 easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-foss-2016a.eb diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-foss-2016a.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-foss-2016a.eb new file mode 100644 index 0000000000..ffa008562b --- /dev/null +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-foss-2016a.eb @@ -0,0 +1,47 @@ +easyblock = 'CMakeMake' + +name = 'ParaView' +version = '4.4.0' + +homepage = "http://www.paraview.org" +description = "ParaView is a scientific parallel visualizer." + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'pic': True, 'usempi': False} + +download_suffix = 'download.php?submit=Download&version=v%(version_major_minor)s&type=source&os=all&downloadFile=' +source_urls = ['http://www.paraview.org/paraview-downloads/%s' % download_suffix] +sources = ["ParaView-v%(version)s-source.tar.gz"] + +patches = ['%(name)s-%(version)s_missingheader.patch'] + +dependencies = [ + ('libGLU', '9.0.0', '-Mesa-11.2.1'), + ('libXt', '1.1.5'), + ('Qt', '4.8.7'), + ('libXext', '1.3.3'), + ('libX11', '1.6.3'), + ('zlib', '1.2.8'), + ('HDF5', '1.8.16', '-serial'), +] + +builddependencies = [('CMake', '3.5.2')] + +separate_build_dir = True + +configopts = '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_OPENGL_HAS_OSMESA=ON ' +configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.so ' +configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' +configopts += '-DVTK_USE_SYSTEM_HDF5=ON ' +# Without internet connection turn off testing (uncomment the following line) +configopts += '-DBUILD_TESTING=OFF ' +# Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md +# and download ExternalData to $EASYBUILD_SOURCEPATH and adjust -DExternalData_OBJECT_STORES accordingly +# Without internet connection, comment the following two lines (configopts and prebuildopts) +configopts += '-DExternalData_OBJECT_STORES=%(builddir)s/ExternalData ' +# The ParaView server can be cranky, test downloads are quite often failing, especially in the case +# of parallel downloads. Using ; insted of && gives a second chance to download the test files, if the +# first serial attempt would fail. +prebuildopts = 'make VTKData ;' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2016a.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2016a.eb index 838808a743..0197db6977 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2016a.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2016a.eb @@ -22,6 +22,7 @@ dependencies = [ ('libXext', '1.3.3'), ('libX11', '1.6.3'), ('zlib', '1.2.8'), + ('HDF5', '1.8.16', '-serial'), ] builddependencies = [('CMake', '3.5.2')] @@ -31,6 +32,7 @@ separate_build_dir = True configopts = '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_OPENGL_HAS_OSMESA=ON ' configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.so ' configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' +configopts += '-DVTK_USE_SYSTEM_HDF5=ON ' # Without internet connection turn off testing (uncomment the following line) configopts += '-DBUILD_TESTING=OFF ' # Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md -- GitLab From 3543f15ff900558ef4fd59e6de496d737578e2ec Mon Sep 17 00:00:00 2001 From: Xavier Besseron Date: Sun, 5 Jun 2016 22:47:51 +0200 Subject: [PATCH 062/741] Apply changes to other ParaView 4.4.0 and add required dependencies --- .../h/HDF5/HDF5-1.8.16-GCC-4.9.3-serial.eb | 22 ++++++++++++++++++ .../ParaView-4.4.0-gimkl-2.11.5-mpi.eb | 2 ++ .../ParaView-4.4.0-intel-2015b-mpi.eb | 2 ++ .../p/ParaView/ParaView-4.4.0-intel-2015b.eb | 2 ++ .../easyconfigs/s/Szip/Szip-2.1-GCC-4.9.3.eb | 23 +++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-GCC-4.9.3-serial.eb create mode 100644 easybuild/easyconfigs/s/Szip/Szip-2.1-GCC-4.9.3.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-GCC-4.9.3-serial.eb b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-GCC-4.9.3-serial.eb new file mode 100644 index 0000000000..520a546466 --- /dev/null +++ b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-GCC-4.9.3-serial.eb @@ -0,0 +1,22 @@ +name = 'HDF5' +version = '1.8.16' +versionsuffix = '-serial' + +homepage = 'http://www.hdfgroup.org/HDF5/' +description = """HDF5 is a unique technology suite that makes possible the management of + extremely large and complex data collections.""" + +toolchain = {'name': 'GCC', 'version': '4.9.3'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['configure_libtool.patch'] + +dependencies = [ + ('zlib', '1.2.8'), + ('Szip', '2.1'), +] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb index a0d908d3d5..366ab8e374 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb @@ -27,6 +27,7 @@ dependencies = [ ('libXext', '1.3.3'), ('libX11', '1.6.3'), ('zlib', '1.2.8'), + ('HDF5', '1.8.16', '-serial', ('GCC', '4.9.3')), ] builddependencies = [('CMake', '3.4.3')] @@ -38,6 +39,7 @@ maxparallel = 4 configopts = '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_OPENGL_HAS_OSMESA=ON -DPARAVIEW_USE_MPI=ON ' configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.so ' configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' +configopts += '-DVTK_USE_SYSTEM_HDF5=ON ' # Without internet connection turn off testing (uncomment the following line) #configopts += '-DBUILD_TESTING=OFF ' # Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb index 2e7bc45270..c47c9437bd 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb @@ -27,6 +27,7 @@ dependencies = [ ('libXext', '1.3.3'), ('libX11', '1.6.3', pysuff), ('zlib', '1.2.8'), + ('HDF5', '1.8.16', '-serial'), ] builddependencies = [('CMake', '3.3.2')] @@ -38,6 +39,7 @@ maxparallel = 4 configopts = '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_OPENGL_HAS_OSMESA=ON -DPARAVIEW_USE_MPI=ON ' configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.so ' configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' +configopts += '-DVTK_USE_SYSTEM_HDF5=ON ' # Without internet connection turn off testing (uncomment the following line) #configopts += '-DBUILD_TESTING=OFF ' # Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb index 0057213bea..bd0d7b5f22 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb @@ -26,6 +26,7 @@ dependencies = [ ('libXext', '1.3.3'), ('libX11', '1.6.3', pysuff), ('zlib', '1.2.8'), + ('HDF5', '1.8.16', '-serial'), ] builddependencies = [('CMake', '3.3.2')] @@ -37,6 +38,7 @@ maxparallel = 4 configopts = '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_OPENGL_HAS_OSMESA=ON ' configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.so ' configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' +configopts += '-DVTK_USE_SYSTEM_HDF5=ON ' # Without internet connection turn off testing (uncomment the following line) #configopts += '-DBUILD_TESTING=OFF ' # Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-GCC-4.9.3.eb b/easybuild/easyconfigs/s/Szip/Szip-2.1-GCC-4.9.3.eb new file mode 100644 index 0000000000..06743759f2 --- /dev/null +++ b/easybuild/easyconfigs/s/Szip/Szip-2.1-GCC-4.9.3.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'Szip' +version = '2.1' + +homepage = 'http://www.hdfgroup.org/doc_resource/SZIP/' +description = "Szip compression software, providing lossless compression of scientific data" + +toolchain = {'name': 'GCC', 'version': '4.9.3'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['http://www.hdfgroup.org/ftp/lib-external/szip/%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +sanity_check_paths = { + 'files': ["lib/libsz.a", "lib/libsz.%s" % SHLIB_EXT] + + ["include/%s" % x for x in ["ricehdf.h", "szip_adpt.h", "szlib.h"]], + 'dirs': [], +} + +moduleclass = 'tools' -- GitLab From 26ec235e0fc1908754b3e68bb962040d2aea0742 Mon Sep 17 00:00:00 2001 From: Xavier Besseron Date: Mon, 6 Jun 2016 15:32:57 +0200 Subject: [PATCH 063/741] Use dependencies based on gimkl/2.11.5 for ParaView 4.4.0 with gimkl/2.11.5 --- ...6-GCC-4.9.3-serial.eb => HDF5-1.8.16-gimkl-2.11.5-serial.eb} | 2 +- .../easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb | 2 +- .../s/Szip/{Szip-2.1-GCC-4.9.3.eb => Szip-2.1-gimkl-2.11.5.eb} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename easybuild/easyconfigs/h/HDF5/{HDF5-1.8.16-GCC-4.9.3-serial.eb => HDF5-1.8.16-gimkl-2.11.5-serial.eb} (91%) rename easybuild/easyconfigs/s/Szip/{Szip-2.1-GCC-4.9.3.eb => Szip-2.1-gimkl-2.11.5.eb} (92%) diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-GCC-4.9.3-serial.eb b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-gimkl-2.11.5-serial.eb similarity index 91% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-GCC-4.9.3-serial.eb rename to easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-gimkl-2.11.5-serial.eb index 520a546466..2130c99fd6 100644 --- a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-GCC-4.9.3-serial.eb +++ b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-gimkl-2.11.5-serial.eb @@ -6,7 +6,7 @@ homepage = 'http://www.hdfgroup.org/HDF5/' description = """HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.""" -toolchain = {'name': 'GCC', 'version': '4.9.3'} +toolchain = {'name': 'gimkl', 'version': '2.11.5'} toolchainopts = {'optarch': True, 'pic': True} source_urls = ['http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-%(version)s/src'] diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb index 366ab8e374..358fff80d8 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb @@ -27,7 +27,7 @@ dependencies = [ ('libXext', '1.3.3'), ('libX11', '1.6.3'), ('zlib', '1.2.8'), - ('HDF5', '1.8.16', '-serial', ('GCC', '4.9.3')), + ('HDF5', '1.8.16', '-serial'), ] builddependencies = [('CMake', '3.4.3')] diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-GCC-4.9.3.eb b/easybuild/easyconfigs/s/Szip/Szip-2.1-gimkl-2.11.5.eb similarity index 92% rename from easybuild/easyconfigs/s/Szip/Szip-2.1-GCC-4.9.3.eb rename to easybuild/easyconfigs/s/Szip/Szip-2.1-gimkl-2.11.5.eb index 06743759f2..37afd28477 100644 --- a/easybuild/easyconfigs/s/Szip/Szip-2.1-GCC-4.9.3.eb +++ b/easybuild/easyconfigs/s/Szip/Szip-2.1-gimkl-2.11.5.eb @@ -6,7 +6,7 @@ version = '2.1' homepage = 'http://www.hdfgroup.org/doc_resource/SZIP/' description = "Szip compression software, providing lossless compression of scientific data" -toolchain = {'name': 'GCC', 'version': '4.9.3'} +toolchain = {'name': 'gimkl', 'version': '2.11.5'} toolchainopts = {'optarch': True, 'pic': True} source_urls = ['http://www.hdfgroup.org/ftp/lib-external/szip/%(version)s/src'] -- GitLab From c0d2f6e911726f84afa893596725232a69fe9e10 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Mon, 4 Jul 2016 10:52:14 +0200 Subject: [PATCH 064/741] OpenBabel with foss2016a --- ...penBabel-2.3.2-foss-2016a-Python-2.7.11.eb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..a511a38eb3 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,35 @@ +name = 'OpenBabel' +version = '2.3.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://openbabel.org' +description = """Open Babel is a chemical toolbox designed to speak the many + languages of chemical data. It's an open, collaborative project allowing anyone + to search, convert, analyze, or store data from molecular modeling, chemistry, + solid-state materials, biochemistry, or related areas.""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'optarch': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +patches = [ + 'OpenBabel-%(version)s-fix-link-path-tests.patch', + 'OpenBabel-%(version)s-ignore-failed-test.patch', +] + +builddependencies = [ + ('CMake', '3.5.2'), +] + +dependencies = [ + ('Python', '2.7.11'), + ('zlib', '1.2.8'), + ('libxml2', '2.9.3'), + ('Eigen', '3.2.8'), +] + +runtest = 'test' + +moduleclass = 'chem' -- GitLab From a5acaa1048d3e746a2d527676f0361a8700d2929 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 7 Jul 2016 13:16:12 +0200 Subject: [PATCH 065/741] Eigen dep --- .../easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 easybuild/easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb diff --git a/easybuild/easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb b/easybuild/easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb new file mode 100644 index 0000000000..99e9f6bd51 --- /dev/null +++ b/easybuild/easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb @@ -0,0 +1,13 @@ +name = 'Eigen' +version = '3.2.8' + +homepage = 'http://eigen.tuxfamily.org/index.php?title=Main_Page' +description = """Eigen is a C++ template library for linear algebra: + matrices, vectors, numerical solvers, and related algorithms.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [BITBUCKET_SOURCE] +sources = ['%(version)s.tar.bz2'] + +moduleclass = 'math' -- GitLab From 22a47b2ee784e3aceb1fd07b45abb240f91c14de Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 8 Jul 2016 14:23:49 +0200 Subject: [PATCH 066/741] add easyconfig Qt5-5.7.0-intel-2016a.eb --- .../q/Qt5/Qt5-5.7.0-intel-2016a.eb | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb diff --git a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb new file mode 100644 index 0000000000..82e71ce75d --- /dev/null +++ b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb @@ -0,0 +1,53 @@ +easyblock = 'EB_Qt' + +name = 'Qt5' +version = '5.7.0' + +homepage = 'http://qt.io/' +description = "Qt is a comprehensive cross-platform C++ application framework." + +toolchain = {'name': 'intel', 'version': '2016a'} + +source_urls = [ + 'http://download.qt.io/official_releases/qt/%(version_major_minor)s/%(version)s/single/', + 'http://download.qt.io/archive/qt/%(version_major_minor)s/%(version)s/single/' +] +sources = ['qt-everywhere-opensource-src-%(version)s.tar.xz'] + +builddependencies = [ + ('fixesproto', '5.0'), + ('glproto', '1.4.17'), + ('inputproto', '2.3.1'), + ('kbproto', '1.0.7'), + ('libpthread-stubs', '0.3'), + ('pkg-config', '0.29.1'), + ('xcb-proto', '1.11', '', True), + ('xextproto', '7.3.0'), + ('xorg-macros', '1.19.0'), + ('xproto', '7.0.28'), + ('xtrans', '1.3.5'), +] + +dependencies = [ + ('GLib', '2.48.0'), + ('libX11', '1.6.3'), + ('libXt', '1.1.5'), + ('libXi', '1.7.6'), + ('xcb-util', '0.4.0'), + ('xcb-util-image', '0.4.0'), + ('xcb-util-keysyms', '0.4.0'), + ('xcb-util-renderutil', '0.3.9'), + ('xcb-util-wm', '0.4.1'), + ('libxkbcommon', '0.6.1'), + ('libXrender', '0.9.9'), + ('fontconfig', '2.11.95'), + ('freetype', '2.6.3'), + ('libXfixes', '5.0.1'), + ('libXcursor', '1.1.14'), + ('libXinerama', '1.1.3'), + ('libXrandr', '1.5.0'), + ('libpng', '1.6.21'), + ('libGLU', '9.0.0', '-Mesa-11.2.1'), +] + +moduleclass = 'devel' -- GitLab From 7735d88661187dba4fa0ce881c7932d1059cfe08 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 8 Jul 2016 17:56:56 +0200 Subject: [PATCH 067/741] Adjust for new easyblock --- .../easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-Python-2.7.11.eb | 2 -- .../easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-mt-Python-2.7.11.eb | 2 -- 2 files changed, 4 deletions(-) diff --git a/easybuild/easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-Python-2.7.11.eb index 9d52b0ef88..ed0569f101 100644 --- a/easybuild/easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-Python-2.7.11.eb @@ -33,8 +33,6 @@ builddependencies = [ ] configopts = '-DENABLE_MPI=ON -DENABLE_OMP=ON -DENABLE_UNIT_TESTS=ON -DENABLE_CHEMPS2=ON -DENABLE_PLUGINS=ON' -configopts += ' -DENABLE_DUMMY_PLUGIN=ON -DCHEMPS2_ROOT=$EBROOTCHEMPS2' -configopts += ' -DENABLE_PCMSOLVER=ON -DPCMSOLVER_ROOT=$EBROOTPCMSOLVER' # CMake will pick mpiexec by default and this fails with intel MPI #configopts += ' -DMPIEXEC=$EBROOTIMPI/bin64/mpirun' diff --git a/easybuild/easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-mt-Python-2.7.11.eb b/easybuild/easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-mt-Python-2.7.11.eb index 90a8852122..1fcbf7998b 100644 --- a/easybuild/easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-mt-Python-2.7.11.eb +++ b/easybuild/easyconfigs/p/PSI4/PSI4-1.0-intel-2016a-mt-Python-2.7.11.eb @@ -34,8 +34,6 @@ builddependencies = [ ] configopts = '-DENABLE_MPI=OFF -DENABLE_OMP=ON -DENABLE_UNIT_TESTS=ON -DENABLE_PLUGINS=ON -DENABLE_DUMMY_PLUGIN=ON' -configopts += ' -DENABLE_CHEMPS2=ON -DCHEMPS2_ROOT=$EBROOTCHEMPS2' -configopts += ' -DENABLE_PCMSOLVER=ON -DPCMSOLVER_ROOT=$EBROOTPCMSOLVER' # Execute 4 tests in parallel and disable the pubchem tests (they download things and don't work reliable) # Limit the number of concurrent tests to avoid failures -- GitLab From 73f1e6ac6ba154fdadc32b631f2d075d3bb20818 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Sun, 10 Jul 2016 20:19:49 +0200 Subject: [PATCH 068/741] add easyconfig Qt5-5.7.0-foss-2016a.eb --- .../easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb diff --git a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb new file mode 100644 index 0000000000..50c78a140e --- /dev/null +++ b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb @@ -0,0 +1,53 @@ +easyblock = 'EB_Qt' + +name = 'Qt5' +version = '5.7.0' + +homepage = 'http://qt.io/' +description = "Qt is a comprehensive cross-platform C++ application framework." + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [ + 'http://download.qt.io/official_releases/qt/%(version_major_minor)s/%(version)s/single/', + 'http://download.qt.io/archive/qt/%(version_major_minor)s/%(version)s/single/' +] +sources = ['qt-everywhere-opensource-src-%(version)s.tar.xz'] + +builddependencies = [ + ('fixesproto', '5.0'), + ('glproto', '1.4.17'), + ('inputproto', '2.3.1'), + ('kbproto', '1.0.7'), + ('libpthread-stubs', '0.3'), + ('pkg-config', '0.29.1'), + ('xcb-proto', '1.11', '', True), + ('xextproto', '7.3.0'), + ('xorg-macros', '1.19.0'), + ('xproto', '7.0.28'), + ('xtrans', '1.3.5'), +] + +dependencies = [ + ('GLib', '2.48.0'), + ('libX11', '1.6.3'), + ('libXt', '1.1.5'), + ('libXi', '1.7.6'), + ('xcb-util', '0.4.0'), + ('xcb-util-image', '0.4.0'), + ('xcb-util-keysyms', '0.4.0'), + ('xcb-util-renderutil', '0.3.9'), + ('xcb-util-wm', '0.4.1'), + ('libxkbcommon', '0.6.1'), + ('libXrender', '0.9.9'), + ('fontconfig', '2.11.95'), + ('freetype', '2.6.3'), + ('libXfixes', '5.0.1'), + ('libXcursor', '1.1.14'), + ('libXinerama', '1.1.3'), + ('libXrandr', '1.5.0'), + ('libpng', '1.6.21'), + ('libGLU', '9.0.0', '-Mesa-11.2.1'), +] + +moduleclass = 'devel' \ No newline at end of file -- GitLab From 3a4c789f1c99bfee23360b53858db72ea9f1db62 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Sat, 4 Jun 2016 09:01:35 +0400 Subject: [PATCH 069/741] adding easyconfigs for anaconda and condacreate --- .../easyconfigs/a/Anaconda/anaconda-2.4.0.eb | 42 +++++++++++++++++++ .../c/CondaCreate/condacreate-1.0.eb | 37 ++++++++++++++++ .../c/CondaCreate/requirements.txt | 1 + 3 files changed, 80 insertions(+) create mode 100644 easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb create mode 100644 easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb create mode 100644 easybuild/easyconfigs/c/CondaCreate/requirements.txt diff --git a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb new file mode 100644 index 0000000000..bd6762a52c --- /dev/null +++ b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb @@ -0,0 +1,42 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Authors:: Jillian Rowe +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_anaconda' + +name = "anaconda" +version = "2-4.0.0" +variant = "Linux-x86_64" + +homepage = "https://www.continuum.io/" +description = """Built to complement the rich, open source Python community, +the Anaconda platform provides an enterprise-ready data analytics platform +that empowers companies to adopt a modern open data science analytics architecture. +""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +anaconda_version = 2 + +source_urls = ["http://repo.continuum.io/archive/Anaconda%s-%s.sh" % (version, variant)] +sources = ["Anaconda%s-%s.sh" % (version, variant)] +checksums = [ '31ed3ef07435d7068e1e03be49381b13' ] + +license_file = 'LICENSE.txt' + +sanity_check_paths = { + 'files': ["bin/pydoc"], + 'dirs': [] +} + +modextravars = { + 'ANACONDA_LICENSE': license_file, +} + +moduleclass = 'lang' +##Trailing comment diff --git a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb new file mode 100644 index 0000000000..be9caec900 --- /dev/null +++ b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb @@ -0,0 +1,37 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2013-2015 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# Markus Geimer +# License:: 3-clause BSD +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_CondaCreate' + +name = "condacreate-env" +version = "1.0" +variant = "Linux-x86_64" + +homepage = "https://github.com/bioconda/bioconda-recipes" +description = """ Conda is a platform- and language-independent package manager that sports easy distribution, installation and version management of software. The bioconda channel is a Conda channel providing bioinformatics related packages. This repository hosts the corresponding recipes. """ + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['requirements.txt'] + +requirements = sources[0] +channels = 'bioconda' + +builddependencies = [('anaconda', '2-4.0.0')] + +sanity_check_paths = { + 'files': ["bin/cpanm"], + 'dirs': [] +} + +moduleclass = 'tools' +##Trailing comment diff --git a/easybuild/easyconfigs/c/CondaCreate/requirements.txt b/easybuild/easyconfigs/c/CondaCreate/requirements.txt new file mode 100644 index 0000000000..3806bb01ca --- /dev/null +++ b/easybuild/easyconfigs/c/CondaCreate/requirements.txt @@ -0,0 +1 @@ +perl-app-cpanminus -- GitLab From 707a5670567dd8e278a5719f1c5e41909e787164 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Wed, 13 Jul 2016 12:12:17 +0400 Subject: [PATCH 070/741] stupid case changes --- .../b/{BLASR => blasr (Case Conflict)}/BLASR-2.1-goolf-1.4.10.eb | 0 .../GraphViz-2.18-intel-2014b-Perl-5.20.0.eb | 0 .../g/{Grep => grep (Case Conflict)}/Grep-2.21-GCC-4.9.2.eb | 0 .../{GSL => gsl (Case Conflict)}/GSL-1.15-goalf-1.1.0-no-OFED.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.15-goolf-1.4.10.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.15-goolf-1.5.14.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.15-ictce-4.0.6.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.15-ictce-5.3.0.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.15-intel-2014b.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.15-intel-2015a.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-foss-2015a.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-foss-2015b.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-foss-2016a.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolf-1.4.10.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolf-1.5.14.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolf-1.7.20.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolfc-1.3.12.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolfc-2.6.10.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-ictce-5.3.0.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-ictce-5.4.0.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-ictce-5.5.0.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-ictce-6.2.5.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-intel-2014b.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-intel-2015a.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-intel-2015b.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-1.16-intel-2016a.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-2.1-foss-2015b.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-2.1-foss-2016a.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-2.1-intel-2015b.eb | 0 .../g/{GSL => gsl (Case Conflict)}/GSL-2.1-intel-2016a.eb | 0 .../Mawk-1.3.4-goolf-1.4.10-20150503.eb | 0 31 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/b/{BLASR => blasr (Case Conflict)}/BLASR-2.1-goolf-1.4.10.eb (100%) rename easybuild/easyconfigs/g/{GraphViz => Graphviz (Case Conflict)}/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb (100%) rename easybuild/easyconfigs/g/{Grep => grep (Case Conflict)}/Grep-2.21-GCC-4.9.2.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.15-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.15-goolf-1.4.10.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.15-goolf-1.5.14.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.15-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.15-ictce-5.3.0.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.15-intel-2014b.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.15-intel-2015a.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-foss-2015a.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-foss-2015b.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-foss-2016a.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolf-1.4.10.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolf-1.5.14.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolf-1.7.20.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolfc-1.3.12.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-goolfc-2.6.10.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-ictce-5.3.0.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-ictce-5.4.0.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-ictce-5.5.0.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-ictce-6.2.5.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-intel-2014b.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-intel-2015a.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-intel-2015b.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-1.16-intel-2016a.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-2.1-foss-2015b.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-2.1-foss-2016a.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-2.1-intel-2015b.eb (100%) rename easybuild/easyconfigs/g/{GSL => gsl (Case Conflict)}/GSL-2.1-intel-2016a.eb (100%) rename easybuild/easyconfigs/m/{Mawk => mawk (Case Conflict)}/Mawk-1.3.4-goolf-1.4.10-20150503.eb (100%) diff --git a/easybuild/easyconfigs/b/BLASR/BLASR-2.1-goolf-1.4.10.eb b/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/b/BLASR/BLASR-2.1-goolf-1.4.10.eb rename to easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb diff --git a/easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb b/easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb similarity index 100% rename from easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb rename to easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb diff --git a/easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb b/easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2.eb similarity index 100% rename from easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb rename to easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb diff --git a/easybuild/easyconfigs/m/Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb b/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb similarity index 100% rename from easybuild/easyconfigs/m/Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb rename to easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb -- GitLab From c9fa017ce4128eafa60ff02b75b23675e9f7f95d Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Wed, 13 Jul 2016 12:13:18 +0400 Subject: [PATCH 071/741] what happens if i get rid of gsl --- .../GSL-1.15-goalf-1.1.0-no-OFED.eb | 19 ------------ .../GSL-1.15-goolf-1.4.10.eb | 19 ------------ .../GSL-1.15-goolf-1.5.14.eb | 19 ------------ .../GSL-1.15-ictce-4.0.6.eb | 19 ------------ .../GSL-1.15-ictce-5.3.0.eb | 19 ------------ .../GSL-1.15-intel-2014b.eb | 19 ------------ .../GSL-1.15-intel-2015a.eb | 19 ------------ .../GSL-1.16-foss-2015a.eb | 19 ------------ .../GSL-1.16-foss-2015b.eb | 19 ------------ .../GSL-1.16-foss-2016a.eb | 19 ------------ .../GSL-1.16-goolf-1.4.10.eb | 19 ------------ .../GSL-1.16-goolf-1.5.14.eb | 19 ------------ .../GSL-1.16-goolf-1.7.20.eb | 19 ------------ .../GSL-1.16-goolfc-1.3.12.eb | 19 ------------ .../GSL-1.16-goolfc-2.6.10.eb | 19 ------------ .../GSL-1.16-ictce-5.3.0.eb | 19 ------------ .../GSL-1.16-ictce-5.4.0.eb | 19 ------------ .../GSL-1.16-ictce-5.5.0.eb | 19 ------------ .../GSL-1.16-ictce-6.2.5.eb | 19 ------------ .../GSL-1.16-intel-2014b.eb | 19 ------------ .../GSL-1.16-intel-2015a.eb | 19 ------------ .../GSL-1.16-intel-2015b.eb | 19 ------------ .../GSL-1.16-intel-2016a.eb | 19 ------------ .../gsl (Case Conflict)/GSL-2.1-foss-2015b.eb | 19 ------------ .../gsl (Case Conflict)/GSL-2.1-foss-2016a.eb | 19 ------------ .../GSL-2.1-intel-2015b.eb | 19 ------------ .../GSL-2.1-intel-2016a.eb | 19 ------------ .../g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb | 29 ------------------- 28 files changed, 542 deletions(-) delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb delete mode 100644 easybuild/easyconfigs/g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb deleted file mode 100644 index f4197820e5..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb deleted file mode 100644 index d9295adc89..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. -The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.4.10'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb deleted file mode 100644 index 3230d895d1..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.5.14'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb deleted file mode 100644 index 93b875b8e7..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '4.0.6'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb deleted file mode 100644 index 3e17c8b5d6..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '5.3.0'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb deleted file mode 100644 index 9ef4e74b99..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2014b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb deleted file mode 100644 index 2c856c0c22..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2015a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb deleted file mode 100644 index 426a5fa702..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'foss', 'version': '2015a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb deleted file mode 100644 index 681aa2648b..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'foss', 'version': '2015b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb deleted file mode 100644 index 2cce073a65..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'foss', 'version': '2016a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb deleted file mode 100644 index 7481f95582..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.4.10'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb deleted file mode 100644 index 493418d259..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.5.14'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb deleted file mode 100644 index 723ea8a309..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, - special functions and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.7.20'} -toolchainopts = {'unroll': True, 'pic': True} - -source_urls = ['http://ftpmirror.gnu.org/gsl/'] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb deleted file mode 100644 index 0336ef456f..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolfc', 'version': '1.3.12'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb deleted file mode 100644 index 0e558d5644..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolfc', 'version': '2.6.10'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb deleted file mode 100644 index e3cf37d1e5..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '5.3.0'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb deleted file mode 100644 index 1ee8967b14..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '5.4.0'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb deleted file mode 100644 index cc561c1cbf..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '5.5.0'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb deleted file mode 100644 index e1a049a993..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '6.2.5'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb deleted file mode 100644 index f93fbb1090..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2014b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb deleted file mode 100644 index 207992d0eb..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2015a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb deleted file mode 100644 index 33c068c25d..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2015b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb deleted file mode 100644 index aaffd974f5..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2016a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb deleted file mode 100644 index 64966f0023..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = "2.1" - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'version': '2015b', 'name': 'foss'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb deleted file mode 100644 index f4a28c0d8f..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = "2.1" - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'version': '2016a', 'name': 'foss'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb deleted file mode 100644 index d363055a95..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '2.1' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2015b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb deleted file mode 100644 index 6ff19555c3..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '2.1' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2016a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb b/easybuild/easyconfigs/g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb deleted file mode 100644 index 36d3ba6863..0000000000 --- a/easybuild/easyconfigs/g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb +++ /dev/null @@ -1,29 +0,0 @@ -easyblock = 'RPackage' - -name = 'gsl' -version = '1.9-10' - -homepage = 'http://cran.r-project.org/web/packages/gsl' -description = """An R wrapper for the special functions and quasi random number generators of the Gnu Scientific - Library (GSL).""" - -toolchain = {'name': 'intel', 'version': '2014b'} - -source_urls = ['http://cran.r-project.org/src/contrib/'] -sources = ['%(name)s_%(version)s.tar.gz'] - -r = 'R' -rver = '3.1.1' -versionsuffix = '-%s-%s' % (r, rver) - -dependencies = [ - (r, rver), - ('GSL', '1.16'), -] - -sanity_check_paths = { - 'files': [], - 'dirs': ['gsl'], -} - -moduleclass = 'math' -- GitLab From 0386440ea542db9b0d1e95ee1765aca613df9a8d Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Wed, 13 Jul 2016 12:33:22 +0400 Subject: [PATCH 072/741] fixing my conflicts with blunt force trauma --- .../easyconfigs/a/Anaconda/anaconda-2.4.0.eb | 42 ------------------- .../BLASR-2.1-goolf-1.4.10.eb | 0 .../c/CondaCreate/condacreate-1.0.eb | 37 ---------------- .../c/CondaCreate/requirements.txt | 1 - .../g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb | 19 +++++++++ .../g/GSL/GSL-1.15-goolf-1.4.10.eb | 19 +++++++++ .../g/GSL/GSL-1.15-goolf-1.5.14.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb | 19 +++++++++ .../g/GSL/GSL-1.16-goolf-1.4.10.eb | 19 +++++++++ .../g/GSL/GSL-1.16-goolf-1.5.14.eb | 19 +++++++++ .../g/GSL/GSL-1.16-goolf-1.7.20.eb | 19 +++++++++ .../g/GSL/GSL-1.16-goolfc-1.3.12.eb | 19 +++++++++ .../g/GSL/GSL-1.16-goolfc-2.6.10.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb | 19 +++++++++ .../easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb | 19 +++++++++ .../GraphViz-2.18-intel-2014b-Perl-5.20.0.eb | 0 .../Grep-2.21-GCC-4.9.2.eb | 0 .../g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb | 29 +++++++++++++ .../Mawk-1.3.4-goolf-1.4.10-20150503.eb | 0 35 files changed, 542 insertions(+), 80 deletions(-) delete mode 100644 easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb rename easybuild/easyconfigs/b/{blasr (Case Conflict) => BLASR}/BLASR-2.1-goolf-1.4.10.eb (100%) delete mode 100644 easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb delete mode 100644 easybuild/easyconfigs/c/CondaCreate/requirements.txt create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb rename easybuild/easyconfigs/g/{Graphviz (Case Conflict) => GraphViz}/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb (100%) rename easybuild/easyconfigs/g/{grep (Case Conflict) => Grep}/Grep-2.21-GCC-4.9.2.eb (100%) create mode 100644 easybuild/easyconfigs/g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb rename easybuild/easyconfigs/m/{mawk (Case Conflict) => Mawk}/Mawk-1.3.4-goolf-1.4.10-20150503.eb (100%) diff --git a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb deleted file mode 100644 index bd6762a52c..0000000000 --- a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb +++ /dev/null @@ -1,42 +0,0 @@ -## -# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild -# -# Authors:: Jillian Rowe -# -# This work is based on experiences from the UNITE project -# http://apps.fz-juelich.de/unite/ -## - -easyblock = 'EB_anaconda' - -name = "anaconda" -version = "2-4.0.0" -variant = "Linux-x86_64" - -homepage = "https://www.continuum.io/" -description = """Built to complement the rich, open source Python community, -the Anaconda platform provides an enterprise-ready data analytics platform -that empowers companies to adopt a modern open data science analytics architecture. -""" - -toolchain = {'name': 'dummy', 'version': 'dummy'} - -anaconda_version = 2 - -source_urls = ["http://repo.continuum.io/archive/Anaconda%s-%s.sh" % (version, variant)] -sources = ["Anaconda%s-%s.sh" % (version, variant)] -checksums = [ '31ed3ef07435d7068e1e03be49381b13' ] - -license_file = 'LICENSE.txt' - -sanity_check_paths = { - 'files': ["bin/pydoc"], - 'dirs': [] -} - -modextravars = { - 'ANACONDA_LICENSE': license_file, -} - -moduleclass = 'lang' -##Trailing comment diff --git a/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb b/easybuild/easyconfigs/b/BLASR/BLASR-2.1-goolf-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb rename to easybuild/easyconfigs/b/BLASR/BLASR-2.1-goolf-1.4.10.eb diff --git a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb deleted file mode 100644 index be9caec900..0000000000 --- a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb +++ /dev/null @@ -1,37 +0,0 @@ -## -# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild -# -# Copyright:: Copyright 2013-2015 Juelich Supercomputing Centre, Germany -# Authors:: Bernd Mohr -# Markus Geimer -# License:: 3-clause BSD -# -# This work is based on experiences from the UNITE project -# http://apps.fz-juelich.de/unite/ -## - -easyblock = 'EB_CondaCreate' - -name = "condacreate-env" -version = "1.0" -variant = "Linux-x86_64" - -homepage = "https://github.com/bioconda/bioconda-recipes" -description = """ Conda is a platform- and language-independent package manager that sports easy distribution, installation and version management of software. The bioconda channel is a Conda channel providing bioinformatics related packages. This repository hosts the corresponding recipes. """ - -toolchain = {'name': 'dummy', 'version': 'dummy'} - -sources = ['requirements.txt'] - -requirements = sources[0] -channels = 'bioconda' - -builddependencies = [('anaconda', '2-4.0.0')] - -sanity_check_paths = { - 'files': ["bin/cpanm"], - 'dirs': [] -} - -moduleclass = 'tools' -##Trailing comment diff --git a/easybuild/easyconfigs/c/CondaCreate/requirements.txt b/easybuild/easyconfigs/c/CondaCreate/requirements.txt deleted file mode 100644 index 3806bb01ca..0000000000 --- a/easybuild/easyconfigs/c/CondaCreate/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -perl-app-cpanminus diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..f4197820e5 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb new file mode 100644 index 0000000000..d9295adc89 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. +The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.4.10'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb new file mode 100644 index 0000000000..3230d895d1 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb new file mode 100644 index 0000000000..93b875b8e7 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '4.0.6'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb new file mode 100644 index 0000000000..3e17c8b5d6 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '5.3.0'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb new file mode 100644 index 0000000000..9ef4e74b99 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2014b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb new file mode 100644 index 0000000000..2c856c0c22 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2015a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb new file mode 100644 index 0000000000..426a5fa702 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'foss', 'version': '2015a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb new file mode 100644 index 0000000000..681aa2648b --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'foss', 'version': '2015b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb new file mode 100644 index 0000000000..2cce073a65 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb new file mode 100644 index 0000000000..7481f95582 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.4.10'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb new file mode 100644 index 0000000000..493418d259 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb new file mode 100644 index 0000000000..723ea8a309 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, + special functions and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} +toolchainopts = {'unroll': True, 'pic': True} + +source_urls = ['http://ftpmirror.gnu.org/gsl/'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb new file mode 100644 index 0000000000..0336ef456f --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolfc', 'version': '1.3.12'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb new file mode 100644 index 0000000000..0e558d5644 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolfc', 'version': '2.6.10'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb new file mode 100644 index 0000000000..e3cf37d1e5 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '5.3.0'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb new file mode 100644 index 0000000000..1ee8967b14 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '5.4.0'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb new file mode 100644 index 0000000000..cc561c1cbf --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '5.5.0'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb new file mode 100644 index 0000000000..e1a049a993 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '6.2.5'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb new file mode 100644 index 0000000000..f93fbb1090 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2014b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb new file mode 100644 index 0000000000..207992d0eb --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2015a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb new file mode 100644 index 0000000000..33c068c25d --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2015b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb new file mode 100644 index 0000000000..aaffd974f5 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2016a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb new file mode 100644 index 0000000000..64966f0023 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = "2.1" + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'version': '2015b', 'name': 'foss'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb new file mode 100644 index 0000000000..f4a28c0d8f --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = "2.1" + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'version': '2016a', 'name': 'foss'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb new file mode 100644 index 0000000000..d363055a95 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '2.1' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2015b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb new file mode 100644 index 0000000000..6ff19555c3 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '2.1' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2016a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb b/easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb similarity index 100% rename from easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb rename to easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb diff --git a/easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2.eb b/easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb similarity index 100% rename from easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2.eb rename to easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb diff --git a/easybuild/easyconfigs/g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb b/easybuild/easyconfigs/g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb new file mode 100644 index 0000000000..36d3ba6863 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl/gsl-1.9-10-intel-2014b-R-3.1.1.eb @@ -0,0 +1,29 @@ +easyblock = 'RPackage' + +name = 'gsl' +version = '1.9-10' + +homepage = 'http://cran.r-project.org/web/packages/gsl' +description = """An R wrapper for the special functions and quasi random number generators of the Gnu Scientific + Library (GSL).""" + +toolchain = {'name': 'intel', 'version': '2014b'} + +source_urls = ['http://cran.r-project.org/src/contrib/'] +sources = ['%(name)s_%(version)s.tar.gz'] + +r = 'R' +rver = '3.1.1' +versionsuffix = '-%s-%s' % (r, rver) + +dependencies = [ + (r, rver), + ('GSL', '1.16'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['gsl'], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb b/easybuild/easyconfigs/m/Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb similarity index 100% rename from easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb rename to easybuild/easyconfigs/m/Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb -- GitLab From ab44ab8c3c3edceb96506724b3b6d2180d2dd61e Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Wed, 13 Jul 2016 12:45:39 +0400 Subject: [PATCH 073/741] commiting --- .../GraphViz-2.18-intel-2014b-Perl-5.20.0.eb | 0 .../g/{Grep => grep (Case Conflict)}/Grep-2.21-GCC-4.9.2.eb | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/g/{GraphViz => Graphviz (Case Conflict)}/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb (100%) rename easybuild/easyconfigs/g/{Grep => grep (Case Conflict)}/Grep-2.21-GCC-4.9.2.eb (100%) diff --git a/easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb b/easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb similarity index 100% rename from easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb rename to easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb diff --git a/easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb b/easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2.eb similarity index 100% rename from easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb rename to easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2.eb -- GitLab From 55cf477231502ee522fe4263d42a01bab0a508ff Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Wed, 13 Jul 2016 12:47:00 +0400 Subject: [PATCH 074/741] commiting --- .../BLASR-2.1-goolf-1.4.10 (1).eb} | 0 .../BLASR-2.1-goolf-1.4.10.eb | 37 +++++++++++++++++++ .../GraphViz-2.18-intel-2014b-Perl-5.20.0.eb | 32 ++++++++++++++++ .../easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb | 19 ++++++++++ .../GSL-1.15-goalf-1.1.0-no-OFED.eb | 19 ++++++++++ .../GSL-1.15-goolf-1.4.10.eb | 19 ++++++++++ .../GSL-1.15-goolf-1.5.14.eb | 19 ++++++++++ .../GSL-1.15-ictce-4.0.6.eb | 19 ++++++++++ .../GSL-1.15-ictce-5.3.0.eb | 19 ++++++++++ .../GSL-1.15-intel-2014b.eb | 19 ++++++++++ .../GSL-1.15-intel-2015a.eb | 19 ++++++++++ .../GSL-1.16-foss-2015a.eb | 19 ++++++++++ .../GSL-1.16-foss-2015b.eb | 19 ++++++++++ .../GSL-1.16-foss-2016a.eb | 19 ++++++++++ .../GSL-1.16-goolf-1.4.10.eb | 19 ++++++++++ .../GSL-1.16-goolf-1.5.14.eb | 19 ++++++++++ .../GSL-1.16-goolf-1.7.20.eb | 19 ++++++++++ .../GSL-1.16-goolfc-1.3.12.eb | 19 ++++++++++ .../GSL-1.16-goolfc-2.6.10.eb | 19 ++++++++++ .../GSL-1.16-ictce-5.3.0.eb | 19 ++++++++++ .../GSL-1.16-ictce-5.4.0.eb | 19 ++++++++++ .../GSL-1.16-ictce-5.5.0.eb | 19 ++++++++++ .../GSL-1.16-ictce-6.2.5.eb | 19 ++++++++++ .../GSL-1.16-intel-2014b.eb | 19 ++++++++++ .../GSL-1.16-intel-2015a.eb | 19 ++++++++++ .../GSL-1.16-intel-2015b.eb | 19 ++++++++++ .../GSL-1.16-intel-2016a.eb | 19 ++++++++++ .../gsl (Case Conflict)/GSL-2.1-foss-2015b.eb | 19 ++++++++++ .../gsl (Case Conflict)/GSL-2.1-foss-2016a.eb | 19 ++++++++++ .../GSL-2.1-intel-2015b.eb | 19 ++++++++++ .../GSL-2.1-intel-2016a.eb | 19 ++++++++++ .../Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb} | 0 .../Mawk-1.3.4-goolf-1.4.10-20150503.eb | 27 ++++++++++++++ 33 files changed, 628 insertions(+) rename easybuild/easyconfigs/b/{BLASR/BLASR-2.1-goolf-1.4.10.eb => blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10 (1).eb} (100%) create mode 100644 easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb create mode 100644 easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb create mode 100644 easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb rename easybuild/easyconfigs/m/{Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb => mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb} (100%) create mode 100644 easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb diff --git a/easybuild/easyconfigs/b/BLASR/BLASR-2.1-goolf-1.4.10.eb b/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10 (1).eb similarity index 100% rename from easybuild/easyconfigs/b/BLASR/BLASR-2.1-goolf-1.4.10.eb rename to easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10 (1).eb diff --git a/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb b/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb new file mode 100644 index 0000000000..7b47764f47 --- /dev/null +++ b/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb @@ -0,0 +1,37 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# Swiss Institute of Bioinformatics +# Biozentrum - University of Basel + +easyblock = 'ConfigureMake' + +name = 'BLASR' +version = '2.1' + +homepage = 'https://github.com/PacificBiosciences/blasr' +description = """ BLASR (Basic Local Alignment with Successive Refinement) rapidly maps + reads to genomes by finding the highest scoring local alignment or set of local alignments + between the read and the genome. Optimized for PacBio's extraordinarily long reads and + taking advantage of rich quality values, BLASR maps reads rapidly with high accuracy. """ + +toolchain = {'name': 'goolf', 'version': '1.4.10'} + +source_urls = ['https://github.com/PacificBiosciences/blasr/archive/'] +sources = ['smrtanalysis-%(version)s.tar.gz'] + +dependencies = [('HDF5', '1.8.11')] + +skipsteps = ['configure'] + +# the STATIC= option is a workaround. Check details here: +# https://github.com/PacificBiosciences/blasr/issues/4#issuecomment-44142749 +buildopts = ' STATIC= ' + +installopts = ' INSTALL_BIN_DIR=%(installdir)s/bin' + +sanity_check_paths = { + 'files': ["bin/blasr"], + 'dirs': [], +} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb b/easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb new file mode 100644 index 0000000000..4dc6df7462 --- /dev/null +++ b/easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb @@ -0,0 +1,32 @@ +easyblock = 'PerlModule' + +name = 'GraphViz' +version = '2.18' + +homepage = 'https://metacpan.org/pod/GraphViz' +description = """This module provides a Perl interface to the amazing Graphviz, +an open source graph visualization tool from AT&T.""" + +toolchain = {'name': 'intel', 'version': '2014b'} + +source_urls = ['http://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/'] +sources = [SOURCE_TGZ] + +perl = 'Perl' +perlver = '5.20.0' +versionsuffix = '-%s-%s' % (perl, perlver) + +dependencies = [ + (perl, perlver), + ("Graphviz", "2.38.0"), +] + +options = {'modulename': 'GraphViz'} + +perlmajver = perlver.split('.')[0] +sanity_check_paths = { + 'files': ['lib/perl%s/site_perl/%s/GraphViz.pm' % (perlmajver, perlver)], + 'dirs': ['lib/perl%s/site_perl/%s/GraphViz' % (perlmajver, perlver)], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb b/easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb new file mode 100644 index 0000000000..43c5a459fa --- /dev/null +++ b/easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'Grep' +version = '2.21' + +homepage = 'http://www.gnu.org/software/grep/' +description = """The grep command searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines.""" + +toolchain = {'name': 'GCC', 'version': '4.9.2'} + +sources = [SOURCELOWER_TAR_XZ] +source_urls = ['http://ftp.gnu.org/gnu/%(namelower)s'] + +sanity_check_paths = { + 'files': [], + 'dirs': ["bin"] +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb new file mode 100644 index 0000000000..f4197820e5 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb new file mode 100644 index 0000000000..d9295adc89 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. +The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.4.10'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb new file mode 100644 index 0000000000..3230d895d1 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb new file mode 100644 index 0000000000..93b875b8e7 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '4.0.6'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb new file mode 100644 index 0000000000..3e17c8b5d6 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '5.3.0'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb new file mode 100644 index 0000000000..9ef4e74b99 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2014b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb new file mode 100644 index 0000000000..2c856c0c22 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.15' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2015a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb new file mode 100644 index 0000000000..426a5fa702 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'foss', 'version': '2015a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb new file mode 100644 index 0000000000..681aa2648b --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'foss', 'version': '2015b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb new file mode 100644 index 0000000000..2cce073a65 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb new file mode 100644 index 0000000000..7481f95582 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.4.10'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb new file mode 100644 index 0000000000..493418d259 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb new file mode 100644 index 0000000000..723ea8a309 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, + special functions and least-squares fitting.""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} +toolchainopts = {'unroll': True, 'pic': True} + +source_urls = ['http://ftpmirror.gnu.org/gsl/'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb new file mode 100644 index 0000000000..0336ef456f --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolfc', 'version': '1.3.12'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb new file mode 100644 index 0000000000..0e558d5644 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'goolfc', 'version': '2.6.10'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb new file mode 100644 index 0000000000..e3cf37d1e5 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '5.3.0'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb new file mode 100644 index 0000000000..1ee8967b14 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '5.4.0'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb new file mode 100644 index 0000000000..cc561c1cbf --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '5.5.0'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb new file mode 100644 index 0000000000..e1a049a993 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'ictce', 'version': '6.2.5'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb new file mode 100644 index 0000000000..f93fbb1090 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2014b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb new file mode 100644 index 0000000000..207992d0eb --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2015a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb new file mode 100644 index 0000000000..33c068c25d --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2015b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb new file mode 100644 index 0000000000..aaffd974f5 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '1.16' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2016a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb new file mode 100644 index 0000000000..64966f0023 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = "2.1" + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'version': '2015b', 'name': 'foss'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb new file mode 100644 index 0000000000..f4a28c0d8f --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = "2.1" + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'version': '2016a', 'name': 'foss'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb new file mode 100644 index 0000000000..d363055a95 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '2.1' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2015b'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb new file mode 100644 index 0000000000..6ff19555c3 --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '2.1' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2016a'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/m/Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb b/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb similarity index 100% rename from easybuild/easyconfigs/m/Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb rename to easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb diff --git a/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb b/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb new file mode 100644 index 0000000000..7235621e5d --- /dev/null +++ b/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb @@ -0,0 +1,27 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'ConfigureMake' + +name = 'Mawk' +version = '1.3.4' +versionsuffix = '-20150503' + +homepage = 'http://invisible-island.net/mawk/' +description = """mawk is an interpreter for the AWK Programming Language.""" + +toolchain = {'name': 'goolf', 'version': '1.4.10'} + +source_urls = ['ftp://invisible-island.net/mawk/'] +sources = ['%(namelower)s-%(version)s%(versionsuffix)s.tgz'] + +parallel = 1 + +sanity_check_paths = { + 'files': ['bin/mawk'], + 'dirs': [], +} + +moduleclass = 'tools' -- GitLab From 371c7c1f2963580e5d1db78288c86ce2cb3860bb Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Wed, 13 Jul 2016 12:54:04 +0400 Subject: [PATCH 075/741] fix master and then develop --- ...phViz-2.18-intel-2014b-Perl-5.20.0 (1).eb} | 0 .../Grep-2.21-GCC-4.9.2 (1).eb} | 0 .../GSL-1.15-goalf-1.1.0-no-OFED (1).eb} | 0 .../GSL-1.15-goolf-1.4.10 (1).eb} | 0 .../GSL-1.15-goolf-1.5.14 (1).eb} | 0 .../GSL-1.15-ictce-4.0.6 (1).eb} | 0 .../GSL-1.15-ictce-5.3.0 (1).eb} | 0 .../GSL-1.15-intel-2014b (1).eb} | 0 .../GSL-1.15-intel-2015a (1).eb} | 0 .../GSL-1.16-foss-2015a (1).eb} | 0 .../GSL-1.16-foss-2015b (1).eb} | 0 .../GSL-1.16-foss-2016a (1).eb} | 0 .../GSL-1.16-goolf-1.4.10 (1).eb} | 0 .../GSL-1.16-goolf-1.5.14 (1).eb} | 0 .../GSL-1.16-goolf-1.7.20 (1).eb} | 0 .../GSL-1.16-goolfc-1.3.12 (1).eb} | 0 .../GSL-1.16-goolfc-2.6.10 (1).eb} | 0 .../GSL-1.16-ictce-5.3.0 (1).eb} | 0 .../GSL-1.16-ictce-5.4.0 (1).eb} | 0 .../GSL-1.16-ictce-5.5.0 (1).eb} | 0 .../GSL-1.16-ictce-6.2.5 (1).eb} | 0 .../GSL-1.16-intel-2014b (1).eb} | 0 .../GSL-1.16-intel-2015a (1).eb} | 0 .../GSL-1.16-intel-2015b (1).eb} | 0 .../GSL-1.16-intel-2016a (1).eb} | 0 .../GSL-2.1-CrayGNU-2015.11.eb | 24 +++++++++++++++ .../GSL-2.1-foss-2015b (1).eb} | 0 .../GSL-2.1-foss-2016a (1).eb} | 0 .../GSL-2.1-intel-2015b (1).eb} | 0 .../GSL-2.1-intel-2016a (1).eb} | 0 .../Guile-2.0.11-foss-2016a.eb | 30 +++++++++++++++++++ 31 files changed, 54 insertions(+) rename easybuild/easyconfigs/g/{GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb => Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0 (1).eb} (100%) rename easybuild/easyconfigs/g/{Grep/Grep-2.21-GCC-4.9.2.eb => grep (Case Conflict)/Grep-2.21-GCC-4.9.2 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb => gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.15-goolf-1.4.10.eb => gsl (Case Conflict)/GSL-1.15-goolf-1.4.10 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.15-goolf-1.5.14.eb => gsl (Case Conflict)/GSL-1.15-goolf-1.5.14 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.15-ictce-4.0.6.eb => gsl (Case Conflict)/GSL-1.15-ictce-4.0.6 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.15-ictce-5.3.0.eb => gsl (Case Conflict)/GSL-1.15-ictce-5.3.0 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.15-intel-2014b.eb => gsl (Case Conflict)/GSL-1.15-intel-2014b (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.15-intel-2015a.eb => gsl (Case Conflict)/GSL-1.15-intel-2015a (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-foss-2015a.eb => gsl (Case Conflict)/GSL-1.16-foss-2015a (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-foss-2015b.eb => gsl (Case Conflict)/GSL-1.16-foss-2015b (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-foss-2016a.eb => gsl (Case Conflict)/GSL-1.16-foss-2016a (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-goolf-1.4.10.eb => gsl (Case Conflict)/GSL-1.16-goolf-1.4.10 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-goolf-1.5.14.eb => gsl (Case Conflict)/GSL-1.16-goolf-1.5.14 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-goolf-1.7.20.eb => gsl (Case Conflict)/GSL-1.16-goolf-1.7.20 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-goolfc-1.3.12.eb => gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-goolfc-2.6.10.eb => gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-ictce-5.3.0.eb => gsl (Case Conflict)/GSL-1.16-ictce-5.3.0 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-ictce-5.4.0.eb => gsl (Case Conflict)/GSL-1.16-ictce-5.4.0 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-ictce-5.5.0.eb => gsl (Case Conflict)/GSL-1.16-ictce-5.5.0 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-ictce-6.2.5.eb => gsl (Case Conflict)/GSL-1.16-ictce-6.2.5 (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-intel-2014b.eb => gsl (Case Conflict)/GSL-1.16-intel-2014b (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-intel-2015a.eb => gsl (Case Conflict)/GSL-1.16-intel-2015a (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-intel-2015b.eb => gsl (Case Conflict)/GSL-1.16-intel-2015b (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-1.16-intel-2016a.eb => gsl (Case Conflict)/GSL-1.16-intel-2016a (1).eb} (100%) create mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-CrayGNU-2015.11.eb rename easybuild/easyconfigs/g/{GSL/GSL-2.1-foss-2015b.eb => gsl (Case Conflict)/GSL-2.1-foss-2015b (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-2.1-foss-2016a.eb => gsl (Case Conflict)/GSL-2.1-foss-2016a (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-2.1-intel-2015b.eb => gsl (Case Conflict)/GSL-2.1-intel-2015b (1).eb} (100%) rename easybuild/easyconfigs/g/{GSL/GSL-2.1-intel-2016a.eb => gsl (Case Conflict)/GSL-2.1-intel-2016a (1).eb} (100%) create mode 100644 easybuild/easyconfigs/g/guile (Case Conflict)/Guile-2.0.11-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb b/easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb rename to easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0 (1).eb diff --git a/easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb b/easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb rename to easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5 (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5 (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a (1).eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-CrayGNU-2015.11.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-CrayGNU-2015.11.eb new file mode 100644 index 0000000000..378ea5f63e --- /dev/null +++ b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-CrayGNU-2015.11.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '2.1' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'CrayGNU', 'version': '2015.11'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +sanity_check_paths={ + 'files': ['lib/libgsl.so', 'lib/libgsl.a'], + 'dirs': ['include'], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b (1).eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a (1).eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb rename to easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a (1).eb diff --git a/easybuild/easyconfigs/g/guile (Case Conflict)/Guile-2.0.11-foss-2016a.eb b/easybuild/easyconfigs/g/guile (Case Conflict)/Guile-2.0.11-foss-2016a.eb new file mode 100644 index 0000000000..94a0abd7af --- /dev/null +++ b/easybuild/easyconfigs/g/guile (Case Conflict)/Guile-2.0.11-foss-2016a.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'Guile' +version = '2.0.11' + +homepage = 'https://www.gnu.org/software/guile/' +description = """Guile is a programming language, designed to help programmers create flexible applications that + can be extended by users or other programmers with plug-ins, modules, or scripts.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [('Autotools', '20150215')] +dependencies = [ + ('libunistring', '0.9.3'), + ('libffi', '3.2.1'), + ('gc', '7.4.4'), + ('GMP', '6.1.0'), +] + +sanity_check_paths = { + 'files': ['bin/guild', 'bin/guile', 'bin/guile-config', 'bin/guile-snarf', 'bin/guile-tools', + 'include/guile/%(version_major_minor)s/libguile.h', + 'lib/libguile-%(version_major_minor)s.a', 'lib/libguile-%%(version_major_minor)s.%s' % SHLIB_EXT], + 'dirs': ['include/guile/%(version_major_minor)s/libguile', 'lib/guile/%(version_major_minor)s/ccache'], +} + +moduleclass = 'lang' -- GitLab From 3f0e33a5010934ced203e7ccb9e316fa02165218 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Wed, 13 Jul 2016 12:55:52 +0400 Subject: [PATCH 076/741] commiting --- .../BLASR-2.1-goolf-1.4.10.eb | 0 .../BLASR-2.1-goolf-1.4.10 (1).eb | 37 ------------------- .../GSL-1.15-goalf-1.1.0-no-OFED.eb | 0 .../GSL-1.15-goolf-1.4.10.eb | 0 .../GSL-1.15-goolf-1.5.14.eb | 0 .../GSL-1.15-ictce-4.0.6.eb | 0 .../GSL-1.15-ictce-5.3.0.eb | 0 .../GSL-1.15-intel-2014b.eb | 0 .../GSL-1.15-intel-2015a.eb | 0 .../GSL-1.16-foss-2015a.eb | 0 .../GSL-1.16-foss-2015b.eb | 0 .../GSL-1.16-foss-2016a.eb | 0 .../GSL-1.16-goolf-1.4.10.eb | 0 .../GSL-1.16-goolf-1.5.14.eb | 0 .../GSL-1.16-goolf-1.7.20.eb | 0 .../GSL-1.16-goolfc-1.3.12.eb | 0 .../GSL-1.16-goolfc-2.6.10.eb | 0 .../GSL-1.16-ictce-5.3.0.eb | 0 .../GSL-1.16-ictce-5.4.0.eb | 0 .../GSL-1.16-ictce-5.5.0.eb | 0 .../GSL-1.16-ictce-6.2.5.eb | 0 .../GSL-1.16-intel-2014b.eb | 0 .../GSL-1.16-intel-2015a.eb | 0 .../GSL-1.16-intel-2015b.eb | 0 .../GSL-1.16-intel-2016a.eb | 0 .../GSL-2.1-foss-2015b.eb | 0 .../GSL-2.1-foss-2016a.eb | 0 .../GSL-2.1-intel-2015b.eb | 0 .../GSL-2.1-intel-2016a.eb | 0 .../GraphViz-2.18-intel-2014b-Perl-5.20.0.eb | 0 ...aphViz-2.18-intel-2014b-Perl-5.20.0 (1).eb | 32 ---------------- .../Grep-2.21-GCC-4.9.2.eb | 0 .../Grep-2.21-GCC-4.9.2 (1).eb | 19 ---------- .../GSL-1.15-goalf-1.1.0-no-OFED (1).eb | 19 ---------- .../GSL-1.15-goolf-1.4.10 (1).eb | 19 ---------- .../GSL-1.15-goolf-1.5.14 (1).eb | 19 ---------- .../GSL-1.15-ictce-4.0.6 (1).eb | 19 ---------- .../GSL-1.15-ictce-5.3.0 (1).eb | 19 ---------- .../GSL-1.15-intel-2014b (1).eb | 19 ---------- .../GSL-1.15-intel-2015a (1).eb | 19 ---------- .../GSL-1.16-foss-2015a (1).eb | 19 ---------- .../GSL-1.16-foss-2015b (1).eb | 19 ---------- .../GSL-1.16-foss-2016a (1).eb | 19 ---------- .../GSL-1.16-goolf-1.4.10 (1).eb | 19 ---------- .../GSL-1.16-goolf-1.5.14 (1).eb | 19 ---------- .../GSL-1.16-goolf-1.7.20 (1).eb | 19 ---------- .../GSL-1.16-goolfc-1.3.12 (1).eb | 19 ---------- .../GSL-1.16-goolfc-2.6.10 (1).eb | 19 ---------- .../GSL-1.16-ictce-5.3.0 (1).eb | 19 ---------- .../GSL-1.16-ictce-5.4.0 (1).eb | 19 ---------- .../GSL-1.16-ictce-5.5.0 (1).eb | 19 ---------- .../GSL-1.16-ictce-6.2.5 (1).eb | 19 ---------- .../GSL-1.16-intel-2014b (1).eb | 19 ---------- .../GSL-1.16-intel-2015a (1).eb | 19 ---------- .../GSL-1.16-intel-2015b (1).eb | 19 ---------- .../GSL-1.16-intel-2016a (1).eb | 19 ---------- .../GSL-2.1-CrayGNU-2015.11.eb | 24 ------------ .../GSL-2.1-foss-2015b (1).eb | 19 ---------- .../GSL-2.1-foss-2016a (1).eb | 19 ---------- .../GSL-2.1-intel-2015b (1).eb | 19 ---------- .../GSL-2.1-intel-2016a (1).eb | 19 ---------- .../Guile-2.0.11-foss-2016a.eb | 30 --------------- .../Mawk-1.3.4-goolf-1.4.10-20150503.eb | 0 .../Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb | 27 -------------- 64 files changed, 682 deletions(-) rename easybuild/easyconfigs/b/{blasr (Case Conflict) => BLASR}/BLASR-2.1-goolf-1.4.10.eb (100%) delete mode 100644 easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10 (1).eb rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.15-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.15-goolf-1.4.10.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.15-goolf-1.5.14.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.15-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.15-ictce-5.3.0.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.15-intel-2014b.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.15-intel-2015a.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-foss-2015a.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-foss-2015b.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-foss-2016a.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-goolf-1.4.10.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-goolf-1.5.14.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-goolf-1.7.20.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-goolfc-1.3.12.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-goolfc-2.6.10.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-ictce-5.3.0.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-ictce-5.4.0.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-ictce-5.5.0.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-ictce-6.2.5.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-intel-2014b.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-intel-2015a.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-intel-2015b.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-1.16-intel-2016a.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-2.1-foss-2015b.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-2.1-foss-2016a.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-2.1-intel-2015b.eb (100%) rename easybuild/easyconfigs/g/{gsl (Case Conflict) => GSL}/GSL-2.1-intel-2016a.eb (100%) rename easybuild/easyconfigs/g/{Graphviz (Case Conflict) => GraphViz}/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb (100%) delete mode 100644 easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0 (1).eb rename easybuild/easyconfigs/g/{grep (Case Conflict) => Grep}/Grep-2.21-GCC-4.9.2.eb (100%) delete mode 100644 easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5 (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-CrayGNU-2015.11.eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b (1).eb delete mode 100644 easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a (1).eb delete mode 100644 easybuild/easyconfigs/g/guile (Case Conflict)/Guile-2.0.11-foss-2016a.eb rename easybuild/easyconfigs/m/{mawk (Case Conflict) => Mawk}/Mawk-1.3.4-goolf-1.4.10-20150503.eb (100%) delete mode 100644 easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb diff --git a/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb b/easybuild/easyconfigs/b/BLASR/BLASR-2.1-goolf-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10.eb rename to easybuild/easyconfigs/b/BLASR/BLASR-2.1-goolf-1.4.10.eb diff --git a/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10 (1).eb b/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10 (1).eb deleted file mode 100644 index 7b47764f47..0000000000 --- a/easybuild/easyconfigs/b/blasr (Case Conflict)/BLASR-2.1-goolf-1.4.10 (1).eb +++ /dev/null @@ -1,37 +0,0 @@ -# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild -# Author: Pablo Escobar Lopez -# Swiss Institute of Bioinformatics -# Biozentrum - University of Basel - -easyblock = 'ConfigureMake' - -name = 'BLASR' -version = '2.1' - -homepage = 'https://github.com/PacificBiosciences/blasr' -description = """ BLASR (Basic Local Alignment with Successive Refinement) rapidly maps - reads to genomes by finding the highest scoring local alignment or set of local alignments - between the read and the genome. Optimized for PacBio's extraordinarily long reads and - taking advantage of rich quality values, BLASR maps reads rapidly with high accuracy. """ - -toolchain = {'name': 'goolf', 'version': '1.4.10'} - -source_urls = ['https://github.com/PacificBiosciences/blasr/archive/'] -sources = ['smrtanalysis-%(version)s.tar.gz'] - -dependencies = [('HDF5', '1.8.11')] - -skipsteps = ['configure'] - -# the STATIC= option is a workaround. Check details here: -# https://github.com/PacificBiosciences/blasr/issues/4#issuecomment-44142749 -buildopts = ' STATIC= ' - -installopts = ' INSTALL_BIN_DIR=%(installdir)s/bin' - -sanity_check_paths = { - 'files': ["bin/blasr"], - 'dirs': [], -} - -moduleclass = 'bio' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.4.10.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.15-goolf-1.5.14.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-5.3.0.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2014b.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.15-intel-2015a.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015a.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2015b.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.4.10.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.5.14.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.3.0.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.4.0.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-5.5.0.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-ictce-6.2.5.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2014b.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015a.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2015b.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a.eb rename to easybuild/easyconfigs/g/GSL/GSL-1.16-intel-2016a.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b.eb rename to easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2015b.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a.eb rename to easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b.eb rename to easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2015b.eb diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb similarity index 100% rename from easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a.eb rename to easybuild/easyconfigs/g/GSL/GSL-2.1-intel-2016a.eb diff --git a/easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb b/easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb similarity index 100% rename from easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb rename to easybuild/easyconfigs/g/GraphViz/GraphViz-2.18-intel-2014b-Perl-5.20.0.eb diff --git a/easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0 (1).eb b/easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0 (1).eb deleted file mode 100644 index 4dc6df7462..0000000000 --- a/easybuild/easyconfigs/g/Graphviz (Case Conflict)/GraphViz-2.18-intel-2014b-Perl-5.20.0 (1).eb +++ /dev/null @@ -1,32 +0,0 @@ -easyblock = 'PerlModule' - -name = 'GraphViz' -version = '2.18' - -homepage = 'https://metacpan.org/pod/GraphViz' -description = """This module provides a Perl interface to the amazing Graphviz, -an open source graph visualization tool from AT&T.""" - -toolchain = {'name': 'intel', 'version': '2014b'} - -source_urls = ['http://cpan.metacpan.org/authors/id/R/RS/RSAVAGE/'] -sources = [SOURCE_TGZ] - -perl = 'Perl' -perlver = '5.20.0' -versionsuffix = '-%s-%s' % (perl, perlver) - -dependencies = [ - (perl, perlver), - ("Graphviz", "2.38.0"), -] - -options = {'modulename': 'GraphViz'} - -perlmajver = perlver.split('.')[0] -sanity_check_paths = { - 'files': ['lib/perl%s/site_perl/%s/GraphViz.pm' % (perlmajver, perlver)], - 'dirs': ['lib/perl%s/site_perl/%s/GraphViz' % (perlmajver, perlver)], -} - -moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2.eb b/easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb similarity index 100% rename from easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2.eb rename to easybuild/easyconfigs/g/Grep/Grep-2.21-GCC-4.9.2.eb diff --git a/easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2 (1).eb b/easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2 (1).eb deleted file mode 100644 index 43c5a459fa..0000000000 --- a/easybuild/easyconfigs/g/grep (Case Conflict)/Grep-2.21-GCC-4.9.2 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'Grep' -version = '2.21' - -homepage = 'http://www.gnu.org/software/grep/' -description = """The grep command searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines.""" - -toolchain = {'name': 'GCC', 'version': '4.9.2'} - -sources = [SOURCELOWER_TAR_XZ] -source_urls = ['http://ftp.gnu.org/gnu/%(namelower)s'] - -sanity_check_paths = { - 'files': [], - 'dirs': ["bin"] -} - -moduleclass = 'tools' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED (1).eb deleted file mode 100644 index f4197820e5..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goalf-1.1.0-no-OFED (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10 (1).eb deleted file mode 100644 index d9295adc89..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.4.10 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. -The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.4.10'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14 (1).eb deleted file mode 100644 index 3230d895d1..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-goolf-1.5.14 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.5.14'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6 (1).eb deleted file mode 100644 index 93b875b8e7..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-4.0.6 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '4.0.6'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0 (1).eb deleted file mode 100644 index 3e17c8b5d6..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-ictce-5.3.0 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '5.3.0'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b (1).eb deleted file mode 100644 index 9ef4e74b99..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2014b (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2014b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a (1).eb deleted file mode 100644 index 2c856c0c22..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.15-intel-2015a (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.15' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2015a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a (1).eb deleted file mode 100644 index 426a5fa702..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015a (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'foss', 'version': '2015a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b (1).eb deleted file mode 100644 index 681aa2648b..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2015b (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'foss', 'version': '2015b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a (1).eb deleted file mode 100644 index 2cce073a65..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-foss-2016a (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'foss', 'version': '2016a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10 (1).eb deleted file mode 100644 index 7481f95582..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.4.10 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.4.10'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14 (1).eb deleted file mode 100644 index 493418d259..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.5.14 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.5.14'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20 (1).eb deleted file mode 100644 index 723ea8a309..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolf-1.7.20 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, - special functions and least-squares fitting.""" - -toolchain = {'name': 'goolf', 'version': '1.7.20'} -toolchainopts = {'unroll': True, 'pic': True} - -source_urls = ['http://ftpmirror.gnu.org/gsl/'] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12 (1).eb deleted file mode 100644 index 0336ef456f..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-1.3.12 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolfc', 'version': '1.3.12'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10 (1).eb deleted file mode 100644 index 0e558d5644..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-goolfc-2.6.10 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'goolfc', 'version': '2.6.10'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0 (1).eb deleted file mode 100644 index e3cf37d1e5..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.3.0 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '5.3.0'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0 (1).eb deleted file mode 100644 index 1ee8967b14..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.4.0 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '5.4.0'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0 (1).eb deleted file mode 100644 index cc561c1cbf..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-5.5.0 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '5.5.0'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5 (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5 (1).eb deleted file mode 100644 index e1a049a993..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-ictce-6.2.5 (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'ictce', 'version': '6.2.5'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b (1).eb deleted file mode 100644 index f93fbb1090..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2014b (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2014b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a (1).eb deleted file mode 100644 index 207992d0eb..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015a (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2015a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b (1).eb deleted file mode 100644 index 33c068c25d..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2015b (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2015b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a (1).eb deleted file mode 100644 index aaffd974f5..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-1.16-intel-2016a (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '1.16' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2016a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-CrayGNU-2015.11.eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-CrayGNU-2015.11.eb deleted file mode 100644 index 378ea5f63e..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-CrayGNU-2015.11.eb +++ /dev/null @@ -1,24 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '2.1' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'CrayGNU', 'version': '2015.11'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -sanity_check_paths={ - 'files': ['lib/libgsl.so', 'lib/libgsl.a'], - 'dirs': ['include'], -} - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b (1).eb deleted file mode 100644 index 64966f0023..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2015b (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = "2.1" - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'version': '2015b', 'name': 'foss'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a (1).eb deleted file mode 100644 index f4a28c0d8f..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-foss-2016a (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = "2.1" - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'version': '2016a', 'name': 'foss'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b (1).eb deleted file mode 100644 index d363055a95..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2015b (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '2.1' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2015b'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a (1).eb b/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a (1).eb deleted file mode 100644 index 6ff19555c3..0000000000 --- a/easybuild/easyconfigs/g/gsl (Case Conflict)/GSL-2.1-intel-2016a (1).eb +++ /dev/null @@ -1,19 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'GSL' -version = '2.1' - -homepage = 'http://www.gnu.org/software/gsl/' -description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. - The library provides a wide range of mathematical routines such as random number generators, special functions - and least-squares fitting.""" - -toolchain = {'name': 'intel', 'version': '2016a'} -toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -configopts = "--with-pic" - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/guile (Case Conflict)/Guile-2.0.11-foss-2016a.eb b/easybuild/easyconfigs/g/guile (Case Conflict)/Guile-2.0.11-foss-2016a.eb deleted file mode 100644 index 94a0abd7af..0000000000 --- a/easybuild/easyconfigs/g/guile (Case Conflict)/Guile-2.0.11-foss-2016a.eb +++ /dev/null @@ -1,30 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'Guile' -version = '2.0.11' - -homepage = 'https://www.gnu.org/software/guile/' -description = """Guile is a programming language, designed to help programmers create flexible applications that - can be extended by users or other programmers with plug-ins, modules, or scripts.""" - -toolchain = {'name': 'foss', 'version': '2016a'} - -source_urls = [GNU_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -builddependencies = [('Autotools', '20150215')] -dependencies = [ - ('libunistring', '0.9.3'), - ('libffi', '3.2.1'), - ('gc', '7.4.4'), - ('GMP', '6.1.0'), -] - -sanity_check_paths = { - 'files': ['bin/guild', 'bin/guile', 'bin/guile-config', 'bin/guile-snarf', 'bin/guile-tools', - 'include/guile/%(version_major_minor)s/libguile.h', - 'lib/libguile-%(version_major_minor)s.a', 'lib/libguile-%%(version_major_minor)s.%s' % SHLIB_EXT], - 'dirs': ['include/guile/%(version_major_minor)s/libguile', 'lib/guile/%(version_major_minor)s/ccache'], -} - -moduleclass = 'lang' diff --git a/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb b/easybuild/easyconfigs/m/Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb similarity index 100% rename from easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503.eb rename to easybuild/easyconfigs/m/Mawk/Mawk-1.3.4-goolf-1.4.10-20150503.eb diff --git a/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb b/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb deleted file mode 100644 index 7235621e5d..0000000000 --- a/easybuild/easyconfigs/m/mawk (Case Conflict)/Mawk-1.3.4-goolf-1.4.10-20150503 (1).eb +++ /dev/null @@ -1,27 +0,0 @@ -# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild -# Author: Pablo Escobar Lopez -# sciCORE - University of Basel -# SIB Swiss Institute of Bioinformatics - -easyblock = 'ConfigureMake' - -name = 'Mawk' -version = '1.3.4' -versionsuffix = '-20150503' - -homepage = 'http://invisible-island.net/mawk/' -description = """mawk is an interpreter for the AWK Programming Language.""" - -toolchain = {'name': 'goolf', 'version': '1.4.10'} - -source_urls = ['ftp://invisible-island.net/mawk/'] -sources = ['%(namelower)s-%(version)s%(versionsuffix)s.tgz'] - -parallel = 1 - -sanity_check_paths = { - 'files': ['bin/mawk'], - 'dirs': [], -} - -moduleclass = 'tools' -- GitLab From 0a772d2e45601c2586924cd8bab9da35453f840f Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 14 Jul 2016 18:36:37 +0200 Subject: [PATCH 077/741] GST-plugins with foss2016a --- .../cairo-1.14.6-foss-2016a-GLib-2.48.0.eb | 53 +++++++++++++++++++ ...GObject-Introspection-1.48.0-foss-2016a.eb | 48 +++++++++++++++++ .../GST-plugins-base-1.9.1-foss-2016a.eb | 42 +++++++++++++++ .../g/GStreamer/GStreamer-1.9.1-foss-2016a.eb | 38 +++++++++++++ 4 files changed, 181 insertions(+) create mode 100644 easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb create mode 100644 easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.48.0-foss-2016a.eb create mode 100644 easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb create mode 100644 easybuild/easyconfigs/g/GStreamer/GStreamer-1.9.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb new file mode 100644 index 0000000000..d3ff41d3f3 --- /dev/null +++ b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb @@ -0,0 +1,53 @@ +easyblock = 'ConfigureMake' + +name = 'cairo' +version = '1.14.6' +glibver = '2.48.0' +versionsuffix = '-GLib-%s' % glibver + +homepage = 'http://cairographics.org' +description = """Cairo is a 2D graphics library with support for multiple output devices. + Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, + PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://cairographics.org/releases/'] +sources = [SOURCE_TAR_XZ] + +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libpng', '1.6.21'), + ('freetype', '2.6.3'), + ('pixman', '0.34.0'), + ('fontconfig', '2.11.95'), + ('expat', '2.1.1'), + ('GLib', glibver), + ('libX11', '1.6.3'), + ('libxcb', '1.11.1'), + ('libXrender', '0.9.9'), + ('libXext', '1.3.3'), + ('libXau', '1.0.8'), + ('libXdmcp', '1.1.2'), +] +builddependencies = [ + ('renderproto', '0.11'), + ('xproto', '7.0.28'), + ('xextproto', '7.3.0'), +] + +# disable symbol lookup, which requires -lbfd, to avoid link issues with (non-PIC) libiberty.a provided by GCC +configopts = "--enable-symbol-lookup=no --enable-gobject=yes --enable-svg=yes --enable-tee=yes " + +sanity_check_paths = { + 'files': ['bin/cairo-trace', 'lib/cairo/libcairo-trace.so', 'lib/cairo/libcairo-trace.a', + 'lib/libcairo.a', 'lib/libcairo-gobject.a', 'lib/libcairo-script-interpreter.a', + 'lib/libcairo-gobject.so', 'lib/libcairo-script-interpreter.so', 'lib/libcairo.so'] + + ['include/cairo/cairo%s.h' % x for x in ['', '-deprecated', '-features', '-ft', '-gobject', '-pdf', '-ps', + '-script', '-script-interpreter', '-svg', '-version', '-xcb', + '-xlib', '-xlib-xrender']], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.48.0-foss-2016a.eb b/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.48.0-foss-2016a.eb new file mode 100644 index 0000000000..e8ddb76e89 --- /dev/null +++ b/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.48.0-foss-2016a.eb @@ -0,0 +1,48 @@ +easyblock = 'ConfigureMake' + +name = 'GObject-Introspection' +version = '1.48.0' + +homepage = 'https://wiki.gnome.org/GObjectIntrospection/' +description = """GObject introspection is a middleware layer between C libraries + (using GObject) and language bindings. The C library can be scanned at + compile time and generate a metadata file, in addition to the actual + native C library. Then at runtime, language bindings can read this + metadata and automatically provide bindings to call into the C library.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +glibver = '2.48.0' +dependencies = [ + ('Python', '2.7.11'), + ('GLib', glibver), + ('libffi', '3.2.1'), +] + +builddependencies = [ + ('Autotools', '20150215'), + ('flex', '2.6.0'), + ('Bison', '3.0.4'), + ('cairo', '1.14.6', '-GLib-%s' % glibver), +] + +preconfigopts = "env GI_SCANNER_DISABLE_CACHE=true " + +# avoid using hard-coded path to 'python' in shebang of scripts +buildopts = "PYTHON=python" + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +sanity_check_paths = { + 'files': ['bin/g-ir-%s' % x for x in ['annotation-tool', 'compiler', 'generate', 'scanner']] + + ['lib/libgirepository-1.0.%s' % x for x in ['so', 'a']], + 'dirs': ['include', 'share'] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb new file mode 100644 index 0000000000..34dd19beae --- /dev/null +++ b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb @@ -0,0 +1,42 @@ +easyblock = 'ConfigureMake' + +name = 'GST-plugins-base' +version = '1.9.1' + +homepage = 'http://gstreamer.freedesktop.org/' +description = """GStreamer is a library for constructing graphs of media-handling + components. The applications it supports range from simple + Ogg/Vorbis playback, audio/video streaming to complex audio + (mixing) and video (non-linear editing) processing.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://gstreamer.freedesktop.org/src/gst-plugins-base'] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('GStreamer', '1.9.1'), + ('Automake', '1.15'), + ('Autoconf', '2.69'), + ('gettext', '0.19.7'), +] + +# does not work with Bison 3.x +builddependencies = [ + ('XZ', '5.2.2'), + ('libtool', '2.4.6'), + ('pkgconfig', '1.1.0', '-Python-2.7.11'), +] + +sanity_check_paths = { + 'files': ['bin/gst-%s-1.0' % x for x in ['discoverer', 'play', 'device-monitor']] + + ['lib/libgst%s-1.0.%s' % (x, SHLIB_EXT) for x in ['app', 'audio', 'video']], + 'dirs': ['include', 'share'] +} + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/GStreamer/GStreamer-1.9.1-foss-2016a.eb b/easybuild/easyconfigs/g/GStreamer/GStreamer-1.9.1-foss-2016a.eb new file mode 100644 index 0000000000..6fb42440e5 --- /dev/null +++ b/easybuild/easyconfigs/g/GStreamer/GStreamer-1.9.1-foss-2016a.eb @@ -0,0 +1,38 @@ +easyblock = 'ConfigureMake' + +name = 'GStreamer' +version = '1.9.1' + +homepage = 'http://gstreamer.freedesktop.org/' +description = """GStreamer is a library for constructing graphs of media-handling + components. The applications it supports range from simple + Ogg/Vorbis playback, audio/video streaming to complex audio + (mixing) and video (non-linear editing) processing.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://gstreamer.freedesktop.org/src/gstreamer'] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('GLib', '2.48.0'), + ('GObject-Introspection', '1.48.0'), + ('zlib', '1.2.8'), +] + +# does not work with Bison 3.x +builddependencies = [ + ('Bison', '3.0.4'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['include', 'share', 'libexec'], +} + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' -- GitLab From 9b5a7271b8f67280599be002f49adbb91392d4f2 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 14 Jul 2016 20:30:50 +0200 Subject: [PATCH 078/741] GLib dep down, order matters --- .../easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb index d3ff41d3f3..9259854841 100644 --- a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb +++ b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb @@ -23,13 +23,13 @@ dependencies = [ ('pixman', '0.34.0'), ('fontconfig', '2.11.95'), ('expat', '2.1.1'), - ('GLib', glibver), ('libX11', '1.6.3'), ('libxcb', '1.11.1'), ('libXrender', '0.9.9'), ('libXext', '1.3.3'), ('libXau', '1.0.8'), ('libXdmcp', '1.1.2'), + ('GLib', glibver), ] builddependencies = [ ('renderproto', '0.11'), -- GitLab From 6fee974e4d050782c5f52c95f72abb566a5f12b7 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 14 Jul 2016 20:38:28 +0200 Subject: [PATCH 079/741] GConf with foss2016a --- .../d/DBus/DBus-1.10.8-foss-2016a.eb | 24 ++++++++++++ .../d/dbus-glib/dbus-glib-0.106-foss-2016a.eb | 25 ++++++++++++ .../g/GConf/GConf-3.2.6-foss-2016a.eb | 39 +++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 easybuild/easyconfigs/d/DBus/DBus-1.10.8-foss-2016a.eb create mode 100644 easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb create mode 100644 easybuild/easyconfigs/g/GConf/GConf-3.2.6-foss-2016a.eb diff --git a/easybuild/easyconfigs/d/DBus/DBus-1.10.8-foss-2016a.eb b/easybuild/easyconfigs/d/DBus/DBus-1.10.8-foss-2016a.eb new file mode 100644 index 0000000000..0940c66fb5 --- /dev/null +++ b/easybuild/easyconfigs/d/DBus/DBus-1.10.8-foss-2016a.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'DBus' +version = '1.10.8' + +homepage = 'http://dbus.freedesktop.org/doc/dbus-glib' +description = """D-Bus is a message bus system, a simple way for applications to talk + to one another. In addition to interprocess communication, D-Bus helps + coordinate process lifecycle; it makes it simple and reliable to code + a "single instance" application or daemon, and to launch applications + and daemons on demand when their services are needed.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://dbus.freedesktop.org/releases/dbus'] +sources = [SOURCELOWER_TAR_GZ] + +sanity_check_paths = { + 'files': ['bin/dbus-%s' % x for x in ['cleanup-sockets', 'daemon', 'launch', 'monitor', 'run-session', 'send', 'uuidgen']] + + ['lib/libdbus-1.%s' % x for x in ['a', SHLIB_EXT]], + 'dirs': ['include', 'share'] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb b/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb new file mode 100644 index 0000000000..3a355efc71 --- /dev/null +++ b/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'dbus-glib' +version = '0.106' + +homepage = 'http://dbus.freedesktop.org/doc/dbus-glib' +description = """D-Bus is a message bus system, a simple way for applications to talk to one another.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://dbus.freedesktop.org/releases/dbus-glib'] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('GLib', '2.48.0'), + ('DBus', '1.10.8'), + ('expat', '2.2.0'), +] + +sanity_check_paths = { + 'files': ['bin/dbus-binding-tool', 'lib/libdbus-glib-1.%s' % SHLIB_EXT, 'lib/libdbus-glib-1.a'], + 'dirs': ['include', 'share'] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/g/GConf/GConf-3.2.6-foss-2016a.eb b/easybuild/easyconfigs/g/GConf/GConf-3.2.6-foss-2016a.eb new file mode 100644 index 0000000000..6b42d8e1b6 --- /dev/null +++ b/easybuild/easyconfigs/g/GConf/GConf-3.2.6-foss-2016a.eb @@ -0,0 +1,39 @@ +easyblock = 'ConfigureMake' + +name = 'GConf' +version = '3.2.6' + +homepage = 'https://projects.gnome.org/gconf/' +description = """GConf is a system for storing application preferences. + It is intended for user preferences; not configuration + of something like Apache, or arbitrary data storage.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://ftp.gnome.org/pub/GNOME/sources/GConf/%(version_major_minor)s/'] +sources = [SOURCE_TAR_XZ] + +dependencies = [ + ('dbus-glib', '0.106'), + ('GLib', '2.48.0'), + ('GObject-Introspection', '1.48.0'), + ('libxml2', '2.9.3'), + ('GTK+', '2.24.30'), + ('intltool', '0.51.0', '-Perl-5.22.1'), +] + +configopts = '--disable-orbit ' + +sanity_check_paths = { + 'files': ['bin/gconf%s' % x for x in['-merge-tree', 'tool-2']] + + ['bin/gsettings-%s-convert' % x for x in ['data', 'schema']] + + ['lib/libgconf-2.%s' % x for x in['a', 'so']], + 'dirs': ['include', 'share'] +} + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'devel' -- GitLab From bcce53e26ab921aa30ccfb7582ce0ce8e30f1b4e Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 14 Jul 2016 21:05:02 +0200 Subject: [PATCH 080/741] wxPython with foss2016a --- ...Python-3.0.2.0-foss-2016a-Python-2.7.11.eb | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..0b548d2bb7 --- /dev/null +++ b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,37 @@ +name = 'wxPython' +version = '3.0.2.0' +versionsuffix = "-Python-%(pyver)s" + +homepage = 'http://www.wxpython.org' +description = """wxPython is a GUI toolkit for the Python programming language. + It allows Python programmers to create programs with a robust, + highly functional graphical user interface, simply and easily. + It is implemented as a Python extension module (native code) + that wraps the popular wxWidgets cross platform GUI library, + which is written in C++.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [SOURCEFORGE_SOURCE] +sources = ['%(name)s-src-%(version)s.tar.bz2'] + +#patches = ['%(name)s_%(version)s_intel.patch'] + +dependencies = [ + ('Python', '2.7.11'), + ('libpng', '1.6.21'), + ('zlib', '1.2.8'), + ('libjpeg-turbo', '1.5.0'), + ('LibTIFF', '4.0.6'), + ('expat', '2.2.0'), + ('GTK+', '2.24.30'), + ('GConf', '3.2.6'), + ('GST-plugins-base', '1.9.1'), + + ('libGLU', '9.0.0', '-Mesa-11.2.1'), + ('libSM', '1.2.2'), + ('libXxf86vm', '1.1.4'), +] +# ('Mesa', '11.2.1'), +moduleclass = 'vis' + -- GitLab From 70efaeceabf889e02fc2d15c058d026e9aa75c97 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 14 Jul 2016 21:18:42 +0200 Subject: [PATCH 081/741] XZ with gettext 0.19.7 --- .../easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb | 2 +- .../g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb index 9259854841..cdfa7fd0c2 100644 --- a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb +++ b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-foss-2016a-GLib-2.48.0.eb @@ -22,7 +22,7 @@ dependencies = [ ('freetype', '2.6.3'), ('pixman', '0.34.0'), ('fontconfig', '2.11.95'), - ('expat', '2.1.1'), + ('expat', '2.2.0'), ('libX11', '1.6.3'), ('libxcb', '1.11.1'), ('libXrender', '0.9.9'), diff --git a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb index 34dd19beae..16d3c00dec 100644 --- a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb +++ b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb @@ -21,9 +21,8 @@ dependencies = [ ('gettext', '0.19.7'), ] -# does not work with Bison 3.x builddependencies = [ - ('XZ', '5.2.2'), + ('XZ', '5.2.2', '-gettext-0.19.7'), ('libtool', '2.4.6'), ('pkgconfig', '1.1.0', '-Python-2.7.11'), ] -- GitLab From d686d4752a27ea7c9a3b4247e72f8baf7016559d Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 14 Jul 2016 21:30:01 +0200 Subject: [PATCH 082/741] removed comments --- .../w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb index 0b548d2bb7..21c40b17c6 100644 --- a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb @@ -15,8 +15,6 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [SOURCEFORGE_SOURCE] sources = ['%(name)s-src-%(version)s.tar.bz2'] -#patches = ['%(name)s_%(version)s_intel.patch'] - dependencies = [ ('Python', '2.7.11'), ('libpng', '1.6.21'), @@ -27,11 +25,10 @@ dependencies = [ ('GTK+', '2.24.30'), ('GConf', '3.2.6'), ('GST-plugins-base', '1.9.1'), - ('libGLU', '9.0.0', '-Mesa-11.2.1'), ('libSM', '1.2.2'), ('libXxf86vm', '1.1.4'), ] -# ('Mesa', '11.2.1'), + moduleclass = 'vis' -- GitLab From 31fd5d1a134c0192da73b4a03eae04164191d03f Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 14 Jul 2016 21:30:57 +0200 Subject: [PATCH 083/741] newline removed --- .../w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb index 21c40b17c6..abb19d3368 100644 --- a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb @@ -31,4 +31,3 @@ dependencies = [ ] moduleclass = 'vis' - -- GitLab From fa2734e1839715390b8996b50d571f150d8f30fd Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 15 Jul 2016 13:24:22 +0200 Subject: [PATCH 084/741] BayeScan-2.1 for foss-2016a --- .../b/BayeScan/BayeScan-2.1-foss-2016a.eb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb new file mode 100644 index 0000000000..fe025c2502 --- /dev/null +++ b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb @@ -0,0 +1,35 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'MakeCp' + +name = 'BayeScan' +version = '2.1' + +homepage = 'http://cmpg.unibe.ch/software/BayeScan/' +description = """BayeScan aims at identifying candidate loci under natural selection from genetic data, + using differences in allele frequencies between populations.""" + +# BayeScan makefile is hardcoded to use g++. In case you want to use a non-gcc toolchain you will need to patch the makefile +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'openmp': True} + +source_urls = ['http://cmpg.unibe.ch/software/BayeScan/files/'] +sources = ['%(name)s%(version)s.zip'] + +prebuildopts = "sed -i .bk 's/g\+\+/${CC} ${CFLAGS}/g' Makefile && " + +start_dir = 'source' + +files_to_copy = [(['source/bayescan_%(version)s'], 'bin'), 'BayeScan%(version)s_manual.pdf' , 'input_examples', 'R functions'] + +parallel = 1 + +sanity_check_paths = { + 'files': ['bin/bayescan_%(version)s'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 44e0abbd3bd32de52ad77f21100b1a8cca291141 Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 15 Jul 2016 13:24:41 +0200 Subject: [PATCH 085/741] remove space before suffix in sed command --- easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb index fe025c2502..438b382f2b 100644 --- a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb +++ b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb @@ -19,7 +19,7 @@ toolchainopts = {'openmp': True} source_urls = ['http://cmpg.unibe.ch/software/BayeScan/files/'] sources = ['%(name)s%(version)s.zip'] -prebuildopts = "sed -i .bk 's/g\+\+/${CC} ${CFLAGS}/g' Makefile && " +prebuildopts = "sed -i.bk 's/g\+\+/${CC} ${CFLAGS}/g' Makefile && " start_dir = 'source' -- GitLab From 2492f018ab8dea0dccb92e4134ad4a2b2f6f0fea Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 15 Jul 2016 13:34:11 +0200 Subject: [PATCH 086/741] fix sed command, use CXX and CXXFLAGS instead of CC and CFLAGS --- easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb index 438b382f2b..572719879c 100644 --- a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb +++ b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb @@ -19,7 +19,7 @@ toolchainopts = {'openmp': True} source_urls = ['http://cmpg.unibe.ch/software/BayeScan/files/'] sources = ['%(name)s%(version)s.zip'] -prebuildopts = "sed -i.bk 's/g\+\+/${CC} ${CFLAGS}/g' Makefile && " +prebuildopts = "sed -i.bk 's/g++/${CXX} ${CXXFLAGS}/g' Makefile && " start_dir = 'source' -- GitLab From f7c9b23ba2cf1b06e32f446c996ecf6d31324db8 Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 15 Jul 2016 14:29:48 +0200 Subject: [PATCH 087/741] version 6.1.1 with foss 2016a --- .../e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb new file mode 100644 index 0000000000..fc1815fa18 --- /dev/null +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb @@ -0,0 +1,44 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +# Provided binaries required OpenBLAS and GSL libraries + +easyblock = 'MakeCp' + +name = 'EIGENSOFT' +version = '6.1.1' + +homepage = 'http://www.hsph.harvard.edu/alkes-price/software/' +description = """The EIGENSOFT package combines functionality from our population genetics methods (Patterson et al. 2006) + and our EIGENSTRAT stratification correction method (Price et al. 2006). The EIGENSTRAT method uses principal components + analysis to explicitly model ancestry differences between cases and controls along continuous axes of variation; + the resulting correction is specific to a candidate marker’s variation in frequency across ancestral populations, + minimizing spurious associations while maximizing power to detect true associations. The EIGENSOFT package has a built-in + plotting script and supports multiple file formats and quantitative phenotypes.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [ + 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/', + 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/OLD/'] +sources = ['EIG%(version)s.tar.gz'] + +dependencies = [ + ('GSL', '2.1'), +] + +# -lm and -pthread are missing in the Makefile +buildopts = 'LDLIBS="-lgsl -lopenblas -lgfortran -lrt -lm" LDFLAGS="-pthread"' + +start_dir = 'src' + +files_to_copy = ['bin', 'CONVERTF', 'EIGENSTRAT', 'POPGEN', 'README'] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ["baseprog", "convertf", "eigenstrat", "eigenstratQTL"]], + 'dirs': [] +} + +moduleclass = 'bio' -- GitLab From 0bc6dd8e219da087ca8c7234cd023755fa1e5eed Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 15 Jul 2016 15:22:42 +0200 Subject: [PATCH 088/741] run make install after make --- easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb index fc1815fa18..6cc874f0c9 100644 --- a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb @@ -30,7 +30,7 @@ dependencies = [ ] # -lm and -pthread are missing in the Makefile -buildopts = 'LDLIBS="-lgsl -lopenblas -lgfortran -lrt -lm" LDFLAGS="-pthread"' +buildopts = 'LDLIBS="-lgsl -lopenblas -lgfortran -lrt -lm" LDFLAGS="$LDFLAGS -pthread" && make install' start_dir = 'src' -- GitLab From e9301e83dc5c00553f55aa00775fa8a6f16edbec Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 15 Jul 2016 15:23:04 +0200 Subject: [PATCH 089/741] version 6.0.1 --- .../e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb new file mode 100644 index 0000000000..36fcca43b8 --- /dev/null +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb @@ -0,0 +1,45 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +# Provided binaries required OpenBLAS and GSL libraries + +easyblock = 'MakeCp' + +name = 'EIGENSOFT' +version = '6.0.1' + +homepage = 'http://www.hsph.harvard.edu/alkes-price/software/' +description = """The EIGENSOFT package combines functionality from our population genetics methods (Patterson et al. 2006) + and our EIGENSTRAT stratification correction method (Price et al. 2006). The EIGENSTRAT method uses principal components + analysis to explicitly model ancestry differences between cases and controls along continuous axes of variation; + the resulting correction is specific to a candidate marker’s variation in frequency across ancestral populations, + minimizing spurious associations while maximizing power to detect true associations. The EIGENSOFT package has a built-in + plotting script and supports multiple file formats and quantitative phenotypes.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [ + 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/', + 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/OLD/'] +sources = ['EIG%(version)s.tar.gz'] + +dependencies = [ + ('GSL', '2.1'), +] + +# -lm and -pthread are missing in the Makefile +# also run "make install" after make to copy all binaries to the bin dir +buildopts = 'LDLIBS="-lgsl -lopenblas -lgfortran -lrt -lm" LDFLAGS="$LDFLAGS -pthread" && make install' + +start_dir = 'src' + +files_to_copy = ['bin', 'CONVERTF', 'EIGENSTRAT', 'POPGEN', 'README'] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ["baseprog", "convertf", "eigenstrat", "eigenstratQTL"]], + 'dirs': [] +} + +moduleclass = 'bio' -- GitLab From c840c8745da4a8271b555161e35cb700b5308161 Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 15 Jul 2016 15:30:51 +0200 Subject: [PATCH 090/741] made lines shorter than 120 chars --- .../e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb | 12 ++++++------ .../e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb index 36fcca43b8..91d5649298 100644 --- a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb @@ -11,12 +11,12 @@ name = 'EIGENSOFT' version = '6.0.1' homepage = 'http://www.hsph.harvard.edu/alkes-price/software/' -description = """The EIGENSOFT package combines functionality from our population genetics methods (Patterson et al. 2006) - and our EIGENSTRAT stratification correction method (Price et al. 2006). The EIGENSTRAT method uses principal components - analysis to explicitly model ancestry differences between cases and controls along continuous axes of variation; - the resulting correction is specific to a candidate marker’s variation in frequency across ancestral populations, - minimizing spurious associations while maximizing power to detect true associations. The EIGENSOFT package has a built-in - plotting script and supports multiple file formats and quantitative phenotypes.""" +description = """The EIGENSOFT package combines functionality from our population genetics methods (Patterson et al. +2006) and our EIGENSTRAT stratification correction method (Price et al. 2006). The EIGENSTRAT method uses principal +components analysis to explicitly model ancestry differences between cases and controls along continuous axes of +variation; the resulting correction is specific to a candidate marker’s variation in frequency across ancestral +populations, minimizing spurious associations while maximizing power to detect true associations. The EIGENSOFT +package has a built-in plotting script and supports multiple file formats and quantitative phenotypes.""" toolchain = {'name': 'foss', 'version': '2016a'} diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb index 6cc874f0c9..9d605117a0 100644 --- a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb @@ -11,12 +11,12 @@ name = 'EIGENSOFT' version = '6.1.1' homepage = 'http://www.hsph.harvard.edu/alkes-price/software/' -description = """The EIGENSOFT package combines functionality from our population genetics methods (Patterson et al. 2006) - and our EIGENSTRAT stratification correction method (Price et al. 2006). The EIGENSTRAT method uses principal components - analysis to explicitly model ancestry differences between cases and controls along continuous axes of variation; - the resulting correction is specific to a candidate marker’s variation in frequency across ancestral populations, - minimizing spurious associations while maximizing power to detect true associations. The EIGENSOFT package has a built-in - plotting script and supports multiple file formats and quantitative phenotypes.""" +description = """The EIGENSOFT package combines functionality from our population genetics methods (Patterson et al. +2006) and our EIGENSTRAT stratification correction method (Price et al. 2006). The EIGENSTRAT method uses principal +components analysis to explicitly model ancestry differences between cases and controls along continuous axes of +variation; the resulting correction is specific to a candidate marker’s variation in frequency across ancestral +populations, minimizing spurious associations while maximizing power to detect true associations. The EIGENSOFT +package has a built-in plotting script and supports multiple file formats and quantitative phenotypes.""" toolchain = {'name': 'foss', 'version': '2016a'} -- GitLab From b58a99e984a0ed7134cc632dd7013fe3e211ce78 Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Mon, 18 Jul 2016 17:20:51 +0800 Subject: [PATCH 091/741] add easyconfig pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb, add easyconfig spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb --- ...ymatgen-4.1.1-intel-2016b-Python-2.7.12.eb | 26 +++++++++++++++++++ ...pglib-1.9.4.2-intel-2016b-Python-2.7.12.eb | 24 +++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 easybuild/easyconfigs/p/pymatgen/pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/s/spglib/spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/p/pymatgen/pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/pymatgen/pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..21004fbe46 --- /dev/null +++ b/easybuild/easyconfigs/p/pymatgen/pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,26 @@ +easyblock = "PythonPackage" + +name = 'pymatgen' +version = '4.1.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/pymatgen' +description = """Python Materials Genomics is a robust materials analysis code that defines core object + representations for structures and molecules with support for many electronic structure codes.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('spglib', '1.9.4.2', versionsuffix), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'] +} + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/s/spglib/spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/spglib/spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..9a2186080b --- /dev/null +++ b/easybuild/easyconfigs/s/spglib/spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,24 @@ +easyblock = "PythonPackage" + +name = 'spglib' +version = '1.9.4.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/spglib' +description = """Spglib is a library for finding and handling crystal symmetries written in C.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'] +} + +moduleclass = 'chem' -- GitLab From 30aeff37fd7f644e76061214cb1d5e6cb248dc7e Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Tue, 26 Jul 2016 23:40:05 +0800 Subject: [PATCH 092/741] modify easyconfig VASP-5.4.1-intel-2016.02-GCC-4.9.eb --- .../easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb index 2a6923ac23..0a9a899dd9 100644 --- a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb @@ -19,10 +19,13 @@ prebuildopts = 'cp arch/makefile.include.linux_intel ./makefile.include && ' # path to libfftw3xf_intel.a is hardcoded in makefile.include prebuildopts += 'sed -i "s|\$(MKLROOT)/interfaces/fftw3xf|\$(FFTW_LIB_DIR)|" makefile.include && ' +# we use static mkl later +prebuildopts += 'sed -i "s|-mkl||" makefile.include && ' + # VASP uses LIBS as a list of folders prebuildopts += 'unset LIBS && ' -buildopts = 'all BLACS="$LIBBLACS" ' +buildopts = 'all BLACS="$LIBBLACS" SCALAPACK="$LIBSCALAPACK"' parallel = 1 -- GitLab From aff1236e8eed94622c55e200981b6abfaa31aec3 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 27 Jul 2016 13:22:46 +0200 Subject: [PATCH 093/741] Sphinx with foss2016a --- .../Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb | 76 +++++++++++++++++++ .../Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb | 76 +++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..582ea20b96 --- /dev/null +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,76 @@ +# Dependency for OBITools. +easyblock = 'Bundle' + +name = 'Sphinx' +version = '1.4.5' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://sphinx.pocoo.org/' +description = """Sphinx is a tool that makes it easy to create intelligent and beautiful documentation. + It was originally created for the new Python documentation, and it has excellent facilities for the + documentation of Python projects, but C/C++ is already supported as well, and it is planned to add + special support for other languages as well.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.11'), + ('Pygments', '2.1.3', '-Python-%(pyver)s'), + ('requests', '2.10.0', versionsuffix), +] + + +exts_list = [ + ('imagesize', '0.7.1', { + 'source_urls': ['https://pypi.python.org/packages/source/i/imagesize/'], + }), + ('MarkupSafe', '0.23', { + 'source_urls': ['https://pypi.io/packages/source/M/MarkupSafe/'], + 'modulename': 'markupsafe', + }), + ('Docutils', '0.12', { + 'source_tmpl': 'docutils-%(version)s.tar.gz', + 'source_urls': [('http://sourceforge.net/projects/docutils/files/docutils/%(version)s/', 'download')], + }), + ('Jinja2', '2.8', { + 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'], + }), + ('snowballstemmer', '1.2.1', { + 'source_urls': ['https://pypi.python.org/packages/source/s/snowballstemmer/'], + }), + ('Babel', '2.3.4', { + 'source_urls': ['https://pypi.python.org/packages/source/B/Babel/'], + }), + ('alabaster', '0.7.8', { + 'source_urls': ['https://pypi.python.org/packages/source/a/alabaster/'], + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/S/Sphinx/'], + }), + # sphinx_rtd_theme depends on Sphinx, and should be there to make the tests work + ('sphinx_rtd_theme', '0.1.10a0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/sphinx_rtd_theme/'], + }), +] + +# Tests below do not work since pdflatex is installed in OS. +# Sphinx unit tests *after* installing extensions +# postinstallcmds = [' && '.join([ +# "cd %(builddir)s/%(name)s/%(name)s-%(version)s/", +# "PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages/:$PYTHONPATH make test", +# ])] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['bin/sphinx-%s' % x for x in ['apidoc', 'autogen', 'build', 'quickstart']], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb new file mode 100644 index 0000000000..bd70bc9c30 --- /dev/null +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb @@ -0,0 +1,76 @@ +# Dependency for OBITools. +easyblock = 'Bundle' + +name = 'Sphinx' +version = '1.4.5' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://sphinx.pocoo.org/' +description = """Sphinx is a tool that makes it easy to create intelligent and beautiful documentation. + It was originally created for the new Python documentation, and it has excellent facilities for the + documentation of Python projects, but C/C++ is already supported as well, and it is planned to add + special support for other languages as well.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '3.5.1'), + ('Pygments', '2.1.3', '-Python-%(pyver)s'), + ('requests', '2.10.0', versionsuffix), +] + + +exts_list = [ + ('imagesize', '0.7.1', { + 'source_urls': ['https://pypi.python.org/packages/source/i/imagesize/'], + }), + ('MarkupSafe', '0.23', { + 'source_urls': ['https://pypi.io/packages/source/M/MarkupSafe/'], + 'modulename': 'markupsafe', + }), + ('Docutils', '0.12', { + 'source_tmpl': 'docutils-%(version)s.tar.gz', + 'source_urls': [('http://sourceforge.net/projects/docutils/files/docutils/%(version)s/', 'download')], + }), + ('Jinja2', '2.8', { + 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'], + }), + ('snowballstemmer', '1.2.1', { + 'source_urls': ['https://pypi.python.org/packages/source/s/snowballstemmer/'], + }), + ('Babel', '2.3.4', { + 'source_urls': ['https://pypi.python.org/packages/source/B/Babel/'], + }), + ('alabaster', '0.7.8', { + 'source_urls': ['https://pypi.python.org/packages/source/a/alabaster/'], + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/S/Sphinx/'], + }), + # sphinx_rtd_theme depends on Sphinx, and should be there to make the tests work + ('sphinx_rtd_theme', '0.1.10a0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/sphinx_rtd_theme/'], + }), +] + +# Tests below do not work since pdflatex is installed in OS. +# Sphinx unit tests *after* installing extensions +# postinstallcmds = [' && '.join([ +# "cd %(builddir)s/%(name)s/%(name)s-%(version)s/", +# "PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages/:$PYTHONPATH make test", +# ])] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['bin/sphinx-%s' % x for x in ['apidoc', 'autogen', 'build', 'quickstart']], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'vis' -- GitLab From f92e12c843b0efff1b089bf044ec934335d8ec49 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 27 Jul 2016 13:25:31 +0200 Subject: [PATCH 094/741] Sphinx with foss2016a --- .../Pygments-2.1.3-foss-2016a-Python-3.5.1.eb | 26 +++++++++++++++++++ ...requests-2.10.0-foss-2016a-Python-3.5.1.eb | 24 +++++++++++++++++ .../Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb | 9 +++---- .../Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb | 9 +++---- 4 files changed, 58 insertions(+), 10 deletions(-) create mode 100644 easybuild/easyconfigs/p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb create mode 100644 easybuild/easyconfigs/r/requests/requests-2.10.0-foss-2016a-Python-3.5.1.eb diff --git a/easybuild/easyconfigs/p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb new file mode 100644 index 0000000000..d1cd521edb --- /dev/null +++ b/easybuild/easyconfigs/p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb @@ -0,0 +1,26 @@ +easyblock = 'PythonPackage' + +name = 'Pygments' +version = '2.1.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://pygments.org/' +description = """Generic syntax highlighter suitable for use in code hosting, forums, wikis or other applications + that need to prettify source code.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + + +dependencies = [ + ('Python', '3.5.1'), +] + +sanity_check_paths = { + 'files': ['bin/pygmentize'], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/r/requests/requests-2.10.0-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/r/requests/requests-2.10.0-foss-2016a-Python-3.5.1.eb new file mode 100644 index 0000000000..1435fab7e5 --- /dev/null +++ b/easybuild/easyconfigs/r/requests/requests-2.10.0-foss-2016a-Python-3.5.1.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'requests' +version = '2.10.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/requests/%(version)s' +description = """Python http for humans""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_LOWER_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '3.5.1'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/requests-%(version)s-py%(pyshortver)s.egg'] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb index 582ea20b96..5aa84bbcef 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb @@ -56,12 +56,11 @@ exts_list = [ }), ] -# Tests below do not work since pdflatex is installed in OS. # Sphinx unit tests *after* installing extensions -# postinstallcmds = [' && '.join([ -# "cd %(builddir)s/%(name)s/%(name)s-%(version)s/", -# "PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages/:$PYTHONPATH make test", -# ])] +postinstallcmds = [' && '.join([ + "cd %(builddir)s/%(name)s/%(name)s-%(version)s/", + "PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages/:$PYTHONPATH make test", +])] # specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module full_sanity_check = True diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb index bd70bc9c30..162f5af933 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb @@ -56,12 +56,11 @@ exts_list = [ }), ] -# Tests below do not work since pdflatex is installed in OS. # Sphinx unit tests *after* installing extensions -# postinstallcmds = [' && '.join([ -# "cd %(builddir)s/%(name)s/%(name)s-%(version)s/", -# "PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages/:$PYTHONPATH make test", -# ])] +postinstallcmds = [' && '.join([ + "cd %(builddir)s/%(name)s/%(name)s-%(version)s/", + "PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages/:$PYTHONPATH make test", +])] # specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module full_sanity_check = True -- GitLab From b66042605b1b69e8816e53e4c99f58f3df163c75 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 27 Jul 2016 13:30:28 +0200 Subject: [PATCH 095/741] Theano with foss2016a --- .../Theano-0.8.2-foss-2016a-Python-2.7.11.eb | 29 +++++++++++++++++++ .../Theano-0.8.2-foss-2016a-Python-3.5.1.eb | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..f9de6cacae --- /dev/null +++ b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,29 @@ +easyblock = "PythonPackage" + +name = 'Theano' +version = '0.8.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://deeplearning.net/software/theano' +description = """Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions + involving multi-dimensional arrays efficiently.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.11'), + ('binutils', '2.25', '', ('GCCcore','4.9.3')), + ('Pygments', '2.1.3', versionsuffix), + ('Sphinx', '1.4.5', versionsuffix) +] + +sanity_check_paths = { + 'files': ['bin/theano-cache', + 'lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], + 'dirs': [] +} + +moduleclass = 'math' \ No newline at end of file diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb new file mode 100644 index 0000000000..7049aceac7 --- /dev/null +++ b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb @@ -0,0 +1,29 @@ +easyblock = "PythonPackage" + +name = 'Theano' +version = '0.8.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://deeplearning.net/software/theano' +description = """Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions + involving multi-dimensional arrays efficiently.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '3.5.1'), + ('binutils', '2.25', '', ('GCCcore','4.9.3')), + ('Pygments', '2.1.3', versionsuffix), + ('Sphinx', '1.4.5', versionsuffix) +] + +sanity_check_paths = { + 'files': ['bin/theano-cache', + 'lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], + 'dirs': [] +} + +moduleclass = 'math' \ No newline at end of file -- GitLab From a224a61018c32f26e7d525a8079009a067fde72e Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 27 Jul 2016 13:38:01 +0200 Subject: [PATCH 096/741] Removed comment --- .../s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb | 1 - .../easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb | 1 - 2 files changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb index 5aa84bbcef..edf98e8d1e 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb @@ -1,4 +1,3 @@ -# Dependency for OBITools. easyblock = 'Bundle' name = 'Sphinx' diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb index 162f5af933..f608175b73 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb @@ -1,4 +1,3 @@ -# Dependency for OBITools. easyblock = 'Bundle' name = 'Sphinx' -- GitLab From 509e62930698f749229af31253e522095c6455bb Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Thu, 4 Aug 2016 12:01:41 +0800 Subject: [PATCH 097/741] include official patches --- .../v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb index 0a9a899dd9..29745c333e 100644 --- a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb @@ -14,6 +14,14 @@ toolchainopts = {'usempi': True} # Vasp is proprietary software, see http://www.vasp.at/index.php/faqs on how to get access to the code sources = [SOURCELOWER_TAR_GZ] +patches = ['patch.5.4.1.08072015', 'patch.5.4.1.27082015', 'patch.5.4.1.06112015'] + +checksums = ['57c2b07d0f70987000033984e913f1a6', # vasp.5.4.1.tar.gz + 'ee242452bba6bb37459745f4617649d7', # patch.5.4.1.08072015 + 'b137eb13804a60df382e77495dc738f9', # patch.5.4.1.27082015 + 'd64b8f0ae861db7a76e6e9c9ffa188a1', # patch.5.4.1.06112015 + ] + prebuildopts = 'cp arch/makefile.include.linux_intel ./makefile.include && ' # path to libfftw3xf_intel.a is hardcoded in makefile.include -- GitLab From 56a7b4486807e1e494f420caeef02e1a17b814ba Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Thu, 11 Aug 2016 16:36:12 +0400 Subject: [PATCH 098/741] adding anaconda --- .../easyconfigs/a/Anaconda/anaconda-2.4.0.eb | 41 +++++++++++++++++++ .../easyconfigs/a/Anaconda/anaconda-3.4.0.eb | 39 ++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb create mode 100644 easybuild/easyconfigs/a/Anaconda/anaconda-3.4.0.eb diff --git a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb new file mode 100644 index 0000000000..852014e264 --- /dev/null +++ b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb @@ -0,0 +1,41 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Authors:: Jillian Rowe +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_anaconda' + +name = "anaconda" +version = "2-4.0.0" +variant = "Linux-x86_64" + +homepage = "https://www.continuum.io/" +description = """Built to complement the rich, open source Python community, +the Anaconda platform provides an enterprise-ready data analytics platform +that empowers companies to adopt a modern open data science analytics architecture. +""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +anaconda_version = 2 + +source_urls = ["http://repo.continuum.io/archive/"] +sources = ["Anaconda%s-%s.sh" % (version, variant)] +checksums = [ '31ed3ef07435d7068e1e03be49381b13' ] + +license_file = 'LICENSE.txt' + +sanity_check_paths = { + 'files': ['bin/pydoc', 'bin/2to3', 'bin/activate', 'bin/conda', 'bin/deactivate', 'bin/ipython', 'bin/sqlite3'], + 'dirs': ['bin', 'etc', 'lib', 'pkgs'] +} + +modextravars = { + 'ANACONDA_LICENSE': license_file, +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda/anaconda-3.4.0.eb b/easybuild/easyconfigs/a/Anaconda/anaconda-3.4.0.eb new file mode 100644 index 0000000000..9e2354b0de --- /dev/null +++ b/easybuild/easyconfigs/a/Anaconda/anaconda-3.4.0.eb @@ -0,0 +1,39 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Authors:: Jillian Rowe +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_anaconda' + +name = "anaconda" +version = "3-4.0.0" +variant = "Linux-x86_64" + +homepage = "https://www.continuum.io/" +description = """Built to complement the rich, open source Python community, +the Anaconda platform provides an enterprise-ready data analytics platform +that empowers companies to adopt a modern open data science analytics architecture. +""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +source_urls = ["http://repo.continuum.io/archive/"] +sources = ["Anaconda%s-%s.sh" % (version, variant)] +checksums = ["546d1f02597587c685fa890c1d713b51"] + +license_file = 'LICENSE.txt' + +sanity_check_paths = { + 'files': ['bin/pydoc', 'bin/2to3', 'bin/activate', 'bin/conda', 'bin/deactivate', 'bin/ipython', 'bin/sqlite3'], + 'dirs': ['bin', 'etc', 'lib', 'pkgs'] +} + +modextravars = { + 'ANACONDA_LICENSE': license_file, +} + +moduleclass = 'lang' -- GitLab From 8636dc775f77fca955d26a3115217a34ed189545 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Thu, 11 Aug 2016 16:36:57 +0400 Subject: [PATCH 099/741] adding condacreate --- .../c/CondaCreate/condacreate-1.0.eb | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb diff --git a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb new file mode 100644 index 0000000000..378b53a6e2 --- /dev/null +++ b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb @@ -0,0 +1,41 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2013-2015 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# Markus Geimer +# License:: 3-clause BSD +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_CondaCreate' + +name = "condacreate-module" +version = "1.0" +variant = "Linux-x86_64" + +homepage = "https://github.com/bioconda/bioconda-recipes" +description = """ Conda is a platform- and + language-independent package manager that sports + easy distribution, installation and version + management of software. The bioconda channel is a + Conda channel providing bioinformatics related + packages. This repository hosts the corresponding + recipes. """ + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +requirements = "perl-app-cpanminus" +channels = 'bioconda' +post_install_cmd = "cpanm --notest ExtUtils::MakeMaker" + +builddependencies = [('anaconda', '2-4.0.0')] + +sanity_check_paths = { + 'files': ['bin/cpanm', 'bin/perl'], + 'dirs': ['lib', 'lib/perl5'] +} + +moduleclass = 'tools' -- GitLab From 9e637e2d4515e1a409fa635b45556c1273ee593f Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Thu, 11 Aug 2016 16:37:44 +0400 Subject: [PATCH 100/741] commiting conda env --- .../easyconfigs/c/CondaEnv/condaenv-1.0.eb | 43 +++++++++++++++++++ .../easyconfigs/c/CondaEnv/environment.yml | 5 +++ 2 files changed, 48 insertions(+) create mode 100644 easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb create mode 100644 easybuild/easyconfigs/c/CondaEnv/environment.yml diff --git a/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb b/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb new file mode 100644 index 0000000000..1a36b74954 --- /dev/null +++ b/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb @@ -0,0 +1,43 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2013-2015 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# Markus Geimer +# License:: 3-clause BSD +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_CondaEnv' + +name = "condaenv-module" +version = "1.0" +variant = "Linux-x86_64" + +homepage = "https://github.com/bioconda/bioconda-recipes" +description = """ Conda is a platform- and + language-independent package manager that sports + easy distribution, installation and version + management of software. The bioconda channel is a + Conda channel providing bioinformatics related + packages. This repository hosts the corresponding + recipes. """ + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +builddependencies = [('anaconda', '2-4.0.0')] + +#Use one of the following - either an environment.yml file or a remote environment definition +#sources = ["environment.yml"] +#environment = sources[0] + +remote_environment = "vader/deathstar" + +sanity_check_paths = { + 'files': ["bin/conda"], + 'dirs': [] +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/c/CondaEnv/environment.yml b/easybuild/easyconfigs/c/CondaEnv/environment.yml new file mode 100644 index 0000000000..d98bf281fe --- /dev/null +++ b/easybuild/easyconfigs/c/CondaEnv/environment.yml @@ -0,0 +1,5 @@ +name: variant_test +channels: + - bioconda +dependencies: + - samtools=1.3.1 -- GitLab From 18ad942a312995458ccd2b0a97bac21e389e0699 Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Tue, 16 Aug 2016 15:13:17 +0800 Subject: [PATCH 101/741] fix style and comments --- .../VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb index 29745c333e..92a0ece294 100644 --- a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb @@ -14,20 +14,26 @@ toolchainopts = {'usempi': True} # Vasp is proprietary software, see http://www.vasp.at/index.php/faqs on how to get access to the code sources = [SOURCELOWER_TAR_GZ] -patches = ['patch.5.4.1.08072015', 'patch.5.4.1.27082015', 'patch.5.4.1.06112015'] - -checksums = ['57c2b07d0f70987000033984e913f1a6', # vasp.5.4.1.tar.gz - 'ee242452bba6bb37459745f4617649d7', # patch.5.4.1.08072015 - 'b137eb13804a60df382e77495dc738f9', # patch.5.4.1.27082015 - 'd64b8f0ae861db7a76e6e9c9ffa188a1', # patch.5.4.1.06112015 - ] +# patches from http://cms.mpi.univie.ac.at/wiki/index.php/Installing_VASP +patches = [ + 'vasp.5.4.1.08072015.patch', + 'vasp.5.4.1.27082015.patch', + 'vasp.5.4.1.06112015.patch', +] + +checksums = [ + '57c2b07d0f70987000033984e913f1a6', # vasp.5.4.1.tar.gz + 'ee242452bba6bb37459745f4617649d7', # vasp.5.4.1.08072015.patch + 'b137eb13804a60df382e77495dc738f9', # vasp.5.4.1.27082015.patch + 'd64b8f0ae861db7a76e6e9c9ffa188a1', # vasp.5.4.1.06112015.patch +] prebuildopts = 'cp arch/makefile.include.linux_intel ./makefile.include && ' # path to libfftw3xf_intel.a is hardcoded in makefile.include prebuildopts += 'sed -i "s|\$(MKLROOT)/interfaces/fftw3xf|\$(FFTW_LIB_DIR)|" makefile.include && ' -# we use static mkl later +# remove mkl flag to prevent mixing dynamic libs with the static libs in LIBBLACS/SCALAPACK prebuildopts += 'sed -i "s|-mkl||" makefile.include && ' # VASP uses LIBS as a list of folders -- GitLab From 9cebb8b6fdef1086b728a1d9c895c4f97a27430d Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Fri, 19 Aug 2016 11:37:07 +0200 Subject: [PATCH 102/741] If system Qt4 is installed, wrong MOC used --- easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb b/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb index bf4776d474..e136d733e5 100644 --- a/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb +++ b/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb @@ -46,7 +46,7 @@ dependencies = [ ('GraphicsMagick', '1.3.23'), ] -configopts = '--with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" ' +configopts = 'MOC=$EBROOTQT/bin/moc --with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" ' sanity_check_paths = { 'files': ['bin/octave'], -- GitLab From cf9a3e3a16c2da74b74d87f922f3005810b59a6a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 24 Aug 2016 16:31:25 +0200 Subject: [PATCH 103/741] Added OpenFOAM/4.0 --- .../b/Boost/Boost-1.61.0-intel-2016b.eb | 21 ++++++++ .../c/CGAL/CGAL-4.8.1-intel-2016b.eb | 32 ++++++++++++ .../METIS/METIS-5.1.0-intel-2016b-32bitIDX.eb | 24 +++++++++ .../o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb | 45 +++++++++++++++++ .../ParaView-5.1.0-intel-2016b-mpi.eb | 50 +++++++++++++++++++ .../easyconfigs/q/Qt/Qt-4.8.7-intel-2016b.eb | 28 +++++++++++ .../q/Qt5/Qt5-5.7.0-intel-2016b.eb | 28 +++++++++++ .../s/SCOTCH/SCOTCH-6.0.4-intel-2016b.eb | 14 ++++++ 8 files changed, 242 insertions(+) create mode 100644 easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b-32bitIDX.eb create mode 100644 easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/p/ParaView/ParaView-5.1.0-intel-2016b-mpi.eb create mode 100644 easybuild/easyconfigs/q/Qt/Qt-4.8.7-intel-2016b.eb create mode 100644 easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.4-intel-2016b.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb new file mode 100644 index 0000000000..370bb22280 --- /dev/null +++ b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb @@ -0,0 +1,21 @@ +name = 'Boost' +version = '1.61.0' + +homepage = 'http://www.boost.org/' +description = """Boost provides free peer-reviewed portable C++ source libraries.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True, 'usempi': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = ['%%(namelower)s_%s.tar.gz' % '_'.join(version.split('.'))] + +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), +] + +# also build boost_mpi +boost_mpi = True + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb new file mode 100644 index 0000000000..e6a3b147ae --- /dev/null +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb @@ -0,0 +1,32 @@ +name = 'CGAL' +version = '4.8.1' + +homepage = 'http://www.cgal.org/' +description = """The goal of the CGAL Open Source Project is to provide easy access to efficient + and reliable geometric algorithms in the form of a C++ library.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'strict': True} + +source_urls = ['https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-%(version)s'] +sources = [SOURCE_TAR_XZ] + +dependencies = [ + ('zlib', '1.2.8'), + ('Boost', '1.61.0'), + ('MPFR', '3.1.4'), + ('GMP', '6.1.1'), + ('libGLU', '9.0.0'), + ('Qt5', '5.7.0'), +] + +configopts = "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include\;$EBROOTLIBGLU/include " +configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT +configopts += "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT + +builddependencies = [ + ('CMake', '3.5.2'), + ('Eigen', '3.2.9'), +] + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b-32bitIDX.eb b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b-32bitIDX.eb new file mode 100644 index 0000000000..9c8e6cc340 --- /dev/null +++ b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b-32bitIDX.eb @@ -0,0 +1,24 @@ +name = 'METIS' +version = '5.1.0' +# default 32-bit IDTYPEWIDTH, no patch used +versionsuffix = '-32bitIDX' + +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, +and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the +multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [ + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD', +] + +builddependencies = [('CMake', '3.5.2')] + +configopts = ['', 'shared=1'] + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb new file mode 100644 index 0000000000..811d45648a --- /dev/null +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb @@ -0,0 +1,45 @@ +name = 'OpenFOAM' +version = '4.0' + +homepage = 'http://www.openfoam.com/' +description = """OpenFOAM is a free, open source CFD software package. + OpenFOAM has an extensive range of features to solve anything from complex fluid flows + involving chemical reactions, turbulence and heat transfer, + to solid dynamics and electromagnetics.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'cstd': 'c++11'} + +source_urls = ['http://downloads.sourceforge.net/foam/%(version)s'] +sources = [ + SOURCE_TGZ, + 'ThirdParty-%(version)s.tgz', +] + +paraversion = '5.1.0' +patches = [ + 'OpenFOAM-%(version)s_cleanup.patch', + 'OpenFOAM-%(version)s_libreadline.patch', + ('ThirdParty-%(version)s_cleanup.patch', ".."), # patch should not be applied in OpenFOAM subdir + 'OpenFOAM-%(version)s_external-3rd.patch', + ('ThirdParty-%(version)s_external-3rd.patch', ".."), + 'OpenFOAM-%%(version)s_external_paraview-%s.patch' % paraversion, +] + +dependencies = [ + ('CGAL', '4.8.1'), + ('libreadline', '6.3'), + # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes) + ('METIS', '5.1.0', '-32bitIDX'), + ('ncurses', '6.0'), + ('ParaView', paraversion, '-mpi'), + ('SCOTCH', '6.0.4'), +] + +builddependencies = [ + ('Bison', '3.0.4'), + ('CMake', '3.5.2'), + ('flex', '2.6.0'), +] + +moduleclass = 'cae' diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.0-intel-2016b-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.0-intel-2016b-mpi.eb new file mode 100644 index 0000000000..efcf03805f --- /dev/null +++ b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.0-intel-2016b-mpi.eb @@ -0,0 +1,50 @@ +easyblock = 'CMakeMake' + +name = 'ParaView' +version = '5.1.0' +versionsuffix = '-mpi' + +homepage = "http://www.paraview.org" +description = "ParaView is a scientific parallel visualizer." + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True, 'usempi': True} + +download_suffix = 'download.php?submit=Download&version=v%(version_major_minor)s&type=source&os=all&downloadFile=' +source_urls = ['http://www.paraview.org/paraview-downloads/%s' % download_suffix] +sources = ["ParaView-v%(version)s-source.tar.gz"] + +# patches = ['%(name)s-%(version)s_missingheader.patch'] + +dependencies = [ + ('X11', '20160819'), + ('Mesa', '12.0.0'), + ('libGLU', '9.0.0'), + ('Qt', '4.8.7'), + ('zlib', '1.2.8'), + ('HDF5', '1.8.17'), + ('Python', '2.7.12'), +] + +builddependencies = [('CMake', '3.5.2')] + +separate_build_dir = True + +configopts = '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_OPENGL_HAS_OSMESA=ON -DPARAVIEW_USE_MPI=ON ' +configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.so ' +configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' +configopts += '-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.so ' +configopts += '-DVTK_USE_SYSTEM_HDF5=ON -DPARAVIEW_ENABLE_PYTHON=ON -DBUILD_SHARED_LIBS=ON ' +# Without internet connection turn off testing (uncomment the following line) +configopts += '-DBUILD_TESTING=OFF ' +#configopts += '-DVTK_USE_X=OFF ' +# Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md +# and download ExternalData to $EASYBUILD_SOURCEPATH and adjust -DExternalData_OBJECT_STORES accordingly +# Without internet connection, comment the following two lines (configopts and prebuildopts) +configopts += '-DExternalData_OBJECT_STORES=%(builddir)s/ExternalData ' +# The ParaView server can be cranky, test downloads are quite often failing, especially in the case +# of parallel downloads. Using ; insted of && gives a second chance to download the test files, if the +# first serial attempt would fail. +prebuildopts = 'make VTKData ;' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/q/Qt/Qt-4.8.7-intel-2016b.eb b/easybuild/easyconfigs/q/Qt/Qt-4.8.7-intel-2016b.eb new file mode 100644 index 0000000000..9a342ad599 --- /dev/null +++ b/easybuild/easyconfigs/q/Qt/Qt-4.8.7-intel-2016b.eb @@ -0,0 +1,28 @@ +name = 'Qt' +version = '4.8.7' + +homepage = 'http://qt.io/' +description = "Qt is a comprehensive cross-platform C++ application framework." + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [ + 'http://download.qt.io/official_releases/qt/%(version_major_minor)s/%(version)s/', + 'http://download.qt.io/archive/qt/%(version_major_minor)s/%(version)s/' +] +sources = ['%(namelower)s-everywhere-opensource-src-%(version)s.tar.gz'] + +patches = ['Qt-%(version)s_phonon-export.patch'] + +builddependencies = [ + ('pkg-config', '0.29.1'), +] + +dependencies = [ + ('GLib', '2.49.5'), + ('libpng', '1.6.24'), + ('X11', '20160819'), + ('libGLU', '9.0.0'), +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb new file mode 100644 index 0000000000..139d66073b --- /dev/null +++ b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'EB_Qt' + +name = 'Qt5' +version = '5.7.0' + +homepage = 'http://qt.io/' +description = "Qt is a comprehensive cross-platform C++ application framework." + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [ + 'http://download.qt.io/official_releases/qt/%(version_major_minor)s/%(version)s/single/', + 'http://download.qt.io/archive/qt/%(version_major_minor)s/%(version)s/single/' +] +sources = ['qt-everywhere-opensource-src-%(version)s.tar.xz'] + +builddependencies = [ + ('pkg-config', '0.29.1'), +] + +dependencies = [ + ('GLib', '2.49.5'), + ('libpng', '1.6.24'), + ('X11', '20160819'), + ('libGLU', '9.0.0'), +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.4-intel-2016b.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.4-intel-2016b.eb new file mode 100644 index 0000000000..20bc255b1a --- /dev/null +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.4-intel-2016b.eb @@ -0,0 +1,14 @@ +name = 'SCOTCH' +version = '6.0.4' + +homepage = 'http://gforge.inria.fr/projects/scotch/' +description = """Software package and libraries for sequential and parallel graph partitioning, +static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ['http://gforge.inria.fr/frs/download.php/file/34618/'] +sources = ['%(namelower)s_%(version)s.tar.gz'] + +moduleclass = 'math' -- GitLab From 7a0f2e5deab64e21b5423e73c59990beeb2bbab6 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 26 Aug 2016 09:58:48 +0200 Subject: [PATCH 104/741] strict var on True --- .../o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb index a511a38eb3..5289372a0b 100644 --- a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb @@ -9,7 +9,7 @@ description = """Open Babel is a chemical toolbox designed to speak the many solid-state materials, biochemistry, or related areas.""" toolchain = {'name': 'foss', 'version': '2016a'} -toolchainopts = {'optarch': True} +toolchainopts = {'optarch': True, 'strict': True} source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCELOWER_TAR_GZ] -- GitLab From b489894cd940658471cc2264c7d58270058c4b41 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 26 Aug 2016 13:22:39 +0200 Subject: [PATCH 105/741] sync with develop --- .../easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 easybuild/easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb diff --git a/easybuild/easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb b/easybuild/easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb deleted file mode 100644 index 99e9f6bd51..0000000000 --- a/easybuild/easyconfigs/e/Eigen/Eigen-3.2.8-foss-2016a.eb +++ /dev/null @@ -1,13 +0,0 @@ -name = 'Eigen' -version = '3.2.8' - -homepage = 'http://eigen.tuxfamily.org/index.php?title=Main_Page' -description = """Eigen is a C++ template library for linear algebra: - matrices, vectors, numerical solvers, and related algorithms.""" - -toolchain = {'name': 'foss', 'version': '2016a'} - -source_urls = [BITBUCKET_SOURCE] -sources = ['%(version)s.tar.bz2'] - -moduleclass = 'math' -- GitLab From b61d10c1cdefa3fd25311e14331a3780d97ebeb3 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 26 Aug 2016 14:59:25 +0200 Subject: [PATCH 106/741] use stable version 1.8.3 instead of unstable 1.9.1, remove automake autoconf libtool xz and add autotools --- ...6a.eb => GST-plugins-base-1.8.3-foss-2016a.eb} | 15 ++++++--------- ...oss-2016a.eb => GStreamer-1.8.3-foss-2016a.eb} | 3 +-- 2 files changed, 7 insertions(+), 11 deletions(-) rename easybuild/easyconfigs/g/GST-plugins-base/{GST-plugins-base-1.9.1-foss-2016a.eb => GST-plugins-base-1.8.3-foss-2016a.eb} (77%) rename easybuild/easyconfigs/g/GStreamer/{GStreamer-1.9.1-foss-2016a.eb => GStreamer-1.8.3-foss-2016a.eb} (94%) diff --git a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb similarity index 77% rename from easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb rename to easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb index 16d3c00dec..7583a907a1 100644 --- a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.9.1-foss-2016a.eb +++ b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'GST-plugins-base' -version = '1.9.1' +version = '1.8.3' homepage = 'http://gstreamer.freedesktop.org/' description = """GStreamer is a library for constructing graphs of media-handling @@ -15,16 +15,13 @@ source_urls = ['http://gstreamer.freedesktop.org/src/gst-plugins-base'] sources = [SOURCELOWER_TAR_XZ] dependencies = [ - ('GStreamer', '1.9.1'), - ('Automake', '1.15'), - ('Autoconf', '2.69'), - ('gettext', '0.19.7'), + ('GStreamer', '1.8.3'), + ('gettext', '0.19.7'), ] builddependencies = [ - ('XZ', '5.2.2', '-gettext-0.19.7'), - ('libtool', '2.4.6'), - ('pkgconfig', '1.1.0', '-Python-2.7.11'), + ('Autotools', '20150215'), + ('pkg-config', '1.1.0', '-Python-2.7.11'), ] sanity_check_paths = { @@ -38,4 +35,4 @@ modextrapaths = { 'XDG_DATA_DIRS': 'share', } -moduleclass = 'vis' +moduleclass = 'vis' \ No newline at end of file diff --git a/easybuild/easyconfigs/g/GStreamer/GStreamer-1.9.1-foss-2016a.eb b/easybuild/easyconfigs/g/GStreamer/GStreamer-1.8.3-foss-2016a.eb similarity index 94% rename from easybuild/easyconfigs/g/GStreamer/GStreamer-1.9.1-foss-2016a.eb rename to easybuild/easyconfigs/g/GStreamer/GStreamer-1.8.3-foss-2016a.eb index 6fb42440e5..191ac52216 100644 --- a/easybuild/easyconfigs/g/GStreamer/GStreamer-1.9.1-foss-2016a.eb +++ b/easybuild/easyconfigs/g/GStreamer/GStreamer-1.8.3-foss-2016a.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'GStreamer' -version = '1.9.1' +version = '1.8.3' homepage = 'http://gstreamer.freedesktop.org/' description = """GStreamer is a library for constructing graphs of media-handling @@ -20,7 +20,6 @@ dependencies = [ ('zlib', '1.2.8'), ] -# does not work with Bison 3.x builddependencies = [ ('Bison', '3.0.4'), ] -- GitLab From acb8685ebec479541fe3e5b1b42720122c23d2bd Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 29 Aug 2016 09:25:36 +0200 Subject: [PATCH 107/741] Boost without Python --- easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb index 370bb22280..67f6199614 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-intel-2016b.eb @@ -15,6 +15,8 @@ dependencies = [ ('zlib', '1.2.8'), ] +configopts = '--without-libraries=python' + # also build boost_mpi boost_mpi = True -- GitLab From d58c78075f93ba3cc9aa18c92933e9ebee5d4dba Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 29 Aug 2016 09:26:20 +0200 Subject: [PATCH 108/741] Use ParaView/5.1.2 in OpenFOAM/4.0 --- easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb index 811d45648a..0caa9fc8da 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb @@ -16,7 +16,7 @@ sources = [ 'ThirdParty-%(version)s.tgz', ] -paraversion = '5.1.0' +paraversion = '5.1.2' patches = [ 'OpenFOAM-%(version)s_cleanup.patch', 'OpenFOAM-%(version)s_libreadline.patch', -- GitLab From 3ce90814d8f05b8c4be8a07c0a343fd49db87ed6 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 29 Aug 2016 09:27:15 +0200 Subject: [PATCH 109/741] Update ParaView to 5.1.2 --- ...1.0-intel-2016b-mpi.eb => ParaView-5.1.2-intel-2016b-mpi.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/p/ParaView/{ParaView-5.1.0-intel-2016b-mpi.eb => ParaView-5.1.2-intel-2016b-mpi.eb} (99%) diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.0-intel-2016b-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb similarity index 99% rename from easybuild/easyconfigs/p/ParaView/ParaView-5.1.0-intel-2016b-mpi.eb rename to easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb index efcf03805f..bb0153d900 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.0-intel-2016b-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb @@ -1,7 +1,7 @@ easyblock = 'CMakeMake' name = 'ParaView' -version = '5.1.0' +version = '5.1.2' versionsuffix = '-mpi' homepage = "http://www.paraview.org" -- GitLab From 166381254983778e5360657b1051731f03e89437 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 29 Aug 2016 10:10:34 +0200 Subject: [PATCH 110/741] Fix Mesa version --- .../easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb index bb0153d900..3fba0f0166 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb @@ -18,7 +18,7 @@ sources = ["ParaView-v%(version)s-source.tar.gz"] dependencies = [ ('X11', '20160819'), - ('Mesa', '12.0.0'), + ('Mesa', '12.0.1'), ('libGLU', '9.0.0'), ('Qt', '4.8.7'), ('zlib', '1.2.8'), -- GitLab From c59630b9d1d632553c4cc362d349720da0589152 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Mon, 29 Aug 2016 10:55:24 +0200 Subject: [PATCH 111/741] Patch for rotor tests --- .../openbabel-2.3.2-comparison.patch | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenBabel/openbabel-2.3.2-comparison.patch diff --git a/easybuild/easyconfigs/o/OpenBabel/openbabel-2.3.2-comparison.patch b/easybuild/easyconfigs/o/OpenBabel/openbabel-2.3.2-comparison.patch new file mode 100644 index 0000000000..07b07de115 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBabel/openbabel-2.3.2-comparison.patch @@ -0,0 +1,58 @@ +# From: https://sourceforge.net/p/openbabel/bugs/945/ +# Rotor tests fail on ppc architecture, because the checks for the expected value don't take into account the modulus. This patch should fix the issue. +# Author: Susi Lehtola +diff -up openbabel-2.3.2/include/openbabel/obutil.h.orig openbabel-2.3.2/include/openbabel/obutil.h +--- openbabel-2.3.2/include/openbabel/obutil.h.orig 2010-10-09 19:05:12.000000000 -0700 ++++ openbabel-2.3.2/include/openbabel/obutil.h 2014-10-16 16:35:49.050074389 -0700 +@@ -190,6 +190,8 @@ namespace OpenBabel + * \deprecated Use IsApprox() instead + */ + OBAPI bool IsNear(const double &, const double &, const double epsilon=2e-6); ++ //! Same but with comparison with a modulus ++ OBAPI bool IsNear_mod(const double &, const double &, const double & mod, const double epsilon=2e-6); + /*! "Safe" comparison for floats/doubles: true if a is less than epsilon + * This function really doesn't make any sense w.r.t. floating-point + * representation, so you should never use it. It is provided only for +diff -up openbabel-2.3.2/src/obutil.cpp.orig openbabel-2.3.2/src/obutil.cpp +--- openbabel-2.3.2/src/obutil.cpp.orig 2012-10-03 12:08:15.000000000 -0700 ++++ openbabel-2.3.2/src/obutil.cpp 2014-10-16 16:54:18.309740019 -0700 +@@ -77,6 +77,18 @@ namespace OpenBabel + return (fabs(a - b) < epsilon); + } + ++ //! Comparison for doubles with a modulus: returns mod(a - b,m) < epsilon ++ bool IsNear_mod(const double &a, const double &b, const double &m, const double epsilon) ++ { ++ double arg=a-b; ++ while(arg<-m/2) ++ arg+=m; ++ while(arg>=m/2) ++ arg-=m; ++ ++ return (fabs(arg) < epsilon); ++ } ++ + //! Comparison for doubles: returns fabs(a) < epsilon + bool IsNearZero(const double &a, const double epsilon) + { +diff -up openbabel-2.3.2/test/rotortest.cpp.orig openbabel-2.3.2/test/rotortest.cpp +--- openbabel-2.3.2/test/rotortest.cpp.orig 2011-10-12 13:24:02.000000000 -0700 ++++ openbabel-2.3.2/test/rotortest.cpp 2014-10-16 16:54:32.869985348 -0700 +@@ -74,7 +74,7 @@ void testOBRotorSetToAngle() + atoms[i] = (atoms[i] - 1) * 3; + rotor.SetRotAtoms(atoms); + +- OB_ASSERT(IsNear(fabs(RAD_TO_DEG * rotor.CalcTorsion(mol->GetCoordinates())), 180.0, 1.0)); ++ OB_ASSERT(IsNear_mod(fabs(RAD_TO_DEG * rotor.CalcTorsion(mol->GetCoordinates())), 180.0, 360.0, 1.0)); + + // rotate + rotor.SetToAngle(mol->GetCoordinates(), 60.0 * DEG_TO_RAD); +@@ -106,7 +106,7 @@ void testOBRotorSetRotor() + atoms[i] = (atoms[i] - 1) * 3; + rotor.SetRotAtoms(atoms); + +- OB_ASSERT(IsNear(fabs(RAD_TO_DEG * rotor.CalcTorsion(mol->GetCoordinates())), 180.0, 1.0)); ++ OB_ASSERT(IsNear_mod(fabs(RAD_TO_DEG * rotor.CalcTorsion(mol->GetCoordinates())), 180.0, 360.0, 1.0)); + rotor.SetToAngle(mol->GetCoordinates(), 60.0 * DEG_TO_RAD); + + // set torsion values -- GitLab From b014ddf24e16ff69e2c92e847b56a16c64280b9c Mon Sep 17 00:00:00 2001 From: RvDijk Date: Mon, 29 Aug 2016 11:57:19 +0200 Subject: [PATCH 112/741] rename patch --- ...el-2.3.2-comparison.patch => OpenBabel-2.3.2-comparison.patch} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/o/OpenBabel/{openbabel-2.3.2-comparison.patch => OpenBabel-2.3.2-comparison.patch} (100%) diff --git a/easybuild/easyconfigs/o/OpenBabel/openbabel-2.3.2-comparison.patch b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-comparison.patch similarity index 100% rename from easybuild/easyconfigs/o/OpenBabel/openbabel-2.3.2-comparison.patch rename to easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-comparison.patch -- GitLab From 8ecf63fcaa31f4b5c755a31df54839aa5fc2e6c8 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Mon, 29 Aug 2016 11:57:44 +0200 Subject: [PATCH 113/741] rename patch --- .../o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb index 5289372a0b..1aafb42367 100644 --- a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb @@ -17,6 +17,7 @@ sources = [SOURCELOWER_TAR_GZ] patches = [ 'OpenBabel-%(version)s-fix-link-path-tests.patch', 'OpenBabel-%(version)s-ignore-failed-test.patch', + 'OpenBabel-%(version)s-comparison.patch', ] builddependencies = [ -- GitLab From 4f601d46f8f3283914e00d5e3bbba07610ca423d Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 29 Aug 2016 12:53:14 +0200 Subject: [PATCH 114/741] Workaround icpc bug for Qt5/5.7.0 and intel/2016b --- .../q/Qt5/Qt5-5.7.0-intel-2016b.eb | 2 + .../q/Qt5/Qt5-5.7.0-workaround-icpc-bug.patch | 62 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-workaround-icpc-bug.patch diff --git a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb index 139d66073b..0710553732 100644 --- a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb +++ b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb @@ -14,6 +14,8 @@ source_urls = [ ] sources = ['qt-everywhere-opensource-src-%(version)s.tar.xz'] +patches = ['%(name)s-%(version)s-workaround-icpc-bug.patch'] + builddependencies = [ ('pkg-config', '0.29.1'), ] diff --git a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-workaround-icpc-bug.patch b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-workaround-icpc-bug.patch new file mode 100644 index 0000000000..fd58176f43 --- /dev/null +++ b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-workaround-icpc-bug.patch @@ -0,0 +1,62 @@ +# This is an ugly workaround for a icpc bug: https://software.intel.com/en-us/comment/1882560 +# If the struct/class is local, icpc gives a faulty error. We move the class to be non-local. +# Remove this patch as soon as icpc is fixed. +# Ward Poelmans +diff -ur qt-everywhere-opensource-src-5.7.0.orig/qtdeclarative/src/quick/items/qquickitemanimation.cpp qt-everywhere-opensource-src-5.7.0/qtdeclarative/src/quick/items/qquickitemanimation.cpp +--- qt-everywhere-opensource-src-5.7.0.orig/qtdeclarative/src/quick/items/qquickitemanimation.cpp 2016-06-11 14:05:08.000000000 +0200 ++++ qt-everywhere-opensource-src-5.7.0/qtdeclarative/src/quick/items/qquickitemanimation.cpp 2016-08-29 12:42:35.880738297 +0200 +@@ -200,6 +200,27 @@ + } + } + ++struct QQuickParentAnimationData : public QAbstractAnimationAction ++{ ++ QQuickParentAnimationData() : reverse(false) {} ++ ~QQuickParentAnimationData() { qDeleteAll(pc); } ++ ++ QQuickStateActions actions; ++ //### reverse should probably apply on a per-action basis ++ bool reverse; ++ QList pc; ++ void doAction() Q_DECL_OVERRIDE ++ { ++ for (int ii = 0; ii < actions.count(); ++ii) { ++ const QQuickStateAction &action = actions.at(ii); ++ if (reverse) ++ action.event->reverse(); ++ else ++ action.event->execute(); ++ } ++ } ++}; ++ + QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &actions, + QQmlProperties &modified, + TransitionDirection direction, +@@ -207,26 +228,6 @@ + { + Q_D(QQuickParentAnimation); + +- struct QQuickParentAnimationData : public QAbstractAnimationAction +- { +- QQuickParentAnimationData() : reverse(false) {} +- ~QQuickParentAnimationData() { qDeleteAll(pc); } +- +- QQuickStateActions actions; +- //### reverse should probably apply on a per-action basis +- bool reverse; +- QList pc; +- void doAction() Q_DECL_OVERRIDE +- { +- for (int ii = 0; ii < actions.count(); ++ii) { +- const QQuickStateAction &action = actions.at(ii); +- if (reverse) +- action.event->reverse(); +- else +- action.event->execute(); +- } +- } +- }; + + QQuickParentAnimationData *data = new QQuickParentAnimationData; + QQuickParentAnimationData *viaData = new QQuickParentAnimationData; -- GitLab From 90f7c9b02ca64e3c6fd40b06d60174ca0ee8b1c4 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 29 Aug 2016 16:09:10 +0200 Subject: [PATCH 115/741] Add libxml2 with Python support --- ...libxml2-2.9.4-intel-2016b-Python-2.7.12.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..31fcc636e9 --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,38 @@ +easyblock = 'ConfigureMake' + +name = 'libxml2' +version = '2.9.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://xmlsoft.org/' +description = """Libxml2 is the XML C parser and +toolchain developed for the Gnome project + (but usable outside of the Gnome platform).""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' +] +sources = [SOURCELOWER_TAR_GZ] + +configopts = 'CC="$CC" CXX="$CXX" --with-pic --with-zlib=$EBROOTZLIB --with-python=$EBROOTPYTHON/bin/python --with-python-install-dir=%(installdir)s/lib/python%(pyshortver)s/site-packages' + +dependencies = [ + ('zlib', '1.2.8'), + ('Python', '2.7.12'), +] + + +modextrapaths = { + 'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages', +} + +sanity_check_paths = { + 'files': [('lib/libxml2.a', 'lib64/libxml2.a'), ('lib/libxml2.%s' % SHLIB_EXT, 'lib64/libxml2.%s' % SHLIB_EXT)], + 'dirs': ['bin', 'include/libxml2/libxml'], +} + +moduleclass = 'lib' -- GitLab From 5ee164092af292afaf17a0ae15fbea092cd2a301 Mon Sep 17 00:00:00 2001 From: Simon Pinches Date: Mon, 29 Aug 2016 18:18:25 +0200 Subject: [PATCH 116/741] Create eb file for libxml2-2.9.2-goolf-1.5.16.eb --- .../l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb new file mode 100644 index 0000000000..54c5dad803 --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb @@ -0,0 +1,29 @@ +easyblock = 'ConfigureMake' + +name = 'libxml2' +version = '2.9.2' + +homepage = 'http://xmlsoft.org/' +description = """Libxml2 is the XML C parser and +toolchain developed for the Gnome project + (but usable outside of the Gnome platform).""" + +toolchain = {'name': 'goolf', 'version': '1.5.16'} +toolchainopts = {'pic': True} + +source_urls = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' +] +sources = [SOURCELOWER_TAR_GZ] + +configopts = 'CC="$CC" CXX="$CXX" --with-pic --without-python --with-zlib=$EBROOTZLIB' + +dependencies = [('zlib', '1.2.8')] + +sanity_check_paths = { + 'files': [('lib/libxml2.a', 'lib64/libxml2.a'), ('lib/libxml2.%s' % SHLIB_EXT, 'lib64/libxml2.%s' % SHLIB_EXT)], + 'dirs': ['bin', 'include/libxml2/libxml'], +} + +moduleclass = 'lib' -- GitLab From 3cf653b0ff9e6eae6512146536dd67051fd6c7ed Mon Sep 17 00:00:00 2001 From: Simon Pinches Date: Mon, 29 Aug 2016 17:45:26 +0200 Subject: [PATCH 117/741] Create eb files for libxslt for goolf-1.5.16 and foss-2016a --- .../l/libxslt/libxslt-1.1.28-foss-2016a.eb | 24 +++++++++++++++++++ .../l/libxslt/libxslt-1.1.28-goolf-1.5.16.eb | 23 ++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-foss-2016a.eb create mode 100644 easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-goolf-1.5.16.eb diff --git a/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-foss-2016a.eb b/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-foss-2016a.eb new file mode 100644 index 0000000000..6b593148b4 --- /dev/null +++ b/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-foss-2016a.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'libxslt' +version = '1.1.28' + +homepage = 'http://xmlsoft.org/' +description = """Libxslt is the XSLT C library developed for the GNOME project + (but usable outside of the Gnome platform).""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' +] + +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('zlib', '1.2.8'), + ('libxml2', '2.9.3'), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-goolf-1.5.16.eb b/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-goolf-1.5.16.eb new file mode 100644 index 0000000000..ac1786bdfd --- /dev/null +++ b/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-goolf-1.5.16.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'libxslt' +version = '1.1.28' + +homepage = 'http://xmlsoft.org/' +description = """Libxslt is the XSLT C library developed for the GNOME project (but usable +outside of the Gnome platform).""" + +toolchain = {'name': 'goolf', 'version': '1.5.16'} + +source_urls = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/', +] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('zlib', '1.2.8'), + ('libxml2', '2.9.2'), +] + +moduleclass = 'lib' -- GitLab From cbe8ca0d477d063367672fbe537e722534a7c86f Mon Sep 17 00:00:00 2001 From: Simon Pinches Date: Mon, 29 Aug 2016 17:38:39 +0200 Subject: [PATCH 118/741] Create eb files for XMLStarlet --- .../XMLStarlet/XMLStarlet-1.6.1-foss-2016a.eb | 26 +++++++++++++++++++ .../XMLStarlet-1.6.1-goolf-1.5.16.eb | 26 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 easybuild/easyconfigs/x/XMLStarlet/XMLStarlet-1.6.1-foss-2016a.eb create mode 100644 easybuild/easyconfigs/x/XMLStarlet/XMLStarlet-1.6.1-goolf-1.5.16.eb diff --git a/easybuild/easyconfigs/x/XMLStarlet/XMLStarlet-1.6.1-foss-2016a.eb b/easybuild/easyconfigs/x/XMLStarlet/XMLStarlet-1.6.1-foss-2016a.eb new file mode 100644 index 0000000000..2179e09197 --- /dev/null +++ b/easybuild/easyconfigs/x/XMLStarlet/XMLStarlet-1.6.1-foss-2016a.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'XMLStarlet' +version = '1.6.1' + +homepage = 'http://xmlstar.sourceforge.net' +description = """Command line XML tool""" + + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [('http://sourceforge.net/projects/xmlstar/files/%s/%s' % (name.lower(), version), 'download')] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('libxml2', '2.9.3'), + ('libxslt', '1.1.28') +] + +sanity_check_paths = { + 'files': ['bin/xml', 'share/doc/xmlstarlet/html.css', 'share/doc/xmlstarlet/xmlstarlet-ug.html', + 'share/doc/xmlstarlet/xmlstarlet.txt', 'share/man/man1/xmlstarlet.1'], + 'dirs': ['bin', 'share/doc/xmlstarlet', 'share/man/man1'] +} + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/x/XMLStarlet/XMLStarlet-1.6.1-goolf-1.5.16.eb b/easybuild/easyconfigs/x/XMLStarlet/XMLStarlet-1.6.1-goolf-1.5.16.eb new file mode 100644 index 0000000000..552256c88b --- /dev/null +++ b/easybuild/easyconfigs/x/XMLStarlet/XMLStarlet-1.6.1-goolf-1.5.16.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'XMLStarlet' +version = '1.6.1' + +homepage = 'http://xmlstar.sourceforge.net' +description = """Command line XML tool""" + + +toolchain = {'name': 'goolf', 'version': '1.5.16'} + +source_urls = [('http://sourceforge.net/projects/xmlstar/files/%s/%s' % (name.lower(), version), 'download')] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('libxml2', '2.9.2'), + ('libxslt', '1.1.28') +] + +sanity_check_paths = { + 'files': ['bin/xml', 'share/doc/xmlstarlet/html.css', 'share/doc/xmlstarlet/xmlstarlet-ug.html', + 'share/doc/xmlstarlet/xmlstarlet.txt', 'share/man/man1/xmlstarlet.1'], + 'dirs': ['bin', 'share/doc/xmlstarlet', 'share/man/man1'] +} + +moduleclass = 'data' -- GitLab From ffbfdb90cbeefdad963e959ac3461fe3da0349b0 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 29 Aug 2016 22:15:31 +0100 Subject: [PATCH 119/741] add easyconfig HISAT2-2.0.4-foss-2016b.eb --- .../h/HISAT2/HISAT2-2.0.4-foss-2016b.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/h/HISAT2/HISAT2-2.0.4-foss-2016b.eb diff --git a/easybuild/easyconfigs/h/HISAT2/HISAT2-2.0.4-foss-2016b.eb b/easybuild/easyconfigs/h/HISAT2/HISAT2-2.0.4-foss-2016b.eb new file mode 100644 index 0000000000..354eb721c4 --- /dev/null +++ b/easybuild/easyconfigs/h/HISAT2/HISAT2-2.0.4-foss-2016b.eb @@ -0,0 +1,33 @@ +easyblock = 'MakeCp' + +name = 'HISAT2' +version = '2.0.4' + +homepage = 'https://ccb.jhu.edu/software/hisat2/index.shtml' +description = """HISAT2 is a fast and sensitive alignment program for mapping next-generation sequencing reads + (both DNA and RNA) against the general human population (as well as against a single reference genome).""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = ['%(namelower)s-%(version)s-source.zip'] +source_urls = ['ftp://ftp.ccb.jhu.edu/pub/infphilo/%(namelower)s/downloads/'] + +checksums = ['50119a693929e240b072d79e69dc211e'] + +dependencies = [ + ('NGS', '1.2.3'), + ('ncbi-vdb', '2.5.8-1'), +] + +buildopts = "USE_SRA=1 NCBI_NGS_DIR=$EBROOTNGS NCBI_VDB_DIR=$EBROOTNCBIMINVDB" + +executables = ['hisat2', 'hisat2-align-l', 'hisat2-align-s', 'hisat2-build', 'hisat2-build-l', 'hisat2-build-s', + 'hisat2-inspect', 'hisat2-inspect-s', 'hisat2-inspect-l'] +files_to_copy = [(executables, 'bin')] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in executables], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 1886526cf3746ffc8d61cf1a95de7eb517abc907 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 30 Aug 2016 05:06:19 +0400 Subject: [PATCH 120/741] updating condaenv config --- easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb b/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb index 1a36b74954..ca01537d2c 100644 --- a/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb +++ b/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb @@ -31,9 +31,10 @@ builddependencies = [('anaconda', '2-4.0.0')] #Use one of the following - either an environment.yml file or a remote environment definition #sources = ["environment.yml"] -#environment = sources[0] +#It is not necessary to specify your environment_file unless it is named something besides environment.yml +#environment_file = sources[0] -remote_environment = "vader/deathstar" +remote_environment = "jerowe/gencore_python_1.0" sanity_check_paths = { 'files': ["bin/conda"], -- GitLab From b8e57e3328a14efdee37f00114c7197fee189e68 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 30 Aug 2016 05:10:03 +0400 Subject: [PATCH 121/741] updating anaconda 2 to remove anaconda_version --- easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb index 852014e264..8251c357ce 100644 --- a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb +++ b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb @@ -21,8 +21,6 @@ that empowers companies to adopt a modern open data science analytics architectu toolchain = {'name': 'dummy', 'version': 'dummy'} -anaconda_version = 2 - source_urls = ["http://repo.continuum.io/archive/"] sources = ["Anaconda%s-%s.sh" % (version, variant)] checksums = [ '31ed3ef07435d7068e1e03be49381b13' ] -- GitLab From 3dbff11d8b025de4df106f5ba4cd899e0afa0036 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Tue, 30 Aug 2016 10:03:52 +0100 Subject: [PATCH 122/741] Add missing deps NGS-1.2.3 and ncbi-vdb-2.5.8-1 --- .../easyconfigs/n/NGS/NGS-1.2.3-foss-2016b.eb | 35 +++++++++++++++++ .../n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb | 38 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 easybuild/easyconfigs/n/NGS/NGS-1.2.3-foss-2016b.eb create mode 100644 easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb diff --git a/easybuild/easyconfigs/n/NGS/NGS-1.2.3-foss-2016b.eb b/easybuild/easyconfigs/n/NGS/NGS-1.2.3-foss-2016b.eb new file mode 100644 index 0000000000..5ebb8f01ff --- /dev/null +++ b/easybuild/easyconfigs/n/NGS/NGS-1.2.3-foss-2016b.eb @@ -0,0 +1,35 @@ +easyblock = 'ConfigureMake' + +name = 'NGS' +version = '1.2.3' + +homepage = 'https://github.com/ncbi/ngs' +description = """NGS is a new, domain-specific API for accessing reads, alignments and pileups produced from + Next Generation Sequencing.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/ncbi/ngs/archive/'] +sources = ['%(version)s.tar.gz'] + +dependencies = [('Java', '1.8.0_92', '', True)] + +# override default of using $HOME/ncbi-outdir +configopts = "--build-prefix=%(builddir)s/ncbi-outdir" + +buildopts = 'CC="$CC -c" CPP="$CXX" CP="$CXX -c" -C ngs-sdk && ' +buildopts += 'make CC="$CC -c" CPP="$CXX" CP="$CXX -c" -C ngs-java' + +installopts = "-C ngs-sdk && make install -C ngs-java" + +parallel = 1 + +sanity_check_paths = { + 'files': ['jar/ngs-java.jar', ('lib/libngs-sdk.%s' % SHLIB_EXT, 'lib64/libngs-sdk.%s' % SHLIB_EXT), + ('lib/libngs-adapt-c++.a', 'lib64/libngs-adapt-c++.a'), ('lib/libngs-c++.a', 'lib64/libngs-c++.a')], + 'dirs': ['include/ngs', 'share'], +} + +modextrapaths = {'CLASSPATH': 'jar/ngs-java.jar'} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb b/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb new file mode 100644 index 0000000000..d6359bf739 --- /dev/null +++ b/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb @@ -0,0 +1,38 @@ +easyblock = 'ConfigureMake' + +name = 'ncbi-vdb' +version = '2.5.8-1' + +homepage = 'https://github.com/ncbi/ncbi-vdb' +description = """The SRA Toolkit and SDK from NCBI is a collection of tools and libraries for + using data in the INSDC Sequence Read Archives.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/ncbi/ncbi-vdb/archive/'] +sources = ['%(version)s.tar.gz'] + +dependencies = [ + ('libxml2', '2.9.4'), + ('file', '5.25'), # provides libmagic + ('HDF5', '1.8.17'), + ('NGS', '1.2.3'), +] + +# override default of using $HOME/ncbi-outdir +configopts = "--build-prefix=%(builddir)s/ncbi-outdir " + +configopts += "--with-ngs-sdk-prefix=$EBROOTNGS --with-ngs-java-prefix=$EBROOTNGS " +configopts += "--with-hdf5-prefix=$EBROOTHDF5 --with-xml2-prefix=$EBROOTLIBXML2" + +parallel = 1 + +sanity_check_paths = { + 'files': ['include/ncbi-vdb/NGS.hpp', ('lib/libncbi-vdb.%s' % SHLIB_EXT, 'lib64/libncbi-vdb.%s' % SHLIB_EXT), + ('lib/libncbi-wvdb.%s' % SHLIB_EXT, 'lib64/libncbi-wvdb.%s' % SHLIB_EXT), + ('lib/libncbi-ngs-c++.a', 'lib64/libncbi-ngs-c++.a'), ('lib/libncbi-vdb.a', 'lib64/libncbi-vdb.a'), + ('lib/libncbi-wvdb.a', 'lib64/libncbi-wvdb.a')], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From ac3369681848e21bade5e1b8471c53b8d2084024 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Tue, 30 Aug 2016 10:54:38 +0100 Subject: [PATCH 123/741] Add missing dep file, updated to latest upstream --- .../f/file/file-5.28-foss-2016b.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/f/file/file-5.28-foss-2016b.eb diff --git a/easybuild/easyconfigs/f/file/file-5.28-foss-2016b.eb b/easybuild/easyconfigs/f/file/file-5.28-foss-2016b.eb new file mode 100644 index 0000000000..51d81cd710 --- /dev/null +++ b/easybuild/easyconfigs/f/file/file-5.28-foss-2016b.eb @@ -0,0 +1,25 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +## + +easyblock = 'ConfigureMake' + +name = 'file' +version = '5.28' + +homepage = 'http://www.darwinsys.com/file/' +description = """The file command is 'a file type guesser', that is, a command-line tool + that tells you in words what kind of data a file contains.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['ftp://ftp.astron.com/pub/file/'] +sources = [SOURCE_TAR_GZ] + +sanity_check_paths = { + 'files': ['bin/file', 'include/magic.h', 'lib/libmagic.%s' % SHLIB_EXT], + 'dirs': ['share'] +} + +moduleclass = 'system' -- GitLab From 4d15c07c27f76c3097df8c8273f16fda020017a3 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Tue, 30 Aug 2016 12:18:56 +0100 Subject: [PATCH 124/741] Make sure ncbi-vdb picks up newest version of file dep --- easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb b/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb index d6359bf739..e0bd19a121 100644 --- a/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb +++ b/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.5.8-1-foss-2016b.eb @@ -14,7 +14,7 @@ sources = ['%(version)s.tar.gz'] dependencies = [ ('libxml2', '2.9.4'), - ('file', '5.25'), # provides libmagic + ('file', '5.28'), # provides libmagic ('HDF5', '1.8.17'), ('NGS', '1.2.3'), ] -- GitLab From d8618a889b46f1dea4314300b8fc63e77e53e27e Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 30 Aug 2016 16:29:58 +0200 Subject: [PATCH 125/741] without optarch --- .../o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb index 1aafb42367..8d4c77f654 100644 --- a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb @@ -9,7 +9,7 @@ description = """Open Babel is a chemical toolbox designed to speak the many solid-state materials, biochemistry, or related areas.""" toolchain = {'name': 'foss', 'version': '2016a'} -toolchainopts = {'optarch': True, 'strict': True} +toolchainopts = {'strict': True} source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCELOWER_TAR_GZ] -- GitLab From cfc92cac078a292f032d0dce8f1487005abe4d4a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 31 Aug 2016 17:35:29 +0200 Subject: [PATCH 126/741] Add extra options and newer cmake for CGAL/4.8.1 The newer CMake is needed as 3.5.2 does not support the intel compiler in 2016b (no features found). --- .../easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb index e6a3b147ae..406b208a88 100644 --- a/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b.eb @@ -20,13 +20,15 @@ dependencies = [ ('Qt5', '5.7.0'), ] -configopts = "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include\;$EBROOTLIBGLU/include " -configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT -configopts += "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT - builddependencies = [ - ('CMake', '3.5.2'), + ('CMake', '3.6.1'), ('Eigen', '3.2.9'), ] +configopts = "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include\;$EBROOTLIBGLU/include " +configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT +configopts += "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT +configopts += "-DWITH_ZLIB=ON -DWITH_MPFR=ON -DWITH_OpenGL=ON -DWITH_Eigen3=ON " +configopts += "-DWITH_GMPXX=ON -DWITH_LAPACK=ON -DWITH_BLAS=ON " + moduleclass = 'numlib' -- GitLab From 88b1093af056140deb4fdbeed9b569f57abe467c Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 31 Aug 2016 17:50:22 +0200 Subject: [PATCH 127/741] Add CMake/3.6.1 for intel/2016b --- .../c/CMake/CMake-3.6.1-intel-2016b.eb | 33 +++++++++++++++++++ .../c/CMake/CMake-3.6.1-use-gnu11.patch | 14 ++++++++ 2 files changed, 47 insertions(+) create mode 100644 easybuild/easyconfigs/c/CMake/CMake-3.6.1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/c/CMake/CMake-3.6.1-use-gnu11.patch diff --git a/easybuild/easyconfigs/c/CMake/CMake-3.6.1-intel-2016b.eb b/easybuild/easyconfigs/c/CMake/CMake-3.6.1-intel-2016b.eb new file mode 100644 index 0000000000..40d915d152 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-3.6.1-intel-2016b.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'CMake' +version = '3.6.1' + +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. + CMake is a family of tools designed to build, test and package software.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.cmake.org/files/v%(version_major_minor)s'] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['%(name)s-%(version)s-use-gnu11.patch'] + +configopts = '-- -DCMAKE_USE_OPENSSL=1' + +dependencies = [ + ('ncurses', '6.0'), + # OS dependency should be preferred if the os version is more recent then this version, + # it's nice to have an up to date openssl for security reasons + #('OpenSSL', '1.0.1s'), +] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/c/CMake/CMake-3.6.1-use-gnu11.patch b/easybuild/easyconfigs/c/CMake/CMake-3.6.1-use-gnu11.patch new file mode 100644 index 0000000000..2a6ab800b5 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-3.6.1-use-gnu11.patch @@ -0,0 +1,14 @@ +diff -ur cmake-3.6.1.orig/Modules/Compiler/Intel-C.cmake cmake-3.6.1/Modules/Compiler/Intel-C.cmake +--- cmake-3.6.1.orig/Modules/Compiler/Intel-C.cmake 2016-07-22 15:50:22.000000000 +0200 ++++ cmake-3.6.1/Modules/Compiler/Intel-C.cmake 2016-08-31 17:32:38.594401777 +0200 +@@ -15,8 +15,8 @@ + endif() + + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) +- set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11") +- set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=c11") ++ set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=gnu11") ++ set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=gnu11") + endif() + + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) -- GitLab From 67b802a2d5fa8720f5068e20e8f7f0eb3b6ec6ce Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 23 Aug 2016 17:28:06 +0200 Subject: [PATCH 128/741] Added Mesa/12.0.1 for intel/2016b --- .../l/libdrm/libdrm-2.4.70-intel-2016b.eb | 24 ++++++++ .../m/Mesa/Mesa-12.0.1-intel-2016b.eb | 58 +++++++++++++++++++ .../m/Mesa/libGLU-9.0.0-intel-2016b.eb | 24 ++++++++ 3 files changed, 106 insertions(+) create mode 100644 easybuild/easyconfigs/l/libdrm/libdrm-2.4.70-intel-2016b.eb create mode 100644 easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/m/Mesa/libGLU-9.0.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/l/libdrm/libdrm-2.4.70-intel-2016b.eb b/easybuild/easyconfigs/l/libdrm/libdrm-2.4.70-intel-2016b.eb new file mode 100644 index 0000000000..9fb07a2954 --- /dev/null +++ b/easybuild/easyconfigs/l/libdrm/libdrm-2.4.70-intel-2016b.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'libdrm' +version = '2.4.70' + +homepage = 'http://dri.freedesktop.org' +description = """Direct Rendering Manager runtime library.""" + +source_urls = ['http://dri.freedesktop.org/libdrm/'] +sources = [SOURCELOWER_TAR_GZ] + +toolchain = {'name': 'intel', 'version': '2016b'} + +dependencies = [ + ('X11', '20160819'), +] + +sanity_check_paths = { + 'files': ['include/xf86drm.h', 'include/xf86drmMode.h', 'lib/libdrm_intel.%s' % SHLIB_EXT, + 'lib/libdrm_radeon.%s' % SHLIB_EXT, 'lib/libdrm.%s' % SHLIB_EXT, 'lib/libkms.%s' % SHLIB_EXT], + 'dirs': ['include/libdrm', 'include/libkms', 'lib/pkgconfig'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb new file mode 100644 index 0000000000..c6932e7252 --- /dev/null +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb @@ -0,0 +1,58 @@ +easyblock = 'ConfigureMake' + +name = 'Mesa' +version = '12.0.1' + +homepage = 'http://www.mesa3d.org/' +description = """Mesa is an open-source implementation of the OpenGL specification - + a system for rendering interactive 3D graphics.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_XZ] +source_urls = [ + 'https://mesa.freedesktop.org/archive/%(version)s', + 'ftp://ftp.freedesktop.org/pub/mesa/%(version)s', + 'ftp://ftp.freedesktop.org/pub/mesa/older-versions/%(version_major)s.x/%(version)s', +] + +builddependencies = [ + ('flex', '2.6.0'), + ('Bison', '3.0.4'), + ('Autotools', '20150215'), + ('pkg-config', '0.29.1'), +] + +dependencies = [ + ('libxml2', '2.9.4'), + ('X11', '20160819'), + ('libdrm', '2.4.70'), + ('LLVM', '3.8.1'), +# ('eudev', '3.1.5'), +] + +# Use the os provided libudev or the EB provided eudev +osdependencies = ['libudev'] + +# GLU is not part anymore of Mesa package! +configopts = " --disable-osmesa --enable-gallium-osmesa --enable-gallium-llvm --enable-glx --disable-dri" +configopts += " --disable-driglx-direct --with-gallium-drivers='swrast,swr' --disable-egl" +configopts += " --with-osmesa-bits=32 --enable-texture-float --enable-llvm-shared-libs " + +# package-config files for os dependencies are in an os specific place +#preconfigopts = 'libtoolize && PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib64/pkgconfig/:/usr/share/pkgconfig" ' +#preconfigopts = ' libtoolize && ' + +#prebuildopts = 'env CPATH="$EBROOTLIBDRM/include/libdrm:$CPATH" CFLAGS= ' + +sanity_check_paths = { + 'files': ['lib/libGL.%s' % SHLIB_EXT, 'lib/libOSMesa.%s' % SHLIB_EXT, 'lib/libGLESv1_CM.%s' % SHLIB_EXT, + 'lib/libGLESv2.%s' %SHLIB_EXT, 'include/GL/glext.h', 'include/GL/gl_mangle.h', 'include/GL/glx.h', + 'include/GL/osmesa.h', 'include/GL/wglext.h', 'include/GL/gl.h', 'include/GL/glxext.h', + 'include/GL/glx_mangle.h', 'include/GLES/gl.h', 'include/GLES2/gl2.h', 'include/GLES3/gl3.h'], + 'dirs': [] +} + +maxparallel = 1 + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/m/Mesa/libGLU-9.0.0-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/libGLU-9.0.0-intel-2016b.eb new file mode 100644 index 0000000000..1bfa6744b9 --- /dev/null +++ b/easybuild/easyconfigs/m/Mesa/libGLU-9.0.0-intel-2016b.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'libGLU' +version = '9.0.0' + +homepage = 'ftp://ftp.freedesktop.org/pub/mesa/glu/' +description = """The OpenGL Utility Library (GLU) is a computer graphics library for OpenGL. """ + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ['ftp://ftp.freedesktop.org/pub/mesa/glu/'] +sources = ['glu-%(version)s.tar.bz2'] + +dependencies = [ + ('Mesa', '12.0.1'), +] + +sanity_check_paths = { + 'files': ['lib/libGLU.so.1'], + 'dirs': [], +} + +moduleclass = 'vis' -- GitLab From 5587af5083c1ee438943958a4fb3bcfbcf93bb3b Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 23 Aug 2016 17:49:03 +0200 Subject: [PATCH 129/741] Fix easyconfig location --- .../easyconfigs/{m/Mesa => l/libGLU}/libGLU-9.0.0-intel-2016b.eb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{m/Mesa => l/libGLU}/libGLU-9.0.0-intel-2016b.eb (100%) diff --git a/easybuild/easyconfigs/m/Mesa/libGLU-9.0.0-intel-2016b.eb b/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb similarity index 100% rename from easybuild/easyconfigs/m/Mesa/libGLU-9.0.0-intel-2016b.eb rename to easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb -- GitLab From 51c8bbcbda67b2f39554e290644865f9f3b933a3 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 24 Aug 2016 17:52:47 +0200 Subject: [PATCH 130/741] Added deps for Mesa --- .../Mako-1.0.4-intel-2016b-Python-2.7.12.eb | 22 +++++++++++++++ .../n/nettle/nettle-3.2-intel-2016b.eb | 28 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 easybuild/easyconfigs/m/Mako/Mako-1.0.4-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/n/nettle/nettle-3.2-intel-2016b.eb diff --git a/easybuild/easyconfigs/m/Mako/Mako-1.0.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/m/Mako/Mako-1.0.4-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..4817748dbc --- /dev/null +++ b/easybuild/easyconfigs/m/Mako/Mako-1.0.4-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,22 @@ +easyblock = 'PythonPackage' + +name = 'Mako' +version = '1.0.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.makotemplates.org' +description = """A super-fast templating language that borrows the best ideas from the existing templating languages""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.12')] + +sanity_check_paths = { + 'files': ['bin/mako-render'], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/n/nettle/nettle-3.2-intel-2016b.eb b/easybuild/easyconfigs/n/nettle/nettle-3.2-intel-2016b.eb new file mode 100644 index 0000000000..728d252367 --- /dev/null +++ b/easybuild/easyconfigs/n/nettle/nettle-3.2-intel-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'ConfigureMake' + +name = 'nettle' +version = '3.2' + +homepage = 'http://www.lysator.liu.se/~nisse/nettle/' +description = """Nettle is a cryptographic library that is designed to fit easily + in more or less any context: In crypto toolkits for object-oriented + languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, + or even in kernel space.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [GNU_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('GMP', '6.1.1'), +] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ['nettle-hash', 'nettle-lfib-stream', 'pkcs1-conv', 'sexp-conv']] + + ['lib64/libhogweed.a', 'lib64/libhogweed.%s' % SHLIB_EXT, + 'lib64/libnettle.a', 'lib64/libnettle.%s' % SHLIB_EXT], + 'dirs': ['include/nettle'], +} + +moduleclass = 'lib' -- GitLab From f4f58a11d064edd60f218ae6a7b80d6516d5acf9 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 24 Aug 2016 17:53:14 +0200 Subject: [PATCH 131/741] Updated Mesa deps --- .../m/Mesa/Mesa-12.0.1-intel-2016b.eb | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb index c6932e7252..c421b33e7c 100644 --- a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb @@ -1,3 +1,10 @@ +# the purpose of the easyconfig is to build a Mesa for software rendering, +# not hardware rendering. This means you want at least SSE4.2. We build: +# - llvmpipe: the high-performance Gallium LLVM driver +# - swr: Intel's OpenSWR +# it will try to use the llvmpipe by default. It you want swr, do: +# GALLIUM_DRIVER=swr + easyblock = 'ConfigureMake' name = 'Mesa' @@ -24,27 +31,18 @@ builddependencies = [ ] dependencies = [ - ('libxml2', '2.9.4'), + ('Mako', '1.0.4'), + ('nettle', '3.2'), ('X11', '20160819'), ('libdrm', '2.4.70'), ('LLVM', '3.8.1'), -# ('eudev', '3.1.5'), ] -# Use the os provided libudev or the EB provided eudev -osdependencies = ['libudev'] - # GLU is not part anymore of Mesa package! configopts = " --disable-osmesa --enable-gallium-osmesa --enable-gallium-llvm --enable-glx --disable-dri" configopts += " --disable-driglx-direct --with-gallium-drivers='swrast,swr' --disable-egl" configopts += " --with-osmesa-bits=32 --enable-texture-float --enable-llvm-shared-libs " -# package-config files for os dependencies are in an os specific place -#preconfigopts = 'libtoolize && PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib64/pkgconfig/:/usr/share/pkgconfig" ' -#preconfigopts = ' libtoolize && ' - -#prebuildopts = 'env CPATH="$EBROOTLIBDRM/include/libdrm:$CPATH" CFLAGS= ' - sanity_check_paths = { 'files': ['lib/libGL.%s' % SHLIB_EXT, 'lib/libOSMesa.%s' % SHLIB_EXT, 'lib/libGLESv1_CM.%s' % SHLIB_EXT, 'lib/libGLESv2.%s' %SHLIB_EXT, 'include/GL/glext.h', 'include/GL/gl_mangle.h', 'include/GL/glx.h', @@ -53,6 +51,4 @@ sanity_check_paths = { 'dirs': [] } -maxparallel = 1 - moduleclass = 'vis' -- GitLab From 3d3b4d06c5d1f264a1a7d4793524044fc51a133c Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 24 Aug 2016 17:58:36 +0200 Subject: [PATCH 132/741] Correct versionsuffix --- easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb index c421b33e7c..014dfb4944 100644 --- a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb @@ -31,7 +31,7 @@ builddependencies = [ ] dependencies = [ - ('Mako', '1.0.4'), + ('Mako', '1.0.4', '-Python-2.7.12'), ('nettle', '3.2'), ('X11', '20160819'), ('libdrm', '2.4.70'), -- GitLab From bb8cd3ad96829090b30765f12e173548ddd970c9 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 24 Aug 2016 18:06:26 +0200 Subject: [PATCH 133/741] Downgrade to build deps --- easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb | 4 +++- easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb index 014dfb4944..1b4d5ebc13 100644 --- a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb @@ -28,10 +28,12 @@ builddependencies = [ ('Bison', '3.0.4'), ('Autotools', '20150215'), ('pkg-config', '0.29.1'), + ('Mako', '1.0.4', '-Python-2.7.12'), + ('zlib', '1.2.8'), + ('libxml2', '2.9.4'), ] dependencies = [ - ('Mako', '1.0.4', '-Python-2.7.12'), ('nettle', '3.2'), ('X11', '20160819'), ('libdrm', '2.4.70'), diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb index 9eede49210..ee021a1cfc 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require the X11 to be present. configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' -- GitLab From bdcad38bf4e48f671c4457cc0c6d16172d8fd4c6 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 25 Aug 2016 10:03:05 +0200 Subject: [PATCH 134/741] Add python enabled libxml2 for Mesa --- ...libxml2-2.9.4-intel-2016b-Python-2.7.12.eb | 33 +++++++++++++++++++ .../m/Mesa/Mesa-12.0.1-intel-2016b.eb | 6 ++-- 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..8f6fcf8992 --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'libxml2' +version = '2.9.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://xmlsoft.org/' +description = """Libxml2 is the XML C parser and +toolchain developed for the Gnome project + (but usable outside of the Gnome platform).""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' +] +sources = [SOURCELOWER_TAR_GZ] + +configopts = 'CC="$CC" CXX="$CXX" --with-pic --with-zlib=$EBROOTZLIB' + +dependencies = [ + ('zlib', '1.2.8'), + ('Python', '2.7.12'), +] + +sanity_check_paths = { + 'files': [('lib/libxml2.a', 'lib64/libxml2.a'), ('lib/libxml2.%s' % SHLIB_EXT, 'lib64/libxml2.%s' % SHLIB_EXT)], + 'dirs': ['bin', 'include/libxml2/libxml'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb index 1b4d5ebc13..821ca3a0b7 100644 --- a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb @@ -29,15 +29,15 @@ builddependencies = [ ('Autotools', '20150215'), ('pkg-config', '0.29.1'), ('Mako', '1.0.4', '-Python-2.7.12'), - ('zlib', '1.2.8'), - ('libxml2', '2.9.4'), + ('libxml2', '2.9.4', '-Python-2.7.12'), ] dependencies = [ + ('zlib', '1.2.8'), ('nettle', '3.2'), - ('X11', '20160819'), ('libdrm', '2.4.70'), ('LLVM', '3.8.1'), + ('X11', '20160819'), ] # GLU is not part anymore of Mesa package! -- GitLab From 5f511f644ac6ea66e9dbcdeab7c869d03d235284 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 25 Aug 2016 10:18:55 +0200 Subject: [PATCH 135/741] Use EB python in libxml2 --- .../l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb index 8f6fcf8992..d326810b20 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb @@ -18,7 +18,7 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -configopts = 'CC="$CC" CXX="$CXX" --with-pic --with-zlib=$EBROOTZLIB' +configopts = 'CC="$CC" CXX="$CXX" --with-pic --with-zlib=$EBROOTZLIB --with-python=$EBROOTPYTHON/bin/python' dependencies = [ ('zlib', '1.2.8'), -- GitLab From fae007ae72e5610f76f31de32d638bbdc3fa8831 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Sep 2016 09:39:28 +0200 Subject: [PATCH 136/741] Don't build Tkinter in Python as it requires X11 Build the Tk module for Python requires a full X11 stack. We want to avoid that. --- easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb index e77dca8172..42a21bb5f7 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb @@ -18,7 +18,8 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.13.0'), - ('Tk', '8.6.5'), + # We don't build Tkinter as it requires an X11 stack + # ('Tk', '8.6.5'), ('GMP', '6.1.1'), ('libffi', '3.2.1'), # OS dependency should be preferred if the os version is more recent then this version, -- GitLab From 113996fc6cc675581b4b400f0be815511d62fe6d Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Sep 2016 10:16:08 +0200 Subject: [PATCH 137/741] Add Clang/LLVM 3.9 --- .../c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb | 49 +++++++++++++++++++ .../l/LLVM/LLVM-3.9.0-foss-2016b.eb | 42 ++++++++++++++++ .../l/LLVM/LLVM-3.9.0-intel-2016b.eb | 42 ++++++++++++++++ 3 files changed, 133 insertions(+) create mode 100644 easybuild/easyconfigs/c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb create mode 100644 easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..277005ae82 --- /dev/null +++ b/easybuild/easyconfigs/c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb @@ -0,0 +1,49 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2013-2015 Dmitri Gribenko, Ward Poelmans +# Authors:: Dmitri Gribenko +# Authors:: Ward Poelmans +# License:: GPLv2 or later, MIT, three-clause BSD. +# $Id$ +## + +name = "Clang" +version = "3.9.0" + +homepage = "http://clang.llvm.org/" +description = """C, C++, Objective-C compiler, based on LLVM. Does not + include C++ standard library -- use libstdc++ from GCC.""" + +# Clang also depends on libstdc++ during runtime, but this dependency is +# already specified as the toolchain. +toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} +# Do not set optarch to True: it will cause the build to fail +toolchainopts = {'optarch': False} + +source_urls = ["http://llvm.org/releases/%(version)s"] +sources = [ + "llvm-%(version)s.src.tar.xz", + "cfe-%(version)s.src.tar.xz", + "compiler-rt-%(version)s.src.tar.xz", + "polly-%(version)s.src.tar.xz", + "openmp-%(version)s.src.tar.xz", +] + +dependencies = [ + ('GMP', '6.1.1'), +] + +builddependencies = [ + ('CMake', '3.6.1'), + ('Python', '2.7.12', '-bare'), + ('libxml2', '2.9.4'), +] + +assertions = True + +usepolly = True + +build_targets = ['X86'] + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb new file mode 100644 index 0000000000..15f53abe54 --- /dev/null +++ b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb @@ -0,0 +1,42 @@ +easyblock = 'CMakeMake' + +name = 'LLVM' +version = '3.9.0' + +homepage = "http://llvm.org/" +description = """The LLVM Core libraries provide a modern source- and target-independent + optimizer, along with code generation support for many popular CPUs + (as well as some less common ones!) These libraries are built around a well + specified code representation known as the LLVM intermediate representation + ("LLVM IR"). The LLVM Core libraries are well documented, and it is + particularly easy to invent your own language (or port an existing compiler) + to use LLVM as an optimizer and code generator.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'cstd': 'gnu++11'} + +source_urls = ["http://llvm.org/releases/%(version)s"] +sources = ["llvm-%(version)s.src.tar.xz"] + +builddependencies = [ + ('CMake', '3.6.1'), + ('Python', '2.7.12'), +] + +dependencies = [ + ('ncurses', '6.0'), + ('zlib', '1.2.8'), +] + +configopts = '-DBUILD_SHARED_LIBS=ON ' +# required to install extra tools in bin/ +configopts += "-DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ZLIB=ON" + +sanity_check_paths = { + 'files': ['bin/llvm-ar', 'bin/FileCheck'], + 'dirs': ['include/llvm', 'include/llvm-c'], +} + +separate_build_dir = True + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb new file mode 100644 index 0000000000..bed6b7ed50 --- /dev/null +++ b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb @@ -0,0 +1,42 @@ +easyblock = 'CMakeMake' + +name = 'LLVM' +version = '3.9.0' + +homepage = "http://llvm.org/" +description = """The LLVM Core libraries provide a modern source- and target-independent + optimizer, along with code generation support for many popular CPUs + (as well as some less common ones!) These libraries are built around a well + specified code representation known as the LLVM intermediate representation + ("LLVM IR"). The LLVM Core libraries are well documented, and it is + particularly easy to invent your own language (or port an existing compiler) + to use LLVM as an optimizer and code generator.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'cstd': 'gnu++11'} + +source_urls = ["http://llvm.org/releases/%(version)s"] +sources = ["llvm-%(version)s.src.tar.xz"] + +builddependencies = [ + ('CMake', '3.6.1'), + ('Python', '2.7.12'), +] + +dependencies = [ + ('ncurses', '6.0'), + ('zlib', '1.2.8'), +] + +configopts = '-DBUILD_SHARED_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -shared-intel" ' +# required to install extra tools in bin/ +configopts += "-DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ZLIB=ON" + +sanity_check_paths = { + 'files': ['bin/llvm-ar', 'bin/FileCheck'], + 'dirs': ['include/llvm', 'include/llvm-c'], +} + +separate_build_dir = True + +moduleclass = 'compiler' -- GitLab From 7d1759c4f74c316b81667b6c858c0ef61d80c709 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Sep 2016 10:23:33 +0200 Subject: [PATCH 138/741] Use libxml2 easyblock for Python --- .../l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb index d326810b20..c0c3697f83 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb @@ -1,5 +1,3 @@ -easyblock = 'ConfigureMake' - name = 'libxml2' version = '2.9.4' versionsuffix = '-Python-%(pyver)s' @@ -18,16 +16,11 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -configopts = 'CC="$CC" CXX="$CXX" --with-pic --with-zlib=$EBROOTZLIB --with-python=$EBROOTPYTHON/bin/python' +configopts = 'CC="$CC" CXX="$CXX" --with-pic --with-zlib=$EBROOTZLIB' dependencies = [ ('zlib', '1.2.8'), ('Python', '2.7.12'), ] -sanity_check_paths = { - 'files': [('lib/libxml2.a', 'lib64/libxml2.a'), ('lib/libxml2.%s' % SHLIB_EXT, 'lib64/libxml2.%s' % SHLIB_EXT)], - 'dirs': ['bin', 'include/libxml2/libxml'], -} - moduleclass = 'lib' -- GitLab From db856d24fb844913f7553b3d169259010d8d1fe2 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Sep 2016 11:43:51 +0200 Subject: [PATCH 139/741] Add patch for LLVM + intel compiler --- .../l/LLVM/LLVM-3.9.0-intel-2016b.eb | 2 ++ .../l/LLVM/LLVM-3.9.0-intel-fix-loop.patch | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-fix-loop.patch diff --git a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb index bed6b7ed50..23f87e242d 100644 --- a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb +++ b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb @@ -18,6 +18,8 @@ toolchainopts = {'cstd': 'gnu++11'} source_urls = ["http://llvm.org/releases/%(version)s"] sources = ["llvm-%(version)s.src.tar.xz"] +patches = ['LLVM-3.9.0-intel-fix-loop.patch'] + builddependencies = [ ('CMake', '3.6.1'), ('Python', '2.7.12'), diff --git a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-fix-loop.patch b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-fix-loop.patch new file mode 100644 index 0000000000..33e6578be4 --- /dev/null +++ b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-fix-loop.patch @@ -0,0 +1,26 @@ +# Bug in intel compiler +# Source: From https://sft.its.cern.ch/jira/browse/ROOT-8233 +diff -ur llvm-3.9.0rc3.src.orig/lib/Transforms/Utils/LoopUtils.cpp llvm-3.9.0rc3.src/lib/Transforms/Utils/LoopUtils.cpp +--- llvm-3.9.0rc3.src.orig/lib/Transforms/Utils/LoopUtils.cpp 2016-06-11 23:48:25.000000000 +0200 ++++ llvm-3.9.0rc3.src/lib/Transforms/Utils/LoopUtils.cpp 2016-09-01 11:40:34.394205219 +0200 +@@ -834,6 +834,11 @@ + return UsedOutside; + } + ++namespace llvm { ++ extern char &LoopSimplifyID; ++ extern char &LCSSAID; ++} ++ + void llvm::getLoopAnalysisUsage(AnalysisUsage &AU) { + // By definition, all loop passes need the LoopInfo analysis and the + // Dominator tree it depends on. Because they all participate in the loop +@@ -845,8 +850,6 @@ + + // We must also preserve LoopSimplify and LCSSA. We locally access their IDs + // here because users shouldn't directly get them from this header. +- extern char &LoopSimplifyID; +- extern char &LCSSAID; + AU.addRequiredID(LoopSimplifyID); + AU.addPreservedID(LoopSimplifyID); + AU.addRequiredID(LCSSAID); -- GitLab From 0fcdbad50b143fddf9bd3735d91b87eea34fbc22 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Sep 2016 12:03:49 +0200 Subject: [PATCH 140/741] Do release build for LLVM --- easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb | 3 ++- easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb index 15f53abe54..2a5106af44 100644 --- a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb +++ b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-foss-2016b.eb @@ -30,7 +30,8 @@ dependencies = [ configopts = '-DBUILD_SHARED_LIBS=ON ' # required to install extra tools in bin/ -configopts += "-DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ZLIB=ON" +configopts += '-DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ZLIB=ON ' +configopts += '-DCMAKE_BUILD_TYPE=Release ' sanity_check_paths = { 'files': ['bin/llvm-ar', 'bin/FileCheck'], diff --git a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb index 23f87e242d..2bf426d402 100644 --- a/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb +++ b/easybuild/easyconfigs/l/LLVM/LLVM-3.9.0-intel-2016b.eb @@ -32,7 +32,8 @@ dependencies = [ configopts = '-DBUILD_SHARED_LIBS=ON -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -shared-intel" ' # required to install extra tools in bin/ -configopts += "-DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ZLIB=ON" +configopts += '-DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_ZLIB=ON ' +configopts += '-DCMAKE_BUILD_TYPE=Release ' sanity_check_paths = { 'files': ['bin/llvm-ar', 'bin/FileCheck'], -- GitLab From a0485b6337c89e1b1b2236d66a5d2c7312835000 Mon Sep 17 00:00:00 2001 From: Damian Alvarez Date: Thu, 1 Sep 2016 13:21:12 +0200 Subject: [PATCH 141/741] Cppcheck easyconfig --- .../c/cppcheck/cppcheck-1.75-intel-2015b.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb diff --git a/easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb b/easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb new file mode 100644 index 0000000000..8c689004f0 --- /dev/null +++ b/easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb @@ -0,0 +1,20 @@ +name = 'cppcheck' +version = '1.75' + +homepage = 'http://cppcheck.sourceforge.net/' +description = """Cppcheck is a static analysis tool for C/C++ code""" + +toolchain = {'name': 'intel', 'version': '2015b'} + +source_urls = [SOURCEFORGE_SOURCE] +sources = ['%(name)s-%(version)s.tar.bz2'] + +dependencies = [ + ('Qt5', '5.5.1'), + ('PCRE', '8.37'), +] + +have_rules = True +build_gui = True + +moduleclass = 'lang' -- GitLab From aeb216933fde05b044a78619b3189f6bee3255c8 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Sep 2016 13:57:41 +0200 Subject: [PATCH 142/741] Update to Libint/2.1.0 and intel/2016b --- ...Python-2.7.11.eb => Libint-2.1.0-intel-2016b-Python-2.7.12.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/l/Libint/{Libint-2.0.5-intel-2016a-Python-2.7.11.eb => Libint-2.1.0-intel-2016b-Python-2.7.12.eb} (100%) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb similarity index 100% rename from easybuild/easyconfigs/l/Libint/Libint-2.0.5-intel-2016a-Python-2.7.11.eb rename to easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb -- GitLab From f8fd9d6253a8a2d3d7135833691e2bb11daf6f63 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Sep 2016 14:04:27 +0200 Subject: [PATCH 143/741] Update to version 2.1.0 and intel/2016b --- .../l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb index c56a331e40..a3a27a4207 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb @@ -1,21 +1,21 @@ name = 'Libint' -version = '2.0.5' +version = '2.1.0' # Some stuff that uses Libint (PSI) needs Boost-Python, so we inherit the versionsuffix here: #1421 -versionsuffix = '-Python-2.7.11' +versionsuffix = '-Python-2.7.12' homepage = 'https://github.com/evaleev/libint' description = """Libint library is used to evaluate the traditional (electron repulsion) and certain novel two-body matrix elements (integrals) over Cartesian Gaussian functions used in modern atomic and molecular theory.""" -toolchain = {'name': 'intel', 'version': '2016a'} +toolchain = {'name': 'intel', 'version': '2016b'} toolchainopts = {'pic': True} sources = ['release-%s.tar.gz' % '-'.join(version.split('.'))] source_urls = ['https://github.com/evaleev/libint/archive/'] dependencies = [ - ('GMP', '6.1.0'), - ('Boost', '1.60.0', versionsuffix), + ('GMP', '6.1.1'), + ('Boost', '1.61.0', versionsuffix), ] builddependencies = [('Autotools', '20150215')] -- GitLab From 19158539869216ac5bbc07f26c31c285f10e00e0 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 1 Sep 2016 15:23:26 +0200 Subject: [PATCH 144/741] add easyconfig DBD-mysql-4.033-intel-2016b-Perl-5.24.0.eb, add easyconfig MariaDB-10.1.17-intel-2016b.eb, add easyconfig jemalloc-4.2.1-intel-2016b.eb --- ...DBD-mysql-4.033-intel-2016b-Perl-5.24.0.eb | 36 ++++++++++++++++ .../j/jemalloc/jemalloc-4.2.1-intel-2016b.eb | 28 +++++++++++++ .../m/MariaDB/MariaDB-10.1.17-intel-2016b.eb | 42 +++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 easybuild/easyconfigs/d/DBD-mysql/DBD-mysql-4.033-intel-2016b-Perl-5.24.0.eb create mode 100644 easybuild/easyconfigs/j/jemalloc/jemalloc-4.2.1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb diff --git a/easybuild/easyconfigs/d/DBD-mysql/DBD-mysql-4.033-intel-2016b-Perl-5.24.0.eb b/easybuild/easyconfigs/d/DBD-mysql/DBD-mysql-4.033-intel-2016b-Perl-5.24.0.eb new file mode 100644 index 0000000000..0a65c07d0f --- /dev/null +++ b/easybuild/easyconfigs/d/DBD-mysql/DBD-mysql-4.033-intel-2016b-Perl-5.24.0.eb @@ -0,0 +1,36 @@ +easyblock = 'PerlModule' + +name = 'DBD-mysql' +version = '4.033' +versionsuffix = '-Perl-%(perlver)s' + +homepage = 'http://search.cpan.org/~capttofu/DBD-mysql-%(version)s/' +description = """Perl binding for MySQL""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://cpan.metacpan.org/authors/id/C/CA/CAPTTOFU/'] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Perl', '5.24.0'), + ('MariaDB', '10.1.17'), + ('zlib', '1.2.8'), + # OS dependency should be preferred if the os version is more recent then this version + # it's nice to have an up to date openssl for security reasons + #('OpenSSL', '1.0.1q'), +] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +# force static linking of libmysqlclient to dance around problem with unresolved symbols +configopts = '--libs="-L$EBROOTMARIADB/lib -Wl,-Bstatic -lmysqlclient -Wl,-Bdynamic -lpthread -lz -lrt -lssl -lcrypto"' + +options = {'modulename': 'DBD::mysql'} + +sanity_check_paths = { + 'files': ['lib/perl5/site_perl/%(perlver)s/x86_64-linux-thread-multi/DBD/mysql.pm'], + 'dirs': ['lib/perl5/site_perl/%(perlver)s/x86_64-linux-thread-multi/DBD/mysql'], +} + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/j/jemalloc/jemalloc-4.2.1-intel-2016b.eb b/easybuild/easyconfigs/j/jemalloc/jemalloc-4.2.1-intel-2016b.eb new file mode 100644 index 0000000000..7ab95453f8 --- /dev/null +++ b/easybuild/easyconfigs/j/jemalloc/jemalloc-4.2.1-intel-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'ConfigureMake' + +name = 'jemalloc' +version = '4.2.1' + +homepage = 'http://www.canonware.com/jemalloc' +description = """jemalloc is a general purpose malloc(3) implementation that emphasizes fragmentation avoidance and + scalable concurrency support.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/jemalloc/jemalloc/archive'] +sources = ['%(version)s.tar.gz'] + +builddependencies = [('Autotools', '20150215')] + +preconfigopts = "./autogen.sh && " +prebuildopts = "make dist && " + +sanity_check_paths = { + 'files': ['bin/jeprof', 'lib/libjemalloc.a', 'lib/libjemalloc_pic.a', 'lib/libjemalloc.%s' % SHLIB_EXT, + 'include/jemalloc/jemalloc.h'], + 'dirs': ['share'], +} + +modextrapaths = {'LD_PRELOAD': ['lib/libjemalloc.%s' % SHLIB_EXT]} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb b/easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb new file mode 100644 index 0000000000..25dc98c07b --- /dev/null +++ b/easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb @@ -0,0 +1,42 @@ +easyblock = 'CMakeMake' + +name = 'MariaDB' +version = '10.1.17' + +homepage = 'https://mariadb.org/' +description = """MariaDB An enhanced, drop-in replacement for MySQL.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://downloads.mariadb.org/f/mariadb-%(version)s/source'] +sources = [SOURCELOWER_TAR_GZ] + +patches = [ + 'MariaDB-10.1.13-remove-Werror.patch', + 'MariaDB-10.1.13-link-rt-for-jemalloc.patch', +] + +dependencies = [ + ('zlib', '1.2.8'), + ('ncurses', '6.0'), + ('jemalloc', '4.2.1'), + ('PCRE', '8.39'), + ('XZ', '5.2.2'), + ('Boost', '1.61.0', '-Python-2.7.12'), + ('libxml2', '2.9.4'), +] + +builddependencies = [('CMake', '3.6.1')] + +separate_build_dir = True + +configopts = "-DWITH_PCRE=system -DWITH_JEMALLOC=yes -DWITH_ZLIB=system -DMYSQL_MAINTAINER_MODE=ON " +configopts += "-DWITH_EMBEDDED_SERVER=ON " # for libmysqld.so & co + +sanity_check_paths = { + 'files': ['bin/mysql', 'bin/mysqld_safe', 'lib/libmysqlclient.%s' % SHLIB_EXT, 'lib/libmysqld.%s' % SHLIB_EXT, + 'scripts/mysql_install_db'], + 'dirs': ['include', 'share'], +} + +moduleclass = 'data' -- GitLab From 603292170c6bb2ab1bbdfb94f1de7e78efd331cb Mon Sep 17 00:00:00 2001 From: Damian Alvarez Date: Thu, 1 Sep 2016 16:15:52 +0200 Subject: [PATCH 145/741] Fixing the cppcheck easyconfig --- easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb b/easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb index 8c689004f0..70ed0f8ae7 100644 --- a/easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb +++ b/easybuild/easyconfigs/c/cppcheck/cppcheck-1.75-intel-2015b.eb @@ -5,6 +5,7 @@ homepage = 'http://cppcheck.sourceforge.net/' description = """Cppcheck is a static analysis tool for C/C++ code""" toolchain = {'name': 'intel', 'version': '2015b'} +toolchainopts = {'pic': True} source_urls = [SOURCEFORGE_SOURCE] sources = ['%(name)s-%(version)s.tar.bz2'] @@ -17,4 +18,6 @@ dependencies = [ have_rules = True build_gui = True +buildopts = 'CXXFLAGS="$CXXFLAGS -std=c++11"' + moduleclass = 'lang' -- GitLab From 7e1204762f7c2befcfc9c7e731f3a04126dd9130 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Thu, 1 Sep 2016 16:35:54 +0200 Subject: [PATCH 146/741] Version of MIRA using the foss 2016a toolchain including an updated version of the dependency gperftools. --- .../g/gperftools/gperftools-2.5-foss-2016a.eb | 24 +++++++++++++ .../MIRA-4.0.2-foss-2016a-Python-2.7.11.eb | 36 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb create mode 100644 easybuild/easyconfigs/m/MIRA/MIRA-4.0.2-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb b/easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb new file mode 100644 index 0000000000..6dd4849514 --- /dev/null +++ b/easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = "gperftools" +version = "2.5" + +homepage = 'http://github.com/gperftools/gperftools' +description = """gperftools are for use by developers so that they can create more robust applications. + Especially of use to those developing multi-threaded applications in C++ with templates. + Includes TCMalloc, heap-checker, heap-profiler and cpu-profiler.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['https://github.com/gperftools/gperftools/releases/download/%(namelower)s-%(version)s'] + +builddependencies = [('Autotools', '20150215', '', ('GCCcore', '4.9.3'))] +dependencies = [('libunwind', '1.1')] + +sanity_check_paths = { + 'files': ["bin/pprof"], + 'dirs': [] +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/m/MIRA/MIRA-4.0.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/m/MIRA/MIRA-4.0.2-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..c98b95b63b --- /dev/null +++ b/easybuild/easyconfigs/m/MIRA/MIRA-4.0.2-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,36 @@ +easyblock = 'ConfigureMake' + +name = 'MIRA' +version = '4.0.2' +versionsuffix = '-Python-2.7.11' + +homepage = 'http://sourceforge.net/p/mira-assembler/wiki/Home/' +description = """MIRA is a whole genome shotgun and EST sequence assembler for Sanger, 454, Solexa (Illumina), + IonTorrent data and PacBio (the later at the moment only CCS and error-corrected CLR reads).""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +sources = ['%(namelower)s-%(version)s.tar.bz2'] +source_urls = [('http://sourceforge.net/projects/mira-assembler/files/MIRA/stable/', 'download')] + +# don't use PAX, it might break. +tar_config_opts = True + +configopts = '--with-boost-libdir=$EBROOTBOOST/lib --with-expat=$EBROOTEXPAT' + +patches = ['MIRA-%(version)s-quirks.patch'] + +builddependencies = [('flex', '2.5.39')] +dependencies = [ + ('Boost', '1.61.0', versionsuffix), + ('expat', '2.1.1'), + ('zlib', '1.2.8'), + ('gperftools', '2.5'), +] + +sanity_check_paths = { + 'files': ["bin/mira"], + 'dirs': ["bin", "share"], +} + +moduleclass = 'bio' -- GitLab From 20e2f6940ade9b8d19e387650804cbfebdb6d592 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Sep 2016 17:26:33 +0200 Subject: [PATCH 147/741] Drop Clang/3.9.0 for now Build issues, will try to fix them later in another PR. --- .../c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 easybuild/easyconfigs/c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb deleted file mode 100644 index 277005ae82..0000000000 --- a/easybuild/easyconfigs/c/Clang/Clang-3.9.0-GCC-5.4.0-2.26.eb +++ /dev/null @@ -1,49 +0,0 @@ -## -# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild -# -# Copyright:: Copyright 2013-2015 Dmitri Gribenko, Ward Poelmans -# Authors:: Dmitri Gribenko -# Authors:: Ward Poelmans -# License:: GPLv2 or later, MIT, three-clause BSD. -# $Id$ -## - -name = "Clang" -version = "3.9.0" - -homepage = "http://clang.llvm.org/" -description = """C, C++, Objective-C compiler, based on LLVM. Does not - include C++ standard library -- use libstdc++ from GCC.""" - -# Clang also depends on libstdc++ during runtime, but this dependency is -# already specified as the toolchain. -toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} -# Do not set optarch to True: it will cause the build to fail -toolchainopts = {'optarch': False} - -source_urls = ["http://llvm.org/releases/%(version)s"] -sources = [ - "llvm-%(version)s.src.tar.xz", - "cfe-%(version)s.src.tar.xz", - "compiler-rt-%(version)s.src.tar.xz", - "polly-%(version)s.src.tar.xz", - "openmp-%(version)s.src.tar.xz", -] - -dependencies = [ - ('GMP', '6.1.1'), -] - -builddependencies = [ - ('CMake', '3.6.1'), - ('Python', '2.7.12', '-bare'), - ('libxml2', '2.9.4'), -] - -assertions = True - -usepolly = True - -build_targets = ['X86'] - -moduleclass = 'compiler' -- GitLab From 6871ffa1a51ebf15b941f4ed077fb4b53b9b21a8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 1 Sep 2016 19:31:19 +0200 Subject: [PATCH 148/741] add easyconfig MariaDB-10.1.17-intel-2016b.eb --- easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb b/easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb index 25dc98c07b..fe8145c64d 100644 --- a/easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb +++ b/easybuild/easyconfigs/m/MariaDB/MariaDB-10.1.17-intel-2016b.eb @@ -32,6 +32,7 @@ separate_build_dir = True configopts = "-DWITH_PCRE=system -DWITH_JEMALLOC=yes -DWITH_ZLIB=system -DMYSQL_MAINTAINER_MODE=ON " configopts += "-DWITH_EMBEDDED_SERVER=ON " # for libmysqld.so & co +configopts += "-DWITHOUT_TOKUDB=ON " # not supported with Intel compilers sanity_check_paths = { 'files': ['bin/mysql', 'bin/mysqld_safe', 'lib/libmysqlclient.%s' % SHLIB_EXT, 'lib/libmysqld.%s' % SHLIB_EXT, -- GitLab From 6b8e69325f19fe78df7f071514fbb266e163f487 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 2 Sep 2016 11:17:07 +0200 Subject: [PATCH 149/741] Update libint/2.1.0 to work --- .../Libint-2.1.0-intel-2016b-Python-2.7.12.eb | 28 ---------------- .../l/Libint/Libint-2.1.0-intel-2016b.eb | 33 +++++++++++++++++++ 2 files changed, 33 insertions(+), 28 deletions(-) delete mode 100644 easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb deleted file mode 100644 index a3a27a4207..0000000000 --- a/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b-Python-2.7.12.eb +++ /dev/null @@ -1,28 +0,0 @@ -name = 'Libint' -version = '2.1.0' -# Some stuff that uses Libint (PSI) needs Boost-Python, so we inherit the versionsuffix here: #1421 -versionsuffix = '-Python-2.7.12' - -homepage = 'https://github.com/evaleev/libint' -description = """Libint library is used to evaluate the traditional (electron repulsion) and certain novel two-body - matrix elements (integrals) over Cartesian Gaussian functions used in modern atomic and molecular theory.""" - -toolchain = {'name': 'intel', 'version': '2016b'} -toolchainopts = {'pic': True} - -sources = ['release-%s.tar.gz' % '-'.join(version.split('.'))] -source_urls = ['https://github.com/evaleev/libint/archive/'] - -dependencies = [ - ('GMP', '6.1.1'), - ('Boost', '1.61.0', versionsuffix), -] - -builddependencies = [('Autotools', '20150215')] - -# no exec perm on the autogen.sh script -preconfigopts = 'sh autogen.sh && ' - -parallel = 1 - -moduleclass = 'chem' diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb b/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb new file mode 100644 index 0000000000..6b33080439 --- /dev/null +++ b/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'Libint' +version = '2.1.0' + +homepage = 'https://github.com/evaleev/libint' +description = """Libint library is used to evaluate the traditional (electron repulsion) and certain novel two-body + matrix elements (integrals) over Cartesian Gaussian functions used in modern atomic and molecular theory.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = ['libint-%(version)s-stable.tgz'] +source_urls = ['https://github.com/evaleev/libint/releases/download/v%(version)s'] + +builddependencies = [ + ('GMP', '6.1.1'), + ('Boost', '1.61.0', '-Python-2.7.12'), + ('Eigen', '3.2.9'), + ('Python', '2.7.12'), +] + +configopts = '--enable-shared' + +runtest = 'check' + +sanity_check_paths = { + 'files': ['include/libint2.h', 'include/libint2.hpp', + 'lib/libint2.a', 'lib/libint2.%s' % SHLIB_EXT], + 'dirs': ['share/libint', 'include/libint2', 'lib/pkgconfig'] +} + +moduleclass = 'chem' -- GitLab From b34f9a9f5af18ae285904c9d1e82de7ae87a5074 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 2 Sep 2016 12:26:59 +0200 Subject: [PATCH 150/741] add easyconfig gperftools-2.5-intel-2016b.eb, add easyconfig libunwind-1.1-intel-2016b.eb --- .../gperftools/gperftools-2.5-intel-2016b.eb | 26 +++++++++++++++ .../l/libunwind/libunwind-1.1-intel-2016b.eb | 33 +++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 easybuild/easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb create mode 100644 easybuild/easyconfigs/l/libunwind/libunwind-1.1-intel-2016b.eb diff --git a/easybuild/easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb b/easybuild/easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb new file mode 100644 index 0000000000..2144d90378 --- /dev/null +++ b/easybuild/easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = "gperftools" +version = "2.5" + +homepage = 'http://github.com/gperftools/gperftools' +description = """gperftools are for use by developers so that they can create more robust applications. + Especially of use to those developing multi-threaded applications in C++ with templates. + Includes TCMalloc, heap-checker, heap-profiler and cpu-profiler.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['https://github.com/gperftools/gperftools/releases/download/%(namelower)s-%(version)s'] + +builddependencies = [('Autotools', '20150215')] +dependencies = [('libunwind', '1.1')] + +preconfigopts = './autogen.sh && ' + +sanity_check_paths = { + 'files': ["bin/pprof"], + 'dirs': [] +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/l/libunwind/libunwind-1.1-intel-2016b.eb b/easybuild/easyconfigs/l/libunwind/libunwind-1.1-intel-2016b.eb new file mode 100644 index 0000000000..aea3c64e51 --- /dev/null +++ b/easybuild/easyconfigs/l/libunwind/libunwind-1.1-intel-2016b.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'libunwind' +version = '1.1' + +homepage = 'http://www.nongnu.org/libunwind/' +description = """The primary goal of libunwind is to define a portable and efficient C programming interface + (API) to determine the call-chain of a program. The API additionally provides the means to manipulate the + preserved (callee-saved) state of each call-frame and to resume execution at any point in the call-chain + (non-local goto). The API supports both local (same-process) and remote (across-process) operation. + As such, the API is useful in a number of applications""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCE_TAR_GZ] +source_urls = [GNU_SAVANNAH_SOURCE] + +checksums = [ + 'fb4ea2f6fbbe45bf032cd36e586883ce', # libunwind-1.1.tar.gz +] + +dependencies = [ + ('XZ', '5.2.2'), +] + +preconfigopts = 'export LIBS="$LIBS -llzma" && ' + +sanity_check_paths = { + 'files': ["include/libunwind.h", "lib/libunwind.%s" % SHLIB_EXT], + 'dirs': [] +} + +moduleclass = 'lib' -- GitLab From 95f5414f1f90e278ef84eb1e5409831637dc4a5c Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 2 Sep 2016 12:30:40 +0200 Subject: [PATCH 151/741] add easyconfig gperftools-2.5-intel-2016b.eb --- .../easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb b/easybuild/easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb index 2144d90378..fbae9a2a85 100644 --- a/easybuild/easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb +++ b/easybuild/easyconfigs/g/gperftools/gperftools-2.5-intel-2016b.eb @@ -13,10 +13,9 @@ toolchain = {'name': 'intel', 'version': '2016b'} sources = [SOURCE_TAR_GZ] source_urls = ['https://github.com/gperftools/gperftools/releases/download/%(namelower)s-%(version)s'] -builddependencies = [('Autotools', '20150215')] dependencies = [('libunwind', '1.1')] -preconfigopts = './autogen.sh && ' +configopts = '--enable-libunwind' sanity_check_paths = { 'files': ["bin/pprof"], -- GitLab From 4af1dacbc72aa931d38b57f34e358b295031d790 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 2 Sep 2016 12:46:09 +0200 Subject: [PATCH 152/741] use updated Libint easyblock --- .../easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb b/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb index 6b33080439..8282cb93cc 100644 --- a/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb +++ b/easybuild/easyconfigs/l/Libint/Libint-2.1.0-intel-2016b.eb @@ -1,5 +1,3 @@ -easyblock = 'ConfigureMake' - name = 'Libint' version = '2.1.0' @@ -20,14 +18,4 @@ builddependencies = [ ('Python', '2.7.12'), ] -configopts = '--enable-shared' - -runtest = 'check' - -sanity_check_paths = { - 'files': ['include/libint2.h', 'include/libint2.hpp', - 'lib/libint2.a', 'lib/libint2.%s' % SHLIB_EXT], - 'dirs': ['share/libint', 'include/libint2', 'lib/pkgconfig'] -} - moduleclass = 'chem' -- GitLab From c9b4ca890e48d0023f2f86df2998672753323a28 Mon Sep 17 00:00:00 2001 From: jhein32 Date: Fri, 2 Sep 2016 12:59:05 +0200 Subject: [PATCH 153/741] First complete fileset for an pomkl, using openmpi 1.10.4 and mkl 11.3.3.210 --- .../h/HPL/HPL-2.1-pomkl-2016.09.eb | 18 ++++++++ .../h/HPL/HPL-2.2-pomkl-2016.09.eb | 18 ++++++++ .../hwloc-1.11.4-PGI-16.7-GCC-5.4.0-2.26.eb | 27 ++++++++++++ .../i/imkl/imkl-11.3.3.210-pompi-2016.09.eb | 38 +++++++++++++++++ .../OpenMPI-1.10.4-PGI-16.7-GCC-5.4.0-2.26.eb | 41 +++++++++++++++++++ .../easyconfigs/p/pomkl/pomkl-2016.09.eb | 20 +++++++++ .../easyconfigs/p/pompi/pompi-2016.09.eb | 19 +++++++++ 7 files changed, 181 insertions(+) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.1-pomkl-2016.09.eb create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-pomkl-2016.09.eb create mode 100644 easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-PGI-16.7-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-pompi-2016.09.eb create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.4-PGI-16.7-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/p/pomkl/pomkl-2016.09.eb create mode 100644 easybuild/easyconfigs/p/pompi/pompi-2016.09.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.1-pomkl-2016.09.eb b/easybuild/easyconfigs/h/HPL/HPL-2.1-pomkl-2016.09.eb new file mode 100644 index 0000000000..112d6aa634 --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.1-pomkl-2016.09.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.1' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'pomkl', 'version': '2016.09'} +toolchainopts = {'optarch': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-pomkl-2016.09.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-pomkl-2016.09.eb new file mode 100644 index 0000000000..005a57564c --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-pomkl-2016.09.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'pomkl', 'version': '2016.09'} +toolchainopts = {'optarch': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-PGI-16.7-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-PGI-16.7-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..6138766fd9 --- /dev/null +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-PGI-16.7-GCC-5.4.0-2.26.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'hwloc' +version = '1.11.4' + +homepage = 'http://www.open-mpi.org/projects/hwloc/' +description = """The Portable Hardware Locality (hwloc) software package provides a portable abstraction + (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including + NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various + system attributes such as cache and memory information as well as the locality of I/O devices such as + network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering + information about modern computing hardware so as to exploit it accordingly and efficiently.""" + +toolchain = {'name': 'PGI', 'version': '16.7-GCC-5.4.0-2.26'} + +source_urls = ['http://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] +sources = [SOURCE_TAR_GZ] + +checksums = ['b6f23eb59074fd09fdd84905d50b103d'] + +dependencies = [ + ('numactl', '2.0.11', '', ('GCCcore', '5.4.0')), +] + +configopts = "--enable-libnuma=$EBROOTNUMACTL" + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-pompi-2016.09.eb b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-pompi-2016.09.eb new file mode 100644 index 0000000000..ea94f4aa6a --- /dev/null +++ b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-pompi-2016.09.eb @@ -0,0 +1,38 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'imkl' +version = '11.3.3.210' + +homepage = 'http://software.intel.com/en-us/intel-mkl/' +description = """Intel Math Kernel Library is a library of highly optimized, + extensively threaded math routines for science, engineering, and financial + applications that require maximum performance. Core math functions include + BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" + +toolchain = {'name': 'pompi', 'version': '2016.09'} + +sources = ['l_mkl_%(version)s.tgz'] +checksums = ['f72546df27f5ebb0941b5d21fd804e34'] + +dontcreateinstalldir = 'True' + +license_file = HOME + '/licenses/intel/license.lic' + +components = ['intel-mkl'] + +interfaces = True + +postinstallcmds = [ + # extract the examples + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic.tgz -C %(installdir)s/mkl/examples/' +] + +modextravars = { + 'MKL_EXAMPLES': '%(installdir)s/mkl/examples/', +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.4-PGI-16.7-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.4-PGI-16.7-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..fd6bb36c38 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.4-PGI-16.7-GCC-5.4.0-2.26.eb @@ -0,0 +1,41 @@ +easyblock = 'ConfigureMake' + +name = 'OpenMPI' +version = '1.10.4' + +homepage = 'http://www.open-mpi.org/' +description = """The Open MPI Project is an open source MPI-2 implementation.""" + +toolchain = {'name': 'PGI', 'version': '16.7-GCC-5.4.0-2.26'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads'] + +checksums = ['fb2fdb6a5b65c80d7dfa4bc9a0caf665'] + +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' +configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path +configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support +configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading +configopts += '--with-cxxrtlib="-lgcc_s -lstdc++"' # for vt-mpi-unify + +dependencies = [('hwloc', '1.11.4')] + +# needed for --with-verbs +osdependencies = [('libibverbs-dev', 'libibverbs-devel')] + +libs = ["mpi_cxx", "mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte", "vt", "vt-hyb", "vt-mpi", "vt-mpi-unify"] +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], + 'dirs': ["include/openmpi/ompi/mpi/cxx"], +} + +sanity_check_commands = [ + ('mpicc --version | grep pgcc', ''), + ('mpicxx --version | grep pgc++', ''), + ('mpifort --version | grep pgfortran', ''), +] + +moduleclass = 'mpi' diff --git a/easybuild/easyconfigs/p/pomkl/pomkl-2016.09.eb b/easybuild/easyconfigs/p/pomkl/pomkl-2016.09.eb new file mode 100644 index 0000000000..74076e42f0 --- /dev/null +++ b/easybuild/easyconfigs/p/pomkl/pomkl-2016.09.eb @@ -0,0 +1,20 @@ +easyblock = "Toolchain" + +name = 'pomkl' +version = '2016.09' + +homepage = 'http://www.pgroup.com/index.htm' +description = """Toolchain with PGI C, C++ and Fortran compilers, alongside Intel MKL & OpenMPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '16.7' +gccsuff = '-GCC-5.4.0-2.26' + +dependencies = [ + ('PGI', compver, gccsuff), + ('OpenMPI', '1.10.4', '', ('PGI', '%s%s' % (compver, gccsuff))), + ('imkl', '11.3.3.210', '', ('pompi', '%s' % (version))), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/p/pompi/pompi-2016.09.eb b/easybuild/easyconfigs/p/pompi/pompi-2016.09.eb new file mode 100644 index 0000000000..b83ba47007 --- /dev/null +++ b/easybuild/easyconfigs/p/pompi/pompi-2016.09.eb @@ -0,0 +1,19 @@ +easyblock = "Toolchain" + +name = 'pompi' +version = '2016.09' +pgisuffix = '-GCC-5.4.0-2.26' + +homepage = 'http://www.pgroup.com/index.htm' +description = """Toolchain with PGI C, C++ and Fortran compilers, alongside OpenMPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '16.7' + +dependencies = [ + ('PGI', compver, pgisuffix), + ('OpenMPI', '1.10.4', '', ('PGI', '%s%s' % (compver, pgisuffix))), +] + +moduleclass = 'toolchain' -- GitLab From f86546c585c9d6c0c862faaf6676b85d7cd47f90 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Fri, 2 Sep 2016 14:15:37 +0100 Subject: [PATCH 154/741] foss 2016.07 toolchain (uses GCC 6.1.0) --- .../b/Bison/Bison-3.0.4-GCCcore-6.1.0.eb | 26 + .../b/binutils/binutils-2.27-GCCcore-6.1.0.eb | 21 + .../f/FFTW/FFTW-3.3.4-gompi-2016.07.eb | 34 ++ .../f/flex/flex-2.6.0-GCCcore-6.1.0.eb | 21 + easybuild/easyconfigs/f/foss/foss-2016.07.eb | 37 ++ easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb | 25 + .../easyconfigs/g/GCCcore/GCCcore-6.1.0.eb | 57 +++ .../GCCcore/GCCcore-6.1.0_fix-find-isl.patch | 14 + ...6.1.0_mpfr-3.1.4-allpatches-20160804.patch | 455 ++++++++++++++++++ .../easyconfigs/g/gompi/gompi-2016.07.eb | 22 + .../h/hwloc/hwloc-1.11.3-GCC-6.1.0-2.27.eb | 23 + .../m/M4/M4-1.4.17-GCCcore-6.1.0.eb | 26 + ...nBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb | 49 ++ .../OpenMPI/OpenMPI-1.10.2-GCC-6.1.0-2.27.eb | 33 ++ ...pi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb | 25 + .../z/zlib/zlib-1.2.8-GCCcore-6.1.0.eb | 25 + 16 files changed, 893 insertions(+) create mode 100644 easybuild/easyconfigs/b/Bison/Bison-3.0.4-GCCcore-6.1.0.eb create mode 100644 easybuild/easyconfigs/b/binutils/binutils-2.27-GCCcore-6.1.0.eb create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompi-2016.07.eb create mode 100644 easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb create mode 100644 easybuild/easyconfigs/f/foss/foss-2016.07.eb create mode 100644 easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb create mode 100644 easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb create mode 100644 easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_fix-find-isl.patch create mode 100644 easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_mpfr-3.1.4-allpatches-20160804.patch create mode 100644 easybuild/easyconfigs/g/gompi/gompi-2016.07.eb create mode 100644 easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-GCC-6.1.0-2.27.eb create mode 100644 easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-GCC-6.1.0-2.27.eb create mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb create mode 100644 easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCCcore-6.1.0.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-3.0.4-GCCcore-6.1.0.eb b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-GCCcore-6.1.0.eb new file mode 100644 index 0000000000..59b38bba21 --- /dev/null +++ b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-GCCcore-6.1.0.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Bison' +version = '3.0.4' + +homepage = 'http://www.gnu.org/software/bison' +description = """Bison is a general-purpose parser generator that converts an annotated context-free grammar + into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.""" + +toolchain = {'name': 'GCCcore', 'version': '6.1.0'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +builddependencies = [ + ('M4', '1.4.17'), + # use same binutils version that was used when building GCCcore toolchain + ('binutils', '2.27', '', True), +] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["bison", "yacc"]] + ["lib/liby.a"], + 'dirs': [], +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/b/binutils/binutils-2.27-GCCcore-6.1.0.eb b/easybuild/easyconfigs/b/binutils/binutils-2.27-GCCcore-6.1.0.eb new file mode 100644 index 0000000000..215aaf0cb2 --- /dev/null +++ b/easybuild/easyconfigs/b/binutils/binutils-2.27-GCCcore-6.1.0.eb @@ -0,0 +1,21 @@ +name = 'binutils' +version = '2.27' + +homepage = 'http://directory.fsf.org/project/binutils/' +description = "binutils: GNU binary utilities" + +toolchain = {'name': 'GCCcore', 'version': '6.1.0'} + +sources = [SOURCE_TAR_GZ] +source_urls = [GNU_SOURCE] + +builddependencies = [ + ('flex', '2.6.0'), + ('Bison', '3.0.4'), + # zlib required, but being linked in statically, so not a runtime dep + ('zlib', '1.2.8'), + # use same binutils version that was used when building GCC toolchain, to 'bootstrap' this binutils + ('binutils', version, '', True) +] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompi-2016.07.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompi-2016.07.eb new file mode 100644 index 0000000000..3fd16df92f --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompi-2016.07.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'FFTW' +version = '3.3.4' + +homepage = 'http://www.fftw.org' +description = """FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) + in one or more dimensions, of arbitrary input size, and of both real and complex data.""" + +toolchain = {'name': 'gompi', 'version': '2016.07'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [homepage] + +common_configopts = "--enable-threads --enable-openmp --with-pic" + +configopts = [ + common_configopts + " --enable-single --enable-sse2 --enable-mpi", + common_configopts + " --enable-long-double --enable-mpi", + common_configopts + " --enable-quad-precision", + common_configopts + " --enable-sse2 --enable-mpi", # default as last +] + +sanity_check_paths = { + 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom', 'q-wisdom']] + + ['include/fftw3%s' % x for x in ['-mpi.f03', '-mpi.h', '.f', '.f03', + '.h', 'l-mpi.f03', 'l.f03', 'q.f03']] + + ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']] + + ['lib/libfftw3q.a', 'lib/libfftw3q_omp.a'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb new file mode 100644 index 0000000000..687cf19d5f --- /dev/null +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb @@ -0,0 +1,21 @@ +name = 'flex' +version = '2.6.0' + +homepage = 'http://flex.sourceforge.net/' +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, + sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" + +toolchain = {'name': 'GCCcore', 'version': '6.1.0'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] + +dependencies = [('Bison', '3.0.4')] + +# use same binutils version that was used when building GCC toolchain +builddependencies = [('binutils', '2.27', '', True)] + +parallel = 1 + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/foss/foss-2016.07.eb b/easybuild/easyconfigs/f/foss/foss-2016.07.eb new file mode 100644 index 0000000000..f4211bb9f3 --- /dev/null +++ b/easybuild/easyconfigs/f/foss/foss-2016.07.eb @@ -0,0 +1,37 @@ +easyblock = 'Toolchain' + +name = 'foss' +version = '2016.07' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolchain, including + OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +gccver = '6.1.0' +binutilsver = '2.27' +gccbinver = '%s-%s' % (gccver, binutilsver) + +blaslib = 'OpenBLAS' +blasver = '0.2.18' +blas = '%s-%s' % (blaslib, blasver) +blassuff = '-LAPACK-3.6.1' + +# toolchain used to build foss dependencies +comp_mpi_tc_name = 'gompi' +comp_mpi_tc = (comp_mpi_tc_name, version) + +# compiler toolchain depencies +# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain +# because of toolchain preperation functions +# For binutils, stick to http://wiki.osdev.org/Cross-Compiler_Successful_Builds +dependencies = [ + ('GCC', gccbinver), + ('OpenMPI', '1.10.2', '', ('GCC', gccbinver)), + (blaslib, blasver, blassuff, comp_mpi_tc), + ('FFTW', '3.3.4', '', comp_mpi_tc), + ('ScaLAPACK', '2.0.2', '-%s%s' % (blas, blassuff), comp_mpi_tc) +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb b/easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb new file mode 100644 index 0000000000..258248286e --- /dev/null +++ b/easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb @@ -0,0 +1,25 @@ +easyblock = 'Bundle' + +name = 'GCC' +version = '6.1.0' + +binutilsver = '2.27' +versionsuffix = '-%s' % (binutilsver) + +homepage = 'http://gcc.gnu.org/' +description = """The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, + as well as libraries for these languages (libstdc++, libgcj,...).""" + +toolchain = {'name': 'dummy', 'version': ''} + +dependencies = [ + ('GCCcore', version), + # binutils built on top of GCCcore, which was built on top of (dummy-built) binutils + ('binutils', binutilsver, '', ('GCCcore', version)), +] + +altroot = 'GCCcore' +altversion = 'GCCcore' + +# this bundle serves as a compiler-only toolchain, so it should be marked as compiler (important for HMNS) +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb new file mode 100644 index 0000000000..d15501829b --- /dev/null +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb @@ -0,0 +1,57 @@ +easyblock = 'EB_GCC' + +name = 'GCCcore' +version = '6.1.0' + +homepage = 'http://gcc.gnu.org/' +description = """The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, + as well as libraries for these languages (libstdc++, libgcj,...).""" + +toolchain = {'name': 'dummy', 'version': ''} + +mpfr_version = '3.1.4' + +source_urls = [ + 'http://ftpmirror.gnu.org/gmp', # idem for GMP + 'http://ftpmirror.gnu.org/mpfr', # idem for MPFR + 'http://www.multiprecision.org/mpc/download', # MPC official + 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies + 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://ftp.heanet.ie/mirrors/gnu/%(namelower)s/%(namelower)s-%(version)s/', # Alternative for GCC + 'http://ftpmirror.gnu.org/gcc/gcc-%(version)s', # GCC auto-resolving HTTP mirror +] + +sources = [ + 'gcc-%(version)s.tar.bz2', + 'gmp-6.1.1.tar.bz2', + 'mpfr-%s.tar.bz2' % mpfr_version, + 'mpc-1.0.3.tar.gz', + 'isl-0.16.1.tar.bz2', +] + +builddependencies = [ + ('M4', '1.4.17'), + ('binutils', '2.27'), +] + +patches = [ + ('%s-%s_mpfr-%s-allpatches-20160804.patch' % (name, version, mpfr_version), '../mpfr-%s' % mpfr_version), + ('%s-%s_fix-find-isl.patch' % (name, version)), +] + +checksums = [ + '8fb6cb98b8459f5863328380fbf06bd1', # gcc-6.1.0.tar.bz2 + '4c175f86e11eb32d8bf9872ca3a8e11d', # gmp-6.1.1.tar.bz2 + 'b8a2f6b0e68bef46e53da2ac439e1cf4', # mpfr-3.1.4.tar.gz + 'd6a1d5f8ddea3abd2cc3e98f58352d26', # mpc-1.0.3.tar.gz + 'ac1f25a0677912952718a51f5bc20f32', # isl-0.16.1.tar.bz2 +] + +languages = ['c', 'c++', 'fortran'] + +withisl = True + +# building GCC sometimes fails if make parallelism is too high, so let's limit it +maxparallel = 4 + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_fix-find-isl.patch b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_fix-find-isl.patch new file mode 100644 index 0000000000..6334b6be35 --- /dev/null +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_fix-find-isl.patch @@ -0,0 +1,14 @@ +# Don't use libmpc and libmpfr to find libisl +# by wpoely86@gmail.com +diff -ur gcc-6.1.0.orig/configure gcc-6.1.0/configure +--- gcc-6.1.0.orig/configure 2016-08-26 17:51:48.470524515 +0200 ++++ gcc-6.1.0/configure 2016-03-17 23:54:19.000000000 +0100 +@@ -6018,7 +6018,7 @@ + _isl_saved_LIBS=$LIBS + + CFLAGS="${_isl_saved_CFLAGS} ${islinc} ${gmpinc}" +- LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs} ${gmplibs}" ++ LDFLAGS="${_isl_saved_LDFLAGS} ${isllibs}" + LIBS="${_isl_saved_LIBS} -lisl -lgmp" + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isl 0.16, 0.15, or deprecated 0.14" >&5 diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_mpfr-3.1.4-allpatches-20160804.patch b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_mpfr-3.1.4-allpatches-20160804.patch new file mode 100644 index 0000000000..41748b0345 --- /dev/null +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_mpfr-3.1.4-allpatches-20160804.patch @@ -0,0 +1,455 @@ +# All mpfr patches as of 2016-08-04, from same pull request for GCC 6.2.0 +# taken from their website: http://www.mpfr.org/mpfr-current/#download +diff -Naurd mpfr-3.1.4-a/PATCHES mpfr-3.1.4-b/PATCHES +--- mpfr-3.1.4-a/PATCHES 2016-04-13 21:22:23.720604013 +0000 ++++ mpfr-3.1.4-b/PATCHES 2016-04-13 21:22:23.744603677 +0000 +@@ -0,0 +1 @@ ++unix-check +diff -Naurd mpfr-3.1.4-a/VERSION mpfr-3.1.4-b/VERSION +--- mpfr-3.1.4-a/VERSION 2016-03-06 11:33:04.000000000 +0000 ++++ mpfr-3.1.4-b/VERSION 2016-04-13 21:22:23.744603677 +0000 +@@ -1 +1 @@ +-3.1.4 ++3.1.4-p1 +diff -Naurd mpfr-3.1.4-a/src/mpfr-impl.h mpfr-3.1.4-b/src/mpfr-impl.h +--- mpfr-3.1.4-a/src/mpfr-impl.h 2016-03-06 11:33:04.000000000 +0000 ++++ mpfr-3.1.4-b/src/mpfr-impl.h 2016-04-13 21:22:23.736603789 +0000 +@@ -252,19 +252,6 @@ + # define MPFR_WIN_THREAD_SAFE_DLL 1 + #endif + +-/* Detect some possible inconsistencies under Unix. */ +-#if defined(__unix__) +-# if defined(_WIN32) +-# error "Both __unix__ and _WIN32 are defined" +-# endif +-# if __GMP_LIBGMP_DLL +-# error "__unix__ is defined and __GMP_LIBGMP_DLL is true" +-# endif +-# if defined(MPFR_WIN_THREAD_SAFE_DLL) +-# error "Both __unix__ and MPFR_WIN_THREAD_SAFE_DLL are defined" +-# endif +-#endif +- + #if defined(__MPFR_WITHIN_MPFR) || !defined(MPFR_WIN_THREAD_SAFE_DLL) + extern MPFR_THREAD_ATTR unsigned int __gmpfr_flags; + extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emin; +diff -Naurd mpfr-3.1.4-a/src/mpfr.h mpfr-3.1.4-b/src/mpfr.h +--- mpfr-3.1.4-a/src/mpfr.h 2016-03-06 11:33:04.000000000 +0000 ++++ mpfr-3.1.4-b/src/mpfr.h 2016-04-13 21:22:23.744603677 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 4 +-#define MPFR_VERSION_STRING "3.1.4" ++#define MPFR_VERSION_STRING "3.1.4-p1" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.4-a/src/version.c mpfr-3.1.4-b/src/version.c +--- mpfr-3.1.4-a/src/version.c 2016-03-06 11:33:05.000000000 +0000 ++++ mpfr-3.1.4-b/src/version.c 2016-04-13 21:22:23.744603677 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.4"; ++ return "3.1.4-p1"; + } +diff -Naurd mpfr-3.1.4-a/PATCHES mpfr-3.1.4-b/PATCHES +--- mpfr-3.1.4-a/PATCHES 2016-05-22 19:59:43.838399677 +0000 ++++ mpfr-3.1.4-b/PATCHES 2016-05-22 19:59:43.866399168 +0000 +@@ -0,0 +1 @@ ++add-sub-ui-flags +diff -Naurd mpfr-3.1.4-a/VERSION mpfr-3.1.4-b/VERSION +--- mpfr-3.1.4-a/VERSION 2016-04-13 21:22:23.744603677 +0000 ++++ mpfr-3.1.4-b/VERSION 2016-05-22 19:59:43.866399168 +0000 +@@ -1 +1 @@ +-3.1.4-p1 ++3.1.4-p2 +diff -Naurd mpfr-3.1.4-a/src/add_ui.c mpfr-3.1.4-b/src/add_ui.c +--- mpfr-3.1.4-a/src/add_ui.c 2016-03-06 11:33:04.000000000 +0000 ++++ mpfr-3.1.4-b/src/add_ui.c 2016-05-22 19:59:43.854399385 +0000 +@@ -49,6 +49,7 @@ + MPFR_SAVE_EXPO_MARK (expo); + MPFR_SET_EXP (uu, GMP_NUMB_BITS - cnt); + inex = mpfr_add(y, x, uu, rnd_mode); ++ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); + MPFR_SAVE_EXPO_FREE (expo); + return mpfr_check_range(y, inex, rnd_mode); + } +diff -Naurd mpfr-3.1.4-a/src/mpfr.h mpfr-3.1.4-b/src/mpfr.h +--- mpfr-3.1.4-a/src/mpfr.h 2016-04-13 21:22:23.744603677 +0000 ++++ mpfr-3.1.4-b/src/mpfr.h 2016-05-22 19:59:43.862399241 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 4 +-#define MPFR_VERSION_STRING "3.1.4-p1" ++#define MPFR_VERSION_STRING "3.1.4-p2" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.4-a/src/sub_ui.c mpfr-3.1.4-b/src/sub_ui.c +--- mpfr-3.1.4-a/src/sub_ui.c 2016-03-06 11:33:05.000000000 +0000 ++++ mpfr-3.1.4-b/src/sub_ui.c 2016-05-22 19:59:43.854399385 +0000 +@@ -52,6 +52,7 @@ + MPFR_SAVE_EXPO_MARK (expo); + MPFR_SET_EXP (uu, GMP_NUMB_BITS - cnt); + inex = mpfr_sub (y, x, uu, rnd_mode); ++ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); + MPFR_SAVE_EXPO_FREE (expo); + return mpfr_check_range (y, inex, rnd_mode); + } +diff -Naurd mpfr-3.1.4-a/src/version.c mpfr-3.1.4-b/src/version.c +--- mpfr-3.1.4-a/src/version.c 2016-04-13 21:22:23.744603677 +0000 ++++ mpfr-3.1.4-b/src/version.c 2016-05-22 19:59:43.866399168 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.4-p1"; ++ return "3.1.4-p2"; + } +diff -Naurd mpfr-3.1.4-a/tests/tadd_ui.c mpfr-3.1.4-b/tests/tadd_ui.c +--- mpfr-3.1.4-a/tests/tadd_ui.c 2016-03-06 11:33:03.000000000 +0000 ++++ mpfr-3.1.4-b/tests/tadd_ui.c 2016-05-22 19:59:43.854399385 +0000 +@@ -69,7 +69,9 @@ + + /* nan + 2394875 == nan */ + mpfr_set_nan (x); ++ mpfr_clear_nanflag (); + mpfr_add_ui (y, x, 2394875L, MPFR_RNDN); ++ MPFR_ASSERTN (mpfr_nanflag_p ()); + MPFR_ASSERTN (mpfr_nan_p (y)); + + /* +inf + 2394875 == +inf */ +diff -Naurd mpfr-3.1.4-a/tests/tsub_ui.c mpfr-3.1.4-b/tests/tsub_ui.c +--- mpfr-3.1.4-a/tests/tsub_ui.c 2016-03-06 11:33:03.000000000 +0000 ++++ mpfr-3.1.4-b/tests/tsub_ui.c 2016-05-22 19:59:43.854399385 +0000 +@@ -96,7 +96,9 @@ + + /* nan - 1 == nan */ + mpfr_set_nan (x); ++ mpfr_clear_nanflag (); + mpfr_sub_ui (y, x, 1L, MPFR_RNDN); ++ MPFR_ASSERTN (mpfr_nanflag_p ()); + MPFR_ASSERTN (mpfr_nan_p (y)); + + /* +inf - 1 == +inf */ +diff -Naurd mpfr-3.1.4-a/PATCHES mpfr-3.1.4-b/PATCHES +--- mpfr-3.1.4-a/PATCHES 2016-06-01 13:00:30.748711490 +0000 ++++ mpfr-3.1.4-b/PATCHES 2016-06-01 13:00:30.772711162 +0000 +@@ -0,0 +1 @@ ++sub1-overflow +diff -Naurd mpfr-3.1.4-a/VERSION mpfr-3.1.4-b/VERSION +--- mpfr-3.1.4-a/VERSION 2016-05-22 19:59:43.866399168 +0000 ++++ mpfr-3.1.4-b/VERSION 2016-06-01 13:00:30.772711162 +0000 +@@ -1 +1 @@ +-3.1.4-p2 ++3.1.4-p3 +diff -Naurd mpfr-3.1.4-a/src/mpfr.h mpfr-3.1.4-b/src/mpfr.h +--- mpfr-3.1.4-a/src/mpfr.h 2016-05-22 19:59:43.862399241 +0000 ++++ mpfr-3.1.4-b/src/mpfr.h 2016-06-01 13:00:30.772711162 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 4 +-#define MPFR_VERSION_STRING "3.1.4-p2" ++#define MPFR_VERSION_STRING "3.1.4-p3" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.4-a/src/sub1.c mpfr-3.1.4-b/src/sub1.c +--- mpfr-3.1.4-a/src/sub1.c 2016-03-06 11:33:05.000000000 +0000 ++++ mpfr-3.1.4-b/src/sub1.c 2016-06-01 13:00:30.760711326 +0000 +@@ -96,16 +96,15 @@ + /* A = S*ABS(B) +/- ulp(a) */ + MPFR_SET_EXP (a, MPFR_GET_EXP (b)); + MPFR_RNDRAW_EVEN (inexact, a, MPFR_MANT (b), MPFR_PREC (b), +- rnd_mode, MPFR_SIGN (a), +- if (MPFR_UNLIKELY ( ++MPFR_EXP (a) > __gmpfr_emax)) +- inexact = mpfr_overflow (a, rnd_mode, MPFR_SIGN (a))); +- /* inexact = mpfr_set4 (a, b, rnd_mode, MPFR_SIGN (a)); */ ++ rnd_mode, MPFR_SIGN (a), ++ MPFR_EXP (a)); + if (inexact == 0) + { + /* a = b (Exact) + But we know it isn't (Since we have to remove `c') + So if we round to Zero, we have to remove one ulp. + Otherwise the result is correctly rounded. */ ++ /* An overflow is not possible. */ ++ MPFR_ASSERTD (MPFR_EXP (a) <= __gmpfr_emax); + if (MPFR_IS_LIKE_RNDZ (rnd_mode, MPFR_IS_NEG (a))) + { + mpfr_nexttozero (a); +@@ -136,9 +135,14 @@ + i.e. inexact= MPFR_EVEN_INEX */ + if (MPFR_UNLIKELY (inexact == MPFR_EVEN_INEX*MPFR_INT_SIGN (a))) + { +- mpfr_nexttozero (a); ++ if (MPFR_UNLIKELY (MPFR_EXP (a) > __gmpfr_emax)) ++ mpfr_setmax (a, __gmpfr_emax); ++ else ++ mpfr_nexttozero (a); + inexact = -MPFR_INT_SIGN (a); + } ++ else if (MPFR_UNLIKELY (MPFR_EXP (a) > __gmpfr_emax)) ++ inexact = mpfr_overflow (a, rnd_mode, MPFR_SIGN (a)); + MPFR_RET (inexact); + } + } +diff -Naurd mpfr-3.1.4-a/src/version.c mpfr-3.1.4-b/src/version.c +--- mpfr-3.1.4-a/src/version.c 2016-05-22 19:59:43.866399168 +0000 ++++ mpfr-3.1.4-b/src/version.c 2016-06-01 13:00:30.772711162 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.4-p2"; ++ return "3.1.4-p3"; + } +diff -Naurd mpfr-3.1.4-a/tests/tsub.c mpfr-3.1.4-b/tests/tsub.c +--- mpfr-3.1.4-a/tests/tsub.c 2016-03-06 11:33:03.000000000 +0000 ++++ mpfr-3.1.4-b/tests/tsub.c 2016-06-01 13:00:30.760711326 +0000 +@@ -630,6 +630,135 @@ + } + } + ++static void ++check_max_almosteven (void) ++{ ++ mpfr_exp_t old_emin, old_emax; ++ mpfr_exp_t emin[2] = { MPFR_EMIN_MIN, -1000 }; ++ mpfr_exp_t emax[2] = { MPFR_EMAX_MAX, 1000 }; ++ int i; ++ ++ old_emin = mpfr_get_emin (); ++ old_emax = mpfr_get_emax (); ++ ++ for (i = 0; i < 2; i++) ++ { ++ mpfr_t a1, a2, b, c; ++ mpfr_prec_t p; ++ int neg, j, rnd; ++ ++ set_emin (emin[i]); ++ set_emax (emax[i]); ++ ++ p = MPFR_PREC_MIN + randlimb () % 70; ++ mpfr_init2 (a1, p); ++ mpfr_init2 (a2, p); ++ mpfr_init2 (b, p+1); ++ mpfr_init2 (c, MPFR_PREC_MIN); ++ ++ mpfr_setmax (b, 0); ++ mpfr_set_ui (c, 1, MPFR_RNDN); ++ ++ for (neg = 0; neg < 2; neg++) ++ { ++ for (j = 1; j >= 0; j--) ++ { ++ mpfr_set_exp (b, __gmpfr_emax - j); ++ RND_LOOP (rnd) ++ { ++ unsigned int flags1, flags2; ++ int inex1, inex2; ++ ++ flags1 = MPFR_FLAGS_INEXACT; ++ if (rnd == MPFR_RNDN || MPFR_IS_LIKE_RNDZ (rnd, neg)) ++ { ++ inex1 = neg ? 1 : -1; ++ mpfr_setmax (a1, __gmpfr_emax - j); ++ } ++ else ++ { ++ inex1 = neg ? -1 : 1; ++ if (j == 0) ++ { ++ flags1 |= MPFR_FLAGS_OVERFLOW; ++ mpfr_set_inf (a1, 1); ++ } ++ else ++ { ++ mpfr_setmin (a1, __gmpfr_emax); ++ } ++ } ++ MPFR_SET_SIGN (a1, neg ? -1 : 1); ++ ++ mpfr_clear_flags (); ++ inex2 = mpfr_sub (a2, b, c, (mpfr_rnd_t) rnd); ++ flags2 = __gmpfr_flags; ++ ++ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && ++ mpfr_equal_p (a1, a2))) ++ { ++ printf ("Error 1 in check_max_almosteven for %s," ++ " i = %d, j = %d, neg = %d\n", ++ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd), ++ i, j, neg); ++ printf (" b = "); ++ mpfr_dump (b); ++ printf ("Expected "); ++ mpfr_dump (a1); ++ printf (" with inex = %d, flags =", inex1); ++ flags_out (flags1); ++ printf ("Got "); ++ mpfr_dump (a2); ++ printf (" with inex = %d, flags =", inex2); ++ flags_out (flags2); ++ exit (1); ++ } ++ ++ if (i == 0) ++ break; ++ ++ mpfr_clear_flags (); ++ set_emin (MPFR_EMIN_MIN); ++ set_emax (MPFR_EMAX_MAX); ++ inex2 = mpfr_sub (a2, b, c, (mpfr_rnd_t) rnd); ++ set_emin (emin[i]); ++ set_emax (emax[i]); ++ inex2 = mpfr_check_range (a2, inex2, (mpfr_rnd_t) rnd); ++ flags2 = __gmpfr_flags; ++ ++ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && ++ mpfr_equal_p (a1, a2))) ++ { ++ printf ("Error 2 in check_max_almosteven for %s," ++ " i = %d, j = %d, neg = %d\n", ++ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd), ++ i, j, neg); ++ printf (" b = "); ++ mpfr_dump (b); ++ printf ("Expected "); ++ mpfr_dump (a1); ++ printf (" with inex = %d, flags =", inex1); ++ flags_out (flags1); ++ printf ("Got "); ++ mpfr_dump (a2); ++ printf (" with inex = %d, flags =", inex2); ++ flags_out (flags2); ++ exit (1); ++ } ++ } ++ } /* j */ ++ ++ mpfr_neg (b, b, MPFR_RNDN); ++ mpfr_neg (c, c, MPFR_RNDN); ++ } /* neg */ ++ ++ mpfr_clears (a1, a2, b, c, (mpfr_ptr) 0); ++ } /* i */ ++ ++ set_emin (old_emin); ++ set_emax (old_emax); ++} ++ + #define TEST_FUNCTION test_sub + #define TWO_ARGS + #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) +@@ -647,6 +776,7 @@ + check_rounding (); + check_diverse (); + check_inexact (); ++ check_max_almosteven (); + bug_ddefour (); + for (p=2; p<200; p++) + for (i=0; i<50; i++) +diff -Naurd mpfr-3.1.4-a/PATCHES mpfr-3.1.4-b/PATCHES +--- mpfr-3.1.4-a/PATCHES 2016-08-04 20:41:14.097592781 +0000 ++++ mpfr-3.1.4-b/PATCHES 2016-08-04 20:41:14.121592350 +0000 +@@ -0,0 +1 @@ ++c++11-compat +diff -Naurd mpfr-3.1.4-a/VERSION mpfr-3.1.4-b/VERSION +--- mpfr-3.1.4-a/VERSION 2016-06-01 13:00:30.772711162 +0000 ++++ mpfr-3.1.4-b/VERSION 2016-08-04 20:41:14.121592350 +0000 +@@ -1 +1 @@ +-3.1.4-p3 ++3.1.4-p4 +diff -Naurd mpfr-3.1.4-a/src/mpfr.h mpfr-3.1.4-b/src/mpfr.h +--- mpfr-3.1.4-a/src/mpfr.h 2016-06-01 13:00:30.772711162 +0000 ++++ mpfr-3.1.4-b/src/mpfr.h 2016-08-04 20:41:14.121592350 +0000 +@@ -27,7 +27,7 @@ + #define MPFR_VERSION_MAJOR 3 + #define MPFR_VERSION_MINOR 1 + #define MPFR_VERSION_PATCHLEVEL 4 +-#define MPFR_VERSION_STRING "3.1.4-p3" ++#define MPFR_VERSION_STRING "3.1.4-p4" + + /* Macros dealing with MPFR VERSION */ + #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) +diff -Naurd mpfr-3.1.4-a/src/version.c mpfr-3.1.4-b/src/version.c +--- mpfr-3.1.4-a/src/version.c 2016-06-01 13:00:30.772711162 +0000 ++++ mpfr-3.1.4-b/src/version.c 2016-08-04 20:41:14.121592350 +0000 +@@ -25,5 +25,5 @@ + const char * + mpfr_get_version (void) + { +- return "3.1.4-p3"; ++ return "3.1.4-p4"; + } +diff -Naurd mpfr-3.1.4-a/tests/tpow_z.c mpfr-3.1.4-b/tests/tpow_z.c +--- mpfr-3.1.4-a/tests/tpow_z.c 2016-03-06 11:33:03.000000000 +0000 ++++ mpfr-3.1.4-b/tests/tpow_z.c 2016-08-04 20:41:14.113592494 +0000 +@@ -26,7 +26,7 @@ + + #include "mpfr-test.h" + +-#define ERROR(str) do { printf("Error for "str"\n"); exit (1); } while (0) ++#define ERROR(str) do { printf ("Error for " str "\n"); exit (1); } while (0) + + static void + check_special (void) +diff -Naurd mpfr-3.1.4-a/tests/tset_si.c mpfr-3.1.4-b/tests/tset_si.c +--- mpfr-3.1.4-a/tests/tset_si.c 2016-03-06 11:33:03.000000000 +0000 ++++ mpfr-3.1.4-b/tests/tset_si.c 2016-08-04 20:41:14.113592494 +0000 +@@ -26,7 +26,7 @@ + + #include "mpfr-test.h" + +-#define ERROR(str) {printf("Error for "str"\n"); exit(1);} ++#define ERROR(str) do { printf ("Error for " str "\n"); exit (1); } while (0) + + static void + test_2exp (void) +diff -Naurd mpfr-3.1.4-a/tests/tset_sj.c mpfr-3.1.4-b/tests/tset_sj.c +--- mpfr-3.1.4-a/tests/tset_sj.c 2016-03-06 11:33:03.000000000 +0000 ++++ mpfr-3.1.4-b/tests/tset_sj.c 2016-08-04 20:41:14.113592494 +0000 +@@ -42,7 +42,7 @@ + + #else + +-#define ERROR(str) {printf("Error for "str"\n"); exit(1);} ++#define ERROR(str) do { printf ("Error for " str "\n"); exit (1); } while (0) + + static int + inexact_sign (int x) +diff -Naurd mpfr-3.1.4-a/tests/tsi_op.c mpfr-3.1.4-b/tests/tsi_op.c +--- mpfr-3.1.4-a/tests/tsi_op.c 2016-03-06 11:33:03.000000000 +0000 ++++ mpfr-3.1.4-b/tests/tsi_op.c 2016-08-04 20:41:14.113592494 +0000 +@@ -26,14 +26,16 @@ + + #include "mpfr-test.h" + +-#define ERROR1(s, i, z, exp) \ +-{\ +- printf("Error for "s" and i=%d\n", i);\ +- printf("Expected %s\n", exp);\ +- printf("Got "); mpfr_out_str (stdout, 16, 0, z, MPFR_RNDN);\ +- putchar ('\n');\ +- exit(1);\ +-} ++#define ERROR1(s,i,z,exp) \ ++ do \ ++ { \ ++ printf ("Error for " s " and i=%d\n", i); \ ++ printf ("Expected %s\n", exp); \ ++ printf ("Got "); mpfr_out_str (stdout, 16, 0, z, MPFR_RNDN); \ ++ putchar ('\n'); \ ++ exit(1); \ ++ } \ ++ while (0) + + const struct { + const char * op1; diff --git a/easybuild/easyconfigs/g/gompi/gompi-2016.07.eb b/easybuild/easyconfigs/g/gompi/gompi-2016.07.eb new file mode 100644 index 0000000000..cf2c3b0bdb --- /dev/null +++ b/easybuild/easyconfigs/g/gompi/gompi-2016.07.eb @@ -0,0 +1,22 @@ +easyblock = "Toolchain" + +name = 'gompi' +version = '2016.07' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolchain, +including OpenMPI for MPI support.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +gccver = '6.1.0' +binutilsver = '2.27' +gccbinver = '%s-%s' % (gccver, binutilsver) + +# compiler toolchain dependencies +dependencies = [ + ('GCC', gccbinver), # includes both GCC and binutils + ('OpenMPI', '1.10.2', '', ('GCC', gccbinver)), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-GCC-6.1.0-2.27.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-GCC-6.1.0-2.27.eb new file mode 100644 index 0000000000..659a1fdf27 --- /dev/null +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-GCC-6.1.0-2.27.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'hwloc' +version = '1.11.3' + +homepage = 'http://www.open-mpi.org/projects/hwloc/' +description = """The Portable Hardware Locality (hwloc) software package provides a portable abstraction + (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including + NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various + system attributes such as cache and memory information as well as the locality of I/O devices such as + network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering + information about modern computing hardware so as to exploit it accordingly and efficiently.""" + +toolchain = {'name': 'GCC', 'version': '6.1.0-2.27'} + +source_urls = ['http://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] +sources = [SOURCE_TAR_GZ] + +dependencies = [('numactl', '2.0.11')] + +configopts = "--enable-libnuma=$EBROOTNUMACTL" + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb new file mode 100644 index 0000000000..78e9122ea4 --- /dev/null +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'M4' +version = '1.4.17' + +homepage = 'http://www.gnu.org/software/m4/m4.html' +description = """GNU M4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 compatible + although it has some extensions (for example, handling more than 9 positional parameters to macros). + GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc.""" + +toolchain = {'name': 'GCCcore', 'version': '6.1.0'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +# use same binutils version that was used when building GCCcore +builddependencies = [('binutils', '2.27', '', True)] + +configopts = "--enable-cxx" + +sanity_check_paths = { + 'files': ["bin/m4"], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb new file mode 100644 index 0000000000..75a0bc06f7 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb @@ -0,0 +1,49 @@ +easyblock = 'ConfigureMake' + +name = 'OpenBLAS' +version = '0.2.18' + +lapackver = '3.6.1' +versionsuffix = '-LAPACK-%s' % lapackver + +homepage = 'http://xianyi.github.com/OpenBLAS/' +description = """OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.""" + +toolchain = {'name': 'gompi', 'version': '2016.07'} + +lapack_src = 'lapack-%s.tgz' % lapackver +large_src = 'large.tgz' +timing_src = 'timing.tgz' +sources = [ + 'v%(version)s.tar.gz', + lapack_src, + large_src, + timing_src, +] +source_urls = [ + # order matters, trying to download the LAPACK tarball from GitHub causes trouble + "http://www.netlib.org/lapack/", + "http://www.netlib.org/lapack/timing/", + "https://github.com/xianyi/OpenBLAS/archive/", +] + +patches = [ + (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir + (large_src, '.'), + (timing_src, '.'), +] + +skipsteps = ['configure'] + +threading = 'USE_THREAD=1' +buildopts = 'BINARY=64 ' + threading + ' CC="$CC" FC="$F77"' +installopts = threading + " PREFIX=%(installdir)s" + +sanity_check_paths = { + 'files': ['include/cblas.h', 'include/f77blas.h', 'include/lapacke_config.h', 'include/lapacke.h', + 'include/lapacke_mangling.h', 'include/lapacke_utils.h', 'include/openblas_config.h', + 'lib/libopenblas.a', 'lib/libopenblas.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-GCC-6.1.0-2.27.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-GCC-6.1.0-2.27.eb new file mode 100644 index 0000000000..ac26d4212f --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-GCC-6.1.0-2.27.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'OpenMPI' +version = '1.10.2' + +homepage = 'http://www.open-mpi.org/' +description = """The Open MPI Project is an open source MPI-2 implementation.""" + +toolchain = {'name': 'GCC', 'version': '6.1.0-2.27'} + +sources = [SOURCELOWER_TAR_GZ] + +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] + +dependencies = [('hwloc', '1.11.3')] + +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' +configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path +configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support +configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading + +# needed for --with-verbs +osdependencies = [('libibverbs-dev', 'libibverbs-devel'),] + +libs = ["mpi_cxx", "mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte", "vt", "vt-hyb", "vt-mpi", "vt-mpi-unify"] +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], + 'dirs': ["include/openmpi/ompi/mpi/cxx"], +} + +moduleclass = 'mpi' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb new file mode 100644 index 0000000000..d057e2fbb3 --- /dev/null +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb @@ -0,0 +1,25 @@ +name = 'ScaLAPACK' +version = '2.0.2' + +homepage = 'http://www.netlib.org/scalapack/' +description = """The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines + redesigned for distributed memory MIMD parallel computers.""" + +toolchain = {'name': 'gompi', 'version': '2016.07'} +toolchainopts = {'pic': True} + +source_urls = [homepage] +sources = [SOURCELOWER_TGZ] + +blaslib = 'OpenBLAS' +blasver = '0.2.18' +blassuff = '-LAPACK-3.6.1' + +versionsuffix = "-%s-%s%s" % (blaslib, blasver, blassuff) + +dependencies = [(blaslib, blasver, blassuff, ('gompi', '2016.07'))] + +# parallel build tends to fail, so disabling it +parallel = 1 + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCCcore-6.1.0.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCCcore-6.1.0.eb new file mode 100644 index 0000000000..47a40a4035 --- /dev/null +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCCcore-6.1.0.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'zlib' +version = '1.2.8' + +homepage = 'http://www.zlib.net/' +description = """zlib is designed to be a free, general-purpose, legally unencumbered -- that is, + not covered by any patents -- lossless data-compression library for use on virtually any + computer hardware and operating system.""" + +toolchain = {'name': 'GCCcore', 'version': '6.1.0'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] + +# use same binutils version that was used when building GCC toolchain +builddependencies = [('binutils', '2.27', '', True)] + +sanity_check_paths = { + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From a24c191fe8715a8b7e0ffc8a6821868f8f85b425 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Fri, 2 Sep 2016 14:18:30 +0100 Subject: [PATCH 155/741] missed numactl off list --- .../numactl/numactl-2.0.11-GCC-6.1.0-2.27.eb | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 easybuild/easyconfigs/n/numactl/numactl-2.0.11-GCC-6.1.0-2.27.eb diff --git a/easybuild/easyconfigs/n/numactl/numactl-2.0.11-GCC-6.1.0-2.27.eb b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-GCC-6.1.0-2.27.eb new file mode 100644 index 0000000000..b862023bd6 --- /dev/null +++ b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-GCC-6.1.0-2.27.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'numactl' +version = '2.0.11' + +homepage = 'http://oss.sgi.com/projects/libnuma/' +description = """The numactl program allows you to run your application program on specific cpu's and memory nodes. +It does this by supplying a NUMA memory policy to the operating system before running your program. +The libnuma library provides convenient ways for you to add NUMA memory policies into your own program.""" + +toolchain = {'name': 'GCC', 'version': '6.1.0-2.27'} + +source_urls = ['ftp://oss.sgi.com/www/projects/libnuma/download/'] +sources = [SOURCE_TAR_GZ] + +checksums = ['d3bc88b7ddb9f06d60898f4816ae9127'] + +sanity_check_paths = { + 'files': ['bin/numactl', 'bin/numastat', 'lib/libnuma.%s' % SHLIB_EXT, 'lib/libnuma.a'], + 'dirs': ['share/man', 'include'] +} + +moduleclass = 'tools' -- GitLab From cefdbf777d5dd07e46b8c938b4fc8896ba9421a1 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 2 Sep 2016 15:49:18 +0200 Subject: [PATCH 156/741] Fix download of ParaView --- .../p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb index 3fba0f0166..1b7e04902f 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb @@ -12,9 +12,7 @@ toolchainopts = {'pic': True, 'usempi': True} download_suffix = 'download.php?submit=Download&version=v%(version_major_minor)s&type=source&os=all&downloadFile=' source_urls = ['http://www.paraview.org/paraview-downloads/%s' % download_suffix] -sources = ["ParaView-v%(version)s-source.tar.gz"] - -# patches = ['%(name)s-%(version)s_missingheader.patch'] +sources = ["ParaView-v%(version)s.tar.gz"] dependencies = [ ('X11', '20160819'), @@ -26,7 +24,7 @@ dependencies = [ ('Python', '2.7.12'), ] -builddependencies = [('CMake', '3.5.2')] +builddependencies = [('CMake', '3.6.1')] separate_build_dir = True -- GitLab From 39dbbf73496e54c6fbffc51c8333781dfbdd60f6 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 2 Sep 2016 15:54:14 +0200 Subject: [PATCH 157/741] Bring libxml2/2.9.4 with Python in sync with the others --- .../l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb index c0c3697f83..d2e63d779b 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb @@ -3,9 +3,8 @@ version = '2.9.4' versionsuffix = '-Python-%(pyver)s' homepage = 'http://xmlsoft.org/' -description = """Libxml2 is the XML C parser and -toolchain developed for the Gnome project - (but usable outside of the Gnome platform).""" +description = """Libxml2 is the XML C parser and toolchain developed for the Gnome project (but usable + outside of the Gnome platform).""" toolchain = {'name': 'intel', 'version': '2016b'} toolchainopts = {'pic': True} @@ -16,8 +15,6 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -configopts = 'CC="$CC" CXX="$CXX" --with-pic --with-zlib=$EBROOTZLIB' - dependencies = [ ('zlib', '1.2.8'), ('Python', '2.7.12'), -- GitLab From 0e868adf2743f0bb9d90876ea6692bccbc85d909 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 2 Sep 2016 15:54:59 +0200 Subject: [PATCH 158/741] Still allow Tk but add comment --- easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb index 42a21bb5f7..9f0f36a46a 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb @@ -18,8 +18,8 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.13.0'), - # We don't build Tkinter as it requires an X11 stack - # ('Tk', '8.6.5'), + # Be ware that this requires a full X11 stack + ('Tk', '8.6.5'), ('GMP', '6.1.1'), ('libffi', '3.2.1'), # OS dependency should be preferred if the os version is more recent then this version, -- GitLab From 5259648054aaa69961ef39f41c79c6d967db90d4 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 2 Sep 2016 17:18:13 +0200 Subject: [PATCH 159/741] Add warning about Tk and X To build Tk, you need an X11 stack. All current python easyconfig need X11 to build. Follow up in https://github.com/hpcugent/easybuild-easyconfigs/issues/2261 --- .../easyconfigs/p/Python/Python-2.7.10-GCC-4.9.3-2.25-bare.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.10-GNU-4.9.3-2.25-bare.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.11-CrayGNU-2015.11.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.11-CrayGNU-2016.03.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.11-GCC-4.9.3-2.25-bare.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2016a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.11-gimkl-2.11.5.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.11-goolf-1.7.20.eb | 4 ++-- easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2015b.eb | 2 +- .../p/Python/Python-2.7.11-intel-2016.02-GCC-4.9.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016a.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.12-GCC-5.4.0-2.26-bare.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.12-foss-2016b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.9.2-bare.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.9-foss-2015a-bare.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.9-gompi-1.5.16-bare.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.9-intel-2015a-bare.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb | 2 +- easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.9.2-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015.05-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015a-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015b-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.3-gompi-1.5.16-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.14-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.16-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.7.20-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.3-intel-2015a-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2015.11-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2016.03-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-GCC-4.9.3-2.25-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-GNU-4.9.3-2.25-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015a-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015b-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2016a-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-gimkl-2.11.5-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.4.10-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.7.20-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-ictce-7.3.5-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015a-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015b-no-X11.eb | 1 + .../easyconfigs/t/Tk/Tk-8.6.4-intel-2016.02-GCC-4.9-no-X11.eb | 1 + easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb | 1 + 62 files changed, 63 insertions(+), 39 deletions(-) diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-GCC-4.9.3-2.25-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-GCC-4.9.3-2.25-bare.eb index c19c897045..fd80fddc40 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-GCC-4.9.3-2.25-bare.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-GCC-4.9.3-2.25-bare.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3', '', ('GCCcore', '4.9.3')), ('ncurses', '6.0', '', ('GCCcore', '4.9.3')), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-GNU-4.9.3-2.25-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-GNU-4.9.3-2.25-bare.eb index 094f5e83b0..6e9aa1f7c4 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-GNU-4.9.3-2.25-bare.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-GNU-4.9.3-2.25-bare.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb index 2110e24871..1d651d49d1 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.0.0a', '', ('GCC', '4.9.2')), # required for pycrypto # ('OpenSSL', '1.0.1m'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb index 76db705ebd..2247b6ef92 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.0.0a', '', ('GNU', '4.9.3-2.25')), # required for pycrypto # ('OpenSSL', '1.0.1m'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb index a5549be298..74123d2915 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1m'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb index 1156ffc2af..803575d935 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.0.0a', '', ('GCC', '4.7.2')), # required for pycrypto # ('OpenSSL', '1.0.1m'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb index 56b2274143..894b701f69 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.0.0a', '', ('GCC', '4.8.4')), # required for pycrypto # ('OpenSSL', '1.0.1m'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb index 2661d5c96a..3d970938c9 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.0.0a', '', ('GCC', '4.9.2')), # required for pycrypto # ('OpenSSL', '1.0.1m'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb index 94c61afabc..8b5d70e944 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.10.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1m'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-CrayGNU-2015.11.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-CrayGNU-2015.11.eb index 9a52c8f87d..d69b594b08 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-CrayGNU-2015.11.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-CrayGNU-2015.11.eb @@ -26,7 +26,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-CrayGNU-2016.03.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-CrayGNU-2016.03.eb index 99f60636cb..ab13993dcf 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-CrayGNU-2016.03.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-CrayGNU-2016.03.eb @@ -26,7 +26,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-GCC-4.9.3-2.25-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-GCC-4.9.3-2.25-bare.eb index 895d73b128..78953148b0 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-GCC-4.9.3-2.25-bare.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-GCC-4.9.3-2.25-bare.eb @@ -19,7 +19,7 @@ dependencies = [ ('libreadline', '6.3', '', ('GCCcore', '4.9.3')), ('ncurses', '6.0', '', ('GCCcore', '4.9.3')), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2015a.eb index c4aea6d0fc..c5fe86070e 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2015a.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.10.0'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), # required for pycrypto # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2016a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2016a.eb index 3e1f1e63c6..cd19e3b902 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2016a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-foss-2016a.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-gimkl-2.11.5.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-gimkl-2.11.5.eb index 5bee9397c4..917a362739 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-gimkl-2.11.5.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-goolf-1.7.20.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-goolf-1.7.20.eb index 98314b77b5..974e57d87c 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-goolf-1.7.20.eb @@ -21,8 +21,8 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.9.2'), - #('Tk', '8.6.4', '-no-X11'), - ('Tk', '8.6.4'), + #('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack + ('Tk', '8.6.4'), # this requires a full X11 stack ('GMP', '6.1.0'), # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2015b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2015b.eb index 71a4890e47..fa2f05cdb9 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2015b.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016.02-GCC-4.9.eb index bb7d002230..914f184b70 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016.02-GCC-4.9.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016a.eb index 8ab42a8b9f..711240b058 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-intel-2016a.eb @@ -21,7 +21,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.12-GCC-5.4.0-2.26-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.12-GCC-5.4.0-2.26-bare.eb index fb337a3d58..abfcbbf934 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.12-GCC-5.4.0-2.26-bare.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.12-GCC-5.4.0-2.26-bare.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.13.0'), - ('Tk', '8.6.5'), + ('Tk', '8.6.5'), # this requires a full X11 stack ('GMP', '6.1.1'), ('libffi', '3.2.1'), # OS dependency should be preferred if the os version is more recent then this version, diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.12-foss-2016b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.12-foss-2016b.eb index 8bb576da7d..ba6ada1467 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.12-foss-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.12-foss-2016b.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.13.0'), - ('Tk', '8.6.5'), + ('Tk', '8.6.5'), # this requires a full X11 stack ('GMP', '6.1.1'), ('libffi', '3.2.1'), # OS dependency should be preferred if the os version is more recent then this version, diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb index e77dca8172..f39ab1c056 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.13.0'), - ('Tk', '8.6.5'), + ('Tk', '8.6.5'), # this requires a full X11 stack ('GMP', '6.1.1'), ('libffi', '3.2.1'), # OS dependency should be preferred if the os version is more recent then this version, diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.9.2-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.9.2-bare.eb index 3b6c965221..a2e4addace 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.9.2-bare.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.9.2-bare.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb index 75386ccc4a..f6e75ecf53 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a-bare.eb index a04b4992d3..e9063410df 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a-bare.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a-bare.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb index 4d8258d281..d693b53480 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb index 81bfd4da01..62fde498fb 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-gompi-1.5.16-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-gompi-1.5.16-bare.eb index e8eb88c738..c78274679f 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-gompi-1.5.16-bare.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-gompi-1.5.16-bare.eb @@ -17,7 +17,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb index 7739e8b255..39cc28b030 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb index 70860e49fa..fc6fced509 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb index 41e6d0cc85..09da0c6f20 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack #('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a-bare.eb index f327891d4e..c672a429fd 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a-bare.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a-bare.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb index 188046b969..82f1c9fdc5 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.8.8.1'), - ('Tk', '8.6.3', '-no-X11'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack # ('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons ] diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb b/easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb index 6b562baa0c..40ab1396ff 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '5.9'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), # ('OpenSSL', '1.0.1p'), # OS dependency should be preferred if the os version is more recent then this version, it's # nice to have an up to date openssl for security reasons diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb b/easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb index c11711336f..c0d918fab2 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), ('XZ', '5.2.2'), # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb b/easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb index f0600eefc0..bb39588cab 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb @@ -20,7 +20,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.9.2'), - ('Tk', '8.6.4', '-no-X11'), + ('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack ('GMP', '6.1.0'), ('XZ', '5.2.2'), # ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb index a637288eb8..33f145a36c 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.13.0'), - ('Tk', '8.6.5'), + ('Tk', '8.6.5'), # this requires a full X11 stack ('GMP', '6.1.1'), ('XZ', '5.2.2'), ('libffi', '3.2.1'), diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb b/easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb index 46d7ae7573..4cba8641bb 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb @@ -18,7 +18,7 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.13.0'), - ('Tk', '8.6.5'), + ('Tk', '8.6.5'), # this requires a full X11 stack ('GMP', '6.1.1'), ('XZ', '5.2.2'), ('libffi', '3.2.1'), diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.9.2-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.9.2-no-X11.eb index 878cfecf53..df6346fdf8 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.9.2-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.9.2-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015.05-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015.05-no-X11.eb index ac0d5ff0bc..2394a09815 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015.05-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015.05-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015a-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015a-no-X11.eb index 0cf00324c8..89e750afa3 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015a-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015a-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015b-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015b-no-X11.eb index aaa247a658..fd29c33762 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015b-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-foss-2015b-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-gompi-1.5.16-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-gompi-1.5.16-no-X11.eb index 0a860475e3..be1ac13f46 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-gompi-1.5.16-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-gompi-1.5.16-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.14-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.14-no-X11.eb index 890bfc8cfe..d5880a0b40 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.14-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.14-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.16-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.16-no-X11.eb index b383831c92..3fa9a76738 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.16-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.5.16-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.7.20-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.7.20-no-X11.eb index 6550c8a427..dccd1a9e2f 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.7.20-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-goolf-1.7.20-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-intel-2015a-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-intel-2015a-no-X11.eb index 4762abfa09..68317abed0 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-intel-2015a-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-intel-2015a-no-X11.eb @@ -18,6 +18,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2015.11-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2015.11-no-X11.eb index 75434aa7b8..02c810f4e3 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2015.11-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2015.11-no-X11.eb @@ -19,6 +19,7 @@ dependencies = [ ('Tcl', version), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2016.03-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2016.03-no-X11.eb index ce3ef51b8f..f156bb1a1b 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2016.03-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-CrayGNU-2016.03-no-X11.eb @@ -19,6 +19,7 @@ dependencies = [ ('Tcl', version), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-GCC-4.9.3-2.25-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-GCC-4.9.3-2.25-no-X11.eb index 684f3bddb6..8a30be2061 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-GCC-4.9.3-2.25-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-GCC-4.9.3-2.25-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-GNU-4.9.3-2.25-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-GNU-4.9.3-2.25-no-X11.eb index f077e32cc2..50d6e63455 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-GNU-4.9.3-2.25-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-GNU-4.9.3-2.25-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015a-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015a-no-X11.eb index 9e3efc89f0..2c44f99045 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015a-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015a-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015b-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015b-no-X11.eb index 89ecb3248a..9f80c4ee63 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015b-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2015b-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2016a-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2016a-no-X11.eb index 449ce63a29..57e512249b 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2016a-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-foss-2016a-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8') ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-gimkl-2.11.5-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-gimkl-2.11.5-no-X11.eb index 5066a5847c..be28b60358 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-gimkl-2.11.5-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-gimkl-2.11.5-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.4.10-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.4.10-no-X11.eb index 9419fc66d6..a88315f807 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.4.10-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.4.10-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.7.20-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.7.20-no-X11.eb index 60f899a584..26804627ae 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.7.20-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-goolf-1.7.20-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-ictce-7.3.5-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-ictce-7.3.5-no-X11.eb index 53f70e54d2..3e9e1cab39 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-ictce-7.3.5-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-ictce-7.3.5-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015a-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015a-no-X11.eb index 85504f8688..ff4e4051ee 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015a-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015a-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015b-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015b-no-X11.eb index b7e6c77202..389d3ddf98 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015b-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2015b-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016.02-GCC-4.9-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016.02-GCC-4.9-no-X11.eb index ed76be27b6..873aa2d811 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016.02-GCC-4.9-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016.02-GCC-4.9-no-X11.eb @@ -19,6 +19,7 @@ dependencies = [ ('Tcl', version), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb index 9eede49210..3174f88f27 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb @@ -20,6 +20,7 @@ dependencies = [ ('zlib', '1.2.8'), ] +# To be clear: this will still require X11 to be present (see issue #2261) configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' -- GitLab From 8240062fa77b301b1ad4ec9f6922569013579772 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 2 Sep 2016 17:21:00 +0200 Subject: [PATCH 160/741] Drop comments about X11, moved to #3519 --- easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb | 1 - easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb | 1 - 2 files changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb index 9f0f36a46a..e77dca8172 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.12-intel-2016b.eb @@ -18,7 +18,6 @@ dependencies = [ ('libreadline', '6.3'), ('ncurses', '6.0'), ('SQLite', '3.13.0'), - # Be ware that this requires a full X11 stack ('Tk', '8.6.5'), ('GMP', '6.1.1'), ('libffi', '3.2.1'), diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb index ee021a1cfc..9eede49210 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-intel-2016a-no-X11.eb @@ -20,7 +20,6 @@ dependencies = [ ('zlib', '1.2.8'), ] -# To be clear: this will still require the X11 to be present. configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' start_dir = 'unix' -- GitLab From 1144223127bd4f686c64d208d4309b4541dab951 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Fri, 2 Sep 2016 16:48:40 +0100 Subject: [PATCH 161/741] Removed hard-coded dep --- ...caLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb index d057e2fbb3..5345e93313 100644 --- a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.07-OpenBLAS-0.2.18-LAPACK-3.6.1.eb @@ -17,7 +17,7 @@ blassuff = '-LAPACK-3.6.1' versionsuffix = "-%s-%s%s" % (blaslib, blasver, blassuff) -dependencies = [(blaslib, blasver, blassuff, ('gompi', '2016.07'))] +dependencies = [(blaslib, blasver, blassuff)] # parallel build tends to fail, so disabling it parallel = 1 -- GitLab From a8bc587031ae47cb1cec474f478c899de220750e Mon Sep 17 00:00:00 2001 From: Appmaint Date: Sat, 3 Sep 2016 11:15:24 +0100 Subject: [PATCH 162/741] Made requested changes Changed Open MPI version to 1.10.3, removed duplicate patch, removed mirror link and fixed some style issues. --- easybuild/easyconfigs/f/foss/foss-2016.07.eb | 2 +- easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb | 2 +- .../easyconfigs/g/GCCcore/GCCcore-6.1.0.eb | 4 +- ...6.1.0_mpfr-3.1.4-allpatches-20160804.patch | 455 ------------------ .../easyconfigs/g/gompi/gompi-2016.07.eb | 2 +- .../OpenMPI/OpenMPI-1.10.3-GCC-6.1.0-2.27.eb | 33 ++ 6 files changed, 38 insertions(+), 460 deletions(-) delete mode 100644 easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_mpfr-3.1.4-allpatches-20160804.patch create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.3-GCC-6.1.0-2.27.eb diff --git a/easybuild/easyconfigs/f/foss/foss-2016.07.eb b/easybuild/easyconfigs/f/foss/foss-2016.07.eb index f4211bb9f3..052846a744 100644 --- a/easybuild/easyconfigs/f/foss/foss-2016.07.eb +++ b/easybuild/easyconfigs/f/foss/foss-2016.07.eb @@ -28,7 +28,7 @@ comp_mpi_tc = (comp_mpi_tc_name, version) # For binutils, stick to http://wiki.osdev.org/Cross-Compiler_Successful_Builds dependencies = [ ('GCC', gccbinver), - ('OpenMPI', '1.10.2', '', ('GCC', gccbinver)), + ('OpenMPI', '1.10.3', '', ('GCC', gccbinver)), (blaslib, blasver, blassuff, comp_mpi_tc), ('FFTW', '3.3.4', '', comp_mpi_tc), ('ScaLAPACK', '2.0.2', '-%s%s' % (blas, blassuff), comp_mpi_tc) diff --git a/easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb b/easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb index 258248286e..4faa0a48e8 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-6.1.0-2.27.eb @@ -4,7 +4,7 @@ name = 'GCC' version = '6.1.0' binutilsver = '2.27' -versionsuffix = '-%s' % (binutilsver) +versionsuffix = '-%s' % binutilsver homepage = 'http://gcc.gnu.org/' description = """The GNU Compiler Collection includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb index d15501829b..456f0e7ef2 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb @@ -17,8 +17,8 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies - 'http://ftp.heanet.ie/mirrors/gnu/%(namelower)s/%(namelower)s-%(version)s/', # Alternative for GCC 'http://ftpmirror.gnu.org/gcc/gcc-%(version)s', # GCC auto-resolving HTTP mirror + 'https://ftp.gnu.org/gnu/gcc/gcc-%(version)s/', # Alternative GCC ] sources = [ @@ -35,7 +35,7 @@ builddependencies = [ ] patches = [ - ('%s-%s_mpfr-%s-allpatches-20160804.patch' % (name, version, mpfr_version), '../mpfr-%s' % mpfr_version), + ('mpfr-%s-allpatches-20160804.patch' % (name, version, mpfr_version), '../mpfr-%s' % mpfr_version), ('%s-%s_fix-find-isl.patch' % (name, version)), ] diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_mpfr-3.1.4-allpatches-20160804.patch b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_mpfr-3.1.4-allpatches-20160804.patch deleted file mode 100644 index 41748b0345..0000000000 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0_mpfr-3.1.4-allpatches-20160804.patch +++ /dev/null @@ -1,455 +0,0 @@ -# All mpfr patches as of 2016-08-04, from same pull request for GCC 6.2.0 -# taken from their website: http://www.mpfr.org/mpfr-current/#download -diff -Naurd mpfr-3.1.4-a/PATCHES mpfr-3.1.4-b/PATCHES ---- mpfr-3.1.4-a/PATCHES 2016-04-13 21:22:23.720604013 +0000 -+++ mpfr-3.1.4-b/PATCHES 2016-04-13 21:22:23.744603677 +0000 -@@ -0,0 +1 @@ -+unix-check -diff -Naurd mpfr-3.1.4-a/VERSION mpfr-3.1.4-b/VERSION ---- mpfr-3.1.4-a/VERSION 2016-03-06 11:33:04.000000000 +0000 -+++ mpfr-3.1.4-b/VERSION 2016-04-13 21:22:23.744603677 +0000 -@@ -1 +1 @@ --3.1.4 -+3.1.4-p1 -diff -Naurd mpfr-3.1.4-a/src/mpfr-impl.h mpfr-3.1.4-b/src/mpfr-impl.h ---- mpfr-3.1.4-a/src/mpfr-impl.h 2016-03-06 11:33:04.000000000 +0000 -+++ mpfr-3.1.4-b/src/mpfr-impl.h 2016-04-13 21:22:23.736603789 +0000 -@@ -252,19 +252,6 @@ - # define MPFR_WIN_THREAD_SAFE_DLL 1 - #endif - --/* Detect some possible inconsistencies under Unix. */ --#if defined(__unix__) --# if defined(_WIN32) --# error "Both __unix__ and _WIN32 are defined" --# endif --# if __GMP_LIBGMP_DLL --# error "__unix__ is defined and __GMP_LIBGMP_DLL is true" --# endif --# if defined(MPFR_WIN_THREAD_SAFE_DLL) --# error "Both __unix__ and MPFR_WIN_THREAD_SAFE_DLL are defined" --# endif --#endif -- - #if defined(__MPFR_WITHIN_MPFR) || !defined(MPFR_WIN_THREAD_SAFE_DLL) - extern MPFR_THREAD_ATTR unsigned int __gmpfr_flags; - extern MPFR_THREAD_ATTR mpfr_exp_t __gmpfr_emin; -diff -Naurd mpfr-3.1.4-a/src/mpfr.h mpfr-3.1.4-b/src/mpfr.h ---- mpfr-3.1.4-a/src/mpfr.h 2016-03-06 11:33:04.000000000 +0000 -+++ mpfr-3.1.4-b/src/mpfr.h 2016-04-13 21:22:23.744603677 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 4 --#define MPFR_VERSION_STRING "3.1.4" -+#define MPFR_VERSION_STRING "3.1.4-p1" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.4-a/src/version.c mpfr-3.1.4-b/src/version.c ---- mpfr-3.1.4-a/src/version.c 2016-03-06 11:33:05.000000000 +0000 -+++ mpfr-3.1.4-b/src/version.c 2016-04-13 21:22:23.744603677 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.4"; -+ return "3.1.4-p1"; - } -diff -Naurd mpfr-3.1.4-a/PATCHES mpfr-3.1.4-b/PATCHES ---- mpfr-3.1.4-a/PATCHES 2016-05-22 19:59:43.838399677 +0000 -+++ mpfr-3.1.4-b/PATCHES 2016-05-22 19:59:43.866399168 +0000 -@@ -0,0 +1 @@ -+add-sub-ui-flags -diff -Naurd mpfr-3.1.4-a/VERSION mpfr-3.1.4-b/VERSION ---- mpfr-3.1.4-a/VERSION 2016-04-13 21:22:23.744603677 +0000 -+++ mpfr-3.1.4-b/VERSION 2016-05-22 19:59:43.866399168 +0000 -@@ -1 +1 @@ --3.1.4-p1 -+3.1.4-p2 -diff -Naurd mpfr-3.1.4-a/src/add_ui.c mpfr-3.1.4-b/src/add_ui.c ---- mpfr-3.1.4-a/src/add_ui.c 2016-03-06 11:33:04.000000000 +0000 -+++ mpfr-3.1.4-b/src/add_ui.c 2016-05-22 19:59:43.854399385 +0000 -@@ -49,6 +49,7 @@ - MPFR_SAVE_EXPO_MARK (expo); - MPFR_SET_EXP (uu, GMP_NUMB_BITS - cnt); - inex = mpfr_add(y, x, uu, rnd_mode); -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); - MPFR_SAVE_EXPO_FREE (expo); - return mpfr_check_range(y, inex, rnd_mode); - } -diff -Naurd mpfr-3.1.4-a/src/mpfr.h mpfr-3.1.4-b/src/mpfr.h ---- mpfr-3.1.4-a/src/mpfr.h 2016-04-13 21:22:23.744603677 +0000 -+++ mpfr-3.1.4-b/src/mpfr.h 2016-05-22 19:59:43.862399241 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 4 --#define MPFR_VERSION_STRING "3.1.4-p1" -+#define MPFR_VERSION_STRING "3.1.4-p2" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.4-a/src/sub_ui.c mpfr-3.1.4-b/src/sub_ui.c ---- mpfr-3.1.4-a/src/sub_ui.c 2016-03-06 11:33:05.000000000 +0000 -+++ mpfr-3.1.4-b/src/sub_ui.c 2016-05-22 19:59:43.854399385 +0000 -@@ -52,6 +52,7 @@ - MPFR_SAVE_EXPO_MARK (expo); - MPFR_SET_EXP (uu, GMP_NUMB_BITS - cnt); - inex = mpfr_sub (y, x, uu, rnd_mode); -+ MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); - MPFR_SAVE_EXPO_FREE (expo); - return mpfr_check_range (y, inex, rnd_mode); - } -diff -Naurd mpfr-3.1.4-a/src/version.c mpfr-3.1.4-b/src/version.c ---- mpfr-3.1.4-a/src/version.c 2016-04-13 21:22:23.744603677 +0000 -+++ mpfr-3.1.4-b/src/version.c 2016-05-22 19:59:43.866399168 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.4-p1"; -+ return "3.1.4-p2"; - } -diff -Naurd mpfr-3.1.4-a/tests/tadd_ui.c mpfr-3.1.4-b/tests/tadd_ui.c ---- mpfr-3.1.4-a/tests/tadd_ui.c 2016-03-06 11:33:03.000000000 +0000 -+++ mpfr-3.1.4-b/tests/tadd_ui.c 2016-05-22 19:59:43.854399385 +0000 -@@ -69,7 +69,9 @@ - - /* nan + 2394875 == nan */ - mpfr_set_nan (x); -+ mpfr_clear_nanflag (); - mpfr_add_ui (y, x, 2394875L, MPFR_RNDN); -+ MPFR_ASSERTN (mpfr_nanflag_p ()); - MPFR_ASSERTN (mpfr_nan_p (y)); - - /* +inf + 2394875 == +inf */ -diff -Naurd mpfr-3.1.4-a/tests/tsub_ui.c mpfr-3.1.4-b/tests/tsub_ui.c ---- mpfr-3.1.4-a/tests/tsub_ui.c 2016-03-06 11:33:03.000000000 +0000 -+++ mpfr-3.1.4-b/tests/tsub_ui.c 2016-05-22 19:59:43.854399385 +0000 -@@ -96,7 +96,9 @@ - - /* nan - 1 == nan */ - mpfr_set_nan (x); -+ mpfr_clear_nanflag (); - mpfr_sub_ui (y, x, 1L, MPFR_RNDN); -+ MPFR_ASSERTN (mpfr_nanflag_p ()); - MPFR_ASSERTN (mpfr_nan_p (y)); - - /* +inf - 1 == +inf */ -diff -Naurd mpfr-3.1.4-a/PATCHES mpfr-3.1.4-b/PATCHES ---- mpfr-3.1.4-a/PATCHES 2016-06-01 13:00:30.748711490 +0000 -+++ mpfr-3.1.4-b/PATCHES 2016-06-01 13:00:30.772711162 +0000 -@@ -0,0 +1 @@ -+sub1-overflow -diff -Naurd mpfr-3.1.4-a/VERSION mpfr-3.1.4-b/VERSION ---- mpfr-3.1.4-a/VERSION 2016-05-22 19:59:43.866399168 +0000 -+++ mpfr-3.1.4-b/VERSION 2016-06-01 13:00:30.772711162 +0000 -@@ -1 +1 @@ --3.1.4-p2 -+3.1.4-p3 -diff -Naurd mpfr-3.1.4-a/src/mpfr.h mpfr-3.1.4-b/src/mpfr.h ---- mpfr-3.1.4-a/src/mpfr.h 2016-05-22 19:59:43.862399241 +0000 -+++ mpfr-3.1.4-b/src/mpfr.h 2016-06-01 13:00:30.772711162 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 4 --#define MPFR_VERSION_STRING "3.1.4-p2" -+#define MPFR_VERSION_STRING "3.1.4-p3" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.4-a/src/sub1.c mpfr-3.1.4-b/src/sub1.c ---- mpfr-3.1.4-a/src/sub1.c 2016-03-06 11:33:05.000000000 +0000 -+++ mpfr-3.1.4-b/src/sub1.c 2016-06-01 13:00:30.760711326 +0000 -@@ -96,16 +96,15 @@ - /* A = S*ABS(B) +/- ulp(a) */ - MPFR_SET_EXP (a, MPFR_GET_EXP (b)); - MPFR_RNDRAW_EVEN (inexact, a, MPFR_MANT (b), MPFR_PREC (b), -- rnd_mode, MPFR_SIGN (a), -- if (MPFR_UNLIKELY ( ++MPFR_EXP (a) > __gmpfr_emax)) -- inexact = mpfr_overflow (a, rnd_mode, MPFR_SIGN (a))); -- /* inexact = mpfr_set4 (a, b, rnd_mode, MPFR_SIGN (a)); */ -+ rnd_mode, MPFR_SIGN (a), ++ MPFR_EXP (a)); - if (inexact == 0) - { - /* a = b (Exact) - But we know it isn't (Since we have to remove `c') - So if we round to Zero, we have to remove one ulp. - Otherwise the result is correctly rounded. */ -+ /* An overflow is not possible. */ -+ MPFR_ASSERTD (MPFR_EXP (a) <= __gmpfr_emax); - if (MPFR_IS_LIKE_RNDZ (rnd_mode, MPFR_IS_NEG (a))) - { - mpfr_nexttozero (a); -@@ -136,9 +135,14 @@ - i.e. inexact= MPFR_EVEN_INEX */ - if (MPFR_UNLIKELY (inexact == MPFR_EVEN_INEX*MPFR_INT_SIGN (a))) - { -- mpfr_nexttozero (a); -+ if (MPFR_UNLIKELY (MPFR_EXP (a) > __gmpfr_emax)) -+ mpfr_setmax (a, __gmpfr_emax); -+ else -+ mpfr_nexttozero (a); - inexact = -MPFR_INT_SIGN (a); - } -+ else if (MPFR_UNLIKELY (MPFR_EXP (a) > __gmpfr_emax)) -+ inexact = mpfr_overflow (a, rnd_mode, MPFR_SIGN (a)); - MPFR_RET (inexact); - } - } -diff -Naurd mpfr-3.1.4-a/src/version.c mpfr-3.1.4-b/src/version.c ---- mpfr-3.1.4-a/src/version.c 2016-05-22 19:59:43.866399168 +0000 -+++ mpfr-3.1.4-b/src/version.c 2016-06-01 13:00:30.772711162 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.4-p2"; -+ return "3.1.4-p3"; - } -diff -Naurd mpfr-3.1.4-a/tests/tsub.c mpfr-3.1.4-b/tests/tsub.c ---- mpfr-3.1.4-a/tests/tsub.c 2016-03-06 11:33:03.000000000 +0000 -+++ mpfr-3.1.4-b/tests/tsub.c 2016-06-01 13:00:30.760711326 +0000 -@@ -630,6 +630,135 @@ - } - } - -+static void -+check_max_almosteven (void) -+{ -+ mpfr_exp_t old_emin, old_emax; -+ mpfr_exp_t emin[2] = { MPFR_EMIN_MIN, -1000 }; -+ mpfr_exp_t emax[2] = { MPFR_EMAX_MAX, 1000 }; -+ int i; -+ -+ old_emin = mpfr_get_emin (); -+ old_emax = mpfr_get_emax (); -+ -+ for (i = 0; i < 2; i++) -+ { -+ mpfr_t a1, a2, b, c; -+ mpfr_prec_t p; -+ int neg, j, rnd; -+ -+ set_emin (emin[i]); -+ set_emax (emax[i]); -+ -+ p = MPFR_PREC_MIN + randlimb () % 70; -+ mpfr_init2 (a1, p); -+ mpfr_init2 (a2, p); -+ mpfr_init2 (b, p+1); -+ mpfr_init2 (c, MPFR_PREC_MIN); -+ -+ mpfr_setmax (b, 0); -+ mpfr_set_ui (c, 1, MPFR_RNDN); -+ -+ for (neg = 0; neg < 2; neg++) -+ { -+ for (j = 1; j >= 0; j--) -+ { -+ mpfr_set_exp (b, __gmpfr_emax - j); -+ RND_LOOP (rnd) -+ { -+ unsigned int flags1, flags2; -+ int inex1, inex2; -+ -+ flags1 = MPFR_FLAGS_INEXACT; -+ if (rnd == MPFR_RNDN || MPFR_IS_LIKE_RNDZ (rnd, neg)) -+ { -+ inex1 = neg ? 1 : -1; -+ mpfr_setmax (a1, __gmpfr_emax - j); -+ } -+ else -+ { -+ inex1 = neg ? -1 : 1; -+ if (j == 0) -+ { -+ flags1 |= MPFR_FLAGS_OVERFLOW; -+ mpfr_set_inf (a1, 1); -+ } -+ else -+ { -+ mpfr_setmin (a1, __gmpfr_emax); -+ } -+ } -+ MPFR_SET_SIGN (a1, neg ? -1 : 1); -+ -+ mpfr_clear_flags (); -+ inex2 = mpfr_sub (a2, b, c, (mpfr_rnd_t) rnd); -+ flags2 = __gmpfr_flags; -+ -+ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && -+ mpfr_equal_p (a1, a2))) -+ { -+ printf ("Error 1 in check_max_almosteven for %s," -+ " i = %d, j = %d, neg = %d\n", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd), -+ i, j, neg); -+ printf (" b = "); -+ mpfr_dump (b); -+ printf ("Expected "); -+ mpfr_dump (a1); -+ printf (" with inex = %d, flags =", inex1); -+ flags_out (flags1); -+ printf ("Got "); -+ mpfr_dump (a2); -+ printf (" with inex = %d, flags =", inex2); -+ flags_out (flags2); -+ exit (1); -+ } -+ -+ if (i == 0) -+ break; -+ -+ mpfr_clear_flags (); -+ set_emin (MPFR_EMIN_MIN); -+ set_emax (MPFR_EMAX_MAX); -+ inex2 = mpfr_sub (a2, b, c, (mpfr_rnd_t) rnd); -+ set_emin (emin[i]); -+ set_emax (emax[i]); -+ inex2 = mpfr_check_range (a2, inex2, (mpfr_rnd_t) rnd); -+ flags2 = __gmpfr_flags; -+ -+ if (! (flags1 == flags2 && SAME_SIGN (inex1, inex2) && -+ mpfr_equal_p (a1, a2))) -+ { -+ printf ("Error 2 in check_max_almosteven for %s," -+ " i = %d, j = %d, neg = %d\n", -+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd), -+ i, j, neg); -+ printf (" b = "); -+ mpfr_dump (b); -+ printf ("Expected "); -+ mpfr_dump (a1); -+ printf (" with inex = %d, flags =", inex1); -+ flags_out (flags1); -+ printf ("Got "); -+ mpfr_dump (a2); -+ printf (" with inex = %d, flags =", inex2); -+ flags_out (flags2); -+ exit (1); -+ } -+ } -+ } /* j */ -+ -+ mpfr_neg (b, b, MPFR_RNDN); -+ mpfr_neg (c, c, MPFR_RNDN); -+ } /* neg */ -+ -+ mpfr_clears (a1, a2, b, c, (mpfr_ptr) 0); -+ } /* i */ -+ -+ set_emin (old_emin); -+ set_emax (old_emax); -+} -+ - #define TEST_FUNCTION test_sub - #define TWO_ARGS - #define RAND_FUNCTION(x) mpfr_random2(x, MPFR_LIMB_SIZE (x), randlimb () % 100, RANDS) -@@ -647,6 +776,7 @@ - check_rounding (); - check_diverse (); - check_inexact (); -+ check_max_almosteven (); - bug_ddefour (); - for (p=2; p<200; p++) - for (i=0; i<50; i++) -diff -Naurd mpfr-3.1.4-a/PATCHES mpfr-3.1.4-b/PATCHES ---- mpfr-3.1.4-a/PATCHES 2016-08-04 20:41:14.097592781 +0000 -+++ mpfr-3.1.4-b/PATCHES 2016-08-04 20:41:14.121592350 +0000 -@@ -0,0 +1 @@ -+c++11-compat -diff -Naurd mpfr-3.1.4-a/VERSION mpfr-3.1.4-b/VERSION ---- mpfr-3.1.4-a/VERSION 2016-06-01 13:00:30.772711162 +0000 -+++ mpfr-3.1.4-b/VERSION 2016-08-04 20:41:14.121592350 +0000 -@@ -1 +1 @@ --3.1.4-p3 -+3.1.4-p4 -diff -Naurd mpfr-3.1.4-a/src/mpfr.h mpfr-3.1.4-b/src/mpfr.h ---- mpfr-3.1.4-a/src/mpfr.h 2016-06-01 13:00:30.772711162 +0000 -+++ mpfr-3.1.4-b/src/mpfr.h 2016-08-04 20:41:14.121592350 +0000 -@@ -27,7 +27,7 @@ - #define MPFR_VERSION_MAJOR 3 - #define MPFR_VERSION_MINOR 1 - #define MPFR_VERSION_PATCHLEVEL 4 --#define MPFR_VERSION_STRING "3.1.4-p3" -+#define MPFR_VERSION_STRING "3.1.4-p4" - - /* Macros dealing with MPFR VERSION */ - #define MPFR_VERSION_NUM(a,b,c) (((a) << 16L) | ((b) << 8) | (c)) -diff -Naurd mpfr-3.1.4-a/src/version.c mpfr-3.1.4-b/src/version.c ---- mpfr-3.1.4-a/src/version.c 2016-06-01 13:00:30.772711162 +0000 -+++ mpfr-3.1.4-b/src/version.c 2016-08-04 20:41:14.121592350 +0000 -@@ -25,5 +25,5 @@ - const char * - mpfr_get_version (void) - { -- return "3.1.4-p3"; -+ return "3.1.4-p4"; - } -diff -Naurd mpfr-3.1.4-a/tests/tpow_z.c mpfr-3.1.4-b/tests/tpow_z.c ---- mpfr-3.1.4-a/tests/tpow_z.c 2016-03-06 11:33:03.000000000 +0000 -+++ mpfr-3.1.4-b/tests/tpow_z.c 2016-08-04 20:41:14.113592494 +0000 -@@ -26,7 +26,7 @@ - - #include "mpfr-test.h" - --#define ERROR(str) do { printf("Error for "str"\n"); exit (1); } while (0) -+#define ERROR(str) do { printf ("Error for " str "\n"); exit (1); } while (0) - - static void - check_special (void) -diff -Naurd mpfr-3.1.4-a/tests/tset_si.c mpfr-3.1.4-b/tests/tset_si.c ---- mpfr-3.1.4-a/tests/tset_si.c 2016-03-06 11:33:03.000000000 +0000 -+++ mpfr-3.1.4-b/tests/tset_si.c 2016-08-04 20:41:14.113592494 +0000 -@@ -26,7 +26,7 @@ - - #include "mpfr-test.h" - --#define ERROR(str) {printf("Error for "str"\n"); exit(1);} -+#define ERROR(str) do { printf ("Error for " str "\n"); exit (1); } while (0) - - static void - test_2exp (void) -diff -Naurd mpfr-3.1.4-a/tests/tset_sj.c mpfr-3.1.4-b/tests/tset_sj.c ---- mpfr-3.1.4-a/tests/tset_sj.c 2016-03-06 11:33:03.000000000 +0000 -+++ mpfr-3.1.4-b/tests/tset_sj.c 2016-08-04 20:41:14.113592494 +0000 -@@ -42,7 +42,7 @@ - - #else - --#define ERROR(str) {printf("Error for "str"\n"); exit(1);} -+#define ERROR(str) do { printf ("Error for " str "\n"); exit (1); } while (0) - - static int - inexact_sign (int x) -diff -Naurd mpfr-3.1.4-a/tests/tsi_op.c mpfr-3.1.4-b/tests/tsi_op.c ---- mpfr-3.1.4-a/tests/tsi_op.c 2016-03-06 11:33:03.000000000 +0000 -+++ mpfr-3.1.4-b/tests/tsi_op.c 2016-08-04 20:41:14.113592494 +0000 -@@ -26,14 +26,16 @@ - - #include "mpfr-test.h" - --#define ERROR1(s, i, z, exp) \ --{\ -- printf("Error for "s" and i=%d\n", i);\ -- printf("Expected %s\n", exp);\ -- printf("Got "); mpfr_out_str (stdout, 16, 0, z, MPFR_RNDN);\ -- putchar ('\n');\ -- exit(1);\ --} -+#define ERROR1(s,i,z,exp) \ -+ do \ -+ { \ -+ printf ("Error for " s " and i=%d\n", i); \ -+ printf ("Expected %s\n", exp); \ -+ printf ("Got "); mpfr_out_str (stdout, 16, 0, z, MPFR_RNDN); \ -+ putchar ('\n'); \ -+ exit(1); \ -+ } \ -+ while (0) - - const struct { - const char * op1; diff --git a/easybuild/easyconfigs/g/gompi/gompi-2016.07.eb b/easybuild/easyconfigs/g/gompi/gompi-2016.07.eb index cf2c3b0bdb..5eca4152c8 100644 --- a/easybuild/easyconfigs/g/gompi/gompi-2016.07.eb +++ b/easybuild/easyconfigs/g/gompi/gompi-2016.07.eb @@ -16,7 +16,7 @@ gccbinver = '%s-%s' % (gccver, binutilsver) # compiler toolchain dependencies dependencies = [ ('GCC', gccbinver), # includes both GCC and binutils - ('OpenMPI', '1.10.2', '', ('GCC', gccbinver)), + ('OpenMPI', '1.10.3', '', ('GCC', gccbinver)), ] moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.3-GCC-6.1.0-2.27.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.3-GCC-6.1.0-2.27.eb new file mode 100644 index 0000000000..af22c5f516 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.3-GCC-6.1.0-2.27.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'OpenMPI' +version = '1.10.3' + +homepage = 'http://www.open-mpi.org/' +description = """The Open MPI Project is an open source MPI-2 implementation.""" + +toolchain = {'name': 'GCC', 'version': '6.1.0-2.27'} + +sources = [SOURCELOWER_TAR_GZ] + +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] + +dependencies = [('hwloc', '1.11.3')] + +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' +configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path +configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support +configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading + +# needed for --with-verbs +osdependencies = [('libibverbs-dev', 'libibverbs-devel'),] + +libs = ["mpi_cxx", "mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte", "vt", "vt-hyb", "vt-mpi", "vt-mpi-unify"] +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], + 'dirs': ["include/openmpi/ompi/mpi/cxx"], +} + +moduleclass = 'mpi' -- GitLab From dfbfc0c60a0f645216c13ee4f1bba98544f0dd90 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Sat, 3 Sep 2016 11:27:56 +0100 Subject: [PATCH 163/741] Forgot to change string substitution args --- easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb index 456f0e7ef2..5b9af4041a 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb @@ -35,7 +35,7 @@ builddependencies = [ ] patches = [ - ('mpfr-%s-allpatches-20160804.patch' % (name, version, mpfr_version), '../mpfr-%s' % mpfr_version), + ('mpfr-%s-allpatches-20160804.patch' % mpfr_version, '../mpfr-%s' % mpfr_version), ('%s-%s_fix-find-isl.patch' % (name, version)), ] -- GitLab From 31c24cd0326c0ffdbe2d2db7d3d6dd23e50f96e2 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Sat, 3 Sep 2016 11:36:57 +0100 Subject: [PATCH 164/741] HPL 2.2 test for foss 2016.07 --- .../easyconfigs/h/HPL/HPL-2.2-foss-2016.07.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.07.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.07.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.07.eb new file mode 100644 index 0000000000..c44018425b --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.07.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'foss', 'version': '2016.07'} +toolchainopts = {'optarch': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' -- GitLab From 09d50312c50fb2b2bae0634ece52e35088ff6a73 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 3 Sep 2016 18:26:45 +0200 Subject: [PATCH 165/741] remove empty versionsuffix in Perl dep spec in YAML-Syck easyconfigs + use %(pyver)s --- .../YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb | 11 +++-------- .../YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb | 11 +++-------- .../YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb | 11 +++-------- 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb index 04fcdaad37..32cee4cfcb 100644 --- a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb +++ b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb @@ -11,6 +11,7 @@ easyblock = 'PerlModule' name = 'YAML-Syck' version = '1.27' +versionsuffix = '-Perl-%(pyver)s' homepage = 'http://search.cpan.org/perldoc?YAML%3A%3ASyck' description = """Fast, lightweight YAML loader and dumper. @@ -21,21 +22,15 @@ toolchain = {'name': 'goolf', 'version': '1.4.10'} source_urls = ['http://www.cpan.org/modules/by-module/YAML'] sources = [SOURCE_TAR_GZ] -perl = 'Perl' -perlver = '5.16.3' -perlverextra = '' -versionsuffix = '-%s-%s%s' % (perl, perlver, perlverextra) - dependencies = [ - (perl, perlver, perlverextra), + ('Perl', '5.16.3'), ] options = {'modulename': 'YAML::Syck'} -perlmajver = perlver.split('.')[0] sanity_check_paths = { 'files': [], - 'dirs': ['lib/perl%s/site_perl/%s/x86_64-linux-thread-multi/YAML' % (perlmajver, perlver)], + 'dirs': ['lib/perl5/site_perl/%(perlver)s/x86_64-linux-thread-multi/YAML'], } moduleclass = 'data' diff --git a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb index 814139aaa0..b18bdca8af 100644 --- a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb +++ b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb @@ -11,6 +11,7 @@ easyblock = 'PerlModule' name = 'YAML-Syck' version = '1.27' +versionsuffix = '-Perl-%(pyver)s' homepage = 'http://search.cpan.org/perldoc?YAML%3A%3ASyck' description = """Fast, lightweight YAML loader and dumper. @@ -21,21 +22,15 @@ toolchain = {'name': 'ictce', 'version': '4.1.13'} source_urls = ['http://www.cpan.org/modules/by-module/YAML'] sources = [SOURCE_TAR_GZ] -perl = 'Perl' -perlver = '5.16.3' -perlverextra = '' -versionsuffix = '-%s-%s%s' % (perl, perlver, perlverextra) - dependencies = [ - (perl, perlver, perlverextra), + ('Perl', '5.16.3'), ] options = {'modulename': 'YAML::Syck'} -perlmajver = perlver.split('.')[0] sanity_check_paths = { 'files': [], - 'dirs': ['lib/perl%s/site_perl/%s/x86_64-linux-thread-multi/YAML' % (perlmajver, perlver)], + 'dirs': ['lib/perl5/site_perl/%(perlver)s/x86_64-linux-thread-multi/YAML'], } moduleclass = 'data' diff --git a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb index 4816f11ffd..3704ca4fad 100644 --- a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb +++ b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb @@ -11,6 +11,7 @@ easyblock = 'PerlModule' name = 'YAML-Syck' version = '1.27' +versionsuffix = '-Perl-%(pyver)s' homepage = 'http://search.cpan.org/perldoc?YAML%3A%3ASyck' description = """Fast, lightweight YAML loader and dumper. @@ -21,21 +22,15 @@ toolchain = {'name': 'ictce', 'version': '5.3.0'} source_urls = ['http://www.cpan.org/modules/by-module/YAML'] sources = [SOURCE_TAR_GZ] -perl = 'Perl' -perlver = '5.16.3' -perlverextra = '' -versionsuffix = '-%s-%s%s' % (perl, perlver, perlverextra) - dependencies = [ - (perl, perlver, perlverextra), + ('Perl', '5.16.3'), ] options = {'modulename': 'YAML::Syck'} -perlmajver = perlver.split('.')[0] sanity_check_paths = { 'files': [], - 'dirs': ['lib/perl%s/site_perl/%s/x86_64-linux-thread-multi/YAML' % (perlmajver, perlver)], + 'dirs': ['lib/perl5/site_perl/%(perlver)s/x86_64-linux-thread-multi/YAML'], } moduleclass = 'data' -- GitLab From bc6294bf4731c2db1d89d6f295ac4a861ba7cc3e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 3 Sep 2016 18:28:15 +0200 Subject: [PATCH 166/741] significantly speed up verifying dumped easyconfig by resorting to 'shallow' parsing --- test/easyconfigs/easyconfigs.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index 13ea1263cd..6fbaa4bb1d 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -44,9 +44,10 @@ import easybuild.main as main import easybuild.tools.options as eboptions from easybuild.easyblocks.generic.configuremake import ConfigureMake from easybuild.framework.easyblock import EasyBlock +from easybuild.framework.easyconfig.default import DEFAULT_CONFIG from easybuild.framework.easyconfig.easyconfig import EasyConfig -from easybuild.framework.easyconfig.easyconfig import get_easyblock_class -from easybuild.framework.easyconfig.parser import fetch_parameters_from_easyconfig +from easybuild.framework.easyconfig.easyconfig import get_easyblock_class, resolve_template +from easybuild.framework.easyconfig.parser import EasyConfigParser, fetch_parameters_from_easyconfig from easybuild.framework.easyconfig.tools import dep_graph, get_paths_for, process_easyconfig from easybuild.tools import config from easybuild.tools.config import build_option @@ -269,7 +270,7 @@ def template_easyconfig_test(self, spec): os.close(handle) ec.dump(test_ecfile) - dumped_ec = EasyConfig(test_ecfile) + dumped_ec = EasyConfigParser(test_ecfile).get_config_dict() os.remove(test_ecfile) # inject dummy values for templates that are only known at a later stage @@ -278,10 +279,16 @@ def template_easyconfig_test(self, spec): 'installdir': '/dummy/installdir', } ec.template_values.update(dummy_template_values) - dumped_ec.template_values.update(dummy_template_values) - for key in sorted(ec._config): - self.assertEqual(ec[key], dumped_ec[key]) + ec_dict = ec.parser.get_config_dict() + for key in sorted(ec_dict): + orig_val = resolve_template(ec_dict[key], ec.template_values) + if key not in DEFAULT_CONFIG or orig_val == DEFAULT_CONFIG[key][0]: + continue + + dumped_val = resolve_template(dumped_ec[key], ec.template_values) + + self.assertEqual(orig_val, dumped_val) # cache the parsed easyconfig, to avoid that it is parsed again self.parsed_easyconfigs.append(ecs[0]) -- GitLab From 4cd26594e8e30d1ad1aa04248ac74d7d165ad58b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 3 Sep 2016 19:09:39 +0200 Subject: [PATCH 167/741] use %(perlver)s rather than %(pyver)s in YAML-Syck easyconfigs --- .../y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb | 2 +- .../y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb | 2 +- .../y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb index 32cee4cfcb..8cae54960c 100644 --- a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb +++ b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-goolf-1.4.10-Perl-5.16.3.eb @@ -11,7 +11,7 @@ easyblock = 'PerlModule' name = 'YAML-Syck' version = '1.27' -versionsuffix = '-Perl-%(pyver)s' +versionsuffix = '-Perl-%(perlver)s' homepage = 'http://search.cpan.org/perldoc?YAML%3A%3ASyck' description = """Fast, lightweight YAML loader and dumper. diff --git a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb index b18bdca8af..5efafeb0f0 100644 --- a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb +++ b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb @@ -11,7 +11,7 @@ easyblock = 'PerlModule' name = 'YAML-Syck' version = '1.27' -versionsuffix = '-Perl-%(pyver)s' +versionsuffix = '-Perl-%(perlver)s' homepage = 'http://search.cpan.org/perldoc?YAML%3A%3ASyck' description = """Fast, lightweight YAML loader and dumper. diff --git a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb index 3704ca4fad..19442cc19e 100644 --- a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb +++ b/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-5.3.0-Perl-5.16.3.eb @@ -11,7 +11,7 @@ easyblock = 'PerlModule' name = 'YAML-Syck' version = '1.27' -versionsuffix = '-Perl-%(pyver)s' +versionsuffix = '-Perl-%(perlver)s' homepage = 'http://search.cpan.org/perldoc?YAML%3A%3ASyck' description = """Fast, lightweight YAML loader and dumper. -- GitLab From 6e8437fb7ad0382dbf0245f7d3f8730388373a20 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 4 Sep 2016 22:47:06 +0200 Subject: [PATCH 168/741] fix checking of dumped easyconfig --- test/easyconfigs/easyconfigs.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index 6fbaa4bb1d..3deb2e88ee 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -259,7 +259,8 @@ def template_easyconfig_test(self, spec): self.assertTrue(os.path.isfile(ext_patch_full), msg) # check whether all extra_options defined for used easyblock are defined - for key in app.extra_options(): + extra_opts = app.extra_options() + for key in extra_opts: self.assertTrue(key in app.cfg) app.close_log() @@ -281,11 +282,19 @@ def template_easyconfig_test(self, spec): ec.template_values.update(dummy_template_values) ec_dict = ec.parser.get_config_dict() - for key in sorted(ec_dict): - orig_val = resolve_template(ec_dict[key], ec.template_values) - if key not in DEFAULT_CONFIG or orig_val == DEFAULT_CONFIG[key][0]: + keys = [] + for key in ec_dict: + # skip parameters for which value is equal to default value + orig_val = ec_dict[key] + if key in DEFAULT_CONFIG and orig_val == DEFAULT_CONFIG[key][0]: + continue + if key in extra_opts and orig_val == extra_opts[key][0]: + continue + if key not in DEFAULT_CONFIG and key not in extra_opts: continue + keys.append(key) + orig_val = resolve_template(ec_dict[key], ec.template_values) dumped_val = resolve_template(dumped_ec[key], ec.template_values) self.assertEqual(orig_val, dumped_val) @@ -296,6 +305,7 @@ def template_easyconfig_test(self, spec): # test passed, so set back to True single_tests_ok = True and prev_single_tests_ok + def suite(): """Return all easyblock initialisation tests.""" # dynamically generate a separate test for each of the available easyconfigs -- GitLab From 8aa6003c44e14452dfdbe331b0b3fe1ae221e62a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 5 Sep 2016 11:42:30 +0200 Subject: [PATCH 169/741] METIS: use doubles instead of floats by default --- ...0-intel-2016b-32bitIDX.eb => METIS-5.1.0-intel-2016b.eb} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename easybuild/easyconfigs/m/METIS/{METIS-5.1.0-intel-2016b-32bitIDX.eb => METIS-5.1.0-intel-2016b.eb} (86%) diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b-32bitIDX.eb b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b.eb similarity index 86% rename from easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b-32bitIDX.eb rename to easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b.eb index 9c8e6cc340..75f09a7d43 100644 --- a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b-32bitIDX.eb +++ b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b.eb @@ -1,7 +1,5 @@ name = 'METIS' version = '5.1.0' -# default 32-bit IDTYPEWIDTH, no patch used -versionsuffix = '-32bitIDX' homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, @@ -17,7 +15,9 @@ source_urls = [ 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD', ] -builddependencies = [('CMake', '3.5.2')] +patches = ['METIS-5.1.0-use-doubles.patch'] + +builddependencies = [('CMake', '3.6.1')] configopts = ['', 'shared=1'] -- GitLab From f02f59791109924cce105d13736009bc4ed0c6c5 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 5 Sep 2016 13:18:34 +0200 Subject: [PATCH 170/741] Fix OpenFOAM patches and METIS What's new: we don't need the Third Party stuff anymore, it's all EB now. --- .../o/OpenFOAM/OpenFOAM-4.0-cleanup.patch | 291 ++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch new file mode 100644 index 0000000000..1afeb16c3a --- /dev/null +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch @@ -0,0 +1,291 @@ +# This patch removes all need for the ThirdParty files of OpenFOAM: +# we use EB dependencies for everything. It adjusts the paths, variables, etc +# We also let the install dir, compiler, etc be set by EB. +# Lastly, we also fix a small compile issue in 'ptscotchDecomp.C' +# Ward Poelmans +diff -ur OpenFOAM-4.0.orig/applications/utilities/mesh/manipulation/setSet/Allwmake OpenFOAM-4.0/applications/utilities/mesh/manipulation/setSet/Allwmake +--- OpenFOAM-4.0.orig/applications/utilities/mesh/manipulation/setSet/Allwmake 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/applications/utilities/mesh/manipulation/setSet/Allwmake 2016-09-02 15:44:36.305512075 +0200 +@@ -9,11 +9,11 @@ + # + # use readline if available + # +-if [ -f /usr/include/readline/readline.h ] ++if [ -f $EBROOTLIBREADLINE/include/readline/readline.h ] + then + echo "Found -- enabling readline support." + export COMP_FLAGS="-DHAS_READLINE" +- export LINK_FLAGS="-lreadline" ++ export LINK_FLAGS="-L$EBROOTLIBREADLINE/lib -lreadline -L$EBROOTNCURSES -lncurses" + fi + + wmake +diff -ur OpenFOAM-4.0.orig/applications/utilities/postProcessing/graphics/PVReaders/Allwmake OpenFOAM-4.0/applications/utilities/postProcessing/graphics/PVReaders/Allwmake +--- OpenFOAM-4.0.orig/applications/utilities/postProcessing/graphics/PVReaders/Allwmake 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/applications/utilities/postProcessing/graphics/PVReaders/Allwmake 2016-09-02 15:44:36.305512075 +0200 +@@ -16,7 +16,7 @@ + } + + # ensure CMake gets the correct C++ compiler +- [ -n "$WM_CXX" ] && export CXX="$WM_CXX" ++# [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + + wmake $targetType vtkPVReaders + PVblockMeshReader/Allwmake $* +diff -ur OpenFOAM-4.0.orig/etc/bashrc OpenFOAM-4.0/etc/bashrc +--- OpenFOAM-4.0.orig/etc/bashrc 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/etc/bashrc 2016-09-02 15:43:37.773220097 +0200 +@@ -42,9 +42,8 @@ + # + # Please set to the appropriate path if the default is not correct. + # +-[ $BASH_SOURCE ] && \ +-export FOAM_INST_DIR=${BASH_SOURCE%/*/*/*} || \ +-export FOAM_INST_DIR=$HOME/$WM_PROJECT ++# For Easybuild: set by the module ++# + # export FOAM_INST_DIR=~$WM_PROJECT + # export FOAM_INST_DIR=/opt/$WM_PROJECT + # export FOAM_INST_DIR=/usr/local/$WM_PROJECT +diff -ur OpenFOAM-4.0.orig/etc/config.sh/CGAL OpenFOAM-4.0/etc/config.sh/CGAL +--- OpenFOAM-4.0.orig/etc/config.sh/CGAL 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/etc/config.sh/CGAL 2016-09-02 15:43:37.773220097 +0200 +@@ -36,37 +36,7 @@ + # + #------------------------------------------------------------------------------ + +-boost_version=boost-system +-cgal_version=cgal-system +-#cgal_version=CGAL-4.8 +- +-if [ -z "$SOURCE_CGAL_VERSIONS_ONLY" ] +-then +- +- common_path=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER +- +- export BOOST_ARCH_PATH=$common_path/$boost_version +- export CGAL_ARCH_PATH=$common_path/$cgal_version +- +- if [ "$FOAM_VERBOSE" -a "$PS1" ] +- then +- echo "Using CGAL and boost" 1>&2 +- echo " $cgal_version at $CGAL_ARCH_PATH" 1>&2 +- echo " $boost_version at $BOOST_ARCH_PATH" 1>&2 +- fi +- +- if [ -d "$CGAL_ARCH_PATH" -a "$cgal_version" != "cgal-system" ] +- then +- _foamAddLib $CGAL_ARCH_PATH/lib +- fi +- +- if [ -d "$BOOST_ARCH_PATH" -a "$boost_version" != "boost-system" ] +- then +- _foamAddLib $BOOST_ARCH_PATH/lib +- fi +- +- unset boost_version cgal_version common_path +- +-fi ++export CGAL_ARCH_PATH=$EBROOTCGAL ++export BOOST_ARCH_PATH=$EBROOTBOOST + + #------------------------------------------------------------------------------ +diff -ur OpenFOAM-4.0.orig/etc/config.sh/gperftools OpenFOAM-4.0/etc/config.sh/gperftools +--- OpenFOAM-4.0.orig/etc/config.sh/gperftools 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/etc/config.sh/gperftools 2016-09-02 15:43:37.773220097 +0200 +@@ -29,13 +29,7 @@ + # + #------------------------------------------------------------------------------ + +-version=svn +-gperftools_install=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER +- +-GPERFTOOLS_VERSION=gperftools-$version +-GPERFTOOLS_ARCH_PATH=$gperftools_install/$GPERFTOOLS_VERSION +- +-export PATH=$GPERFTOOLS_ARCH_PATH/bin:$PATH +-export LD_LIBRARY_PATH=$GPERFTOOLS_ARCH_PATH/lib:$LD_LIBRARY_PATH ++GPERFTOOLS_VERSION=gperftools-$EBVERSIONGPERFTOOLS ++GPERFTOOLS_ARCH_PATH=$EBROOTGPERFTOOLS + + #------------------------------------------------------------------------------ +diff -ur OpenFOAM-4.0.orig/etc/config.sh/metis OpenFOAM-4.0/etc/config.sh/metis +--- OpenFOAM-4.0.orig/etc/config.sh/metis 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/etc/config.sh/metis 2016-09-02 15:43:37.773220097 +0200 +@@ -34,7 +34,7 @@ + # + #------------------------------------------------------------------------------ + +-export METIS_VERSION=metis-5.1.0 +-export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$METIS_VERSION ++export METIS_VERSION=metis-$EBVERSIONMETIS ++export METIS_ARCH_PATH=$EBROOTMETIS + + #------------------------------------------------------------------------------ +diff -ur OpenFOAM-4.0.orig/etc/config.sh/mpi OpenFOAM-4.0/etc/config.sh/mpi +--- OpenFOAM-4.0.orig/etc/config.sh/mpi 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/etc/config.sh/mpi 2016-09-02 15:43:37.773220097 +0200 +@@ -243,6 +243,9 @@ + _foamAddPath $MPI_ARCH_PATH/bin64 + _foamAddLib $MPI_ARCH_PATH/lib64 + ;; ++EASYBUILDMPI) ++ export FOAM_MPI=mpi ++ ;; + *) + export FOAM_MPI=dummy + ;; +diff -ur OpenFOAM-4.0.orig/etc/config.sh/paraview OpenFOAM-4.0/etc/config.sh/paraview +--- OpenFOAM-4.0.orig/etc/config.sh/paraview 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/etc/config.sh/paraview 2016-09-02 15:43:37.773220097 +0200 +@@ -41,21 +41,6 @@ + ) \ + && PATH="$cleaned" + +-# Determine the cmake to be used +-unset CMAKE_HOME +-for cmake in cmake-3.2.1 cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 \ +- cmake-2.8.1 +-do +- cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake +- if [ -r $cmake ] +- then +- export CMAKE_HOME=$cmake +- export CMAKE_ROOT=$cmake +- export PATH=$CMAKE_HOME/bin:$PATH +- break +- fi +-done +- + + #- ParaView version, automatically determine major version + #export ParaView_VERSION=3.12.0 +@@ -64,7 +49,7 @@ + #export ParaView_VERSION=4.3.1 + #export ParaView_VERSION=4.4.0 + #export ParaView_VERSION=5.0.0 +-export ParaView_VERSION=5.0.1 ++export ParaView_VERSION=$EBVERSIONPARAVIEW + export ParaView_MAJOR=detect + + +@@ -105,21 +90,15 @@ + paraviewInstDir=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION + paraviewArchName=ParaView-$ParaView_VERSION + +-export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$paraviewArchName ++export ParaView_DIR=$EBROOTPARAVIEW + + # Set paths if binaries or source are present + if [ -r $ParaView_DIR -o -r $paraviewInstDir ] + then + export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-$ParaView_MAJOR +- if [ ! -d $ParaView_INCLUDE_DIR -a -d $ParaView_DIR/include/paraview-3.0 ] +- then +- export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-3.0 +- fi + + ParaView_LIB_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR + +- export PATH=$ParaView_DIR/bin:$PATH +- export LD_LIBRARY_PATH=$ParaView_LIB_DIR:$LD_LIBRARY_PATH + export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR + + if [ "$FOAM_VERBOSE" -a "$PS1" ] +@@ -131,17 +110,6 @@ + echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH" + fi + +- # Add in python libraries if required +- paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping +- if [ -r $paraviewPython ] +- then +- if [ "$PYTHONPATH" ] +- then +- export PYTHONPATH=$PYTHONPATH:$paraviewPython:$ParaView_LIB_DIR +- else +- export PYTHONPATH=$paraviewPython:$ParaView_LIB_DIR +- fi +- fi + else + unset PV_PLUGIN_PATH + fi +diff -ur OpenFOAM-4.0.orig/etc/config.sh/scotch OpenFOAM-4.0/etc/config.sh/scotch +--- OpenFOAM-4.0.orig/etc/config.sh/scotch 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/etc/config.sh/scotch 2016-09-02 15:43:37.773220097 +0200 +@@ -37,7 +37,7 @@ + # + #------------------------------------------------------------------------------ + +-export SCOTCH_VERSION=scotch_6.0.3 +-export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$SCOTCH_VERSION ++export SCOTCH_VERSION=scotch_$EBVERSIONSCOTCH ++export SCOTCH_ARCH_PATH=$EBROOTSCOTCH + + #------------------------------------------------------------------------------ +diff -ur OpenFOAM-4.0.orig/etc/config.sh/settings OpenFOAM-4.0/etc/config.sh/settings +--- OpenFOAM-4.0.orig/etc/config.sh/settings 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/etc/config.sh/settings 2016-09-02 15:43:37.773220097 +0200 +@@ -56,11 +56,11 @@ + 64) + WM_ARCH=linux64 + export WM_COMPILER_LIB_ARCH=64 +- export WM_CC='gcc' +- export WM_CXX='g++' +- export WM_CFLAGS='-m64 -fPIC' +- export WM_CXXFLAGS='-m64 -fPIC -std=c++0x' +- export WM_LDFLAGS='-m64' ++ export WM_CC=$I_MPI_CC ++ export WM_CXX=$I_MPI_CXX ++ export WM_CFLAGS=$CFLAGS ++ export WM_CXXFLAGS=$CXXFLAGS ++ export WM_LDFLAGS=$LDFLAGS + ;; + *) + echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"\ +diff -ur OpenFOAM-4.0.orig/src/parallel/decompose/ptscotchDecomp/Make/options OpenFOAM-4.0/src/parallel/decompose/ptscotchDecomp/Make/options +--- OpenFOAM-4.0.orig/src/parallel/decompose/ptscotchDecomp/Make/options 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/src/parallel/decompose/ptscotchDecomp/Make/options 2016-09-02 15:44:36.305512075 +0200 +@@ -3,10 +3,8 @@ + + EXE_INC = \ + $(PFLAGS) $(PINC) \ +- -I$(SCOTCH_ROOT)/include \ + -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \ +- -I/usr/include/scotch \ + -I../decompositionMethods/lnInclude + + LIB_LIBS = \ +- -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt ++ -L$(SCOTCH_ARCH_PATH)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt +diff -ur OpenFOAM-4.0.orig/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C OpenFOAM-4.0/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +--- OpenFOAM-4.0.orig/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C 2016-09-02 15:45:13.376950242 +0200 +@@ -30,10 +30,11 @@ + #include "globalIndex.H" + #include "SubField.H" + ++#include ++ + extern "C" + { + #include +- #include + #include "ptscotch.h" + } + +diff -ur OpenFOAM-4.0.orig/src/parallel/decompose/scotchDecomp/Make/options OpenFOAM-4.0/src/parallel/decompose/scotchDecomp/Make/options +--- OpenFOAM-4.0.orig/src/parallel/decompose/scotchDecomp/Make/options 2016-06-24 23:33:52.000000000 +0200 ++++ OpenFOAM-4.0/src/parallel/decompose/scotchDecomp/Make/options 2016-09-02 15:44:36.305512075 +0200 +@@ -7,10 +7,8 @@ + + EXE_INC = \ + $(PFLAGS) $(PINC) \ +- -I$(SCOTCH_ROOT)/include \ + -I$(SCOTCH_ARCH_PATH)/include \ +- -I/usr/include/scotch \ + -I../decompositionMethods/lnInclude + + LIB_LIBS = \ +- -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt ++ -L$(SCOTCH_ARCH_PATH)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt -- GitLab From d70d75cac6ecf305b9eb547fcd18233496d18426 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 5 Sep 2016 13:19:29 +0200 Subject: [PATCH 171/741] Now with actual changes from last commit --- .../m/METIS/METIS-5.1.0-intel-2016b.eb | 1 + .../o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb | 29 +++++++------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b.eb b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b.eb index 75f09a7d43..65e2ae532f 100644 --- a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b.eb +++ b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-intel-2016b.eb @@ -15,6 +15,7 @@ source_urls = [ 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD', ] +# We use 32bit for indices and 64bit for content patches = ['METIS-5.1.0-use-doubles.patch'] builddependencies = [('CMake', '3.6.1')] diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb index 0caa9fc8da..635072f873 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-intel-2016b.eb @@ -10,35 +10,26 @@ description = """OpenFOAM is a free, open source CFD software package. toolchain = {'name': 'intel', 'version': '2016b'} toolchainopts = {'cstd': 'c++11'} -source_urls = ['http://downloads.sourceforge.net/foam/%(version)s'] -sources = [ - SOURCE_TGZ, - 'ThirdParty-%(version)s.tgz', -] +source_urls = ['https://github.com/OpenFOAM/OpenFOAM-%(version_major)s.x/archive'] +sources = ['version-%(version)s.tar.gz'] -paraversion = '5.1.2' -patches = [ - 'OpenFOAM-%(version)s_cleanup.patch', - 'OpenFOAM-%(version)s_libreadline.patch', - ('ThirdParty-%(version)s_cleanup.patch', ".."), # patch should not be applied in OpenFOAM subdir - 'OpenFOAM-%(version)s_external-3rd.patch', - ('ThirdParty-%(version)s_external-3rd.patch', ".."), - 'OpenFOAM-%%(version)s_external_paraview-%s.patch' % paraversion, -] +checksums = ['294b520811aae87241f3a78423f05952'] + +patches = ['OpenFOAM-%(version)s-cleanup.patch'] dependencies = [ - ('CGAL', '4.8.1'), ('libreadline', '6.3'), - # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes) - ('METIS', '5.1.0', '-32bitIDX'), ('ncurses', '6.0'), - ('ParaView', paraversion, '-mpi'), + # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes) + ('METIS', '5.1.0'), ('SCOTCH', '6.0.4'), + ('CGAL', '4.8.1'), + ('ParaView', '5.1.2', '-mpi'), ] builddependencies = [ ('Bison', '3.0.4'), - ('CMake', '3.5.2'), + ('CMake', '3.6.1'), ('flex', '2.6.0'), ] -- GitLab From 782ce32318fdba927d7c17a9278fc3db115bd745 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 5 Sep 2016 13:20:56 +0200 Subject: [PATCH 172/741] Add forgotten METIS patch --- .../m/METIS/METIS-5.1.0-use-doubles.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 easybuild/easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch new file mode 100644 index 0000000000..206f7ae1ae --- /dev/null +++ b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch @@ -0,0 +1,13 @@ +# Use double for floating point (64 bit) in METIS by default +diff -ur metis-5.1.0.orig/include/metis.h metis-5.1.0/include/metis.h +--- metis-5.1.0.orig/include/metis.h 2013-03-30 17:24:45.000000000 +0100 ++++ metis-5.1.0/include/metis.h 2016-09-05 11:39:33.004384533 +0200 +@@ -40,7 +40,7 @@ + 32 : single precission floating point (float) + 64 : double precission floating point (double) + --------------------------------------------------------------------------*/ +-#define REALTYPEWIDTH 32 ++#define REALTYPEWIDTH 64 + + + -- GitLab From d96a1d9fcc68f5fe3236043d1f1fe1da1d2a9ebe Mon Sep 17 00:00:00 2001 From: Appmaint Date: Mon, 5 Sep 2016 13:12:27 +0100 Subject: [PATCH 173/741] FFTW 3.3.5 with gompi 2016.07 toolchain --- .../f/FFTW/FFTW-3.3.5-gompi-2016.07.eb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb new file mode 100644 index 0000000000..2696fc3313 --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'FFTW' +version = '3.3.5' + +homepage = 'http://www.fftw.org' +description = """FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) + in one or more dimensions, of arbitrary input size, and of both real and complex data.""" + +toolchain = {'name': 'gompi', 'version': '2016.07'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [homepage] + +common_configopts = "--enable-threads --enable-openmp --with-pic" + +configopts = [ + common_configopts + " --enable-single --enable-sse2 --enable-mpi", + common_configopts + " --enable-long-double --enable-mpi", + common_configopts + " --enable-quad-precision", + common_configopts + " --enable-sse2 --enable-mpi", # default as last +] + +sanity_check_paths = { + 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom', 'q-wisdom']] + + ['include/fftw3%s' % x for x in ['-mpi.f03', '-mpi.h', '.f', '.f03', + '.h', 'l-mpi.f03', 'l.f03', 'q.f03']] + + ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']] + + ['lib/libfftw3q.a', 'lib/libfftw3q_omp.a'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'numlib' -- GitLab From f3c411dc857a8e3a8a62bbb86c51f30e0baaf12a Mon Sep 17 00:00:00 2001 From: Appmaint Date: Mon, 5 Sep 2016 13:16:11 +0100 Subject: [PATCH 174/741] Remove optarch statement in toolchainopts --- easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb index 2696fc3313..854d665922 100644 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.07.eb @@ -8,7 +8,7 @@ description = """FFTW is a C subroutine library for computing the discrete Fouri in one or more dimensions, of arbitrary input size, and of both real and complex data.""" toolchain = {'name': 'gompi', 'version': '2016.07'} -toolchainopts = {'optarch': True, 'pic': True} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = [homepage] -- GitLab From 64aa662e8bd3d92f9176c41c189445fa9d667b98 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Mon, 5 Sep 2016 15:44:30 +0200 Subject: [PATCH 175/741] Remove rotortest from testlist --- .../OpenBabel-2.3.2-comparison.patch | 58 ------------------- ...penBabel-2.3.2-foss-2016a-Python-2.7.11.eb | 2 +- .../OpenBabel-2.3.2-ignore-rotor-test.patch | 12 ++++ 3 files changed, 13 insertions(+), 59 deletions(-) delete mode 100644 easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-comparison.patch create mode 100644 easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-ignore-rotor-test.patch diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-comparison.patch b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-comparison.patch deleted file mode 100644 index 07b07de115..0000000000 --- a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-comparison.patch +++ /dev/null @@ -1,58 +0,0 @@ -# From: https://sourceforge.net/p/openbabel/bugs/945/ -# Rotor tests fail on ppc architecture, because the checks for the expected value don't take into account the modulus. This patch should fix the issue. -# Author: Susi Lehtola -diff -up openbabel-2.3.2/include/openbabel/obutil.h.orig openbabel-2.3.2/include/openbabel/obutil.h ---- openbabel-2.3.2/include/openbabel/obutil.h.orig 2010-10-09 19:05:12.000000000 -0700 -+++ openbabel-2.3.2/include/openbabel/obutil.h 2014-10-16 16:35:49.050074389 -0700 -@@ -190,6 +190,8 @@ namespace OpenBabel - * \deprecated Use IsApprox() instead - */ - OBAPI bool IsNear(const double &, const double &, const double epsilon=2e-6); -+ //! Same but with comparison with a modulus -+ OBAPI bool IsNear_mod(const double &, const double &, const double & mod, const double epsilon=2e-6); - /*! "Safe" comparison for floats/doubles: true if a is less than epsilon - * This function really doesn't make any sense w.r.t. floating-point - * representation, so you should never use it. It is provided only for -diff -up openbabel-2.3.2/src/obutil.cpp.orig openbabel-2.3.2/src/obutil.cpp ---- openbabel-2.3.2/src/obutil.cpp.orig 2012-10-03 12:08:15.000000000 -0700 -+++ openbabel-2.3.2/src/obutil.cpp 2014-10-16 16:54:18.309740019 -0700 -@@ -77,6 +77,18 @@ namespace OpenBabel - return (fabs(a - b) < epsilon); - } - -+ //! Comparison for doubles with a modulus: returns mod(a - b,m) < epsilon -+ bool IsNear_mod(const double &a, const double &b, const double &m, const double epsilon) -+ { -+ double arg=a-b; -+ while(arg<-m/2) -+ arg+=m; -+ while(arg>=m/2) -+ arg-=m; -+ -+ return (fabs(arg) < epsilon); -+ } -+ - //! Comparison for doubles: returns fabs(a) < epsilon - bool IsNearZero(const double &a, const double epsilon) - { -diff -up openbabel-2.3.2/test/rotortest.cpp.orig openbabel-2.3.2/test/rotortest.cpp ---- openbabel-2.3.2/test/rotortest.cpp.orig 2011-10-12 13:24:02.000000000 -0700 -+++ openbabel-2.3.2/test/rotortest.cpp 2014-10-16 16:54:32.869985348 -0700 -@@ -74,7 +74,7 @@ void testOBRotorSetToAngle() - atoms[i] = (atoms[i] - 1) * 3; - rotor.SetRotAtoms(atoms); - -- OB_ASSERT(IsNear(fabs(RAD_TO_DEG * rotor.CalcTorsion(mol->GetCoordinates())), 180.0, 1.0)); -+ OB_ASSERT(IsNear_mod(fabs(RAD_TO_DEG * rotor.CalcTorsion(mol->GetCoordinates())), 180.0, 360.0, 1.0)); - - // rotate - rotor.SetToAngle(mol->GetCoordinates(), 60.0 * DEG_TO_RAD); -@@ -106,7 +106,7 @@ void testOBRotorSetRotor() - atoms[i] = (atoms[i] - 1) * 3; - rotor.SetRotAtoms(atoms); - -- OB_ASSERT(IsNear(fabs(RAD_TO_DEG * rotor.CalcTorsion(mol->GetCoordinates())), 180.0, 1.0)); -+ OB_ASSERT(IsNear_mod(fabs(RAD_TO_DEG * rotor.CalcTorsion(mol->GetCoordinates())), 180.0, 360.0, 1.0)); - rotor.SetToAngle(mol->GetCoordinates(), 60.0 * DEG_TO_RAD); - - // set torsion values diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb index 8d4c77f654..ce69b4afde 100644 --- a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-foss-2016a-Python-2.7.11.eb @@ -17,7 +17,7 @@ sources = [SOURCELOWER_TAR_GZ] patches = [ 'OpenBabel-%(version)s-fix-link-path-tests.patch', 'OpenBabel-%(version)s-ignore-failed-test.patch', - 'OpenBabel-%(version)s-comparison.patch', + 'OpenBabel-%(version)s-ignore-rotor-test.patch', ] builddependencies = [ diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-ignore-rotor-test.patch b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-ignore-rotor-test.patch new file mode 100644 index 0000000000..8783154988 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-ignore-rotor-test.patch @@ -0,0 +1,12 @@ +# The rotor tests fails, it is removed from the test set. +# Author: Ruben van Dijk (University of Groningen) +--- test/CMakeLists.txt.orig 2016-09-05 15:17:23.000000000 +0200 ++++ test/CMakeLists.txt 2016-09-05 15:17:38.000000000 +0200 +@@ -18,7 +18,6 @@ + implicitH + lssr + isomorphism +- rotor + shuffle + smiles + spectrophore -- GitLab From d20f3c7505b38798ffb1c0ab78b413481db6f4b4 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Mon, 5 Sep 2016 15:33:32 +0100 Subject: [PATCH 176/741] Python 3.5.2 with toolchain foss 2016.04 + deps --- .../a/Autoconf/Autoconf-2.69-foss-2016.04.eb | 26 ++++ .../a/Automake/Automake-1.15-foss-2016.04.eb | 33 +++++ .../Autotools-20150215-foss-2016.04.eb | 17 +++ .../b/bzip2/bzip2-1.0.6-foss-2016.04.eb | 16 +++ .../g/GMP/GMP-6.1.1-foss-2016.04.eb | 30 +++++ .../g/gettext/gettext-0.19.8-foss-2016.04.eb | 23 ++++ .../l/libffi/libffi-3.2.1-foss-2016.04.eb | 23 ++++ .../libreadline-6.3-foss-2016.04.eb | 32 +++++ .../l/libtool/libtool-2.4.6-foss-2016.04.eb | 17 +++ .../l/libxml2/libxml2-2.9.4-foss-2016.04.eb | 29 +++++ .../m/M4/M4-1.4.17-foss-2016.04.eb | 23 ++++ .../o/OpenSSL/OpenSSL-1.0.2h-foss-2016.04.eb | 19 +++ .../p/Python/Python-3.5.2-foss-2016.04.eb | 117 ++++++++++++++++++ .../s/SQLite/SQLite-3.13.0-foss-2016.04.eb | 40 ++++++ .../t/Tcl/Tcl-8.6.5-foss-2016.04.eb | 25 ++++ .../easyconfigs/t/Tk/Tk-8.6.5-foss-2016.04.eb | 26 ++++ .../easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb | 30 +++++ .../z/zlib/zlib-1.2.8-foss-2016.04.eb | 22 ++++ 18 files changed, 548 insertions(+) create mode 100644 easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/a/Automake/Automake-1.15-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/a/Autotools/Autotools-20150215-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/g/GMP/GMP-6.1.1-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/g/gettext/gettext-0.19.8-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/l/libffi/libffi-3.2.1-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/l/libreadline/libreadline-6.3-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/l/libtool/libtool-2.4.6-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/s/SQLite/SQLite-3.13.0-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/t/Tk/Tk-8.6.5-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb create mode 100644 easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb diff --git a/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-foss-2016.04.eb b/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-foss-2016.04.eb new file mode 100644 index 0000000000..94bbfc01ec --- /dev/null +++ b/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-foss-2016.04.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Autoconf' +version = '2.69' + +homepage = 'http://www.gnu.org/software/autoconf/' +description = """Autoconf is an extensible package of M4 macros that produce shell scripts + to automatically configure software source code packages. These scripts can adapt the + packages to many kinds of UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template file that lists the + operating system features that the package can use, in the form of M4 macro calls.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('M4', '1.4.17')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["autoconf", "autoheader", "autom4te", "autoreconf", "autoscan", + "autoupdate", "ifnames"]], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.15-foss-2016.04.eb b/easybuild/easyconfigs/a/Automake/Automake-1.15-foss-2016.04.eb new file mode 100644 index 0000000000..40213b047b --- /dev/null +++ b/easybuild/easyconfigs/a/Automake/Automake-1.15-foss-2016.04.eb @@ -0,0 +1,33 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'Automake' +version = "1.15" + +homepage = 'http://www.gnu.org/software/automake/automake.html' +description = "Automake: GNU Standards-compliant Makefile generator" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('Autoconf', '2.69')] + +sanity_check_paths = { + 'files': ['bin/automake', 'bin/aclocal'], + 'dirs': [] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/a/Autotools/Autotools-20150215-foss-2016.04.eb b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-foss-2016.04.eb new file mode 100644 index 0000000000..05ba2a5c75 --- /dev/null +++ b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-foss-2016.04.eb @@ -0,0 +1,17 @@ +easyblock = 'Bundle' + +name = 'Autotools' +version = '20150215' # date of the most recent change + +homepage = 'http://autotools.io' +description = """This bundle collect the standard GNU build tools: Autoconf, Automake and libtool""" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +dependencies = [ + ('Autoconf', '2.69'), # 20120424 + ('Automake', '1.15'), # 20150105 + ('libtool', '2.4.6'), # 20150215 +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-foss-2016.04.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-foss-2016.04.eb new file mode 100644 index 0000000000..deec24c55d --- /dev/null +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-foss-2016.04.eb @@ -0,0 +1,16 @@ +name = 'bzip2' +version = '1.0.6' + +homepage = 'http://www.bzip.org/' +description = """bzip2 is a freely available, patent free, high-quality data compressor. + It typically compresses files to within 10% to 15% of the best available techniques (the + PPM family of statistical compressors), whilst being around twice as fast at compression + and six times faster at decompression.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} +toolchainopts = {'pic': True} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://www.bzip.org/%(version)s'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.1.1-foss-2016.04.eb b/easybuild/easyconfigs/g/GMP/GMP-6.1.1-foss-2016.04.eb new file mode 100644 index 0000000000..81653e7d61 --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-6.1.1-foss-2016.04.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'GMP' +version = '6.1.1' + +homepage = 'http://gmplib.org/' +description = """GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + +toolchain = {'name': 'foss', 'version': '2016.04'} +toolchainopts = {'pic': True, 'precise': True} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://ftp.gnu.org/gnu/gmp'] + +builddependencies = [ + ('Autotools', '20150215'), +] + +# enable C++ interface +configopts = '--enable-cxx' + +runtest = 'check' + +sanity_check_paths = { + 'files': ['lib/libgmp.%s' % SHLIB_EXT, 'include/gmp.h'], + 'dirs': [], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.8-foss-2016.04.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.8-foss-2016.04.eb new file mode 100644 index 0000000000..47b250264e --- /dev/null +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.8-foss-2016.04.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'gettext' +version = '0.19.8' + +homepage = 'http://www.gnu.org/software/gettext/' +description = """GNU `gettext' is an important step for the GNU Translation Project, as it is an asset on which we may +build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools +and documentation""" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +sources = [SOURCE_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [ + ('libxml2', '2.9.4'), + ('ncurses', '6.0'), +] + +configopts = '--without-emacs --with-libxml2-prefix=$EBROOTLIBXML2' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.2.1-foss-2016.04.eb b/easybuild/easyconfigs/l/libffi/libffi-3.2.1-foss-2016.04.eb new file mode 100644 index 0000000000..37b990fbd3 --- /dev/null +++ b/easybuild/easyconfigs/l/libffi/libffi-3.2.1-foss-2016.04.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'libffi' +version = '3.2.1' + +homepage = 'http://sourceware.org/libffi/' +description = """The libffi library provides a portable, high level programming interface to various calling +conventions. This allows a programmer to call any function specified by a call interface description at run-time.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +source_urls = [ + 'ftp://sourceware.org/pub/libffi/', + 'http://www.mirrorservice.org/sites/sourceware.org/pub/libffi/', +] +sources = [SOURCELOWER_TAR_GZ] + +sanity_check_paths = { + 'files': [('lib/libffi.%s' % SHLIB_EXT, 'lib64/libffi.%s' % SHLIB_EXT), ('lib/libffi.a', 'lib64/libffi.a')], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-foss-2016.04.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-foss-2016.04.eb new file mode 100644 index 0000000000..14fbd4b55e --- /dev/null +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-foss-2016.04.eb @@ -0,0 +1,32 @@ +easyblock = 'ConfigureMake' + +name = 'libreadline' +version = '6.3' + +homepage = 'http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html' +description = """The GNU Readline library provides a set of functions for use by applications that + allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. + The Readline library includes additional functions to maintain a list of previously-entered command lines, + to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} +toolchainopts = {'pic': True} + +sources = ['readline-%(version)s.tar.gz'] +source_urls = ['http://ftp.gnu.org/gnu/readline'] + +patches = ['libreadline-%(version)s-bugfix.patch'] + +dependencies = [('ncurses', '6.0')] + +# for the termcap symbols, use EB ncurses +preconfigopts = "env LDFLAGS='-lncurses'" + +sanity_check_paths = { + 'files': ['lib/libreadline.a', 'lib/libhistory.a'] + + ['include/readline/%s' % x for x in ['chardefs.h', 'history.h', 'keymaps.h', 'readline.h', 'rlconf.h', + 'rlstdc.h', 'rltypedefs.h', 'tilde.h']], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libtool/libtool-2.4.6-foss-2016.04.eb b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-foss-2016.04.eb new file mode 100644 index 0000000000..bc63db0c69 --- /dev/null +++ b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-foss-2016.04.eb @@ -0,0 +1,17 @@ +easyblock = 'ConfigureMake' + +name = 'libtool' +version = '2.4.6' + +homepage = 'http://www.gnu.org/software/libtool' +description = """GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries + behind a consistent, portable interface.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [('M4', '1.4.17')] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb new file mode 100644 index 0000000000..32944c28ac --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb @@ -0,0 +1,29 @@ +easyblock = 'ConfigureMake' + +name = 'libxml2' +version = '2.9.4' + +homepage = 'http://xmlsoft.org/' +description = """Libxml2 is the XML C parser and +toolchain developed for the Gnome project + (but usable outside of the Gnome platform).""" + +toolchain = {'name': 'foss', 'version': '2016.04'} +toolchainopts = {'pic': True} + +source_urls = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' +] +sources = [SOURCELOWER_TAR_GZ] + +configopts = 'CC="$CC" CXX="$CXX" --with-pic --without-python --with-zlib=$EBROOTZLIB' + +dependencies = [('zlib', '1.2.8')] + +sanity_check_paths = { + 'files': [('lib/libxml2.a', 'lib64/libxml2.a'), ('lib/libxml2.%s' % SHLIB_EXT, 'lib64/libxml2.%s' % SHLIB_EXT)], + 'dirs': ['bin', 'include/libxml2/libxml'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb new file mode 100644 index 0000000000..ef1614fe9a --- /dev/null +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'M4' +version = '1.4.17' + +homepage = 'http://www.gnu.org/software/m4/m4.html' +description = """GNU M4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 compatible + although it has some extensions (for example, handling more than 9 positional parameters to macros). + GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" + +sanity_check_paths = { + 'files': ["bin/m4"], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-foss-2016.04.eb b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-foss-2016.04.eb new file mode 100644 index 0000000000..71a267bdce --- /dev/null +++ b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-foss-2016.04.eb @@ -0,0 +1,19 @@ +name = 'OpenSSL' +version = '1.0.2h' + +homepage = 'http://www.openssl.org/' +description = """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, + and Open Source toolchain implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) + protocols as well as a full-strength general purpose cryptography library. """ + +toolchain = {'name': 'foss', 'version': '2016.04'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.openssl.org/source/'] + +dependencies = [('zlib', '1.2.8')] + +runtest = 'test' + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb new file mode 100644 index 0000000000..89d653c10d --- /dev/null +++ b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb @@ -0,0 +1,117 @@ +name = 'Python' +version = '3.5.2' + +homepage = 'http://python.org/' +description = """Python is a programming language that lets you work more quickly + and integrate your systems more effectively.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} +toolchainopts = {'pic': True} + +source_urls = ['http://www.python.org/ftp/%(namelower)s/%(version)s/'] +sources = [SOURCE_TGZ] + +# python needs bzip2 to build the bz2 package +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libreadline', '6.3'), + ('ncurses', '6.0'), + ('SQLite', '3.13.0'), + ('Tk', '8.6.5'), # this requires a full X11 stack + ('GMP', '6.1.1'), + ('XZ', '5.2.2'), + ('libffi', '3.2.1'), + # OS dependency should be preferred if the os version is more recent then this version, + # it's nice to have an up to date openssl for security reasons + ('OpenSSL', '1.0.2h'), +] + +#osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +# order is important! +# package versions updated May 28th 2015 +exts_list = [ + ('setuptools', '23.1.0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/setuptools/'], + }), + ('pip', '8.1.2', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pip/'], + }), + ('nose', '1.3.7', { + 'source_urls': ['https://pypi.python.org/packages/source/n/nose/'], + }), + ('numpy', '1.11.1', { + 'source_urls': ['https://pypi.python.org/packages/source/n/numpy'], + 'patches': ['numpy-1.8.0-mkl.patch'], + }), + ('scipy', '0.17.1', { + 'source_urls': ['https://pypi.python.org/packages/source/s/scipy'], + }), + ('blist', '1.3.6', { + 'source_urls': ['https://pypi.python.org/packages/source/b/blist/'], + }), + ('mpi4py', '1.3.1', { + 'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'], + }), + ('paycheck', '1.0.2', { + 'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'], + }), + ('pbr', '1.10.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pbr/'], + }), + ('lockfile', '0.12.2', { + 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], + }), + ('Cython', '0.24', { + 'source_urls': ['https://pypi.python.org/packages/source/c/cython/'], + }), + ('six', '1.10.0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], + }), + ('dateutil', '2.5.3', { + 'source_tmpl': 'python-%(name)s-%(version)s.tar.gz', + 'source_urls': ['https://pypi.python.org/packages/source/p/python-dateutil/'], + }), + ('deap', '1.0.2', { + 'source_tmpl': '%(name)s-%(version)s.post2.tar.gz', + 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], + }), + ('decorator', '4.0.10', { + 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], + }), + ('arff', '2.1.0', { + 'source_tmpl': 'liac-%(name)s-%(version)s.zip', + 'source_urls': ['https://pypi.python.org/packages/source/l/liac-arff/'], + }), + ('pycrypto', '2.6.1', { + 'modulename': 'Crypto', + 'source_urls': ['http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/'], + }), + ('ecdsa', '0.13', { + 'source_urls': ['https://pypi.python.org/packages/source/e/ecdsa/'], + }), + ('cryptography', '1.4', { + 'source_urls': ['https://pypi.python.org/packages/source/c/cryptography/'], + }), + ('paramiko', '2.0.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/paramiko/'], + }), + ('pyparsing', '2.1.5', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pyparsing/'], + }), + ('netifaces', '0.10.4', { + 'source_urls': ['https://pypi.python.org/packages/source/n/netifaces'], + }), + ('netaddr', '0.7.18', { + 'source_urls': ['https://pypi.python.org/packages/source/n/netaddr'], + }), + ('pandas', '0.18.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pandas'], + }), + ('virtualenv', '15.0.2', { + 'source_urls': ['https://pypi.python.org/packages/source/v/virtualenv'], + }), +] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/s/SQLite/SQLite-3.13.0-foss-2016.04.eb b/easybuild/easyconfigs/s/SQLite/SQLite-3.13.0-foss-2016.04.eb new file mode 100644 index 0000000000..ee0989cdf4 --- /dev/null +++ b/easybuild/easyconfigs/s/SQLite/SQLite-3.13.0-foss-2016.04.eb @@ -0,0 +1,40 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'SQLite' +version = '3.13.0' + +homepage = 'http://www.sqlite.org/' +description = 'SQLite: SQL Database Engine in a C Library' + +toolchain = {'name': 'foss', 'version': '2016.04'} + +source_urls = ['http://www.sqlite.org/2016/'] +version_minor_etc = version.split('.')[1:] +version_minor_etc += '0' * (3 - len(version_minor_etc)) +version_str = '%(version_major)s' + ''.join('%02d' % int(x) for x in version_minor_etc) +sources = ['sqlite-autoconf-%s.tar.gz' % version_str] + +dependencies = [ + ('libreadline', '6.3'), + ('Tcl', '8.6.5'), +] + +sanity_check_paths = { + 'files': ['bin/sqlite3', 'include/sqlite3ext.h', 'include/sqlite3.h', 'lib/libsqlite3.a', + 'lib/libsqlite3.%s' % SHLIB_EXT], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb new file mode 100644 index 0000000000..c3516cdb44 --- /dev/null +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'Tcl' +version = '8.6.5' + +homepage = 'http://www.tcl.tk/' +description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, +suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads EXTRA_INSTALL="install-private-headers"' + +runtest = 'test' + +start_dir = 'unix' + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.5-foss-2016.04.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.5-foss-2016.04.eb new file mode 100644 index 0000000000..5587e8e8dc --- /dev/null +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.5-foss-2016.04.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Tk' +version = '8.6.5' + +homepage = 'http://www.tcl.tk/' +description = """Tk is an open source, cross-platform widget toolchain that provides a library of basic elements for + building a graphical user interface (GUI) in many different programming languages.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +patches = ['Tk-8.6.4_different-prefix-with-tcl.patch'] + +dependencies = [ + ('Tcl', version), + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib CFLAGS="-I$EBROOTTCL/include"' + +start_dir = 'unix' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb new file mode 100644 index 0000000000..0faab98c7c --- /dev/null +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'XZ' +version = '5.2.2' + +homepage = 'http://tukaani.org/xz/' +description = "xz: XZ utilities" + +toolchain = {'name': 'foss', 'version': '2016.04'} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://tukaani.org/xz/'] + +builddependencies = [ + ('Autotools', '20150215'), +] + +dependencies = [ + ('gettext', '0.19.8'), +] + +# may become useful in non-x86 archs +#configopts = ' --disable-assembler ' + +sanity_check_paths = { + 'files': ["bin/xz", "bin/lzmainfo"], + 'dirs': [] +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb new file mode 100644 index 0000000000..042a9bef50 --- /dev/null +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'zlib' +version = '1.2.8' + +homepage = 'http://www.zlib.net/' +description = """zlib is designed to be a free, general-purpose, legally unencumbered + -- that is, not covered by any patents -- lossless data-compression library for use + on virtually any computer hardware and operating system.""" + +toolchain = {'name': 'foss', 'version': '2016.04'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] + +sanity_check_paths = { + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.so'], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From b9af80f1e16141231d5d2f8cbe628ea6aad6677b Mon Sep 17 00:00:00 2001 From: Appmaint Date: Mon, 5 Sep 2016 15:41:58 +0100 Subject: [PATCH 177/741] Comment out OpenSSL --- easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb index 89d653c10d..2581a2015d 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb @@ -24,10 +24,10 @@ dependencies = [ ('libffi', '3.2.1'), # OS dependency should be preferred if the os version is more recent then this version, # it's nice to have an up to date openssl for security reasons - ('OpenSSL', '1.0.2h'), + #('OpenSSL', '1.0.2h'), ] -#osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] # order is important! # package versions updated May 28th 2015 -- GitLab From 664907be3506c1a5a0de279207606ca56f883131 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Mon, 5 Sep 2016 16:20:39 +0100 Subject: [PATCH 178/741] foss 2016.09 experimental toolchain --- .../f/FFTW/FFTW-3.3.5-gompi-2016.09.eb | 34 +++++++++++++ easybuild/easyconfigs/f/foss/foss-2016.09.eb | 35 +++++++++++++ .../easyconfigs/g/gompi/gompi-2016.09.eb | 20 ++++++++ .../easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb | 18 +++++++ .../h/hwloc/hwloc-1.11.4-GCC-6.2.0-2.27.eb | 23 +++++++++ .../numactl/numactl-2.0.11-GCC-6.2.0-2.27.eb | 23 +++++++++ ...nBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb | 49 +++++++++++++++++++ .../o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb | 42 ++++++++++++++++ ...pi-2016.09-OpenBLAS-0.2.19-LAPACK-3.6.1.eb | 25 ++++++++++ 9 files changed, 269 insertions(+) create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb create mode 100644 easybuild/easyconfigs/f/foss/foss-2016.09.eb create mode 100644 easybuild/easyconfigs/g/gompi/gompi-2016.09.eb create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb create mode 100644 easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-GCC-6.2.0-2.27.eb create mode 100644 easybuild/easyconfigs/n/numactl/numactl-2.0.11-GCC-6.2.0-2.27.eb create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb create mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.09-OpenBLAS-0.2.19-LAPACK-3.6.1.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb new file mode 100644 index 0000000000..624cde1f79 --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'FFTW' +version = '3.3.5' + +homepage = 'http://www.fftw.org' +description = """FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) + in one or more dimensions, of arbitrary input size, and of both real and complex data.""" + +toolchain = {'name': 'gompi', 'version': '2016.09'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [homepage] + +common_configopts = "--enable-threads --enable-openmp --with-pic" + +configopts = [ + common_configopts + " --enable-single --enable-sse2 --enable-mpi", + common_configopts + " --enable-long-double --enable-mpi", + common_configopts + " --enable-quad-precision", + common_configopts + " --enable-sse2 --enable-mpi", # default as last +] + +sanity_check_paths = { + 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom', 'q-wisdom']] + + ['include/fftw3%s' % x for x in ['-mpi.f03', '-mpi.h', '.f', '.f03', + '.h', 'l-mpi.f03', 'l.f03', 'q.f03']] + + ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']] + + ['lib/libfftw3q.a', 'lib/libfftw3q_omp.a'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/f/foss/foss-2016.09.eb b/easybuild/easyconfigs/f/foss/foss-2016.09.eb new file mode 100644 index 0000000000..89b1d45732 --- /dev/null +++ b/easybuild/easyconfigs/f/foss/foss-2016.09.eb @@ -0,0 +1,35 @@ +easyblock = 'Toolchain' + +name = 'foss' +version = '2016.09' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolchain, including + OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +gccver = '6.2.0-2.27' + +blaslib = 'OpenBLAS' +blasver = '0.2.19' +blas = '%s-%s' % (blaslib, blasver) +blassuff = '-LAPACK-3.6.1' + +# toolchain used to build foss dependencies +comp_mpi_tc_name = 'gompi' +comp_mpi_tc = (comp_mpi_tc_name, version) + +# compiler toolchain depencies +# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain +# because of toolchain preperation functions +# For binutils, stick to http://wiki.osdev.org/Cross-Compiler_Successful_Builds +dependencies = [ + ('GCC', gccver), + ('OpenMPI', '2.0.1', '', ('GCC', gccver)), + (blaslib, blasver, blassuff, comp_mpi_tc), + ('FFTW', '3.3.5', '', comp_mpi_tc), + ('ScaLAPACK', '2.0.2', '-%s%s' % (blas, blassuff), comp_mpi_tc) +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/g/gompi/gompi-2016.09.eb b/easybuild/easyconfigs/g/gompi/gompi-2016.09.eb new file mode 100644 index 0000000000..b4350de73a --- /dev/null +++ b/easybuild/easyconfigs/g/gompi/gompi-2016.09.eb @@ -0,0 +1,20 @@ +easyblock = "Toolchain" + +name = 'gompi' +version = '2016.09' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolchain, +including OpenMPI for MPI support.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +gccver = '6.2.0-2.27' + +# compiler toolchain dependencies +dependencies = [ + ('GCC', gccver), # includes both GCC and binutils + ('OpenMPI', '2.0.1', '', ('GCC', gccver)), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb new file mode 100644 index 0000000000..4237ac091d --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'foss', 'version': '2016.09'} +toolchainopts = {'optarch': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-GCC-6.2.0-2.27.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-GCC-6.2.0-2.27.eb new file mode 100644 index 0000000000..35ced3699b --- /dev/null +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-GCC-6.2.0-2.27.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'hwloc' +version = '1.11.4' + +homepage = 'http://www.open-mpi.org/projects/hwloc/' +description = """The Portable Hardware Locality (hwloc) software package provides a portable abstraction +(across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including +NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various +system attributes such as cache and memory information as well as the locality of I/O devices such as +network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering +information about modern computing hardware so as to exploit it accordingly and efficiently.""" + +toolchain = {'name': 'GCC', 'version': '6.2.0-2.27'} + +source_urls = ['http://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] +sources = [SOURCE_TAR_GZ] + +dependencies = [('numactl', '2.0.11')] + +configopts = "--enable-libnuma=$EBROOTNUMACTL" + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/n/numactl/numactl-2.0.11-GCC-6.2.0-2.27.eb b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-GCC-6.2.0-2.27.eb new file mode 100644 index 0000000000..7d6ccf3999 --- /dev/null +++ b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-GCC-6.2.0-2.27.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'numactl' +version = '2.0.11' + +homepage = 'http://oss.sgi.com/projects/libnuma/' +description = """The numactl program allows you to run your application program on specific cpu's and memory nodes. +It does this by supplying a NUMA memory policy to the operating system before running your program. +The libnuma library provides convenient ways for you to add NUMA memory policies into your own program.""" + +toolchain = {'name': 'GCC', 'version': '6.2.0-2.27'} + +source_urls = ['ftp://oss.sgi.com/www/projects/libnuma/download/'] +sources = [SOURCE_TAR_GZ] + +checksums = ['d3bc88b7ddb9f06d60898f4816ae9127'] + +sanity_check_paths = { + 'files': ['bin/numactl', 'bin/numastat', 'lib/libnuma.%s' % SHLIB_EXT, 'lib/libnuma.a'], + 'dirs': ['share/man', 'include'] +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb new file mode 100644 index 0000000000..32b66ddad1 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb @@ -0,0 +1,49 @@ +easyblock = 'ConfigureMake' + +name = 'OpenBLAS' +version = '0.2.19' + +lapackver = '3.6.1' +versionsuffix = '-LAPACK-%s' % lapackver + +homepage = 'http://xianyi.github.com/OpenBLAS/' +description = """OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.""" + +toolchain = {'name': 'gompi', 'version': '2016.09'} + +lapack_src = 'lapack-%s.tgz' % lapackver +large_src = 'large.tgz' +timing_src = 'timing.tgz' +sources = [ + 'v%(version)s.tar.gz', + lapack_src, + large_src, + timing_src, +] +source_urls = [ + # order matters, trying to download the LAPACK tarball from GitHub causes trouble + "http://www.netlib.org/lapack/", + "http://www.netlib.org/lapack/timing/", + "https://github.com/xianyi/OpenBLAS/archive/", +] + +patches = [ + (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir + (large_src, '.'), + (timing_src, '.'), +] + +skipsteps = ['configure'] + +threading = 'USE_THREAD=1' +buildopts = 'BINARY=64 ' + threading + ' CC="$CC" FC="$F77"' +installopts = threading + " PREFIX=%(installdir)s" + +sanity_check_paths = { + 'files': ['include/cblas.h', 'include/f77blas.h', 'include/lapacke_config.h', 'include/lapacke.h', + 'include/lapacke_mangling.h', 'include/lapacke_utils.h', 'include/openblas_config.h', + 'lib/libopenblas.a', 'lib/libopenblas.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb new file mode 100644 index 0000000000..ee1f9a9554 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb @@ -0,0 +1,42 @@ +easyblock = 'ConfigureMake' + +name = 'OpenMPI' +version = '2.0.1' + +homepage = 'http://www.open-mpi.org/' +description = """The Open MPI Project is an open source MPI-2 implementation.""" + +toolchain = {'name': 'GCC', 'version': '6.2.0-2.27'} + +sources = [SOURCELOWER_TAR_GZ] + +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] + +dependencies = [('hwloc', '1.11.4')] + +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' +configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path +configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support +configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading +configopts += '--with-tm=/usr/local/packages/adaptive/torque ' # we want torque support as well + +# Add in support for hardware from Mellanox OFED +configopts += '--with-mxm=/opt/mellanox/mxm ' +configopts += '--with-fca=/opt/mellanox/fca ' +#configopts += '--with-hcoll=/opt/mellanox/hcoll ' +configopts += '--with-knem=/opt/knem-1.1.2.90mlnx1 ' # knem comes from Mellanox OFED +configopts += '--with-platform=contrib/platform/mellanox/optimized ' + +# needed for --with-verbs +osdependencies = [('libibverbs-dev', 'libibverbs-devel'), ('libpciaccess-devel'), ('libudev-devel', 'systemd-devel'),] + +libs = ["mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte"] + +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], + 'dirs': ["include/openmpi/ompi/mpi/c"], +} + +moduleclass = 'mpi' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.09-OpenBLAS-0.2.19-LAPACK-3.6.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.09-OpenBLAS-0.2.19-LAPACK-3.6.1.eb new file mode 100644 index 0000000000..8fcb8f6610 --- /dev/null +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-2016.09-OpenBLAS-0.2.19-LAPACK-3.6.1.eb @@ -0,0 +1,25 @@ +name = 'ScaLAPACK' +version = '2.0.2' + +homepage = 'http://www.netlib.org/scalapack/' +description = """The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines + redesigned for distributed memory MIMD parallel computers.""" + +toolchain = {'name': 'gompi', 'version': '2016.09'} +toolchainopts = {'pic': True} + +source_urls = [homepage] +sources = [SOURCELOWER_TGZ] + +blaslib = 'OpenBLAS' +blasver = '0.2.19' +blassuff = '-LAPACK-3.6.1' + +versionsuffix = "-%s-%s%s" % (blaslib, blasver, blassuff) + +dependencies = [(blaslib, blasver, blassuff)] + +# parallel build tends to fail, so disabling it +parallel = 1 + +moduleclass = 'numlib' -- GitLab From 43fba03218f09cbb324ce2733bf1efaa0e837a1e Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 6 Sep 2016 09:41:38 +0200 Subject: [PATCH 179/741] Bump Mesa to 12.0.2 --- .../{Mesa-12.0.1-intel-2016b.eb => Mesa-12.0.2-intel-2016b.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/m/Mesa/{Mesa-12.0.1-intel-2016b.eb => Mesa-12.0.2-intel-2016b.eb} (99%) diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb similarity index 99% rename from easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb rename to easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb index 821ca3a0b7..52daa51051 100644 --- a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.1-intel-2016b.eb +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb @@ -8,7 +8,7 @@ easyblock = 'ConfigureMake' name = 'Mesa' -version = '12.0.1' +version = '12.0.2' homepage = 'http://www.mesa3d.org/' description = """Mesa is an open-source implementation of the OpenGL specification - -- GitLab From 395fed43239f30aabbb67a6900d23931b38d992c Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 6 Sep 2016 09:44:56 +0200 Subject: [PATCH 180/741] Bump libGLU to new mesa too --- easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb b/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb index 1bfa6744b9..51bb338e1e 100644 --- a/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb +++ b/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb @@ -13,7 +13,7 @@ source_urls = ['ftp://ftp.freedesktop.org/pub/mesa/glu/'] sources = ['glu-%(version)s.tar.bz2'] dependencies = [ - ('Mesa', '12.0.1'), + ('Mesa', '12.0.2'), ] sanity_check_paths = { -- GitLab From 49a2f04d727d8d5277c70474964b794ac2434e74 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 6 Sep 2016 09:47:14 +0200 Subject: [PATCH 181/741] Bump to Mesa/12.0.2 --- easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb | 2 +- .../easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb b/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb index 1bfa6744b9..51bb338e1e 100644 --- a/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb +++ b/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-intel-2016b.eb @@ -13,7 +13,7 @@ source_urls = ['ftp://ftp.freedesktop.org/pub/mesa/glu/'] sources = ['glu-%(version)s.tar.bz2'] dependencies = [ - ('Mesa', '12.0.1'), + ('Mesa', '12.0.2'), ] sanity_check_paths = { diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb index 1b7e04902f..351d316159 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb @@ -16,7 +16,7 @@ sources = ["ParaView-v%(version)s.tar.gz"] dependencies = [ ('X11', '20160819'), - ('Mesa', '12.0.1'), + ('Mesa', '12.0.2'), ('libGLU', '9.0.0'), ('Qt', '4.8.7'), ('zlib', '1.2.8'), -- GitLab From 6385ff59c6e5ce8ed6423d53bf48dc5cf06b749c Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 6 Sep 2016 09:55:14 +0200 Subject: [PATCH 182/741] Removed GCCcore subtoolchain from Autotools dependency, as using --minimal-toolchains will use subtoolchains automatically. --- easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb b/easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb index 6dd4849514..b4e90a24ee 100644 --- a/easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb +++ b/easybuild/easyconfigs/g/gperftools/gperftools-2.5-foss-2016a.eb @@ -13,7 +13,7 @@ toolchain = {'name': 'foss', 'version': '2016a'} sources = [SOURCE_TAR_GZ] source_urls = ['https://github.com/gperftools/gperftools/releases/download/%(namelower)s-%(version)s'] -builddependencies = [('Autotools', '20150215', '', ('GCCcore', '4.9.3'))] +builddependencies = [('Autotools', '20150215')] dependencies = [('libunwind', '1.1')] sanity_check_paths = { -- GitLab From fef877d53be783cf0d7683116d9cf82dd0b38fbf Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 6 Sep 2016 10:04:58 +0200 Subject: [PATCH 183/741] Fix remarks --- .../easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch | 1 + .../p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch index 206f7ae1ae..f02824071e 100644 --- a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch +++ b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-use-doubles.patch @@ -1,4 +1,5 @@ # Use double for floating point (64 bit) in METIS by default +# OpenFOAM 4 uses doubles be default diff -ur metis-5.1.0.orig/include/metis.h metis-5.1.0/include/metis.h --- metis-5.1.0.orig/include/metis.h 2013-03-30 17:24:45.000000000 +0100 +++ metis-5.1.0/include/metis.h 2016-09-05 11:39:33.004384533 +0200 diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb index 351d316159..59f802689e 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-5.1.2-intel-2016b-mpi.eb @@ -29,13 +29,15 @@ builddependencies = [('CMake', '3.6.1')] separate_build_dir = True configopts = '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_OPENGL_HAS_OSMESA=ON -DPARAVIEW_USE_MPI=ON ' -configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.so ' -configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' -configopts += '-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.so ' +configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s ' % SHLIB_EXT +configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.%s ' % SHLIB_EXT +configopts += '-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s ' % SHLIB_EXT configopts += '-DVTK_USE_SYSTEM_HDF5=ON -DPARAVIEW_ENABLE_PYTHON=ON -DBUILD_SHARED_LIBS=ON ' +# if you want to build server only Paraview, uncomment the following line: +# configopts += '-DVTK_USE_X=OFF ' + # Without internet connection turn off testing (uncomment the following line) configopts += '-DBUILD_TESTING=OFF ' -#configopts += '-DVTK_USE_X=OFF ' # Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md # and download ExternalData to $EASYBUILD_SOURCEPATH and adjust -DExternalData_OBJECT_STORES accordingly # Without internet connection, comment the following two lines (configopts and prebuildopts) -- GitLab From d0b90114b4bcb1642f045b95066aec3123f0cfad Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 6 Sep 2016 10:23:47 +0200 Subject: [PATCH 184/741] Don't use oparch in Mesa It builds a part that only works for AVX or AVX2, so don't force -xHost on it (it will cause failures). --- easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb index 52daa51051..dd4fd96df3 100644 --- a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb @@ -15,6 +15,7 @@ description = """Mesa is an open-source implementation of the OpenGL specificati a system for rendering interactive 3D graphics.""" toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'optarch': False} sources = [SOURCELOWER_TAR_XZ] source_urls = [ -- GitLab From 8dcac2a9dc40b4bd7bd7bfb646ce94f2c691da69 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 6 Sep 2016 10:54:01 +0200 Subject: [PATCH 185/741] Add comment --- easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb index dd4fd96df3..90fd4b0810 100644 --- a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-intel-2016b.eb @@ -15,6 +15,8 @@ description = """Mesa is an open-source implementation of the OpenGL specificati a system for rendering interactive 3D graphics.""" toolchain = {'name': 'intel', 'version': '2016b'} +# swr detects and builds parts specific for AVX and AVX2. If we use +# -xHost, this always gets overwritten and will fail. toolchainopts = {'optarch': False} sources = [SOURCELOWER_TAR_XZ] -- GitLab From 4397e35f4d220d669b08196ac8203b28dcf37a9c Mon Sep 17 00:00:00 2001 From: Appmaint Date: Tue, 6 Sep 2016 10:06:17 +0100 Subject: [PATCH 186/741] Removed site-specifics and dropped optarch --- .../easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb | 2 +- .../o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb index 624cde1f79..95601b61f5 100644 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016.09.eb @@ -8,7 +8,7 @@ description = """FFTW is a C subroutine library for computing the discrete Fouri in one or more dimensions, of arbitrary input size, and of both real and complex data.""" toolchain = {'name': 'gompi', 'version': '2016.09'} -toolchainopts = {'optarch': True, 'pic': True} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = [homepage] diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb index ee1f9a9554..67deb43507 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb @@ -18,20 +18,11 @@ configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading -configopts += '--with-tm=/usr/local/packages/adaptive/torque ' # we want torque support as well - -# Add in support for hardware from Mellanox OFED -configopts += '--with-mxm=/opt/mellanox/mxm ' -configopts += '--with-fca=/opt/mellanox/fca ' -#configopts += '--with-hcoll=/opt/mellanox/hcoll ' -configopts += '--with-knem=/opt/knem-1.1.2.90mlnx1 ' # knem comes from Mellanox OFED -configopts += '--with-platform=contrib/platform/mellanox/optimized ' # needed for --with-verbs -osdependencies = [('libibverbs-dev', 'libibverbs-devel'), ('libpciaccess-devel'), ('libudev-devel', 'systemd-devel'),] +osdependencies = [('libibverbs-dev', 'libibverbs-devel'),] libs = ["mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte"] - sanity_check_paths = { 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + -- GitLab From e86657a175b7d40e8a90cf19b7e578c342c8c84d Mon Sep 17 00:00:00 2001 From: Appmaint Date: Tue, 6 Sep 2016 10:12:05 +0100 Subject: [PATCH 187/741] Dropped optarch in HPL --- easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb index 4237ac091d..be4db4593e 100644 --- a/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-foss-2016.09.eb @@ -7,7 +7,7 @@ description = """HPL is a software package that solves a (random) dense linear s High Performance Computing Linpack Benchmark.""" toolchain = {'name': 'foss', 'version': '2016.09'} -toolchainopts = {'optarch': True, 'usempi': True} +toolchainopts = {'usempi': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] -- GitLab From a5af53150f793b37c26a66fdb5e2093711c43e40 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Tue, 6 Sep 2016 10:21:40 +0100 Subject: [PATCH 188/741] Made requested changes --- .../easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb | 9 --------- easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb index 32944c28ac..645a9c0d23 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb @@ -1,5 +1,3 @@ -easyblock = 'ConfigureMake' - name = 'libxml2' version = '2.9.4' @@ -17,13 +15,6 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -configopts = 'CC="$CC" CXX="$CXX" --with-pic --without-python --with-zlib=$EBROOTZLIB' - dependencies = [('zlib', '1.2.8')] -sanity_check_paths = { - 'files': [('lib/libxml2.a', 'lib64/libxml2.a'), ('lib/libxml2.%s' % SHLIB_EXT, 'lib64/libxml2.%s' % SHLIB_EXT)], - 'dirs': ['bin', 'include/libxml2/libxml'], -} - moduleclass = 'lib' diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb index 042a9bef50..a484ded000 100644 --- a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-foss-2016.04.eb @@ -15,7 +15,7 @@ sources = [SOURCELOWER_TAR_GZ] source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] sanity_check_paths = { - 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.so'], + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.%s' % SHLIB_EXT], 'dirs': [], } -- GitLab From 8d370dd66c539610d436ff881362dcb50f855ee1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 11:24:13 +0200 Subject: [PATCH 189/741] bump IronPython to 2.7.4 --- ...4.1.13-g4fb2552.eb => IronPython-2.7.4-ictce-4.1.13.eb} | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename easybuild/easyconfigs/i/IronPython/{IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb => IronPython-2.7.4-ictce-4.1.13.eb} (71%) diff --git a/easybuild/easyconfigs/i/IronPython/IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb b/easybuild/easyconfigs/i/IronPython/IronPython-2.7.4-ictce-4.1.13.eb similarity index 71% rename from easybuild/easyconfigs/i/IronPython/IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb rename to easybuild/easyconfigs/i/IronPython/IronPython-2.7.4-ictce-4.1.13.eb index fb3ff7bded..7b6a5a5013 100644 --- a/easybuild/easyconfigs/i/IronPython/IronPython-2.7-0-ictce-4.1.13-g4fb2552.eb +++ b/easybuild/easyconfigs/i/IronPython/IronPython-2.7.4-ictce-4.1.13.eb @@ -1,6 +1,5 @@ name = 'IronPython' -version = '2.7-0' -versionsuffix = '-g4fb2552' +version = '2.7.4' homepage = 'http://ironpython.net/' description = """IronPython is an open-source implementation of the Python programming language @@ -9,8 +8,8 @@ Python libraries, and other .NET languages can use Python code just as easily."" toolchain = {'name': 'ictce', 'version': '4.1.13'} -# download via https://github.com/IronLanguages/main/releases -sources = ['IronLanguages-main-ipy-%(version)s%(versionsuffix)s.tar.gz'] +source_urls = ['https://github.com/IronLanguages/main/archive/'] +sources = ['ipy-%(version)s.tar.gz'] dependencies = [('Mono', '2.10.6')] -- GitLab From 2bed2ec6925c5d98bd08c1789070e23724eb5cc5 Mon Sep 17 00:00:00 2001 From: Appmaint Date: Tue, 6 Sep 2016 10:27:40 +0100 Subject: [PATCH 190/741] Fixed sanity check --- easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb index 67deb43507..aeb2a52e4c 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-GCC-6.2.0-2.27.eb @@ -27,7 +27,7 @@ sanity_check_paths = { 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], - 'dirs': ["include/openmpi/ompi/mpi/c"], + 'dirs': [], } moduleclass = 'mpi' -- GitLab From dcda585c1c6b4ce34e11e2bbe55faa2e5a5854b7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 11:35:11 +0200 Subject: [PATCH 191/741] stick to IronPython 2.7, since that works --- ...n-2.7.4-ictce-4.1.13.eb => IronPython-2.7-ictce-4.1.13.eb} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename easybuild/easyconfigs/i/IronPython/{IronPython-2.7.4-ictce-4.1.13.eb => IronPython-2.7-ictce-4.1.13.eb} (90%) diff --git a/easybuild/easyconfigs/i/IronPython/IronPython-2.7.4-ictce-4.1.13.eb b/easybuild/easyconfigs/i/IronPython/IronPython-2.7-ictce-4.1.13.eb similarity index 90% rename from easybuild/easyconfigs/i/IronPython/IronPython-2.7.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/i/IronPython/IronPython-2.7-ictce-4.1.13.eb index 7b6a5a5013..147957947e 100644 --- a/easybuild/easyconfigs/i/IronPython/IronPython-2.7.4-ictce-4.1.13.eb +++ b/easybuild/easyconfigs/i/IronPython/IronPython-2.7-ictce-4.1.13.eb @@ -1,7 +1,7 @@ name = 'IronPython' -version = '2.7.4' +version = '2.7' -homepage = 'http://ironpython.net/' +homepage = 'http://ironpython.net/' description = """IronPython is an open-source implementation of the Python programming language which is tightly integrated with the .NET Framework. IronPython can use the .NET Framework and Python libraries, and other .NET languages can use Python code just as easily.""" -- GitLab From 09a09e45c73a793776d365b6d7aecb5682ebcc01 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 6 Sep 2016 11:52:46 +0200 Subject: [PATCH 192/741] Fix Qt5 for RHEL 6.x --- easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb index 0710553732..589ca4e25a 100644 --- a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb +++ b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016b.eb @@ -20,6 +20,9 @@ builddependencies = [ ('pkg-config', '0.29.1'), ] +# qtgamepad needs recent kernel/libevdev (fails on RHEL 6.x) +configopts = '-skip qtgamepad' + dependencies = [ ('GLib', '2.49.5'), ('libpng', '1.6.24'), -- GitLab From 9699daf62ce5ab197d76314fb5ada18870212f83 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 12:32:13 +0200 Subject: [PATCH 193/741] bump to Bison 2.7, don't force parallel=1 in Mono easyconfig --- easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb b/easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb index 05e81f5396..2971b15c53 100644 --- a/easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb +++ b/easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb @@ -21,10 +21,8 @@ sources = [ ] builddependencies = [ - ('Bison', '2.6.5'), + ('Bison', '2.7'), ('gettext', '0.18.2'), ] -parallel = 1 - moduleclass = 'lang' -- GitLab From ad963b925ffe5f1a59d35e266acf8a66ffc56f9d Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 6 Sep 2016 12:46:49 +0200 Subject: [PATCH 194/741] Version of ATK built using the foss 2016a toolchain. --- .../a/ATK/ATK-2.20.0-foss-2016a.eb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/a/ATK/ATK-2.20.0-foss-2016a.eb diff --git a/easybuild/easyconfigs/a/ATK/ATK-2.20.0-foss-2016a.eb b/easybuild/easyconfigs/a/ATK/ATK-2.20.0-foss-2016a.eb new file mode 100644 index 0000000000..0f7c93a41d --- /dev/null +++ b/easybuild/easyconfigs/a/ATK/ATK-2.20.0-foss-2016a.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'ATK' +version = '2.20.0' + +homepage = 'https://developer.gnome.org/ATK/stable/' +description = """ + ATK provides the set of accessibility interfaces that are implemented by other + toolkits and applications. Using the ATK interfaces, accessibility tools have + full access to view and control running applications. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('GLib', '2.48.0'), + ('GObject-Introspection', '1.48.0') +] + +configopts = "--enable-introspection=yes" + +modextrapaths = { + 'XDG_DATA_DIRS': 'share', +} + +sanity_check_paths = { + 'files': ['lib/libatk-1.0.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'vis' -- GitLab From 57fb2ba7ef129879def2e7e16acaeba677d8c6de Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 12:59:02 +0200 Subject: [PATCH 195/741] disable qtgamepad in Qt5 easyconfig --- easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb index 82e71ce75d..a387649d5b 100644 --- a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb +++ b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-intel-2016a.eb @@ -50,4 +50,7 @@ dependencies = [ ('libGLU', '9.0.0', '-Mesa-11.2.1'), ] +# qtgamepad needs recent kernel/libevdev (fails on RHEL 6.x) +configopts = '-skip qtgamepad' + moduleclass = 'devel' -- GitLab From c9a428c70cb3923aad04982890712d89fc490959 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 13:00:48 +0200 Subject: [PATCH 196/741] disable qtgamepad in Qt5 easyconfig --- easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb index 50c78a140e..1ccc867425 100644 --- a/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb +++ b/easybuild/easyconfigs/q/Qt5/Qt5-5.7.0-foss-2016a.eb @@ -50,4 +50,7 @@ dependencies = [ ('libGLU', '9.0.0', '-Mesa-11.2.1'), ] -moduleclass = 'devel' \ No newline at end of file +# qtgamepad needs recent kernel/libevdev (fails on RHEL 6.x) +configopts = '-skip qtgamepad' + +moduleclass = 'devel' -- GitLab From c6ccbcc81a5048e7eafe6833746af2e6f3eacd17 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 13:24:59 +0200 Subject: [PATCH 197/741] remove irrelevant comment in log4cplus easyconfigs --- .../easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb | 1 - easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb | 1 - 2 files changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb index e88e8c2f72..9606b8555d 100755 --- a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb @@ -10,7 +10,6 @@ toolchain = {'name': 'ictce', 'version': '5.5.0'} source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCE_TAR_GZ] -# make sure the gzip, gunzip and compress binaries are available after installation sanity_check_paths = { 'files': ["lib/liblog4cplus.a", "lib/liblog4cplus.so"], 'dirs': ["include/log4cplus"], diff --git a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb index f5511eacf6..ddd6f60ebf 100755 --- a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb @@ -10,7 +10,6 @@ toolchain = {'name': 'ictce', 'version': '5.5.0'} source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCE_TAR_GZ] -# make sure the gzip, gunzip and compress binaries are available after installation sanity_check_paths = { 'files': ["lib/liblog4cplus.a", "lib/liblog4cplus.so"], 'dirs': ["include/log4cplus"], -- GitLab From ba419506c0aae956a71fc48a263263889f376903 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 13:26:11 +0200 Subject: [PATCH 198/741] add missing easyblock spec --- .../easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb | 2 ++ .../easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb index 9606b8555d..af8ebb2524 100755 --- a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.0.4.3-ictce-5.5.0.eb @@ -1,3 +1,5 @@ +easyblock = 'ConfigureMake' + name = 'log4cplus' version = '1.0.4.3' diff --git a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb index ddd6f60ebf..bdb9d13739 100755 --- a/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/l/log4cplus/log4cplus-1.1.2-ictce-5.5.0.eb @@ -1,3 +1,5 @@ +easyblock = 'ConfigureMake' + name = 'log4cplus' version = '1.1.2' -- GitLab From 6246c832300e1b0705eb73209f19e097ba54f6c8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 13:27:00 +0200 Subject: [PATCH 199/741] add missing easyblock spec, use buildopts --- .../easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb b/easybuild/easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb index 3218a6e11d..e96e5e3b33 100755 --- a/easybuild/easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/f/FFindex/FFindex-0.9.9-goolf-1.4.10.eb @@ -1,5 +1,7 @@ -name = "FFindex" -version = "0.9.9" +easyblock = 'ConfigureMake' + +name = 'FFindex' +version = '0.9.9' homepage = 'http://www.splashground.de/~andy/programs/FFindex/' description = """simple index/database for huge amounts of small files""" @@ -14,7 +16,7 @@ skipsteps = ['configure'] start_dir = 'src' -makeopts = 'USEMPI=1' +buildopts = 'USEMPI=1' installopts = "USEMPI=1 INSTALL_DIR=%(installdir)s" runtest = 'test' -- GitLab From f64ecba251ed22feb4c780f846c0747a6b4465ad Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 13:38:32 +0200 Subject: [PATCH 200/741] sync texinfo easyconfig with existing one, add missing easyblock spec in RDMC easyconfig --- .../r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb | 2 ++ .../t/texinfo/texinfo-5.2-ictce-5.5.0.eb | 29 ++++++++++++++----- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/easybuild/easyconfigs/r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb b/easybuild/easyconfigs/r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb index b6cf4c64fb..a768f518ac 100755 --- a/easybuild/easyconfigs/r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/r/RDMC/RDMC-2.9.5-ictce-5.5.0.eb @@ -1,3 +1,5 @@ +easyblock = 'ConfigureMake' + name = 'RDMC' version = '2.9.5' diff --git a/easybuild/easyconfigs/t/texinfo/texinfo-5.2-ictce-5.5.0.eb b/easybuild/easyconfigs/t/texinfo/texinfo-5.2-ictce-5.5.0.eb index dc542d4583..0eff73d3cc 100755 --- a/easybuild/easyconfigs/t/texinfo/texinfo-5.2-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/t/texinfo/texinfo-5.2-ictce-5.5.0.eb @@ -1,18 +1,31 @@ +easyblock = 'ConfigureMake' + name = 'texinfo' version = '5.2' -homepage = 'http://www.gnu.org/software/texinfo/' -description = "Texinfo is the official documentation format of the GNU project." +homepage = 'https://www.gnu.org/software/texinfo/' +description = """Texinfo is the official documentation format of the GNU project.""" + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_XZ] toolchain = {'name': 'ictce', 'version': '5.5.0'} -source_urls = ['http://ftpmirror.gnu.org/texinfo'] -sources = [SOURCE_TAR_GZ] +osdependencies = ['texlive'] + +preinstallopts = "make TEXMF=%(installdir)s/texmf install-tex && " + +# This will overwrite a users $TEXMFHOME so this module is best used as a build dependency +modextravars = {'TEXMFHOME': '%(installdir)s/texmf'} +modloadmsg = "\n\nWARNING: This texinfo module has (re)defined the value for the environment variable \\$TEXMFHOME.\n" +modloadmsg += "If you use a custom texmf directory (such as ~/texmf) you should copy files found in the\n" +modloadmsg += "new \\$TEXMFHOME to your custom directory and reset the value of \\$TEXMFHOME to point to that space:\n" +modloadmsg += "\tcp -r $TEXMFHOME/* /path/to/your/texmf\n" +modloadmsg += "\texport TEXMFHOME=/path/to/your/texmf\n\n" sanity_check_paths = { - 'files': ["bin/%s" % x for x in ['info', 'infokey', 'install-info', 'makeinfo', 'pdftexi2dvi', 'pod2texi', - 'texi2any', 'texi2dvi', 'texi2pdf', 'texindex']], - 'dirs': ["bin", "share"], + 'files': ['bin/info', 'bin/makeinfo', 'bin/pod2texi', 'bin/texi2pdf', 'texmf/tex/texinfo/texinfo.tex'], + 'dirs': [], } -moduleclass = 'tools' +moduleclass = 'devel' -- GitLab From a276557da5deb596662d279d954db50516644871 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 13:40:28 +0200 Subject: [PATCH 201/741] Bundle instead of PythonPackage --- .../gensim-0.12.4-foss-2016a-Python-2.7.11.eb | 20 --------- .../gensim-0.13.2-foss-2016a-Python-2.7.11.eb | 43 +++++++++++++++++++ 2 files changed, 43 insertions(+), 20 deletions(-) delete mode 100644 easybuild/easyconfigs/g/gensim/gensim-0.12.4-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/g/gensim/gensim-0.12.4-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/g/gensim/gensim-0.12.4-foss-2016a-Python-2.7.11.eb deleted file mode 100644 index 4c0e09b879..0000000000 --- a/easybuild/easyconfigs/g/gensim/gensim-0.12.4-foss-2016a-Python-2.7.11.eb +++ /dev/null @@ -1,20 +0,0 @@ -easyblock = 'PythonPackage' - -name = 'gensim' -version = '0.12.4' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'https://pypi.python.org/pypi/gensim' -description = """Gensim is a Python library for topic modelling, document indexing and similarity retrieval with - large corpora.""" - -toolchain = {'name': 'foss', 'version': '2016a'} - -source_urls = [PYPI_SOURCE] -sources = [SOURCE_TAR_GZ] - -dependencies = [ - ('Python', '2.7.11'), -] - -moduleclass = 'lib' diff --git a/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..6579381696 --- /dev/null +++ b/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,43 @@ +easyblock = 'Bundle' + +name = 'gensim' +version = '0.13.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/gensim' +description = """Gensim is a Python library for topic modelling, document indexing and similarity retrieval with + large corpora.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.11'), + ('requests', '2.10.0', '-Python-%(pyver)s'), +] + + +exts_list = [ + ('boto', '2.42.0', { + 'source_urls': ['https://pypi.python.org/packages/source/b/%(name)s'], + 'source_tmpl': '%(name)s-%(version)s.tar.gz', + }), + ('bz2file', '0.98', { + 'source_urls': ['https://pypi.python.org/packages/source/b/%(name)s'], + 'source_tmpl': '%(name)s-%(version)s.tar.gz', + }), + ('smart_open', '1.3.4', { + 'source_urls': ['https://pypi.python.org/packages/source/s/%(name)s'], + 'source_tmpl': '%(name)s-%(version)s.tar.gz', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/m/matplotlib'], + }), +] + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +moduleclass = 'lib' \ No newline at end of file -- GitLab From 336f309773b78f218a64f3534d1ff743d2ac7ea7 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 13:48:01 +0200 Subject: [PATCH 202/741] Pyro4 with foss2016a --- .../Pyro4-4.47-foss-2016a-Python-2.7.11.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..53c6523f10 --- /dev/null +++ b/easybuild/easyconfigs/p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,22 @@ +easyblock = 'PythonPackage' + +name = 'Pyro4' +version = '4.47' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/Pyro4' +description = """Pyro means PYthon Remote Objects. It is a library that enables you to build applications in which + objects can talk to eachother over the network, with minimal programming effort.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +options = {'modulename': 'Pyro4'} + +dependencies = [ + ('Python', '2.7.11'), +] + +moduleclass = 'lib' -- GitLab From c229d62148b487e85d8a572af21663e55b448c5a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 13:55:32 +0200 Subject: [PATCH 203/741] add missing easyblock spec in CFITSIO easyconfig --- .../easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb b/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb index e2fd327b03..8c90ec640b 100755 --- a/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.300-ictce-5.5.0.eb @@ -1,3 +1,5 @@ +easyblock = 'ConfigureMake' + name = 'CFITSIO' version = '3.300' @@ -6,15 +8,15 @@ description = """CFITSIO is a library of C and Fortran subroutines for reading a FITS (Flexible Image Transport System) data format.""" toolchain = {'name': 'ictce', 'version': '5.5.0'} -toolchainopts = {'optarch': True, 'pic': True} +toolchainopts = {'pic': True} srcversion = version.replace('.', '') source_urls = ['ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/'] sources = ['%%(namelower)s%s.tar.gz' % srcversion] sanity_check_paths = { - 'files':["lib/libcfitsio.a"], - 'dirs':["include"], + 'files': ['lib/libcfitsio.a'], + 'dirs': ['include'], } moduleclass = 'lib' -- GitLab From d7771d44143b3ad368abc658444514bfcc834dd0 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 14:11:17 +0200 Subject: [PATCH 204/741] Include sanity checks --- easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-goolf-1.4.10.eb | 5 +++++ easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-intel-2015b.eb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-goolf-1.4.10.eb b/easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-goolf-1.4.10.eb index 2f00cc2dbd..013f802b61 100644 --- a/easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-goolf-1.4.10.eb @@ -21,4 +21,9 @@ sources = [SOURCELOWER_ZIP] dependencies = [('zlib', '1.2.7')] +sanity_check_paths = { + 'files': ['include/matio.h', 'bin/matdump', 'lib/libmatio.a'], + 'dirs': [], +} + moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-intel-2015b.eb b/easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-intel-2015b.eb index 9fb67afb2a..05e18b2e8b 100644 --- a/easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-intel-2015b.eb +++ b/easybuild/easyconfigs/m/MATIO/MATIO-1.5.2-intel-2015b.eb @@ -21,4 +21,9 @@ sources = [SOURCELOWER_ZIP] dependencies = [('zlib', '1.2.8')] +sanity_check_paths = { + 'files': ['include/matio.h', 'bin/matdump', 'lib/libmatio.a'], + 'dirs': [], +} + moduleclass = 'lib' -- GitLab From 24043da125f260ec0d18d5ea8563c03c785991e8 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 14:18:05 +0200 Subject: [PATCH 205/741] change to gensim source --- .../g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb index 6579381696..7022e306a3 100644 --- a/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb @@ -33,11 +33,8 @@ exts_list = [ 'source_tmpl': '%(name)s-%(version)s.tar.gz', }), (name, version, { - 'source_urls': ['https://pypi.python.org/packages/source/m/matplotlib'], + 'source_urls': ['https://pypi.python.org/packages/source/g/%(name)s'], }), ] -source_urls = [PYPI_SOURCE] -sources = [SOURCE_TAR_GZ] - moduleclass = 'lib' \ No newline at end of file -- GitLab From f227e803f1d37f1ce3a558d0b2800398cbd6471e Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 14:25:34 +0200 Subject: [PATCH 206/741] sanity checks and modextrapath --- .../gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb index 7022e306a3..991e6da6fa 100644 --- a/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/g/gensim/gensim-0.13.2-foss-2016a-Python-2.7.11.eb @@ -18,7 +18,6 @@ dependencies = [ ('requests', '2.10.0', '-Python-%(pyver)s'), ] - exts_list = [ ('boto', '2.42.0', { 'source_urls': ['https://pypi.python.org/packages/source/b/%(name)s'], @@ -37,4 +36,14 @@ exts_list = [ }), ] +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + moduleclass = 'lib' \ No newline at end of file -- GitLab From 1f3ab1eff2857cc51a0f5aef998489d7f76e6a5f Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 14:28:19 +0200 Subject: [PATCH 207/741] Sanity checks --- .../p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/easybuild/easyconfigs/p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb index 53c6523f10..0a1e3fec18 100644 --- a/easybuild/easyconfigs/p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/p/Pyro4/Pyro4-4.47-foss-2016a-Python-2.7.11.eb @@ -19,4 +19,9 @@ dependencies = [ ('Python', '2.7.11'), ] +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + moduleclass = 'lib' -- GitLab From b59b0c10967f0ff171b77a902523b9608bf4d2cd Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 6 Sep 2016 14:44:31 +0200 Subject: [PATCH 208/741] libjpeg-turbo 1.4.2 compiled with the foss 2016a toolchain. This version depends on NASM 2.12.01 and is in line with the intel 2016a version. --- ...peg-turbo-1.4.2-foss-2016a-NASM-2.12.01.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.4.2-foss-2016a-NASM-2.12.01.eb diff --git a/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.4.2-foss-2016a-NASM-2.12.01.eb b/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.4.2-foss-2016a-NASM-2.12.01.eb new file mode 100644 index 0000000000..8728627d19 --- /dev/null +++ b/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.4.2-foss-2016a-NASM-2.12.01.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'libjpeg-turbo' +version = '1.4.2' + +homepage = 'http://sourceforge.net/projects/libjpeg-turbo/' +description = """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG +compression and decompression. libjpeg is a library that implements JPEG image encoding, decoding and transcoding. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'pic': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +nasmver = '2.12.01' +versionsuffix = '-NASM-%s' % nasmver + +dependencies = [ + ('NASM', nasmver), +] + +configopts = "--with-jpeg8" +runtest = "test" + +sanity_check_paths = { + 'files': ['bin/cjpeg', 'bin/djpeg', 'bin/jpegtran', 'bin/rdjpgcom', 'bin/tjbench', 'bin/wrjpgcom', + 'lib/libjpeg.a', 'lib/libjpeg.%s' % SHLIB_EXT, 'lib/libturbojpeg.a', 'lib/libturbojpeg.%s' % SHLIB_EXT], + 'dirs': ['include', 'share'], +} + +moduleclass = 'lib' -- GitLab From 129a45002d8a43d8eb6485eb75c2692cd10064ff Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 15:31:22 +0200 Subject: [PATCH 209/741] SHORE with foss2016a --- .../s/SHORE/SHORE-0.9.3-foss-2016a.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb diff --git a/easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb b/easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb new file mode 100644 index 0000000000..c79e6232d8 --- /dev/null +++ b/easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'SHORE' +version = '0.9.3' + +homepage = "http://1001genomes.org/software/shore.html" +description = """SHORE, for Short Read, is a mapping and analysis pipeline for short read data produced on the Illumina platform. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://sourceforge.net/projects/shore/files/'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = '--with-mpi' + +dependencies = [ + ('XZ','5.2.2'), + ('zlib','1.2.8'), + ('GSL','1.16'), # GSL 2.1 does not work. +] + +osdependencies = ['boost-devel', 'boost-iostreams', 'boost-thread'] + +sanity_check_paths = { + 'files': ['bin/shore', 'bin/shore-mpi', 'lib/libshore.a'], + 'dirs': ['include', 'lib'], +} + +moduleclass = 'bio' -- GitLab From 36ff147e0b54b690ae6cb37bac9b3f5fad08048c Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 6 Sep 2016 15:56:42 +0200 Subject: [PATCH 210/741] Gdk-Pixbuf using the foss 2016a toolchain. --- .../Gdk-Pixbuf-2.35.1-foss-2016a.eb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/g/Gdk-Pixbuf/Gdk-Pixbuf-2.35.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/Gdk-Pixbuf/Gdk-Pixbuf-2.35.1-foss-2016a.eb b/easybuild/easyconfigs/g/Gdk-Pixbuf/Gdk-Pixbuf-2.35.1-foss-2016a.eb new file mode 100644 index 0000000000..3f2a2533d6 --- /dev/null +++ b/easybuild/easyconfigs/g/Gdk-Pixbuf/Gdk-Pixbuf-2.35.1-foss-2016a.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'Gdk-Pixbuf' +version = '2.35.1' + +homepage = 'https://developer.gnome.org/gdk-pixbuf/stable/' +description = """ + The Gdk Pixbuf is a toolkit for image loading and pixel buffer manipulation. + It is used by GTK+ 2 and GTK+ 3 to load and manipulate images. In the past it + was distributed as part of GTK+ 2 but it was split off into a separate package + in preparation for the change to GTK+ 3. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('GLib', '2.48.0'), + ('libjpeg-turbo', '1.4.2', '-NASM-2.12.01'), + ('libpng', '1.6.21'), + ('LibTIFF', '4.0.6'), + ('GObject-Introspection', '1.48.0') +] + +configopts = "--disable-maintainer-mode --enable-debug=no --enable-introspection=yes " +configopts += "--disable-Bsymbolic --without-gdiplus --enable-shared --enable-static" + +modextrapaths = { + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' -- GitLab From 4874963c0fa5c81680a767cd9e1e0404d0c4add4 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 16:12:13 +0200 Subject: [PATCH 211/741] PyQt5 with foss2016a --- .../PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb | 34 +++++++++++++++++++ .../SIP-4.18.1-foss-2016a-Python-2.7.11.eb | 30 ++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/s/SIP/SIP-4.18.1-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..ea548f357c --- /dev/null +++ b/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMakePythonPackage' + +name = 'PyQt5' +version = '5.7' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.riverbankcomputing.co.uk/software/pyqt' +description = """PyQt5 is a set of Python bindings for v5 of the Qt application framework from The Qt Company.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +sources = ['%(name)s_gpl-%(version)s.tar.gz'] +source_urls = ['http://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-%(version)s'] + +dependencies = [ + ('Python', '2.7.11'), + ('SIP', '4.18.1', versionsuffix), + ('Qt5', '5.7.0'), +] + +configopts = "configure.py --confirm-license" +configopts += " --destdir=%(installdir)s/lib/python%(pyshortver)s/site-packages " +configopts += " --no-sip-files" + +options = {'modulename': '%(name)s%(version_major)s'} + +modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s%(version_major)s'], +} + +moduleclass = 'vis' \ No newline at end of file diff --git a/easybuild/easyconfigs/s/SIP/SIP-4.18.1-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/SIP/SIP-4.18.1-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..dbc48b8044 --- /dev/null +++ b/easybuild/easyconfigs/s/SIP/SIP-4.18.1-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,30 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Bart Verleye +# Center for eResearch, Auckland +easyblock = 'ConfigureMakePythonPackage' + +name = 'SIP' +version = '4.18.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.riverbankcomputing.com/software/sip/' +description = """SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://sourceforge.net/projects/pyqt/files/sip/sip-%(version)s'] + +dependencies = [('Python', '2.7.11')] + +configopts = "configure.py --bindir %(installdir)s/bin --incdir %(installdir)s/include " +configopts += "--destdir %(installdir)s/lib/python%(pyshortver)s/site-packages" + +sanity_check_paths = { + 'files': ['bin/sip', 'include/sip.h'] + + ['lib/python%%(pyshortver)s/site-packages/%s' % x + for x in ['sip.%s' % SHLIB_EXT, 'sipconfig.py', 'sipdistutils.py']], + 'dirs': [], +} + +moduleclass = 'lang' -- GitLab From 537bbfaa8972fff17f09a1c43640b47594ed5b85 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 16:14:34 +0200 Subject: [PATCH 212/741] Fix sanity check --- .../p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb index ea548f357c..6cc9d5dd83 100644 --- a/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb @@ -28,7 +28,7 @@ modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} sanity_check_paths = { 'files': [], - 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s%(version_major)s'], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s'], } -moduleclass = 'vis' \ No newline at end of file +moduleclass = 'vis' -- GitLab From bc996ae478603e1e8eeb15c15e35aee76dec150a Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 16:15:30 +0200 Subject: [PATCH 213/741] Filename version changed --- ...16a-Python-2.7.11.eb => PyQT5-5.7-foss-2016a-Python-2.7.11.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/p/PyQt5/{PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb => PyQT5-5.7-foss-2016a-Python-2.7.11.eb} (100%) diff --git a/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7-foss-2016a-Python-2.7.11.eb similarity index 100% rename from easybuild/easyconfigs/p/PyQt5/PyQT5-5.7.0-foss-2016a-Python-2.7.11.eb rename to easybuild/easyconfigs/p/PyQt5/PyQT5-5.7-foss-2016a-Python-2.7.11.eb -- GitLab From 91b9458daedc8ad337b717228d216f5754ea5967 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 6 Sep 2016 16:41:02 +0200 Subject: [PATCH 214/741] Version of Harfbuzz using the foss 2016a toolchain. The config is based on the intel 2016a one. --- .../h/HarfBuzz/HarfBuzz-1.2.7-foss-2016a.eb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.2.7-foss-2016a.eb diff --git a/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.2.7-foss-2016a.eb b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.2.7-foss-2016a.eb new file mode 100644 index 0000000000..1c081e2c8e --- /dev/null +++ b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.2.7-foss-2016a.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'HarfBuzz' +version = '1.2.7' + +homepage = 'http://www.freedesktop.org/wiki/Software/HarfBuzz' +description = """HarfBuzz is an OpenType text shaping engine.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://www.freedesktop.org/software/harfbuzz/release/'] +sources = [SOURCELOWER_TAR_BZ2] + +glibver = '2.48.0' +dependencies = [ + ('GLib', glibver), + ('cairo', '1.14.6', '-GLib-%s' % glibver), + ('freetype', '2.6.3'), + ('GObject-Introspection', '1.48.0') +] + +configopts = "--enable-introspection=yes --with-gobject=yes --enable-static --enable-shared --with-cairo " + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +sanity_check_paths = { + 'files': ['lib/libharfbuzz.%s' % SHLIB_EXT, 'bin/hb-view'], + 'dirs': [] +} + +moduleclass = 'vis' -- GitLab From 1c8e0019d4b515d05af44fc73ef6d246148dac1c Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Tue, 6 Sep 2016 16:08:19 +0100 Subject: [PATCH 215/741] Update deps to NGS-1.2.5 and ncbi-vdb-2.7.0 --- .../h/HISAT2/HISAT2-2.0.4-foss-2016b.eb | 4 +- .../easyconfigs/n/NGS/NGS-1.2.5-foss-2016b.eb | 35 +++++++++++++++++ .../n/ncbi-vdb/ncbi-vdb-2.7.0-foss-2016b.eb | 38 +++++++++++++++++++ 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/n/NGS/NGS-1.2.5-foss-2016b.eb create mode 100644 easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.7.0-foss-2016b.eb diff --git a/easybuild/easyconfigs/h/HISAT2/HISAT2-2.0.4-foss-2016b.eb b/easybuild/easyconfigs/h/HISAT2/HISAT2-2.0.4-foss-2016b.eb index 354eb721c4..83a592d05a 100644 --- a/easybuild/easyconfigs/h/HISAT2/HISAT2-2.0.4-foss-2016b.eb +++ b/easybuild/easyconfigs/h/HISAT2/HISAT2-2.0.4-foss-2016b.eb @@ -15,8 +15,8 @@ source_urls = ['ftp://ftp.ccb.jhu.edu/pub/infphilo/%(namelower)s/downloads/'] checksums = ['50119a693929e240b072d79e69dc211e'] dependencies = [ - ('NGS', '1.2.3'), - ('ncbi-vdb', '2.5.8-1'), + ('NGS', '1.2.5'), + ('ncbi-vdb', '2.7.0'), ] buildopts = "USE_SRA=1 NCBI_NGS_DIR=$EBROOTNGS NCBI_VDB_DIR=$EBROOTNCBIMINVDB" diff --git a/easybuild/easyconfigs/n/NGS/NGS-1.2.5-foss-2016b.eb b/easybuild/easyconfigs/n/NGS/NGS-1.2.5-foss-2016b.eb new file mode 100644 index 0000000000..8b032e0468 --- /dev/null +++ b/easybuild/easyconfigs/n/NGS/NGS-1.2.5-foss-2016b.eb @@ -0,0 +1,35 @@ +easyblock = 'ConfigureMake' + +name = 'NGS' +version = '1.2.5' + +homepage = 'https://github.com/ncbi/ngs' +description = """NGS is a new, domain-specific API for accessing reads, alignments and pileups produced from + Next Generation Sequencing.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/ncbi/ngs/archive/'] +sources = ['%(version)s.tar.gz'] + +dependencies = [('Java', '1.8.0_92', '', True)] + +# override default of using $HOME/ncbi-outdir +configopts = "--build-prefix=%(builddir)s/ncbi-outdir" + +buildopts = 'CC="$CC -c" CPP="$CXX" CP="$CXX -c" -C ngs-sdk && ' +buildopts += 'make CC="$CC -c" CPP="$CXX" CP="$CXX -c" -C ngs-java' + +installopts = "-C ngs-sdk && make install -C ngs-java" + +parallel = 1 + +sanity_check_paths = { + 'files': ['jar/ngs-java.jar', ('lib/libngs-sdk.%s' % SHLIB_EXT, 'lib64/libngs-sdk.%s' % SHLIB_EXT), + ('lib/libngs-adapt-c++.a', 'lib64/libngs-adapt-c++.a'), ('lib/libngs-c++.a', 'lib64/libngs-c++.a')], + 'dirs': ['include/ngs', 'share'], +} + +modextrapaths = {'CLASSPATH': 'jar/ngs-java.jar'} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.7.0-foss-2016b.eb b/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.7.0-foss-2016b.eb new file mode 100644 index 0000000000..077b870927 --- /dev/null +++ b/easybuild/easyconfigs/n/ncbi-vdb/ncbi-vdb-2.7.0-foss-2016b.eb @@ -0,0 +1,38 @@ +easyblock = 'ConfigureMake' + +name = 'ncbi-vdb' +version = '2.7.0' + +homepage = 'https://github.com/ncbi/ncbi-vdb' +description = """The SRA Toolkit and SDK from NCBI is a collection of tools and libraries for + using data in the INSDC Sequence Read Archives.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/ncbi/ncbi-vdb/archive/'] +sources = ['%(version)s.tar.gz'] + +dependencies = [ + ('libxml2', '2.9.4'), + ('file', '5.28'), # provides libmagic + ('HDF5', '1.8.17'), + ('NGS', '1.2.5'), +] + +# override default of using $HOME/ncbi-outdir +configopts = "--build-prefix=%(builddir)s/ncbi-outdir " + +configopts += "--with-ngs-sdk-prefix=$EBROOTNGS --with-ngs-java-prefix=$EBROOTNGS " +configopts += "--with-hdf5-prefix=$EBROOTHDF5 --with-xml2-prefix=$EBROOTLIBXML2" + +parallel = 1 + +sanity_check_paths = { + 'files': ['include/ncbi-vdb/NGS.hpp', ('lib/libncbi-vdb.%s' % SHLIB_EXT, 'lib64/libncbi-vdb.%s' % SHLIB_EXT), + ('lib/libncbi-wvdb.%s' % SHLIB_EXT, 'lib64/libncbi-wvdb.%s' % SHLIB_EXT), + ('lib/libncbi-ngs-c++.a', 'lib64/libncbi-ngs-c++.a'), ('lib/libncbi-vdb.a', 'lib64/libncbi-vdb.a'), + ('lib/libncbi-wvdb.a', 'lib64/libncbi-wvdb.a')], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 48ec2d383a04713baafef1c137d6ba8db12c38de Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 18:35:24 +0200 Subject: [PATCH 216/741] add easyconfig VTK-7.0.0-intel-2016b-Python-2.7.12.eb --- .../VTK-7.0.0-intel-2016b-Python-2.7.12.eb | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 easybuild/easyconfigs/v/VTK/VTK-7.0.0-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/v/VTK/VTK-7.0.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/v/VTK/VTK-7.0.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..ce85c69cbd --- /dev/null +++ b/easybuild/easyconfigs/v/VTK/VTK-7.0.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,58 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-97.html +## + +easyblock = 'CMakeMake' + +name = 'VTK' +version = '7.0.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.vtk.org' +description = """The Visualization Toolkit (VTK) is an open-source, freely available software system for + 3D computer graphics, image processing and visualization. VTK consists of a C++ class library and several + interpreted interface layers including Tcl/Tk, Java, and Python. VTK supports a wide variety of visualization + algorithms including: scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques + such as: implicit modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.vtk.org/files/release/%(version_major_minor)s'] +sources = [ + SOURCE_TAR_GZ, + '%(name)sData-%(version)s.tar.gz', +] + +builddependencies = [('CMake', '3.6.1')] + +dependencies = [ + ('Python', '2.7.12'), + ('libGLU', '9.0.0'), +] + +configopts = "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT +configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT +configopts += "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DVTK_WRAP_PYTHON=ON " +configopts += "-DPYTHON_LIBRARY=$EBROOTPYTHON/lib/libpython%%(pyshortver)s.%s " % SHLIB_EXT +configopts += " -DPYTHON_INCLUDE_DIR=$EBROOTPYTHON/include/python%(pyshortver)s " +preinstallopts = "mkdir -p %(installdir)s/lib/python%(pyshortver)s/site-packages/ && " +preinstallopts += "export PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages:$PYTHONPATH && " + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +sanity_check_paths = { + 'files': ['bin/vtk%s-%%(version_major_minor)s' % x for x in ['EncodeString', 'HashSource', 'mkg3states']], + 'dirs': ['lib/python%(pyshortver)s/site-packages/', 'include/vtk-%(version_major_minor)s'], +} + +sanity_check_commands = [('python', "-c 'import %(namelower)s'")] + +moduleclass = 'vis' -- GitLab From 1303b95d7b0958811e8291d78f61a7c844f72afe Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 18:37:34 +0200 Subject: [PATCH 217/741] add easyconfig CGAL-4.8.1-intel-2016b-Python-2.7.12.eb --- .../CGAL-4.8.1-intel-2016b-Python-2.7.12.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..3efaca57eb --- /dev/null +++ b/easybuild/easyconfigs/c/CGAL/CGAL-4.8.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,36 @@ +name = 'CGAL' +version = '4.8.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.cgal.org/' +description = """The goal of the CGAL Open Source Project is to provide easy access to efficient + and reliable geometric algorithms in the form of a C++ library.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'strict': True} + +source_urls = ['https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-%(version)s'] +sources = [SOURCE_TAR_XZ] + +dependencies = [ + ('zlib', '1.2.8'), + ('Python', '2.7.12'), + ('Boost', '1.61.0', versionsuffix), + ('MPFR', '3.1.4'), + ('GMP', '6.1.1'), + ('libGLU', '9.0.0'), + ('Qt5', '5.7.0'), +] + +builddependencies = [ + ('CMake', '3.6.1'), + ('Eigen', '3.2.9'), +] + +configopts = "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include\;$EBROOTLIBGLU/include " +configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT +configopts += "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT +configopts += "-DWITH_ZLIB=ON -DWITH_MPFR=ON -DWITH_OpenGL=ON -DWITH_Eigen3=ON " +configopts += "-DWITH_GMPXX=ON -DWITH_LAPACK=ON -DWITH_BLAS=ON " + +moduleclass = 'numlib' -- GitLab From 70a4f3d2302e2578b992eb1cc1787e5bc6b7693f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 18:50:54 +0200 Subject: [PATCH 218/741] add easyconfig GL2PS-1.3.9-intel-2016b.eb, add easyconfig freeglut-3.0.0-intel-2016b.eb --- .../f/freeglut/freeglut-3.0.0-intel-2016b.eb | 34 +++++++++++++++++++ .../g/GL2PS/GL2PS-1.3.9-intel-2016b.eb | 32 +++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 easybuild/easyconfigs/f/freeglut/freeglut-3.0.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/GL2PS/GL2PS-1.3.9-intel-2016b.eb diff --git a/easybuild/easyconfigs/f/freeglut/freeglut-3.0.0-intel-2016b.eb b/easybuild/easyconfigs/f/freeglut/freeglut-3.0.0-intel-2016b.eb new file mode 100644 index 0000000000..ccad2796aa --- /dev/null +++ b/easybuild/easyconfigs/f/freeglut/freeglut-3.0.0-intel-2016b.eb @@ -0,0 +1,34 @@ +easyblock = 'CMakeMake' + +name = 'freeglut' +version = '3.0.0' + +homepage = 'http://freeglut.sourceforge.net/' +description = "freeglut is a completely OpenSourced alternative to the OpenGL Utility Toolkit (GLUT) library." + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://prdownloads.sourceforge.net/%(name)s'] + +builddependencies = [('CMake', '3.6.1')] + +dependencies = [ + ('X11', '20160819'), + ('Mesa', '12.0.2'), +] + +configopts = ' -DX11_X11_LIB="$EBROOTX11/lib/libX11.so" ' +configopts += ' -DX11_X11_INCLUDE_PATH="$EBROOTX11/include/X11" ' +configopts += ' -DX11_Xext_LIB="$EBROOTX11/lib/libXext.so" ' +configopts += ' -DX11_Xrandr_LIB="$EBROOTX11/lib/libXrandr.so" ' +configopts += ' -DX11_Xrandr_INCLUDE_PATH="$EBROOTX11/include/X11/extensions/" ' +configopts += ' -DX11_Xi_LIB="$EBROOTX11/lib/libXrandr.so" ' +configopts += ' -DX11_Xi_INCLUDE_PATH="$EBROOTX11/include/X11/extensions/" ' + +sanity_check_paths = { + 'files': [('lib/libglut.a', 'lib64/libglut.a'), ('lib/libglut.%s' % SHLIB_EXT, 'lib64/libglut.%s' % SHLIB_EXT)], + 'dirs': ['include/GL'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/g/GL2PS/GL2PS-1.3.9-intel-2016b.eb b/easybuild/easyconfigs/g/GL2PS/GL2PS-1.3.9-intel-2016b.eb new file mode 100644 index 0000000000..1afefc8e72 --- /dev/null +++ b/easybuild/easyconfigs/g/GL2PS/GL2PS-1.3.9-intel-2016b.eb @@ -0,0 +1,32 @@ +easyblock = 'CMakeMake' + +name = 'GL2PS' +version = '1.3.9' + +homepage = 'http://www.geuz.org/gl2ps/' +description = """GL2PS: an OpenGL to PostScript printing library""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://geuz.org/gl2ps/src/'] +sources = [SOURCELOWER_TGZ] + +builddependencies = [ + ('CMake', '3.6.1'), +] + +dependencies = [ + ('X11', '20160819'), + ('Mesa', '12.0.2'), + ('libGLU', '9.0.0'), + ('freeglut', '3.0.0'), + ('libpng', '1.6.24'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ['include/gl2ps.h', 'lib/libgl2ps.so'], + 'dirs': [] +} + +moduleclass = 'vis' -- GitLab From 97c4574fd583f5bb184dc3ca450f453af417a5e1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 18:54:30 +0200 Subject: [PATCH 219/741] add easyconfig libQGLViewer-2.6.3-intel-2016b.eb --- .../libQGLViewer-2.6.3-intel-2016b.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/l/libQGLViewer/libQGLViewer-2.6.3-intel-2016b.eb diff --git a/easybuild/easyconfigs/l/libQGLViewer/libQGLViewer-2.6.3-intel-2016b.eb b/easybuild/easyconfigs/l/libQGLViewer/libQGLViewer-2.6.3-intel-2016b.eb new file mode 100644 index 0000000000..4edf05a0d2 --- /dev/null +++ b/easybuild/easyconfigs/l/libQGLViewer/libQGLViewer-2.6.3-intel-2016b.eb @@ -0,0 +1,20 @@ +name = 'libQGLViewer' +version = '2.6.3' + +homepage = 'http://libqglviewer.com/' +description = "libQGLViewer is a C++ library based on Qt that eases the creation of OpenGL 3D viewers." + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.libqglviewer.com/src/'] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('libGLU', '9.0.0'), +] + +builddependencies = [('Qt', '4.8.7')] + +start_dir = '%(builddir)s/libQGLViewer-%(version)s/QGLViewer' + +moduleclass = 'lib' -- GitLab From 0bdf7d6133dda4d5386dc54f7672b66f9137a631 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 20:21:03 +0200 Subject: [PATCH 220/741] Name change --- ...16a-Python-2.7.11.eb => PyQt5-5.7-foss-2016a-Python-2.7.11.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/p/PyQt5/{PyQT5-5.7-foss-2016a-Python-2.7.11.eb => PyQt5-5.7-foss-2016a-Python-2.7.11.eb} (100%) diff --git a/easybuild/easyconfigs/p/PyQt5/PyQT5-5.7-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.7-foss-2016a-Python-2.7.11.eb similarity index 100% rename from easybuild/easyconfigs/p/PyQt5/PyQT5-5.7-foss-2016a-Python-2.7.11.eb rename to easybuild/easyconfigs/p/PyQt5/PyQt5-5.7-foss-2016a-Python-2.7.11.eb -- GitLab From f46513e8f9ee61f9b135d862a7546bb7c53100b1 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 6 Sep 2016 20:26:40 +0200 Subject: [PATCH 221/741] Boost not as osdep --- easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb b/easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb index c79e6232d8..756efd9115 100644 --- a/easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb +++ b/easybuild/easyconfigs/s/SHORE/SHORE-0.9.3-foss-2016a.eb @@ -18,10 +18,9 @@ dependencies = [ ('XZ','5.2.2'), ('zlib','1.2.8'), ('GSL','1.16'), # GSL 2.1 does not work. + ('Boost', '1.61.0'), ] -osdependencies = ['boost-devel', 'boost-iostreams', 'boost-thread'] - sanity_check_paths = { 'files': ['bin/shore', 'bin/shore-mpi', 'lib/libshore.a'], 'dirs': ['include', 'lib'], -- GitLab From fff0828d44ae2fbfc432717df2ba0f417d7d0e1c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Sep 2016 21:02:21 +0200 Subject: [PATCH 222/741] add easyconfig Yade-2016.06a-intel-2016b-Python-2.7.12.eb, add easyconfig VTK-6.3.0-intel-2016b-Python-2.7.12.eb --- .../VTK-6.3.0-intel-2016b-Python-2.7.12.eb | 59 ++++++++++++++++++ ...Yade-2016.06a-intel-2016b-Python-2.7.12.eb | 60 +++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 easybuild/easyconfigs/v/VTK/VTK-6.3.0-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/v/VTK/VTK-6.3.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/v/VTK/VTK-6.3.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..d63c30f413 --- /dev/null +++ b/easybuild/easyconfigs/v/VTK/VTK-6.3.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,59 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-97.html +## + +easyblock = 'CMakeMake' + +name = 'VTK' +version = '6.3.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.vtk.org' +description = """The Visualization Toolkit (VTK) is an open-source, freely available software system for + 3D computer graphics, image processing and visualization. VTK consists of a C++ class library and several + interpreted interface layers including Tcl/Tk, Java, and Python. VTK supports a wide variety of visualization + algorithms including: scalar, vector, tensor, texture, and volumetric methods; and advanced modeling techniques + such as: implicit modeling, polygon reduction, mesh smoothing, cutting, contouring, and Delaunay triangulation.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.vtk.org/files/release/%(version_major_minor)s'] +sources = [ + SOURCE_TAR_GZ, + '%(name)sData-%(version)s.tar.gz', +] + +builddependencies = [('CMake', '3.6.1')] + +dependencies = [ + ('Python', '2.7.12'), + ('libGLU', '9.0.0'), +] + +configopts = "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT +configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT +configopts += "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DVTK_WRAP_PYTHON=ON " +configopts += "-DPYTHON_LIBRARY=$EBROOTPYTHON/lib/libpython%%(pyshortver)s.%s " % SHLIB_EXT +configopts += " -DPYTHON_INCLUDE_DIR=$EBROOTPYTHON/include/python%(pyshortver)s " +preinstallopts = "mkdir -p %(installdir)s/lib/python%(pyshortver)s/site-packages/ && " +preinstallopts += "export PYTHONPATH=%(installdir)s/lib/python%(pyshortver)s/site-packages:$PYTHONPATH && " + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +sanity_check_paths = { + 'files': ['bin/vtk%s-%%(version_major_minor)s' % x for x in ['EncodeString', 'HashSource', + 'mkg3states', 'ParseOGLExt']], + 'dirs': ['lib/python%(pyshortver)s/site-packages/', 'include/vtk-%(version_major_minor)s'], +} + +sanity_check_commands = [('python', "-c 'import %(namelower)s'")] + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..a7a4e68aef --- /dev/null +++ b/easybuild/easyconfigs/y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,60 @@ +easyblock = 'CMakeMake' + +name = 'Yade' +version = '2016.06a' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://yade-dem.org/doc/' +description = """ Yade is an extensible open-source framework for discrete numerical models, + focused on Discrete Element Method. The computation parts are written in c++ using flexible object model, + allowing independent implementation of new alogrithms and interfaces. + Python is used for rapid and concise scene construction, simulation control, postprocessing and debugging. """ + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://launchpad.net/yade/trunk/yade-1.00.0/+download/'] +sources = [SOURCELOWER_TAR_GZ] +patches = ['Yade-%(version)s_include-signal.patch'] + +dependencies = [ + ('Boost', '1.61.0', versionsuffix), + ('CGAL', '4.8.1', versionsuffix), + ('Eigen', '3.2.9'), + ('GDB', '7.11.1', versionsuffix), + ('GL2PS', '1.3.9'), + ('GTS', '0.7.6'), + ('IPython', '5.1.0', versionsuffix), + ('libQGLViewer', '2.6.3'), + ('Loki', '0.1.7'), + ('matplotlib', '1.5.2', versionsuffix), + ('minieigen', '0.5.3', versionsuffix), + ('PyGTS', '0.3.1', versionsuffix), + ('Python', '2.7.12'), + ('Qt5', '5.7.0'), + ('SQLite', '3.13.0'), + ('VTK', '6.3.0', versionsuffix), + ('zlib', '1.2.8'), +] + +builddependencies = [('CMake', '3.6.1')] + +separate_build_dir = True + +configopts = '-DENABLE_GUI=OFF -DENABLE_LINSOLV=OFF -DENABLE_PFVFLOW=OFF ' +configopts += '-DCGAL_INCLUDE_DIR=$EBROOTCGAL/include ' +configopts += '-DGMP_INCLUDE_DIR=$EBROOTGMP/include -DGMP_LIBRARIES=$EBROOTGMP/lib -DGMPXX_LIBRARIES=$EBROOTGMP/lib ' + +modextrapaths = { + 'LD_LIBRARY_PATH': ['lib64/lib64/yade-%(version)s', 'lib/x86_64-linux-gnu/yade-%(version)s'], + 'LIBRARY_PATH': ['lib64/lib64/yade-%(version)s', 'lib/x86_64-linux-gnu/yade-%(version)s'], + 'PYTHONPATH': ['lib/x86_64-linux-gnu/yade-%(version)s/py', 'lib64/yade-%(version)s/py'], +} + +sanity_check_paths = { + 'files': ['bin/yade-%(version)s', 'bin/yade-%(version)s-batch', + ('lib/x86_64-linux-gnu/yade-%%(version)s/libyade.%s' % SHLIB_EXT, + 'lib64/yade-%%(version)s/libyade.%s' %SHLIB_EXT)], + 'dirs': [('lib/x86_64-linux-gnu/yade-%(version)s/py/yade', 'lib64/yade-%(version)s/py/yade')], +} + +moduleclass = 'devel' -- GitLab From f7bda1ae176921f1b0316b1cc23b34426a0a1bc6 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 09:13:09 +0200 Subject: [PATCH 223/741] Version of Pango compiled using the foss 2016a toolchain. The config is based on the intel 2016a version. --- .../p/Pango/Pango-1.40.1-foss-2016a.eb | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 easybuild/easyconfigs/p/Pango/Pango-1.40.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/p/Pango/Pango-1.40.1-foss-2016a.eb b/easybuild/easyconfigs/p/Pango/Pango-1.40.1-foss-2016a.eb new file mode 100644 index 0000000000..70136d70c1 --- /dev/null +++ b/easybuild/easyconfigs/p/Pango/Pango-1.40.1-foss-2016a.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'Pango' +version = '1.40.1' + +homepage = 'http://www.pango.org/' +description = """Pango is a library for laying out and rendering of text, with an emphasis on internationalization. +Pango can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the +context of the GTK+ widget toolkit. Pango forms the core of text and font handling for GTK+-2.x.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +glibver = '2.48.0' +dependencies = [ + ('GLib', glibver), + ('cairo', '1.14.6', '-GLib-%s' % glibver), + ('HarfBuzz', '1.2.7'), + ('GObject-Introspection', '1.48.0'), + ('fontconfig', '2.11.95') +] + +configopts = "--disable-silent-rules --enable-introspection=yes --enable-static --enable-shared " + +modextrapaths = { + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' -- GitLab From b7f123a24333b484a545cd17abc51d12eb46c094 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 10:04:58 +0200 Subject: [PATCH 224/741] Version of GTK+ using the foss 2016a toolchain. The config is based on the intel 2016a version. --- .../g/GTK+/GTK+-2.24.30-foss-2016a.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/g/GTK+/GTK+-2.24.30-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/GTK+/GTK+-2.24.30-foss-2016a.eb b/easybuild/easyconfigs/g/GTK+/GTK+-2.24.30-foss-2016a.eb new file mode 100644 index 0000000000..f8cd4f7bed --- /dev/null +++ b/easybuild/easyconfigs/g/GTK+/GTK+-2.24.30-foss-2016a.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'GTK+' +version = '2.24.30' + +homepage = 'https://developer.gnome.org/gtk+/stable/' +description = """ + The GTK+ 2 package contains libraries used for creating graphical user interfaces for applications. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('ATK', '2.20.0'), + ('Gdk-Pixbuf', '2.35.1'), + ('Pango', '1.40.1'), + ('GObject-Introspection', '1.48.0'), +] + +configopts = "--disable-silent-rules --disable-glibtest --enable-introspection=yes --disable-visibility " + +moduleclass = 'vis' -- GitLab From e4a599a9d37b5e7e1f7f947bde1be01674fd7a2a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 7 Sep 2016 10:14:22 +0200 Subject: [PATCH 225/741] --- .../y/Yade/Yade-2016.06a_include-signal.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 easybuild/easyconfigs/y/Yade/Yade-2016.06a_include-signal.patch diff --git a/easybuild/easyconfigs/y/Yade/Yade-2016.06a_include-signal.patch b/easybuild/easyconfigs/y/Yade/Yade-2016.06a_include-signal.patch new file mode 100644 index 0000000000..28ff927ab4 --- /dev/null +++ b/easybuild/easyconfigs/y/Yade/Yade-2016.06a_include-signal.patch @@ -0,0 +1,10 @@ +--- trunk-2016.06a/py/wrapper/yadeWrapper.cpp.orig 2016-09-06 20:32:45.079249073 +0200 ++++ trunk-2016.06a/py/wrapper/yadeWrapper.cpp 2016-09-06 20:32:59.049059903 +0200 +@@ -39,6 +39,7 @@ + + #include + #include ++#include + + namespace py = boost::python; + -- GitLab From 05a4c417dbaf99c1c3ae8cb37add3748f835bd35 Mon Sep 17 00:00:00 2001 From: ocaisa Date: Wed, 7 Sep 2016 10:39:44 +0200 Subject: [PATCH 226/741] flex has an M4 dependency --- easybuild/easyconfigs/f/flex/flex-2.6.0.eb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0.eb index e7580df4ae..08a404a4b8 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' -- GitLab From b5299437a92fe3312d002c7c19af81e77e9263d2 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 7 Sep 2016 11:11:15 +0200 Subject: [PATCH 227/741] Add intel/2017 stuff --- .../i/icc/icc-2017.0.35-GCC-5.4.0-2.26.eb | 33 +++++++++++++++++ .../iccifort-2017.0.35-GCC-5.4.0-2.26.eb | 18 ++++++++++ .../i/ifort/ifort-2017.0.35-GCC-5.4.0-2.26.eb | 33 +++++++++++++++++ .../i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb | 20 +++++++++++ ...-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb | 36 +++++++++++++++++++ ....0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb | 35 ++++++++++++++++++ 6 files changed, 175 insertions(+) create mode 100644 easybuild/easyconfigs/i/icc/icc-2017.0.35-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/iccifort/iccifort-2017.0.35-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/ifort/ifort-2017.0.35-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/imkl/imkl-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/impi/impi-2017.0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/icc/icc-2017.0.35-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/icc/icc-2017.0.35-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..0c1088585e --- /dev/null +++ b/easybuild/easyconfigs/i/icc/icc-2017.0.35-GCC-5.4.0-2.26.eb @@ -0,0 +1,33 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'icc' +version = '2017.0.35' + +homepage = 'http://software.intel.com/en-us/intel-compilers/' +description = "C and C++ compiler from Intel" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_cpp.tgz'] + +checksums = ['c8a2fdb1501fbc93bfaad93195677d86'] + +gccver = '5.4.0' +binutilsver = '2.26' +versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) + +dependencies = [ + ('GCCcore', gccver), + ('binutils', binutilsver, '', ('GCCcore', gccver)), +] + +# list of regex for components to install +# full list of components can be obtained from pset/mediaconfig.xml in unpacked sources +# cfr. https://software.intel.com/en-us/articles/intel-composer-xe-2015-silent-installation-guide +components = ['intel-comp', 'intel-ccomp', 'intel-icc', 'intel-openmp', 'intel-ipsc?_'] + +dontcreateinstalldir = 'True' + +license_file = HOME + '/licenses/intel/license.lic' + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2017.0.35-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iccifort/iccifort-2017.0.35-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..380fc915c1 --- /dev/null +++ b/easybuild/easyconfigs/i/iccifort/iccifort-2017.0.35-GCC-5.4.0-2.26.eb @@ -0,0 +1,18 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild +easyblock = "Toolchain" + +name = 'iccifort' +version = '2017.0.35' +versionsuffix = '-GCC-5.4.0-2.26' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel Cluster Toolkit Compiler Edition provides Intel C,C++ and fortran compilers, Intel MPI and Intel MKL""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +dependencies = [ + ('icc', version, versionsuffix), + ('ifort', version, versionsuffix), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/i/ifort/ifort-2017.0.35-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2017.0.35-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..3b5cada858 --- /dev/null +++ b/easybuild/easyconfigs/i/ifort/ifort-2017.0.35-GCC-5.4.0-2.26.eb @@ -0,0 +1,33 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'ifort' +version = '2017.0.35' + +homepage = 'http://software.intel.com/en-us/intel-compilers/' +description = "C and C++ compiler from Intel" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran.tgz'] + +checksums = ['8787795951fe10f90ce7dcdcec1b9341'] + +gccver = '5.4.0' +binutilsver = '2.26' +versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) + +dependencies = [ + ('GCCcore', gccver), + ('binutils', binutilsver, '', ('GCCcore', gccver)), +] + +# list of regex for components to install +# full list of components can be obtained from pset/mediaconfig.xml in unpacked sources +# cfr. https://software.intel.com/en-us/articles/intel-composer-xe-2015-silent-installation-guide +components = ['intel-comp', 'intel-fcomp', 'intel-ifort', 'intel-openmp', 'intel-ipsf?_'] + +dontcreateinstalldir = 'True' + +license_file = HOME + '/licenses/intel/license.lic' + +moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..b6b55ee8dc --- /dev/null +++ b/easybuild/easyconfigs/i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb @@ -0,0 +1,20 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild +easyblock = "Toolchain" + +name = 'iimpi' +version = '2017.00' +versionsuffix = '-GCC-5.4.0-2.26' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2017.0.35' +dependencies = [ + ('icc', compver, versionsuffix), + ('ifort', compver, versionsuffix), + ('impi', '2017.0.98', '', ('iccifort', '%s%s' % (compver, versionsuffix))), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/i/imkl/imkl-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..39201957df --- /dev/null +++ b/easybuild/easyconfigs/i/imkl/imkl-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb @@ -0,0 +1,36 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'imkl' +version = '2017.0.98' + +homepage = 'http://software.intel.com/en-us/intel-mkl/' +description = """Intel Math Kernel Library is a library of highly optimized, + extensively threaded math routines for science, engineering, and financial + applications that require maximum performance. Core math functions include + BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" + +toolchain = {'name': 'iimpi', 'version': '2017.00-GCC-5.4.0-2.26'} + +sources = ['l_mkl_%(version)s.tgz'] +checksums = ['3cdcb739ab5ab1e047eb130b9ffdd8d0'] + +dontcreateinstalldir = 'True' + +license_file = HOME + '/licenses/intel/license.lic' + +interfaces = True + +postinstallcmds = [ + # extract the examples + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic.tgz -C %(installdir)s/mkl/examples/' +] + +modextravars = { + 'MKL_EXAMPLES': '%(installdir)s/mkl/examples/', +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/i/impi/impi-2017.0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/impi/impi-2017.0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..109a0bb59e --- /dev/null +++ b/easybuild/easyconfigs/i/impi/impi-2017.0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb @@ -0,0 +1,35 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'impi' +version = '2017.0.98' + +homepage = 'http://software.intel.com/en-us/intel-mpi-library/' +description = """The Intel(R) MPI Library for Linux* OS is a multi-fabric message + passing library based on ANL MPICH2 and OSU MVAPICH2. The Intel MPI Library for + Linux OS implements the Message Passing Interface, version 2 (MPI-2) specification.""" + +toolchain = {'name': 'iccifort', 'version': '2017.0.35-GCC-5.4.0-2.26'} + +sources = ['l_mpi_p_%(version)s.tgz'] + +checksums = ['fc123875773816b7084a91e419d54d20'] + +dontcreateinstalldir = 'True' + +components = ['intel-mpi', 'intel-psxe', 'intel-imb'] + +license_file = HOME + '/licenses/intel/license.lic' + +# set up all the mpi commands to default to intel compilers +# set_mpi_wrappers_all = 'True' + +postinstallcmds = [ + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libmpich.so', + 'ln -s %(installdir)s/lib64/libmpigc4.so %(installdir)s/lib64/libmpichcxx.so', + 'ln -s %(installdir)s/lib64/libmpigf.so %(installdir)s/lib64/libfmpich.so', + 'ln -s %(installdir)s/lib64/libmpigf.so %(installdir)s/lib64/libmpichf90.so', + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libmpl.so', + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libopa.so' +] + +moduleclass = 'mpi' -- GitLab From 749d56ab211ddd8057a56eea9b420c6044060299 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 7 Sep 2016 11:36:33 +0200 Subject: [PATCH 228/741] Eigen is just a build dep --- .../y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb index a7a4e68aef..c741427654 100644 --- a/easybuild/easyconfigs/y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/y/Yade/Yade-2016.06a-intel-2016b-Python-2.7.12.eb @@ -19,7 +19,6 @@ patches = ['Yade-%(version)s_include-signal.patch'] dependencies = [ ('Boost', '1.61.0', versionsuffix), ('CGAL', '4.8.1', versionsuffix), - ('Eigen', '3.2.9'), ('GDB', '7.11.1', versionsuffix), ('GL2PS', '1.3.9'), ('GTS', '0.7.6'), @@ -36,7 +35,10 @@ dependencies = [ ('zlib', '1.2.8'), ] -builddependencies = [('CMake', '3.6.1')] +builddependencies = [ + ('CMake', '3.6.1'), + ('Eigen', '3.2.9'), +] separate_build_dir = True -- GitLab From aa186c651730bde4c29415be4336de340d54b097 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 13:02:40 +0200 Subject: [PATCH 229/741] FFmpeg 3.0.2 compiled using the foss 2016a toolchain. --- .../f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb new file mode 100644 index 0000000000..ee76ecf0f8 --- /dev/null +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'FFmpeg' +version = '3.0.2' + +homepage = 'https://www.ffmpeg.org/' +description = """A complete, cross-platform solution to record, convert and stream audio and video.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://ffmpeg.org/releases/'] + +dependencies = [ + ('NASM', '2.12.01'), + ('zlib', '1.2.8'), + ('x264', '20160430'), +] + +configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' +configopts += '--enable-libx264' + +sanity_check_paths = { + 'files': ['bin/ff%s' % x for x in ['mpeg', 'probe', 'server']] + + ['lib/lib%s.%s' % (x, y) for x in ['avdevice', 'avfilter', 'avformat', 'avcodec', 'postproc', + 'swresample', 'swscale', 'avutil'] for y in [SHLIB_EXT, 'a']], + 'dirs': ['include'] +} + +moduleclass = 'vis' -- GitLab From a24fb94313549008275572cb13f21b3cddd2f925 Mon Sep 17 00:00:00 2001 From: ocaisa Date: Wed, 7 Sep 2016 13:09:25 +0200 Subject: [PATCH 230/741] Statically link ncurses... so it's not needed at runtime --- easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb b/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb index b4e0ad7225..08e21adb47 100644 --- a/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb +++ b/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb @@ -16,7 +16,10 @@ toolchain = {'name': 'dummy', 'version': ''} sources = ['lua-%s.tar.gz' % version.replace('-', '.')] source_urls = ['http://sourceforge.net/projects/lmod/files/'] -dependencies = [('ncurses', '6.0')] +builddependencies = [('ncurses', '6.0')] + +# Use static linking for ncurses so it's not a runtime dep +configopts = "--with-static=yes" sanity_check_paths = { 'files': ["bin/lua"], -- GitLab From 19f0b03e3db99984c2786aa7afdda9a6d23ef0ee Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 7 Sep 2016 13:20:20 +0200 Subject: [PATCH 231/741] Remove versionmajor --- .../easyconfigs/p/PyQt5/PyQt5-5.7-foss-2016a-Python-2.7.11.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/PyQt5/PyQt5-5.7-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.7-foss-2016a-Python-2.7.11.eb index 6cc9d5dd83..5f366cc75c 100644 --- a/easybuild/easyconfigs/p/PyQt5/PyQt5-5.7-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/p/PyQt5/PyQt5-5.7-foss-2016a-Python-2.7.11.eb @@ -22,7 +22,7 @@ configopts = "configure.py --confirm-license" configopts += " --destdir=%(installdir)s/lib/python%(pyshortver)s/site-packages " configopts += " --no-sip-files" -options = {'modulename': '%(name)s%(version_major)s'} +options = {'modulename': '%(name)s'} modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} -- GitLab From 32669a4f286050f00bef6cb0603495d489b26e27 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 7 Sep 2016 14:54:03 +0200 Subject: [PATCH 232/741] add easyconfig MATLAB-2016a.eb --- .../easyconfigs/m/MATLAB/MATLAB-2016a.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/m/MATLAB/MATLAB-2016a.eb diff --git a/easybuild/easyconfigs/m/MATLAB/MATLAB-2016a.eb b/easybuild/easyconfigs/m/MATLAB/MATLAB-2016a.eb new file mode 100644 index 0000000000..e0113113d0 --- /dev/null +++ b/easybuild/easyconfigs/m/MATLAB/MATLAB-2016a.eb @@ -0,0 +1,20 @@ +name = 'MATLAB' +version = '2016a' + +homepage = 'http://www.mathworks.com/products/matlab' +description = """MATLAB is a high-level language and interactive environment + that enables you to perform computationally intensive tasks faster than with + traditional programming languages such as C, C++, and Fortran.""" + +toolchain = {'name': 'dummy', 'version': ''} + +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('Java', '1.8.0_92')] + +import os +license_server = os.getenv('EB_MATLAB_LICENSE_SERVER', 'license.example.com') +license_server_port = os.getenv('EB_MATLAB_LICENSE_SERVER_PORT', '00000') +key = os.getenv('EB_MATLAB_KEY', '00000-00000-00000-00000-00000-00000-00000-00000-00000-00000') + +moduleclass = 'math' -- GitLab From 87102006dd97c02ed329be8ba8406fd2f617d478 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 15:37:55 +0200 Subject: [PATCH 233/741] Added bzip2 and libxcb dependencies, which are pulled in by FFmpeg if available. --- easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb | 2 ++ easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb | 2 ++ easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb index ee76ecf0f8..4eee74c062 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-foss-2016a.eb @@ -14,7 +14,9 @@ source_urls = ['http://ffmpeg.org/releases/'] dependencies = [ ('NASM', '2.12.01'), ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), ('x264', '20160430'), + ('libxcb', '1.11.1'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb index fb0c75a29b..e54dddf525 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb @@ -14,7 +14,9 @@ source_urls = ['http://ffmpeg.org/releases/'] dependencies = [ ('NASM', '2.12.01'), ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), ('x264', '20160430'), + ('libxcb', '1.11.1'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb index 4dee167c84..ee98b51ed2 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb @@ -12,9 +12,11 @@ sources = [SOURCELOWER_TAR_BZ2] source_urls = ['http://ffmpeg.org/releases/'] dependencies = [ - ('NASM', '2.12.02'), + ('NASM', '2.12.01'), ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), ('x264', '20160614'), + ('libxcb', '1.11.1'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' -- GitLab From 4e48ef9ed080c2fea438d27d1c1ed0441fd89d81 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 15:40:10 +0200 Subject: [PATCH 234/741] Replaced 'so' by SHLIB_EXT --- easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb | 2 +- easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb index e54dddf525..fd22efefe0 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.0.2-intel-2016a.eb @@ -25,7 +25,7 @@ configopts += '--enable-libx264' sanity_check_paths = { 'files': ['bin/ff%s' % x for x in ['mpeg', 'probe', 'server']] + ['lib/lib%s.%s' % (x, y) for x in ['avdevice', 'avfilter', 'avformat', 'avcodec', 'postproc', - 'swresample', 'swscale', 'avutil'] for y in ['so', 'a']], + 'swresample', 'swscale', 'avutil'] for y in [SHLIB_EXT, 'a']], 'dirs': ['include'] } diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb index ee98b51ed2..07da64a12f 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb @@ -25,7 +25,7 @@ configopts += '--enable-libx264' sanity_check_paths = { 'files': ['bin/ff%s' % x for x in ['mpeg', 'probe', 'server']] + ['lib/lib%s.%s' % (x, y) for x in ['avdevice', 'avfilter', 'avformat', 'avcodec', 'postproc', - 'swresample', 'swscale', 'avutil'] for y in ['so', 'a']], + 'swresample', 'swscale', 'avutil'] for y in [SHLIB_EXT, 'a']], 'dirs': ['include'] } -- GitLab From e7b4997128a920299cdc321af07fd75596fb28ea Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 15:44:02 +0200 Subject: [PATCH 235/741] Undid an accidental version change in NASM. --- easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb index 07da64a12f..55a07fcd2a 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb @@ -12,7 +12,7 @@ sources = [SOURCELOWER_TAR_BZ2] source_urls = ['http://ffmpeg.org/releases/'] dependencies = [ - ('NASM', '2.12.01'), + ('NASM', '2.12.02'), ('zlib', '1.2.8'), ('bzip2', '1.0.6'), ('x264', '20160614'), -- GitLab From 0b2586a18f6c528a97505b9061cf26c11edec606 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 15:53:50 +0200 Subject: [PATCH 236/741] Changed libxcb into X11, which includes libxcb. --- easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb index 55a07fcd2a..53b2bbfa0a 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb @@ -16,7 +16,7 @@ dependencies = [ ('zlib', '1.2.8'), ('bzip2', '1.0.6'), ('x264', '20160614'), - ('libxcb', '1.11.1'), + (('X11', '20160819'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' -- GitLab From ee63f8258b912c1424bb1b3b2ae262cc7590fd4c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 7 Sep 2016 16:01:19 +0200 Subject: [PATCH 237/741] add easyconfig PIL-1.1.7-intel-2016b-Python-2.7.12.eb --- .../PIL-1.1.7-intel-2016b-Python-2.7.12.eb | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 easybuild/easyconfigs/p/PIL/PIL-1.1.7-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/p/PIL/PIL-1.1.7-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/PIL/PIL-1.1.7-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..1e4d5e4103 --- /dev/null +++ b/easybuild/easyconfigs/p/PIL/PIL-1.1.7-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,32 @@ +easyblock = 'PythonPackage' + +name = 'PIL' +version = '1.1.7' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.pythonware.com/products/pil' +description = """The Python Imaging Library (PIL) adds image processing capabilities to your Python interpreter. + This library supports many file formats, and provides powerful image processing and graphics capabilities.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://effbot.org/downloads/'] +sources = ['Imaging-%(version)s.tar.gz'] + +patches = ['PIL-%(version)s-find-deps.patch'] + +dependencies = [ + ('zlib', '1.2.8'), + ('Python', '2.7.12'), + ('libjpeg-turbo', '1.5.0'), + ('freetype', '2.6.5'), +] + +options = {'modulename': 'PIL'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['bin', 'lib/python%(pyshortver)s/site-packages/%(name)s'], +} + +moduleclass = 'vis' -- GitLab From d802e6b9ce5116ac0f7c44e1c230c173ba0a11e3 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 7 Sep 2016 16:07:39 +0200 Subject: [PATCH 238/741] Add M4 as a dep of flex, this is required by some config processes when working with lex --- easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb | 5 ++++- easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb | 5 ++++- 14 files changed, 56 insertions(+), 14 deletions(-) diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb index 3626cfd239..9a286850a4 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb index 4015f41291..155b9e6155 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb @@ -11,7 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb index 0b38c37169..d1a9375e34 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb @@ -11,7 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb index e1a9437774..d5c3db995c 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb @@ -11,7 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.26', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb index 299747415e..2801060df2 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb @@ -11,7 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.26', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb index 687cf19d5f..a0f6f0c641 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb @@ -11,7 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.27', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb index 76aba74a8b..239f478236 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb @@ -11,7 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.27', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb index bd783441d3..621cdb0aaf 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb index 13ec4d5ea6..5969d1e4b9 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb index a59cd4005e..d24b602e70 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb index c2677565b5..e6510e7ef7 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb index c3e7a6b965..59f659121c 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb index f451c3ed90..ee500a048e 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb index 39937675eb..acc1431c3f 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb @@ -11,6 +11,9 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [('Bison', '3.0.4')] +dependencies = [ + ('Bison', '3.0.4'), + ('M4', '1.4.17') +] moduleclass = 'lang' -- GitLab From 22f35e4292e5760dc0b04b4ade83a6c9d6371b50 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 16:21:40 +0200 Subject: [PATCH 239/741] Fixed typo. --- easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb index 53b2bbfa0a..0744eae109 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-3.1.3-intel-2016b.eb @@ -16,7 +16,7 @@ dependencies = [ ('zlib', '1.2.8'), ('bzip2', '1.0.6'), ('x264', '20160614'), - (('X11', '20160819'), + ('X11', '20160819'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' -- GitLab From a22bc690d3a64cf393d846c18c4c4220ed6e3cd0 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 7 Sep 2016 16:30:47 +0200 Subject: [PATCH 240/741] Add libreadline dep to Lua for static build --- easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb | 5 ++- .../l/libreadline/libreadline-6.3.eb | 31 +++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb diff --git a/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb b/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb index 08e21adb47..08d864aaf6 100644 --- a/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb +++ b/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb @@ -16,7 +16,10 @@ toolchain = {'name': 'dummy', 'version': ''} sources = ['lua-%s.tar.gz' % version.replace('-', '.')] source_urls = ['http://sourceforge.net/projects/lmod/files/'] -builddependencies = [('ncurses', '6.0')] +builddependencies = [ + ('ncurses', '6.0'), + ('libreadline', '6.3') +] # Use static linking for ncurses so it's not a runtime dep configopts = "--with-static=yes" diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb new file mode 100644 index 0000000000..53eeab2af9 --- /dev/null +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'libreadline' +version = '6.3' + +homepage = 'http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html' +description = """The GNU Readline library provides a set of functions for use by applications that + allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. + The Readline library includes additional functions to maintain a list of previously-entered command lines, + to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" + +toolchain = {'name': 'dummy', 'version': ''} + +sources = ['readline-%(version)s.tar.gz'] +source_urls = ['http://ftp.gnu.org/gnu/readline'] + +patches = ['libreadline-%(version)s-bugfix.patch'] + +dependencies = [('ncurses', '6.0')] + +# for the termcap symbols, use EB ncurses +preconfigopts = "env LDFLAGS='-lncurses'" + +sanity_check_paths = { + 'files': ['lib/libreadline.a', 'lib/libhistory.a'] + + ['include/readline/%s' % x for x in ['chardefs.h', 'history.h', 'keymaps.h', 'readline.h', 'rlconf.h', + 'rlstdc.h', 'rltypedefs.h', 'tilde.h']], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From f2e026ccce99dd60f6d44e74000ac3f9007c5e84 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 7 Sep 2016 16:52:22 +0200 Subject: [PATCH 241/741] Added zlib2 and libxcb as dependencies. Changed 'so' into SHLIB_EXT. --- easybuild/easyconfigs/f/FFmpeg/FFmpeg-0.10.16-intel-2016a.eb | 4 +++- easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.6-intel-2016a.eb | 4 +++- easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-foss-2016a.eb | 2 ++ easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-intel-2016a.eb | 4 +++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-0.10.16-intel-2016a.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-0.10.16-intel-2016a.eb index 3e71d0c50e..36e057b469 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-0.10.16-intel-2016a.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-0.10.16-intel-2016a.eb @@ -16,7 +16,9 @@ source_urls = ['http://ffmpeg.org/releases/'] dependencies = [ ('NASM', '2.11.08'), ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), ('x264', '20160114'), + ('libxcb', '1.11.1'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' @@ -25,7 +27,7 @@ configopts += '--enable-libx264' sanity_check_paths = { 'files': ['bin/ff%s' % x for x in ['mpeg', 'probe', 'server']] + ['lib/lib%s.%s' % (x, y) for x in ['avdevice', 'avfilter', 'avformat', 'avcodec', 'postproc', - 'swresample', 'swscale', 'avutil'] for y in ['so', 'a']], + 'swresample', 'swscale', 'avutil'] for y in [SHLIB_EXT, 'a']], 'dirs': ['include'] } diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.6-intel-2016a.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.6-intel-2016a.eb index 40be8fe314..3349ed3961 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.6-intel-2016a.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.6-intel-2016a.eb @@ -14,7 +14,9 @@ source_urls = ['http://ffmpeg.org/releases/'] dependencies = [ ('NASM', '2.11.08'), ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), ('x264', '20160114'), + ('libxcb', '1.11.1'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' @@ -23,7 +25,7 @@ configopts += '--enable-libx264' sanity_check_paths = { 'files': ['bin/ff%s' % x for x in ['mpeg', 'probe', 'server']] + ['lib/lib%s.%s' % (x, y) for x in ['avdevice', 'avfilter', 'avformat', 'avcodec', 'postproc', - 'swresample', 'swscale', 'avutil'] for y in ['so', 'a']], + 'swresample', 'swscale', 'avutil'] for y in [SHLIB_EXT, 'a']], 'dirs': ['include'] } diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-foss-2016a.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-foss-2016a.eb index 0badebf4eb..8664387506 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-foss-2016a.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-foss-2016a.eb @@ -14,7 +14,9 @@ source_urls = ['http://ffmpeg.org/releases/'] dependencies = [ ('NASM', '2.12.01'), ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), ('x264', '20160430'), + ('libxcb', '1.11.1'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' diff --git a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-intel-2016a.eb b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-intel-2016a.eb index 05478ccada..c6c61c7b35 100644 --- a/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-intel-2016a.eb +++ b/easybuild/easyconfigs/f/FFmpeg/FFmpeg-2.8.7-intel-2016a.eb @@ -14,7 +14,9 @@ source_urls = ['http://ffmpeg.org/releases/'] dependencies = [ ('NASM', '2.12.01'), ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), ('x264', '20160430'), + ('libxcb', '1.11.1'), ] configopts = '--enable-pic --enable-shared --enable-gpl --enable-version3 --enable-nonfree --cc="$CC" --cxx="$CXX" ' @@ -23,7 +25,7 @@ configopts += '--enable-libx264' sanity_check_paths = { 'files': ['bin/ff%s' % x for x in ['mpeg', 'probe', 'server']] + ['lib/lib%s.%s' % (x, y) for x in ['avdevice', 'avfilter', 'avformat', 'avcodec', 'postproc', - 'swresample', 'swscale', 'avutil'] for y in ['so', 'a']], + 'swresample', 'swscale', 'avutil'] for y in [SHLIB_EXT, 'a']], 'dirs': ['include'] } -- GitLab From 45c4c8e9b9485e25500fff7fc2f315c3108d2c4e Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 7 Sep 2016 17:31:05 +0200 Subject: [PATCH 242/741] Add pkg-config to solve libtinfo problem related to ncurses --- easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb | 1 + .../l/libreadline/libreadline-6.3.eb | 1 + .../easyconfigs/n/ncurses/ncurses-6.0.eb | 2 ++ .../p/pkg-config/pkg-config-0.29.eb | 27 +++++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.eb diff --git a/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb b/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb index 08d864aaf6..8a6c29fb66 100644 --- a/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb +++ b/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb @@ -17,6 +17,7 @@ sources = ['lua-%s.tar.gz' % version.replace('-', '.')] source_urls = ['http://sourceforge.net/projects/lmod/files/'] builddependencies = [ + ('pkg-config', '0.29'), ('ncurses', '6.0'), ('libreadline', '6.3') ] diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb index 53eeab2af9..323eaa8c72 100644 --- a/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb @@ -16,6 +16,7 @@ source_urls = ['http://ftp.gnu.org/gnu/readline'] patches = ['libreadline-%(version)s-bugfix.patch'] +builddependencies = [('pkg-config', '0.29')] dependencies = [('ncurses', '6.0')] # for the termcap symbols, use EB ncurses diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb index 51d2a6f539..0709b71444 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb @@ -14,6 +14,8 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +builddependencies = [('pkg-config', '0.29')] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.eb b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.eb new file mode 100644 index 0000000000..4302c5e3ae --- /dev/null +++ b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'pkg-config' +version = '0.29' + +homepage = 'http://www.freedesktop.org/wiki/Software/pkg-config/' +description = """pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the + correct compiler options on the command line so an application can use + gcc -o test test.c `pkg-config --libs --cflags glib-2.0` + for instance, rather than hard-coding values on where to find glib (or other libraries).""" + +toolchain = {'name': 'dummy', 'version': ''} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://pkgconfig.freedesktop.org/releases/'] + +# don't use PAX, it might break. +tar_config_opts = True + +configopts = " --with-internal-glib" + +sanity_check_paths = { + 'files': ['bin/pkg-config'], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From 81c99726ddb1e84b1866404c7166c648d2741840 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 09:20:26 +0200 Subject: [PATCH 243/741] add easyconfig POV-Ray-3.7.0.0-intel-2016b.eb, add easyconfig SDL2-2.0.4-intel-2016b.eb --- .../p/POV-Ray/POV-Ray-3.7.0.0-intel-2016b.eb | 56 +++++++++++++++++++ .../POV-Ray-3.7.0.0_fix-boost-linking.patch | 30 ++++++++++ .../s/SDL2/SDL2-2.0.4-intel-2016b.eb | 35 ++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 easybuild/easyconfigs/p/POV-Ray/POV-Ray-3.7.0.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/p/POV-Ray/POV-Ray-3.7.0.0_fix-boost-linking.patch create mode 100644 easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb diff --git a/easybuild/easyconfigs/p/POV-Ray/POV-Ray-3.7.0.0-intel-2016b.eb b/easybuild/easyconfigs/p/POV-Ray/POV-Ray-3.7.0.0-intel-2016b.eb new file mode 100644 index 0000000000..b01bff9fa6 --- /dev/null +++ b/easybuild/easyconfigs/p/POV-Ray/POV-Ray-3.7.0.0-intel-2016b.eb @@ -0,0 +1,56 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'POV-Ray' +version = '3.7.0.0' + +homepage = 'http://www.povray.org/' +description = """The Persistence of Vision Raytracer, or POV-Ray, is a ray tracing program + which generates images from a text-based scene description, and is available for a variety + of computer platforms. POV-Ray is a high-quality, Free Software tool for creating stunning + three-dimensional graphics. The source code is available for those wanting to do their own ports.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/POV-Ray/povray/archive/'] +patches = ['POV-Ray-%(version)s_fix-boost-linking.patch'] + +dependencies = [ + ('Boost', '1.61.0'), + ('zlib', '1.2.8'), + ('libpng', '1.6.24'), + ('libjpeg-turbo', '1.5.0'), + ('X11', '20160819'), + ('LibTIFF', '4.0.6'), + ('SDL2', '2.0.4'), +] +builddependencies = [('Autotools', '20150215')] + +preconfigopts = "cd unix && sed -i 's/^automake/automake --add-missing; automake/g' prebuild.sh && " +preconfigopts += " ./prebuild.sh && cd .. && " +configopts = "COMPILED_BY='EasyBuild' " +configopts += "--with-boost=$EBROOTBOOST --with-zlib=$EBROOTZLIB --with-libpng=$EBROOTLIBPNG " +configopts += "--with-libtiff=$EBROOTLIBTIFF --with-libjpeg=$EBROOTLIBJPEGMINTURBO --with-libsdl=$EBROOTSDL2 " +# configopts += " --with-libmkl=DIR " ## upstream needs to fix this, still in BETA + +runtest = 'check' + +sanity_check_paths = { + 'files': ['bin/povray'], + 'dirs': ['etc/povray/%(version_major_minor)s', 'share'] +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/POV-Ray/POV-Ray-3.7.0.0_fix-boost-linking.patch b/easybuild/easyconfigs/p/POV-Ray/POV-Ray-3.7.0.0_fix-boost-linking.patch new file mode 100644 index 0000000000..aac9faf990 --- /dev/null +++ b/easybuild/easyconfigs/p/POV-Ray/POV-Ray-3.7.0.0_fix-boost-linking.patch @@ -0,0 +1,30 @@ +also include -lboost_system when linking with -lboost_thread +cfr. https://build.opensuse.org/package/view_file/openSUSE:Leap:42.1:NonFree/povray/povray-3.6.9.7-boost-link.patch?expand=1 +--- povray-3.7.0.0/unix/config/ax_boost_thread.m4.orig 2013-11-06 21:28:15.000000000 +0100 ++++ povray-3.7.0.0/unix/config/ax_boost_thread.m4 2016-09-07 18:26:36.447847499 +0200 +@@ -104,14 +104,14 @@ + for libextension in `ls $BOOSTLIBDIR/libboost_thread*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.a*$;\1;'`; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, +- [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], ++ [BOOST_THREAD_LIB="-l$ax_lib -lboost_system"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [link_thread="no"]) + done + if test "x$link_thread" != "xyes"; then + for libextension in `ls $BOOSTLIBDIR/boost_thread*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.a*$;\1;'` ; do + ax_lib=${libextension} + AC_CHECK_LIB($ax_lib, exit, +- [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], ++ [BOOST_THREAD_LIB="-l$ax_lib -lboost_system"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [link_thread="no"]) + done + fi +@@ -119,7 +119,7 @@ + else + for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do + AC_CHECK_LIB($ax_lib, exit, +- [BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], ++ [BOOST_THREAD_LIB="-l$ax_lib -lboost_system"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break], + [link_thread="no"]) + done + diff --git a/easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb b/easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb new file mode 100644 index 0000000000..b1bfaa43d3 --- /dev/null +++ b/easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb @@ -0,0 +1,35 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'SDL2' +version = '2.0.4' + +homepage = 'http://www.libsdl.org/' +description = "SDL: Simple DirectMedia Layer, a cross-platform multimedia library" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.libsdl.org/release/'] +sources = [SOURCE_TAR_GZ] + +builddependencies = [('Yasm', '1.3.0')] + +configopts = ' --disable-nasm --without-x ' + +sanity_check_paths = { + 'files': ['bin/sdl2-config', 'lib/libSDL2.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From 66405bd372a5472e691fab9e7e8637af6cc7ec23 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Thu, 8 Sep 2016 09:53:26 +0200 Subject: [PATCH 244/741] Version of OpenCV using the foss 2016a toolchain. Gstreamer has been added as an extra dependency compared to the intel 2016a toolchain. --- .../o/OpenCV/OpenCV-3.1.0-foss-2016a.eb | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenCV/OpenCV-3.1.0-foss-2016a.eb diff --git a/easybuild/easyconfigs/o/OpenCV/OpenCV-3.1.0-foss-2016a.eb b/easybuild/easyconfigs/o/OpenCV/OpenCV-3.1.0-foss-2016a.eb new file mode 100644 index 0000000000..f835d278f9 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenCV/OpenCV-3.1.0-foss-2016a.eb @@ -0,0 +1,67 @@ +easyblock = 'CMakeMake' + +name = 'OpenCV' +version = '3.1.0' + +homepage = 'http://opencv.org/' +description = """OpenCV (Open Source Computer Vision Library) is an open source computer vision + and machine learning software library. OpenCV was built to provide + a common infrastructure for computer vision applications and to accelerate + the use of machine perception in the commercial products.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/Itseez/opencv/archive/'] +sources = ['%(version)s.zip'] + +builddependencies = [ + ('CMake', '3.5.2'), +] + +dependencies = [ + ('Python', '2.7.11'), + ('zlib', '1.2.8'), + ('FFmpeg', '3.0.2'), + ('libjpeg-turbo', '1.4.2', '-NASM-2.12.01'), + ('libpng', '1.6.21'), + ('LibTIFF', '4.0.6'), + ('JasPer', '1.900.1'), + ('Java', '1.8.0_92', '', True), + ('ant', '1.9.7', '-Java-%(javaver)s', True), + ('GLib', '2.48.0'), + ('GTK+', '2.24.30'), + ('GStreamer', '1.6.4'), + ('GST-plugins-base', '1.6.4'), +] + +configopts = '-DCMAKE_BUILD_TYPE=RELEASE ' +configopts += '-DBUILD_PYTHON_SUPPORT=ON ' +configopts += '-DPYTHON_PACKAGES_PATH=%(installdir)s/lib/python%(pyshortver)s/site-packages ' +configopts += '-DBUILD_NEW_PYTHON_SUPPORT=ON ' +configopts += '-DZLIB_LIBRARY=$EBROOTZLIB/lib/libz.%s ' % SHLIB_EXT +configopts += '-DZLIB_INCLUDE_DIR=$EBROOTZLIB/include ' +configopts += '-DTIFF_LIBRARY=$EBROOTLIBTIFF/lib/libtiff.%s ' % SHLIB_EXT +configopts += '-DTIFF_INCLUDE_DIR=$EBROOTLIBTIFF/include ' +configopts += '-DPNG_LIBRARY=$EBROOTLIBPNG/lib/libpng.%s ' % SHLIB_EXT +configopts += '-DPNG_INCLUDE_DIR=$EBROOTLIBPNG/include ' +configopts += '-DJPEG_LIBRARY=$EBROOTLIBJPEGMINTURBO/lib/libjpeg.%s ' % SHLIB_EXT +configopts += '-DJPEG_INCLUDE_DIR=$EBROOTLIBJPEGMINTURBO/include ' +configopts += '-DJASPER_LIBRARY=$EBROOTJASPER/lib/libjasper.a ' +configopts += '-DJASPER_INCLUDE_DIR=$EBROOTJASPER/include ' +configopts += '-DWITH_IPP=ON ' +configopts += '-DENABLE_SSE=ON -DENABLE_SSE2=ON -DENABLE_SSE3=ON ' +configopts += '-DWITH_CUDA=OFF ' + +sanity_check_paths = { + 'files': ['lib/libopencv_core.%s' % SHLIB_EXT ] + + ['lib/python%%(pyshortver)s/site-packages/cv2.%s' % SHLIB_EXT ] + + ['bin/opencv_%s' % x for x in ['annotation', 'createsamples', 'traincascade']], + 'dirs': ['include'] +} + +modextrapaths = { + 'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages', + 'CLASSPATH': 'share/OpenCV/java', +} + +moduleclass = 'vis' -- GitLab From df85fb067a882bf3dcbf91742af583b832ba1a55 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 10:09:50 +0200 Subject: [PATCH 245/741] add easyconfig Blender-2.77a-intel-2016b-Python-3.5.2.eb, add easyconfig OpenImageIO-1.6.17-intel-2016b.eb, add easyconfig OpenEXR-2.2.0-intel-2016b.eb --- .../Blender-2.77a-intel-2016b-Python-3.5.2.eb | 51 +++++++++++++++++++ .../Blender-2.77a_fix-ARRAY_SIZE-icc.patch | 13 +++++ .../o/OpenEXR/OpenEXR-2.2.0-intel-2016b.eb | 32 ++++++++++++ .../OpenImageIO-1.6.17-intel-2016b.eb | 32 ++++++++++++ 4 files changed, 128 insertions(+) create mode 100644 easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/b/Blender/Blender-2.77a_fix-ARRAY_SIZE-icc.patch create mode 100644 easybuild/easyconfigs/o/OpenEXR/OpenEXR-2.2.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/o/OpenImageIO/OpenImageIO-1.6.17-intel-2016b.eb diff --git a/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..88adcef860 --- /dev/null +++ b/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,51 @@ +easyblock = 'CMakeMake' + +name = 'Blender' +version = '2.77a' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://www.blender.org/' +description = """Blender is the free and open source 3D creation suite. It supports + the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, + compositing and motion tracking, even video editing and game creation.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://download.blender.org/source/'] +patches = ['Blender-%(version)s_fix-ARRAY_SIZE-icc.patch'] + +# These are needed until extra dependencies are added for them to work +configopts = '-DWITH_INSTALL_PORTABLE=OFF ' +configopts += '-DWITH_BUILDINFO=OFF ' +configopts += '-DWITH_GAMEENGINE=OFF ' +#configopts += '-DWITH_CYCLES=OFF ' +configopts += '-DWITH_SYSTEM_GLEW=OFF ' + +# Python paths +configopts += '-DPYTHON_VERSION=%(pyshortver)s -DPYTHON_LIBRARY=${EBROOTPYTHON}/lib/libpython%(pyshortver)sm.so ' +configopts += '-DPYTHON_INCLUDE_DIR=${EBROOTPYTHON}/include/python%(pyshortver)sm ' +configopts += '-DOPENEXR_INCLUDE_DIR=$EBROOTOPENEXR/include ' + +dependencies = [ + ('Python', '3.5.2'), + ('Boost', '1.61.0'), + ('libjpeg-turbo', '1.5.0'), + ('zlib', '1.2.8'), + ('X11', '20160819'), + ('Mesa', '12.0.2'), + ('OpenImageIO', '1.6.17'), # required for cycles render engine +] + +builddependencies = [('CMake', '3.6.1')] + +separate_build_dir = 'True' + +modextravars = {'GALLIUM_DRIVER': 'swr'} + +sanity_check_paths = { + 'files': ['bin/blender'], + 'dirs': [] +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/b/Blender/Blender-2.77a_fix-ARRAY_SIZE-icc.patch b/easybuild/easyconfigs/b/Blender/Blender-2.77a_fix-ARRAY_SIZE-icc.patch new file mode 100644 index 0000000000..2cc57b24de --- /dev/null +++ b/easybuild/easyconfigs/b/Blender/Blender-2.77a_fix-ARRAY_SIZE-icc.patch @@ -0,0 +1,13 @@ +use simple definition of ARRAY_SIZE macro when using Intel compilers +author: Kenneth Hoste (HPC-UGent) +--- blender-2.77a/source/blender/blenlib/BLI_utildefines.h.orig 2016-09-07 14:21:00.287130174 +0200 ++++ blender-2.77a/source/blender/blenlib/BLI_utildefines.h 2016-09-07 14:21:08.087031653 +0200 +@@ -435,7 +435,7 @@ + } (void)0 + + /* assuming a static array */ +-#if defined(__GNUC__) && !defined(__cplusplus) && !defined(__clang__) ++#if defined(__GNUC__) && !defined(__cplusplus) && !defined(__clang__) && !defined(__INTEL_COMPILER) + # define ARRAY_SIZE(arr) \ + ((sizeof(struct {int isnt_array : ((const void *)&(arr) == &(arr)[0]);}) * 0) + \ + (sizeof(arr) / sizeof(*(arr)))) diff --git a/easybuild/easyconfigs/o/OpenEXR/OpenEXR-2.2.0-intel-2016b.eb b/easybuild/easyconfigs/o/OpenEXR/OpenEXR-2.2.0-intel-2016b.eb new file mode 100644 index 0000000000..479f9021ce --- /dev/null +++ b/easybuild/easyconfigs/o/OpenEXR/OpenEXR-2.2.0-intel-2016b.eb @@ -0,0 +1,32 @@ +easyblock = 'CMakeMake' + +name = 'OpenEXR' +version = '2.2.0' + +homepage = 'http://www.openexr.com/' +description = """OpenEXR is a high dynamic-range (HDR) image file format developed by Industrial Light & Magic + for use in computer imaging applications""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/openexr/openexr/archive/'] +sources = ['v%(version)s.tar.gz'] + +builddependencies = [('CMake', '3.6.1')] + +env_vars = "CPATH=%(installdir)s/include/OpenEXR:$CPATH " +env_vars += "LIBRARY_PATH=%(installdir)s/lib:$LIBRARY_PATH " +env_vars += "LD_LIBRARY_PATH=%(installdir)s/lib:$LD_LIBRARY_PATH" +preconfigopts = [ + "cd IlmBase && ", + "cd OpenEXR && " + env_vars, +] +prebuildopts = preconfigopts[:] +preinstallopts = preconfigopts[:] + +sanity_check_paths = { + 'files': ['lib/libHalf.so'], + 'dirs': ['bin', 'include/OpenEXR', 'share'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/o/OpenImageIO/OpenImageIO-1.6.17-intel-2016b.eb b/easybuild/easyconfigs/o/OpenImageIO/OpenImageIO-1.6.17-intel-2016b.eb new file mode 100644 index 0000000000..7e6e2a6a22 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenImageIO/OpenImageIO-1.6.17-intel-2016b.eb @@ -0,0 +1,32 @@ +easyblock = 'CMakeMake' + +name = 'OpenImageIO' +version = '1.6.17' + +homepage = 'http://openimageio.org/' +description = """OpenImageIO is a library for reading and writing images, and a bunch of related classes, utilities, + and applications.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/OpenImageIO/oiio/archive/'] +sources = ['Release-%(version)s.tar.gz'] + +dependencies = [ + ('Boost', '1.61.0'), + ('libjpeg-turbo', '1.5.0'), + ('LibTIFF', '4.0.6'), + ('OpenEXR', '2.2.0'), +] +builddependencies = [('CMake', '3.6.1')] + +separate_build_dir = True + +configopts = '-DSTOP_ON_WARNING=OFF' + +sanity_check_paths = { + 'files': ['bin/oiiotool', 'lib/libOpenImageIO.so', 'lib/libOpenImageIO_Util.so'], + 'dirs': ['include/OpenImageIO', 'share'], +} + +moduleclass = 'lib' -- GitLab From 5e436c74010cf65b8c43ffcda70326bf91db2ae5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 10:25:49 +0200 Subject: [PATCH 246/741] fix remarks, drop Yasm build dep since it's not required --- easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb b/easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb index b1bfaa43d3..9d089f04eb 100644 --- a/easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb +++ b/easybuild/easyconfigs/s/SDL2/SDL2-2.0.4-intel-2016b.eb @@ -23,9 +23,9 @@ toolchain = {'name': 'intel', 'version': '2016b'} source_urls = ['http://www.libsdl.org/release/'] sources = [SOURCE_TAR_GZ] -builddependencies = [('Yasm', '1.3.0')] - -configopts = ' --disable-nasm --without-x ' +dependencies = [ + ('X11', '20160819'), +] sanity_check_paths = { 'files': ['bin/sdl2-config', 'lib/libSDL2.%s' % SHLIB_EXT], -- GitLab From e6c16c0060ad11f6f4ce3baba0c6de64acbd4ca8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 11:00:50 +0200 Subject: [PATCH 247/741] drop commented out configure option --- .../b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb index 88adcef860..e84bfbddb5 100644 --- a/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb @@ -19,7 +19,6 @@ patches = ['Blender-%(version)s_fix-ARRAY_SIZE-icc.patch'] configopts = '-DWITH_INSTALL_PORTABLE=OFF ' configopts += '-DWITH_BUILDINFO=OFF ' configopts += '-DWITH_GAMEENGINE=OFF ' -#configopts += '-DWITH_CYCLES=OFF ' configopts += '-DWITH_SYSTEM_GLEW=OFF ' # Python paths -- GitLab From ea7488eb266804bc9084643e1538668d24bdef33 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 8 Sep 2016 11:43:58 +0200 Subject: [PATCH 248/741] Add scikit-learn/0.17.1-intel-2016b-Python-2.7.12 --- ...-learn-0.17.1-intel-2016b-Python-2.7.12.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..8bee613d8e --- /dev/null +++ b/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,30 @@ +easyblock = 'PythonPackage' + +name = 'scikit-learn' +version = '0.17.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://scikit-learn.org/stable/index.html' +description = """Scikit-learn integrates machine learning algorithms in the tightly-knit scientific Python world, +building upon numpy, scipy, and matplotlib. As a machine-learning module, +it provides versatile tools for data mining and analysis in any field of science and engineering. +It strives to be simple and efficient, accessible to everybody, and reusable in various contexts.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('matplotlib', '1.5.2', versionsuffix), +] + +options = {'modulename': 'sklearn'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/sklearn'], +} + +moduleclass = 'data' -- GitLab From 351c4a1f74acfba899d222b9b555c8b29a1d31c5 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 7 Sep 2016 17:31:05 +0200 Subject: [PATCH 249/741] Add configure option to solve libtinfo problem related to ncurses --- easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb index 51d2a6f539..fc2dde62d1 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb @@ -16,9 +16,9 @@ sources = [SOURCE_TAR_GZ] configopts = [ # default build - '--with-shared --enable-overwrite', + '--with-shared --enable-overwrite --with-termlib', # the UTF-8 enabled version (ncursesw) - '--with-shared --enable-overwrite --enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/' + '--with-shared --enable-overwrite --with-termlib ' + '--enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/' ] libs = ["form", "menu", "ncurses", "panel"] -- GitLab From 070f0a553c4b04f292e57bba58e3910fc9c0ff4b Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 8 Sep 2016 12:14:24 +0200 Subject: [PATCH 250/741] Make ncurses build the terminfo library separately --- easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb | 1 - .../l/libreadline/libreadline-6.3.eb | 1 - .../easyconfigs/n/ncurses/ncurses-6.0.eb | 5 ++-- .../p/pkg-config/pkg-config-0.29.eb | 27 ------------------- 4 files changed, 2 insertions(+), 32 deletions(-) delete mode 100644 easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.eb diff --git a/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb b/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb index 8a6c29fb66..08d864aaf6 100644 --- a/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb +++ b/easybuild/easyconfigs/l/Lua/Lua-5.1.4-8.eb @@ -17,7 +17,6 @@ sources = ['lua-%s.tar.gz' % version.replace('-', '.')] source_urls = ['http://sourceforge.net/projects/lmod/files/'] builddependencies = [ - ('pkg-config', '0.29'), ('ncurses', '6.0'), ('libreadline', '6.3') ] diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb index 323eaa8c72..53eeab2af9 100644 --- a/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb @@ -16,7 +16,6 @@ source_urls = ['http://ftp.gnu.org/gnu/readline'] patches = ['libreadline-%(version)s-bugfix.patch'] -builddependencies = [('pkg-config', '0.29')] dependencies = [('ncurses', '6.0')] # for the termcap symbols, use EB ncurses diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb index 657d0d5f9b..f923e1597d 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb @@ -14,13 +14,12 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] -builddependencies = [('pkg-config', '0.29')] - configopts = [ # default build '--with-shared --enable-overwrite --with-termlib', # the UTF-8 enabled version (ncursesw) - '--with-shared --enable-overwrite --with-termlib ' + '--enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/' + '--with-shared --enable-overwrite --with-termlib ' + + '--enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/' ] libs = ["form", "menu", "ncurses", "panel"] diff --git a/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.eb b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.eb deleted file mode 100644 index 4302c5e3ae..0000000000 --- a/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.eb +++ /dev/null @@ -1,27 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'pkg-config' -version = '0.29' - -homepage = 'http://www.freedesktop.org/wiki/Software/pkg-config/' -description = """pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the - correct compiler options on the command line so an application can use - gcc -o test test.c `pkg-config --libs --cflags glib-2.0` - for instance, rather than hard-coding values on where to find glib (or other libraries).""" - -toolchain = {'name': 'dummy', 'version': ''} - -sources = [SOURCELOWER_TAR_GZ] -source_urls = ['http://pkgconfig.freedesktop.org/releases/'] - -# don't use PAX, it might break. -tar_config_opts = True - -configopts = " --with-internal-glib" - -sanity_check_paths = { - 'files': ['bin/pkg-config'], - 'dirs': [], -} - -moduleclass = 'devel' -- GitLab From fa54afe020c934bb241257524dfb3d47ef9f98c3 Mon Sep 17 00:00:00 2001 From: ocaisa Date: Thu, 8 Sep 2016 12:18:39 +0200 Subject: [PATCH 251/741] Check for terminfo libs during sanitycheck --- easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb index f923e1597d..dcca941e16 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb @@ -22,7 +22,7 @@ configopts = [ '--enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/' ] -libs = ["form", "menu", "ncurses", "panel"] +libs = ["form", "menu", "ncurses", "panel", "tinfo"] sanity_check_paths = { 'files': ['bin/%s' % x for x in ["captoinfo", "clear", "infocmp", "infotocap", "ncurses%(version_major)s-config", "reset", "tabs", "tic", "toe", "tput", "tset"]] + -- GitLab From e838908a96e98f0da99fffca7f0467aabf53c4f1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 13:03:50 +0200 Subject: [PATCH 252/741] make sure & check that Graphviz does not install Tcl bindings in Tcl install prefix --- .../easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb | 5 ++++- .../g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb index aee7aa31e0..3c2e6fe51b 100644 --- a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb +++ b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb @@ -50,13 +50,16 @@ configopts = '--enable-guile=no --enable-lua=no --enable-ocaml=no ' configopts += '--enable-r=no --enable-ruby=no ' prebuildopts = 'qmake -o cmd/gvedit/qMakefile cmd/gvedit/gvedit.pro && ' +buildopts = "TCL_INSTALL_DIR=/dev/null" sanity_check_paths = { 'files': ['bin/cluster', 'bin/dot', 'bin/gvmap', 'lib/libcdt.%s' % SHLIB_EXT, 'lib/libgvc.%s' % SHLIB_EXT, 'lib/libxdot.%s' % SHLIB_EXT], - 'dirs': ['include'] + 'dirs': ['include', 'lib/graphviz'] } +sanity_check_commands = [("test ! -d $EBROOTTCL/lib64/*/graphviz", '')] + modextrapaths = { 'PYTHONPATH': 'lib/graphviz/python', 'CLASSPATH': 'lib/graphviz/java/org/graphviz', diff --git a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb index 231a5ddb6f..2d50c9c33c 100644 --- a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb +++ b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb @@ -52,13 +52,16 @@ configopts = '--enable-guile=no --enable-lua=no --enable-ocaml=no ' configopts += '--enable-r=no --enable-ruby=no ' prebuildopts = 'qmake -o cmd/gvedit/qMakefile cmd/gvedit/gvedit.pro && ' +buildopts = "TCL_INSTALL_DIR=/dev/null" sanity_check_paths = { 'files': ['bin/cluster', 'bin/dot', 'bin/gvmap', 'lib/libcdt.%s' % SHLIB_EXT, 'lib/libgvc.%s' % SHLIB_EXT, 'lib/libxdot.%s' % SHLIB_EXT], - 'dirs': ['include'] + 'dirs': ['include', 'lib/graphviz'] } +sanity_check_commands = [("test ! -d $EBROOTTCL/lib64/*/graphviz", '')] + modextrapaths = { 'PYTHONPATH': 'lib/graphviz/python', 'CLASSPATH': 'lib/graphviz/java/org/graphviz', -- GitLab From 7a7f98d707ec045983fdd14b2af127b99666099c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 14:24:53 +0200 Subject: [PATCH 253/741] add easyconfig SimVascular-2.16.0406-intel-2016b.eb --- .../SimVascular-2.16.0406-intel-2016b.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb diff --git a/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb b/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb new file mode 100644 index 0000000000..ee1b07c5d3 --- /dev/null +++ b/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb @@ -0,0 +1,38 @@ +easyblock = 'Tarball' + +name = 'SimVascular' +version = '2.16.0406' + +homepage = 'http://simvascular.github.io/' +description = """SimVascular is an open source software suite for cardiovascular simulation, providing a complete + pipeline from medical image data to 3D model construction, meshing, and blood flow simulation.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# downlaod via https://simtk.org/project/xml/downloads.xml?group_id=188 +sources = ['SV-linux-x64-2016-04-06.tar.gz'] + +dependencies = [ + ('X11', '20160819'), + ('Tcl', '8.6.5'), + ('Tk', '8.6.5', '-no-X11'), +] + +unpack_options = '--strip-components=1' +keepsymlinks = True + +# mimic what setup-symlinks.sh, but stick to dedicated install dir +postinstallcmds = [ + "mkdir %(installdir)s/bin", + "ln -s %(installdir)s/Bin/simvascular %(installdir)s/bin/simvascular", + "ln -s %(installdir)s/Bin/svpost %(installdir)s/bin/svpost", + "ln -s %(installdir)s/Bin/svpre %(installdir)s/bin/svpre", + "ln -s %(installdir)s/Bin/svsolver %(installdir)s/bin/svsolver", +] + +sanity_check_paths = { + 'files': ['bin/simvascular', 'bin/svpost', 'bin/svpre', 'bin/svsolver'], + 'dirs': ['Bin', 'lib'], +} + +moduleclass = 'bio' -- GitLab From 7855e21cc4821d83fe0c241b783f55efe5adaf2c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 14:31:29 +0200 Subject: [PATCH 254/741] fix Tk dep, no versionsuffix --- .../s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb b/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb index ee1b07c5d3..292413c3e2 100644 --- a/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb +++ b/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb @@ -15,7 +15,7 @@ sources = ['SV-linux-x64-2016-04-06.tar.gz'] dependencies = [ ('X11', '20160819'), ('Tcl', '8.6.5'), - ('Tk', '8.6.5', '-no-X11'), + ('Tk', '8.6.5'), ] unpack_options = '--strip-components=1' -- GitLab From 543f6b31925df67cb2e0149397ff6021bb85f0d7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 14:35:21 +0200 Subject: [PATCH 255/741] fix remarks --- .../s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb b/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb index 292413c3e2..6727139e3e 100644 --- a/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb +++ b/easybuild/easyconfigs/s/SimVascular/SimVascular-2.16.0406-intel-2016b.eb @@ -9,7 +9,7 @@ description = """SimVascular is an open source software suite for cardiovascular toolchain = {'name': 'intel', 'version': '2016b'} -# downlaod via https://simtk.org/project/xml/downloads.xml?group_id=188 +# download via https://simtk.org/project/xml/downloads.xml?group_id=188 sources = ['SV-linux-x64-2016-04-06.tar.gz'] dependencies = [ @@ -32,7 +32,7 @@ postinstallcmds = [ sanity_check_paths = { 'files': ['bin/simvascular', 'bin/svpost', 'bin/svpre', 'bin/svsolver'], - 'dirs': ['Bin', 'lib'], + 'dirs': ['Bin'], } moduleclass = 'bio' -- GitLab From 2b4db2bf68835fd00656f1edb34f00ab8bfbf5f8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 8 Sep 2016 14:40:05 +0200 Subject: [PATCH 256/741] patch tclpkg/Makefile.in to avoid installing Graphviz bindings to non-owned directories --- easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb | 2 +- .../g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb index 3c2e6fe51b..c85ed5ed21 100644 --- a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb +++ b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb @@ -46,11 +46,11 @@ patches = [ 'Graphviz-2.38.0_icc_sfio.patch', ] +preconfigopts = "sed -i 's/install-data-hook$//g' tclpkg/Makefile.in && " configopts = '--enable-guile=no --enable-lua=no --enable-ocaml=no ' configopts += '--enable-r=no --enable-ruby=no ' prebuildopts = 'qmake -o cmd/gvedit/qMakefile cmd/gvedit/gvedit.pro && ' -buildopts = "TCL_INSTALL_DIR=/dev/null" sanity_check_paths = { 'files': ['bin/cluster', 'bin/dot', 'bin/gvmap', diff --git a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb index 2d50c9c33c..88594633da 100644 --- a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb +++ b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb @@ -48,11 +48,11 @@ patches = [ 'Graphviz-2.38.0_icc_sfio.patch', ] +preconfigopts = "sed -i 's/install-data-hook$//g' tclpkg/Makefile.in && " configopts = '--enable-guile=no --enable-lua=no --enable-ocaml=no ' configopts += '--enable-r=no --enable-ruby=no ' prebuildopts = 'qmake -o cmd/gvedit/qMakefile cmd/gvedit/gvedit.pro && ' -buildopts = "TCL_INSTALL_DIR=/dev/null" sanity_check_paths = { 'files': ['bin/cluster', 'bin/dot', 'bin/gvmap', -- GitLab From b53b2802faf0fa4e37760c3542fe3d458d6e4a0c Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Fri, 9 Sep 2016 10:55:58 +0800 Subject: [PATCH 257/741] rename spglib to spglib-python --- ...ymatgen-4.1.1-intel-2016b-Python-2.7.12.eb | 2 +- ...ython-1.9.4.2-intel-2016b-Python-2.7.12.eb | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/p/pymatgen/pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/pymatgen/pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb index 21004fbe46..6b8241e929 100644 --- a/easybuild/easyconfigs/p/pymatgen/pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/p/pymatgen/pymatgen-4.1.1-intel-2016b-Python-2.7.12.eb @@ -15,7 +15,7 @@ sources = [SOURCE_TAR_GZ] dependencies = [ ('Python', '2.7.12'), - ('spglib', '1.9.4.2', versionsuffix), + ('spglib-python', '1.9.4.2', versionsuffix), ] sanity_check_paths = { diff --git a/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..0545ab1823 --- /dev/null +++ b/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,26 @@ +easyblock = "PythonPackage" + +name = 'spglib-python' +version = '1.9.4.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/spglib' +description = """Spglib for Python. Spglib is a library for finding and handling crystal symmetries written in C.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://files.pythonhosted.org/packages/source/%(nameletter)s/spglib'] +sources = ['spglib-%(version)s.tar.gz'] + +dependencies = [ + ('Python', '2.7.12'), +] + +options = {'modulename': 'spglib'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'] +} + +moduleclass = 'chem' -- GitLab From 827d74b24e0fabd96a608708ed51e9196febba9e Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Fri, 9 Sep 2016 17:30:59 +0800 Subject: [PATCH 258/741] revert to pypi.python.org source_url --- .../spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb index 0545ab1823..2cbf7eff9e 100644 --- a/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.4.2-intel-2016b-Python-2.7.12.eb @@ -9,7 +9,7 @@ description = """Spglib for Python. Spglib is a library for finding and handling toolchain = {'name': 'intel', 'version': '2016b'} -source_urls = ['https://files.pythonhosted.org/packages/source/%(nameletter)s/spglib'] +source_urls = ['https://pypi.python.org/packages/source/%(nameletter)s/spglib'] sources = ['spglib-%(version)s.tar.gz'] dependencies = [ -- GitLab From e15727dac4cb0a08ef7d933868ff6a0a5670a7c6 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Fri, 9 Sep 2016 10:17:14 +0100 Subject: [PATCH 259/741] fix python 3.5.2 compilation with various toolchains --- easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb | 6 ++++++ easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb | 6 ++++++ easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb index 2581a2015d..f49b2ff085 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016.04.eb @@ -56,6 +56,9 @@ exts_list = [ }), ('paycheck', '1.0.2', { 'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'], + 'patches': [ + 'paycheck-1.0.2_setup-open-README-utf8.patch', + ], }), ('pbr', '1.10.0', { 'source_urls': ['https://pypi.python.org/packages/source/p/pbr/'], @@ -76,6 +79,9 @@ exts_list = [ ('deap', '1.0.2', { 'source_tmpl': '%(name)s-%(version)s.post2.tar.gz', 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], + 'patches': [ + 'deap-1.0.2_setup-open-README-utf8.patch', + ], }), ('decorator', '4.0.10', { 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb index 33f145a36c..f40c4aab55 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.2-foss-2016b.eb @@ -56,6 +56,9 @@ exts_list = [ }), ('paycheck', '1.0.2', { 'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'], + 'patches': [ + 'paycheck-1.0.2_setup-open-README-utf8.patch', + ], }), ('pbr', '1.10.0', { 'source_urls': ['https://pypi.python.org/packages/source/p/pbr/'], @@ -76,6 +79,9 @@ exts_list = [ ('deap', '1.0.2', { 'source_tmpl': '%(name)s-%(version)s.post2.tar.gz', 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], + 'patches': [ + 'deap-1.0.2_setup-open-README-utf8.patch', + ], }), ('decorator', '4.0.10', { 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb b/easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb index 4cba8641bb..805061ab30 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.2-intel-2016b.eb @@ -56,6 +56,9 @@ exts_list = [ }), ('paycheck', '1.0.2', { 'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'], + 'patches': [ + 'paycheck-1.0.2_setup-open-README-utf8.patch', + ], }), ('pbr', '1.10.0', { 'source_urls': ['https://pypi.python.org/packages/source/p/pbr/'], @@ -76,6 +79,9 @@ exts_list = [ ('deap', '1.0.2', { 'source_tmpl': '%(name)s-%(version)s.post2.tar.gz', 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], + 'patches': [ + 'deap-1.0.2_setup-open-README-utf8.patch', + ], }), ('decorator', '4.0.10', { 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], -- GitLab From db3480158565ed5f9112cb525d1ff5739de9474d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 9 Sep 2016 12:04:52 +0200 Subject: [PATCH 260/741] make sure EasyBuild is in full control over optimization flags in Blender easyconfig --- .../b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb index e84bfbddb5..1ddf498f76 100644 --- a/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/b/Blender/Blender-2.77a-intel-2016b-Python-3.5.2.eb @@ -15,8 +15,11 @@ sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://download.blender.org/source/'] patches = ['Blender-%(version)s_fix-ARRAY_SIZE-icc.patch'] -# These are needed until extra dependencies are added for them to work -configopts = '-DWITH_INSTALL_PORTABLE=OFF ' +# disable SSE detection to give EasyBuild full control over optimization compiler flags being used +configopts = '-DWITH_CPU_SSE=OFF -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" ' + +# these are needed until extra dependencies are added for them to work +configopts += '-DWITH_INSTALL_PORTABLE=OFF ' configopts += '-DWITH_BUILDINFO=OFF ' configopts += '-DWITH_GAMEENGINE=OFF ' configopts += '-DWITH_SYSTEM_GLEW=OFF ' -- GitLab From 08fc54841a76c32e98efdd1f259f73adacf2eb22 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 9 Sep 2016 13:42:23 +0200 Subject: [PATCH 261/741] stick to matplotlib 1.5.1 in scikit-learn, for compatibility with other Python modules --- .../scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb index 8bee613d8e..948220fce8 100644 --- a/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.17.1-intel-2016b-Python-2.7.12.eb @@ -17,7 +17,7 @@ sources = [SOURCE_TAR_GZ] dependencies = [ ('Python', '2.7.12'), - ('matplotlib', '1.5.2', versionsuffix), + ('matplotlib', '1.5.1', versionsuffix), ] options = {'modulename': 'sklearn'} -- GitLab From 8a3cb590b859f77ab79d6e58c7073a86f53de7d8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 9 Sep 2016 17:20:49 +0200 Subject: [PATCH 262/741] add easyconfig GRIT-2.0.5-intel-2016b-Python-2.7.12.eb --- .../GRIT-2.0.5-intel-2016b-Python-2.7.12.eb | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 easybuild/easyconfigs/g/GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..2da2d712ac --- /dev/null +++ b/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,41 @@ +easyblock = 'Bundle' + +name = 'GRIT' +version = '2.0.5' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/nboley/grit' +description = """GRIT - A tool for the integrative analysis of RNA-seq type assays""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.12'), +] + +exts_list = [ + ('networkx', '1.11', { + 'source_urls': ['https://pypi.python.org/packages/source/n/networkx'], + }), + ('pysam', '0.9.1.4', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pysam/'], + }), + (name, version, { + 'source_urls': ['https://github.com/nboley/grit/archive/'], + 'source_tmpl': '%(version)s.tar.gz', + }), +] + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +sanity_check_paths = { + 'files': ['bin/run_grit'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +sanity_check_commands = [('run_grit', '--help')] + +moduleclass = 'bio' -- GitLab From 6fc007377280cd9031b791f0aa07ca0a15490fc4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 9 Sep 2016 18:54:58 +0200 Subject: [PATCH 263/741] add easyconfig hanythingondemand-3.1.4-cli.eb, add easyconfig hanythingondemand-3.1.4-intel-2016b-Python-2.7.12.eb --- .../hanythingondemand-3.1.4-cli.eb | 42 +++++++++++++++++++ ...ndemand-3.1.4-intel-2016b-Python-2.7.12.eb | 30 +++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.1.4-cli.eb create mode 100644 easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.1.4-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.1.4-cli.eb b/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.1.4-cli.eb new file mode 100644 index 0000000000..275b2940c7 --- /dev/null +++ b/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.1.4-cli.eb @@ -0,0 +1,42 @@ +easyblock = 'PythonPackage' + +name = 'hanythingondemand' +version = '3.1.4' +versionsuffix = '-cli' + +homepage = 'https://github.com/hpcugent/hanythingondemand' +description = """HanythingOnDemand (HOD) is a system for provisioning virtual Hadoop clusters over a large physical cluster. +It uses the Torque resource manager to do node allocation.""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +# minimal version for interactive use: just uses system Python (netaddr/netifaces/mpi4py not required) +dependencies = [ + ('pbs_python', '4.6.0'), + ('vsc-base', '2.5.1'), +] + +use_easy_install = True +zipped_egg = True + +# use 'hod' rather than 'hanythingondemand' in module name +modaltsoftname = 'hod' + +options = {'modulename': 'hod'} + +modextravars = { + # site-specific settings, hence commented out + # specify HOD module to use in jobs (*full* HOD installation, not a minimal one) + #'HOD_BATCH_HOD_MODULE': 'hanythingondemand/%(version)s-intel-2016b-Python-2.7.12', + #'HOD_CREATE_HOD_MODULE': 'hanythingondemand/%(version)s-intel-2016b-Python-2.7.12', + # specify location on shared 'scratch' filesystem for HOD working directories + #'HOD_BATCH_WORKDIR': '\$VSC_SCRATCH/hod', + #'HOD_CREATE_WORKDIR': '\$VSC_SCRATCH/hod', +} + +sanity_check_commands = [('hod', '--help'), ('hod', 'dists')] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.1.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.1.4-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..f133f273c4 --- /dev/null +++ b/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.1.4-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,30 @@ +easyblock = 'PythonPackage' + +name = 'hanythingondemand' +version = '3.1.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/hpcugent/hanythingondemand' +description = """HanythingOnDemand (HOD) is a system for provisioning virtual Hadoop clusters over a large physical cluster. +It uses the Torque resource manager to do node allocation.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +# a Python version with netaddr/netifaces/mpi4py + pbs_python and vsc-base/vsc-mympirun is required at runtime +dependencies = [ + ('Python', '2.7.12'), # provides netaddr, netifaces, mpi4py + ('pbs_python', '4.6.0', versionsuffix), + ('vsc-mympirun', '3.4.3', versionsuffix), +] + +use_easy_install = True +zipped_egg = True + +options = {'modulename': 'hod'} + +sanity_check_commands = [('hod', '--help'), ('hod', 'dists')] + +moduleclass = 'tools' -- GitLab From 1815dfecf67ec275c3873cd88a2985c845759e90 Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Sat, 10 Sep 2016 11:54:12 +0800 Subject: [PATCH 264/741] delete renamed file --- ...pglib-1.9.4.2-intel-2016b-Python-2.7.12.eb | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 easybuild/easyconfigs/s/spglib/spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/s/spglib/spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/spglib/spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb deleted file mode 100644 index 9a2186080b..0000000000 --- a/easybuild/easyconfigs/s/spglib/spglib-1.9.4.2-intel-2016b-Python-2.7.12.eb +++ /dev/null @@ -1,24 +0,0 @@ -easyblock = "PythonPackage" - -name = 'spglib' -version = '1.9.4.2' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'https://pypi.python.org/pypi/spglib' -description = """Spglib is a library for finding and handling crystal symmetries written in C.""" - -toolchain = {'name': 'intel', 'version': '2016b'} - -source_urls = [PYPI_SOURCE] -sources = [SOURCE_TAR_GZ] - -dependencies = [ - ('Python', '2.7.12'), -] - -sanity_check_paths = { - 'files': [], - 'dirs': ['lib/python%(pyshortver)s/site-packages'] -} - -moduleclass = 'chem' -- GitLab From 11d62c145dce95596d8a5d66ce4dc7db2c159a31 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 12 Sep 2016 15:37:52 +0200 Subject: [PATCH 265/741] Remove old comment --- easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb index 572719879c..55e5aba8b6 100644 --- a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb +++ b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb @@ -12,7 +12,6 @@ homepage = 'http://cmpg.unibe.ch/software/BayeScan/' description = """BayeScan aims at identifying candidate loci under natural selection from genetic data, using differences in allele frequencies between populations.""" -# BayeScan makefile is hardcoded to use g++. In case you want to use a non-gcc toolchain you will need to patch the makefile toolchain = {'name': 'foss', 'version': '2016a'} toolchainopts = {'openmp': True} -- GitLab From 18078071cb975bbdee8e737ac59e7e0870c38490 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 12 Sep 2016 15:38:53 +0200 Subject: [PATCH 266/741] One file per line for files_to_copy --- .../easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb index 55e5aba8b6..c4932d3953 100644 --- a/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb +++ b/easybuild/easyconfigs/b/BayeScan/BayeScan-2.1-foss-2016a.eb @@ -22,7 +22,12 @@ prebuildopts = "sed -i.bk 's/g++/${CXX} ${CXXFLAGS}/g' Makefile && " start_dir = 'source' -files_to_copy = [(['source/bayescan_%(version)s'], 'bin'), 'BayeScan%(version)s_manual.pdf' , 'input_examples', 'R functions'] +files_to_copy = [ + (['source/bayescan_%(version)s'], 'bin'), + 'BayeScan%(version)s_manual.pdf', + 'input_examples', + 'R functions' +] parallel = 1 -- GitLab From b7dc6b3f843846551af275bc67bb7aa293097a0e Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 12 Sep 2016 15:45:15 +0200 Subject: [PATCH 267/741] Use instead of -lopenblas -lgfortran --- .../easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb | 2 +- .../easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb index 91d5649298..97dd9ce1c7 100644 --- a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb @@ -31,7 +31,7 @@ dependencies = [ # -lm and -pthread are missing in the Makefile # also run "make install" after make to copy all binaries to the bin dir -buildopts = 'LDLIBS="-lgsl -lopenblas -lgfortran -lrt -lm" LDFLAGS="$LDFLAGS -pthread" && make install' +buildopts = 'LDLIBS="-lgsl $LIBBLAS -lrt -lm" LDFLAGS="$LDFLAGS -pthread" && make install' start_dir = 'src' diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb index 9d605117a0..db8b80af14 100644 --- a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb @@ -30,7 +30,8 @@ dependencies = [ ] # -lm and -pthread are missing in the Makefile -buildopts = 'LDLIBS="-lgsl -lopenblas -lgfortran -lrt -lm" LDFLAGS="$LDFLAGS -pthread" && make install' +# also run "make install" after make to copy all binaries to the bin dir +buildopts = 'LDLIBS="-lgsl $LIBBLAS -lrt -lm" LDFLAGS="$LDFLAGS -pthread" && make install' start_dir = 'src' -- GitLab From 6cac8f59db781c65839c08fa3bf95dce8b9d8d86 Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 12 Sep 2016 15:45:43 +0200 Subject: [PATCH 268/741] Minor style fix --- .../easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb | 3 ++- .../easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb index 97dd9ce1c7..653bc39a36 100644 --- a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.0.1-foss-2016a.eb @@ -22,7 +22,8 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [ 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/', - 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/OLD/'] + 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/OLD/' +] sources = ['EIG%(version)s.tar.gz'] dependencies = [ diff --git a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb index db8b80af14..90343733e3 100644 --- a/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb +++ b/easybuild/easyconfigs/e/EIGENSOFT/EIGENSOFT-6.1.1-foss-2016a.eb @@ -22,7 +22,8 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [ 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/', - 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/OLD/'] + 'https://data.broadinstitute.org/alkesgroup/EIGENSOFT/OLD/' +] sources = ['EIG%(version)s.tar.gz'] dependencies = [ -- GitLab From 0b6784a43bce3eff123fb5896b39d6bf8e644af6 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Mon, 12 Sep 2016 17:18:53 +0200 Subject: [PATCH 269/741] Version of protobuf using the foss 2016a toolchain. Since protobuf includes libraries, compiling it with the compiler from a toolchain seems better. --- .../p/protobuf/protobuf-3.0.2-foss-2016a.eb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 easybuild/easyconfigs/p/protobuf/protobuf-3.0.2-foss-2016a.eb diff --git a/easybuild/easyconfigs/p/protobuf/protobuf-3.0.2-foss-2016a.eb b/easybuild/easyconfigs/p/protobuf/protobuf-3.0.2-foss-2016a.eb new file mode 100644 index 0000000000..14ba425f1f --- /dev/null +++ b/easybuild/easyconfigs/p/protobuf/protobuf-3.0.2-foss-2016a.eb @@ -0,0 +1,21 @@ +easyblock = 'ConfigureMake' + +name = 'protobuf' +version = '3.0.2' + +homepage = 'https://github.com/google/protobuf/' +description = """Google Protocol Buffers""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/google/protobuf/archive/v%(version)s/'] +sources = [SOURCE_TAR_GZ] + +preconfigopts = "./autogen.sh &&" + +sanity_check_paths = { + 'files': ['bin/protoc','lib/libprotobuf.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From ca924569f9d349f04a988df49bafee28f82af7e7 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 13 Sep 2016 10:27:06 +0200 Subject: [PATCH 270/741] Python library for Google protobuf, compiled using foss 2016a. --- ...f-python-3.0.2-foss-2016a-Python-2.7.11.eb | 31 +++++++++++++++++++ ...uf-python-3.0.2-foss-2016a-Python-3.5.1.eb | 31 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb diff --git a/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..1ff4a4ad43 --- /dev/null +++ b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,31 @@ +easyblock = 'PythonPackage' + +name = 'protobuf-python' +version = '3.0.2' +versionsuffix= '-Python-%(version)s' + +homepage = 'https://github.com/google/protobuf/' +description = """Python Protocol Buffers runtime library.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/google/protobuf/archive/v%(version)s'] +sources = [SOURCE_TAR_GZ] + +versionsuffix = '-Python-%(pyver)s' + +dependencies = [ + ('Python', '2.7.11'), + ('protobuf', version) +] + +start_dir = 'python' + +sanity_check_paths = { + 'files': ['lib/python%(pyshortver)s/site-packages/protobuf-%(version)s-py%(pyshortver)s.egg/google/__init__.py'], + 'dirs': ['bin'], +} + +options = {'modulename': 'google.protobuf' } + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb new file mode 100644 index 0000000000..2c3f2283d9 --- /dev/null +++ b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb @@ -0,0 +1,31 @@ +easyblock = 'PythonPackage' + +name = 'protobuf-python' +version = '3.0.2' +versionsuffix= '-Python-%(version)s' + +homepage = 'https://github.com/google/protobuf/' +description = """Python Protocol Buffers runtime library.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/google/protobuf/archive/v%(version)s'] +sources = [SOURCE_TAR_GZ] + +versionsuffix = '-Python-%(pyver)s' + +dependencies = [ + ('Python', '3.5.1'), + ('protobuf', version) +] + +start_dir = 'python' + +sanity_check_paths = { + 'files': ['lib/python%(pyshortver)s/site-packages/protobuf-%(version)s-py%(pyshortver)s.egg/google/__init__.py'], + 'dirs': ['bin'], +} + +options = {'modulename': 'google.protobuf' } + +moduleclass = 'devel' -- GitLab From 21a129fac315efa3e51c4432dae006763c5a007e Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Mon, 12 Sep 2016 17:18:53 +0200 Subject: [PATCH 271/741] Version of protobuf using the foss 2016a toolchain. Since protobuf includes libraries, compiling it with the compiler from a toolchain seems better. --- .../p/protobuf/protobuf-3.0.2-foss-2016a.eb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 easybuild/easyconfigs/p/protobuf/protobuf-3.0.2-foss-2016a.eb diff --git a/easybuild/easyconfigs/p/protobuf/protobuf-3.0.2-foss-2016a.eb b/easybuild/easyconfigs/p/protobuf/protobuf-3.0.2-foss-2016a.eb new file mode 100644 index 0000000000..14ba425f1f --- /dev/null +++ b/easybuild/easyconfigs/p/protobuf/protobuf-3.0.2-foss-2016a.eb @@ -0,0 +1,21 @@ +easyblock = 'ConfigureMake' + +name = 'protobuf' +version = '3.0.2' + +homepage = 'https://github.com/google/protobuf/' +description = """Google Protocol Buffers""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/google/protobuf/archive/v%(version)s/'] +sources = [SOURCE_TAR_GZ] + +preconfigopts = "./autogen.sh &&" + +sanity_check_paths = { + 'files': ['bin/protoc','lib/libprotobuf.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From e35203c16ecd51118a7ee995cda6679b14d43d26 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 13 Sep 2016 10:27:06 +0200 Subject: [PATCH 272/741] Python library for Google protobuf, compiled using foss 2016a. --- ...f-python-3.0.2-foss-2016a-Python-2.7.11.eb | 31 +++++++++++++++++++ ...uf-python-3.0.2-foss-2016a-Python-3.5.1.eb | 31 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb diff --git a/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..1ff4a4ad43 --- /dev/null +++ b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,31 @@ +easyblock = 'PythonPackage' + +name = 'protobuf-python' +version = '3.0.2' +versionsuffix= '-Python-%(version)s' + +homepage = 'https://github.com/google/protobuf/' +description = """Python Protocol Buffers runtime library.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/google/protobuf/archive/v%(version)s'] +sources = [SOURCE_TAR_GZ] + +versionsuffix = '-Python-%(pyver)s' + +dependencies = [ + ('Python', '2.7.11'), + ('protobuf', version) +] + +start_dir = 'python' + +sanity_check_paths = { + 'files': ['lib/python%(pyshortver)s/site-packages/protobuf-%(version)s-py%(pyshortver)s.egg/google/__init__.py'], + 'dirs': ['bin'], +} + +options = {'modulename': 'google.protobuf' } + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb new file mode 100644 index 0000000000..2c3f2283d9 --- /dev/null +++ b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb @@ -0,0 +1,31 @@ +easyblock = 'PythonPackage' + +name = 'protobuf-python' +version = '3.0.2' +versionsuffix= '-Python-%(version)s' + +homepage = 'https://github.com/google/protobuf/' +description = """Python Protocol Buffers runtime library.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/google/protobuf/archive/v%(version)s'] +sources = [SOURCE_TAR_GZ] + +versionsuffix = '-Python-%(pyver)s' + +dependencies = [ + ('Python', '3.5.1'), + ('protobuf', version) +] + +start_dir = 'python' + +sanity_check_paths = { + 'files': ['lib/python%(pyshortver)s/site-packages/protobuf-%(version)s-py%(pyshortver)s.egg/google/__init__.py'], + 'dirs': ['bin'], +} + +options = {'modulename': 'google.protobuf' } + +moduleclass = 'devel' -- GitLab From 8887b51468d87ad0d3db90d9af09bc8a9e221bf4 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 13 Sep 2016 16:18:21 +0200 Subject: [PATCH 273/741] newer expat version in dbus-glib --- easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb b/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb index 3a355efc71..8d6e6a7449 100644 --- a/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb +++ b/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb @@ -14,7 +14,7 @@ sources = [SOURCE_TAR_GZ] dependencies = [ ('GLib', '2.48.0'), ('DBus', '1.10.8'), - ('expat', '2.2.0'), + ('expat', '2.2.1'), ] sanity_check_paths = { -- GitLab From 3911624c610e3d3921fccb114d737f7f560479c8 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 13 Sep 2016 16:21:55 +0200 Subject: [PATCH 274/741] older 2.1.1 version instead of non existing newer --- easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb b/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb index 8d6e6a7449..3d05e04fc1 100644 --- a/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb +++ b/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.106-foss-2016a.eb @@ -14,7 +14,7 @@ sources = [SOURCE_TAR_GZ] dependencies = [ ('GLib', '2.48.0'), ('DBus', '1.10.8'), - ('expat', '2.2.1'), + ('expat', '2.1.1'), ] sanity_check_paths = { -- GitLab From 26d4b8d3d274a0fe57498fa2650b34f96ee87660 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 13 Sep 2016 16:29:09 +0200 Subject: [PATCH 275/741] Fixed: - versionsuffix - removed check for __init__.py in egg directory - check for site-packages directory instead - removed check for bin directory as it does not contain important files --- .../protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb | 8 +++----- .../protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb index 1ff4a4ad43..3deb45334a 100644 --- a/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-2.7.11.eb @@ -2,7 +2,7 @@ easyblock = 'PythonPackage' name = 'protobuf-python' version = '3.0.2' -versionsuffix= '-Python-%(version)s' +versionsuffix= '-Python-%(pyver)s' homepage = 'https://github.com/google/protobuf/' description = """Python Protocol Buffers runtime library.""" @@ -12,8 +12,6 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = ['https://github.com/google/protobuf/archive/v%(version)s'] sources = [SOURCE_TAR_GZ] -versionsuffix = '-Python-%(pyver)s' - dependencies = [ ('Python', '2.7.11'), ('protobuf', version) @@ -22,8 +20,8 @@ dependencies = [ start_dir = 'python' sanity_check_paths = { - 'files': ['lib/python%(pyshortver)s/site-packages/protobuf-%(version)s-py%(pyshortver)s.egg/google/__init__.py'], - 'dirs': ['bin'], + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } options = {'modulename': 'google.protobuf' } diff --git a/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb index 2c3f2283d9..64b04ec53c 100644 --- a/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb +++ b/easybuild/easyconfigs/p/protobuf-python/protobuf-python-3.0.2-foss-2016a-Python-3.5.1.eb @@ -2,7 +2,7 @@ easyblock = 'PythonPackage' name = 'protobuf-python' version = '3.0.2' -versionsuffix= '-Python-%(version)s' +versionsuffix= '-Python-%(pyver)s' homepage = 'https://github.com/google/protobuf/' description = """Python Protocol Buffers runtime library.""" @@ -12,8 +12,6 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = ['https://github.com/google/protobuf/archive/v%(version)s'] sources = [SOURCE_TAR_GZ] -versionsuffix = '-Python-%(pyver)s' - dependencies = [ ('Python', '3.5.1'), ('protobuf', version) @@ -22,8 +20,8 @@ dependencies = [ start_dir = 'python' sanity_check_paths = { - 'files': ['lib/python%(pyshortver)s/site-packages/protobuf-%(version)s-py%(pyshortver)s.egg/google/__init__.py'], - 'dirs': ['bin'], + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } options = {'modulename': 'google.protobuf' } -- GitLab From 32be622670f9044a07e531796b7a8e8cdce4f2f6 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 14 Sep 2016 11:26:05 +0200 Subject: [PATCH 276/741] Bison builddep included --- .../g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb index 7583a907a1..3bfa7c6721 100644 --- a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb +++ b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb @@ -22,6 +22,7 @@ dependencies = [ builddependencies = [ ('Autotools', '20150215'), ('pkg-config', '1.1.0', '-Python-2.7.11'), + ('Bison', '3.0.4', '', True), ] sanity_check_paths = { -- GitLab From 4f24f16c0115796da48f91f2e3e6e63071c940ae Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 14 Sep 2016 11:29:36 +0200 Subject: [PATCH 277/741] pkgconfig version --- .../g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb index 3bfa7c6721..293e76a477 100644 --- a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb +++ b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb @@ -21,7 +21,7 @@ dependencies = [ builddependencies = [ ('Autotools', '20150215'), - ('pkg-config', '1.1.0', '-Python-2.7.11'), + ('pkg-config', '0.29.1', '-Python-2.7.11'), ('Bison', '3.0.4', '', True), ] -- GitLab From 31f72e28d48156c5846e0ffa2cd2b12597674ef8 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 14 Sep 2016 11:54:01 +0200 Subject: [PATCH 278/741] out of the woods? --- .../g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb index 293e76a477..248204c8cc 100644 --- a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb +++ b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-1.8.3-foss-2016a.eb @@ -21,7 +21,7 @@ dependencies = [ builddependencies = [ ('Autotools', '20150215'), - ('pkg-config', '0.29.1', '-Python-2.7.11'), + ('pkg-config', '0.29.1'), ('Bison', '3.0.4', '', True), ] @@ -36,4 +36,4 @@ modextrapaths = { 'XDG_DATA_DIRS': 'share', } -moduleclass = 'vis' \ No newline at end of file +moduleclass = 'vis' -- GitLab From 9b526284b4915166290aa17aac570220cc56ac3e Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 14 Sep 2016 12:51:56 +0200 Subject: [PATCH 279/741] verifyBamID with foss2016a --- .../verifyBamID-1.1.3-foss-2016a.eb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb diff --git a/easybuild/easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb b/easybuild/easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb new file mode 100644 index 0000000000..0eaa48f9c3 --- /dev/null +++ b/easybuild/easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb @@ -0,0 +1,28 @@ +easyblock = 'MakeCp' + +name = 'verifyBamID' +version = '1.1.3' + +homepage = "http://csg.sph.umich.edu/kang/verifyBamID/index.html" +description = """verifyBamID is a software that verifies whether the reads in particular file match previously known + genotypes for an individual (or group of individuals), and checks whether the reads are contaminated as a mixture of + two samples. verifyBamID can detect sample contamination and swaps when external genotypes are available. When + external genotypes are not available, verifyBamID still robustly detects sample swaps. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/statgen/%(name)s/releases/download/v%(version)s/'] +sources = ['%(name)sLibStatGen.%(version)s.tgz'] + +checksums = ['9b3d4c73c8f72e6b8f1e014702bc5bec'] + +executables = ['%(name)s/bin/%(name)s'] +files_to_copy = [(executables, 'bin')] + +sanity_check_paths = { + 'files': ['bin/%(name)s'], + 'dirs': [] +} + +moduleclass = 'bio' -- GitLab From 11594910285f4f06bc92fcdd9968bb49df6961fa Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Wed, 14 Sep 2016 16:32:15 +0200 Subject: [PATCH 280/741] add easyconfig bwakit-0.7.15_x64-linux.eb --- .../b/bwakit/bwakit-0.7.15_x64-linux.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb diff --git a/easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb b/easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb new file mode 100644 index 0000000000..fe095b5c13 --- /dev/null +++ b/easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb @@ -0,0 +1,30 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'Tarball' + +name = 'bwakit' +version = '0.7.15' +versionsuffix = '_x64-linux' + +homepage = 'https://github.com/lh3/bwa/tree/master/bwakit' +description = """Bwakit is a self-consistent installation-free package of scripts and precompiled binaries, providing an end-to-end solution to read mapping.""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = ['https://sourceforge.net/projects/bio-bwa/files/bwakit/'] +sources = ['%(name)s-%(version)s%(versionsuffix)s.tar.bz2'] + +sanity_check_paths = { + 'files': ['bwa', 'samtools'], + 'dirs': [] +} + +# add the installation dir to PATH +modextrapaths = { + 'PATH': "", +} + +moduleclass = 'bio' -- GitLab From 2037a1c7e6eda0d3e6456b834ac958a094d4cf42 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Lopez Date: Wed, 14 Sep 2016 16:45:34 +0200 Subject: [PATCH 281/741] style fix --- easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb b/easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb index fe095b5c13..5e016d4b0d 100644 --- a/easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb +++ b/easybuild/easyconfigs/b/bwakit/bwakit-0.7.15_x64-linux.eb @@ -10,7 +10,8 @@ version = '0.7.15' versionsuffix = '_x64-linux' homepage = 'https://github.com/lh3/bwa/tree/master/bwakit' -description = """Bwakit is a self-consistent installation-free package of scripts and precompiled binaries, providing an end-to-end solution to read mapping.""" +description = """Bwakit is a self-consistent installation-free package of scripts and precompiled binaries, +providing an end-to-end solution to read mapping.""" toolchain = {'name': 'dummy', 'version': ''} -- GitLab From ddc39bfa7c5c233c737683632eae8122b77a181c Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 14 Sep 2016 16:56:15 +0200 Subject: [PATCH 282/741] new version of jmodeltest --- ....1.10r20160303-foss-2016a-Java-1.8.0_92.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb diff --git a/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb b/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb new file mode 100644 index 0000000000..242bfeb229 --- /dev/null +++ b/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb @@ -0,0 +1,36 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'PackedBinary' + +name = 'jModelTest' +version = '2.1.10r20160303' + +homepage = 'https://github.com/ddarriba/jmodeltest2' +description="""jModelTest is a tool to carry out statistical selection of best-fit models of nucleotide substitution.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/ddarriba/jmodeltest2/archive/'] +sources = ['v%(version)s.tar.gz'] + +java = 'Java' +javaver = '1.8.0_92' +versionsuffix = '-%s-%s' % (java, javaver) + +builddependencies = [('ant', '1.9.7', '%(versionsuffix)s', True)] + +dependencies = [('MPJ-Express', '0.44', '%(versionsuffix)s')] + +install_cmd = "cd jmodeltest2-%(version)s && ant -Ddist.dir=%(installdir)s jar" + +modloadmsg = """To execute jModelTest run: java -jar \\$EBROOTJMODELTEST/jModelTest.jar""" + +sanity_check_paths = { + 'files': ['jModelTest.jar'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 51b37d5dc5bfac276311c27b34f7dd7ceba91460 Mon Sep 17 00:00:00 2001 From: Bob Date: Wed, 14 Sep 2016 16:56:49 +0200 Subject: [PATCH 283/741] updated dependencies of mpj express, which itself is a dependency of jmodeltest --- ...J-Express-0.44-foss-2016a-Java-1.8.0_92.eb | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 easybuild/easyconfigs/m/MPJ-Express/MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb diff --git a/easybuild/easyconfigs/m/MPJ-Express/MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb b/easybuild/easyconfigs/m/MPJ-Express/MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb new file mode 100644 index 0000000000..4d87ddfc86 --- /dev/null +++ b/easybuild/easyconfigs/m/MPJ-Express/MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb @@ -0,0 +1,48 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'Tarball' + +name = 'MPJ-Express' +version = '0.44' + +homepage = 'http://mpj-express.org/' +description = """MPJ Express is an open source Java message passing library that allows application + developers to write and execute parallel applications for multicore processors and compute clusters/clouds.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://sourceforge.net/projects/mpjexpress/files/releases/'] +sources = ['mpj-v%s.tar.gz' % (version.replace('.','_'))] + +java = 'Java' +javaver = '1.8.0_92' +versionsuffix = '-%s-%s' % (java, javaver) + +builddependencies = [('CMake', '3.5.2')] + +dependencies = [ + (java, javaver, '', True), +] + +# compile JNI wrapper library as described in docs +# http://mpj-express.org/docs/readme/README +postinstallcmds = ["mkdir %(installdir)s/src/mpjdev/natmpjdev/lib/build", + "cd %(installdir)s/src/mpjdev/natmpjdev/lib/build && cmake .. && make && make install DESTDIR=%(installdir)s",] + +modextrapaths = { + 'CLASSPATH': 'lib', +} + +modextravars = { + 'MPJ_HOME': '$root', # MPJ_HOME points to install directory +} + +sanity_check_paths = { + 'files': ['lib/libnativempjdev.so', 'bin/mpjrun.sh'], + 'dirs': [] +} + +moduleclass = 'lib' -- GitLab From 4c3e6fbdd1d319376bae69e7ab43ffb24048bcd6 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 14 Sep 2016 17:19:12 +0200 Subject: [PATCH 284/741] CXX in buildopts --- .../easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb b/easybuild/easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb index 0eaa48f9c3..d08f6ddb12 100644 --- a/easybuild/easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb +++ b/easybuild/easyconfigs/v/verifyBamID/verifyBamID-1.1.3-foss-2016a.eb @@ -17,6 +17,8 @@ sources = ['%(name)sLibStatGen.%(version)s.tgz'] checksums = ['9b3d4c73c8f72e6b8f1e014702bc5bec'] +buildopts = 'CXX="$CXX"' + executables = ['%(name)s/bin/%(name)s'] files_to_copy = [(executables, 'bin')] -- GitLab From 3fa53e040d002e21d96536b3342c931900fe5cff Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 14 Sep 2016 17:25:49 +0200 Subject: [PATCH 285/741] expat and GST version --- .../w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb index abb19d3368..a3cb9a333d 100644 --- a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb @@ -21,10 +21,10 @@ dependencies = [ ('zlib', '1.2.8'), ('libjpeg-turbo', '1.5.0'), ('LibTIFF', '4.0.6'), - ('expat', '2.2.0'), + ('expat', '2.1.1'), ('GTK+', '2.24.30'), ('GConf', '3.2.6'), - ('GST-plugins-base', '1.9.1'), + ('GST-plugins-base', '1.8.3'), ('libGLU', '9.0.0', '-Mesa-11.2.1'), ('libSM', '1.2.2'), ('libXxf86vm', '1.1.4'), -- GitLab From 6c0009557bd08a17e1c85d7cac7e4d98cce8b0dc Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 15 Sep 2016 10:11:55 +0200 Subject: [PATCH 286/741] Foss toolchain is not needed, just Java is enough --- ...est-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb b/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb index 242bfeb229..00bc8cb97d 100644 --- a/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb +++ b/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb @@ -7,22 +7,22 @@ easyblock = 'PackedBinary' name = 'jModelTest' version = '2.1.10r20160303' +versionsuffix = '-Java-%(javaver)s' homepage = 'https://github.com/ddarriba/jmodeltest2' description="""jModelTest is a tool to carry out statistical selection of best-fit models of nucleotide substitution.""" -toolchain = {'name': 'foss', 'version': '2016a'} +toolchain = {'name': 'dummy', 'version': ''} source_urls = ['https://github.com/ddarriba/jmodeltest2/archive/'] sources = ['v%(version)s.tar.gz'] -java = 'Java' -javaver = '1.8.0_92' -versionsuffix = '-%s-%s' % (java, javaver) +builddependencies = [('ant', '1.9.7', versionsuffix)] -builddependencies = [('ant', '1.9.7', '%(versionsuffix)s', True)] - -dependencies = [('MPJ-Express', '0.44', '%(versionsuffix)s')] +dependencies = [ + ('MPJ-Express', '0.44', versionsuffix, ('foss', '2016a')), + ('Java', '1.8.0_92'), +] install_cmd = "cd jmodeltest2-%(version)s && ant -Ddist.dir=%(installdir)s jar" -- GitLab From 6751da8d5a315b688fbac871d97291134666358b Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 15 Sep 2016 10:12:39 +0200 Subject: [PATCH 287/741] Remove foss from filename --- ...ModelTest-2.1.10r20160303-Java-1.8.0_92.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-Java-1.8.0_92.eb diff --git a/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-Java-1.8.0_92.eb b/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-Java-1.8.0_92.eb new file mode 100644 index 0000000000..00bc8cb97d --- /dev/null +++ b/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-Java-1.8.0_92.eb @@ -0,0 +1,36 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'PackedBinary' + +name = 'jModelTest' +version = '2.1.10r20160303' +versionsuffix = '-Java-%(javaver)s' + +homepage = 'https://github.com/ddarriba/jmodeltest2' +description="""jModelTest is a tool to carry out statistical selection of best-fit models of nucleotide substitution.""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = ['https://github.com/ddarriba/jmodeltest2/archive/'] +sources = ['v%(version)s.tar.gz'] + +builddependencies = [('ant', '1.9.7', versionsuffix)] + +dependencies = [ + ('MPJ-Express', '0.44', versionsuffix, ('foss', '2016a')), + ('Java', '1.8.0_92'), +] + +install_cmd = "cd jmodeltest2-%(version)s && ant -Ddist.dir=%(installdir)s jar" + +modloadmsg = """To execute jModelTest run: java -jar \\$EBROOTJMODELTEST/jModelTest.jar""" + +sanity_check_paths = { + 'files': ['jModelTest.jar'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From f3269b12f1e5c882a24230eea42cf675f21d7038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 15 Sep 2016 10:13:19 +0200 Subject: [PATCH 288/741] Delete jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb --- ....1.10r20160303-foss-2016a-Java-1.8.0_92.eb | 36 ------------------- 1 file changed, 36 deletions(-) delete mode 100644 easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb diff --git a/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb b/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb deleted file mode 100644 index 00bc8cb97d..0000000000 --- a/easybuild/easyconfigs/j/jModelTest/jModelTest-2.1.10r20160303-foss-2016a-Java-1.8.0_92.eb +++ /dev/null @@ -1,36 +0,0 @@ -# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild -# Author: Pablo Escobar Lopez -# sciCORE - University of Basel -# SIB Swiss Institute of Bioinformatics - -easyblock = 'PackedBinary' - -name = 'jModelTest' -version = '2.1.10r20160303' -versionsuffix = '-Java-%(javaver)s' - -homepage = 'https://github.com/ddarriba/jmodeltest2' -description="""jModelTest is a tool to carry out statistical selection of best-fit models of nucleotide substitution.""" - -toolchain = {'name': 'dummy', 'version': ''} - -source_urls = ['https://github.com/ddarriba/jmodeltest2/archive/'] -sources = ['v%(version)s.tar.gz'] - -builddependencies = [('ant', '1.9.7', versionsuffix)] - -dependencies = [ - ('MPJ-Express', '0.44', versionsuffix, ('foss', '2016a')), - ('Java', '1.8.0_92'), -] - -install_cmd = "cd jmodeltest2-%(version)s && ant -Ddist.dir=%(installdir)s jar" - -modloadmsg = """To execute jModelTest run: java -jar \\$EBROOTJMODELTEST/jModelTest.jar""" - -sanity_check_paths = { - 'files': ['jModelTest.jar'], - 'dirs': [], -} - -moduleclass = 'bio' -- GitLab From eefa47e87cde84b64b3dd591f33c4e060abdbab0 Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 15 Sep 2016 10:23:12 +0200 Subject: [PATCH 289/741] small change in position of versionsuffix, use javaver --- .../MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/m/MPJ-Express/MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb b/easybuild/easyconfigs/m/MPJ-Express/MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb index 4d87ddfc86..0a8633bccd 100644 --- a/easybuild/easyconfigs/m/MPJ-Express/MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb +++ b/easybuild/easyconfigs/m/MPJ-Express/MPJ-Express-0.44-foss-2016a-Java-1.8.0_92.eb @@ -7,6 +7,7 @@ easyblock = 'Tarball' name = 'MPJ-Express' version = '0.44' +versionsuffix = '-Java-%(javaver)s' homepage = 'http://mpj-express.org/' description = """MPJ Express is an open source Java message passing library that allows application @@ -17,14 +18,10 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = ['https://sourceforge.net/projects/mpjexpress/files/releases/'] sources = ['mpj-v%s.tar.gz' % (version.replace('.','_'))] -java = 'Java' -javaver = '1.8.0_92' -versionsuffix = '-%s-%s' % (java, javaver) - builddependencies = [('CMake', '3.5.2')] dependencies = [ - (java, javaver, '', True), + ('Java', '1.8.0_92', '', True), ] # compile JNI wrapper library as described in docs -- GitLab From 4c71115eb1c0521c2a3161e16bb39e766d3e13f6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 15 Sep 2016 12:51:56 +0200 Subject: [PATCH 290/741] add easyconfig f90cache-0.96.eb --- .../easyconfigs/f/f90cache/f90cache-0.96.eb | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 easybuild/easyconfigs/f/f90cache/f90cache-0.96.eb diff --git a/easybuild/easyconfigs/f/f90cache/f90cache-0.96.eb b/easybuild/easyconfigs/f/f90cache/f90cache-0.96.eb new file mode 100644 index 0000000000..e0fc7d99c5 --- /dev/null +++ b/easybuild/easyconfigs/f/f90cache/f90cache-0.96.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'f90cache' +version = '0.96' + +homepage = 'http://people.irisa.fr/Edouard.Canot/f90cache/' +description = """f90cache is a compiler cache. It acts as a caching pre-processor to Fortran compilers, + using the -E compiler switch and a hash to detect when a compilation can be satisfied from cache. + This often results in a great speedup in common compilations.""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = ['http://people.irisa.fr/Edouard.Canot/f90cache/'] +sources = [SOURCE_TAR_BZ2] + +buildopts = "CFLAGS='-O2 -static'" + +sanity_check_paths = { + 'files': ['bin/f90cache'], + 'dirs': [], +} + +moduleclass = 'tools' -- GitLab From 82cbc6360716b59b068cee31dde49e517d18b0fc Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Thu, 15 Sep 2016 12:53:19 +0100 Subject: [PATCH 291/741] add easyconfig Boost-1.61.0-foss-2016b.eb, add easyconfig GROMACS-5.1.4-foss-2016b-hybrid.eb, add easyconfig GROMACS-5.1.4-foss-2016b-mt.eb --- .../b/Boost/Boost-1.61.0-foss-2016b.eb | 23 +++++++++++ .../GROMACS-5.1.4-foss-2016b-hybrid.eb | 39 +++++++++++++++++++ .../g/GROMACS/GROMACS-5.1.4-foss-2016b-mt.eb | 39 +++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b.eb create mode 100644 easybuild/easyconfigs/g/GROMACS/GROMACS-5.1.4-foss-2016b-hybrid.eb create mode 100644 easybuild/easyconfigs/g/GROMACS/GROMACS-5.1.4-foss-2016b-mt.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b.eb b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b.eb new file mode 100644 index 0000000000..876bfa42e6 --- /dev/null +++ b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b.eb @@ -0,0 +1,23 @@ +name = 'Boost' +version = '1.61.0' + +homepage = 'http://www.boost.org/' +description = """Boost provides free peer-reviewed portable C++ source libraries.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True, 'usempi': True} + +sources = ['%%(namelower)s_%s.tar.gz' % '_'.join(version.split('.'))] +source_urls = [SOURCEFORGE_SOURCE] + +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), +] + +configopts = '--without-libraries=python' + +# also build boost_mpi +boost_mpi = True + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-5.1.4-foss-2016b-hybrid.eb b/easybuild/easyconfigs/g/GROMACS/GROMACS-5.1.4-foss-2016b-hybrid.eb new file mode 100644 index 0000000000..2e153e4c27 --- /dev/null +++ b/easybuild/easyconfigs/g/GROMACS/GROMACS-5.1.4-foss-2016b-hybrid.eb @@ -0,0 +1,39 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University +# Authors:: Wiktor Jurkowski , Fotis Georgatos , \ +# George Tsouloupas , Kenneth Hoste +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-93.html +# +# Version 5.1.4 +# Author: Adam Huffman +# The Francis Crick Institute +## + +name = 'GROMACS' +version = '5.1.4' +versionsuffix = '-hybrid' + +homepage = 'http://www.gromacs.org' +description = """GROMACS is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'openmp': True, 'usempi': True} + +source_urls = ['ftp://ftp.gromacs.org/pub/gromacs/'] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [ + ('CMake', '3.5.2'), + ('libxml2', '2.9.4') +] + +dependencies = [('Boost', '1.61.0')] + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-5.1.4-foss-2016b-mt.eb b/easybuild/easyconfigs/g/GROMACS/GROMACS-5.1.4-foss-2016b-mt.eb new file mode 100644 index 0000000000..ab660ee955 --- /dev/null +++ b/easybuild/easyconfigs/g/GROMACS/GROMACS-5.1.4-foss-2016b-mt.eb @@ -0,0 +1,39 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University +# Authors:: Wiktor Jurkowski , Fotis Georgatos , \ +# George Tsouloupas , Kenneth Hoste +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-93.html +# +# Version 5.1.4 +# Author: Adam Huffman +# The Francis Crick Institute +## + +name = 'GROMACS' +version = '5.1.4' +versionsuffix = '-mt' + +homepage = 'http://www.gromacs.org' +description = """GROMACS is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'openmp': True, 'usempi': False} + +source_urls = ['ftp://ftp.gromacs.org/pub/gromacs/'] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [ + ('CMake', '3.5.2'), + ('libxml2', '2.9.4') +] + +dependencies = [('Boost', '1.61.0')] + +moduleclass = 'bio' -- GitLab From f51c1bfa1f736922e15040975adafa9f7b6ce1b8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 15 Sep 2016 14:02:31 +0200 Subject: [PATCH 292/741] add easyconfig ccache-3.3.1.eb --- .../easyconfigs/c/ccache/ccache-3.3.1.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/c/ccache/ccache-3.3.1.eb diff --git a/easybuild/easyconfigs/c/ccache/ccache-3.3.1.eb b/easybuild/easyconfigs/c/ccache/ccache-3.3.1.eb new file mode 100644 index 0000000000..66a9fe225a --- /dev/null +++ b/easybuild/easyconfigs/c/ccache/ccache-3.3.1.eb @@ -0,0 +1,36 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +## +easyblock = 'ConfigureMake' + +name = 'ccache' +version = '3.3.1' + +homepage = 'http://ccache.samba.org/' +description = """ccache-3.1.9: Cache for C/C++ compilers""" + +toolchain = {'name': 'dummy', 'version': ''} +toolchainopts = {'static': True} + +source_urls = ['https://github.com/ccache/ccache/archive/'] +sources = ['v%(version)s.tar.gz'] + +builddependencies = [ + ('Autotools', '20150215'), + ('zlib', '1.2.8'), +] + +preconfigopts = "./autogen.sh && " +buildopts = 'LDFLAGS="-static"' + +sanity_check_paths = { + 'files': ['bin/ccache'], + 'dirs': [] +} + +moduleclass = 'tools' -- GitLab From d4b6f3bcb621cdb68fcdde6efb70754b7f21c37f Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 15 Sep 2016 16:18:28 +0200 Subject: [PATCH 293/741] resolve dep conflicts --- .../w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb index a3cb9a333d..0e8d3f9d34 100644 --- a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb @@ -19,7 +19,7 @@ dependencies = [ ('Python', '2.7.11'), ('libpng', '1.6.21'), ('zlib', '1.2.8'), - ('libjpeg-turbo', '1.5.0'), + ('libjpeg-turbo', '1.4.2'), ('LibTIFF', '4.0.6'), ('expat', '2.1.1'), ('GTK+', '2.24.30'), -- GitLab From 9fee61323514bdbe0dc8792da18538ab70e7b60e Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 16 Sep 2016 10:15:34 +0200 Subject: [PATCH 294/741] OBITools with foss2016a --- .../Cython-0.23.5-foss-2016a-Python-2.7.11.eb | 24 +++++++++++++ .../Cython-0.24-foss-2016a-Python-2.7.11.eb | 24 +++++++++++++ .../Cython-0.24.1-foss-2016a-Python-2.7.11.eb | 24 +++++++++++++ ...OBITools-1.2.6-foss-2016a-Python-2.7.11.eb | 34 +++++++++++++++++++ ...OBITools-1.2.9-foss-2016a-Python-2.7.11.eb | 34 +++++++++++++++++++ 5 files changed, 140 insertions(+) create mode 100644 easybuild/easyconfigs/c/Cython/Cython-0.23.5-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/c/Cython/Cython-0.24-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/c/Cython/Cython-0.24.1-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/o/OBITools/OBITools-1.2.6-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.23.5-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/c/Cython/Cython-0.23.5-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..51de06bbef --- /dev/null +++ b/easybuild/easyconfigs/c/Cython/Cython-0.23.5-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'Cython' +version = '0.23.5' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/Cython/' +description = """The Cython language makes writing C extensions for the Python language as easy as Python itself. +Cython is a source code translator based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.11')] + +cythonlibdir = 'lib/python%(pyshortver)s/site-packages/Cython-%(version)s-py%(pyshortver)s-linux-x86_64.egg' +sanity_check_paths = { + 'files': ['bin/cygdb', 'bin/cython', '%s/%%(namelower)s.py' % cythonlibdir], + 'dirs': [cythonlibdir + '/%(name)s'] +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.24-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/c/Cython/Cython-0.24-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..a9134a498b --- /dev/null +++ b/easybuild/easyconfigs/c/Cython/Cython-0.24-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'Cython' +version = '0.24' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/Cython/' +description = """The Cython language makes writing C extensions for the Python language as easy as Python itself. +Cython is a source code translator based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.11')] + +cythonlibdir = 'lib/python%(pyshortver)s/site-packages/Cython-%(version)s-py%(pyshortver)s-linux-x86_64.egg' +sanity_check_paths = { + 'files': ['bin/cygdb', 'bin/cython', '%s/%%(namelower)s.py' % cythonlibdir], + 'dirs': [cythonlibdir + '/%(name)s'] +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.24.1-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/c/Cython/Cython-0.24.1-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..a2db0bddbe --- /dev/null +++ b/easybuild/easyconfigs/c/Cython/Cython-0.24.1-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'Cython' +version = '0.24.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/Cython/' +description = """The Cython language makes writing C extensions for the Python language as easy as Python itself. +Cython is a source code translator based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.11')] + +cythonlibdir = 'lib/python%(pyshortver)s/site-packages/Cython-%(version)s-py%(pyshortver)s-linux-x86_64.egg' +sanity_check_paths = { + 'files': ['bin/cygdb', 'bin/cython', '%s/%%(namelower)s.py' % cythonlibdir], + 'dirs': [cythonlibdir + '/%(name)s'] +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/o/OBITools/OBITools-1.2.6-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OBITools/OBITools-1.2.6-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..cd5245c6e2 --- /dev/null +++ b/easybuild/easyconfigs/o/OBITools/OBITools-1.2.6-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,34 @@ +easyblock = "PythonPackage" + +name = 'OBITools' +version = '1.2.6' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.grenoble.prabi.fr/trac/OBITools' +description = """ The OBITools programs aims to help you to manipulate various data and sequence files in a convenient way using + the Unix command line interface. They follow the standard Unix interface for command line program, allowing to chain a set of + commands using the pipe mecanism. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + + +dependencies = [ + ('Python', '2.7.11'), + ('Cython', '0.23.5', versionsuffix), # Has to be 0.23.5 + ('wheel', '0.29.0', versionsuffix), + ('IPython', '5.0.0', versionsuffix), + ('Sphinx', '1.4.5', versionsuffix) +] + +options = {'modulename': 'obitools'} + +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ['ali2consensus','ecotag','obiaddtaxids','obicount','obistat']], + 'dirs': ['bin','lib/python%(pyshortver)s/site-packages/obitools'], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..8ecf00679f --- /dev/null +++ b/easybuild/easyconfigs/o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,34 @@ +easyblock = "PythonPackage" + +name = 'OBITools' +version = '1.2.9' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.grenoble.prabi.fr/trac/OBITools' +description = """ The OBITools programs aims to help you to manipulate various data and sequence files in a convenient way using + the Unix command line interface. They follow the standard Unix interface for command line program, allowing to chain a set of + commands using the pipe mecanism. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + + +dependencies = [ + ('Python', '2.7.11'), + ('Cython', '0.24.1', versionsuffix), + ('wheel', '0.29.0', versionsuffix), + ('IPython', '5.0.0', versionsuffix), + ('Sphinx', '1.4.5', versionsuffix) +] + +options = {'modulename': 'obitools'} + +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ['ali2consensus','ecotag','obiaddtaxids','obicount','obistat']], + 'dirs': ['bin','lib/python%(pyshortver)s/site-packages/obitools'], +} + +moduleclass = 'math' -- GitLab From cd36f5dfc0f5b18cf614075ed15e2825de029229 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 16 Sep 2016 10:16:40 +0200 Subject: [PATCH 295/741] remove older version files --- .../Cython-0.23.5-foss-2016a-Python-2.7.11.eb | 24 ------------- .../Cython-0.24-foss-2016a-Python-2.7.11.eb | 24 ------------- ...OBITools-1.2.6-foss-2016a-Python-2.7.11.eb | 34 ------------------- 3 files changed, 82 deletions(-) delete mode 100644 easybuild/easyconfigs/c/Cython/Cython-0.23.5-foss-2016a-Python-2.7.11.eb delete mode 100644 easybuild/easyconfigs/c/Cython/Cython-0.24-foss-2016a-Python-2.7.11.eb delete mode 100644 easybuild/easyconfigs/o/OBITools/OBITools-1.2.6-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.23.5-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/c/Cython/Cython-0.23.5-foss-2016a-Python-2.7.11.eb deleted file mode 100644 index 51de06bbef..0000000000 --- a/easybuild/easyconfigs/c/Cython/Cython-0.23.5-foss-2016a-Python-2.7.11.eb +++ /dev/null @@ -1,24 +0,0 @@ -easyblock = 'PythonPackage' - -name = 'Cython' -version = '0.23.5' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'https://pypi.python.org/pypi/Cython/' -description = """The Cython language makes writing C extensions for the Python language as easy as Python itself. -Cython is a source code translator based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.""" - -toolchain = {'name': 'foss', 'version': '2016a'} - -source_urls = [PYPI_SOURCE] -sources = [SOURCE_TAR_GZ] - -dependencies = [('Python', '2.7.11')] - -cythonlibdir = 'lib/python%(pyshortver)s/site-packages/Cython-%(version)s-py%(pyshortver)s-linux-x86_64.egg' -sanity_check_paths = { - 'files': ['bin/cygdb', 'bin/cython', '%s/%%(namelower)s.py' % cythonlibdir], - 'dirs': [cythonlibdir + '/%(name)s'] -} - -moduleclass = 'lang' diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.24-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/c/Cython/Cython-0.24-foss-2016a-Python-2.7.11.eb deleted file mode 100644 index a9134a498b..0000000000 --- a/easybuild/easyconfigs/c/Cython/Cython-0.24-foss-2016a-Python-2.7.11.eb +++ /dev/null @@ -1,24 +0,0 @@ -easyblock = 'PythonPackage' - -name = 'Cython' -version = '0.24' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'https://pypi.python.org/pypi/Cython/' -description = """The Cython language makes writing C extensions for the Python language as easy as Python itself. -Cython is a source code translator based on the well-known Pyrex, but supports more cutting edge functionality and optimizations.""" - -toolchain = {'name': 'foss', 'version': '2016a'} - -source_urls = [PYPI_SOURCE] -sources = [SOURCE_TAR_GZ] - -dependencies = [('Python', '2.7.11')] - -cythonlibdir = 'lib/python%(pyshortver)s/site-packages/Cython-%(version)s-py%(pyshortver)s-linux-x86_64.egg' -sanity_check_paths = { - 'files': ['bin/cygdb', 'bin/cython', '%s/%%(namelower)s.py' % cythonlibdir], - 'dirs': [cythonlibdir + '/%(name)s'] -} - -moduleclass = 'lang' diff --git a/easybuild/easyconfigs/o/OBITools/OBITools-1.2.6-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OBITools/OBITools-1.2.6-foss-2016a-Python-2.7.11.eb deleted file mode 100644 index cd5245c6e2..0000000000 --- a/easybuild/easyconfigs/o/OBITools/OBITools-1.2.6-foss-2016a-Python-2.7.11.eb +++ /dev/null @@ -1,34 +0,0 @@ -easyblock = "PythonPackage" - -name = 'OBITools' -version = '1.2.6' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'http://www.grenoble.prabi.fr/trac/OBITools' -description = """ The OBITools programs aims to help you to manipulate various data and sequence files in a convenient way using - the Unix command line interface. They follow the standard Unix interface for command line program, allowing to chain a set of - commands using the pipe mecanism. -""" - -toolchain = {'name': 'foss', 'version': '2016a'} - -source_urls = [PYPI_SOURCE] -sources = [SOURCE_TAR_GZ] - - -dependencies = [ - ('Python', '2.7.11'), - ('Cython', '0.23.5', versionsuffix), # Has to be 0.23.5 - ('wheel', '0.29.0', versionsuffix), - ('IPython', '5.0.0', versionsuffix), - ('Sphinx', '1.4.5', versionsuffix) -] - -options = {'modulename': 'obitools'} - -sanity_check_paths = { - 'files': ["bin/%s" % binfile for binfile in ['ali2consensus','ecotag','obiaddtaxids','obicount','obistat']], - 'dirs': ['bin','lib/python%(pyshortver)s/site-packages/obitools'], -} - -moduleclass = 'math' -- GitLab From f7fb8f535fe43730b3dd8a2ce2372bddc6a1a33e Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 16 Sep 2016 10:19:12 +0200 Subject: [PATCH 296/741] GStreamer and GST-plugins-base 0.10 versions --- .../GST-plugins-base-0.10.36-foss-2016a.eb | 35 ++++++++++++++++ .../GStreamer/GStreamer-0.10.36-foss-2016a.eb | 40 +++++++++++++++++++ ...Python-3.0.2.0-foss-2016a-Python-2.7.11.eb | 4 +- 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-0.10.36-foss-2016a.eb create mode 100644 easybuild/easyconfigs/g/GStreamer/GStreamer-0.10.36-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-0.10.36-foss-2016a.eb b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-0.10.36-foss-2016a.eb new file mode 100644 index 0000000000..d0bab44734 --- /dev/null +++ b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-0.10.36-foss-2016a.eb @@ -0,0 +1,35 @@ +easyblock = 'ConfigureMake' + +name = 'GST-plugins-base' +version = '0.10.36' + +homepage = 'http://gstreamer.freedesktop.org/' +description = """GStreamer is a library for constructing graphs of media-handling + components. The applications it supports range from simple + Ogg/Vorbis playback, audio/video streaming to complex audio + (mixing) and video (non-linear editing) processing.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://gstreamer.freedesktop.org/src/gst-plugins-base'] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [('GStreamer', '0.10.36')] + +# does not work with Bison 3.x +builddependencies = [ + ('Bison', '2.7', '', True), +] + +sanity_check_paths = { + 'files': ['bin/gst-%s-%%(version_major_minor)s' % x for x in ['discoverer', 'visualise']] + + ['lib/libgst%s-%%(version_major_minor)s.%s' % (x, SHLIB_EXT) for x in ['app', 'audio', 'video']], + 'dirs': ['include', 'share'] +} + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/GStreamer/GStreamer-0.10.36-foss-2016a.eb b/easybuild/easyconfigs/g/GStreamer/GStreamer-0.10.36-foss-2016a.eb new file mode 100644 index 0000000000..3dddb7ed20 --- /dev/null +++ b/easybuild/easyconfigs/g/GStreamer/GStreamer-0.10.36-foss-2016a.eb @@ -0,0 +1,40 @@ +easyblock = 'ConfigureMake' + +name = 'GStreamer' +version = '0.10.36' + +homepage = 'http://gstreamer.freedesktop.org/' +description = """GStreamer is a library for constructing graphs of media-handling + components. The applications it supports range from simple + Ogg/Vorbis playback, audio/video streaming to complex audio + (mixing) and video (non-linear editing) processing.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://gstreamer.freedesktop.org/src/gstreamer'] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('GLib', '2.48.0'), + ('GObject-Introspection', '1.48.0'), + ('zlib', '1.2.8'), +] + +# does not work with Bison 3.x +builddependencies = [ + ('Bison', '2.7', '', True), +] + +sanity_check_paths = { + 'files': ['bin/gst-%s-%%(version_major_minor)s' % x for x in ['inspect', 'typefind', 'launch']] + + ['lib/libgst%s-%%(version_major_minor)s.%s' % (x, SHLIB_EXT) for x in ['reamer', 'base', + 'controller', 'check']], + 'dirs': ['include', 'share', 'libexec'], +} + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb index 0e8d3f9d34..ddb87ab0aa 100644 --- a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-foss-2016a-Python-2.7.11.eb @@ -19,12 +19,12 @@ dependencies = [ ('Python', '2.7.11'), ('libpng', '1.6.21'), ('zlib', '1.2.8'), - ('libjpeg-turbo', '1.4.2'), + ('libjpeg-turbo', '1.4.2', '-NASM-2.12.01'), ('LibTIFF', '4.0.6'), ('expat', '2.1.1'), ('GTK+', '2.24.30'), ('GConf', '3.2.6'), - ('GST-plugins-base', '1.8.3'), + ('GST-plugins-base', '0.10.36'), ('libGLU', '9.0.0', '-Mesa-11.2.1'), ('libSM', '1.2.2'), ('libXxf86vm', '1.1.4'), -- GitLab From 6f64c98d078beb5de89e99519729587d742c7895 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 16 Sep 2016 12:42:44 +0200 Subject: [PATCH 297/741] Log-Log4perl foss2016a --- .../Log-Log4perl-1.47-foss-2016a.eb | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 easybuild/easyconfigs/l/Log-Log4perl/Log-Log4perl-1.47-foss-2016a.eb diff --git a/easybuild/easyconfigs/l/Log-Log4perl/Log-Log4perl-1.47-foss-2016a.eb b/easybuild/easyconfigs/l/Log-Log4perl/Log-Log4perl-1.47-foss-2016a.eb new file mode 100644 index 0000000000..da1c7223b7 --- /dev/null +++ b/easybuild/easyconfigs/l/Log-Log4perl/Log-Log4perl-1.47-foss-2016a.eb @@ -0,0 +1,23 @@ +easyblock = 'PerlModule' + +name = 'Log-Log4perl' +version = '1.47' + +homepage = 'https://metacpan.org/pod/Log::Log4perl' +description = """Log4perl""" + +toolchain = {'name': 'foss', 'version': '2016a'} +source_urls = ['https://cpan.metacpan.org/authors/id/M/MS/MSCHILLI/'] +sources = [SOURCE_TAR_GZ] + +perl = 'Perl' +perlver = '5.22.1' +perlversuffix = '-bare' + +dependencies = [ + (perl, perlver, perlversuffix) +] + +options = {'modulename': 'Log::Log4perl'} + +moduleclass = 'data' -- GitLab From aa2c671f7747b10eb7ad153206b8488c174d84a9 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 11:26:26 +0200 Subject: [PATCH 298/741] Cairo for intel/2016b --- .../c/cairo/cairo-1.14.6-intel-2016b.eb | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb new file mode 100644 index 0000000000..8b72c69a68 --- /dev/null +++ b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb @@ -0,0 +1,43 @@ +easyblock = 'ConfigureMake' + +name = 'cairo' +version = '1.14.6' + +homepage = 'http://cairographics.org' +description = """Cairo is a 2D graphics library with support for multiple output devices. + Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, + PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://cairographics.org/releases/'] +sources = [SOURCE_TAR_XZ] + +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libpng', '1.6.24'), + ('freetype', '2.6.5'), + ('pixman', '0.34.0'), + ('expat', '2.2.0'), + ('GLib', '2.49.5'), + ('X11', '20160819'), +] + +# disable symbol lookup, which requires -lbfd, to avoid link issues with (non-PIC) libiberty.a provided by GCC +configopts = "--enable-symbol-lookup=no --enable-gobject=yes --enable-svg=yes --enable-tee=yes " + +# workaround for "hidden symbol .* in .* is referenced by DSO" and "ld: final link failed: Bad value" +buildopts = 'LD="$CC" LDFLAGS="$LDFLAGS -shared-intel"' + +sanity_check_paths = { + 'files': ['bin/cairo-trace', 'lib/cairo/libcairo-trace.so', 'lib/cairo/libcairo-trace.a', + 'lib/libcairo.a', 'lib/libcairo-gobject.a', 'lib/libcairo-script-interpreter.a', + 'lib/libcairo-gobject.so', 'lib/libcairo-script-interpreter.so', 'lib/libcairo.so'] + + ['include/cairo/cairo%s.h' % x for x in ['', '-deprecated', '-features', '-ft', '-gobject', '-pdf', '-ps', + '-script', '-script-interpreter', '-svg', '-version', '-xcb', + '-xlib', '-xlib-xrender']], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'vis' -- GitLab From 5e8ddb02cb38f9cb339d243d8f1d198fce69d8cc Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 11:36:52 +0200 Subject: [PATCH 299/741] Pango/1.40.3 for intel/2016b --- ...Object-Introspection-1.49.2-intel-2016b.eb | 47 +++++++++++++++++++ .../h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb | 34 ++++++++++++++ .../p/Pango/Pango-1.40.3-intel-2016b.eb | 31 ++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.2-intel-2016b.eb create mode 100644 easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb diff --git a/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.2-intel-2016b.eb b/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.2-intel-2016b.eb new file mode 100644 index 0000000000..616a0c8d65 --- /dev/null +++ b/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.2-intel-2016b.eb @@ -0,0 +1,47 @@ +easyblock = 'ConfigureMake' + +name = 'GObject-Introspection' +version = '1.49.2' + +homepage = 'https://wiki.gnome.org/GObjectIntrospection/' +description = """GObject introspection is a middleware layer between C libraries + (using GObject) and language bindings. The C library can be scanned at + compile time and generate a metadata file, in addition to the actual + native C library. Then at runtime, language bindings can read this + metadata and automatically provide bindings to call into the C library.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('Python', '2.7.12'), + ('GLib', '2.49.5'), + ('libffi', '3.2.1'), +] + +builddependencies = [ + ('Autotools', '20150215'), + ('flex', '2.6.0'), + ('Bison', '3.0.4'), + ('cairo', '1.14.6'), +] + +preconfigopts = "env GI_SCANNER_DISABLE_CACHE=true " + +# avoid using hard-coded path to 'python' in shebang of scripts +buildopts = "PYTHON=python" + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +sanity_check_paths = { + 'files': ['bin/g-ir-%s' % x for x in ['annotation-tool', 'compiler', 'generate', 'scanner']] + + ['lib/libgirepository-1.0.%s' % x for x in ['so', 'a']], + 'dirs': ['include', 'share'] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb new file mode 100644 index 0000000000..7471de5f95 --- /dev/null +++ b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'HarfBuzz' +version = '1.3.1' + +homepage = 'http://www.freedesktop.org/wiki/Software/HarfBuzz' +description = """HarfBuzz is an OpenType text shaping engine.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.freedesktop.org/software/harfbuzz/release/'] +sources = [SOURCELOWER_TAR_BZ2] + +dependencies = [ + ('GLib', '2.49.5'), + ('cairo', '1.14.6'), + ('freetype', '2.6.5'), +] + +builddependencies = [('GObject-Introspection', '1.49.2')] + +configopts = "--enable-introspection=yes --with-gobject=yes --enable-static --enable-shared --with-cairo " + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +sanity_check_paths = { + 'files': ['lib/libharfbuzz.%s' % SHLIB_EXT, 'bin/hb-view'], + 'dirs': [] +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb b/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb new file mode 100644 index 0000000000..f3c71a9da5 --- /dev/null +++ b/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'Pango' +version = '1.40.3' + +homepage = 'http://www.pango.org/' +description = """Pango is a library for laying out and rendering of text, with an emphasis on internationalization. +Pango can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the +context of the GTK+ widget toolkit. Pango forms the core of text and font handling for GTK+-2.x.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('X11', '20160819'), + ('GLib', '2.49.5'), + ('cairo', '1.14.6'), + ('HarfBuzz', '1.3.1'), +] + +builddependencies = [('GObject-Introspection', '1.49.2')] + +configopts = "--disable-silent-rules --enable-introspection=yes --enable-static --enable-shared " + +modextrapaths = { + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' -- GitLab From 796ac5ce7b709eae33faf21df1ec77939d47bda0 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 12:01:51 +0200 Subject: [PATCH 300/741] Add pixman/0.34.0 for intel/2016b --- .../p/pixman/pixman-0.34.0-intel-2016b.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/p/pixman/pixman-0.34.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/p/pixman/pixman-0.34.0-intel-2016b.eb b/easybuild/easyconfigs/p/pixman/pixman-0.34.0-intel-2016b.eb new file mode 100644 index 0000000000..ae4b777250 --- /dev/null +++ b/easybuild/easyconfigs/p/pixman/pixman-0.34.0-intel-2016b.eb @@ -0,0 +1,20 @@ +easyblock = 'ConfigureMake' + +name = "pixman" +version = '0.34.0' + +homepage = 'http://www.pixman.org/' +description = """Pixman is a low-level software library for pixel manipulation, providing features such as image +compositing and trapezoid rasterization. Important users of pixman are the cairo graphics library and the X server.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://cairographics.org/releases/'] +sources = [SOURCE_TAR_GZ] + +sanity_check_paths = { + 'files': ['lib/libpixman-1.%s' % SHLIB_EXT], + 'dirs': [] +} + +moduleclass = 'vis' -- GitLab From 1b6a3b94b79fff5e9429b6f994ec0d2ffa96dbb4 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 19 Sep 2016 13:57:04 +0200 Subject: [PATCH 301/741] add easyconfig Java-1.6.0_24.eb --- easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb diff --git a/easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb b/easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb new file mode 100644 index 0000000000..c6a48a76b4 --- /dev/null +++ b/easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb @@ -0,0 +1,42 @@ +# Built with EasyBuild version 2.8.0 on 2016-06-01_16-05-57 +name = 'Java' +version = '1.6.0_24' + +homepage = 'http://java.com/' +description = """Java Platform, Standard Edition (Java SE) lets you develop and deploy + Java applications on desktops and servers.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +# download the tar.gz directly from http://www.oracle.com/technetwork/java/javase/downloads/index.html +(vp, vs) = version.split('_') +altver = '%su%s' % (vp.split('.')[1], vs) +sources = ['jdk-%s-linux-x64.bin' % altver] + +moduleclass = 'lang' + +# Build statistics +buildstats = [{ + "easybuild-framework_version": "2.8.0", + "easybuild-easyblocks_version": "2.8.0", + "timestamp": 1464789948, + "build_time": 96.02, + "install_size": 229623303, + "command_line": ['--buildpath=/export/soft/easybuild/build-dir/generic', '--configfiles=/scicore/soft/apps/easybuild-config-files/generic.cfg', '--filter-deps=GLib,libX11,libXt,libXrender', '--force', '--hide-deps=ncurses,zlib,bzip2,libpng,libreadline,libjpeg-turbo,libxml2,libxslt,Tk,Tcl,LibTIFF,OpenSSL,cairo,expat,gettext,pixman,fontconfig', '--include-easyblocks=java.py', '--installpath=/scicore/soft', '--modules-tool=Lmod', '--optarch=GENERIC', '--package', '--packagepath=/export/soft/RPMs/centos6/generic/', '--repository=GitRepository', '--repositorypath=git@bc2-gl.bc2.unibas.ch:easybuild/installed_easyconfigs.git,generic', '--sourcepath=/export/soft/source', '--subdir-software=apps', '--tmp-logdir=/export/soft/easybuild/build-dir/generic', '--tmpdir=/export/soft/easybuild/build-dir/generic', '--umask=022', 'Java-1.6.0_24.eb'], + "modules_tool": ('Lmod', '/export/soft/lua_lmod/centos6/lmod/lmod/libexec/lmod', '6.0.9'), + "core_count": 8, + "cpu_model": "Intel(R) Xeon(R) CPU E5620 @ 2.40GHz", + "cpu_speed": 2394.0, + "cpu_vendor": "Intel", + "gcc_version": "Using built-in specs.; Target: x86_64-redhat-linux; Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux; Thread model: posix; gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ; ", + "glibc_version": "2.12", + "hostname": "login18.cluster.bc2.ch", + "os_name": "centos", + "os_type": "Linux", + "os_version": "6.5", + "platform_name": "x86_64-unknown-linux", + "python_version": "2.6.6 (r266:84292, Jan 22 2014, 09:42:36) ; [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]", + "system_gcc_path": "/usr/bin/gcc", + "system_python_path": "/usr/bin/python", + "total_memory": 48255, +}] -- GitLab From 632775ca42624540faa90acf3b914046af414799 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Lopez Date: Mon, 19 Sep 2016 13:57:43 +0200 Subject: [PATCH 302/741] removed build statistics --- easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb b/easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb index c6a48a76b4..ec1642238f 100644 --- a/easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb +++ b/easybuild/easyconfigs/j/Java/Java-1.6.0_24.eb @@ -1,4 +1,3 @@ -# Built with EasyBuild version 2.8.0 on 2016-06-01_16-05-57 name = 'Java' version = '1.6.0_24' @@ -14,29 +13,3 @@ altver = '%su%s' % (vp.split('.')[1], vs) sources = ['jdk-%s-linux-x64.bin' % altver] moduleclass = 'lang' - -# Build statistics -buildstats = [{ - "easybuild-framework_version": "2.8.0", - "easybuild-easyblocks_version": "2.8.0", - "timestamp": 1464789948, - "build_time": 96.02, - "install_size": 229623303, - "command_line": ['--buildpath=/export/soft/easybuild/build-dir/generic', '--configfiles=/scicore/soft/apps/easybuild-config-files/generic.cfg', '--filter-deps=GLib,libX11,libXt,libXrender', '--force', '--hide-deps=ncurses,zlib,bzip2,libpng,libreadline,libjpeg-turbo,libxml2,libxslt,Tk,Tcl,LibTIFF,OpenSSL,cairo,expat,gettext,pixman,fontconfig', '--include-easyblocks=java.py', '--installpath=/scicore/soft', '--modules-tool=Lmod', '--optarch=GENERIC', '--package', '--packagepath=/export/soft/RPMs/centos6/generic/', '--repository=GitRepository', '--repositorypath=git@bc2-gl.bc2.unibas.ch:easybuild/installed_easyconfigs.git,generic', '--sourcepath=/export/soft/source', '--subdir-software=apps', '--tmp-logdir=/export/soft/easybuild/build-dir/generic', '--tmpdir=/export/soft/easybuild/build-dir/generic', '--umask=022', 'Java-1.6.0_24.eb'], - "modules_tool": ('Lmod', '/export/soft/lua_lmod/centos6/lmod/lmod/libexec/lmod', '6.0.9'), - "core_count": 8, - "cpu_model": "Intel(R) Xeon(R) CPU E5620 @ 2.40GHz", - "cpu_speed": 2394.0, - "cpu_vendor": "Intel", - "gcc_version": "Using built-in specs.; Target: x86_64-redhat-linux; Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux; Thread model: posix; gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ; ", - "glibc_version": "2.12", - "hostname": "login18.cluster.bc2.ch", - "os_name": "centos", - "os_type": "Linux", - "os_version": "6.5", - "platform_name": "x86_64-unknown-linux", - "python_version": "2.6.6 (r266:84292, Jan 22 2014, 09:42:36) ; [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]", - "system_gcc_path": "/usr/bin/gcc", - "system_python_path": "/usr/bin/python", - "total_memory": 48255, -}] -- GitLab From f0a42c7edd985a11ee0ae5037e75758d01450452 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 14:02:03 +0200 Subject: [PATCH 303/741] Add SWIG/3.0.8 for Python/3.5.2 and intel/2016b --- .../SWIG-3.0.8-intel-2016b-Python-3.5.2.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..230fa8885d --- /dev/null +++ b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,20 @@ +name = 'SWIG' +version = '3.0.8' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.swig.org/' +description = """SWIG is a software development tool that connects programs written in C and C++ with + a variety of high-level programming languages.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2'), + ('PCRE', '8.38'), +] + +moduleclass = 'devel' -- GitLab From efe52a5a9cfbefcca561ba49680950ced58cbb07 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 14:04:16 +0200 Subject: [PATCH 304/741] Drop to 1.49.1 for GObject-Introspection (else needs newer glib) --- easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb | 2 +- ...tel-2016b.eb => GObject-Introspection-1.49.1-intel-2016b.eb} | 2 +- easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb | 2 +- easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename easybuild/easyconfigs/g/GObject-Introspection/{GObject-Introspection-1.49.2-intel-2016b.eb => GObject-Introspection-1.49.1-intel-2016b.eb} (98%) diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb index 8b72c69a68..54967b2ef7 100644 --- a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb +++ b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb @@ -25,7 +25,7 @@ dependencies = [ ] # disable symbol lookup, which requires -lbfd, to avoid link issues with (non-PIC) libiberty.a provided by GCC -configopts = "--enable-symbol-lookup=no --enable-gobject=yes --enable-svg=yes --enable-tee=yes " +configopts = "--enable-symbol-lookup=no --enable-gobject=yes --enable-svg=yes --enable-tee=yes --enable-xlib-xcb " # workaround for "hidden symbol .* in .* is referenced by DSO" and "ld: final link failed: Bad value" buildopts = 'LD="$CC" LDFLAGS="$LDFLAGS -shared-intel"' diff --git a/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.2-intel-2016b.eb b/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.1-intel-2016b.eb similarity index 98% rename from easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.2-intel-2016b.eb rename to easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.1-intel-2016b.eb index 616a0c8d65..09a8cb39dc 100644 --- a/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.2-intel-2016b.eb +++ b/easybuild/easyconfigs/g/GObject-Introspection/GObject-Introspection-1.49.1-intel-2016b.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'GObject-Introspection' -version = '1.49.2' +version = '1.49.1' homepage = 'https://wiki.gnome.org/GObjectIntrospection/' description = """GObject introspection is a middleware layer between C libraries diff --git a/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb index 7471de5f95..6a9022cf44 100644 --- a/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb +++ b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.1-intel-2016b.eb @@ -17,7 +17,7 @@ dependencies = [ ('freetype', '2.6.5'), ] -builddependencies = [('GObject-Introspection', '1.49.2')] +builddependencies = [('GObject-Introspection', '1.49.1')] configopts = "--enable-introspection=yes --with-gobject=yes --enable-static --enable-shared --with-cairo " diff --git a/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb b/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb index f3c71a9da5..16a2426440 100644 --- a/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb +++ b/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b.eb @@ -20,7 +20,7 @@ dependencies = [ ('HarfBuzz', '1.3.1'), ] -builddependencies = [('GObject-Introspection', '1.49.2')] +builddependencies = [('GObject-Introspection', '1.49.1')] configopts = "--disable-silent-rules --enable-introspection=yes --enable-static --enable-shared " -- GitLab From 5f837e79f20ca7913b78ef57635998934aaa05ba Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 19 Sep 2016 14:04:44 +0200 Subject: [PATCH 305/741] enable running of tests for HPCG --- easybuild/easyconfigs/h/HPCG/HPCG-2.1-goolf-1.4.10.eb | 2 ++ easybuild/easyconfigs/h/HPCG/HPCG-2.1-ictce-5.5.0.eb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/easybuild/easyconfigs/h/HPCG/HPCG-2.1-goolf-1.4.10.eb b/easybuild/easyconfigs/h/HPCG/HPCG-2.1-goolf-1.4.10.eb index 06eaeceafd..cc1b322548 100644 --- a/easybuild/easyconfigs/h/HPCG/HPCG-2.1-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/h/HPCG/HPCG-2.1-goolf-1.4.10.eb @@ -11,4 +11,6 @@ toolchainopts = {'usempi': True, 'openmp': True} source_urls = ['https://software.sandia.gov/hpcg/downloads/'] sources = [SOURCELOWER_TAR_GZ] +runtest = True + moduleclass = 'math' diff --git a/easybuild/easyconfigs/h/HPCG/HPCG-2.1-ictce-5.5.0.eb b/easybuild/easyconfigs/h/HPCG/HPCG-2.1-ictce-5.5.0.eb index 1d3f7c2d89..550fcae2be 100644 --- a/easybuild/easyconfigs/h/HPCG/HPCG-2.1-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/h/HPCG/HPCG-2.1-ictce-5.5.0.eb @@ -11,4 +11,6 @@ toolchainopts = {'usempi': True, 'openmp': True} source_urls = ['https://software.sandia.gov/hpcg/downloads/'] sources = [SOURCELOWER_TAR_GZ] +runtest = True + moduleclass = 'math' -- GitLab From 1cb97141ef181fd294856dd68ded77d3d93742ed Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 19 Sep 2016 14:06:36 +0200 Subject: [PATCH 306/741] remove --with-tcl-config/--with-tk-config from R easyconfig, already done in R easyblock --- easybuild/easyconfigs/r/R/R-3.2.3-intel-2016a-libX11-1.6.3.eb | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/r/R/R-3.2.3-intel-2016a-libX11-1.6.3.eb b/easybuild/easyconfigs/r/R/R-3.2.3-intel-2016a-libX11-1.6.3.eb index 5a44f1a48c..1a886a00c9 100644 --- a/easybuild/easyconfigs/r/R/R-3.2.3-intel-2016a-libX11-1.6.3.eb +++ b/easybuild/easyconfigs/r/R/R-3.2.3-intel-2016a-libX11-1.6.3.eb @@ -15,8 +15,6 @@ source_urls = ['http://cran.us.r-project.org/src/base/R-%(version_major)s'] preconfigopts = 'BLAS_LIBS="$LIBBLAS" LAPACK_LIBS="$LIBLAPACK"' configopts = "--with-lapack --with-blas --with-pic --enable-threads --with-x=yes --enable-R-shlib" -#Actually use Tcl/Tk -configopts += ' --with-tcl-config=$EBROOTTCL/lib/tclConfig.sh --with-tk-config=$EBROOTTK/lib/tkConfig.sh ' # Enable graphics capabilities for plotting. configopts += " --with-cairo --with-libpng --with-jpeglib --with-libtiff" # some recommended packages may fail in a parallel build (e.g. Matrix), and we're installing them anyway below -- GitLab From 77245218a97521b5c5f12260d2f73c463257d607 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 14:50:42 +0200 Subject: [PATCH 307/741] Added Theano/0.8.2 for intel/2016b + Python 3.5.2 Would pydot for visualization --- .../Theano-0.8.2-intel-2016b-Python-3.5.2.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..c94eb7afed --- /dev/null +++ b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,27 @@ +easyblock = "PythonPackage" + +name = 'Theano' +version = '0.8.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://deeplearning.net/software/theano' +description = """Theano is a Python library that allows you to define, optimize, +and evaluate mathematical expressions involving multi-dimensional arrays efficiently.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '3.5.2')] + +builddependencies = [('nose-parameterized', '0.5.0', versionsuffix)] + +runtests = 'nosetests theano' + +sanity_check_paths = { + 'files': ['bin/theano-cache', 'bin/theano-nose', 'bin/theano-test'], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], +} + +moduleclass = 'math' -- GitLab From ff342324c7dceb2f22ce786e9da40fa3a4e89d1a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 14:53:08 +0200 Subject: [PATCH 308/741] Add forgotten dep: nose-parameterized --- ...eterized-0.5.0-intel-2016b-Python-3.5.2.eb | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..be6e199cd9 --- /dev/null +++ b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,24 @@ +easyblock = "PythonPackage" + +name = 'nose-parameterized' +version = '0.5.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'hmat://github.com/wolever/nose-parameterized' +description = """Parameterized testing with any Python test framework.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '3.5.2')] + +options = {'modulename': 'nose_parameterized'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/nose_parameterized-%(version)s-py%(pyshortver)s.egg'], +} + +moduleclass = 'devel' -- GitLab From 012d39f1acccea70bdc9cc74577140cfaaa32127 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 14:59:57 +0200 Subject: [PATCH 309/741] h5py for Python/3.5.2+intel/2016b+HDF5/1.8.17 --- ....0-intel-2016b-Python-3.5.2-HDF5-1.8.17.eb | 34 +++++++++++++++++++ ...kgconfig-1.1.0-intel-2016b-Python-3.5.2.eb | 26 ++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 easybuild/easyconfigs/h/h5py/h5py-2.6.0-intel-2016b-Python-3.5.2-HDF5-1.8.17.eb create mode 100644 easybuild/easyconfigs/p/pkgconfig/pkgconfig-1.1.0-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.6.0-intel-2016b-Python-3.5.2-HDF5-1.8.17.eb b/easybuild/easyconfigs/h/h5py/h5py-2.6.0-intel-2016b-Python-3.5.2-HDF5-1.8.17.eb new file mode 100644 index 0000000000..156acadec8 --- /dev/null +++ b/easybuild/easyconfigs/h/h5py/h5py-2.6.0-intel-2016b-Python-3.5.2-HDF5-1.8.17.eb @@ -0,0 +1,34 @@ +easyblock = "PythonPackage" + +name = 'h5py' +version = '2.6.0' + +homepage = 'http://www.h5py.org/' +description = """HDF5 for Python (h5py) is a general-purpose Python interface to the Hierarchical Data Format library, + version 5. HDF5 is a versatile, mature scientific software library designed for the fast, flexible storage of enormous + amounts of data.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'usempi': True} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +hdf5ver = '1.8.17' +versionsuffix = '-Python-%%(pyver)s-HDF5-%s' % hdf5ver + +# to really use mpi enabled hdf5 we now seem to need a configure step +prebuildopts = ' python setup.py configure --mpi --hdf5=$EBROOTHDF5 && ' + +dependencies = [ + ('Python', '3.5.2'), + ('HDF5', hdf5ver), + ('pkgconfig', '1.1.0', '-Python-%(pyver)s'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/'], +} + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/p/pkgconfig/pkgconfig-1.1.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/pkgconfig/pkgconfig-1.1.0-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..2723e2f049 --- /dev/null +++ b/easybuild/easyconfigs/p/pkgconfig/pkgconfig-1.1.0-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,26 @@ +easyblock = 'PythonPackage' + +name = 'pkgconfig' +version = '1.1.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://github.com/matze/pkgconfig' +description = """pkgconfig is a Python module to interface with the pkg-config command line tool""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'usempi': True} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2'), + ('pkg-config', '0.29.1'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/'], +} + +moduleclass = 'data' -- GitLab From 6ab4c08ef47d3c0d4f3bfad5bfbbc9449d05a191 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 15:01:04 +0200 Subject: [PATCH 310/741] Add Keras/1.0.8 --- .../Keras-1.0.8-intel-2016b-Python-3.5.2.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..5d47272ae6 --- /dev/null +++ b/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,27 @@ +easyblock = "PythonPackage" + +name = 'Keras' +version = '1.0.8' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://keras.io/' +description = """Keras is a minimalist, highly modular neural networks library, written in Python and +capable of running on top of either TensorFlow or Theano.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2'), + ('Theano', '0.8.2', versionsuffix), + ('h5py', '2.6.0', '%(versionsuffix)s-HDF5-1.8.17'), +] + +sanity_check_paths = { + 'files': ['bin/theano-cache', 'bin/theano-nose', 'bin/theano-test'], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], +} + +moduleclass = 'math' -- GitLab From a9721ecefb40917b2afdf8f95209aa0d14d252bf Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 15:02:06 +0200 Subject: [PATCH 311/741] Fix typo in Theano --- .../t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb index c94eb7afed..55c8d13a89 100644 --- a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb @@ -17,7 +17,7 @@ dependencies = [('Python', '3.5.2')] builddependencies = [('nose-parameterized', '0.5.0', versionsuffix)] -runtests = 'nosetests theano' +runtest = 'nosetests theano' sanity_check_paths = { 'files': ['bin/theano-cache', 'bin/theano-nose', 'bin/theano-test'], -- GitLab From b17d614ac96aa042fd3325e9deaaf535cd2bbb2a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 15:52:05 +0200 Subject: [PATCH 312/741] Add PyYAML to Keras --- .../k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb index 5d47272ae6..76540365f0 100644 --- a/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb @@ -17,10 +17,11 @@ dependencies = [ ('Python', '3.5.2'), ('Theano', '0.8.2', versionsuffix), ('h5py', '2.6.0', '%(versionsuffix)s-HDF5-1.8.17'), + ('PyYAML', '3.12', versionsuffix), ] sanity_check_paths = { - 'files': ['bin/theano-cache', 'bin/theano-nose', 'bin/theano-test'], + 'files': [], 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], } -- GitLab From b233043902c2fc214d7975d7a2090050ccd75846 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 15:52:57 +0200 Subject: [PATCH 313/741] Add PyYAML easyconfig --- .../PyYAML-3.12-intel-2016b-Python-3.5.2.eb | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..5e2dea3692 --- /dev/null +++ b/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,31 @@ +easyblock = 'PythonPackage' + +name = 'PyYAML' +version = '3.12' + +homepage = "https://pypi.python.org/pypi/PyYAML/" +description = """PyYAML is a YAML parser and emitter for the Python programming language.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +pyver = '3.5.2' +pyshortver = '.'.join(pyver.split('.')[:2]) + +versionsuffix = '-Python-%s' % pyver + +dependencies = [ + ('Python', pyver), + ('libyaml', '0.1.6'), +] + +options = {'modulename': 'yaml'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%s/site-packages/yaml' % pyshortver], +} + +moduleclass = 'lib' -- GitLab From 96eb5e530cedbcaa8d0d576fa2d3394da189b8db Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 17:06:24 +0200 Subject: [PATCH 314/741] Drop tests (takes too long) --- .../t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb index 55c8d13a89..fdea58014e 100644 --- a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-intel-2016b-Python-3.5.2.eb @@ -17,11 +17,12 @@ dependencies = [('Python', '3.5.2')] builddependencies = [('nose-parameterized', '0.5.0', versionsuffix)] -runtest = 'nosetests theano' +# The tests take very long to finish (they are installed too) +#runtest = 'nosetests theano' sanity_check_paths = { 'files': ['bin/theano-cache', 'bin/theano-nose', 'bin/theano-test'], - 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } moduleclass = 'math' -- GitLab From 599c684216887ad5d9a6f454bf3db375a527931a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 17:08:49 +0200 Subject: [PATCH 315/741] Fix remarks --- .../k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb | 2 +- .../p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb index 76540365f0..418b1b87b0 100644 --- a/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/k/Keras/Keras-1.0.8-intel-2016b-Python-3.5.2.eb @@ -22,7 +22,7 @@ dependencies = [ sanity_check_paths = { 'files': [], - 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } moduleclass = 'math' diff --git a/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb index 5e2dea3692..54aae7eafc 100644 --- a/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb @@ -11,13 +11,10 @@ toolchain = {'name': 'intel', 'version': '2016b'} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -pyver = '3.5.2' -pyshortver = '.'.join(pyver.split('.')[:2]) - -versionsuffix = '-Python-%s' % pyver +versionsuffix = '-Python-%(pyver)s' dependencies = [ - ('Python', pyver), + ('Python', '3.5.2'), ('libyaml', '0.1.6'), ] @@ -25,7 +22,7 @@ options = {'modulename': 'yaml'} sanity_check_paths = { 'files': [], - 'dirs': ['lib/python%s/site-packages/yaml' % pyshortver], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } moduleclass = 'lib' -- GitLab From 9ab363ad6315fd6de5c35c5ff4d663fa56f482a2 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 19 Sep 2016 17:10:36 +0200 Subject: [PATCH 316/741] more remarks --- .../nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb index be6e199cd9..971304f89c 100644 --- a/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-intel-2016b-Python-3.5.2.eb @@ -18,7 +18,7 @@ options = {'modulename': 'nose_parameterized'} sanity_check_paths = { 'files': [], - 'dirs': ['lib/python%(pyshortver)s/site-packages/nose_parameterized-%(version)s-py%(pyshortver)s.egg'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } moduleclass = 'devel' -- GitLab From cf24b3d18693549f877296dda893df80bdfdf4b7 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 20 Sep 2016 09:13:52 +0200 Subject: [PATCH 317/741] Fix remarks --- .../p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb index 54aae7eafc..266c49b425 100644 --- a/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-3.5.2.eb @@ -2,6 +2,7 @@ easyblock = 'PythonPackage' name = 'PyYAML' version = '3.12' +versionsuffix = '-Python-%(pyver)s' homepage = "https://pypi.python.org/pypi/PyYAML/" description = """PyYAML is a YAML parser and emitter for the Python programming language.""" @@ -11,8 +12,6 @@ toolchain = {'name': 'intel', 'version': '2016b'} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -versionsuffix = '-Python-%(pyver)s' - dependencies = [ ('Python', '3.5.2'), ('libyaml', '0.1.6'), -- GitLab From dccccacb41ba3de78ce1b7ea1e78f754b713441a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 20 Sep 2016 10:36:36 +0200 Subject: [PATCH 318/741] add easyconfig ncview-2.1.7-intel-2016b.eb, add easyconfig UDUNITS-2.2.20-intel-2016b.eb --- .../n/ncview/ncview-2.1.7-intel-2016b.eb | 43 +++++++++++++++++++ .../u/UDUNITS/UDUNITS-2.2.20-intel-2016b.eb | 38 ++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb create mode 100644 easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.2.20-intel-2016b.eb diff --git a/easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb b/easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb new file mode 100644 index 0000000000..09cf15c6d3 --- /dev/null +++ b/easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb @@ -0,0 +1,43 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2014 The Cyprus Institute +# Authors:: Thekla Loizou +# License:: MIT/GPL +# +## +easyblock = 'ConfigureMake' + +name = 'ncview' +version = '2.1.7' + +homepage = 'http://meteora.ucsd.edu/~pierce/ncview_home_page.html' +description = """Ncview is a visual browser for netCDF format files. +Typically you would use ncview to get a quick and easy, push-button +look at your netCDF files. You can view simple movies of the data, +view along various dimensions, take a look at the actual data values, +change color maps, invert the data, etc.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'usempi': True, 'pic': True} + +source_urls = ['ftp://cirrus.ucsd.edu/pub/ncview/'] +sources = [SOURCE_TAR_GZ] + +# specified compiler is hard checked against (full path to) compiler used for netCDF... +preconfigopts = "CC=$(which $CC) " +configopts = "--with-udunits2_incdir=$EBROOTUDUNITS/include --with-udunits2_libdir=$EBROOTUDUNITS/lib " +configopts += "--with-nc-config=$EBROOTNETCDF/bin/nc-config" + +dependencies = [ + ('netCDF', '4.4.1'), + ('netCDF-Fortran', '4.4.4'), + ('UDUNITS', '2.2.20'), +] + +sanity_check_paths = { + 'files': ['bin/ncview'], + 'dirs': [], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.2.20-intel-2016b.eb b/easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.2.20-intel-2016b.eb new file mode 100644 index 0000000000..ae9bb8dae3 --- /dev/null +++ b/easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.2.20-intel-2016b.eb @@ -0,0 +1,38 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 University of Luxembourg, Ghent University +# Authors:: Fotis Georgatos , Kenneth Hoste (Ghent University) +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-97.html +## + +easyblock = 'ConfigureMake' + +name = 'UDUNITS' +version = '2.2.20' + +homepage = 'http://www.unidata.ucar.edu/software/udunits/' +description = """UDUNITS supports conversion of unit specifications between formatted and binary forms, + arithmetic manipulation of units, and conversion of values between compatible scales of measurement.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['ftp://ftp.unidata.ucar.edu/pub/udunits'] + +dependencies = [('expat', '2.2.0')] + +sanity_check_paths = { + 'files': ['bin/udunits2', 'include/converter.h', 'include/udunits2.h', 'include/udunits.h', + 'lib/libudunits2.a', 'lib/libudunits2.%s' % SHLIB_EXT], + 'dirs': ['share'], +} + +parallel = 1 + +moduleclass = 'phys' -- GitLab From ee90a03732e53231eebcb160b961e0b36e990706 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 20 Sep 2016 11:18:05 +0200 Subject: [PATCH 319/741] disable testing in all ParaView 4.4.0 easyconfigs, don't hard specify optarch: True --- easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-gimkl-2.11.5-serial.eb | 2 +- .../easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb | 2 +- .../easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb | 2 +- easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb | 2 +- easybuild/easyconfigs/s/Szip/Szip-2.1-gimkl-2.11.5.eb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-gimkl-2.11.5-serial.eb b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-gimkl-2.11.5-serial.eb index 2130c99fd6..3f80a99e71 100644 --- a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-gimkl-2.11.5-serial.eb +++ b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-gimkl-2.11.5-serial.eb @@ -7,7 +7,7 @@ description = """HDF5 is a unique technology suite that makes possible the manag extremely large and complex data collections.""" toolchain = {'name': 'gimkl', 'version': '2.11.5'} -toolchainopts = {'optarch': True, 'pic': True} +toolchainopts = {'pic': True} source_urls = ['http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-%(version)s/src'] sources = [SOURCELOWER_TAR_GZ] diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb index 358fff80d8..881a107e71 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-gimkl-2.11.5-mpi.eb @@ -41,7 +41,7 @@ configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBR configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' configopts += '-DVTK_USE_SYSTEM_HDF5=ON ' # Without internet connection turn off testing (uncomment the following line) -#configopts += '-DBUILD_TESTING=OFF ' +configopts += '-DBUILD_TESTING=OFF ' # Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md # and download ExternalData to $EASYBUILD_SOURCEPATH and adjust -DExternalData_OBJECT_STORES accordingly # Without internet connection, comment the following two lines (configopts and prebuildopts) diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb index c47c9437bd..5d0a411cd9 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b-mpi.eb @@ -41,7 +41,7 @@ configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBR configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' configopts += '-DVTK_USE_SYSTEM_HDF5=ON ' # Without internet connection turn off testing (uncomment the following line) -#configopts += '-DBUILD_TESTING=OFF ' +configopts += '-DBUILD_TESTING=OFF ' # Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md # and download ExternalData to $EASYBUILD_SOURCEPATH and adjust -DExternalData_OBJECT_STORES accordingly # Without internet connection, comment the following two lines (configopts and prebuildopts) diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb index bd0d7b5f22..ae3e6cddc3 100644 --- a/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb +++ b/easybuild/easyconfigs/p/ParaView/ParaView-4.4.0-intel-2015b.eb @@ -40,7 +40,7 @@ configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBR configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.so ' configopts += '-DVTK_USE_SYSTEM_HDF5=ON ' # Without internet connection turn off testing (uncomment the following line) -#configopts += '-DBUILD_TESTING=OFF ' +configopts += '-DBUILD_TESTING=OFF ' # Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md # and download ExternalData to $EASYBUILD_SOURCEPATH and adjust -DExternalData_OBJECT_STORES accordingly # Without internet connection, comment the following two lines (configopts and prebuildopts) diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-gimkl-2.11.5.eb b/easybuild/easyconfigs/s/Szip/Szip-2.1-gimkl-2.11.5.eb index 37afd28477..bf50049e0f 100644 --- a/easybuild/easyconfigs/s/Szip/Szip-2.1-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/s/Szip/Szip-2.1-gimkl-2.11.5.eb @@ -7,7 +7,7 @@ homepage = 'http://www.hdfgroup.org/doc_resource/SZIP/' description = "Szip compression software, providing lossless compression of scientific data" toolchain = {'name': 'gimkl', 'version': '2.11.5'} -toolchainopts = {'optarch': True, 'pic': True} +toolchainopts = {'pic': True} source_urls = ['http://www.hdfgroup.org/ftp/lib-external/szip/%(version)s/src'] sources = [SOURCELOWER_TAR_GZ] -- GitLab From 9eb6a39aabc81168c93992762538c3b3e40769c1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 20 Sep 2016 14:55:41 +0200 Subject: [PATCH 320/741] add easyconfig tabix-0.2.6-intel-2016b.eb --- .../t/tabix/tabix-0.2.6-intel-2016b.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2016b.eb diff --git a/easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2016b.eb b/easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2016b.eb new file mode 100644 index 0000000000..ef8197538d --- /dev/null +++ b/easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2016b.eb @@ -0,0 +1,38 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# Swiss Institute of Bioinformatics +# Biozentrum - University of Basel +# Author: Jens Timmerman, Ghent University + +easyblock = 'MakeCp' + +name = 'tabix' +version = '0.2.6' + +homepage = 'http://samtools.sourceforge.net' +description = """ Generic indexer for TAB-delimited genome position files """ + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [('http://sourceforge.net/projects/samtools/files/', 'download')] +sources = [SOURCE_TAR_BZ2] + +dependencies = [('zlib', '1.2.8')] + +buildopts = 'CC="$CC" CFLAGS="$CFLAGS -L$EBROOTZLIB/lib"' + +files_to_copy = [ + (["tabix", "bgzip", "tabix.py"], "bin"), + (["tabix.1"], "man/man1"), + "example.gtf.gz", + "example.gtf.gz.tbi", + "NEWS", + "ChangeLog" +] + +sanity_check_paths = { + 'files': ["bin/tabix", "bin/bgzip", "bin/tabix.py"], + 'dirs': [""], +} + +moduleclass = 'bio' -- GitLab From a3582c693dae1306caae0baa8e1eab43726b3a5d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 20 Sep 2016 15:00:22 +0200 Subject: [PATCH 321/741] fix buildopts in tabix easyconfigs --- easybuild/easyconfigs/t/tabix/tabix-0.2.6-foss-2016a.eb | 4 ++-- easybuild/easyconfigs/t/tabix/tabix-0.2.6-goolf-1.4.10.eb | 2 +- easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2014b.eb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/t/tabix/tabix-0.2.6-foss-2016a.eb b/easybuild/easyconfigs/t/tabix/tabix-0.2.6-foss-2016a.eb index cb200231af..30c58df38b 100644 --- a/easybuild/easyconfigs/t/tabix/tabix-0.2.6-foss-2016a.eb +++ b/easybuild/easyconfigs/t/tabix/tabix-0.2.6-foss-2016a.eb @@ -13,7 +13,7 @@ sources = [SOURCE_TAR_BZ2] dependencies = [('zlib', '1.2.8')] -buildopts = 'CFLAGS="-L$EBROOTZLIB/lib"' +buildopts = 'CC="$CC" CFLAGS="$CFLAGS -L$EBROOTZLIB/lib"' files_to_copy = [ (["tabix", "bgzip", "tabix.py"], "bin"), @@ -29,4 +29,4 @@ sanity_check_paths = { 'dirs': [""], } -moduleclass = 'bio' \ No newline at end of file +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/t/tabix/tabix-0.2.6-goolf-1.4.10.eb b/easybuild/easyconfigs/t/tabix/tabix-0.2.6-goolf-1.4.10.eb index 4ab3c4b882..e138adfe4c 100644 --- a/easybuild/easyconfigs/t/tabix/tabix-0.2.6-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/t/tabix/tabix-0.2.6-goolf-1.4.10.eb @@ -19,7 +19,7 @@ sources = [SOURCE_TAR_BZ2] dependencies = [('zlib', '1.2.8')] -buildopts = 'CFLAGS="-L$EBROOTZLIB/lib"' +buildopts = 'CC="$CC" CFLAGS="$CFLAGS -L$EBROOTZLIB/lib"' files_to_copy = [ (["tabix", "bgzip", "tabix.py"], "bin"), diff --git a/easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2014b.eb b/easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2014b.eb index 355e0eb0ad..af291cd25c 100644 --- a/easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2014b.eb +++ b/easybuild/easyconfigs/t/tabix/tabix-0.2.6-intel-2014b.eb @@ -19,7 +19,7 @@ sources = [SOURCE_TAR_BZ2] dependencies = [('zlib', '1.2.8')] -buildopts = 'CFLAGS="-L$EBROOTZLIB/lib"' +buildopts = 'CC="$CC" CFLAGS="$CFLAGS -L$EBROOTZLIB/lib"' files_to_copy = [ (["tabix", "bgzip", "tabix.py"], "bin"), -- GitLab From a68f490cb9cd1d1ebcb4f2b489df724f9d76e3ac Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 20 Sep 2016 15:07:51 +0200 Subject: [PATCH 322/741] change according to intel2016b version --- .../Theano-0.8.2-foss-2016a-Python-2.7.11.eb | 21 +++++++++---------- .../Theano-0.8.2-foss-2016a-Python-3.5.1.eb | 21 +++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-2.7.11.eb index f9de6cacae..84985c3bcb 100644 --- a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-2.7.11.eb @@ -5,25 +5,24 @@ version = '0.8.2' versionsuffix = '-Python-%(pyver)s' homepage = 'http://deeplearning.net/software/theano' -description = """Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions - involving multi-dimensional arrays efficiently.""" +description = """Theano is a Python library that allows you to define, optimize, +and evaluate mathematical expressions involving multi-dimensional arrays efficiently.""" toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -dependencies = [ - ('Python', '2.7.11'), - ('binutils', '2.25', '', ('GCCcore','4.9.3')), - ('Pygments', '2.1.3', versionsuffix), - ('Sphinx', '1.4.5', versionsuffix) -] +dependencies = [('Python', '2.7.11')] + +builddependencies = [('nose-parameterized', '0.5.0', versionsuffix)] + +# The tests take very long to finish (they are installed too) +#runtest = 'nosetests theano' sanity_check_paths = { - 'files': ['bin/theano-cache', - 'lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], - 'dirs': [] + 'files': ['bin/theano-cache', 'bin/theano-nose', 'bin/theano-test'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } moduleclass = 'math' \ No newline at end of file diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb index 7049aceac7..07ee987f27 100644 --- a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb +++ b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb @@ -5,25 +5,24 @@ version = '0.8.2' versionsuffix = '-Python-%(pyver)s' homepage = 'http://deeplearning.net/software/theano' -description = """Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions - involving multi-dimensional arrays efficiently.""" +description = """Theano is a Python library that allows you to define, optimize, +and evaluate mathematical expressions involving multi-dimensional arrays efficiently.""" toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -dependencies = [ - ('Python', '3.5.1'), - ('binutils', '2.25', '', ('GCCcore','4.9.3')), - ('Pygments', '2.1.3', versionsuffix), - ('Sphinx', '1.4.5', versionsuffix) -] +dependencies = [('Python', '3.5.2')] + +builddependencies = [('nose-parameterized', '0.5.0', versionsuffix)] + +# The tests take very long to finish (they are installed too) +#runtest = 'nosetests theano' sanity_check_paths = { - 'files': ['bin/theano-cache', - 'lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], - 'dirs': [] + 'files': ['bin/theano-cache', 'bin/theano-nose', 'bin/theano-test'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } moduleclass = 'math' \ No newline at end of file -- GitLab From 42ef02f4719e6a9fca27ed6b34a2b4c474cf1900 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 20 Sep 2016 15:09:47 +0200 Subject: [PATCH 323/741] nose-parameterized deps --- ...eterized-0.5.0-foss-2016a-Python-2.7.11.eb | 24 +++++++++++++++++++ ...meterized-0.5.0-foss-2016a-Python-3.5.2.eb | 24 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..ced9988f35 --- /dev/null +++ b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,24 @@ +easyblock = "PythonPackage" + +name = 'nose-parameterized' +version = '0.5.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'hmat://github.com/wolever/nose-parameterized' +description = """Parameterized testing with any Python test framework.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.11')] + +options = {'modulename': 'nose_parameterized'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.2.eb b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.2.eb new file mode 100644 index 0000000000..881e0ecc4f --- /dev/null +++ b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.2.eb @@ -0,0 +1,24 @@ +easyblock = "PythonPackage" + +name = 'nose-parameterized' +version = '0.5.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'hmat://github.com/wolever/nose-parameterized' +description = """Parameterized testing with any Python test framework.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '3.5.2')] + +options = {'modulename': 'nose_parameterized'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'devel' -- GitLab From 0325b915da57637954634533464684f4e7a06997 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 20 Sep 2016 15:55:14 +0200 Subject: [PATCH 324/741] change version of python for nose dep --- ...meterized-0.5.0-foss-2016a-Python-3.5.1.eb | 24 +++++++++++++++++++ .../Theano-0.8.2-foss-2016a-Python-3.5.1.eb | 4 ++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.1.eb diff --git a/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.1.eb new file mode 100644 index 0000000000..6c5140ef8c --- /dev/null +++ b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.1.eb @@ -0,0 +1,24 @@ +easyblock = "PythonPackage" + +name = 'nose-parameterized' +version = '0.5.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'hmat://github.com/wolever/nose-parameterized' +description = """Parameterized testing with any Python test framework.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '3.5.1')] + +options = {'modulename': 'nose_parameterized'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb index 07ee987f27..d7e9b83bcb 100644 --- a/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb +++ b/easybuild/easyconfigs/t/Theano/Theano-0.8.2-foss-2016a-Python-3.5.1.eb @@ -13,7 +13,7 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] -dependencies = [('Python', '3.5.2')] +dependencies = [('Python', '3.5.1')] builddependencies = [('nose-parameterized', '0.5.0', versionsuffix)] @@ -25,4 +25,4 @@ sanity_check_paths = { 'dirs': ['lib/python%(pyshortver)s/site-packages'], } -moduleclass = 'math' \ No newline at end of file +moduleclass = 'math' -- GitLab From 85ccbbcb40d38fdb5fd65217e9aeabca474e1070 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 20 Sep 2016 15:56:20 +0200 Subject: [PATCH 325/741] remove that version --- ...meterized-0.5.0-foss-2016a-Python-3.5.2.eb | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.2.eb b/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.2.eb deleted file mode 100644 index 881e0ecc4f..0000000000 --- a/easybuild/easyconfigs/n/nose-parameterized/nose-parameterized-0.5.0-foss-2016a-Python-3.5.2.eb +++ /dev/null @@ -1,24 +0,0 @@ -easyblock = "PythonPackage" - -name = 'nose-parameterized' -version = '0.5.0' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'hmat://github.com/wolever/nose-parameterized' -description = """Parameterized testing with any Python test framework.""" - -toolchain = {'name': 'foss', 'version': '2016a'} - -source_urls = [PYPI_SOURCE] -sources = [SOURCE_TAR_GZ] - -dependencies = [('Python', '3.5.2')] - -options = {'modulename': 'nose_parameterized'} - -sanity_check_paths = { - 'files': [], - 'dirs': ['lib/python%(pyshortver)s/site-packages'], -} - -moduleclass = 'devel' -- GitLab From 3bc8a3c863fa629105143af0d66926cf25cd708c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 20 Sep 2016 18:50:13 +0200 Subject: [PATCH 326/741] also check 'lib' Tcl subdir for graphviz bindings --- .../easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb | 5 ++++- .../g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb index c85ed5ed21..4634a7fb1a 100644 --- a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb +++ b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2014b.eb @@ -58,7 +58,10 @@ sanity_check_paths = { 'dirs': ['include', 'lib/graphviz'] } -sanity_check_commands = [("test ! -d $EBROOTTCL/lib64/*/graphviz", '')] +sanity_check_commands = [ + ("test ! -d $EBROOTTCL/lib/*/graphviz", ''), + ("test ! -d $EBROOTTCL/lib64/*/graphviz", ''), +] modextrapaths = { 'PYTHONPATH': 'lib/graphviz/python', diff --git a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb index 88594633da..c9fd0d8f27 100644 --- a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb +++ b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2015a-Python-2.7.10.eb @@ -60,7 +60,10 @@ sanity_check_paths = { 'dirs': ['include', 'lib/graphviz'] } -sanity_check_commands = [("test ! -d $EBROOTTCL/lib64/*/graphviz", '')] +sanity_check_commands = [ + ("test ! -d $EBROOTTCL/lib/*/graphviz", ''), + ("test ! -d $EBROOTTCL/lib64/*/graphviz", ''), +] modextrapaths = { 'PYTHONPATH': 'lib/graphviz/python', -- GitLab From 74ca35651427b0688819ca02ae0e1605a56d4e99 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 20 Sep 2016 20:12:08 +0200 Subject: [PATCH 327/741] {lang,lib}[GCC/4.8.4] Python 2.7.9 (bare) + libxml2 2.9.2 --- .../b/bzip2/bzip2-1.0.6-GCC-4.8.4.eb | 15 ++++++++ .../libreadline/libreadline-6.3-GCC-4.8.4.eb | 31 +++++++++++++++ .../l/libxml2/libxml2-2.9.2-GCC-4.8.4.eb | 20 ++++++++++ .../p/Python/Python-2.7.9-GCC-4.8.4-bare.eb | 31 +++++++++++++++ .../s/SQLite/SQLite-3.8.8.1-GCC-4.8.4.eb | 38 +++++++++++++++++++ .../easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb | 25 ++++++++++++ .../t/Tk/Tk-8.6.3-GCC-4.8.4-no-X11.eb | 26 +++++++++++++ .../z/zlib/zlib-1.2.8-GCC-4.8.4.eb | 21 ++++++++++ 8 files changed, 207 insertions(+) create mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-GCC-4.8.4.eb create mode 100644 easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-GCC-4.8.4.eb create mode 100644 easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.8.4-bare.eb create mode 100644 easybuild/easyconfigs/s/SQLite/SQLite-3.8.8.1-GCC-4.8.4.eb create mode 100644 easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb create mode 100644 easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.8.4-no-X11.eb create mode 100644 easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-GCC-4.8.4.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-GCC-4.8.4.eb new file mode 100644 index 0000000000..0a99a45a08 --- /dev/null +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-GCC-4.8.4.eb @@ -0,0 +1,15 @@ +name = 'bzip2' +version = '1.0.6' + +homepage = 'http://www.bzip.org/' +description = """bzip2 is a freely available, patent free, high-quality data compressor. It typically + compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical + compressors), whilst being around twice as fast at compression and six times faster at decompression.""" + +toolchain = {'name': 'GCC', 'version': '4.8.4'} +toolchainopts = {'pic': True} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://www.bzip.org/%(version)s'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb new file mode 100644 index 0000000000..50303a9e80 --- /dev/null +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'libreadline' +version = '6.3' + +homepage = 'http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html' +description = """The GNU Readline library provides a set of functions for use by applications that + allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. + The Readline library includes additional functions to maintain a list of previously-entered command lines, + to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" + +toolchain = {'name': 'GCC', 'version': '4.8.4'} + +sources = ['readline-%(version)s.tar.gz'] +source_urls = ['http://ftp.gnu.org/gnu/readline'] + +patches = ['libreadline-%(version)s-bugfix.patch'] + +dependencies = [('ncurses', '5.9')] + +# for the termcap symbols, use EB ncurses +preconfigopts = "env LDFLAGS='-lncurses'" + +sanity_check_paths = { + 'files': ['lib/libreadline.a', 'lib/libhistory.a'] + + ['include/readline/%s' % x for x in ['chardefs.h', 'history.h', 'keymaps.h', 'readline.h', 'rlconf.h', + 'rlstdc.h', 'rltypedefs.h', 'tilde.h']], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-GCC-4.8.4.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-GCC-4.8.4.eb new file mode 100644 index 0000000000..25e24ba97f --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-GCC-4.8.4.eb @@ -0,0 +1,20 @@ +name = 'libxml2' +version = '2.9.2' + +homepage = 'http://xmlsoft.org/' +description = """Libxml2 is the XML C parser and +toolchain developed for the Gnome project + (but usable outside of the Gnome platform).""" + +toolchain = {'name': 'GCC', 'version': '4.8.4'} +toolchainopts = {'pic': True} + +source_urls = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' +] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('zlib', '1.2.8')] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.8.4-bare.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.8.4-bare.eb new file mode 100644 index 0000000000..c83dff187b --- /dev/null +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-GCC-4.8.4-bare.eb @@ -0,0 +1,31 @@ +name = 'Python' +version = '2.7.9' +versionsuffix = '-bare' + +homepage = 'http://python.org/' +description = "Python is a programming language that lets you work more quickly and integrate your systems more effectively." + +toolchain = {'name': 'GCC', 'version': '4.8.4'} +toolchainopts = {'pic': True} + +source_urls = ['http://www.python.org/ftp/%(namelower)s/%(version)s/'] +sources = [SOURCE_TGZ] + +# python needs bzip2 to build the bz2 package +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libreadline', '6.3'), + ('ncurses', '5.9'), + ('SQLite', '3.8.8.1'), + ('Tk', '8.6.3', '-no-X11'), # this requires a full X11 stack + #('OpenSSL', '1.0.1k'), # OS dependency should be preferred if the os version is more recent then this version, it's + #nice to have an up to date openssl for security reasons +] + +osdependencies = [('openssl-devel', 'libssl-dev')] + +# bare installation: no extensions included +exts_list = [] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/s/SQLite/SQLite-3.8.8.1-GCC-4.8.4.eb b/easybuild/easyconfigs/s/SQLite/SQLite-3.8.8.1-GCC-4.8.4.eb new file mode 100644 index 0000000000..27cd84d7ec --- /dev/null +++ b/easybuild/easyconfigs/s/SQLite/SQLite-3.8.8.1-GCC-4.8.4.eb @@ -0,0 +1,38 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'SQLite' +version = '3.8.8.1' + +homepage = 'http://www.sqlite.org/' +description = 'SQLite: SQL Database Engine in a C Library' + +toolchain = {'name': 'GCC', 'version': '4.8.4'} + +# eg. http://www.sqlite.org/2014/sqlite-autoconf-3080600.tar.gz +source_urls = ['http://www.sqlite.org/2015/'] +version_str = '%(version_major)s' + ''.join('%02d' % int(x) for x in version.split('.')[1:]) +sources = ['sqlite-autoconf-%s.tar.gz' % version_str] + +dependencies = [ + ('libreadline', '6.3'), + ('Tcl', '8.6.3'), +] + +sanity_check_paths = { + 'files': ['bin/sqlite3'], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb new file mode 100644 index 0000000000..d3061eabd1 --- /dev/null +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'Tcl' +version = '8.6.3' + +homepage = 'http://www.tcl.tk/' +description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, +suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" + +toolchain = {'name': 'GCC', 'version': '4.8.4'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads EXTRA_INSTALL="install-private-headers"' + +runtest = 'test' + +start_dir = 'unix' + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.8.4-no-X11.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.8.4-no-X11.eb new file mode 100644 index 0000000000..e49d801973 --- /dev/null +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.3-GCC-4.8.4-no-X11.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Tk' +version = '8.6.3' +versionsuffix = '-no-X11' + +homepage = 'http://www.tcl.tk/' +description = """Tk is an open source, cross-platform widget toolchain that provides a library of basic elements for building + a graphical user interface (GUI) in many different programming languages.""" + +toolchain = {'name': 'GCC', 'version': '4.8.4'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +dependencies = [ + ('Tcl', version), + ('zlib', '1.2.8'), +] + +# To be clear: this will still require X11 to be present (see issue #2261) +configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib --without-x CFLAGS="-I$EBROOTTCL/include"' + +start_dir = 'unix' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb new file mode 100644 index 0000000000..020b89196b --- /dev/null +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb @@ -0,0 +1,21 @@ +easyblock = 'ConfigureMake' + +name = 'zlib' +version = '1.2.8' + +homepage = 'http://www.zlib.net/' +description = """zlib is designed to be a free, general-purpose, legally unencumbered -- that is, +not covered by any patents -- lossless data-compression library for use on virtually any +computer hardware and operating system.""" + +toolchain = {'name': 'GCC', 'version': '4.8.4'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] + +sanity_check_paths = { + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From 3288fa46ea6c37f2c2458bbb495f10fd8943c91e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 20 Sep 2016 20:42:34 +0200 Subject: [PATCH 328/741] consistently enable -fPIC for libreadline and zlib --- easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.2.eb | 1 + easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb | 1 + easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb | 1 + easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.7.3.eb | 1 + easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb | 1 + easybuild/easyconfigs/z/zlib/zlib-1.2.8.eb | 1 + 6 files changed, 6 insertions(+) diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.2.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.2.eb index 55d005e4b8..3d2321bd06 100644 --- a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.2.eb +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.2.eb @@ -10,6 +10,7 @@ description = """The GNU Readline library provides a set of functions for use by to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" toolchain = {'name': 'GCC', 'version': '4.8.2'} +toolchainopts = {'pic': True} sources = ['readline-%(version)s.tar.gz'] source_urls = ['http://ftp.gnu.org/gnu/readline'] diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb index 50303a9e80..25cb143653 100644 --- a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-GCC-4.8.4.eb @@ -10,6 +10,7 @@ description = """The GNU Readline library provides a set of functions for use by to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" toolchain = {'name': 'GCC', 'version': '4.8.4'} +toolchainopts = {'pic': True} sources = ['readline-%(version)s.tar.gz'] source_urls = ['http://ftp.gnu.org/gnu/readline'] diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb index 53eeab2af9..36625b1717 100644 --- a/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3.eb @@ -10,6 +10,7 @@ description = """The GNU Readline library provides a set of functions for use by to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" toolchain = {'name': 'dummy', 'version': ''} +toolchainopts = {'pic': True} sources = ['readline-%(version)s.tar.gz'] source_urls = ['http://ftp.gnu.org/gnu/readline'] diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.7.3.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.7.3.eb index 1c29958289..1192872c10 100644 --- a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.7.3.eb +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.7.3.eb @@ -9,6 +9,7 @@ not covered by any patents -- lossless data-compression library for use on virtu computer hardware and operating system.""" toolchain = {'name': 'GCC', 'version': '4.7.3'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb index 020b89196b..d7207b104a 100644 --- a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-GCC-4.8.4.eb @@ -9,6 +9,7 @@ not covered by any patents -- lossless data-compression library for use on virtu computer hardware and operating system.""" toolchain = {'name': 'GCC', 'version': '4.8.4'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8.eb index 82a1155e2e..ec9d1a0bdf 100644 --- a/easybuild/easyconfigs/z/zlib/zlib-1.2.8.eb +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8.eb @@ -9,6 +9,7 @@ description = """zlib is designed to be a free, general-purpose, legally unencum computer hardware and operating system.""" toolchain = {'name': 'dummy', 'version': 'dummy'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] -- GitLab From 16dca9802d16e3791e3dd312b183afbc17d57ce8 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Tue, 20 Sep 2016 23:56:42 +0100 Subject: [PATCH 329/741] add easyconfig libibmad-1.3.12-GCC-4.9.3-2.25.eb, add easyconfig libibumad-1.3.10.2-GCC-4.9.3-2.25.eb --- .../libibmad-1.3.12-GCC-4.9.3-2.25.eb | 24 +++++++++++++++++++ .../libibumad-1.3.10.2-GCC-4.9.3-2.25.eb | 19 +++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 easybuild/easyconfigs/l/libibmad/libibmad-1.3.12-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/l/libibumad/libibumad-1.3.10.2-GCC-4.9.3-2.25.eb diff --git a/easybuild/easyconfigs/l/libibmad/libibmad-1.3.12-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/l/libibmad/libibmad-1.3.12-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..d619aa0f82 --- /dev/null +++ b/easybuild/easyconfigs/l/libibmad/libibmad-1.3.12-GCC-4.9.3-2.25.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'libibmad' +version = '1.3.12' + +homepage = 'http://www.openfabrics.org' +description = """libibmad is a convenience library to encode, decode, and dump IB MAD packets. It + is implemented on top of and in conjunction with libibumad (the umad kernel + interface library.)""" + +toolchain = {'name': 'GCC', 'version': '4.9.3-2.25'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['https://www.openfabrics.org/downloads/management/'] + +dependencies = [('libibumad', '1.3.10.2')] + +sanity_check_paths = { + 'files': ['include/infiniband/mad.h', 'include/infiniband/mad_osd.h', + 'lib/libibmad.a', 'lib/libibmad.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/l/libibumad/libibumad-1.3.10.2-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/l/libibumad/libibumad-1.3.10.2-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..c2063cef0d --- /dev/null +++ b/easybuild/easyconfigs/l/libibumad/libibumad-1.3.10.2-GCC-4.9.3-2.25.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'libibumad' +version = '1.3.10.2' + +homepage = 'http://www.openfabrics.org' +description = """libibumad is the umad kernel interface library.""" + +toolchain = {'name': 'GCC', 'version': '4.9.3-2.25'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['https://www.openfabrics.org/downloads/management/'] + +sanity_check_paths = { + 'files': ['include/infiniband/umad.h', 'lib/libibumad.a', 'lib/libibumad.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'system' -- GitLab From e66be064481fe46e047d50e20e275ec9412d3b98 Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Wed, 21 Sep 2016 12:04:20 +0800 Subject: [PATCH 330/741] comment out patch files --- .../v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb index 92a0ece294..4b2a8bbb84 100644 --- a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb @@ -14,12 +14,12 @@ toolchainopts = {'usempi': True} # Vasp is proprietary software, see http://www.vasp.at/index.php/faqs on how to get access to the code sources = [SOURCELOWER_TAR_GZ] -# patches from http://cms.mpi.univie.ac.at/wiki/index.php/Installing_VASP -patches = [ - 'vasp.5.4.1.08072015.patch', - 'vasp.5.4.1.27082015.patch', - 'vasp.5.4.1.06112015.patch', -] +# uncommment after downloading patches from http://cms.mpi.univie.ac.at/wiki/index.php/Installing_VASP +#patches = [ +# 'vasp.5.4.1.08072015.patch', +# 'vasp.5.4.1.27082015.patch', +# 'vasp.5.4.1.06112015.patch', +#] checksums = [ '57c2b07d0f70987000033984e913f1a6', # vasp.5.4.1.tar.gz -- GitLab From c156c0bb0a07c39bf429ef70ed321de048e79a08 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 21 Sep 2016 12:45:42 +0200 Subject: [PATCH 331/741] Qhull 2015.2 compiled using the foss 2016a toolchain. --- .../q/Qhull/Qhull-2015.2-foss-2016a.eb | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 easybuild/easyconfigs/q/Qhull/Qhull-2015.2-foss-2016a.eb diff --git a/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-foss-2016a.eb b/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-foss-2016a.eb new file mode 100644 index 0000000000..c145ad7bf0 --- /dev/null +++ b/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-foss-2016a.eb @@ -0,0 +1,37 @@ +easyblock = 'CMakeMake' + +name = 'Qhull' +version = '2015.2' + +homepage = 'http://www.qhull.org' +description = """ +Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, +furthest-site Delaunay triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, +and higher dimensions. Qhull implements the Quickhull algorithm for computing the convex hull. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +# Recently changed the Unix version numbering see http://www.qhull.org/src/Changes.txt +# and https://github.com/Homebrew/homebrew-science/issues/3353 +sources = ['%(namelower)s-%(version_major)s-src-7.%(version_minor)s.0.tgz'] +source_urls = ['http://www.qhull.org/download/'] + +patches = [ + 'Qhull_pkgconfig.patch', +] + +builddependencies = [('CMake', '3.4.3')] + +sanity_check_paths = { + 'files': ['bin/qhull', 'lib/libqhull.%s' % SHLIB_EXT, 'lib/pkgconfig/qhull.pc'], + 'dirs': [], +} + +modextrapaths = { + 'CPATH': ['qhull/include'], +} + +parallel = 1 + +moduleclass = 'math' -- GitLab From ad9d3836a8aa906c7e2e7273a0af0ca7db9841b0 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 21 Sep 2016 12:47:57 +0200 Subject: [PATCH 332/741] networkx 1.11 compiled using the foss 2016a toolchain. --- .../networkx-1.11-foss-2016a-Python-2.7.11.eb | 25 +++++++++++++++++++ .../networkx-1.11-foss-2016a-Python-3.5.1.eb | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 easybuild/easyconfigs/n/networkx/networkx-1.11-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/n/networkx/networkx-1.11-foss-2016a-Python-3.5.1.eb diff --git a/easybuild/easyconfigs/n/networkx/networkx-1.11-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/n/networkx/networkx-1.11-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..8dde76eb25 --- /dev/null +++ b/easybuild/easyconfigs/n/networkx/networkx-1.11-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,25 @@ +easyblock = 'PythonPackage' + +name = 'networkx' +version = '1.11' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/networkx' +description = """NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, + and functions of complex networks.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.11'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/'], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/n/networkx/networkx-1.11-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/n/networkx/networkx-1.11-foss-2016a-Python-3.5.1.eb new file mode 100644 index 0000000000..488dd6f650 --- /dev/null +++ b/easybuild/easyconfigs/n/networkx/networkx-1.11-foss-2016a-Python-3.5.1.eb @@ -0,0 +1,25 @@ +easyblock = 'PythonPackage' + +name = 'networkx' +version = '1.11' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/networkx' +description = """NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, + and functions of complex networks.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '3.5.1'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/'], +} + +moduleclass = 'tools' -- GitLab From c91a49102e2aafe0378d70744728e5a6cf39c614 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Wed, 21 Sep 2016 13:43:53 +0200 Subject: [PATCH 333/741] Easyconfig for angsd 0.910 using the foss 2016a toolchain. --- .../a/angsd/angsd-0.910-foss-2016a.eb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 easybuild/easyconfigs/a/angsd/angsd-0.910-foss-2016a.eb diff --git a/easybuild/easyconfigs/a/angsd/angsd-0.910-foss-2016a.eb b/easybuild/easyconfigs/a/angsd/angsd-0.910-foss-2016a.eb new file mode 100644 index 0000000000..c9d9db6e85 --- /dev/null +++ b/easybuild/easyconfigs/a/angsd/angsd-0.910-foss-2016a.eb @@ -0,0 +1,26 @@ +easyblock = 'MakeCp' + +name = 'angsd' +version = '0.910' + +homepage = 'http://www.popgen.dk/angsd' +description = """Program for analysing NGS data.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['https://github.com/ANGSD/angsd/archive/'] +sources = ['%(version)s.tar.gz'] + +dependencies = [('HTSlib', '1.3.1')] + +files_to_copy = [ + (['angsd'], 'bin'), + 'doc', +] + +sanity_check_paths = { + 'files': ['bin/angsd'], + 'dirs': ['doc'], +} + +moduleclass = 'bio' -- GitLab From 756020ca9264280c31b2c1eb229cd1fe9c531a99 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Wed, 14 Sep 2016 17:02:34 +0200 Subject: [PATCH 334/741] Add missing dependency on XZ to libxml2. The original problem is that when building libxml2 on a system with liblzma installed by the distro, it picks up dependencies on lzma routines. Some of the versions of Gromacs are linking against libxml2 statically, causing link errors agains lzma. And any other software that does static linking against libxml2 will have the same problem. There is a cyclic dependency between XZ, libxml2, and gettext. Fix this by adding a dummy toolchain build of gettext without any dependencies on anything. XZ for the updated toolchains are then built with the dummy-toolchain gettext as a build dependency. And then normal toolchain builds of libxml2 (now with XZ dependency) and gettext can be built against that XZ. This was originally discussed in issue #3408. --- .../easyconfigs/g/gettext/gettext-0.19.8.eb | 23 +++++++++++++++ .../l/libxml2/libxml2-2.9.4-GCC-5.4.0-2.26.eb | 5 +++- .../l/libxml2/libxml2-2.9.4-GCCcore-4.9.3.eb | 1 + .../l/libxml2/libxml2-2.9.4-foss-2016.04.eb | 5 +++- .../l/libxml2/libxml2-2.9.4-foss-2016b.eb | 5 +++- ...libxml2-2.9.4-intel-2016b-Python-2.7.12.eb | 1 + .../l/libxml2/libxml2-2.9.4-intel-2016b.eb | 5 +++- .../x/XZ/XZ-5.2.2-GCC-5.4.0-2.26.eb | 27 ++++++++++++++++++ .../x/XZ/XZ-5.2.2-GCCcore-4.9.3.eb | 28 +++++++++++++++++++ .../easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb | 5 +--- .../easyconfigs/x/XZ/XZ-5.2.2-foss-2016b.eb | 5 +--- .../easyconfigs/x/XZ/XZ-5.2.2-intel-2016b.eb | 5 +--- 12 files changed, 99 insertions(+), 16 deletions(-) create mode 100644 easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb create mode 100644 easybuild/easyconfigs/x/XZ/XZ-5.2.2-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/x/XZ/XZ-5.2.2-GCCcore-4.9.3.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb new file mode 100644 index 0000000000..ac95067f78 --- /dev/null +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'gettext' +version = '0.19.8' + +homepage = 'http://www.gnu.org/software/gettext/' +description = """GNU `gettext' is an important step for the GNU Translation Project, as it is an asset on which we may +build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools +and documentation""" + +# This is a basic stripped down version of gettext without any +# dependencies on other packages used as initial builddep for XZ +# It is the first step in the cyclic dependency chain of +# XZ -> libxml2 -> gettext -> XZ + +toolchain = {'name': 'dummy', 'version': ''} + +sources = [SOURCE_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-GCC-5.4.0-2.26.eb index 6000926382..798eea2998 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-GCC-5.4.0-2.26.eb @@ -14,6 +14,9 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -dependencies = [('zlib', '1.2.8')] +dependencies = [ + ('zlib', '1.2.8'), + ('XZ', '5.2.2'), +] moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-GCCcore-4.9.3.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-GCCcore-4.9.3.eb index 6e41adde06..4873fafcda 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-GCCcore-4.9.3.eb @@ -21,6 +21,7 @@ builddependencies = [ dependencies = [ ('zlib', '1.2.8'), + ('XZ', '5.2.2'), ] moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb index 645a9c0d23..9268fd68be 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016.04.eb @@ -15,6 +15,9 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -dependencies = [('zlib', '1.2.8')] +dependencies = [ + ('zlib', '1.2.8'), + ('XZ', '5.2.2'), +] moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016b.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016b.eb index 09ede640fb..abee889e32 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016b.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016b.eb @@ -15,6 +15,9 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -dependencies = [('zlib', '1.2.8')] +dependencies = [ + ('zlib', '1.2.8'), + ('XZ', '5.2.2'), +] moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb index d2e63d779b..5f9093db10 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b-Python-2.7.12.eb @@ -17,6 +17,7 @@ sources = [SOURCELOWER_TAR_GZ] dependencies = [ ('zlib', '1.2.8'), + ('XZ', '5.2.2'), ('Python', '2.7.12'), ] diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b.eb index b41d38c545..ab1c0ecd3e 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-intel-2016b.eb @@ -15,6 +15,9 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -dependencies = [('zlib', '1.2.8')] +dependencies = [ + ('zlib', '1.2.8'), + ('XZ', '5.2.2'), +] moduleclass = 'lib' diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..9d2ac5e32d --- /dev/null +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-GCC-5.4.0-2.26.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'XZ' +version = '5.2.2' + +homepage = 'http://tukaani.org/xz/' +description = "xz: XZ utilities" + +toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://tukaani.org/xz/'] + +builddependencies = [ + ('Autotools', '20150215'), + ('gettext', '0.19.8', '', True), +] + +# may become useful in non-x86 archs +#configopts = ' --disable-assembler ' + +sanity_check_paths = { + 'files': ["bin/xz", "bin/lzmainfo"], + 'dirs': [] +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-GCCcore-4.9.3.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-GCCcore-4.9.3.eb new file mode 100644 index 0000000000..cafe4d07ac --- /dev/null +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-GCCcore-4.9.3.eb @@ -0,0 +1,28 @@ +easyblock = 'ConfigureMake' + +name = 'XZ' +version = '5.2.2' + +homepage = 'http://tukaani.org/xz/' +description = "xz: XZ utilities" + +toolchain = {'name': 'GCCcore', 'version': '4.9.3'} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://tukaani.org/xz/'] + +builddependencies = [ + ('Autotools', '20150215'), + ('gettext', '0.19.8', '', True), + ('binutils', '2.25'), +] + +# may become useful in non-x86 archs +#configopts = ' --disable-assembler ' + +sanity_check_paths = { + 'files': ["bin/xz", "bin/lzmainfo"], + 'dirs': [] +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb index 0faab98c7c..6d7bd28197 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016.04.eb @@ -13,10 +13,7 @@ source_urls = ['http://tukaani.org/xz/'] builddependencies = [ ('Autotools', '20150215'), -] - -dependencies = [ - ('gettext', '0.19.8'), + ('gettext', '0.19.8', '', True), ] # may become useful in non-x86 archs diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016b.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016b.eb index cd78959323..8bddb8fe4a 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016b.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016b.eb @@ -13,10 +13,7 @@ source_urls = ['http://tukaani.org/xz/'] builddependencies = [ ('Autotools', '20150215'), -] - -dependencies = [ - ('gettext', '0.19.8'), + ('gettext', '0.19.8', '', True), ] # may become useful in non-x86 archs diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016b.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016b.eb index f05bff12d4..7d1af0e121 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016b.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016b.eb @@ -13,10 +13,7 @@ source_urls = ['http://tukaani.org/xz/'] builddependencies = [ ('Autotools', '20150215'), -] - -dependencies = [ - ('gettext', '0.19.8'), + ('gettext', '0.19.8', '', True), ] # may become useful in non-x86 archs -- GitLab From d2ba6ece582383f7208a52d0c236cd3a11d82645 Mon Sep 17 00:00:00 2001 From: Yann Sagon Date: Wed, 21 Sep 2016 15:27:02 +0200 Subject: [PATCH 335/741] GDAL 2.1.1 for foss-2016a --- .../g/GDAL/GDAL-2.1.1-foss-2016a.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/g/GDAL/GDAL-2.1.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/g/GDAL/GDAL-2.1.1-foss-2016a.eb b/easybuild/easyconfigs/g/GDAL/GDAL-2.1.1-foss-2016a.eb new file mode 100644 index 0000000000..0ec6ce953a --- /dev/null +++ b/easybuild/easyconfigs/g/GDAL/GDAL-2.1.1-foss-2016a.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'GDAL' +version = '2.1.1' + +homepage = 'http://www.gdal.org/' +description = """GDAL is a translator library for raster geospatial data formats that is released under an X/MIT style + Open Source license by the Open Source Geospatial Foundation. As a library, it presents a single abstract data model + to the calling application for all supported formats. It also comes with a variety of useful commandline utilities for + data translation and processing.""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'usempi': True} + +source_urls = ['http://download.osgeo.org/gdal/%(version)s/'] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('netCDF', '4.4.0'), + ('expat', '2.1.1'), + ('libxml2', '2.9.3'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ['lib/libgdal.%s' % SHLIB_EXT, 'lib/libgdal.a'], + 'dirs': ['bin', 'include'] +} + +moduleclass = 'data' -- GitLab From 6ca22778637c7a562dbd95c245f223819bb82984 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Wed, 21 Sep 2016 15:35:12 +0200 Subject: [PATCH 336/741] Add XZ dependency to libxml2-2.9.4-foss-2016a too. Add required dummy toolchain versions of gettext-0.19.6 and .7 --- .../easyconfigs/g/gettext/gettext-0.19.6.eb | 23 +++++++++++++++++++ .../easyconfigs/g/gettext/gettext-0.19.7.eb | 23 +++++++++++++++++++ .../l/libxml2/libxml2-2.9.4-foss-2016a.eb | 5 +++- .../XZ/XZ-5.2.2-foss-2016a-gettext-0.19.7.eb | 9 +++----- .../easyconfigs/x/XZ/XZ-5.2.2-foss-2016a.eb | 5 +--- 5 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb create mode 100644 easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb new file mode 100644 index 0000000000..fd9544cda7 --- /dev/null +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'gettext' +version = '0.19.6' + +homepage = 'http://www.gnu.org/software/gettext/' +description = """GNU `gettext' is an important step for the GNU Translation Project, as it is an asset on which we may +build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools +and documentation""" + +# This is a basic stripped down version of gettext without any +# dependencies on other packages used as initial builddep for XZ +# It is the first step in the cyclic dependency chain of +# XZ -> libxml2 -> gettext -> XZ + +toolchain = {'name': 'dummy', 'version': ''} + +sources = [SOURCE_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb new file mode 100644 index 0000000000..cfca8144b6 --- /dev/null +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'gettext' +version = '0.19.7' + +homepage = 'http://www.gnu.org/software/gettext/' +description = """GNU `gettext' is an important step for the GNU Translation Project, as it is an asset on which we may +build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools +and documentation""" + +# This is a basic stripped down version of gettext without any +# dependencies on other packages used as initial builddep for XZ +# It is the first step in the cyclic dependency chain of +# XZ -> libxml2 -> gettext -> XZ + +toolchain = {'name': 'dummy', 'version': ''} + +sources = [SOURCE_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb index e6cae21695..7b6aba23a4 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb @@ -15,6 +15,9 @@ source_urls = [ ] sources = [SOURCELOWER_TAR_GZ] -dependencies = [('zlib', '1.2.8')] +dependencies = [ + ('zlib', '1.2.8'), + ('XZ', '5.2.2'), +} moduleclass = 'lib' diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016a-gettext-0.19.7.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016a-gettext-0.19.7.eb index 17cd0492c0..b4a5a18d70 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016a-gettext-0.19.7.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016a-gettext-0.19.7.eb @@ -11,15 +11,12 @@ toolchain = {'name': 'foss', 'version': '2016a'} sources = [SOURCELOWER_TAR_BZ2] source_urls = ['http://tukaani.org/xz/'] -builddependencies = [ - ('Autotools', '20150215'), -] - gettext_ver = '0.19.7' versionsuffix = '-gettext-%s' % gettext_ver -dependencies = [ - ('gettext', gettext_ver), +builddependencies = [ + ('Autotools', '20150215'), + ('gettext', gettext_ver, '', True), ] # may become useful in non-x86 archs diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016a.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016a.eb index 2a89ca6af6..9cb0eb5b87 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016a.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2016a.eb @@ -13,10 +13,7 @@ source_urls = ['http://tukaani.org/xz/'] builddependencies = [ ('Autotools', '20150215'), -] - -dependencies = [ - ('gettext', '0.19.6'), + ('gettext', '0.19.6', '', True), ] # may become useful in non-x86 archs -- GitLab From f34f4a8f88c36b97773579adbe971236c6631349 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Wed, 21 Sep 2016 15:41:43 +0200 Subject: [PATCH 337/741] Fix typo in "Add XZ dependency to libxml2-2.9.4-foss-2016a too." --- easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb index 7b6aba23a4..59cbe77a84 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016a.eb @@ -18,6 +18,6 @@ sources = [SOURCELOWER_TAR_GZ] dependencies = [ ('zlib', '1.2.8'), ('XZ', '5.2.2'), -} +] moduleclass = 'lib' -- GitLab From d46a3bfa4f15d2dfd086309c42b658e71ad3a143 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Wed, 21 Sep 2016 15:59:16 +0200 Subject: [PATCH 338/741] Update remaining XZ-5.2.2- files to have a build dependency on a dummy-toolchain gettext instead of a run time dependency on a toolchain gettext. --- .../easyconfigs/g/gettext/gettext-0.18.2.eb | 23 +++++++++++++++++++ .../easyconfigs/g/gettext/gettext-0.19.4.eb | 23 +++++++++++++++++++ .../easyconfigs/x/XZ/XZ-5.2.2-foss-2015a.eb | 5 +--- .../easyconfigs/x/XZ/XZ-5.2.2-goolf-1.4.10.eb | 5 +--- .../easyconfigs/x/XZ/XZ-5.2.2-ictce-5.3.0.eb | 5 +--- .../XZ/XZ-5.2.2-intel-2016a-gettext-0.19.7.eb | 9 +++----- .../easyconfigs/x/XZ/XZ-5.2.2-intel-2016a.eb | 5 +--- 7 files changed, 53 insertions(+), 22 deletions(-) create mode 100644 easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb create mode 100644 easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb b/easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb new file mode 100644 index 0000000000..ca42caa817 --- /dev/null +++ b/easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'gettext' +version = '0.18.2' + +homepage = 'http://www.gnu.org/software/gettext/' +description = """GNU `gettext' is an important step for the GNU Translation Project, as it is an asset on which we may +build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools +and documentation""" + +# This is a basic stripped down version of gettext without any +# dependencies on other packages used as initial builddep for XZ +# It is the first step in the cyclic dependency chain of +# XZ -> libxml2 -> gettext -> XZ + +toolchain = {'name': 'dummy', 'version': ''} + +sources = [SOURCE_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb new file mode 100644 index 0000000000..23ce1e2b27 --- /dev/null +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'gettext' +version = '0.19.4' + +homepage = 'http://www.gnu.org/software/gettext/' +description = """GNU `gettext' is an important step for the GNU Translation Project, as it is an asset on which we may +build many other steps. This package offers to programmers, translators, and even users, a well integrated set of tools +and documentation""" + +# This is a basic stripped down version of gettext without any +# dependencies on other packages used as initial builddep for XZ +# It is the first step in the cyclic dependency chain of +# XZ -> libxml2 -> gettext -> XZ + +toolchain = {'name': 'dummy', 'version': ''} + +sources = [SOURCE_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2015a.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2015a.eb index 049e77b657..0245b4d813 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2015a.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-foss-2015a.eb @@ -13,10 +13,7 @@ source_urls = ['http://tukaani.org/xz/'] builddependencies = [ ('Autotools', '20150215'), -] - -dependencies = [ - ('gettext', '0.19.4'), + ('gettext', '0.19.4', '', True), ] # may become useful in non-x86 archs diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-goolf-1.4.10.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-goolf-1.4.10.eb index f9a06be732..c463ba319e 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-goolf-1.4.10.eb @@ -13,10 +13,7 @@ source_urls = ['http://tukaani.org/xz/'] builddependencies = [ ('Autotools', '20150215', '', ('GCC', '4.7.2')), -] - -dependencies = [ - ('gettext', '0.18.2'), + ('gettext', '0.18.2', '', True), ] # may become useful in non-x86 archs diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-ictce-5.3.0.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-ictce-5.3.0.eb index 96fe0ea8c8..3e8e48f760 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-ictce-5.3.0.eb @@ -13,10 +13,7 @@ source_urls = ['http://tukaani.org/xz/'] builddependencies = [ ('Autotools', '20150215'), -] - -dependencies = [ - ('gettext', '0.18.2'), + ('gettext', '0.18.2', '', True), ] # may become useful in non-x86 archs diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016a-gettext-0.19.7.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016a-gettext-0.19.7.eb index 7953b85916..b10cbfb5b1 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016a-gettext-0.19.7.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016a-gettext-0.19.7.eb @@ -11,15 +11,12 @@ toolchain = {'name': 'intel', 'version': '2016a'} sources = [SOURCELOWER_TAR_BZ2] source_urls = ['http://tukaani.org/xz/'] -builddependencies = [ - ('Autotools', '20150215'), -] - gettext_ver = '0.19.7' versionsuffix = '-gettext-%s' % gettext_ver -dependencies = [ - ('gettext', gettext_ver), +builddependencies = [ + ('Autotools', '20150215'), + ('gettext', gettext_ver, '', True), ] # may become useful in non-x86 archs diff --git a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016a.eb b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016a.eb index b717af018a..e582d9cc6b 100644 --- a/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016a.eb +++ b/easybuild/easyconfigs/x/XZ/XZ-5.2.2-intel-2016a.eb @@ -13,10 +13,7 @@ source_urls = ['http://tukaani.org/xz/'] builddependencies = [ ('Autotools', '20150215'), -] - -dependencies = [ - ('gettext', '0.19.6'), + ('gettext', '0.19.6', '', True), ] # may become useful in non-x86 archs -- GitLab From e1de06402c85222d4bd26ae19ef6e4094df12679 Mon Sep 17 00:00:00 2001 From: Yann Sagon Date: Wed, 21 Sep 2016 16:16:41 +0200 Subject: [PATCH 339/741] QCA-2.1.0 foss 2016a --- .../easyconfigs/q/QCA/QCA-2.1.0-foss-2016a.eb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 easybuild/easyconfigs/q/QCA/QCA-2.1.0-foss-2016a.eb diff --git a/easybuild/easyconfigs/q/QCA/QCA-2.1.0-foss-2016a.eb b/easybuild/easyconfigs/q/QCA/QCA-2.1.0-foss-2016a.eb new file mode 100644 index 0000000000..6422b82abe --- /dev/null +++ b/easybuild/easyconfigs/q/QCA/QCA-2.1.0-foss-2016a.eb @@ -0,0 +1,29 @@ +easyblock = 'CMakeMake' +name = 'QCA' +version = '2.1.0' + +homepage = 'http://delta.affinix.com/qca/' +description = """Taking a hint from the similarly-named Java Cryptography Architecture, + QCA aims to provide a straightforward and cross-platform crypto API, using Qt datatypes + and conventions. QCA separates the API from the implementation, using plugins known as + Providers. The advantage of this model is to allow applications to avoid linking to or + explicitly depending on any particular cryptographic library. This allows one to easily + change or upgrade crypto implementations without even needing to recompile the + application! QCA should work everywhere Qt does, including Windows/Unix/MacOSX.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://delta.affinix.com/download/qca/2.0/'] +sources = ['%(namelower)s-%(version)s.tar.gz'] + +configopts = "-DQT4_BUILD=true" + +builddependencies = [ + ('CMake', '3.5.2') +] + +dependencies = [ + ('Qt', '4.8.7') +] + +moduleclass = 'devel' -- GitLab From 654c378df4f96e59f3eefcea4ba61b550089f79b Mon Sep 17 00:00:00 2001 From: Yann Sagon Date: Wed, 21 Sep 2016 16:32:47 +0200 Subject: [PATCH 340/741] missing sip --- .../PyQt-4.11.4-foss-2016a-Python-2.7.11.eb | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..4f44ed007d --- /dev/null +++ b/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,41 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Bart Verleye +# Center for eResearch, Auckland +easyblock = 'ConfigureMakePythonPackage' + +name = 'PyQt' +version = '4.11.4' + +homepage = 'http://www.riverbankcomputing.co.uk/software/pyqt' +description = """PyQt is a set of Python v2 and v3 bindings for Digia's Qt application framework.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +sources = ['%(name)s-x11-gpl-%(version)s.tar.gz'] +source_urls = ['http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-%(version)s'] + +python = 'Python' +pyver = '2.7.11' +pyshortver = '.'.join(pyver.split('.')[:2]) +versionsuffix = '-%s-%s' % (python, pyver) + +dependencies = [ + (python, pyver), + ('SIP', '4.16.8', versionsuffix), + ('Qt', '4.8.7'), +] + +configopts = "configure-ng.py --confirm-license" +configopts += " --destdir=%%(installdir)s/lib/python%s/site-packages " % pyshortver +configopts += " --no-sip-files" + +options = {'modulename': '%(name)s%(version_major)s'} + +modextrapaths = {'PYTHONPATH': 'lib/python%s/site-packages' % pyshortver} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%s/site-packages/%%(name)s%%(version_major)s' % pyshortver], +} + +moduleclass = 'vis' -- GitLab From 8284ce4db99bd7304efc1cc3f752760593c358c6 Mon Sep 17 00:00:00 2001 From: Yann Sagon Date: Wed, 21 Sep 2016 16:34:28 +0200 Subject: [PATCH 341/741] SIP 4.18 foss 2016a$ --- .../SIP/SIP-4.18-foss-2016a-Python-2.7.11.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/s/SIP/SIP-4.18-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/s/SIP/SIP-4.18-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/SIP/SIP-4.18-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..0ac8c1861d --- /dev/null +++ b/easybuild/easyconfigs/s/SIP/SIP-4.18-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,30 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Bart Verleye +# Center for eResearch, Auckland +easyblock = 'ConfigureMakePythonPackage' + +name = 'SIP' +version = '4.18' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.riverbankcomputing.com/software/sip/' +description = """SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://sourceforge.net/projects/pyqt/files/sip/sip-%(version)s'] + +dependencies = [('Python', '2.7.11')] + +configopts = "configure.py --bindir %(installdir)s/bin --incdir %(installdir)s/include " +configopts += "--destdir %(installdir)s/lib/python%(pyshortver)s/site-packages" + +sanity_check_paths = { + 'files': ['bin/sip', 'include/sip.h'] + + ['lib/python%%(pyshortver)s/site-packages/%s' % x + for x in ['sip.%s' % SHLIB_EXT, 'sipconfig.py', 'sipdistutils.py']], + 'dirs': [], +} + +moduleclass = 'lang' -- GitLab From 1a3e2c84910a6df7f4524aaed7a43a774919c070 Mon Sep 17 00:00:00 2001 From: Yann Sagon Date: Wed, 21 Sep 2016 17:05:06 +0200 Subject: [PATCH 342/741] cleanup --- .../PyQt-4.11.4-foss-2016a-Python-2.7.11.eb | 41 ------------------- 1 file changed, 41 deletions(-) delete mode 100644 easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-foss-2016a-Python-2.7.11.eb deleted file mode 100644 index 4f44ed007d..0000000000 --- a/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-foss-2016a-Python-2.7.11.eb +++ /dev/null @@ -1,41 +0,0 @@ -# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild -# Author: Bart Verleye -# Center for eResearch, Auckland -easyblock = 'ConfigureMakePythonPackage' - -name = 'PyQt' -version = '4.11.4' - -homepage = 'http://www.riverbankcomputing.co.uk/software/pyqt' -description = """PyQt is a set of Python v2 and v3 bindings for Digia's Qt application framework.""" - -toolchain = {'name': 'foss', 'version': '2016a'} - -sources = ['%(name)s-x11-gpl-%(version)s.tar.gz'] -source_urls = ['http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-%(version)s'] - -python = 'Python' -pyver = '2.7.11' -pyshortver = '.'.join(pyver.split('.')[:2]) -versionsuffix = '-%s-%s' % (python, pyver) - -dependencies = [ - (python, pyver), - ('SIP', '4.16.8', versionsuffix), - ('Qt', '4.8.7'), -] - -configopts = "configure-ng.py --confirm-license" -configopts += " --destdir=%%(installdir)s/lib/python%s/site-packages " % pyshortver -configopts += " --no-sip-files" - -options = {'modulename': '%(name)s%(version_major)s'} - -modextrapaths = {'PYTHONPATH': 'lib/python%s/site-packages' % pyshortver} - -sanity_check_paths = { - 'files': [], - 'dirs': ['lib/python%s/site-packages/%%(name)s%%(version_major)s' % pyshortver], -} - -moduleclass = 'vis' -- GitLab From c849c699384d548feb18b72ab5b4f1c637bcf313 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Wed, 21 Sep 2016 17:47:56 +0200 Subject: [PATCH 343/741] Fix bad config option for dummy-toolchain gettext. Use the correct configure option to use the internal libxml. And keep the dependencies as close to the normal tool-chain versions as possible. --- easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb | 2 +- easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb | 2 +- easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb | 2 +- easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb | 4 +++- easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb | 4 +++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb b/easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb index ca42caa817..68b4d25ce9 100644 --- a/easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb +++ b/easybuild/easyconfigs/g/gettext/gettext-0.18.2.eb @@ -18,6 +18,6 @@ toolchain = {'name': 'dummy', 'version': ''} sources = [SOURCE_TAR_GZ] source_urls = [GNU_SOURCE] -configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' +configopts = '--without-emacs --with-included-libxml --without-xz --without-bzip2' moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb index 23ce1e2b27..ed81b95755 100644 --- a/easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.4.eb @@ -18,6 +18,6 @@ toolchain = {'name': 'dummy', 'version': ''} sources = [SOURCE_TAR_GZ] source_urls = [GNU_SOURCE] -configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' +configopts = '--without-emacs --with-included-libxml --without-xz --without-bzip2' moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb index fd9544cda7..ce355420b2 100644 --- a/easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.6.eb @@ -18,6 +18,6 @@ toolchain = {'name': 'dummy', 'version': ''} sources = [SOURCE_TAR_GZ] source_urls = [GNU_SOURCE] -configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' +configopts = '--without-emacs --with-included-libxml --without-xz --without-bzip2' moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb index cfca8144b6..578b07b38d 100644 --- a/easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.7.eb @@ -18,6 +18,8 @@ toolchain = {'name': 'dummy', 'version': ''} sources = [SOURCE_TAR_GZ] source_urls = [GNU_SOURCE] -configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' +dependencies = [('ncurses', '6.0')] + +configopts = '--without-emacs --with-included-libxml --without-xz --without-bzip2' moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb b/easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb index ac95067f78..45caa1fde8 100644 --- a/easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb +++ b/easybuild/easyconfigs/g/gettext/gettext-0.19.8.eb @@ -18,6 +18,8 @@ toolchain = {'name': 'dummy', 'version': ''} sources = [SOURCE_TAR_GZ] source_urls = [GNU_SOURCE] -configopts = '--without-emacs --without-libxml2-prefix --without-libncurses-prefix --without-xz --without-bzip2' +dependencies = [('ncurses', '6.0')] + +configopts = '--without-emacs --with-included-libxml --without-xz --without-bzip2' moduleclass = 'vis' -- GitLab From 8fe44ea98e79db6759715c96ad327c8caf32e77e Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Thu, 22 Sep 2016 15:58:42 +0800 Subject: [PATCH 344/741] change filename and checksum --- .../easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb index 4b2a8bbb84..5cd635730b 100644 --- a/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/v/VASP/VASP-5.4.1-intel-2016.02-GCC-4.9.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'intel', 'version': '2016.02-GCC-4.9'} toolchainopts = {'usempi': True} # Vasp is proprietary software, see http://www.vasp.at/index.php/faqs on how to get access to the code -sources = [SOURCELOWER_TAR_GZ] +sources = ['vasp.5.4.1.24Jun15.tar.gz'] # uncommment after downloading patches from http://cms.mpi.univie.ac.at/wiki/index.php/Installing_VASP #patches = [ @@ -22,7 +22,7 @@ sources = [SOURCELOWER_TAR_GZ] #] checksums = [ - '57c2b07d0f70987000033984e913f1a6', # vasp.5.4.1.tar.gz + '9a56174e272ac0c07645c42932848788', # vasp.5.4.1.24Jun15.tar.gz 'ee242452bba6bb37459745f4617649d7', # vasp.5.4.1.08072015.patch 'b137eb13804a60df382e77495dc738f9', # vasp.5.4.1.27082015.patch 'd64b8f0ae861db7a76e6e9c9ffa188a1', # vasp.5.4.1.06112015.patch -- GitLab From 8d5077afbc9d0e82b7ed0db6ad43ee3ddf4d8817 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 22 Sep 2016 15:12:40 +0200 Subject: [PATCH 345/741] Revert "Removing LeadIT from this PR" This reverts commit d470e60f9ba9c5218e13f190a98f7b5bd137bc5a. --- .../easyconfigs/l/LeadIT/LeadIT-2.1.9.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/l/LeadIT/LeadIT-2.1.9.eb diff --git a/easybuild/easyconfigs/l/LeadIT/LeadIT-2.1.9.eb b/easybuild/easyconfigs/l/LeadIT/LeadIT-2.1.9.eb new file mode 100644 index 0000000000..128c5bbc07 --- /dev/null +++ b/easybuild/easyconfigs/l/LeadIT/LeadIT-2.1.9.eb @@ -0,0 +1,27 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Ravi Tripathi +# Email: ravi89@uab.edu + +easyblock = "Tarball" + +name = 'LeadIT' +version = '2.1.9' + +homepage = 'http://www.biosolveit.de/LeadIT/index.html' +description = """Visually Informed LeadOpt""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +#You need to get the software manually from http://www.biosolveit.de/LeadIT/index.html +sources = ['leadit-%(version)s-Linux-x64.tar.gz'] + +checksums = ['363fa557861c4d109fd595ab895df3fd'] + +modextrapaths = {'PATH': ''} + +sanity_check_paths = { + 'files': ["leadit", "flexv", "hydescorer"], + 'dirs': ["example", "doc"] +} + +moduleclass = 'chem' -- GitLab From 256b80ea87b763a1d2fe7b7aa29a32de43b75e5c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 22 Sep 2016 15:27:36 +0200 Subject: [PATCH 346/741] bump version to 2.9.0 & update release notes --- RELEASE_NOTES | 56 +++++++++++++++++++++++++++++++++++++++++++++++++-- setup.py | 2 +- 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 8501454d37..c74d917ce1 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -3,8 +3,60 @@ For more detailed information, please see the git log. These release notes can also be consulted at http://easybuild.readthedocs.org/en/latest/Release_notes.html. -The latest version of easybuild-easyconfig provides 6,548 easyconfig files, for 998 different software packages, -37 different (compiler) toolchains, 12 software bundles and 1 meta-package. +The latest version of easybuild-easyconfig provides 7,060 easyconfig files, for 1,085 different software packages, +37 different (compiler) toolchains, 13 software bundles and 1 meta-package. + +v2.9.0 (September 23rd 2016) +---------------------------- + +feature release +- added example easyconfig files for 88 new software packages: + ADMIXTURE (#3359), angsd (#3593), ASHS (#3429), AutoDock (#3465), AutoGrid (#3466), BayeScan (#2748, #3356), + BayPass (#3451), Bazel (#3379), Blender (#3553, #3558), bwakit (#3567), BXH_XCEDE_TOOLS (#3410), CastXML (#3403), + CHASE (#3304), configparser (#3368, #3424), configurable-http-proxy (#3380), cppcheck (#3508), CRPropa (#779), + DicomBrowser (#3432), DMTCP (#3422), entrypoints (#3368, #3424), f90cache (#3570), fastPHASE (#3343), + fastQValidator (#3192), FFindex (#1135), FragGeneScan (#1198), gdc-client (#3399), gflags (#3417), glog (#3417), + GRIT (#3561), H5hut (#3431), HAPGEN2 (#3344), HEALPix (#779), IMOD (#1187, #3347), IronPython (#607), + jhbuild (#3476), jupyterhub (#3380), Keras (#3581), khmer (#1158), LeadIT (#3345, #3599), LevelDB (#3417), + libbitmask (#3481), libcpuset (#3481), LMDB (#3417), log4cplus (#1136), MACH (#3346), Mako (#3460), Maq (#3428), + MetaGeneAnnotator (#3307), Metal (#3324), Mono (#607), MyMediaLite (#607), nco (#2575), nose-parameterized (#3579), + OpenEXR (#3553), OpenImageIO (#3553), path.py (#3368, #3424), PCRE2 (#3325), pftoolsV3 (#3317), PHASE (#3385), + PLAST (#3288), PLINKSEQ (#3402), POV-Ray (#3551), ProbABEL (#3108), prompt-toolkit (#3368, #3424), + protobuf-python (#3563), PSORTb (#3317), py (#3403, #3482), pygccxml (#3403, #3482), pyGIMLi (#3403, #3482), + pyplusplus (#3403, #3482), PyQt5 (#3533), Pyro4 (#3527), pytest (#3403, #3482), QCA (#3595), RDMC (#1137), + S.A.G.E. (#3427), SDL2 (#3551), SHORE (#3531), SimVascular (#3555), SortMeRNA (#3326), SUMACLUST (#3316), + SUMATRA (#3316), Text-CSV (#3323), Triangle (#3403), VEGAS (#3457), VirSorter (#3307), wcwidth (#3368, #3424), + X11 (#3340) +- added new easyconfigs for existing toolchains: + - CrayGNU + CrayIntel 2016.06 (#3377) + - foss 2016.07 (#3517) + 2016.09 (#3523), + - iomkl 2016.07 (#3458) + - pomkl 2016.09 (#3516) +- added additional easyconfigs for various supported software packages, including: + FFTW 3.3.5, GCC 4.9.4 + 6.2.0, GROMACS 5.1.4, IPython 5.1.0, LLVM 3.9.0, Mesa 12.0.1, OpenCV 3.1.0, OpenFOAM 4.0, + OpenMPI 2.0.1, ParaView 5.1.2, PGI 16.7, QuantumESPRESSO 5.4.0, Qt5 5.7.0, R-bundle-Bioconductor 3.3, VTK 7.0.0, + Yade 2016.06a +- various enhancements, including: + - adjust PSI4 easyconfigs for updated easyblock (#3312) + - clean up libxml2 easyconfigs according to updated libxml2 easyblock (#3479, #3509) + - significantly speed up verifying of dumped easyconfig by resorting to 'shallow' parsing (#3520) + - include sanity checks for all MATIO config files (#3528) + - remove --with-tcl-config/--with-tk-config from R easyconfig, already done in R easyblock (#3580) +- various bug fixes, including: + - disable testing in all ParaView 4.4.0 easyconfigs, required download is too much of a PITA (#3178) + - add SQLite as dep to GDAL 2.1.0 easyconfigs (#3342) + - add zlib/SQLite/LibTIFF as dep to R 3.3.1 easyconfigs (#3342) + - add bzip2 as a dependency of freetype (#3464) + - specify correct MPI target in FDS easyconfigs (#3488) + - add tcsh as OS dep in NAMD easyconfigs (#3491) + - statically link ncurses/libreadline in Lua easyconfig with 'dummy' toolchain (#3545) + - add M4 as dep for flex 2.6.x (#3542, #3550) + - add bzip2 and libxcb dependencies to FFmpeg 3.x easyconfigs (#3548) + - make sure & check that Graphviz does not install Tcl bindings in Tcl install prefix (#3556) + - add missing patches for extensions in Python 3.x easyconfigs (#3557) + - add missing XZ dependency to libxml2 2.9.4 easyconfigs, change gettext dep of XZ to build-only dep (#3568) + - enable running of tests for HPCG (#3578) + - fix buildopts in tabix easyconfigs (#3584) v2.8.2 (July 13th 2016) diff --git a/setup.py b/setup.py index c52c2d0550..4a7ed9800b 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from distutils import log # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = '2.9.0.dev0' +VERSION = '2.9.0' API_VERSION = VERSION.split('.')[0] EB_VERSION = '.'.join(VERSION.split('.')[0:2]) -- GitLab From 5967479a1f949dad7bb3a8fa65f26450053a6232 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 23 Sep 2016 14:41:29 +0200 Subject: [PATCH 347/741] Add FLUENT/17.1 --- easybuild/easyconfigs/f/FLUENT/FLUENT-17.1.eb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 easybuild/easyconfigs/f/FLUENT/FLUENT-17.1.eb diff --git a/easybuild/easyconfigs/f/FLUENT/FLUENT-17.1.eb b/easybuild/easyconfigs/f/FLUENT/FLUENT-17.1.eb new file mode 100644 index 0000000000..c1ec088d35 --- /dev/null +++ b/easybuild/easyconfigs/f/FLUENT/FLUENT-17.1.eb @@ -0,0 +1,14 @@ +name = 'FLUENT' +version = '17.1' + +homepage = 'http://www.ansys.com/Products/Simulation+Technology/Fluid+Dynamics/Fluid+Dynamics+Products/ANSYS+Fluent' +description = """ANSYS FLUENT software contains the broad physical modeling capabilities needed +to model flow, turbulence, heat transfer, and reactions for industrial applications ranging from +air flow over an aircraft wing to combustion in a furnace, from bubble columns to oil platforms, +from blood flow to semiconductor manufacturing, and from clean room design to wastewater treatment plants.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['FLUIDS_171_LINX64.tar'] + +moduleclass = 'cae' -- GitLab From 58c0ed35527df8e39beffad7a46bb5413c0e6d04 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 23 Sep 2016 15:23:48 +0200 Subject: [PATCH 348/741] bump version to 3.0.0.dev0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4a7ed9800b..f4cbb44d3b 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from distutils import log # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = '2.9.0' +VERSION = '3.0.0.dev0' API_VERSION = VERSION.split('.')[0] EB_VERSION = '.'.join(VERSION.split('.')[0:2]) -- GitLab From 01f7d3772abfa79c936597642dabec3063d3b620 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 23 Sep 2016 15:31:22 +0200 Subject: [PATCH 349/741] add easyconfig EasyBuild-2.9.0.eb --- .../e/EasyBuild/EasyBuild-2.9.0.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/e/EasyBuild/EasyBuild-2.9.0.eb diff --git a/easybuild/easyconfigs/e/EasyBuild/EasyBuild-2.9.0.eb b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-2.9.0.eb new file mode 100644 index 0000000000..09a04b73a8 --- /dev/null +++ b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-2.9.0.eb @@ -0,0 +1,38 @@ +easyblock = 'EB_EasyBuildMeta' + +name = 'EasyBuild' +version = '2.9.0' + +homepage = 'http://hpcugent.github.com/easybuild/' +description = """EasyBuild is a software build and installation framework + written in Python that allows you to install software in a structured, + repeatable and robust way.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +source_urls = [ + # vsc-install + 'https://pypi.python.org/packages/0e/83/4ed8215c5b27ba4ee4a6da3d43ce9579b67c5fe7a91f33f48991f878db13/', + # vsc-base + 'https://pypi.python.org/packages/2b/fd/e16d723389f692b107b5e4e6243379d2b056e79a7ea3b5e4fdc2753d9541/', + # easybuild-framework + 'https://pypi.python.org/packages/e9/c7/da05d522cfc8b932956e77bdbf5270a91443df1f91bc2004a08776bd55da/', + # easybuild-easyblocks + 'https://pypi.python.org/packages/0f/c4/65f98c2dc041e8201a51d2be61ec407e421f02e4f43775c7cb85ed4b8bcd/', + # easybuild-easyconfigs + 'https://pypi.python.org/packages/0a/5e/a0faffd999833c9f745b0f5592a8bce51556a4604d90daeda024244fa6fe/', +] +# order matters a lot, to avoid having dependencies auto-resolved (--no-deps easy_install option doesn't work?) +sources = [ + 'vsc-install-0.10.15.tar.gz', + 'vsc-base-2.5.4.tar.gz', + 'easybuild-framework-%(version)s.tar.gz', + 'easybuild-easyblocks-%(version)s.tar.gz', + 'easybuild-easyconfigs-%(version)s.tar.gz', +] + +# EasyBuild is a (set of) Python packages, so it depends on Python +# usually, we want to use the system Python, so no actual Python dependency is listed +allow_system_deps = [('Python', SYS_PYTHON_VERSION)] + +moduleclass = 'tools' -- GitLab From 4658d115ab82af90d7a48ba18ad0c3a0129e4623 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 24 Sep 2016 10:14:10 +0200 Subject: [PATCH 350/741] fix source URL in GCCcore 6.2.0 easyconfig --- easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb index 011920e0f4..3e675b3b89 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'dummy', 'version': ''} mpfr_version = '3.1.4' source_urls = [ - 'http://ftpmirror.gnu.org/%(namelower)s/%(namelower)s-%(version)s', # GCC auto-resolving HTTP mirror + 'http://ftpmirror.gnu.org/gcc/gcc-%(versions)s', # GCC auto-resolving HTTP mirror 'http://ftpmirror.gnu.org/gmp', # idem for GMP 'http://ftpmirror.gnu.org/mpfr', # idem for MPFR 'http://www.multiprecision.org/mpc/download', # MPC official -- GitLab From c18e1d1cc278d55205d819a0627623cab2bd9923 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 24 Sep 2016 10:17:02 +0200 Subject: [PATCH 351/741] fix typo --- easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb index 3e675b3b89..a375f0e539 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'dummy', 'version': ''} mpfr_version = '3.1.4' source_urls = [ - 'http://ftpmirror.gnu.org/gcc/gcc-%(versions)s', # GCC auto-resolving HTTP mirror + 'http://ftpmirror.gnu.org/gcc/gcc-%(version)s', # GCC auto-resolving HTTP mirror 'http://ftpmirror.gnu.org/gmp', # idem for GMP 'http://ftpmirror.gnu.org/mpfr', # idem for MPFR 'http://www.multiprecision.org/mpc/download', # MPC official -- GitLab From 0e9b1e6adb1076a1d716ba11ab47b31e2b8071bf Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 26 Sep 2016 12:16:07 +0200 Subject: [PATCH 352/741] add easyconfig Reads2snp-2.0.eb --- .../easyconfigs/r/Reads2snp/Reads2snp-2.0.eb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb diff --git a/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb b/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb new file mode 100644 index 0000000000..102136d546 --- /dev/null +++ b/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb @@ -0,0 +1,34 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'Tarball' + +name = 'Reads2snp' +version = '2.0' + +homepage = 'http://kimura.univ-montp2.fr/PopPhyl/index.php?section=tools' +description = """reads2snp is a SNP and genotype caller: it predicts the genotype of distinct individuals + at distinct positions of a set of sequences based on read mapping / read counts. Its typical input is a bam file. + Its typical output is a vcf file. It is written in C++, based on the bio++ libraries, multi-threaded with openMP, + available under Linux and MacOS""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = ['http://kimura.univ-montp2.fr/PopPhyl/resources/tools/'] +sources = ['%(namelower)s_%(version)s.zip'] + +sanity_check_paths = { + 'files': ['reads2snp_2.0.64.bin'], + 'dirs': [], +} + +modextrapaths = { + 'PATH': "", # add the installation dir to PATH +} + +# disable exec permission for the provided 32 bits binary +postinstallcmds = ['chmod -x %(installdir)s/reads2snp_%(version)s.32.bin'] + +moduleclass = 'bio' -- GitLab From 6485f820e171394672f38700b71482876265612e Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 26 Sep 2016 12:21:10 +0200 Subject: [PATCH 353/741] Add SWIG/3.0.8 for Python/2.7.12 --- .../SWIG-3.0.8-intel-2016b-Python-2.7.12.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..00ac605f8c --- /dev/null +++ b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,20 @@ +name = 'SWIG' +version = '3.0.8' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.swig.org/' +description = """SWIG is a software development tool that connects programs written in C and C++ with + a variety of high-level programming languages.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('PCRE', '8.38'), +] + +moduleclass = 'devel' -- GitLab From aa6655d9d4b24b3ff9c5b5fab2be7d61557c106a Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 26 Sep 2016 12:21:26 +0200 Subject: [PATCH 354/741] Added PLplot/5.11.1 for intel/2016b --- ...intel-2016b-Java-1.7.0_80-Python-2.7.12.eb | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb b/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb new file mode 100644 index 0000000000..837821c853 --- /dev/null +++ b/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb @@ -0,0 +1,47 @@ +easyblock = 'CMakeMake' + +name = 'PLplot' +version = '5.11.1' +versionsuffix = '-Java-%(javaver)s-Python-%(pyver)s' + +homepage = 'http://plplot.sourceforge.net' +description = """PLplot is a cross-platform software package for creating scientific plots whose (UTF-8) plot symbols + and text are limited in practice only by what Unicode-aware system fonts are installed on a user's computer.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [ + ('CMake', '3.6.1'), + ('SWIG', '3.0.8', '-Python-%(pyver)s'), + ('libtool', '2.4.6'), +] + +dependencies = [ + ('zlib', '1.2.8'), + ('Java', '1.7.0_80', '', True), + ('Python', '2.7.12'), + ('Perl', '5.24.0'), + ('cairo', '1.14.6'), + ('expat', '2.2.0'), + ('GLib', '2.49.5'), + ('X11', '20160819'), + ('Pango', '1.40.3'), + ('pixman', '0.34.0'), + ('Tcl', '8.6.5'), + ('Tk', '8.6.5'), +] + +separate_build_dir = True + +modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} + +sanity_check_paths = { + 'files': ['lib/libplplot.so', 'lib/pkgconfig/plplot-f95.pc'], + 'dirs': ['bin', 'include/plplot', 'lib/fortran/modules/plplot', 'lib/pkgconfig', 'share/man/man1'], +} + +moduleclass = 'vis' -- GitLab From 6037845e53673227ec71cfe5946df32d21a6381e Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 26 Sep 2016 12:31:28 +0200 Subject: [PATCH 355/741] Resolve conflict --- .../PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb | 2 +- .../easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb b/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb index 837821c853..e8ab2cacc4 100644 --- a/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb +++ b/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb @@ -16,7 +16,7 @@ sources = [SOURCELOWER_TAR_GZ] builddependencies = [ ('CMake', '3.6.1'), - ('SWIG', '3.0.8', '-Python-%(pyver)s'), + ('SWIG', '3.0.10', '-Python-%(pyver)s'), ('libtool', '2.4.6'), ] diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb index fed2dcb3c3..383771a5de 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb @@ -14,7 +14,7 @@ sources = [SOURCELOWER_TAR_GZ] dependencies = [ ('Python', '2.7.12'), - ('PCRE', '8.38'), + ('PCRE', '8.39'), ] moduleclass = 'devel' -- GitLab From c1b54df0f8632d0ac9aba60a1d93949ca2df0b36 Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Mon, 26 Sep 2016 13:11:51 +0200 Subject: [PATCH 356/741] scikit-image built with the foss-2016a toolchain, including the Pillow dependency. --- .../Pillow-3.2.0-foss-2016a-Python-2.7.11.eb | 27 +++++++++++++++ ...t-image-0.12.3-foss-2016a-Python-2.7.11.eb | 33 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11.eb create mode 100644 easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..b7a1d9ade1 --- /dev/null +++ b/easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'Pillow' +version = '3.2.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://pillow.readthedocs.org/' +description = """Pillow is the 'friendly PIL fork' by Alex Clark and Contributors. + PIL is the Python Imaging Library by Fredrik Lundh and Contributors.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.11'), + ('libjpeg-turbo', '1.4.2','-NASM-2.12.01'), + ('libpng', '1.6.21'), + ('zlib', '1.2.8'), + ('LibTIFF', '4.0.6'), + ('freetype', '2.6.3'), +] + +options = {'modulename': 'PIL'} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb new file mode 100644 index 0000000000..fd95fa30d2 --- /dev/null +++ b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb @@ -0,0 +1,33 @@ +easyblock = 'PythonPackage' + +name = 'scikit-image' +version = '0.12.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://scikit-learn.org/stable/index.html' +description = """Scikit-learn integrates machine learning algorithms in the tightly-knit scientific Python world, +building upon numpy, scipy, and matplotlib. As a machine-learning module, +it provides versatile tools for data mining and analysis in any field of science and engineering. +It strives to be simple and efficient, accessible to everybody, and reusable in various contexts.""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.11'), + ('Qhull', '2015.2'), + ('matplotlib', '1.5.1', versionsuffix), + ('networkx', '1.11', versionsuffix), + ('Pillow', '3.2.0', versionsuffix), +] + +options = {'modulename': 'skimage'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/'], +} + +moduleclass = 'vis' -- GitLab From 235c7ccbdd3e196b02d56bb6907afd0c8e4ad4e4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 26 Sep 2016 13:28:47 +0200 Subject: [PATCH 357/741] correct STAMP dependency in i-cisTarget, must be 1.3 --- ...rget-20160602-intel-2016a-Python-2.7.11.eb | 2 +- .../s/STAMP/STAMP-1.2-intel-2016a.eb | 4 +-- .../s/STAMP/STAMP-1.3-intel-2016a.eb | 27 +++++++++++++++++++ 3 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb diff --git a/easybuild/easyconfigs/i/i-cisTarget/i-cisTarget-20160602-intel-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/i/i-cisTarget/i-cisTarget-20160602-intel-2016a-Python-2.7.11.eb index 5d57424030..efeb188af2 100644 --- a/easybuild/easyconfigs/i/i-cisTarget/i-cisTarget-20160602-intel-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/i/i-cisTarget/i-cisTarget-20160602-intel-2016a-Python-2.7.11.eb @@ -41,7 +41,7 @@ dependencies = [ ('matplotlib', '1.5.1', versionsuffix + '-freetype-2.6.3'), ('MySQL-python', '1.2.5', versionsuffix + '-MariaDB-10.1.14'), ('ImageMagick', '6.9.4-8'), - ('STAMP', '1.2'), + ('STAMP', '1.3'), ('Cluster-Buster', '20160106'), ('Kent_tools', '20130806', '-linux.x86_64', True), ] diff --git a/easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb b/easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb index 117f2476d8..1794e98775 100644 --- a/easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb +++ b/easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb @@ -3,12 +3,12 @@ easyblock = 'CmdCp' name = 'STAMP' version = '1.2' -homepage = 'ihttp://www.benoslab.pitt.edu/stamp/ - https://github.com/aertslab/stamp' +homepage = 'http://www.benoslab.pitt.edu/stamp/' description = """STAMP is a tool for characterizing similarities between transcription factor binding motifs""" toolchain = {'name': 'intel', 'version': '2016a'} -source_urls = ['https://github.com/aertslab/stamp/archive/'] +source_urls = ['https://github.com/seqcode/stamp/archive/'] sources = ['v%(version)s.tar.gz'] dependencies = [('GSL', '2.1')] diff --git a/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb b/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb new file mode 100644 index 0000000000..8ab4c4024a --- /dev/null +++ b/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb @@ -0,0 +1,27 @@ +easyblock = 'CmdCp' + +name = 'STAMP' +version = '1.3' + +homepage = 'http://www.benoslab.pitt.edu/stamp/' +description = """STAMP is a tool for characterizing similarities between transcription factor binding motifs""" + +toolchain = {'name': 'intel', 'version': '2016a'} + +source_urls = ['https://github.com/seqcode/stamp/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [('GSL', '2.1')] + +start_dir = 'src' + +cmds_map = [('.*', "$CXX $CXXFLAGS -o stamp *.cpp -lm -lgsl -lgslcblas")] + +files_to_copy = [(['stamp'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/stamp'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From c662a3cd5dfe3f361202eb565427bec82d28c70c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 26 Sep 2016 13:50:32 +0200 Subject: [PATCH 358/741] add easyconfig HTSeq-0.6.1p1-intel-2016b-Python-2.7.12.eb --- ...HTSeq-0.6.1p1-intel-2016b-Python-2.7.12.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/h/HTSeq/HTSeq-0.6.1p1-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/h/HTSeq/HTSeq-0.6.1p1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/h/HTSeq/HTSeq-0.6.1p1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..12d319ea7b --- /dev/null +++ b/easybuild/easyconfigs/h/HTSeq/HTSeq-0.6.1p1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'HTSeq' +version = '0.6.1p1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www-huber.embl.de/users/anders/HTSeq/' +description = """A framework to process and analyze data from high-throughput sequencing (HTS) assays""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('matplotlib', '1.5.1', versionsuffix), +] + +options = {'modulename': '%(name)s'} + +sanity_check_paths = { + 'files': ['bin/htseq-count', 'bin/htseq-qa'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'data' -- GitLab From 23364fcb3c8d51afe66caf5f1ce2876e53070f47 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 26 Sep 2016 14:03:10 +0200 Subject: [PATCH 359/741] also include $LDFLAGS in compiler command for STAMP --- easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb | 2 +- easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb b/easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb index 1794e98775..f3009cafcc 100644 --- a/easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb +++ b/easybuild/easyconfigs/s/STAMP/STAMP-1.2-intel-2016a.eb @@ -15,7 +15,7 @@ dependencies = [('GSL', '2.1')] start_dir = 'src' -cmds_map = [('.*', "$CXX $CXXFLAGS -o stamp *.cpp -lm -lgsl -lgslcblas")] +cmds_map = [('.*', "$CXX $CXXFLAGS -o stamp *.cpp $LDFLAGS -lm -lgsl -lgslcblas")] files_to_copy = [(['stamp'], 'bin')] diff --git a/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb b/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb index 8ab4c4024a..57a2608b75 100644 --- a/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb +++ b/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb @@ -15,7 +15,7 @@ dependencies = [('GSL', '2.1')] start_dir = 'src' -cmds_map = [('.*', "$CXX $CXXFLAGS -o stamp *.cpp -lm -lgsl -lgslcblas")] +cmds_map = [('.*', "$CXX $CXXFLAGS -o stamp *.cpp $LDFLAGS -lm -lgsl -lgslcblas")] files_to_copy = [(['stamp'], 'bin')] -- GitLab From adb7061ed2148cff1a0e66134b20e320da2d6dc5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 26 Sep 2016 16:30:10 +0200 Subject: [PATCH 360/741] add STAMP 1.3 with dep on GSL 2.2.1 --- .../g/GSL/GSL-2.2.1-intel-2016a.eb | 19 +++++++++++++ .../g/GSL/GSL-2.2.1-intel-2016b.eb | 19 +++++++++++++ .../s/STAMP/STAMP-1.3-intel-2016a.eb | 2 +- .../s/STAMP/STAMP-1.3-intel-2016b.eb | 27 +++++++++++++++++++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 easybuild/easyconfigs/g/GSL/GSL-2.2.1-intel-2016a.eb create mode 100644 easybuild/easyconfigs/g/GSL/GSL-2.2.1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016b.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.2.1-intel-2016a.eb b/easybuild/easyconfigs/g/GSL/GSL-2.2.1-intel-2016a.eb new file mode 100644 index 0000000000..6708b40368 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-2.2.1-intel-2016a.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '2.2.1' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2016a'} +toolchainopts = {'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.2.1-intel-2016b.eb b/easybuild/easyconfigs/g/GSL/GSL-2.2.1-intel-2016b.eb new file mode 100644 index 0000000000..6a638ab6e5 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-2.2.1-intel-2016b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '2.2.1' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'unroll': True, 'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb b/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb index 57a2608b75..4eb03dff01 100644 --- a/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb +++ b/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016a.eb @@ -11,7 +11,7 @@ toolchain = {'name': 'intel', 'version': '2016a'} source_urls = ['https://github.com/seqcode/stamp/archive/'] sources = ['v%(version)s.tar.gz'] -dependencies = [('GSL', '2.1')] +dependencies = [('GSL', '2.2.1')] start_dir = 'src' diff --git a/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016b.eb b/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016b.eb new file mode 100644 index 0000000000..51a70d8dc1 --- /dev/null +++ b/easybuild/easyconfigs/s/STAMP/STAMP-1.3-intel-2016b.eb @@ -0,0 +1,27 @@ +easyblock = 'CmdCp' + +name = 'STAMP' +version = '1.3' + +homepage = 'http://www.benoslab.pitt.edu/stamp/' +description = """STAMP is a tool for characterizing similarities between transcription factor binding motifs""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/seqcode/stamp/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [('GSL', '2.2.1')] + +start_dir = 'src' + +cmds_map = [('.*', "$CXX $CXXFLAGS -o stamp *.cpp $LDFLAGS -lm -lgsl -lgslcblas")] + +files_to_copy = [(['stamp'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/stamp'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From ec95fd74d053bfa649a12891bab58f28509889a7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 26 Sep 2016 16:37:12 +0200 Subject: [PATCH 361/741] add easyconfig Ghostscript-9.19-intel-2016b.eb, add easyconfig cairo-1.14.6-intel-2016b.eb, add easyconfig pixman-0.34.0-intel-2016b.eb --- .../c/cairo/cairo-1.14.6-intel-2016b.eb | 43 +++++++++++++++++++ .../Ghostscript-9.19-intel-2016b.eb | 29 +++++++++++++ .../p/pixman/pixman-0.34.0-intel-2016b.eb | 20 +++++++++ 3 files changed, 92 insertions(+) create mode 100644 easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.19-intel-2016b.eb create mode 100644 easybuild/easyconfigs/p/pixman/pixman-0.34.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb new file mode 100644 index 0000000000..54967b2ef7 --- /dev/null +++ b/easybuild/easyconfigs/c/cairo/cairo-1.14.6-intel-2016b.eb @@ -0,0 +1,43 @@ +easyblock = 'ConfigureMake' + +name = 'cairo' +version = '1.14.6' + +homepage = 'http://cairographics.org' +description = """Cairo is a 2D graphics library with support for multiple output devices. + Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, + PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://cairographics.org/releases/'] +sources = [SOURCE_TAR_XZ] + +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libpng', '1.6.24'), + ('freetype', '2.6.5'), + ('pixman', '0.34.0'), + ('expat', '2.2.0'), + ('GLib', '2.49.5'), + ('X11', '20160819'), +] + +# disable symbol lookup, which requires -lbfd, to avoid link issues with (non-PIC) libiberty.a provided by GCC +configopts = "--enable-symbol-lookup=no --enable-gobject=yes --enable-svg=yes --enable-tee=yes --enable-xlib-xcb " + +# workaround for "hidden symbol .* in .* is referenced by DSO" and "ld: final link failed: Bad value" +buildopts = 'LD="$CC" LDFLAGS="$LDFLAGS -shared-intel"' + +sanity_check_paths = { + 'files': ['bin/cairo-trace', 'lib/cairo/libcairo-trace.so', 'lib/cairo/libcairo-trace.a', + 'lib/libcairo.a', 'lib/libcairo-gobject.a', 'lib/libcairo-script-interpreter.a', + 'lib/libcairo-gobject.so', 'lib/libcairo-script-interpreter.so', 'lib/libcairo.so'] + + ['include/cairo/cairo%s.h' % x for x in ['', '-deprecated', '-features', '-ft', '-gobject', '-pdf', '-ps', + '-script', '-script-interpreter', '-svg', '-version', '-xcb', + '-xlib', '-xlib-xrender']], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.19-intel-2016b.eb b/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.19-intel-2016b.eb new file mode 100644 index 0000000000..8612f2848b --- /dev/null +++ b/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.19-intel-2016b.eb @@ -0,0 +1,29 @@ +easyblock = 'ConfigureMake' + +name = 'Ghostscript' +version = '9.19' + +homepage = 'http://ghostscript.com' +description = """Ghostscript is a versatile processor for PostScript data with the ability to render PostScript to + different targets. It used to be part of the cups printing stack, but is no longer used for that.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ["https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs%(version_major)s%(version_minor)s/"] +sources = ["ghostpdl-%(version)s.tar.bz2"] + +dependencies = [ + ('zlib', '1.2.8'), + ('libpng', '1.6.24'), + ('freetype', '2.6.5'), + ('libjpeg-turbo', '1.5.0'), + ('expat', '2.2.0'), + ('GLib', '2.49.5'), + ('cairo', '1.14.6'), + ('LibTIFF', '4.0.6'), +] + +configopts = "--with-system-libtiff --enable-dynamic" + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/p/pixman/pixman-0.34.0-intel-2016b.eb b/easybuild/easyconfigs/p/pixman/pixman-0.34.0-intel-2016b.eb new file mode 100644 index 0000000000..ae4b777250 --- /dev/null +++ b/easybuild/easyconfigs/p/pixman/pixman-0.34.0-intel-2016b.eb @@ -0,0 +1,20 @@ +easyblock = 'ConfigureMake' + +name = "pixman" +version = '0.34.0' + +homepage = 'http://www.pixman.org/' +description = """Pixman is a low-level software library for pixel manipulation, providing features such as image +compositing and trapezoid rasterization. Important users of pixman are the cairo graphics library and the X server.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://cairographics.org/releases/'] +sources = [SOURCE_TAR_GZ] + +sanity_check_paths = { + 'files': ['lib/libpixman-1.%s' % SHLIB_EXT], + 'dirs': [] +} + +moduleclass = 'vis' -- GitLab From 68ce8ab99ce288d6a25fdcd831455dc284bb1248 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 26 Sep 2016 18:35:09 +0200 Subject: [PATCH 362/741] add easyconfig pymatgen-4.3.2-intel-2016b-Python-2.7.12.eb, add easyconfig spglib-python-1.9.5-intel-2016b-Python-2.7.12.eb --- ...ymatgen-4.3.2-intel-2016b-Python-2.7.12.eb | 26 +++++++++++++++++++ ...-python-1.9.5-intel-2016b-Python-2.7.12.eb | 26 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 easybuild/easyconfigs/p/pymatgen/pymatgen-4.3.2-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.5-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/p/pymatgen/pymatgen-4.3.2-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/pymatgen/pymatgen-4.3.2-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..ff5f953560 --- /dev/null +++ b/easybuild/easyconfigs/p/pymatgen/pymatgen-4.3.2-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,26 @@ +easyblock = 'PythonPackage' + +name = 'pymatgen' +version = '4.3.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/pymatgen' +description = """Python Materials Genomics is a robust materials analysis code that defines core object + representations for structures and molecules with support for many electronic structure codes.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('spglib-python', '1.9.5', versionsuffix), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'] +} + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.5-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.5-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..7dd378ce55 --- /dev/null +++ b/easybuild/easyconfigs/s/spglib-python/spglib-python-1.9.5-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,26 @@ +easyblock = 'PythonPackage' + +name = 'spglib-python' +version = '1.9.5' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/spglib' +description = """Spglib for Python. Spglib is a library for finding and handling crystal symmetries written in C.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://pypi.python.org/packages/source/%(nameletter)s/spglib'] +sources = ['spglib-%(version)s.tar.gz'] + +dependencies = [ + ('Python', '2.7.12'), +] + +options = {'modulename': 'spglib'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'] +} + +moduleclass = 'chem' -- GitLab From 82e76d737a14ade6e8cf18b269994fbe5f517fe5 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 27 Sep 2016 09:22:49 +0200 Subject: [PATCH 363/741] Fix PCRE issue: make SWIG have PCRE versionsuffix --- ....10-intel-2016b-Python-2.7.12-PCRE-8.39.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12-PCRE-8.39.eb diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12-PCRE-8.39.eb b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12-PCRE-8.39.eb new file mode 100644 index 0000000000..a1d01b931e --- /dev/null +++ b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12-PCRE-8.39.eb @@ -0,0 +1,20 @@ +name = 'SWIG' +version = '3.0.10' +versionsuffix = '-Python-%(pyver)s-PCRE-8.39' + +homepage = 'http://www.swig.org/' +description = """SWIG is a software development tool that connects programs written in C and C++ with + a variety of high-level programming languages.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('PCRE', '8.39'), +] + +moduleclass = 'devel' -- GitLab From 3e38446dc0b0f8359a18ccb97fa47361ccbfb80b Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 27 Sep 2016 09:32:09 +0200 Subject: [PATCH 364/741] Drop unused easyconfig and fix SWIG/PLplot incompatiblity --- ...intel-2016b-Java-1.7.0_80-Python-2.7.12.eb | 2 +- .../SWIG-3.0.10-intel-2016b-Python-2.7.12.eb | 2 +- .../SWIG-3.0.8-intel-2016b-Python-2.7.12.eb | 20 ------------------- 3 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb b/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb index e8ab2cacc4..fb25f08bf9 100644 --- a/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb +++ b/easybuild/easyconfigs/p/PLplot/PLplot-5.11.1-intel-2016b-Java-1.7.0_80-Python-2.7.12.eb @@ -16,7 +16,7 @@ sources = [SOURCELOWER_TAR_GZ] builddependencies = [ ('CMake', '3.6.1'), - ('SWIG', '3.0.10', '-Python-%(pyver)s'), + ('SWIG', '3.0.10', '-Python-%(pyver)s-PCRE-8.39'), ('libtool', '2.4.6'), ] diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb index 383771a5de..fed2dcb3c3 100644 --- a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.10-intel-2016b-Python-2.7.12.eb @@ -14,7 +14,7 @@ sources = [SOURCELOWER_TAR_GZ] dependencies = [ ('Python', '2.7.12'), - ('PCRE', '8.39'), + ('PCRE', '8.38'), ] moduleclass = 'devel' diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-2.7.12.eb deleted file mode 100644 index 00ac605f8c..0000000000 --- a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-2.7.12.eb +++ /dev/null @@ -1,20 +0,0 @@ -name = 'SWIG' -version = '3.0.8' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'http://www.swig.org/' -description = """SWIG is a software development tool that connects programs written in C and C++ with - a variety of high-level programming languages.""" - -toolchain = {'name': 'intel', 'version': '2016b'} -toolchainopts = {'pic': True, 'opt': True, 'optarch': True} - -source_urls = [SOURCEFORGE_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -dependencies = [ - ('Python', '2.7.12'), - ('PCRE', '8.38'), -] - -moduleclass = 'devel' -- GitLab From 3eb67ce6de1d6732408ce0e7495ce1592ffcb153 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 27 Sep 2016 09:33:13 +0200 Subject: [PATCH 365/741] Another unused easyconfig --- .../SWIG-3.0.8-intel-2016b-Python-3.5.2.eb | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-3.5.2.eb deleted file mode 100644 index 230fa8885d..0000000000 --- a/easybuild/easyconfigs/s/SWIG/SWIG-3.0.8-intel-2016b-Python-3.5.2.eb +++ /dev/null @@ -1,20 +0,0 @@ -name = 'SWIG' -version = '3.0.8' -versionsuffix = '-Python-%(pyver)s' - -homepage = 'http://www.swig.org/' -description = """SWIG is a software development tool that connects programs written in C and C++ with - a variety of high-level programming languages.""" - -toolchain = {'name': 'intel', 'version': '2016b'} -toolchainopts = {'pic': True, 'opt': True, 'optarch': True} - -source_urls = [SOURCEFORGE_SOURCE] -sources = [SOURCELOWER_TAR_GZ] - -dependencies = [ - ('Python', '3.5.2'), - ('PCRE', '8.38'), -] - -moduleclass = 'devel' -- GitLab From 814fedbfabbe309c0019b59c5d7bee50129bf758 Mon Sep 17 00:00:00 2001 From: Markus Geimer Date: Tue, 27 Sep 2016 15:20:01 +0200 Subject: [PATCH 366/741] Consistently specify to use -fgnu89-inline flag in M4 1.4.17 easyconfigs --- easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb | 2 +- easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb | 2 +- easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb | 2 +- easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb | 2 +- easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb index 747a5dbe94..0f99148abf 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb @@ -13,7 +13,7 @@ toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] -configopts = "--enable-cxx" +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { 'files': ["bin/m4"], diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb index 434b6f02ff..76649c745f 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb @@ -16,7 +16,7 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.26', '', True)] -configopts = "--enable-cxx" +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { 'files': ["bin/m4"], diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb index 114b490972..dfad3c306d 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb @@ -16,7 +16,7 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.26', '', True)] -configopts = "--enable-cxx" +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { 'files': ["bin/m4"], diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb index 78e9122ea4..f82cf9fb58 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb @@ -16,7 +16,7 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCCcore builddependencies = [('binutils', '2.27', '', True)] -configopts = "--enable-cxx" +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { 'files': ["bin/m4"], diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb index 6f774b05e4..34226edcc2 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb @@ -16,7 +16,7 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.27', '', True)] -configopts = "--enable-cxx" +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { 'files': ["bin/m4"], -- GitLab From 281140476033d730a3f42be6cafddbfebc35a2f7 Mon Sep 17 00:00:00 2001 From: Markus Geimer Date: Tue, 27 Sep 2016 16:23:28 +0200 Subject: [PATCH 367/741] Add comment explaining why -fgnu89-inline is needed --- easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.06.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.11.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.7.2.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.2.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.4.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2-binutils-2.25.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-2.25.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-binutils-2.25.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.1.0-binutils-2.25.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.2.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.3.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.4.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.2-2.25.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.3-2.25.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-5.1.0-2.25.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2014b.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015a.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016a.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016b.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-gimkl-2.11.5.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.4.0.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.5.0.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-7.1.2.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2014b.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015a.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015b.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016.02-GCC-4.9.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016a.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016b.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17-intel-para-2014.12.eb | 2 ++ easybuild/easyconfigs/m/M4/M4-1.4.17.eb | 2 ++ 40 files changed, 80 insertions(+) diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.06.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.06.eb index 8398e40d06..54365e5c12 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.06.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.06.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'CrayGNU', 'version': '2015.06'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.11.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.11.eb index b84761b602..41431f6ed6 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.11.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-CrayGNU-2015.11.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'CrayGNU', 'version': '2015.11'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.7.2.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.7.2.eb index b4bb4c955d..91d64e5bd3 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.7.2.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.7.2.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GCC', 'version': '4.7.2'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.2.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.2.eb index 5df1dda5a3..cb0daa392f 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.2.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.2.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GCC', 'version': '4.8.2'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.4.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.4.eb index f406268a87..e59131c48f 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.4.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.8.4.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GCC', 'version': '4.8.4'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2-binutils-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2-binutils-2.25.eb index 560606e07a..c9b8ae162c 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2-binutils-2.25.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2-binutils-2.25.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2.eb index 00b1eb05a8..d52dd469f6 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.2.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GCC', 'version': '4.9.2'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-2.25.eb index a939e01023..5658dda837 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-2.25.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GCC', 'version': '4.9.3-2.25'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-binutils-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-binutils-2.25.eb index 64c98aad33..006446b9f0 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-binutils-2.25.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3-binutils-2.25.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3.eb index 745063ebad..e7a4d305fe 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-4.9.3.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GCC', 'version': '4.9.3'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.1.0-binutils-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.1.0-binutils-2.25.eb index a95ac9f601..6e2de92ed5 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.1.0-binutils-2.25.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.1.0-binutils-2.25.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb index 0f99148abf..ab63650383 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCC-5.4.0-2.26.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.2.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.2.eb index 5551b81d85..4a7f47d9bc 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.2.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.2.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS='-fgnu89-inline'" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.3.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.3.eb index 02f06d5cfe..72fbf1541b 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.3.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS='-fgnu89-inline'" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.4.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.4.eb index fa161623a1..83effb6682 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.4.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-4.9.4.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS='-fgnu89-inline'" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb index 76649c745f..d508b59ac7 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.3.0.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.26', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb index dfad3c306d..702e859518 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-5.4.0.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.26', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb index f82cf9fb58..87ca206fb4 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.1.0.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCCcore builddependencies = [('binutils', '2.27', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb index 34226edcc2..9a89ad1fbd 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GCCcore-6.2.0.eb @@ -16,6 +16,8 @@ source_urls = [GNU_SOURCE] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.27', '', True)] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.2-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.2-2.25.eb index 134d181212..9fd3840472 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.2-2.25.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.2-2.25.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GNU', 'version': '4.9.2-2.25'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.3-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.3-2.25.eb index 25f9aacace..222b4603e6 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-4.9.3-2.25.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GNU', 'version': '4.9.3-2.25'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-5.1.0-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-5.1.0-2.25.eb index 5ca90d16a7..8d48b94390 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-5.1.0-2.25.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-GNU-5.1.0-2.25.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'GNU', 'version': '5.1.0-2.25'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2014b.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2014b.eb index 4abe05a74f..4190871d6e 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2014b.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2014b.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'foss', 'version': '2014b'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015a.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015a.eb index f58173164e..6b8e25d1d4 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015a.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015a.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'foss', 'version': '2015a'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb index 6a7048dcf1..414bbac849 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015b.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'foss', 'version': '2015b'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb index ef1614fe9a..e93393c961 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016.04.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'foss', 'version': '2016.04'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016a.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016a.eb index ce563e7def..32fe2f7b78 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016a.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016a.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'foss', 'version': '2016a'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS='-fgnu89-inline'" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016b.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016b.eb index e7ea6f7b85..3d6737ba08 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016b.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2016b.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'foss', 'version': '2016b'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-gimkl-2.11.5.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-gimkl-2.11.5.eb index aa806c1087..04ba474daf 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-gimkl-2.11.5.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'gimkl', 'version': '2.11.5'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.4.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.4.0.eb index 304b160de5..ca3c0c7b6c 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.4.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.4.0.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'ictce', 'version': '5.4.0'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.5.0.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.5.0.eb index 46c1b375cb..e8ed91309a 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-5.5.0.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'ictce', 'version': '5.5.0'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-7.1.2.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-7.1.2.eb index 0289e6c40e..a896f05992 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-7.1.2.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-ictce-7.1.2.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'ictce', 'version': '7.1.2'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2014b.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2014b.eb index 857e1b9ffc..bd224278e8 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2014b.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2014b.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'intel', 'version': '2014b'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015a.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015a.eb index a805266216..942e49510c 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015a.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015a.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'intel', 'version': '2015a'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015b.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015b.eb index 6746b4b3a4..dbdac66931 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015b.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2015b.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'intel', 'version': '2015b'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016.02-GCC-4.9.eb index 899804b18f..683e8274c8 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016.02-GCC-4.9.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'intel', 'version': '2016.02-GCC-4.9'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016a.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016a.eb index 4472772492..2b9dd5a6b8 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016a.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016a.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'intel', 'version': '2016a'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016b.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016b.eb index a7e7ddf81e..d339ed79b8 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016b.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-2016b.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'intel', 'version': '2016b'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-para-2014.12.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-para-2014.12.eb index 104ad6a3bd..cda9d848b7 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-para-2014.12.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-para-2014.12.eb @@ -13,6 +13,8 @@ toolchain = {'name': 'intel-para', 'version': '2014.12'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17.eb index 2bc8d9c022..159d8d0173 100644 --- a/easybuild/easyconfigs/m/M4/M4-1.4.17.eb +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17.eb @@ -15,6 +15,8 @@ toolchain = {'name': 'dummy', 'version': 'dummy'} sources = [SOURCELOWER_TAR_GZ] source_urls = [GNU_SOURCE] +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" sanity_check_paths = { -- GitLab From 1b6456ea7722e1283d2ea252ce5dec4aa266918b Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Tue, 27 Sep 2016 16:43:27 +0200 Subject: [PATCH 368/741] add easyconfig PGDSpider-2.1.0.3-Java-1.7.0_80.eb --- .../PGDSpider-2.1.0.3-Java-1.7.0_80.eb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/p/PGDSpider/PGDSpider-2.1.0.3-Java-1.7.0_80.eb diff --git a/easybuild/easyconfigs/p/PGDSpider/PGDSpider-2.1.0.3-Java-1.7.0_80.eb b/easybuild/easyconfigs/p/PGDSpider/PGDSpider-2.1.0.3-Java-1.7.0_80.eb new file mode 100644 index 0000000000..4071bc769a --- /dev/null +++ b/easybuild/easyconfigs/p/PGDSpider/PGDSpider-2.1.0.3-Java-1.7.0_80.eb @@ -0,0 +1,34 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock='Tarball' + +name = "PGDSpider" +version = "2.1.0.3" +versionsuffix = "-Java-%(javaver)s" + +homepage = 'http://cmpg.unibe.ch/software/PGDSpider/' +description = """An automated data conversion tool for connecting population genetics and genomics programs""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = ['http://cmpg.unibe.ch/software/PGDSpider/'] +sources = ['%(name)s_%(version)s.zip'] + +dependencies = [ + ('Java', '1.7.0_80', '', True), +] + +sanity_check_paths = { + 'files': ['PGDSpider2-cli.jar', 'PGDSpider2.jar'], + 'dirs': [], +} + +modloadmsg = """ +To execute GUI run: java -Xmx1024m -Xms512m -jar \\$EBROOTPGDSPIDER/PGDSpider2.jar +To execute CLI run: java -Xmx1024m -Xms512m -jar \\$EBROOTPGDSPIDER/PGDSpider2-cli.jar +Adjust memory according to your requirements""" + +moduleclass = 'bio' -- GitLab From ea14cfea8fca9d104909a9b4e1dce5316be93a49 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Tue, 27 Sep 2016 16:43:46 +0200 Subject: [PATCH 369/741] add easyconfig SelEstim-1.1.4-Linux-64bits.eb --- .../s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb diff --git a/easybuild/easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb b/easybuild/easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb new file mode 100644 index 0000000000..7b46114c2f --- /dev/null +++ b/easybuild/easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb @@ -0,0 +1,35 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'Tarball' + +name = 'SelEstim' +version = '1.1.4' +versionsuffix = '-Linux-64bits' + +homepage = 'http://www1.montpellier.inra.fr/CBGP/software/selestim/index.html' +description = """SelEstim is aimed at distinguishing neutral from selected polymorphisms and estimate + the intensity of selection at the latter. The SelEstim model accounts explicitly for positive selection, + and it is assumed that all marker loci in the dataset are responding to selection, to some extent""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = ['http://www1.montpellier.inra.fr/CBGP/software/selestim/files/'] +sources = ['%(name)s_%(version)s.zip'] + +postinstallcmds = [ + "rm -fr %(installdir)s/__MACOSX/ ", + "mv %(installdir)s/SelEstim_%(version)s/* %(installdir)s ", + "rm %(installdir)s/bin/SelEstim_1.1.4_OSX64bits ", + "rm %(installdir)s/bin/SelEstim_1.1.4_Linux32bits ", + "cd %(installdir)s/bin/ && ln -s SelEstim_%(version)s_Linux64bits SelEstim ", +] + +sanity_check_paths = { + 'files': ['bin/SelEstim_%(version)s_Linux64bits'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From d2e75b4e8d04fc72531547a937aca3ce92e988e6 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Tue, 27 Sep 2016 16:44:08 +0200 Subject: [PATCH 370/741] add easyconfig BayPass-2.1-goolf-1.7.20.eb --- .../b/BayPass/BayPass-2.1-goolf-1.7.20.eb | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb b/easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb new file mode 100644 index 0000000000..c3aaee9173 --- /dev/null +++ b/easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb @@ -0,0 +1,39 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'MakeCp' + +name = 'BayPass' +version = '2.1' + +homepage = 'http://www1.montpellier.inra.fr/CBGP/software/baypass/index.html' +description = """BayPass is a population genomics software which is primarily aimed at identifying + genetic markers subjected to selection and/or associated to population-specific covariates + (e.g., environmental variables, quantitative or categorical phenotypic characteristics). + The underlying models explicitly account for (and may estimate) the covariance structure among the + population allele frequencies that originates from the shared history of the populations under study""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} + +source_urls = ['http://www1.montpellier.inra.fr/CBGP/software/baypass/files/'] +sources = ['%(namelower)s_%(version)s.tar.gz'] + +start_dir = 'sources' + +parallel = 1 + +files_to_copy = [(['sources/g_baypass'], 'bin/'), + 'BayPass_manual_2.1.pdf', + 'examples', + 'Licence_CeCILL-B_V1-en.txt', + 'utils' +] + +sanity_check_paths = { + 'files': ['bin/g_baypass'], + 'dirs': [] +} + +moduleclass = 'bio' -- GitLab From 5a532c11a3e8a425a4e2a3655df5e220666aa00c Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Tue, 27 Sep 2016 17:02:42 +0200 Subject: [PATCH 371/741] Dummy worker easyconfig This is a weird easyconfig, ignore it please. It builds worker with system gcc and perl yet depends on the toolchain as a build dep. --- .../w/worker/worker-1.6.7-intel-2016b.eb | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 easybuild/easyconfigs/w/worker/worker-1.6.7-intel-2016b.eb diff --git a/easybuild/easyconfigs/w/worker/worker-1.6.7-intel-2016b.eb b/easybuild/easyconfigs/w/worker/worker-1.6.7-intel-2016b.eb new file mode 100644 index 0000000000..f9fffe7804 --- /dev/null +++ b/easybuild/easyconfigs/w/worker/worker-1.6.7-intel-2016b.eb @@ -0,0 +1,65 @@ +easyblock = 'ConfigureMake' + +name = 'worker' +version = '1.6.7' + +homepage = 'https://github.com/gjbex/worker' +description = """The Worker framework has been developed to help deal with parameter exploration experiments + that would otherwise result in many jobs, forcing the user resort to scripting to retain her sanity; + see also https://vscentrum.be/neutral/documentation/cluster-doc/running-jobs/worker-framework.""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = ['https://github.com/gjbex/worker/archive/'] +sources = ['%(version)s.tar.gz'] + +tcname = 'intel' +tcver = '2016b' +builddependencies = [(tcname, tcver)] +versionsuffix = '-%s-%s' % (tcname, tcver) + +exts_defaultclass = 'PerlModule' + +exts_list = [ + ('Config::General', '2.61', { + 'source_tmpl': 'Config-General-2.61.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TL/TLINDEN'], + }), + ('IO::Stringy', '2.111', { + 'source_tmpl': 'IO-stringy-2.111.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DS/DSKOLL'], + }), + ('Text::CSV', '1.33', { + 'source_tmpl': 'Text-CSV-1.33.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MA/MAKAMAKA'], + }), + ('DBI', '1.636', { + 'source_tmpl': 'DBI-1.636.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TI/TIMB'], + }), + ('DBD::SQLite', '1.50', { + 'source_tmpl': 'DBD-SQLite-1.50.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI'], + }), + ('Date::Language', '2.30', { + 'source_tmpl': 'TimeDate-2.30.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GB/GBARR'], + }), +] + +modextrapaths = { + 'PERL5LIB': ['share/perl5', 'lib64/perl5'], +} + +# adjust worker configuration file +# note: tweak this to your local setup +postinstallcmds = [ + 'sed -i "s/ cores_per_node = .*/ cores_per_node = 16/g" %(installdir)s/conf/worker.conf', + 'sed -i "s@ qsub = .*@ qsub = `which qsub`@g" %(installdir)s/conf/worker.conf', + 'sed -i "s/ email = .*/ email = hpc-support@example.com/g" %(installdir)s/conf/worker.conf', + 'sed -i "s/ unload_modules = .*/ unload_modules = intel/g" %(installdir)s/conf/worker.conf', + 'sed -i "s@ mpi_module = .*@ mpi_module = %s/%s@g" %%(installdir)s/conf/worker.conf' % (tcname, tcver), + 'sed -i "s@ module_path = .*@ module_path = %(installdir)s/../../../modules/all@g" %(installdir)s/conf/worker.conf', +] + +moduleclass = 'tools' -- GitLab From a51d6217a425f50a94de4f0af71b03167cf54dc4 Mon Sep 17 00:00:00 2001 From: Sergey Paramonov Date: Tue, 27 Sep 2016 14:36:37 -0400 Subject: [PATCH 372/741] Update GCCcore-5.4.0.eb * added original source url for Integer Set Library (isl-0.15.tar.bz2) --- easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb index 5b9a17485e..ac9aa8567c 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL (isl-0.15.tar.bz2) dependency ] sources = [ -- GitLab From 3b116182315c2b3a9af74978c01e9ef3a7dae42a Mon Sep 17 00:00:00 2001 From: Pablo Escobar Lopez Date: Tue, 27 Sep 2016 23:05:52 +0200 Subject: [PATCH 373/741] style fix --- .../easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb b/easybuild/easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb index 7b46114c2f..7fd49e7b9f 100644 --- a/easybuild/easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb +++ b/easybuild/easyconfigs/s/SelEstim/SelEstim-1.1.4-Linux-64bits.eb @@ -21,9 +21,9 @@ sources = ['%(name)s_%(version)s.zip'] postinstallcmds = [ "rm -fr %(installdir)s/__MACOSX/ ", - "mv %(installdir)s/SelEstim_%(version)s/* %(installdir)s ", - "rm %(installdir)s/bin/SelEstim_1.1.4_OSX64bits ", - "rm %(installdir)s/bin/SelEstim_1.1.4_Linux32bits ", + "mv %(installdir)s/SelEstim_%(version)s/* %(installdir)s ", + "rm %(installdir)s/bin/SelEstim_1.1.4_OSX64bits ", + "rm %(installdir)s/bin/SelEstim_1.1.4_Linux32bits ", "cd %(installdir)s/bin/ && ln -s SelEstim_%(version)s_Linux64bits SelEstim ", ] -- GitLab From fea54b2a6f04ef9b7f3662de1edf106895198ad6 Mon Sep 17 00:00:00 2001 From: Markus Geimer Date: Wed, 28 Sep 2016 08:52:05 +0200 Subject: [PATCH 374/741] flex can be built in parallel --- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb | 2 -- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb | 2 -- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb | 2 -- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb | 2 -- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb | 2 -- easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb | 2 -- 6 files changed, 12 deletions(-) diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb index 155b9e6155..7890b40d70 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb @@ -19,6 +19,4 @@ dependencies = [ # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] -parallel = 1 - moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb index d1a9375e34..896d90dc34 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb @@ -19,6 +19,4 @@ dependencies = [ # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] -parallel = 1 - moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb index d5c3db995c..1c5de5599b 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb @@ -19,6 +19,4 @@ dependencies = [ # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.26', '', True)] -parallel = 1 - moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb index 2801060df2..2e2b6fd6cf 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb @@ -19,6 +19,4 @@ dependencies = [ # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.26', '', True)] -parallel = 1 - moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb index a0f6f0c641..8f2ab256cd 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb @@ -19,6 +19,4 @@ dependencies = [ # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.27', '', True)] -parallel = 1 - moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb index 239f478236..28fa3061c0 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb @@ -19,6 +19,4 @@ dependencies = [ # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.27', '', True)] -parallel = 1 - moduleclass = 'lang' -- GitLab From 7d62fe3c2d673e05213344c5c33ea95e84b771dc Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 28 Sep 2016 10:38:04 +0200 Subject: [PATCH 375/741] Added atools/1.4 --- .../atools-1.4-intel-2016b-Python-2.7.12.eb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 easybuild/easyconfigs/a/atools/atools-1.4-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/a/atools/atools-1.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/a/atools/atools-1.4-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..72ce8bce28 --- /dev/null +++ b/easybuild/easyconfigs/a/atools/atools-1.4-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'atools' +version = '1.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/gjbex/atools' +description = """Tools to make using job arrays a lot more convenient.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['https://github.com/gjbex/atools/archive'] + +builddependencies = [('Autotools', '20150215')] + +dependencies = [('Python', '2.7.12')] + +preconfigopts = 'autoreconf -v -f && ' + +sanity_check_paths = { + 'files': ['bin/aenv', 'bin/alog', 'bin/arange'], + 'dirs': ['lib/vsc/atools'] +} + +moduleclass = 'tools' -- GitLab From 064c17eae2b16d2d24c008de25aabe886851fb50 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 28 Sep 2016 14:32:04 +0200 Subject: [PATCH 376/741] scikit-learn bump to 0.18 --- ...it-learn-0.18-intel-2016b-Python-2.7.12.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.18-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.18-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.18-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..cedad0e0ae --- /dev/null +++ b/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.18-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,30 @@ +easyblock = 'PythonPackage' + +name = 'scikit-learn' +version = '0.18' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://scikit-learn.org/stable/index.html' +description = """Scikit-learn integrates machine learning algorithms in the tightly-knit scientific Python world, +building upon numpy, scipy, and matplotlib. As a machine-learning module, +it provides versatile tools for data mining and analysis in any field of science and engineering. +It strives to be simple and efficient, accessible to everybody, and reusable in various contexts.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('matplotlib', '1.5.1', versionsuffix), +] + +options = {'modulename': 'sklearn'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/sklearn'], +} + +moduleclass = 'data' -- GitLab From 588edbbf43a8fac770fcb78d186a8412fe355471 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 29 Sep 2016 10:21:24 +0200 Subject: [PATCH 377/741] Add FDS/6.5.2 --- .../f/FDS/FDS-6.5.2-intel-2016b.eb | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 easybuild/easyconfigs/f/FDS/FDS-6.5.2-intel-2016b.eb diff --git a/easybuild/easyconfigs/f/FDS/FDS-6.5.2-intel-2016b.eb b/easybuild/easyconfigs/f/FDS/FDS-6.5.2-intel-2016b.eb new file mode 100644 index 0000000000..477d5d84f2 --- /dev/null +++ b/easybuild/easyconfigs/f/FDS/FDS-6.5.2-intel-2016b.eb @@ -0,0 +1,40 @@ +easyblock = 'ConfigureMake' + +name = 'FDS' +version = '6.5.2' + +homepage = 'https://pages.nist.gov/fds-smv/' +description = """Fire Dynamics Simulator (FDS) is a large-eddy simulation (LES) code for low-speed flows, + with an emphasis on smoke and heat transport from fires.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True, 'usempi': True} + +source_urls = ['https://github.com/firemodels/fds/archive/'] +sources = ['Git-r21.tar.gz'] + +patches = ['FDS-r18915_makefile.patch'] + +unpack_options = '--strip-components=1' + +start_dir = 'FDS_Compilation' + +# just run make in the install dir +skipsteps = ['configure', 'install'] +buildininstalldir = True + +target = 'mpi_intel_linux_64' +buildopts = '%s FFLAGS="$FFLAGS -fpp" FCOMPL="$FC"' % target + +postinstallcmds = ["ln -s %%(installdir)s/FDS_Compilation/fds_%s %%(installdir)s/FDS_Compilation/fds" % target] + +modextrapaths = {'PATH': 'FDS_Compilation'} + +sanity_check_paths = { + 'files': ['FDS_Compilation/fds'], + 'dirs': [], +} + +sanity_check_commands = [("fds 2>&1 | grep 'MPI Enabled;'", '')] + +moduleclass = 'phys' -- GitLab From 1a2c860d2a4566d0ac2d486941d5bd764101921d Mon Sep 17 00:00:00 2001 From: Pablo Escobar Lopez Date: Thu, 29 Sep 2016 12:25:11 +0200 Subject: [PATCH 378/741] use version template --- easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb b/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb index 102136d546..3a71d722f0 100644 --- a/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb +++ b/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb @@ -20,7 +20,7 @@ source_urls = ['http://kimura.univ-montp2.fr/PopPhyl/resources/tools/'] sources = ['%(namelower)s_%(version)s.zip'] sanity_check_paths = { - 'files': ['reads2snp_2.0.64.bin'], + 'files': ['reads2snp_%(version)s.64.bin'], 'dirs': [], } -- GitLab From ff5f258397cd90c7811c84d384a179650d1c93ec Mon Sep 17 00:00:00 2001 From: Pablo Escobar Lopez Date: Thu, 29 Sep 2016 12:26:25 +0200 Subject: [PATCH 379/741] removed the chmod -x for the 32 bits version --- easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb | 3 --- 1 file changed, 3 deletions(-) diff --git a/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb b/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb index 3a71d722f0..506890dce2 100644 --- a/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb +++ b/easybuild/easyconfigs/r/Reads2snp/Reads2snp-2.0.eb @@ -28,7 +28,4 @@ modextrapaths = { 'PATH': "", # add the installation dir to PATH } -# disable exec permission for the provided 32 bits binary -postinstallcmds = ['chmod -x %(installdir)s/reads2snp_%(version)s.32.bin'] - moduleclass = 'bio' -- GitLab From d7660f8041eaf32c724da64e20825203f674bab7 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 29 Sep 2016 13:37:29 +0200 Subject: [PATCH 380/741] Use newer version with bugfixes --- ...-2.7.12.eb => atools-1.4.1-intel-2016b-Python-2.7.12.eb} | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) rename easybuild/easyconfigs/a/atools/{atools-1.4-intel-2016b-Python-2.7.12.eb => atools-1.4.1-intel-2016b-Python-2.7.12.eb} (82%) diff --git a/easybuild/easyconfigs/a/atools/atools-1.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/a/atools/atools-1.4.1-intel-2016b-Python-2.7.12.eb similarity index 82% rename from easybuild/easyconfigs/a/atools/atools-1.4-intel-2016b-Python-2.7.12.eb rename to easybuild/easyconfigs/a/atools/atools-1.4.1-intel-2016b-Python-2.7.12.eb index 72ce8bce28..990feda7cf 100644 --- a/easybuild/easyconfigs/a/atools/atools-1.4-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/a/atools/atools-1.4.1-intel-2016b-Python-2.7.12.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'atools' -version = '1.4' +version = '1.4.1' versionsuffix = '-Python-%(pyver)s' homepage = 'https://github.com/gjbex/atools' @@ -12,12 +12,8 @@ toolchain = {'name': 'intel', 'version': '2016b'} sources = [SOURCE_TAR_GZ] source_urls = ['https://github.com/gjbex/atools/archive'] -builddependencies = [('Autotools', '20150215')] - dependencies = [('Python', '2.7.12')] -preconfigopts = 'autoreconf -v -f && ' - sanity_check_paths = { 'files': ['bin/aenv', 'bin/alog', 'bin/arange'], 'dirs': ['lib/vsc/atools'] -- GitLab From c0689e183458a437e5b26fd910784e0ee11ce66e Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 29 Sep 2016 14:57:41 +0200 Subject: [PATCH 381/741] ea-utils with foss2016a --- .../e/ea-utils/ea-utils-27a4809-foss-2016a.eb | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016a.eb diff --git a/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016a.eb b/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016a.eb new file mode 100644 index 0000000000..305396e578 --- /dev/null +++ b/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016a.eb @@ -0,0 +1,42 @@ +easyblock = 'MakeCp' + +name = 'ea-utils' +version = '27a4809' + +homepage = 'https://code.google.com/p/ea-utils/' +description = """Command-line tools for processing biological sequencing data. +Barcode demultiplexing, adapter trimming, etc. + +Primarily written to support an Illumina based pipeline - +but should work with any FASTQs.""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['https://github.com/ExpressionAnalysis/%(name)s/tarball/master'] +sources = [SOURCE_TGZ] + +checksums = ['45eef4b040f83abe2c9f51d4a7d18271'] + +start_dir = 'clipper' + +prebuildopts = "sed -i 's/$(CFLAGS)/$(CFLAGS) $(LDFLAGS) -I./' Makefile && PREFIX=%(installdir)s " +buildopts = 'fastq-mcf fastq-multx fastq-join fastq-stats fastq-clipper sam-stats varcall' + +builddependencies = [ + ('Perl', '5.22.1'), +] + +dependencies = [ + ('GSL', '2.1'), +] + +files_to_copy = [(['fastq-mcf', 'fastq-multx', 'fastq-join', 'fastq-stats', 'fastq-clipper', 'sam-stats', 'varcall', 'randomFQ', 'alc', 'determine-phred'], 'bin')] + + +sanity_check_paths = { + 'files': ['bin/fastq-mcf', 'bin/fastq-multx', 'bin/fastq-join', 'bin/fastq-stats', 'bin/fastq-clipper', 'bin/sam-stats', 'bin/varcall'], + 'dirs': [] +} + +moduleclass = 'bio' \ No newline at end of file -- GitLab From d0574b31f92bcf81384204b230b747302f7fcfd2 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Thu, 29 Sep 2016 15:01:32 +0200 Subject: [PATCH 382/741] long lines --- .../e/ea-utils/ea-utils-27a4809-foss-2016a.eb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016a.eb b/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016a.eb index 305396e578..7cf3821ef3 100644 --- a/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016a.eb +++ b/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016a.eb @@ -31,11 +31,17 @@ dependencies = [ ('GSL', '2.1'), ] -files_to_copy = [(['fastq-mcf', 'fastq-multx', 'fastq-join', 'fastq-stats', 'fastq-clipper', 'sam-stats', 'varcall', 'randomFQ', 'alc', 'determine-phred'], 'bin')] +files_to_copy = [([ + 'fastq-mcf', 'fastq-multx', 'fastq-join', 'fastq-stats', 'fastq-clipper', + 'sam-stats', 'varcall', 'randomFQ', 'alc', 'determine-phred'], 'bin' +)] sanity_check_paths = { - 'files': ['bin/fastq-mcf', 'bin/fastq-multx', 'bin/fastq-join', 'bin/fastq-stats', 'bin/fastq-clipper', 'bin/sam-stats', 'bin/varcall'], + 'files': [ + 'bin/fastq-mcf', 'bin/fastq-multx', 'bin/fastq-join', 'bin/fastq-stats', + 'bin/fastq-clipper', 'bin/sam-stats', 'bin/varcall' + ], 'dirs': [] } -- GitLab From 9da2ed856a9f371e88ae964c778f4227b8bea6ea Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 29 Sep 2016 15:59:18 +0200 Subject: [PATCH 383/741] Extra version bump to include missing makefile.in --- ...thon-2.7.12.eb => atools-1.4.2-intel-2016b-Python-2.7.12.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/a/atools/{atools-1.4.1-intel-2016b-Python-2.7.12.eb => atools-1.4.2-intel-2016b-Python-2.7.12.eb} (96%) diff --git a/easybuild/easyconfigs/a/atools/atools-1.4.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/a/atools/atools-1.4.2-intel-2016b-Python-2.7.12.eb similarity index 96% rename from easybuild/easyconfigs/a/atools/atools-1.4.1-intel-2016b-Python-2.7.12.eb rename to easybuild/easyconfigs/a/atools/atools-1.4.2-intel-2016b-Python-2.7.12.eb index 990feda7cf..3f41851d67 100644 --- a/easybuild/easyconfigs/a/atools/atools-1.4.1-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/a/atools/atools-1.4.2-intel-2016b-Python-2.7.12.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'atools' -version = '1.4.1' +version = '1.4.2' versionsuffix = '-Python-%(pyver)s' homepage = 'https://github.com/gjbex/atools' -- GitLab From 6f07b0f101826b36fbdcb3995f0157f42aef2efe Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 30 Sep 2016 09:38:39 +0200 Subject: [PATCH 384/741] fix source URLs for Cython --- easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb | 3 ++- easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb | 3 ++- easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb | 3 ++- easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb | 3 ++- easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb | 3 ++- easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb | 3 ++- easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb | 3 ++- easybuild/easyconfigs/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-cgoolf-1.1.7.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-foss-2015b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-gmpolf-1.4.8.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.4.10.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.5.14.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.1.13.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.2.0.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.3.0.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-intel-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-iomkl-4.6.13.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.3-iqacml-3.7.3.eb | 2 +- .../easyconfigs/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.5-goolf-1.4.10.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-4.1.13.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.3.0.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.5.0.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.5-iqacml-3.7.3.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.6-goolf-1.4.10.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-4.1.13.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-5.5.0.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.8-foss-2014b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.8-goolf-1.5.14.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.8-ictce-7.1.2.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014.06.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.06.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.11.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb | 2 +- easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb | 2 +- .../easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.2.3-goolf-1.4.10.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-5.3.0.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2014b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2015a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.4.3-intel-2015a.eb | 3 ++- easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb | 2 +- easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb | 2 +- 59 files changed, 67 insertions(+), 59 deletions(-) diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb index 1d651d49d1..f325e4238c 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015a.eb @@ -67,7 +67,8 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.22', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], + 'source_tmpl': 'cython-%(version)s.tar.gz', }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb index 2247b6ef92..1ba18083e7 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-foss-2015b.eb @@ -67,7 +67,8 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.22', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], + 'source_tmpl': 'cython-%(version)s.tar.gz', }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb index 74123d2915..e615c89354 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-gimkl-2.11.5.eb @@ -66,7 +66,8 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.22', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], + 'source_tmpl': 'cython-%(version)s.tar.gz', }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb index 803575d935..7d445cd6ba 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.4.10.eb @@ -67,7 +67,8 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.22', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], + 'source_tmpl': 'cython-%(version)s.tar.gz', }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb index 894b701f69..55f10df08f 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-goolf-1.7.20.eb @@ -67,7 +67,8 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.22', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], + 'source_tmpl': 'cython-%(version)s.tar.gz', }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb index 3d970938c9..017e1ecaae 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015a.eb @@ -67,7 +67,8 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.22', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], + 'source_tmpl': 'cython-%(version)s.tar.gz', }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb index 8b5d70e944..276aa8a0f3 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.10-intel-2015b.eb @@ -66,7 +66,8 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.22', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], + 'source_tmpl': 'cython-%(version)s.tar.gz', }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb index 458773a19c..1837c2a90e 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb index 8847eb716a..9adcb16dd0 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb @@ -55,7 +55,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb index 8721ba5f0a..9f64cf9e32 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgoolf-1.1.7.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-cgoolf-1.1.7.eb index feaf2e76ec..6c61e020b7 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgoolf-1.1.7.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-cgoolf-1.1.7.eb @@ -55,7 +55,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-foss-2015b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-foss-2015b.eb index 7bff359058..c93dab2804 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-foss-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-foss-2015b.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmpolf-1.4.8.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-gmpolf-1.4.8.eb index 6bbc4316af..f07bce51db 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmpolf-1.4.8.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-gmpolf-1.4.8.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12.eb index b671309381..0b81650489 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb index 383cedbc17..0bca041c4c 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb index ffaa43d1ef..a72f677c7d 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.4.10.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.4.10.eb index b20ffd67fb..53cdae92ab 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.4.10.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.5.14.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.5.14.eb index e087117a23..4cd83e24d0 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.5.14.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-goolf-1.5.14.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb index 04f049367b..0b9eaa28a2 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.1.13.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.1.13.eb index f3c7ccd43d..31b3323fc1 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.1.13.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.1.13.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.2.0.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.2.0.eb index 65a7050c90..2608210a17 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.2.0.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.2.0.eb @@ -55,7 +55,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.3.0.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.3.0.eb index caf683b0c8..4ffdd56f78 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-5.3.0.eb @@ -55,7 +55,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-intel-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-intel-2015a.eb index a68ef18929..35bbb97553 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-intel-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-intel-2015a.eb @@ -55,7 +55,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-iomkl-4.6.13.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-iomkl-4.6.13.eb index b36520e7e8..367298ed3a 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-iomkl-4.6.13.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-iomkl-4.6.13.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-iqacml-3.7.3.eb b/easybuild/easyconfigs/p/Python/Python-2.7.3-iqacml-3.7.3.eb index 3806ea6dd7..32d5421553 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.3-iqacml-3.7.3.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.3-iqacml-3.7.3.eb @@ -61,7 +61,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb index e8290ac41a..ad8c5d8317 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb @@ -55,7 +55,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-goolf-1.4.10.eb b/easybuild/easyconfigs/p/Python/Python-2.7.5-goolf-1.4.10.eb index 577653d1f5..d2f51e3f22 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.5-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.5-goolf-1.4.10.eb @@ -58,7 +58,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-4.1.13.eb b/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-4.1.13.eb index 45b1ca6a64..648ac1994a 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-4.1.13.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-4.1.13.eb @@ -60,7 +60,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.3.0.eb b/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.3.0.eb index 33dce6f6ca..c0ac0d38b1 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.3.0.eb @@ -58,7 +58,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.5.0.eb b/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.5.0.eb index 0a01b973a0..513384d5b5 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-5.5.0.eb @@ -58,7 +58,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-iqacml-3.7.3.eb b/easybuild/easyconfigs/p/Python/Python-2.7.5-iqacml-3.7.3.eb index f5d6db6b40..09835cdeb7 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.5-iqacml-3.7.3.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.5-iqacml-3.7.3.eb @@ -62,7 +62,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.17.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.1.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.6-goolf-1.4.10.eb b/easybuild/easyconfigs/p/Python/Python-2.7.6-goolf-1.4.10.eb index bccfcbf0c2..95ff34f3f9 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.6-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.6-goolf-1.4.10.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.19.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.4.1', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-4.1.13.eb b/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-4.1.13.eb index 146417325f..d289934164 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-4.1.13.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-4.1.13.eb @@ -60,7 +60,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.19.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.4.1', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-5.5.0.eb b/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-5.5.0.eb index a51d51c986..055543dc24 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-5.5.0.eb @@ -60,7 +60,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.19.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.4.1', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.8-foss-2014b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.8-foss-2014b.eb index 16590efbbd..0409f54975 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.8-foss-2014b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.8-foss-2014b.eb @@ -57,7 +57,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.20.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.7.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.8-goolf-1.5.14.eb b/easybuild/easyconfigs/p/Python/Python-2.7.8-goolf-1.5.14.eb index c8491023d8..2a90fee410 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.8-goolf-1.5.14.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.8-goolf-1.5.14.eb @@ -66,7 +66,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.20.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('dateutil', '2.2', { 'source_tmpl': 'python-%(name)s-%(version)s.tar.gz', diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.8-ictce-7.1.2.eb b/easybuild/easyconfigs/p/Python/Python-2.7.8-ictce-7.1.2.eb index a7caba4fae..d975d85c2d 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.8-ictce-7.1.2.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.8-ictce-7.1.2.eb @@ -67,7 +67,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.20.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.7.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014.06.eb b/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014.06.eb index dfe5979c7c..dca27371ed 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014.06.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014.06.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.20.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.7.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014b.eb index 54121e1a6f..a7d56bba16 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2014b.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.20.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.7.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2015a.eb index 012b08cef6..6b2fccea28 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.8-intel-2015a.eb @@ -61,7 +61,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.20.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.7.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.06.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.06.eb index 21613bcfb7..2c98486b92 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.06.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.06.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.11.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.11.eb index 9958308892..23449c0834 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.11.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-CrayGNU-2015.11.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb index f6e75ecf53..5ca1dda84e 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015.05.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb index d693b53480..b636f6b2ef 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015a.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb index 62fde498fb..82282d02d9 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-foss-2015b.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb index 39cc28b030..987f0852f6 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.14.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb index fc6fced509..37abf12093 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.5.16.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb index 09da0c6f20..7bdd55756a 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-goolf-1.7.20.eb @@ -64,7 +64,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb b/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb index 82f1c9fdc5..24081c5cf8 100644 --- a/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-2.7.9-intel-2015a.eb @@ -65,7 +65,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.21.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb index 9282981b3f..ae3c7ddc7a 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb @@ -49,7 +49,7 @@ exts_list = [ 'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'], }), ('Cython', '0.19.1', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('deap', '0.9.1', { 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-goolf-1.4.10.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-goolf-1.4.10.eb index 98e26ec9ef..fc5033662d 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-goolf-1.4.10.eb @@ -49,7 +49,7 @@ exts_list = [ 'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'], }), ('Cython', '0.19.1', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('deap', '0.9.1', { 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb index b110143efd..f10e1b0d7d 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb @@ -51,7 +51,7 @@ exts_list = [ 'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'], }), ('Cython', '0.19.1', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('deap', '0.9.1', { 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-5.3.0.eb b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-5.3.0.eb index 4bc546cccb..1fe945390a 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-5.3.0.eb @@ -49,7 +49,7 @@ exts_list = [ 'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'], }), ('Cython', '0.19.1', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('deap', '0.9.1', { 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2014b.eb b/easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2014b.eb index 66630e9980..ba9c2f40b2 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2014b.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2014b.eb @@ -66,7 +66,7 @@ exts_list = [ 'checksums': ['ce61468d4c1263e3005737bbed2641f0'], }), ('Cython', '0.20.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.7.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2015a.eb b/easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2015a.eb index d93f95e46a..910cb21e5c 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.4.1-intel-2015a.eb @@ -66,7 +66,7 @@ exts_list = [ 'checksums': ['ce61468d4c1263e3005737bbed2641f0'], }), ('Cython', '0.20.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.7.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.4.3-intel-2015a.eb b/easybuild/easyconfigs/p/Python/Python-3.4.3-intel-2015a.eb index f8a3851092..8f08cf73e4 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.4.3-intel-2015a.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.4.3-intel-2015a.eb @@ -63,7 +63,8 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.22', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], + 'source_tmpl': 'cython-%(version)s.tar.gz', }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb b/easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb index 40ab1396ff..825c8e6b10 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.0-intel-2015b.eb @@ -66,7 +66,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.23.2', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.9.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb b/easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb index c0d918fab2..129c326cbb 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.1-foss-2016a.eb @@ -66,7 +66,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.23.4', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.10.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], diff --git a/easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb b/easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb index bb39588cab..395e40515b 100644 --- a/easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb +++ b/easybuild/easyconfigs/p/Python/Python-3.5.1-intel-2016a.eb @@ -70,7 +70,7 @@ exts_list = [ 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], }), ('Cython', '0.23.4', { - 'source_urls': ['http://www.cython.org/release/'], + 'source_urls': ['https://pypi.python.org/packages/source/C/Cython/'], }), ('six', '1.10.0', { 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], -- GitLab From 9b05b21cbafe9536da04efdaee56b9a600fd2c83 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 30 Sep 2016 15:10:25 +0200 Subject: [PATCH 385/741] {data} [intel/2016b] PostgreSQL/9.6 --- ...tgreSQL-9.6.0-intel-2016b-Python-2.7.12.eb | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 easybuild/easyconfigs/p/PostgreSQL/PostgreSQL-9.6.0-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/p/PostgreSQL/PostgreSQL-9.6.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/PostgreSQL/PostgreSQL-9.6.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..a1b0d0ba13 --- /dev/null +++ b/easybuild/easyconfigs/p/PostgreSQL/PostgreSQL-9.6.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,44 @@ +easyblock = 'ConfigureMake' + +name = 'PostgreSQL' +version = '9.6.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.mysql.com/' +description = """PostgreSQL is a powerful, open source object-relational database system. + It is fully ACID compliant, has full support for foreign keys, + joins, views, triggers, and stored procedures (in multiple languages). + It includes most SQL:2008 data types, including INTEGER, + NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. + It also supports storage of binary large objects, including pictures, + sounds, or video. It has native programming interfaces for C/C++, Java, + .Net, Perl, Python, Ruby, Tcl, ODBC, among others, and exceptional documentation.""" + +source_urls = ['http://ftp.postgresql.org/pub/source/v%(version)s/'] +sources = [SOURCELOWER_TAR_GZ] + +toolchain = {'name': 'intel', 'version': '2016b'} + +osdependencies = [('openssl-devel', 'libssl-dev')] + +dependencies = [ + ('libreadline', '6.3'), + ('zlib', '1.2.8'), + ('Python', '2.7.12'), + # ('OpenSSL', '1.0.1i'), # OS dependency should be preferred for security reasons +] + +builddependencies = [ + ('Bison', '3.0.4'), + ('flex', '2.6.0'), + ('Perl', '5.24.0'), +] + +configopts = '--with-python --with-openssl' + +sanity_check_paths = { + 'files': ['bin/psql', 'bin/pg_config', 'lib/libpq.a', 'lib/libpq.%s' % SHLIB_EXT], + 'dirs': ['share/postgresql'], +} + +moduleclass = 'data' -- GitLab From 0b0b3d97ab4090fb03b4c76b3adbfdb6e493dd85 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 30 Sep 2016 17:16:39 +0200 Subject: [PATCH 386/741] {numlib} [intel/2016b] FGSL/1.10 --- .../f/FGSL/FGSL-1.10-intel-2016b.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb diff --git a/easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb b/easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb new file mode 100644 index 0000000000..de3d855375 --- /dev/null +++ b/easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'FGSL' +version = '1.1.0' + +homepage = 'https://www.lrz.de/services/software/mathematik/gsl/fortran/' +description = """FGSL: A Fortran interface to the GNU Scientific Library""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/reinh-bader/fgsl/archive/'] + +dependencies = [('GSL', '2.1')] + +builddependencies = [ + ('Autotools', '20150215'), + ('pkg-config', '0.29.1'), +] + +preconfigopts = 'autoreconf -fvi && ' + +runtest = 'check' + +sanity_check_paths = { + 'files': ['libfgsl.%s' % SHLIB_EXT, 'libfgsl.a'], + 'dirs': ['include/fgsl', 'lib/pkgconfig'] +} + +moduleclass = 'numlib' -- GitLab From eb5af1122d14dc56039aec45bcafea5fb2f89c65 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 30 Sep 2016 17:25:21 +0200 Subject: [PATCH 387/741] Correct sanity check --- easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb b/easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb index de3d855375..e06458da7e 100644 --- a/easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb +++ b/easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb @@ -23,7 +23,7 @@ preconfigopts = 'autoreconf -fvi && ' runtest = 'check' sanity_check_paths = { - 'files': ['libfgsl.%s' % SHLIB_EXT, 'libfgsl.a'], + 'files': ['lib/libfgsl.%s' % SHLIB_EXT, 'lib/libfgsl.a'], 'dirs': ['include/fgsl', 'lib/pkgconfig'] } -- GitLab From edd7c3ef28439923c962b9a017e7e7711b7b5e3c Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 30 Sep 2016 17:26:18 +0200 Subject: [PATCH 388/741] Correct name --- .../FGSL/{FGSL-1.10-intel-2016b.eb => FGSL-1.1.0-intel-2016b.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/f/FGSL/{FGSL-1.10-intel-2016b.eb => FGSL-1.1.0-intel-2016b.eb} (100%) diff --git a/easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb b/easybuild/easyconfigs/f/FGSL/FGSL-1.1.0-intel-2016b.eb similarity index 100% rename from easybuild/easyconfigs/f/FGSL/FGSL-1.10-intel-2016b.eb rename to easybuild/easyconfigs/f/FGSL/FGSL-1.1.0-intel-2016b.eb -- GitLab From 4220a0392301dfaae03b9249455b90a795832e24 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 30 Sep 2016 17:28:50 +0200 Subject: [PATCH 389/741] {vis} [intel/2016b] ImageMagick/7.0.3-1 --- .../ImageMagick-7.0.3-1-intel-2016b.eb | 41 +++++++++++++++++++ .../l/LittleCMS/LittleCMS-2.8-intel-2016b.eb | 23 +++++++++++ 2 files changed, 64 insertions(+) create mode 100644 easybuild/easyconfigs/i/ImageMagick/ImageMagick-7.0.3-1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/l/LittleCMS/LittleCMS-2.8-intel-2016b.eb diff --git a/easybuild/easyconfigs/i/ImageMagick/ImageMagick-7.0.3-1-intel-2016b.eb b/easybuild/easyconfigs/i/ImageMagick/ImageMagick-7.0.3-1-intel-2016b.eb new file mode 100644 index 0000000000..f3c4211e84 --- /dev/null +++ b/easybuild/easyconfigs/i/ImageMagick/ImageMagick-7.0.3-1-intel-2016b.eb @@ -0,0 +1,41 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Ravi Tripathi +# Email: ravi89@uab.edu + +easyblock = 'ConfigureMake' + +name = 'ImageMagick' +version = '7.0.3-1' + +homepage = 'http://www.imagemagick.org/' +description = """ImageMagick is a software suite to create, edit, compose, or convert bitmap images""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCE_TAR_XZ] +source_urls = ['http://www.imagemagick.org/download'] + +dependencies = [ + ('bzip2', '1.0.6'), + ('X11', '20160819'), + ('Ghostscript', '9.19'), + ('JasPer', '1.900.1'), + ('libjpeg-turbo', '1.5.0'), + ('LibTIFF', '4.0.6'), + ('LittleCMS', '2.8'), +] + +builddependencies = [ + ('pkg-config', '0.29.1'), +] + +configopts = "--with-gslib --with-x" + +sanity_check_paths = { + 'files': [], + 'dirs': ['bin', 'etc/%(name)s-%(version_major)s', 'include/%(name)s-%(version_major)s', 'lib', 'share'], +} + +modextravars = {'MAGICK_HOME': '%(installdir)s'} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/l/LittleCMS/LittleCMS-2.8-intel-2016b.eb b/easybuild/easyconfigs/l/LittleCMS/LittleCMS-2.8-intel-2016b.eb new file mode 100644 index 0000000000..738095618f --- /dev/null +++ b/easybuild/easyconfigs/l/LittleCMS/LittleCMS-2.8-intel-2016b.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'LittleCMS' +version = '2.8' + +homepage = 'http://www.littlecms.com/' +description = """ Little CMS intends to be an OPEN SOURCE small-footprint color management engine, + with special focus on accuracy and performance. """ + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://sourceforge.net/projects/lcms/files/lcms/%(version)s/'] +sources = ['lcms2-%(version)s.tar.gz'] + +dependencies = [('libjpeg-turbo', '1.5.0')] + +sanity_check_paths = { + 'files': ['bin/jpgicc', 'bin/linkicc', 'bin/psicc', 'bin/transicc', 'include/lcms2.h', 'include/lcms2_plugin.h', + 'lib/liblcms2.a', 'lib/liblcms2.%s' % SHLIB_EXT, 'lib/pkgconfig/lcms2.pc'], + 'dirs': ['share/man'], +} + +moduleclass = 'vis' -- GitLab From 44bd3c4bb464c2a789e2402ea8738546a73fb3af Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 4 Oct 2016 14:44:44 +0200 Subject: [PATCH 390/741] patch for failing pdflatex tests --- ... Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb} | 5 ++++- ...> Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb} | 5 ++++- .../Sphinx-1.4.6-pdflatex_failing_tests.patch | 20 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) rename easybuild/easyconfigs/s/Sphinx/{Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb => Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb} (97%) rename easybuild/easyconfigs/s/Sphinx/{Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb => Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb} (96%) create mode 100644 easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-pdflatex_failing_tests.patch diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb similarity index 97% rename from easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb rename to easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb index edf98e8d1e..864c3dcd54 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb @@ -1,7 +1,7 @@ easyblock = 'Bundle' name = 'Sphinx' -version = '1.4.5' +version = '1.4.6' versionsuffix = '-Python-%(pyver)s' homepage = 'http://sphinx.pocoo.org/' @@ -21,6 +21,9 @@ dependencies = [ ('requests', '2.10.0', versionsuffix), ] +patches = [ + 'failing_tests.patch' +] exts_list = [ ('imagesize', '0.7.1', { diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb similarity index 96% rename from easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb rename to easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb index f608175b73..b334e2de65 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.5-foss-2016a-Python-3.5.1.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb @@ -1,7 +1,7 @@ easyblock = 'Bundle' name = 'Sphinx' -version = '1.4.5' +version = '1.4.6' versionsuffix = '-Python-%(pyver)s' homepage = 'http://sphinx.pocoo.org/' @@ -21,6 +21,9 @@ dependencies = [ ('requests', '2.10.0', versionsuffix), ] +patches = [ + '%(name)s-%(version)s-pdflatex_failing_tests.patch' +] exts_list = [ ('imagesize', '0.7.1', { diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-pdflatex_failing_tests.patch b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-pdflatex_failing_tests.patch new file mode 100644 index 0000000000..437e040640 --- /dev/null +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-pdflatex_failing_tests.patch @@ -0,0 +1,20 @@ +pdflatex and latex tests fail on systems that have older versions installed +Author: Ruben van Dijk (University of Groningen) +--- Makefile.orig 2016-10-04 14:15:46.000000000 +0200 ++++ Makefile 2016-10-04 14:37:19.000000000 +0200 +@@ -64,8 +64,14 @@ + reindent: + @$(PYTHON) utils/reindent.py -r -n . + ++# Failing tests, py35 was already excluded. ++DONT_TEST = -I py35 \ ++ -I latex \ ++ -I typing_test_data \ ++ -I ext_math ++ + test: +- @cd tests; $(PYTHON) run.py -I py35 -d -m '^[tT]est' $(TEST) ++ @cd tests; $(PYTHON) run.py $(DONT_TEST) -d #-m '^[tT]est' $(TEST) + + test-async: + @cd tests; $(PYTHON) run.py -d -m '^[tT]est' $(TEST) -- GitLab From 46d4707017c7efaa4e5bd86e7088824c9e930b2d Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 4 Oct 2016 14:46:33 +0200 Subject: [PATCH 391/741] rename patch in sphinx-2.7.11 --- .../s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb index 864c3dcd54..8099523d58 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb @@ -22,7 +22,7 @@ dependencies = [ ] patches = [ - 'failing_tests.patch' + '%(name)s-%(version)s-pdflatex_failing_tests.patch' ] exts_list = [ -- GitLab From 80d96d442bdcffabcb8505222851804259edef20 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Tue, 4 Oct 2016 14:47:06 +0200 Subject: [PATCH 392/741] omit newline --- .../p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyconfigs/p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb index d1cd521edb..85869f21ea 100644 --- a/easybuild/easyconfigs/p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb +++ b/easybuild/easyconfigs/p/Pygments/Pygments-2.1.3-foss-2016a-Python-3.5.1.eb @@ -13,7 +13,6 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] - dependencies = [ ('Python', '3.5.1'), ] -- GitLab From 8ac426ebbaad4a55600905316877fd35ea411565 Mon Sep 17 00:00:00 2001 From: Eliot Eshelman Date: Wed, 24 Aug 2016 21:08:08 -0400 Subject: [PATCH 393/741] Add a toolchain for foss/2016a + NVIDIA CUDA 7.5 --- .../c/CUDA/CUDA-7.5.18-GCC-4.9.3-2.25.eb | 33 ++++++++++++ .../f/FFTW/FFTW-3.3.4-gompic-2016.08.eb | 34 +++++++++++++ .../easyconfigs/g/gcccuda/gcccuda-2016.08.eb | 21 ++++++++ .../easyconfigs/g/gompic/gompic-2016.08.eb | 23 +++++++++ .../easyconfigs/g/goolfc/goolfc-2016.08.eb | 38 ++++++++++++++ .../h/hwloc/hwloc-1.11.2-gcccuda-2016.08.eb | 19 +++++++ ...BLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb | 51 +++++++++++++++++++ .../OpenMPI/OpenMPI-1.10.2-gcccuda-2016.08.eb | 32 ++++++++++++ ...ic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb | 25 +++++++++ 9 files changed, 276 insertions(+) create mode 100644 easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb create mode 100644 easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb create mode 100644 easybuild/easyconfigs/g/gompic/gompic-2016.08.eb create mode 100644 easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb create mode 100644 easybuild/easyconfigs/h/hwloc/hwloc-1.11.2-gcccuda-2016.08.eb create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-gcccuda-2016.08.eb create mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb diff --git a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..13983fecee --- /dev/null +++ b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.3-2.25.eb @@ -0,0 +1,33 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2016 Cyprus Institute / CaSToRC, Uni.Lu/LCSB, NTUA, Ghent University, Microway +# Authors:: George Tsouloupas , Fotis Georgatos , Kenneth Hoste, Eliot Eshelman +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-99.html +## + +name = 'CUDA' +version = '7.5.18' + +homepage = 'https://developer.nvidia.com/cuda-toolkit' +description = """CUDA (formerly Compute Unified Device Architecture) is a parallel + computing platform and programming model created by NVIDIA and implemented by the + graphics processing units (GPUs) that they produce. CUDA gives developers access + to the virtual instruction set and memory of the parallel computational elements in CUDA GPUs.""" + +toolchain = {'name': 'GCC', 'version': '4.9.3-2.25'} + +source_urls = ['http://developer.download.nvidia.com/compute/cuda/%(version_major_minor)s/Prod/local_installers/'] + +sources = ['%(namelower)s_%(version)s_linux.run'] +checksums = ['4b3bcecf0dfc35928a0898793cf3e4c6'] + +# Necessary to allow to use a GCC 4.9.3 toolchain, as CUDA by default just supports up to 4.9.2. +# Tested, but not throughly, so it is not guaranteed to don't cause problems +installopts = '-override compiler' + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb new file mode 100644 index 0000000000..59828cee2d --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'FFTW' +version = '3.3.4' + +homepage = 'http://www.fftw.org' +description = """FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) + in one or more dimensions, of arbitrary input size, and of both real and complex data.""" + +toolchain = {'name': 'gompic', 'version': '2016.08'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [homepage] + +common_configopts = "--enable-threads --enable-openmp --with-pic" + +configopts = [ + common_configopts + " --enable-single --enable-sse2 --enable-mpi", + common_configopts + " --enable-long-double --enable-mpi", + common_configopts + " --enable-quad-precision", + common_configopts + " --enable-sse2 --enable-mpi", # default as last +] + +sanity_check_paths = { + 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom', 'q-wisdom']] + + ['include/fftw3%s' % x for x in ['-mpi.f03', '-mpi.h', '.f', '.f03', + '.h', 'l-mpi.f03', 'l.f03', 'q.f03']] + + ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']] + + ['lib/libfftw3q.a', 'lib/libfftw3q_omp.a'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb b/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb new file mode 100644 index 0000000000..9572b6a58a --- /dev/null +++ b/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb @@ -0,0 +1,21 @@ +easyblock = "Toolchain" + +name = 'gcccuda' +version = '2016.08' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolchain, along with CUDA toolkit.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +comp_name = 'GCC' +comp_ver = '4.9.3-2.25' +comp = (comp_name, comp_ver) + +# compiler toolchain dependencies +dependencies = [ + comp, + ('CUDA', '7.5.18', '', comp), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/g/gompic/gompic-2016.08.eb b/easybuild/easyconfigs/g/gompic/gompic-2016.08.eb new file mode 100644 index 0000000000..d75cda72fc --- /dev/null +++ b/easybuild/easyconfigs/g/gompic/gompic-2016.08.eb @@ -0,0 +1,23 @@ +easyblock = "Toolchain" + +name = 'gompic' +version = '2016.08' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolchain along with CUDA toolkit, + including OpenMPI for MPI support with CUDA features enabled.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +comp_name = 'GCC' +comp_ver = '4.9.3-2.25' +comp = (comp_name, comp_ver) + +# compiler toolchain dependencies +dependencies = [ + comp, # part of gcccuda + ('CUDA', '7.5.18', '', comp), # part of gcccuda + ('OpenMPI', '1.10.2', '', ('gcccuda', version)), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb b/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb new file mode 100644 index 0000000000..0a4b029820 --- /dev/null +++ b/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb @@ -0,0 +1,38 @@ +easyblock = "Toolchain" + +name = 'goolfc' +version = '2016.08' + +homepage = '(none)' +description = """GCC based compiler toolchain __with CUDA support__, and including + OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +comp_name = 'GCC' +comp_ver = '4.9.3-2.25' +comp = (comp_name, comp_ver) + +# toolchain used to build goolfc dependencies +comp_mpi_tc_name = 'gompic' +comp_mpi_tc_ver = version +comp_mpi_tc = (comp_mpi_tc_name, comp_mpi_tc_ver) + +blaslib = 'OpenBLAS' +blasver = '0.2.15' +blassuff = '-LAPACK-3.6.0' +blas = '-%s-%s%s' % (blaslib, blasver, blassuff) + +# compiler toolchain dependencies +# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain +# because of toolchain preperation functions +dependencies = [ + comp, # part of gompic + ('CUDA', '7.5.18', '', comp), # part of gompic + ('OpenMPI', '1.10.2', '', ('gcccuda', version)), # part of gompic + (blaslib, blasver, blassuff, comp_mpi_tc), + ('FFTW', '3.3.4', '', comp_mpi_tc), + ('ScaLAPACK', '2.0.2', blas, comp_mpi_tc), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.2-gcccuda-2016.08.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.2-gcccuda-2016.08.eb new file mode 100644 index 0000000000..67cdded106 --- /dev/null +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.2-gcccuda-2016.08.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'hwloc' +version = "1.11.2" + +homepage = 'http://www.open-mpi.org/projects/hwloc/' +description = """The Portable Hardware Locality (hwloc) software package provides a portable abstraction + (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including + NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various + system attributes such as cache and memory information as well as the locality of I/O devices such as + network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering + information about modern computing hardware so as to exploit it accordingly and efficiently.""" + +toolchain = {'name': 'gcccuda', 'version': '2016.08'} + +source_urls = ['http://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] +sources = [SOURCE_TAR_GZ] + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb new file mode 100644 index 0000000000..8343b91415 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb @@ -0,0 +1,51 @@ +easyblock = 'ConfigureMake' + +name = 'OpenBLAS' +version = '0.2.15' + +lapackver = '3.6.0' +versionsuffix = '-LAPACK-%s' % lapackver + +homepage = 'http://xianyi.github.com/OpenBLAS/' +description = """OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.""" + +toolchain = {'name': 'gompic', 'version': '2016.08'} + +lapack_src = 'lapack-%s.tgz' % lapackver +large_src = 'large.tgz' +timing_src = 'timing.tgz' +sources = [ + 'v%(version)s.tar.gz', + lapack_src, + large_src, + timing_src, +] +source_urls = [ + # order matters, trying to download the LAPACK tarball from GitHub causes trouble + "http://www.netlib.org/lapack/", + "http://www.netlib.org/lapack/timing/", + "https://github.com/xianyi/OpenBLAS/archive/", +] + +patches = [ + (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir + (large_src, '.'), + (timing_src, '.'), +] + +skipsteps = ['configure'] + +buildopts = 'BINARY=64 USE_THREAD=1 CC="$CC" FC="$F77" NO_AFFINITY=1' +installopts = "USE_THREAD=1 PREFIX=%(installdir)s" + +# extensive testing can be enabled by uncommenting the line below +#runtest = 'PATH=.:$PATH lapack-timing' + +sanity_check_paths = { + 'files': ['include/cblas.h', 'include/f77blas.h', 'include/lapacke_config.h', 'include/lapacke.h', + 'include/lapacke_mangling.h', 'include/lapacke_utils.h', 'include/openblas_config.h', + 'lib/libopenblas.a', 'lib/libopenblas.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-gcccuda-2016.08.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-gcccuda-2016.08.eb new file mode 100644 index 0000000000..050c6e7be0 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-gcccuda-2016.08.eb @@ -0,0 +1,32 @@ +easyblock = 'ConfigureMake' + +name = 'OpenMPI' +version = "1.10.2" + +homepage = 'http://www.open-mpi.org/' +description = """The Open MPI Project is an open source MPI-2 implementation.""" + +toolchain = {'name': 'gcccuda', 'version': '2016.08'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads'] + +dependencies = [('hwloc', '1.11.2')] + +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' +configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path +configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support +configopts += '--with-cuda=$CUDA_HOME ' # CUDA-aware build; N.B. --disable-dlopen is incompatible + +# needed for --with-verbs +osdependencies = [('libibverbs-dev', 'libibverbs-devel')] + +libs = ["mpi_cxx", "mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte", "vt", "vt-hyb", "vt-mpi", "vt-mpi-unify"] +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], + 'dirs': ["include/openmpi/ompi/mpi/cxx"], +} + +moduleclass = 'mpi' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb new file mode 100644 index 0000000000..f7b5313129 --- /dev/null +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb @@ -0,0 +1,25 @@ +name = 'ScaLAPACK' +version = '2.0.2' + +homepage = 'http://www.netlib.org/scalapack/' +description = """The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines + redesigned for distributed memory MIMD parallel computers.""" + +toolchain = {'name': 'gompic', 'version': '2016.08'} +toolchainopts = {'pic': True} + +source_urls = [homepage] +sources = [SOURCELOWER_TGZ] + +blaslib = 'OpenBLAS' +blasver = '0.2.15' +blassuff = '-LAPACK-3.6.0' + +versionsuffix = "-%s-%s%s" % (blaslib, blasver, blassuff) + +dependencies = [(blaslib, blasver, blassuff, ('GCC', '4.9.3-2.25'))] + +# parallel build tends to fail, so disabling it +parallel = 1 + +moduleclass = 'numlib' -- GitLab From 630b5d7a28e4241b41d45e14081c309a41722416 Mon Sep 17 00:00:00 2001 From: Eliot Eshelman Date: Mon, 3 Oct 2016 21:46:34 -0400 Subject: [PATCH 394/741] No need for optarch, as it is enabled by default --- easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb index 59828cee2d..283a4b3d0d 100644 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompic-2016.08.eb @@ -8,7 +8,7 @@ description = """FFTW is a C subroutine library for computing the discrete Fouri in one or more dimensions, of arbitrary input size, and of both real and complex data.""" toolchain = {'name': 'gompic', 'version': '2016.08'} -toolchainopts = {'optarch': True, 'pic': True} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = [homepage] -- GitLab From d147126da37690dd9b13689f61760aa3e9beffdc Mon Sep 17 00:00:00 2001 From: Eliot Eshelman Date: Tue, 4 Oct 2016 22:34:48 -0400 Subject: [PATCH 395/741] Update versions as suggested by EasyBuild team --- ...5.18-GCC-4.9.3-2.25.eb => CUDA-7.5.18-GCC-4.9.4-2.25.eb} | 4 ++-- easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb | 2 +- easybuild/easyconfigs/g/gompic/gompic-2016.08.eb | 4 ++-- easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb | 6 +++--- ...2-gcccuda-2016.08.eb => hwloc-1.11.3-gcccuda-2016.08.eb} | 2 +- ....0.eb => OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb} | 4 ++-- ...gcccuda-2016.08.eb => OpenMPI-1.10.3-gcccuda-2016.08.eb} | 4 ++-- ...CK-2.0.2-gompic-2016.08-OpenBLAS-0.2.18-LAPACK-3.6.0.eb} | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) rename easybuild/easyconfigs/c/CUDA/{CUDA-7.5.18-GCC-4.9.3-2.25.eb => CUDA-7.5.18-GCC-4.9.4-2.25.eb} (91%) rename easybuild/easyconfigs/h/hwloc/{hwloc-1.11.2-gcccuda-2016.08.eb => hwloc-1.11.3-gcccuda-2016.08.eb} (97%) rename easybuild/easyconfigs/o/OpenBLAS/{OpenBLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb => OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb} (95%) rename easybuild/easyconfigs/o/OpenMPI/{OpenMPI-1.10.2-gcccuda-2016.08.eb => OpenMPI-1.10.3-gcccuda-2016.08.eb} (95%) rename easybuild/easyconfigs/s/ScaLAPACK/{ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb => ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.18-LAPACK-3.6.0.eb} (87%) diff --git a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.4-2.25.eb similarity index 91% rename from easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.3-2.25.eb rename to easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.4-2.25.eb index 13983fecee..eecde07096 100644 --- a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-GCC-4.9.4-2.25.eb @@ -19,14 +19,14 @@ description = """CUDA (formerly Compute Unified Device Architecture) is a parall graphics processing units (GPUs) that they produce. CUDA gives developers access to the virtual instruction set and memory of the parallel computational elements in CUDA GPUs.""" -toolchain = {'name': 'GCC', 'version': '4.9.3-2.25'} +toolchain = {'name': 'GCC', 'version': '4.9.4-2.25'} source_urls = ['http://developer.download.nvidia.com/compute/cuda/%(version_major_minor)s/Prod/local_installers/'] sources = ['%(namelower)s_%(version)s_linux.run'] checksums = ['4b3bcecf0dfc35928a0898793cf3e4c6'] -# Necessary to allow to use a GCC 4.9.3 toolchain, as CUDA by default just supports up to 4.9.2. +# Necessary to allow to use a GCC 4.9.4 toolchain, as CUDA by default just supports up to 4.9.2. # Tested, but not throughly, so it is not guaranteed to don't cause problems installopts = '-override compiler' diff --git a/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb b/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb index 9572b6a58a..18f71c6334 100644 --- a/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb +++ b/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.08.eb @@ -9,7 +9,7 @@ description = """GNU Compiler Collection (GCC) based compiler toolchain, along w toolchain = {'name': 'dummy', 'version': 'dummy'} comp_name = 'GCC' -comp_ver = '4.9.3-2.25' +comp_ver = '4.9.4-2.25' comp = (comp_name, comp_ver) # compiler toolchain dependencies diff --git a/easybuild/easyconfigs/g/gompic/gompic-2016.08.eb b/easybuild/easyconfigs/g/gompic/gompic-2016.08.eb index d75cda72fc..1afeb092c2 100644 --- a/easybuild/easyconfigs/g/gompic/gompic-2016.08.eb +++ b/easybuild/easyconfigs/g/gompic/gompic-2016.08.eb @@ -10,14 +10,14 @@ description = """GNU Compiler Collection (GCC) based compiler toolchain along wi toolchain = {'name': 'dummy', 'version': 'dummy'} comp_name = 'GCC' -comp_ver = '4.9.3-2.25' +comp_ver = '4.9.4-2.25' comp = (comp_name, comp_ver) # compiler toolchain dependencies dependencies = [ comp, # part of gcccuda ('CUDA', '7.5.18', '', comp), # part of gcccuda - ('OpenMPI', '1.10.2', '', ('gcccuda', version)), + ('OpenMPI', '1.10.3', '', ('gcccuda', version)), ] moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb b/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb index 0a4b029820..1ae98dc94c 100644 --- a/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb +++ b/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb @@ -10,7 +10,7 @@ description = """GCC based compiler toolchain __with CUDA support__, and includi toolchain = {'name': 'dummy', 'version': 'dummy'} comp_name = 'GCC' -comp_ver = '4.9.3-2.25' +comp_ver = '4.9.4-2.25' comp = (comp_name, comp_ver) # toolchain used to build goolfc dependencies @@ -19,7 +19,7 @@ comp_mpi_tc_ver = version comp_mpi_tc = (comp_mpi_tc_name, comp_mpi_tc_ver) blaslib = 'OpenBLAS' -blasver = '0.2.15' +blasver = '0.2.18' blassuff = '-LAPACK-3.6.0' blas = '-%s-%s%s' % (blaslib, blasver, blassuff) @@ -29,7 +29,7 @@ blas = '-%s-%s%s' % (blaslib, blasver, blassuff) dependencies = [ comp, # part of gompic ('CUDA', '7.5.18', '', comp), # part of gompic - ('OpenMPI', '1.10.2', '', ('gcccuda', version)), # part of gompic + ('OpenMPI', '1.10.3', '', ('gcccuda', version)), # part of gompic (blaslib, blasver, blassuff, comp_mpi_tc), ('FFTW', '3.3.4', '', comp_mpi_tc), ('ScaLAPACK', '2.0.2', blas, comp_mpi_tc), diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.2-gcccuda-2016.08.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-gcccuda-2016.08.eb similarity index 97% rename from easybuild/easyconfigs/h/hwloc/hwloc-1.11.2-gcccuda-2016.08.eb rename to easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-gcccuda-2016.08.eb index 67cdded106..4a821b0537 100644 --- a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.2-gcccuda-2016.08.eb +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-gcccuda-2016.08.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'hwloc' -version = "1.11.2" +version = "1.11.3" homepage = 'http://www.open-mpi.org/projects/hwloc/' description = """The Portable Hardware Locality (hwloc) software package provides a portable abstraction diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb similarity index 95% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb rename to easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb index 8343b91415..5a0c375e93 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.15-gompic-2016.08-LAPACK-3.6.0.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'OpenBLAS' -version = '0.2.15' +version = '0.2.18' lapackver = '3.6.0' versionsuffix = '-LAPACK-%s' % lapackver @@ -9,7 +9,7 @@ versionsuffix = '-LAPACK-%s' % lapackver homepage = 'http://xianyi.github.com/OpenBLAS/' description = """OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.""" -toolchain = {'name': 'gompic', 'version': '2016.08'} +toolchain = {'name': 'GCC', 'version': '4.9.4-2.25'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-gcccuda-2016.08.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.3-gcccuda-2016.08.eb similarity index 95% rename from easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-gcccuda-2016.08.eb rename to easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.3-gcccuda-2016.08.eb index 050c6e7be0..917b152207 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-gcccuda-2016.08.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.3-gcccuda-2016.08.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'OpenMPI' -version = "1.10.2" +version = "1.10.3" homepage = 'http://www.open-mpi.org/' description = """The Open MPI Project is an open source MPI-2 implementation.""" @@ -11,7 +11,7 @@ toolchain = {'name': 'gcccuda', 'version': '2016.08'} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads'] -dependencies = [('hwloc', '1.11.2')] +dependencies = [('hwloc', '1.11.3')] configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.18-LAPACK-3.6.0.eb similarity index 87% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb rename to easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.18-LAPACK-3.6.0.eb index f7b5313129..daad463a99 100644 --- a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.15-LAPACK-3.6.0.eb +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.08-OpenBLAS-0.2.18-LAPACK-3.6.0.eb @@ -12,12 +12,12 @@ source_urls = [homepage] sources = [SOURCELOWER_TGZ] blaslib = 'OpenBLAS' -blasver = '0.2.15' +blasver = '0.2.18' blassuff = '-LAPACK-3.6.0' versionsuffix = "-%s-%s%s" % (blaslib, blasver, blassuff) -dependencies = [(blaslib, blasver, blassuff, ('GCC', '4.9.3-2.25'))] +dependencies = [(blaslib, blasver, blassuff, ('GCC', '4.9.4-2.25'))] # parallel build tends to fail, so disabling it parallel = 1 -- GitLab From 2baffdc4d76cffebaa7d44d6ade4b482354133aa Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Wed, 5 Oct 2016 11:51:29 +0800 Subject: [PATCH 396/741] add easyconfig Elk-4.0.15-intel-2016.01.eb --- .../e/Elk/Elk-4.0.15-intel-2016.01.eb | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016.01.eb diff --git a/easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016.01.eb b/easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016.01.eb new file mode 100644 index 0000000000..c217d02ed8 --- /dev/null +++ b/easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016.01.eb @@ -0,0 +1,47 @@ +easyblock = 'MakeCp' + +name = 'Elk' +version = '4.0.15' + +homepage = 'http://elk.sourceforge.net/' +description = """An all-electron full-potential linearised augmented-plane wave (FP-LAPW) code with +many advanced features. Written originally at Karl-Franzens-Universität Graz as a milestone of the +EXCITING EU Research and Training Network, the code is designed to be as simple as possible so that +new developments in the field of density functional theory (DFT) can be added quickly and reliably. +""" + +toolchain = {'name': 'intel', 'version': '2016.01'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TGZ] +source_urls = [SOURCEFORGE_SOURCE] + +checksums = [ + '760623faf5aab9b1f49488edbaae65fb', # elk-4.0.15.tgz +] + +dependencies = [ + ('libxc', '2.2.3'), +] + + +# make.inc file is generated interactively by "setup" command, creating it here +prebuildopts = 'echo "F90_OPTS = $FFLAGS" > make.inc && ' +prebuildopts += 'echo "F77_OPTS = $FFLAGS" >> make.inc && ' +prebuildopts += 'echo "LIB_LPK = $LIBLAPACK" >> make.inc && ' +prebuildopts += 'echo "LIB_libxc = $EBROOTLIBXC/lib/libxcf90.a $EBROOTLIBXC/lib/libxc.a" >> make.inc && ' +prebuildopts += 'echo "SRC_libxc = libxc_funcs.f90 libxc.f90 libxcifc.f90" >> make.inc && ' +prebuildopts += 'echo "SRC_FFT = zfftifc_fftw.f90" >> make.inc && ' + +buildopts = 'all' + +parallel = 1 + +files_to_copy = [(['src/elk', 'src/spacegroup/spacegroup', 'src/eos/eos'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/elk', 'bin/spacegroup', 'bin/eos'], + 'dirs': [] +} + +moduleclass = 'phys' -- GitLab From 2b5c7943458bef82bc5c1f682b0c1b0dc9981b3a Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Wed, 5 Oct 2016 17:14:42 +0800 Subject: [PATCH 397/741] switch toolchain to 2016b --- .../{Elk-4.0.15-intel-2016.01.eb => Elk-4.0.15-intel-2016b.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/e/Elk/{Elk-4.0.15-intel-2016.01.eb => Elk-4.0.15-intel-2016b.eb} (96%) diff --git a/easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016.01.eb b/easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016b.eb similarity index 96% rename from easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016.01.eb rename to easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016b.eb index c217d02ed8..e2db42a61e 100644 --- a/easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016.01.eb +++ b/easybuild/easyconfigs/e/Elk/Elk-4.0.15-intel-2016b.eb @@ -10,7 +10,7 @@ EXCITING EU Research and Training Network, the code is designed to be as simple new developments in the field of density functional theory (DFT) can be added quickly and reliably. """ -toolchain = {'name': 'intel', 'version': '2016.01'} +toolchain = {'name': 'intel', 'version': '2016b'} toolchainopts = {'usempi': True} sources = [SOURCELOWER_TGZ] -- GitLab From e4401640e583f6e62a39583e22b190c433e9f467 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 6 Oct 2016 10:43:12 +0200 Subject: [PATCH 398/741] add easyconfig awscli-1.11.1-intel-2016b-Python-2.7.12.eb --- ...awscli-1.11.1-intel-2016b-Python-2.7.12.eb | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 easybuild/easyconfigs/a/awscli/awscli-1.11.1-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/a/awscli/awscli-1.11.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/a/awscli/awscli-1.11.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..ce1d7a97a9 --- /dev/null +++ b/easybuild/easyconfigs/a/awscli/awscli-1.11.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'awscli' +version = '1.11.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/awscli' +description = 'Universal Command Line Environment for AWS' + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), +] + +sanity_check_paths = { + 'files': ['bin/aws'], + 'dirs': ['lib/python%(pyshortver)s/site-packages/'], +} + +moduleclass = 'tools' -- GitLab From b734eda73803b6f761787341790aef8c0709174a Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Fri, 7 Oct 2016 10:48:28 +0800 Subject: [PATCH 399/741] add easyconfig QuantumESPRESSO-6.0-intel-2016b.eb --- .../QuantumESPRESSO-6.0-intel-2016b.eb | 55 ++++++++++++++ .../QuantumESPRESSO-6.0_yambo-fixes.patch | 71 +++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0_yambo-fixes.patch diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0-intel-2016b.eb b/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0-intel-2016b.eb new file mode 100644 index 0000000000..a7b85783a2 --- /dev/null +++ b/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0-intel-2016b.eb @@ -0,0 +1,55 @@ +name = 'QuantumESPRESSO' +version = '6.0' + +homepage = 'http://www.pwscf.org/' +description = """Quantum ESPRESSO is an integrated suite of computer codes + for electronic-structure calculations and materials modeling at the nanoscale. + It is based on density-functional theory, plane waves, and pseudopotentials + (both norm-conserving and ultrasoft).""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'usempi': True} + +# major part of this list was determined from espresso/install/plugins_list +sources = [ + 'qe-%(version)s.tar.gz', + 'wannier90-1.2.tar.gz', + 'qe-gipaw-6.0.tar.gz', + # must be downloaded manually from + # http://qe-forge.org/gf/project/q-e/scmsvn/?action=browse&path=%2F%2Acheckout%2A%2Ftags%2FQE-5.2.1%2Fespresso%2Farchive%2Fplumed-1.3-qe.tar.gz&revision=11758 + # gets updated without changes to filename, cfr. http://qe-forge.org/pipermail/q-e-commits/2015-June/007359.html + # 'plumed-1.3-qe-r11758.tar.gz', + 'want-2.5.1-base.tar.gz', + 'yambo-3.4.2.tgz', +] +missing_sources = [ + 'sax-2.0.3.tar.gz', # nowhere to be found +] +source_urls = [ + 'http://files.qe-forge.org/index.php?file=', # all sources, except espresso*.tar.gz + 'http://qe-forge.org/gf/download/frsrelease/224/1044/', # qe-6.0.tar.gz + 'http://qe-forge.org/gf/download/frsrelease/153/618/', # want-2.5.1-base.tar.gz + 'http://qe-forge.org/gf/download/frsrelease/208/932/', # yambo-3.4.2.tgz +] + +patches = [ + 'QuantumESPRESSO-%(version)s_yambo-fixes.patch', +] + +# source checksums +checksums = [ + 'e42aeeffadf7951542d8561a6b4a3390', # qe-6.0.tar.gz + 'a1e9611b9a82941c23426028d112186e', # wannier90-1.2.tar.gz + 'b11a8b75109eb58fd97a1c6f7cf20e31', # qe-gipaw-6.0.tar.gz + # 'f094031c6d13a0e00022daf4d7c847c7', # plumed-1.3-qe-r11758.tar.gz + 'ac365daebbe380bf4019235eacf71079', # want-2.5.1-base.tar.gz + 'f0820a0f42dfc81ce3811af647bed777', # yambo-3.4.2.tgz +] + +# add plumed and uncomment the lines in sources and checksums if the package is downloaded manually +buildopts = 'all w90 gipaw want yambo xspectra' # plumed + +# parallel build tends to fail +parallel = 1 + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0_yambo-fixes.patch b/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0_yambo-fixes.patch new file mode 100644 index 0000000000..8f94d88eb2 --- /dev/null +++ b/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0_yambo-fixes.patch @@ -0,0 +1,71 @@ +* make sure -nofor_main is also used when $FC is defined as mpif90 for yambo +* fix check in yambo configure script w.r.t. preprocessing Fortran code by ignoring harmless warning in stderr output +* force ifort mangling in yambo's netcdf +author: Kenneth Hoste (HPC-UGent), adapted to qe-6.0 and yambo-3.4.2 by Miguel Dias Costa (National University of Singapore) +--- qe-6.0/yambo-3.4.2/configure.orig 2016-05-26 16:18:16.177156000 +0800 ++++ qe-6.0/yambo-3.4.2/configure 2016-05-26 16:20:31.929218336 +0800 +@@ -6238,7 +6238,7 @@ + ;; + *g95*) + ;; +- *ifort*) ++ *ifort*|*mpif90*) + $FC -v >& ver_ + VER_8=`grep 8. ver_ | wc -l` + VER_9=`grep 9. ver_ | wc -l` +@@ -6321,7 +6321,7 @@ + FCMFLAG="" + OMPFLAGS="-fopenmp" + ;; +- *ifort*) ++ *ifort*|*mpif90*) + CPU_FLAG="" + case "${FCVERSION}" in + *11* | *12* | *13* |*14* | *15* ) +@@ -6365,7 +6365,7 @@ + UFFLAGS="-g -O0 -fno-second-underscore" + FCMFLAG="" + ;; +- *ifort*) ++ *ifort*|*mpif90*) + CPU_FLAG="" + case "${FCVERSION}" in + *1*) +@@ -6413,7 +6413,7 @@ + UFFLAGS="-g -O0 -w" + OMPFLAGS="-openmp" + ;; +- *ifort*) ++ *ifort*|*mpif90*) + CPU_FLAG="" + case "${FCVERSION}" in + *1*) +@@ -6472,7 +6472,7 @@ + UFFLAGS="-g -O0 -w -tpp2" + OMPFLAGS="-openmp" + ;; +- *ifort*) ++ *ifort*|*mpif90*) + CPU_FLAG="" + case "${FCVERSION}" in + *11* | *12* | *13* |*14* |*15* ) +@@ -7651,7 +7651,7 @@ + + if ! test -s conftest.er1 || test -n "`grep successful conftest.er1`" ; then + eval $CPP $CPPFLAGS conftest.F > conftest.${F90SUFFIX} +- eval $FC $FCFLAGS -c conftest.${F90SUFFIX} 2> conftest.er2 >&5 ++ eval $FC $FCFLAGS -c conftest.${F90SUFFIX} | grep -v "ifort: command line remark" 2> conftest.er2 >&5 + if test -s conftest.er2 ; then + if ! test -n "`grep successful conftest.er2`" ; then + acx_F90_ok=no ; +--- qe-6.0/yambo-3.4.2/lib/netcdf/Makefile.loc.orig 2016-06-02 17:29:53.816844000 +0800 ++++ qe-6.0/yambo-3.4.2/lib/netcdf/Makefile.loc 2016-06-02 17:30:45.579476000 +0800 +@@ -40,7 +40,7 @@ + FC="$(f90)" \ + FCFLAGS="$(f77flags)" \ + FFLAGS="$(f77flags)" \ +- CPPFLAGS="$(netcdf_aux)" \ ++ CPPFLAGS="$(netcdf_aux) -DpgiFortran" \ + F90="$(f90)" \ + F77="$(f77)" \ + INSTALL_DIR="$(INSTALL_DIR)" ); \ -- GitLab From 26862e351845e235b7a32bda8ba0c609d919d984 Mon Sep 17 00:00:00 2001 From: Bob Date: Fri, 7 Oct 2016 10:36:20 +0200 Subject: [PATCH 400/741] bump version to 8.2.9 --- .../RAxML-8.2.9-foss-2016a-hybrid-avx2.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/r/RAxML/RAxML-8.2.9-foss-2016a-hybrid-avx2.eb diff --git a/easybuild/easyconfigs/r/RAxML/RAxML-8.2.9-foss-2016a-hybrid-avx2.eb b/easybuild/easyconfigs/r/RAxML/RAxML-8.2.9-foss-2016a-hybrid-avx2.eb new file mode 100644 index 0000000000..db82fd5e9a --- /dev/null +++ b/easybuild/easyconfigs/r/RAxML/RAxML-8.2.9-foss-2016a-hybrid-avx2.eb @@ -0,0 +1,25 @@ +easyblock = 'MakeCp' + +name = 'RAxML' +version = '8.2.9' +versionsuffix = '-hybrid-avx2' + +homepage = 'https://github.com/stamatak/standard-RAxML' +description = "RAxML search algorithm for maximum likelihood based inference of phylogenetic trees." + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'usempi': True} + +sources = ['v%(version)s.zip'] +source_urls = ['https://github.com/stamatak/standard-RAxML/archive/'] + +buildopts = '-f Makefile.AVX2.HYBRID.gcc CC="$CC"' + +files_to_copy = [(["raxmlHPC-HYBRID-AVX2"], "bin"), "usefulScripts", "README", "manual"] + +sanity_check_paths = { + 'files': ["bin/raxmlHPC-HYBRID-AVX2"], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From e2c01b21f66ae629e9c30cd5c97426b8cec795a6 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Fri, 7 Oct 2016 15:42:53 +0200 Subject: [PATCH 401/741] add easyconfig Mathematica-11.0.1.eb --- .../m/Mathematica/Mathematica-11.0.1.eb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb diff --git a/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb b/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb new file mode 100644 index 0000000000..6a3a3e02ee --- /dev/null +++ b/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb @@ -0,0 +1,14 @@ +name = 'Mathematica' +version = '11.0.1' + +homepage = 'http://www.wolfram.com/mathematica' +description = """Mathematica is a computational software program used in many scientific, engineering, mathematical +and computing fields.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['Mathematica_%(version)s_LINUX.sh'] + +license_server = 'license.example.com' + +moduleclass = 'math' -- GitLab From 6bef0682d23a57e54ef6814f92a480e1a478a1e8 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 7 Oct 2016 15:54:14 +0200 Subject: [PATCH 402/741] working patch --- .../Sphinx-1.4.6-pdflatex_failing_tests.patch | 20 ------------------- ... Sphinx-1.4.8-foss-2016a-Python-2.7.11.eb} | 7 ++----- ...> Sphinx-1.4.8-foss-2016a-Python-3.5.1.eb} | 7 ++----- .../Sphinx-1.4.8-pdflatex_failing_tests.patch | 20 +++++++++++++++++++ 4 files changed, 24 insertions(+), 30 deletions(-) delete mode 100644 easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-pdflatex_failing_tests.patch rename easybuild/easyconfigs/s/Sphinx/{Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb => Sphinx-1.4.8-foss-2016a-Python-2.7.11.eb} (96%) rename easybuild/easyconfigs/s/Sphinx/{Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb => Sphinx-1.4.8-foss-2016a-Python-3.5.1.eb} (96%) create mode 100644 easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-pdflatex_failing_tests.patch diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-pdflatex_failing_tests.patch b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-pdflatex_failing_tests.patch deleted file mode 100644 index 437e040640..0000000000 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-pdflatex_failing_tests.patch +++ /dev/null @@ -1,20 +0,0 @@ -pdflatex and latex tests fail on systems that have older versions installed -Author: Ruben van Dijk (University of Groningen) ---- Makefile.orig 2016-10-04 14:15:46.000000000 +0200 -+++ Makefile 2016-10-04 14:37:19.000000000 +0200 -@@ -64,8 +64,14 @@ - reindent: - @$(PYTHON) utils/reindent.py -r -n . - -+# Failing tests, py35 was already excluded. -+DONT_TEST = -I py35 \ -+ -I latex \ -+ -I typing_test_data \ -+ -I ext_math -+ - test: -- @cd tests; $(PYTHON) run.py -I py35 -d -m '^[tT]est' $(TEST) -+ @cd tests; $(PYTHON) run.py $(DONT_TEST) -d #-m '^[tT]est' $(TEST) - - test-async: - @cd tests; $(PYTHON) run.py -d -m '^[tT]est' $(TEST) diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-foss-2016a-Python-2.7.11.eb similarity index 96% rename from easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb rename to easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-foss-2016a-Python-2.7.11.eb index 8099523d58..249a32fcb8 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-foss-2016a-Python-2.7.11.eb @@ -1,7 +1,7 @@ easyblock = 'Bundle' name = 'Sphinx' -version = '1.4.6' +version = '1.4.8' versionsuffix = '-Python-%(pyver)s' homepage = 'http://sphinx.pocoo.org/' @@ -21,10 +21,6 @@ dependencies = [ ('requests', '2.10.0', versionsuffix), ] -patches = [ - '%(name)s-%(version)s-pdflatex_failing_tests.patch' -] - exts_list = [ ('imagesize', '0.7.1', { 'source_urls': ['https://pypi.python.org/packages/source/i/imagesize/'], @@ -51,6 +47,7 @@ exts_list = [ }), (name, version, { 'source_urls': ['https://pypi.python.org/packages/source/S/Sphinx/'], + 'patches': ['Sphinx-%s-pdflatex_failing_tests.patch' %version], }), # sphinx_rtd_theme depends on Sphinx, and should be there to make the tests work ('sphinx_rtd_theme', '0.1.10a0', { diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-foss-2016a-Python-3.5.1.eb similarity index 96% rename from easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb rename to easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-foss-2016a-Python-3.5.1.eb index b334e2de65..90efc667c6 100644 --- a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.6-foss-2016a-Python-3.5.1.eb +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-foss-2016a-Python-3.5.1.eb @@ -1,7 +1,7 @@ easyblock = 'Bundle' name = 'Sphinx' -version = '1.4.6' +version = '1.4.8' versionsuffix = '-Python-%(pyver)s' homepage = 'http://sphinx.pocoo.org/' @@ -21,10 +21,6 @@ dependencies = [ ('requests', '2.10.0', versionsuffix), ] -patches = [ - '%(name)s-%(version)s-pdflatex_failing_tests.patch' -] - exts_list = [ ('imagesize', '0.7.1', { 'source_urls': ['https://pypi.python.org/packages/source/i/imagesize/'], @@ -51,6 +47,7 @@ exts_list = [ }), (name, version, { 'source_urls': ['https://pypi.python.org/packages/source/S/Sphinx/'], + 'patches': ['Sphinx-%s-pdflatex_failing_tests.patch' %version], }), # sphinx_rtd_theme depends on Sphinx, and should be there to make the tests work ('sphinx_rtd_theme', '0.1.10a0', { diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-pdflatex_failing_tests.patch b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-pdflatex_failing_tests.patch new file mode 100644 index 0000000000..44705787c3 --- /dev/null +++ b/easybuild/easyconfigs/s/Sphinx/Sphinx-1.4.8-pdflatex_failing_tests.patch @@ -0,0 +1,20 @@ +pdflatex and latex tests fail on systems that have older versions installed +Author: Ruben van Dijk (University of Groningen) +--- Sphinx-1.4.8/Makefile 2016-10-05 11:05:34.000000000 +0200 ++++ Sphinx-1.4.8/Makefile 2016-10-05 11:11:05.000000000 +0200 +@@ -67,8 +67,14 @@ + reindent: + @$(PYTHON) utils/reindent.py -r -n . + ++# Failing tests, py35 was already excluded. ++DONT_TEST = -I py35 \ ++ -I latex \ ++ -I typing_test_data \ ++ -I ext_math ++ + test: +- @cd tests; $(PYTHON) run.py -I py35 -d -m '^[tT]est' $(TEST) ++ @cd tests; $(PYTHON) run.py $(DONT_TEST) -d #-m '^[tT]est' $(TEST) + + test-async: + @cd tests; $(PYTHON) run.py -d -m '^[tT]est' $(TEST) -- GitLab From 402b7e4b38b88d3478a3ea845bd645e6a9485112 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 7 Oct 2016 15:56:55 +0200 Subject: [PATCH 403/741] Sphinx version update --- .../o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb index 8ecf00679f..d30d6266ab 100644 --- a/easybuild/easyconfigs/o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/o/OBITools/OBITools-1.2.9-foss-2016a-Python-2.7.11.eb @@ -21,7 +21,7 @@ dependencies = [ ('Cython', '0.24.1', versionsuffix), ('wheel', '0.29.0', versionsuffix), ('IPython', '5.0.0', versionsuffix), - ('Sphinx', '1.4.5', versionsuffix) + ('Sphinx', '1.4.8', versionsuffix) ] options = {'modulename': 'obitools'} -- GitLab From 2c50629a3696305720e09f00767ea52202a43fac Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 7 Oct 2016 16:09:20 +0200 Subject: [PATCH 404/741] OSU-micro 5.3.2 with foss --- .../OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb diff --git a/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb b/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb new file mode 100644 index 0000000000..1bc3f774aa --- /dev/null +++ b/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'OSU-Micro-Benchmarks' +version = '5.3.2' + +homepage = 'http://mvapich.cse.ohio-state.edu/benchmarks/' +description = """OSU Micro-Benchmarks""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://mvapich.cse.ohio-state.edu/download/mvapich/'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = 'CC=$MPICC CXX=$MPICC' + +benchmark_dirs = ['libexec/osu-micro-benchmarks/mpi/%s' % x for x in ['collective', 'one-sided', 'pt2pt']] +modextrapaths = {'PATH': benchmark_dirs} + +sanity_check_paths = { + 'files': [], + 'dirs': benchmark_dirs, +} + +moduleclass = 'perf' -- GitLab From c067ea08def05b1d026da1f8aabc94ea9377487d Mon Sep 17 00:00:00 2001 From: RvDijk Date: Fri, 7 Oct 2016 16:13:12 +0200 Subject: [PATCH 405/741] IMB-4.1 with foss --- .../easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb diff --git a/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb b/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb new file mode 100644 index 0000000000..7c82e8b734 --- /dev/null +++ b/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb @@ -0,0 +1,33 @@ +easyblock = 'MakeCp' + +name = 'IMB' +version = '4.1' + +homepage = 'https://software.intel.com/en-us/articles/intel-mpi-benchmarks' +description = """ +The Intel® MPI Benchmarks perform a set of MPI performance measurements for point-to-point and global communication operations for a range of message sizes. +""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +sources = ['%(name)s_%(version)s.tgz'] +source_urls = ['https://software.intel.com/sites/default/files/managed/a3/b2/'] + +prebuildopts = 'export MPI_HOME=$EBROOTOPENMPI && cd src &&' +buildopts = '-f make_mpich' + +patches = ['IMB-make_mpich.patch'] + +parallel = 1 + +files_to_copy = [ +(['src/%s' % binfile for binfile in ['IMB-RMA', 'IMB-EXT', 'IMB-NBC', 'IMB-MPI1']], 'bin'), +(['doc/IMB_Users_Guide.pdf'],'doc'), +] + +sanity_check_paths = { + 'files': ['bin/%s' % binfile for binfile in ['IMB-RMA', 'IMB-EXT', 'IMB-NBC', 'IMB-MPI1']], + 'dirs': ['bin','doc'] +} + +moduleclass = 'tools' \ No newline at end of file -- GitLab From 4294702f82c0baba360d72e93468b8bb1fce92a6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 7 Oct 2016 16:18:03 +0200 Subject: [PATCH 406/741] add easyconfig CMake-3.6.2-intel-2016b.eb --- .../c/CMake/CMake-3.6.2-intel-2016b.eb | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 easybuild/easyconfigs/c/CMake/CMake-3.6.2-intel-2016b.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-3.6.2-intel-2016b.eb b/easybuild/easyconfigs/c/CMake/CMake-3.6.2-intel-2016b.eb new file mode 100644 index 0000000000..b6e496837c --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-3.6.2-intel-2016b.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'CMake' +version = '3.6.2' + +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. + CMake is a family of tools designed to build, test and package software.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.cmake.org/files/v%(version_major_minor)s'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = '-- -DCMAKE_USE_OPENSSL=1' + +dependencies = [ + ('ncurses', '6.0'), + # OS dependency should be preferred if the os version is more recent then this version, + # it's nice to have an up to date openssl for security reasons + #('OpenSSL', '1.0.2j'), +] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From 88ab1b465f8e97758b27d268b161036b6f3a9f01 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 7 Oct 2016 16:57:58 +0200 Subject: [PATCH 407/741] add easyconfig SUNDIALS-2.7.0-intel-2016b.eb --- .../s/SUNDIALS/SUNDIALS-2.7.0-intel-2016b.eb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-2.7.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-2.7.0-intel-2016b.eb b/easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-2.7.0-intel-2016b.eb new file mode 100644 index 0000000000..dc435288bd --- /dev/null +++ b/easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-2.7.0-intel-2016b.eb @@ -0,0 +1,29 @@ +easyblock = 'CMakeMake' + +name = 'SUNDIALS' +version = '2.7.0' + +homepage = 'http://computation.llnl.gov/projects/sundials' +description = "SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic Equation Solvers" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'openmp': True, 'usempi': True} + +source_urls = ['http://computation.llnl.gov/projects/sundials/download/'] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [('CMake', '3.6.2')] + +separate_build_dir = True + +configopts = "-DMPI_ENABLE=ON -DOPENMP_ENABLE=ON -DLAPACK_ENABLE=ON" + +solvers = ['arkode', 'cvode', 'cvodes', 'ida', 'idas', 'kinsol'] +sanity_check_paths = { + 'files': ['lib/libsundials_%s.a' % s for s in solvers + ['nvecopenmp', 'nvecparallel', 'nvecserial']] + + ['lib/libsundials_%s.%s' % (s, SHLIB_EXT) for s in solvers + ['nvecopenmp', 'nvecparallel', 'nvecserial']], + 'dirs': ['examples/%s' % s for s in solvers] + ['include/%s' % s for s in solvers] + + ['examples/nvector', 'include/nvector', 'include/sundials'], +} + +moduleclass = 'math' -- GitLab From 002b73a00b5c7913f61331fb6c31bf570ceb1ff8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 7 Oct 2016 18:56:52 +0200 Subject: [PATCH 408/741] add easyconfig Cantera-2.2.1-intel-2016b-Python-2.7.12.eb --- ...Cantera-2.2.1-intel-2016b-Python-2.7.12.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/c/Cantera/Cantera-2.2.1-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/c/Cantera/Cantera-2.2.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/c/Cantera/Cantera-2.2.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..d95d3fc7c6 --- /dev/null +++ b/easybuild/easyconfigs/c/Cantera/Cantera-2.2.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,36 @@ +easyblock = 'SCons' + +name = 'Cantera' +version = '2.2.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/Cantera/cantera' +description = """Chemical kinetics, thermodynamics, and transport tool suite""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/Cantera/cantera/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [ + ('Python', '2.7.12'), + ('Boost', '1.61.0', versionsuffix), + ('SUNDIALS', '2.7.0'), +] +builddependencies = [('SCons', '2.5.0', versionsuffix)] + +buildopts = 'CC="$CC" CXX="$CXX" env=all blas_lapack_libs=mkl_rt blas_lapack_dir=$BLAS_LAPACK_LIB_DIR' +buildopts += ' sundials_include=$EBROOTSUNDIALS/include sundials_libdir=$EBROOTSUNDIALS/lib' +#runtest = 'test' +prefix_arg = 'prefix=' + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +sanity_check_paths = { + 'files': ['bin/mixmaster'], + 'dirs': ['include/cantera', 'lib/pkgconfig', 'lib/python%(pyshortver)s/site-packages'], +} + +sanity_check_commands = [('python', "-c 'import cantera'")] + +moduleclass = 'chem' -- GitLab From e4306133240ddc09fe9e947ac01166578265675b Mon Sep 17 00:00:00 2001 From: Markus Geimer Date: Mon, 10 Oct 2016 09:33:28 +0200 Subject: [PATCH 409/741] Make Bison a builddependency rather than a dependency Also add checksum --- .../easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb | 8 +++++--- .../easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb | 13 ++++++++----- .../easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb | 13 ++++++++----- .../easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb | 13 ++++++++----- .../easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb | 13 ++++++++----- .../easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb | 13 ++++++++----- .../easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb | 13 ++++++++----- .../easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb | 8 +++++--- .../easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb | 8 +++++--- .../easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb | 8 +++++--- .../easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb | 8 +++++--- .../easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb | 8 +++++--- .../easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb | 8 +++++--- .../easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb | 8 +++++--- easybuild/easyconfigs/f/flex/flex-2.6.0.eb | 8 +++++--- 15 files changed, 93 insertions(+), 57 deletions(-) diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb index 9a286850a4..96c99f1d3c 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCC-4.9.2.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb index 7890b40d70..b7b82f9197 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.3.eb @@ -11,12 +11,15 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] -# use same binutils version that was used when building GCC toolchain -builddependencies = [('binutils', '2.25', '', True)] +dependencies = [('M4', '1.4.17')] +builddependencies = [ + ('Bison', '3.0.4'), + # use same binutils version that was used when building GCC toolchain + ('binutils', '2.25', '', True), +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb index 896d90dc34..73279c6d88 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-4.9.4.eb @@ -11,12 +11,15 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] -# use same binutils version that was used when building GCC toolchain -builddependencies = [('binutils', '2.25', '', True)] +dependencies = [('M4', '1.4.17')] +builddependencies = [ + ('Bison', '3.0.4'), + # use same binutils version that was used when building GCC toolchain + ('binutils', '2.25', '', True), +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb index 1c5de5599b..954dea0d03 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.3.0.eb @@ -11,12 +11,15 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] -# use same binutils version that was used when building GCC toolchain -builddependencies = [('binutils', '2.26', '', True)] +dependencies = [('M4', '1.4.17')] +builddependencies = [ + ('Bison', '3.0.4'), + # use same binutils version that was used when building GCC toolchain + ('binutils', '2.26', '', True), +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb index 2e2b6fd6cf..ee9b4ed94d 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-5.4.0.eb @@ -11,12 +11,15 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] -# use same binutils version that was used when building GCC toolchain -builddependencies = [('binutils', '2.26', '', True)] +dependencies = [('M4', '1.4.17')] +builddependencies = [ + ('Bison', '3.0.4'), + # use same binutils version that was used when building GCC toolchain + ('binutils', '2.26', '', True), +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb index 8f2ab256cd..51d6c9f7b6 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.1.0.eb @@ -11,12 +11,15 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] -# use same binutils version that was used when building GCC toolchain -builddependencies = [('binutils', '2.27', '', True)] +dependencies = [('M4', '1.4.17')] +builddependencies = [ + ('Bison', '3.0.4'), + # use same binutils version that was used when building GCC toolchain + ('binutils', '2.27', '', True), +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb index 28fa3061c0..43cfdfac42 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-GCCcore-6.2.0.eb @@ -11,12 +11,15 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] -# use same binutils version that was used when building GCC toolchain -builddependencies = [('binutils', '2.27', '', True)] +dependencies = [('M4', '1.4.17')] +builddependencies = [ + ('Bison', '3.0.4'), + # use same binutils version that was used when building GCC toolchain + ('binutils', '2.27', '', True), +] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb index 621cdb0aaf..5c0eb6b59d 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2015a.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb index 5969d1e4b9..415a80ac04 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016a.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb index d24b602e70..626ebe5d46 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-foss-2016b.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb index e6510e7ef7..3d60cee674 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-gimkl-2.11.5.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb index 59f659121c..098c6168e7 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2015b.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb index ee500a048e..da18a62238 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016a.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb index acc1431c3f..1dc06e55c1 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-intel-2016b.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.0.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0.eb index 08a404a4b8..853b81ad96 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.6.0.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0.eb @@ -11,9 +11,11 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -dependencies = [ - ('Bison', '3.0.4'), - ('M4', '1.4.17') +checksums = [ + '5724bcffed4ebe39e9b55a9be80859ec', # flex-2.6.0.tar.gz ] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' -- GitLab From 5b2e5eef7ad4302113f4069119ccc75c41bbc44c Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 10 Oct 2016 10:01:09 +0200 Subject: [PATCH 410/741] Add sanity command to Mathematica --- easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb b/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb index 6a3a3e02ee..624287d31c 100644 --- a/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb +++ b/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb @@ -11,4 +11,6 @@ sources = ['Mathematica_%(version)s_LINUX.sh'] license_server = 'license.example.com' +sanity_check_commands = [('mathematica', '--help')] + moduleclass = 'math' -- GitLab From 1a79725d94e28e3722b54b3325f12b7a4f9da43f Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Mon, 10 Oct 2016 10:22:57 +0200 Subject: [PATCH 411/741] Use sanity command that doesn't require X --- easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb b/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb index 624287d31c..2afcde5570 100644 --- a/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb +++ b/easybuild/easyconfigs/m/Mathematica/Mathematica-11.0.1.eb @@ -11,6 +11,6 @@ sources = ['Mathematica_%(version)s_LINUX.sh'] license_server = 'license.example.com' -sanity_check_commands = [('mathematica', '--help')] +sanity_check_commands = [('mathematica', '--version')] moduleclass = 'math' -- GitLab From ad597adc4c819f12008afa8961f063db081c8d0b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 10 Oct 2016 10:45:10 +0200 Subject: [PATCH 412/741] add missing easyconfig for SCons build dep --- .../SCons-2.5.0-intel-2016b-Python-2.7.12.eb | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 easybuild/easyconfigs/s/SCons/SCons-2.5.0-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/s/SCons/SCons-2.5.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SCons/SCons-2.5.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..87b4206755 --- /dev/null +++ b/easybuild/easyconfigs/s/SCons/SCons-2.5.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'SCons' +version = '2.5.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.scons.org/' +description = "SCons is a software construction tool." + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] + +dependencies = [('Python', '2.7.12')] + +sanity_check_paths = { + 'files': ['bin/scons', 'bin/scons-time', 'bin/sconsign'], + 'dirs': ['lib/%(namelower)s-%(version)s/%(name)s'], +} + +options = {'modulename': False} + +moduleclass = 'devel' -- GitLab From 53916c86db511b3da983c2fcac214b1490531118 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 10 Oct 2016 10:52:51 +0200 Subject: [PATCH 413/741] add easyconfig OpenFOAM-3.0.1-intel-2016b.eb --- .../o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb new file mode 100644 index 0000000000..ca5d08b992 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb @@ -0,0 +1,36 @@ +name = 'OpenFOAM' +version = '3.0.1' + +homepage = 'http://www.openfoam.com/' +description = """OpenFOAM is a free, open source CFD software package. + OpenFOAM has an extensive range of features to solve anything from complex fluid flows + involving chemical reactions, turbulence and heat transfer, + to solid dynamics and electromagnetics.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'cstd': 'c++11'} + +source_urls = ['https://github.com/OpenFOAM/OpenFOAM-%(version_major_minor)s.x/archive'] +sources = ['version-%(version)s.tar.gz'] + +checksums = ['a6ffe3edabdd23f9eff31be47a092b07'] + +patches = ['OpenFOAM-3.0.0_cleanup.patch'] + +dependencies = [ + ('libreadline', '6.3'), + ('ncurses', '6.0'), + # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes) + ('METIS', '5.1.0'), + ('SCOTCH', '6.0.4'), + ('CGAL', '4.8.1'), + ('ParaView', '5.1.2', '-mpi'), +] + +builddependencies = [ + ('Bison', '3.0.4'), + ('CMake', '3.6.1'), + ('flex', '2.6.0'), +] + +moduleclass = 'cae' -- GitLab From 19600a8644c1836d4d0f8970112796f1ca5ffadc Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Mon, 10 Oct 2016 11:39:27 +0200 Subject: [PATCH 414/741] {math}[binary] MCR R2016a (REVIEW) --- easybuild/easyconfigs/m/MCR/MCR-R2016a.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/m/MCR/MCR-R2016a.eb diff --git a/easybuild/easyconfigs/m/MCR/MCR-R2016a.eb b/easybuild/easyconfigs/m/MCR/MCR-R2016a.eb new file mode 100644 index 0000000000..7314d95a8c --- /dev/null +++ b/easybuild/easyconfigs/m/MCR/MCR-R2016a.eb @@ -0,0 +1,18 @@ +name = 'MCR' +version = 'R2016a' + +homepage = 'http://www.mathworks.com/products/compiler/mcr/' +description = """The MATLAB Runtime is a standalone set of shared libraries + that enables the execution of compiled MATLAB applications + or components on computers that do not have MATLAB installed.""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = [ + 'http://www.mathworks.com/supportfiles/downloads/%(version)s/deployment_files/%(version)s/installers/glnxa64/', +] +sources = ['%(name)s_%(version)s_glnxa64_installer.zip'] + +dependencies = [('Java', '1.8.0_92')] + +moduleclass = 'math' -- GitLab From 0a014212513282bd90cce5fed9eb5d22366dd1a0 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Mon, 10 Oct 2016 11:53:15 +0200 Subject: [PATCH 415/741] requested changes --- easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb | 12 +++++------- easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch | 11 +++++++++++ 2 files changed, 16 insertions(+), 7 deletions(-) create mode 100644 easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch diff --git a/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb b/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb index 7c82e8b734..f47f929afb 100644 --- a/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb +++ b/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb @@ -13,21 +13,19 @@ toolchain = {'name': 'foss', 'version': '2016a'} sources = ['%(name)s_%(version)s.tgz'] source_urls = ['https://software.intel.com/sites/default/files/managed/a3/b2/'] -prebuildopts = 'export MPI_HOME=$EBROOTOPENMPI && cd src &&' +start_dir = 'src' +prebuildopts = 'export MPI_HOME=$EBROOTOPENMPI && ' buildopts = '-f make_mpich' -patches = ['IMB-make_mpich.patch'] +patches = ['IMB-%(version)s_make_mpich.patch'] parallel = 1 -files_to_copy = [ -(['src/%s' % binfile for binfile in ['IMB-RMA', 'IMB-EXT', 'IMB-NBC', 'IMB-MPI1']], 'bin'), -(['doc/IMB_Users_Guide.pdf'],'doc'), -] +files_to_copy = [(['src/IMB-*'], 'bin'), (['doc/IMB_Users_Guide.pdf'], 'doc')] sanity_check_paths = { 'files': ['bin/%s' % binfile for binfile in ['IMB-RMA', 'IMB-EXT', 'IMB-NBC', 'IMB-MPI1']], 'dirs': ['bin','doc'] } -moduleclass = 'tools' \ No newline at end of file +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch b/easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch new file mode 100644 index 0000000000..6805a1bc3c --- /dev/null +++ b/easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch @@ -0,0 +1,11 @@ +Prevent: Variable MPI_HOME="" does not seem to contain a valid mpicc. +Author: Fokke Dijkstra (University of Groningen) +--- src/make_mpich 2015-02-16 13:31:11.838082386 +0100 ++++ src/make_mpich 2015-02-16 13:40:19.000844455 +0100 +@@ -1,5 +1,5 @@ + # Enter root directory of mpich install +-MPI_HOME= ++#MPI_HOME= + + MPICC=$(shell find ${MPI_HOME} -name mpicc -print) + -- GitLab From b1eb59353a12fd8be5aaa1db252e2537f92a033b Mon Sep 17 00:00:00 2001 From: RvDijk Date: Mon, 10 Oct 2016 12:06:09 +0200 Subject: [PATCH 416/741] double quotes --- .../OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb b/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb index 1bc3f774aa..d25cf1b3ab 100644 --- a/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb +++ b/easybuild/easyconfigs/o/OSU-Micro-Benchmarks/OSU-Micro-Benchmarks-5.3.2-foss-2016a.eb @@ -11,7 +11,7 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = ['http://mvapich.cse.ohio-state.edu/download/mvapich/'] sources = [SOURCELOWER_TAR_GZ] -configopts = 'CC=$MPICC CXX=$MPICC' +configopts = 'CC="$MPICC" CXX="$MPICC"' benchmark_dirs = ['libexec/osu-micro-benchmarks/mpi/%s' % x for x in ['collective', 'one-sided', 'pt2pt']] modextrapaths = {'PATH': benchmark_dirs} -- GitLab From ce55d128d7a4238e8819075a97dc3274f62d77f2 Mon Sep 17 00:00:00 2001 From: Eliot Eshelman Date: Mon, 10 Oct 2016 16:12:08 -0400 Subject: [PATCH 417/741] Use the correct toolchain for OpenBLAS --- easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb b/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb index 1ae98dc94c..82819f4c5e 100644 --- a/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb +++ b/easybuild/easyconfigs/g/goolfc/goolfc-2016.08.eb @@ -30,7 +30,7 @@ dependencies = [ comp, # part of gompic ('CUDA', '7.5.18', '', comp), # part of gompic ('OpenMPI', '1.10.3', '', ('gcccuda', version)), # part of gompic - (blaslib, blasver, blassuff, comp_mpi_tc), + (blaslib, blasver, blassuff, comp), ('FFTW', '3.3.4', '', comp_mpi_tc), ('ScaLAPACK', '2.0.2', blas, comp_mpi_tc), ] -- GitLab From 42a8ceaddf7751e4ac9cdfc36dc096aae0d39c39 Mon Sep 17 00:00:00 2001 From: Eliot Eshelman Date: Mon, 10 Oct 2016 16:12:57 -0400 Subject: [PATCH 418/741] Add EasyConfig for HPL on goolfc-2016.08 --- .../h/HPL/HPL-2.2-goolfc-2016.08.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-goolfc-2016.08.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-goolfc-2016.08.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-goolfc-2016.08.eb new file mode 100644 index 0000000000..d1430d0e3a --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-goolfc-2016.08.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic +on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the +High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'goolfc', 'version': '2016.08'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' -- GitLab From b1e01ba7486d80d4d860df1af00d6172ef7d0c2a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 11 Oct 2016 11:23:03 +0200 Subject: [PATCH 419/741] add easyconfig scikit-learn-0.18-intel-2016b-Python-3.5.2.eb, add easyconfig matplotlib-1.5.1-intel-2016b-Python-3.5.2.eb --- ...tplotlib-1.5.1-intel-2016b-Python-3.5.2.eb | 45 +++++++++++++++++++ ...kit-learn-0.18-intel-2016b-Python-3.5.2.eb | 30 +++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.1-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.18-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.1-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.1-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..fe6afff731 --- /dev/null +++ b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.1-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,45 @@ +easyblock = 'Bundle' + +name = 'matplotlib' +version = '1.5.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://matplotlib.org' +description = """matplotlib is a python 2D plotting library which produces publication quality figures in a variety of + hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python + and ipython shell, web application servers, and six graphical user interface toolkits.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '3.5.2'), + ('freetype', '2.6.5'), + ('libpng', '1.6.24'), +] + +exts_list = [ + ('Cycler', '0.9.0', { + 'modulename': 'cycler', + 'source_urls': ['https://pypi.python.org/packages/source/C/Cycler'], + 'source_tmpl': 'cycler-%(version)s.tar.gz', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/m/matplotlib'], + 'patches': ['matplotlib-1.5.1_fix-Tcl-Tk-libdir.patch'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.18-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.18-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..a4cbd22622 --- /dev/null +++ b/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.18-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,30 @@ +easyblock = 'PythonPackage' + +name = 'scikit-learn' +version = '0.18' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://scikit-learn.org/stable/index.html' +description = """Scikit-learn integrates machine learning algorithms in the tightly-knit scientific Python world, +building upon numpy, scipy, and matplotlib. As a machine-learning module, +it provides versatile tools for data mining and analysis in any field of science and engineering. +It strives to be simple and efficient, accessible to everybody, and reusable in various contexts.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2'), + ('matplotlib', '1.5.1', versionsuffix), +] + +options = {'modulename': 'sklearn'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/sklearn'], +} + +moduleclass = 'data' -- GitLab From 800362e6f83be842ef18510079e90a9d3943817f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 11 Oct 2016 11:37:50 +0200 Subject: [PATCH 420/741] add easyconfig Keras-1.1.0-intel-2016b-Python-3.5.2.eb --- .../Keras-1.1.0-intel-2016b-Python-3.5.2.eb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/k/Keras/Keras-1.1.0-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/k/Keras/Keras-1.1.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/k/Keras/Keras-1.1.0-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..503271be94 --- /dev/null +++ b/easybuild/easyconfigs/k/Keras/Keras-1.1.0-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,28 @@ +easyblock = "PythonPackage" + +name = 'Keras' +version = '1.1.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://keras.io/' +description = """Keras is a minimalist, highly modular neural networks library, written in Python and +capable of running on top of either TensorFlow or Theano.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2'), + ('Theano', '0.8.2', versionsuffix), + ('h5py', '2.6.0', '%(versionsuffix)s-HDF5-1.8.17'), + ('PyYAML', '3.12', versionsuffix), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'math' -- GitLab From aee0cecafa3c1d21ec03a9ec2fc1802fb663919c Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 11 Oct 2016 11:47:11 +0200 Subject: [PATCH 421/741] {vis}[foss/2016b] X11/20160819 - libz and bzip2 deps added (REVIEW) --- .../fontconfig-2.12.1-foss-2016b.eb | 22 +++ .../f/freetype/freetype-2.6.5-foss-2016b.eb | 26 ++++ .../l/libpng/libpng-1.6.24-foss-2016b.eb | 26 ++++ .../pkg-config-0.29.1-foss-2016b.eb | 27 ++++ .../x/X11/X11-20160819-foss-2016b.eb | 131 ++++++++++++++++++ .../x/X11/X11-20160819-intel-2016b.eb | 2 + 6 files changed, 234 insertions(+) create mode 100644 easybuild/easyconfigs/f/fontconfig/fontconfig-2.12.1-foss-2016b.eb create mode 100644 easybuild/easyconfigs/f/freetype/freetype-2.6.5-foss-2016b.eb create mode 100644 easybuild/easyconfigs/l/libpng/libpng-1.6.24-foss-2016b.eb create mode 100644 easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.1-foss-2016b.eb create mode 100644 easybuild/easyconfigs/x/X11/X11-20160819-foss-2016b.eb diff --git a/easybuild/easyconfigs/f/fontconfig/fontconfig-2.12.1-foss-2016b.eb b/easybuild/easyconfigs/f/fontconfig/fontconfig-2.12.1-foss-2016b.eb new file mode 100644 index 0000000000..be4b439455 --- /dev/null +++ b/easybuild/easyconfigs/f/fontconfig/fontconfig-2.12.1-foss-2016b.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'fontconfig' +version = '2.12.1' + +homepage = 'http://www.freedesktop.org/software/fontconfig' +description = """Fontconfig is a library designed to provide system-wide font configuration, customization and +application access.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['http://www.freedesktop.org/software/fontconfig/release/'] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('expat', '2.2.0'), + ('freetype', '2.6.5'), +] + +configopts = '--disable-docs ' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.6.5-foss-2016b.eb b/easybuild/easyconfigs/f/freetype/freetype-2.6.5-foss-2016b.eb new file mode 100644 index 0000000000..9156052c8f --- /dev/null +++ b/easybuild/easyconfigs/f/freetype/freetype-2.6.5-foss-2016b.eb @@ -0,0 +1,26 @@ +name = 'freetype' +version = '2.6.5' + +homepage = 'http://freetype.org' +description = """FreeType 2 is a software font engine that is designed to be small, efficient, highly customizable, and + portable while capable of producing high-quality output (glyph images). It can be used in graphics libraries, display + servers, font conversion tools, text image generation tools, and many other products as well.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [GNU_SAVANNAH_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('libpng', '1.6.24'), + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ['bin/freetype-config', 'lib/libfreetype.a', 'lib/libfreetype.%s' % SHLIB_EXT, + 'lib/pkgconfig/freetype2.pc'], + 'dirs': ['include/freetype2'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.24-foss-2016b.eb b/easybuild/easyconfigs/l/libpng/libpng-1.6.24-foss-2016b.eb new file mode 100644 index 0000000000..9f690e65b2 --- /dev/null +++ b/easybuild/easyconfigs/l/libpng/libpng-1.6.24-foss-2016b.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'libpng' +version = '1.6.24' + +homepage = 'http://www.libpng.org/pub/png/libpng.html' +description = "libpng is the official PNG reference library" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('zlib', '1.2.8')] + +configopts = "--with-pic" + +majminver = ''.join(version.split('.')[:2]) +sanity_check_paths = { + 'files': ['include/pngconf.h', 'include/png.h', 'include/pnglibconf.h', 'lib/libpng.a', + 'lib/libpng.%s' % SHLIB_EXT, 'lib/libpng%s.a' % majminver, 'lib/libpng%s.%s' % (majminver, SHLIB_EXT)], + 'dirs': ['bin', 'include/libpng%s' % majminver, 'share/man'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.1-foss-2016b.eb b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.1-foss-2016b.eb new file mode 100644 index 0000000000..7e76d64603 --- /dev/null +++ b/easybuild/easyconfigs/p/pkg-config/pkg-config-0.29.1-foss-2016b.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'pkg-config' +version = '0.29.1' + +homepage = 'http://www.freedesktop.org/wiki/Software/pkg-config/' +description = """pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the + correct compiler options on the command line so an application can use + gcc -o test test.c `pkg-config --libs --cflags glib-2.0` + for instance, rather than hard-coding values on where to find glib (or other libraries).""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://pkgconfig.freedesktop.org/releases/'] + +# don't use PAX, it might break. +tar_config_opts = True + +configopts = " --with-internal-glib" + +sanity_check_paths = { + 'files': ['bin/pkg-config'], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/x/X11/X11-20160819-foss-2016b.eb b/easybuild/easyconfigs/x/X11/X11-20160819-foss-2016b.eb new file mode 100644 index 0000000000..c44e65c206 --- /dev/null +++ b/easybuild/easyconfigs/x/X11/X11-20160819-foss-2016b.eb @@ -0,0 +1,131 @@ +easyblock = 'Bundle' + +name = 'X11' +version = '20160819' + +homepage = 'https://www.x.org' +description = "The X Window System (X11) is a windowing system for bitmap displays" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [ + XORG_LIB_SOURCE, + XORG_PROTO_SOURCE, + 'http://xcb.freedesktop.org/dist/', + 'http://xkbcommon.org/download/', + 'http://cgit.freedesktop.org/xorg/util/macros/snapshot', +] + +builddependencies = [ + ('Autotools', '20150215'), + ('pkg-config', '0.29.1'), +] +dependencies = [ + ('freetype', '2.6.5'), + ('fontconfig', '2.12.1'), + ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), +] + +default_easyblock = 'ConfigureMake' + +common_specs = { + 'sources': [SOURCE_TAR_GZ], + 'start_dir': '%(name)s-%(version)s', +} +components = [ + ('xorg-macros', '1.19.0', { + 'sources': ['util-macros-%(version)s.tar.gz'], + 'start_dir': 'util-macros-%(version)s', + }), + ('libpthread-stubs', '0.3', common_specs), + ('bigreqsproto', '1.1.2', common_specs), + ('compositeproto', '0.4.2', common_specs), + ('damageproto', '1.2.1', common_specs), + ('dmxproto', '2.3.1', common_specs), + ('dri2proto', '2.8', common_specs), + ('dri3proto', '1.0', common_specs), + ('fixesproto', '5.0', common_specs), + ('fontsproto', '2.1.3', common_specs), + ('glproto', '1.4.17', common_specs), + ('inputproto', '2.3.1', common_specs), + ('kbproto', '1.0.7', common_specs), + ('presentproto', '1.0', common_specs), + ('randrproto', '1.5.0', common_specs), + ('recordproto', '1.14.2', common_specs), + ('renderproto', '0.11', common_specs), + ('resourceproto', '1.2.0', common_specs), + ('scrnsaverproto', '1.2.2', common_specs), + ('videoproto', '2.3.3', common_specs), + ('xcmiscproto', '1.2.2', common_specs), + ('xextproto', '7.3.0', common_specs), + ('xf86bigfontproto', '1.2.0', common_specs), + ('xf86dgaproto', '2.1', common_specs), + ('xf86driproto', '2.1.1', common_specs), + ('xf86vidmodeproto', '2.3.1', common_specs), + ('xineramaproto', '1.2.1', common_specs), + ('xproto', '7.0.28', common_specs), + ('libXau', '1.0.8', common_specs), + ('libXdmcp', '1.1.2', common_specs), + ('xcb-proto', '1.11', common_specs), + ('libxcb', '1.11.1', common_specs), + ('xtrans', '1.3.5', common_specs), + ('libxkbcommon', '0.6.1', { + 'sources': ['libxkbcommon-%(version)s.tar.xz'], + 'start_dir': 'libxkbcommon-%(version)s', + }), + ('libX11', '1.6.3', common_specs), + ('libXext', '1.3.3', common_specs), + ('libFS', '1.0.7', common_specs), + ('libICE', '1.0.9', common_specs), + ('libSM', '1.2.2', common_specs), + ('libXScrnSaver', '1.2.2', common_specs), + ('libXt', '1.1.5', common_specs), + ('libXmu', '1.1.2', common_specs), + ('libXpm', '3.5.11', common_specs), + ('libXaw', '1.0.13', common_specs), + ('libXfixes', '5.0.2', common_specs), + ('libXcomposite', '0.4.4', common_specs), + ('libXrender', '0.9.9', common_specs), + ('libXcursor', '1.1.14', common_specs), + ('libXdamage', '1.1.4', common_specs), + ('libfontenc', '1.1.3', common_specs), + ('libXfont', '1.5.1', common_specs), + ('libXft', '2.3.2', common_specs), + ('libXi', '1.7.6', common_specs), + ('libXinerama', '1.1.3', common_specs), + ('libXrandr', '1.5.0', common_specs), + ('libXres', '1.0.7', common_specs), + ('libXtst', '1.2.2', common_specs), + ('libXv', '1.0.10', common_specs), + ('libXvMC', '1.0.9', common_specs), + ('libXxf86dga', '1.1.4', common_specs), + ('libXxf86vm', '1.1.4', common_specs), + ('libdmx', '1.1.3', common_specs), + ('libpciaccess', '0.13.4', common_specs), + ('libxkbfile', '1.0.9', common_specs), + ('libxshmfence', '1.2', common_specs), + ('xcb-util', '0.4.0', common_specs), + ('xcb-util-image', '0.4.0', common_specs), + ('xcb-util-keysyms', '0.4.0', common_specs), + ('xcb-util-renderutil', '0.3.9', common_specs), + ('xcb-util-wm', '0.4.1', common_specs), + ('xcb-util-cursor', '0.1.3', common_specs), +] + +# Python is required for xcb-proto +allow_system_deps = [('Python', SYS_PYTHON_VERSION)] +pyshortver = '.'.join(SYS_PYTHON_VERSION.split('.')[0:2]) + +preconfigopts = "if [ ! -f configure ]; then ./autogen.sh; fi && " + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['include/X11/Xlib.h', 'include/X11/Xutil.h'], + 'dirs': ['include/GL', 'include/X11', 'include/X11/extensions', 'lib', + 'lib/python%s/site-packages/xcbgen' % pyshortver, 'lib/pkgconfig', 'share/pkgconfig'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/x/X11/X11-20160819-intel-2016b.eb b/easybuild/easyconfigs/x/X11/X11-20160819-intel-2016b.eb index f735807177..556bda9f6e 100644 --- a/easybuild/easyconfigs/x/X11/X11-20160819-intel-2016b.eb +++ b/easybuild/easyconfigs/x/X11/X11-20160819-intel-2016b.eb @@ -23,6 +23,8 @@ builddependencies = [ dependencies = [ ('freetype', '2.6.5'), ('fontconfig', '2.12.1'), + ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), ] default_easyblock = 'ConfigureMake' -- GitLab From 1cd35e36a2f2177505dba9c8e0f968c4a5cf8c3e Mon Sep 17 00:00:00 2001 From: Fokke Dijkstra Date: Tue, 11 Oct 2016 11:49:17 +0200 Subject: [PATCH 422/741] * Renamed Pillow to make clear that this version depends on freetype 2.6.3. * Adjusted dependencies of scikit-image to matplotlib and Pillow for freetype 2.6.3. --- ...Pillow-3.2.0-foss-2016a-Python-2.7.11-freetype-2.6.3.eb} | 5 ++++- .../scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) rename easybuild/easyconfigs/p/Pillow/{Pillow-3.2.0-foss-2016a-Python-2.7.11.eb => Pillow-3.2.0-foss-2016a-Python-2.7.11-freetype-2.6.3.eb} (85%) diff --git a/easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11-freetype-2.6.3.eb similarity index 85% rename from easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11.eb rename to easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11-freetype-2.6.3.eb index b7a1d9ade1..16cea8d33b 100644 --- a/easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/p/Pillow/Pillow-3.2.0-foss-2016a-Python-2.7.11-freetype-2.6.3.eb @@ -13,13 +13,16 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] +freetype_ver = '2.6.3' +versionsuffix += '-freetype-%s' % freetype_ver + dependencies = [ ('Python', '2.7.11'), ('libjpeg-turbo', '1.4.2','-NASM-2.12.01'), ('libpng', '1.6.21'), ('zlib', '1.2.8'), ('LibTIFF', '4.0.6'), - ('freetype', '2.6.3'), + ('freetype', freetype_ver), ] options = {'modulename': 'PIL'} diff --git a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb index fd95fa30d2..4f0de6e8da 100644 --- a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb +++ b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-foss-2016a-Python-2.7.11.eb @@ -15,12 +15,14 @@ toolchain = {'name': 'foss', 'version': '2016a'} source_urls = [PYPI_SOURCE] sources = [SOURCE_TAR_GZ] +freetype_ver = '2.6.3' + dependencies = [ ('Python', '2.7.11'), ('Qhull', '2015.2'), - ('matplotlib', '1.5.1', versionsuffix), + ('matplotlib', '1.5.1', versionsuffix + '-freetype-%s' % freetype_ver), ('networkx', '1.11', versionsuffix), - ('Pillow', '3.2.0', versionsuffix), + ('Pillow', '3.2.0', versionsuffix + '-freetype-%s' % freetype_ver), ] options = {'modulename': 'skimage'} -- GitLab From 87490e1b53faf57b95a8e6fb4deed920e1542859 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 11 Oct 2016 12:48:08 +0200 Subject: [PATCH 423/741] stick to SUNDIALS 2.6.2, add 3to2 as build dep, enable running of Cantera tests --- .../3to2-1.1.1-intel-2016b-Python-2.7.12.eb | 25 +++++++++++++++++++ ...Cantera-2.2.1-intel-2016b-Python-2.7.12.eb | 15 +++++++---- 2 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 easybuild/easyconfigs/0/3to2/3to2-1.1.1-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/0/3to2/3to2-1.1.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/0/3to2/3to2-1.1.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..264a6e4ac8 --- /dev/null +++ b/easybuild/easyconfigs/0/3to2/3to2-1.1.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,25 @@ +easyblock = 'PythonPackage' + +name = '3to2' +version = '1.1.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/3to2' +description = """lib3to2 is a set of fixers that are intended to backport code written for Python version 3.x + into Python version 2.x.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_ZIP] + +dependencies = [('Python', '2.7.12')] + +options = {'modulename': 'lib3to2'} + +sanity_check_paths = { + 'files': ['bin/3to2'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/c/Cantera/Cantera-2.2.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/c/Cantera/Cantera-2.2.1-intel-2016b-Python-2.7.12.eb index d95d3fc7c6..df2115bf2e 100644 --- a/easybuild/easyconfigs/c/Cantera/Cantera-2.2.1-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/c/Cantera/Cantera-2.2.1-intel-2016b-Python-2.7.12.eb @@ -15,13 +15,18 @@ sources = ['v%(version)s.tar.gz'] dependencies = [ ('Python', '2.7.12'), ('Boost', '1.61.0', versionsuffix), - ('SUNDIALS', '2.7.0'), + ('SUNDIALS', '2.6.2'), +] +builddependencies = [ + ('SCons', '2.5.0', versionsuffix), + ('3to2', '1.1.1', versionsuffix), ] -builddependencies = [('SCons', '2.5.0', versionsuffix)] -buildopts = 'CC="$CC" CXX="$CXX" env=all blas_lapack_libs=mkl_rt blas_lapack_dir=$BLAS_LAPACK_LIB_DIR' -buildopts += ' sundials_include=$EBROOTSUNDIALS/include sundials_libdir=$EBROOTSUNDIALS/lib' -#runtest = 'test' +common_opts = 'env_vars=all CC="$CC" CXX="$CXX" blas_lapack_libs=mkl_rt blas_lapack_dir=$BLAS_LAPACK_LIB_DIR' +common_opts += ' sundials_include=$EBROOTSUNDIALS/include sundials_libdir=$EBROOTSUNDIALS/lib' +buildopts = 'build ' + common_opts +runtest = 'test ' + common_opts +buildopts = 'install ' + common_opts prefix_arg = 'prefix=' modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} -- GitLab From cf64ee0fb6e4820dcb6d8bdf86b742a81132dd89 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 11 Oct 2016 12:48:46 +0200 Subject: [PATCH 424/741] use 'letter_dir_for' function rather than just grabbing 1st letter of software name in easyconfigs tests --- test/easyconfigs/easyconfigs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index 3deb2e88ee..3de6473cca 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -46,7 +46,7 @@ from easybuild.easyblocks.generic.configuremake import ConfigureMake from easybuild.framework.easyblock import EasyBlock from easybuild.framework.easyconfig.default import DEFAULT_CONFIG from easybuild.framework.easyconfig.easyconfig import EasyConfig -from easybuild.framework.easyconfig.easyconfig import get_easyblock_class, resolve_template +from easybuild.framework.easyconfig.easyconfig import get_easyblock_class, letter_dir_for, resolve_template from easybuild.framework.easyconfig.parser import EasyConfigParser, fetch_parameters_from_easyconfig from easybuild.framework.easyconfig.tools import dep_graph, get_paths_for, process_easyconfig from easybuild.tools import config @@ -211,7 +211,7 @@ def template_easyconfig_test(self, spec): name, easyblock = fetch_parameters_from_easyconfig(ec.rawtxt, ['name', 'easyblock']) # make sure easyconfig file is in expected location - expected_subdir = os.path.join('easybuild', 'easyconfigs', name.lower()[0], name) + expected_subdir = os.path.join('easybuild', 'easyconfigs', letter_dir_for(name), name) subdir = os.path.join(*spec.split(os.path.sep)[-5:-1]) fail_msg = "Easyconfig file %s not in expected subdirectory %s" % (spec, expected_subdir) self.assertEqual(expected_subdir, subdir, fail_msg) -- GitLab From 302ab073ba386b70234e0b5711c0961f5076aab7 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Tue, 11 Oct 2016 12:55:20 +0200 Subject: [PATCH 425/741] Add easyconfigs for GROMACS 2016. Boost is only a build dep of Gromacs. Gromacs now contains tinyxml and thus do not depend on libxml2 any longer. --- .../GROMACS/GROMACS-2016-foss-2016b-hybrid.eb | 38 +++++++++++++++++++ .../g/GROMACS/GROMACS-2016-foss-2016b-mt.eb | 37 ++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb create mode 100644 easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-mt.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb new file mode 100644 index 0000000000..781809d07e --- /dev/null +++ b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb @@ -0,0 +1,38 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University +# Authors:: Wiktor Jurkowski , Fotis Georgatos , \ +# George Tsouloupas , Kenneth Hoste +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-93.html +# +# Version 5.1.4 +# Author: Adam Huffman +# The Francis Crick Institute +## + +name = 'GROMACS' +version = '2016' +versionsuffix = '-hybrid' + +homepage = 'http://www.gromacs.org' +description = """GROMACS is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'openmp': True, 'usempi': True} + +source_urls = ['ftp://ftp.gromacs.org/pub/gromacs/'] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [ + ('CMake', '3.5.2'), + ('Boost', '1.61.0'), +] + + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-mt.eb b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-mt.eb new file mode 100644 index 0000000000..b1fa93887b --- /dev/null +++ b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-mt.eb @@ -0,0 +1,37 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University +# Authors:: Wiktor Jurkowski , Fotis Georgatos , \ +# George Tsouloupas , Kenneth Hoste +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-93.html +# +# Version 5.1.4 +# Author: Adam Huffman +# The Francis Crick Institute +## + +name = 'GROMACS' +version = '2016' +versionsuffix = '-mt' + +homepage = 'http://www.gromacs.org' +description = """GROMACS is a versatile package to perform molecular dynamics, + i.e. simulate the Newtonian equations of motion for systems with hundreds to millions of particles.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'openmp': True, 'usempi': False} + +source_urls = ['ftp://ftp.gromacs.org/pub/gromacs/'] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [ + ('CMake', '3.5.2'), + ('Boost', '1.61.0'), +] + +moduleclass = 'bio' -- GitLab From 2933a74b36b309d5b7bfd3507f2a59c28125f363 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 11 Oct 2016 12:57:38 +0200 Subject: [PATCH 426/741] add easyconfig for SUNDIALS 2.6.2 --- .../s/SUNDIALS/SUNDIALS-2.6.2-intel-2016b.eb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-2.6.2-intel-2016b.eb diff --git a/easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-2.6.2-intel-2016b.eb b/easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-2.6.2-intel-2016b.eb new file mode 100644 index 0000000000..db3419830f --- /dev/null +++ b/easybuild/easyconfigs/s/SUNDIALS/SUNDIALS-2.6.2-intel-2016b.eb @@ -0,0 +1,29 @@ +easyblock = 'CMakeMake' + +name = 'SUNDIALS' +version = '2.6.2' + +homepage = 'http://computation.llnl.gov/projects/sundials' +description = "SUNDIALS: SUite of Nonlinear and DIfferential/ALgebraic Equation Solvers" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'openmp': True, 'usempi': True} + +source_urls = ['http://computation.llnl.gov/projects/sundials/download/'] +sources = [SOURCELOWER_TAR_GZ] + +builddependencies = [('CMake', '3.6.2')] + +separate_build_dir = True + +configopts = "-DMPI_ENABLE=ON -DOPENMP_ENABLE=ON -DLAPACK_ENABLE=ON" + +solvers = ['arkode', 'cvode', 'cvodes', 'ida', 'idas', 'kinsol'] +sanity_check_paths = { + 'files': ['lib/libsundials_%s.a' % s for s in solvers + ['nvecopenmp', 'nvecparallel', 'nvecserial']] + + ['lib/libsundials_%s.%s' % (s, SHLIB_EXT) for s in solvers + ['nvecopenmp', 'nvecparallel', 'nvecserial']], + 'dirs': ['examples/%s' % s for s in solvers] + ['include/%s' % s for s in solvers] + + ['examples/nvector', 'include/nvector', 'include/sundials'], +} + +moduleclass = 'math' -- GitLab From fb6e46bc6cbfbe8809d577b9c07d8416d99fefb5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 11 Oct 2016 13:32:45 +0200 Subject: [PATCH 427/741] fix test_easyconfig_locations w.r.t. '0' letter dir used for 3to2 --- test/easyconfigs/easyconfigs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index 3de6473cca..55faff811d 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -169,7 +169,7 @@ class EasyConfigTest(TestCase): def test_easyconfig_locations(self): """Make sure all easyconfigs files are in the right location.""" - easyconfig_dirs_regex = re.compile(r'/easybuild/easyconfigs/[a-z]/[^/]+$') + easyconfig_dirs_regex = re.compile(r'/easybuild/easyconfigs/[0a-z]/[^/]+$') topdir = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) for (dirpath, _, filenames) in os.walk(topdir): # ignore git/svn dirs -- GitLab From 1fbe2a84a6343e8580305e2a7d011d73e64f4f20 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Tue, 11 Oct 2016 14:10:49 +0200 Subject: [PATCH 428/741] Create a goolfc toolchain using CUDA 8.0.44 and the latest versions of the dependencies. CUDA 8.0.44 GCC 5.4.0-2.26 (Cuda still doesn't support any newer GCC compiler) FFTW 3.3.5 OpenBLAS 0.2.19/Lapack 3.6.1 OpenMPI 2.0.1 Scalapack 2.0.2 --- .../c/CUDA/CUDA-8.0.44-GCC-5.4.0-2.26.eb | 19 +++++++ .../f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb | 34 +++++++++++++ .../g/gcccuda/gcccuda-2016.10.0.eb | 21 ++++++++ .../easyconfigs/g/gompic/gompic-2016.10.0.eb | 23 +++++++++ .../easyconfigs/g/goolfc/goolfc-2016.10.0.eb | 38 ++++++++++++++ .../h/hwloc/hwloc-1.11.4-gcccuda-2016.10.0.eb | 23 +++++++++ ...AS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb | 49 +++++++++++++++++++ .../OpenMPI-2.0.1-gcccuda-2016.10.0.eb | 38 ++++++++++++++ ...-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb | 25 ++++++++++ 9 files changed, 270 insertions(+) create mode 100644 easybuild/easyconfigs/c/CUDA/CUDA-8.0.44-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb create mode 100644 easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.0.eb create mode 100644 easybuild/easyconfigs/g/gompic/gompic-2016.10.0.eb create mode 100644 easybuild/easyconfigs/g/goolfc/goolfc-2016.10.0.eb create mode 100644 easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.0.eb create mode 100644 easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb create mode 100644 easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb diff --git a/easybuild/easyconfigs/c/CUDA/CUDA-8.0.44-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/c/CUDA/CUDA-8.0.44-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..414d7ab092 --- /dev/null +++ b/easybuild/easyconfigs/c/CUDA/CUDA-8.0.44-GCC-5.4.0-2.26.eb @@ -0,0 +1,19 @@ +name = 'CUDA' +version = '8.0.44' + +homepage = 'https://developer.nvidia.com/cuda-toolkit' +description = """CUDA (formerly Compute Unified Device Architecture) is a parallel + computing platform and programming model created by NVIDIA and implemented by the + graphics processing units (GPUs) that they produce. CUDA gives developers access + to the virtual instruction set and memory of the parallel computational elements in CUDA GPUs.""" + +toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} + +source_urls = [ + 'http://developer.download.nvidia.com/compute/cuda/%(version_major_minor)s/Prod/local_installers/', + 'https://developer.nvidia.com/compute/cuda/%(version_major_minor)s/prod/local_installers/' +] + +sources = ['%(namelower)s_%(version)s_linux-run'] + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb new file mode 100644 index 0000000000..c7b43ae2f7 --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'FFTW' +version = '3.3.5' + +homepage = 'http://www.fftw.org' +description = """FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) + in one or more dimensions, of arbitrary input size, and of both real and complex data.""" + +toolchain = {'name': 'gompic', 'version': '2016.10.0'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [homepage] + +common_configopts = "--enable-threads --enable-openmp --with-pic" + +configopts = [ + common_configopts + " --enable-single --enable-sse2 --enable-avx --enable-avx2 --enable-mpi", + common_configopts + " --enable-long-double --enable-mpi", + common_configopts + " --enable-quad-precision", + common_configopts + " --enable-sse2 --enable-avx --enable-avx2 --enable-mpi", # default as last +] + +sanity_check_paths = { + 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom', 'q-wisdom']] + + ['include/fftw3%s' % x for x in ['-mpi.f03', '-mpi.h', '.f', '.f03', + '.h', 'l-mpi.f03', 'l.f03', 'q.f03']] + + ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']] + + ['lib/libfftw3q.a', 'lib/libfftw3q_omp.a'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.0.eb b/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.0.eb new file mode 100644 index 0000000000..3d0ba0c9cf --- /dev/null +++ b/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.0.eb @@ -0,0 +1,21 @@ +easyblock = "Toolchain" + +name = 'gcccuda' +version = '2016.10.0' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolchain, along with CUDA toolkit.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +comp_name = 'GCC' +comp_ver = '5.4.0-2.26' +comp = (comp_name, comp_ver) + +# compiler toolchain dependencies +dependencies = [ + comp, + ('CUDA', '8.0.44', '', comp), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/g/gompic/gompic-2016.10.0.eb b/easybuild/easyconfigs/g/gompic/gompic-2016.10.0.eb new file mode 100644 index 0000000000..b0c994f8de --- /dev/null +++ b/easybuild/easyconfigs/g/gompic/gompic-2016.10.0.eb @@ -0,0 +1,23 @@ +easyblock = "Toolchain" + +name = 'gompic' +version = '2016.10.0' + +homepage = '(none)' +description = """GNU Compiler Collection (GCC) based compiler toolchain along with CUDA toolkit, + including OpenMPI for MPI support with CUDA features enabled.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +comp_name = 'GCC' +comp_ver = '5.4.0-2.26' +comp = (comp_name, comp_ver) + +# compiler toolchain dependencies +dependencies = [ + comp, # part of gcccuda + ('CUDA', '8.0.44', '', comp), # part of gcccuda + ('OpenMPI', '2.0.1', '', ('gcccuda', version)), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/g/goolfc/goolfc-2016.10.0.eb b/easybuild/easyconfigs/g/goolfc/goolfc-2016.10.0.eb new file mode 100644 index 0000000000..6fd9d7c78b --- /dev/null +++ b/easybuild/easyconfigs/g/goolfc/goolfc-2016.10.0.eb @@ -0,0 +1,38 @@ +easyblock = "Toolchain" + +name = 'goolfc' +version = '2016.10.0' + +homepage = '(none)' +description = """GCC based compiler toolchain __with CUDA support__, and including + OpenMPI for MPI support, OpenBLAS (BLAS and LAPACK support), FFTW and ScaLAPACK.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +comp_name = 'GCC' +comp_ver = '5.4.0-2.26' +comp = (comp_name, comp_ver) + +# toolchain used to build goolfc dependencies +comp_mpi_tc_name = 'gompic' +comp_mpi_tc_ver = version +comp_mpi_tc = (comp_mpi_tc_name, comp_mpi_tc_ver) + +blaslib = 'OpenBLAS' +blasver = '0.2.19' +blassuff = '-LAPACK-3.6.1' +blas = '-%s-%s%s' % (blaslib, blasver, blassuff) + +# compiler toolchain dependencies +# we need GCC and OpenMPI as explicit dependencies instead of gompi toolchain +# because of toolchain preperation functions +dependencies = [ + comp, # part of gompic + ('CUDA', '8.0.44', '', comp), # part of gompic + ('OpenMPI', '2.0.1', '', ('gcccuda', version)), # part of gompic + (blaslib, blasver, blassuff, comp_mpi_tc), + ('FFTW', '3.3.5', '', comp_mpi_tc), + ('ScaLAPACK', '2.0.2', blas, comp_mpi_tc), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.0.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.0.eb new file mode 100644 index 0000000000..20cd96a781 --- /dev/null +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.0.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'hwloc' +version = '1.11.4' + +homepage = 'http://www.open-mpi.org/projects/hwloc/' +description = """The Portable Hardware Locality (hwloc) software package provides a portable abstraction +(across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including +NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various +system attributes such as cache and memory information as well as the locality of I/O devices such as +network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering +information about modern computing hardware so as to exploit it accordingly and efficiently.""" + +toolchain = {'name': 'gcccuda', 'version': '2016.10.0'} + +source_urls = ['http://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] +sources = [SOURCE_TAR_GZ] + +dependencies = [('numactl', '2.0.11')] + +configopts = "--enable-libnuma=$EBROOTNUMACTL" + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb new file mode 100644 index 0000000000..665e61e6ba --- /dev/null +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb @@ -0,0 +1,49 @@ +easyblock = 'ConfigureMake' + +name = 'OpenBLAS' +version = '0.2.19' + +lapackver = '3.6.1' +versionsuffix = '-LAPACK-%s' % lapackver + +homepage = 'http://xianyi.github.com/OpenBLAS/' +description = """OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.""" + +toolchain = {'name': 'gompic', 'version': '2016.10.0'} + +lapack_src = 'lapack-%s.tgz' % lapackver +large_src = 'large.tgz' +timing_src = 'timing.tgz' +sources = [ + 'v%(version)s.tar.gz', + lapack_src, + large_src, + timing_src, +] +source_urls = [ + # order matters, trying to download the LAPACK tarball from GitHub causes trouble + "http://www.netlib.org/lapack/", + "http://www.netlib.org/lapack/timing/", + "https://github.com/xianyi/OpenBLAS/archive/", +] + +patches = [ + (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir + (large_src, '.'), + (timing_src, '.'), +] + +skipsteps = ['configure'] + +threading = 'USE_THREAD=1' +buildopts = 'BINARY=64 ' + threading + ' CC="$CC" FC="$F77"' +installopts = threading + " PREFIX=%(installdir)s" + +sanity_check_paths = { + 'files': ['include/cblas.h', 'include/f77blas.h', 'include/lapacke_config.h', 'include/lapacke.h', + 'include/lapacke_mangling.h', 'include/lapacke_utils.h', 'include/openblas_config.h', + 'lib/libopenblas.a', 'lib/libopenblas.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb new file mode 100644 index 0000000000..6759d4aca3 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb @@ -0,0 +1,38 @@ +easyblock = 'ConfigureMake' + +name = 'OpenMPI' +version = '2.0.1' + +homepage = 'http://www.open-mpi.org/' +description = """The Open MPI Project is an open source MPI-2 implementation.""" + +toolchain = {'name': 'gcccuda', 'version': '2016.10.0'} + +sources = [SOURCELOWER_TAR_GZ] + +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] + +#patches = [ +# 'OpenMPI-%(version)s_common-cuda-lib.patch', +# 'OpenMPI-%(version)s-vt_cupti_events.patch', +#] + +dependencies = [('hwloc', '1.11.4')] + +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' +configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path +configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support +configopts += '--with-cuda=$CUDA_HOME ' # CUDA-aware build; N.B. --disable-dlopen is incompatible + +# needed for --with-verbs +osdependencies = [('libibverbs-dev', 'libibverbs-devel'),] + +libs = ["mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte"] +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], + 'dirs': [], +} + +moduleclass = 'mpi' diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb new file mode 100644 index 0000000000..dabe226ac2 --- /dev/null +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb @@ -0,0 +1,25 @@ +name = 'ScaLAPACK' +version = '2.0.2' + +homepage = 'http://www.netlib.org/scalapack/' +description = """The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines + redesigned for distributed memory MIMD parallel computers.""" + +toolchain = {'name': 'gompic', 'version': '2016.10.0'} +toolchainopts = {'pic': True} + +source_urls = [homepage] +sources = [SOURCELOWER_TGZ] + +blaslib = 'OpenBLAS' +blasver = '0.2.19' +blassuff = '-LAPACK-3.6.1' + +versionsuffix = "-%s-%s%s" % (blaslib, blasver, blassuff) + +dependencies = [(blaslib, blasver, blassuff)] + +# parallel build tends to fail, so disabling it +parallel = 1 + +moduleclass = 'numlib' -- GitLab From 5ccc895904db2b0e053d3108dec7855ab29ae77a Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Tue, 11 Oct 2016 14:25:14 +0200 Subject: [PATCH 429/741] Add numactl-2.0.11-gcccuda-2016.10.0.eb config for the goo9lfc-2016.10.0 toolchain. --- .../numactl-2.0.11-gcccuda-2016.10.0.eb | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.0.eb diff --git a/easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.0.eb b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.0.eb new file mode 100644 index 0000000000..6ee99ec4e4 --- /dev/null +++ b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.0.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'numactl' +version = '2.0.11' + +homepage = 'http://oss.sgi.com/projects/libnuma/' +description = """The numactl program allows you to run your application program on specific cpu's and memory nodes. + It does this by supplying a NUMA memory policy to the operating system before running your program. + The libnuma library provides convenient ways for you to add NUMA memory policies into your own program.""" + +toolchain = {'name': 'gcccuda', 'version': '2016.10.0'} + +source_urls = ['ftp://oss.sgi.com/www/projects/libnuma/download/'] +sources = [SOURCE_TAR_GZ] + +checksums = ['d3bc88b7ddb9f06d60898f4816ae9127'] + +sanity_check_paths = { + 'files': ['bin/numactl', 'bin/numastat', 'lib/libnuma.%s' % SHLIB_EXT, 'lib/libnuma.a'], + 'dirs': ['share/man', 'include'] +} + +moduleclass = 'tools' -- GitLab From 02c0b0677fbe688b91aabc2e7444e581c92dd52e Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 11 Oct 2016 15:04:12 +0200 Subject: [PATCH 430/741] {numlib}[{gompi,intel}/2016b] FFTW 3.3.5 (REVIEW) --- .../f/FFTW/FFTW-3.3.5-gompi-2016b.eb | 34 +++++++++++++++++++ .../f/FFTW/FFTW-3.3.5-intel-2016b.eb | 34 +++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016b.eb create mode 100644 easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016b.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016b.eb new file mode 100644 index 0000000000..e222c97b5d --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompi-2016b.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'FFTW' +version = '3.3.5' + +homepage = 'http://www.fftw.org' +description = """FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) + in one or more dimensions, of arbitrary input size, and of both real and complex data.""" + +toolchain = {'name': 'gompi', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [homepage] + +common_configopts = "--enable-threads --enable-openmp --with-pic" + +configopts = [ + common_configopts + " --enable-single --enable-sse2 --enable-mpi", + common_configopts + " --enable-long-double --enable-mpi", + common_configopts + " --enable-quad-precision", + common_configopts + " --enable-sse2 --enable-mpi", # default as last +] + +sanity_check_paths = { + 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom', 'q-wisdom']] + + ['include/fftw3%s' % x for x in ['-mpi.f03', '-mpi.h', '.f', '.f03', + '.h', 'l-mpi.f03', 'l.f03', 'q.f03']] + + ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']] + + ['lib/libfftw3q.a', 'lib/libfftw3q_omp.a'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb new file mode 100644 index 0000000000..83943a28dd --- /dev/null +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'FFTW' +version = '3.3.5' + +homepage = 'http://www.fftw.org' +description = """FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) + in one or more dimensions, of arbitrary input size, and of both real and complex data.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [homepage] + +common_configopts = "--enable-threads --enable-openmp --with-pic" + +configopts = [ + common_configopts + " --enable-single --enable-sse2 --enable-mpi", + common_configopts + " --enable-long-double --enable-mpi", + common_configopts + " --enable-quad-precision", + common_configopts + " --enable-sse2 --enable-mpi", # default as last +] + +sanity_check_paths = { + 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom', 'q-wisdom']] + + ['include/fftw3%s' % x for x in ['-mpi.f03', '-mpi.h', '.f', '.f03', + '.h', 'l-mpi.f03', 'l.f03', 'q.f03']] + + ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']] + + ['lib/libfftw3q.a', 'lib/libfftw3q_omp.a'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'numlib' -- GitLab From 84e49e7ea67a67099bdc5b8cd19cdad586a2347f Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 11 Oct 2016 15:26:39 +0200 Subject: [PATCH 431/741] Remove quad prec from intel version --- easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb index 83943a28dd..6fcdd25eb5 100644 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-intel-2016b.eb @@ -15,19 +15,19 @@ source_urls = [homepage] common_configopts = "--enable-threads --enable-openmp --with-pic" +# no quad precision, requires GCC v4.6 or higher +# see also http://www.fftw.org/doc/Extended-and-quadruple-precision-in-Fortran.html configopts = [ common_configopts + " --enable-single --enable-sse2 --enable-mpi", common_configopts + " --enable-long-double --enable-mpi", - common_configopts + " --enable-quad-precision", common_configopts + " --enable-sse2 --enable-mpi", # default as last ] sanity_check_paths = { - 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom', 'q-wisdom']] + + 'files': ['bin/fftw%s' % x for x in ['-wisdom', '-wisdom-to-conf', 'f-wisdom', 'l-wisdom']] + ['include/fftw3%s' % x for x in ['-mpi.f03', '-mpi.h', '.f', '.f03', '.h', 'l-mpi.f03', 'l.f03', 'q.f03']] + - ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']] + - ['lib/libfftw3q.a', 'lib/libfftw3q_omp.a'], + ['lib/libfftw3%s%s.a' % (x, y) for x in ['', 'f', 'l'] for y in ['', '_mpi', '_omp', '_threads']], 'dirs': ['lib/pkgconfig'], } -- GitLab From 0d4521ddb7249cb3d67fb535c6176a60221cdc7d Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 11 Oct 2016 16:04:49 +0200 Subject: [PATCH 432/741] {vis}[intel/2016b] FLTK/1.3.3 (REVIEW) --- .../f/FLTK/FLTK-1.3.3-intel-2016b.eb | 36 +++++++++++++++++++ .../x/xprop/xprop-1.2.2-intel-2016b.eb | 30 ++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016b.eb create mode 100644 easybuild/easyconfigs/x/xprop/xprop-1.2.2-intel-2016b.eb diff --git a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016b.eb b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016b.eb new file mode 100644 index 0000000000..0fe5be2665 --- /dev/null +++ b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016b.eb @@ -0,0 +1,36 @@ +# +# author: Dina Mahmoud Ibrahim ( Cairo University ) +# +easyblock = 'ConfigureMake' + +name = 'FLTK' +version = '1.3.3' + +homepage = 'http://www.fltk.org' +description = """FLTK is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, + and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL + and its built-in GLUT emulation.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = ['%(namelower)s-%(version)s-source.tar.gz'] +source_urls = ['http://fltk.org/pub/%(namelower)s/%(version)s/'] + +configopts = '--enable-shared --enable-threads --enable-xft' + +dependencies = [ + ('Mesa', '12.0.2'), + ('libGLU', '9.0.0'), + ('libpng', '1.6.24'), + ('libjpeg-turbo', '1.5.0'), + ('xprop', '1.2.2'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ['bin/fltk-config', 'bin/fluid', 'lib/libfltk.a', 'lib/libfltk.%s' % SHLIB_EXT], + 'dirs': ['lib'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/x/xprop/xprop-1.2.2-intel-2016b.eb b/easybuild/easyconfigs/x/xprop/xprop-1.2.2-intel-2016b.eb new file mode 100644 index 0000000000..f011afc6c3 --- /dev/null +++ b/easybuild/easyconfigs/x/xprop/xprop-1.2.2-intel-2016b.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'xprop' +version = '1.2.2' + +homepage = "http://www.x.org/wiki/" +description = """The xprop utility is for displaying window and font properties in an X server. + One window or font is selected using the command line arguments or possibly + in the case of a window, by clicking on the desired window. A list of + properties is then given, possibly with formatting information.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://ftp.x.org/archive/individual/app/'] + +builddependencies = [ + ('pkg-config', '0.29.1'), +] + +dependencies = [ + ('X11', '20160819'), +] + +sanity_check_paths = { + 'files': ['bin/xprop'], + 'dirs': [], +} + +moduleclass = 'vis' -- GitLab From 93fd4766a5299f02b27f4b0a019a203a82f843b7 Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Wed, 12 Oct 2016 14:00:00 +0800 Subject: [PATCH 433/741] remove redundant yambo patch --- .../QuantumESPRESSO-6.0-intel-2016b.eb | 2 +- .../QuantumESPRESSO-6.0_yambo-fixes.patch | 71 ------------------- 2 files changed, 1 insertion(+), 72 deletions(-) delete mode 100644 easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0_yambo-fixes.patch diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0-intel-2016b.eb b/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0-intel-2016b.eb index a7b85783a2..cd4f2fd67f 100644 --- a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0-intel-2016b.eb +++ b/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0-intel-2016b.eb @@ -33,7 +33,7 @@ source_urls = [ ] patches = [ - 'QuantumESPRESSO-%(version)s_yambo-fixes.patch', + 'QuantumESPRESSO-5.4.0_yambo-fixes.patch', ] # source checksums diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0_yambo-fixes.patch b/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0_yambo-fixes.patch deleted file mode 100644 index 8f94d88eb2..0000000000 --- a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-6.0_yambo-fixes.patch +++ /dev/null @@ -1,71 +0,0 @@ -* make sure -nofor_main is also used when $FC is defined as mpif90 for yambo -* fix check in yambo configure script w.r.t. preprocessing Fortran code by ignoring harmless warning in stderr output -* force ifort mangling in yambo's netcdf -author: Kenneth Hoste (HPC-UGent), adapted to qe-6.0 and yambo-3.4.2 by Miguel Dias Costa (National University of Singapore) ---- qe-6.0/yambo-3.4.2/configure.orig 2016-05-26 16:18:16.177156000 +0800 -+++ qe-6.0/yambo-3.4.2/configure 2016-05-26 16:20:31.929218336 +0800 -@@ -6238,7 +6238,7 @@ - ;; - *g95*) - ;; -- *ifort*) -+ *ifort*|*mpif90*) - $FC -v >& ver_ - VER_8=`grep 8. ver_ | wc -l` - VER_9=`grep 9. ver_ | wc -l` -@@ -6321,7 +6321,7 @@ - FCMFLAG="" - OMPFLAGS="-fopenmp" - ;; -- *ifort*) -+ *ifort*|*mpif90*) - CPU_FLAG="" - case "${FCVERSION}" in - *11* | *12* | *13* |*14* | *15* ) -@@ -6365,7 +6365,7 @@ - UFFLAGS="-g -O0 -fno-second-underscore" - FCMFLAG="" - ;; -- *ifort*) -+ *ifort*|*mpif90*) - CPU_FLAG="" - case "${FCVERSION}" in - *1*) -@@ -6413,7 +6413,7 @@ - UFFLAGS="-g -O0 -w" - OMPFLAGS="-openmp" - ;; -- *ifort*) -+ *ifort*|*mpif90*) - CPU_FLAG="" - case "${FCVERSION}" in - *1*) -@@ -6472,7 +6472,7 @@ - UFFLAGS="-g -O0 -w -tpp2" - OMPFLAGS="-openmp" - ;; -- *ifort*) -+ *ifort*|*mpif90*) - CPU_FLAG="" - case "${FCVERSION}" in - *11* | *12* | *13* |*14* |*15* ) -@@ -7651,7 +7651,7 @@ - - if ! test -s conftest.er1 || test -n "`grep successful conftest.er1`" ; then - eval $CPP $CPPFLAGS conftest.F > conftest.${F90SUFFIX} -- eval $FC $FCFLAGS -c conftest.${F90SUFFIX} 2> conftest.er2 >&5 -+ eval $FC $FCFLAGS -c conftest.${F90SUFFIX} | grep -v "ifort: command line remark" 2> conftest.er2 >&5 - if test -s conftest.er2 ; then - if ! test -n "`grep successful conftest.er2`" ; then - acx_F90_ok=no ; ---- qe-6.0/yambo-3.4.2/lib/netcdf/Makefile.loc.orig 2016-06-02 17:29:53.816844000 +0800 -+++ qe-6.0/yambo-3.4.2/lib/netcdf/Makefile.loc 2016-06-02 17:30:45.579476000 +0800 -@@ -40,7 +40,7 @@ - FC="$(f90)" \ - FCFLAGS="$(f77flags)" \ - FFLAGS="$(f77flags)" \ -- CPPFLAGS="$(netcdf_aux)" \ -+ CPPFLAGS="$(netcdf_aux) -DpgiFortran" \ - F90="$(f90)" \ - F77="$(f77)" \ - INSTALL_DIR="$(INSTALL_DIR)" ); \ -- GitLab From c14558c91951153fff1708381d4669e218d6a710 Mon Sep 17 00:00:00 2001 From: Andy Georges Date: Wed, 12 Oct 2016 14:11:09 +0200 Subject: [PATCH 434/741] Add build targeting 64GiB and 128GiB machines --- easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb b/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb index 7984157482..f0b6a78950 100644 --- a/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb +++ b/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb @@ -22,6 +22,10 @@ cmds_str = "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=10000000 - cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=100000000 -DNTIMES=1000 -o stream_1Kx100M; " # 1 billion array elements (1000 runs): requires ~22.4 GiB of memory cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=1000000000 -DNTIMES=1000 -o stream_1Kx1B; " +# 2.5 billion array elements (1000 runs): requires ~56 GiB of memory +cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=2500000000 -DNTIMES=1000 -o stream_1Kx2.5B; " +# 5 billion array elements (1000 runs): requires ~111 GiB of memory +cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=5000000000 -DNTIMES=1000 -o stream_1Kx5B; " cmds_map = [('stream.c', cmds_str)] -- GitLab From 0811eb9919de070f8f50c48384ed48dd294b0791 Mon Sep 17 00:00:00 2001 From: Andy Georges Date: Wed, 12 Oct 2016 14:19:26 +0200 Subject: [PATCH 435/741] Actually install the binaries --- easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb b/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb index f0b6a78950..9205395e4e 100644 --- a/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb +++ b/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb @@ -29,10 +29,10 @@ cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=500000000 cmds_map = [('stream.c', cmds_str)] -files_to_copy = [(['stream_1Kx10M', 'stream_1Kx100M', 'stream_1Kx1B'], 'bin')] +files_to_copy = [(['stream_1Kx10M', 'stream_1Kx100M', 'stream_1Kx1B', 'stream_1Kx2.5B', 'stream_1Kx5B'], 'bin')] sanity_check_paths = { - 'files': ['bin/stream_1Kx10M', 'bin/stream_1Kx100M', 'bin/stream_1Kx1B'], + 'files': ['bin/stream_1Kx10M', 'bin/stream_1Kx100M', 'bin/stream_1Kx1B', 'bin/stream_1Kx2.5B', 'bin/stream_1Kx5B'], 'dirs': [], } -- GitLab From 3581cedbcabb987eb94dae96eb0bb9baf4252d1f Mon Sep 17 00:00:00 2001 From: Andy Georges Date: Wed, 12 Oct 2016 14:37:12 +0200 Subject: [PATCH 436/741] STREAM 5.10 with 2016b toolchain --- .../s/STREAM/STREAM-5.10-intel-2016b.eb | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2016b.eb diff --git a/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2016b.eb b/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2016b.eb new file mode 100644 index 0000000000..94341c99a0 --- /dev/null +++ b/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2016b.eb @@ -0,0 +1,41 @@ +easyblock = 'CmdCp' + +name = 'STREAM' +version = '5.10' + +homepage = 'http://www.cs.virginia.edu/stream/' +description = """The STREAM benchmark is a simple synthetic benchmark program that measures sustainable + memory bandwidth (in MB/s) and the corresponding computation rate for simple vector kernels.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'openmp': True} + +source_urls = ['http://www.cs.virginia.edu/stream/FTP/Code/'] +sources = ['%(namelower)s.c'] +checksums = ['dd2941e3a28ff90a79b571273c10aacf'] + +skipsteps = ['source'] + +# 10 million array elements (1000 runs): requires ~224MB of memory +cmds_str = "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=10000000 -DNTIMES=1000 -o stream_1Kx10M; " +# 100 million array elements (1000 runs): requires ~2.2GiB of memory +cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=100000000 -DNTIMES=1000 -o stream_1Kx100M; " +# 1 billion array elements (1000 runs): requires ~22.4 GiB of memory +cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=1000000000 -DNTIMES=1000 -o stream_1Kx1B; " +# 2.5 billion array elements (1000 runs): requires ~56 GiB of memory +cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=2500000000 -DNTIMES=1000 -o stream_1Kx2.5B; " +# 5 billion array elements (1000 runs): requires ~111 GiB of memory +cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=5000000000 -DNTIMES=1000 -o stream_1Kx5B; " + +cmds_map = [('stream.c', cmds_str)] + +files_to_copy = [(['stream_1Kx10M', 'stream_1Kx100M', 'stream_1Kx1B', 'stream_1Kx2.5B', 'stream_1Kx5B'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/stream_1Kx10M', 'bin/stream_1Kx100M', 'bin/stream_1Kx1B', 'bin/stream_1Kx2.5B', 'bin/stream_1Kx5B'], + 'dirs': [], +} + +tests = ['%(installdir)s/bin/stream_1Kx10M'] + +moduleclass = 'perf' -- GitLab From 3dea1fdaf88545ed609f75003f63611c9e5c2b24 Mon Sep 17 00:00:00 2001 From: Andy Georges Date: Wed, 12 Oct 2016 15:07:40 +0200 Subject: [PATCH 437/741] 5B elements does not build with the 2015a toolchain --- easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb b/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb index 9205395e4e..44cf8f84ff 100644 --- a/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb +++ b/easybuild/easyconfigs/s/STREAM/STREAM-5.10-intel-2015a.eb @@ -24,15 +24,13 @@ cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=100000000 cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=1000000000 -DNTIMES=1000 -o stream_1Kx1B; " # 2.5 billion array elements (1000 runs): requires ~56 GiB of memory cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=2500000000 -DNTIMES=1000 -o stream_1Kx2.5B; " -# 5 billion array elements (1000 runs): requires ~111 GiB of memory -cmds_str += "$CC $CFLAGS %(source)s -mcmodel=large -DSTREAM_ARRAY_SIZE=5000000000 -DNTIMES=1000 -o stream_1Kx5B; " cmds_map = [('stream.c', cmds_str)] -files_to_copy = [(['stream_1Kx10M', 'stream_1Kx100M', 'stream_1Kx1B', 'stream_1Kx2.5B', 'stream_1Kx5B'], 'bin')] +files_to_copy = [(['stream_1Kx10M', 'stream_1Kx100M', 'stream_1Kx1B', 'stream_1Kx2.5B'], 'bin')] sanity_check_paths = { - 'files': ['bin/stream_1Kx10M', 'bin/stream_1Kx100M', 'bin/stream_1Kx1B', 'bin/stream_1Kx2.5B', 'bin/stream_1Kx5B'], + 'files': ['bin/stream_1Kx10M', 'bin/stream_1Kx100M', 'bin/stream_1Kx1B', 'bin/stream_1Kx2.5B'], 'dirs': [], } -- GitLab From cea6e793fbff4661ed3a376dbb21ed456d27b539 Mon Sep 17 00:00:00 2001 From: RvDijk Date: Wed, 12 Oct 2016 15:40:57 +0200 Subject: [PATCH 438/741] more requested changes --- easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb | 9 ++++----- easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch | 11 ----------- 2 files changed, 4 insertions(+), 16 deletions(-) delete mode 100644 easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch diff --git a/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb b/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb index f47f929afb..09fb675534 100644 --- a/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb +++ b/easybuild/easyconfigs/i/IMB/IMB-4.1-foss-2016a.eb @@ -5,7 +5,8 @@ version = '4.1' homepage = 'https://software.intel.com/en-us/articles/intel-mpi-benchmarks' description = """ -The Intel® MPI Benchmarks perform a set of MPI performance measurements for point-to-point and global communication operations for a range of message sizes. +The Intel® MPI Benchmarks perform a set of MPI performance measurements for point-to-point +and global communication operations for a range of message sizes. """ toolchain = {'name': 'foss', 'version': '2016a'} @@ -15,9 +16,7 @@ source_urls = ['https://software.intel.com/sites/default/files/managed/a3/b2/'] start_dir = 'src' prebuildopts = 'export MPI_HOME=$EBROOTOPENMPI && ' -buildopts = '-f make_mpich' - -patches = ['IMB-%(version)s_make_mpich.patch'] +buildopts = "-f make_mpich MPI_HOME=$EBROOTOPENMPI" parallel = 1 @@ -28,4 +27,4 @@ sanity_check_paths = { 'dirs': ['bin','doc'] } -moduleclass = 'tools' +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch b/easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch deleted file mode 100644 index 6805a1bc3c..0000000000 --- a/easybuild/easyconfigs/i/IMB/IMB-4.1_make_mpich.patch +++ /dev/null @@ -1,11 +0,0 @@ -Prevent: Variable MPI_HOME="" does not seem to contain a valid mpicc. -Author: Fokke Dijkstra (University of Groningen) ---- src/make_mpich 2015-02-16 13:31:11.838082386 +0100 -+++ src/make_mpich 2015-02-16 13:40:19.000844455 +0100 -@@ -1,5 +1,5 @@ - # Enter root directory of mpich install --MPI_HOME= -+#MPI_HOME= - - MPICC=$(shell find ${MPI_HOME} -name mpicc -print) - -- GitLab From a8e361749fbb0e881b0fc27e64fff2b3a52a7520 Mon Sep 17 00:00:00 2001 From: Andy Georges Date: Wed, 12 Oct 2016 15:48:03 +0200 Subject: [PATCH 439/741] Rust version 1.12 --- .../r/Rust/Rust-1.12.0-foss-2016b.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb diff --git a/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb b/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb new file mode 100644 index 0000000000..ed6c626abd --- /dev/null +++ b/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'Rust' +version = '1.12.0' + +homepage = 'https://www.rust-lang.org' +description = """Rust is a systems programming language that runs blazingly fast, prevents segfaults, + and guarantees thread safety.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://static.rust-lang.org/dist/'] +sources = ['rustc-%(version)s-src.tar.gz'] + +builddependencies = [('Python', '2.7.11')] + +sanity_check_paths = { + 'files': ['bin/rustc', 'bin/rustdoc'], + 'dirs': ['share/doc', 'share/man', 'lib/rustlib'], +} + +moduleclass = 'lang' -- GitLab From 3fdc7a663ea16aa2e700d81831ee687fa3de0b41 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 12 Oct 2016 18:49:15 +0200 Subject: [PATCH 440/741] add easyconfig Biopython-1.68-intel-2016b-Python-2.7.12.eb --- ...iopython-1.68-intel-2016b-Python-2.7.12.eb | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 easybuild/easyconfigs/b/Biopython/Biopython-1.68-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/b/Biopython/Biopython-1.68-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/Biopython/Biopython-1.68-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..953304846e --- /dev/null +++ b/easybuild/easyconfigs/b/Biopython/Biopython-1.68-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,37 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 The Cyprus Institute +# Authors:: Andreas Panteli , Thekla Loizou , George Tsouloupas +# License:: MIT/GPL +# +## +easyblock = 'PythonPackage' + +name = 'Biopython' +version = '1.68' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.biopython.org' +description = """Biopython is a set of freely available tools for biological computation written +in Python by an international team of developers. It is a distributed collaborative effort to +develop Python libraries and applications which address the needs of current and future work in +bioinformatics. """ + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://biopython.org/DIST'] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12') +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/Bio', 'lib/python%(pyshortver)s/site-packages/BioSQL'] +} + +options = {'modulename': 'Bio'} + +moduleclass = 'bio' -- GitLab From d31d4ec490bf28b8162fe4a511a4650d4c2cda74 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 12 Oct 2016 19:35:30 +0200 Subject: [PATCH 441/741] add easyconfig Ruby-2.3.1-intel-2016b.eb --- .../r/Ruby/Ruby-2.3.1-intel-2016b.eb | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 easybuild/easyconfigs/r/Ruby/Ruby-2.3.1-intel-2016b.eb diff --git a/easybuild/easyconfigs/r/Ruby/Ruby-2.3.1-intel-2016b.eb b/easybuild/easyconfigs/r/Ruby/Ruby-2.3.1-intel-2016b.eb new file mode 100644 index 0000000000..f97bed944c --- /dev/null +++ b/easybuild/easyconfigs/r/Ruby/Ruby-2.3.1-intel-2016b.eb @@ -0,0 +1,63 @@ +# With <3 for EasyBuild +# +# EasyConfig for Ruby 2.1: +# ---------------------------------------------------------------------------- +# Copyright: 2014 - Gregor Mendel Institute of Molecular Plant Biology GmBH +# License: MIT +# Authors: Aaron Zauner +# ---------------------------------------------------------------------------- + +name = 'Ruby' +version = '2.3.1' + +homepage = 'https://www.ruby-lang.org' +description = """Ruby is a dynamic, open source programming language with + a focus on simplicity and productivity. It has an elegant syntax that is + natural to read and easy to write.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://cache.ruby-lang.org/pub/ruby/'] + +ext_options = { + 'source_urls': ['http://rubygems.org/downloads/'], + 'source_tmpl': '%(name)s-%(version)s.gem', +} + +exts_list = [ + ('ffi', '1.9.10', ext_options), + ('childprocess', '0.5.9', ext_options), + ('json', '1.8.3', ext_options), + ('cabin', '0.8.1', ext_options), + ('backports', '3.6.8', ext_options), + ('arr-pm', '0.0.10', ext_options), + ('clamp', '1.0.0', ext_options), + ('multipart-post', '2.0.0', ext_options), + ('faraday', '0.9.2', ext_options), + ('faraday_middleware', '0.10.0', ext_options), + ('highline', '1.7.8', ext_options), + ('net-http-pipeline', '1.0.1', ext_options), + ('net-http-persistent', '2.9.4', ext_options), + ('multi_json', '1.11.3', ext_options), + ('addressable', '2.4.0', ext_options), + ('gh', '0.14.0', ext_options), + ('launchy', '2.4.3', ext_options), + ('ethon', '0.8.1', ext_options), + ('typhoeus', '0.8.0', ext_options), + ('websocket', '1.2.3', ext_options), + ('pusher-client', '0.6.2', ext_options), + ('diff-lcs', '1.2.5', ext_options), + ('rspec-support', '3.4.1', ext_options), + ('rspec-mocks', '3.4.1', ext_options), + ('rspec-expectations', '3.4.0', ext_options), + ('rspec-core', '3.4.4', ext_options), + ('rspec', '3.4.0', ext_options), + ('rack', '1.6.4', ext_options), + ('rack-protection', '1.5.3', ext_options), + ('tilt', '2.0.2', ext_options), + ('sinatra', '1.4.7', ext_options), + ('rack-test', '0.6.3', ext_options), +] + +moduleclass = 'lang' -- GitLab From 8cd04d82b3d9bbc6f485c8470659d86521138e2a Mon Sep 17 00:00:00 2001 From: Andy Georges Date: Wed, 12 Oct 2016 22:36:02 +0200 Subject: [PATCH 442/741] Update Python dependency version --- easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb b/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb index ed6c626abd..a97fb76cf4 100644 --- a/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb +++ b/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'foss', 'version': '2016b'} source_urls = ['https://static.rust-lang.org/dist/'] sources = ['rustc-%(version)s-src.tar.gz'] -builddependencies = [('Python', '2.7.11')] +builddependencies = [('Python', '2.7.12')] sanity_check_paths = { 'files': ['bin/rustc', 'bin/rustdoc'], -- GitLab From 15f9a654af9a0ce4258d18493edd86fa179638db Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Oct 2016 09:30:28 +0200 Subject: [PATCH 443/741] add easyconfig dadi-1.7.0-intel-2016b-Python-2.7.12.eb --- .../dadi-1.7.0-intel-2016b-Python-2.7.12.eb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..dcb0dd7c09 --- /dev/null +++ b/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,26 @@ +easyblock = 'PythonPackage' + +name = 'dadi' +version = '1.7.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://bitbucket.org/gutenkunstlab/dadi' +description = """∂a∂i implements methods for demographic history and selection inference from genetic data, + based on diffusion approximations to the allele frequency spectrum.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://bitbucket.org/gutenkunstlab/dadi/get/'] +sources = ['%(version)s.tar.gz'] + +dependencies = [ + ('Python', '2.7.12'), + ('matplotlib', '1.5.1', versionsuffix), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'bio' -- GitLab From bfdc4f2c0343ebd8aba8f7e5953f0c5c428f7b29 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Oct 2016 09:35:24 +0200 Subject: [PATCH 444/741] add patch to fix typo in GRIT 2.0.5 --- .../GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb | 1 + .../easyconfigs/g/GRIT/GRIT-2.0.5_fix-typo.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 easybuild/easyconfigs/g/GRIT/GRIT-2.0.5_fix-typo.patch diff --git a/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb index 2da2d712ac..ec4f6977d0 100644 --- a/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5-intel-2016b-Python-2.7.12.eb @@ -26,6 +26,7 @@ exts_list = [ (name, version, { 'source_urls': ['https://github.com/nboley/grit/archive/'], 'source_tmpl': '%(version)s.tar.gz', + 'patches': ['GRIT-2.0.5_fix-typo.patch'], }), ] diff --git a/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5_fix-typo.patch b/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5_fix-typo.patch new file mode 100644 index 0000000000..cb33a36d90 --- /dev/null +++ b/easybuild/easyconfigs/g/GRIT/GRIT-2.0.5_fix-typo.patch @@ -0,0 +1,15 @@ +fix typo resulting in AttributeError, see also https://github.com/nboley/grit/pull/3 +author: Kenneth Hoste (HPC-UGent) +diff --git a/grit/files/reads.py b/grit/files/reads.py +index 6228a43..a9cc2db 100644 +--- a/grit/files/reads.py ++++ b/grit/files/reads.py +@@ -957,7 +957,7 @@ class PolyAReads(Reads): + if reverse_read_strand in ('auto', None): + if ref_genes in([], None): + raise ValueError, "Determining reverse_read_strand requires reference genes" +- reverse_read_strand_params = Reads.determine_read_strand_param( ++ reverse_read_strand_params = determine_read_strand_params( + self, ref_genes, pairs_are_opp_strand, 'tes_exon', + 300, 50 ) + assert 'stranded' in reverse_read_strand_params -- GitLab From f417571519d0073674b8fb6d8e7428853f083875 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Oct 2016 12:55:55 +0200 Subject: [PATCH 445/741] fix icc/ifort/impi/imkl 2017.* versions, add intel/2017.00 definition --- ...26.eb => icc-2017.0.098-GCC-5.4.0-2.26.eb} | 2 +- ... => iccifort-2017.0.098-GCC-5.4.0-2.26.eb} | 2 +- ....eb => ifort-2017.0.098-GCC-5.4.0-2.26.eb} | 2 +- .../i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb | 4 ++-- ...017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb} | 2 +- ...098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb} | 4 ++-- .../easyconfigs/i/intel/intel-2017.00.eb | 24 +++++++++++++++++++ 7 files changed, 32 insertions(+), 8 deletions(-) rename easybuild/easyconfigs/i/icc/{icc-2017.0.35-GCC-5.4.0-2.26.eb => icc-2017.0.098-GCC-5.4.0-2.26.eb} (97%) rename easybuild/easyconfigs/i/iccifort/{iccifort-2017.0.35-GCC-5.4.0-2.26.eb => iccifort-2017.0.098-GCC-5.4.0-2.26.eb} (95%) rename easybuild/easyconfigs/i/ifort/{ifort-2017.0.35-GCC-5.4.0-2.26.eb => ifort-2017.0.098-GCC-5.4.0-2.26.eb} (97%) rename easybuild/easyconfigs/i/imkl/{imkl-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb => imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb} (98%) rename easybuild/easyconfigs/i/impi/{impi-2017.0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb => impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb} (92%) create mode 100644 easybuild/easyconfigs/i/intel/intel-2017.00.eb diff --git a/easybuild/easyconfigs/i/icc/icc-2017.0.35-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/icc/icc-2017.0.098-GCC-5.4.0-2.26.eb similarity index 97% rename from easybuild/easyconfigs/i/icc/icc-2017.0.35-GCC-5.4.0-2.26.eb rename to easybuild/easyconfigs/i/icc/icc-2017.0.098-GCC-5.4.0-2.26.eb index 0c1088585e..d1cc307109 100644 --- a/easybuild/easyconfigs/i/icc/icc-2017.0.35-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/icc/icc-2017.0.098-GCC-5.4.0-2.26.eb @@ -1,7 +1,7 @@ # This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild name = 'icc' -version = '2017.0.35' +version = '2017.0.098' homepage = 'http://software.intel.com/en-us/intel-compilers/' description = "C and C++ compiler from Intel" diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2017.0.35-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iccifort/iccifort-2017.0.098-GCC-5.4.0-2.26.eb similarity index 95% rename from easybuild/easyconfigs/i/iccifort/iccifort-2017.0.35-GCC-5.4.0-2.26.eb rename to easybuild/easyconfigs/i/iccifort/iccifort-2017.0.098-GCC-5.4.0-2.26.eb index 380fc915c1..3ed3f947b9 100644 --- a/easybuild/easyconfigs/i/iccifort/iccifort-2017.0.35-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/iccifort/iccifort-2017.0.098-GCC-5.4.0-2.26.eb @@ -2,7 +2,7 @@ easyblock = "Toolchain" name = 'iccifort' -version = '2017.0.35' +version = '2017.0.098' versionsuffix = '-GCC-5.4.0-2.26' homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' diff --git a/easybuild/easyconfigs/i/ifort/ifort-2017.0.35-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb similarity index 97% rename from easybuild/easyconfigs/i/ifort/ifort-2017.0.35-GCC-5.4.0-2.26.eb rename to easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb index 3b5cada858..9f30cbac75 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2017.0.35-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb @@ -1,7 +1,7 @@ # This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild name = 'ifort' -version = '2017.0.35' +version = '2017.0.098' homepage = 'http://software.intel.com/en-us/intel-compilers/' description = "C and C++ compiler from Intel" diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb index b6b55ee8dc..1af95a3473 100644 --- a/easybuild/easyconfigs/i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/iimpi/iimpi-2017.00-GCC-5.4.0-2.26.eb @@ -10,11 +10,11 @@ description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" toolchain = {'name': 'dummy', 'version': 'dummy'} -compver = '2017.0.35' +compver = '2017.0.098' dependencies = [ ('icc', compver, versionsuffix), ('ifort', compver, versionsuffix), - ('impi', '2017.0.98', '', ('iccifort', '%s%s' % (compver, versionsuffix))), + ('impi', '2017.0.098', '', ('iccifort', '%s%s' % (compver, versionsuffix))), ] moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/i/imkl/imkl-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb similarity index 98% rename from easybuild/easyconfigs/i/imkl/imkl-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb rename to easybuild/easyconfigs/i/imkl/imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb index 39201957df..de287736f3 100644 --- a/easybuild/easyconfigs/i/imkl/imkl-2017.0.98-iimpi-2017.00-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/imkl/imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb @@ -1,7 +1,7 @@ # This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild name = 'imkl' -version = '2017.0.98' +version = '2017.0.098' homepage = 'http://software.intel.com/en-us/intel-mkl/' description = """Intel Math Kernel Library is a library of highly optimized, diff --git a/easybuild/easyconfigs/i/impi/impi-2017.0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/impi/impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb similarity index 92% rename from easybuild/easyconfigs/i/impi/impi-2017.0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb rename to easybuild/easyconfigs/i/impi/impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb index 109a0bb59e..2f7a1cfdfd 100644 --- a/easybuild/easyconfigs/i/impi/impi-2017.0.98-iccifort-2017.0.35-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/impi/impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb @@ -1,14 +1,14 @@ # This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild name = 'impi' -version = '2017.0.98' +version = '2017.0.098' homepage = 'http://software.intel.com/en-us/intel-mpi-library/' description = """The Intel(R) MPI Library for Linux* OS is a multi-fabric message passing library based on ANL MPICH2 and OSU MVAPICH2. The Intel MPI Library for Linux OS implements the Message Passing Interface, version 2 (MPI-2) specification.""" -toolchain = {'name': 'iccifort', 'version': '2017.0.35-GCC-5.4.0-2.26'} +toolchain = {'name': 'iccifort', 'version': '2017.0.098-GCC-5.4.0-2.26'} sources = ['l_mpi_p_%(version)s.tgz'] diff --git a/easybuild/easyconfigs/i/intel/intel-2017.00.eb b/easybuild/easyconfigs/i/intel/intel-2017.00.eb new file mode 100644 index 0000000000..ad8be63148 --- /dev/null +++ b/easybuild/easyconfigs/i/intel/intel-2017.00.eb @@ -0,0 +1,24 @@ +easyblock = 'Toolchain' + +name = 'intel' +version = '2017.00' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel Cluster Toolkit Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MPI & Intel MKL.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2017.0.098' +gccver = '5.4.0' +binutilsver = '2.26' +gccsuff = '-GCC-%s-%s' % (gccver, binutilsver) +dependencies = [ + ('GCCcore', gccver), + ('binutils', binutilsver, '-GCCcore-%s' % gccver), + ('icc', compver, gccsuff), + ('ifort', compver, gccsuff), + ('impi', '2017.0.098', '', ('iccifort', '%s%s' % (compver, gccsuff))), + ('imkl', '2017.0.098', '', ('iimpi', version + gccsuff)), +] + +moduleclass = 'toolchain' -- GitLab From 90377612fc6c21e4880eeaab6ca0fd6bd798fa6b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Oct 2016 12:57:19 +0200 Subject: [PATCH 446/741] add easyconfig for HPL 2.2 with intel/2017.00 --- .../easyconfigs/h/HPL/HPL-2.2-intel-2017.00.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-intel-2017.00.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-intel-2017.00.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-intel-2017.00.eb new file mode 100644 index 0000000000..48447ddb28 --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-intel-2017.00.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'intel', 'version': '2017.00'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' -- GitLab From adae534ef96a2b6cab4a1f694fd9f5ea62fec900 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Oct 2016 13:08:50 +0200 Subject: [PATCH 447/741] fix impi source spec --- .../impi/impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/i/impi/impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/impi/impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb index 2f7a1cfdfd..867202a357 100644 --- a/easybuild/easyconfigs/i/impi/impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/impi/impi-2017.0.098-iccifort-2017.0.098-GCC-5.4.0-2.26.eb @@ -10,7 +10,7 @@ description = """The Intel(R) MPI Library for Linux* OS is a multi-fabric messag toolchain = {'name': 'iccifort', 'version': '2017.0.098-GCC-5.4.0-2.26'} -sources = ['l_mpi_p_%(version)s.tgz'] +sources = ['l_mpi_%(version)s.tgz'] checksums = ['fc123875773816b7084a91e419d54d20'] -- GitLab From f5542817f8a4b2d215d735ae96309bbbcecfdc9d Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 13 Oct 2016 13:38:56 +0200 Subject: [PATCH 448/741] Examples update for imkl/2017 --- .../i/imkl/imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/i/imkl/imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb index de287736f3..341dbab7ed 100644 --- a/easybuild/easyconfigs/i/imkl/imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/imkl/imkl-2017.0.098-iimpi-2017.00-GCC-5.4.0-2.26.eb @@ -22,11 +22,13 @@ interfaces = True postinstallcmds = [ # extract the examples - 'tar xvzf %(installdir)s/mkl/examples/examples_cluster.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster_f.tgz -C %(installdir)s/mkl/examples/', 'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/', 'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/', 'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/', - 'tar xvzf %(installdir)s/mkl/examples/examples_mic.tgz -C %(installdir)s/mkl/examples/' + 'tar xvzf %(installdir)s/mkl/examples/examples_mic_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic_c.tgz -C %(installdir)s/mkl/examples/', ] modextravars = { -- GitLab From c2dacc9333ce5eb9169cd73100f8ae2fc93e28fc Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Oct 2016 13:47:46 +0200 Subject: [PATCH 449/741] add easyconfig Biopython-1.68-intel-2016b-Python-3.5.2.eb --- ...Biopython-1.68-intel-2016b-Python-3.5.2.eb | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 easybuild/easyconfigs/b/Biopython/Biopython-1.68-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/b/Biopython/Biopython-1.68-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/b/Biopython/Biopython-1.68-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..b22f51705c --- /dev/null +++ b/easybuild/easyconfigs/b/Biopython/Biopython-1.68-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,37 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 The Cyprus Institute +# Authors:: Andreas Panteli , Thekla Loizou , George Tsouloupas +# License:: MIT/GPL +# +## +easyblock = 'PythonPackage' + +name = 'Biopython' +version = '1.68' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.biopython.org' +description = """Biopython is a set of freely available tools for biological computation written +in Python by an international team of developers. It is a distributed collaborative effort to +develop Python libraries and applications which address the needs of current and future work in +bioinformatics. """ + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://biopython.org/DIST'] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2') +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/Bio', 'lib/python%(pyshortver)s/site-packages/BioSQL'] +} + +options = {'modulename': 'Bio'} + +moduleclass = 'bio' -- GitLab From 52156c3e2feff84afd71cf995427dc90905e130c Mon Sep 17 00:00:00 2001 From: Markus Geimer Date: Thu, 13 Oct 2016 14:19:34 +0200 Subject: [PATCH 450/741] Consistently use 'pic=True' toolchain option and M4 as a dependency --- .../easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.06.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.11.eb | 6 ++++++ .../f/flex/flex-2.5.39-GCC-4.9.2-binutils-2.25.eb | 6 ++++++ easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2.eb | 7 +++++++ .../f/flex/flex-2.5.39-GCC-4.9.3-binutils-2.25.eb | 6 ++++++ easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3.eb | 7 +++++++ .../f/flex/flex-2.5.39-GCC-5.1.0-binutils-2.25.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.2.eb | 11 +++++++---- .../easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.3.eb | 11 +++++++---- .../easyconfigs/f/flex/flex-2.5.39-GNU-4.9.3-2.25.eb | 7 +++++++ .../easyconfigs/f/flex/flex-2.5.39-foss-2014b.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-foss-2015.05.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-foss-2015a.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-foss-2016a.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-gimkl-2.11.5.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-ictce-7.1.2.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-intel-2014b.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-intel-2015a.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb | 6 ++++++ .../f/flex/flex-2.5.39-intel-2016.02-GCC-4.9.eb | 6 ++++++ .../easyconfigs/f/flex/flex-2.5.39-intel-2016a.eb | 6 ++++++ .../f/flex/flex-2.5.39-intel-para-2014.12.eb | 6 ++++++ easybuild/easyconfigs/f/flex/flex-2.5.39.eb | 6 +++++- 24 files changed, 148 insertions(+), 9 deletions(-) diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.06.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.06.eb index 24e3dfb5dc..0542fac499 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.06.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.06.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.11.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.11.eb index 8c57faa309..ce034a2f5d 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.11.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-CrayGNU-2015.11.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2-binutils-2.25.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2-binutils-2.25.eb index 98e5ff5527..ac2d9ea164 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2-binutils-2.25.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2-binutils-2.25.eb @@ -6,10 +6,16 @@ description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolchain = {'name': 'GCC', 'version': '4.9.2-binutils-2.25'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2.eb index 1c15e90f19..6e01f166de 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.2.eb @@ -6,8 +6,15 @@ description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolchain = {'name': 'GCC', 'version': '4.9.2'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3-binutils-2.25.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3-binutils-2.25.eb index 667f205b69..72d2805b5f 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3-binutils-2.25.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3-binutils-2.25.eb @@ -6,10 +6,16 @@ description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolchain = {'name': 'GCC', 'version': '4.9.3-binutils-2.25'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3.eb index 034599b7bc..d5baf97d6d 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-4.9.3.eb @@ -6,8 +6,15 @@ description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolchain = {'name': 'GCC', 'version': '4.9.3'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-5.1.0-binutils-2.25.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-5.1.0-binutils-2.25.eb index 75d18ede78..facf8e7f13 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-5.1.0-binutils-2.25.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCC-5.1.0-binutils-2.25.eb @@ -6,10 +6,16 @@ description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolchain = {'name': 'GCC', 'version': '5.1.0-binutils-2.25'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] # use same binutils version that was used when building GCC toolchain builddependencies = [('binutils', '2.25', '', True)] diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.2.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.2.eb index 71675a8b5c..a28470817b 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.2.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.2.eb @@ -6,14 +6,17 @@ description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolchain = {'name': 'GCCcore', 'version': '4.9.2'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -# use same binutils version that was used when building GCCcore toolchain -builddependencies = [ - ('M4', '1.4.17'), - ('binutils', '2.25', '', True) +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz ] +dependencies = [('M4', '1.4.17')] +# use same binutils version that was used when building GCCcore toolchain +builddependencies = [('binutils', '2.25', '', True)] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.3.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.3.eb index 32dffb057f..68344b21cb 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-GCCcore-4.9.3.eb @@ -6,14 +6,17 @@ description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolchain = {'name': 'GCCcore', 'version': '4.9.3'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -# use same binutils version that was used when building GCCcore toolchain -builddependencies = [ - ('M4', '1.4.17'), - ('binutils', '2.25', '', True) +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz ] +dependencies = [('M4', '1.4.17')] +# use same binutils version that was used when building GCCcore toolchain +builddependencies = [('binutils', '2.25', '', True)] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-GNU-4.9.3-2.25.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-GNU-4.9.3-2.25.eb index 3b653b0adc..255450ebc9 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-GNU-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-GNU-4.9.3-2.25.eb @@ -6,8 +6,15 @@ description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" toolchain = {'name': 'GNU', 'version': '4.9.3-2.25'} +toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2014b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2014b.eb index 6a24b017aa..72f37c4db6 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2014b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2014b.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015.05.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015.05.eb index 208a02e540..1ad0409c77 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015.05.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015.05.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015a.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015a.eb index f9226ff5f3..11968e1640 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015a.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb index 40befb9e4a..0e52dfb998 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2016a.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2016a.eb index 352bff8334..69470ed39a 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2016a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2016a.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-gimkl-2.11.5.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-gimkl-2.11.5.eb index 0bebc72067..60bcff5315 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-gimkl-2.11.5.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-ictce-7.1.2.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-ictce-7.1.2.eb index dc6e43a06e..0f6d234b9e 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-ictce-7.1.2.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-ictce-7.1.2.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2014b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2014b.eb index a2a804a379..37e678754d 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2014b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2014b.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015a.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015a.eb index 859df83543..7f2ee18cbd 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015a.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb index 159eef3274..c1b7ac5006 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016.02-GCC-4.9.eb index 154963c1c8..5e00cb4b9a 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016.02-GCC-4.9.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016a.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016a.eb index 419266740d..de60e46854 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016a.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016a.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-para-2014.12.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-para-2014.12.eb index 7cd93ab5fc..09e533d59d 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-para-2014.12.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-para-2014.12.eb @@ -11,4 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39.eb index e4d83f163c..797f2faa4f 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39.eb @@ -11,6 +11,10 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -builddependencies = [('M4', '1.4.17')] +checksums = [ + 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz +] + +dependencies = [('M4', '1.4.17')] moduleclass = 'lang' -- GitLab From 96460b378780675e6d6cb4ef6746987d8ee26529 Mon Sep 17 00:00:00 2001 From: Markus Geimer Date: Thu, 13 Oct 2016 14:46:01 +0200 Subject: [PATCH 451/741] Add missing M4 dependency for foss-2015.05 toolchain --- .../m/M4/M4-1.4.17-foss-2015.05.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015.05.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015.05.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015.05.eb new file mode 100644 index 0000000000..a244ff7f0d --- /dev/null +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-foss-2015.05.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'M4' +version = '1.4.17' + +homepage = 'http://www.gnu.org/software/m4/m4.html' +description = """GNU M4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 compatible + although it has some extensions (for example, handling more than 9 positional parameters to macros). + GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc.""" + +toolchain = {'name': 'foss', 'version': '2015.05'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +# '-fgnu89-inline' is required to avoid linking errors with older glibc's, +# see https://github.com/hpcugent/easybuild-easyconfigs/issues/529 +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" + +sanity_check_paths = { + 'files': ["bin/m4"], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From 503ce8d6e0aff9a45b805e7923731ffa642c0060 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 13 Oct 2016 14:40:10 +0200 Subject: [PATCH 452/741] rework Anaconda easyconfigs based on changes to Anaconda easyblock --- .../easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb | 19 +++++++++ .../easyconfigs/a/Anaconda/Anaconda3.4.0.0.eb | 19 +++++++++ .../easyconfigs/a/Anaconda/anaconda-2.4.0.eb | 39 ------------------- .../easyconfigs/a/Anaconda/anaconda-3.4.0.eb | 39 ------------------- 4 files changed, 38 insertions(+), 78 deletions(-) create mode 100644 easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb create mode 100644 easybuild/easyconfigs/a/Anaconda/Anaconda3.4.0.0.eb delete mode 100644 easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb delete mode 100644 easybuild/easyconfigs/a/Anaconda/anaconda-3.4.0.eb diff --git a/easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb b/easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb new file mode 100644 index 0000000000..b5ffaf0935 --- /dev/null +++ b/easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb @@ -0,0 +1,19 @@ +# author: Jillian Rowe +easyblock = 'EB_Anaconda' + +name = 'Anaconda2' +version = '4.0.0' + +homepage = 'https://www.continuum.io/anaconda-overview' +description = """Built to complement the rich, open source Python community, +the Anaconda platform provides an enterprise-ready data analytics platform +that empowers companies to adopt a modern open data science analytics architecture. +""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +source_urls = ['http://repo.continuum.io/archive/'] +sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] +checksums = ['31ed3ef07435d7068e1e03be49381b13' ] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda/Anaconda3.4.0.0.eb b/easybuild/easyconfigs/a/Anaconda/Anaconda3.4.0.0.eb new file mode 100644 index 0000000000..9d77e1debf --- /dev/null +++ b/easybuild/easyconfigs/a/Anaconda/Anaconda3.4.0.0.eb @@ -0,0 +1,19 @@ +# author: Jillian Rowe +easyblock = 'EB_Anaconda' + +name = 'Anaconda3' +version = '4.0.0' + +homepage = 'https://www.continuum.io/anaconda-overview' +description = """Built to complement the rich, open source Python community, +the Anaconda platform provides an enterprise-ready data analytics platform +that empowers companies to adopt a modern open data science analytics architecture. +""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +source_urls = ['http://repo.continuum.io/archive/'] +sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] +checksums = ['546d1f02597587c685fa890c1d713b51'] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb b/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb deleted file mode 100644 index 8251c357ce..0000000000 --- a/easybuild/easyconfigs/a/Anaconda/anaconda-2.4.0.eb +++ /dev/null @@ -1,39 +0,0 @@ -## -# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild -# -# Authors:: Jillian Rowe -# -# This work is based on experiences from the UNITE project -# http://apps.fz-juelich.de/unite/ -## - -easyblock = 'EB_anaconda' - -name = "anaconda" -version = "2-4.0.0" -variant = "Linux-x86_64" - -homepage = "https://www.continuum.io/" -description = """Built to complement the rich, open source Python community, -the Anaconda platform provides an enterprise-ready data analytics platform -that empowers companies to adopt a modern open data science analytics architecture. -""" - -toolchain = {'name': 'dummy', 'version': 'dummy'} - -source_urls = ["http://repo.continuum.io/archive/"] -sources = ["Anaconda%s-%s.sh" % (version, variant)] -checksums = [ '31ed3ef07435d7068e1e03be49381b13' ] - -license_file = 'LICENSE.txt' - -sanity_check_paths = { - 'files': ['bin/pydoc', 'bin/2to3', 'bin/activate', 'bin/conda', 'bin/deactivate', 'bin/ipython', 'bin/sqlite3'], - 'dirs': ['bin', 'etc', 'lib', 'pkgs'] -} - -modextravars = { - 'ANACONDA_LICENSE': license_file, -} - -moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda/anaconda-3.4.0.eb b/easybuild/easyconfigs/a/Anaconda/anaconda-3.4.0.eb deleted file mode 100644 index 9e2354b0de..0000000000 --- a/easybuild/easyconfigs/a/Anaconda/anaconda-3.4.0.eb +++ /dev/null @@ -1,39 +0,0 @@ -## -# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild -# -# Authors:: Jillian Rowe -# -# This work is based on experiences from the UNITE project -# http://apps.fz-juelich.de/unite/ -## - -easyblock = 'EB_anaconda' - -name = "anaconda" -version = "3-4.0.0" -variant = "Linux-x86_64" - -homepage = "https://www.continuum.io/" -description = """Built to complement the rich, open source Python community, -the Anaconda platform provides an enterprise-ready data analytics platform -that empowers companies to adopt a modern open data science analytics architecture. -""" - -toolchain = {'name': 'dummy', 'version': 'dummy'} - -source_urls = ["http://repo.continuum.io/archive/"] -sources = ["Anaconda%s-%s.sh" % (version, variant)] -checksums = ["546d1f02597587c685fa890c1d713b51"] - -license_file = 'LICENSE.txt' - -sanity_check_paths = { - 'files': ['bin/pydoc', 'bin/2to3', 'bin/activate', 'bin/conda', 'bin/deactivate', 'bin/ipython', 'bin/sqlite3'], - 'dirs': ['bin', 'etc', 'lib', 'pkgs'] -} - -modextravars = { - 'ANACONDA_LICENSE': license_file, -} - -moduleclass = 'lang' -- GitLab From 483a61dffd1abe479da14723461a506898be1b0e Mon Sep 17 00:00:00 2001 From: Andy Georges Date: Thu, 13 Oct 2016 14:53:45 +0200 Subject: [PATCH 453/741] Add CMake dependency --- easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb b/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb index a97fb76cf4..de615e7620 100644 --- a/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb +++ b/easybuild/easyconfigs/r/Rust/Rust-1.12.0-foss-2016b.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'foss', 'version': '2016b'} source_urls = ['https://static.rust-lang.org/dist/'] sources = ['rustc-%(version)s-src.tar.gz'] -builddependencies = [('Python', '2.7.12')] +builddependencies = [('Python', '2.7.12'), ('CMake','3.6.2')] sanity_check_paths = { 'files': ['bin/rustc', 'bin/rustdoc'], -- GitLab From c0095ca726e2747acc48e1bd4694d10af8d95cf9 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Thu, 13 Oct 2016 08:56:46 -0400 Subject: [PATCH 454/741] Add easyconfig for VTune 2017. --- easybuild/easyconfigs/v/VTune/VTune-2017.eb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 easybuild/easyconfigs/v/VTune/VTune-2017.eb diff --git a/easybuild/easyconfigs/v/VTune/VTune-2017.eb b/easybuild/easyconfigs/v/VTune/VTune-2017.eb new file mode 100644 index 0000000000..13d248cd6c --- /dev/null +++ b/easybuild/easyconfigs/v/VTune/VTune-2017.eb @@ -0,0 +1,14 @@ +name = 'VTune' +version = '2017' + +homepage = 'http://software.intel.com/en-us/intel-vtune-amplifier-xe' +description = """Intel VTune Amplifier XE is the premier performance profiler for C, C++, C#, Fortran, + Assembly and Java.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['vtune_amplifier_xe_%(version)s.tar.gz'] + +license_file = HOME + '/licenses/intel/license.lic' + +moduleclass = 'tools' -- GitLab From 07954d7c4a76ce7f2d0e7e9c169a05552c0b43fd Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Thu, 13 Oct 2016 14:59:28 +0100 Subject: [PATCH 455/741] Adding new toolchains for iomkl-2016.09-GCC-4.9.3-2.25 and iompi-2016.09-GCC-4.9.3-2.25 --- ...11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb | 48 +++++++++++++++++++ .../i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb | 20 ++++++++ .../i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb | 20 ++++++++ ...10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 41 ++++++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..7fc4bb0100 --- /dev/null +++ b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,48 @@ +name = 'imkl' +version = '11.3.3.210' + +homepage = 'http://software.intel.com/en-us/intel-mkl/' +description = """Intel Math Kernel Library is a library of highly optimized, + extensively threaded math routines for science, engineering, and financial + applications that require maximum performance. Core math functions include + BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" + +toolchain = {'name': 'iompi', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = ['l_mkl_%(version)s.tgz'] +checksums = ['f72546df27f5ebb0941b5d21fd804e34'] + +dontcreateinstalldir = 'True' + + +# We want this in the module file. We send its output to /dev/null +# as otherwise it conflicts with the easybuild checking. +# It executes compilervars.sh which in turn executes several more scripts +# setting up the environment for icc etc. +modtclfooter = ''' +if [module-info mode load] { + set chan [open /dev/null a] + puts $chan "echo intel64" + puts $chan "source $root/bin/compilervars.sh" +} +''' + + +license_file = '/gpfs/apps/intel/LicenseManager/current/INTEL.lic' + +interfaces = True + +moduleclass = 'numlib' + +postinstallcmds = [ + # extract the examples + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic.tgz -C %(installdir)s/mkl/examples/' +] + +modextravars = { + 'MKL_EXAMPLES' : '%(installdir)s/mkl/examples/', +} diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..e9a72d1cbc --- /dev/null +++ b/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,20 @@ +easyblock = "Toolchain" + +name = 'iomkl' +version = '2016.09-GCC-4.9.3-2.25' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL & OpenMPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2016.3.210-GCC-4.9.3-2.25' + +dependencies = [ + ('icc', compver), + ('ifort', compver), + ('OpenMPI', '1.10.2', '', ('iccifort', compver)), + ('imkl', '11.3.3.210', '', ('iompi', version)), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..a5170410e3 --- /dev/null +++ b/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,20 @@ +easyblock = "Toolchain" + +name = 'iompi' +version = '2016.09-GCC-4.9.3-2.25' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Toolchain with Intel C, C++ and Fortran compilers, alongside OpenMPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2016.3.210-GCC-4.9.3-2.25' + +dependencies = [ + ('OpenMPI', '1.10.2', '', ('iccifort', compver)), + ('icc', compver), + ('ifort', compver), +] + +moduleclass = 'toolchain' + diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..5de853b009 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -0,0 +1,41 @@ +easyblock = 'ConfigureMake' + +name = 'OpenMPI' +version = '1.10.2' + +homepage = 'http://www.open-mpi.org/' +description = """The Open MPI Project is an open source MPI-2 implementation.""" + +toolchain = {'name': 'iccifort', 'version': '2016.3.210-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] + +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] + +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' +configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path +configopts += '--with-hwloc=/usr/local/packages/hwloc ' # hwloc support +configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading +configopts += '--with-tm=/usr/local/packages/adaptive/torque ' # we want torque support as well + + +configopts += '--enable-debug ' + +# needed for --with-verbs +osdependencies = [('libibverbs-dev', 'libibverbs-devel'), ('libpciaccess-devel'), ('libudev-devel', 'systemd-devel'),] + +libs = ["mpi_cxx", "mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte", "vt", "vt-hyb", "vt-mpi", "vt-mpi-unify"] + +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], + 'dirs': ["include/openmpi/ompi/mpi/cxx"], +} + +modextravars = { + "MXM_LOG_LEVEL": "ERROR", + "MXM_LOG_FILE": "/dev/stderr", +} + +moduleclass = 'mpi' -- GitLab From ac0f87225a974feb0d3092ff6ad768f54282f092 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Thu, 13 Oct 2016 15:09:31 +0100 Subject: [PATCH 456/741] Updating imkl to be like the others in upstream --- ...11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb index 7fc4bb0100..bbbfc083fb 100644 --- a/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-4.9.3-2.25.eb @@ -14,25 +14,11 @@ checksums = ['f72546df27f5ebb0941b5d21fd804e34'] dontcreateinstalldir = 'True' - -# We want this in the module file. We send its output to /dev/null -# as otherwise it conflicts with the easybuild checking. -# It executes compilervars.sh which in turn executes several more scripts -# setting up the environment for icc etc. -modtclfooter = ''' -if [module-info mode load] { - set chan [open /dev/null a] - puts $chan "echo intel64" - puts $chan "source $root/bin/compilervars.sh" -} -''' - - -license_file = '/gpfs/apps/intel/LicenseManager/current/INTEL.lic' +components = ['intel-mkl'] interfaces = True -moduleclass = 'numlib' +license_file = HOME + '/licenses/intel/license.lic' postinstallcmds = [ # extract the examples @@ -44,5 +30,7 @@ postinstallcmds = [ ] modextravars = { - 'MKL_EXAMPLES' : '%(installdir)s/mkl/examples/', + 'MKL_EXAMPLES': '%(installdir)s/mkl/examples/', } + +moduleclass = 'numlib' -- GitLab From 30993ba3a23df3400223e079cdf4d1b7b61b8db5 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Thu, 13 Oct 2016 15:13:29 +0100 Subject: [PATCH 457/741] Updating OpenMPI to be like similar files on upstream --- ...10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb index 5de853b009..2320c2ab64 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -9,23 +9,20 @@ description = """The Open MPI Project is an open source MPI-2 implementation.""" toolchain = {'name': 'iccifort', 'version': '2016.3.210-GCC-4.9.3-2.25'} sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads'] -source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path -configopts += '--with-hwloc=/usr/local/packages/hwloc ' # hwloc support +configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading -configopts += '--with-tm=/usr/local/packages/adaptive/torque ' # we want torque support as well - -configopts += '--enable-debug ' +dependencies = [('hwloc', '1.11.3')] # needed for --with-verbs -osdependencies = [('libibverbs-dev', 'libibverbs-devel'), ('libpciaccess-devel'), ('libudev-devel', 'systemd-devel'),] +osdependencies = [('libibverbs-dev', 'libibverbs-devel')] libs = ["mpi_cxx", "mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte", "vt", "vt-hyb", "vt-mpi", "vt-mpi-unify"] - sanity_check_paths = { 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + @@ -33,9 +30,10 @@ sanity_check_paths = { 'dirs': ["include/openmpi/ompi/mpi/cxx"], } -modextravars = { - "MXM_LOG_LEVEL": "ERROR", - "MXM_LOG_FILE": "/dev/stderr", -} +sanity_check_commands = [ + ('mpicc --version | grep icc', ''), + ('mpicxx --version | grep icpc', ''), + ('mpifort --version | grep ifort', ''), +] moduleclass = 'mpi' -- GitLab From 183c2b982da67c49c162a9a1cca00a9c6ac010e2 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Thu, 13 Oct 2016 15:50:02 +0100 Subject: [PATCH 458/741] Amber 16 support for serial, MPI and CUDA builds - including all deps --- .../a/Amber/Amber-16-iomkl-2016.07-serial.eb | 32 ++++ .../a/Amber/Amber-16-iomkl-2016.07.eb | 32 ++++ ...er-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb | 32 ++++ ...oconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb | 26 ++++ ...omake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb | 36 +++++ ...s-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb | 17 +++ ...ison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 22 +++ ...zip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb | 15 ++ ...Make-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb | 31 ++++ ...5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 45 ++++++ ...URL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 31 ++++ ...gen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb | 19 +++ ...lex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb | 14 ++ .../GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 30 ++++ ...DF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb | 23 +++ ...adline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb | 32 ++++ ...tool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb | 17 +++ .../M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb | 23 +++ ...curses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 34 +++++ ...DF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb | 20 +++ ...tCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 35 +++++ ...SSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb | 19 +++ ...hon-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb | 137 ++++++++++++++++++ ...Lite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb | 43 ++++++ .../Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb | 23 +++ .../Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 25 ++++ .../Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 26 ++++ ...zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb | 22 +++ 28 files changed, 861 insertions(+) create mode 100644 easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb create mode 100644 easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb create mode 100644 easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb new file mode 100644 index 0000000000..35516d3232 --- /dev/null +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb @@ -0,0 +1,32 @@ +# +# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb +# +name = 'Amber' +version = '16' +ambertools_ver = '16' +# Patch levels from http://ambermd.org/bugfixes16.html and http://ambermd.org/bugfixesat.html +patchlevels = (5, 14) # (AmberTools, Amber) +versionsuffix = '-AmberTools-%s-patchlevel-%s-%s-serial' %(ambertools_ver, patchlevels[0], patchlevels[1]) + +homepage = 'http://ambermd.org/amber.html' +description = """Amber (originally Assisted Model Building with Energy + Refinement) is software for performing molecular dynamics and structure + prediction.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'usempi': False} + +sources = [ + 'Amber%(version)s.tar.bz2', + 'AmberTools%s.tar.bz2' % ambertools_ver, +] + +dependencies = [ + ('netCDF', '4.4.0'), + ('netCDF-Fortran', '4.4.4'), + ('Python', '2.7.11'), +] + +patches = ['Amber-16_fix-hardcoding.patch'] + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb new file mode 100644 index 0000000000..4551ed1bc9 --- /dev/null +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb @@ -0,0 +1,32 @@ +# +# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb +# +name = 'Amber' +version = '16' +ambertools_ver = '16' +# Patch levels from http://ambermd.org/bugfixes16.html and http://ambermd.org/bugfixesat.html +patchlevels = (5, 14) # (AmberTools, Amber) +versionsuffix = '-AmberTools-%s-patchlevel-%s-%s' %(ambertools_ver, patchlevels[0], patchlevels[1]) + +homepage = 'http://ambermd.org/amber.html' +description = """Amber (originally Assisted Model Building with Energy + Refinement) is software for performing molecular dynamics and structure + prediction.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'usempi': True} + +sources = [ + 'Amber%(version)s.tar.bz2', + 'AmberTools%s.tar.bz2' % ambertools_ver, +] + +dependencies = [ + ('netCDF', '4.4.0'), + ('netCDF-Fortran', '4.4.4'), + ('Python', '2.7.11'), +] + +patches = ['Amber-16_fix-hardcoding.patch'] + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb new file mode 100644 index 0000000000..a2cab13af2 --- /dev/null +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb @@ -0,0 +1,32 @@ +# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb +# +name = 'Amber' +version = '16' +ambertools_ver = '16' +# Patch levels from http://ambermd.org/bugfixes16.html and http://ambermd.org/bugfixesat.html +patchlevels = (5, 14) # (AmberTools, Amber) +versionsuffix = '-AmberTools-%s-patchlevel-%s-%s-CUDA' %(ambertools_ver, patchlevels[0], patchlevels[1]) + +homepage = 'http://ambermd.org/amber.html' +description = """Amber (originally Assisted Model Building with Energy + Refinement) is software for performing molecular dynamics and structure + prediction.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'usempi': True} + +sources = [ + 'Amber%(version)s.tar.bz2', + 'AmberTools%s.tar.bz2' % ambertools_ver, +] + +dependencies = [ + ('CUDA', '7.5.18', '', ('iccifort', '2016.3.210-GCC-4.9.3-2.25')), + ('netCDF', '4.4.0'), + ('netCDF-Fortran', '4.4.4'), + ('Python', '2.7.11'), +] + +patches = ['Amber-16_fix-hardcoding.patch'] + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..f88254bccf --- /dev/null +++ b/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Autoconf' +version = '2.69' + +homepage = 'http://www.gnu.org/software/autoconf/' +description = """Autoconf is an extensible package of M4 macros that produce shell scripts + to automatically configure software source code packages. These scripts can adapt the + packages to many kinds of UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template file that lists the + operating system features that the package can use, in the form of M4 macro calls.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('M4', '1.4.17')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["autoconf", "autoheader", "autom4te", "autoreconf", "autoscan", + "autoupdate", "ifnames"]], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..54ded3244b --- /dev/null +++ b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,36 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Created by Andrew Edmondson +# Copied from Automake-1.15-intel-2016b.eb, which had the following copywrite information: +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'Automake' +version = "1.15" + +homepage = 'http://www.gnu.org/software/automake/automake.html' +description = "Automake: GNU Standards-compliant Makefile generator" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('Autoconf', '2.69')] + +sanity_check_paths = { + 'files': ['bin/automake', 'bin/aclocal'], + 'dirs': [] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..1fe6a834c7 --- /dev/null +++ b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,17 @@ +easyblock = 'Bundle' + +name = 'Autotools' +version = '20150215' # date of the most recent change + +homepage = 'http://autotools.io' +description = """This bundle collect the standard GNU build tools: Autoconf, Automake and libtool""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +dependencies = [ + ('Autoconf', '2.69'), # 20120424 + ('Automake', '1.15'), # 20150105 + ('libtool', '2.4.6'), # 20150215 +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..31858dc8f2 --- /dev/null +++ b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'Bison' +version = '3.0.4' + +homepage = 'http://www.gnu.org/software/bison' +description = """Bison is a general-purpose parser generator that converts an annotated context-free grammar + into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +builddependencies = [('M4', '1.4.17')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["bison", "yacc"]] + ["lib/liby.a"], + 'dirs': [], +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..d16cac5f5d --- /dev/null +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,15 @@ +name = 'bzip2' +version = '1.0.6' + +homepage = 'http://www.bzip.org/' +description = """bzip2 is a freely available, patent free, high-quality data compressor. It typically + compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical + compressors), whilst being around twice as fast at compression and six times faster at decompression.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://www.bzip.org/%(version)s'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..36a239c230 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'CMake' +version = '3.4.1' + +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. + CMake is a family of tools designed to build, test and package software.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = ['http://www.cmake.org/files/v%(version_major_minor)s'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = '-- -DCMAKE_USE_OPENSSL=1' + +dependencies = [ + ('ncurses', '6.0'), + # OS dependency should be preferred if the os version is more recent then this version, + # it's nice to have an up to date openssl for security reasons + #('OpenSSL', '1.0.1p'), +] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..65287edcc6 --- /dev/null +++ b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -0,0 +1,45 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Created by Andrew Edmondson . Copied from CUDA-7.5.18-iccifort-2015.3.187-GNU-4.9.3-2.25.eb, which had the following copywrite information: +# +# Copyright:: Copyright 2012-2013 Cyprus Institute / CaSToRC, University of Luxembourg / LCSB, Ghent University, +# Forschungszentrum Juelich +# Authors:: George Tsouloupas , Fotis Georgatos , Kenneth Hoste +# Authors:: Damian Alvarez +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-99.html +## + +#easyblock = 'ConfigureMake' + +name = 'CUDA' +version = '7.5.18' + +homepage = 'https://developer.nvidia.com/cuda-toolkit' +description = """CUDA (formerly Compute Unified Device Architecture) is a parallel + computing platform and programming model created by NVIDIA and implemented by the + graphics processing units (GPUs) that they produce. CUDA gives developers access + to the virtual instruction set and memory of the parallel computational elements in CUDA GPUs.""" + +toolchain = {'name': 'iccifort', 'version': '2016.3.210-GCC-4.9.3-2.25'} + +source_urls = ['http://developer.download.nvidia.com/compute/cuda/%(version_major_minor)s/Prod/local_installers/'] + +sources = ['%(namelower)s_%(version)s_linux.run'] +checksums = ['4b3bcecf0dfc35928a0898793cf3e4c6'] + +# Necessary to allow to use a GCC 4.9.3 toolchain, as CUDA by default just supports up to 4.9.2. +# Tested, but not throughly, so it is not guaranteed to don't cause problems +installopts = '-override compiler' + +host_compilers = ["icpc", "g++"] + +# Be careful and have a message consistent with the generated wrappers +modloadmsg = "nvcc uses g++ as the default host compiler. If you want to use icpc as a host compiler you can use" +modloadmsg += " nvcc_icpc, or nvcc -ccbin=icpc. Likewise, a g++ wrapper called nvcc_g++ has been also created." + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..67f22b9f41 --- /dev/null +++ b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'cURL' +version = '7.46.0' + +homepage = 'http://curl.haxx.se' +description = """libcurl is a free and easy-to-use client-side URL transfer library, + supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, + POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports + SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, + proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, + Kerberos), file transfer resume, http proxy tunneling and more.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://curl.haxx.se/download/'] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +# dependencies = [('OpenSSL', '1.0.1p')] +# configopts = "--with-ssl=$EBROOTOPENSSL" + +modextravars = {'CURL_INCLUDES': '%(installdir)s/include'} + +sanity_check_paths = { + 'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.so'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..d5628e7fb3 --- /dev/null +++ b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,19 @@ +name = 'Doxygen' +version = '1.8.11' + +homepage = 'http://www.doxygen.org' +description = """Doxygen is a documentation system for C++, C, Java, Objective-C, Python, + IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = ['%(namelower)s-%(version)s.src.tar.gz'] +source_urls = ['http://ftp.stack.nl/pub/users/dimitri/'] + +builddependencies = [ + ('flex', '2.5.39'), + ('CMake', '3.4.1'), + ('Bison', '3.0.4'), +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..a74193a537 --- /dev/null +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,14 @@ +name = 'flex' +version = '2.5.39' + +homepage = 'http://flex.sourceforge.net/' +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, + sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..6a0888eaf0 --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'GMP' +version = '6.1.0' + +homepage = 'http://gmplib.org/' +description = """GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True, 'precise': True} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://ftp.gnu.org/gnu/gmp'] + +builddependencies = [ + ('Autotools', '20150215'), +] + +# enable C++ interface +configopts = '--enable-cxx' + +runtest = 'check' + +sanity_check_paths = { + 'files': ['lib/libgmp.%s' % SHLIB_EXT, 'include/gmp.h'], + 'dirs': [], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..e3d38f1976 --- /dev/null +++ b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,23 @@ +name = 'HDF5' +version = '1.8.16' + +homepage = 'http://www.hdfgroup.org/HDF5/' +description = """HDF5 is a unique technology suite that makes possible the management of + extremely large and complex data collections.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'optarch': True, 'pic': True, 'usempi': True} + +source_urls = ['http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['configure_libtool.patch'] + +buildopts = 'CXXFLAGS="$CXXFLAGS -DMPICH_IGNORE_CXX_SEEK"' + +dependencies = [ + ('zlib', '1.2.8'), + ('Szip', '2.1'), +] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..04b53926ef --- /dev/null +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,32 @@ +easyblock = 'ConfigureMake' + +name = 'libreadline' +version = '6.3' + +homepage = 'http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html' +description = """The GNU Readline library provides a set of functions for use by applications that + allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. + The Readline library includes additional functions to maintain a list of previously-entered command lines, + to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = ['readline-%(version)s.tar.gz'] +source_urls = ['http://ftp.gnu.org/gnu/readline'] + +patches = ['libreadline-%(version)s-bugfix.patch'] + +dependencies = [('ncurses', '6.0')] + +# for the termcap symbols, use EB ncurses +preconfigopts = "env LDFLAGS='-lncurses'" + +sanity_check_paths = { + 'files': ['lib/libreadline.a', 'lib/libhistory.a'] + + ['include/readline/%s' % x for x in ['chardefs.h', 'history.h', 'keymaps.h', 'readline.h', 'rlconf.h', + 'rlstdc.h', 'rltypedefs.h', 'tilde.h']], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..8730994eeb --- /dev/null +++ b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,17 @@ +easyblock = 'ConfigureMake' + +name = 'libtool' +version = '2.4.6' + +homepage = 'http://www.gnu.org/software/libtool' +description = """GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries + behind a consistent, portable interface.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [('M4', '1.4.17')] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..2da711ec97 --- /dev/null +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'M4' +version = '1.4.17' + +homepage = 'http://www.gnu.org/software/m4/m4.html' +description = """GNU M4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 compatible + although it has some extensions (for example, handling more than 9 positional parameters to macros). + GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" + +sanity_check_paths = { + 'files': ["bin/m4"], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..ab17db8531 --- /dev/null +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'ncurses' +version = '6.0' + +homepage = 'http://www.gnu.org/software/ncurses/' +description = """The Ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, + and more. It uses Terminfo format, supports pads and color and multiple highlights and forms characters and + function-key mapping, and has all the other SYSV-curses enhancements over BSD Curses.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCE_TAR_GZ] + +configopts = [ + # default build + '--with-shared --enable-overwrite', + # the UTF-8 enabled version (ncursesw) + '--with-shared --enable-overwrite --enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/' +] + +libs = ["form", "menu", "ncurses", "panel"] +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ["captoinfo", "clear", "infocmp", "infotocap", "ncurses%(version_major)s-config", + "reset", "tabs", "tic", "toe", "tput", "tset"]] + + ['lib/lib%s%s.a' % (x, y) for x in libs for y in ['', '_g', 'w', 'w_g']] + + ['lib/lib%s%s.so' % (x, y) for x in libs for y in ['', 'w']] + + ['lib/libncurses++%s.a' % x for x in ['', 'w']], + 'dirs': ['include', 'include/ncursesw'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..9fa376ea1b --- /dev/null +++ b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,20 @@ +name = 'netCDF-Fortran' +version = '4.4.4' + +homepage = 'http://www.unidata.ucar.edu/software/netcdf/' +description = """NetCDF (network Common Data Form) is a set of software libraries + and machine-independent data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [ + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', +] + +dependencies = [('netCDF', '4.4.0')] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..2d9153a9ad --- /dev/null +++ b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,35 @@ +name = 'netCDF' +version = '4.4.0' + +homepage = 'http://www.unidata.ucar.edu/software/netcdf/' +description = """NetCDF (network Common Data Form) is a set of software libraries + and machine-independent data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [ + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', +] + +dependencies = [ + ('HDF5', '1.8.16'), + ('cURL', '7.46.0'), +] + +builddependencies = [ + ('CMake', '3.4.1'), + ('Doxygen', '1.8.11'), + ('Szip', '2.1'), +] + +# make sure both static and shared libs are built +configopts = [ + "-DBUILD_SHARED_LIBS=OFF ", + "-DBUILD_SHARED_LIBS=ON ", +] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..e10bff0004 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,19 @@ +name = 'OpenSSL' +version = '1.0.2h' + +homepage = 'http://www.openssl.org/' +description = """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, + and Open Source toolchain implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) + protocols as well as a full-strength general purpose cryptography library. """ + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.openssl.org/source/'] + +dependencies = [('zlib', '1.2.8')] + +runtest = 'test' + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..ed40bed006 --- /dev/null +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,137 @@ +name = 'Python' +version = '2.7.11' + +homepage = 'http://python.org/' +description = """Python is a programming language that lets you work more quickly and integrate your systems + more effectively.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +numpyversion = '1.10.1' +scipyversion = '0.16.1' + +source_urls = ['http://www.python.org/ftp/%(namelower)s/%(version)s/'] +sources = [SOURCE_TGZ] + +# python needs bzip2 to build the bz2 package +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libreadline', '6.3'), + ('ncurses', '6.0'), + ('SQLite', '3.9.2'), + #('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack + ('Tk', '8.6.4'), # this requires a full X11 stack + ('GMP', '6.1.0'), + ('OpenSSL', '1.0.2h'), # OS dependency should be preferred if the os version is more recent then this version, it's +# nice to have an up to date openssl for security reasons +] + +#osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +# order is important! +# package versions updated May 28th 2015 +exts_list = [ + ('setuptools', '18.7.1', { + 'source_urls': ['https://pypi.python.org/packages/source/s/setuptools/'], + }), + ('pip', '7.1.2', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pip/'], + }), + ('nose', '1.3.7', { + 'source_urls': ['https://pypi.python.org/packages/source/n/nose/'], + }), + ('numpy', numpyversion, { + 'source_urls': [('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download')], + 'patches': ['numpy-1.8.0-mkl.patch'], + }), + ('scipy', scipyversion, { + 'source_urls': [('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download')], + }), + ('blist', '1.3.6', { + 'source_urls': ['https://pypi.python.org/packages/source/b/blist/'], + }), + ('mpi4py', '1.3.1', { + 'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'], + }), + ('paycheck', '1.0.2', { + 'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'], + }), + ('argparse', '1.4.0', { + 'source_urls': ['https://pypi.python.org/packages/source/a/argparse/'], + }), + ('pbr', '1.8.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pbr/'], + }), + ('lockfile', '0.12.2', { + 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], + }), + ('Cython', '0.23.4', { + 'source_urls': ['https://pypi.python.org/packages/source/c/cython/'], + }), + ('six', '1.10.0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], + }), + ('dateutil', '2.4.2', { + 'source_tmpl': 'python-%(name)s-%(version)s.tar.gz', + 'source_urls': ['https://pypi.python.org/packages/source/p/python-dateutil/'], + }), + ('deap', '1.0.2', { + 'source_tmpl': '%(name)s-%(version)s.post2.tar.gz', + 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], + }), + ('decorator', '4.0.4', { + 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], + }), + ('arff', '2.1.0', { + 'source_tmpl': 'liac-%(name)s-%(version)s.zip', + 'source_urls': ['https://pypi.python.org/packages/source/l/liac-arff/'], + }), + ('pycrypto', '2.6.1', { + 'modulename': 'Crypto', + 'source_urls': ['http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/'], + }), + ('ecdsa', '0.13', { + 'source_urls': ['https://pypi.python.org/packages/source/e/ecdsa/'], + }), + ('paramiko', '1.16.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/paramiko/'], + }), + ('pyparsing', '2.0.6', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pyparsing/'], + }), + ('netifaces', '0.10.4', { + 'source_urls': ['https://pypi.python.org/packages/source/n/netifaces'], + }), + ('netaddr', '0.7.18', { + 'source_urls': ['https://pypi.python.org/packages/source/n/netaddr'], + }), + ('funcsigs', '0.4', { + 'source_urls': ['https://pypi.python.org/packages/source/f/funcsigs'], + }), + ('mock', '1.3.0', { + 'source_urls': ['https://pypi.python.org/packages/source/m/mock'], + }), + ('pytz', '2015.7', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pytz'], + }), + ('pandas', '0.17.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pandas'], + }), + ('enum34', '1.1.2', { + 'modulename': 'enum', + 'source_urls': ['https://pypi.python.org/packages/source/e/enum34'], + }), + ('bitstring', '3.1.3', { + # grab tarball from GitHub rather than PyPi since 3.1.3 release on PyPi disappeared; + # cfr. https://github.com/scott-griffiths/bitstring/issues/159 + 'source_tmpl': '%(name)s-%(version)s.tar.gz', + 'source_urls': ['https://github.com/scott-griffiths/bitstring/archive/'], + }), + ('virtualenv', '14.0.5', { + 'source_urls': ['https://pypi.python.org/packages/source/v/virtualenv'], + }), +] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..6d4f59e1c2 --- /dev/null +++ b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,43 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Created by Andrew Edmondson +# Copied from SQLite-3.9.2-intel-2016b.eb, which had the following copywrite information: +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'SQLite' +version = '3.9.2' + +homepage = 'http://www.sqlite.org/' +description = 'SQLite: SQL Database Engine in a C Library' + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +# eg. http://www.sqlite.org/2014/sqlite-autoconf-3080600.tar.gz +source_urls = ['http://www.sqlite.org/2015/'] +version_str = '%%(version_major)s%s00' % ''.join('%02d' % int(x) for x in version.split('.')[1:]) +sources = ['sqlite-autoconf-%s.tar.gz' % version_str] + +dependencies = [ + ('libreadline', '6.3'), + ('Tcl', '8.6.4'), +] + +parallel = 1 + +sanity_check_paths = { + 'files': ['bin/sqlite3', 'include/sqlite3ext.h', 'include/sqlite3.h', 'lib/libsqlite3.a', 'lib/libsqlite3.%s' % SHLIB_EXT], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..30b6725636 --- /dev/null +++ b/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'Szip' +version = '2.1' + +homepage = 'http://www.hdfgroup.org/doc_resource/SZIP/' +description = "Szip compression software, providing lossless compression of scientific data" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['http://www.hdfgroup.org/ftp/lib-external/szip/%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +sanity_check_paths = { + 'files': ["lib/libsz.a", "lib/libsz.so"] + + ["include/%s" % x for x in ["ricehdf.h", "szip_adpt.h", "szlib.h"]], + 'dirs': [], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..b0142c9365 --- /dev/null +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'Tcl' +version = '8.6.4' + +homepage = 'http://www.tcl.tk/' +description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, +suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads EXTRA_INSTALL="install-private-headers"' + +runtest = 'test' + +start_dir = 'unix' + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..88cf038a76 --- /dev/null +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Tk' +version = '8.6.4' + +homepage = 'http://www.tcl.tk/' +description = """Tk is an open source, cross-platform widget toolchain that provides a library of basic elements for + building a graphical user interface (GUI) in many different programming languages.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +patches = ['Tk-8.6.4_different-prefix-with-tcl.patch'] + +dependencies = [ + ('Tcl', version), + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib CFLAGS="-I$EBROOTTCL/include"' + +start_dir = 'unix' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..28c7cc5e43 --- /dev/null +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'zlib' +version = '1.2.8' + +homepage = 'http://www.zlib.net/' +description = """zlib is designed to be a free, general-purpose, legally unencumbered -- that is, + not covered by any patents -- lossless data-compression library for use on virtually any + computer hardware and operating system.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] + +sanity_check_paths = { + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.so'], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From 74405a7c10c5a6e0c03b3c1b774f6af3e535c7b0 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Thu, 13 Oct 2016 15:57:06 +0100 Subject: [PATCH 459/741] Adding missing dependencies for OpenMPI: hwloc and then numactl --- ...11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 25 +++++++++++++++++++ ...0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/n/numactl/numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..701adb8479 --- /dev/null +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -0,0 +1,25 @@ +# Automatically converted from hwloc-1.11.3-iccifort-2016.3.210-GCC-5.4.0-2.26.eb +# by /gpfs/sysapps/bham/scripts/easybuild/copy_to_toolchain.py +easyblock = 'ConfigureMake' + +name = 'hwloc' +version = '1.11.3' + +homepage = 'http://www.open-mpi.org/projects/hwloc/' +description = """The Portable Hardware Locality (hwloc) software package provides a portable abstraction + (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including + NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various + system attributes such as cache and memory information as well as the locality of I/O devices such as + network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering + information about modern computing hardware so as to exploit it accordingly and efficiently.""" + +toolchain = {'name': 'iccifort', 'version': '2016.3.210-GCC-4.9.3-2.25'} + +dependencies = [('numactl', '2.0.11')] + +configopts = "--enable-libnuma=$EBROOTNUMACTL" + +source_urls = ['http://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] +sources = [SOURCE_TAR_GZ] + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/n/numactl/numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..734efafdaf --- /dev/null +++ b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -0,0 +1,25 @@ +# Automatically converted from numactl-2.0.11-iccifort-2016.3.210-GCC-5.4.0-2.26.eb +# by /gpfs/sysapps/bham/scripts/easybuild/copy_to_toolchain.py +easyblock = 'ConfigureMake' + +name = 'numactl' +version = '2.0.11' + +checksums = ['d3bc88b7ddb9f06d60898f4816ae9127'] + +homepage = 'http://oss.sgi.com/projects/libnuma/' +description = """The numactl program allows you to run your application program on specific cpu's and memory nodes. + It does this by supplying a NUMA memory policy to the operating system before running your program. + The libnuma library provides convenient ways for you to add NUMA memory policies into your own program.""" + +toolchain = {'name': 'iccifort', 'version': '2016.3.210-GCC-4.9.3-2.25'} + +source_urls = ['ftp://oss.sgi.com/www/projects/libnuma/download/'] +sources = [SOURCE_TAR_GZ] + +sanity_check_paths = { + 'files': ['bin/numactl', 'bin/numastat', 'lib/libnuma.%s' % SHLIB_EXT, 'lib/libnuma.a'], + 'dirs': ['share/man', 'include'] +} + +moduleclass = 'tools' \ No newline at end of file -- GitLab From 114fa5350b54e4793199f3680b4eb863815c8aed Mon Sep 17 00:00:00 2001 From: Markus Geimer Date: Thu, 13 Oct 2016 18:31:29 +0200 Subject: [PATCH 460/741] Fix conflicts --- easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb | 2 +- easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb index 0e52dfb998..3f2d3b24f6 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb @@ -15,6 +15,6 @@ checksums = [ 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz ] -dependencies = [('M4', '1.4.17')] +dependencies = [('M4', '1.4.17', '', ('GNU', '4.9.3-2.25'))] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb index c1b7ac5006..cc528417f1 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb @@ -15,6 +15,6 @@ checksums = [ 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz ] -dependencies = [('M4', '1.4.17')] +dependencies = [('M4', '1.4.17', '', ('GNU', '4.9.3-2.25'))] moduleclass = 'lang' -- GitLab From 215efabdb5300d98116e159a077f99b8b7076d25 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 12:22:42 +0100 Subject: [PATCH 461/741] Responding to comments. Bumping OpenMPI to 1.10.4 and removing local comments. --- .../hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 2 -- easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb | 2 +- .../numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 4 +--- ...b => OpenMPI-1.10.4-iccifort-2016.3.210-GCC-4.9.3-2.25.eb} | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) rename easybuild/easyconfigs/o/OpenMPI/{OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb => OpenMPI-1.10.4-iccifort-2016.3.210-GCC-4.9.3-2.25.eb} (98%) diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb index 701adb8479..d786ed3e2f 100644 --- a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.3-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -1,5 +1,3 @@ -# Automatically converted from hwloc-1.11.3-iccifort-2016.3.210-GCC-5.4.0-2.26.eb -# by /gpfs/sysapps/bham/scripts/easybuild/copy_to_toolchain.py easyblock = 'ConfigureMake' name = 'hwloc' diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb index e9a72d1cbc..cf9954cf88 100644 --- a/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -13,7 +13,7 @@ compver = '2016.3.210-GCC-4.9.3-2.25' dependencies = [ ('icc', compver), ('ifort', compver), - ('OpenMPI', '1.10.2', '', ('iccifort', compver)), + ('OpenMPI', '1.10.4', '', ('iccifort', compver)), ('imkl', '11.3.3.210', '', ('iompi', version)), ] diff --git a/easybuild/easyconfigs/n/numactl/numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb index 734efafdaf..61b226e7c4 100644 --- a/easybuild/easyconfigs/n/numactl/numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -1,5 +1,3 @@ -# Automatically converted from numactl-2.0.11-iccifort-2016.3.210-GCC-5.4.0-2.26.eb -# by /gpfs/sysapps/bham/scripts/easybuild/copy_to_toolchain.py easyblock = 'ConfigureMake' name = 'numactl' @@ -22,4 +20,4 @@ sanity_check_paths = { 'dirs': ['share/man', 'include'] } -moduleclass = 'tools' \ No newline at end of file +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.4-iccifort-2016.3.210-GCC-4.9.3-2.25.eb similarity index 98% rename from easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb rename to easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.4-iccifort-2016.3.210-GCC-4.9.3-2.25.eb index 2320c2ab64..c16d7bf245 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.2-iccifort-2016.3.210-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.10.4-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -1,7 +1,7 @@ easyblock = 'ConfigureMake' name = 'OpenMPI' -version = '1.10.2' +version = '1.10.4' homepage = 'http://www.open-mpi.org/' description = """The Open MPI Project is an open source MPI-2 implementation.""" -- GitLab From 74e6a79ff72b287bb0dd5f8a205b6b06bf93307d Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Fri, 14 Oct 2016 13:27:48 +0200 Subject: [PATCH 462/741] {devel}[foss/2016b] CMake 3.6.2 (REVIEW) --- .../c/CMake/CMake-3.6.2-foss-2016b.eb | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 easybuild/easyconfigs/c/CMake/CMake-3.6.2-foss-2016b.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-3.6.2-foss-2016b.eb b/easybuild/easyconfigs/c/CMake/CMake-3.6.2-foss-2016b.eb new file mode 100644 index 0000000000..adb0724437 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-3.6.2-foss-2016b.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'CMake' +version = '3.6.2' + +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. + CMake is a family of tools designed to build, test and package software.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['http://www.cmake.org/files/v%(version_major_minor)s'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = '-- -DCMAKE_USE_OPENSSL=1' + +dependencies = [ + ('ncurses', '6.0'), + # OS dependency should be preferred if the os version is more recent then this version, + # it's nice to have an up to date openssl for security reasons + #('OpenSSL', '1.0.2j'), +] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From f1716237c8182b1bd8a5145dc9fd4d6d3e0a1c72 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 12:31:23 +0100 Subject: [PATCH 463/741] Bumping OpenMPI 10 1.10.4 in iompi-2016.09-GCC-4.9.3-2.25.eb --- easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb index a5170410e3..3c9854b3e1 100644 --- a/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-4.9.3-2.25.eb @@ -11,7 +11,7 @@ toolchain = {'name': 'dummy', 'version': 'dummy'} compver = '2016.3.210-GCC-4.9.3-2.25' dependencies = [ - ('OpenMPI', '1.10.2', '', ('iccifort', compver)), + ('OpenMPI', '1.10.4', '', ('iccifort', compver)), ('icc', compver), ('ifort', compver), ] -- GitLab From 1811b1522edc61071acafd4001a234d75f7ea11d Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Fri, 14 Oct 2016 13:33:20 +0200 Subject: [PATCH 464/741] {bio}[intel/2016b] RELION {1.4,2.0.1} (REVIEW) --- .../r/RELION/RELION-1.4-intel-2016b-single.eb | 32 +++++++++++++++++++ .../r/RELION/RELION-1.4-intel-2016b.eb | 31 ++++++++++++++++++ .../r/RELION/RELION-1.4_fltk-config.patch | 11 +++++++ .../r/RELION/RELION-2.0.1-intel-2016b.eb | 28 ++++++++++++++++ 4 files changed, 102 insertions(+) create mode 100644 easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb create mode 100644 easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb create mode 100644 easybuild/easyconfigs/r/RELION/RELION-1.4_fltk-config.patch create mode 100644 easybuild/easyconfigs/r/RELION/RELION-2.0.1-intel-2016b.eb diff --git a/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb b/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb new file mode 100644 index 0000000000..4af81b8528 --- /dev/null +++ b/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb @@ -0,0 +1,32 @@ +easyblock = 'ConfigureMake' + +name = 'RELION' +version = '1.4' +versionsuffix = '-single' + +homepage = 'http://www2.mrc-lmb.cam.ac.uk/relion/index.php/Main_Page' +description = """RELION (for REgularised LIkelihood OptimisatioN, pronounce rely-on) is a stand-alone computer + program that employs an empirical Bayesian approach to refinement of (multiple) 3D reconstructions or 2D class + averages in electron cryo-microscopy (cryo-EM).""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'opt': True} + +source_urls = ['http://www2.mrc-lmb.cam.ac.uk/groups/scheres/1sep15/'] +sources = [SOURCELOWER_TAR_BZ2] + +patches = ['RELION-%(version)s_fltk-config.patch'] + +dependencies = [ + ('X11', '20160819'), + ('FFTW', '3.3.5'), + ('FLTK', '1.3.3'), +] + +# RELION expects FLTK to be in external/fltk-1.3.0 and we have to add fltk libraries +configopts = '--enable-mpi --enable-float LIBS="-lfltk -lXcursor -lXfixes -lXext -lXft -lfontconfig ' +configopts += '-lXinerama -lpthread -lX11" && ln -s $EBROOTFLTK/include external/fltk-1.3.0 ' +# users expect the maingui binary to be called relion +installopts = " && cp %(installdir)s/bin/relion_maingui %(installdir)s/bin/%(namelower)s " + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb b/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb new file mode 100644 index 0000000000..c159baafb4 --- /dev/null +++ b/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'RELION' +version = '1.4' + +homepage = 'http://www2.mrc-lmb.cam.ac.uk/relion/index.php/Main_Page' +description = """RELION (for REgularised LIkelihood OptimisatioN, pronounce rely-on) is a stand-alone computer + program that employs an empirical Bayesian approach to refinement of (multiple) 3D reconstructions or 2D class + averages in electron cryo-microscopy (cryo-EM).""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'opt': True} + +source_urls = ['http://www2.mrc-lmb.cam.ac.uk/groups/scheres/1sep15/'] +sources = [SOURCELOWER_TAR_BZ2] + +patches = ['RELION-%(version)s_fltk-config.patch'] + +dependencies = [ + ('X11', '20160819'), + ('FFTW', '3.3.5'), + ('FLTK', '1.3.3'), +] + +# RELION expects FLTK to be in external/fltk-1.3.0 and we have to add fltk libraries +configopts = '--enable-mpi LIBS="-lfltk -lXcursor -lXfixes -lXext -lXft -lfontconfig ' +configopts += '-lXinerama -lpthread -lX11" && ln -s $EBROOTFLTK/include external/fltk-1.3.0 ' +# users expect the maingui binary to be called relion +installopts = " && cp %(installdir)s/bin/relion_maingui %(installdir)s/bin/%(namelower)s " + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/r/RELION/RELION-1.4_fltk-config.patch b/easybuild/easyconfigs/r/RELION/RELION-1.4_fltk-config.patch new file mode 100644 index 0000000000..22a822811f --- /dev/null +++ b/easybuild/easyconfigs/r/RELION/RELION-1.4_fltk-config.patch @@ -0,0 +1,11 @@ +--- configure.orig 2014-08-11 17:18:31.686813247 +0200 ++++ configure 2014-08-11 17:18:39.390957858 +0200 +@@ -15846,7 +15846,7 @@ + #Check for FLTK + # as g++ seems needed and not gcc for compilation, + #just check for presence of fltk-config program +-fltkfile=`pwd`/bin/fltk-config ++fltkfile=`which fltk-config` + as_ac_File=`$as_echo "ac_cv_file_$fltkfile" | $as_tr_sh` + { $as_echo "$as_me:$LINENO: checking for $fltkfile" >&5 + $as_echo_n "checking for $fltkfile... " >&6; } diff --git a/easybuild/easyconfigs/r/RELION/RELION-2.0.1-intel-2016b.eb b/easybuild/easyconfigs/r/RELION/RELION-2.0.1-intel-2016b.eb new file mode 100644 index 0000000000..2a14ff8652 --- /dev/null +++ b/easybuild/easyconfigs/r/RELION/RELION-2.0.1-intel-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'CMakeMake' + +name = 'RELION' +version = '2.0.1' +commit_id = 'a6225608e270' + +homepage = 'http://www2.mrc-lmb.cam.ac.uk/relion/index.php/Main_Page' +description = """RELION (for REgularised LIkelihood OptimisatioN, pronounce rely-on) is a stand-alone computer + program that employs an empirical Bayesian approach to refinement of (multiple) 3D reconstructions or 2D class + averages in electron cryo-microscopy (cryo-EM).""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'opt': True} + +source_urls = ['https://bitbucket.org/tcblab/relion2-beta/get/'] +sources = ['%s.tar.gz' % commit_id] + +builddependencies = [ + ('CMake', '3.6.2'), +] + +dependencies = [ + ('X11', '20160819'), + ('FFTW', '3.3.5'), + ('FLTK', '1.3.3'), +] + +moduleclass = 'bio' -- GitLab From b14ee7220da1bbc74379dc8da03d2b4e8e57ca11 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Fri, 14 Oct 2016 14:03:06 +0200 Subject: [PATCH 465/741] {vis}[foss/2016b] Mesa 12.0.2 (REVIEW) --- .../l/libdrm/libdrm-2.4.70-foss-2016b.eb | 24 ++++++++ .../libxml2-2.9.4-foss-2016b-Python-2.7.12.eb | 24 ++++++++ .../Mako-1.0.4-foss-2016b-Python-2.7.12.eb | 22 +++++++ .../m/Mesa/Mesa-12.0.2-foss-2016b.eb | 59 +++++++++++++++++++ .../n/nettle/nettle-3.2-foss-2016b.eb | 28 +++++++++ 5 files changed, 157 insertions(+) create mode 100644 easybuild/easyconfigs/l/libdrm/libdrm-2.4.70-foss-2016b.eb create mode 100644 easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/m/Mako/Mako-1.0.4-foss-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-foss-2016b.eb create mode 100644 easybuild/easyconfigs/n/nettle/nettle-3.2-foss-2016b.eb diff --git a/easybuild/easyconfigs/l/libdrm/libdrm-2.4.70-foss-2016b.eb b/easybuild/easyconfigs/l/libdrm/libdrm-2.4.70-foss-2016b.eb new file mode 100644 index 0000000000..5d9e8ac938 --- /dev/null +++ b/easybuild/easyconfigs/l/libdrm/libdrm-2.4.70-foss-2016b.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'libdrm' +version = '2.4.70' + +homepage = 'http://dri.freedesktop.org' +description = """Direct Rendering Manager runtime library.""" + +source_urls = ['http://dri.freedesktop.org/libdrm/'] +sources = [SOURCELOWER_TAR_GZ] + +toolchain = {'name': 'foss', 'version': '2016b'} + +dependencies = [ + ('X11', '20160819'), +] + +sanity_check_paths = { + 'files': ['include/xf86drm.h', 'include/xf86drmMode.h', 'lib/libdrm_intel.%s' % SHLIB_EXT, + 'lib/libdrm_radeon.%s' % SHLIB_EXT, 'lib/libdrm.%s' % SHLIB_EXT, 'lib/libkms.%s' % SHLIB_EXT], + 'dirs': ['include/libdrm', 'include/libkms', 'lib/pkgconfig'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..a047fc32c8 --- /dev/null +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.4-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,24 @@ +name = 'libxml2' +version = '2.9.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://xmlsoft.org/' +description = """Libxml2 is the XML C parser and toolchain developed for the Gnome project (but usable + outside of the Gnome platform).""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [ + 'http://xmlsoft.org/sources/', + 'http://xmlsoft.org/sources/old/' +] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('zlib', '1.2.8'), + ('XZ', '5.2.2'), + ('Python', '2.7.12'), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/Mako/Mako-1.0.4-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/m/Mako/Mako-1.0.4-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..eaaa1eb1ea --- /dev/null +++ b/easybuild/easyconfigs/m/Mako/Mako-1.0.4-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,22 @@ +easyblock = 'PythonPackage' + +name = 'Mako' +version = '1.0.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.makotemplates.org' +description = """A super-fast templating language that borrows the best ideas from the existing templating languages""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.12')] + +sanity_check_paths = { + 'files': ['bin/mako-render'], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s.egg'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-foss-2016b.eb b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-foss-2016b.eb new file mode 100644 index 0000000000..8152b5bb38 --- /dev/null +++ b/easybuild/easyconfigs/m/Mesa/Mesa-12.0.2-foss-2016b.eb @@ -0,0 +1,59 @@ +# the purpose of the easyconfig is to build a Mesa for software rendering, +# not hardware rendering. This means you want at least SSE4.2. We build: +# - llvmpipe: the high-performance Gallium LLVM driver +# - swr: Intel's OpenSWR +# it will try to use the llvmpipe by default. It you want swr, do: +# GALLIUM_DRIVER=swr + +easyblock = 'ConfigureMake' + +name = 'Mesa' +version = '12.0.2' + +homepage = 'http://www.mesa3d.org/' +description = """Mesa is an open-source implementation of the OpenGL specification - + a system for rendering interactive 3D graphics.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +# swr detects and builds parts specific for AVX and AVX2. If we use +# -xHost, this always gets overwritten and will fail. +toolchainopts = {'optarch': False} + +sources = [SOURCELOWER_TAR_XZ] +source_urls = [ + 'https://mesa.freedesktop.org/archive/%(version)s', + 'ftp://ftp.freedesktop.org/pub/mesa/%(version)s', + 'ftp://ftp.freedesktop.org/pub/mesa/older-versions/%(version_major)s.x/%(version)s', +] + +builddependencies = [ + ('flex', '2.6.0'), + ('Bison', '3.0.4'), + ('Autotools', '20150215'), + ('pkg-config', '0.29.1'), + ('Mako', '1.0.4', '-Python-2.7.12'), + ('libxml2', '2.9.4', '-Python-2.7.12'), +] + +dependencies = [ + ('zlib', '1.2.8'), + ('nettle', '3.2'), + ('libdrm', '2.4.70'), + ('LLVM', '3.8.1'), + ('X11', '20160819'), +] + +# GLU is not part anymore of Mesa package! +configopts = " --disable-osmesa --enable-gallium-osmesa --enable-gallium-llvm --enable-glx --disable-dri" +configopts += " --disable-driglx-direct --with-gallium-drivers='swrast,swr' --disable-egl" +configopts += " --with-osmesa-bits=32 --enable-texture-float --enable-llvm-shared-libs " + +sanity_check_paths = { + 'files': ['lib/libGL.%s' % SHLIB_EXT, 'lib/libOSMesa.%s' % SHLIB_EXT, 'lib/libGLESv1_CM.%s' % SHLIB_EXT, + 'lib/libGLESv2.%s' %SHLIB_EXT, 'include/GL/glext.h', 'include/GL/gl_mangle.h', 'include/GL/glx.h', + 'include/GL/osmesa.h', 'include/GL/wglext.h', 'include/GL/gl.h', 'include/GL/glxext.h', + 'include/GL/glx_mangle.h', 'include/GLES/gl.h', 'include/GLES2/gl2.h', 'include/GLES3/gl3.h'], + 'dirs': [] +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/n/nettle/nettle-3.2-foss-2016b.eb b/easybuild/easyconfigs/n/nettle/nettle-3.2-foss-2016b.eb new file mode 100644 index 0000000000..d8b0e1009d --- /dev/null +++ b/easybuild/easyconfigs/n/nettle/nettle-3.2-foss-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'ConfigureMake' + +name = 'nettle' +version = '3.2' + +homepage = 'http://www.lysator.liu.se/~nisse/nettle/' +description = """Nettle is a cryptographic library that is designed to fit easily + in more or less any context: In crypto toolkits for object-oriented + languages (C++, Python, Pike, ...), in applications like LSH or GNUPG, + or even in kernel space.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [GNU_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('GMP', '6.1.1'), +] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ['nettle-hash', 'nettle-lfib-stream', 'pkcs1-conv', 'sexp-conv']] + + ['lib64/libhogweed.a', 'lib64/libhogweed.%s' % SHLIB_EXT, + 'lib64/libnettle.a', 'lib64/libnettle.%s' % SHLIB_EXT], + 'dirs': ['include/nettle'], +} + +moduleclass = 'lib' -- GitLab From da243ab23699203f7a4d89f21cadcce296c9cd37 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Fri, 14 Oct 2016 14:51:46 +0200 Subject: [PATCH 466/741] {vis}[foss/2016b] FLTK 1.3.3 (REVIEW) --- .../f/FLTK/FLTK-1.3.3-foss-2016b.eb | 36 +++++++++++++++++++ .../l/libGLU/libGLU-9.0.0-foss-2016b.eb | 24 +++++++++++++ .../x/xprop/xprop-1.2.2-foss-2016b.eb | 30 ++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016b.eb create mode 100644 easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-foss-2016b.eb create mode 100644 easybuild/easyconfigs/x/xprop/xprop-1.2.2-foss-2016b.eb diff --git a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016b.eb b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016b.eb new file mode 100644 index 0000000000..7c571b0ec9 --- /dev/null +++ b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016b.eb @@ -0,0 +1,36 @@ +# +# author: Dina Mahmoud Ibrahim ( Cairo University ) +# +easyblock = 'ConfigureMake' + +name = 'FLTK' +version = '1.3.3' + +homepage = 'http://www.fltk.org' +description = """FLTK is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, + and MacOS X. FLTK provides modern GUI functionality without the bloat and supports 3D graphics via OpenGL + and its built-in GLUT emulation.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = ['%(namelower)s-%(version)s-source.tar.gz'] +source_urls = ['http://fltk.org/pub/%(namelower)s/%(version)s/'] + +configopts = '--enable-shared --enable-threads --enable-xft' + +dependencies = [ + ('Mesa', '12.0.2'), + ('libGLU', '9.0.0'), + ('libpng', '1.6.24'), + ('libjpeg-turbo', '1.5.0'), + ('xprop', '1.2.2'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ['bin/fltk-config', 'bin/fluid', 'lib/libfltk.a', 'lib/libfltk.%s' % SHLIB_EXT], + 'dirs': ['lib'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-foss-2016b.eb b/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-foss-2016b.eb new file mode 100644 index 0000000000..361489070d --- /dev/null +++ b/easybuild/easyconfigs/l/libGLU/libGLU-9.0.0-foss-2016b.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'libGLU' +version = '9.0.0' + +homepage = 'ftp://ftp.freedesktop.org/pub/mesa/glu/' +description = """The OpenGL Utility Library (GLU) is a computer graphics library for OpenGL. """ + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ['ftp://ftp.freedesktop.org/pub/mesa/glu/'] +sources = ['glu-%(version)s.tar.bz2'] + +dependencies = [ + ('Mesa', '12.0.2'), +] + +sanity_check_paths = { + 'files': ['lib/libGLU.so.1'], + 'dirs': [], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/x/xprop/xprop-1.2.2-foss-2016b.eb b/easybuild/easyconfigs/x/xprop/xprop-1.2.2-foss-2016b.eb new file mode 100644 index 0000000000..abb82d5158 --- /dev/null +++ b/easybuild/easyconfigs/x/xprop/xprop-1.2.2-foss-2016b.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'xprop' +version = '1.2.2' + +homepage = "http://www.x.org/wiki/" +description = """The xprop utility is for displaying window and font properties in an X server. + One window or font is selected using the command line arguments or possibly + in the case of a window, by clicking on the desired window. A list of + properties is then given, possibly with formatting information.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://ftp.x.org/archive/individual/app/'] + +builddependencies = [ + ('pkg-config', '0.29.1'), +] + +dependencies = [ + ('X11', '20160819'), +] + +sanity_check_paths = { + 'files': ['bin/xprop'], + 'dirs': [], +} + +moduleclass = 'vis' -- GitLab From f931f66fca8b06c64a9a8b1fe7a23914bc34ff1d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 14 Oct 2016 16:20:30 +0200 Subject: [PATCH 467/741] add easyconfig HPL-2.2-iomkl-2016.09-GCC-4.9.3-2.25.eb --- .../HPL-2.2-iomkl-2016.09-GCC-4.9.3-2.25.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2016.09-GCC-4.9.3-2.25.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..22cd32989a --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' -- GitLab From 71b299142cf91dd55d1c6d8b4a7903dd6abfb398 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Thu, 13 Oct 2016 15:50:02 +0100 Subject: [PATCH 468/741] Amber 16 support for serial, MPI and CUDA builds - including all deps --- .../a/Amber/Amber-16-iomkl-2016.07-serial.eb | 32 ++++ .../a/Amber/Amber-16-iomkl-2016.07.eb | 32 ++++ ...er-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb | 32 ++++ ...oconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb | 26 ++++ ...omake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb | 36 +++++ ...s-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb | 17 +++ ...ison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 22 +++ ...zip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb | 15 ++ ...Make-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb | 31 ++++ ...5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 45 ++++++ ...URL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 31 ++++ ...gen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb | 19 +++ ...lex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb | 14 ++ .../GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 30 ++++ ...DF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb | 23 +++ ...adline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb | 32 ++++ ...tool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb | 17 +++ .../M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb | 23 +++ ...curses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 34 +++++ ...DF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb | 20 +++ ...tCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 35 +++++ ...SSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb | 19 +++ ...hon-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb | 137 ++++++++++++++++++ ...Lite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb | 43 ++++++ .../Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb | 23 +++ .../Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 25 ++++ .../Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 26 ++++ ...zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb | 22 +++ 28 files changed, 861 insertions(+) create mode 100644 easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb create mode 100644 easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb create mode 100644 easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb create mode 100644 easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb new file mode 100644 index 0000000000..35516d3232 --- /dev/null +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb @@ -0,0 +1,32 @@ +# +# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb +# +name = 'Amber' +version = '16' +ambertools_ver = '16' +# Patch levels from http://ambermd.org/bugfixes16.html and http://ambermd.org/bugfixesat.html +patchlevels = (5, 14) # (AmberTools, Amber) +versionsuffix = '-AmberTools-%s-patchlevel-%s-%s-serial' %(ambertools_ver, patchlevels[0], patchlevels[1]) + +homepage = 'http://ambermd.org/amber.html' +description = """Amber (originally Assisted Model Building with Energy + Refinement) is software for performing molecular dynamics and structure + prediction.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'usempi': False} + +sources = [ + 'Amber%(version)s.tar.bz2', + 'AmberTools%s.tar.bz2' % ambertools_ver, +] + +dependencies = [ + ('netCDF', '4.4.0'), + ('netCDF-Fortran', '4.4.4'), + ('Python', '2.7.11'), +] + +patches = ['Amber-16_fix-hardcoding.patch'] + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb new file mode 100644 index 0000000000..4551ed1bc9 --- /dev/null +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb @@ -0,0 +1,32 @@ +# +# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb +# +name = 'Amber' +version = '16' +ambertools_ver = '16' +# Patch levels from http://ambermd.org/bugfixes16.html and http://ambermd.org/bugfixesat.html +patchlevels = (5, 14) # (AmberTools, Amber) +versionsuffix = '-AmberTools-%s-patchlevel-%s-%s' %(ambertools_ver, patchlevels[0], patchlevels[1]) + +homepage = 'http://ambermd.org/amber.html' +description = """Amber (originally Assisted Model Building with Energy + Refinement) is software for performing molecular dynamics and structure + prediction.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'usempi': True} + +sources = [ + 'Amber%(version)s.tar.bz2', + 'AmberTools%s.tar.bz2' % ambertools_ver, +] + +dependencies = [ + ('netCDF', '4.4.0'), + ('netCDF-Fortran', '4.4.4'), + ('Python', '2.7.11'), +] + +patches = ['Amber-16_fix-hardcoding.patch'] + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb new file mode 100644 index 0000000000..a2cab13af2 --- /dev/null +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb @@ -0,0 +1,32 @@ +# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb +# +name = 'Amber' +version = '16' +ambertools_ver = '16' +# Patch levels from http://ambermd.org/bugfixes16.html and http://ambermd.org/bugfixesat.html +patchlevels = (5, 14) # (AmberTools, Amber) +versionsuffix = '-AmberTools-%s-patchlevel-%s-%s-CUDA' %(ambertools_ver, patchlevels[0], patchlevels[1]) + +homepage = 'http://ambermd.org/amber.html' +description = """Amber (originally Assisted Model Building with Energy + Refinement) is software for performing molecular dynamics and structure + prediction.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'usempi': True} + +sources = [ + 'Amber%(version)s.tar.bz2', + 'AmberTools%s.tar.bz2' % ambertools_ver, +] + +dependencies = [ + ('CUDA', '7.5.18', '', ('iccifort', '2016.3.210-GCC-4.9.3-2.25')), + ('netCDF', '4.4.0'), + ('netCDF-Fortran', '4.4.4'), + ('Python', '2.7.11'), +] + +patches = ['Amber-16_fix-hardcoding.patch'] + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..f88254bccf --- /dev/null +++ b/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Autoconf' +version = '2.69' + +homepage = 'http://www.gnu.org/software/autoconf/' +description = """Autoconf is an extensible package of M4 macros that produce shell scripts + to automatically configure software source code packages. These scripts can adapt the + packages to many kinds of UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template file that lists the + operating system features that the package can use, in the form of M4 macro calls.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('M4', '1.4.17')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["autoconf", "autoheader", "autom4te", "autoreconf", "autoscan", + "autoupdate", "ifnames"]], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..54ded3244b --- /dev/null +++ b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,36 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Created by Andrew Edmondson +# Copied from Automake-1.15-intel-2016b.eb, which had the following copywrite information: +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'Automake' +version = "1.15" + +homepage = 'http://www.gnu.org/software/automake/automake.html' +description = "Automake: GNU Standards-compliant Makefile generator" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('Autoconf', '2.69')] + +sanity_check_paths = { + 'files': ['bin/automake', 'bin/aclocal'], + 'dirs': [] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..1fe6a834c7 --- /dev/null +++ b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,17 @@ +easyblock = 'Bundle' + +name = 'Autotools' +version = '20150215' # date of the most recent change + +homepage = 'http://autotools.io' +description = """This bundle collect the standard GNU build tools: Autoconf, Automake and libtool""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +dependencies = [ + ('Autoconf', '2.69'), # 20120424 + ('Automake', '1.15'), # 20150105 + ('libtool', '2.4.6'), # 20150215 +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..31858dc8f2 --- /dev/null +++ b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'Bison' +version = '3.0.4' + +homepage = 'http://www.gnu.org/software/bison' +description = """Bison is a general-purpose parser generator that converts an annotated context-free grammar + into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +builddependencies = [('M4', '1.4.17')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["bison", "yacc"]] + ["lib/liby.a"], + 'dirs': [], +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..d16cac5f5d --- /dev/null +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,15 @@ +name = 'bzip2' +version = '1.0.6' + +homepage = 'http://www.bzip.org/' +description = """bzip2 is a freely available, patent free, high-quality data compressor. It typically + compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical + compressors), whilst being around twice as fast at compression and six times faster at decompression.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://www.bzip.org/%(version)s'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..36a239c230 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'CMake' +version = '3.4.1' + +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. + CMake is a family of tools designed to build, test and package software.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = ['http://www.cmake.org/files/v%(version_major_minor)s'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = '-- -DCMAKE_USE_OPENSSL=1' + +dependencies = [ + ('ncurses', '6.0'), + # OS dependency should be preferred if the os version is more recent then this version, + # it's nice to have an up to date openssl for security reasons + #('OpenSSL', '1.0.1p'), +] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..65287edcc6 --- /dev/null +++ b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -0,0 +1,45 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Created by Andrew Edmondson . Copied from CUDA-7.5.18-iccifort-2015.3.187-GNU-4.9.3-2.25.eb, which had the following copywrite information: +# +# Copyright:: Copyright 2012-2013 Cyprus Institute / CaSToRC, University of Luxembourg / LCSB, Ghent University, +# Forschungszentrum Juelich +# Authors:: George Tsouloupas , Fotis Georgatos , Kenneth Hoste +# Authors:: Damian Alvarez +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-99.html +## + +#easyblock = 'ConfigureMake' + +name = 'CUDA' +version = '7.5.18' + +homepage = 'https://developer.nvidia.com/cuda-toolkit' +description = """CUDA (formerly Compute Unified Device Architecture) is a parallel + computing platform and programming model created by NVIDIA and implemented by the + graphics processing units (GPUs) that they produce. CUDA gives developers access + to the virtual instruction set and memory of the parallel computational elements in CUDA GPUs.""" + +toolchain = {'name': 'iccifort', 'version': '2016.3.210-GCC-4.9.3-2.25'} + +source_urls = ['http://developer.download.nvidia.com/compute/cuda/%(version_major_minor)s/Prod/local_installers/'] + +sources = ['%(namelower)s_%(version)s_linux.run'] +checksums = ['4b3bcecf0dfc35928a0898793cf3e4c6'] + +# Necessary to allow to use a GCC 4.9.3 toolchain, as CUDA by default just supports up to 4.9.2. +# Tested, but not throughly, so it is not guaranteed to don't cause problems +installopts = '-override compiler' + +host_compilers = ["icpc", "g++"] + +# Be careful and have a message consistent with the generated wrappers +modloadmsg = "nvcc uses g++ as the default host compiler. If you want to use icpc as a host compiler you can use" +modloadmsg += " nvcc_icpc, or nvcc -ccbin=icpc. Likewise, a g++ wrapper called nvcc_g++ has been also created." + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..67f22b9f41 --- /dev/null +++ b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'cURL' +version = '7.46.0' + +homepage = 'http://curl.haxx.se' +description = """libcurl is a free and easy-to-use client-side URL transfer library, + supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, + POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports + SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, + proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, + Kerberos), file transfer resume, http proxy tunneling and more.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://curl.haxx.se/download/'] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +# dependencies = [('OpenSSL', '1.0.1p')] +# configopts = "--with-ssl=$EBROOTOPENSSL" + +modextravars = {'CURL_INCLUDES': '%(installdir)s/include'} + +sanity_check_paths = { + 'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.so'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..d5628e7fb3 --- /dev/null +++ b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,19 @@ +name = 'Doxygen' +version = '1.8.11' + +homepage = 'http://www.doxygen.org' +description = """Doxygen is a documentation system for C++, C, Java, Objective-C, Python, + IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = ['%(namelower)s-%(version)s.src.tar.gz'] +source_urls = ['http://ftp.stack.nl/pub/users/dimitri/'] + +builddependencies = [ + ('flex', '2.5.39'), + ('CMake', '3.4.1'), + ('Bison', '3.0.4'), +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..a74193a537 --- /dev/null +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,14 @@ +name = 'flex' +version = '2.5.39' + +homepage = 'http://flex.sourceforge.net/' +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, + sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..6a0888eaf0 --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'GMP' +version = '6.1.0' + +homepage = 'http://gmplib.org/' +description = """GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True, 'precise': True} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://ftp.gnu.org/gnu/gmp'] + +builddependencies = [ + ('Autotools', '20150215'), +] + +# enable C++ interface +configopts = '--enable-cxx' + +runtest = 'check' + +sanity_check_paths = { + 'files': ['lib/libgmp.%s' % SHLIB_EXT, 'include/gmp.h'], + 'dirs': [], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..e3d38f1976 --- /dev/null +++ b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,23 @@ +name = 'HDF5' +version = '1.8.16' + +homepage = 'http://www.hdfgroup.org/HDF5/' +description = """HDF5 is a unique technology suite that makes possible the management of + extremely large and complex data collections.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'optarch': True, 'pic': True, 'usempi': True} + +source_urls = ['http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['configure_libtool.patch'] + +buildopts = 'CXXFLAGS="$CXXFLAGS -DMPICH_IGNORE_CXX_SEEK"' + +dependencies = [ + ('zlib', '1.2.8'), + ('Szip', '2.1'), +] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..04b53926ef --- /dev/null +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,32 @@ +easyblock = 'ConfigureMake' + +name = 'libreadline' +version = '6.3' + +homepage = 'http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html' +description = """The GNU Readline library provides a set of functions for use by applications that + allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. + The Readline library includes additional functions to maintain a list of previously-entered command lines, + to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = ['readline-%(version)s.tar.gz'] +source_urls = ['http://ftp.gnu.org/gnu/readline'] + +patches = ['libreadline-%(version)s-bugfix.patch'] + +dependencies = [('ncurses', '6.0')] + +# for the termcap symbols, use EB ncurses +preconfigopts = "env LDFLAGS='-lncurses'" + +sanity_check_paths = { + 'files': ['lib/libreadline.a', 'lib/libhistory.a'] + + ['include/readline/%s' % x for x in ['chardefs.h', 'history.h', 'keymaps.h', 'readline.h', 'rlconf.h', + 'rlstdc.h', 'rltypedefs.h', 'tilde.h']], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..8730994eeb --- /dev/null +++ b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,17 @@ +easyblock = 'ConfigureMake' + +name = 'libtool' +version = '2.4.6' + +homepage = 'http://www.gnu.org/software/libtool' +description = """GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries + behind a consistent, portable interface.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [('M4', '1.4.17')] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..2da711ec97 --- /dev/null +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'M4' +version = '1.4.17' + +homepage = 'http://www.gnu.org/software/m4/m4.html' +description = """GNU M4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 compatible + although it has some extensions (for example, handling more than 9 positional parameters to macros). + GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" + +sanity_check_paths = { + 'files': ["bin/m4"], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..ab17db8531 --- /dev/null +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'ncurses' +version = '6.0' + +homepage = 'http://www.gnu.org/software/ncurses/' +description = """The Ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, + and more. It uses Terminfo format, supports pads and color and multiple highlights and forms characters and + function-key mapping, and has all the other SYSV-curses enhancements over BSD Curses.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCE_TAR_GZ] + +configopts = [ + # default build + '--with-shared --enable-overwrite', + # the UTF-8 enabled version (ncursesw) + '--with-shared --enable-overwrite --enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/' +] + +libs = ["form", "menu", "ncurses", "panel"] +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ["captoinfo", "clear", "infocmp", "infotocap", "ncurses%(version_major)s-config", + "reset", "tabs", "tic", "toe", "tput", "tset"]] + + ['lib/lib%s%s.a' % (x, y) for x in libs for y in ['', '_g', 'w', 'w_g']] + + ['lib/lib%s%s.so' % (x, y) for x in libs for y in ['', 'w']] + + ['lib/libncurses++%s.a' % x for x in ['', 'w']], + 'dirs': ['include', 'include/ncursesw'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..9fa376ea1b --- /dev/null +++ b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,20 @@ +name = 'netCDF-Fortran' +version = '4.4.4' + +homepage = 'http://www.unidata.ucar.edu/software/netcdf/' +description = """NetCDF (network Common Data Form) is a set of software libraries + and machine-independent data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [ + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', +] + +dependencies = [('netCDF', '4.4.0')] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..2d9153a9ad --- /dev/null +++ b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,35 @@ +name = 'netCDF' +version = '4.4.0' + +homepage = 'http://www.unidata.ucar.edu/software/netcdf/' +description = """NetCDF (network Common Data Form) is a set of software libraries + and machine-independent data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [ + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', +] + +dependencies = [ + ('HDF5', '1.8.16'), + ('cURL', '7.46.0'), +] + +builddependencies = [ + ('CMake', '3.4.1'), + ('Doxygen', '1.8.11'), + ('Szip', '2.1'), +] + +# make sure both static and shared libs are built +configopts = [ + "-DBUILD_SHARED_LIBS=OFF ", + "-DBUILD_SHARED_LIBS=ON ", +] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..e10bff0004 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,19 @@ +name = 'OpenSSL' +version = '1.0.2h' + +homepage = 'http://www.openssl.org/' +description = """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, + and Open Source toolchain implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) + protocols as well as a full-strength general purpose cryptography library. """ + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.openssl.org/source/'] + +dependencies = [('zlib', '1.2.8')] + +runtest = 'test' + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..ed40bed006 --- /dev/null +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,137 @@ +name = 'Python' +version = '2.7.11' + +homepage = 'http://python.org/' +description = """Python is a programming language that lets you work more quickly and integrate your systems + more effectively.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +numpyversion = '1.10.1' +scipyversion = '0.16.1' + +source_urls = ['http://www.python.org/ftp/%(namelower)s/%(version)s/'] +sources = [SOURCE_TGZ] + +# python needs bzip2 to build the bz2 package +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libreadline', '6.3'), + ('ncurses', '6.0'), + ('SQLite', '3.9.2'), + #('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack + ('Tk', '8.6.4'), # this requires a full X11 stack + ('GMP', '6.1.0'), + ('OpenSSL', '1.0.2h'), # OS dependency should be preferred if the os version is more recent then this version, it's +# nice to have an up to date openssl for security reasons +] + +#osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +# order is important! +# package versions updated May 28th 2015 +exts_list = [ + ('setuptools', '18.7.1', { + 'source_urls': ['https://pypi.python.org/packages/source/s/setuptools/'], + }), + ('pip', '7.1.2', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pip/'], + }), + ('nose', '1.3.7', { + 'source_urls': ['https://pypi.python.org/packages/source/n/nose/'], + }), + ('numpy', numpyversion, { + 'source_urls': [('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download')], + 'patches': ['numpy-1.8.0-mkl.patch'], + }), + ('scipy', scipyversion, { + 'source_urls': [('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download')], + }), + ('blist', '1.3.6', { + 'source_urls': ['https://pypi.python.org/packages/source/b/blist/'], + }), + ('mpi4py', '1.3.1', { + 'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'], + }), + ('paycheck', '1.0.2', { + 'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'], + }), + ('argparse', '1.4.0', { + 'source_urls': ['https://pypi.python.org/packages/source/a/argparse/'], + }), + ('pbr', '1.8.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pbr/'], + }), + ('lockfile', '0.12.2', { + 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], + }), + ('Cython', '0.23.4', { + 'source_urls': ['https://pypi.python.org/packages/source/c/cython/'], + }), + ('six', '1.10.0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], + }), + ('dateutil', '2.4.2', { + 'source_tmpl': 'python-%(name)s-%(version)s.tar.gz', + 'source_urls': ['https://pypi.python.org/packages/source/p/python-dateutil/'], + }), + ('deap', '1.0.2', { + 'source_tmpl': '%(name)s-%(version)s.post2.tar.gz', + 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], + }), + ('decorator', '4.0.4', { + 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], + }), + ('arff', '2.1.0', { + 'source_tmpl': 'liac-%(name)s-%(version)s.zip', + 'source_urls': ['https://pypi.python.org/packages/source/l/liac-arff/'], + }), + ('pycrypto', '2.6.1', { + 'modulename': 'Crypto', + 'source_urls': ['http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/'], + }), + ('ecdsa', '0.13', { + 'source_urls': ['https://pypi.python.org/packages/source/e/ecdsa/'], + }), + ('paramiko', '1.16.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/paramiko/'], + }), + ('pyparsing', '2.0.6', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pyparsing/'], + }), + ('netifaces', '0.10.4', { + 'source_urls': ['https://pypi.python.org/packages/source/n/netifaces'], + }), + ('netaddr', '0.7.18', { + 'source_urls': ['https://pypi.python.org/packages/source/n/netaddr'], + }), + ('funcsigs', '0.4', { + 'source_urls': ['https://pypi.python.org/packages/source/f/funcsigs'], + }), + ('mock', '1.3.0', { + 'source_urls': ['https://pypi.python.org/packages/source/m/mock'], + }), + ('pytz', '2015.7', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pytz'], + }), + ('pandas', '0.17.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pandas'], + }), + ('enum34', '1.1.2', { + 'modulename': 'enum', + 'source_urls': ['https://pypi.python.org/packages/source/e/enum34'], + }), + ('bitstring', '3.1.3', { + # grab tarball from GitHub rather than PyPi since 3.1.3 release on PyPi disappeared; + # cfr. https://github.com/scott-griffiths/bitstring/issues/159 + 'source_tmpl': '%(name)s-%(version)s.tar.gz', + 'source_urls': ['https://github.com/scott-griffiths/bitstring/archive/'], + }), + ('virtualenv', '14.0.5', { + 'source_urls': ['https://pypi.python.org/packages/source/v/virtualenv'], + }), +] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..6d4f59e1c2 --- /dev/null +++ b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,43 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Created by Andrew Edmondson +# Copied from SQLite-3.9.2-intel-2016b.eb, which had the following copywrite information: +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'SQLite' +version = '3.9.2' + +homepage = 'http://www.sqlite.org/' +description = 'SQLite: SQL Database Engine in a C Library' + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +# eg. http://www.sqlite.org/2014/sqlite-autoconf-3080600.tar.gz +source_urls = ['http://www.sqlite.org/2015/'] +version_str = '%%(version_major)s%s00' % ''.join('%02d' % int(x) for x in version.split('.')[1:]) +sources = ['sqlite-autoconf-%s.tar.gz' % version_str] + +dependencies = [ + ('libreadline', '6.3'), + ('Tcl', '8.6.4'), +] + +parallel = 1 + +sanity_check_paths = { + 'files': ['bin/sqlite3', 'include/sqlite3ext.h', 'include/sqlite3.h', 'lib/libsqlite3.a', 'lib/libsqlite3.%s' % SHLIB_EXT], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..30b6725636 --- /dev/null +++ b/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'Szip' +version = '2.1' + +homepage = 'http://www.hdfgroup.org/doc_resource/SZIP/' +description = "Szip compression software, providing lossless compression of scientific data" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['http://www.hdfgroup.org/ftp/lib-external/szip/%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +sanity_check_paths = { + 'files': ["lib/libsz.a", "lib/libsz.so"] + + ["include/%s" % x for x in ["ricehdf.h", "szip_adpt.h", "szlib.h"]], + 'dirs': [], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..b0142c9365 --- /dev/null +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'Tcl' +version = '8.6.4' + +homepage = 'http://www.tcl.tk/' +description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, +suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads EXTRA_INSTALL="install-private-headers"' + +runtest = 'test' + +start_dir = 'unix' + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..88cf038a76 --- /dev/null +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Tk' +version = '8.6.4' + +homepage = 'http://www.tcl.tk/' +description = """Tk is an open source, cross-platform widget toolchain that provides a library of basic elements for + building a graphical user interface (GUI) in many different programming languages.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +patches = ['Tk-8.6.4_different-prefix-with-tcl.patch'] + +dependencies = [ + ('Tcl', version), + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib CFLAGS="-I$EBROOTTCL/include"' + +start_dir = 'unix' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb new file mode 100644 index 0000000000..28c7cc5e43 --- /dev/null +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'zlib' +version = '1.2.8' + +homepage = 'http://www.zlib.net/' +description = """zlib is designed to be a free, general-purpose, legally unencumbered -- that is, + not covered by any patents -- lossless data-compression library for use on virtually any + computer hardware and operating system.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] + +sanity_check_paths = { + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.so'], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From 148e5e5b046f18991065df0e78b21dd9d7fbe825 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 15:39:39 +0100 Subject: [PATCH 469/741] Patch to reintroduce the test.cuda make target for backwards compatibility in the easyblock --- .../easyconfigs/a/Amber/Amber-16_test_cuda.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 easybuild/easyconfigs/a/Amber/Amber-16_test_cuda.patch diff --git a/easybuild/easyconfigs/a/Amber/Amber-16_test_cuda.patch b/easybuild/easyconfigs/a/Amber/Amber-16_test_cuda.patch new file mode 100644 index 0000000000..6b4af61766 --- /dev/null +++ b/easybuild/easyconfigs/a/Amber/Amber-16_test_cuda.patch @@ -0,0 +1,13 @@ +--- Makefile.orig 2016-10-14 10:17:32.020437000 +0100 ++++ Makefile 2016-10-14 10:18:12.940992000 +0100 +@@ -80,6 +80,10 @@ + fi ;\ + ) + ++test.cuda: ++ # For backwards compatibility in the easyblock ++ -(cd test && $(MAKE) test.cuda.serial) ++ + test.cuda_serial: + -(cd test && $(MAKE) test.cuda.serial) + -- GitLab From 67b975991ded9262ebf146721256d9409a118826 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 15:43:14 +0100 Subject: [PATCH 470/741] Using patch in CUDA Amber build --- .../a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb index a2cab13af2..e8aeafd2cb 100644 --- a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb @@ -1,3 +1,6 @@ +# Automatically converted from Amber-16-iomkl-2016.09-CUDA.eb +# by /gpfs/sysapps/bham/scripts/easybuild/recursive_build_with_new_toolchain.py +# # Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb # name = 'Amber' @@ -27,6 +30,7 @@ dependencies = [ ('Python', '2.7.11'), ] -patches = ['Amber-16_fix-hardcoding.patch'] +patches = ['Amber-16_fix-hardcoding.patch', + 'Amber-16_test_cuda.patch'] moduleclass = 'chem' -- GitLab From fefc30ece55c4488acf1dbd16ff4318b5d1de346 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 15:52:30 +0100 Subject: [PATCH 471/741] Fixing bad filename --- ...25.eb => netCDF-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/n/netCDF-Fortran/{netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb => netCDF-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb} (100%) diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-iomkl-2016.09-GCC-4.9.3-2.25.eb rename to easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb -- GitLab From 4fdd32e235b5e9ac4eb7305eb4b0d796ce1ac5d5 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 16:00:28 +0100 Subject: [PATCH 472/741] Renaming eb files to match expectations --- ...mber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14-serial.eb} | 0 ...eb => Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb} | 0 ...-2016.09-GCC-4.9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/a/Amber/{Amber-16-iomkl-2016.07-serial.eb => Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14-serial.eb} (100%) rename easybuild/easyconfigs/a/Amber/{Amber-16-iomkl-2016.07.eb => Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb} (100%) rename easybuild/easyconfigs/a/Amber/{Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb => Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb} (100%) diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14-serial.eb similarity index 100% rename from easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-serial.eb rename to easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14-serial.eb diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb similarity index 100% rename from easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07.eb rename to easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb similarity index 100% rename from easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-CUDA.eb rename to easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb -- GitLab From ec316941014552d91444a93c91ad3d650a817736 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 16:17:48 +0100 Subject: [PATCH 473/741] Adding missing patch file --- .../a/Amber/Amber-16_fix-hardcoding.patch | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 easybuild/easyconfigs/a/Amber/Amber-16_fix-hardcoding.patch diff --git a/easybuild/easyconfigs/a/Amber/Amber-16_fix-hardcoding.patch b/easybuild/easyconfigs/a/Amber/Amber-16_fix-hardcoding.patch new file mode 100644 index 0000000000..a9b3ba5328 --- /dev/null +++ b/easybuild/easyconfigs/a/Amber/Amber-16_fix-hardcoding.patch @@ -0,0 +1,117 @@ +diff -ur 16-iomkl-2016.09-patchlevel-14-5-serial/AmberTools/src/configure2 16-iomkl-2016.09-patchlevel-14-5-serial.patched/AmberTools/src/configure2 +--- 16-iomkl-2016.09-patchlevel-14-5-serial/AmberTools/src/configure2 2016-10-06 14:27:01.000000000 +0100 ++++ 16-iomkl-2016.09-patchlevel-14-5-serial.patched/AmberTools/src/configure2 2016-10-06 14:52:11.607328298 +0100 +@@ -513,6 +513,7 @@ + mpi='no' + mtkpp='install_mtkpp' + netcdf_dir='' ++netcdf_fort_dir='' + netcdf_flag='' + netcdfstatic='no' + pnetcdf_dir='' +@@ -587,6 +588,7 @@ + --skip-python) skippython='yes' ;; + --with-python) shift; python="$1";; + --with-netcdf) shift; netcdf_dir="$1";; ++ --with-netcdf-fort) shift; netcdf_fort_dir="$1";; + --with-pnetcdf) shift; pnetcdf_dir="$1" ;; + --python-install) shift; python_install="$1";; + -netcdfstatic) netcdfstatic='yes' ;; +@@ -778,7 +780,7 @@ + flibsf="-larpack -llapack -lblas" + # only used when the user requests a static build or when a static build is + # automatically set, eg, windows: +-staticflag='-static' ++staticflag='-static-intel' + omp_flag= + mpi_flag= + fp_flags= +@@ -1280,7 +1282,7 @@ + nvcc="$nvcc -use_fast_math -O3 " + fi + if [ "$mpi" = 'yes' ]; then +- mpi_inc=`(mpicc -show 2>&1) | awk 'BEGIN{i=0} {while (i < NF) {if ( substr($i, 1, 2) == "-I" ) {printf("%s ", $i);}; i++;}}'` ++ mpi_inc=`(${CC} -show 2>&1) | awk 'BEGIN{i=0} {while (i < NF) {if ( substr($i, 1, 2) == "-I" ) {printf("%s ", $i);}; i++;}}'` + pmemd_cu_includes="$pmemd_cu_includes $mpi_inc" + pmemd_cu_defines="$pmemd_cu_defines -DMPI -DMPICH_IGNORE_CXX_SEEK" + pmemd_coptflags="$coptflags -DMPICH_IGNORE_CXX_SEEK" +@@ -1598,7 +1600,7 @@ + fi + + if [ "$mpi" = 'yes' ]; then +- mpi_inc=`(mpicc -show 2>&1) | awk 'BEGIN{i=0} {while (i < NF) {if ( substr($i, 1, 2) == "-I" ) {printf("%s ", $i);}; i++;}}'` ++ mpi_inc=`(${CC} -show 2>&1) | awk 'BEGIN{i=0} {while (i < NF) {if ( substr($i, 1, 2) == "-I" ) {printf("%s ", $i);}; i++;}}'` + pmemd_cu_includes="$pmemd_cu_includes $mpi_inc" + pmemd_cu_defines="$pmemd_cu_defines -DMPI -DMPICH_IGNORE_CXX_SEEK" + pmemd_coptflags="$pmemd_coptflags -DMPICH_IGNORE_CXX_SEEK" +@@ -1924,7 +1926,7 @@ + nvcc="$nvcc -use_fast_math -O3 " + fi + if [ "$mpi" = 'yes' ]; then +- mpi_inc=`(mpicc -show 2>&1) | awk 'BEGIN{i=0} {while (i < NF) {if ( substr($i, 1, 2) == "-I" ) {printf("%s ", $i);}; i++;}}'` ++ mpi_inc=`(${CC} -show 2>&1) | awk 'BEGIN{i=0} {while (i < NF) {if ( substr($i, 1, 2) == "-I" ) {printf("%s ", $i);}; i++;}}'` + pmemd_cu_includes="$pmemd_cu_includes $mpi_inc" + pmemd_cu_defines="$pmemd_cu_defines -DMPI -DMPICH_IGNORE_CXX_SEEK" + pmemd_coptflags="$coptflags -DMPICH_IGNORE_CXX_SEEK" +@@ -2059,7 +2061,7 @@ + nvcc="$nvcc -use_fast_math -O3 " + fi + if [ "$mpi" = 'yes' ]; then +- mpi_inc=`(mpicc -show 2>&1) | awk 'BEGIN{i=0} {while (i < NF) {if ( substr($i, 1, 2) == "-I" ) {printf("%s ", $i);}; i++;}}'` ++ mpi_inc=`(${CC} -show 2>&1) | awk 'BEGIN{i=0} {while (i < NF) {if ( substr($i, 1, 2) == "-I" ) {printf("%s ", $i);}; i++;}}'` + pmemd_cu_includes="$pmemd_cu_includes $mpi_inc" + pmemd_cu_defines="$pmemd_cu_defines -DMPI -DMPICH_IGNORE_CXX_SEEK" + pmemd_coptflags="$coptflags -DMPICH_IGNORE_CXX_SEEK" +@@ -2131,17 +2133,17 @@ + blas=skip + flibs="-larpack " + flibsf="-larpack " +- mkll="$MKL_HOME/lib/32" ++ mkll="$MKL_HOME/mkl/lib/32" + mkl_processor="32" + mkl_procstring="ia32" + mklinterfacelayer='libmkl_intel.a' + if [ "$x86_64" = 'yes' ]; then +- if [ -d "$MKL_HOME/lib/em64t" ]; then +- mkll="$MKL_HOME/lib/em64t" ++ if [ -d "$MKL_HOME/mkl/lib/em64t" ]; then ++ mkll="$MKL_HOME/mkl/lib/em64t" + mkl_processor="em64t" + mkl_procstring="em64t" + else +- mkll="$MKL_HOME/lib/intel64" ++ mkll="$MKL_HOME/mkl/lib/intel64" + mkl_processor="intel64" + mkl_procstring="intel64" + fi +@@ -2567,11 +2569,16 @@ + else + # A NetCDF directory was specified. Check that library exists and compiles + printf "\tUsing external NetCDF in '$netcdf_dir'\n" ++ # Support separate NetCDF-Fortran installation with --with-netcdf-fort ++ if [ ! -e "$netcdf_fort_dir" ]; then ++ netcdf_fort_dir="$netcdf_dir" ++ fi ++ printf "\tUsing external NetCDF-Fortran in '$netcdf_fort_dir'\n" + netcdfinc="-I"$netcdf_dir"/include" + if [ "${netcdf_dir}" != '/usr' -a "$netcdf_dir" != '/usr/' ]; then + netcdf_flag="-L${netcdf_dir}/lib $netcdf_flag" + fi +- netcdf=$netcdf_dir"/include/netcdf.mod" ++ netcdf=$netcdf_fort_dir"/include/netcdf.mod" + if [ "$netcdfstatic" = 'no' ] ; then + if [ "${netcdf_dir}" != '/usr' -a "${netcdf_dir}" != '/usr/' ]; then + netcdfflagc="-L${netcdf_dir}/lib -lnetcdf" +@@ -2587,7 +2594,7 @@ + echo "Error: '$netcdfflagc' not found." + exit 1 + fi +- netcdfflagf=$netcdf_dir"/lib/libnetcdff.a" ++ netcdfflagf=$netcdf_fort_dir"/lib/libnetcdff.a" + if [ ! -e "$netcdfflagf" ]; then + echo "Error: '$netcdfflagf' not found." + exit 1 +Only in 16-iomkl-2016.09-patchlevel-14-5-serial.patched/AmberTools/src: configure2.orig +Only in 16-iomkl-2016.09-patchlevel-14-5-serial.patched/AmberTools/src: configure2.rej +Only in 16-iomkl-2016.09-patchlevel-14-5-serial.patched/AmberTools/src/cpptraj: configure.orig +Only in 16-iomkl-2016.09-patchlevel-14-5-serial.patched/AmberTools/src/cpptraj: configure.rej -- GitLab From 4e154140b38eacd6994b3f03cc43a9ab4b222961 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 16:28:19 +0100 Subject: [PATCH 474/741] Adding missing dependencies --- .../netCDF-Fortran-4.4.4-iomkl-2016.07.eb | 22 +++ .../n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb | 37 +++++ .../p/Python/Python-2.7.11-iomkl-2016.07.eb | 139 ++++++++++++++++++ 3 files changed, 198 insertions(+) create mode 100644 easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.07.eb diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb new file mode 100644 index 0000000000..bd4b6d4d06 --- /dev/null +++ b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb @@ -0,0 +1,22 @@ +# Automatically converted from netCDF-Fortran-4.4.3-foss-2015b.eb +# by /gpfs/sysapps/bham/scripts/easybuild/copy_to_toolchain.py +name = 'netCDF-Fortran' +version = '4.4.4' + +homepage = 'http://www.unidata.ucar.edu/software/netcdf/' +description = """NetCDF (network Common Data Form) is a set of software libraries + and machine-independent data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [ + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', +] + +dependencies = [('netCDF', '4.4.0')] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb new file mode 100644 index 0000000000..95aa66e2a2 --- /dev/null +++ b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb @@ -0,0 +1,37 @@ +# Automatically converted from netCDF-4.3.3.1-iomkl-2015.03.eb +# by /gpfs/sysapps/bham/scripts/easybuild/copy_to_toolchain.py +name = 'netCDF' +version = '4.4.0' + +homepage = 'http://www.unidata.ucar.edu/software/netcdf/' +description = """NetCDF (network Common Data Form) is a set of software libraries + and machine-independent data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [ + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', + 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', +] + +dependencies = [ + ('HDF5', '1.8.16'), + ('cURL', '7.46.0'), +] + +builddependencies = [ + ('CMake', '3.4.1'), + ('Doxygen', '1.8.11'), + ('Szip', '2.1'), +] + +# make sure both static and shared libs are built +configopts = [ + "-DBUILD_SHARED_LIBS=OFF ", + "-DBUILD_SHARED_LIBS=ON ", +] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.07.eb b/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.07.eb new file mode 100644 index 0000000000..c445811709 --- /dev/null +++ b/easybuild/easyconfigs/p/Python/Python-2.7.11-iomkl-2016.07.eb @@ -0,0 +1,139 @@ +# Automatically converted from Python-2.7.11-foss-2016.09.eb +# by /gpfs/sysapps/bham/scripts/easybuild/copy_to_toolchain.py +name = 'Python' +version = '2.7.11' + +homepage = 'http://python.org/' +description = """Python is a programming language that lets you work more quickly and integrate your systems + more effectively.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +numpyversion = '1.10.1' +scipyversion = '0.16.1' + +source_urls = ['http://www.python.org/ftp/%(namelower)s/%(version)s/'] +sources = [SOURCE_TGZ] + +# python needs bzip2 to build the bz2 package +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libreadline', '6.3'), + ('ncurses', '6.0'), + ('SQLite', '3.9.2'), + #('Tk', '8.6.4', '-no-X11'), # this requires a full X11 stack + ('Tk', '8.6.4'), # this requires a full X11 stack + ('GMP', '6.1.0'), + ('OpenSSL', '1.0.2h'), # OS dependency should be preferred if the os version is more recent then this version, it's +# nice to have an up to date openssl for security reasons +] + +#osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +# order is important! +# package versions updated May 28th 2015 +exts_list = [ + ('setuptools', '18.7.1', { + 'source_urls': ['https://pypi.python.org/packages/source/s/setuptools/'], + }), + ('pip', '7.1.2', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pip/'], + }), + ('nose', '1.3.7', { + 'source_urls': ['https://pypi.python.org/packages/source/n/nose/'], + }), + ('numpy', numpyversion, { + 'source_urls': [('http://sourceforge.net/projects/numpy/files/NumPy/%s' % numpyversion, 'download')], + 'patches': ['numpy-1.8.0-mkl.patch'], + }), + ('scipy', scipyversion, { + 'source_urls': [('http://sourceforge.net/projects/scipy/files/scipy/%s' % scipyversion, 'download')], + }), + ('blist', '1.3.6', { + 'source_urls': ['https://pypi.python.org/packages/source/b/blist/'], + }), + ('mpi4py', '1.3.1', { + 'source_urls': ['http://bitbucket.org/mpi4py/mpi4py/downloads/'], + }), + ('paycheck', '1.0.2', { + 'source_urls': ['https://pypi.python.org/packages/source/p/paycheck/'], + }), + ('argparse', '1.4.0', { + 'source_urls': ['https://pypi.python.org/packages/source/a/argparse/'], + }), + ('pbr', '1.8.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pbr/'], + }), + ('lockfile', '0.12.2', { + 'source_urls': ['https://pypi.python.org/packages/source/l/lockfile/'], + }), + ('Cython', '0.23.4', { + 'source_urls': ['https://pypi.python.org/packages/source/c/cython/'], + }), + ('six', '1.10.0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], + }), + ('dateutil', '2.4.2', { + 'source_tmpl': 'python-%(name)s-%(version)s.tar.gz', + 'source_urls': ['https://pypi.python.org/packages/source/p/python-dateutil/'], + }), + ('deap', '1.0.2', { + 'source_tmpl': '%(name)s-%(version)s.post2.tar.gz', + 'source_urls': ['https://pypi.python.org/packages/source/d/deap/'], + }), + ('decorator', '4.0.4', { + 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], + }), + ('arff', '2.1.0', { + 'source_tmpl': 'liac-%(name)s-%(version)s.zip', + 'source_urls': ['https://pypi.python.org/packages/source/l/liac-arff/'], + }), + ('pycrypto', '2.6.1', { + 'modulename': 'Crypto', + 'source_urls': ['http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/'], + }), + ('ecdsa', '0.13', { + 'source_urls': ['https://pypi.python.org/packages/source/e/ecdsa/'], + }), + ('paramiko', '1.16.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/paramiko/'], + }), + ('pyparsing', '2.0.6', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pyparsing/'], + }), + ('netifaces', '0.10.4', { + 'source_urls': ['https://pypi.python.org/packages/source/n/netifaces'], + }), + ('netaddr', '0.7.18', { + 'source_urls': ['https://pypi.python.org/packages/source/n/netaddr'], + }), + ('funcsigs', '0.4', { + 'source_urls': ['https://pypi.python.org/packages/source/f/funcsigs'], + }), + ('mock', '1.3.0', { + 'source_urls': ['https://pypi.python.org/packages/source/m/mock'], + }), + ('pytz', '2015.7', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pytz'], + }), + ('pandas', '0.17.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pandas'], + }), + ('enum34', '1.1.2', { + 'modulename': 'enum', + 'source_urls': ['https://pypi.python.org/packages/source/e/enum34'], + }), + ('bitstring', '3.1.3', { + # grab tarball from GitHub rather than PyPi since 3.1.3 release on PyPi disappeared; + # cfr. https://github.com/scott-griffiths/bitstring/issues/159 + 'source_tmpl': '%(name)s-%(version)s.tar.gz', + 'source_urls': ['https://github.com/scott-griffiths/bitstring/archive/'], + }), + ('virtualenv', '14.0.5', { + 'source_urls': ['https://pypi.python.org/packages/source/v/virtualenv'], + }), +] + +moduleclass = 'lang' -- GitLab From a71eb2f3267fb22826a632c90ddca2a16cf8cc25 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Fri, 14 Oct 2016 16:57:12 +0100 Subject: [PATCH 475/741] Adding many more dependencies --- .../a/Autoconf/Autoconf-2.69-iomkl-2016.07.eb | 26 ++++++++++++ .../a/Automake/Automake-1.15-iomkl-2016.07.eb | 35 ++++++++++++++++ ...omake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb | 2 +- .../Autotools-20150215-iomkl-2016.07.eb | 17 ++++++++ .../b/Bison/Bison-3.0.4-iomkl-2016.07.eb | 22 ++++++++++ .../b/bzip2/bzip2-1.0.6-iomkl-2016.07.eb | 15 +++++++ .../c/CMake/CMake-3.4.1-iomkl-2016.07.eb | 31 ++++++++++++++ ...5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 2 +- .../c/cURL/cURL-7.46.0-iomkl-2016.07.eb | 31 ++++++++++++++ .../d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb | 19 +++++++++ .../f/flex/flex-2.5.39-iomkl-2016.07.eb | 14 +++++++ .../g/GMP/GMP-6.1.0-iomkl-2016.07.eb | 30 +++++++++++++ .../h/HDF5/HDF5-1.8.16-iomkl-2016.07.eb | 23 ++++++++++ .../libreadline-6.3-iomkl-2016.07.eb | 32 ++++++++++++++ .../l/libtool/libtool-2.4.6-iomkl-2016.07.eb | 17 ++++++++ .../m/M4/M4-1.4.17-iomkl-2016.07.eb | 23 ++++++++++ .../n/ncurses/ncurses-6.0-iomkl-2016.07.eb | 34 +++++++++++++++ .../netCDF-Fortran-4.4.4-iomkl-2016.07.eb | 2 - .../o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.07.eb | 19 +++++++++ .../s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb | 42 +++++++++++++++++++ ...Lite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb | 2 +- .../s/Szip/Szip-2.1-iomkl-2016.07.eb | 23 ++++++++++ .../t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb | 25 +++++++++++ .../t/Tk/Tk-8.6.4-iomkl-2016.07.eb | 26 ++++++++++++ .../z/zlib/zlib-1.2.8-iomkl-2016.07.eb | 22 ++++++++++ 25 files changed, 529 insertions(+), 5 deletions(-) create mode 100644 easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb create mode 100644 easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb diff --git a/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.07.eb b/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.07.eb new file mode 100644 index 0000000000..463a75eb42 --- /dev/null +++ b/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-iomkl-2016.07.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Autoconf' +version = '2.69' + +homepage = 'http://www.gnu.org/software/autoconf/' +description = """Autoconf is an extensible package of M4 macros that produce shell scripts + to automatically configure software source code packages. These scripts can adapt the + packages to many kinds of UNIX-like systems without manual user intervention. Autoconf + creates a configuration script for a package from a template file that lists the + operating system features that the package can use, in the form of M4 macro calls.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('M4', '1.4.17')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["autoconf", "autoheader", "autom4te", "autoreconf", "autoscan", + "autoupdate", "ifnames"]], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb new file mode 100644 index 0000000000..6ce681f7d9 --- /dev/null +++ b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb @@ -0,0 +1,35 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Created by Andrew Edmondson, copied from an original file with copyright: +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'Automake' +version = "1.15" + +homepage = 'http://www.gnu.org/software/automake/automake.html' +description = "Automake: GNU Standards-compliant Makefile generator" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('Autoconf', '2.69')] + +sanity_check_paths = { + 'files': ['bin/automake', 'bin/aclocal'], + 'dirs': [] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb index 54ded3244b..c23d974743 100644 --- a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -2,7 +2,7 @@ # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # # Created by Andrew Edmondson -# Copied from Automake-1.15-intel-2016b.eb, which had the following copywrite information: +# Copied from Automake-1.15-intel-2016b.eb, which had the following copyright information: # # Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA # Authors:: Fotis Georgatos diff --git a/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.07.eb b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.07.eb new file mode 100644 index 0000000000..d27dde01f2 --- /dev/null +++ b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-iomkl-2016.07.eb @@ -0,0 +1,17 @@ +easyblock = 'Bundle' + +name = 'Autotools' +version = '20150215' # date of the most recent change + +homepage = 'http://autotools.io' +description = """This bundle collect the standard GNU build tools: Autoconf, Automake and libtool""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +dependencies = [ + ('Autoconf', '2.69'), # 20120424 + ('Automake', '1.15'), # 20150105 + ('libtool', '2.4.6'), # 20150215 +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.07.eb b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.07.eb new file mode 100644 index 0000000000..0027e83817 --- /dev/null +++ b/easybuild/easyconfigs/b/Bison/Bison-3.0.4-iomkl-2016.07.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'Bison' +version = '3.0.4' + +homepage = 'http://www.gnu.org/software/bison' +description = """Bison is a general-purpose parser generator that converts an annotated context-free grammar + into a deterministic LR or generalized LR (GLR) parser employing LALR(1) parser tables.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +builddependencies = [('M4', '1.4.17')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["bison", "yacc"]] + ["lib/liby.a"], + 'dirs': [], +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.07.eb b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.07.eb new file mode 100644 index 0000000000..6ad5b69ca6 --- /dev/null +++ b/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-2016.07.eb @@ -0,0 +1,15 @@ +name = 'bzip2' +version = '1.0.6' + +homepage = 'http://www.bzip.org/' +description = """bzip2 is a freely available, patent free, high-quality data compressor. It typically + compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical + compressors), whilst being around twice as fast at compression and six times faster at decompression.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://www.bzip.org/%(version)s'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.07.eb b/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.07.eb new file mode 100644 index 0000000000..0204c038c7 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-3.4.1-iomkl-2016.07.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'CMake' +version = '3.4.1' + +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. + CMake is a family of tools designed to build, test and package software.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +source_urls = ['http://www.cmake.org/files/v%(version_major_minor)s'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = '-- -DCMAKE_USE_OPENSSL=1' + +dependencies = [ + ('ncurses', '6.0'), + # OS dependency should be preferred if the os version is more recent then this version, + # it's nice to have an up to date openssl for security reasons + #('OpenSSL', '1.0.1p'), +] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb index 65287edcc6..9c0bfae1a8 100644 --- a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -1,7 +1,7 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Created by Andrew Edmondson . Copied from CUDA-7.5.18-iccifort-2015.3.187-GNU-4.9.3-2.25.eb, which had the following copywrite information: +# Created by Andrew Edmondson . Copied from CUDA-7.5.18-iccifort-2015.3.187-GNU-4.9.3-2.25.eb, which had the following copyright information: # # Copyright:: Copyright 2012-2013 Cyprus Institute / CaSToRC, University of Luxembourg / LCSB, Ghent University, # Forschungszentrum Juelich diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.07.eb b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.07.eb new file mode 100644 index 0000000000..4652a9953d --- /dev/null +++ b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.07.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'cURL' +version = '7.46.0' + +homepage = 'http://curl.haxx.se' +description = """libcurl is a free and easy-to-use client-side URL transfer library, + supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, + POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP. libcurl supports + SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, + proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, + Kerberos), file transfer resume, http proxy tunneling and more.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://curl.haxx.se/download/'] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +# dependencies = [('OpenSSL', '1.0.1p')] +# configopts = "--with-ssl=$EBROOTOPENSSL" + +modextravars = {'CURL_INCLUDES': '%(installdir)s/include'} + +sanity_check_paths = { + 'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.so'], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb new file mode 100644 index 0000000000..869b0596c5 --- /dev/null +++ b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb @@ -0,0 +1,19 @@ +name = 'Doxygen' +version = '1.8.11' + +homepage = 'http://www.doxygen.org' +description = """Doxygen is a documentation system for C++, C, Java, Objective-C, Python, + IDL (Corba and Microsoft flavors), Fortran, VHDL, PHP, C#, and to some extent D.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +sources = ['%(namelower)s-%(version)s.src.tar.gz'] +source_urls = ['http://ftp.stack.nl/pub/users/dimitri/'] + +builddependencies = [ + ('flex', '2.5.39'), + ('CMake', '3.4.1'), + ('Bison', '3.0.4'), +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.07.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.07.eb new file mode 100644 index 0000000000..06637a12c3 --- /dev/null +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.07.eb @@ -0,0 +1,14 @@ +name = 'flex' +version = '2.5.39' + +homepage = 'http://flex.sourceforge.net/' +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, + sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.07.eb b/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.07.eb new file mode 100644 index 0000000000..e34edcb7af --- /dev/null +++ b/easybuild/easyconfigs/g/GMP/GMP-6.1.0-iomkl-2016.07.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'GMP' +version = '6.1.0' + +homepage = 'http://gmplib.org/' +description = """GMP is a free library for arbitrary precision arithmetic, +operating on signed integers, rational numbers, and floating point numbers. """ + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True, 'precise': True} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://ftp.gnu.org/gnu/gmp'] + +builddependencies = [ + ('Autotools', '20150215'), +] + +# enable C++ interface +configopts = '--enable-cxx' + +runtest = 'check' + +sanity_check_paths = { + 'files': ['lib/libgmp.%s' % SHLIB_EXT, 'include/gmp.h'], + 'dirs': [], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.07.eb b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.07.eb new file mode 100644 index 0000000000..d61bff1fff --- /dev/null +++ b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.16-iomkl-2016.07.eb @@ -0,0 +1,23 @@ +name = 'HDF5' +version = '1.8.16' + +homepage = 'http://www.hdfgroup.org/HDF5/' +description = """HDF5 is a unique technology suite that makes possible the management of + extremely large and complex data collections.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'optarch': True, 'pic': True, 'usempi': True} + +source_urls = ['http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['configure_libtool.patch'] + +buildopts = 'CXXFLAGS="$CXXFLAGS -DMPICH_IGNORE_CXX_SEEK"' + +dependencies = [ + ('zlib', '1.2.8'), + ('Szip', '2.1'), +] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.07.eb b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.07.eb new file mode 100644 index 0000000000..8aff248e52 --- /dev/null +++ b/easybuild/easyconfigs/l/libreadline/libreadline-6.3-iomkl-2016.07.eb @@ -0,0 +1,32 @@ +easyblock = 'ConfigureMake' + +name = 'libreadline' +version = '6.3' + +homepage = 'http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html' +description = """The GNU Readline library provides a set of functions for use by applications that + allow users to edit command lines as they are typed in. Both Emacs and vi editing modes are available. + The Readline library includes additional functions to maintain a list of previously-entered command lines, + to recall and perhaps reedit those lines, and perform csh-like history expansion on previous commands.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True} + +sources = ['readline-%(version)s.tar.gz'] +source_urls = ['http://ftp.gnu.org/gnu/readline'] + +patches = ['libreadline-%(version)s-bugfix.patch'] + +dependencies = [('ncurses', '6.0')] + +# for the termcap symbols, use EB ncurses +preconfigopts = "env LDFLAGS='-lncurses'" + +sanity_check_paths = { + 'files': ['lib/libreadline.a', 'lib/libhistory.a'] + + ['include/readline/%s' % x for x in ['chardefs.h', 'history.h', 'keymaps.h', 'readline.h', 'rlconf.h', + 'rlstdc.h', 'rltypedefs.h', 'tilde.h']], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.07.eb b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.07.eb new file mode 100644 index 0000000000..436ada208a --- /dev/null +++ b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-iomkl-2016.07.eb @@ -0,0 +1,17 @@ +easyblock = 'ConfigureMake' + +name = 'libtool' +version = '2.4.6' + +homepage = 'http://www.gnu.org/software/libtool' +description = """GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries + behind a consistent, portable interface.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [('M4', '1.4.17')] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.07.eb b/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.07.eb new file mode 100644 index 0000000000..b6bbaa91c0 --- /dev/null +++ b/easybuild/easyconfigs/m/M4/M4-1.4.17-iomkl-2016.07.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'M4' +version = '1.4.17' + +homepage = 'http://www.gnu.org/software/m4/m4.html' +description = """GNU M4 is an implementation of the traditional Unix macro processor. It is mostly SVR4 compatible + although it has some extensions (for example, handling more than 9 positional parameters to macros). + GNU M4 also has built-in functions for including files, running shell commands, doing arithmetic, etc.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = "--enable-cxx CPPFLAGS=-fgnu89-inline" + +sanity_check_paths = { + 'files': ["bin/m4"], + 'dirs': [], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb new file mode 100644 index 0000000000..77201153ed --- /dev/null +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'ncurses' +version = '6.0' + +homepage = 'http://www.gnu.org/software/ncurses/' +description = """The Ncurses (new curses) library is a free software emulation of curses in System V Release 4.0, + and more. It uses Terminfo format, supports pads and color and multiple highlights and forms characters and + function-key mapping, and has all the other SYSV-curses enhancements over BSD Curses.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True} + +source_urls = [GNU_SOURCE] +sources = [SOURCE_TAR_GZ] + +configopts = [ + # default build + '--with-shared --enable-overwrite', + # the UTF-8 enabled version (ncursesw) + '--with-shared --enable-overwrite --enable-ext-colors --enable-widec --includedir=%(installdir)s/include/ncursesw/' +] + +libs = ["form", "menu", "ncurses", "panel"] +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ["captoinfo", "clear", "infocmp", "infotocap", "ncurses%(version_major)s-config", + "reset", "tabs", "tic", "toe", "tput", "tset"]] + + ['lib/lib%s%s.a' % (x, y) for x in libs for y in ['', '_g', 'w', 'w_g']] + + ['lib/lib%s%s.so' % (x, y) for x in libs for y in ['', 'w']] + + ['lib/libncurses++%s.a' % x for x in ['', 'w']], + 'dirs': ['include', 'include/ncursesw'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb index bd4b6d4d06..8745f48528 100644 --- a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb @@ -1,5 +1,3 @@ -# Automatically converted from netCDF-Fortran-4.4.3-foss-2015b.eb -# by /gpfs/sysapps/bham/scripts/easybuild/copy_to_toolchain.py name = 'netCDF-Fortran' version = '4.4.4' diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.07.eb b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.07.eb new file mode 100644 index 0000000000..89d8603d59 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.2h-iomkl-2016.07.eb @@ -0,0 +1,19 @@ +name = 'OpenSSL' +version = '1.0.2h' + +homepage = 'http://www.openssl.org/' +description = """The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, + and Open Source toolchain implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) + protocols as well as a full-strength general purpose cryptography library. """ + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True, 'opt': True, 'optarch': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.openssl.org/source/'] + +dependencies = [('zlib', '1.2.8')] + +runtest = 'test' + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb new file mode 100644 index 0000000000..620b2e4dcc --- /dev/null +++ b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb @@ -0,0 +1,42 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Created by Andrew Edmondson, copied from an original file with copyright: +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/ +## + +easyblock = 'ConfigureMake' + +name = 'SQLite' +version = '3.9.2' + +homepage = 'http://www.sqlite.org/' +description = 'SQLite: SQL Database Engine in a C Library' + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +# eg. http://www.sqlite.org/2014/sqlite-autoconf-3080600.tar.gz +source_urls = ['http://www.sqlite.org/2015/'] +version_str = '%%(version_major)s%s00' % ''.join('%02d' % int(x) for x in version.split('.')[1:]) +sources = ['sqlite-autoconf-%s.tar.gz' % version_str] + +dependencies = [ + ('libreadline', '6.3'), + ('Tcl', '8.6.4'), +] + +parallel = 1 + +sanity_check_paths = { + 'files': ['bin/sqlite3', 'include/sqlite3ext.h', 'include/sqlite3.h', 'lib/libsqlite3.a', 'lib/libsqlite3.%s' % SHLIB_EXT], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb index 6d4f59e1c2..c4174cdb80 100644 --- a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -2,7 +2,7 @@ # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # # Created by Andrew Edmondson -# Copied from SQLite-3.9.2-intel-2016b.eb, which had the following copywrite information: +# Copied from SQLite-3.9.2-intel-2016b.eb, which had the following copyright information: # # Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA # Authors:: Fotis Georgatos diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb b/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb new file mode 100644 index 0000000000..85c164d4c0 --- /dev/null +++ b/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'Szip' +version = '2.1' + +homepage = 'http://www.hdfgroup.org/doc_resource/SZIP/' +description = "Szip compression software, providing lossless compression of scientific data" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['http://www.hdfgroup.org/ftp/lib-external/szip/%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic" + +sanity_check_paths = { + 'files': ["lib/libsz.a", "lib/libsz.so"] + + ["include/%s" % x for x in ["ricehdf.h", "szip_adpt.h", "szlib.h"]], + 'dirs': [], +} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb new file mode 100644 index 0000000000..598c79f35a --- /dev/null +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'Tcl' +version = '8.6.4' + +homepage = 'http://www.tcl.tk/' +description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, +suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +dependencies = [ + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads EXTRA_INSTALL="install-private-headers"' + +runtest = 'test' + +start_dir = 'unix' + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb new file mode 100644 index 0000000000..a5d63e7d00 --- /dev/null +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'Tk' +version = '8.6.4' + +homepage = 'http://www.tcl.tk/' +description = """Tk is an open source, cross-platform widget toolchain that provides a library of basic elements for + building a graphical user interface (GUI) in many different programming languages.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} + +source_urls = ["http://prdownloads.sourceforge.net/tcl"] +sources = ['%(namelower)s%(version)s-src.tar.gz'] + +patches = ['Tk-8.6.4_different-prefix-with-tcl.patch'] + +dependencies = [ + ('Tcl', version), + ('zlib', '1.2.8'), +] + +configopts = '--enable-threads --with-tcl=$EBROOTTCL/lib CFLAGS="-I$EBROOTTCL/include"' + +start_dir = 'unix' + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb new file mode 100644 index 0000000000..2242559968 --- /dev/null +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'zlib' +version = '1.2.8' + +homepage = 'http://www.zlib.net/' +description = """zlib is designed to be a free, general-purpose, legally unencumbered -- that is, + not covered by any patents -- lossless data-compression library for use on virtually any + computer hardware and operating system.""" + +toolchain = {'name': 'iomkl', 'version': '2016.07'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] + +sanity_check_paths = { + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.so'], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From 3ba9d7de5af972cfb8b938c74c3f337e8b8b3f37 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Mon, 17 Oct 2016 10:13:11 +0200 Subject: [PATCH 476/741] LIBS in one line --- .../easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb | 5 +++-- easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb b/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb index 4af81b8528..add5ffc72c 100644 --- a/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb +++ b/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b-single.eb @@ -24,8 +24,9 @@ dependencies = [ ] # RELION expects FLTK to be in external/fltk-1.3.0 and we have to add fltk libraries -configopts = '--enable-mpi --enable-float LIBS="-lfltk -lXcursor -lXfixes -lXext -lXft -lfontconfig ' -configopts += '-lXinerama -lpthread -lX11" && ln -s $EBROOTFLTK/include external/fltk-1.3.0 ' +configopts = '--enable-mpi --enable-float ' +configopts += 'LIBS="-lfltk -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -lX11" ' +configopts += '&& ln -s $EBROOTFLTK/include external/fltk-1.3.0 ' # users expect the maingui binary to be called relion installopts = " && cp %(installdir)s/bin/relion_maingui %(installdir)s/bin/%(namelower)s " diff --git a/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb b/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb index c159baafb4..74acae10a1 100644 --- a/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb +++ b/easybuild/easyconfigs/r/RELION/RELION-1.4-intel-2016b.eb @@ -23,8 +23,9 @@ dependencies = [ ] # RELION expects FLTK to be in external/fltk-1.3.0 and we have to add fltk libraries -configopts = '--enable-mpi LIBS="-lfltk -lXcursor -lXfixes -lXext -lXft -lfontconfig ' -configopts += '-lXinerama -lpthread -lX11" && ln -s $EBROOTFLTK/include external/fltk-1.3.0 ' +configopts = '--enable-mpi ' +configopts += 'LIBS="-lfltk -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -lX11" ' +configopts += '&& ln -s $EBROOTFLTK/include external/fltk-1.3.0 ' # users expect the maingui binary to be called relion installopts = " && cp %(installdir)s/bin/relion_maingui %(installdir)s/bin/%(namelower)s " -- GitLab From 056fd4508ad7fd00655928fc0b5ca8584f32d6de Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Mon, 17 Oct 2016 09:18:56 +0100 Subject: [PATCH 477/741] Removing header modifications where only the toolchain has been changed --- .../easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb | 2 -- .../a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb | 3 --- .../c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb | 2 -- easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb | 2 -- .../s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb | 3 --- 5 files changed, 12 deletions(-) diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb index 6ce681f7d9..d787cbd50b 100644 --- a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.07.eb @@ -1,8 +1,6 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Created by Andrew Edmondson, copied from an original file with copyright: -# # Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA # Authors:: Fotis Georgatos # License:: MIT/GPL diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb index c23d974743..c8260533e6 100644 --- a/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/a/Automake/Automake-1.15-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -1,9 +1,6 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Created by Andrew Edmondson -# Copied from Automake-1.15-intel-2016b.eb, which had the following copyright information: -# # Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA # Authors:: Fotis Georgatos # License:: MIT/GPL diff --git a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb index 9c0bfae1a8..8ed8a29bfc 100644 --- a/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/c/CUDA/CUDA-7.5.18-iccifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -1,8 +1,6 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Created by Andrew Edmondson . Copied from CUDA-7.5.18-iccifort-2015.3.187-GNU-4.9.3-2.25.eb, which had the following copyright information: -# # Copyright:: Copyright 2012-2013 Cyprus Institute / CaSToRC, University of Luxembourg / LCSB, Ghent University, # Forschungszentrum Juelich # Authors:: George Tsouloupas , Fotis Georgatos , Kenneth Hoste diff --git a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb index 620b2e4dcc..4eb223b17f 100644 --- a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.07.eb @@ -1,8 +1,6 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Created by Andrew Edmondson, copied from an original file with copyright: -# # Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA # Authors:: Fotis Georgatos # License:: MIT/GPL diff --git a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb index c4174cdb80..e099c4dd67 100644 --- a/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/s/SQLite/SQLite-3.9.2-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -1,9 +1,6 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Created by Andrew Edmondson -# Copied from SQLite-3.9.2-intel-2016b.eb, which had the following copyright information: -# # Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA # Authors:: Fotis Georgatos # License:: MIT/GPL -- GitLab From 95b29a4626a0b264462bd78571318d1a4d86447a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 17 Oct 2016 10:20:57 +0200 Subject: [PATCH 478/741] add easyconfig requests-2.11.1-intel-2016b-Python-3.5.2.eb, add easyconfig requests-2.11.1-intel-2016b-Python-2.7.12.eb --- ...quests-2.11.1-intel-2016b-Python-2.7.12.eb | 24 +++++++++++++++++++ ...equests-2.11.1-intel-2016b-Python-3.5.2.eb | 24 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 easybuild/easyconfigs/r/requests/requests-2.11.1-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/r/requests/requests-2.11.1-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/r/requests/requests-2.11.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/r/requests/requests-2.11.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..28824ad2fc --- /dev/null +++ b/easybuild/easyconfigs/r/requests/requests-2.11.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'requests' +version = '2.11.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/requests/2.6.0' +description = """Python http for humans""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_LOWER_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/r/requests/requests-2.11.1-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/r/requests/requests-2.11.1-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..19001f1fa6 --- /dev/null +++ b/easybuild/easyconfigs/r/requests/requests-2.11.1-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'requests' +version = '2.11.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/requests/2.6.0' +description = """Python http for humans""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_LOWER_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'devel' -- GitLab From 997867d45cd4ae73b396a3b6a8e8e4a581e70c5c Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Mon, 17 Oct 2016 10:55:42 +0100 Subject: [PATCH 479/741] PR review comments from https://github.com/hpcugent/easybuild-easyconfigs/pull/3688#pullrequestreview-4430366 --- ...2016.07-AmberTools-16-patchlevel-5-14-serial.eb | 7 ++----- ...-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb | 7 ++----- ....9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb | 14 +++++--------- .../c/cURL/cURL-7.46.0-iomkl-2016.07.eb | 2 +- .../cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 2 +- .../d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb | 2 +- .../Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb | 2 +- ...omkl-2016.07.eb => flex-2.6.0-iomkl-2016.07.eb} | 5 ++++- ... => flex-2.6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb} | 5 ++++- .../netCDF-Fortran-4.4.4-iomkl-2016.07.eb | 7 ++----- ...F-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 7 ++----- .../n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb | 7 ++----- .../netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 7 ++----- .../easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb | 2 +- .../easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb | 2 +- .../t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 2 +- .../easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb | 2 +- .../zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb | 2 +- 18 files changed, 34 insertions(+), 50 deletions(-) rename easybuild/easyconfigs/f/flex/{flex-2.5.39-iomkl-2016.07.eb => flex-2.6.0-iomkl-2016.07.eb} (82%) rename easybuild/easyconfigs/f/flex/{flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb => flex-2.6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb} (82%) diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14-serial.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14-serial.eb index 35516d3232..4e451954c3 100644 --- a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14-serial.eb +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14-serial.eb @@ -1,6 +1,3 @@ -# -# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb -# name = 'Amber' version = '16' ambertools_ver = '16' @@ -21,12 +18,12 @@ sources = [ 'AmberTools%s.tar.bz2' % ambertools_ver, ] +patches = ['Amber-%(version)s_fix-hardcoding.patch'] + dependencies = [ ('netCDF', '4.4.0'), ('netCDF-Fortran', '4.4.4'), ('Python', '2.7.11'), ] -patches = ['Amber-16_fix-hardcoding.patch'] - moduleclass = 'chem' diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb index 4551ed1bc9..f910ba5400 100644 --- a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.07-AmberTools-16-patchlevel-5-14.eb @@ -1,6 +1,3 @@ -# -# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb -# name = 'Amber' version = '16' ambertools_ver = '16' @@ -21,12 +18,12 @@ sources = [ 'AmberTools%s.tar.bz2' % ambertools_ver, ] +patches = ['Amber-%(version)s_fix-hardcoding.patch'] + dependencies = [ ('netCDF', '4.4.0'), ('netCDF-Fortran', '4.4.4'), ('Python', '2.7.11'), ] -patches = ['Amber-16_fix-hardcoding.patch'] - moduleclass = 'chem' diff --git a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb index e8aeafd2cb..1b29f57d52 100644 --- a/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb +++ b/easybuild/easyconfigs/a/Amber/Amber-16-iomkl-2016.09-GCC-4.9.3-2.25-AmberTools-16-patchlevel-5-14-CUDA.eb @@ -1,8 +1,3 @@ -# Automatically converted from Amber-16-iomkl-2016.09-CUDA.eb -# by /gpfs/sysapps/bham/scripts/easybuild/recursive_build_with_new_toolchain.py -# -# Based on https://raw.githubusercontent.com/hpcugent/easybuild-easyconfigs/master/easybuild/easyconfigs/a/Amber/Amber-14-intel-2016a-AmberTools-15-patchlevel-13-13.eb -# name = 'Amber' version = '16' ambertools_ver = '16' @@ -23,14 +18,15 @@ sources = [ 'AmberTools%s.tar.bz2' % ambertools_ver, ] +patches = ['Amber-%(version)s_fix-hardcoding.patch', + 'Amber-%(version)s_test_cuda.patch'] + + dependencies = [ - ('CUDA', '7.5.18', '', ('iccifort', '2016.3.210-GCC-4.9.3-2.25')), + ('CUDA', '7.5.18', '', True), ('netCDF', '4.4.0'), ('netCDF-Fortran', '4.4.4'), ('Python', '2.7.11'), ] -patches = ['Amber-16_fix-hardcoding.patch', - 'Amber-16_test_cuda.patch'] - moduleclass = 'chem' diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.07.eb b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.07.eb index 4652a9953d..85d8a32448 100644 --- a/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.07.eb @@ -24,7 +24,7 @@ osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] modextravars = {'CURL_INCLUDES': '%(installdir)s/include'} sanity_check_paths = { - 'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.so'], + 'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.%s' % SHLIB_EXT], 'dirs': ['lib/pkgconfig'], } diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb index 67f22b9f41..fa8f0b1dc2 100644 --- a/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/c/cURL/cURL-7.46.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -24,7 +24,7 @@ osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] modextravars = {'CURL_INCLUDES': '%(installdir)s/include'} sanity_check_paths = { - 'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.so'], + 'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.%s' % SHLIB_EXT], 'dirs': ['lib/pkgconfig'], } diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb index 869b0596c5..2cfa765309 100644 --- a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.07.eb @@ -11,7 +11,7 @@ sources = ['%(namelower)s-%(version)s.src.tar.gz'] source_urls = ['http://ftp.stack.nl/pub/users/dimitri/'] builddependencies = [ - ('flex', '2.5.39'), + ('flex', '2.6.0'), ('CMake', '3.4.1'), ('Bison', '3.0.4'), ] diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb index d5628e7fb3..215719decb 100644 --- a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.11-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -11,7 +11,7 @@ sources = ['%(namelower)s-%(version)s.src.tar.gz'] source_urls = ['http://ftp.stack.nl/pub/users/dimitri/'] builddependencies = [ - ('flex', '2.5.39'), + ('flex', '2.6.0'), ('CMake', '3.4.1'), ('Bison', '3.0.4'), ] diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.07.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-iomkl-2016.07.eb similarity index 82% rename from easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.07.eb rename to easybuild/easyconfigs/f/flex/flex-2.6.0-iomkl-2016.07.eb index 06637a12c3..783366f34a 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-iomkl-2016.07.eb @@ -1,5 +1,5 @@ name = 'flex' -version = '2.5.39' +version = '2.6.0' homepage = 'http://flex.sourceforge.net/' description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, @@ -11,4 +11,7 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/f/flex/flex-2.6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb similarity index 82% rename from easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb rename to easybuild/easyconfigs/f/flex/flex-2.6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb index a74193a537..a3d444f9de 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -1,5 +1,5 @@ name = 'flex' -version = '2.5.39' +version = '2.6.0' homepage = 'http://flex.sourceforge.net/' description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, @@ -11,4 +11,7 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] +dependencies = [('M4', '1.4.17')] +builddependencies = [('Bison', '3.0.4')] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb index 8745f48528..0706679ca3 100644 --- a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.07.eb @@ -9,11 +9,8 @@ description = """NetCDF (network Common Data Form) is a set of software librarie toolchain = {'name': 'iomkl', 'version': '2016.07'} toolchainopts = {'pic': True} -sources = [SOURCELOWER_TAR_GZ] -source_urls = [ - 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', - 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', -] +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/Unidata/netcdf-fortran/archive'] dependencies = [('netCDF', '4.4.0')] diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb index 9fa376ea1b..9dd4898f43 100644 --- a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -9,11 +9,8 @@ description = """NetCDF (network Common Data Form) is a set of software librarie toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} toolchainopts = {'pic': True} -sources = [SOURCELOWER_TAR_GZ] -source_urls = [ - 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', - 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', -] +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/Unidata/netcdf-fortran/archive'] dependencies = [('netCDF', '4.4.0')] diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb index 95aa66e2a2..a0a822a673 100644 --- a/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.07.eb @@ -11,11 +11,8 @@ description = """NetCDF (network Common Data Form) is a set of software librarie toolchain = {'name': 'iomkl', 'version': '2016.07'} toolchainopts = {'pic': True, 'usempi': True} -sources = [SOURCELOWER_TAR_GZ] -source_urls = [ - 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', - 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', -] +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/Unidata/netcdf-c/archive/'] dependencies = [ ('HDF5', '1.8.16'), diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb index 2d9153a9ad..eec48bea4a 100644 --- a/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -9,11 +9,8 @@ description = """NetCDF (network Common Data Form) is a set of software librarie toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} toolchainopts = {'pic': True, 'usempi': True} -sources = [SOURCELOWER_TAR_GZ] -source_urls = [ - 'ftp://ftp.unidata.ucar.edu/pub/netcdf/', - 'ftp://ftp.unidata.ucar.edu/pub/netcdf/old', -] +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/Unidata/netcdf-c/archive/'] dependencies = [ ('HDF5', '1.8.16'), diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb b/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb index 85c164d4c0..512dbbe733 100644 --- a/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/s/Szip/Szip-2.1-iomkl-2016.07.eb @@ -15,7 +15,7 @@ sources = [SOURCELOWER_TAR_GZ] configopts = "--with-pic" sanity_check_paths = { - 'files': ["lib/libsz.a", "lib/libsz.so"] + + 'files': ["lib/libsz.a", "lib/libsz.%s" %SHLIB_EXT] + ["include/%s" % x for x in ["ricehdf.h", "szip_adpt.h", "szlib.h"]], 'dirs': [], } diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb index a5d63e7d00..f75495a398 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'iomkl', 'version': '2016.07'} source_urls = ["http://prdownloads.sourceforge.net/tcl"] sources = ['%(namelower)s%(version)s-src.tar.gz'] -patches = ['Tk-8.6.4_different-prefix-with-tcl.patch'] +patches = ['Tk-%(version)ss_different-prefix-with-tcl.patch'] dependencies = [ ('Tcl', version), diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb index 88cf038a76..6e7e7c9ce9 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} source_urls = ["http://prdownloads.sourceforge.net/tcl"] sources = ['%(namelower)s%(version)s-src.tar.gz'] -patches = ['Tk-8.6.4_different-prefix-with-tcl.patch'] +patches = ['Tk-%(version)s_different-prefix-with-tcl.patch'] dependencies = [ ('Tcl', version), diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb index 2242559968..5afd211f68 100644 --- a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.07.eb @@ -15,7 +15,7 @@ sources = [SOURCELOWER_TAR_GZ] source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] sanity_check_paths = { - 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.so'], + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.%s' %SHLIB_EXT], 'dirs': [], } diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb index 28c7cc5e43..66cf47a99c 100644 --- a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -15,7 +15,7 @@ sources = [SOURCELOWER_TAR_GZ] source_urls = [('http://sourceforge.net/projects/libpng/files/zlib/%(version)s', 'download')] sanity_check_paths = { - 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.so'], + 'files': ['include/zconf.h', 'include/zlib.h', 'lib/libz.a', 'lib/libz.%s' %SHLIB_EXT], 'dirs': [], } -- GitLab From ffd90cc8bd7169b898de38ae981b503d1f4abba2 Mon Sep 17 00:00:00 2001 From: Andrew Edmondson Date: Mon, 17 Oct 2016 11:39:45 +0100 Subject: [PATCH 480/741] Spurious s in format string --- easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb index f75495a398..fb10fedcae 100644 --- a/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/t/Tk/Tk-8.6.4-iomkl-2016.07.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'iomkl', 'version': '2016.07'} source_urls = ["http://prdownloads.sourceforge.net/tcl"] sources = ['%(namelower)s%(version)s-src.tar.gz'] -patches = ['Tk-%(version)ss_different-prefix-with-tcl.patch'] +patches = ['Tk-%(version)s_different-prefix-with-tcl.patch'] dependencies = [ ('Tcl', version), -- GitLab From bed9d654f559b6b7e5e6d43ccf990fcab31e59de Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 17 Oct 2016 15:00:12 +0200 Subject: [PATCH 481/741] add easyconfig LASTZ-1.02.00-goolf-1.7.20.eb --- .../l/LASTZ/LASTZ-1.02.00-goolf-1.7.20.eb | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 easybuild/easyconfigs/l/LASTZ/LASTZ-1.02.00-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/l/LASTZ/LASTZ-1.02.00-goolf-1.7.20.eb b/easybuild/easyconfigs/l/LASTZ/LASTZ-1.02.00-goolf-1.7.20.eb new file mode 100644 index 0000000000..d7a88ce495 --- /dev/null +++ b/easybuild/easyconfigs/l/LASTZ/LASTZ-1.02.00-goolf-1.7.20.eb @@ -0,0 +1,46 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'ConfigureMake' + +name = 'LASTZ' +version = '1.02.00' + +homepage = 'http://www.bx.psu.edu/~rsharris/lastz/' + +description = """LASTZ is a program for aligning DNA sequences, a pairwise aligner. Originally designed to + handle sequences the size of human chromosomes and from different species, it is also useful for sequences + produced by NGS sequencing technologies such as Roche 454.""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} + +source_urls = ['http://www.bx.psu.edu/miller_lab/dist/'] +sources = ['%(namelower)s-%(version)s.tar.gz'] + +# the tarball includes some test data which is not copied when doing the "make install" step. +# We use the buildininstalldir option to keep this test data in the %(installdir)s +buildininstalldir = True + +parallel = 1 + +unpack_options = '--strip-components=1' + +skipsteps = ['configure'] + +# by default definedForAll variable in src/Makefile contains -Werror which works with gcc-4.4 +# but crashes with newer gcc versions so we override definedForAll to remove the -Werror option +buildopts = " definedForAll='-Wall -Wextra -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'" + +# use the LASTZ_INSTALL variable to define the directory where to copy the binaries during "make install" step +# Tarball includes an empty bin/ folder. In case the tarball doesn't include a bin/ folder you can do +# preinstallopts = 'mkdir %(installdir)s/bin/ && ' +installopts = " LASTZ_INSTALL='%(installdir)s/bin'" + +sanity_check_paths = { + 'files': ["bin/lastz", "bin/lastz_D"], + 'dirs': [] +} + +moduleclass = 'bio' -- GitLab From 49db5643421c38406903ef43d1685920fd1d0c59 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 17 Oct 2016 14:36:12 +0100 Subject: [PATCH 482/741] add easyconfig pandas-0.19.0-foss-2016b-Python-2.7.12.eb, add easyconfig pandas-0.19.0-foss-2016b-Python-3.5.2.eb, add easyconfig pandas-0.19.0-intel-2016b-Python-2.7.12.eb, add easyconfig pandas-0.19.0-intel-2016b-Python-3.5.2.eb --- .../pandas-0.19.0-foss-2016b-Python-2.7.12.eb | 23 +++++++++++++++++++ .../pandas-0.19.0-foss-2016b-Python-3.5.2.eb | 23 +++++++++++++++++++ ...pandas-0.19.0-intel-2016b-Python-2.7.12.eb | 23 +++++++++++++++++++ .../pandas-0.19.0-intel-2016b-Python-3.5.2.eb | 23 +++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 easybuild/easyconfigs/p/pandas/pandas-0.19.0-foss-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/p/pandas/pandas-0.19.0-foss-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/p/pandas/pandas-0.19.0-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/p/pandas/pandas-0.19.0-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/p/pandas/pandas-0.19.0-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/pandas/pandas-0.19.0-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..d10a536e67 --- /dev/null +++ b/easybuild/easyconfigs/p/pandas/pandas-0.19.0-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonPackage' + +name = 'pandas' +version = '0.19.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = "https://pypi.python.org/pypi/pandas/" +description = """pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures + and data analysis tools for the Python programming language.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.12')] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/pandas/pandas-0.19.0-foss-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/pandas/pandas-0.19.0-foss-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..66017ec403 --- /dev/null +++ b/easybuild/easyconfigs/p/pandas/pandas-0.19.0-foss-2016b-Python-3.5.2.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonPackage' + +name = 'pandas' +version = '0.19.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = "https://pypi.python.org/pypi/pandas/" +description = """pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures + and data analysis tools for the Python programming language.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '3.5.2')] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/pandas/pandas-0.19.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/pandas/pandas-0.19.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..8829139b1b --- /dev/null +++ b/easybuild/easyconfigs/p/pandas/pandas-0.19.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonPackage' + +name = 'pandas' +version = '0.19.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = "https://pypi.python.org/pypi/pandas/" +description = """pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures + and data analysis tools for the Python programming language.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.12')] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/pandas/pandas-0.19.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/pandas/pandas-0.19.0-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..823a55912c --- /dev/null +++ b/easybuild/easyconfigs/p/pandas/pandas-0.19.0-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonPackage' + +name = 'pandas' +version = '0.19.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = "https://pypi.python.org/pypi/pandas/" +description = """pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures + and data analysis tools for the Python programming language.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '3.5.2')] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' -- GitLab From 8693e0b9b3df082e712687975284284e6eac42b1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 19 Oct 2016 10:34:33 +0200 Subject: [PATCH 483/741] add easyconfig StringTie-1.3.0-intel-2016b.eb --- .../StringTie/StringTie-1.3.0-intel-2016b.eb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 easybuild/easyconfigs/s/StringTie/StringTie-1.3.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/s/StringTie/StringTie-1.3.0-intel-2016b.eb b/easybuild/easyconfigs/s/StringTie/StringTie-1.3.0-intel-2016b.eb new file mode 100644 index 0000000000..424d2b7aeb --- /dev/null +++ b/easybuild/easyconfigs/s/StringTie/StringTie-1.3.0-intel-2016b.eb @@ -0,0 +1,26 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'MakeCp' + +name = 'StringTie' +version = '1.3.0' + +homepage = 'http://ccb.jhu.edu/software/stringtie/' +description = """StringTie is a fast and highly efficient assembler of RNA-Seq alignments into potential transcripts.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://ccb.jhu.edu/software/stringtie/dl/'] +sources = [SOURCELOWER_TAR_GZ] + +files_to_copy = [(['stringtie'], 'bin'), 'README', 'LICENSE'] + +sanity_check_paths = { + 'files': ['bin/stringtie'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From c891c80e22be44b961a9c34c7d833e20586952d7 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Wed, 19 Oct 2016 13:18:21 +0200 Subject: [PATCH 484/741] {vis}[intel/2016b] wxPython 3.0.2.0 (REVIEW) --- .../a/ATK/ATK-2.22.0-intel-2016b.eb | 34 ++++++++++++++++ .../d/DBus/DBus-1.10.12-intel-2016b.eb | 24 +++++++++++ .../dbus-glib/dbus-glib-0.108-intel-2016b.eb | 25 ++++++++++++ .../g/GConf/GConf-3.2.6-intel-2016b.eb | 39 ++++++++++++++++++ .../GST-plugins-base-0.10.36-intel-2016b.eb | 35 ++++++++++++++++ .../GStreamer-0.10.36-intel-2016b.eb | 40 +++++++++++++++++++ .../g/GTK+/GTK+-2.24.31-intel-2016b.eb | 25 ++++++++++++ .../Gdk-Pixbuf-2.36.0-intel-2016b.eb | 34 ++++++++++++++++ ...intltool-0.51.0-intel-2016b-Perl-5.24.0.eb | 25 ++++++++++++ ...ython-3.0.2.0-intel-2016b-Python-2.7.12.eb | 34 ++++++++++++++++ ...-Parser-2.44_01-intel-2016b-Perl-5.24.0.eb | 27 +++++++++++++ 11 files changed, 342 insertions(+) create mode 100644 easybuild/easyconfigs/a/ATK/ATK-2.22.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/d/DBus/DBus-1.10.12-intel-2016b.eb create mode 100644 easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.108-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/GConf/GConf-3.2.6-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-0.10.36-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/GStreamer/GStreamer-0.10.36-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/GTK+/GTK+-2.24.31-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/Gdk-Pixbuf/Gdk-Pixbuf-2.36.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/i/intltool/intltool-0.51.0-intel-2016b-Perl-5.24.0.eb create mode 100644 easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/x/XML-Parser/XML-Parser-2.44_01-intel-2016b-Perl-5.24.0.eb diff --git a/easybuild/easyconfigs/a/ATK/ATK-2.22.0-intel-2016b.eb b/easybuild/easyconfigs/a/ATK/ATK-2.22.0-intel-2016b.eb new file mode 100644 index 0000000000..9b536efda0 --- /dev/null +++ b/easybuild/easyconfigs/a/ATK/ATK-2.22.0-intel-2016b.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'ATK' +version = '2.22.0' + +homepage = 'https://developer.gnome.org/ATK/stable/' +description = """ + ATK provides the set of accessibility interfaces that are implemented by other + toolkits and applications. Using the ATK interfaces, accessibility tools have + full access to view and control running applications. +""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('GLib', '2.49.5'), + ('GObject-Introspection', '1.49.1') +] + +configopts = "--enable-introspection=yes" + +modextrapaths = { + 'XDG_DATA_DIRS': 'share', +} + +sanity_check_paths = { + 'files': ['lib/libatk-1.0.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/d/DBus/DBus-1.10.12-intel-2016b.eb b/easybuild/easyconfigs/d/DBus/DBus-1.10.12-intel-2016b.eb new file mode 100644 index 0000000000..7071afdb2c --- /dev/null +++ b/easybuild/easyconfigs/d/DBus/DBus-1.10.12-intel-2016b.eb @@ -0,0 +1,24 @@ +easyblock = 'ConfigureMake' + +name = 'DBus' +version = '1.10.12' + +homepage = 'http://dbus.freedesktop.org/doc/dbus-glib' +description = """D-Bus is a message bus system, a simple way for applications to talk + to one another. In addition to interprocess communication, D-Bus helps + coordinate process lifecycle; it makes it simple and reliable to code + a "single instance" application or daemon, and to launch applications + and daemons on demand when their services are needed.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://dbus.freedesktop.org/releases/dbus'] +sources = [SOURCELOWER_TAR_GZ] + +sanity_check_paths = { + 'files': ['bin/dbus-%s' % x for x in ['cleanup-sockets', 'daemon', 'launch', 'monitor', 'run-session', 'send', 'uuidgen']] + + ['lib/libdbus-1.%s' % x for x in ['a', SHLIB_EXT]], + 'dirs': ['include', 'share'] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.108-intel-2016b.eb b/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.108-intel-2016b.eb new file mode 100644 index 0000000000..318a8a890a --- /dev/null +++ b/easybuild/easyconfigs/d/dbus-glib/dbus-glib-0.108-intel-2016b.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'dbus-glib' +version = '0.108' + +homepage = 'http://dbus.freedesktop.org/doc/dbus-glib' +description = """D-Bus is a message bus system, a simple way for applications to talk to one another.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://dbus.freedesktop.org/releases/dbus-glib'] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('GLib', '2.49.5'), + ('DBus', '1.10.12'), + ('expat', '2.2.0'), +] + +sanity_check_paths = { + 'files': ['bin/dbus-binding-tool', 'lib/libdbus-glib-1.%s' % SHLIB_EXT, 'lib/libdbus-glib-1.a'], + 'dirs': ['include', 'share'] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/g/GConf/GConf-3.2.6-intel-2016b.eb b/easybuild/easyconfigs/g/GConf/GConf-3.2.6-intel-2016b.eb new file mode 100644 index 0000000000..a184de7e11 --- /dev/null +++ b/easybuild/easyconfigs/g/GConf/GConf-3.2.6-intel-2016b.eb @@ -0,0 +1,39 @@ +easyblock = 'ConfigureMake' + +name = 'GConf' +version = '3.2.6' + +homepage = 'https://projects.gnome.org/gconf/' +description = """GConf is a system for storing application preferences. + It is intended for user preferences; not configuration + of something like Apache, or arbitrary data storage.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://ftp.gnome.org/pub/GNOME/sources/GConf/%(version_major_minor)s/'] +sources = [SOURCE_TAR_XZ] + +dependencies = [ + ('dbus-glib', '0.108'), + ('GLib', '2.49.5'), + ('GObject-Introspection', '1.49.1'), + ('libxml2', '2.9.4'), + ('GTK+', '2.24.31'), + ('intltool', '0.51.0', '-Perl-5.24.0'), +] + +configopts = '--disable-orbit ' + +sanity_check_paths = { + 'files': ['bin/gconf%s' % x for x in['-merge-tree', 'tool-2']] + + ['bin/gsettings-%s-convert' % x for x in ['data', 'schema']] + + ['lib/libgconf-2.%s' % x for x in['a', 'so']], + 'dirs': ['include', 'share'] +} + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-0.10.36-intel-2016b.eb b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-0.10.36-intel-2016b.eb new file mode 100644 index 0000000000..743a59e91a --- /dev/null +++ b/easybuild/easyconfigs/g/GST-plugins-base/GST-plugins-base-0.10.36-intel-2016b.eb @@ -0,0 +1,35 @@ +easyblock = 'ConfigureMake' + +name = 'GST-plugins-base' +version = '0.10.36' + +homepage = 'http://gstreamer.freedesktop.org/' +description = """GStreamer is a library for constructing graphs of media-handling + components. The applications it supports range from simple + Ogg/Vorbis playback, audio/video streaming to complex audio + (mixing) and video (non-linear editing) processing.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://gstreamer.freedesktop.org/src/gst-plugins-base'] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [('GStreamer', '0.10.36')] + +# does not work with Bison 3.x +builddependencies = [ + ('Bison', '2.7', '', True), +] + +sanity_check_paths = { + 'files': ['bin/gst-%s-%%(version_major_minor)s' % x for x in ['discoverer', 'visualise']] + + ['lib/libgst%s-%%(version_major_minor)s.%s' % (x, SHLIB_EXT) for x in ['app', 'audio', 'video']], + 'dirs': ['include', 'share'] +} + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/GStreamer/GStreamer-0.10.36-intel-2016b.eb b/easybuild/easyconfigs/g/GStreamer/GStreamer-0.10.36-intel-2016b.eb new file mode 100644 index 0000000000..a0214562e2 --- /dev/null +++ b/easybuild/easyconfigs/g/GStreamer/GStreamer-0.10.36-intel-2016b.eb @@ -0,0 +1,40 @@ +easyblock = 'ConfigureMake' + +name = 'GStreamer' +version = '0.10.36' + +homepage = 'http://gstreamer.freedesktop.org/' +description = """GStreamer is a library for constructing graphs of media-handling + components. The applications it supports range from simple + Ogg/Vorbis playback, audio/video streaming to complex audio + (mixing) and video (non-linear editing) processing.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://gstreamer.freedesktop.org/src/gstreamer'] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('GLib', '2.49.5'), + ('GObject-Introspection', '1.49.1'), + ('zlib', '1.2.8'), +] + +# does not work with Bison 3.x +builddependencies = [ + ('Bison', '2.7', '', True), +] + +sanity_check_paths = { + 'files': ['bin/gst-%s-%%(version_major_minor)s' % x for x in ['inspect', 'typefind', 'launch']] + + ['lib/libgst%s-%%(version_major_minor)s.%s' % (x, SHLIB_EXT) for x in ['reamer', 'base', + 'controller', 'check']], + 'dirs': ['include', 'share', 'libexec'], +} + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/GTK+/GTK+-2.24.31-intel-2016b.eb b/easybuild/easyconfigs/g/GTK+/GTK+-2.24.31-intel-2016b.eb new file mode 100644 index 0000000000..78f4ad00b7 --- /dev/null +++ b/easybuild/easyconfigs/g/GTK+/GTK+-2.24.31-intel-2016b.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'GTK+' +version = '2.24.31' + +homepage = 'https://developer.gnome.org/gtk+/stable/' +description = """ + The GTK+ 2 package contains libraries used for creating graphical user interfaces for applications. +""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('ATK', '2.22.0'), + ('Gdk-Pixbuf', '2.36.0'), + ('Pango', '1.40.3'), + ('GObject-Introspection', '1.49.1'), +] + +configopts = "--disable-silent-rules --disable-glibtest --enable-introspection=yes --disable-visibility " + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/Gdk-Pixbuf/Gdk-Pixbuf-2.36.0-intel-2016b.eb b/easybuild/easyconfigs/g/Gdk-Pixbuf/Gdk-Pixbuf-2.36.0-intel-2016b.eb new file mode 100644 index 0000000000..4d84597d62 --- /dev/null +++ b/easybuild/easyconfigs/g/Gdk-Pixbuf/Gdk-Pixbuf-2.36.0-intel-2016b.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'Gdk-Pixbuf' +version = '2.36.0' + +homepage = 'https://developer.gnome.org/gdk-pixbuf/stable/' +description = """ + The Gdk Pixbuf is a toolkit for image loading and pixel buffer manipulation. + It is used by GTK+ 2 and GTK+ 3 to load and manipulate images. In the past it + was distributed as part of GTK+ 2 but it was split off into a separate package + in preparation for the change to GTK+ 3. +""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('GLib', '2.49.5'), + ('libjpeg-turbo', '1.5.0'), + ('libpng', '1.6.24'), + ('LibTIFF', '4.0.6'), + ('GObject-Introspection', '1.49.1') +] + +configopts = "--disable-maintainer-mode --enable-debug=no --enable-introspection=yes " +configopts += "--disable-Bsymbolic --without-gdiplus --enable-shared --enable-static" + +modextrapaths = { + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/i/intltool/intltool-0.51.0-intel-2016b-Perl-5.24.0.eb b/easybuild/easyconfigs/i/intltool/intltool-0.51.0-intel-2016b-Perl-5.24.0.eb new file mode 100644 index 0000000000..c5a095b3f6 --- /dev/null +++ b/easybuild/easyconfigs/i/intltool/intltool-0.51.0-intel-2016b-Perl-5.24.0.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'intltool' +version = '0.51.0' +versionsuffix = '-Perl-5.24.0' + +homepage = 'http://freedesktop.org/wiki/Software/intltool/' +description = """intltool is a set of tools to centralize translation of + many different file formats using GNU gettext-compatible PO files.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://launchpad.net/intltool/trunk/%(version)s/+download/'] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('XML-Parser', '2.44_01', versionsuffix), +] + +sanity_check_paths = { + 'files': ['bin/intltool%s' % x for x in ['-extract', '-merge', '-prepare', '-update', 'ize']], + 'dirs': [] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..73dad53861 --- /dev/null +++ b/easybuild/easyconfigs/w/wxPython/wxPython-3.0.2.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,34 @@ +name = 'wxPython' +version = '3.0.2.0' +versionsuffix = "-Python-%(pyver)s" + +homepage = 'http://www.wxpython.org' +description = """wxPython is a GUI toolkit for the Python programming language. + It allows Python programmers to create programs with a robust, + highly functional graphical user interface, simply and easily. + It is implemented as a Python extension module (native code) + that wraps the popular wxWidgets cross platform GUI library, + which is written in C++.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [SOURCEFORGE_SOURCE] +sources = ['%(name)s-src-%(version)s.tar.bz2'] + +patches = ['%(name)s_%(version)s_intel.patch'] + +dependencies = [ + ('Python', '2.7.12'), + ('libpng', '1.6.24'), + ('zlib', '1.2.8'), + ('libjpeg-turbo', '1.5.0'), + ('LibTIFF', '4.0.6'), + ('expat', '2.2.0'), + ('GTK+', '2.24.31'), + ('GConf', '3.2.6'), + ('GST-plugins-base', '0.10.36'), + ('Mesa', '12.0.2'), + ('libGLU', '9.0.0'), +] + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/x/XML-Parser/XML-Parser-2.44_01-intel-2016b-Perl-5.24.0.eb b/easybuild/easyconfigs/x/XML-Parser/XML-Parser-2.44_01-intel-2016b-Perl-5.24.0.eb new file mode 100644 index 0000000000..d7ce4573e1 --- /dev/null +++ b/easybuild/easyconfigs/x/XML-Parser/XML-Parser-2.44_01-intel-2016b-Perl-5.24.0.eb @@ -0,0 +1,27 @@ +easyblock = 'PerlModule' + +name = 'XML-Parser' +version = '2.44_01' +versionsuffix = '-Perl-%(perlver)s' + +homepage = 'http://search.cpan.org/~toddr/XML-Parser-2.41/' +description = """This is a Perl extension interface to James Clark's XML parser, expat.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://cpan.metacpan.org/authors/id/T/TO/TODDR/'] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Perl', '5.24.0'), + ('expat', '2.2.0') +] + +options = {'modulename': 'XML::Parser'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/perl5/site_perl/%(perlver)s/x86_64-linux-thread-multi/XML'], +} + +moduleclass = 'data' -- GitLab From 8cf50540954adabad0801bbdecc1c668b20b911a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 19 Oct 2016 19:22:57 +0200 Subject: [PATCH 485/741] add easyconfig mypy-0.4.5-intel-2016b.eb --- .../m/mypy/mypy-0.4.5-intel-2016b.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb diff --git a/easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb b/easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb new file mode 100644 index 0000000000..9a4921fa74 --- /dev/null +++ b/easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb @@ -0,0 +1,36 @@ +easyblock = 'Bundle' + +name = 'mypy' +version = '0.4.5' + +homepage = 'http://www.mypy-lang.org/' +description = """Optional static typing for Python""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [('Python', '3.5.2')] + +exts_list = [ + ('typed-ast', '0.6.1', { + 'source_urls': ['https://pypi.python.org/packages/source/t/typed-ast'], + 'modulename': 'typed_ast', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/m/mypy-lang'], + 'source_tmpl': 'mypy-lang-%(version)s.tar.gz', + 'modulename': 'mypy_lang', + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['bin/mypy'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lang' -- GitLab From 4ec368166459ea701600a38d79f1581de3ed2a21 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 19 Oct 2016 19:28:08 +0200 Subject: [PATCH 486/741] fix sanity check by making sure $PYTHONPATH is set correctly --- easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb b/easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb index 9a4921fa74..7ebbaca141 100644 --- a/easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb +++ b/easybuild/easyconfigs/m/mypy/mypy-0.4.5-intel-2016b.eb @@ -21,13 +21,14 @@ exts_list = [ (name, version, { 'source_urls': ['https://pypi.python.org/packages/source/m/mypy-lang'], 'source_tmpl': 'mypy-lang-%(version)s.tar.gz', - 'modulename': 'mypy_lang', }), ] # specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module full_sanity_check = True +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + sanity_check_paths = { 'files': ['bin/mypy'], 'dirs': ['lib/python%(pyshortver)s/site-packages'], -- GitLab From 330a4be23ab09cce718462084df9abbfc089540a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 21 Oct 2016 14:58:47 +0200 Subject: [PATCH 487/741] add easyconfig hanythingondemand-3.2.0-cli.eb, add easyconfig hanythingondemand-3.2.0-intel-2016b-Python-2.7.12.eb --- .../hanythingondemand-3.2.0-cli.eb | 42 +++++++++++++++++++ ...ndemand-3.2.0-intel-2016b-Python-2.7.12.eb | 30 +++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.2.0-cli.eb create mode 100644 easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.2.0-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.2.0-cli.eb b/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.2.0-cli.eb new file mode 100644 index 0000000000..7e255dbc21 --- /dev/null +++ b/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.2.0-cli.eb @@ -0,0 +1,42 @@ +easyblock = 'PythonPackage' + +name = 'hanythingondemand' +version = '3.2.0' +versionsuffix = '-cli' + +homepage = 'https://github.com/hpcugent/hanythingondemand' +description = """HanythingOnDemand (HOD) is a system for provisioning virtual Hadoop clusters over a large physical cluster. +It uses the Torque resource manager to do node allocation.""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +# minimal version for interactive use: just uses system Python (netaddr/netifaces/mpi4py not required) +dependencies = [ + ('pbs_python', '4.6.0'), + ('vsc-base', '2.5.1'), +] + +use_easy_install = True +zipped_egg = True + +# use 'hod' rather than 'hanythingondemand' in module name +modaltsoftname = 'hod' + +options = {'modulename': 'hod'} + +modextravars = { + # site-specific settings, hence commented out + # specify HOD module to use in jobs (*full* HOD installation, not a minimal one) + #'HOD_BATCH_HOD_MODULE': 'hanythingondemand/%(version)s-intel-2016b-Python-2.7.12', + #'HOD_CREATE_HOD_MODULE': 'hanythingondemand/%(version)s-intel-2016b-Python-2.7.12', + # specify location on shared 'scratch' filesystem for HOD working directories + #'HOD_BATCH_WORKDIR': '\$VSC_SCRATCH/hod', + #'HOD_CREATE_WORKDIR': '\$VSC_SCRATCH/hod', +} + +sanity_check_commands = [('hod', '--help'), ('hod', 'dists')] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.2.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.2.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..ea99d52247 --- /dev/null +++ b/easybuild/easyconfigs/h/hanythingondemand/hanythingondemand-3.2.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,30 @@ +easyblock = 'PythonPackage' + +name = 'hanythingondemand' +version = '3.2.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/hpcugent/hanythingondemand' +description = """HanythingOnDemand (HOD) is a system for provisioning virtual Hadoop clusters over a large physical cluster. +It uses the Torque resource manager to do node allocation.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +# a Python version with netaddr/netifaces/mpi4py + pbs_python and vsc-base/vsc-mympirun is required at runtime +dependencies = [ + ('Python', '2.7.12'), # provides netaddr, netifaces, mpi4py + ('pbs_python', '4.6.0', versionsuffix), + ('vsc-mympirun', '3.4.3', versionsuffix), +] + +use_easy_install = True +zipped_egg = True + +options = {'modulename': 'hod'} + +sanity_check_commands = [('hod', '--help'), ('hod', 'dists')] + +moduleclass = 'tools' -- GitLab From e061a8e98690ee0af232707b7441b177e99d17b7 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Sat, 22 Oct 2016 19:49:18 +0200 Subject: [PATCH 488/741] Make OpenBLAS use the LAPACK version specified in the easyconfig. The OpenBLAS Makefile only handles large.tgz and timing.tgz and ignores lapack-x.y.z.tgz. We need to manually unpack the lapack-x.y.z specified in the easyconfig. Doing it this way makse it possible to add patches on top of the unpacked lapack version, which is neccesary to deal with various compiler problems. --- .../OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb | 5 +++-- .../o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb | 5 +++-- .../o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb index 3183ffeabd..257f234cab 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb @@ -3,6 +3,8 @@ easyblock = 'ConfigureMake' name = 'OpenBLAS' version = '0.2.18' +obv = '%s-%s' % (name, version) # To be used in the lapack-x.y.z unpack cmd + lapackver = '3.6.1' versionsuffix = '-LAPACK-%s' % lapackver @@ -16,7 +18,7 @@ large_src = 'large.tgz' timing_src = 'timing.tgz' sources = [ 'v%(version)s.tar.gz', - lapack_src, + (lapack_src, 'mv %s/lapack-netlib %s/lapack-netlib.old; mkdir %s/lapack-netlib; tar -C %s/lapack-netlib --strip-components=1 -zxf %%s' % (obv, obv, obv, obv)), large_src, timing_src, ] @@ -28,7 +30,6 @@ source_urls = [ ] patches = [ - (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir (large_src, '.'), (timing_src, '.'), ] diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb index 75a0bc06f7..19e70c7dbd 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb @@ -3,6 +3,8 @@ easyblock = 'ConfigureMake' name = 'OpenBLAS' version = '0.2.18' +obv = '%s-%s' % (name, version) # To be used in the lapack-x.y.z unpack cmd + lapackver = '3.6.1' versionsuffix = '-LAPACK-%s' % lapackver @@ -16,7 +18,7 @@ large_src = 'large.tgz' timing_src = 'timing.tgz' sources = [ 'v%(version)s.tar.gz', - lapack_src, + (lapack_src, 'mv %s/lapack-netlib %s/lapack-netlib.old; mkdir %s/lapack-netlib; tar -C %s/lapack-netlib --strip-components=1 -zxf %%s' % (obv, obv, obv, obv)), large_src, timing_src, ] @@ -28,7 +30,6 @@ source_urls = [ ] patches = [ - (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir (large_src, '.'), (timing_src, '.'), ] diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb index 32b66ddad1..7145750599 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb @@ -3,6 +3,8 @@ easyblock = 'ConfigureMake' name = 'OpenBLAS' version = '0.2.19' +obv = '%s-%s' % (name, version) # To be used in the lapack-x.y.z unpack cmd + lapackver = '3.6.1' versionsuffix = '-LAPACK-%s' % lapackver @@ -16,7 +18,7 @@ large_src = 'large.tgz' timing_src = 'timing.tgz' sources = [ 'v%(version)s.tar.gz', - lapack_src, + (lapack_src, 'mv %s/lapack-netlib %s/lapack-netlib.old; mkdir %s/lapack-netlib; tar -C %s/lapack-netlib --strip-components=1 -zxf %%s' % (obv, obv, obv, obv)), large_src, timing_src, ] @@ -28,7 +30,6 @@ source_urls = [ ] patches = [ - (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir (large_src, '.'), (timing_src, '.'), ] -- GitLab From b4749bb569a4da28304a1914a6ac1a591f671a21 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 24 Oct 2016 09:33:06 +0200 Subject: [PATCH 489/741] Change the lapack-x.y.z.tgz unpacking to a more readable version. Also don't keep a copy of the old lapack-netlib. --- .../OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb | 9 ++++++--- .../OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb | 9 ++++++--- .../OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb index 257f234cab..eb1d2f67c9 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb @@ -3,8 +3,6 @@ easyblock = 'ConfigureMake' name = 'OpenBLAS' version = '0.2.18' -obv = '%s-%s' % (name, version) # To be used in the lapack-x.y.z unpack cmd - lapackver = '3.6.1' versionsuffix = '-LAPACK-%s' % lapackver @@ -16,9 +14,14 @@ toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' + +lapack_unpack_cmd = 'cd %s-%s; rm -rf lapack-netlib;' % (name, version) +lapack_unpack_cmd += 'mkdir lapack-netlib;' +lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' + sources = [ 'v%(version)s.tar.gz', - (lapack_src, 'mv %s/lapack-netlib %s/lapack-netlib.old; mkdir %s/lapack-netlib; tar -C %s/lapack-netlib --strip-components=1 -zxf %%s' % (obv, obv, obv, obv)), + (lapack_src, lapack_unpack_cmd), large_src, timing_src, ] diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb index 19e70c7dbd..35ba0998f3 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb @@ -3,8 +3,6 @@ easyblock = 'ConfigureMake' name = 'OpenBLAS' version = '0.2.18' -obv = '%s-%s' % (name, version) # To be used in the lapack-x.y.z unpack cmd - lapackver = '3.6.1' versionsuffix = '-LAPACK-%s' % lapackver @@ -16,9 +14,14 @@ toolchain = {'name': 'gompi', 'version': '2016.07'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' + +lapack_unpack_cmd = 'cd %s-%s; rm -rf lapack-netlib;' % (name, version) +lapack_unpack_cmd += 'mkdir lapack-netlib;' +lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' + sources = [ 'v%(version)s.tar.gz', - (lapack_src, 'mv %s/lapack-netlib %s/lapack-netlib.old; mkdir %s/lapack-netlib; tar -C %s/lapack-netlib --strip-components=1 -zxf %%s' % (obv, obv, obv, obv)), + (lapack_src, lapack_unpack_cmd), large_src, timing_src, ] diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb index 7145750599..0755e77fbc 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb @@ -3,8 +3,6 @@ easyblock = 'ConfigureMake' name = 'OpenBLAS' version = '0.2.19' -obv = '%s-%s' % (name, version) # To be used in the lapack-x.y.z unpack cmd - lapackver = '3.6.1' versionsuffix = '-LAPACK-%s' % lapackver @@ -16,9 +14,14 @@ toolchain = {'name': 'gompi', 'version': '2016.09'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' + +lapack_unpack_cmd = 'cd %s-%s; rm -rf lapack-netlib;' % (name, version) +lapack_unpack_cmd += 'mkdir lapack-netlib;' +lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' + sources = [ 'v%(version)s.tar.gz', - (lapack_src, 'mv %s/lapack-netlib %s/lapack-netlib.old; mkdir %s/lapack-netlib; tar -C %s/lapack-netlib --strip-components=1 -zxf %%s' % (obv, obv, obv, obv)), + (lapack_src, lapack_unpack_cmd), large_src, timing_src, ] -- GitLab From 8335ca81fdd984b961935d564c5cf2ee8de62e49 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 24 Oct 2016 10:21:15 +0200 Subject: [PATCH 490/741] The patches block in OpenMPI for cuda is no longer needed. This is true from OpeMPI versions 1.10 and upwards. --- .../easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb index 6759d4aca3..c4792dca19 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb @@ -12,11 +12,6 @@ sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] -#patches = [ -# 'OpenMPI-%(version)s_common-cuda-lib.patch', -# 'OpenMPI-%(version)s-vt_cupti_events.patch', -#] - dependencies = [('hwloc', '1.11.4')] configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' -- GitLab From 3a05c4bd6072fe4f97d257f5f1b255c09176b446 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 24 Oct 2016 10:29:24 +0200 Subject: [PATCH 491/741] For the time being, drop --enable-avx2 from the configopts of FFTW. Need to have a way to detect available features of the cpu used for building and add flags accordingly. --- easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb index c7b43ae2f7..6df05f5634 100644 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb @@ -16,10 +16,10 @@ source_urls = [homepage] common_configopts = "--enable-threads --enable-openmp --with-pic" configopts = [ - common_configopts + " --enable-single --enable-sse2 --enable-avx --enable-avx2 --enable-mpi", + common_configopts + " --enable-single --enable-sse2 --enable-avx --enable-mpi", common_configopts + " --enable-long-double --enable-mpi", common_configopts + " --enable-quad-precision", - common_configopts + " --enable-sse2 --enable-avx --enable-avx2 --enable-mpi", # default as last + common_configopts + " --enable-sse2 --enable-avx --enable-mpi", # default as last ] sanity_check_paths = { -- GitLab From 2998ebf873a9ee1de07f3fb872fd122b5b65fbdb Mon Sep 17 00:00:00 2001 From: Andreas Hilboll Date: Mon, 24 Oct 2016 18:03:16 +0200 Subject: [PATCH 492/741] Update WRF-3.8.0_netCDF-Fortran_separate_path.patch I believe this is a typo preventing the `NETCDFFPATH` variable to be set correctly. --- .../w/WRF/WRF-3.8.0_netCDF-Fortran_separate_path.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/w/WRF/WRF-3.8.0_netCDF-Fortran_separate_path.patch b/easybuild/easyconfigs/w/WRF/WRF-3.8.0_netCDF-Fortran_separate_path.patch index f46ae78e87..baaf9b3859 100644 --- a/easybuild/easyconfigs/w/WRF/WRF-3.8.0_netCDF-Fortran_separate_path.patch +++ b/easybuild/easyconfigs/w/WRF/WRF-3.8.0_netCDF-Fortran_separate_path.patch @@ -83,7 +83,7 @@ diff -ru WRFV3.orig/arch/postamble_new WRFV3/arch/postamble_new ENVCOMPDEFS = CONFIGURE_COMPILEFLAGS CPPFLAGS = $(ARCHFLAGS) $(ENVCOMPDEFS) -I$(LIBINCLUDE) $(TRADFLAG) CONFIGURE_COMMS_INCLUDE NETCDFPATH = CONFIGURE_NETCDF_PATH -++NETCDFFPATH = CONFIGURE_NETCDFF_PATH ++NETCDFFPATH = CONFIGURE_NETCDFF_PATH HDF5PATH = CONFIGURE_HDF5_PATH WRFPLUSPATH = CONFIGURE_WRFPLUS_PATH PNETCDFPATH = CONFIGURE_PNETCDF_PATH -- GitLab From 3896361f1544a31dc8701a1f564c1bda7d86cb32 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 25 Oct 2016 12:25:08 +0200 Subject: [PATCH 493/741] add custom patch for OpenFOAM 3.0.1 --- .../o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb | 2 +- .../o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch | 282 ++++++++++++++++++ 2 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb index ca5d08b992..e27c7e7895 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb @@ -15,7 +15,7 @@ sources = ['version-%(version)s.tar.gz'] checksums = ['a6ffe3edabdd23f9eff31be47a092b07'] -patches = ['OpenFOAM-3.0.0_cleanup.patch'] +patches = ['OpenFOAM-%(version)s_cleanup.patch'] dependencies = [ ('libreadline', '6.3'), diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch new file mode 100644 index 0000000000..335b44903b --- /dev/null +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch @@ -0,0 +1,282 @@ +# This patch removes all need for the ThirdParty files of OpenFOAM: +# we use EB dependencies for everything. It adjusts the paths, variables, etc +# We also let the install dir, compiler, etc be set by EB. +# Lastly, we also fix a small compile issue in 'ptscotchDecomp.C' +# Ward Poelmans , Kenneth Hoste +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/applications/utilities/mesh/manipulation/setSet/Allwmake OpenFOAM-3.0.x-version-3.0.1/applications/utilities/mesh/manipulation/setSet/Allwmake +--- OpenFOAM-3.0.x-version-3.0.1.orig/applications/utilities/mesh/manipulation/setSet/Allwmake 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/applications/utilities/mesh/manipulation/setSet/Allwmake 2016-10-25 11:51:45.000000000 +0200 +@@ -6,11 +6,11 @@ + # + # use readline if available + # +-if [ -f /usr/include/readline/readline.h ] ++if [ -f $EBROOTLIBREADLINE/include/readline/readline.h ] + then + echo "Found -- enabling readline support." + export COMP_FLAGS="-DHAS_READLINE" +- export LINK_FLAGS="-lreadline" ++ export LINK_FLAGS="-L$EBROOTLIBREADLINE/lib -lreadline -L$EBROOTNCURSES -lncurses" + fi + + wmake +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake OpenFOAM-3.0.x-version-3.0.1/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake +--- OpenFOAM-3.0.x-version-3.0.1.orig/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake 2016-10-25 12:00:41.000000000 +0200 +@@ -12,7 +12,7 @@ + } + + # ensure CMake gets the correct C++ compiler +- [ -n "$WM_CXX" ] && export CXX="$WM_CXX" ++# [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + + wmake libso vtkPV3Readers + PV3blockMeshReader/Allwmake +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake OpenFOAM-3.0.x-version-3.0.1/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake +--- OpenFOAM-3.0.x-version-3.0.1.orig/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake 2016-10-25 12:00:41.000000000 +0200 +@@ -12,7 +12,7 @@ + } + + # ensure CMake gets the correct C++ compiler +- [ -n "$WM_CXX" ] && export CXX="$WM_CXX" ++# [ -n "$WM_CXX" ] && export CXX="$WM_CXX" + + wmake libso vtkPV4Readers + PV4blockMeshReader/Allwmake +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/CGAL.sh OpenFOAM-3.0.x-version-3.0.1/etc/config/CGAL.sh +--- OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/CGAL.sh 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/etc/config/CGAL.sh 2016-10-25 12:04:22.000000000 +0200 +@@ -29,29 +29,5 @@ + # Sourced from OpenFOAM-/etc/bashrc + #------------------------------------------------------------------------------ + +-boost_version=boost-system +-cgal_version=CGAL-4.7 +- +-export BOOST_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$boost_version +-export CGAL_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cgal_version +- +-if [ "$FOAM_VERBOSE" -a "$PS1" ] +-then +- echo "Using CGAL and boost" 1>&2 +- echo " $cgal_version at $CGAL_ARCH_PATH" 1>&2 +- echo " $boost_version at $BOOST_ARCH_PATH" 1>&2 +-fi +- +-if [ -d "$CGAL_ARCH_PATH" ] +-then +- _foamAddLib $CGAL_ARCH_PATH/lib +-fi +- +-if [ -d "$BOOST_ARCH_PATH" ] +-then +- _foamAddLib $BOOST_ARCH_PATH/lib +-fi +- +-unset boost_version cgal_version +- +-# ----------------------------------------------------------------------------- ++export CGAL_ARCH_PATH=$EBROOTCGAL ++export BOOST_ARCH_PATH=$EBROOTBOOST +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/gperftools.sh OpenFOAM-3.0.x-version-3.0.1/etc/config/gperftools.sh +--- OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/gperftools.sh 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/etc/config/gperftools.sh 2016-10-25 12:05:33.000000000 +0200 +@@ -29,13 +29,7 @@ + # + #------------------------------------------------------------------------------ + +-version=svn +-gperftools_install=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER +- +-GPERFTOOLS_VERSION=gperftools-$version +-GPERFTOOLS_ARCH_PATH=$gperftools_install/$GPERFTOOLS_VERSION +- +-export PATH=$GPERFTOOLS_ARCH_PATH/bin:$PATH +-export LD_LIBRARY_PATH=$GPERFTOOLS_ARCH_PATH/lib:$LD_LIBRARY_PATH ++PERFTOOLS_VERSION=gperftools-$EBVERSIONGPERFTOOLS ++GPERFTOOLS_ARCH_PATH=$EBROOTGPERFTOOLS + + # ----------------------------------------------------------------------------- +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/metis.sh OpenFOAM-3.0.x-version-3.0.1/etc/config/metis.sh +--- OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/metis.sh 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/etc/config/metis.sh 2016-10-25 12:06:03.000000000 +0200 +@@ -33,7 +33,7 @@ + # during the wmake process + #------------------------------------------------------------------------------ + +-export METIS_VERSION=metis-5.1.0 +-export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$METIS_VERSION ++export METIS_VERSION=metis-$EBVERSIONMETIS ++export METIS_ARCH_PATH=$EBROOTMETIS + + # ----------------------------------------------------------------------------- +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/paraview.sh OpenFOAM-3.0.x-version-3.0.1/etc/config/paraview.sh +--- OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/paraview.sh 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/etc/config/paraview.sh 2016-10-25 12:09:26.000000000 +0200 +@@ -36,29 +36,16 @@ + # clean the PATH + cleaned=`$WM_PROJECT_DIR/bin/foamCleanPath "$PATH" "$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/cmake- $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/paraview-"` && PATH="$cleaned" + +-# determine the cmake to be used +-unset CMAKE_HOME +-for cmake in cmake-3.2.1 cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 cmake-2.8.1 +-do +- cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake +- if [ -r $cmake ] +- then +- export CMAKE_HOME=$cmake +- export PATH=$CMAKE_HOME/bin:$PATH +- break +- fi +-done +- + + #- ParaView version, automatically determine major version + #export ParaView_VERSION=3.12.0 + #export ParaView_VERSION=4.0.1 + #export ParaView_VERSION=4.1.0 + #export ParaView_VERSION=4.3.1 +-export ParaView_VERSION=4.4.0 ++#export ParaView_VERSION=4.4.0 ++export ParaView_VERSION=$EBVERSIONPARAVIEW + export ParaView_MAJOR=detect + +- + # Evaluate command-line parameters for ParaView + _foamParaviewEval() + { +@@ -95,16 +82,12 @@ + paraviewInstDir=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION + paraviewArchName=ParaView-$ParaView_VERSION + +-export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$paraviewArchName ++export ParaView_DIR=$EBROOTPARAVIEW + + # set paths if binaries or source are present + if [ -r $ParaView_DIR -o -r $paraviewInstDir ] + then + export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-$ParaView_MAJOR +- if [ ! -d $ParaView_INCLUDE_DIR -a -d $ParaView_DIR/include/paraview ] +- then +- export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview +- fi + + ParaView_LIB_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR + if [ ! -d $ParaView_LIB_DIR -a -d $ParaView_DIR/lib/paraview ] +@@ -112,8 +95,6 @@ + ParaView_LIB_DIR=$ParaView_DIR/lib/paraview + fi + +- export PATH=$ParaView_DIR/bin:$PATH +- export LD_LIBRARY_PATH=$ParaView_LIB_DIR:$LD_LIBRARY_PATH + export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR + + if [ "$FOAM_VERBOSE" -a "$PS1" ] +@@ -125,17 +106,6 @@ + echo " PV_PLUGIN_PATH : $PV_PLUGIN_PATH" + fi + +- # add in python libraries if required +- paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping +- if [ -r $paraviewPython ] +- then +- if [ "$PYTHONPATH" ] +- then +- export PYTHONPATH=$PYTHONPATH:$paraviewPython:$ParaView_LIB_DIR +- else +- export PYTHONPATH=$paraviewPython:$ParaView_LIB_DIR +- fi +- fi + else + unset PV_PLUGIN_PATH + fi +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/scotch.sh OpenFOAM-3.0.x-version-3.0.1/etc/config/scotch.sh +--- OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/scotch.sh 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/etc/config/scotch.sh 2016-10-25 12:12:06.000000000 +0200 +@@ -33,7 +33,7 @@ + # during the wmake process + #------------------------------------------------------------------------------ + +-export SCOTCH_VERSION=scotch_6.0.3 +-export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_LABEL_OPTION/$SCOTCH_VERSION ++export SCOTCH_VERSION=scotch_$EBVERSIONSCOTCH ++export SCOTCH_ARCH_PATH=$EBROOTSCOTCH + + # ----------------------------------------------------------------------------- +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/settings.sh OpenFOAM-3.0.x-version-3.0.1/etc/config/settings.sh +--- OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/settings.sh 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/etc/config/settings.sh 2016-10-25 12:13:20.000000000 +0200 +@@ -87,11 +87,11 @@ + 64) + WM_ARCH=linux64 + export WM_COMPILER_LIB_ARCH=64 +- export WM_CC='gcc' +- export WM_CXX='g++' +- export WM_CFLAGS='-m64 -fPIC' +- export WM_CXXFLAGS='-m64 -fPIC' +- export WM_LDFLAGS='-m64' ++ export WM_CC=$CC ++ export WM_CXX=$CXX ++ export WM_CFLAGS=$CFLAGS ++ export WM_CXXFLAGS=$CXXFLAGS ++ export WM_LDFLAGS=$LDFLAGS + ;; + *) + echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"\ +@@ -598,6 +598,9 @@ + _foamAddPath $MPI_ARCH_PATH/bin64 + _foamAddLib $MPI_ARCH_PATH/lib64 + ;; ++EASYBUILDMPI) ++ export FOAM_MPI=mpi ++ ;; + *) + export FOAM_MPI=dummy + ;; +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/src/parallel/decompose/ptscotchDecomp/Make/options OpenFOAM-3.0.x-version-3.0.1/src/parallel/decompose/ptscotchDecomp/Make/options +--- OpenFOAM-3.0.x-version-3.0.1.orig/src/parallel/decompose/ptscotchDecomp/Make/options 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/src/parallel/decompose/ptscotchDecomp/Make/options 2016-10-25 12:13:37.000000000 +0200 +@@ -3,10 +3,8 @@ + + EXE_INC = \ + $(PFLAGS) $(PINC) \ +- -I$(SCOTCH_ROOT)/include \ + -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \ +- -I/usr/include/scotch \ + -I../decompositionMethods/lnInclude + + LIB_LIBS = \ +- -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt ++ -L$(SCOTCH_ARCH_PATH)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C OpenFOAM-3.0.x-version-3.0.1/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +--- OpenFOAM-3.0.x-version-3.0.1.orig/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C 2016-10-25 12:13:37.000000000 +0200 +@@ -119,10 +119,11 @@ + #include "globalIndex.H" + #include "SubField.H" + ++#include ++ + extern "C" + { + #include +- #include + #include "ptscotch.h" + } + +diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/src/parallel/decompose/scotchDecomp/Make/options OpenFOAM-3.0.x-version-3.0.1/src/parallel/decompose/scotchDecomp/Make/options +--- OpenFOAM-3.0.x-version-3.0.1.orig/src/parallel/decompose/scotchDecomp/Make/options 2015-12-15 12:20:08.000000000 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/src/parallel/decompose/scotchDecomp/Make/options 2016-10-25 12:13:37.000000000 +0200 +@@ -7,10 +7,8 @@ + + EXE_INC = \ + $(PFLAGS) $(PINC) \ +- -I$(SCOTCH_ROOT)/include \ + -I$(SCOTCH_ARCH_PATH)/include \ +- -I/usr/include/scotch \ + -I../decompositionMethods/lnInclude + + LIB_LIBS = \ +- -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt ++ -L$(SCOTCH_ARCH_PATH)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt -- GitLab From 0f98864cd461e2d8e5df95458ac2db8f9f18c227 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 25 Oct 2016 12:56:15 +0200 Subject: [PATCH 494/741] use $CC,$CXX rather than $I_MPI_CC,$I_MPI_CXX in patch for OpenFOAM 4.0 --- easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch index 1afeb16c3a..6ad12341f4 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-4.0-cleanup.patch @@ -235,8 +235,8 @@ diff -ur OpenFOAM-4.0.orig/etc/config.sh/settings OpenFOAM-4.0/etc/config.sh/set - export WM_CFLAGS='-m64 -fPIC' - export WM_CXXFLAGS='-m64 -fPIC -std=c++0x' - export WM_LDFLAGS='-m64' -+ export WM_CC=$I_MPI_CC -+ export WM_CXX=$I_MPI_CXX ++ export WM_CC=$CC ++ export WM_CXX=$CXX + export WM_CFLAGS=$CFLAGS + export WM_CXXFLAGS=$CXXFLAGS + export WM_LDFLAGS=$LDFLAGS -- GitLab From 752ba0b494c9e512d6a208bf064f3f07350a6d7d Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 14:52:30 +0200 Subject: [PATCH 495/741] FLTK 1.3.3 patch for Octave (and maybe others) --- .../f/FLTK/FLTK-1.3.3-foss-2016a.eb | 2 + .../f/FLTK/FLTK-1.3.3-foss-2016b.eb | 2 + .../f/FLTK/FLTK-1.3.3-intel-2016a.eb | 2 + .../f/FLTK/FLTK-1.3.3-intel-2016b.eb | 2 + .../FLTK/FLTK-1.3.3_undefined_reference.patch | 46 +++++++++++++++++++ 5 files changed, 54 insertions(+) create mode 100644 easybuild/easyconfigs/f/FLTK/FLTK-1.3.3_undefined_reference.patch diff --git a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016a.eb b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016a.eb index 0056b11391..228b99e49e 100644 --- a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016a.eb +++ b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016a.eb @@ -17,6 +17,8 @@ toolchainopts = {'optarch': True, 'pic': True} sources = ['%(namelower)s-%(version)s-source.tar.gz'] source_urls = ['http://fltk.org/pub/%(namelower)s/%(version)s/'] +patches = ['%(name)s-%(version)s_undefined_reference.patch'] + configopts = '--enable-shared --enable-threads --enable-xft' dependencies = [ diff --git a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016b.eb b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016b.eb index 7c571b0ec9..4c82344219 100644 --- a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016b.eb +++ b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-foss-2016b.eb @@ -17,6 +17,8 @@ toolchainopts = {'optarch': True, 'pic': True} sources = ['%(namelower)s-%(version)s-source.tar.gz'] source_urls = ['http://fltk.org/pub/%(namelower)s/%(version)s/'] +patches = ['%(name)s-%(version)s_undefined_reference.patch'] + configopts = '--enable-shared --enable-threads --enable-xft' dependencies = [ diff --git a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016a.eb b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016a.eb index d88b64d96a..efbb3a2282 100644 --- a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016a.eb +++ b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016a.eb @@ -17,6 +17,8 @@ toolchainopts = {'optarch': True, 'pic': True} sources = ['%(namelower)s-%(version)s-source.tar.gz'] source_urls = ['http://fltk.org/pub/%(namelower)s/%(version)s/'] +patches = ['%(name)s-%(version)s_undefined_reference.patch'] + configopts = '--enable-shared --enable-threads --enable-xft' dependencies = [ diff --git a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016b.eb b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016b.eb index 0fe5be2665..7a909b4015 100644 --- a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016b.eb +++ b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3-intel-2016b.eb @@ -17,6 +17,8 @@ toolchainopts = {'optarch': True, 'pic': True} sources = ['%(namelower)s-%(version)s-source.tar.gz'] source_urls = ['http://fltk.org/pub/%(namelower)s/%(version)s/'] +patches = ['%(name)s-%(version)s_undefined_reference.patch'] + configopts = '--enable-shared --enable-threads --enable-xft' dependencies = [ diff --git a/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3_undefined_reference.patch b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3_undefined_reference.patch new file mode 100644 index 0000000000..5ddc1900ed --- /dev/null +++ b/easybuild/easyconfigs/f/FLTK/FLTK-1.3.3_undefined_reference.patch @@ -0,0 +1,46 @@ +#see https://groups.google.com/forum/#!topic/fltkgeneral/GT6i2KGCb3A +#and http://www.fltk.org/str.php?L3156 +# GNU Octave compains: +# error: octave-4.0.3/libinterp/dldfcn/PKG_ADD: octave-4.0.3/libinterp/dldfcn/__init_fltk__.oct: failed to load: FLTK/1.3.3-intel-2016b/lib/libfltk_gl.so.1.3: undefined symbol: _ZN18Fl_XFont_On_Demand5valueEv +Index: src/fl_font.cxx +=================================================================== +--- fltk-1.3.3/src/fl_font.cxx (revision 10503) ++++ fltk-1.3.3/src/fl_font.cxx (revision 10504) +@@ -55,6 +55,12 @@ + # include "fl_font_x.cxx" + #endif // WIN32 + ++#if ! (defined(WIN32) || defined(__APPLE__)) ++XFontStruct *fl_X_core_font() ++{ ++ return fl_xfont.value(); ++} ++#endif + + double fl_width(const char* c) { + if (c) return fl_width(c, (int) strlen(c)); +Index: src/gl_draw.cxx +=================================================================== +--- fltk-1.3.3/src/gl_draw.cxx (revision 10503) ++++ fltk-1.3.3/src/gl_draw.cxx (revision 10504) +@@ -81,7 +81,7 @@ + * then sorting through them at draw time (for normal X rendering) to find which one can + * render the current glyph... But for now, just use the first font in the list for GL... + */ +- XFontStruct *font = fl_xfont; ++ XFontStruct *font = fl_X_core_font(); + int base = font->min_char_or_byte2; + int count = font->max_char_or_byte2-base+1; + fl_fontsize->listbase = glGenLists(256); +Index: FL/x.H +=================================================================== +--- fltk-1.3.3/FL/x.H (revision 10503) ++++ fltk-1.3.3/FL/x.H (revision 10504) +@@ -132,6 +132,7 @@ + XFontStruct *ptr; + }; + extern FL_EXPORT Fl_XFont_On_Demand fl_xfont; ++extern FL_EXPORT XFontStruct* fl_X_core_font(); + + // this object contains all X-specific stuff about a window: + // Warning: this object is highly subject to change! -- GitLab From 3a57d1e3cfe25078ef59624cdb11842d29b3bd9c Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:04:39 +0200 Subject: [PATCH 496/741] {lang}[dummy] Java 1.8.0_112 (REVIEW) --- easybuild/easyconfigs/j/Java/Java-1.8.0_112.eb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 easybuild/easyconfigs/j/Java/Java-1.8.0_112.eb diff --git a/easybuild/easyconfigs/j/Java/Java-1.8.0_112.eb b/easybuild/easyconfigs/j/Java/Java-1.8.0_112.eb new file mode 100644 index 0000000000..6b87f36815 --- /dev/null +++ b/easybuild/easyconfigs/j/Java/Java-1.8.0_112.eb @@ -0,0 +1,15 @@ +name = 'Java' +version = '1.8.0_112' + +homepage = 'http://java.com/' +description = """Java Platform, Standard Edition (Java SE) lets you develop and deploy + Java applications on desktops and servers.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +# download the tar.gz directly from http://www.oracle.com/technetwork/java/javase/downloads/index.html +(vp, vs) = version.split('_') +altver = '%su%s' % (vp.split('.')[1], vs) +sources = ['jdk-%s-linux-x64.tar.gz' % altver] + +moduleclass = 'lang' -- GitLab From 0983b48f3d1bff8a4b6d68f7bc21905f57729de3 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:08:30 +0200 Subject: [PATCH 497/741] {vis}[intel/2016b] GraphicsMagick 1.3.25 (REVIEW) --- .../GraphicsMagick-1.3.25-intel-2016b.eb | 39 +++++++++++++++++++ .../GraphicsMagick-1.3.25_intel.patch | 13 +++++++ 2 files changed, 52 insertions(+) create mode 100644 easybuild/easyconfigs/g/GraphicsMagick/GraphicsMagick-1.3.25-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/GraphicsMagick/GraphicsMagick-1.3.25_intel.patch diff --git a/easybuild/easyconfigs/g/GraphicsMagick/GraphicsMagick-1.3.25-intel-2016b.eb b/easybuild/easyconfigs/g/GraphicsMagick/GraphicsMagick-1.3.25-intel-2016b.eb new file mode 100644 index 0000000000..20888d4d87 --- /dev/null +++ b/easybuild/easyconfigs/g/GraphicsMagick/GraphicsMagick-1.3.25-intel-2016b.eb @@ -0,0 +1,39 @@ +easyblock = 'ConfigureMake' + +name = 'GraphicsMagick' +version = '1.3.25' + +homepage = 'http://www.graphicsmagick.org/' +description = """GraphicsMagick is the swiss army knife of image processing.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [ + SOURCEFORGE_SOURCE, + 'ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/%(version_major_minor)s/', +] +sources = [SOURCE_TAR_GZ] + +patches = ['%(name)s-%(version)s_intel.patch'] + +builddependencies = [ + ('libtool', '2.4.6'), +] + +dependencies = [ + ('X11', '20160819'), + ('bzip2', '1.0.6'), + ('freetype', '2.6.5'), + ('libpng', '1.6.24'), + ('libjpeg-turbo', '1.5.0'), + ('LibTIFF', '4.0.6'), + ('libxml2', '2.9.4'), + ('XZ', '5.2.2'), + ('zlib', '1.2.8'), + ('Ghostscript', '9.19'), +] + +modextrapaths = {'CPATH': ['include/GraphicsMagick']} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/GraphicsMagick/GraphicsMagick-1.3.25_intel.patch b/easybuild/easyconfigs/g/GraphicsMagick/GraphicsMagick-1.3.25_intel.patch new file mode 100644 index 0000000000..1b8082e74b --- /dev/null +++ b/easybuild/easyconfigs/g/GraphicsMagick/GraphicsMagick-1.3.25_intel.patch @@ -0,0 +1,13 @@ +#Intel compiler does not understand __has_attribute(attribute +# Oct 24th 2016 by B. Hajgato (Free University Brussels - VUB) +--- GraphicsMagick-1.3.25/magick/common.h.orig 2016-09-05 21:20:24.000000000 +0200 ++++ GraphicsMagick-1.3.25/magick/common.h 2016-10-24 15:03:21.858939448 +0200 +@@ -128,7 +128,7 @@ + # define MAGICK_ATTRIBUTE(x) /*nothing*/ + # else + # define MAGICK_ATTRIBUTE(x) __attribute__(x) +-# if (defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 5)) ++# if (defined(__clang__) || ((defined(__GNUC__) && __GNUC__ >= 5) && !__INTEL_COMPILER)) + # define MAGICK_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) + # else + # define MAGICK_HAS_ATTRIBUTE(attribute) (0) -- GitLab From 654c105aaadc8be8027bf2538465b5a7410ed363 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:11:00 +0200 Subject: [PATCH 498/741] {numlib}[intel/2016b] arpack-ng 3.4.0 (REVIEW) --- .../arpack-ng/arpack-ng-3.4.0-intel-2016b.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/a/arpack-ng/arpack-ng-3.4.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/a/arpack-ng/arpack-ng-3.4.0-intel-2016b.eb b/easybuild/easyconfigs/a/arpack-ng/arpack-ng-3.4.0-intel-2016b.eb new file mode 100644 index 0000000000..feba2c7b4c --- /dev/null +++ b/easybuild/easyconfigs/a/arpack-ng/arpack-ng-3.4.0-intel-2016b.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'arpack-ng' +version = '3.4.0' + +homepage = 'http://forge.scilab.org/index.php/p/arpack-ng/' +description = """ARPACK is a collection of Fortran77 subroutines designed to solve large scale eigenvalue problems.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'opt': True, 'pic': True, 'usempi': True} + +source_urls = ['https://github.com/opencollab/arpack-ng/archive/'] +sources = ['%(version)s.tar.gz'] + +builddependencies = [('Autotools', '20150215')] + +preconfigopts = "sh bootstrap && " +configopts = '--with-pic --with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK"' + +sanity_check_paths = { + 'files': ["lib/libarpack.a", "lib/libarpack.so"], + 'dirs': [] +} + +moduleclass = 'numlib' -- GitLab From 617518b340c5069db15e7f676b2ae127541b8e73 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:13:28 +0200 Subject: [PATCH 499/741] {tools}[intel/2016b] GLPK 4.60 (REVIEW) --- .../g/GLPK/GLPK-4.60-intel-2016b.eb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/g/GLPK/GLPK-4.60-intel-2016b.eb diff --git a/easybuild/easyconfigs/g/GLPK/GLPK-4.60-intel-2016b.eb b/easybuild/easyconfigs/g/GLPK/GLPK-4.60-intel-2016b.eb new file mode 100644 index 0000000000..66b0f5b8f2 --- /dev/null +++ b/easybuild/easyconfigs/g/GLPK/GLPK-4.60-intel-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'ConfigureMake' + +name = 'GLPK' +version = '4.60' + +homepage = 'https://www.gnu.org/software/glpk/' +description = """The GLPK (GNU Linear Programming Kit) package is intended for + solving large-scale linear programming (LP), + mixed integer programming (MIP), and other related problems. + It is a set of routines written in ANSI C + and organized in the form of a callable library.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://ftp.gnu.org/gnu/%(namelower)s/'] + +dependencies = [('GMP', '6.1.1')] + +configopts = "--with-gmp" + +sanity_check_paths = { + 'files': ['bin/glpsol', 'include/glpk.h'] + + ['lib/libglpk.%s' % x for x in [SHLIB_EXT, 'a']], + 'dirs': [], +} + +moduleclass = 'tools' -- GitLab From 78a08ebde6c6dead3fe1c7da2fbe4c0412da5930 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:15:24 +0200 Subject: [PATCH 500/741] {numlib}[intel/2016b] SuiteSparse 4.5.3 w/ METIS 5.1.0 (REVIEW) --- ...iteSparse-4.5.3-intel-2016b-METIS-5.1.0.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.3-intel-2016b-METIS-5.1.0.eb diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.3-intel-2016b-METIS-5.1.0.eb b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.3-intel-2016b-METIS-5.1.0.eb new file mode 100644 index 0000000000..5235dd9545 --- /dev/null +++ b/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-4.5.3-intel-2016b-METIS-5.1.0.eb @@ -0,0 +1,20 @@ +name = 'SuiteSparse' +version = '4.5.3' + +homepage = 'http://faculty.cse.tamu.edu/davis/suitesparse.html' +description = """SuiteSparse is a collection of libraries manipulate sparse matrices.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'opt': True, 'unroll': True, 'pic': True} + +source_urls = ['http://faculty.cse.tamu.edu/davis/SuiteSparse/'] +sources = [SOURCE_TAR_GZ] + +metis = 'METIS' +metis_ver = '5.1.0' +versionsuffix = '-%s-%s' % (metis, metis_ver) +dependencies = [(metis, metis_ver)] + +maxparallel = 1 + +moduleclass = 'numlib' -- GitLab From fc6e26373f9d72aa1f3a6e9a48e6678926d969e7 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:17:18 +0200 Subject: [PATCH 501/741] {data}[intel/2016b] HDF5 1.8.17 serial (REVIEW) --- .../h/HDF5/HDF5-1.8.17-intel-2016b-serial.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/h/HDF5/HDF5-1.8.17-intel-2016b-serial.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.17-intel-2016b-serial.eb b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.17-intel-2016b-serial.eb new file mode 100644 index 0000000000..ded2abcfa1 --- /dev/null +++ b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.17-intel-2016b-serial.eb @@ -0,0 +1,27 @@ +name = 'HDF5' +version = '1.8.17' +versionsuffix = '-serial' + +homepage = 'http://www.hdfgroup.org/HDF5/' +description = """HDF5 is a unique technology suite that makes possible the management of + extremely large and complex data collections.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True, 'usempi': False} + +source_urls = ['http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +patches = [ + 'HDF5-1.8.15_configure_intel.patch', + 'configure_libtool.patch', +] + +buildopts = 'CXXFLAGS="$CXXFLAGS -DMPICH_IGNORE_CXX_SEEK"' + +dependencies = [ + ('zlib', '1.2.8'), + ('Szip', '2.1'), +] + +moduleclass = 'data' -- GitLab From fbd5b5aa1b1a340dcf128b54d579c5bfb6fa2bd4 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:18:53 +0200 Subject: [PATCH 502/741] {vis}[intel/2016b] gnuplot 5.0.5 (REVIEW) --- .../g/gnuplot/gnuplot-5.0.5-intel-2016b.eb | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 easybuild/easyconfigs/g/gnuplot/gnuplot-5.0.5-intel-2016b.eb diff --git a/easybuild/easyconfigs/g/gnuplot/gnuplot-5.0.5-intel-2016b.eb b/easybuild/easyconfigs/g/gnuplot/gnuplot-5.0.5-intel-2016b.eb new file mode 100644 index 0000000000..1181859b40 --- /dev/null +++ b/easybuild/easyconfigs/g/gnuplot/gnuplot-5.0.5-intel-2016b.eb @@ -0,0 +1,42 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 University of Luxembourg/Luxembourg Centre for Systems Biomedicine +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-97.html +## +easyblock = 'ConfigureMake' + +name = 'gnuplot' +version = '5.0.5' + +homepage = 'http://gnuplot.sourceforge.net/' +description = """Portable interactive, function plotting utility""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCE_TAR_GZ] +source_urls = [('http://sourceforge.net/projects/gnuplot/files', 'download')] + +dependencies = [ + ('cairo', '1.14.6'), + ('libjpeg-turbo', '1.5.0'), + ('libpng', '1.6.24'), + ('libgd', '2.2.3'), + ('Pango', '1.40.3'), + ('libcerf', '1.5'), + ('Qt', '4.8.7'), +] + +configopts = '--with-qt=qt4 ' + +sanity_check_paths = { + 'files': ['bin/gnuplot'], + 'dirs': [] +} + +moduleclass = 'vis' -- GitLab From cc6c6a09c577d0c0eb85027e2030f6c074ec24d6 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:20:26 +0200 Subject: [PATCH 503/741] {devel}[intel/2016b] gperf 3.0.4 (REVIEW) --- .../g/gperf/gperf-3.0.4-intel-2016b.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/g/gperf/gperf-3.0.4-intel-2016b.eb diff --git a/easybuild/easyconfigs/g/gperf/gperf-3.0.4-intel-2016b.eb b/easybuild/easyconfigs/g/gperf/gperf-3.0.4-intel-2016b.eb new file mode 100644 index 0000000000..4ada07243f --- /dev/null +++ b/easybuild/easyconfigs/g/gperf/gperf-3.0.4-intel-2016b.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'gperf' +version = '3.0.4' + +homepage = 'http://www.gnu.org/software/gperf/' +description = """GNU gperf is a perfect hash function generator. For a given list of strings, it produces a hash + function and hash table, in form of C or C++ code, for looking up a value depending on the input string. The hash + function is perfect, which means that the hash table has no collisions, and the hash table lookup needs a single + string comparison only.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +sanity_check_paths = { + 'files': ['bin/gperf'], + 'dirs': [] +} + +moduleclass = 'devel' -- GitLab From 2b9d0a6d127747e47e86f82a72a0556db6c53541 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:21:53 +0200 Subject: [PATCH 504/741] {math}[intel/2016b] libcerf 1.5 (REVIEW) --- .../l/libcerf/libcerf-1.5-intel-2016b.eb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/l/libcerf/libcerf-1.5-intel-2016b.eb diff --git a/easybuild/easyconfigs/l/libcerf/libcerf-1.5-intel-2016b.eb b/easybuild/easyconfigs/l/libcerf/libcerf-1.5-intel-2016b.eb new file mode 100644 index 0000000000..0cce9f8c98 --- /dev/null +++ b/easybuild/easyconfigs/l/libcerf/libcerf-1.5-intel-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'ConfigureMake' + +name = 'libcerf' +version = '1.5' + +homepage = 'http://gnuplot.sourceforge.net/' +description = """libcerf is a self-contained numeric library that provides an efficient and accurate + implementation of complex error functions, along with Dawson, Faddeeva, and Voigt functions.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCE_TGZ] +source_urls = [ + 'http://apps.jcns.fz-juelich.de/src/libcerf/', + 'http://apps.jcns.fz-juelich.de/src/libcerf/old', +] + +builddependencies = [ + ('Autotools', '20150215'), + ('libtool', '2.4.6'), +] + +sanity_check_paths = { + 'files': ['lib/libcerf.%s' % SHLIB_EXT], + 'dirs': [] +} + +moduleclass = 'math' -- GitLab From 2b765033a3f39c6c5ffe526f02fe86a9d8a468af Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:24:16 +0200 Subject: [PATCH 505/741] {lib}[intel/2016b] libgd 2.2.3 (REVIEW) --- .../l/libgd/libgd-2.2.3-intel-2016b.eb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 easybuild/easyconfigs/l/libgd/libgd-2.2.3-intel-2016b.eb diff --git a/easybuild/easyconfigs/l/libgd/libgd-2.2.3-intel-2016b.eb b/easybuild/easyconfigs/l/libgd/libgd-2.2.3-intel-2016b.eb new file mode 100644 index 0000000000..3a99421ffa --- /dev/null +++ b/easybuild/easyconfigs/l/libgd/libgd-2.2.3-intel-2016b.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'libgd' +version = '2.2.3' + +homepage = 'http://libgd.bitbucket.org/' +description = "GD is an open source code library for the dynamic creation of images by programmers." + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/libgd/libgd/releases/download/gd-%(version)s/'] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('fontconfig', '2.12.1'), + ('libjpeg-turbo', '1.5.0'), + ('libpng', '1.6.24'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ["lib/libgd.a", "lib/libgd.%s" % SHLIB_EXT], + 'dirs': ["bin", "include"], +} + +moduleclass = 'lib' -- GitLab From b13f9770952581934f4ea1c2b514a24600554acf Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:27:34 +0200 Subject: [PATCH 506/741] {numlib}[intel/2016b] qrupdate 1.1.2 (REVIEW) --- .../q/qrupdate/qrupdate-1.1.2-intel-2016b.eb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/q/qrupdate/qrupdate-1.1.2-intel-2016b.eb diff --git a/easybuild/easyconfigs/q/qrupdate/qrupdate-1.1.2-intel-2016b.eb b/easybuild/easyconfigs/q/qrupdate/qrupdate-1.1.2-intel-2016b.eb new file mode 100644 index 0000000000..4c96735e49 --- /dev/null +++ b/easybuild/easyconfigs/q/qrupdate/qrupdate-1.1.2-intel-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'MakeCp' + +name = 'qrupdate' +version = '1.1.2' + +homepage = 'https://sourceforge.net/projects/qrupdate/' +description = """qrupdate is a Fortran library for fast updates of QR and Cholesky decompositions.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = [SOURCE_TAR_GZ] +source_urls = [SOURCEFORGE_SOURCE] + +patches = ['%(name)s-%(version)s_makeconf.patch'] + +buildopts = 'lib' + +files_to_copy = [(['libqrupdate.a'], 'lib')] + +sanity_check_paths = { + 'files': ['lib/libqrupdate.a'], + 'dirs': [], +} + +parallel = 1 + +moduleclass = 'numlib' -- GitLab From 9a96eef5acf5432b5085447ba6d5e6384d1fb237 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Tue, 25 Oct 2016 15:29:32 +0200 Subject: [PATCH 507/741] {math}[intel/2016b] Octave 4.0.3 (REVIEW) --- .../o/Octave/Octave-4.0.3-intel-2016b.eb | 59 +++++++++++++++++++ .../o/Octave/Octave-4.0.3_intel.patch | 35 +++++++++++ 2 files changed, 94 insertions(+) create mode 100644 easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb create mode 100644 easybuild/easyconfigs/o/Octave/Octave-4.0.3_intel.patch diff --git a/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb b/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb new file mode 100644 index 0000000000..804ee42715 --- /dev/null +++ b/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb @@ -0,0 +1,59 @@ +easyblock = 'ConfigureMake' + +name = 'Octave' +version = '4.0.3' + +homepage = 'http://www.gnu.org/software/octave/' +description = """GNU Octave is a high-level interpreted language, primarily intended for numerical computations.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [GNU_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['%(name)s-%(version)s_intel.patch'] + +builddependencies = [ + ('Bison', '3.0.4'), + ('flex', '2.6.0'), + ('Autotools', '20150215'), + ('libtool', '2.4.6'), + ('gperf', '3.0.4'), +] + +dependencies = [ + ('X11', '20160819'), + ('PCRE', '8.39'), + ('ncurses', '6.0'), + ('libreadline', '6.3'), + ('arpack-ng', '3.4.0'), + ('cURL', '7.49.1'), + ('FLTK', '1.3.3'), + ('fontconfig', '2.12.1'), + ('freetype', '2.6.5'), + ('GLPK', '4.60'), + ('GL2PS', '1.3.9'), + ('gnuplot', '5.0.5'), + ('Java', '1.8.0_112', '', True), + ('zlib', '1.2.8'), + ('Mesa', '12.0.2'), + ('libGLU', '9.0.0'), + ('Qhull', '2015.2'), + ('Qt', '4.8.7'), + ('HDF5', '1.8.17', '-serial'), + ('qrupdate', '1.1.2'), + ('SuiteSparse', '4.5.3', '-METIS-5.1.0'), + ('GraphicsMagick', '1.3.25'), + ('FFTW', '3.3.5'), +] + +configopts = '--with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" --disable-docs ' + +sanity_check_paths = { + 'files': ['bin/octave'], + 'dirs': [] +} + +sanity_check_commands = [('octave', '--eval "1+2"')] + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/o/Octave/Octave-4.0.3_intel.patch b/easybuild/easyconfigs/o/Octave/Octave-4.0.3_intel.patch new file mode 100644 index 0000000000..71297e00cf --- /dev/null +++ b/easybuild/easyconfigs/o/Octave/Octave-4.0.3_intel.patch @@ -0,0 +1,35 @@ +Intel compiler does not understand __builtin_*_overflow +# Oct 25th 2016 by B. Hajgato (Free University Brussels - VUB) +--- octave-4.0.3/libgnu/xalloc-oversized.h.orig 2016-07-01 20:43:46.000000000 +0200 ++++ octave-4.0.3/libgnu/xalloc-oversized.h 2016-10-24 16:05:11.093643937 +0200 +@@ -36,7 +36,7 @@ + sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for + exactly-SIZE_MAX allocations on such hosts; this avoids a test and + branch when S is known to be 1. */ +-#if 5 <= __GNUC__ || __has_builtin (__builtin_mul_overflow) ++#if ((5 <= __GNUC__ || __has_builtin (__builtin_mul_overflow)) && !__INTEL_COMPILER) + # define xalloc_oversized(n, s) \ + ({ size_t __xalloc_size; __builtin_mul_overflow (n, s, &__xalloc_size); }) + #else +--- octave-4.0.3/libgnu/glob.c.orig 2016-10-24 16:11:56.437441986 +0200 ++++ octave-4.0.3/libgnu/glob.c 2016-10-24 16:12:21.127612656 +0200 +@@ -257,7 +257,7 @@ + static bool + size_add_wrapv (size_t a, size_t b, size_t *r) + { +-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) ++#if ((5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)) && !__INTEL_COMPILER) + return __builtin_add_overflow (a, b, r); + #else + *r = a + b; +--- octave-4.0.3/libgnu/intprops.h.orig 2016-07-01 20:43:43.000000000 +0200 ++++ octave-4.0.3/libgnu/intprops.h 2016-10-24 16:23:43.652325264 +0200 +@@ -353,7 +353,7 @@ + /* Store A B into *R, where OP specifies the operation. + BUILTIN is the builtin operation, and OVERFLOW the overflow predicate. + See above for restrictions. */ +-#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) ++#if ((5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)) && !__INTEL_COMPILER) + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r) + #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS + # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ -- GitLab From 007e3efccda1f85195c00a3d70a5edba2ed5d288 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 26 Oct 2016 15:55:15 +0200 Subject: [PATCH 508/741] add easyconfig scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb, add easyconfig Qhull-2015.2-intel-2016b.eb, add easyconfig matplotlib-1.5.3-intel-2016b-Python-2.7.12.eb, add easyconfig libpng-1.6.26-intel-2016b.eb, add easyconfig freetype-2.7-intel-2016b.eb --- .../f/freetype/freetype-2.7-intel-2016b.eb | 26 ++++++++++ .../l/libpng/libpng-1.6.26-intel-2016b.eb | 26 ++++++++++ ...plotlib-1.5.3-intel-2016b-Python-2.7.12.eb | 44 +++++++++++++++++ .../q/Qhull/Qhull-2015.2-intel-2016b.eb | 36 ++++++++++++++ ...-image-0.12.3-intel-2016b-Python-2.7.12.eb | 48 +++++++++++++++++++ 5 files changed, 180 insertions(+) create mode 100644 easybuild/easyconfigs/f/freetype/freetype-2.7-intel-2016b.eb create mode 100644 easybuild/easyconfigs/l/libpng/libpng-1.6.26-intel-2016b.eb create mode 100644 easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/q/Qhull/Qhull-2015.2-intel-2016b.eb create mode 100644 easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.7-intel-2016b.eb b/easybuild/easyconfigs/f/freetype/freetype-2.7-intel-2016b.eb new file mode 100644 index 0000000000..52d8477931 --- /dev/null +++ b/easybuild/easyconfigs/f/freetype/freetype-2.7-intel-2016b.eb @@ -0,0 +1,26 @@ +name = 'freetype' +version = '2.7' + +homepage = 'http://freetype.org' +description = """FreeType 2 is a software font engine that is designed to be small, efficient, highly customizable, and + portable while capable of producing high-quality output (glyph images). It can be used in graphics libraries, display + servers, font conversion tools, text image generation tools, and many other products as well.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [GNU_SAVANNAH_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('libpng', '1.6.26'), + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ['bin/freetype-config', 'lib/libfreetype.a', 'lib/libfreetype.%s' % SHLIB_EXT, + 'lib/pkgconfig/freetype2.pc'], + 'dirs': ['include/freetype2'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.26-intel-2016b.eb b/easybuild/easyconfigs/l/libpng/libpng-1.6.26-intel-2016b.eb new file mode 100644 index 0000000000..ba71624bd1 --- /dev/null +++ b/easybuild/easyconfigs/l/libpng/libpng-1.6.26-intel-2016b.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'libpng' +version = '1.6.26' + +homepage = 'http://www.libpng.org/pub/png/libpng.html' +description = "libpng is the official PNG reference library" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('zlib', '1.2.8')] + +configopts = "--with-pic" + +majminver = ''.join(version.split('.')[:2]) +sanity_check_paths = { + 'files': ['include/pngconf.h', 'include/png.h', 'include/pnglibconf.h', 'lib/libpng.a', + 'lib/libpng.%s' % SHLIB_EXT, 'lib/libpng%s.a' % majminver, 'lib/libpng%s.%s' % (majminver, SHLIB_EXT)], + 'dirs': ['bin', 'include/libpng%s' % majminver, 'share/man'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..2cd2414697 --- /dev/null +++ b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,44 @@ +easyblock = 'Bundle' + +name = 'matplotlib' +version = '1.5.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://matplotlib.org' +description = """matplotlib is a python 2D plotting library which produces publication quality figures in a variety of + hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python + and ipython shell, web application servers, and six graphical user interface toolkits.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.12'), + ('freetype', '2.7'), + ('libpng', '1.6.26'), +] + +exts_list = [ + ('Cycler', '0.10.0', { + 'modulename': 'cycler', + 'source_urls': ['https://pypi.python.org/packages/source/C/Cycler'], + 'source_tmpl': 'cycler-%(version)s.tar.gz', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/m/matplotlib'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-intel-2016b.eb b/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-intel-2016b.eb new file mode 100644 index 0000000000..e282e73b71 --- /dev/null +++ b/easybuild/easyconfigs/q/Qhull/Qhull-2015.2-intel-2016b.eb @@ -0,0 +1,36 @@ +easyblock = 'CMakeMake' + +name = 'Qhull' +version = '2015.2' + +homepage = 'http://www.qhull.org' +description = """ +Qhull computes the convex hull, Delaunay triangulation, Voronoi diagram, halfspace intersection about a point, +furthest-site Delaunay triangulation, and furthest-site Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, +and higher dimensions. Qhull implements the Quickhull algorithm for computing the convex hull. +""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = ['%(namelower)s-%(version_major)s-src-7.%(version_minor)s.0.tgz'] +source_urls = ['http://www.qhull.org/download/'] + +patches = [ + 'Qhull-%(version)s-intel-fix.patch', + 'Qhull_pkgconfig.patch', +] + +builddependencies = [('CMake', '3.6.2')] + +sanity_check_paths = { + 'files': ['bin/qhull', 'lib/libqhull.%s' % SHLIB_EXT, 'lib/pkgconfig/qhull.pc'], + 'dirs': [], +} + +modextrapaths = { + 'CPATH': ['qhull/include'], +} + +parallel = 1 + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..87114134c7 --- /dev/null +++ b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,48 @@ +easyblock = 'Bundle' + +name = 'scikit-image' +version = '0.12.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://scikit-learn.org/stable/index.html' +description = """Scikit-learn integrates machine learning algorithms in the tightly-knit scientific Python world, +building upon numpy, scipy, and matplotlib. As a machine-learning module, +it provides versatile tools for data mining and analysis in any field of science and engineering. +It strives to be simple and efficient, accessible to everybody, and reusable in various contexts.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.12'), + ('Qhull', '2015.2'), + ('matplotlib', '1.5.3', versionsuffix), +] + +exts_list = [ + ('networkx', '1.11', { + 'source_urls': ['https://pypi.python.org/packages/source/n/networkx'], + }), + ('Pillow', '3.4.2', { + 'source_urls': ['https://pypi.python.org/packages/source/P/Pillow'], + 'modulename': 'PIL', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/s/scikit-image'], + 'modulename': 'skimage', + }), +] + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/'], +} + +moduleclass = 'vis' -- GitLab From a21d3751f5f6ecd9e49cd34b258f9f314387534e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 26 Oct 2016 16:09:15 +0200 Subject: [PATCH 509/741] add easyconfig scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb, add easyconfig matplotlib-1.5.3-intel-2016b-Python-3.5.2.eb --- ...tplotlib-1.5.3-intel-2016b-Python-3.5.2.eb | 44 +++++++++++++++++ ...t-image-0.12.3-intel-2016b-Python-3.5.2.eb | 48 +++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..1db14993c4 --- /dev/null +++ b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,44 @@ +easyblock = 'Bundle' + +name = 'matplotlib' +version = '1.5.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://matplotlib.org' +description = """matplotlib is a python 2D plotting library which produces publication quality figures in a variety of + hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python + and ipython shell, web application servers, and six graphical user interface toolkits.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '3.5.2'), + ('freetype', '2.7'), + ('libpng', '1.6.26'), +] + +exts_list = [ + ('Cycler', '0.10.0', { + 'modulename': 'cycler', + 'source_urls': ['https://pypi.python.org/packages/source/C/Cycler'], + 'source_tmpl': 'cycler-%(version)s.tar.gz', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/m/matplotlib'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..bb4cf1ccf1 --- /dev/null +++ b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,48 @@ +easyblock = 'Bundle' + +name = 'scikit-image' +version = '0.12.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://scikit-learn.org/stable/index.html' +description = """Scikit-learn integrates machine learning algorithms in the tightly-knit scientific Python world, +building upon numpy, scipy, and matplotlib. As a machine-learning module, +it provides versatile tools for data mining and analysis in any field of science and engineering. +It strives to be simple and efficient, accessible to everybody, and reusable in various contexts.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '3.5.2'), + ('Qhull', '2015.2'), + ('matplotlib', '1.5.3', versionsuffix), +] + +exts_list = [ + ('networkx', '1.11', { + 'source_urls': ['https://pypi.python.org/packages/source/n/networkx'], + }), + ('Pillow', '3.4.2', { + 'source_urls': ['https://pypi.python.org/packages/source/P/Pillow'], + 'modulename': 'PIL', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/s/scikit-image'], + 'modulename': 'skimage', + }), +] + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/'], +} + +moduleclass = 'vis' -- GitLab From 1c96cb002f8e3d78cdb750d864817a3fc9d52313 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 10:40:34 +0200 Subject: [PATCH 510/741] add easyconfig RSEM-1.2.30-intel-2016b.eb --- .../r/RSEM/RSEM-1.2.30-intel-2016b.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/r/RSEM/RSEM-1.2.30-intel-2016b.eb diff --git a/easybuild/easyconfigs/r/RSEM/RSEM-1.2.30-intel-2016b.eb b/easybuild/easyconfigs/r/RSEM/RSEM-1.2.30-intel-2016b.eb new file mode 100644 index 0000000000..5420a22996 --- /dev/null +++ b/easybuild/easyconfigs/r/RSEM/RSEM-1.2.30-intel-2016b.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'RSEM' +version = '1.2.30' + +homepage = 'http://deweylab.github.io/RSEM/' +description = """RNA-Seq by Expectation-Maximization""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/deweylab/RSEM/archive/'] +sources = ['v%(version)s.tar.gz'] + +patches = ['RSEM-%(version)s_makefiles.patch'] + +skipsteps = ['configure'] +installopts = "prefix=%(installdir)s" + +dependencies = [ + ('ncurses', '6.0'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ['bin/rsem-calculate-expression', 'bin/rsem-plot-model', 'bin/rsem-plot-transcript-wiggles', 'bin/rsem-bam2wig', + 'bin/rsem-generate-data-matrix', 'bin/rsem-run-em', 'bin/convert-sam-for-rsem'], + 'dirs': ['bin/samtools-1.3'], +} + +moduleclass = 'bio' -- GitLab From 4d91ffbae104cdd12e804bb0d06e936f8b5b0b17 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 10:47:28 +0200 Subject: [PATCH 511/741] include Pillow as a proper dep for scikit-image rather than as extension, since it has deps itself --- .../libjpeg-turbo-1.5.1-intel-2016b.eb | 30 +++++++++++++++++++ .../Pillow-3.4.2-intel-2016b-Python-2.7.12.eb | 27 +++++++++++++++++ .../Pillow-3.4.2-intel-2016b-Python-3.5.2.eb | 27 +++++++++++++++++ ...-image-0.12.3-intel-2016b-Python-2.7.12.eb | 5 +--- ...t-image-0.12.3-intel-2016b-Python-3.5.2.eb | 5 +--- 5 files changed, 86 insertions(+), 8 deletions(-) create mode 100644 easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.5.1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.5.1-intel-2016b.eb b/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.5.1-intel-2016b.eb new file mode 100644 index 0000000000..ecf772ccf1 --- /dev/null +++ b/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.5.1-intel-2016b.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'libjpeg-turbo' +version = '1.5.1' + +homepage = 'http://sourceforge.net/projects/libjpeg-turbo/' +description = """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG +compression and decompression. libjpeg is a library that implements JPEG image encoding, decoding and transcoding. +""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('NASM', '2.12.02'), +] + +configopts = "--with-jpeg8" +runtest = "test" + +sanity_check_paths = { + 'files': ['bin/cjpeg', 'bin/djpeg', 'bin/jpegtran', 'bin/rdjpgcom', 'bin/tjbench', 'bin/wrjpgcom', + 'lib/libjpeg.a', 'lib/libjpeg.%s' % SHLIB_EXT, 'lib/libturbojpeg.a', 'lib/libturbojpeg.%s' % SHLIB_EXT], + 'dirs': ['include', 'share'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..4667d2c7a6 --- /dev/null +++ b/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'Pillow' +version = '3.4.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://pillow.readthedocs.org/' +description = """Pillow is the 'friendly PIL fork' by Alex Clark and Contributors. + PIL is the Python Imaging Library by Fredrik Lundh and Contributors.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('libjpeg-turbo', '1.5.1'), + ('libpng', '1.6.26'), + ('zlib', '1.2.8'), + ('LibTIFF', '4.0.6'), + ('freetype', '2.7'), +] + +options = {'modulename': 'PIL'} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..a95d247bb5 --- /dev/null +++ b/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'Pillow' +version = '3.4.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://pillow.readthedocs.org/' +description = """Pillow is the 'friendly PIL fork' by Alex Clark and Contributors. + PIL is the Python Imaging Library by Fredrik Lundh and Contributors.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2'), + ('libjpeg-turbo', '1.5.1'), + ('libpng', '1.6.26'), + ('zlib', '1.2.8'), + ('LibTIFF', '4.0.6'), + ('freetype', '2.7'), +] + +options = {'modulename': 'PIL'} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb index 87114134c7..7741dcce38 100644 --- a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-2.7.12.eb @@ -19,16 +19,13 @@ dependencies = [ ('Python', '2.7.12'), ('Qhull', '2015.2'), ('matplotlib', '1.5.3', versionsuffix), + ('Pillow', '3.4.2', versionsuffix), ] exts_list = [ ('networkx', '1.11', { 'source_urls': ['https://pypi.python.org/packages/source/n/networkx'], }), - ('Pillow', '3.4.2', { - 'source_urls': ['https://pypi.python.org/packages/source/P/Pillow'], - 'modulename': 'PIL', - }), (name, version, { 'source_urls': ['https://pypi.python.org/packages/source/s/scikit-image'], 'modulename': 'skimage', diff --git a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb index bb4cf1ccf1..f0eef4a235 100644 --- a/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/s/scikit-image/scikit-image-0.12.3-intel-2016b-Python-3.5.2.eb @@ -19,16 +19,13 @@ dependencies = [ ('Python', '3.5.2'), ('Qhull', '2015.2'), ('matplotlib', '1.5.3', versionsuffix), + ('Pillow', '3.4.2', versionsuffix), ] exts_list = [ ('networkx', '1.11', { 'source_urls': ['https://pypi.python.org/packages/source/n/networkx'], }), - ('Pillow', '3.4.2', { - 'source_urls': ['https://pypi.python.org/packages/source/P/Pillow'], - 'modulename': 'PIL', - }), (name, version, { 'source_urls': ['https://pypi.python.org/packages/source/s/scikit-image'], 'modulename': 'skimage', -- GitLab From ac68a7ee260d0eb1e7ded3fd6dfc831b6daf790f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 15:04:04 +0200 Subject: [PATCH 512/741] add easyconfig ART-2016.06.05-intel-2016b.eb --- .../a/ART/ART-2016.06.05-intel-2016b.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/a/ART/ART-2016.06.05-intel-2016b.eb diff --git a/easybuild/easyconfigs/a/ART/ART-2016.06.05-intel-2016b.eb b/easybuild/easyconfigs/a/ART/ART-2016.06.05-intel-2016b.eb new file mode 100644 index 0000000000..ac6f4932ff --- /dev/null +++ b/easybuild/easyconfigs/a/ART/ART-2016.06.05-intel-2016b.eb @@ -0,0 +1,25 @@ +easyblock = 'ConfigureMake' + +name = 'ART' +version = '2016.06.05' + +homepage = 'http://www.niehs.nih.gov/research/resources/software/biostatistics/art/' +description = "ART is a set of simulation tools to generate synthetic next-generation sequencing reads" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.niehs.nih.gov/research/resources/assets/docs/'] +sources = ['artsrcmountrainier%slinuxtgz.tgz' % ''.join(version.split('.'))] + +dependencies = [ + ('GSL', '2.2.1'), +] + +sanity_check_paths = { + 'files': ['bin/aln2bed.pl', 'bin/art_454', 'bin/art_illumina', 'bin/art_profiler_454', + 'bin/art_profiler_illumina', 'bin/art_SOLiD', 'bin/combinedAvg.pl', 'bin/empDist.pl', + 'bin/fastqReadAvg.pl', 'bin/map2bed.pl', 'bin/summation.pl'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 84dcdf81d1103ff057405fb60ccec4a400bad055 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 20:11:50 +0200 Subject: [PATCH 513/741] move easyconfigs for deprecated iqacml & iiqmpi toolchains to archive --- .../{ => __archive__}/b/BLACS/BLACS-1.1-iiqmpi-3.3.0.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.5-iqacml-3.7.3.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.7-iqacml-3.7.3.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-iqacml-3.7.3.eb | 0 .../{ => __archive__}/c/CBLAS/CBLAS-20110120-iqacml-3.7.3.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.28.1-iqacml-3.7.3.eb | 0 .../{ => __archive__}/d/Doxygen/Doxygen-1.8.3.1-iqacml-3.7.3.eb | 0 .../{ => __archive__}/e/ESMF/ESMF-6.1.1-iqacml-3.7.3.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-iiqmpi-3.3.0.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-iiqmpi-4.4.13.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.35-iqacml-3.7.3.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.37-iqacml-3.7.3.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.37-iqacml-4.4.13.eb | 0 .../{ => __archive__}/f/freetype/freetype-2.4.11-iqacml-3.7.3.eb | 0 .../{ => __archive__}/g/GDAL/GDAL-1.9.2-iqacml-3.7.3.eb | 0 .../{ => __archive__}/g/g2clib/g2clib-1.4.0-iqacml-3.7.3.eb | 0 .../{ => __archive__}/g/g2lib/g2lib-1.4.0-iqacml-3.7.3.eb | 0 .../easyconfigs/{ => __archive__}/h/HDF/HDF-4.2.8-iqacml-3.7.3.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.10-patch1-iqacml-3.7.3.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iiqmpi/iiqmpi-3.3.0.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iiqmpi/iiqmpi-4.4.13.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iqacml/iqacml-3.7.3.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iqacml/iqacml-4.4.13.eb | 0 .../{ => __archive__}/j/JasPer/JasPer-1.900.1-iqacml-3.7.3.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.14-iqacml-3.7.3.eb | 0 .../l/libreadline/libreadline-6.2-iqacml-3.7.3.eb | 0 .../l/libreadline/libreadline-6.2-iqacml-4.4.13.eb | 0 .../easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-iqacml-3.7.3.eb | 0 .../m/makedepend/makedepend-1.0.4-iqacml-3.7.3.eb | 0 .../easyconfigs/{ => __archive__}/n/NCL/NCL-6.1.0-iqacml-3.7.3.eb | 0 .../easyconfigs/{ => __archive__}/n/NCL/NCL-6.1.2-iqacml-3.7.3.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-iqacml-3.7.3.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-iqacml-4.4.13.eb | 0 .../{ => __archive__}/n/netCDF-C++/netCDF-C++-4.2-iqacml-3.7.3.eb | 0 .../n/netCDF-Fortran/netCDF-Fortran-4.2-iqacml-3.7.3.eb | 0 .../{ => __archive__}/n/netCDF/netCDF-4.2.1.1-iqacml-3.7.3.eb | 0 .../n/numpy/numpy-1.6.2-iqacml-3.7.3-Python-2.7.3.eb | 0 .../{ => __archive__}/o/OpenFOAM/OpenFOAM-2.2.0-iqacml-4.4.13.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-iqacml-3.7.3.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-iqacml-3.7.3.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.5-iqacml-3.7.3.eb | 0 .../q/QLogicMPI/QLogicMPI-2.9-926.1005_rhel5_qlc.eb | 0 .../s/SCOTCH/SCOTCH-6.0.0_esmumps-iqacml-4.4.13.eb | 0 ...aLAPACK-1.8.0-iiqmpi-3.3.0-ACML-5.3.0-ifort-64bit-BLACS-1.1.eb | 0 .../ScaLAPACK-2.0.2-iiqmpi-4.4.13-ACML-5.3.1-ifort-64bit.eb | 0 .../easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-iqacml-3.7.3.eb | 0 .../{ => __archive__}/t/tcsh/tcsh-6.18.01-iqacml-3.7.3.eb | 0 .../{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-iqacml-3.7.3.eb | 0 .../{ => __archive__}/w/WPS/WPS-3.4.1-iqacml-3.7.3-dmpar.eb | 0 .../{ => __archive__}/w/WRF/WRF-3.4.1-iqacml-3.7.3-dmpar.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-iqacml-3.7.3.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.8-iqacml-3.7.3.eb | 0 52 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/b/BLACS/BLACS-1.1-iiqmpi-3.3.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.5-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.7-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CBLAS/CBLAS-20110120-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.28.1-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Doxygen/Doxygen-1.8.3.1-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ESMF/ESMF-6.1.1-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-iiqmpi-3.3.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-iiqmpi-4.4.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.35-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.37-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.37-iqacml-4.4.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freetype/freetype-2.4.11-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDAL/GDAL-1.9.2-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/g2clib/g2clib-1.4.0-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/g2lib/g2lib-1.4.0-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF/HDF-4.2.8-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.10-patch1-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iiqmpi/iiqmpi-3.3.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iiqmpi/iiqmpi-4.4.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iqacml/iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iqacml/iqacml-4.4.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/j/JasPer/JasPer-1.900.1-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.14-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-iqacml-4.4.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/makedepend/makedepend-1.0.4-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NCL/NCL-6.1.0-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NCL/NCL-6.1.2-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-iqacml-4.4.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF-C++/netCDF-C++-4.2-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF-Fortran/netCDF-Fortran-4.2-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF/netCDF-4.2.1.1-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/numpy/numpy-1.6.2-iqacml-3.7.3-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenFOAM/OpenFOAM-2.2.0-iqacml-4.4.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.5-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QLogicMPI/QLogicMPI-2.9-926.1005_rhel5_qlc.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCOTCH/SCOTCH-6.0.0_esmumps-iqacml-4.4.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-1.8.0-iiqmpi-3.3.0-ACML-5.3.0-ifort-64bit-BLACS-1.1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-iiqmpi-4.4.13-ACML-5.3.1-ifort-64bit.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/tcsh/tcsh-6.18.01-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WPS/WPS-3.4.1-iqacml-3.7.3-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WRF/WRF-3.4.1-iqacml-3.7.3-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-iqacml-3.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.8-iqacml-3.7.3.eb (100%) diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-iiqmpi-3.3.0.eb b/easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-iiqmpi-3.3.0.eb similarity index 100% rename from easybuild/easyconfigs/b/BLACS/BLACS-1.1-iiqmpi-3.3.0.eb rename to easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-iiqmpi-3.3.0.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.5-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.5-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.7-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.7-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/c/CBLAS/CBLAS-20110120-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/c/CBLAS/CBLAS-20110120-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/CBLAS/CBLAS-20110120-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/c/CBLAS/CBLAS-20110120-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.28.1-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.28.1-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.28.1-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.28.1-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.3.1-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.3.1-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.3.1-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.3.1-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/e/ESMF/ESMF-6.1.1-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/e/ESMF/ESMF-6.1.1-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/e/ESMF/ESMF-6.1.1-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/e/ESMF/ESMF-6.1.1-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-iiqmpi-3.3.0.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-iiqmpi-3.3.0.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-iiqmpi-3.3.0.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-iiqmpi-3.3.0.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-iiqmpi-4.4.13.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-iiqmpi-4.4.13.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-iiqmpi-4.4.13.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-iiqmpi-4.4.13.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.35-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.37-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.37-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.37-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.37-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.37-iqacml-4.4.13.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.37-iqacml-4.4.13.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.37-iqacml-4.4.13.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.37-iqacml-4.4.13.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.4.11-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.11-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/f/freetype/freetype-2.4.11-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.11-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/g/GDAL/GDAL-1.9.2-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/g/GDAL/GDAL-1.9.2-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/g/GDAL/GDAL-1.9.2-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/g/GDAL/GDAL-1.9.2-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/g/g2clib/g2clib-1.4.0-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/g/g2clib/g2clib-1.4.0-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/g/g2clib/g2clib-1.4.0-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/g/g2clib/g2clib-1.4.0-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/g/g2lib/g2lib-1.4.0-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/g/g2lib/g2lib-1.4.0-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/g/g2lib/g2lib-1.4.0-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/g/g2lib/g2lib-1.4.0-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/h/HDF/HDF-4.2.8-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/h/HDF/HDF-4.2.8-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF/HDF-4.2.8-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/h/HDF/HDF-4.2.8-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-patch1-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-patch1-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-patch1-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-patch1-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/i/iiqmpi/iiqmpi-3.3.0.eb b/easybuild/easyconfigs/__archive__/i/iiqmpi/iiqmpi-3.3.0.eb similarity index 100% rename from easybuild/easyconfigs/i/iiqmpi/iiqmpi-3.3.0.eb rename to easybuild/easyconfigs/__archive__/i/iiqmpi/iiqmpi-3.3.0.eb diff --git a/easybuild/easyconfigs/i/iiqmpi/iiqmpi-4.4.13.eb b/easybuild/easyconfigs/__archive__/i/iiqmpi/iiqmpi-4.4.13.eb similarity index 100% rename from easybuild/easyconfigs/i/iiqmpi/iiqmpi-4.4.13.eb rename to easybuild/easyconfigs/__archive__/i/iiqmpi/iiqmpi-4.4.13.eb diff --git a/easybuild/easyconfigs/i/iqacml/iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/i/iqacml/iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/i/iqacml/iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/i/iqacml/iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/i/iqacml/iqacml-4.4.13.eb b/easybuild/easyconfigs/__archive__/i/iqacml/iqacml-4.4.13.eb similarity index 100% rename from easybuild/easyconfigs/i/iqacml/iqacml-4.4.13.eb rename to easybuild/easyconfigs/__archive__/i/iqacml/iqacml-4.4.13.eb diff --git a/easybuild/easyconfigs/j/JasPer/JasPer-1.900.1-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/j/JasPer/JasPer-1.900.1-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/j/JasPer/JasPer-1.900.1-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/j/JasPer/JasPer-1.900.1-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.14-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.14-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.14-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.14-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-iqacml-4.4.13.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-iqacml-4.4.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-iqacml-4.4.13.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-iqacml-4.4.13.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/n/NCL/NCL-6.1.0-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/n/NCL/NCL-6.1.0-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/NCL/NCL-6.1.0-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/n/NCL/NCL-6.1.0-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/n/NCL/NCL-6.1.2-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/n/NCL/NCL-6.1.2-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/NCL/NCL-6.1.2-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/n/NCL/NCL-6.1.2-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-iqacml-4.4.13.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-iqacml-4.4.13.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-iqacml-4.4.13.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-iqacml-4.4.13.eb diff --git a/easybuild/easyconfigs/n/netCDF-C++/netCDF-C++-4.2-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/n/netCDF-C++/netCDF-C++-4.2-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-C++/netCDF-C++-4.2-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/n/netCDF-C++/netCDF-C++-4.2-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.2.1.1-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2.1.1-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF/netCDF-4.2.1.1-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2.1.1-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/n/numpy/numpy-1.6.2-iqacml-3.7.3-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/n/numpy/numpy-1.6.2-iqacml-3.7.3-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/numpy/numpy-1.6.2-iqacml-3.7.3-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/n/numpy/numpy-1.6.2-iqacml-3.7.3-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.2.0-iqacml-4.4.13.eb b/easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-2.2.0-iqacml-4.4.13.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.2.0-iqacml-4.4.13.eb rename to easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-2.2.0-iqacml-4.4.13.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.5-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.5-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.5-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/q/QLogicMPI/QLogicMPI-2.9-926.1005_rhel5_qlc.eb b/easybuild/easyconfigs/__archive__/q/QLogicMPI/QLogicMPI-2.9-926.1005_rhel5_qlc.eb similarity index 100% rename from easybuild/easyconfigs/q/QLogicMPI/QLogicMPI-2.9-926.1005_rhel5_qlc.eb rename to easybuild/easyconfigs/__archive__/q/QLogicMPI/QLogicMPI-2.9-926.1005_rhel5_qlc.eb diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.0_esmumps-iqacml-4.4.13.eb b/easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-6.0.0_esmumps-iqacml-4.4.13.eb similarity index 100% rename from easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.0_esmumps-iqacml-4.4.13.eb rename to easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-6.0.0_esmumps-iqacml-4.4.13.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-iiqmpi-3.3.0-ACML-5.3.0-ifort-64bit-BLACS-1.1.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-1.8.0-iiqmpi-3.3.0-ACML-5.3.0-ifort-64bit-BLACS-1.1.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-iiqmpi-3.3.0-ACML-5.3.0-ifort-64bit-BLACS-1.1.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-1.8.0-iiqmpi-3.3.0-ACML-5.3.0-ifort-64bit-BLACS-1.1.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-iiqmpi-4.4.13-ACML-5.3.1-ifort-64bit.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-iiqmpi-4.4.13-ACML-5.3.1-ifort-64bit.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-iiqmpi-4.4.13-ACML-5.3.1-ifort-64bit.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-iiqmpi-4.4.13-ACML-5.3.1-ifort-64bit.eb diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/Szip/Szip-2.1-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/t/tcsh/tcsh-6.18.01-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/t/tcsh/tcsh-6.18.01-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/t/tcsh/tcsh-6.18.01-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/t/tcsh/tcsh-6.18.01-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/w/WPS/WPS-3.4.1-iqacml-3.7.3-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WPS/WPS-3.4.1-iqacml-3.7.3-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WPS/WPS-3.4.1-iqacml-3.7.3-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WPS/WPS-3.4.1-iqacml-3.7.3-dmpar.eb diff --git a/easybuild/easyconfigs/w/WRF/WRF-3.4.1-iqacml-3.7.3-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WRF/WRF-3.4.1-iqacml-3.7.3-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WRF/WRF-3.4.1-iqacml-3.7.3-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WRF/WRF-3.4.1-iqacml-3.7.3-dmpar.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-iqacml-3.7.3.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-iqacml-3.7.3.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.8-iqacml-3.7.3.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.8-iqacml-3.7.3.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.8-iqacml-3.7.3.eb -- GitLab From fb4dce658d6dc84740228b0d0993dcff0186e528 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 20:11:57 +0200 Subject: [PATCH 514/741] ignore archived easyconfigs in test suite --- test/easyconfigs/easyconfigs.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/easyconfigs/easyconfigs.py b/test/easyconfigs/easyconfigs.py index 55faff811d..5901ae8d4c 100644 --- a/test/easyconfigs/easyconfigs.py +++ b/test/easyconfigs/easyconfigs.py @@ -172,8 +172,8 @@ class EasyConfigTest(TestCase): easyconfig_dirs_regex = re.compile(r'/easybuild/easyconfigs/[0a-z]/[^/]+$') topdir = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) for (dirpath, _, filenames) in os.walk(topdir): - # ignore git/svn dirs - if '/.git/' in dirpath or '/.svn/' in dirpath: + # ignore git/svn dirs & archived easyconfigs + if '/.git/' in dirpath or '/.svn/' in dirpath or '__archive__' in dirpath: continue # check whether list of .eb files is non-empty easyconfig_files = [fn for fn in filenames if fn.endswith('eb')] @@ -313,6 +313,11 @@ def suite(): easyconfigs_path = get_paths_for('easyconfigs')[0] cnt = 0 for (subpath, _, specs) in os.walk(easyconfigs_path, topdown=True): + + # ignore archived easyconfigs + if '__archive__' in subpath: + continue + for spec in specs: if spec.endswith('.eb') and spec != 'TEMPLATE.eb': cnt += 1 -- GitLab From 6ed29e63f6dcb30eddff398cd3bf376ebebc11c6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 20:37:34 +0200 Subject: [PATCH 515/741] add easyconfig CBLAS-20110120-foss-2016b.eb --- .../c/CBLAS/CBLAS-20110120-foss-2016b.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/c/CBLAS/CBLAS-20110120-foss-2016b.eb diff --git a/easybuild/easyconfigs/c/CBLAS/CBLAS-20110120-foss-2016b.eb b/easybuild/easyconfigs/c/CBLAS/CBLAS-20110120-foss-2016b.eb new file mode 100644 index 0000000000..aadc3712b4 --- /dev/null +++ b/easybuild/easyconfigs/c/CBLAS/CBLAS-20110120-foss-2016b.eb @@ -0,0 +1,22 @@ +name = 'CBLAS' +version = '20110120' + +homepage = 'http://www.netlib.org/blas/' +description = "C interface to the BLAS" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ['http://www.netlib.org/blas/blast-forum/'] +sources = ['cblas.tgz'] + +patches = ['CBLAS_shared-lib.patch'] + +buildopts = 'all shared' + +# parallel build fails occasionally +parallel = 1 + +runtest = 'runtst' + +moduleclass = 'numlib' -- GitLab From d33fbb6dd48d6476dbd5d88978cb50937f91b158 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 19:35:03 +0200 Subject: [PATCH 516/741] move easyconfigs for deprecated iomkl toolchains to archive --- .../{ => __archive__}/b/BEEF/BEEF-0.1.1-r16-iomkl-4.6.13.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-iomkl-4.6.13.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-iomkl-4.6.13-single.eb | 0 .../easyconfigs/{ => __archive__}/g/gzip/gzip-1.6-iomkl-6.6.2.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-iomkl-4.6.13.eb | 0 .../{ => __archive__}/i/imkl/imkl-10.3.12.361-iompi-4.6.13.eb | 0 .../{ => __archive__}/i/imkl/imkl-11.1.2.144-iompi-6.6.2.eb | 0 .../{ => __archive__}/i/imkl/imkl-11.1.4.211-iompi-6.6.4.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iomkl/iomkl-4.6.13.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iomkl/iomkl-6.6.2.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iompi/iompi-4.6.13.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iompi/iompi-6.6.2.eb | 0 .../easyconfigs/{ => __archive__}/i/iompi/iompi-6.6.4-no-OFED.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iompi/iompi-6.6.4.eb | 0 .../l/libreadline/libreadline-6.2-iomkl-4.6.13.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-iomkl-4.6.13.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-iomkl-4.6.13.eb | 0 .../p/paycheck/paycheck-1.0.2-iomkl-4.6.13-Python-2.7.3.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-iomkl-4.6.13.eb | 0 19 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/b/BEEF/BEEF-0.1.1-r16-iomkl-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-iomkl-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-iomkl-4.6.13-single.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.6-iomkl-6.6.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-iomkl-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-10.3.12.361-iompi-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-11.1.2.144-iompi-6.6.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-11.1.4.211-iompi-6.6.4.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iomkl/iomkl-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iomkl/iomkl-6.6.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iompi/iompi-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iompi/iompi-6.6.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iompi/iompi-6.6.4-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iompi/iompi-6.6.4.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-iomkl-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-iomkl-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-iomkl-4.6.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/paycheck/paycheck-1.0.2-iomkl-4.6.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-iomkl-4.6.13.eb (100%) diff --git a/easybuild/easyconfigs/b/BEEF/BEEF-0.1.1-r16-iomkl-4.6.13.eb b/easybuild/easyconfigs/__archive__/b/BEEF/BEEF-0.1.1-r16-iomkl-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/b/BEEF/BEEF-0.1.1-r16-iomkl-4.6.13.eb rename to easybuild/easyconfigs/__archive__/b/BEEF/BEEF-0.1.1-r16-iomkl-4.6.13.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-4.6.13.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-iomkl-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-iomkl-4.6.13.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-iomkl-4.6.13.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-iomkl-4.6.13-single.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-iomkl-4.6.13-single.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-iomkl-4.6.13-single.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-iomkl-4.6.13-single.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.6-iomkl-6.6.2.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.6-iomkl-6.6.2.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.6-iomkl-6.6.2.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.6-iomkl-6.6.2.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-iomkl-4.6.13.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-iomkl-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-iomkl-4.6.13.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-iomkl-4.6.13.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-iompi-4.6.13.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-10.3.12.361-iompi-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-iompi-4.6.13.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-10.3.12.361-iompi-4.6.13.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.1.2.144-iompi-6.6.2.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.2.144-iompi-6.6.2.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-11.1.2.144-iompi-6.6.2.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.2.144-iompi-6.6.2.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.1.4.211-iompi-6.6.4.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.4.211-iompi-6.6.4.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-11.1.4.211-iompi-6.6.4.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.4.211-iompi-6.6.4.eb diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-4.6.13.eb b/easybuild/easyconfigs/__archive__/i/iomkl/iomkl-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/i/iomkl/iomkl-4.6.13.eb rename to easybuild/easyconfigs/__archive__/i/iomkl/iomkl-4.6.13.eb diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-6.6.2.eb b/easybuild/easyconfigs/__archive__/i/iomkl/iomkl-6.6.2.eb similarity index 100% rename from easybuild/easyconfigs/i/iomkl/iomkl-6.6.2.eb rename to easybuild/easyconfigs/__archive__/i/iomkl/iomkl-6.6.2.eb diff --git a/easybuild/easyconfigs/i/iompi/iompi-4.6.13.eb b/easybuild/easyconfigs/__archive__/i/iompi/iompi-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/i/iompi/iompi-4.6.13.eb rename to easybuild/easyconfigs/__archive__/i/iompi/iompi-4.6.13.eb diff --git a/easybuild/easyconfigs/i/iompi/iompi-6.6.2.eb b/easybuild/easyconfigs/__archive__/i/iompi/iompi-6.6.2.eb similarity index 100% rename from easybuild/easyconfigs/i/iompi/iompi-6.6.2.eb rename to easybuild/easyconfigs/__archive__/i/iompi/iompi-6.6.2.eb diff --git a/easybuild/easyconfigs/i/iompi/iompi-6.6.4-no-OFED.eb b/easybuild/easyconfigs/__archive__/i/iompi/iompi-6.6.4-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/i/iompi/iompi-6.6.4-no-OFED.eb rename to easybuild/easyconfigs/__archive__/i/iompi/iompi-6.6.4-no-OFED.eb diff --git a/easybuild/easyconfigs/i/iompi/iompi-6.6.4.eb b/easybuild/easyconfigs/__archive__/i/iompi/iompi-6.6.4.eb similarity index 100% rename from easybuild/easyconfigs/i/iompi/iompi-6.6.4.eb rename to easybuild/easyconfigs/__archive__/i/iompi/iompi-6.6.4.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-iomkl-4.6.13.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-iomkl-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-iomkl-4.6.13.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-iomkl-4.6.13.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-iomkl-4.6.13.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-iomkl-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-iomkl-4.6.13.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-iomkl-4.6.13.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-iomkl-4.6.13.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-iomkl-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-iomkl-4.6.13.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-iomkl-4.6.13.eb diff --git a/easybuild/easyconfigs/p/paycheck/paycheck-1.0.2-iomkl-4.6.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/paycheck/paycheck-1.0.2-iomkl-4.6.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/paycheck/paycheck-1.0.2-iomkl-4.6.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/paycheck/paycheck-1.0.2-iomkl-4.6.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-iomkl-4.6.13.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-iomkl-4.6.13.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-iomkl-4.6.13.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-iomkl-4.6.13.eb -- GitLab From 0f23f1dc68646a435b5bad2a271a5418e13efd5f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 20:04:09 +0200 Subject: [PATCH 517/741] move easyconfigs for deprecated intel-para/gpsolf toolchains to archive --- .../{ => __archive__}/b/Bison/Bison-3.0.2-intel-para-2014.12.eb | 0 .../{ => __archive__}/c/CP2K/CP2K-2.6.0-intel-para-2014.12.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.4-gpsmpi-2014.12.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.39-intel-para-2014.12.eb | 0 .../easyconfigs/{ => __archive__}/g/gpsmpi/gpsmpi-2014.12.eb | 0 .../easyconfigs/{ => __archive__}/g/gpsolf/gpsolf-2014.12.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-gpsolf-2014.12.eb | 0 .../{ => __archive__}/h/HPL/HPL-2.1-intel-para-2014.12.eb | 0 .../{ => __archive__}/i/imkl/imkl-11.2.1.133-ipsmpi-2014.12.eb | 0 .../{ => __archive__}/i/intel-para/intel-para-2014.12.eb | 0 .../easyconfigs/{ => __archive__}/i/ipsmpi/ipsmpi-2014.12.eb | 0 .../{ => __archive__}/l/Libint/Libint-1.1.4-intel-para-2014.12.eb | 0 .../{ => __archive__}/l/libxc/libxc-2.2.1-intel-para-2014.12.eb | 0 .../{ => __archive__}/m/M4/M4-1.4.17-intel-para-2014.12.eb | 0 ...ScaLAPACK-2.0.2-gpsmpi-2014.12-OpenBLAS-0.2.12-LAPACK-3.5.0.eb | 0 15 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-3.0.2-intel-para-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CP2K/CP2K-2.6.0-intel-para-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.4-gpsmpi-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.39-intel-para-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gpsmpi/gpsmpi-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gpsolf/gpsolf-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-gpsolf-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-intel-para-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-11.2.1.133-ipsmpi-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/intel-para/intel-para-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ipsmpi/ipsmpi-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/Libint/Libint-1.1.4-intel-para-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxc/libxc-2.2.1-intel-para-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.17-intel-para-2014.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gpsmpi-2014.12-OpenBLAS-0.2.12-LAPACK-3.5.0.eb (100%) diff --git a/easybuild/easyconfigs/b/Bison/Bison-3.0.2-intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-3.0.2-intel-para-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-3.0.2-intel-para-2014.12.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-3.0.2-intel-para-2014.12.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.0-intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/c/CP2K/CP2K-2.6.0-intel-para-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K-2.6.0-intel-para-2014.12.eb rename to easybuild/easyconfigs/__archive__/c/CP2K/CP2K-2.6.0-intel-para-2014.12.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gpsmpi-2014.12.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gpsmpi-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gpsmpi-2014.12.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gpsmpi-2014.12.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.39-intel-para-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.39-intel-para-2014.12.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.39-intel-para-2014.12.eb diff --git a/easybuild/easyconfigs/g/gpsmpi/gpsmpi-2014.12.eb b/easybuild/easyconfigs/__archive__/g/gpsmpi/gpsmpi-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/g/gpsmpi/gpsmpi-2014.12.eb rename to easybuild/easyconfigs/__archive__/g/gpsmpi/gpsmpi-2014.12.eb diff --git a/easybuild/easyconfigs/g/gpsolf/gpsolf-2014.12.eb b/easybuild/easyconfigs/__archive__/g/gpsolf/gpsolf-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/g/gpsolf/gpsolf-2014.12.eb rename to easybuild/easyconfigs/__archive__/g/gpsolf/gpsolf-2014.12.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.1-gpsolf-2014.12.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-gpsolf-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.1-gpsolf-2014.12.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-gpsolf-2014.12.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.1-intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-intel-para-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.1-intel-para-2014.12.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-intel-para-2014.12.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.2.1.133-ipsmpi-2014.12.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-11.2.1.133-ipsmpi-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-11.2.1.133-ipsmpi-2014.12.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-11.2.1.133-ipsmpi-2014.12.eb diff --git a/easybuild/easyconfigs/i/intel-para/intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/i/intel-para/intel-para-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/i/intel-para/intel-para-2014.12.eb rename to easybuild/easyconfigs/__archive__/i/intel-para/intel-para-2014.12.eb diff --git a/easybuild/easyconfigs/i/ipsmpi/ipsmpi-2014.12.eb b/easybuild/easyconfigs/__archive__/i/ipsmpi/ipsmpi-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/i/ipsmpi/ipsmpi-2014.12.eb rename to easybuild/easyconfigs/__archive__/i/ipsmpi/ipsmpi-2014.12.eb diff --git a/easybuild/easyconfigs/l/Libint/Libint-1.1.4-intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-intel-para-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/l/Libint/Libint-1.1.4-intel-para-2014.12.eb rename to easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-intel-para-2014.12.eb diff --git a/easybuild/easyconfigs/l/libxc/libxc-2.2.1-intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/l/libxc/libxc-2.2.1-intel-para-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/l/libxc/libxc-2.2.1-intel-para-2014.12.eb rename to easybuild/easyconfigs/__archive__/l/libxc/libxc-2.2.1-intel-para-2014.12.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.17-intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.17-intel-para-2014.12.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.17-intel-para-2014.12.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.17-intel-para-2014.12.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gpsmpi-2014.12-OpenBLAS-0.2.12-LAPACK-3.5.0.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gpsmpi-2014.12-OpenBLAS-0.2.12-LAPACK-3.5.0.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gpsmpi-2014.12-OpenBLAS-0.2.12-LAPACK-3.5.0.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gpsmpi-2014.12-OpenBLAS-0.2.12-LAPACK-3.5.0.eb -- GitLab From c14b3a6dd7680604cffd639163d9ee918c588c99 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 20:49:39 +0200 Subject: [PATCH 518/741] move easyconfigs for deprecated ictce toolchains to archive --- .../a/ABySS/ABySS-1.3.4-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/a/ALADIN/ALADIN-36t1_op2bf1-ictce-4.1.13.eb | 0 .../{ => __archive__}/a/AMOS/AMOS-3.1.0-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/a/ARB/ARB-5.5-ictce-4.1.13.eb | 0 .../a/ASE/ASE-3.6.0.2515-ictce-4.0.6-Python-2.7.3.eb | 0 .../a/AnalyzeFMRI/AnalyzeFMRI-1.1-15-ictce-4.0.10-R-2.15.2.eb | 0 .../a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/a/Autoconf/Autoconf-2.69-ictce-4.0.6.eb | 0 .../{ => __archive__}/a/Autoconf/Autoconf-2.69-ictce-4.1.13.eb | 0 .../{ => __archive__}/a/Automake/Automake-1.13.4-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/a/a2ps/a2ps-4.14-ictce-4.0.6.eb | 0 .../{ => __archive__}/a/aria2/aria2-1.15.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/b/BEDTools/BEDTools-2.17.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/b/BFAST/BFAST-0.7.0a-ictce-4.0.6.eb | 0 .../{ => __archive__}/b/BLAST+/BLAST+-2.2.27-ictce-4.0.6.eb | 0 .../{ => __archive__}/b/BLAST+/BLAST+-2.2.28-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/b/BWA/BWA-0.6.2-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/b/BWA/BWA-0.7.4-ictce-4.1.13.eb | 0 .../{ => __archive__}/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb | 0 .../b/BioPerl/BioPerl-1.6.1-ictce-4.1.13-Perl-5.16.3.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.5-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.5-ictce-4.0.6.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.5-ictce-4.1.13.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.6.5-ictce-4.1.13.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.7-iccifort-2011.13.367.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.7-ictce-4.1.13.eb | 0 .../{ => __archive__}/b/Bonnie++/Bonnie++-1.03e-ictce-4.0.6.eb | 0 .../b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../b/Boost/Boost-1.51.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/b/Boost/Boost-1.51.0-ictce-4.0.6.eb | 0 .../{ => __archive__}/b/Boost/Boost-1.51.0-ictce-4.1.13.eb | 0 .../b/Boost/Boost-1.53.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/b/Boost/Boost-1.53.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/b/Bowtie/Bowtie-1.0.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/b/Bowtie2/Bowtie2-2.0.2-ictce-4.0.6.eb | 0 .../b/beagle-lib/beagle-lib-20120124-ictce-4.0.6.eb | 0 .../{ => __archive__}/b/byacc/byacc-20120526-ictce-4.0.6.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/CCfits/CCfits-2.4-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/CFITSIO/CFITSIO-3.34-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/c/CLHEP/CLHEP-2.1.1.0-ictce-4.0.6.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.10.2-ictce-4.0.6.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.10.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.12-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.4-ictce-4.0.6.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.4-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/CP2K/CP2K-20111205-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/c/CRF++/CRF++-0.57-ictce-4.1.13.eb | 0 .../c/CVXOPT/CVXOPT-1.1.5-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/c/ClustalW2/ClustalW2-2.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/c/Corkscrew/Corkscrew-2.0-ictce-4.0.6.eb | 0 .../c/Cython/Cython-0.16-ictce-4.0.6-Python-2.7.3.eb | 0 .../c/Cython/Cython-0.16-ictce-4.1.13-Python-2.7.3.eb | 0 .../c/Cython/Cython-0.19.1-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.27.0-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.27.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.28.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/cairo/cairo-1.12.14-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/c/cairo/cairo-1.12.14-ictce-4.1.13.eb | 0 .../{ => __archive__}/c/ccache/ccache-3.1.9-ictce-4.0.6.eb | 0 .../{ => __archive__}/c/cflow/cflow-1.4-ictce-4.0.6.eb | 0 .../{ => __archive__}/c/cgdb/cgdb-0.6.5-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/d/DB/DB-4.7.25-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/d/DB/DB-6.0.20-ictce-4.1.13.eb | 0 .../d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-4.1.13-no-gui.eb | 0 .../d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/d/Doxygen/Doxygen-1.8.1.1-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/d/Doxygen/Doxygen-1.8.1.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/d/Doxygen/Doxygen-1.8.1.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/d/Doxygen/Doxygen-1.8.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/d/Doxygen/Doxygen-1.8.3.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/e/ELinks/ELinks-0.12pre5-ictce-4.0.6.eb | 0 .../{ => __archive__}/e/EMBOSS/EMBOSS-6.5.7-ictce-4.1.13.eb | 0 .../{ => __archive__}/e/ESMF/ESMF-5.3.0-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/e/ESMF/ESMF-6.1.1-ictce-4.1.13.eb | 0 .../e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-parallel.eb | 0 .../e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-serial.eb | 0 .../{ => __archive__}/e/Eigen/Eigen-3.1.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/e/Eigen/Eigen-3.1.4-ictce-4.1.13.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-ictce-4.0.6.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-ictce-4.1.13.eb | 0 .../f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-ictce-4.0.6.eb | 0 .../{ => __archive__}/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-ictce-4.1.13-single.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-ictce-4.1.13.eb | 0 .../f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../f/FRC_align/FRC_align-20130521-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/f/FSL/FSL-4.1.9-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/f/FSL/FSL-5.0.4-ictce-4.1.13.eb | 0 .../f/fastahack/fastahack-20110215-ictce-4.1.13.eb | 0 .../{ => __archive__}/f/fixesproto/fixesproto-5.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.35-ictce-4.0.6.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.35-ictce-4.1.13.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.37-ictce-4.1.13.eb | 0 .../{ => __archive__}/f/fmri/fmri-1.4-8-ictce-4.0.10-R-2.15.2.eb | 0 .../f/fontconfig/fontconfig-2.10.91-ictce-3.2.2.u3.eb | 0 .../f/fontconfig/fontconfig-2.10.91-ictce-4.1.13.eb | 0 .../{ => __archive__}/f/freeglut/freeglut-2.8.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/f/freetype/freetype-2.4.10-ictce-4.0.6.eb | 0 .../{ => __archive__}/f/freetype/freetype-2.4.10-ictce-4.1.13.eb | 0 .../f/freetype/freetype-2.4.11-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/f/freetype/freetype-2.4.11-ictce-4.1.13.eb | 0 .../{ => __archive__}/f/freetype/freetype-2.5.0.1-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/g/GATE/GATE-6.1-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/g/GATE/GATE-6.2-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/GDAL/GDAL-1.9.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/g/GEOS/GEOS-3.3.5-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/GLib/GLib-2.34.3-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/GLib/GLib-2.34.3-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/g/GMP/GMP-5.0.5-ictce-4.0.6.eb | 0 .../g/GPAW/GPAW-0.9.0.8965-ictce-4.0.6-Python-2.7.3.eb | 0 .../easyconfigs/{ => __archive__}/g/GSL/GSL-1.15-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/Geant4/Geant4-9.4.p02-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/Geant4/Geant4-9.5.p01-ictce-4.0.6.eb | 0 .../g/Ghostscript/Ghostscript-9.10-ictce-4.1.13.eb | 0 .../g/Greenlet/Greenlet-0.4.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/g/Guile/Guile-1.8.8-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/g2clib/g2clib-1.2.3-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/g/g2clib/g2clib-1.4.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/g/g2lib/g2lib-1.2.4-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/g/g2lib/g2lib-1.4.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/g/gettext/gettext-0.18.2-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/gettext/gettext-0.18.2-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/g/git/git-1.7.12-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/glproto/glproto-1.4.16-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/glproto/glproto-1.4.16-ictce-4.1.13.eb | 0 .../{ => __archive__}/g/gnuplot/gnuplot-4.6.0-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/gperf/gperf-3.0.4-ictce-4.0.6.eb | 0 .../{ => __archive__}/g/grib_api/grib_api-1.10.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/g/grib_api/grib_api-1.9.18-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-ictce-4.1.13.eb | 0 .../{ => __archive__}/h/HDF/HDF-4.2.7-patch1-ictce-3.2.2.u3.eb | 0 .../easyconfigs/{ => __archive__}/h/HDF/HDF-4.2.8-ictce-4.1.13.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs-mt.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.10-ictce-4.1.13-no-mpi.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.10-ictce-4.1.13.eb | 0 .../h/HDF5/HDF5-1.8.12-ictce-4.1.13-zlib-1.2.7.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.7-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.7-ictce-4.0.6.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.9-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.9-ictce-4.1.13.eb | 0 .../{ => __archive__}/h/HMMER/HMMER-3.0-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-ictce-6.0.5.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-ictce-6.3.5.eb | 0 .../h/HTSeq/HTSeq-0.5.4p5-ictce-4.1.13-Python-2.7.6.eb | 0 .../{ => __archive__}/h/Harminv/Harminv-1.3.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb | 0 .../h/h5py/h5py-2.0.1-ictce-4.0.6-Python-2.7.3.eb | 0 .../h/h5py/h5py-2.0.1-ictce-4.1.13-Python-2.7.3.eb | 0 .../h/h5py/h5py-2.1.3-ictce-4.1.13-Python-2.7.3.eb | 0 .../h/h5py/h5py-2.2.1-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/h/h5utils/h5utils-1.12.1-ictce-4.0.6.eb | 0 .../h/horton/horton-1.0.2-ictce-4.1.13-Python-2.7.3.eb | 0 .../h/horton/horton-1.1.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../h/horton/horton-1.2.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../h/horton/horton-1.2.1-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/h/hwloc/hwloc-1.6-iccifort-2011.13.367.eb | 0 .../{ => __archive__}/i/Infernal/Infernal-1.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/i/Infernal/Infernal-1.1rc1-ictce-4.0.6.eb | 0 .../i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/i/Iperf/Iperf-2.0.5-ictce-4.0.6.eb | 0 .../{ => __archive__}/i/IronPython/IronPython-2.7-ictce-4.1.13.eb | 0 .../{ => __archive__}/i/iccifort/iccifort-11.1.073-32bit.eb | 0 .../easyconfigs/{ => __archive__}/i/iccifort/iccifort-11.1.073.eb | 0 .../{ => __archive__}/i/iccifort/iccifort-2011.10.319.eb | 0 .../{ => __archive__}/i/iccifort/iccifort-2011.13.367.eb | 0 .../{ => __archive__}/i/iccifort/iccifort-2011.6.233.eb | 0 .../{ => __archive__}/i/iccifort/iccifort-2013.1.117.eb | 0 .../{ => __archive__}/i/iccifort/iccifort-2013_sp1.0.080.eb | 0 .../{ => __archive__}/i/iccifort/iccifort-2013_sp1.3.174.eb | 0 .../easyconfigs/{ => __archive__}/i/ictce/ictce-3.2.2.u3-32bit.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-3.2.2.u3.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-4.0.10.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-4.0.6.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-4.1.13.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-5.1.1.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-6.0.5.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-6.3.5.eb | 0 .../easyconfigs/{ => __archive__}/i/iimpi/iimpi-3.2.2.u3-32bit.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-3.2.2.u3.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-4.0.10.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-4.0.6.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-4.1.13.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-5.1.1.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-6.0.5.eb | 0 easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-6.3.5.eb | 0 .../{ => __archive__}/i/imake/imake-1.0.5-ictce-4.1.13.eb | 0 .../i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3-32bit.eb | 0 .../{ => __archive__}/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3.eb | 0 .../{ => __archive__}/i/imkl/imkl-10.3.10.319-iimpi-4.0.10.eb | 0 .../{ => __archive__}/i/imkl/imkl-10.3.12.361-iimpi-4.1.13.eb | 0 .../{ => __archive__}/i/imkl/imkl-10.3.6.233-iimpi-4.0.6.eb | 0 .../{ => __archive__}/i/imkl/imkl-11.0.1.117-iimpi-5.1.1.eb | 0 .../{ => __archive__}/i/imkl/imkl-11.1.0.080-iimpi-6.0.5.eb | 0 .../{ => __archive__}/i/imkl/imkl-11.1.3.174-iimpi-6.3.5.eb | 0 .../i/impi/impi-4.0.0.028-iccifort-11.1.073-32bit.eb | 0 .../{ => __archive__}/i/impi/impi-4.0.0.028-iccifort-11.1.073.eb | 0 .../i/impi/impi-4.0.2.003-iccifort-2011.10.319.eb | 0 .../i/impi/impi-4.0.2.003-iccifort-2011.6.233.eb | 0 .../i/impi/impi-4.1.0.027-iccifort-2011.13.367.eb | 0 .../i/impi/impi-4.1.0.027-iccifort-2013.1.117.eb | 0 .../i/impi/impi-4.1.1.036-iccifort-2013_sp1.0.080.eb | 0 .../i/impi/impi-4.1.3.049-iccifort-2013_sp1.3.174.eb | 0 .../{ => __archive__}/i/inputproto/inputproto-2.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/j/JasPer/JasPer-1.900.1-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/j/JasPer/JasPer-1.900.1-ictce-4.1.13.eb | 0 .../j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/k/kbproto/kbproto-1.0.6-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/LIBSVM/LIBSVM-3.17-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/l/LZO/LZO-2.06-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/l/LZO/LZO-2.06-ictce-5.1.1.eb | 0 .../{ => __archive__}/l/LibTIFF/LibTIFF-4.0.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/Libint/Libint-1.1.4-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/l/Libint/Libint-1.1.4-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/Libint/Libint-2.0.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libICE/libICE-1.0.8-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libSM/libSM-1.2.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libX11/libX11-1.6.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXau/libXau-1.0.8-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXaw/libXaw-1.0.12-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXext/libXext-1.3.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXfixes/libXfixes-5.0.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXi/libXi-1.7.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXmu/libXmu-1.1.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXp/libXp-1.0.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXpm/libXpm-3.5.11-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXt/libXt-1.1.4-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libXtst/libXtst-1.2.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libctl/libctl-3.2.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libdrm/libdrm-2.4.27-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libdrm/libdrm-2.4.27-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libffi/libffi-3.0.11-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libffi/libffi-3.0.13-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libffi/libffi-3.0.13-ictce-4.1.13.eb | 0 .../l/libgtextutils/libgtextutils-0.6.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libharu/libharu-2.2.0-ictce-4.1.13.eb | 0 .../l/libjpeg-turbo/libjpeg-turbo-1.3.0-ictce-4.1.13.eb | 0 .../l/libjpeg-turbo/libjpeg-turbo-1.3.1-ictce-6.3.5.eb | 0 .../l/libmatheval/libmatheval-1.1.8-ictce-4.0.6.eb | 0 .../l/libpciaccess/libpciaccess-0.13.1-ictce-4.0.6.eb | 0 .../l/libpciaccess/libpciaccess-0.13.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.10-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.10-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.11-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.11-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.13-ictce-4.0.10.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.13-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.13-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.14-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.5.14-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.6.12-ictce-6.3.5.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.6.2-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.6.2-ictce-4.1.13.eb | 0 .../l/libpng/libpng-1.6.3-ictce-4.1.13-zlib-1.2.8.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.6.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libpng/libpng-1.6.6-ictce-4.1.13.eb | 0 .../l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.0.6.eb | 0 .../l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.1.13.eb | 0 .../l/libreadline/libreadline-6.2-ictce-4.0.10.eb | 0 .../l/libreadline/libreadline-6.2-ictce-4.0.6.eb | 0 .../l/libreadline/libreadline-6.2-ictce-4.1.13.eb | 0 .../l/libreadline/libreadline-6.3-ictce-6.3.5.eb | 0 .../{ => __archive__}/l/libtool/libtool-2.4.2-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libtool/libtool-2.4.2-ictce-4.1.13.eb | 0 .../l/libunistring/libunistring-0.9.3-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libxc/libxc-2.0.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libxc/libxc-2.0.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libxc/libxc-2.0.3-ictce-4.1.13.eb | 0 .../l/libxcb/libxcb-1.8-ictce-4.0.6-Python-2.7.3.eb | 0 .../l/libxcb/libxcb-1.8-ictce-4.1.13-Python-2.7.3.eb | 0 .../l/libxml2/libxml2-2.8.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb | 0 .../l/libxml2/libxml2-2.8.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/l/libxml2/libxml2-2.9.0-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libxml2/libxml2-2.9.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libxml2/libxml2-2.9.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libxml2/libxml2-2.9.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/libxslt/libxslt-1.1.28-ictce-4.0.6.eb | 0 .../{ => __archive__}/l/libxslt/libxslt-1.1.28-ictce-4.1.13.eb | 0 .../l/likwid/likwid-3.0.0-ictce-4.1.13-pinomp.eb | 0 .../{ => __archive__}/l/likwid/likwid-3.0.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/likwid/likwid-4.0.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/l/lynx/lynx-2.8.7-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/M4/M4-1.4.16-iccifort-2011.13.367.eb | 0 .../{ => __archive__}/m/M4/M4-1.4.16-ictce-3.2.2.u3.eb | 0 .../easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/m/MCL/MCL-12.135-ictce-4.0.6.eb | 0 .../{ => __archive__}/m/MCL/MCL-12.135-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/MDP/MDP-3.3-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/m/MEME/MEME-4.8.0-ictce-4.0.6.eb | 0 .../{ => __archive__}/m/METIS/METIS-4.0.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/m/METIS/METIS-4.0.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/METIS/METIS-5.0.2-ictce-4.0.6.eb | 0 .../{ => __archive__}/m/METIS/METIS-5.0.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/METIS/METIS-5.1.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb | 0 .../{ => __archive__}/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-metis.eb | 0 .../m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-parmetis.eb | 0 .../{ => __archive__}/m/MUMmer/MUMmer-3.23-ictce-4.0.6.eb | 0 .../m/MUMmer/MUMmer-3.23-ictce-4.1.13-Perl-5.16.3.eb | 0 .../m/MVAPICH2/MVAPICH2-1.9-iccifort-2011.13.367.eb | 0 .../{ => __archive__}/m/MariaDB/MariaDB-5.5.29-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/m/Meep/Meep-1.2-ictce-4.0.6.eb | 0 .../m/Mercurial/Mercurial-2.3.2-ictce-4.0.6-Python-2.7.3.eb | 0 .../m/Mesa/Mesa-7.11.2-ictce-4.0.6-Python-2.7.3.eb | 0 .../m/Mesa/Mesa-7.11.2-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/m/Mesquite/Mesquite-2.3.0-ictce-4.1.13.eb | 0 .../m/MetaVelvet/MetaVelvet-1.2.01-ictce-4.0.6.eb | 0 .../{ => __archive__}/m/Molden/Molden-5.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/Mono/Mono-2.10.6-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/Mothur/Mothur-1.30.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/MrBayes/MrBayes-3.1.2-ictce-4.0.6.eb | 0 .../{ => __archive__}/m/MrBayes/MrBayes-3.2.0-ictce-4.0.6.eb | 0 .../m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb | 0 .../m/makedepend/makedepend-1.0.4-ictce-3.2.2.u3.eb | 0 .../m/makedepend/makedepend-1.0.4-ictce-4.0.6.eb | 0 .../m/makedepend/makedepend-1.0.4-ictce-4.1.13.eb | 0 .../m/matplotlib/matplotlib-1.1.1-ictce-4.0.6-Python-2.7.3.eb | 0 .../m/matplotlib/matplotlib-1.2.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../m/matplotlib/matplotlib-1.2.1-ictce-4.1.13-Python-2.7.3.eb | 0 .../m/matplotlib/matplotlib-1.3.0-ictce-4.1.13-Python-2.7.5.eb | 0 .../m/matplotlib/matplotlib-1.3.1-ictce-4.1.13-Python-2.7.6.eb | 0 .../easyconfigs/{ => __archive__}/m/mc/mc-4.6.1-ictce-4.0.6.eb | 0 .../m/molmod/molmod-1.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/m/motif/motif-2.2.4-ictce-4.1.13.eb | 0 .../{ => __archive__}/m/motif/motif-2.3.4-ictce-4.1.13.eb | 0 .../m/mpi4py/mpi4py-1.3-ictce-4.0.6-Python-2.7.3.eb | 0 .../m/mpi4py/mpi4py-1.3-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/m/mpiBLAST/mpiBLAST-1.6.0-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/n/NASM/NASM-2.07-ictce-4.0.6.eb | 0 .../{ => __archive__}/n/NASM/NASM-2.07-ictce-4.1.13.eb | 0 .../{ => __archive__}/n/NASM/NASM-2.11.05-ictce-6.3.5.eb | 0 .../n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-ictce-4.0.6.eb | 0 .../{ => __archive__}/n/NCL/NCL-6.0.0-ictce-3.2.2.u3.eb | 0 .../easyconfigs/{ => __archive__}/n/NCL/NCL-6.1.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/n/NEURON/NEURON-7.2-ictce-4.1.13.eb | 0 .../n/NWChem/NWChem-6.1.1-ictce-4.1.13-2012-06-27-Python-2.7.3.eb | 0 .../{ => __archive__}/n/nano/nano-2.2.6-ictce-4.0.6.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-ictce-4.0.10.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-ictce-4.0.6.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-ictce-4.1.13.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-ictce-6.3.5.eb | 0 .../{ => __archive__}/n/ncview/ncview-2.1.2-ictce-4.1.13.eb | 0 .../n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13-mt.eb | 0 .../{ => __archive__}/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13.eb | 0 .../n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-3.2.2.u3.eb | 0 .../n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13-mt.eb | 0 .../n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/n/netCDF/netCDF-4.1.3-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/n/netCDF/netCDF-4.1.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/n/netCDF/netCDF-4.2-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13-mt.eb | 0 .../{ => __archive__}/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13.eb | 0 .../{ => __archive__}/n/numactl/numactl-2.0.8-ictce-4.1.13.eb | 0 .../n/numexpr/numexpr-2.0.1-ictce-4.1.13-Python-2.7.3.eb | 0 .../n/numpy/numpy-1.6.2-ictce-4.0.6-Python-2.7.3.eb | 0 .../n/numpy/numpy-1.6.2-ictce-4.1.13-Python-2.7.3.eb | 0 .../n/numpy/numpy-1.7.1-ictce-4.1.13-Python-2.7.5.eb | 0 .../o/Oger/Oger-1.1.3-ictce-4.0.6-Python-2.7.3.eb | 0 .../o/OpenBabel/OpenBabel-2.3.2-ictce-4.1.13-Python-2.7.3.eb | 0 .../OpenFOAM-Extend/OpenFOAM-Extend-1.6-ictce-4.1.13-20130711.eb | 0 .../{ => __archive__}/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/o/OpenFOAM/OpenFOAM-2.2.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/o/OpenIFS/OpenIFS-38r1v01-ictce-4.1.13.eb | 0 .../o/OpenMPI/OpenMPI-1.6.3-iccifort-2011.13.367.eb | 0 .../{ => __archive__}/o/OpenPGM/OpenPGM-5.2.122-ictce-4.1.13.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.0.6.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.1.13.eb | 0 .../o/orthomcl/orthomcl-2.0.8-ictce-4.1.13-Perl-5.16.3.eb | 0 .../{ => __archive__}/p/PANDAseq/PANDAseq-2.5-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/PAPI/PAPI-5.0.1-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/p/PCRE/PCRE-8.12-ictce-4.0.6.eb | 0 .../p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/p/PP/PP-1.6.4-ictce-4.1.13-Python-2.7.5.eb | 0 .../{ => __archive__}/p/PSI/PSI-4.0b4-ictce-4.1.13-mt.eb | 0 .../easyconfigs/{ => __archive__}/p/PSI/PSI-4.0b4-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/p/ParMETIS/ParMETIS-3.2.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb | 0 .../p/ParMGridGen/ParMGridGen-1.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb | 0 .../{ => __archive__}/p/Pasha/Pasha-1.0.5-ictce-4.0.6.eb | 0 .../{ => __archive__}/p/Perl/Perl-5.16.3-ictce-4.1.13-bare.eb | 0 .../{ => __archive__}/p/Perl/Perl-5.16.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb | 0 .../p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq2.eb | 0 .../p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq3.eb | 0 .../{ => __archive__}/p/Python/Python-2.5.6-ictce-4.0.6-bare.eb | 0 .../{ => __archive__}/p/Python/Python-2.5.6-ictce-4.1.13-bare.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-ictce-4.0.6.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.5-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.6-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/Python/Python-3.2.3-ictce-4.0.6.eb | 0 .../{ => __archive__}/p/Python/Python-3.3.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/packmol/packmol-13.243-ictce-4.1.13.eb | 0 .../p/pandas/pandas-0.11.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/p/parallel/parallel-20130122-ictce-4.0.6.eb | 0 .../p/paycheck/paycheck-1.0.2-ictce-4.1.13-Python-2.7.3.eb | 0 .../p/petsc4py/petsc4py-3.3-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/p/pixman/pixman-0.28.2-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/p/pixman/pixman-0.28.2-ictce-4.1.13.eb | 0 .../p/pkg-config/pkg-config-0.27.1-ictce-4.0.6.eb | 0 .../p/printproto/printproto-1.0.5-ictce-4.1.13.eb | 0 .../{ => __archive__}/p/problog/problog-1.1-ictce-4.1.13.eb | 0 .../p/pyTables/pyTables-2.4.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../python-dateutil-2.1-ictce-4.1.13-Python-2.7.3.eb | 0 .../p/python-meep/python-meep-1.4.2-ictce-4.0.6-Python-2.7.3.eb | 0 .../easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.4-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.4-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.5-ictce-4.1.13.eb | 0 .../q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6-hybrid.eb | 0 .../q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6.eb | 0 .../q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6-hybrid.eb | 0 .../q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/r/R/R-2.15.2-ictce-4.0.10.eb | 0 .../{ => __archive__}/r/R/R-2.15.2-ictce-4.0.6-bare.eb | 0 .../easyconfigs/{ => __archive__}/r/R/R-2.15.2-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/r/R/R-2.15.3-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/r/R/R-3.0.1-ictce-4.0.6-bare.eb | 0 .../{ => __archive__}/r/R/R-3.0.1-ictce-4.1.13-bare.eb | 0 .../{ => __archive__}/r/R/R-3.1.1-ictce-6.3.5-bare-mt.eb | 0 .../{ => __archive__}/r/R/R-3.1.1-ictce-6.3.5-default-mt.eb | 0 .../r/RAxML/RAxML-7.2.6-ictce-4.1.13-hybrid-sse3.eb | 0 .../r/RAxML/RAxML-7.2.6-ictce-4.1.13-mpi-sse3.eb | 0 .../{ => __archive__}/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mt-sse3.eb | 0 .../r/RAxML/RAxML-7.2.6-ictce-4.1.13-seq-sse3.eb | 0 .../easyconfigs/{ => __archive__}/r/RNAz/RNAz-2.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/r/ROOT/ROOT-v5.34.01-ictce-4.0.6.eb | 0 .../{ => __archive__}/r/Rosetta/Rosetta-3.5-ictce-4.1.13.eb | 0 .../{ => __archive__}/s/SAMtools/SAMtools-0.1.18-ictce-4.0.6.eb | 0 .../s/SCOOP/SCOOP-0.5.3-ictce-4.1.13-Python-2.7.3.eb | 0 .../s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb | 0 .../s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.1.13.eb | 0 .../s/SCOTCH/SCOTCH-6.0.0_esmumps-ictce-4.1.13.eb | 0 .../s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.5.eb | 0 .../{ => __archive__}/s/SHRiMP/SHRiMP-2.2.3-ictce-4.0.6.eb | 0 .../s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/s/SOAPdenovo/SOAPdenovo-1.05-ictce-4.0.6.eb | 0 .../s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/s/Sablotron/Sablotron-1.0.3-ictce-4.1.13.eb | 0 .../ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb | 0 .../s/Shapely/Shapely-1.2.15-ictce-4.0.6-Python-2.7.3.eb | 0 .../s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/s/Stacks/Stacks-1.03-ictce-4.1.13.eb | 0 .../{ => __archive__}/s/Stow/Stow-1.3.3-ictce-4.0.6.eb | 0 .../s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb | 0 .../{ => __archive__}/s/Szip/Szip-2.1-ictce-3.2.2.u3.eb | 0 .../easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-ictce-4.0.6.eb | 0 .../easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-ictce-4.1.13.eb | 0 .../s/scikit-learn/scikit-learn-0.13-ictce-4.1.13-Python-2.7.3.eb | 0 .../s/scikit-learn/scikit-learn-0.14-ictce-4.1.13-Python-2.7.5.eb | 0 .../s/scipy/scipy-0.11.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../s/scipy/scipy-0.11.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb | 0 .../s/sparsehash/sparsehash-2.0.2-ictce-4.0.6.eb | 0 .../s/sympy/sympy-0.7.2-ictce-4.1.13-Python-2.7.3.eb | 0 .../t/TAMkin/TAMkin-1.0.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../easyconfigs/{ => __archive__}/t/Tar/Tar-1.26-ictce-4.0.6.eb | 0 .../{ => __archive__}/t/Tcl/Tcl-8.5.12-ictce-4.0.10.eb | 0 .../easyconfigs/{ => __archive__}/t/Tcl/Tcl-8.5.12-ictce-4.0.6.eb | 0 .../t/Theano/Theano-0.5.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/t/TiCCutils/TiCCutils-0.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/t/TiMBL/TiMBL-6.4.3-ictce-4.1.13.eb | 0 .../{ => __archive__}/t/TinySVM/TinySVM-0.09-ictce-4.1.13.eb | 0 .../easyconfigs/{ => __archive__}/t/Tk/Tk-8.5.12-ictce-4.0.10.eb | 0 .../easyconfigs/{ => __archive__}/t/Tk/Tk-8.5.12-ictce-4.0.6.eb | 0 .../{ => __archive__}/t/TopHat/TopHat-2.0.8-ictce-4.0.6.eb | 0 .../t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb | 0 .../t/Trinity/Trinity-2012-10-05-ictce-3.2.2.u3.eb | 0 .../t/Trinity/Trinity-2013-02-25-ictce-4.1.13-jellyfish-1.1.10.eb | 0 .../t/Trinity/Trinity-2013-02-25-ictce-4.1.13.eb | 0 .../{ => __archive__}/t/tcsh/tcsh-6.18.01-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/t/tcsh/tcsh-6.18.01-ictce-4.1.13.eb | 0 .../{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-ictce-4.0.6.eb | 0 .../{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-ictce-4.1.13.eb | 0 .../{ => __archive__}/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../u/util-linux/util-linux-2.22.2-ictce-4.1.13.eb | 0 .../v/VSC-tools/VSC-tools-0.1.2-ictce-4.1.13-Python-2.7.3.eb | 0 .../easyconfigs/{ => __archive__}/v/VTK/VTK-5.10.1-ictce-4.0.6.eb | 0 .../v/VTK/VTK-6.0.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/v/Velvet/Velvet-1.2.07-ictce-4.0.6.eb | 0 .../{ => __archive__}/v/ViennaRNA/ViennaRNA-2.0.7-ictce-4.0.6.eb | 0 .../v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb | 0 .../{ => __archive__}/w/WIEN2k/WIEN2k-12.1-ictce-4.0.6.eb | 0 .../{ => __archive__}/w/WPS/WPS-3.3.1-ictce-3.2.2.u3-dmpar.eb | 0 .../{ => __archive__}/w/WPS/WPS-3.4-ictce-3.2.2.u3-dmpar.eb | 0 .../{ => __archive__}/w/WPS/WPS-3.5-ictce-4.1.13-dmpar.eb | 0 .../{ => __archive__}/w/WPS/WPS-3.5.1-ictce-4.1.13-dmpar.eb | 0 .../{ => __archive__}/w/WRF/WRF-3.3.1-ictce-3.2.2.u3-dmpar.eb | 0 .../{ => __archive__}/w/WRF/WRF-3.4-ictce-3.2.2.u3-dmpar.eb | 0 .../{ => __archive__}/w/WRF/WRF-3.5-ictce-4.1.13-dmpar.eb | 0 .../{ => __archive__}/w/WRF/WRF-3.5.1-ictce-4.1.13-dmpar.eb | 0 .../{ => __archive__}/x/XCrySDen/XCrySDen-1.5.53-ictce-4.0.6.eb | 0 .../x/XML-LibXML/XML-LibXML-2.0018-ictce-4.1.13-Perl-5.16.3.eb | 0 .../x/XML-Simple/XML-Simple-2.20-ictce-4.1.13-Perl-5.16.3.eb | 0 .../{ => __archive__}/x/XML/XML-3.95-0.1-ictce-4.0.6-R-2.15.2.eb | 0 .../{ => __archive__}/x/xbitmaps/xbitmaps-1.1.1-ictce-4.1.13.eb | 0 .../x/xcb-proto/xcb-proto-1.7-ictce-4.0.6-Python-2.7.3.eb | 0 .../x/xcb-proto/xcb-proto-1.7-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/x/xextproto/xextproto-7.2.1-ictce-4.1.13.eb | 0 .../x/xorg-macros/xorg-macros-1.17-ictce-4.0.6.eb | 0 .../x/xorg-macros/xorg-macros-1.17-ictce-4.1.13.eb | 0 .../{ => __archive__}/x/xproto/xproto-7.0.23-ictce-4.0.6.eb | 0 .../{ => __archive__}/x/xproto/xproto-7.0.23-ictce-4.1.13.eb | 0 .../{ => __archive__}/x/xtrans/xtrans-1.2-ictce-4.1.13.eb | 0 .../y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb | 0 .../{ => __archive__}/y/YamCha/YamCha-0.33-ictce-4.1.13.eb | 0 .../{ => __archive__}/y/Yasm/Yasm-1.2.0-ictce-4.0.6.eb | 0 .../y/yaff/yaff-1.0-ictce-4.1.13-Python-2.7.3.eb | 0 .../{ => __archive__}/z/ZeroMQ/ZeroMQ-2.2.0-ictce-4.1.13.eb | 0 .../{ => __archive__}/z/ZeroMQ/ZeroMQ-3.2.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.5-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.5-ictce-4.0.6.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.5-ictce-4.1.13.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-ictce-3.2.2.u3.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-ictce-4.0.10.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-ictce-4.0.6.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-ictce-4.1.13.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.8-ictce-4.1.13.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.8-ictce-6.3.5.eb | 0 .../easyconfigs/{ => __archive__}/z/zsh/zsh-5.0.2-ictce-4.1.13.eb | 0 .../{ => __archive__}/z/zsync/zsync-0.6.2-ictce-4.0.6.eb | 0 539 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/a/ABySS/ABySS-1.3.4-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ALADIN/ALADIN-36t1_op2bf1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/AMOS/AMOS-3.1.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ARB/ARB-5.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ASE/ASE-3.6.0.2515-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/AnalyzeFMRI/AnalyzeFMRI-1.1-15-ictce-4.0.10-R-2.15.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/Autoconf/Autoconf-2.69-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/Autoconf/Autoconf-2.69-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/Automake/Automake-1.13.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/a2ps/a2ps-4.14-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/aria2/aria2-1.15.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BEDTools/BEDTools-2.17.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BFAST/BFAST-0.7.0a-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BLAST+/BLAST+-2.2.27-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BLAST+/BLAST+-2.2.28-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BWA/BWA-0.6.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BWA/BWA-0.7.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BioPerl/BioPerl-1.6.1-ictce-4.1.13-Perl-5.16.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.5-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.6.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.7-iccifort-2011.13.367.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.7-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bonnie++/Bonnie++-1.03e-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.51.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.51.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.51.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.53.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.53.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bowtie/Bowtie-1.0.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bowtie2/Bowtie2-2.0.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/beagle-lib/beagle-lib-20120124-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/byacc/byacc-20120526-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CCfits/CCfits-2.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CFITSIO/CFITSIO-3.34-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CLHEP/CLHEP-2.1.1.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.10.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.10.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.12-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.4-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CP2K/CP2K-20111205-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CRF++/CRF++-0.57-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CVXOPT/CVXOPT-1.1.5-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/ClustalW2/ClustalW2-2.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Corkscrew/Corkscrew-2.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Cython/Cython-0.16-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Cython/Cython-0.16-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Cython/Cython-0.19.1-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.27.0-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.27.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.28.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cairo/cairo-1.12.14-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cairo/cairo-1.12.14-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/ccache/ccache-3.1.9-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cflow/cflow-1.4-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgdb/cgdb-0.6.5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/DB/DB-4.7.25-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/DB/DB-6.0.20-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-4.1.13-no-gui.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Doxygen/Doxygen-1.8.1.1-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Doxygen/Doxygen-1.8.1.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Doxygen/Doxygen-1.8.1.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Doxygen/Doxygen-1.8.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Doxygen/Doxygen-1.8.3.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ELinks/ELinks-0.12pre5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/EMBOSS/EMBOSS-6.5.7-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ESMF/ESMF-5.3.0-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ESMF/ESMF-6.1.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-parallel.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-serial.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/Eigen/Eigen-3.1.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/Eigen/Eigen-3.1.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-ictce-4.1.13-single.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FRC_align/FRC_align-20130521-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FSL/FSL-4.1.9-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FSL/FSL-5.0.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/fastahack/fastahack-20110215-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/fixesproto/fixesproto-5.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.35-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.35-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.37-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/fmri/fmri-1.4-8-ictce-4.0.10-R-2.15.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/fontconfig/fontconfig-2.10.91-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/fontconfig/fontconfig-2.10.91-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freeglut/freeglut-2.8.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freetype/freetype-2.4.10-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freetype/freetype-2.4.10-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freetype/freetype-2.4.11-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freetype/freetype-2.4.11-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freetype/freetype-2.5.0.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GATE/GATE-6.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GATE/GATE-6.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDAL/GDAL-1.9.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GEOS/GEOS-3.3.5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GLib/GLib-2.34.3-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GLib/GLib-2.34.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GMP/GMP-5.0.5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GPAW/GPAW-0.9.0.8965-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GSL/GSL-1.15-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/Geant4/Geant4-9.4.p02-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/Geant4/Geant4-9.5.p01-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/Ghostscript/Ghostscript-9.10-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/Greenlet/Greenlet-0.4.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/Guile/Guile-1.8.8-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/g2clib/g2clib-1.2.3-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/g2clib/g2clib-1.4.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/g2lib/g2lib-1.2.4-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/g2lib/g2lib-1.4.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/git/git-1.7.12-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/glproto/glproto-1.4.16-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/glproto/glproto-1.4.16-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gnuplot/gnuplot-4.6.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gperf/gperf-3.0.4-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/grib_api/grib_api-1.10.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/grib_api/grib_api-1.9.18-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF/HDF-4.2.7-patch1-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF/HDF-4.2.8-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.10-ictce-4.1.13-no-mpi.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.10-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.12-ictce-4.1.13-zlib-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.7-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.7-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.9-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.9-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HMMER/HMMER-3.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-ictce-6.0.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-ictce-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HTSeq/HTSeq-0.5.4p5-ictce-4.1.13-Python-2.7.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/Harminv/Harminv-1.3.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/h5py/h5py-2.0.1-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/h5py/h5py-2.0.1-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/h5py/h5py-2.1.3-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/h5py/h5py-2.2.1-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/h5utils/h5utils-1.12.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/horton/horton-1.0.2-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/horton/horton-1.1.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/horton/horton-1.2.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/horton/horton-1.2.1-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/hwloc/hwloc-1.6-iccifort-2011.13.367.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/Infernal/Infernal-1.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/Infernal/Infernal-1.1rc1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/Iperf/Iperf-2.0.5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/IronPython/IronPython-2.7-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iccifort/iccifort-11.1.073-32bit.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iccifort/iccifort-11.1.073.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iccifort/iccifort-2011.10.319.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iccifort/iccifort-2011.13.367.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iccifort/iccifort-2011.6.233.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iccifort/iccifort-2013.1.117.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iccifort/iccifort-2013_sp1.0.080.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iccifort/iccifort-2013_sp1.3.174.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-3.2.2.u3-32bit.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-5.1.1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-6.0.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/ictce/ictce-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-3.2.2.u3-32bit.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-5.1.1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-6.0.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/iimpi/iimpi-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imake/imake-1.0.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3-32bit.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-10.3.10.319-iimpi-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-10.3.12.361-iimpi-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-10.3.6.233-iimpi-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-11.0.1.117-iimpi-5.1.1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-11.1.0.080-iimpi-6.0.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-11.1.3.174-iimpi-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/impi/impi-4.0.0.028-iccifort-11.1.073-32bit.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/impi/impi-4.0.0.028-iccifort-11.1.073.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/impi/impi-4.0.2.003-iccifort-2011.10.319.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/impi/impi-4.0.2.003-iccifort-2011.6.233.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/impi/impi-4.1.0.027-iccifort-2011.13.367.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/impi/impi-4.1.0.027-iccifort-2013.1.117.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/impi/impi-4.1.1.036-iccifort-2013_sp1.0.080.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/impi/impi-4.1.3.049-iccifort-2013_sp1.3.174.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/inputproto/inputproto-2.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/j/JasPer/JasPer-1.900.1-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/j/JasPer/JasPer-1.900.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/k/kbproto/kbproto-1.0.6-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LIBSVM/LIBSVM-3.17-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LZO/LZO-2.06-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LZO/LZO-2.06-ictce-5.1.1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LibTIFF/LibTIFF-4.0.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/Libint/Libint-1.1.4-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/Libint/Libint-1.1.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/Libint/Libint-2.0.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libICE/libICE-1.0.8-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libSM/libSM-1.2.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libX11/libX11-1.6.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXau/libXau-1.0.8-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXaw/libXaw-1.0.12-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXext/libXext-1.3.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXfixes/libXfixes-5.0.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXi/libXi-1.7.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXmu/libXmu-1.1.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXp/libXp-1.0.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXpm/libXpm-3.5.11-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXt/libXt-1.1.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libXtst/libXtst-1.2.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libctl/libctl-3.2.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libdrm/libdrm-2.4.27-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libdrm/libdrm-2.4.27-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libffi/libffi-3.0.11-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libffi/libffi-3.0.13-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libffi/libffi-3.0.13-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libgtextutils/libgtextutils-0.6.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libharu/libharu-2.2.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libjpeg-turbo/libjpeg-turbo-1.3.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libjpeg-turbo/libjpeg-turbo-1.3.1-ictce-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libmatheval/libmatheval-1.1.8-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpciaccess/libpciaccess-0.13.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpciaccess/libpciaccess-0.13.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.10-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.10-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.11-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.11-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.13-ictce-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.13-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.13-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.14-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.14-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.6.12-ictce-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.6.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.6.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.6.3-ictce-4.1.13-zlib-1.2.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.6.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.6.6-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-ictce-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.3-ictce-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libtool/libtool-2.4.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libtool/libtool-2.4.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libunistring/libunistring-0.9.3-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxc/libxc-2.0.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxc/libxc-2.0.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxc/libxc-2.0.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxcb/libxcb-1.8-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxcb/libxcb-1.8-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.8.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.8.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxslt/libxslt-1.1.28-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxslt/libxslt-1.1.28-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/likwid/likwid-3.0.0-ictce-4.1.13-pinomp.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/likwid/likwid-3.0.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/likwid/likwid-4.0.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/lynx/lynx-2.8.7-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-iccifort-2011.13.367.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MCL/MCL-12.135-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MCL/MCL-12.135-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MDP/MDP-3.3-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MEME/MEME-4.8.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-4.0.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-4.0.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-5.0.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-5.0.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-5.1.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-metis.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-parmetis.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MUMmer/MUMmer-3.23-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MUMmer/MUMmer-3.23-ictce-4.1.13-Perl-5.16.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MVAPICH2/MVAPICH2-1.9-iccifort-2011.13.367.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MariaDB/MariaDB-5.5.29-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Meep/Meep-1.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mercurial/Mercurial-2.3.2-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mesa/Mesa-7.11.2-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mesa/Mesa-7.11.2-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mesquite/Mesquite-2.3.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MetaVelvet/MetaVelvet-1.2.01-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Molden/Molden-5.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mono/Mono-2.10.6-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mothur/Mothur-1.30.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MrBayes/MrBayes-3.1.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MrBayes/MrBayes-3.2.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/makedepend/makedepend-1.0.4-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/makedepend/makedepend-1.0.4-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/makedepend/makedepend-1.0.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/matplotlib/matplotlib-1.1.1-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/matplotlib/matplotlib-1.2.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/matplotlib/matplotlib-1.2.1-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/matplotlib/matplotlib-1.3.0-ictce-4.1.13-Python-2.7.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/matplotlib/matplotlib-1.3.1-ictce-4.1.13-Python-2.7.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/mc/mc-4.6.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/molmod/molmod-1.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/motif/motif-2.2.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/motif/motif-2.3.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/mpi4py/mpi4py-1.3-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/mpi4py/mpi4py-1.3-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/mpiBLAST/mpiBLAST-1.6.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NASM/NASM-2.07-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NASM/NASM-2.07-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NASM/NASM-2.11.05-ictce-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NCL/NCL-6.0.0-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NCL/NCL-6.1.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NEURON/NEURON-7.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NWChem/NWChem-6.1.1-ictce-4.1.13-2012-06-27-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/nano/nano-2.2.6-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-ictce-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-ictce-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncview/ncview-2.1.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF/netCDF-4.1.3-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF/netCDF-4.1.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF/netCDF-4.2-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/numactl/numactl-2.0.8-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/numexpr/numexpr-2.0.1-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/numpy/numpy-1.6.2-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/numpy/numpy-1.6.2-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/numpy/numpy-1.7.1-ictce-4.1.13-Python-2.7.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/Oger/Oger-1.1.3-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBabel/OpenBabel-2.3.2-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenFOAM-Extend/OpenFOAM-Extend-1.6-ictce-4.1.13-20130711.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenFOAM/OpenFOAM-2.2.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenIFS/OpenIFS-38r1v01-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenMPI/OpenMPI-1.6.3-iccifort-2011.13.367.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenPGM/OpenPGM-5.2.122-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/orthomcl/orthomcl-2.0.8-ictce-4.1.13-Perl-5.16.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PANDAseq/PANDAseq-2.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PAPI/PAPI-5.0.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PCRE/PCRE-8.12-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PP/PP-1.6.4-ictce-4.1.13-Python-2.7.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PSI/PSI-4.0b4-ictce-4.1.13-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PSI/PSI-4.0b4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParMETIS/ParMETIS-3.2.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParMGridGen/ParMGridGen-1.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Pasha/Pasha-1.0.5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Perl/Perl-5.16.3-ictce-4.1.13-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Perl/Perl-5.16.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.5.6-ictce-4.0.6-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.5.6-ictce-4.1.13-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.6-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-3.2.3-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-3.3.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/packmol/packmol-13.243-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/pandas/pandas-0.11.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/parallel/parallel-20130122-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/paycheck/paycheck-1.0.2-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/petsc4py/petsc4py-3.3-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/pixman/pixman-0.28.2-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/pixman/pixman-0.28.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/pkg-config/pkg-config-0.27.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/printproto/printproto-1.0.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/problog/problog-1.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/pyTables/pyTables-2.4.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/python-dateutil/python-dateutil-2.1-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/python-meep/python-meep-1.4.2-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.4-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.4-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-2.15.2-ictce-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-2.15.2-ictce-4.0.6-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-2.15.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-2.15.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-3.0.1-ictce-4.0.6-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-3.0.1-ictce-4.1.13-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-3.1.1-ictce-6.3.5-bare-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-3.1.1-ictce-6.3.5-default-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/RAxML/RAxML-7.2.6-ictce-4.1.13-hybrid-sse3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mpi-sse3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mt-sse3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/RAxML/RAxML-7.2.6-ictce-4.1.13-seq-sse3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/RNAz/RNAz-2.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/ROOT/ROOT-v5.34.01-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/Rosetta/Rosetta-3.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SAMtools/SAMtools-0.1.18-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCOOP/SCOOP-0.5.3-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCOTCH/SCOTCH-6.0.0_esmumps-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SHRiMP/SHRiMP-2.2.3-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SOAPdenovo/SOAPdenovo-1.05-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Sablotron/Sablotron-1.0.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Shapely/Shapely-1.2.15-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Stacks/Stacks-1.03-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Stow/Stow-1.3.3-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/scikit-learn/scikit-learn-0.13-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/scikit-learn/scikit-learn-0.14-ictce-4.1.13-Python-2.7.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/scipy/scipy-0.11.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/scipy/scipy-0.11.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/sparsehash/sparsehash-2.0.2-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/sympy/sympy-0.7.2-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TAMkin/TAMkin-1.0.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tar/Tar-1.26-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tcl/Tcl-8.5.12-ictce-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tcl/Tcl-8.5.12-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Theano/Theano-0.5.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TiCCutils/TiCCutils-0.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TiMBL/TiMBL-6.4.3-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TinySVM/TinySVM-0.09-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tk/Tk-8.5.12-ictce-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tk/Tk-8.5.12-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TopHat/TopHat-2.0.8-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Trinity/Trinity-2012-10-05-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Trinity/Trinity-2013-02-25-ictce-4.1.13-jellyfish-1.1.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Trinity/Trinity-2013-02-25-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/tcsh/tcsh-6.18.01-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/tcsh/tcsh-6.18.01-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/util-linux/util-linux-2.22.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/VSC-tools/VSC-tools-0.1.2-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/VTK/VTK-5.10.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/VTK/VTK-6.0.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Velvet/Velvet-1.2.07-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/ViennaRNA/ViennaRNA-2.0.7-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WIEN2k/WIEN2k-12.1-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WPS/WPS-3.3.1-ictce-3.2.2.u3-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WPS/WPS-3.4-ictce-3.2.2.u3-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WPS/WPS-3.5-ictce-4.1.13-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WPS/WPS-3.5.1-ictce-4.1.13-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WRF/WRF-3.3.1-ictce-3.2.2.u3-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WRF/WRF-3.4-ictce-3.2.2.u3-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WRF/WRF-3.5-ictce-4.1.13-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WRF/WRF-3.5.1-ictce-4.1.13-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/XCrySDen/XCrySDen-1.5.53-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/XML-LibXML/XML-LibXML-2.0018-ictce-4.1.13-Perl-5.16.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/XML-Simple/XML-Simple-2.20-ictce-4.1.13-Perl-5.16.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/XML/XML-3.95-0.1-ictce-4.0.6-R-2.15.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xbitmaps/xbitmaps-1.1.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xcb-proto/xcb-proto-1.7-ictce-4.0.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xcb-proto/xcb-proto-1.7-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xextproto/xextproto-7.2.1-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xorg-macros/xorg-macros-1.17-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xorg-macros/xorg-macros-1.17-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xproto/xproto-7.0.23-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xproto/xproto-7.0.23-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xtrans/xtrans-1.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/y/YamCha/YamCha-0.33-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/y/Yasm/Yasm-1.2.0-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/y/yaff/yaff-1.0-ictce-4.1.13-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/ZeroMQ/ZeroMQ-2.2.0-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/ZeroMQ/ZeroMQ-3.2.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.5-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.5-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.5-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-ictce-3.2.2.u3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-ictce-4.0.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-ictce-4.0.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.8-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.8-ictce-6.3.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zsh/zsh-5.0.2-ictce-4.1.13.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zsync/zsync-0.6.2-ictce-4.0.6.eb (100%) diff --git a/easybuild/easyconfigs/a/ABySS/ABySS-1.3.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/a/ABySS/ABySS-1.3.4-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/a/ABySS/ABySS-1.3.4-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/a/ABySS/ABySS-1.3.4-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/a/ALADIN/ALADIN-36t1_op2bf1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/a/ALADIN/ALADIN-36t1_op2bf1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/a/ALADIN/ALADIN-36t1_op2bf1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/a/ALADIN/ALADIN-36t1_op2bf1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/a/AMOS/AMOS-3.1.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/a/AMOS/AMOS-3.1.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/a/AMOS/AMOS-3.1.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/a/AMOS/AMOS-3.1.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/a/ARB/ARB-5.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/a/ARB/ARB-5.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/a/ARB/ARB-5.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/a/ARB/ARB-5.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/a/ASE/ASE-3.6.0.2515-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/a/ASE/ASE-3.6.0.2515-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/a/ASE/ASE-3.6.0.2515-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/a/ASE/ASE-3.6.0.2515-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/a/AnalyzeFMRI/AnalyzeFMRI-1.1-15-ictce-4.0.10-R-2.15.2.eb b/easybuild/easyconfigs/__archive__/a/AnalyzeFMRI/AnalyzeFMRI-1.1-15-ictce-4.0.10-R-2.15.2.eb similarity index 100% rename from easybuild/easyconfigs/a/AnalyzeFMRI/AnalyzeFMRI-1.1-15-ictce-4.0.10-R-2.15.2.eb rename to easybuild/easyconfigs/__archive__/a/AnalyzeFMRI/AnalyzeFMRI-1.1-15-ictce-4.0.10-R-2.15.2.eb diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/a/Armadillo/Armadillo-2.4.4-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/a/Autoconf/Autoconf-2.69-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/a/Autoconf/Autoconf-2.69-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/a/Autoconf/Autoconf-2.69-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/a/Autoconf/Autoconf-2.69-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.13.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/a/Automake/Automake-1.13.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/a/Automake/Automake-1.13.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/a/Automake/Automake-1.13.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/a/a2ps/a2ps-4.14-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/a/a2ps/a2ps-4.14-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/a/a2ps/a2ps-4.14-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/a/a2ps/a2ps-4.14-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/a/aria2/aria2-1.15.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/a/aria2/aria2-1.15.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/a/aria2/aria2-1.15.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/a/aria2/aria2-1.15.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/BEDTools/BEDTools-2.17.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/BEDTools/BEDTools-2.17.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/BEDTools/BEDTools-2.17.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/BEDTools/BEDTools-2.17.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/BFAST/BFAST-0.7.0a-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/BFAST/BFAST-0.7.0a-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/BFAST/BFAST-0.7.0a-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/BFAST/BFAST-0.7.0a-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/BLAST+/BLAST+-2.2.27-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/BLAST+/BLAST+-2.2.27-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/BLAST+/BLAST+-2.2.27-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/BLAST+/BLAST+-2.2.27-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/BLAST+/BLAST+-2.2.28-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/BLAST+/BLAST+-2.2.28-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/BLAST+/BLAST+-2.2.28-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/BLAST+/BLAST+-2.2.28-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/BWA/BWA-0.6.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/BWA/BWA-0.6.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/BWA/BWA-0.6.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/BWA/BWA-0.6.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/BWA/BWA-0.7.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/BWA/BWA-0.7.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/BWA/BWA-0.7.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/BWA/BWA-0.7.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/BiSearch/BiSearch-20051222-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/BioPerl/BioPerl-1.6.1-ictce-4.1.13-Perl-5.16.3.eb b/easybuild/easyconfigs/__archive__/b/BioPerl/BioPerl-1.6.1-ictce-4.1.13-Perl-5.16.3.eb similarity index 100% rename from easybuild/easyconfigs/b/BioPerl/BioPerl-1.6.1-ictce-4.1.13-Perl-5.16.3.eb rename to easybuild/easyconfigs/__archive__/b/BioPerl/BioPerl-1.6.1-ictce-4.1.13-Perl-5.16.3.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.5-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.5-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.6.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.6.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.6.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.6.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.7-iccifort-2011.13.367.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-iccifort-2011.13.367.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.7-iccifort-2011.13.367.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-iccifort-2011.13.367.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.7-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.7-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/Bonnie++/Bonnie++-1.03e-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/Bonnie++/Bonnie++-1.03e-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/Bonnie++/Bonnie++-1.03e-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/Bonnie++/Bonnie++-1.03e-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.49.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.51.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.51.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.51.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.51.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.51.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.51.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.53.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.53.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.53.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.53.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.53.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.53.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.53.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.53.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/Bowtie/Bowtie-1.0.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/Bowtie/Bowtie-1.0.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/Bowtie/Bowtie-1.0.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/Bowtie/Bowtie-1.0.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/b/Bowtie2/Bowtie2-2.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/Bowtie2/Bowtie2-2.0.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/Bowtie2/Bowtie2-2.0.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/Bowtie2/Bowtie2-2.0.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/beagle-lib/beagle-lib-20120124-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/beagle-lib/beagle-lib-20120124-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/byacc/byacc-20120526-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/byacc/byacc-20120526-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/byacc/byacc-20120526-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/byacc/byacc-20120526-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/CCfits/CCfits-2.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/CCfits/CCfits-2.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/CCfits/CCfits-2.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/CCfits/CCfits-2.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.34-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/CFITSIO/CFITSIO-3.34-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/CFITSIO/CFITSIO-3.34-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/CFITSIO/CFITSIO-3.34-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/c/CGAL/CGAL-4.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/CLHEP/CLHEP-2.1.1.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/c/CLHEP/CLHEP-2.1.1.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/c/CLHEP/CLHEP-2.1.1.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/c/CLHEP/CLHEP-2.1.1.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.12-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.12-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-20111205-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K-20111205-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/c/CRF++/CRF++-0.57-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/CRF++/CRF++-0.57-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/CRF++/CRF++-0.57-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/CRF++/CRF++-0.57-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/CVXOPT/CVXOPT-1.1.5-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/c/CVXOPT/CVXOPT-1.1.5-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/CVXOPT/CVXOPT-1.1.5-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/c/CVXOPT/CVXOPT-1.1.5-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/ClustalW2/ClustalW2-2.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/c/ClustalW2/ClustalW2-2.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/c/ClustalW2/ClustalW2-2.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/c/ClustalW2/ClustalW2-2.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/c/Corkscrew/Corkscrew-2.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/c/Corkscrew/Corkscrew-2.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/c/Corkscrew/Corkscrew-2.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/c/Corkscrew/Corkscrew-2.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.16-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/c/Cython/Cython-0.16-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/Cython/Cython-0.16-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/c/Cython/Cython-0.16-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.16-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/c/Cython/Cython-0.16-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/Cython/Cython-0.16-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/c/Cython/Cython-0.16-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.19.1-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/c/Cython/Cython-0.19.1-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/Cython/Cython-0.19.1-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/c/Cython/Cython-0.19.1-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.27.0-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.27.0-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.27.0-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.27.0-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.27.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.27.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.27.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.27.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.28.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.28.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.28.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.28.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.12.14-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/c/cairo/cairo-1.12.14-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/c/cairo/cairo-1.12.14-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/c/cairo/cairo-1.12.14-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.12.14-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/c/cairo/cairo-1.12.14-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/c/cairo/cairo-1.12.14-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/c/cairo/cairo-1.12.14-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/c/ccache/ccache-3.1.9-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/c/ccache/ccache-3.1.9-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/c/ccache/ccache-3.1.9-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/c/ccache/ccache-3.1.9-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/c/cflow/cflow-1.4-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/c/cflow/cflow-1.4-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/c/cflow/cflow-1.4-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/c/cflow/cflow-1.4-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/c/cgdb/cgdb-0.6.5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/c/cgdb/cgdb-0.6.5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/c/cgdb/cgdb-0.6.5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/c/cgdb/cgdb-0.6.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/d/DB/DB-4.7.25-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/d/DB/DB-4.7.25-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/d/DB/DB-4.7.25-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/d/DB/DB-4.7.25-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/d/DB/DB-6.0.20-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/d/DB/DB-6.0.20-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/d/DB/DB-6.0.20-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/d/DB/DB-6.0.20-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-4.1.13-no-gui.eb b/easybuild/easyconfigs/__archive__/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-4.1.13-no-gui.eb similarity index 100% rename from easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-4.1.13-no-gui.eb rename to easybuild/easyconfigs/__archive__/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-4.1.13-no-gui.eb diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/d/DOLFIN/DOLFIN-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/d/Docutils/Docutils-0.9.1-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.1.1-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.1.1-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.1.1-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.1.1-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.1.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.1.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.1.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.1.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.1.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.1.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.1.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.3.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.3.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.3.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.3.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/e/ELinks/ELinks-0.12pre5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/e/ELinks/ELinks-0.12pre5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/e/ELinks/ELinks-0.12pre5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/e/ELinks/ELinks-0.12pre5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/e/EMBOSS/EMBOSS-6.5.7-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/e/EMBOSS/EMBOSS-6.5.7-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/e/EMBOSS/EMBOSS-6.5.7-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/e/EMBOSS/EMBOSS-6.5.7-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/e/ESMF/ESMF-5.3.0-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/e/ESMF/ESMF-5.3.0-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/e/ESMF/ESMF-5.3.0-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/e/ESMF/ESMF-5.3.0-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/e/ESMF/ESMF-6.1.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/e/ESMF/ESMF-6.1.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/e/ESMF/ESMF-6.1.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/e/ESMF/ESMF-6.1.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-parallel.eb b/easybuild/easyconfigs/__archive__/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-parallel.eb similarity index 100% rename from easybuild/easyconfigs/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-parallel.eb rename to easybuild/easyconfigs/__archive__/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-parallel.eb diff --git a/easybuild/easyconfigs/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-serial.eb b/easybuild/easyconfigs/__archive__/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-serial.eb similarity index 100% rename from easybuild/easyconfigs/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-serial.eb rename to easybuild/easyconfigs/__archive__/e/ESPResSo/ESPResSo-3.1.1-ictce-4.0.6-serial.eb diff --git a/easybuild/easyconfigs/e/Eigen/Eigen-3.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/e/Eigen/Eigen-3.1.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/e/Eigen/Eigen-3.1.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/e/Eigen/Eigen-3.1.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/e/Eigen/Eigen-3.1.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/e/Eigen/Eigen-3.1.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/e/Eigen/Eigen-3.1.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/e/Eigen/Eigen-3.1.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/f/FFC/FFC-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-ictce-4.1.13-single.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-ictce-4.1.13-single.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-ictce-4.1.13-single.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-ictce-4.1.13-single.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/f/FIAT/FIAT-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/f/FRC_align/FRC_align-20130521-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/FRC_align/FRC_align-20130521-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/FRC_align/FRC_align-20130521-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/FRC_align/FRC_align-20130521-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/f/FSL/FSL-4.1.9-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/f/FSL/FSL-4.1.9-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/f/FSL/FSL-4.1.9-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/f/FSL/FSL-5.0.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/FSL/FSL-5.0.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/FSL/FSL-5.0.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/FSL/FSL-5.0.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/fastahack/fastahack-20110215-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/fastahack/fastahack-20110215-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/fastahack/fastahack-20110215-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/fastahack/fastahack-20110215-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/fixesproto/fixesproto-5.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/fixesproto/fixesproto-5.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/fixesproto/fixesproto-5.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/fixesproto/fixesproto-5.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.35-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.37-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.37-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.37-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.37-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/fmri/fmri-1.4-8-ictce-4.0.10-R-2.15.2.eb b/easybuild/easyconfigs/__archive__/f/fmri/fmri-1.4-8-ictce-4.0.10-R-2.15.2.eb similarity index 100% rename from easybuild/easyconfigs/f/fmri/fmri-1.4-8-ictce-4.0.10-R-2.15.2.eb rename to easybuild/easyconfigs/__archive__/f/fmri/fmri-1.4-8-ictce-4.0.10-R-2.15.2.eb diff --git a/easybuild/easyconfigs/f/fontconfig/fontconfig-2.10.91-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/f/fontconfig/fontconfig-2.10.91-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/f/fontconfig/fontconfig-2.10.91-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/f/fontconfig/fontconfig-2.10.91-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/f/fontconfig/fontconfig-2.10.91-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/fontconfig/fontconfig-2.10.91-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/fontconfig/fontconfig-2.10.91-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/fontconfig/fontconfig-2.10.91-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/freeglut/freeglut-2.8.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/freeglut/freeglut-2.8.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/freeglut/freeglut-2.8.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/freeglut/freeglut-2.8.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.4.10-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.10-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/f/freetype/freetype-2.4.10-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.10-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.4.10-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.10-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/freetype/freetype-2.4.10-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.10-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.4.11-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.11-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/f/freetype/freetype-2.4.11-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.11-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.4.11-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.11-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/freetype/freetype-2.4.11-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.11-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.5.0.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/f/freetype/freetype-2.5.0.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/f/freetype/freetype-2.5.0.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/f/freetype/freetype-2.5.0.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/GATE/GATE-6.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/GATE/GATE-6.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/GATE/GATE-6.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/GATE/GATE-6.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/GATE/GATE-6.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/GATE/GATE-6.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/GATE/GATE-6.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/GATE/GATE-6.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/GDAL/GDAL-1.9.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/GDAL/GDAL-1.9.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/GDAL/GDAL-1.9.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/GDAL/GDAL-1.9.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/GEOS/GEOS-3.3.5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/GEOS/GEOS-3.3.5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/GEOS/GEOS-3.3.5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/GEOS/GEOS-3.3.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/GLib/GLib-2.34.3-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/GLib/GLib-2.34.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/GLib/GLib-2.34.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/GLib/GLib-2.34.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/GMP/GMP-5.0.5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/GMP/GMP-5.0.5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/GMP/GMP-5.0.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/GPAW/GPAW-0.9.0.8965-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/g/GPAW/GPAW-0.9.0.8965-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/g/GPAW/GPAW-0.9.0.8965-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/g/GPAW/GPAW-0.9.0.8965-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/GSL/GSL-1.15-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/GSL/GSL-1.15-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/Geant4/Geant4-9.4.p02-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/Geant4/Geant4-9.4.p02-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/Geant4/Geant4-9.4.p02-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/Geant4/Geant4-9.4.p02-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/Geant4/Geant4-9.5.p01-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/Geant4/Geant4-9.5.p01-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/Geant4/Geant4-9.5.p01-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/Geant4/Geant4-9.5.p01-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.10-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/Ghostscript/Ghostscript-9.10-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.10-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/Ghostscript/Ghostscript-9.10-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/Greenlet/Greenlet-0.4.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/g/Greenlet/Greenlet-0.4.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/g/Greenlet/Greenlet-0.4.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/g/Greenlet/Greenlet-0.4.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/g/Guile/Guile-1.8.8-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/Guile/Guile-1.8.8-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/Guile/Guile-1.8.8-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/Guile/Guile-1.8.8-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/g2clib/g2clib-1.2.3-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/g/g2clib/g2clib-1.2.3-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/g/g2clib/g2clib-1.2.3-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/g/g2clib/g2clib-1.2.3-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/g/g2clib/g2clib-1.4.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/g2clib/g2clib-1.4.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/g2clib/g2clib-1.4.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/g2clib/g2clib-1.4.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/g2lib/g2lib-1.2.4-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/g/g2lib/g2lib-1.2.4-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/g/g2lib/g2lib-1.2.4-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/g/g2lib/g2lib-1.2.4-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/g/g2lib/g2lib-1.4.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/g2lib/g2lib-1.4.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/g2lib/g2lib-1.4.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/g2lib/g2lib-1.4.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/git/git-1.7.12-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/git/git-1.7.12-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/git/git-1.7.12-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/git/git-1.7.12-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/glproto/glproto-1.4.16-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/glproto/glproto-1.4.16-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/glproto/glproto-1.4.16-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/glproto/glproto-1.4.16-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/glproto/glproto-1.4.16-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/glproto/glproto-1.4.16-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/glproto/glproto-1.4.16-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/glproto/glproto-1.4.16-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/gnuplot/gnuplot-4.6.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/gnuplot/gnuplot-4.6.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/gnuplot/gnuplot-4.6.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/gnuplot/gnuplot-4.6.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/gperf/gperf-3.0.4-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/gperf/gperf-3.0.4-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/gperf/gperf-3.0.4-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/gperf/gperf-3.0.4-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/grib_api/grib_api-1.10.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/grib_api/grib_api-1.10.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/grib_api/grib_api-1.10.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/grib_api/grib_api-1.10.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/grib_api/grib_api-1.9.18-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/grib_api/grib_api-1.9.18-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/grib_api/grib_api-1.9.18-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/grib_api/grib_api-1.9.18-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/h/HDF/HDF-4.2.7-patch1-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/h/HDF/HDF-4.2.7-patch1-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF/HDF-4.2.7-patch1-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/h/HDF/HDF-4.2.7-patch1-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/h/HDF/HDF-4.2.8-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/h/HDF/HDF-4.2.8-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF/HDF-4.2.8-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/h/HDF/HDF-4.2.8-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs-mt.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs-mt.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs-mt.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs-mt.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-ictce-4.1.13-gpfs.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-ictce-4.1.13-no-mpi.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-ictce-4.1.13-no-mpi.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-ictce-4.1.13-no-mpi.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-ictce-4.1.13-no-mpi.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.10-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.10-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.12-ictce-4.1.13-zlib-1.2.7.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.12-ictce-4.1.13-zlib-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.12-ictce-4.1.13-zlib-1.2.7.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.12-ictce-4.1.13-zlib-1.2.7.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.7-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.7-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.7-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.7-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.7-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.7-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.7-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.7-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.9-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.9-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.9-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.9-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.9-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.9-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.9-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.9-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/h/HMMER/HMMER-3.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/h/HMMER/HMMER-3.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/h/HMMER/HMMER-3.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/h/HMMER/HMMER-3.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-ictce-6.0.5.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-ictce-6.0.5.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-ictce-6.0.5.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-ictce-6.0.5.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.1-ictce-6.3.5.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-ictce-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.1-ictce-6.3.5.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-ictce-6.3.5.eb diff --git a/easybuild/easyconfigs/h/HTSeq/HTSeq-0.5.4p5-ictce-4.1.13-Python-2.7.6.eb b/easybuild/easyconfigs/__archive__/h/HTSeq/HTSeq-0.5.4p5-ictce-4.1.13-Python-2.7.6.eb similarity index 100% rename from easybuild/easyconfigs/h/HTSeq/HTSeq-0.5.4p5-ictce-4.1.13-Python-2.7.6.eb rename to easybuild/easyconfigs/__archive__/h/HTSeq/HTSeq-0.5.4p5-ictce-4.1.13-Python-2.7.6.eb diff --git a/easybuild/easyconfigs/h/Harminv/Harminv-1.3.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/h/Harminv/Harminv-1.3.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/h/Harminv/Harminv-1.3.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/h/Harminv/Harminv-1.3.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/h/Hypre/Hypre-2.8.0b-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.0.1-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/h5py/h5py-2.0.1-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/h5py/h5py-2.0.1-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/h5py/h5py-2.0.1-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.0.1-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/h5py/h5py-2.0.1-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/h5py/h5py-2.0.1-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/h5py/h5py-2.0.1-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.1.3-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/h5py/h5py-2.1.3-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/h5py/h5py-2.1.3-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/h5py/h5py-2.1.3-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.2.1-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/h5py/h5py-2.2.1-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/h5py/h5py-2.2.1-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/h5py/h5py-2.2.1-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/h5utils/h5utils-1.12.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/h/h5utils/h5utils-1.12.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/h/h5utils/h5utils-1.12.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/h/h5utils/h5utils-1.12.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/h/horton/horton-1.0.2-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/horton/horton-1.0.2-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/horton/horton-1.0.2-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/horton/horton-1.0.2-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/horton/horton-1.1.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/horton/horton-1.1.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/horton/horton-1.1.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/horton/horton-1.1.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/horton/horton-1.2.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/horton/horton-1.2.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/horton/horton-1.2.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/horton/horton-1.2.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/horton/horton-1.2.1-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/horton/horton-1.2.1-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/horton/horton-1.2.1-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/horton/horton-1.2.1-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.6-iccifort-2011.13.367.eb b/easybuild/easyconfigs/__archive__/h/hwloc/hwloc-1.6-iccifort-2011.13.367.eb similarity index 100% rename from easybuild/easyconfigs/h/hwloc/hwloc-1.6-iccifort-2011.13.367.eb rename to easybuild/easyconfigs/__archive__/h/hwloc/hwloc-1.6-iccifort-2011.13.367.eb diff --git a/easybuild/easyconfigs/i/Infernal/Infernal-1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/i/Infernal/Infernal-1.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/i/Infernal/Infernal-1.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/i/Infernal/Infernal-1.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/i/Infernal/Infernal-1.1rc1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/i/Infernal/Infernal-1.1rc1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/i/Infernal/Infernal-1.1rc1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/i/Infernal/Infernal-1.1rc1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/i/Instant/Instant-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/i/Iperf/Iperf-2.0.5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/i/Iperf/Iperf-2.0.5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/i/Iperf/Iperf-2.0.5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/i/Iperf/Iperf-2.0.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/i/IronPython/IronPython-2.7-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/i/IronPython/IronPython-2.7-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/i/IronPython/IronPython-2.7-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/i/IronPython/IronPython-2.7-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-11.1.073-32bit.eb b/easybuild/easyconfigs/__archive__/i/iccifort/iccifort-11.1.073-32bit.eb similarity index 100% rename from easybuild/easyconfigs/i/iccifort/iccifort-11.1.073-32bit.eb rename to easybuild/easyconfigs/__archive__/i/iccifort/iccifort-11.1.073-32bit.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-11.1.073.eb b/easybuild/easyconfigs/__archive__/i/iccifort/iccifort-11.1.073.eb similarity index 100% rename from easybuild/easyconfigs/i/iccifort/iccifort-11.1.073.eb rename to easybuild/easyconfigs/__archive__/i/iccifort/iccifort-11.1.073.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2011.10.319.eb b/easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2011.10.319.eb similarity index 100% rename from easybuild/easyconfigs/i/iccifort/iccifort-2011.10.319.eb rename to easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2011.10.319.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2011.13.367.eb b/easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2011.13.367.eb similarity index 100% rename from easybuild/easyconfigs/i/iccifort/iccifort-2011.13.367.eb rename to easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2011.13.367.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2011.6.233.eb b/easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2011.6.233.eb similarity index 100% rename from easybuild/easyconfigs/i/iccifort/iccifort-2011.6.233.eb rename to easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2011.6.233.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2013.1.117.eb b/easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2013.1.117.eb similarity index 100% rename from easybuild/easyconfigs/i/iccifort/iccifort-2013.1.117.eb rename to easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2013.1.117.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2013_sp1.0.080.eb b/easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2013_sp1.0.080.eb similarity index 100% rename from easybuild/easyconfigs/i/iccifort/iccifort-2013_sp1.0.080.eb rename to easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2013_sp1.0.080.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2013_sp1.3.174.eb b/easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2013_sp1.3.174.eb similarity index 100% rename from easybuild/easyconfigs/i/iccifort/iccifort-2013_sp1.3.174.eb rename to easybuild/easyconfigs/__archive__/i/iccifort/iccifort-2013_sp1.3.174.eb diff --git a/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3-32bit.eb b/easybuild/easyconfigs/__archive__/i/ictce/ictce-3.2.2.u3-32bit.eb similarity index 100% rename from easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3-32bit.eb rename to easybuild/easyconfigs/__archive__/i/ictce/ictce-3.2.2.u3-32bit.eb diff --git a/easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/i/ictce/ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/i/ictce/ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/i/ictce/ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/i/ictce/ictce-4.0.10.eb b/easybuild/easyconfigs/__archive__/i/ictce/ictce-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/i/ictce/ictce-4.0.10.eb rename to easybuild/easyconfigs/__archive__/i/ictce/ictce-4.0.10.eb diff --git a/easybuild/easyconfigs/i/ictce/ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/i/ictce/ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/i/ictce/ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/i/ictce/ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/i/ictce/ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/i/ictce/ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/i/ictce/ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/i/ictce/ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/i/ictce/ictce-5.1.1.eb b/easybuild/easyconfigs/__archive__/i/ictce/ictce-5.1.1.eb similarity index 100% rename from easybuild/easyconfigs/i/ictce/ictce-5.1.1.eb rename to easybuild/easyconfigs/__archive__/i/ictce/ictce-5.1.1.eb diff --git a/easybuild/easyconfigs/i/ictce/ictce-6.0.5.eb b/easybuild/easyconfigs/__archive__/i/ictce/ictce-6.0.5.eb similarity index 100% rename from easybuild/easyconfigs/i/ictce/ictce-6.0.5.eb rename to easybuild/easyconfigs/__archive__/i/ictce/ictce-6.0.5.eb diff --git a/easybuild/easyconfigs/i/ictce/ictce-6.3.5.eb b/easybuild/easyconfigs/__archive__/i/ictce/ictce-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/i/ictce/ictce-6.3.5.eb rename to easybuild/easyconfigs/__archive__/i/ictce/ictce-6.3.5.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-3.2.2.u3-32bit.eb b/easybuild/easyconfigs/__archive__/i/iimpi/iimpi-3.2.2.u3-32bit.eb similarity index 100% rename from easybuild/easyconfigs/i/iimpi/iimpi-3.2.2.u3-32bit.eb rename to easybuild/easyconfigs/__archive__/i/iimpi/iimpi-3.2.2.u3-32bit.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/i/iimpi/iimpi-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/i/iimpi/iimpi-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/i/iimpi/iimpi-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-4.0.10.eb b/easybuild/easyconfigs/__archive__/i/iimpi/iimpi-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/i/iimpi/iimpi-4.0.10.eb rename to easybuild/easyconfigs/__archive__/i/iimpi/iimpi-4.0.10.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-4.0.6.eb b/easybuild/easyconfigs/__archive__/i/iimpi/iimpi-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/i/iimpi/iimpi-4.0.6.eb rename to easybuild/easyconfigs/__archive__/i/iimpi/iimpi-4.0.6.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-4.1.13.eb b/easybuild/easyconfigs/__archive__/i/iimpi/iimpi-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/i/iimpi/iimpi-4.1.13.eb rename to easybuild/easyconfigs/__archive__/i/iimpi/iimpi-4.1.13.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-5.1.1.eb b/easybuild/easyconfigs/__archive__/i/iimpi/iimpi-5.1.1.eb similarity index 100% rename from easybuild/easyconfigs/i/iimpi/iimpi-5.1.1.eb rename to easybuild/easyconfigs/__archive__/i/iimpi/iimpi-5.1.1.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-6.0.5.eb b/easybuild/easyconfigs/__archive__/i/iimpi/iimpi-6.0.5.eb similarity index 100% rename from easybuild/easyconfigs/i/iimpi/iimpi-6.0.5.eb rename to easybuild/easyconfigs/__archive__/i/iimpi/iimpi-6.0.5.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-6.3.5.eb b/easybuild/easyconfigs/__archive__/i/iimpi/iimpi-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/i/iimpi/iimpi-6.3.5.eb rename to easybuild/easyconfigs/__archive__/i/iimpi/iimpi-6.3.5.eb diff --git a/easybuild/easyconfigs/i/imake/imake-1.0.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/i/imake/imake-1.0.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/i/imake/imake-1.0.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/i/imake/imake-1.0.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3-32bit.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3-32bit.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3-32bit.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3-32bit.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-10.2.6.038-iimpi-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.10.319-iimpi-4.0.10.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-10.3.10.319-iimpi-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-10.3.10.319-iimpi-4.0.10.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-10.3.10.319-iimpi-4.0.10.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-iimpi-4.1.13.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-10.3.12.361-iimpi-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-iimpi-4.1.13.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-10.3.12.361-iimpi-4.1.13.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-iimpi-4.0.6.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-10.3.6.233-iimpi-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-10.3.6.233-iimpi-4.0.6.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-10.3.6.233-iimpi-4.0.6.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.0.1.117-iimpi-5.1.1.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-11.0.1.117-iimpi-5.1.1.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-11.0.1.117-iimpi-5.1.1.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-11.0.1.117-iimpi-5.1.1.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.1.0.080-iimpi-6.0.5.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.0.080-iimpi-6.0.5.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-11.1.0.080-iimpi-6.0.5.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.0.080-iimpi-6.0.5.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.1.3.174-iimpi-6.3.5.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.3.174-iimpi-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-11.1.3.174-iimpi-6.3.5.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.3.174-iimpi-6.3.5.eb diff --git a/easybuild/easyconfigs/i/impi/impi-4.0.0.028-iccifort-11.1.073-32bit.eb b/easybuild/easyconfigs/__archive__/i/impi/impi-4.0.0.028-iccifort-11.1.073-32bit.eb similarity index 100% rename from easybuild/easyconfigs/i/impi/impi-4.0.0.028-iccifort-11.1.073-32bit.eb rename to easybuild/easyconfigs/__archive__/i/impi/impi-4.0.0.028-iccifort-11.1.073-32bit.eb diff --git a/easybuild/easyconfigs/i/impi/impi-4.0.0.028-iccifort-11.1.073.eb b/easybuild/easyconfigs/__archive__/i/impi/impi-4.0.0.028-iccifort-11.1.073.eb similarity index 100% rename from easybuild/easyconfigs/i/impi/impi-4.0.0.028-iccifort-11.1.073.eb rename to easybuild/easyconfigs/__archive__/i/impi/impi-4.0.0.028-iccifort-11.1.073.eb diff --git a/easybuild/easyconfigs/i/impi/impi-4.0.2.003-iccifort-2011.10.319.eb b/easybuild/easyconfigs/__archive__/i/impi/impi-4.0.2.003-iccifort-2011.10.319.eb similarity index 100% rename from easybuild/easyconfigs/i/impi/impi-4.0.2.003-iccifort-2011.10.319.eb rename to easybuild/easyconfigs/__archive__/i/impi/impi-4.0.2.003-iccifort-2011.10.319.eb diff --git a/easybuild/easyconfigs/i/impi/impi-4.0.2.003-iccifort-2011.6.233.eb b/easybuild/easyconfigs/__archive__/i/impi/impi-4.0.2.003-iccifort-2011.6.233.eb similarity index 100% rename from easybuild/easyconfigs/i/impi/impi-4.0.2.003-iccifort-2011.6.233.eb rename to easybuild/easyconfigs/__archive__/i/impi/impi-4.0.2.003-iccifort-2011.6.233.eb diff --git a/easybuild/easyconfigs/i/impi/impi-4.1.0.027-iccifort-2011.13.367.eb b/easybuild/easyconfigs/__archive__/i/impi/impi-4.1.0.027-iccifort-2011.13.367.eb similarity index 100% rename from easybuild/easyconfigs/i/impi/impi-4.1.0.027-iccifort-2011.13.367.eb rename to easybuild/easyconfigs/__archive__/i/impi/impi-4.1.0.027-iccifort-2011.13.367.eb diff --git a/easybuild/easyconfigs/i/impi/impi-4.1.0.027-iccifort-2013.1.117.eb b/easybuild/easyconfigs/__archive__/i/impi/impi-4.1.0.027-iccifort-2013.1.117.eb similarity index 100% rename from easybuild/easyconfigs/i/impi/impi-4.1.0.027-iccifort-2013.1.117.eb rename to easybuild/easyconfigs/__archive__/i/impi/impi-4.1.0.027-iccifort-2013.1.117.eb diff --git a/easybuild/easyconfigs/i/impi/impi-4.1.1.036-iccifort-2013_sp1.0.080.eb b/easybuild/easyconfigs/__archive__/i/impi/impi-4.1.1.036-iccifort-2013_sp1.0.080.eb similarity index 100% rename from easybuild/easyconfigs/i/impi/impi-4.1.1.036-iccifort-2013_sp1.0.080.eb rename to easybuild/easyconfigs/__archive__/i/impi/impi-4.1.1.036-iccifort-2013_sp1.0.080.eb diff --git a/easybuild/easyconfigs/i/impi/impi-4.1.3.049-iccifort-2013_sp1.3.174.eb b/easybuild/easyconfigs/__archive__/i/impi/impi-4.1.3.049-iccifort-2013_sp1.3.174.eb similarity index 100% rename from easybuild/easyconfigs/i/impi/impi-4.1.3.049-iccifort-2013_sp1.3.174.eb rename to easybuild/easyconfigs/__archive__/i/impi/impi-4.1.3.049-iccifort-2013_sp1.3.174.eb diff --git a/easybuild/easyconfigs/i/inputproto/inputproto-2.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/i/inputproto/inputproto-2.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/i/inputproto/inputproto-2.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/i/inputproto/inputproto-2.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/j/JasPer/JasPer-1.900.1-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/j/JasPer/JasPer-1.900.1-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/j/JasPer/JasPer-1.900.1-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/j/JasPer/JasPer-1.900.1-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/j/JasPer/JasPer-1.900.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/j/JasPer/JasPer-1.900.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/j/JasPer/JasPer-1.900.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/j/JasPer/JasPer-1.900.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/j/Jinja2/Jinja2-2.6-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/k/kbproto/kbproto-1.0.6-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/k/kbproto/kbproto-1.0.6-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/k/kbproto/kbproto-1.0.6-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/k/kbproto/kbproto-1.0.6-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/LIBSVM/LIBSVM-3.17-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/LIBSVM/LIBSVM-3.17-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/LIBSVM/LIBSVM-3.17-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/LIBSVM/LIBSVM-3.17-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/LZO/LZO-2.06-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/LZO/LZO-2.06-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/LZO/LZO-2.06-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/LZO/LZO-2.06-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/LZO/LZO-2.06-ictce-5.1.1.eb b/easybuild/easyconfigs/__archive__/l/LZO/LZO-2.06-ictce-5.1.1.eb similarity index 100% rename from easybuild/easyconfigs/l/LZO/LZO-2.06-ictce-5.1.1.eb rename to easybuild/easyconfigs/__archive__/l/LZO/LZO-2.06-ictce-5.1.1.eb diff --git a/easybuild/easyconfigs/l/LibTIFF/LibTIFF-4.0.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/LibTIFF/LibTIFF-4.0.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/LibTIFF/LibTIFF-4.0.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/LibTIFF/LibTIFF-4.0.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/Libint/Libint-1.1.4-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/l/Libint/Libint-1.1.4-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/l/Libint/Libint-1.1.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/Libint/Libint-1.1.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/Libint/Libint-2.0.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/Libint/Libint-2.0.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/Libint/Libint-2.0.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/Libint/Libint-2.0.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libICE/libICE-1.0.8-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libICE/libICE-1.0.8-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libICE/libICE-1.0.8-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libICE/libICE-1.0.8-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libSM/libSM-1.2.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libSM/libSM-1.2.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libSM/libSM-1.2.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libSM/libSM-1.2.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libX11/libX11-1.6.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libX11/libX11-1.6.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libX11/libX11-1.6.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libX11/libX11-1.6.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXau/libXau-1.0.8-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXau/libXau-1.0.8-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXau/libXau-1.0.8-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXau/libXau-1.0.8-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXaw/libXaw-1.0.12-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXaw/libXaw-1.0.12-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXaw/libXaw-1.0.12-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXaw/libXaw-1.0.12-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXext/libXext-1.3.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXext/libXext-1.3.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXext/libXext-1.3.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXext/libXext-1.3.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXfixes/libXfixes-5.0.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXfixes/libXfixes-5.0.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXfixes/libXfixes-5.0.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXfixes/libXfixes-5.0.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXi/libXi-1.7.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXi/libXi-1.7.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXi/libXi-1.7.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXi/libXi-1.7.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXmu/libXmu-1.1.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXmu/libXmu-1.1.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXmu/libXmu-1.1.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXmu/libXmu-1.1.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXp/libXp-1.0.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXp/libXp-1.0.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXp/libXp-1.0.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXp/libXp-1.0.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXpm/libXpm-3.5.11-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXpm/libXpm-3.5.11-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXpm/libXpm-3.5.11-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXpm/libXpm-3.5.11-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXt/libXt-1.1.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXt/libXt-1.1.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXt/libXt-1.1.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXt/libXt-1.1.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libXtst/libXtst-1.2.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libXtst/libXtst-1.2.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libXtst/libXtst-1.2.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libXtst/libXtst-1.2.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libctl/libctl-3.2.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libctl/libctl-3.2.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libctl/libctl-3.2.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libctl/libctl-3.2.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libdrm/libdrm-2.4.27-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libdrm/libdrm-2.4.27-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libdrm/libdrm-2.4.27-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libdrm/libdrm-2.4.27-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libdrm/libdrm-2.4.27-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libdrm/libdrm-2.4.27-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libdrm/libdrm-2.4.27-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libdrm/libdrm-2.4.27-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.11-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.11-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libffi/libffi-3.0.11-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.11-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libffi/libffi-3.0.13-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libffi/libffi-3.0.13-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libgtextutils/libgtextutils-0.6.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libgtextutils/libgtextutils-0.6.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libgtextutils/libgtextutils-0.6.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libgtextutils/libgtextutils-0.6.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libharu/libharu-2.2.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libharu/libharu-2.2.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libharu/libharu-2.2.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libharu/libharu-2.2.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.3.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libjpeg-turbo/libjpeg-turbo-1.3.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.3.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libjpeg-turbo/libjpeg-turbo-1.3.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.3.1-ictce-6.3.5.eb b/easybuild/easyconfigs/__archive__/l/libjpeg-turbo/libjpeg-turbo-1.3.1-ictce-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.3.1-ictce-6.3.5.eb rename to easybuild/easyconfigs/__archive__/l/libjpeg-turbo/libjpeg-turbo-1.3.1-ictce-6.3.5.eb diff --git a/easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.8-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libmatheval/libmatheval-1.1.8-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.8-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libmatheval/libmatheval-1.1.8-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libpciaccess/libpciaccess-0.13.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libpciaccess/libpciaccess-0.13.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libpciaccess/libpciaccess-0.13.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libpciaccess/libpciaccess-0.13.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libpciaccess/libpciaccess-0.13.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libpciaccess/libpciaccess-0.13.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libpciaccess/libpciaccess-0.13.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libpciaccess/libpciaccess-0.13.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.10-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.10-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.10-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.10-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.10-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.10-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.10-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.10-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.11-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.11-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.11-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.11-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.11-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.11-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.11-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.11-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.13-ictce-4.0.10.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.13-ictce-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.13-ictce-4.0.10.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.13-ictce-4.0.10.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.13-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.13-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.13-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.13-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.13-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.13-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.13-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.13-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.14-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.14-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.14-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.14-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.14-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.14-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.14-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.14-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.12-ictce-6.3.5.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.12-ictce-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.6.12-ictce-6.3.5.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.12-ictce-6.3.5.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.6.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.6.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.3-ictce-4.1.13-zlib-1.2.8.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.3-ictce-4.1.13-zlib-1.2.8.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.6.3-ictce-4.1.13-zlib-1.2.8.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.3-ictce-4.1.13-zlib-1.2.8.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.6.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.6-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.6-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.6.6-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.6-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libpthread-stubs/libpthread-stubs-0.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-ictce-4.0.10.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-ictce-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-ictce-4.0.10.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-ictce-4.0.10.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.3-ictce-6.3.5.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.3-ictce-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.3-ictce-6.3.5.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.3-ictce-6.3.5.eb diff --git a/easybuild/easyconfigs/l/libtool/libtool-2.4.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libtool/libtool-2.4.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libtool/libtool-2.4.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libtool/libtool-2.4.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libtool/libtool-2.4.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libtool/libtool-2.4.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libtool/libtool-2.4.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libtool/libtool-2.4.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libunistring/libunistring-0.9.3-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libunistring/libunistring-0.9.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libxc/libxc-2.0.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libxc/libxc-2.0.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libxc/libxc-2.0.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libxc/libxc-2.0.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libxc/libxc-2.0.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libxc/libxc-2.0.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libxcb/libxcb-1.8-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/l/libxcb/libxcb-1.8-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/l/libxcb/libxcb-1.8-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/l/libxcb/libxcb-1.8-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/l/libxcb/libxcb-1.8-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/l/libxcb/libxcb-1.8-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/l/libxcb/libxcb-1.8-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/l/libxcb/libxcb-1.8-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/l/libxslt/libxslt-1.1.28-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/l/libxslt/libxslt-1.1.28-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/libxslt/libxslt-1.1.28-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/libxslt/libxslt-1.1.28-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/likwid/likwid-3.0.0-ictce-4.1.13-pinomp.eb b/easybuild/easyconfigs/__archive__/l/likwid/likwid-3.0.0-ictce-4.1.13-pinomp.eb similarity index 100% rename from easybuild/easyconfigs/l/likwid/likwid-3.0.0-ictce-4.1.13-pinomp.eb rename to easybuild/easyconfigs/__archive__/l/likwid/likwid-3.0.0-ictce-4.1.13-pinomp.eb diff --git a/easybuild/easyconfigs/l/likwid/likwid-3.0.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/likwid/likwid-3.0.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/likwid/likwid-3.0.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/likwid/likwid-3.0.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/likwid/likwid-4.0.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/likwid/likwid-4.0.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/likwid/likwid-4.0.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/likwid/likwid-4.0.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/l/lynx/lynx-2.8.7-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/l/lynx/lynx-2.8.7-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/l/lynx/lynx-2.8.7-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/l/lynx/lynx-2.8.7-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-iccifort-2011.13.367.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-iccifort-2011.13.367.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-iccifort-2011.13.367.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-iccifort-2011.13.367.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/MCL/MCL-12.135-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/MCL/MCL-12.135-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/MCL/MCL-12.135-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/MCL/MCL-12.135-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/MCL/MCL-12.135-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/MCL/MCL-12.135-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/MCL/MCL-12.135-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/MCL/MCL-12.135-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/MDP/MDP-3.3-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/MDP/MDP-3.3-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/MDP/MDP-3.3-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/MDP/MDP-3.3-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/MEME/MEME-4.8.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/MEME/MEME-4.8.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/MEME/MEME-4.8.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/MEME/MEME-4.8.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-4.0.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-4.0.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-4.0.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-4.0.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-4.0.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-4.0.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-4.0.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-5.0.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-5.0.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-5.0.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-5.0.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-5.0.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-5.1.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-5.1.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-5.1.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/MPFR/MPFR-3.1.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-metis.eb b/easybuild/easyconfigs/__archive__/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-metis.eb similarity index 100% rename from easybuild/easyconfigs/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-metis.eb rename to easybuild/easyconfigs/__archive__/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-metis.eb diff --git a/easybuild/easyconfigs/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-parmetis.eb b/easybuild/easyconfigs/__archive__/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-parmetis.eb similarity index 100% rename from easybuild/easyconfigs/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-parmetis.eb rename to easybuild/easyconfigs/__archive__/m/MUMPS/MUMPS-4.10.0-ictce-4.1.13-parmetis.eb diff --git a/easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/MUMmer/MUMmer-3.23-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/MUMmer/MUMmer-3.23-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-ictce-4.1.13-Perl-5.16.3.eb b/easybuild/easyconfigs/__archive__/m/MUMmer/MUMmer-3.23-ictce-4.1.13-Perl-5.16.3.eb similarity index 100% rename from easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-ictce-4.1.13-Perl-5.16.3.eb rename to easybuild/easyconfigs/__archive__/m/MUMmer/MUMmer-3.23-ictce-4.1.13-Perl-5.16.3.eb diff --git a/easybuild/easyconfigs/m/MVAPICH2/MVAPICH2-1.9-iccifort-2011.13.367.eb b/easybuild/easyconfigs/__archive__/m/MVAPICH2/MVAPICH2-1.9-iccifort-2011.13.367.eb similarity index 100% rename from easybuild/easyconfigs/m/MVAPICH2/MVAPICH2-1.9-iccifort-2011.13.367.eb rename to easybuild/easyconfigs/__archive__/m/MVAPICH2/MVAPICH2-1.9-iccifort-2011.13.367.eb diff --git a/easybuild/easyconfigs/m/MariaDB/MariaDB-5.5.29-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/MariaDB/MariaDB-5.5.29-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/MariaDB/MariaDB-5.5.29-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/MariaDB/MariaDB-5.5.29-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/Meep/Meep-1.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/Meep/Meep-1.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/Meep/Meep-1.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/Meep/Meep-1.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/Mercurial/Mercurial-2.3.2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.3.2-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mercurial/Mercurial-2.3.2-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.3.2-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-7.11.2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mesa/Mesa-7.11.2-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mesa/Mesa-7.11.2-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mesa/Mesa-7.11.2-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-7.11.2-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mesa/Mesa-7.11.2-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mesa/Mesa-7.11.2-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mesa/Mesa-7.11.2-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/Mesquite/Mesquite-2.3.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/Mesquite/Mesquite-2.3.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/Mesquite/Mesquite-2.3.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/Mesquite/Mesquite-2.3.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/MetaVelvet/MetaVelvet-1.2.01-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/MetaVelvet/MetaVelvet-1.2.01-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/MetaVelvet/MetaVelvet-1.2.01-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/MetaVelvet/MetaVelvet-1.2.01-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/Molden/Molden-5.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/Molden/Molden-5.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/Molden/Molden-5.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/Molden/Molden-5.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/Mono/Mono-2.10.6-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/Mono/Mono-2.10.6-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/Mono/Mono-2.10.6-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/Mothur/Mothur-1.30.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/Mothur/Mothur-1.30.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/Mothur/Mothur-1.30.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/Mothur/Mothur-1.30.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/MrBayes/MrBayes-3.1.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/MrBayes/MrBayes-3.1.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/MrBayes/MrBayes-3.2.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/MrBayes/MrBayes-3.2.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/MyMediaLite/MyMediaLite-3.10-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.1.1-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.1.1-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/matplotlib/matplotlib-1.1.1-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.1.1-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.2.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.2.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/matplotlib/matplotlib-1.2.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.2.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.2.1-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.2.1-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/matplotlib/matplotlib-1.2.1-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.2.1-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.3.0-ictce-4.1.13-Python-2.7.5.eb b/easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.3.0-ictce-4.1.13-Python-2.7.5.eb similarity index 100% rename from easybuild/easyconfigs/m/matplotlib/matplotlib-1.3.0-ictce-4.1.13-Python-2.7.5.eb rename to easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.3.0-ictce-4.1.13-Python-2.7.5.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.3.1-ictce-4.1.13-Python-2.7.6.eb b/easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.3.1-ictce-4.1.13-Python-2.7.6.eb similarity index 100% rename from easybuild/easyconfigs/m/matplotlib/matplotlib-1.3.1-ictce-4.1.13-Python-2.7.6.eb rename to easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.3.1-ictce-4.1.13-Python-2.7.6.eb diff --git a/easybuild/easyconfigs/m/mc/mc-4.6.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/mc/mc-4.6.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/mc/mc-4.6.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/mc/mc-4.6.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/m/molmod/molmod-1.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/molmod/molmod-1.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/molmod/molmod-1.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/molmod/molmod-1.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/motif/motif-2.2.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/motif/motif-2.2.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/motif/motif-2.2.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/motif/motif-2.2.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/motif/motif-2.3.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/m/motif/motif-2.3.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/m/motif/motif-2.3.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/m/motif/motif-2.3.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/m/mpi4py/mpi4py-1.3-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/mpi4py/mpi4py-1.3-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/mpi4py/mpi4py-1.3-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/mpi4py/mpi4py-1.3-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/mpi4py/mpi4py-1.3-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/mpi4py/mpi4py-1.3-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/mpi4py/mpi4py-1.3-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/mpi4py/mpi4py-1.3-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/mpiBLAST/mpiBLAST-1.6.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/m/mpiBLAST/mpiBLAST-1.6.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/m/mpiBLAST/mpiBLAST-1.6.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/m/mpiBLAST/mpiBLAST-1.6.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/n/NASM/NASM-2.07-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/n/NASM/NASM-2.07-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/n/NASM/NASM-2.07-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/n/NASM/NASM-2.07-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/n/NASM/NASM-2.07-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/NASM/NASM-2.07-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/NASM/NASM-2.07-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/NASM/NASM-2.07-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/NASM/NASM-2.11.05-ictce-6.3.5.eb b/easybuild/easyconfigs/__archive__/n/NASM/NASM-2.11.05-ictce-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/n/NASM/NASM-2.11.05-ictce-6.3.5.eb rename to easybuild/easyconfigs/__archive__/n/NASM/NASM-2.11.05-ictce-6.3.5.eb diff --git a/easybuild/easyconfigs/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/n/NCL/NCL-6.0.0-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/n/NCL/NCL-6.0.0-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/n/NCL/NCL-6.0.0-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/n/NCL/NCL-6.0.0-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/n/NCL/NCL-6.1.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/NCL/NCL-6.1.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/NCL/NCL-6.1.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/NCL/NCL-6.1.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/NEURON/NEURON-7.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/NEURON/NEURON-7.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/NEURON/NEURON-7.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/NEURON/NEURON-7.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/NWChem/NWChem-6.1.1-ictce-4.1.13-2012-06-27-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/n/NWChem/NWChem-6.1.1-ictce-4.1.13-2012-06-27-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/NWChem/NWChem-6.1.1-ictce-4.1.13-2012-06-27-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/n/NWChem/NWChem-6.1.1-ictce-4.1.13-2012-06-27-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/n/nano/nano-2.2.6-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/n/nano/nano-2.2.6-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/n/nano/nano-2.2.6-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/n/nano/nano-2.2.6-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-4.0.10.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-4.0.10.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-4.0.10.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-6.3.5.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-ictce-6.3.5.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-ictce-6.3.5.eb diff --git a/easybuild/easyconfigs/n/ncview/ncview-2.1.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/ncview/ncview-2.1.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/ncview/ncview-2.1.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/ncview/ncview-2.1.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13-mt.eb b/easybuild/easyconfigs/__archive__/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13-mt.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13-mt.eb rename to easybuild/easyconfigs/__archive__/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13-mt.eb diff --git a/easybuild/easyconfigs/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/netCDF-C++/netCDF-C++-4.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13-mt.eb b/easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13-mt.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13-mt.eb rename to easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13-mt.eb diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.1.3-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.1.3-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF/netCDF-4.1.3-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.1.3-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.1.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.1.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF/netCDF-4.1.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.1.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.2-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF/netCDF-4.2-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13-mt.eb b/easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13-mt.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13-mt.eb rename to easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13-mt.eb diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2.1.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/numactl/numactl-2.0.8-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/n/numactl/numactl-2.0.8-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/n/numactl/numactl-2.0.8-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/n/numactl/numactl-2.0.8-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/n/numexpr/numexpr-2.0.1-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/n/numexpr/numexpr-2.0.1-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/numexpr/numexpr-2.0.1-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/n/numexpr/numexpr-2.0.1-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/n/numpy/numpy-1.6.2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/n/numpy/numpy-1.6.2-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/numpy/numpy-1.6.2-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/n/numpy/numpy-1.6.2-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/n/numpy/numpy-1.6.2-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/n/numpy/numpy-1.6.2-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/numpy/numpy-1.6.2-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/n/numpy/numpy-1.6.2-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/n/numpy/numpy-1.7.1-ictce-4.1.13-Python-2.7.5.eb b/easybuild/easyconfigs/__archive__/n/numpy/numpy-1.7.1-ictce-4.1.13-Python-2.7.5.eb similarity index 100% rename from easybuild/easyconfigs/n/numpy/numpy-1.7.1-ictce-4.1.13-Python-2.7.5.eb rename to easybuild/easyconfigs/__archive__/n/numpy/numpy-1.7.1-ictce-4.1.13-Python-2.7.5.eb diff --git a/easybuild/easyconfigs/o/Oger/Oger-1.1.3-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/o/Oger/Oger-1.1.3-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/o/Oger/Oger-1.1.3-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/o/Oger/Oger-1.1.3-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/o/OpenBabel/OpenBabel-2.3.2-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/o/OpenBabel/OpenBabel-2.3.2-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/o/OpenFOAM-Extend/OpenFOAM-Extend-1.6-ictce-4.1.13-20130711.eb b/easybuild/easyconfigs/__archive__/o/OpenFOAM-Extend/OpenFOAM-Extend-1.6-ictce-4.1.13-20130711.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenFOAM-Extend/OpenFOAM-Extend-1.6-ictce-4.1.13-20130711.eb rename to easybuild/easyconfigs/__archive__/o/OpenFOAM-Extend/OpenFOAM-Extend-1.6-ictce-4.1.13-20130711.eb diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-2.1.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.2.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-2.2.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.2.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-2.2.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/o/OpenIFS/OpenIFS-38r1v01-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/o/OpenIFS/OpenIFS-38r1v01-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenIFS/OpenIFS-38r1v01-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/o/OpenIFS/OpenIFS-38r1v01-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.6.3-iccifort-2011.13.367.eb b/easybuild/easyconfigs/__archive__/o/OpenMPI/OpenMPI-1.6.3-iccifort-2011.13.367.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.6.3-iccifort-2011.13.367.eb rename to easybuild/easyconfigs/__archive__/o/OpenMPI/OpenMPI-1.6.3-iccifort-2011.13.367.eb diff --git a/easybuild/easyconfigs/o/OpenPGM/OpenPGM-5.2.122-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/o/OpenPGM/OpenPGM-5.2.122-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenPGM/OpenPGM-5.2.122-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/o/OpenPGM/OpenPGM-5.2.122-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/o/orthomcl/orthomcl-2.0.8-ictce-4.1.13-Perl-5.16.3.eb b/easybuild/easyconfigs/__archive__/o/orthomcl/orthomcl-2.0.8-ictce-4.1.13-Perl-5.16.3.eb similarity index 100% rename from easybuild/easyconfigs/o/orthomcl/orthomcl-2.0.8-ictce-4.1.13-Perl-5.16.3.eb rename to easybuild/easyconfigs/__archive__/o/orthomcl/orthomcl-2.0.8-ictce-4.1.13-Perl-5.16.3.eb diff --git a/easybuild/easyconfigs/p/PANDAseq/PANDAseq-2.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/PANDAseq/PANDAseq-2.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/PANDAseq/PANDAseq-2.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/PANDAseq/PANDAseq-2.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/PAPI/PAPI-5.0.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/PAPI/PAPI-5.0.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/PAPI/PAPI-5.0.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/PAPI/PAPI-5.0.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/PCRE/PCRE-8.12-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/PCRE/PCRE-8.12-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/PCRE/PCRE-8.12-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/PETSc/PETSc-3.3-p2-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/PP/PP-1.6.4-ictce-4.1.13-Python-2.7.5.eb b/easybuild/easyconfigs/__archive__/p/PP/PP-1.6.4-ictce-4.1.13-Python-2.7.5.eb similarity index 100% rename from easybuild/easyconfigs/p/PP/PP-1.6.4-ictce-4.1.13-Python-2.7.5.eb rename to easybuild/easyconfigs/__archive__/p/PP/PP-1.6.4-ictce-4.1.13-Python-2.7.5.eb diff --git a/easybuild/easyconfigs/p/PSI/PSI-4.0b4-ictce-4.1.13-mt.eb b/easybuild/easyconfigs/__archive__/p/PSI/PSI-4.0b4-ictce-4.1.13-mt.eb similarity index 100% rename from easybuild/easyconfigs/p/PSI/PSI-4.0b4-ictce-4.1.13-mt.eb rename to easybuild/easyconfigs/__archive__/p/PSI/PSI-4.0b4-ictce-4.1.13-mt.eb diff --git a/easybuild/easyconfigs/p/PSI/PSI-4.0b4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/PSI/PSI-4.0b4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/PSI/PSI-4.0b4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/PSI/PSI-4.0b4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-3.1.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.2.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-3.2.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.2.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-3.2.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-4.0.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/ParMGridGen/ParMGridGen-1.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/ParMGridGen/ParMGridGen-1.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/ParMGridGen/ParMGridGen-1.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/ParMGridGen/ParMGridGen-1.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/Pasha/Pasha-1.0.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/Pasha/Pasha-1.0.5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/Pasha/Pasha-1.0.5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/Pasha/Pasha-1.0.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/Perl/Perl-5.16.3-ictce-4.1.13-bare.eb b/easybuild/easyconfigs/__archive__/p/Perl/Perl-5.16.3-ictce-4.1.13-bare.eb similarity index 100% rename from easybuild/easyconfigs/p/Perl/Perl-5.16.3-ictce-4.1.13-bare.eb rename to easybuild/easyconfigs/__archive__/p/Perl/Perl-5.16.3-ictce-4.1.13-bare.eb diff --git a/easybuild/easyconfigs/p/Perl/Perl-5.16.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/Perl/Perl-5.16.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/Perl/Perl-5.16.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/Perl/Perl-5.16.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/Primer3/Primer3-2.3.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq2.eb b/easybuild/easyconfigs/__archive__/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq2.eb similarity index 100% rename from easybuild/easyconfigs/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq2.eb rename to easybuild/easyconfigs/__archive__/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq2.eb diff --git a/easybuild/easyconfigs/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq3.eb b/easybuild/easyconfigs/__archive__/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq3.eb similarity index 100% rename from easybuild/easyconfigs/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq3.eb rename to easybuild/easyconfigs/__archive__/p/PyZMQ/PyZMQ-2.2.0.1-ictce-4.1.13-Python-2.7.3-zmq3.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.5.6-ictce-4.0.6-bare.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.5.6-ictce-4.0.6-bare.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.5.6-ictce-4.0.6-bare.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.5.6-ictce-4.0.6-bare.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.5.6-ictce-4.1.13-bare.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.5.6-ictce-4.1.13-bare.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.5.6-ictce-4.1.13-bare.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.5.6-ictce-4.1.13-bare.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.6-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.6-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.6-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-3.2.3-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-3.2.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-3.2.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/Python/Python-3.3.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-3.3.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-3.3.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-3.3.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/packmol/packmol-13.243-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/packmol/packmol-13.243-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/packmol/packmol-13.243-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/packmol/packmol-13.243-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/pandas/pandas-0.11.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/pandas/pandas-0.11.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/pandas/pandas-0.11.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/pandas/pandas-0.11.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/parallel/parallel-20130122-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/parallel/parallel-20130122-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/parallel/parallel-20130122-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/parallel/parallel-20130122-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/paycheck/paycheck-1.0.2-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/paycheck/paycheck-1.0.2-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/paycheck/paycheck-1.0.2-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/paycheck/paycheck-1.0.2-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/petsc4py/petsc4py-3.3-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/petsc4py/petsc4py-3.3-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/pixman/pixman-0.28.2-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/p/pixman/pixman-0.28.2-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/p/pixman/pixman-0.28.2-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/p/pixman/pixman-0.28.2-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/p/pixman/pixman-0.28.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/pixman/pixman-0.28.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/pixman/pixman-0.28.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/pixman/pixman-0.28.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/p/pkg-config/pkg-config-0.27.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/p/pkg-config/pkg-config-0.27.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/p/printproto/printproto-1.0.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/printproto/printproto-1.0.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/printproto/printproto-1.0.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/printproto/printproto-1.0.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/problog/problog-1.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/p/problog/problog-1.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/p/problog/problog-1.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/p/problog/problog-1.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/p/pyTables/pyTables-2.4.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/pyTables/pyTables-2.4.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/pyTables/pyTables-2.4.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/pyTables/pyTables-2.4.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/python-dateutil/python-dateutil-2.1-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/python-dateutil/python-dateutil-2.1-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/python-dateutil/python-dateutil-2.1-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/python-dateutil/python-dateutil-2.1-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/python-meep/python-meep-1.4.2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/python-meep/python-meep-1.4.2-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/python-meep/python-meep-1.4.2-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/python-meep/python-meep-1.4.2-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/q/Qt/Qt-4.8.4-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.4-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/q/Qt/Qt-4.8.4-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.4-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/q/Qt/Qt-4.8.4-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.4-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/q/Qt/Qt-4.8.4-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.4-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/q/Qt/Qt-4.8.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/q/Qt/Qt-4.8.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6-hybrid.eb b/easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6-hybrid.eb rename to easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6-hybrid.eb diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-4.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6-hybrid.eb b/easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6-hybrid.eb rename to easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6-hybrid.eb diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/r/R/R-2.15.2-ictce-4.0.10.eb b/easybuild/easyconfigs/__archive__/r/R/R-2.15.2-ictce-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-2.15.2-ictce-4.0.10.eb rename to easybuild/easyconfigs/__archive__/r/R/R-2.15.2-ictce-4.0.10.eb diff --git a/easybuild/easyconfigs/r/R/R-2.15.2-ictce-4.0.6-bare.eb b/easybuild/easyconfigs/__archive__/r/R/R-2.15.2-ictce-4.0.6-bare.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-2.15.2-ictce-4.0.6-bare.eb rename to easybuild/easyconfigs/__archive__/r/R/R-2.15.2-ictce-4.0.6-bare.eb diff --git a/easybuild/easyconfigs/r/R/R-2.15.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/r/R/R-2.15.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-2.15.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/r/R/R-2.15.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/r/R/R-2.15.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/r/R/R-2.15.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-2.15.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/r/R/R-2.15.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/r/R/R-3.0.1-ictce-4.0.6-bare.eb b/easybuild/easyconfigs/__archive__/r/R/R-3.0.1-ictce-4.0.6-bare.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-3.0.1-ictce-4.0.6-bare.eb rename to easybuild/easyconfigs/__archive__/r/R/R-3.0.1-ictce-4.0.6-bare.eb diff --git a/easybuild/easyconfigs/r/R/R-3.0.1-ictce-4.1.13-bare.eb b/easybuild/easyconfigs/__archive__/r/R/R-3.0.1-ictce-4.1.13-bare.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-3.0.1-ictce-4.1.13-bare.eb rename to easybuild/easyconfigs/__archive__/r/R/R-3.0.1-ictce-4.1.13-bare.eb diff --git a/easybuild/easyconfigs/r/R/R-3.1.1-ictce-6.3.5-bare-mt.eb b/easybuild/easyconfigs/__archive__/r/R/R-3.1.1-ictce-6.3.5-bare-mt.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-3.1.1-ictce-6.3.5-bare-mt.eb rename to easybuild/easyconfigs/__archive__/r/R/R-3.1.1-ictce-6.3.5-bare-mt.eb diff --git a/easybuild/easyconfigs/r/R/R-3.1.1-ictce-6.3.5-default-mt.eb b/easybuild/easyconfigs/__archive__/r/R/R-3.1.1-ictce-6.3.5-default-mt.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-3.1.1-ictce-6.3.5-default-mt.eb rename to easybuild/easyconfigs/__archive__/r/R/R-3.1.1-ictce-6.3.5-default-mt.eb diff --git a/easybuild/easyconfigs/r/RAxML/RAxML-7.2.6-ictce-4.1.13-hybrid-sse3.eb b/easybuild/easyconfigs/__archive__/r/RAxML/RAxML-7.2.6-ictce-4.1.13-hybrid-sse3.eb similarity index 100% rename from easybuild/easyconfigs/r/RAxML/RAxML-7.2.6-ictce-4.1.13-hybrid-sse3.eb rename to easybuild/easyconfigs/__archive__/r/RAxML/RAxML-7.2.6-ictce-4.1.13-hybrid-sse3.eb diff --git a/easybuild/easyconfigs/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mpi-sse3.eb b/easybuild/easyconfigs/__archive__/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mpi-sse3.eb similarity index 100% rename from easybuild/easyconfigs/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mpi-sse3.eb rename to easybuild/easyconfigs/__archive__/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mpi-sse3.eb diff --git a/easybuild/easyconfigs/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mt-sse3.eb b/easybuild/easyconfigs/__archive__/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mt-sse3.eb similarity index 100% rename from easybuild/easyconfigs/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mt-sse3.eb rename to easybuild/easyconfigs/__archive__/r/RAxML/RAxML-7.2.6-ictce-4.1.13-mt-sse3.eb diff --git a/easybuild/easyconfigs/r/RAxML/RAxML-7.2.6-ictce-4.1.13-seq-sse3.eb b/easybuild/easyconfigs/__archive__/r/RAxML/RAxML-7.2.6-ictce-4.1.13-seq-sse3.eb similarity index 100% rename from easybuild/easyconfigs/r/RAxML/RAxML-7.2.6-ictce-4.1.13-seq-sse3.eb rename to easybuild/easyconfigs/__archive__/r/RAxML/RAxML-7.2.6-ictce-4.1.13-seq-sse3.eb diff --git a/easybuild/easyconfigs/r/RNAz/RNAz-2.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/r/RNAz/RNAz-2.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/r/RNAz/RNAz-2.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/r/RNAz/RNAz-2.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/r/ROOT/ROOT-v5.34.01-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/r/ROOT/ROOT-v5.34.01-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/r/ROOT/ROOT-v5.34.01-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/r/ROOT/ROOT-v5.34.01-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/r/Rosetta/Rosetta-3.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/r/Rosetta/Rosetta-3.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/r/Rosetta/Rosetta-3.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/r/Rosetta/Rosetta-3.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.18-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/s/SAMtools/SAMtools-0.1.18-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.18-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/s/SAMtools/SAMtools-0.1.18-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/s/SCOOP/SCOOP-0.5.3-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/SCOOP/SCOOP-0.5.3-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/SCOOP/SCOOP-0.5.3-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/SCOOP/SCOOP-0.5.3-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-5.1.12b_esmumps-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.0_esmumps-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-6.0.0_esmumps-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.0_esmumps-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-6.0.0_esmumps-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.5.eb b/easybuild/easyconfigs/__archive__/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.5.eb similarity index 100% rename from easybuild/easyconfigs/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.5.eb rename to easybuild/easyconfigs/__archive__/s/SCons/SCons-2.3.0-ictce-4.1.13-Python-2.7.5.eb diff --git a/easybuild/easyconfigs/s/SHRiMP/SHRiMP-2.2.3-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/s/SHRiMP/SHRiMP-2.2.3-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/s/SHRiMP/SHRiMP-2.2.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/s/SHRiMP/SHRiMP-2.2.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/SLEPc/SLEPc-3.3-p1-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/SOAPdenovo/SOAPdenovo-1.05-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/s/SOAPdenovo/SOAPdenovo-1.05-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/s/SOAPdenovo/SOAPdenovo-1.05-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/s/SOAPdenovo/SOAPdenovo-1.05-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/SWIG/SWIG-2.0.4-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/Sablotron/Sablotron-1.0.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/s/Sablotron/Sablotron-1.0.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/s/Sablotron/Sablotron-1.0.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/s/Sablotron/Sablotron-1.0.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/ScientificPython/ScientificPython-2.8-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/Shapely/Shapely-1.2.15-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/Shapely/Shapely-1.2.15-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/Shapely/Shapely-1.2.15-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/Shapely/Shapely-1.2.15-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/Sphinx/Sphinx-1.1.3-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/Stacks/Stacks-1.03-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/s/Stacks/Stacks-1.03-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/s/Stacks/Stacks-1.03-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/s/Stacks/Stacks-1.03-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/s/Stow/Stow-1.3.3-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/s/Stow/Stow-1.3.3-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/s/Stow/Stow-1.3.3-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/s/Stow/Stow-1.3.3-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb b/easybuild/easyconfigs/__archive__/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb similarity index 100% rename from easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb rename to easybuild/easyconfigs/__archive__/s/SuiteSparse/SuiteSparse-3.7.0-ictce-4.0.6-withparmetis.eb diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/s/Szip/Szip-2.1-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/s/Szip/Szip-2.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/s/Szip/Szip-2.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.13-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/scikit-learn/scikit-learn-0.13-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.13-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/scikit-learn/scikit-learn-0.13-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.14-ictce-4.1.13-Python-2.7.5.eb b/easybuild/easyconfigs/__archive__/s/scikit-learn/scikit-learn-0.14-ictce-4.1.13-Python-2.7.5.eb similarity index 100% rename from easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.14-ictce-4.1.13-Python-2.7.5.eb rename to easybuild/easyconfigs/__archive__/s/scikit-learn/scikit-learn-0.14-ictce-4.1.13-Python-2.7.5.eb diff --git a/easybuild/easyconfigs/s/scipy/scipy-0.11.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/scipy/scipy-0.11.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/scipy/scipy-0.11.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/scipy/scipy-0.11.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/scipy/scipy-0.11.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/scipy/scipy-0.11.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/scipy/scipy-0.11.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/scipy/scipy-0.11.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/setuptools/setuptools-0.6c11-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/sparsehash/sparsehash-2.0.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/s/sparsehash/sparsehash-2.0.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/s/sparsehash/sparsehash-2.0.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/s/sparsehash/sparsehash-2.0.2-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/s/sympy/sympy-0.7.2-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/sympy/sympy-0.7.2-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/sympy/sympy-0.7.2-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/sympy/sympy-0.7.2-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/t/TAMkin/TAMkin-1.0.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/t/TAMkin/TAMkin-1.0.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/t/TAMkin/TAMkin-1.0.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/t/TAMkin/TAMkin-1.0.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/t/Tar/Tar-1.26-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/t/Tar/Tar-1.26-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/t/Tar/Tar-1.26-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/t/Tar/Tar-1.26-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-4.0.10.eb b/easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-ictce-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-4.0.10.eb rename to easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-ictce-4.0.10.eb diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.5.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/t/Theano/Theano-0.5.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/t/Theano/Theano-0.5.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/t/Theano/Theano-0.5.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/t/TiCCutils/TiCCutils-0.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/t/TiCCutils/TiCCutils-0.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/t/TiCCutils/TiCCutils-0.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/t/TiCCutils/TiCCutils-0.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/t/TiMBL/TiMBL-6.4.3-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/t/TiMBL/TiMBL-6.4.3-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/t/TiMBL/TiMBL-6.4.3-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/t/TiMBL/TiMBL-6.4.3-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/t/TinySVM/TinySVM-0.09-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/t/TinySVM/TinySVM-0.09-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/t/TinySVM/TinySVM-0.09-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/t/TinySVM/TinySVM-0.09-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.5.12-ictce-4.0.10.eb b/easybuild/easyconfigs/__archive__/t/Tk/Tk-8.5.12-ictce-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/t/Tk/Tk-8.5.12-ictce-4.0.10.eb rename to easybuild/easyconfigs/__archive__/t/Tk/Tk-8.5.12-ictce-4.0.10.eb diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.5.12-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/t/Tk/Tk-8.5.12-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/t/Tk/Tk-8.5.12-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/t/Tk/Tk-8.5.12-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/t/TopHat/TopHat-2.0.8-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/t/TopHat/TopHat-2.0.8-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/t/TopHat/TopHat-2.0.8-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/t/TopHat/TopHat-2.0.8-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/t/Trilinos/Trilinos-10.12.2-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/t/Trinity/Trinity-2012-10-05-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2012-10-05-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/t/Trinity/Trinity-2012-10-05-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2012-10-05-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/t/Trinity/Trinity-2013-02-25-ictce-4.1.13-jellyfish-1.1.10.eb b/easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2013-02-25-ictce-4.1.13-jellyfish-1.1.10.eb similarity index 100% rename from easybuild/easyconfigs/t/Trinity/Trinity-2013-02-25-ictce-4.1.13-jellyfish-1.1.10.eb rename to easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2013-02-25-ictce-4.1.13-jellyfish-1.1.10.eb diff --git a/easybuild/easyconfigs/t/Trinity/Trinity-2013-02-25-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2013-02-25-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/t/Trinity/Trinity-2013-02-25-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2013-02-25-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/t/tcsh/tcsh-6.18.01-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/t/tcsh/tcsh-6.18.01-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/t/tcsh/tcsh-6.18.01-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/t/tcsh/tcsh-6.18.01-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/t/tcsh/tcsh-6.18.01-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/t/tcsh/tcsh-6.18.01-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/t/tcsh/tcsh-6.18.01-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/t/tcsh/tcsh-6.18.01-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/u/UFC/UFC-2.0.5-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/u/UFL/UFL-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/u/util-linux/util-linux-2.22.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/u/util-linux/util-linux-2.22.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/u/util-linux/util-linux-2.22.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/u/util-linux/util-linux-2.22.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/v/VSC-tools/VSC-tools-0.1.2-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/v/VSC-tools/VSC-tools-0.1.2-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/v/VSC-tools/VSC-tools-0.1.2-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/v/VSC-tools/VSC-tools-0.1.2-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/v/VTK/VTK-5.10.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/v/VTK/VTK-5.10.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/v/VTK/VTK-5.10.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/v/VTK/VTK-5.10.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/v/VTK/VTK-6.0.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/v/VTK/VTK-6.0.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/v/VTK/VTK-6.0.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/v/VTK/VTK-6.0.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/v/Velvet/Velvet-1.2.07-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/v/Velvet/Velvet-1.2.07-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/v/Velvet/Velvet-1.2.07-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/v/Velvet/Velvet-1.2.07-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/v/ViennaRNA/ViennaRNA-2.0.7-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/v/ViennaRNA/ViennaRNA-2.0.7-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/v/ViennaRNA/ViennaRNA-2.0.7-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/v/ViennaRNA/ViennaRNA-2.0.7-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/v/Viper/Viper-1.0.0-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-12.1-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/w/WIEN2k/WIEN2k-12.1-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/w/WIEN2k/WIEN2k-12.1-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/w/WIEN2k/WIEN2k-12.1-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/w/WPS/WPS-3.3.1-ictce-3.2.2.u3-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WPS/WPS-3.3.1-ictce-3.2.2.u3-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WPS/WPS-3.3.1-ictce-3.2.2.u3-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WPS/WPS-3.3.1-ictce-3.2.2.u3-dmpar.eb diff --git a/easybuild/easyconfigs/w/WPS/WPS-3.4-ictce-3.2.2.u3-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WPS/WPS-3.4-ictce-3.2.2.u3-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WPS/WPS-3.4-ictce-3.2.2.u3-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WPS/WPS-3.4-ictce-3.2.2.u3-dmpar.eb diff --git a/easybuild/easyconfigs/w/WPS/WPS-3.5-ictce-4.1.13-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WPS/WPS-3.5-ictce-4.1.13-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WPS/WPS-3.5-ictce-4.1.13-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WPS/WPS-3.5-ictce-4.1.13-dmpar.eb diff --git a/easybuild/easyconfigs/w/WPS/WPS-3.5.1-ictce-4.1.13-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WPS/WPS-3.5.1-ictce-4.1.13-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WPS/WPS-3.5.1-ictce-4.1.13-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WPS/WPS-3.5.1-ictce-4.1.13-dmpar.eb diff --git a/easybuild/easyconfigs/w/WRF/WRF-3.3.1-ictce-3.2.2.u3-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WRF/WRF-3.3.1-ictce-3.2.2.u3-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WRF/WRF-3.3.1-ictce-3.2.2.u3-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WRF/WRF-3.3.1-ictce-3.2.2.u3-dmpar.eb diff --git a/easybuild/easyconfigs/w/WRF/WRF-3.4-ictce-3.2.2.u3-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WRF/WRF-3.4-ictce-3.2.2.u3-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WRF/WRF-3.4-ictce-3.2.2.u3-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WRF/WRF-3.4-ictce-3.2.2.u3-dmpar.eb diff --git a/easybuild/easyconfigs/w/WRF/WRF-3.5-ictce-4.1.13-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WRF/WRF-3.5-ictce-4.1.13-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WRF/WRF-3.5-ictce-4.1.13-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WRF/WRF-3.5-ictce-4.1.13-dmpar.eb diff --git a/easybuild/easyconfigs/w/WRF/WRF-3.5.1-ictce-4.1.13-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WRF/WRF-3.5.1-ictce-4.1.13-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WRF/WRF-3.5.1-ictce-4.1.13-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WRF/WRF-3.5.1-ictce-4.1.13-dmpar.eb diff --git a/easybuild/easyconfigs/x/XCrySDen/XCrySDen-1.5.53-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/x/XCrySDen/XCrySDen-1.5.53-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/x/XCrySDen/XCrySDen-1.5.53-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/x/XCrySDen/XCrySDen-1.5.53-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/x/XML-LibXML/XML-LibXML-2.0018-ictce-4.1.13-Perl-5.16.3.eb b/easybuild/easyconfigs/__archive__/x/XML-LibXML/XML-LibXML-2.0018-ictce-4.1.13-Perl-5.16.3.eb similarity index 100% rename from easybuild/easyconfigs/x/XML-LibXML/XML-LibXML-2.0018-ictce-4.1.13-Perl-5.16.3.eb rename to easybuild/easyconfigs/__archive__/x/XML-LibXML/XML-LibXML-2.0018-ictce-4.1.13-Perl-5.16.3.eb diff --git a/easybuild/easyconfigs/x/XML-Simple/XML-Simple-2.20-ictce-4.1.13-Perl-5.16.3.eb b/easybuild/easyconfigs/__archive__/x/XML-Simple/XML-Simple-2.20-ictce-4.1.13-Perl-5.16.3.eb similarity index 100% rename from easybuild/easyconfigs/x/XML-Simple/XML-Simple-2.20-ictce-4.1.13-Perl-5.16.3.eb rename to easybuild/easyconfigs/__archive__/x/XML-Simple/XML-Simple-2.20-ictce-4.1.13-Perl-5.16.3.eb diff --git a/easybuild/easyconfigs/x/XML/XML-3.95-0.1-ictce-4.0.6-R-2.15.2.eb b/easybuild/easyconfigs/__archive__/x/XML/XML-3.95-0.1-ictce-4.0.6-R-2.15.2.eb similarity index 100% rename from easybuild/easyconfigs/x/XML/XML-3.95-0.1-ictce-4.0.6-R-2.15.2.eb rename to easybuild/easyconfigs/__archive__/x/XML/XML-3.95-0.1-ictce-4.0.6-R-2.15.2.eb diff --git a/easybuild/easyconfigs/x/xbitmaps/xbitmaps-1.1.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/x/xbitmaps/xbitmaps-1.1.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/x/xbitmaps/xbitmaps-1.1.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/x/xbitmaps/xbitmaps-1.1.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/x/xcb-proto/xcb-proto-1.7-ictce-4.0.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/x/xcb-proto/xcb-proto-1.7-ictce-4.0.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/x/xcb-proto/xcb-proto-1.7-ictce-4.0.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/x/xcb-proto/xcb-proto-1.7-ictce-4.0.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/x/xcb-proto/xcb-proto-1.7-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/x/xcb-proto/xcb-proto-1.7-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/x/xcb-proto/xcb-proto-1.7-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/x/xcb-proto/xcb-proto-1.7-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/x/xextproto/xextproto-7.2.1-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/x/xextproto/xextproto-7.2.1-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/x/xextproto/xextproto-7.2.1-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/x/xextproto/xextproto-7.2.1-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/x/xorg-macros/xorg-macros-1.17-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/x/xorg-macros/xorg-macros-1.17-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/x/xorg-macros/xorg-macros-1.17-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/x/xorg-macros/xorg-macros-1.17-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/x/xorg-macros/xorg-macros-1.17-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/x/xorg-macros/xorg-macros-1.17-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/x/xorg-macros/xorg-macros-1.17-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/x/xorg-macros/xorg-macros-1.17-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/x/xproto/xproto-7.0.23-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/x/xproto/xproto-7.0.23-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/x/xproto/xproto-7.0.23-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/x/xproto/xproto-7.0.23-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/x/xproto/xproto-7.0.23-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/x/xproto/xproto-7.0.23-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/x/xproto/xproto-7.0.23-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/x/xproto/xproto-7.0.23-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/x/xtrans/xtrans-1.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/x/xtrans/xtrans-1.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/x/xtrans/xtrans-1.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/x/xtrans/xtrans-1.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb b/easybuild/easyconfigs/__archive__/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb similarity index 100% rename from easybuild/easyconfigs/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb rename to easybuild/easyconfigs/__archive__/y/YAML-Syck/YAML-Syck-1.27-ictce-4.1.13-Perl-5.16.3.eb diff --git a/easybuild/easyconfigs/y/YamCha/YamCha-0.33-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/y/YamCha/YamCha-0.33-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/y/YamCha/YamCha-0.33-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/y/YamCha/YamCha-0.33-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/y/Yasm/Yasm-1.2.0-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/y/Yasm/Yasm-1.2.0-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/y/Yasm/Yasm-1.2.0-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/y/Yasm/Yasm-1.2.0-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/y/yaff/yaff-1.0-ictce-4.1.13-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/y/yaff/yaff-1.0-ictce-4.1.13-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/y/yaff/yaff-1.0-ictce-4.1.13-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/y/yaff/yaff-1.0-ictce-4.1.13-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/z/ZeroMQ/ZeroMQ-2.2.0-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/z/ZeroMQ/ZeroMQ-2.2.0-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/z/ZeroMQ/ZeroMQ-2.2.0-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/z/ZeroMQ/ZeroMQ-2.2.0-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/z/ZeroMQ/ZeroMQ-3.2.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/z/ZeroMQ/ZeroMQ-3.2.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/z/ZeroMQ/ZeroMQ-3.2.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/z/ZeroMQ/ZeroMQ-3.2.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.5-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.5-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.5-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.5-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.5-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.5-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.5-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.5-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.5-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.5-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.5-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.5-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-3.2.2.u3.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-ictce-3.2.2.u3.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-3.2.2.u3.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-ictce-3.2.2.u3.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.0.10.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-ictce-4.0.10.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.0.10.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-ictce-4.0.10.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-ictce-4.0.6.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.8-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.8-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.8-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-ictce-6.3.5.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.8-ictce-6.3.5.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.8-ictce-6.3.5.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.8-ictce-6.3.5.eb diff --git a/easybuild/easyconfigs/z/zsh/zsh-5.0.2-ictce-4.1.13.eb b/easybuild/easyconfigs/__archive__/z/zsh/zsh-5.0.2-ictce-4.1.13.eb similarity index 100% rename from easybuild/easyconfigs/z/zsh/zsh-5.0.2-ictce-4.1.13.eb rename to easybuild/easyconfigs/__archive__/z/zsh/zsh-5.0.2-ictce-4.1.13.eb diff --git a/easybuild/easyconfigs/z/zsync/zsync-0.6.2-ictce-4.0.6.eb b/easybuild/easyconfigs/__archive__/z/zsync/zsync-0.6.2-ictce-4.0.6.eb similarity index 100% rename from easybuild/easyconfigs/z/zsync/zsync-0.6.2-ictce-4.0.6.eb rename to easybuild/easyconfigs/__archive__/z/zsync/zsync-0.6.2-ictce-4.0.6.eb -- GitLab From d9d496bfc9186f24bfb2033fb0b994cfa777b279 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 21:15:48 +0200 Subject: [PATCH 519/741] also remove imkl easyconfigs that rely on deprecated iccifort toolchains --- .../i/imkl/imkl-10.3.12.361-MVAPICH2-1.9.eb | 35 ------------------- .../i/imkl/imkl-10.3.12.361-OpenMPI-1.6.3.eb | 35 ------------------- 2 files changed, 70 deletions(-) delete mode 100644 easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-MVAPICH2-1.9.eb delete mode 100644 easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-OpenMPI-1.6.3.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-MVAPICH2-1.9.eb b/easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-MVAPICH2-1.9.eb deleted file mode 100644 index 4d5ef42fcf..0000000000 --- a/easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-MVAPICH2-1.9.eb +++ /dev/null @@ -1,35 +0,0 @@ -name = 'imkl' -version = '10.3.12.361' - -homepage = 'http://software.intel.com/en-us/intel-mkl/' -description = """Intel Math Kernel Library is a library of highly optimized, extensively threaded math routines -for science, engineering, and financial applications that require maximum performance. Core math functions include -BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" - -toolchain = {'name': 'dummy', 'version': ''} - -sources = ['l_mkl_%(version)s.tgz'] - -compver = '2011.13.367' -comp = ('iccifort', compver) - -# deps for interface build -mpi = 'MVAPICH2' -mpiver = '1.9' -versionsuffix = '-%s-%s' % (mpi, mpiver) - -dependencies = [ - ('icc', compver), - ('ifort', compver), - (mpi, mpiver, '', comp), -] - -dontcreateinstalldir = 'True' - -interfaces = True - -# license file -import os -license_file = os.path.join(os.getenv('HOME'), "licenses", "intel", "license.lic") - -moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-OpenMPI-1.6.3.eb b/easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-OpenMPI-1.6.3.eb deleted file mode 100644 index 2bd88ac625..0000000000 --- a/easybuild/easyconfigs/i/imkl/imkl-10.3.12.361-OpenMPI-1.6.3.eb +++ /dev/null @@ -1,35 +0,0 @@ -name = 'imkl' -version = '10.3.12.361' - -homepage = 'http://software.intel.com/en-us/intel-mkl/' -description = """Intel Math Kernel Library is a library of highly optimized, extensively threaded math routines -for science, engineering, and financial applications that require maximum performance. Core math functions include -BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" - -toolchain = {'name': 'dummy', 'version': ''} - -sources = ['l_mkl_%(version)s.tgz'] - -compver = '2011.13.367' -comp = ('iccifort', compver) - -# deps for interface build -mpi = 'OpenMPI' -mpiver = '1.6.3' -versionsuffix = '-%s-%s' % (mpi, mpiver) - -dependencies = [ - ('icc', compver), - ('ifort', compver), - (mpi, mpiver, '', comp), -] - -dontcreateinstalldir = 'True' - -interfaces = True - -# license file -import os -license_file = os.path.join(os.getenv('HOME'), "licenses", "intel", "license.lic") - -moduleclass = 'numlib' -- GitLab From 9091b345d1ab7f50569da78faca94903b77ffa28 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 21:19:52 +0200 Subject: [PATCH 520/741] move easyconfigs for deprecated goolfc toolchains to archive --- .../{ => __archive__}/a/Autoconf/Autoconf-2.69-gcccuda-2.6.10.eb | 0 .../{ => __archive__}/a/Automake/Automake-1.14-gcccuda-2.6.10.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.12-goolfc-2.6.10.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.4-goolfc-1.3.12.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.4-goolfc-2.6.10.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-gompi-1.3.12.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-gompic-2.6.10.eb | 0 .../g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-hybrid.eb | 0 .../{ => __archive__}/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-mt.eb | 0 .../g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-hybrid.eb | 0 .../{ => __archive__}/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-mt.eb | 0 .../easyconfigs/{ => __archive__}/g/GSL/GSL-1.16-goolfc-1.3.12.eb | 0 .../easyconfigs/{ => __archive__}/g/GSL/GSL-1.16-goolfc-2.6.10.eb | 0 .../easyconfigs/{ => __archive__}/g/gcccuda/gcccuda-2.6.10.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.3.12.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/gompic/gompic-2.6.10.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/goolfc/goolfc-1.3.12.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/goolfc/goolfc-1.4.10.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/goolfc/goolfc-2.6.10.eb | 0 .../{ => __archive__}/g/gzip/gzip-1.6-goolfc-1.4.10.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-goolfc-1.4.10.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-goolfc-2.6.10.eb | 0 .../{ => __archive__}/h/hwloc/hwloc-1.8-gcccuda-2.6.10.eb | 0 .../{ => __archive__}/j/Jansson/Jansson-2.5-gcccuda-2.6.10.eb | 0 .../{ => __archive__}/l/LAPACK/LAPACK-3.4.2-gompi-1.3.12.eb | 0 .../{ => __archive__}/m/M4/M4-1.4.16-gcccuda-2.6.10.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-goolfc-1.3.12.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-goolfc-2.6.10.eb | 0 .../{ => __archive__}/n/netloc/netloc-0.5-gcccuda-2.6.10.eb | 0 .../o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.3.12-LAPACK-3.4.2.eb | 0 .../o/OpenBLAS/OpenBLAS-0.2.8-gompic-2.6.10-LAPACK-3.4.2.eb | 0 .../{ => __archive__}/o/OpenMPI/OpenMPI-1.7.3-gcccuda-2.6.10.eb | 0 .../ScaLAPACK-2.0.2-gompi-1.3.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 .../ScaLAPACK-2.0.2-gompic-2.6.10-OpenBLAS-0.2.8-LAPACK-3.4.2.eb | 0 .../{ => __archive__}/t/Tcl/Tcl-8.5.12-goolfc-1.3.12.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-goolfc-1.3.12.eb | 0 36 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/a/Autoconf/Autoconf-2.69-gcccuda-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/Automake/Automake-1.14-gcccuda-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.12-goolfc-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.4-goolfc-1.3.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.4-goolfc-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-gompi-1.3.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-gompic-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GSL/GSL-1.16-goolfc-1.3.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GSL/GSL-1.16-goolfc-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gcccuda/gcccuda-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.3.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gompic/gompic-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/goolfc/goolfc-1.3.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/goolfc/goolfc-1.4.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/goolfc/goolfc-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.6-goolfc-1.4.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-goolfc-1.4.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-goolfc-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/hwloc/hwloc-1.8-gcccuda-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/j/Jansson/Jansson-2.5-gcccuda-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LAPACK/LAPACK-3.4.2-gompi-1.3.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-gcccuda-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-goolfc-1.3.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-goolfc-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netloc/netloc-0.5-gcccuda-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.3.12-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.8-gompic-2.6.10-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenMPI/OpenMPI-1.7.3-gcccuda-2.6.10.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.3.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2.6.10-OpenBLAS-0.2.8-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tcl/Tcl-8.5.12-goolfc-1.3.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-goolfc-1.3.12.eb (100%) diff --git a/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-gcccuda-2.6.10.eb b/easybuild/easyconfigs/__archive__/a/Autoconf/Autoconf-2.69-gcccuda-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-gcccuda-2.6.10.eb rename to easybuild/easyconfigs/__archive__/a/Autoconf/Autoconf-2.69-gcccuda-2.6.10.eb diff --git a/easybuild/easyconfigs/a/Automake/Automake-1.14-gcccuda-2.6.10.eb b/easybuild/easyconfigs/__archive__/a/Automake/Automake-1.14-gcccuda-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/a/Automake/Automake-1.14-gcccuda-2.6.10.eb rename to easybuild/easyconfigs/__archive__/a/Automake/Automake-1.14-gcccuda-2.6.10.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.12-goolfc-2.6.10.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-goolfc-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.12-goolfc-2.6.10.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-goolfc-2.6.10.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goolfc-1.3.12.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-goolfc-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.4-goolfc-1.3.12.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-goolfc-1.3.12.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goolfc-2.6.10.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-goolfc-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.4-goolfc-2.6.10.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-goolfc-2.6.10.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompi-1.3.12.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompi-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompi-1.3.12.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompi-1.3.12.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompic-2.6.10.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompic-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompic-2.6.10.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompic-2.6.10.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-hybrid.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-hybrid.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-hybrid.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-mt.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-mt.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-mt.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.1-goolfc-1.3.12-mt.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-hybrid.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-hybrid.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-hybrid.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-mt.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-mt.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-mt.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-goolfc-2.6.10-mt.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb b/easybuild/easyconfigs/__archive__/g/GSL/GSL-1.16-goolfc-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-1.3.12.eb rename to easybuild/easyconfigs/__archive__/g/GSL/GSL-1.16-goolfc-1.3.12.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb b/easybuild/easyconfigs/__archive__/g/GSL/GSL-1.16-goolfc-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.16-goolfc-2.6.10.eb rename to easybuild/easyconfigs/__archive__/g/GSL/GSL-1.16-goolfc-2.6.10.eb diff --git a/easybuild/easyconfigs/g/gcccuda/gcccuda-2.6.10.eb b/easybuild/easyconfigs/__archive__/g/gcccuda/gcccuda-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/g/gcccuda/gcccuda-2.6.10.eb rename to easybuild/easyconfigs/__archive__/g/gcccuda/gcccuda-2.6.10.eb diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.3.12.eb b/easybuild/easyconfigs/__archive__/g/gompi/gompi-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/g/gompi/gompi-1.3.12.eb rename to easybuild/easyconfigs/__archive__/g/gompi/gompi-1.3.12.eb diff --git a/easybuild/easyconfigs/g/gompic/gompic-2.6.10.eb b/easybuild/easyconfigs/__archive__/g/gompic/gompic-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/g/gompic/gompic-2.6.10.eb rename to easybuild/easyconfigs/__archive__/g/gompic/gompic-2.6.10.eb diff --git a/easybuild/easyconfigs/g/goolfc/goolfc-1.3.12.eb b/easybuild/easyconfigs/__archive__/g/goolfc/goolfc-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/g/goolfc/goolfc-1.3.12.eb rename to easybuild/easyconfigs/__archive__/g/goolfc/goolfc-1.3.12.eb diff --git a/easybuild/easyconfigs/g/goolfc/goolfc-1.4.10.eb b/easybuild/easyconfigs/__archive__/g/goolfc/goolfc-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/g/goolfc/goolfc-1.4.10.eb rename to easybuild/easyconfigs/__archive__/g/goolfc/goolfc-1.4.10.eb diff --git a/easybuild/easyconfigs/g/goolfc/goolfc-2.6.10.eb b/easybuild/easyconfigs/__archive__/g/goolfc/goolfc-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/g/goolfc/goolfc-2.6.10.eb rename to easybuild/easyconfigs/__archive__/g/goolfc/goolfc-2.6.10.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.6-goolfc-1.4.10.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.6-goolfc-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.6-goolfc-1.4.10.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.6-goolfc-1.4.10.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.1-goolfc-1.4.10.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-goolfc-1.4.10.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.1-goolfc-1.4.10.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-goolfc-1.4.10.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.1-goolfc-2.6.10.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-goolfc-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.1-goolfc-2.6.10.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-goolfc-2.6.10.eb diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.8-gcccuda-2.6.10.eb b/easybuild/easyconfigs/__archive__/h/hwloc/hwloc-1.8-gcccuda-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/h/hwloc/hwloc-1.8-gcccuda-2.6.10.eb rename to easybuild/easyconfigs/__archive__/h/hwloc/hwloc-1.8-gcccuda-2.6.10.eb diff --git a/easybuild/easyconfigs/j/Jansson/Jansson-2.5-gcccuda-2.6.10.eb b/easybuild/easyconfigs/__archive__/j/Jansson/Jansson-2.5-gcccuda-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/j/Jansson/Jansson-2.5-gcccuda-2.6.10.eb rename to easybuild/easyconfigs/__archive__/j/Jansson/Jansson-2.5-gcccuda-2.6.10.eb diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.2-gompi-1.3.12.eb b/easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.2-gompi-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.2-gompi-1.3.12.eb rename to easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.2-gompi-1.3.12.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-gcccuda-2.6.10.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-gcccuda-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-gcccuda-2.6.10.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-gcccuda-2.6.10.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-goolfc-1.3.12.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-goolfc-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-goolfc-1.3.12.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-goolfc-1.3.12.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-goolfc-2.6.10.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-goolfc-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-goolfc-2.6.10.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-goolfc-2.6.10.eb diff --git a/easybuild/easyconfigs/n/netloc/netloc-0.5-gcccuda-2.6.10.eb b/easybuild/easyconfigs/__archive__/n/netloc/netloc-0.5-gcccuda-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/n/netloc/netloc-0.5-gcccuda-2.6.10.eb rename to easybuild/easyconfigs/__archive__/n/netloc/netloc-0.5-gcccuda-2.6.10.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.3.12-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.3.12-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.3.12-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.3.12-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.8-gompic-2.6.10-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.8-gompic-2.6.10-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.8-gompic-2.6.10-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.8-gompic-2.6.10-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.7.3-gcccuda-2.6.10.eb b/easybuild/easyconfigs/__archive__/o/OpenMPI/OpenMPI-1.7.3-gcccuda-2.6.10.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.7.3-gcccuda-2.6.10.eb rename to easybuild/easyconfigs/__archive__/o/OpenMPI/OpenMPI-1.7.3-gcccuda-2.6.10.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.3.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.3.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.3.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.3.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2.6.10-OpenBLAS-0.2.8-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2.6.10-OpenBLAS-0.2.8-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2.6.10-OpenBLAS-0.2.8-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2.6.10-OpenBLAS-0.2.8-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goolfc-1.3.12.eb b/easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-goolfc-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goolfc-1.3.12.eb rename to easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-goolfc-1.3.12.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-goolfc-1.3.12.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-goolfc-1.3.12.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-goolfc-1.3.12.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-goolfc-1.3.12.eb -- GitLab From 0667c58a8165b450f8d945601672d1b88e25464c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 21:35:24 +0200 Subject: [PATCH 521/741] move easyconfigs for deprecated goolf/gompi toolchains to archive --- .../b/Boost/Boost-1.53.0-gompi-1.4.12-no-OFED.eb | 0 .../b/binutils/binutils-2.22-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-gompi-1.4.12-no-OFED.eb | 0 .../c/CMake/CMake-2.8.10.2-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/c/Cube/Cube-3.4.3-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/c/Cube/Cube-4.2-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/c/Cube/Cube-4.3-gompi-1.4.12-no-OFED.eb | 0 .../e/Extrae/Extrae-2.4.1-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-gompi-1.4.10-no-OFED.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.4-gompi-1.5.14-no-OFED.eb | 0 .../g/GAMESS-US/GAMESS-US-20130501-R1-goolf-1.5.14-no-OFED.eb | 0 .../{ => __archive__}/g/GLib/GLib-2.34.3-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/g/GTI/GTI-1.2.0-gompi-1.4.12-no-OFED.eb | 0 .../g/gettext/gettext-0.18.2-gompi-1.4.12-no-OFED.eb | 0 .../easyconfigs/{ => __archive__}/g/gompi/gompi-1.4.10-no-OFED.eb | 0 .../easyconfigs/{ => __archive__}/g/gompi/gompi-1.4.12-no-OFED.eb | 0 .../easyconfigs/{ => __archive__}/g/gompi/gompi-1.5.14-no-OFED.eb | 0 .../easyconfigs/{ => __archive__}/g/goolf/goolf-1.4.10-no-OFED.eb | 0 .../easyconfigs/{ => __archive__}/g/goolf/goolf-1.5.14-no-OFED.eb | 0 .../{ => __archive__}/g/gzip/gzip-1.6-goolf-1.4.10-no-OFED.eb | 0 .../{ => __archive__}/g/gzip/gzip-1.6-goolf-1.5.14-no-OFED.eb | 0 .../{ => __archive__}/i/IMB/IMB-4.0.1-goolf-1.5.14-no-OFED.eb | 0 .../{ => __archive__}/l/LWM2/LWM2-1.1-gompi-1.4.12-no-OFED.eb | 0 .../l/libffi/libffi-3.0.13-gompi-1.4.12-no-OFED.eb | 0 .../l/libreadline/libreadline-6.2-gompi-1.4.12-no-OFED.eb | 0 .../l/libunwind/libunwind-1.1-gompi-1.4.12-no-OFED.eb | 0 .../l/libxml2/libxml2-2.9.1-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/m/MUST/MUST-1.2.0-gompi-1.4.12-no-OFED.eb | 0 .../n/ncurses/ncurses-5.9-gompi-1.4.12-no-OFED.eb | 0 .../o/OPARI2/OPARI2-1.0.7-gompi-1.4.12-no-OFED.eb | 0 .../o/OPARI2/OPARI2-1.1.1-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/o/OTF/OTF-1.12.4-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/o/OTF2/OTF2-1.2.1-gompi-1.4.12-no-OFED.eb | 0 .../OpenBLAS/OpenBLAS-0.2.6-gompi-1.4.10-no-OFED-LAPACK-3.4.2.eb | 0 .../OpenBLAS/OpenBLAS-0.2.8-gompi-1.5.14-no-OFED-LAPACK-3.5.0.eb | 0 .../{ => __archive__}/p/PAPI/PAPI-5.2.0-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/p/PDT/PDT-3.19-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/p/PnMPI/PnMPI-1.2.0-gompi-1.4.12-no-OFED.eb | 0 .../p/Python/Python-2.5.6-gompi-1.4.12-no-OFED-bare.eb | 0 .../{ => __archive__}/q/Qt/Qt-4.8.4-gompi-1.4.12-no-OFED.eb | 0 ...PACK-2.0.2-gompi-1.4.10-no-OFED-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 ...PACK-2.0.2-gompi-1.5.14-no-OFED-OpenBLAS-0.2.8-LAPACK-3.5.0.eb | 0 .../s/Scalasca/Scalasca-1.4.3-gompi-1.4.12-no-OFED.eb | 0 .../s/Scalasca/Scalasca-2.0-gompi-1.4.12-no-OFED.eb | 0 .../s/Score-P/Score-P-1.2.1-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/t/TAU/TAU-2.22.2-gompi-1.4.12-no-OFED.eb | 0 .../v/VampirTrace/VampirTrace-5.14.4-gompi-1.4.12-no-OFED.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-gompi-1.4.12-no-OFED.eb | 0 48 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.53.0-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/binutils/binutils-2.22-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.10.2-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Cube/Cube-3.4.3-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Cube/Cube-4.2-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Cube/Cube-4.3-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/Extrae/Extrae-2.4.1-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-gompi-1.4.10-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.4-gompi-1.5.14-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GAMESS-US/GAMESS-US-20130501-R1-goolf-1.5.14-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GLib/GLib-2.34.3-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GTI/GTI-1.2.0-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.4.10-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.5.14-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/goolf/goolf-1.4.10-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/goolf/goolf-1.5.14-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.6-goolf-1.4.10-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.6-goolf-1.5.14-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/IMB/IMB-4.0.1-goolf-1.5.14-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LWM2/LWM2-1.1-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libffi/libffi-3.0.13-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libunwind/libunwind-1.1-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.1-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MUST/MUST-1.2.0-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OPARI2/OPARI2-1.0.7-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OPARI2/OPARI2-1.1.1-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OTF/OTF-1.12.4-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OTF2/OTF2-1.2.1-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.4.10-no-OFED-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.8-gompi-1.5.14-no-OFED-LAPACK-3.5.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PAPI/PAPI-5.2.0-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PDT/PDT-3.19-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PnMPI/PnMPI-1.2.0-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.5.6-gompi-1.4.12-no-OFED-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.4-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.4.10-no-OFED-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.14-no-OFED-OpenBLAS-0.2.8-LAPACK-3.5.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Scalasca/Scalasca-1.4.3-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Scalasca/Scalasca-2.0-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Score-P/Score-P-1.2.1-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TAU/TAU-2.22.2-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/VampirTrace/VampirTrace-5.14.4-gompi-1.4.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-gompi-1.4.12-no-OFED.eb (100%) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.53.0-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.53.0-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.53.0-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.53.0-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/b/binutils/binutils-2.22-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/binutils/binutils-2.22-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/binutils/binutils-2.22-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/binutils/binutils-2.22-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/c/Cube/Cube-3.4.3-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/Cube/Cube-3.4.3-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/Cube/Cube-3.4.3-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/Cube/Cube-3.4.3-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/c/Cube/Cube-4.2-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/Cube/Cube-4.2-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/Cube/Cube-4.2-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/Cube/Cube-4.2-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/c/Cube/Cube-4.3-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/Cube/Cube-4.3-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/Cube/Cube-4.3-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/Cube/Cube-4.3-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/e/Extrae/Extrae-2.4.1-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/e/Extrae/Extrae-2.4.1-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/e/Extrae/Extrae-2.4.1-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/e/Extrae/Extrae-2.4.1-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompi-1.4.10-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompi-1.4.10-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompi-1.4.10-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompi-1.4.10-no-OFED.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompi-1.5.14-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gompi-1.5.14-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gompi-1.5.14-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gompi-1.5.14-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GAMESS-US/GAMESS-US-20130501-R1-goolf-1.5.14-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GAMESS-US/GAMESS-US-20130501-R1-goolf-1.5.14-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GAMESS-US/GAMESS-US-20130501-R1-goolf-1.5.14-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GAMESS-US/GAMESS-US-20130501-R1-goolf-1.5.14-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GLib/GLib-2.34.3-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GLib/GLib-2.34.3-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GTI/GTI-1.2.0-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GTI/GTI-1.2.0-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GTI/GTI-1.2.0-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GTI/GTI-1.2.0-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.4.10-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gompi/gompi-1.4.10-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gompi/gompi-1.4.10-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gompi/gompi-1.4.10-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gompi/gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gompi/gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gompi/gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.5.14-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gompi/gompi-1.5.14-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gompi/gompi-1.5.14-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gompi/gompi-1.5.14-no-OFED.eb diff --git a/easybuild/easyconfigs/g/goolf/goolf-1.4.10-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/goolf/goolf-1.4.10-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/goolf/goolf-1.4.10-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/goolf/goolf-1.4.10-no-OFED.eb diff --git a/easybuild/easyconfigs/g/goolf/goolf-1.5.14-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/goolf/goolf-1.5.14-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/goolf/goolf-1.5.14-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/goolf/goolf-1.5.14-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.6-goolf-1.4.10-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.6-goolf-1.4.10-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.6-goolf-1.4.10-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.6-goolf-1.4.10-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.6-goolf-1.5.14-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.6-goolf-1.5.14-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.6-goolf-1.5.14-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.6-goolf-1.5.14-no-OFED.eb diff --git a/easybuild/easyconfigs/i/IMB/IMB-4.0.1-goolf-1.5.14-no-OFED.eb b/easybuild/easyconfigs/__archive__/i/IMB/IMB-4.0.1-goolf-1.5.14-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/i/IMB/IMB-4.0.1-goolf-1.5.14-no-OFED.eb rename to easybuild/easyconfigs/__archive__/i/IMB/IMB-4.0.1-goolf-1.5.14-no-OFED.eb diff --git a/easybuild/easyconfigs/l/LWM2/LWM2-1.1-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/LWM2/LWM2-1.1-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/LWM2/LWM2-1.1-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/LWM2/LWM2-1.1-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libffi/libffi-3.0.13-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libunwind/libunwind-1.1-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libunwind/libunwind-1.1-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libunwind/libunwind-1.1-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libunwind/libunwind-1.1-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/m/MUST/MUST-1.2.0-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/MUST/MUST-1.2.0-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/MUST/MUST-1.2.0-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/MUST/MUST-1.2.0-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OPARI2/OPARI2-1.0.7-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OPARI2/OPARI2-1.0.7-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OPARI2/OPARI2-1.0.7-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OPARI2/OPARI2-1.0.7-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OPARI2/OPARI2-1.1.1-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OPARI2/OPARI2-1.1.1-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OPARI2/OPARI2-1.1.1-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OPARI2/OPARI2-1.1.1-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OTF/OTF-1.12.4-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OTF/OTF-1.12.4-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OTF/OTF-1.12.4-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OTF/OTF-1.12.4-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OTF2/OTF2-1.2.1-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OTF2/OTF2-1.2.1-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OTF2/OTF2-1.2.1-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OTF2/OTF2-1.2.1-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.4.10-no-OFED-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.4.10-no-OFED-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.4.10-no-OFED-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gompi-1.4.10-no-OFED-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.8-gompi-1.5.14-no-OFED-LAPACK-3.5.0.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.8-gompi-1.5.14-no-OFED-LAPACK-3.5.0.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.8-gompi-1.5.14-no-OFED-LAPACK-3.5.0.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.8-gompi-1.5.14-no-OFED-LAPACK-3.5.0.eb diff --git a/easybuild/easyconfigs/p/PAPI/PAPI-5.2.0-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/PAPI/PAPI-5.2.0-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/PAPI/PAPI-5.2.0-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/PAPI/PAPI-5.2.0-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/p/PDT/PDT-3.19-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/PDT/PDT-3.19-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/PDT/PDT-3.19-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/PDT/PDT-3.19-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/p/PnMPI/PnMPI-1.2.0-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/PnMPI/PnMPI-1.2.0-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/PnMPI/PnMPI-1.2.0-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/PnMPI/PnMPI-1.2.0-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.5.6-gompi-1.4.12-no-OFED-bare.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.5.6-gompi-1.4.12-no-OFED-bare.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.5.6-gompi-1.4.12-no-OFED-bare.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.5.6-gompi-1.4.12-no-OFED-bare.eb diff --git a/easybuild/easyconfigs/q/Qt/Qt-4.8.4-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.4-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/q/Qt/Qt-4.8.4-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.4-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.4.10-no-OFED-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.4.10-no-OFED-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.4.10-no-OFED-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.4.10-no-OFED-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.14-no-OFED-OpenBLAS-0.2.8-LAPACK-3.5.0.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.14-no-OFED-OpenBLAS-0.2.8-LAPACK-3.5.0.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.14-no-OFED-OpenBLAS-0.2.8-LAPACK-3.5.0.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.14-no-OFED-OpenBLAS-0.2.8-LAPACK-3.5.0.eb diff --git a/easybuild/easyconfigs/s/Scalasca/Scalasca-1.4.3-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/Scalasca/Scalasca-1.4.3-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/Scalasca/Scalasca-1.4.3-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/Scalasca/Scalasca-1.4.3-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/s/Scalasca/Scalasca-2.0-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/Scalasca/Scalasca-2.0-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/Scalasca/Scalasca-2.0-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/Scalasca/Scalasca-2.0-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/s/Score-P/Score-P-1.2.1-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/Score-P/Score-P-1.2.1-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/Score-P/Score-P-1.2.1-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/Score-P/Score-P-1.2.1-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/t/TAU/TAU-2.22.2-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/TAU/TAU-2.22.2-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/TAU/TAU-2.22.2-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/TAU/TAU-2.22.2-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/v/VampirTrace/VampirTrace-5.14.4-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/v/VampirTrace/VampirTrace-5.14.4-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/v/VampirTrace/VampirTrace-5.14.4-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/v/VampirTrace/VampirTrace-5.14.4-gompi-1.4.12-no-OFED.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gompi-1.4.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gompi-1.4.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-gompi-1.4.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gompi-1.4.12-no-OFED.eb -- GitLab From f59a0553bd616c8f69d9a2a8435fe0a0e604e94d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 21:39:56 +0200 Subject: [PATCH 522/741] move easyconfigs for deprecated goalf toolchains to archive --- .../a/ABySS/ABySS-1.3.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../a/ALADIN/ALADIN-36t1_op2bf1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/a/AMOS/AMOS-3.1.0-goalf-1.1.0-no-OFED.eb | 0 .../a/ASE/ASE-3.6.0.2515-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-LAPACK-3.4.2.eb | 0 .../a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-no-OFED-LAPACK-3.4.2.eb | 0 .../a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb | 0 .../a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb | 0 .../{ => __archive__}/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb | 0 .../Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../a/Autoconf/Autoconf-2.69-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/a/a2ps/a2ps-4.14-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/a/aria2/aria2-1.15.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/b/BFAST/BFAST-0.7.0a-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb | 0 .../b/BLAST+/BLAST+-2.2.27-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/b/BWA/BWA-0.6.2-goalf-1.1.0-no-OFED.eb | 0 .../b/BamTools/BamTools-2.2.3-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/b/Bash/Bash-4.2-goalf-1.1.0-no-OFED.eb | 0 .../b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.5-goalf-1.1.0-no-OFED.eb | 0 .../b/Bonnie++/Bonnie++-1.03e-goalf-1.1.0-no-OFED.eb | 0 .../b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED.eb | 0 .../b/Boost/Boost-1.53.0-goalf-1.5.12-no-OFED-Python-2.7.5.eb | 0 .../b/Bowtie2/Bowtie2-2.0.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/b/bbFTP/bbFTP-3.2.0-goalf-1.1.0-no-OFED.eb | 0 .../b/bbftpPRO/bbftpPRO-9.3.1-goalf-1.1.0-no-OFED.eb | 0 .../b/beagle-lib/beagle-lib-20120124-goalf-1.1.0-no-OFED.eb | 0 .../b/binutils/binutils-2.22-goalf-1.1.0-no-OFED.eb | 0 .../b/byacc/byacc-20120526-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-goalf-1.5.12-no-OFED.eb | 0 .../c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../c/CHARMM/CHARMM-37b2-goalf-1.5.12-no-OFED.eb | 0 .../c/CLHEP/CLHEP-2.1.1.0-goalf-1.1.0-no-OFED.eb | 0 .../c/CMake/CMake-2.8.10.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.12-goalf-1.1.0-no-OFED.eb | 0 .../c/CMake/CMake-2.8.12-goalf-1.5.12-no-OFED.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb | 0 .../c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb | 0 .../c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb | 0 .../{ => __archive__}/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/c/CRF++/CRF++-0.57-goalf-1.1.0-no-OFED.eb | 0 .../c/CVXOPT/CVXOPT-1.1.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../c/Chapel/Chapel-1.6.0-goalf-1.1.0-no-OFED.eb | 0 .../c/ClustalW2/ClustalW2-2.1-goalf-1.1.0-no-OFED.eb | 0 .../c/Corkscrew/Corkscrew-2.0-goalf-1.1.0-no-OFED.eb | 0 .../c/Cufflinks/Cufflinks-2.0.2-goalf-1.1.0-no-OFED.eb | 0 .../c/Cython/Cython-0.16-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.27.0-goalf-1.1.0-no-OFED.eb | 0 .../c/cairo/cairo-1.12.14-goalf-1.1.0-no-OFED.eb | 0 .../c/ccache/ccache-3.1.9-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/c/cflow/cflow-1.4-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/c/cgdb/cgdb-0.6.5-goalf-1.1.0-no-OFED.eb | 0 .../DL_POLY_Classic-1.9-goalf-1.1.0-no-OFED-no-gui.eb | 0 .../d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../d/Doxygen/Doxygen-1.8.1.1-goalf-1.1.0-no-OFED.eb | 0 .../e/ELinks/ELinks-0.12pre5-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/e/ESMF/ESMF-5.3.0-goalf-1.1.0-no-OFED.eb | 0 .../e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-parallel.eb | 0 .../e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-serial.eb | 0 .../{ => __archive__}/e/Eigen/Eigen-3.1.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/e/Eigen/Eigen-3.1.4-goalf-1.5.12-no-OFED.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-goalf-1.1.0-no-OFED.eb | 0 .../f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-goalf-1.1.0-no-OFED.eb | 0 .../f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-2.1.5-gompi-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-gompi-1.5.12-no-OFED.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-gompi-1.5.12.eb | 0 .../f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/f/Ferret/Ferret-6.72-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb | 0 .../f/fontconfig/fontconfig-2.10.91-goalf-1.1.0-no-OFED.eb | 0 .../f/freetype/freetype-2.4.10-goalf-1.1.0-no-OFED.eb | 0 .../f/freetype/freetype-2.4.11-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/GATE/GATE-6.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/GDB/GDB-7.5.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/GEOS/GEOS-3.3.5-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/GHC/GHC-7.4.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/GHC/GHC-7.6.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/GHC/GHC-7.8.3-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/GLib/GLib-2.34.3-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb | 0 .../g/GPAW/GPAW-0.9.0.8965-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-hybrid.eb | 0 .../g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-mt.eb | 0 .../{ => __archive__}/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb | 0 .../g/Geant4/Geant4-9.5.p01-goalf-1.1.0-no-OFED.eb | 0 .../g/GnuTLS/GnuTLS-3.1.8-goalf-1.1.0-no-OFED.eb | 0 .../g/Greenlet/Greenlet-0.4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/g/Guile/Guile-1.8.8-goalf-1.1.0-no-OFED.eb | 0 .../g/g2clib/g2clib-1.2.3-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/g2lib/g2lib-1.2.4-goalf-1.1.0-no-OFED.eb | 0 .../g/gettext/gettext-0.18.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/git/git-1.7.12-goalf-1.1.0-no-OFED.eb | 0 .../g/glproto/glproto-1.4.16-goalf-1.1.0-no-OFED.eb | 0 .../g/gnuplot/gnuplot-4.6.0-goalf-1.1.0-no-OFED.eb | 0 .../easyconfigs/{ => __archive__}/g/goalf/goalf-1.1.0-no-OFED.eb | 0 .../easyconfigs/{ => __archive__}/g/goalf/goalf-1.5.12-no-OFED.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/goalf/goalf-1.5.12.eb | 0 .../easyconfigs/{ => __archive__}/g/gompi/gompi-1.1.0-no-OFED.eb | 0 .../easyconfigs/{ => __archive__}/g/gompi/gompi-1.5.12-no-OFED.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.5.12.eb | 0 .../{ => __archive__}/g/gperf/gperf-3.0.4-goalf-1.1.0-no-OFED.eb | 0 .../g/grib_api/grib_api-1.9.18-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/g/gzip/gzip-1.5-goalf-1.1.0-no-OFED.eb | 0 .../h/HDF/HDF-4.2.7-patch1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.7-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.9-goalf-1.1.0-no-OFED.eb | 0 .../h/HH-suite/HH-suite-2.0.16-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/h/HMMER/HMMER-3.0-goalf-1.1.0-no-OFED.eb | 0 .../h/HPCBIOS_Math/HPCBIOS_Math-20130829-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/h/HPL/HPL-2.0-goalf-1.1.0-no-OFED.eb | 0 .../h/Harminv/Harminv-1.3.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb | 0 .../h/h5py/h5py-2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../h/h5utils/h5utils-1.12.1-goalf-1.1.0-no-OFED.eb | 0 .../i/Infernal/Infernal-1.1-goalf-1.1.0-no-OFED.eb | 0 .../i/Infernal/Infernal-1.1rc1-goalf-1.1.0-no-OFED.eb | 0 .../i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/i/Iperf/Iperf-2.0.5-goalf-1.1.0-no-OFED.eb | 0 .../j/JasPer/JasPer-1.900.1-goalf-1.1.0-no-OFED.eb | 0 .../j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb | 0 .../l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb | 0 .../l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb | 0 .../l/LAPACK/LAPACK-3.4.2-gompi-1.5.12-no-OFED.eb | 0 .../{ => __archive__}/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12.eb | 0 .../{ => __archive__}/l/LZO/LZO-2.06-goalf-1.1.0-no-OFED.eb | 0 .../l/Libint/Libint-1.1.4-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/l/lftp/lftp-4.4.1-goalf-1.1.0-no-OFED.eb | 0 .../l/libctl/libctl-3.2.1-goalf-1.1.0-no-OFED.eb | 0 .../l/libdrm/libdrm-2.4.27-goalf-1.1.0-no-OFED.eb | 0 .../l/libffi/libffi-3.0.11-goalf-1.1.0-no-OFED.eb | 0 .../l/libffi/libffi-3.0.13-goalf-1.1.0-no-OFED.eb | 0 .../l/libgtextutils/libgtextutils-0.6.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/l/libidn/libidn-1.27-goalf-1.1.0-no-OFED.eb | 0 .../l/libmatheval/libmatheval-1.1.8-goalf-1.1.0-no-OFED.eb | 0 .../l/libpciaccess/libpciaccess-0.13.1-goalf-1.1.0-no-OFED.eb | 0 .../l/libpng/libpng-1.5.10-goalf-1.1.0-no-OFED.eb | 0 .../l/libpng/libpng-1.5.11-goalf-1.1.0-no-OFED.eb | 0 .../l/libpng/libpng-1.5.13-goalf-1.1.0-no-OFED.eb | 0 .../l/libpng/libpng-1.5.14-goalf-1.1.0-no-OFED.eb | 0 .../l/libpng/libpng-1.6.2-goalf-1.1.0-no-OFED.eb | 0 .../libpthread-stubs/libpthread-stubs-0.3-goalf-1.1.0-no-OFED.eb | 0 .../l/libreadline/libreadline-6.2-goalf-1.1.0-no-OFED.eb | 0 .../l/libreadline/libreadline-6.2-goalf-1.5.12-no-OFED.eb | 0 .../l/libsmm/libsmm-20111205-goalf-1.1.0-no-OFED.eb | 0 .../l/libtool/libtool-2.4.2-goalf-1.1.0-no-OFED.eb | 0 .../l/libunistring/libunistring-0.9.3-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/l/libxc/libxc-2.0.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/l/libxc/libxc-2.0.2-goalf-1.1.0-no-OFED.eb | 0 .../l/libxcb/libxcb-1.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb | 0 .../l/libxml2/libxml2-2.9.0-goalf-1.1.0-no-OFED.eb | 0 .../l/libxml2/libxml2-2.9.1-goalf-1.1.0-no-OFED.eb | 0 .../l/libxml2/libxml2-2.9.1-goalf-1.5.12-no-OFED.eb | 0 .../l/libxslt/libxslt-1.1.28-goalf-1.1.0-no-OFED.eb | 0 .../l/libyaml/libyaml-0.1.4-goalf-1.1.0-no-OFED.eb | 0 .../l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED-pinomp.eb | 0 .../l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/m/M4/M4-1.4.16-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/m/MCL/MCL-12.135-goalf-1.1.0-no-OFED.eb | 0 .../m/MDP/MDP-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/m/MEME/MEME-4.8.0-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/m/MUMmer/MUMmer-3.23-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/m/Meep/Meep-1.2-goalf-1.1.0-no-OFED.eb | 0 .../Mercurial/Mercurial-2.3.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../m/Mesa/Mesa-7.11.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../m/MetaVelvet/MetaVelvet-1.2.01-goalf-1.1.0-no-OFED.eb | 0 .../m/MrBayes/MrBayes-3.1.2-goalf-1.1.0-no-OFED.eb | 0 .../m/MrBayes/MrBayes-3.2.0-goalf-1.1.0-no-OFED.eb | 0 .../m/makedepend/makedepend-1.0.4-goalf-1.1.0-no-OFED.eb | 0 .../matplotlib-1.1.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/m/mc/mc-4.6.1-goalf-1.1.0-no-OFED.eb | 0 .../m/mpi4py/mpi4py-1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../m/mpiBLAST/mpiBLAST-1.6.0-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/n/NASM/NASM-2.07-goalf-1.1.0-no-OFED.eb | 0 .../n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/n/NCL/NCL-6.0.0-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/n/NEURON/NEURON-7.2-goalf-1.1.0-no-OFED.eb | 0 .../NWChem-6.1.1-goalf-1.1.0-no-OFED-2012-06-27-Python-2.7.3.eb | 0 .../{ => __archive__}/n/nano/nano-2.2.6-goalf-1.1.0-no-OFED.eb | 0 .../n/ncurses/ncurses-5.9-goalf-1.1.0-no-OFED.eb | 0 .../n/ncurses/ncurses-5.9-goalf-1.5.12-no-OFED.eb | 0 .../n/netCDF-Fortran/netCDF-Fortran-4.2-goalf-1.1.0-no-OFED.eb | 0 .../n/netCDF/netCDF-4.1.3-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/n/netCDF/netCDF-4.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/n/nettle/nettle-2.6-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/n/ns/ns-2.35-goalf-1.1.0-no-OFED.eb | 0 .../n/numactl/numactl-2.0.8-goalf-1.1.0-no-OFED.eb | 0 .../n/numpy/numpy-1.6.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../o/Oger/Oger-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../OpenBabel-2.3.2-goalf-1.5.12-no-OFED-Python-2.7.5.eb | 0 .../o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb | 0 .../o/OpenPGM/OpenPGM-5.2.122-goalf-1.1.0-no-OFED.eb | 0 .../o/OpenSSL/OpenSSL-1.0.0-goalf-1.1.0-no-OFED.eb | 0 .../o/OpenSSL/OpenSSL-1.0.1f-goalf-1.1.0-no-OFED.eb | 0 .../o/OpenSSL/OpenSSL-1.0.1f-goalf-1.5.12-no-OFED.eb | 0 .../{ => __archive__}/o/otcl/otcl-1.14-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/p/PAPI/PAPI-5.0.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb | 0 .../p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/p/PLINK/PLINK-1.07-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED-mt.eb | 0 .../{ => __archive__}/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED.eb | 0 .../p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb | 0 .../p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb | 0 .../p/Perl/Perl-5.16.3-goalf-1.1.0-no-OFED-bare.eb | 0 .../p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb | 0 .../PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq2.eb | 0 .../PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq3.eb | 0 .../p/Python/Python-2.5.6-goalf-1.1.0-no-OFED-bare.eb | 0 .../p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb | 0 .../p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb | 0 .../p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb | 0 .../p/parallel/parallel-20130122-goalf-1.1.0-no-OFED.eb | 0 .../p/paycheck/paycheck-1.0.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../p/pixman/pixman-0.28.2-goalf-1.1.0-no-OFED.eb | 0 .../p/pkg-config/pkg-config-0.27.1-goalf-1.1.0-no-OFED.eb | 0 .../python-meep-1.4.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/q/Qt/Qt-4.8.4-goalf-1.1.0-no-OFED.eb | 0 .../QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED-hybrid.eb | 0 .../q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED.eb | 0 .../QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED-hybrid.eb | 0 .../QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/r/R/R-2.15.2-goalf-1.1.0-no-OFED-bare.eb | 0 .../{ => __archive__}/r/R/R-2.15.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/r/R/R-2.15.3-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/r/R/R-3.0.1-goalf-1.1.0-no-OFED-bare.eb | 0 .../{ => __archive__}/r/RNAz/RNAz-2.1-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/r/ROOT/ROOT-v5.34.01-goalf-1.1.0-no-OFED.eb | 0 .../s/SAMtools/SAMtools-0.1.18-goalf-1.1.0-no-OFED.eb | 0 .../s/SCOOP/SCOOP-0.5.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb | 0 .../s/SHRiMP/SHRiMP-2.2.3-goalf-1.1.0-no-OFED.eb | 0 .../s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../s/SOAPdenovo/SOAPdenovo-1.05-goalf-1.1.0-no-OFED.eb | 0 .../s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 ....8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb | 0 ...caLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb | 0 .../ScaLAPACK-2.0.2-gompi-1.5.12-ATLAS-3.10.1-LAPACK-3.4.2.eb | 0 ...LAPACK-2.0.2-gompi-1.5.12-no-OFED-ATLAS-3.10.1-LAPACK-3.4.2.eb | 0 .../ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../s/Shapely/Shapely-1.2.15-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/s/Stow/Stow-1.3.3-goalf-1.1.0-no-OFED.eb | 0 .../SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb | 0 .../{ => __archive__}/s/Szip/Szip-2.1-goalf-1.1.0-no-OFED.eb | 0 .../scikit-learn-0.13-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../s/scipy/scipy-0.11.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../s/sparsehash/sparsehash-2.0.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/t/Tar/Tar-1.26-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/t/Tcl/Tcl-8.5.12-goalf-1.1.0-no-OFED.eb | 0 .../t/Theano/Theano-0.5.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../t/TiCCutils/TiCCutils-0.3-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/t/TiMBL/TiMBL-6.4.3-goalf-1.1.0-no-OFED.eb | 0 .../t/TinySVM/TinySVM-0.09-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/t/Tk/Tk-8.5.12-goalf-1.1.0-no-OFED.eb | 0 .../t/TopHat/TopHat-2.0.4-goalf-1.1.0-no-OFED.eb | 0 .../t/Tornado/Tornado-2012.09.06-goalf-1.1.0-no-OFED.eb | 0 .../Trilinos/Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../t/Trinity/Trinity-2012-10-05-goalf-1.1.0-no-OFED.eb | 0 .../t/Trinity/Trinity-2013-02-25-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/t/tclcl/tclcl-1.20-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/t/tcsh/tcsh-6.18.01-goalf-1.1.0-no-OFED.eb | 0 .../u/UDUNITS/UDUNITS-2.1.24-goalf-1.1.0-no-OFED.eb | 0 .../u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../u/util-linux/util-linux-2.22.2-goalf-1.1.0-no-OFED.eb | 0 .../VSC-tools/VSC-tools-0.1.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/v/VTK/VTK-5.10.1-goalf-1.1.0-no-OFED.eb | 0 .../v/Valgrind/Valgrind-3.8.1-goalf-1.1.0-no-OFED.eb | 0 .../v/Valgrind/Valgrind-3.9.0-goalf-1.5.12-no-OFED.eb | 0 .../v/Velvet/Velvet-1.2.07-goalf-1.1.0-no-OFED.eb | 0 .../v/ViennaRNA/ViennaRNA-2.0.7-goalf-1.1.0-no-OFED.eb | 0 .../v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../{ => __archive__}/w/WIEN2k/WIEN2k-12.1-goalf-1.1.0-no-OFED.eb | 0 .../w/WPS/WPS-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb | 0 .../{ => __archive__}/w/WPS/WPS-3.4-goalf-1.1.0-no-OFED-dmpar.eb | 0 .../w/WRF/WRF-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb | 0 .../{ => __archive__}/w/WRF/WRF-3.4-goalf-1.1.0-no-OFED-dmpar.eb | 0 .../wiki2beamer-0.9.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../x/XCrySDen/XCrySDen-1.5.53-goalf-1.1.0-no-OFED.eb | 0 .../x/XML/XML-3.95-0.1-goalf-1.1.0-no-OFED-R-2.15.2.eb | 0 .../x/xcb-proto/xcb-proto-1.7-goalf-1.1.0-no-OFED-Python-2.7.3.eb | 0 .../x/xorg-macros/xorg-macros-1.17-goalf-1.1.0-no-OFED.eb | 0 .../x/xproto/xproto-7.0.23-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/y/YamCha/YamCha-0.33-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/y/Yasm/Yasm-1.2.0-goalf-1.1.0-no-OFED.eb | 0 .../z/ZeroMQ/ZeroMQ-2.2.0-goalf-1.1.0-no-OFED.eb | 0 .../z/ZeroMQ/ZeroMQ-3.2.2-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.5-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-goalf-1.1.0-no-OFED.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-goalf-1.5.12-no-OFED.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.8-goalf-1.5.12-no-OFED.eb | 0 .../{ => __archive__}/z/zsync/zsync-0.6.2-goalf-1.1.0-no-OFED.eb | 0 309 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/a/ABySS/ABySS-1.3.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ALADIN/ALADIN-36t1_op2bf1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/AMOS/AMOS-3.1.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ASE/ASE-3.6.0.2515-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-no-OFED-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/Autoconf/Autoconf-2.69-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/a2ps/a2ps-4.14-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/a/aria2/aria2-1.15.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BFAST/BFAST-0.7.0a-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BLAST+/BLAST+-2.2.27-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BWA/BWA-0.6.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BamTools/BamTools-2.2.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bash/Bash-4.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.5-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bonnie++/Bonnie++-1.03e-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.53.0-goalf-1.5.12-no-OFED-Python-2.7.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bowtie2/Bowtie2-2.0.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bbFTP/bbFTP-3.2.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bbftpPRO/bbftpPRO-9.3.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/beagle-lib/beagle-lib-20120124-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/binutils/binutils-2.22-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/byacc/byacc-20120526-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CHARMM/CHARMM-37b2-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CLHEP/CLHEP-2.1.1.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.10.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.12-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.12-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CRF++/CRF++-0.57-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CVXOPT/CVXOPT-1.1.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Chapel/Chapel-1.6.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/ClustalW2/ClustalW2-2.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Corkscrew/Corkscrew-2.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Cufflinks/Cufflinks-2.0.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/Cython/Cython-0.16-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.27.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cairo/cairo-1.12.14-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/ccache/ccache-3.1.9-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cflow/cflow-1.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgdb/cgdb-0.6.5-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/DL_POLY_Classic/DL_POLY_Classic-1.9-goalf-1.1.0-no-OFED-no-gui.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/Doxygen/Doxygen-1.8.1.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ELinks/ELinks-0.12pre5-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ESMF/ESMF-5.3.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-parallel.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-serial.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/Eigen/Eigen-3.1.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/Eigen/Eigen-3.1.4-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-2.1.5-gompi-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-gompi-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-gompi-1.5.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/Ferret/Ferret-6.72-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/fontconfig/fontconfig-2.10.91-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freetype/freetype-2.4.10-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/freetype/freetype-2.4.11-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GATE/GATE-6.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDB/GDB-7.5.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GEOS/GEOS-3.3.5-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GHC/GHC-7.4.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GHC/GHC-7.6.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GHC/GHC-7.8.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GLib/GLib-2.34.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GPAW/GPAW-0.9.0.8965-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/Geant4/Geant4-9.5.p01-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GnuTLS/GnuTLS-3.1.8-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/Greenlet/Greenlet-0.4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/Guile/Guile-1.8.8-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/g2clib/g2clib-1.2.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/g2lib/g2lib-1.2.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/git/git-1.7.12-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/glproto/glproto-1.4.16-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gnuplot/gnuplot-4.6.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/goalf/goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/goalf/goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/goalf/goalf-1.5.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gompi/gompi-1.5.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gperf/gperf-3.0.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/grib_api/grib_api-1.9.18-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF/HDF-4.2.7-patch1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.7-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.9-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HH-suite/HH-suite-2.0.16-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HMMER/HMMER-3.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPCBIOS_Math/HPCBIOS_Math-20130829-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/Harminv/Harminv-1.3.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/h5py/h5py-2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/h5utils/h5utils-1.12.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/Infernal/Infernal-1.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/Infernal/Infernal-1.1rc1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/Iperf/Iperf-2.0.5-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/j/JasPer/JasPer-1.900.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LZO/LZO-2.06-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/Libint/Libint-1.1.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/lftp/lftp-4.4.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libctl/libctl-3.2.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libdrm/libdrm-2.4.27-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libffi/libffi-3.0.11-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libffi/libffi-3.0.13-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libgtextutils/libgtextutils-0.6.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libidn/libidn-1.27-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libmatheval/libmatheval-1.1.8-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpciaccess/libpciaccess-0.13.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.10-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.11-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.13-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.5.14-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpng/libpng-1.6.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libpthread-stubs/libpthread-stubs-0.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libsmm/libsmm-20111205-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libtool/libtool-2.4.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libunistring/libunistring-0.9.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxc/libxc-2.0.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxc/libxc-2.0.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxcb/libxcb-1.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.1-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxslt/libxslt-1.1.28-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libyaml/libyaml-0.1.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED-pinomp.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MCL/MCL-12.135-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MDP/MDP-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MEME/MEME-4.8.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MUMmer/MUMmer-3.23-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Meep/Meep-1.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mercurial/Mercurial-2.3.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mesa/Mesa-7.11.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MetaVelvet/MetaVelvet-1.2.01-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MrBayes/MrBayes-3.1.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MrBayes/MrBayes-3.2.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/makedepend/makedepend-1.0.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/matplotlib/matplotlib-1.1.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/mc/mc-4.6.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/mpi4py/mpi4py-1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/mpiBLAST/mpiBLAST-1.6.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NASM/NASM-2.07-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NCL/NCL-6.0.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NEURON/NEURON-7.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NWChem/NWChem-6.1.1-goalf-1.1.0-no-OFED-2012-06-27-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/nano/nano-2.2.6-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF-Fortran/netCDF-Fortran-4.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF/netCDF-4.1.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/netCDF/netCDF-4.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/nettle/nettle-2.6-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ns/ns-2.35-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/numactl/numactl-2.0.8-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/numpy/numpy-1.6.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/Oger/Oger-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBabel/OpenBabel-2.3.2-goalf-1.5.12-no-OFED-Python-2.7.5.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenPGM/OpenPGM-5.2.122-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/otcl/otcl-1.14-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PAPI/PAPI-5.0.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PLINK/PLINK-1.07-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Perl/Perl-5.16.3-goalf-1.1.0-no-OFED-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.5.6-goalf-1.1.0-no-OFED-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/parallel/parallel-20130122-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/paycheck/paycheck-1.0.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/pixman/pixman-0.28.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/pkg-config/pkg-config-0.27.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/python-meep/python-meep-1.4.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-2.15.2-goalf-1.1.0-no-OFED-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-2.15.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-2.15.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/R/R-3.0.1-goalf-1.1.0-no-OFED-bare.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/RNAz/RNAz-2.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/r/ROOT/ROOT-v5.34.01-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SAMtools/SAMtools-0.1.18-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCOOP/SCOOP-0.5.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SHRiMP/SHRiMP-2.2.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SOAPdenovo/SOAPdenovo-1.05-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-ATLAS-3.10.1-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-no-OFED-ATLAS-3.10.1-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Shapely/Shapely-1.2.15-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Stow/Stow-1.3.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/scikit-learn/scikit-learn-0.13-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/scipy/scipy-0.11.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/sparsehash/sparsehash-2.0.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tar/Tar-1.26-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tcl/Tcl-8.5.12-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Theano/Theano-0.5.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TiCCutils/TiCCutils-0.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TiMBL/TiMBL-6.4.3-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TinySVM/TinySVM-0.09-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tk/Tk-8.5.12-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/TopHat/TopHat-2.0.4-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tornado/Tornado-2012.09.06-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Trilinos/Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Trinity/Trinity-2012-10-05-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Trinity/Trinity-2013-02-25-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/tclcl/tclcl-1.20-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/tcsh/tcsh-6.18.01-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UDUNITS/UDUNITS-2.1.24-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/u/util-linux/util-linux-2.22.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/VSC-tools/VSC-tools-0.1.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/VTK/VTK-5.10.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Valgrind/Valgrind-3.8.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Valgrind/Valgrind-3.9.0-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Velvet/Velvet-1.2.07-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/ViennaRNA/ViennaRNA-2.0.7-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WIEN2k/WIEN2k-12.1-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WPS/WPS-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WPS/WPS-3.4-goalf-1.1.0-no-OFED-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WRF/WRF-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/WRF/WRF-3.4-goalf-1.1.0-no-OFED-dmpar.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/w/wiki2beamer/wiki2beamer-0.9.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/XCrySDen/XCrySDen-1.5.53-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/XML/XML-3.95-0.1-goalf-1.1.0-no-OFED-R-2.15.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xcb-proto/xcb-proto-1.7-goalf-1.1.0-no-OFED-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xorg-macros/xorg-macros-1.17-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/x/xproto/xproto-7.0.23-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/y/YamCha/YamCha-0.33-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/y/Yasm/Yasm-1.2.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/ZeroMQ/ZeroMQ-2.2.0-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/ZeroMQ/ZeroMQ-3.2.2-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.5-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-goalf-1.1.0-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.8-goalf-1.5.12-no-OFED.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zsync/zsync-0.6.2-goalf-1.1.0-no-OFED.eb (100%) diff --git a/easybuild/easyconfigs/a/ABySS/ABySS-1.3.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/a/ABySS/ABySS-1.3.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/a/ABySS/ABySS-1.3.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/a/ABySS/ABySS-1.3.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/a/ALADIN/ALADIN-36t1_op2bf1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/a/ALADIN/ALADIN-36t1_op2bf1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/a/ALADIN/ALADIN-36t1_op2bf1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/a/ALADIN/ALADIN-36t1_op2bf1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/a/AMOS/AMOS-3.1.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/a/AMOS/AMOS-3.1.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/a/AMOS/AMOS-3.1.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/a/AMOS/AMOS-3.1.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/a/ASE/ASE-3.6.0.2515-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/a/ASE/ASE-3.6.0.2515-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/a/ASE/ASE-3.6.0.2515-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/a/ASE/ASE-3.6.0.2515-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-no-OFED-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-no-OFED-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-no-OFED-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.10.1-gompi-1.5.12-no-OFED-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb b/easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb similarity index 100% rename from easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb rename to easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-LAPACK-3.4.0.eb diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb b/easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb similarity index 100% rename from easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb rename to easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED-with-shared-libs.eb diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/a/ATLAS/ATLAS-3.8.4-gompi-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/a/Armadillo/Armadillo-2.4.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/a/Autoconf/Autoconf-2.69-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/a/Autoconf/Autoconf-2.69-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/a/Autoconf/Autoconf-2.69-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/a/a2ps/a2ps-4.14-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/a/a2ps/a2ps-4.14-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/a/a2ps/a2ps-4.14-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/a/a2ps/a2ps-4.14-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/a/aria2/aria2-1.15.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/a/aria2/aria2-1.15.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/a/aria2/aria2-1.15.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/a/aria2/aria2-1.15.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/BFAST/BFAST-0.7.0a-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/BFAST/BFAST-0.7.0a-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/BFAST/BFAST-0.7.0a-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/BFAST/BFAST-0.7.0a-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-gompi-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/BLAST+/BLAST+-2.2.27-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/BLAST+/BLAST+-2.2.27-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/BLAST+/BLAST+-2.2.27-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/BLAST+/BLAST+-2.2.27-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/BWA/BWA-0.6.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/BWA/BWA-0.6.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/BWA/BWA-0.6.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/BWA/BWA-0.6.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/BamTools/BamTools-2.2.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/BamTools/BamTools-2.2.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/BamTools/BamTools-2.2.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/BamTools/BamTools-2.2.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/Bash/Bash-4.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/Bash/Bash-4.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/Bash/Bash-4.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/Bash/Bash-4.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/BiSearch/BiSearch-20051222-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/Bonnie++/Bonnie++-1.03e-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/Bonnie++/Bonnie++-1.03e-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/Bonnie++/Bonnie++-1.03e-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/Bonnie++/Bonnie++-1.03e-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.49.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.53.0-goalf-1.5.12-no-OFED-Python-2.7.5.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.53.0-goalf-1.5.12-no-OFED-Python-2.7.5.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.53.0-goalf-1.5.12-no-OFED-Python-2.7.5.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.53.0-goalf-1.5.12-no-OFED-Python-2.7.5.eb diff --git a/easybuild/easyconfigs/b/Bowtie2/Bowtie2-2.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/Bowtie2/Bowtie2-2.0.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/Bowtie2/Bowtie2-2.0.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/Bowtie2/Bowtie2-2.0.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/bbFTP/bbFTP-3.2.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/bbFTP/bbFTP-3.2.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/bbFTP/bbFTP-3.2.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/bbFTP/bbFTP-3.2.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/bbftpPRO/bbftpPRO-9.3.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/bbftpPRO/bbftpPRO-9.3.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/bbftpPRO/bbftpPRO-9.3.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/bbftpPRO/bbftpPRO-9.3.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/beagle-lib/beagle-lib-20120124-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/beagle-lib/beagle-lib-20120124-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/binutils/binutils-2.22-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/binutils/binutils-2.22-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/binutils/binutils-2.22-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/binutils/binutils-2.22-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/byacc/byacc-20120526-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/byacc/byacc-20120526-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/byacc/byacc-20120526-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/byacc/byacc-20120526-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/c/CGAL/CGAL-4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/CHARMM/CHARMM-37b2-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CHARMM/CHARMM-37b2-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CHARMM/CHARMM-37b2-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CHARMM/CHARMM-37b2-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CLHEP/CLHEP-2.1.1.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CLHEP/CLHEP-2.1.1.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CLHEP/CLHEP-2.1.1.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CLHEP/CLHEP-2.1.1.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.12-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.12-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.12-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.12-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb b/easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb rename to easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-libsmm.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb b/easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb rename to easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED-psmp.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CRF++/CRF++-0.57-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/CRF++/CRF++-0.57-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/CRF++/CRF++-0.57-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/CRF++/CRF++-0.57-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/CVXOPT/CVXOPT-1.1.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/c/CVXOPT/CVXOPT-1.1.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/CVXOPT/CVXOPT-1.1.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/c/CVXOPT/CVXOPT-1.1.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/Chapel/Chapel-1.6.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/Chapel/Chapel-1.6.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/Chapel/Chapel-1.6.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/Chapel/Chapel-1.6.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/ClustalW2/ClustalW2-2.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/ClustalW2/ClustalW2-2.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/ClustalW2/ClustalW2-2.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/ClustalW2/ClustalW2-2.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/Corkscrew/Corkscrew-2.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/Corkscrew/Corkscrew-2.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/Corkscrew/Corkscrew-2.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/Corkscrew/Corkscrew-2.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/Cufflinks/Cufflinks-2.0.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.0.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/Cufflinks/Cufflinks-2.0.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/Cython/Cython-0.16-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/c/Cython/Cython-0.16-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/c/Cython/Cython-0.16-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/c/Cython/Cython-0.16-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.27.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.27.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.27.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.27.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.12.14-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/cairo/cairo-1.12.14-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/cairo/cairo-1.12.14-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/cairo/cairo-1.12.14-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/ccache/ccache-3.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/ccache/ccache-3.1.9-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/ccache/ccache-3.1.9-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/ccache/ccache-3.1.9-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/cflow/cflow-1.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/cflow/cflow-1.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/cflow/cflow-1.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/cflow/cflow-1.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/c/cgdb/cgdb-0.6.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/c/cgdb/cgdb-0.6.5-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/c/cgdb/cgdb-0.6.5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/c/cgdb/cgdb-0.6.5-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-goalf-1.1.0-no-OFED-no-gui.eb b/easybuild/easyconfigs/__archive__/d/DL_POLY_Classic/DL_POLY_Classic-1.9-goalf-1.1.0-no-OFED-no-gui.eb similarity index 100% rename from easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-goalf-1.1.0-no-OFED-no-gui.eb rename to easybuild/easyconfigs/__archive__/d/DL_POLY_Classic/DL_POLY_Classic-1.9-goalf-1.1.0-no-OFED-no-gui.eb diff --git a/easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/d/DOLFIN/DOLFIN-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/d/Docutils/Docutils-0.9.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.1.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.1.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/d/Doxygen/Doxygen-1.8.1.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/d/Doxygen/Doxygen-1.8.1.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/e/ELinks/ELinks-0.12pre5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/e/ELinks/ELinks-0.12pre5-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/e/ELinks/ELinks-0.12pre5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/e/ELinks/ELinks-0.12pre5-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/e/ESMF/ESMF-5.3.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/e/ESMF/ESMF-5.3.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/e/ESMF/ESMF-5.3.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/e/ESMF/ESMF-5.3.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-parallel.eb b/easybuild/easyconfigs/__archive__/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-parallel.eb similarity index 100% rename from easybuild/easyconfigs/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-parallel.eb rename to easybuild/easyconfigs/__archive__/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-parallel.eb diff --git a/easybuild/easyconfigs/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-serial.eb b/easybuild/easyconfigs/__archive__/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-serial.eb similarity index 100% rename from easybuild/easyconfigs/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-serial.eb rename to easybuild/easyconfigs/__archive__/e/ESPResSo/ESPResSo-3.1.1-goalf-1.1.0-no-OFED-serial.eb diff --git a/easybuild/easyconfigs/e/Eigen/Eigen-3.1.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/e/Eigen/Eigen-3.1.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/e/Eigen/Eigen-3.1.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/e/Eigen/Eigen-3.1.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/e/Eigen/Eigen-3.1.4-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/e/Eigen/Eigen-3.1.4-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/e/Eigen/Eigen-3.1.4-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/e/Eigen/Eigen-3.1.4-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/FASTX-Toolkit/FASTX-Toolkit-0.0.13.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/f/FFC/FFC-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-2.1.5-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-2.1.5-gompi-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-2.1.5-gompi-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-2.1.5-gompi-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.1-gompi-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompi-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompi-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompi-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompi-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompi-1.5.12.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompi-1.5.12.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gompi-1.5.12.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gompi-1.5.12.eb diff --git a/easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/f/FIAT/FIAT-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/FSL/FSL-4.1.9-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/Ferret/Ferret-6.72-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/Ferret/Ferret-6.72-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/Ferret/Ferret-6.72-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/Ferret/Ferret-6.72-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/fontconfig/fontconfig-2.10.91-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/fontconfig/fontconfig-2.10.91-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/fontconfig/fontconfig-2.10.91-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/fontconfig/fontconfig-2.10.91-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.4.10-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.10-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/freetype/freetype-2.4.10-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.10-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.4.11-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.11-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/f/freetype/freetype-2.4.11-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/f/freetype/freetype-2.4.11-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GATE/GATE-6.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GATE/GATE-6.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GATE/GATE-6.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GATE/GATE-6.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GDB/GDB-7.5.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GDB/GDB-7.5.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GEOS/GEOS-3.3.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GEOS/GEOS-3.3.5-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GEOS/GEOS-3.3.5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GEOS/GEOS-3.3.5-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GHC/GHC-7.4.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GHC/GHC-7.4.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GHC/GHC-7.4.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GHC/GHC-7.4.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GHC/GHC-7.6.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GHC/GHC-7.6.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GHC/GHC-7.6.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GHC/GHC-7.6.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GHC/GHC-7.8.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GHC/GHC-7.8.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GHC/GHC-7.8.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GHC/GHC-7.8.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GLib/GLib-2.34.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GLib/GLib-2.34.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GMP/GMP-5.0.5-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GPAW/GPAW-0.9.0.8965-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/g/GPAW/GPAW-0.9.0.8965-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/g/GPAW/GPAW-0.9.0.8965-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/g/GPAW/GPAW-0.9.0.8965-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-hybrid.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-hybrid.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-hybrid.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-mt.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-mt.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-mt.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-goalf-1.1.0-no-OFED-mt.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GSL/GSL-1.15-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/Geant4/Geant4-9.5.p01-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/Geant4/Geant4-9.5.p01-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/Geant4/Geant4-9.5.p01-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/Geant4/Geant4-9.5.p01-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/GnuTLS/GnuTLS-3.1.8-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/GnuTLS/GnuTLS-3.1.8-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/GnuTLS/GnuTLS-3.1.8-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/GnuTLS/GnuTLS-3.1.8-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/Greenlet/Greenlet-0.4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/g/Greenlet/Greenlet-0.4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/g/Greenlet/Greenlet-0.4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/g/Greenlet/Greenlet-0.4.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/g/Guile/Guile-1.8.8-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/Guile/Guile-1.8.8-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/Guile/Guile-1.8.8-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/Guile/Guile-1.8.8-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/g2clib/g2clib-1.2.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/g2clib/g2clib-1.2.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/g2clib/g2clib-1.2.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/g2clib/g2clib-1.2.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/g2lib/g2lib-1.2.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/g2lib/g2lib-1.2.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/g2lib/g2lib-1.2.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/g2lib/g2lib-1.2.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/git/git-1.7.12-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/git/git-1.7.12-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/git/git-1.7.12-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/git/git-1.7.12-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/glproto/glproto-1.4.16-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/glproto/glproto-1.4.16-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/glproto/glproto-1.4.16-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/glproto/glproto-1.4.16-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gnuplot/gnuplot-4.6.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gnuplot/gnuplot-4.6.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gnuplot/gnuplot-4.6.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gnuplot/gnuplot-4.6.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/goalf/goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/goalf/goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/goalf/goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/goalf/goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/goalf/goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/goalf/goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/g/goalf/goalf-1.5.12.eb b/easybuild/easyconfigs/__archive__/g/goalf/goalf-1.5.12.eb similarity index 100% rename from easybuild/easyconfigs/g/goalf/goalf-1.5.12.eb rename to easybuild/easyconfigs/__archive__/g/goalf/goalf-1.5.12.eb diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gompi/gompi-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gompi/gompi-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gompi/gompi-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gompi/gompi-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gompi/gompi-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gompi/gompi-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gompi/gompi-1.5.12.eb b/easybuild/easyconfigs/__archive__/g/gompi/gompi-1.5.12.eb similarity index 100% rename from easybuild/easyconfigs/g/gompi/gompi-1.5.12.eb rename to easybuild/easyconfigs/__archive__/g/gompi/gompi-1.5.12.eb diff --git a/easybuild/easyconfigs/g/gperf/gperf-3.0.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gperf/gperf-3.0.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gperf/gperf-3.0.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gperf/gperf-3.0.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/grib_api/grib_api-1.9.18-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/grib_api/grib_api-1.9.18-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/grib_api/grib_api-1.9.18-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/grib_api/grib_api-1.9.18-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/HDF/HDF-4.2.7-patch1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/HDF/HDF-4.2.7-patch1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF/HDF-4.2.7-patch1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/HDF/HDF-4.2.7-patch1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.7-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.7-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.7-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.7-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.9-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.9-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.9-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/HH-suite/HH-suite-2.0.16-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/HH-suite/HH-suite-2.0.16-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/HH-suite/HH-suite-2.0.16-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/HH-suite/HH-suite-2.0.16-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/HMMER/HMMER-3.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/HMMER/HMMER-3.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/HMMER/HMMER-3.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/HMMER/HMMER-3.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/HPCBIOS_Math/HPCBIOS_Math-20130829-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/HPCBIOS_Math/HPCBIOS_Math-20130829-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/HPCBIOS_Math/HPCBIOS_Math-20130829-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/HPCBIOS_Math/HPCBIOS_Math-20130829-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/Harminv/Harminv-1.3.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/Harminv/Harminv-1.3.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/Harminv/Harminv-1.3.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/Harminv/Harminv-1.3.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/Hypre/Hypre-2.8.0b-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/h/h5py/h5py-2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/h/h5py/h5py-2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/h/h5py/h5py-2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/h/h5py/h5py-2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/h/h5utils/h5utils-1.12.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/h/h5utils/h5utils-1.12.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/h/h5utils/h5utils-1.12.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/h/h5utils/h5utils-1.12.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/i/Infernal/Infernal-1.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/i/Infernal/Infernal-1.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/i/Infernal/Infernal-1.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/i/Infernal/Infernal-1.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/i/Infernal/Infernal-1.1rc1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/i/Infernal/Infernal-1.1rc1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/i/Infernal/Infernal-1.1rc1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/i/Infernal/Infernal-1.1rc1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/i/Instant/Instant-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/i/Iperf/Iperf-2.0.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/i/Iperf/Iperf-2.0.5-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/i/Iperf/Iperf-2.0.5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/i/Iperf/Iperf-2.0.5-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/j/JasPer/JasPer-1.900.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/j/JasPer/JasPer-1.900.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/j/JasPer/JasPer-1.900.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/j/JasPer/JasPer-1.900.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/j/Jinja2/Jinja2-2.6-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb b/easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb similarity index 100% rename from easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb rename to easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-testing.eb diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb b/easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb similarity index 100% rename from easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb rename to easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4.eb diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.0-gompi-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12.eb b/easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12.eb similarity index 100% rename from easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12.eb rename to easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.2-gompi-1.5.12.eb diff --git a/easybuild/easyconfigs/l/LZO/LZO-2.06-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/LZO/LZO-2.06-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/LZO/LZO-2.06-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/LZO/LZO-2.06-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/Libint/Libint-1.1.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/Libint/Libint-1.1.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/lftp/lftp-4.4.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/lftp/lftp-4.4.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/lftp/lftp-4.4.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/lftp/lftp-4.4.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libctl/libctl-3.2.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libctl/libctl-3.2.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libctl/libctl-3.2.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libctl/libctl-3.2.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libdrm/libdrm-2.4.27-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libdrm/libdrm-2.4.27-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libdrm/libdrm-2.4.27-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libdrm/libdrm-2.4.27-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.11-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.11-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libffi/libffi-3.0.11-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.11-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libffi/libffi-3.0.13-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libgtextutils/libgtextutils-0.6.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libgtextutils/libgtextutils-0.6.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libgtextutils/libgtextutils-0.6.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libgtextutils/libgtextutils-0.6.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libidn/libidn-1.27-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libidn/libidn-1.27-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libidn/libidn-1.27-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libidn/libidn-1.27-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.8-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libmatheval/libmatheval-1.1.8-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libmatheval/libmatheval-1.1.8-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libmatheval/libmatheval-1.1.8-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libpciaccess/libpciaccess-0.13.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libpciaccess/libpciaccess-0.13.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libpciaccess/libpciaccess-0.13.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libpciaccess/libpciaccess-0.13.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.10-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.10-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.10-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.10-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.11-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.11-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.11-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.11-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.13-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.13-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.13-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.13-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.5.14-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.14-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.5.14-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.5.14-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libpng/libpng-1.6.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libpng/libpng-1.6.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libpthread-stubs/libpthread-stubs-0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libpthread-stubs/libpthread-stubs-0.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libpthread-stubs/libpthread-stubs-0.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libpthread-stubs/libpthread-stubs-0.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libsmm/libsmm-20111205-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libsmm/libsmm-20111205-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libsmm/libsmm-20111205-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libsmm/libsmm-20111205-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libtool/libtool-2.4.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libtool/libtool-2.4.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libtool/libtool-2.4.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libtool/libtool-2.4.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libunistring/libunistring-0.9.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libunistring/libunistring-0.9.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libunistring/libunistring-0.9.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libxc/libxc-2.0.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libxc/libxc-2.0.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libxc/libxc-2.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libxc/libxc-2.0.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libxc/libxc-2.0.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libxcb/libxcb-1.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/l/libxcb/libxcb-1.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/l/libxcb/libxcb-1.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/l/libxcb/libxcb-1.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.8.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libxslt/libxslt-1.1.28-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libxslt/libxslt-1.1.28-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libxslt/libxslt-1.1.28-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/libyaml/libyaml-0.1.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/libyaml/libyaml-0.1.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/libyaml/libyaml-0.1.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/libyaml/libyaml-0.1.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED-pinomp.eb b/easybuild/easyconfigs/__archive__/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED-pinomp.eb similarity index 100% rename from easybuild/easyconfigs/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED-pinomp.eb rename to easybuild/easyconfigs/__archive__/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED-pinomp.eb diff --git a/easybuild/easyconfigs/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/l/likwid/likwid-3.0.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/MCL/MCL-12.135-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/MCL/MCL-12.135-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/MCL/MCL-12.135-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/MCL/MCL-12.135-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/MDP/MDP-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/MDP/MDP-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/MDP/MDP-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/MDP/MDP-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/MEME/MEME-4.8.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/MEME/MEME-4.8.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/MEME/MEME-4.8.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/MEME/MEME-4.8.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-4.0.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-5.0.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/MPFR/MPFR-3.1.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/MUMmer/MUMmer-3.23-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/MUMmer/MUMmer-3.23-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/Meep/Meep-1.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/Meep/Meep-1.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/Meep/Meep-1.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/Meep/Meep-1.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/Mercurial/Mercurial-2.3.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.3.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mercurial/Mercurial-2.3.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.3.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/Mesa/Mesa-7.11.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mesa/Mesa-7.11.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mesa/Mesa-7.11.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mesa/Mesa-7.11.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/MetaVelvet/MetaVelvet-1.2.01-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/MetaVelvet/MetaVelvet-1.2.01-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/MetaVelvet/MetaVelvet-1.2.01-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/MetaVelvet/MetaVelvet-1.2.01-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/MrBayes/MrBayes-3.1.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/MrBayes/MrBayes-3.1.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/MrBayes/MrBayes-3.2.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/MrBayes/MrBayes-3.2.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/makedepend/makedepend-1.0.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/makedepend/makedepend-1.0.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.1.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.1.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/matplotlib/matplotlib-1.1.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/matplotlib/matplotlib-1.1.1-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/mc/mc-4.6.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/mc/mc-4.6.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/mc/mc-4.6.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/mc/mc-4.6.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/m/mpi4py/mpi4py-1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/mpi4py/mpi4py-1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/mpi4py/mpi4py-1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/mpi4py/mpi4py-1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/mpiBLAST/mpiBLAST-1.6.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/m/mpiBLAST/mpiBLAST-1.6.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/m/mpiBLAST/mpiBLAST-1.6.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/m/mpiBLAST/mpiBLAST-1.6.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/NASM/NASM-2.07-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/NASM/NASM-2.07-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/NASM/NASM-2.07-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/NASM/NASM-2.07-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/NCBI-Toolkit/NCBI-Toolkit-9.0.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/NCL/NCL-6.0.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/NCL/NCL-6.0.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/NCL/NCL-6.0.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/NCL/NCL-6.0.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/NEURON/NEURON-7.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/NEURON/NEURON-7.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/NEURON/NEURON-7.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/NEURON/NEURON-7.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/NWChem/NWChem-6.1.1-goalf-1.1.0-no-OFED-2012-06-27-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/n/NWChem/NWChem-6.1.1-goalf-1.1.0-no-OFED-2012-06-27-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/NWChem/NWChem-6.1.1-goalf-1.1.0-no-OFED-2012-06-27-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/n/NWChem/NWChem-6.1.1-goalf-1.1.0-no-OFED-2012-06-27-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/n/nano/nano-2.2.6-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/nano/nano-2.2.6-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/nano/nano-2.2.6-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/nano/nano-2.2.6-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/netCDF-Fortran/netCDF-Fortran-4.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.1.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.1.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF/netCDF-4.1.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.1.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/netCDF/netCDF-4.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/netCDF/netCDF-4.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/nettle/nettle-2.6-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/nettle/nettle-2.6-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/nettle/nettle-2.6-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/nettle/nettle-2.6-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/ns/ns-2.35-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/ns/ns-2.35-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/ns/ns-2.35-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/ns/ns-2.35-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/numactl/numactl-2.0.8-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/n/numactl/numactl-2.0.8-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/n/numactl/numactl-2.0.8-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/n/numactl/numactl-2.0.8-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/n/numpy/numpy-1.6.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/n/numpy/numpy-1.6.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/n/numpy/numpy-1.6.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/n/numpy/numpy-1.6.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/o/Oger/Oger-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/o/Oger/Oger-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/o/Oger/Oger-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/o/Oger/Oger-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-goalf-1.5.12-no-OFED-Python-2.7.5.eb b/easybuild/easyconfigs/__archive__/o/OpenBabel/OpenBabel-2.3.2-goalf-1.5.12-no-OFED-Python-2.7.5.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBabel/OpenBabel-2.3.2-goalf-1.5.12-no-OFED-Python-2.7.5.eb rename to easybuild/easyconfigs/__archive__/o/OpenBabel/OpenBabel-2.3.2-goalf-1.5.12-no-OFED-Python-2.7.5.eb diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OpenFOAM/OpenFOAM-2.1.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OpenPGM/OpenPGM-5.2.122-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OpenPGM/OpenPGM-5.2.122-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenPGM/OpenPGM-5.2.122-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OpenPGM/OpenPGM-5.2.122-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/o/otcl/otcl-1.14-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/o/otcl/otcl-1.14-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/o/otcl/otcl-1.14-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/o/otcl/otcl-1.14-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/PAPI/PAPI-5.0.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/PAPI/PAPI-5.0.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/PAPI/PAPI-5.0.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/PAPI/PAPI-5.0.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/PCRE/PCRE-8.12-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/PETSc/PETSc-3.3-p2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/PLINK/PLINK-1.07-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/PLINK/PLINK-1.07-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/PLINK/PLINK-1.07-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/PLINK/PLINK-1.07-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED-mt.eb b/easybuild/easyconfigs/__archive__/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED-mt.eb similarity index 100% rename from easybuild/easyconfigs/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED-mt.eb rename to easybuild/easyconfigs/__archive__/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED-mt.eb diff --git a/easybuild/easyconfigs/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/PSI/PSI-4.0b5-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-3.1.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-4.0.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/Pasha/Pasha-1.0.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/Perl/Perl-5.16.3-goalf-1.1.0-no-OFED-bare.eb b/easybuild/easyconfigs/__archive__/p/Perl/Perl-5.16.3-goalf-1.1.0-no-OFED-bare.eb similarity index 100% rename from easybuild/easyconfigs/p/Perl/Perl-5.16.3-goalf-1.1.0-no-OFED-bare.eb rename to easybuild/easyconfigs/__archive__/p/Perl/Perl-5.16.3-goalf-1.1.0-no-OFED-bare.eb diff --git a/easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/Primer3/Primer3-2.3.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq2.eb b/easybuild/easyconfigs/__archive__/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq2.eb similarity index 100% rename from easybuild/easyconfigs/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq2.eb rename to easybuild/easyconfigs/__archive__/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq2.eb diff --git a/easybuild/easyconfigs/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq3.eb b/easybuild/easyconfigs/__archive__/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq3.eb similarity index 100% rename from easybuild/easyconfigs/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq3.eb rename to easybuild/easyconfigs/__archive__/p/PyZMQ/PyZMQ-2.2.0.1-goalf-1.1.0-no-OFED-Python-2.7.3-zmq3.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.5.6-goalf-1.1.0-no-OFED-bare.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.5.6-goalf-1.1.0-no-OFED-bare.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.5.6-goalf-1.1.0-no-OFED-bare.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.5.6-goalf-1.1.0-no-OFED-bare.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.5-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-3.2.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/parallel/parallel-20130122-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/parallel/parallel-20130122-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/parallel/parallel-20130122-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/parallel/parallel-20130122-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/paycheck/paycheck-1.0.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/paycheck/paycheck-1.0.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/paycheck/paycheck-1.0.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/paycheck/paycheck-1.0.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/petsc4py/petsc4py-3.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/p/pixman/pixman-0.28.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/pixman/pixman-0.28.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/pixman/pixman-0.28.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/pixman/pixman-0.28.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/p/pkg-config/pkg-config-0.27.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/p/pkg-config/pkg-config-0.27.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/p/pkg-config/pkg-config-0.27.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/p/python-meep/python-meep-1.4.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/p/python-meep/python-meep-1.4.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/p/python-meep/python-meep-1.4.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/p/python-meep/python-meep-1.4.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/q/Qt/Qt-4.8.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/q/Qt/Qt-4.8.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED-hybrid.eb b/easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED-hybrid.eb rename to easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED-hybrid.eb diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-4.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED-hybrid.eb b/easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED-hybrid.eb rename to easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED-hybrid.eb diff --git a/easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/q/QuantumESPRESSO/QuantumESPRESSO-5.0.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/r/R/R-2.15.2-goalf-1.1.0-no-OFED-bare.eb b/easybuild/easyconfigs/__archive__/r/R/R-2.15.2-goalf-1.1.0-no-OFED-bare.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-2.15.2-goalf-1.1.0-no-OFED-bare.eb rename to easybuild/easyconfigs/__archive__/r/R/R-2.15.2-goalf-1.1.0-no-OFED-bare.eb diff --git a/easybuild/easyconfigs/r/R/R-2.15.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/r/R/R-2.15.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-2.15.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/r/R/R-2.15.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/r/R/R-2.15.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/r/R/R-2.15.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-2.15.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/r/R/R-2.15.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/r/R/R-3.0.1-goalf-1.1.0-no-OFED-bare.eb b/easybuild/easyconfigs/__archive__/r/R/R-3.0.1-goalf-1.1.0-no-OFED-bare.eb similarity index 100% rename from easybuild/easyconfigs/r/R/R-3.0.1-goalf-1.1.0-no-OFED-bare.eb rename to easybuild/easyconfigs/__archive__/r/R/R-3.0.1-goalf-1.1.0-no-OFED-bare.eb diff --git a/easybuild/easyconfigs/r/RNAz/RNAz-2.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/r/RNAz/RNAz-2.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/r/RNAz/RNAz-2.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/r/RNAz/RNAz-2.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/r/ROOT/ROOT-v5.34.01-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/r/ROOT/ROOT-v5.34.01-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/r/ROOT/ROOT-v5.34.01-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/r/ROOT/ROOT-v5.34.01-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.18-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/SAMtools/SAMtools-0.1.18-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.18-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/SAMtools/SAMtools-0.1.18-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/s/SCOOP/SCOOP-0.5.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/SCOOP/SCOOP-0.5.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/SCOOP/SCOOP-0.5.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/SCOOP/SCOOP-0.5.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-5.1.12b_esmumps-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/s/SHRiMP/SHRiMP-2.2.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/SHRiMP/SHRiMP-2.2.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/SHRiMP/SHRiMP-2.2.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/SHRiMP/SHRiMP-2.2.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/SLEPc/SLEPc-3.3-p1-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/SOAPdenovo/SOAPdenovo-1.05-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/SOAPdenovo/SOAPdenovo-1.05-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/SOAPdenovo/SOAPdenovo-1.05-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/SOAPdenovo/SOAPdenovo-1.05-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/SWIG/SWIG-2.0.4-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-1.8.0-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0-BLACS-1.1.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.1-gompi-1.1.0-no-OFED-ATLAS-3.8.4-LAPACK-3.4.0.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-ATLAS-3.10.1-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-ATLAS-3.10.1-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-ATLAS-3.10.1-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-ATLAS-3.10.1-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-no-OFED-ATLAS-3.10.1-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-no-OFED-ATLAS-3.10.1-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-no-OFED-ATLAS-3.10.1-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gompi-1.5.12-no-OFED-ATLAS-3.10.1-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/ScientificPython/ScientificPython-2.8-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/Shapely/Shapely-1.2.15-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/Shapely/Shapely-1.2.15-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/Shapely/Shapely-1.2.15-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/Shapely/Shapely-1.2.15-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/Sphinx/Sphinx-1.1.3-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/Stow/Stow-1.3.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/Stow/Stow-1.3.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/Stow/Stow-1.3.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/Stow/Stow-1.3.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb b/easybuild/easyconfigs/__archive__/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb similarity index 100% rename from easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb rename to easybuild/easyconfigs/__archive__/s/SuiteSparse/SuiteSparse-3.7.0-goalf-1.1.0-no-OFED-withparmetis.eb diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/Szip/Szip-2.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.13-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/scikit-learn/scikit-learn-0.13-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/scikit-learn/scikit-learn-0.13-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/scikit-learn/scikit-learn-0.13-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/scipy/scipy-0.11.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/scipy/scipy-0.11.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/scipy/scipy-0.11.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/scipy/scipy-0.11.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/setuptools/setuptools-0.6c11-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/sparsehash/sparsehash-2.0.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/s/sparsehash/sparsehash-2.0.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/s/sparsehash/sparsehash-2.0.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/s/sparsehash/sparsehash-2.0.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/Tar/Tar-1.26-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/Tar/Tar-1.26-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/Tar/Tar-1.26-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/Tar/Tar-1.26-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/Theano/Theano-0.5.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/t/Theano/Theano-0.5.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/t/Theano/Theano-0.5.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/t/Theano/Theano-0.5.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/t/TiCCutils/TiCCutils-0.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/TiCCutils/TiCCutils-0.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/TiCCutils/TiCCutils-0.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/TiCCutils/TiCCutils-0.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/TiMBL/TiMBL-6.4.3-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/TiMBL/TiMBL-6.4.3-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/TiMBL/TiMBL-6.4.3-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/TiMBL/TiMBL-6.4.3-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/TinySVM/TinySVM-0.09-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/TinySVM/TinySVM-0.09-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/TinySVM/TinySVM-0.09-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/TinySVM/TinySVM-0.09-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/Tk/Tk-8.5.12-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/Tk/Tk-8.5.12-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/Tk/Tk-8.5.12-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/Tk/Tk-8.5.12-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/TopHat/TopHat-2.0.4-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/TopHat/TopHat-2.0.4-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/TopHat/TopHat-2.0.4-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/TopHat/TopHat-2.0.4-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/Tornado/Tornado-2012.09.06-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/Tornado/Tornado-2012.09.06-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/Tornado/Tornado-2012.09.06-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/Tornado/Tornado-2012.09.06-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/t/Trilinos/Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/t/Trilinos/Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/t/Trilinos/Trilinos-10.12.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/t/Trinity/Trinity-2012-10-05-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2012-10-05-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/Trinity/Trinity-2012-10-05-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2012-10-05-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/Trinity/Trinity-2013-02-25-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2013-02-25-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/Trinity/Trinity-2013-02-25-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/Trinity/Trinity-2013-02-25-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/tclcl/tclcl-1.20-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/tclcl/tclcl-1.20-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/tclcl/tclcl-1.20-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/tclcl/tclcl-1.20-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/t/tcsh/tcsh-6.18.01-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/t/tcsh/tcsh-6.18.01-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/t/tcsh/tcsh-6.18.01-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/t/tcsh/tcsh-6.18.01-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/u/UDUNITS/UDUNITS-2.1.24-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/u/UDUNITS/UDUNITS-2.1.24-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/u/UFC/UFC-2.0.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/u/UFL/UFL-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/u/util-linux/util-linux-2.22.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/u/util-linux/util-linux-2.22.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/u/util-linux/util-linux-2.22.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/u/util-linux/util-linux-2.22.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/v/VSC-tools/VSC-tools-0.1.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/v/VSC-tools/VSC-tools-0.1.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/v/VSC-tools/VSC-tools-0.1.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/v/VSC-tools/VSC-tools-0.1.2-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/v/VTK/VTK-5.10.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/v/VTK/VTK-5.10.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/v/VTK/VTK-5.10.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/v/VTK/VTK-5.10.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/v/Valgrind/Valgrind-3.9.0-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.9.0-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/v/Valgrind/Valgrind-3.9.0-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.9.0-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/v/Velvet/Velvet-1.2.07-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/v/Velvet/Velvet-1.2.07-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/v/Velvet/Velvet-1.2.07-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/v/Velvet/Velvet-1.2.07-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/v/ViennaRNA/ViennaRNA-2.0.7-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/v/ViennaRNA/ViennaRNA-2.0.7-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/v/ViennaRNA/ViennaRNA-2.0.7-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/v/ViennaRNA/ViennaRNA-2.0.7-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/v/Viper/Viper-1.0.0-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/w/WIEN2k/WIEN2k-12.1-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/w/WIEN2k/WIEN2k-12.1-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/w/WIEN2k/WIEN2k-12.1-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/w/WIEN2k/WIEN2k-12.1-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/w/WPS/WPS-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WPS/WPS-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WPS/WPS-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WPS/WPS-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb diff --git a/easybuild/easyconfigs/w/WPS/WPS-3.4-goalf-1.1.0-no-OFED-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WPS/WPS-3.4-goalf-1.1.0-no-OFED-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WPS/WPS-3.4-goalf-1.1.0-no-OFED-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WPS/WPS-3.4-goalf-1.1.0-no-OFED-dmpar.eb diff --git a/easybuild/easyconfigs/w/WRF/WRF-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WRF/WRF-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WRF/WRF-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WRF/WRF-3.3.1-goalf-1.1.0-no-OFED-dmpar.eb diff --git a/easybuild/easyconfigs/w/WRF/WRF-3.4-goalf-1.1.0-no-OFED-dmpar.eb b/easybuild/easyconfigs/__archive__/w/WRF/WRF-3.4-goalf-1.1.0-no-OFED-dmpar.eb similarity index 100% rename from easybuild/easyconfigs/w/WRF/WRF-3.4-goalf-1.1.0-no-OFED-dmpar.eb rename to easybuild/easyconfigs/__archive__/w/WRF/WRF-3.4-goalf-1.1.0-no-OFED-dmpar.eb diff --git a/easybuild/easyconfigs/w/wiki2beamer/wiki2beamer-0.9.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/w/wiki2beamer/wiki2beamer-0.9.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/w/wiki2beamer/wiki2beamer-0.9.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/w/wiki2beamer/wiki2beamer-0.9.5-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/x/XCrySDen/XCrySDen-1.5.53-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/x/XCrySDen/XCrySDen-1.5.53-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/x/XCrySDen/XCrySDen-1.5.53-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/x/XCrySDen/XCrySDen-1.5.53-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/x/XML/XML-3.95-0.1-goalf-1.1.0-no-OFED-R-2.15.2.eb b/easybuild/easyconfigs/__archive__/x/XML/XML-3.95-0.1-goalf-1.1.0-no-OFED-R-2.15.2.eb similarity index 100% rename from easybuild/easyconfigs/x/XML/XML-3.95-0.1-goalf-1.1.0-no-OFED-R-2.15.2.eb rename to easybuild/easyconfigs/__archive__/x/XML/XML-3.95-0.1-goalf-1.1.0-no-OFED-R-2.15.2.eb diff --git a/easybuild/easyconfigs/x/xcb-proto/xcb-proto-1.7-goalf-1.1.0-no-OFED-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/x/xcb-proto/xcb-proto-1.7-goalf-1.1.0-no-OFED-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/x/xcb-proto/xcb-proto-1.7-goalf-1.1.0-no-OFED-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/x/xcb-proto/xcb-proto-1.7-goalf-1.1.0-no-OFED-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/x/xorg-macros/xorg-macros-1.17-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/x/xorg-macros/xorg-macros-1.17-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/x/xorg-macros/xorg-macros-1.17-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/x/xorg-macros/xorg-macros-1.17-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/x/xproto/xproto-7.0.23-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/x/xproto/xproto-7.0.23-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/x/xproto/xproto-7.0.23-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/x/xproto/xproto-7.0.23-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/y/YamCha/YamCha-0.33-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/y/YamCha/YamCha-0.33-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/y/YamCha/YamCha-0.33-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/y/YamCha/YamCha-0.33-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/y/Yasm/Yasm-1.2.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/y/Yasm/Yasm-1.2.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/y/Yasm/Yasm-1.2.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/y/Yasm/Yasm-1.2.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/z/ZeroMQ/ZeroMQ-2.2.0-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/z/ZeroMQ/ZeroMQ-2.2.0-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/z/ZeroMQ/ZeroMQ-2.2.0-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/z/ZeroMQ/ZeroMQ-2.2.0-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/z/ZeroMQ/ZeroMQ-3.2.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/z/ZeroMQ/ZeroMQ-3.2.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/z/ZeroMQ/ZeroMQ-3.2.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/z/ZeroMQ/ZeroMQ-3.2.2-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.5-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.5-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.5-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.5-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-goalf-1.1.0-no-OFED.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.8-goalf-1.5.12-no-OFED.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.8-goalf-1.5.12-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.8-goalf-1.5.12-no-OFED.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.8-goalf-1.5.12-no-OFED.eb diff --git a/easybuild/easyconfigs/z/zsync/zsync-0.6.2-goalf-1.1.0-no-OFED.eb b/easybuild/easyconfigs/__archive__/z/zsync/zsync-0.6.2-goalf-1.1.0-no-OFED.eb similarity index 100% rename from easybuild/easyconfigs/z/zsync/zsync-0.6.2-goalf-1.1.0-no-OFED.eb rename to easybuild/easyconfigs/__archive__/z/zsync/zsync-0.6.2-goalf-1.1.0-no-OFED.eb -- GitLab From 3aee3411258232e0fc213a31cd8f5c6f70e957f0 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 27 Oct 2016 21:46:52 +0200 Subject: [PATCH 523/741] move easyconfigs for deprecated gmvolf toolchains to archive --- .../{ => __archive__}/b/BLACS/BLACS-1.1-gmvapich2-1.6.7.eb | 0 .../{ => __archive__}/b/BLACS/BLACS-1.1-gmvapich2-1.7.9a2.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12rc1.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.12-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.29.0-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.29.0-gmvolf-1.7.12rc1.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-gmvolf-1.7.12rc1.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.2-gmvapich2-1.7.9a2.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12rc1.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.12.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.35-gmvapich2-1.6.7.eb | 0 .../{ => __archive__}/g/GDB/GDB-7.5.1-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/g/GDB/GDB-7.5.1-gmvolf-1.7.12rc1.eb | 0 .../g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-hybrid.eb | 0 .../{ => __archive__}/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-mt.eb | 0 .../{ => __archive__}/g/gettext/gettext-0.18.2-gmvolf-1.7.12.eb | 0 .../g/gettext/gettext-0.18.2-gmvolf-1.7.12rc1.eb | 0 .../{ => __archive__}/g/git/git-1.8.2-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/g/git/git-1.8.2-gmvolf-1.7.12rc1.eb | 0 .../easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.1.0.eb | 0 .../easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.6.7.eb | 0 .../easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.7.12.eb | 0 .../{ => __archive__}/g/gmvapich2/gmvapich2-1.7.12rc1.eb | 0 .../easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.7.20.eb | 0 .../{ => __archive__}/g/gmvapich2/gmvapich2-1.7.9a2.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/gmvolf/gmvolf-1.7.12.eb | 0 .../easyconfigs/{ => __archive__}/g/gmvolf/gmvolf-1.7.12rc1.eb | 0 .../l/libreadline/libreadline-6.2-gmvolf-1.7.12.eb | 0 .../l/libreadline/libreadline-6.2-gmvolf-1.7.12rc1.eb | 0 .../m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12-Python-2.7.3.eb | 0 .../m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12rc1-Python-2.7.3.eb | 0 .../{ => __archive__}/n/NAMD/NAMD-2.9-gmvapich2-1.7.12-ibverbs.eb | 0 .../{ => __archive__}/n/NAMD/NAMD-2.9-gmvolf-1.7.12-ibverbs.eb | 0 .../n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12.eb | 0 .../n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12rc1.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-gmvolf-1.7.12rc1.eb | 0 .../o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12-LAPACK-3.4.2.eb | 0 .../o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12rc1-LAPACK-3.4.2.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12.eb | 0 .../o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12rc1.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb | 0 ...caLAPACK-2.0.2-gmvapich2-1.7.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 ...APACK-2.0.2-gmvapich2-1.7.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 ...aLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb | 0 ...ScaLAPACK-2.0.2-gmvapich2-1.7.9a2-ACML-5.2.0-gfortran-64bit.eb | 0 .../{ => __archive__}/t/Tcl/Tcl-8.5.12-gmvapich2-1.7.12.eb | 0 .../{ => __archive__}/t/Tcl/Tcl-8.5.12-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12.eb | 0 .../v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12rc1.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-gmvapich2-1.7.12.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-gmvolf-1.7.12.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-gmvolf-1.7.12rc1.eb | 0 58 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/b/BLACS/BLACS-1.1-gmvapich2-1.6.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/BLACS/BLACS-1.1-gmvapich2-1.7.9a2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.12-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.29.0-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.29.0-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.2-gmvapich2-1.7.9a2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.35-gmvapich2-1.6.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDB/GDB-7.5.1-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDB/GDB-7.5.1-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/git/git-1.8.2-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/git/git-1.8.2-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.1.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.6.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.7.20.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmvapich2/gmvapich2-1.7.9a2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmvolf/gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmvolf/gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12rc1-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NAMD/NAMD-2.9-gmvapich2-1.7.12-ibverbs.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/NAMD/NAMD-2.9-gmvolf-1.7.12-ibverbs.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12rc1-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.9a2-ACML-5.2.0-gfortran-64bit.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tcl/Tcl-8.5.12-gmvapich2-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/t/Tcl/Tcl-8.5.12-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-gmvapich2-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-gmvolf-1.7.12.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-gmvolf-1.7.12rc1.eb (100%) diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.6.7.eb b/easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-gmvapich2-1.6.7.eb similarity index 100% rename from easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.6.7.eb rename to easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-gmvapich2-1.6.7.eb diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.7.9a2.eb b/easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-gmvapich2-1.7.9a2.eb similarity index 100% rename from easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-1.7.9a2.eb rename to easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-gmvapich2-1.7.9a2.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.12-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.12-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.29.0-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.29.0-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.29.0-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.29.0-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.2-gmvapich2-1.7.9a2.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.2-gmvapich2-1.7.9a2.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.2-gmvapich2-1.7.9a2.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.2-gmvapich2-1.7.9a2.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gmvapich2-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.12.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.12.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.12.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-gmvapich2-1.6.7.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-gmvapich2-1.6.7.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.35-gmvapich2-1.6.7.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-gmvapich2-1.6.7.eb diff --git a/easybuild/easyconfigs/g/GDB/GDB-7.5.1-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/g/GDB/GDB-7.5.1-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/g/GDB/GDB-7.5.1-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/g/GDB/GDB-7.5.1-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-hybrid.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-hybrid.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-hybrid.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-mt.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-mt.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-mt.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-gmvolf-1.7.12-mt.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/g/git/git-1.8.2-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/g/git/git-1.8.2-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/g/git/git-1.8.2-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/g/git/git-1.8.2-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/g/git/git-1.8.2-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/g/git/git-1.8.2-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/g/git/git-1.8.2-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/g/git/git-1.8.2-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb b/easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.1.0.eb similarity index 100% rename from easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.1.0.eb rename to easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.1.0.eb diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.6.7.eb b/easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.6.7.eb similarity index 100% rename from easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.6.7.eb rename to easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.6.7.eb diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.12.eb b/easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.12.eb rename to easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.12.eb diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.20.eb b/easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.20.eb similarity index 100% rename from easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.20.eb rename to easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.20.eb diff --git a/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.9a2.eb b/easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.9a2.eb similarity index 100% rename from easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.9a2.eb rename to easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.9a2.eb diff --git a/easybuild/easyconfigs/g/gmvolf/gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/g/gmvolf/gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/g/gmvolf/gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/g/gmvolf/gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/g/gmvolf/gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/g/gmvolf/gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/g/gmvolf/gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/g/gmvolf/gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12rc1-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12rc1-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12rc1-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-gmvolf-1.7.12rc1-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/n/NAMD/NAMD-2.9-gmvapich2-1.7.12-ibverbs.eb b/easybuild/easyconfigs/__archive__/n/NAMD/NAMD-2.9-gmvapich2-1.7.12-ibverbs.eb similarity index 100% rename from easybuild/easyconfigs/n/NAMD/NAMD-2.9-gmvapich2-1.7.12-ibverbs.eb rename to easybuild/easyconfigs/__archive__/n/NAMD/NAMD-2.9-gmvapich2-1.7.12-ibverbs.eb diff --git a/easybuild/easyconfigs/n/NAMD/NAMD-2.9-gmvolf-1.7.12-ibverbs.eb b/easybuild/easyconfigs/__archive__/n/NAMD/NAMD-2.9-gmvolf-1.7.12-ibverbs.eb similarity index 100% rename from easybuild/easyconfigs/n/NAMD/NAMD-2.9-gmvolf-1.7.12-ibverbs.eb rename to easybuild/easyconfigs/__archive__/n/NAMD/NAMD-2.9-gmvolf-1.7.12-ibverbs.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12rc1-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12rc1-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12rc1-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gmvapich2-1.7.12rc1-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.9a2-ACML-5.2.0-gfortran-64bit.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.9a2-ACML-5.2.0-gfortran-64bit.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.9a2-ACML-5.2.0-gfortran-64bit.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.9a2-ACML-5.2.0-gfortran-64bit.eb diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-gmvapich2-1.7.12.eb b/easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-gmvapich2-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-gmvapich2-1.7.12.eb rename to easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-gmvapich2-1.7.12.eb diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/t/Tcl/Tcl-8.5.12-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-gmvolf-1.7.12rc1.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gmvapich2-1.7.12.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gmvapich2-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-gmvapich2-1.7.12.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gmvapich2-1.7.12.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gmvolf-1.7.12.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gmvolf-1.7.12.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-gmvolf-1.7.12.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gmvolf-1.7.12.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gmvolf-1.7.12rc1.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gmvolf-1.7.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-gmvolf-1.7.12rc1.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gmvolf-1.7.12rc1.eb -- GitLab From 6bed37ff6c66f579fba69746a855678999d7f1ad Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 08:41:32 +0200 Subject: [PATCH 524/741] add easyconfig IronPython-2.7-intel-2016b.eb, add easyconfig Mono-2.10.6-intel-2016b.eb, add easyconfig MyMediaLite-3.10-intel-2016b.eb --- .../IronPython/IronPython-2.7-intel-2016b.eb | 16 +++++++++++ .../m/Mono/Mono-2.10.6-intel-2016b.eb | 28 +++++++++++++++++++ .../MyMediaLite-3.10-intel-2016b.eb | 14 ++++++++++ 3 files changed, 58 insertions(+) create mode 100644 easybuild/easyconfigs/i/IronPython/IronPython-2.7-intel-2016b.eb create mode 100644 easybuild/easyconfigs/m/Mono/Mono-2.10.6-intel-2016b.eb create mode 100644 easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-intel-2016b.eb diff --git a/easybuild/easyconfigs/i/IronPython/IronPython-2.7-intel-2016b.eb b/easybuild/easyconfigs/i/IronPython/IronPython-2.7-intel-2016b.eb new file mode 100644 index 0000000000..b0645a78ef --- /dev/null +++ b/easybuild/easyconfigs/i/IronPython/IronPython-2.7-intel-2016b.eb @@ -0,0 +1,16 @@ +name = 'IronPython' +version = '2.7' + +homepage = 'http://ironpython.net/' +description = """IronPython is an open-source implementation of the Python programming language + which is tightly integrated with the .NET Framework. IronPython can use the .NET Framework and +Python libraries, and other .NET languages can use Python code just as easily.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/IronLanguages/main/archive/'] +sources = ['ipy-%(version)s.tar.gz'] + +dependencies = [('Mono', '2.10.6')] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/m/Mono/Mono-2.10.6-intel-2016b.eb b/easybuild/easyconfigs/m/Mono/Mono-2.10.6-intel-2016b.eb new file mode 100644 index 0000000000..365455df1b --- /dev/null +++ b/easybuild/easyconfigs/m/Mono/Mono-2.10.6-intel-2016b.eb @@ -0,0 +1,28 @@ +name = 'Mono' +version = '2.10.6' + +homepage = 'http://mono-framework.com' +description = """An open source, cross-platform, implementation of C# and the CLR that is + binary compatible with Microsoft.NET.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# Mono required Mono to build, so there are a couple of options: +# 1) provide Mono RPMs in sources, the Mono easyblock will use them to make a tmp Mono install +# 2) assume a Mono version is available system-wide (assert using e.g. "osdependencies = ['mono-core']") +# 3) specify an already available Mono module as build dep, e.g. "builddependencies = [('Mono', '2.10.6')] + +source_urls = ['http://download.mono-project.com/sources/mono/'] +sources = [ + SOURCELOWER_TAR_BZ2, + # Mono requires Mono to build, so provide RPMs so Mono can be bootstrapped + 'libgdiplus-2.4.2-2.el5.kb.x86_64.rpm', + 'mono-core-2.4.2.3-2.el5.kb.x86_64.rpm', +] + +builddependencies = [ + ('Bison', '3.0.4'), + ('gettext', '0.19.8'), +] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-intel-2016b.eb b/easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-intel-2016b.eb new file mode 100644 index 0000000000..75f50aa79e --- /dev/null +++ b/easybuild/easyconfigs/m/MyMediaLite/MyMediaLite-3.10-intel-2016b.eb @@ -0,0 +1,14 @@ +name = 'MyMediaLite' +version = '3.10' + +homepage = 'http://www.ismll.uni-hildesheim.de/mymedialite/' +description = """MyMediaLite is a lightweight, multi-purpose library of recommender system algorithms.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.mymedialite.net/download/'] +sources = ['%(name)s-%(version)s.src.tar.gz'] + +dependencies = [('Mono', '2.10.6')] + +moduleclass = 'lib' -- GitLab From 9718e1f97a0f6c73aad408de5f6b3f31002e5cc4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 09:06:05 +0200 Subject: [PATCH 525/741] move easyconfigs for deprecated gimkl 1.5.9 toolchain to archive --- easybuild/easyconfigs/{ => __archive__}/g/gimkl/gimkl-1.5.9.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/gimpi/gimpi-1.5.9.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-gimkl-1.5.9.eb | 0 .../{ => __archive__}/i/imkl/imkl-11.1.2.144-gimpi-1.5.9.eb | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/g/gimkl/gimkl-1.5.9.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gimpi/gimpi-1.5.9.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-gimkl-1.5.9.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/i/imkl/imkl-11.1.2.144-gimpi-1.5.9.eb (100%) diff --git a/easybuild/easyconfigs/g/gimkl/gimkl-1.5.9.eb b/easybuild/easyconfigs/__archive__/g/gimkl/gimkl-1.5.9.eb similarity index 100% rename from easybuild/easyconfigs/g/gimkl/gimkl-1.5.9.eb rename to easybuild/easyconfigs/__archive__/g/gimkl/gimkl-1.5.9.eb diff --git a/easybuild/easyconfigs/g/gimpi/gimpi-1.5.9.eb b/easybuild/easyconfigs/__archive__/g/gimpi/gimpi-1.5.9.eb similarity index 100% rename from easybuild/easyconfigs/g/gimpi/gimpi-1.5.9.eb rename to easybuild/easyconfigs/__archive__/g/gimpi/gimpi-1.5.9.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.1-gimkl-1.5.9.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-gimkl-1.5.9.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.1-gimkl-1.5.9.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-gimkl-1.5.9.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.1.2.144-gimpi-1.5.9.eb b/easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.2.144-gimpi-1.5.9.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-11.1.2.144-gimpi-1.5.9.eb rename to easybuild/easyconfigs/__archive__/i/imkl/imkl-11.1.2.144-gimpi-1.5.9.eb -- GitLab From 4b026f0a2a0ff28eae19a1b8b5b84b2fa56034a4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 09:12:31 +0200 Subject: [PATCH 526/741] move easyconfigs for deprecated Clang-based toolchains to archive --- .../{ => __archive__}/b/Bison/Bison-2.7-ClangGCC-1.1.3.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.7-ClangGCC-1.2.3.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-cgmvolf-1.2.7.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-cgoolf-1.1.7.eb | 0 .../easyconfigs/{ => __archive__}/c/ClangGCC/ClangGCC-1.1.3.eb | 0 .../easyconfigs/{ => __archive__}/c/ClangGCC/ClangGCC-1.2.3.eb | 0 .../easyconfigs/{ => __archive__}/c/ClangGCC/ClangGCC-1.3.0.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.29.0-cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.29.0-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.29.0-cgmvolf-1.2.7.eb | 0 .../{ => __archive__}/c/cURL/cURL-7.29.0-cgoolf-1.1.7.eb | 0 .../easyconfigs/{ => __archive__}/c/cgmpich/cgmpich-1.1.6.eb | 0 .../easyconfigs/{ => __archive__}/c/cgmpolf/cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/c/cgmvapich2/cgmvapich2-1.1.12rc1.eb | 0 .../{ => __archive__}/c/cgmvapich2/cgmvapich2-1.2.7.eb | 0 .../easyconfigs/{ => __archive__}/c/cgmvolf/cgmvolf-1.1.12rc1.eb | 0 .../easyconfigs/{ => __archive__}/c/cgmvolf/cgmvolf-1.2.7.eb | 0 easybuild/easyconfigs/{ => __archive__}/c/cgompi/cgompi-1.1.7.eb | 0 easybuild/easyconfigs/{ => __archive__}/c/cgoolf/cgoolf-1.1.7.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-cgmvolf-1.2.7.eb | 0 .../{ => __archive__}/e/expat/expat-2.1.0-cgoolf-1.1.7.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-cgmpich-1.1.6.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-cgmvapich2-1.1.12rc1.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-cgmvapich2-1.2.7.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-cgompi-1.1.7.eb | 0 .../{ => __archive__}/g/GDB/GDB-7.5.1-cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/g/GDB/GDB-7.5.1-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/g/GDB/GDB-7.5.1-cgmvolf-1.2.7.eb | 0 .../easyconfigs/{ => __archive__}/g/GDB/GDB-7.5.1-cgoolf-1.1.7.eb | 0 .../{ => __archive__}/g/gettext/gettext-0.18.2-cgmpolf-1.1.6.eb | 0 .../g/gettext/gettext-0.18.2-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/g/gettext/gettext-0.18.2-cgmvolf-1.2.7.eb | 0 .../{ => __archive__}/g/gettext/gettext-0.18.2-cgoolf-1.1.7.eb | 0 .../{ => __archive__}/g/git/git-1.8.2-cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/g/git/git-1.8.2-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/g/git/git-1.8.2-cgmvolf-1.2.7.eb | 0 .../easyconfigs/{ => __archive__}/g/git/git-1.8.2-cgoolf-1.1.7.eb | 0 .../easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-cgoolf-1.1.7.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/h/HPL/HPL-2.0-cgmvolf-1.1.12rc1.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-cgmvolf-1.2.7.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-cgoolf-1.1.7.eb | 0 .../{ => __archive__}/h/hwloc/hwloc-1.6.2-ClangGCC-1.1.3.eb | 0 .../l/libreadline/libreadline-6.2-cgmpolf-1.1.6.eb | 0 .../l/libreadline/libreadline-6.2-cgmvolf-1.1.12rc1.eb | 0 .../l/libreadline/libreadline-6.2-cgmvolf-1.2.7.eb | 0 .../l/libreadline/libreadline-6.2-cgoolf-1.1.7.eb | 0 .../{ => __archive__}/m/M4/M4-1.4.16-ClangGCC-1.1.3.eb | 0 .../{ => __archive__}/m/M4/M4-1.4.16-ClangGCC-1.2.3.eb | 0 .../{ => __archive__}/m/MPICH/MPICH-3.0.3-ClangGCC-1.1.3.eb | 0 .../{ => __archive__}/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.1.3.eb | 0 .../{ => __archive__}/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.2.3.eb | 0 .../m/MVAPICH2/MVAPICH2-1.9rc1-ClangGCC-1.1.3.eb | 0 .../m/Mercurial/Mercurial-2.5.2-cgmpolf-1.1.6-Python-2.7.3.eb | 0 .../m/Mercurial/Mercurial-2.5.2-cgmvolf-1.1.12rc1-Python-2.7.3.eb | 0 .../m/Mercurial/Mercurial-2.5.2-cgmvolf-1.2.7-Python-2.7.3.eb | 0 .../m/Mercurial/Mercurial-2.5.2-cgoolf-1.1.7-Python-2.7.3.eb | 0 .../n/ncurses/ncurses-5.9-20130406-cgmpolf-1.1.6.eb | 0 .../n/ncurses/ncurses-5.9-20130406-cgmvolf-1.1.12rc1.eb | 0 .../n/ncurses/ncurses-5.9-20130406-cgmvolf-1.2.7.eb | 0 .../n/ncurses/ncurses-5.9-20130406-cgoolf-1.1.7.eb | 0 .../o/OpenBLAS/OpenBLAS-0.2.6-cgmpich-1.1.6-LAPACK-3.4.2.eb | 0 .../OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.1.12rc1-LAPACK-3.4.2.eb | 0 .../o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.2.7-LAPACK-3.4.2.eb | 0 .../o/OpenBLAS/OpenBLAS-0.2.6-cgompi-1.1.7-LAPACK-3.4.2.eb | 0 .../{ => __archive__}/o/OpenMPI/OpenMPI-1.6.4-ClangGCC-1.1.3.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-cgmpolf-1.1.6.eb | 0 .../o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.2.7.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-cgoolf-1.1.7.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-cgoolf-1.1.7.eb | 0 .../ScaLAPACK-2.0.2-cgmpich-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 ...PACK-2.0.2-cgmvapich2-1.1.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 ...caLAPACK-2.0.2-cgmvapich2-1.2.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 .../ScaLAPACK-2.0.2-cgompi-1.1.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 .../{ => __archive__}/v/Valgrind/Valgrind-3.8.1-cgmpolf-1.1.6.eb | 0 .../v/Valgrind/Valgrind-3.8.1-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.2.7.eb | 0 .../{ => __archive__}/v/Valgrind/Valgrind-3.8.1-cgoolf-1.1.7.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-cgmpolf-1.1.6.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-cgmvolf-1.1.12rc1.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-cgmvolf-1.2.7.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-cgoolf-1.1.7.eb | 0 90 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.7-ClangGCC-1.1.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.7-ClangGCC-1.2.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/ClangGCC/ClangGCC-1.1.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/ClangGCC/ClangGCC-1.2.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/ClangGCC/ClangGCC-1.3.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.29.0-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.29.0-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.29.0-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cURL/cURL-7.29.0-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgmpich/cgmpich-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgmpolf/cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgmvapich2/cgmvapich2-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgmvapich2/cgmvapich2-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgmvolf/cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgmvolf/cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgompi/cgompi-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/cgoolf/cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/e/expat/expat-2.1.0-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-cgmpich-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-cgmvapich2-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-cgmvapich2-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-cgompi-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDB/GDB-7.5.1-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDB/GDB-7.5.1-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDB/GDB-7.5.1-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GDB/GDB-7.5.1-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/git/git-1.8.2-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/git/git-1.8.2-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/git/git-1.8.2-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/git/git-1.8.2-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.0-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/hwloc/hwloc-1.6.2-ClangGCC-1.1.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-ClangGCC-1.1.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-ClangGCC-1.2.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MPICH/MPICH-3.0.3-ClangGCC-1.1.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.1.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.2.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MVAPICH2/MVAPICH2-1.9rc1-ClangGCC-1.1.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mercurial/Mercurial-2.5.2-cgmpolf-1.1.6-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.1.12rc1-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.2.7-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/Mercurial/Mercurial-2.5.2-cgoolf-1.1.7-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-20130406-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-20130406-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-cgmpich-1.1.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.1.12rc1-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.2.7-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-cgompi-1.1.7-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenMPI/OpenMPI-1.6.4-ClangGCC-1.1.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.1f-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmpich-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.1.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.2.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-cgompi-1.1.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Valgrind/Valgrind-3.8.1-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/v/Valgrind/Valgrind-3.8.1-cgoolf-1.1.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-cgmpolf-1.1.6.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-cgmvolf-1.1.12rc1.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-cgmvolf-1.2.7.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-cgoolf-1.1.7.eb (100%) diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.7-ClangGCC-1.1.3.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-ClangGCC-1.1.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.7-ClangGCC-1.1.3.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-ClangGCC-1.1.3.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.7-ClangGCC-1.2.3.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-ClangGCC-1.2.3.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.7-ClangGCC-1.2.3.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.7-ClangGCC-1.2.3.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/c/ClangGCC/ClangGCC-1.1.3.eb b/easybuild/easyconfigs/__archive__/c/ClangGCC/ClangGCC-1.1.3.eb similarity index 100% rename from easybuild/easyconfigs/c/ClangGCC/ClangGCC-1.1.3.eb rename to easybuild/easyconfigs/__archive__/c/ClangGCC/ClangGCC-1.1.3.eb diff --git a/easybuild/easyconfigs/c/ClangGCC/ClangGCC-1.2.3.eb b/easybuild/easyconfigs/__archive__/c/ClangGCC/ClangGCC-1.2.3.eb similarity index 100% rename from easybuild/easyconfigs/c/ClangGCC/ClangGCC-1.2.3.eb rename to easybuild/easyconfigs/__archive__/c/ClangGCC/ClangGCC-1.2.3.eb diff --git a/easybuild/easyconfigs/c/ClangGCC/ClangGCC-1.3.0.eb b/easybuild/easyconfigs/__archive__/c/ClangGCC/ClangGCC-1.3.0.eb similarity index 100% rename from easybuild/easyconfigs/c/ClangGCC/ClangGCC-1.3.0.eb rename to easybuild/easyconfigs/__archive__/c/ClangGCC/ClangGCC-1.3.0.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.29.0-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.29.0-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.29.0-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.29.0-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.29.0-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.29.0-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/c/cURL/cURL-7.29.0-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/c/cURL/cURL-7.29.0-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/c/cURL/cURL-7.29.0-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/c/cgmpich/cgmpich-1.1.6.eb b/easybuild/easyconfigs/__archive__/c/cgmpich/cgmpich-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/c/cgmpich/cgmpich-1.1.6.eb rename to easybuild/easyconfigs/__archive__/c/cgmpich/cgmpich-1.1.6.eb diff --git a/easybuild/easyconfigs/c/cgmpolf/cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/c/cgmpolf/cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/c/cgmpolf/cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/c/cgmpolf/cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/c/cgmvapich2/cgmvapich2-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/c/cgmvapich2/cgmvapich2-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/c/cgmvapich2/cgmvapich2-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/c/cgmvapich2/cgmvapich2-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/c/cgmvapich2/cgmvapich2-1.2.7.eb b/easybuild/easyconfigs/__archive__/c/cgmvapich2/cgmvapich2-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/c/cgmvapich2/cgmvapich2-1.2.7.eb rename to easybuild/easyconfigs/__archive__/c/cgmvapich2/cgmvapich2-1.2.7.eb diff --git a/easybuild/easyconfigs/c/cgmvolf/cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/c/cgmvolf/cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/c/cgmvolf/cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/c/cgmvolf/cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/c/cgmvolf/cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/c/cgmvolf/cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/c/cgmvolf/cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/c/cgmvolf/cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/c/cgompi/cgompi-1.1.7.eb b/easybuild/easyconfigs/__archive__/c/cgompi/cgompi-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/c/cgompi/cgompi-1.1.7.eb rename to easybuild/easyconfigs/__archive__/c/cgompi/cgompi-1.1.7.eb diff --git a/easybuild/easyconfigs/c/cgoolf/cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/c/cgoolf/cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/c/cgoolf/cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/c/cgoolf/cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/e/expat/expat-2.1.0-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/e/expat/expat-2.1.0-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/e/expat/expat-2.1.0-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-cgmpich-1.1.6.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-cgmpich-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-cgmpich-1.1.6.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-cgmpich-1.1.6.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-cgmvapich2-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-cgmvapich2-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-cgmvapich2-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-cgmvapich2-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-cgmvapich2-1.2.7.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-cgmvapich2-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-cgmvapich2-1.2.7.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-cgmvapich2-1.2.7.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-cgompi-1.1.7.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-cgompi-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-cgompi-1.1.7.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-cgompi-1.1.7.eb diff --git a/easybuild/easyconfigs/g/GDB/GDB-7.5.1-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/g/GDB/GDB-7.5.1-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/g/GDB/GDB-7.5.1-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/g/GDB/GDB-7.5.1-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/g/GDB/GDB-7.5.1-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/g/GDB/GDB-7.5.1-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/g/GDB/GDB-7.5.1-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/g/GDB/GDB-7.5.1-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/g/GDB/GDB-7.5.1-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/g/git/git-1.8.2-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/g/git/git-1.8.2-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/g/git/git-1.8.2-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/g/git/git-1.8.2-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/g/git/git-1.8.2-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/g/git/git-1.8.2-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/g/git/git-1.8.2-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/g/git/git-1.8.2-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/g/git/git-1.8.2-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/g/git/git-1.8.2-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/g/git/git-1.8.2-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/g/git/git-1.8.2-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/g/git/git-1.8.2-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/g/git/git-1.8.2-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/g/git/git-1.8.2-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/g/git/git-1.8.2-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.5-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.5-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.0-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.0-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.0-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.6.2-ClangGCC-1.1.3.eb b/easybuild/easyconfigs/__archive__/h/hwloc/hwloc-1.6.2-ClangGCC-1.1.3.eb similarity index 100% rename from easybuild/easyconfigs/h/hwloc/hwloc-1.6.2-ClangGCC-1.1.3.eb rename to easybuild/easyconfigs/__archive__/h/hwloc/hwloc-1.6.2-ClangGCC-1.1.3.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-ClangGCC-1.1.3.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ClangGCC-1.1.3.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-ClangGCC-1.1.3.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ClangGCC-1.1.3.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-ClangGCC-1.2.3.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ClangGCC-1.2.3.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-ClangGCC-1.2.3.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-ClangGCC-1.2.3.eb diff --git a/easybuild/easyconfigs/m/MPICH/MPICH-3.0.3-ClangGCC-1.1.3.eb b/easybuild/easyconfigs/__archive__/m/MPICH/MPICH-3.0.3-ClangGCC-1.1.3.eb similarity index 100% rename from easybuild/easyconfigs/m/MPICH/MPICH-3.0.3-ClangGCC-1.1.3.eb rename to easybuild/easyconfigs/__archive__/m/MPICH/MPICH-3.0.3-ClangGCC-1.1.3.eb diff --git a/easybuild/easyconfigs/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.1.3.eb b/easybuild/easyconfigs/__archive__/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.1.3.eb similarity index 100% rename from easybuild/easyconfigs/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.1.3.eb rename to easybuild/easyconfigs/__archive__/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.1.3.eb diff --git a/easybuild/easyconfigs/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.2.3.eb b/easybuild/easyconfigs/__archive__/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.2.3.eb similarity index 100% rename from easybuild/easyconfigs/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.2.3.eb rename to easybuild/easyconfigs/__archive__/m/MVAPICH2/MVAPICH2-1.9-ClangGCC-1.2.3.eb diff --git a/easybuild/easyconfigs/m/MVAPICH2/MVAPICH2-1.9rc1-ClangGCC-1.1.3.eb b/easybuild/easyconfigs/__archive__/m/MVAPICH2/MVAPICH2-1.9rc1-ClangGCC-1.1.3.eb similarity index 100% rename from easybuild/easyconfigs/m/MVAPICH2/MVAPICH2-1.9rc1-ClangGCC-1.1.3.eb rename to easybuild/easyconfigs/__archive__/m/MVAPICH2/MVAPICH2-1.9rc1-ClangGCC-1.1.3.eb diff --git a/easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-cgmpolf-1.1.6-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-cgmpolf-1.1.6-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-cgmpolf-1.1.6-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-cgmpolf-1.1.6-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.1.12rc1-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.1.12rc1-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.1.12rc1-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.1.12rc1-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.2.7-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.2.7-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.2.7-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-cgmvolf-1.2.7-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-cgoolf-1.1.7-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-cgoolf-1.1.7-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/m/Mercurial/Mercurial-2.5.2-cgoolf-1.1.7-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/m/Mercurial/Mercurial-2.5.2-cgoolf-1.1.7-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-20130406-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-20130406-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-cgmpich-1.1.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-cgmpich-1.1.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-cgmpich-1.1.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-cgmpich-1.1.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.1.12rc1-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.1.12rc1-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.1.12rc1-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.1.12rc1-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.2.7-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.2.7-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.2.7-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-cgmvapich2-1.2.7-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-cgompi-1.1.7-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-cgompi-1.1.7-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-cgompi-1.1.7-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-cgompi-1.1.7-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.6.4-ClangGCC-1.1.3.eb b/easybuild/easyconfigs/__archive__/o/OpenMPI/OpenMPI-1.6.4-ClangGCC-1.1.3.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenMPI/OpenMPI-1.6.4-ClangGCC-1.1.3.eb rename to easybuild/easyconfigs/__archive__/o/OpenMPI/OpenMPI-1.6.4-ClangGCC-1.1.3.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.1f-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.1f-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmpich-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmpich-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmpich-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmpich-1.1.6-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.1.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.1.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.1.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.1.12rc1-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.2.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.2.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.2.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-cgmvapich2-1.2.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-cgompi-1.1.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-cgompi-1.1.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-cgompi-1.1.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-cgompi-1.1.7-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/v/Valgrind/Valgrind-3.8.1-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/v/Valgrind/Valgrind-3.8.1-cgoolf-1.1.7.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-cgmpolf-1.1.6.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-cgmpolf-1.1.6.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-cgmpolf-1.1.6.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-cgmpolf-1.1.6.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-cgmvolf-1.1.12rc1.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-cgmvolf-1.1.12rc1.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-cgmvolf-1.1.12rc1.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-cgmvolf-1.1.12rc1.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-cgmvolf-1.2.7.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-cgmvolf-1.2.7.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-cgmvolf-1.2.7.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-cgmvolf-1.2.7.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-cgoolf-1.1.7.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-cgoolf-1.1.7.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-cgoolf-1.1.7.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-cgoolf-1.1.7.eb -- GitLab From b10911a757d3f4f00d341725cbf673e227dbe562 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 09:23:12 +0200 Subject: [PATCH 527/741] move easyconfigs for deprecated gmacml and gmpolf toolchains to archive --- .../{ => __archive__}/b/BLACS/BLACS-1.1-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/b/Bison/Bison-2.5-gmacml-1.7.0.eb | 0 .../{ => __archive__}/b/Boost/Boost-1.51.0-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/b/bzip2/bzip2-1.0.6-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.10.2-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.12-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/c/CMake/CMake-2.8.4-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/c/CP2K/CP2K-20111205-gmacml-1.7.0-libsmm.eb | 0 .../easyconfigs/{ => __archive__}/d/DB/DB-5.3.28-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/f/FFTW/FFTW-3.3.3-gmpich-1.4.8.eb | 0 .../{ => __archive__}/f/flex/flex-2.5.35-gmacml-1.7.0.eb | 0 .../{ => __archive__}/g/GLib/GLib-2.34.3-gmpolf-1.4.8.eb | 0 .../g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-hybrid.eb | 0 .../{ => __archive__}/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-mt.eb | 0 .../{ => __archive__}/g/gettext/gettext-0.18.2-gmpolf-1.4.8.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/gmacml/gmacml-1.7.0.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/gmpich/gmpich-1.4.8.eb | 0 easybuild/easyconfigs/{ => __archive__}/g/gmpolf/gmpolf-1.4.8.eb | 0 .../easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/h/HDF5/HDF5-1.8.7-gmpolf-1.4.8.eb | 0 .../easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/l/LAPACK/LAPACK-3.4.2-gmpich-1.4.8.eb | 0 .../{ => __archive__}/l/Libint/Libint-1.1.4-gmacml-1.7.0.eb | 0 .../{ => __archive__}/l/libffi/libffi-3.0.11-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/l/libffi/libffi-3.0.13-gmpolf-1.4.8.eb | 0 .../l/libreadline/libreadline-6.2-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/l/libsmm/libsmm-20111205-gmacml-1.7.0.eb | 0 .../{ => __archive__}/l/libxml2/libxml2-2.9.1-gmpolf-1.4.8.eb | 0 .../easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-gmacml-1.7.0.eb | 0 .../{ => __archive__}/m/METIS/METIS-4.0.3-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/m/METIS/METIS-5.0.2-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/m/MUMPS/MUMPS-4.10.0-gmpolf-1.4.8-metis.eb | 0 .../{ => __archive__}/n/ncurses/ncurses-5.9-gmpolf-1.4.8.eb | 0 .../o/OpenBLAS/OpenBLAS-0.2.6-gmpich-1.4.8-LAPACK-3.4.2.eb | 0 .../{ => __archive__}/o/OpenSSL/OpenSSL-1.0.0-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/p/ParMETIS/ParMETIS-3.2.0-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/p/ParMETIS/ParMETIS-4.0.2-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/p/ParaView/ParaView-4.0.1-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/p/ParaView/ParaView-4.1.0-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/p/Python/Python-2.7.3-gmpolf-1.4.8.eb | 0 .../easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.5-gmpolf-1.4.8.eb | 0 .../s/SCOTCH/SCOTCH-6.0.0_esmumps-gmpolf-1.4.8.eb | 0 .../ScaLAPACK-2.0.2-gmpich-1.4.8-OpenBLAS-0.2.6-LAPACK-3.4.2.eb | 0 .../ScientificPython-2.8-gmpolf-1.4.8-Python-2.7.3.eb | 0 .../s/SuiteSparse/SuiteSparse-3.7.0-gmpolf-1.4.8-withparmetis.eb | 0 .../easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-gmpolf-1.4.8.eb | 0 .../{ => __archive__}/z/zlib/zlib-1.2.7-gmpolf-1.4.8.eb | 0 47 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{ => __archive__}/b/BLACS/BLACS-1.1-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Bison/Bison-2.5-gmacml-1.7.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/Boost/Boost-1.51.0-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/b/bzip2/bzip2-1.0.6-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.10.2-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.12-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CMake/CMake-2.8.4-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/c/CP2K/CP2K-20111205-gmacml-1.7.0-libsmm.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/d/DB/DB-5.3.28-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/FFTW/FFTW-3.3.3-gmpich-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/f/flex/flex-2.5.35-gmacml-1.7.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GLib/GLib-2.34.3-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-hybrid.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-mt.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gettext/gettext-0.18.2-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmacml/gmacml-1.7.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmpich/gmpich-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gmpolf/gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/g/gzip/gzip-1.5-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HDF5/HDF5-1.8.7-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/h/HPL/HPL-2.1-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/LAPACK/LAPACK-3.4.2-gmpich-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/Libint/Libint-1.1.4-gmacml-1.7.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libffi/libffi-3.0.11-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libffi/libffi-3.0.13-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libreadline/libreadline-6.2-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libsmm/libsmm-20111205-gmacml-1.7.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/l/libxml2/libxml2-2.9.1-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/M4/M4-1.4.16-gmacml-1.7.0.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-4.0.3-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/METIS/METIS-5.0.2-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/m/MUMPS/MUMPS-4.10.0-gmpolf-1.4.8-metis.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/n/ncurses/ncurses-5.9-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenBLAS/OpenBLAS-0.2.6-gmpich-1.4.8-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/o/OpenSSL/OpenSSL-1.0.0-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParMETIS/ParMETIS-3.2.0-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParMETIS/ParMETIS-4.0.2-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParaView/ParaView-4.0.1-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/ParaView/ParaView-4.1.0-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/p/Python/Python-2.7.3-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/q/Qt/Qt-4.8.5-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SCOTCH/SCOTCH-6.0.0_esmumps-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScaLAPACK/ScaLAPACK-2.0.2-gmpich-1.4.8-OpenBLAS-0.2.6-LAPACK-3.4.2.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/ScientificPython/ScientificPython-2.8-gmpolf-1.4.8-Python-2.7.3.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/SuiteSparse/SuiteSparse-3.7.0-gmpolf-1.4.8-withparmetis.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/s/Szip/Szip-2.1-gmpolf-1.4.8.eb (100%) rename easybuild/easyconfigs/{ => __archive__}/z/zlib/zlib-1.2.7-gmpolf-1.4.8.eb (100%) diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/b/BLACS/BLACS-1.1-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/b/Bison/Bison-2.5-gmacml-1.7.0.eb b/easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-gmacml-1.7.0.eb similarity index 100% rename from easybuild/easyconfigs/b/Bison/Bison-2.5-gmacml-1.7.0.eb rename to easybuild/easyconfigs/__archive__/b/Bison/Bison-2.5-gmacml-1.7.0.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.51.0-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/b/Boost/Boost-1.51.0-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/b/Boost/Boost-1.51.0-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/b/bzip2/bzip2-1.0.6-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/b/bzip2/bzip2-1.0.6-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.10.2-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.10.2-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.12-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.12-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.12-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/c/CMake/CMake-2.8.4-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/c/CMake/CMake-2.8.4-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/c/CMake/CMake-2.8.4-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-20111205-gmacml-1.7.0-libsmm.eb b/easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-gmacml-1.7.0-libsmm.eb similarity index 100% rename from easybuild/easyconfigs/c/CP2K/CP2K-20111205-gmacml-1.7.0-libsmm.eb rename to easybuild/easyconfigs/__archive__/c/CP2K/CP2K-20111205-gmacml-1.7.0-libsmm.eb diff --git a/easybuild/easyconfigs/d/DB/DB-5.3.28-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/d/DB/DB-5.3.28-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/d/DB/DB-5.3.28-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/d/DB/DB-5.3.28-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gmpich-1.4.8.eb b/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gmpich-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.3-gmpich-1.4.8.eb rename to easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.3-gmpich-1.4.8.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.35-gmacml-1.7.0.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-gmacml-1.7.0.eb similarity index 100% rename from easybuild/easyconfigs/f/flex/flex-2.5.35-gmacml-1.7.0.eb rename to easybuild/easyconfigs/__archive__/f/flex/flex-2.5.35-gmacml-1.7.0.eb diff --git a/easybuild/easyconfigs/g/GLib/GLib-2.34.3-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/g/GLib/GLib-2.34.3-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/g/GLib/GLib-2.34.3-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-hybrid.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-hybrid.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-hybrid.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-hybrid.eb diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-mt.eb b/easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-mt.eb similarity index 100% rename from easybuild/easyconfigs/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-mt.eb rename to easybuild/easyconfigs/__archive__/g/GROMACS/GROMACS-4.6.5-gmpolf-1.4.8-mt.eb diff --git a/easybuild/easyconfigs/g/gettext/gettext-0.18.2-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/g/gettext/gettext-0.18.2-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/g/gettext/gettext-0.18.2-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/g/gmacml/gmacml-1.7.0.eb b/easybuild/easyconfigs/__archive__/g/gmacml/gmacml-1.7.0.eb similarity index 100% rename from easybuild/easyconfigs/g/gmacml/gmacml-1.7.0.eb rename to easybuild/easyconfigs/__archive__/g/gmacml/gmacml-1.7.0.eb diff --git a/easybuild/easyconfigs/g/gmpich/gmpich-1.4.8.eb b/easybuild/easyconfigs/__archive__/g/gmpich/gmpich-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/g/gmpich/gmpich-1.4.8.eb rename to easybuild/easyconfigs/__archive__/g/gmpich/gmpich-1.4.8.eb diff --git a/easybuild/easyconfigs/g/gmpolf/gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/g/gmpolf/gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/g/gmpolf/gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/g/gmpolf/gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/g/gzip/gzip-1.5-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/g/gzip/gzip-1.5-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/g/gzip/gzip-1.5-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.7-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.7-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/h/HDF5/HDF5-1.8.7-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/h/HDF5/HDF5-1.8.7-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.1-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/h/HPL/HPL-2.1-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/h/HPL/HPL-2.1-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.2-gmpich-1.4.8.eb b/easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.2-gmpich-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/l/LAPACK/LAPACK-3.4.2-gmpich-1.4.8.eb rename to easybuild/easyconfigs/__archive__/l/LAPACK/LAPACK-3.4.2-gmpich-1.4.8.eb diff --git a/easybuild/easyconfigs/l/Libint/Libint-1.1.4-gmacml-1.7.0.eb b/easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-gmacml-1.7.0.eb similarity index 100% rename from easybuild/easyconfigs/l/Libint/Libint-1.1.4-gmacml-1.7.0.eb rename to easybuild/easyconfigs/__archive__/l/Libint/Libint-1.1.4-gmacml-1.7.0.eb diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.11-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.11-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/l/libffi/libffi-3.0.11-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.11-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/l/libffi/libffi-3.0.13-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/l/libffi/libffi-3.0.13-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/l/libffi/libffi-3.0.13-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/l/libreadline/libreadline-6.2-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/l/libreadline/libreadline-6.2-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/l/libreadline/libreadline-6.2-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/l/libsmm/libsmm-20111205-gmacml-1.7.0.eb b/easybuild/easyconfigs/__archive__/l/libsmm/libsmm-20111205-gmacml-1.7.0.eb similarity index 100% rename from easybuild/easyconfigs/l/libsmm/libsmm-20111205-gmacml-1.7.0.eb rename to easybuild/easyconfigs/__archive__/l/libsmm/libsmm-20111205-gmacml-1.7.0.eb diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/l/libxml2/libxml2-2.9.1-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/l/libxml2/libxml2-2.9.1-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/m/M4/M4-1.4.16-gmacml-1.7.0.eb b/easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-gmacml-1.7.0.eb similarity index 100% rename from easybuild/easyconfigs/m/M4/M4-1.4.16-gmacml-1.7.0.eb rename to easybuild/easyconfigs/__archive__/m/M4/M4-1.4.16-gmacml-1.7.0.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-4.0.3-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-4.0.3-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-4.0.3-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-4.0.3-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.0.2-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/m/METIS/METIS-5.0.2-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/m/METIS/METIS-5.0.2-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/m/METIS/METIS-5.0.2-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/m/MUMPS/MUMPS-4.10.0-gmpolf-1.4.8-metis.eb b/easybuild/easyconfigs/__archive__/m/MUMPS/MUMPS-4.10.0-gmpolf-1.4.8-metis.eb similarity index 100% rename from easybuild/easyconfigs/m/MUMPS/MUMPS-4.10.0-gmpolf-1.4.8-metis.eb rename to easybuild/easyconfigs/__archive__/m/MUMPS/MUMPS-4.10.0-gmpolf-1.4.8-metis.eb diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-5.9-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/n/ncurses/ncurses-5.9-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/n/ncurses/ncurses-5.9-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gmpich-1.4.8-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gmpich-1.4.8-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.6-gmpich-1.4.8-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/o/OpenBLAS/OpenBLAS-0.2.6-gmpich-1.4.8-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.0-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.0-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/o/OpenSSL/OpenSSL-1.0.0-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/o/OpenSSL/OpenSSL-1.0.0-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.2.0-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-3.2.0-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/p/ParMETIS/ParMETIS-3.2.0-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-3.2.0-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-4.0.2-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/p/ParMETIS/ParMETIS-4.0.2-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/p/ParMETIS/ParMETIS-4.0.2-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.0.1-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/p/ParaView/ParaView-4.0.1-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/p/ParaView/ParaView-4.0.1-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/p/ParaView/ParaView-4.0.1-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/p/ParaView/ParaView-4.1.0-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/p/ParaView/ParaView-4.1.0-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/p/ParaView/ParaView-4.1.0-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/p/ParaView/ParaView-4.1.0-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/p/Python/Python-2.7.3-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/p/Python/Python-2.7.3-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/p/Python/Python-2.7.3-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/q/Qt/Qt-4.8.5-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.5-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/q/Qt/Qt-4.8.5-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/q/Qt/Qt-4.8.5-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.0_esmumps-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-6.0.0_esmumps-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.0_esmumps-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/s/SCOTCH/SCOTCH-6.0.0_esmumps-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmpich-1.4.8-OpenBLAS-0.2.6-LAPACK-3.4.2.eb b/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmpich-1.4.8-OpenBLAS-0.2.6-LAPACK-3.4.2.eb similarity index 100% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmpich-1.4.8-OpenBLAS-0.2.6-LAPACK-3.4.2.eb rename to easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmpich-1.4.8-OpenBLAS-0.2.6-LAPACK-3.4.2.eb diff --git a/easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gmpolf-1.4.8-Python-2.7.3.eb b/easybuild/easyconfigs/__archive__/s/ScientificPython/ScientificPython-2.8-gmpolf-1.4.8-Python-2.7.3.eb similarity index 100% rename from easybuild/easyconfigs/s/ScientificPython/ScientificPython-2.8-gmpolf-1.4.8-Python-2.7.3.eb rename to easybuild/easyconfigs/__archive__/s/ScientificPython/ScientificPython-2.8-gmpolf-1.4.8-Python-2.7.3.eb diff --git a/easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gmpolf-1.4.8-withparmetis.eb b/easybuild/easyconfigs/__archive__/s/SuiteSparse/SuiteSparse-3.7.0-gmpolf-1.4.8-withparmetis.eb similarity index 100% rename from easybuild/easyconfigs/s/SuiteSparse/SuiteSparse-3.7.0-gmpolf-1.4.8-withparmetis.eb rename to easybuild/easyconfigs/__archive__/s/SuiteSparse/SuiteSparse-3.7.0-gmpolf-1.4.8-withparmetis.eb diff --git a/easybuild/easyconfigs/s/Szip/Szip-2.1-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/s/Szip/Szip-2.1-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/s/Szip/Szip-2.1-gmpolf-1.4.8.eb diff --git a/easybuild/easyconfigs/z/zlib/zlib-1.2.7-gmpolf-1.4.8.eb b/easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gmpolf-1.4.8.eb similarity index 100% rename from easybuild/easyconfigs/z/zlib/zlib-1.2.7-gmpolf-1.4.8.eb rename to easybuild/easyconfigs/__archive__/z/zlib/zlib-1.2.7-gmpolf-1.4.8.eb -- GitLab From 001504eca3a7df5185610b9b3cb6c88fe843a5d8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 09:41:16 +0200 Subject: [PATCH 528/741] add easyconfig BLACS-1.1-gmvapich2-2016a.eb --- .../b/BLACS/BLACS-1.1-gmvapich2-2016a.eb | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-2016a.eb diff --git a/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-2016a.eb b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-2016a.eb new file mode 100644 index 0000000000..714b83985a --- /dev/null +++ b/easybuild/easyconfigs/b/BLACS/BLACS-1.1-gmvapich2-2016a.eb @@ -0,0 +1,24 @@ +name = 'BLACS' +version = '1.1' + +homepage = 'http://www.netlib.org/blacs/' +description = """The BLACS (Basic Linear Algebra Communication Subprograms) project is + an ongoing investigation whose purpose is to create a linear algebra oriented message passing interface + that may be implemented efficiently and uniformly across a large range of distributed memory platforms.""" + +toolchain = {'name': 'gmvapich2', 'version': '2016a'} +toolchainopts = {'pic': True} + +source_urls = [homepage] +sources = [ + 'mpiblacs.tgz', + 'mpiblacs-patch03.tgz', +] +checksums = [ + '28ae5b91b3193402fe1ae8d06adcf500', + '48fdf5e4ef6cf53daec9eeef40498a8b', +] + +patches = ['bmake.mpi.patch'] + +moduleclass = 'numlib' -- GitLab From 0fe8de149c887d037f548d6f7a9bc5873227952d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 11:05:13 +0200 Subject: [PATCH 529/741] move back easyconfigs required for (non-deprecated) gmvolf/1.7.20 toolchain --- .../{__archive__ => }/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb | 0 .../easyconfigs/{__archive__ => }/g/gmvapich2/gmvapich2-1.7.20.eb | 0 ...aLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/{__archive__ => }/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb (100%) rename easybuild/easyconfigs/{__archive__ => }/g/gmvapich2/gmvapich2-1.7.20.eb (100%) rename easybuild/easyconfigs/{__archive__ => }/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb (100%) diff --git a/easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb similarity index 100% rename from easybuild/easyconfigs/__archive__/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb rename to easybuild/easyconfigs/f/FFTW/FFTW-3.3.4-gmvapich2-1.7.20.eb diff --git a/easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.20.eb b/easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.20.eb similarity index 100% rename from easybuild/easyconfigs/__archive__/g/gmvapich2/gmvapich2-1.7.20.eb rename to easybuild/easyconfigs/g/gmvapich2/gmvapich2-1.7.20.eb diff --git a/easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb similarity index 100% rename from easybuild/easyconfigs/__archive__/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb rename to easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gmvapich2-1.7.20-OpenBLAS-0.2.13-LAPACK-3.5.0.eb -- GitLab From 49a5a0ad28ee85aff035b3d86560a3b2a47755ea Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 12:27:22 +0200 Subject: [PATCH 530/741] add easyconfig MUST-1.2.0-goolf-1.5.14.eb, add easyconfig PnMPI-1.2.0-goolf-1.5.14.eb, add easyconfig GTI-1.2.0-goolf-1.5.14.eb --- .../g/GTI/GTI-1.2.0-goolf-1.5.14.eb | 38 ++++++++++++++++++ .../m/MUST/MUST-1.2.0-goolf-1.5.14.eb | 39 +++++++++++++++++++ .../p/PnMPI/PnMPI-1.2.0-goolf-1.5.14.eb | 35 +++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 easybuild/easyconfigs/g/GTI/GTI-1.2.0-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/m/MUST/MUST-1.2.0-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/p/PnMPI/PnMPI-1.2.0-goolf-1.5.14.eb diff --git a/easybuild/easyconfigs/g/GTI/GTI-1.2.0-goolf-1.5.14.eb b/easybuild/easyconfigs/g/GTI/GTI-1.2.0-goolf-1.5.14.eb new file mode 100644 index 0000000000..d2f8ea38ad --- /dev/null +++ b/easybuild/easyconfigs/g/GTI/GTI-1.2.0-goolf-1.5.14.eb @@ -0,0 +1,38 @@ +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# License:: New BSD +# +# This work is based from experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## +easyblock = 'CMakeMake' + +name = 'GTI' +version = '1.2.0' + +homepage = 'http://www.tu-dresden.de/zih/must/' +description = """A Generic Tools Infrastructure for Event-Based Tools in Parallel Systems.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'usempi': True} + +# http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/must/files/gti-release-1.2.0.tar.gz +source_urls = ['http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/must/files/'] +sources = ['%(namelower)s-release-%(version)s.tar.gz'] + +patches = ['GTI-%(version)s-missing-unistd.patch'] + +dependencies = [('PnMPI', '1.2.0')] + +builddependencies = [('CMake', '3.0.2')] + +configopts = '-DCMAKE_BUILD_TYPE=Release -DPnMPI_INSTALL_PREFIX=${EBROOTPNMPI}' +buildopts = 'CXXFLAGS="$CXXFLAGS -fpermissive"' + +sanity_check_paths = { + 'files': ["bin/weaver", "include/I_Profiler.h"], + 'dirs': [], +} + +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/m/MUST/MUST-1.2.0-goolf-1.5.14.eb b/easybuild/easyconfigs/m/MUST/MUST-1.2.0-goolf-1.5.14.eb new file mode 100644 index 0000000000..a3e8ea9b64 --- /dev/null +++ b/easybuild/easyconfigs/m/MUST/MUST-1.2.0-goolf-1.5.14.eb @@ -0,0 +1,39 @@ +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# License:: New BSD +# +# This work is based from experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## +easyblock = 'CMakeMake' + +name = 'MUST' +version = '1.2.0' + +homepage = 'http://www.tu-dresden.de/zih/must/' +description = """MUST detects usage errors of the Message Passing Interface (MPI) and reports them + to the user. As MPI calls are complex and usage errors common, this functionality is extremely helpful + for application developers that want to develop correct MPI applications. This includes errors that + already manifest --segmentation faults or incorrect results -- as well as many errors that are not + visible to the application developer or do not manifest on a certain system or MPI implementation.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'usempi': True} + +# http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/must/files/must-release-1.2.0.tar.gz +source_urls = ['http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/must/files/'] +sources = ['%(namelower)s-release-%(version)s.tar.gz'] + +dependencies = [('GTI', '1.2.0')] + +builddependencies = [('CMake', '3.0.2')] + +configopts = ' -DCMAKE_BUILD_TYPE=Release -DGTI_INSTALL_PREFIX=${EBROOTGTI}' + +sanity_check_paths = { + 'files': ['bin/mustrun', 'include/mustConfig.h'], + 'dirs': [], +} + +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/p/PnMPI/PnMPI-1.2.0-goolf-1.5.14.eb b/easybuild/easyconfigs/p/PnMPI/PnMPI-1.2.0-goolf-1.5.14.eb new file mode 100644 index 0000000000..30ff748dc8 --- /dev/null +++ b/easybuild/easyconfigs/p/PnMPI/PnMPI-1.2.0-goolf-1.5.14.eb @@ -0,0 +1,35 @@ +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# License:: New BSD +# +# This work is based from experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## +easyblock = 'CMakeMake' + +name = 'PnMPI' +version = '1.2.0' + +homepage = 'https://scalability.llnl.gov/pnmpi/' +description = """MPI Tool Virtualization and Interoperability library.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'usempi': True} + +# http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/must/files/pnmpi-for-gti-1.2.0.tar.gz +source_urls = ['http://tu-dresden.de/die_tu_dresden/zentrale_einrichtungen/zih/forschung/projekte/must/files/'] +sources = ['%(namelower)s-for-gti-%(version)s.tar.gz'] + +builddependencies = [('CMake', '3.0.2')] + +configopts = ' -DCMAKE_BUILD_TYPE=Release -DBFD_FOUND=False -DPNMPI_HAVE_BFD=False' + +parallel = 1 + +sanity_check_paths = { + 'files': ["bin/pnmpi-patch", "include/pnmpi.h", "lib/libpnmpi.a"], + 'dirs': [], +} + +moduleclass = 'perf' -- GitLab From 27424b4b5054ac1de02e22eb50501be650c7fd7f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 18:40:51 +0200 Subject: [PATCH 531/741] add easyconfig TAU-2.22.2-goolf-1.5.14.eb, add easyconfig VampirTrace-5.14.4-goolf-1.5.14.eb --- .../c/Cube/Cube-4.2-goolf-1.5.14.eb | 56 +++++++++++++++++++ .../o/OPARI2/OPARI2-1.1.1-goolf-1.5.14.eb | 31 ++++++++++ .../o/OTF/OTF-1.12.4-goolf-1.5.14.eb | 34 +++++++++++ .../p/PDT/PDT-3.19-goolf-1.5.14.eb | 32 +++++++++++ .../s/Score-P/Score-P-1.2.1-goolf-1.5.14.eb | 39 +++++++++++++ .../t/TAU/TAU-2.22.2-goolf-1.5.14.eb | 35 ++++++++++++ .../VampirTrace-5.14.4-goolf-1.5.14.eb | 50 +++++++++++++++++ 7 files changed, 277 insertions(+) create mode 100644 easybuild/easyconfigs/c/Cube/Cube-4.2-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/o/OPARI2/OPARI2-1.1.1-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/o/OTF/OTF-1.12.4-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/p/PDT/PDT-3.19-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/s/Score-P/Score-P-1.2.1-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/t/TAU/TAU-2.22.2-goolf-1.5.14.eb create mode 100644 easybuild/easyconfigs/v/VampirTrace/VampirTrace-5.14.4-goolf-1.5.14.eb diff --git a/easybuild/easyconfigs/c/Cube/Cube-4.2-goolf-1.5.14.eb b/easybuild/easyconfigs/c/Cube/Cube-4.2-goolf-1.5.14.eb new file mode 100644 index 0000000000..94f4a3ca61 --- /dev/null +++ b/easybuild/easyconfigs/c/Cube/Cube-4.2-goolf-1.5.14.eb @@ -0,0 +1,56 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2013-2015 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# Markus Geimer +# License:: 3-clause BSD +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +easyblock = 'EB_Score_minus_P' + +name = 'Cube' +version = '4.2' + +homepage = 'http://www.scalasca.org/software/cube-4.x/download.html' +description = """Cube, which is used as performance report explorer for Scalasca and + Score-P, is a generic tool for displaying a multi-dimensional performance space + consisting of the dimensions (i) performance metric, (ii) call path, and (iii) system + resource. Each dimension can be represented as a tree, where non-leaf nodes of the tree + can be collapsed or expanded to achieve the desired level of granularity.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://apps.fz-juelich.de/scalasca/releases/cube/%(version_major_minor)s/dist'] + +# Backported fixes included in Cube 4.2.2 and up +patches = [ + 'Cube-%(version)s_fix-Qt-version-check.patch', + 'Cube-%(version)s_fix-with-qt-check.patch', +] + +checksums = [ + 'aa1b1594bacddd3a1931f9a9dea23ce8', # cube-4.2.tar.gz + 'da69fe49d347dc7722c30bb785106d96', # Cube-4.2_fix-Qt-version-check.patch + '5a746d4f6f4eb5eb8b464ca355b46891', # Cube-4.2_fix-with-qt-check.patch +] + +dependencies = [('Qt', '4.8.6')] + +# The Cube Java reader is currently only used by TAU, which ships it's own +# copy as a jar file. If you really want to enable it, make sure to set +# 'maxparallel=1', as automake's Java support has difficulties handling +# parallel builds. +configopts = '--without-java-reader' + +sanity_check_paths = { + 'files': ['bin/cube', ('lib/libcube4.a', 'lib64/libcube4.a'), + ('lib/libcube4.%s' % SHLIB_EXT, 'lib64/libcube4.%s' % SHLIB_EXT)], + 'dirs': ['include/cube', 'include/cubew'], +} + +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/o/OPARI2/OPARI2-1.1.1-goolf-1.5.14.eb b/easybuild/easyconfigs/o/OPARI2/OPARI2-1.1.1-goolf-1.5.14.eb new file mode 100644 index 0000000000..d50dab2154 --- /dev/null +++ b/easybuild/easyconfigs/o/OPARI2/OPARI2-1.1.1-goolf-1.5.14.eb @@ -0,0 +1,31 @@ +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# License:: New BSD +# +# This work is based from experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## +easyblock = 'ConfigureMake' + +name = 'OPARI2' +version = '1.1.1' + +homepage = 'http://www.score-p.org' +description = """OPARI2, the successor of Forschungszentrum Juelich's OPARI, + is a source-to-source instrumentation tool for OpenMP and hybrid codes. + It surrounds OpenMP directives and runtime library calls with calls to + the POMP2 measurement interface.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} + +# http://www.vi-hps.org/upload/packages/opari2/opari2-1.1.1.tar.gz +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.vi-hps.org/upload/packages/opari2/'] + +sanity_check_paths = { + 'files': ['bin/opari2', 'include/opari2/pomp2_lib.h'], + 'dirs': [], +} + +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/o/OTF/OTF-1.12.4-goolf-1.5.14.eb b/easybuild/easyconfigs/o/OTF/OTF-1.12.4-goolf-1.5.14.eb new file mode 100644 index 0000000000..831526692c --- /dev/null +++ b/easybuild/easyconfigs/o/OTF/OTF-1.12.4-goolf-1.5.14.eb @@ -0,0 +1,34 @@ +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# License:: New BSD +# +# This work is based from experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## +easyblock = 'ConfigureMake' + +name = 'OTF' +version = '1.12.4' + +homepage = 'http://www.tu-dresden.de/zih/otf/' +description = """The Open Trace Format is a highly scalable, memory efficient event + trace data format plus support library. It is the standard trace format + for Vampir, and is open for other tools. [NOW OBSOLETE: use OTF2]""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} + +# http://wwwpub.zih.tu-dresden.de/%7Emlieber/dcount/dcount.php?package=otf&get=OTF-1.12.4salmon.tar.gz +sources = ['%(name)s-%(version)ssalmon.tar.gz'] +source_urls = ['http://wwwpub.zih.tu-dresden.de/%7Emlieber/dcount/dcount.php?package=otf&get='] + +# name change in version 1.12.3: "open-trace-format" was "otf" in older versions +# "open-trace-format" => "otf" for versions until 1.12.2 +sanity_check_paths = { + 'files': ['bin/otfconfig', 'include/open-trace-format/otf.h', + # note by Bernd Mohr: on some systems libraries end up in lib/ + ('lib64/libopen-trace-format.a', 'lib/libopen-trace-format.a')], + 'dirs': [], +} + +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/p/PDT/PDT-3.19-goolf-1.5.14.eb b/easybuild/easyconfigs/p/PDT/PDT-3.19-goolf-1.5.14.eb new file mode 100644 index 0000000000..48f0570291 --- /dev/null +++ b/easybuild/easyconfigs/p/PDT/PDT-3.19-goolf-1.5.14.eb @@ -0,0 +1,32 @@ +## +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2013-2015 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# Markus Geimer +# License:: 3-clause BSD +# +# This work is based on experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## + +name = 'PDT' +version = '3.19' + +homepage = 'http://www.cs.uoregon.edu/research/pdt/' +description = """Program Database Toolkit (PDT) is a framework for analyzing source + code written in several programming languages and for making rich program knowledge + accessible to developers of static and dynamic analysis tools. PDT implements a standard + program representation, the program database (PDB), that can be accessed in a uniform way + through a class library supporting common PDB operations.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} + +sources = ['pdtoolkit-%(version)s.tar.gz'] +source_urls = ['http://tau.uoregon.edu/pdt_releases/'] + +checksums = [ + '5c5e1e6607086aa13bf4b1b9befc5864', # pdtoolkit-3.19.tar.gz +] + +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/s/Score-P/Score-P-1.2.1-goolf-1.5.14.eb b/easybuild/easyconfigs/s/Score-P/Score-P-1.2.1-goolf-1.5.14.eb new file mode 100644 index 0000000000..df0333c95e --- /dev/null +++ b/easybuild/easyconfigs/s/Score-P/Score-P-1.2.1-goolf-1.5.14.eb @@ -0,0 +1,39 @@ +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# License:: New BSD +# +# This work is based from experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## +name = 'Score-P' +version = '1.2.1' + +homepage = 'http://www.score-p.org' +description = """The Score-P measurement infrastructure is a highly scalable and + easy-to-use tool suite for profiling, event tracing, and online analysis of HPC + applications.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'usempi': True} + +# http://www.vi-hps.org/upload/packages/scorep/scorep-1.2.1.tar.gz +sources = ['scorep-%(version)s.tar.gz'] +source_urls = ['http://www.vi-hps.org/upload/packages/scorep/'] + +# compiler toolchain depencies +dependencies = [ + ('Cube', '4.2'), + ('OPARI2', '1.1.1'), + ('OTF2', '1.2.1'), + ('PAPI', '5.2.0'), + ('PDT', '3.19'), +] + +sanity_check_paths = { + 'files': ['bin/scorep', 'include/scorep/SCOREP_User.h', + ('lib64/libscorep_adapter_mpi_event.a', 'lib/libscorep_adapter_mpi_event.a')], + 'dirs': [], +} + +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/t/TAU/TAU-2.22.2-goolf-1.5.14.eb b/easybuild/easyconfigs/t/TAU/TAU-2.22.2-goolf-1.5.14.eb new file mode 100644 index 0000000000..2f2888a832 --- /dev/null +++ b/easybuild/easyconfigs/t/TAU/TAU-2.22.2-goolf-1.5.14.eb @@ -0,0 +1,35 @@ +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# License:: New BSD +# +# This work is based from experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## +name = 'TAU' +version = '2.22.2' + +homepage = 'http://tau.uoregon.edu' +description = """The TAU Performance System is a portable profiling and tracing toolkit + for performance analysis of parallel programs written in Fortran, C, C++, Java, Python.""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'usempi': True} + +source_urls = ['http://www.cs.uoregon.edu/research/paracomp/tau/tauprofile/dist/'] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('OTF', '1.12.4'), + ('PAPI', '5.2.0'), + ('PDT', '3.19'), + ('Score-P', '1.2.1'), + # obsolete backends, use Score-P instead + #('Scalasca', '1.4.3'), + #('VampirTrace', '5.14.4'), +] + +# scalasca and vampirtrace backends are deprecated +extra_backends = ['scorep'] + +moduleclass = 'perf' diff --git a/easybuild/easyconfigs/v/VampirTrace/VampirTrace-5.14.4-goolf-1.5.14.eb b/easybuild/easyconfigs/v/VampirTrace/VampirTrace-5.14.4-goolf-1.5.14.eb new file mode 100644 index 0000000000..722868d4b7 --- /dev/null +++ b/easybuild/easyconfigs/v/VampirTrace/VampirTrace-5.14.4-goolf-1.5.14.eb @@ -0,0 +1,50 @@ +# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild +# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany +# Authors:: Bernd Mohr +# License:: New BSD +# +# This work is based from experiences from the UNITE project +# http://apps.fz-juelich.de/unite/ +## +easyblock = 'ConfigureMake' + +name = 'VampirTrace' +version = '5.14.4' + +homepage = 'http:/www.tu-dresden.de/zih/vampirtrace/' +description = """VampirTrace is an open source library that allows detailed logging of program + execution for parallel applications using message passing (MPI) and threads (OpenMP), Pthreads).""" + +toolchain = {'name': 'goolf', 'version': '1.5.14'} +toolchainopts = {'usempi': True} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://wwwpub.zih.tu-dresden.de/%7Emlieber/dcount/dcount.php?package=vampirtrace&get='] + +dependencies = [ + ('OTF', '1.12.4'), + ('PAPI', '5.2.0'), + ('PDT', '3.19'), +] + +configopts = 'MPIFC="$MPIF90"' + +# MPI suite should always be specified -- MUCH quicker and SAVER than autodetect +# note: these options are toolchain specific! +configopts += " --with-openmpi --enable-compinst=gnu" + +configopts += " --with-papi-dir=${EBROOTPAPI}" +configopts += " --with-extern-otf-dir=${EBROOTOTF}" +configopts += " --with-tau-instrumentor=${EBROOTPDT}/x86_64/bin/tau_instrumentor" +configopts += " --with-pdt-cparse=${EBROOTPDT}/x86_64/bin/cparse" +configopts += " --with-pdt-cxxparse=${EBROOTPDT}/x86_64/bin/cxxparse" +configopts += " --with-pdt-fparse=${EBROOTPDT}/x86_64/bin/gfparse" +# VamoirTrace does also support CUDA measurements - not yet tested +# configopts += " --with-cuda-dir=${CUDADIR}" + +sanity_check_paths = { + 'files': ['bin/vtcc', 'include/vampirtrace/vt_user.h', ('lib/libvt.a', 'lib64/libvt.a')], + 'dirs': [] +} + +moduleclass = 'perf' -- GitLab From 68dcd038fb91ea196781e750d67f8c3a49bbe109 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 28 Oct 2016 20:07:20 +0200 Subject: [PATCH 532/741] add easyconfig ATLAS-3.10.2-GCC-5.4.0-2.26-LAPACK-3.6.1.eb --- ...TLAS-3.10.2-GCC-5.4.0-2.26-LAPACK-3.6.1.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/a/ATLAS/ATLAS-3.10.2-GCC-5.4.0-2.26-LAPACK-3.6.1.eb diff --git a/easybuild/easyconfigs/a/ATLAS/ATLAS-3.10.2-GCC-5.4.0-2.26-LAPACK-3.6.1.eb b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.10.2-GCC-5.4.0-2.26-LAPACK-3.6.1.eb new file mode 100644 index 0000000000..5d4cb8e99d --- /dev/null +++ b/easybuild/easyconfigs/a/ATLAS/ATLAS-3.10.2-GCC-5.4.0-2.26-LAPACK-3.6.1.eb @@ -0,0 +1,36 @@ +name = 'ATLAS' +version = '3.10.2' + +homepage = 'http://math-atlas.sourceforge.net' +description = """ATLAS (Automatically Tuned Linear Algebra Software) is the application of + the AEOS (Automated Empirical Optimization of Software) paradigm, with the present emphasis + on the Basic Linear Algebra Subprograms (BLAS), a widely used, performance-critical, linear + algebra kernel library.""" + +toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} +toolchainopts = {'pic': True} + +lapackver = '3.6.1' +versionsuffix = '-LAPACK-%s' % lapackver + +source_urls = [ + ('http://sourceforge.net/projects/math-atlas/files/Stable/%(version)s', 'download'), + 'http://www.netlib.org/lapack/', +] +sources = [ + '%(namelower)s%(version)s.tar.bz2', + 'lapack-%s.tgz' % lapackver, +] + +# build full LAPACK library with supplied netlib LAPACK +full_lapack = True + +# fix for http://math-atlas.sourceforge.net/errata.html#sharedProbe +configopts = "-Ss f77lib '-L$(EBROOTGCC)/lib64 -lgfortran'" + +# ignore check done by ATLAS for CPU throttling; +# you should set this to False (or remove it) +# and disable CPU throttling (requires root privileges) if you can +ignorethrottling = True + +moduleclass = 'numlib' -- GitLab From 0e5065cb31ce49db06316845a29ac2b702c802d5 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 30 Oct 2016 20:21:11 +0100 Subject: [PATCH 533/741] add easyconfig BamTools-2.4.0-foss-2016b.eb, add easyconfig CMake-3.4.3-foss-2016b.eb --- .../b/BamTools/BamTools-2.4.0-foss-2016b.eb | 31 +++++++++++++++++++ .../c/CMake/CMake-3.4.3-foss-2016b.eb | 31 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 easybuild/easyconfigs/b/BamTools/BamTools-2.4.0-foss-2016b.eb create mode 100644 easybuild/easyconfigs/c/CMake/CMake-3.4.3-foss-2016b.eb diff --git a/easybuild/easyconfigs/b/BamTools/BamTools-2.4.0-foss-2016b.eb b/easybuild/easyconfigs/b/BamTools/BamTools-2.4.0-foss-2016b.eb new file mode 100644 index 0000000000..b1a2aa0cf6 --- /dev/null +++ b/easybuild/easyconfigs/b/BamTools/BamTools-2.4.0-foss-2016b.eb @@ -0,0 +1,31 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 The Cyprus Institute +# Authors:: Andreas Panteli , George Tsouloupas +# License:: MIT/GPL +# +## + +name = 'BamTools' +version = '2.4.0' + +homepage = 'https://github.com/pezmaster31/bamtools' +description = """BamTools provides both a programmer's API and an end-user's toolkit for handling BAM files.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/pezmaster31/bamtools/archive'] + +builddependencies = [('CMake', '3.4.3')] + +files_to_copy = ["bin", "lib", "include", "docs", "LICENSE", "README"] + +sanity_check_paths = { + 'files': ["bin/bamtools", "include/shared/bamtools_global.h", "lib/libbamtools.a", + "lib/libbamtools.so", "lib/libbamtools-utils.a", "lib/libjsoncpp.a"], + 'dirs': ["include/api", "docs"] +} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/c/CMake/CMake-3.4.3-foss-2016b.eb b/easybuild/easyconfigs/c/CMake/CMake-3.4.3-foss-2016b.eb new file mode 100644 index 0000000000..cfb29da8c6 --- /dev/null +++ b/easybuild/easyconfigs/c/CMake/CMake-3.4.3-foss-2016b.eb @@ -0,0 +1,31 @@ +easyblock = 'ConfigureMake' + +name = 'CMake' +version = '3.4.3' + +homepage = 'http://www.cmake.org' +description = """CMake, the cross-platform, open-source build system. + CMake is a family of tools designed to build, test and package software.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['http://www.cmake.org/files/v%(version_major_minor)s'] +sources = [SOURCELOWER_TAR_GZ] + +configopts = '-- -DCMAKE_USE_OPENSSL=1' + +dependencies = [ + ('ncurses', '6.0'), + # OS dependency should be preferred if the os version is more recent then this version, + # it's nice to have an up to date openssl for security reasons + #('OpenSSL', '1.0.1p'), +] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ['cmake', 'cpack', 'ctest']], + 'dirs': [], +} + +moduleclass = 'devel' -- GitLab From 81f1ceb234ea07b29425d3d18d979ee6a5cf63e5 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 30 Oct 2016 20:43:56 +0100 Subject: [PATCH 534/741] add easyconfig Pysam-0.9.1.4-foss-2016b-Python-2.7.12.eb --- .../Pysam-0.9.1.4-foss-2016b-Python-2.7.12.eb | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 easybuild/easyconfigs/p/Pysam/Pysam-0.9.1.4-foss-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/p/Pysam/Pysam-0.9.1.4-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/Pysam/Pysam-0.9.1.4-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..9a77cac29a --- /dev/null +++ b/easybuild/easyconfigs/p/Pysam/Pysam-0.9.1.4-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,53 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics +# 0.9.1.4: +# Modified by: Adam Huffman +# The Francis Crick Institute + +easyblock = 'Bundle' + +name = 'Pysam' +version = '0.9.1.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/pysam-developers/pysam' +description = """Pysam is a python module for reading and manipulating Samfiles. + It's a lightweight wrapper of the samtools C-API. Pysam also includes an interface for tabix.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +parallel = 1 + +dependencies = [ + ('Python', '2.7.12'), + ('ncurses', '6.0'), + ('zlib', '1.2.8'), + ('cURL', '7.49.1'), +] + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' +exts_filter = ("python -c 'import %(ext_name)s'", '') + +exts_list = [ + ('Cython', '0.25.1', { + 'source_urls': ['https://pypi.python.org/packages/source/c/cython/'], + }), + ('pysam', version, { + 'source_tmpl': 'v%(version)s.tar.gz', + 'source_urls': ['https://github.com/pysam-developers/pysam/archive/'], + }), +] + +modextrapaths = { + 'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages'], +} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/pysam-%(version)s-py%(pyshortver)s-linux-x86_64.egg'], +} + +moduleclass = 'bio' -- GitLab From 73985dfc58fb63c22f7291be6cb3be7362630f2d Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 30 Oct 2016 20:58:39 +0100 Subject: [PATCH 535/741] add easyconfig libpng-1.6.26-foss-2016b.eb --- .../l/libpng/libpng-1.6.26-foss-2016b.eb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 easybuild/easyconfigs/l/libpng/libpng-1.6.26-foss-2016b.eb diff --git a/easybuild/easyconfigs/l/libpng/libpng-1.6.26-foss-2016b.eb b/easybuild/easyconfigs/l/libpng/libpng-1.6.26-foss-2016b.eb new file mode 100644 index 0000000000..83dd651c2b --- /dev/null +++ b/easybuild/easyconfigs/l/libpng/libpng-1.6.26-foss-2016b.eb @@ -0,0 +1,26 @@ +easyblock = 'ConfigureMake' + +name = 'libpng' +version = '1.6.26' + +homepage = 'http://www.libpng.org/pub/png/libpng.html' +description = "libpng is the official PNG reference library" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('zlib', '1.2.8')] + +configopts = "--with-pic" + +majminver = ''.join(version.split('.')[:2]) +sanity_check_paths = { + 'files': ['include/pngconf.h', 'include/png.h', 'include/pnglibconf.h', 'lib/libpng.a', + 'lib/libpng.%s' % SHLIB_EXT, 'lib/libpng%s.a' % majminver, 'lib/libpng%s.%s' % (majminver, SHLIB_EXT)], + 'dirs': ['bin', 'include/libpng%s' % majminver, 'share/man'], +} + +moduleclass = 'lib' -- GitLab From 81f523425d799dccef415bb82bbd00b59583ff73 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Mon, 31 Oct 2016 10:43:12 +0100 Subject: [PATCH 536/741] Qt/moc problems solution try 1 --- easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb b/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb index 804ee42715..41dae6b7a6 100644 --- a/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb +++ b/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb @@ -47,7 +47,11 @@ dependencies = [ ('FFTW', '3.3.5'), ] -configopts = '--with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" --disable-docs ' +configopts = 'MOC=$EBROOTQT/bin/moc ' +configopts += 'UIC=$EBROOTQT/bin/uic ' +configopts += 'RCC=$EBROOTQT/bin/rcc +configopts += 'LRELEASE=$EBROOTQT/bin/lrelease ' +configopts += '--with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" --disable-docs ' sanity_check_paths = { 'files': ['bin/octave'], -- GitLab From 6fbf212988e9ce0373bd024e5eae9384b68d0e00 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Mon, 31 Oct 2016 10:47:23 +0100 Subject: [PATCH 537/741] Qt/moc problem solution try 1 --- easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb b/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb index e136d733e5..2c1083acb3 100644 --- a/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb +++ b/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb @@ -46,7 +46,11 @@ dependencies = [ ('GraphicsMagick', '1.3.23'), ] -configopts = 'MOC=$EBROOTQT/bin/moc --with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" ' +configopts = 'MOC=$EBROOTQT/bin/moc ' +configopts += 'UIC=$EBROOTQT/bin/uic ' +configopts += 'RCC=$EBROOTQT/bin/rcc +configopts += 'LRELEASE=$EBROOTQT/bin/lrelease ' +configopts += '--with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" --disable-docs ' sanity_check_paths = { 'files': ['bin/octave'], -- GitLab From 5cf961fedd00f5bf5baef5150e8b218f1777a7d3 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Mon, 31 Oct 2016 10:54:45 +0100 Subject: [PATCH 538/741] missing ' added --- easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb b/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb index 2c1083acb3..4d50479b08 100644 --- a/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb +++ b/easybuild/easyconfigs/o/Octave/Octave-4.0.0-foss-2016a.eb @@ -48,7 +48,7 @@ dependencies = [ configopts = 'MOC=$EBROOTQT/bin/moc ' configopts += 'UIC=$EBROOTQT/bin/uic ' -configopts += 'RCC=$EBROOTQT/bin/rcc +configopts += 'RCC=$EBROOTQT/bin/rcc ' configopts += 'LRELEASE=$EBROOTQT/bin/lrelease ' configopts += '--with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" --disable-docs ' -- GitLab From 5d88e60bd3851d95d60033e4a0a0902287836533 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Mon, 31 Oct 2016 10:55:37 +0100 Subject: [PATCH 539/741] missing ' added --- easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb b/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb index 41dae6b7a6..45f3d738e8 100644 --- a/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb +++ b/easybuild/easyconfigs/o/Octave/Octave-4.0.3-intel-2016b.eb @@ -49,7 +49,7 @@ dependencies = [ configopts = 'MOC=$EBROOTQT/bin/moc ' configopts += 'UIC=$EBROOTQT/bin/uic ' -configopts += 'RCC=$EBROOTQT/bin/rcc +configopts += 'RCC=$EBROOTQT/bin/rcc ' configopts += 'LRELEASE=$EBROOTQT/bin/lrelease ' configopts += '--with-blas="$LIBBLAS" --with-lapack="$LIBLAPACK" --disable-docs ' -- GitLab From c9ad017d3aeafb11f679650f324a5e997a923df9 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Wed, 2 Nov 2016 16:19:22 +0100 Subject: [PATCH 540/741] Add an easyconfig for the behave software. This is a nice little piece of software. We use it for our vasp test suite, developed by Peter Larsson, NSC LiU Description of behave: Behavior-driven development (or BDD) is an agile software development technique that encourages collaboration between developers, QA and non-technical or business participants in a software project. --- .../behave-1.2.5-foss-2016b-Python-2.7.12.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..3a5ba505f6 --- /dev/null +++ b/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,30 @@ +easyblock = "PythonPackage" + +name = 'behave' +version = '1.2.5' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://pytest.org' +homepage = 'https://pypi.python.org/packages' +description = """behave: Behavior-driven development (or BDD) is an +agile software development technique that encourages collaboration +between developers, QA and non-technical or business participants in a +software project.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), +# ('py', '1.4.31', versionsuffix), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'tools' + -- GitLab From cc7f38b34919cf3b509889d107eaab4dffae1e43 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Wed, 2 Nov 2016 16:29:27 +0100 Subject: [PATCH 541/741] Add an intel-cuda toolchain. Modeled after the goolfc toolchain. Depends on framework PR# 1976 --- ...0.44-iccifort-2016.3.210-GCC-5.4.0-2.26.eb | 19 ++++++++++ .../i/iccifortcuda/iccifortcuda-2016.10.0.eb | 24 ++++++++++++ .../easyconfigs/i/iimpic/iimpic-2016.10.0.eb | 23 +++++++++++ .../imkl/imkl-11.3.3.210-iimpic-2016.10.0.eb | 38 +++++++++++++++++++ .../impi-5.1.3.181-iccifortcuda-2016.10.0.eb | 35 +++++++++++++++++ .../easyconfigs/i/intelc/intelc-2016.10.0.eb | 27 +++++++++++++ 6 files changed, 166 insertions(+) create mode 100644 easybuild/easyconfigs/c/CUDA/CUDA-8.0.44-iccifort-2016.3.210-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.0.eb create mode 100644 easybuild/easyconfigs/i/iimpic/iimpic-2016.10.0.eb create mode 100644 easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.0.eb create mode 100644 easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.0.eb create mode 100644 easybuild/easyconfigs/i/intelc/intelc-2016.10.0.eb diff --git a/easybuild/easyconfigs/c/CUDA/CUDA-8.0.44-iccifort-2016.3.210-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/c/CUDA/CUDA-8.0.44-iccifort-2016.3.210-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..c0dc1eccdc --- /dev/null +++ b/easybuild/easyconfigs/c/CUDA/CUDA-8.0.44-iccifort-2016.3.210-GCC-5.4.0-2.26.eb @@ -0,0 +1,19 @@ +name = 'CUDA' +version = '8.0.44' + +homepage = 'https://developer.nvidia.com/cuda-toolkit' +description = """CUDA (formerly Compute Unified Device Architecture) is a parallel + computing platform and programming model created by NVIDIA and implemented by the + graphics processing units (GPUs) that they produce. CUDA gives developers access + to the virtual instruction set and memory of the parallel computational elements in CUDA GPUs.""" + +toolchain = {'name': 'iccifort', 'version': '2016.3.210-GCC-5.4.0-2.26'} + +source_urls = [ + 'http://developer.download.nvidia.com/compute/cuda/%(version_major_minor)s/Prod/local_installers/', + 'https://developer.nvidia.com/compute/cuda/%(version_major_minor)s/prod/local_installers/' +] + +sources = ['%(namelower)s_%(version)s_linux-run'] + +moduleclass = 'system' diff --git a/easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.0.eb b/easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.0.eb new file mode 100644 index 0000000000..5e070ddc7c --- /dev/null +++ b/easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.0.eb @@ -0,0 +1,24 @@ +easyblock = 'Toolchain' + +name = 'iccifortcuda' +version = '2016.10.0' + +homepage = '(none)' +description = """Intel Cluster Toolkit Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MPI & Intel MKL, with CUDA toolkit""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +comp_name = 'iccifort' +comp_ver = '2016.3.210' +gccver = '5.4.0' +binutilsver = '2.26' +gccsuff = '-GCC-%s-%s' % (gccver, binutilsver) +cudacomp = (comp_name, '%s%s' % (comp_ver, gccsuff)) + +dependencies = [ + ('icc', comp_ver, gccsuff), + ('ifort', comp_ver, gccsuff), + ('CUDA', '8.0.44', '', cudacomp), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/i/iimpic/iimpic-2016.10.0.eb b/easybuild/easyconfigs/i/iimpic/iimpic-2016.10.0.eb new file mode 100644 index 0000000000..7e4dd19038 --- /dev/null +++ b/easybuild/easyconfigs/i/iimpic/iimpic-2016.10.0.eb @@ -0,0 +1,23 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild +easyblock = "Toolchain" + +name = 'iimpic' +version = '2016.10.0' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2016.3.210' +suff = '-GCC-5.4.0-2.26' +comp = ('iccifort', '%s%s' % (compver, suff)) + +dependencies = [ + ('icc', compver, suff), + ('ifort', compver, suff), + ('CUDA', '8.0.44', '', comp), + ('impi', '5.1.3.181', '', ('iccifortcuda', version)), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.0.eb b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.0.eb new file mode 100644 index 0000000000..60d2bc76e1 --- /dev/null +++ b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.0.eb @@ -0,0 +1,38 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'imkl' +version = '11.3.3.210' + +homepage = 'http://software.intel.com/en-us/intel-mkl/' +description = """Intel Math Kernel Library is a library of highly optimized, + extensively threaded math routines for science, engineering, and financial + applications that require maximum performance. Core math functions include + BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" + +toolchain = {'name': 'iimpic', 'version': '2016.10.0'} + +sources = ['l_mkl_%(version)s.tgz'] +checksums = ['f72546df27f5ebb0941b5d21fd804e34'] + +dontcreateinstalldir = 'True' + +components = ['intel-mkl'] + +license_file = HOME + '/licenses/intel/license.lic' + +interfaces = True + +postinstallcmds = [ + # extract the examples + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic.tgz -C %(installdir)s/mkl/examples/' +] + +modextravars = { + 'MKL_EXAMPLES': '%(installdir)s/mkl/examples/', +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.0.eb b/easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.0.eb new file mode 100644 index 0000000000..0a845c6fbc --- /dev/null +++ b/easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.0.eb @@ -0,0 +1,35 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'impi' +version = '5.1.3.181' + +homepage = 'http://software.intel.com/en-us/intel-mpi-library/' +description = """The Intel(R) MPI Library for Linux* OS is a multi-fabric message + passing library based on ANL MPICH2 and OSU MVAPICH2. The Intel MPI Library for + Linux OS implements the Message Passing Interface, version 2 (MPI-2) specification.""" + +toolchain = {'name': 'iccifortcuda', 'version': '2016.10.0'} + +sources = ['l_mpi_p_%(version)s.tgz'] + +checksums = ['1c14656859d48bf8b90c71dace2a977b'] + +dontcreateinstalldir = 'True' + +components = ['intel-mpi', 'intel-psxe', 'intel-imb'] + +license_file = HOME + '/licenses/intel/license.lic' + +# set up all the mpi commands to default to intel compilers +# set_mpi_wrappers_all = 'True' + +postinstallcmds = [ + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libmpich.so', + 'ln -s %(installdir)s/lib64/libmpigc4.so %(installdir)s/lib64/libmpichcxx.so', + 'ln -s %(installdir)s/lib64/libmpigf.so %(installdir)s/lib64/libfmpich.so', + 'ln -s %(installdir)s/lib64/libmpigf.so %(installdir)s/lib64/libmpichf90.so', + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libmpl.so', + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libopa.so' +] + +moduleclass = 'mpi' diff --git a/easybuild/easyconfigs/i/intelc/intelc-2016.10.0.eb b/easybuild/easyconfigs/i/intelc/intelc-2016.10.0.eb new file mode 100644 index 0000000000..38a1bb71af --- /dev/null +++ b/easybuild/easyconfigs/i/intelc/intelc-2016.10.0.eb @@ -0,0 +1,27 @@ +easyblock = 'Toolchain' + +name = 'intelc' +version = '2016.10.0' + +homepage = '(none)' +description = """Intel Cluster Toolkit Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MPI & Intel MKL, with CUDA toolkit""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +comp_name = 'iccifort' +comp_ver = '2016.3.210' +gccver = '5.4.0' +binutilsver = '2.26' +gccsuff = '-GCC-%s-%s' % (gccver, binutilsver) +comp = (comp_name, '%s%s' % (comp_ver, gccsuff)) + +dependencies = [ + comp, # part of iimpic + ('CUDA', '8.0.44', '', comp), + ('icc', comp_ver, gccsuff), + ('ifort', comp_ver, gccsuff), + ('impi', '5.1.3.181', '', ('iccifortcuda', version)), + ('imkl', '11.3.3.210', '', ('iimpic', version)), +] + +moduleclass = 'toolchain' -- GitLab From 14075d37c186e7fbac183c605096e0d4b426c68d Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Wed, 2 Nov 2016 23:37:49 +0100 Subject: [PATCH 542/741] add easyconfig SPAdes-3.9.0-foss-2016b.eb --- .../s/SPAdes/SPAdes-3.9.0-foss-2016b.eb | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 easybuild/easyconfigs/s/SPAdes/SPAdes-3.9.0-foss-2016b.eb diff --git a/easybuild/easyconfigs/s/SPAdes/SPAdes-3.9.0-foss-2016b.eb b/easybuild/easyconfigs/s/SPAdes/SPAdes-3.9.0-foss-2016b.eb new file mode 100644 index 0000000000..a92f27ffac --- /dev/null +++ b/easybuild/easyconfigs/s/SPAdes/SPAdes-3.9.0-foss-2016b.eb @@ -0,0 +1,44 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics +# 3.9.0: +# Modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = "CMakeMake" + +name = 'SPAdes' +version = '3.9.0' + +homepage = 'http://bioinf.spbau.ru/en/spades' +description = """Genome assembler for single-cell and isolates data sets""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['http://spades.bioinf.spbau.ru/release%(version)s/'] +sources = [SOURCE_TAR_GZ] + +builddependencies = [('CMake', '3.5.2')] + +dependencies = [ + ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), +] + +start_dir = 'src' + +separate_build_dir = True + +configopts = ' -DBoost_NO_BOOST_CMAKE=ON' + +sanity_check_commands = [('spades.py', '--test')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["bwa-spades", "dipspades", "dipspades.py", + "hammer", "ionhammer", "spades", "spades.py"]], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 2f03bf721bcdd5c89689e736e4a52c71bb108247 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Thu, 3 Nov 2016 00:08:52 +0100 Subject: [PATCH 543/741] add easyconfig Trim_Galore-0.4.2-foss-2016b.eb --- .../Trim_Galore-0.4.2-foss-2016b.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/t/Trim_Galore/Trim_Galore-0.4.2-foss-2016b.eb diff --git a/easybuild/easyconfigs/t/Trim_Galore/Trim_Galore-0.4.2-foss-2016b.eb b/easybuild/easyconfigs/t/Trim_Galore/Trim_Galore-0.4.2-foss-2016b.eb new file mode 100644 index 0000000000..b6070a5118 --- /dev/null +++ b/easybuild/easyconfigs/t/Trim_Galore/Trim_Galore-0.4.2-foss-2016b.eb @@ -0,0 +1,33 @@ +# 0.4.2 modified by: +# Adam Huffman +# The Francis Crick Institute +# TODO: deal with the hardcoding of /usr/bin/perl + +easyblock = "PackedBinary" + +name = 'Trim_Galore' +version = '0.4.2' + +homepage = 'http://www.bioinformatics.babraham.ac.uk/projects/trim_galore/' +description = """A wrapper tool around Cutadapt and FastQC to consistently apply + quality and adapter trimming to FastQ files, with some extra functionality for + MspI-digested RRBS-type (Reduced Representation Bisufite-Seq) libraries.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = ['%(namelower)s_v%(version)s.zip'] +source_urls = ['http://www.bioinformatics.babraham.ac.uk/projects/%(namelower)s'] + +install_cmd = "cp -a %(namelower)s_zip/* %(installdir)s && chmod +x %(installdir)s/%(namelower)s" + +dependencies = [ + ('FastQC', '0.11.5', '-Java-1.7.0_80', True), + ('cutadapt', '1.9.1', '-Python-2.7.12'), +] + +sanity_check_paths = { + 'files': ["trim_galore"], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From ff85ec5d9d7fa608b121ffb0402c7b6b0d9f1bd2 Mon Sep 17 00:00:00 2001 From: fizwit Date: Wed, 2 Nov 2016 16:12:54 -0700 Subject: [PATCH 544/741] 2nd try new module prokka --- .../BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb | 31 +++++++++++++ .../prokka-1.11-foss-2016b-BioPerl-1.7.0.eb | 43 +++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 easybuild/easyconfigs/b/BioPerl/BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb create mode 100644 easybuild/easyconfigs/p/prokka/prokka-1.11-foss-2016b-BioPerl-1.7.0.eb diff --git a/easybuild/easyconfigs/b/BioPerl/BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb b/easybuild/easyconfigs/b/BioPerl/BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb new file mode 100644 index 0000000000..dbed209e6f --- /dev/null +++ b/easybuild/easyconfigs/b/BioPerl/BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb @@ -0,0 +1,31 @@ +# easybuild easyconfig +# +# John Dey jfdey@fredhutch.org +# +# Fred Hutchinson Cancer Research Center + +name = 'BioPerl' +version = '1.7.0' + +easyblock = 'PerlModule' + +homepage = 'http://www.bioperl.org/' +description = """Bioperl is the product of a community effort to produce Perl code which is useful in biology. + Examples include Sequence objects, Alignment objects and database searching objects.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/bioperl/bioperl-live/archive/'] +sources = ['release-%s.zip' % version.replace('.', '-')] + +perl = 'Perl' +perlver = '5.24.0' +versionsuffix = '-%s-%s' % (perl, perlver) + +dependencies = [ + (perl, perlver), +] + +options = {'modulename': 'Bio::Perl'} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/p/prokka/prokka-1.11-foss-2016b-BioPerl-1.7.0.eb b/easybuild/easyconfigs/p/prokka/prokka-1.11-foss-2016b-BioPerl-1.7.0.eb new file mode 100644 index 0000000000..77c56eaa14 --- /dev/null +++ b/easybuild/easyconfigs/p/prokka/prokka-1.11-foss-2016b-BioPerl-1.7.0.eb @@ -0,0 +1,43 @@ +# EasyBuild easyconfig +# +# John Dey jfdey@fredhutch.org +# Fred Hutchenson Cancer Research Center + +easyblock = 'Tarball' + +name = 'prokka' + +version = '1.11' +versionsuffix = '-BioPerl-1.7.0' + +homepage = 'http://www.vicbioinformatics.com/software.prokka.shtml' +description = """Prokka is a software tool for the rapid annotation of prokaryotic genomes.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/tseemann/prokka/archive/'] +sources = ['v%(version)s.zip'] + +dependencies = [('BioPerl', '1.7.0', '-Perl-5.24.0')] + +modextrapaths = { + 'PATH': '', +} + +bin_files = ["prokka", "prokka-cdd_to_hmm", "prokka-genpept_to_fasta_db", "prokka-tigrfams_to_hmm", + "prokka-biocyc_to_fasta_db", "prokka-clusters_to_hmm", "prokka-hamap_to_hmm", + "prokka-uniprot_to_fasta_db", "prokka-build_kingdom_dbs", "prokka-genbank_to_fasta_db", "prokka-make_tarball"] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in bin_files] + + ["binaries/linux/aragorn", + "db/cm/Bacteria", + "doc/ToDoList.txt"], + 'dirs': ["bin", "binaries", + "db", "db/cm","db/genus","db/hmm","db/kingdom", + "doc" ], +} + +modloadmsg = '''prokka scripts are located in \\$EBROOTPROKKA/bin Databases are located: \\$EBROOTPROKKA/db''' + +moduleclass = 'bio' -- GitLab From 9029cd51e2f3b416ba4b60b9d8109aaa7e654efb Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Thu, 3 Nov 2016 00:26:41 +0100 Subject: [PATCH 545/741] add easyconfig freetype-2.7-foss-2016b.eb, add easyconfig HTSeq-0.6.1p1-foss-2016b-Python-2.7.12.eb, add easyconfig matplotlib-1.5.3-foss-2016b-Python-2.7.12.eb --- .../f/freetype/freetype-2.7-foss-2016b.eb | 26 +++++++++++ .../HTSeq-0.6.1p1-foss-2016b-Python-2.7.12.eb | 27 ++++++++++++ ...tplotlib-1.5.3-foss-2016b-Python-2.7.12.eb | 44 +++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 easybuild/easyconfigs/f/freetype/freetype-2.7-foss-2016b.eb create mode 100644 easybuild/easyconfigs/h/HTSeq/HTSeq-0.6.1p1-foss-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-foss-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/f/freetype/freetype-2.7-foss-2016b.eb b/easybuild/easyconfigs/f/freetype/freetype-2.7-foss-2016b.eb new file mode 100644 index 0000000000..8b88736d00 --- /dev/null +++ b/easybuild/easyconfigs/f/freetype/freetype-2.7-foss-2016b.eb @@ -0,0 +1,26 @@ +name = 'freetype' +version = '2.7' + +homepage = 'http://freetype.org' +description = """FreeType 2 is a software font engine that is designed to be small, efficient, highly customizable, and + portable while capable of producing high-quality output (glyph images). It can be used in graphics libraries, display + servers, font conversion tools, text image generation tools, and many other products as well.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [GNU_SAVANNAH_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('libpng', '1.6.26'), + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), +] + +sanity_check_paths = { + 'files': ['bin/freetype-config', 'lib/libfreetype.a', 'lib/libfreetype.%s' % SHLIB_EXT, + 'lib/pkgconfig/freetype2.pc'], + 'dirs': ['include/freetype2'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/h/HTSeq/HTSeq-0.6.1p1-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/h/HTSeq/HTSeq-0.6.1p1-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..c7f13d0e1c --- /dev/null +++ b/easybuild/easyconfigs/h/HTSeq/HTSeq-0.6.1p1-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,27 @@ +easyblock = "PythonPackage" + +name = 'HTSeq' +version = '0.6.1p1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www-huber.embl.de/users/anders/HTSeq/' +description = """A framework to process and analyze data from high-throughput sequencing (HTS) assays""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('matplotlib', '1.5.3', versionsuffix), +] + +sanity_check_paths = { + 'files': ["bin/htseq-count", "bin/htseq-qa"], + 'dirs': ["lib/python%(pyshortver)s/site-packages/%(name)s-%(version)s-py%(pyshortver)s-linux-x86_64.egg"], +} + +options = {'modulename': '%(name)s'} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..64688cec7b --- /dev/null +++ b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.3-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,44 @@ +easyblock = 'Bundle' + +name = 'matplotlib' +version = '1.5.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://matplotlib.org' +description = """matplotlib is a python 2D plotting library which produces publication quality figures in a variety of + hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python + and ipython shell, web application servers, and six graphical user interface toolkits.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.12'), + ('freetype', '2.7'), + ('libpng', '1.6.26'), +] + +exts_list = [ + ('Cycler', '0.10.0', { + 'modulename': 'cycler', + 'source_urls': ['https://pypi.python.org/packages/source/C/Cycler'], + 'source_tmpl': 'cycler-%(version)s.tar.gz', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/m/matplotlib'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'vis' -- GitLab From 887ff46d9609645bd545ee79be49339ae11b8b7a Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 3 Nov 2016 08:03:02 +0100 Subject: [PATCH 546/741] Updated the homepage of behave and removed uncommented cruft. --- .../b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb index 3a5ba505f6..637bef0400 100644 --- a/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb @@ -4,8 +4,7 @@ name = 'behave' version = '1.2.5' versionsuffix = '-Python-%(pyver)s' -homepage = 'http://pytest.org' -homepage = 'https://pypi.python.org/packages' +homepage = 'http://pythonhosted.org/behave' description = """behave: Behavior-driven development (or BDD) is an agile software development technique that encourages collaboration between developers, QA and non-technical or business participants in a @@ -18,7 +17,6 @@ sources = [SOURCELOWER_TAR_GZ] dependencies = [ ('Python', '2.7.12'), -# ('py', '1.4.31', versionsuffix), ] sanity_check_paths = { -- GitLab From fa62e828b70df334e12e4740574a47db2a12ca8b Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 3 Nov 2016 08:04:38 +0100 Subject: [PATCH 547/741] Drop empty line --- .../b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb | 1 - 1 file changed, 1 deletion(-) diff --git a/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb index 637bef0400..515ba57589 100644 --- a/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/b/behave/behave-1.2.5-foss-2016b-Python-2.7.12.eb @@ -25,4 +25,3 @@ sanity_check_paths = { } moduleclass = 'tools' - -- GitLab From 3aa16b4415fc8aee6556a46be4630e01209e0dfb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 3 Nov 2016 11:16:20 +0100 Subject: [PATCH 548/741] style fixes for BioPerl and prokka easyconfigs --- .../BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb | 11 ++++----- .../prokka-1.11-foss-2016b-BioPerl-1.7.0.eb | 24 ++++++++----------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/easybuild/easyconfigs/b/BioPerl/BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb b/easybuild/easyconfigs/b/BioPerl/BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb index dbed209e6f..4a78852736 100644 --- a/easybuild/easyconfigs/b/BioPerl/BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb +++ b/easybuild/easyconfigs/b/BioPerl/BioPerl-1.7.0-foss-2016b-Perl-5.24.0.eb @@ -4,10 +4,11 @@ # # Fred Hutchinson Cancer Research Center +easyblock = 'PerlModule' + name = 'BioPerl' version = '1.7.0' - -easyblock = 'PerlModule' +versionsuffix = '-Perl-%(perlver)s' homepage = 'http://www.bioperl.org/' description = """Bioperl is the product of a community effort to produce Perl code which is useful in biology. @@ -18,12 +19,8 @@ toolchain = {'name': 'foss', 'version': '2016b'} source_urls = ['https://github.com/bioperl/bioperl-live/archive/'] sources = ['release-%s.zip' % version.replace('.', '-')] -perl = 'Perl' -perlver = '5.24.0' -versionsuffix = '-%s-%s' % (perl, perlver) - dependencies = [ - (perl, perlver), + ('Perl', '5.24.0'), ] options = {'modulename': 'Bio::Perl'} diff --git a/easybuild/easyconfigs/p/prokka/prokka-1.11-foss-2016b-BioPerl-1.7.0.eb b/easybuild/easyconfigs/p/prokka/prokka-1.11-foss-2016b-BioPerl-1.7.0.eb index 77c56eaa14..a9b5ed1e23 100644 --- a/easybuild/easyconfigs/p/prokka/prokka-1.11-foss-2016b-BioPerl-1.7.0.eb +++ b/easybuild/easyconfigs/p/prokka/prokka-1.11-foss-2016b-BioPerl-1.7.0.eb @@ -6,9 +6,9 @@ easyblock = 'Tarball' name = 'prokka' - version = '1.11' -versionsuffix = '-BioPerl-1.7.0' +bioperl_ver = '1.7.0' +versionsuffix = '-BioPerl-%s' % bioperl_ver homepage = 'http://www.vicbioinformatics.com/software.prokka.shtml' description = """Prokka is a software tool for the rapid annotation of prokaryotic genomes.""" @@ -18,26 +18,22 @@ toolchain = {'name': 'foss', 'version': '2016b'} source_urls = ['https://github.com/tseemann/prokka/archive/'] sources = ['v%(version)s.zip'] -dependencies = [('BioPerl', '1.7.0', '-Perl-5.24.0')] +dependencies = [('BioPerl', bioperl_ver, '-Perl-5.24.0')] modextrapaths = { 'PATH': '', } -bin_files = ["prokka", "prokka-cdd_to_hmm", "prokka-genpept_to_fasta_db", "prokka-tigrfams_to_hmm", - "prokka-biocyc_to_fasta_db", "prokka-clusters_to_hmm", "prokka-hamap_to_hmm", - "prokka-uniprot_to_fasta_db", "prokka-build_kingdom_dbs", "prokka-genbank_to_fasta_db", "prokka-make_tarball"] +bin_files = ['prokka', 'prokka-cdd_to_hmm', 'prokka-genpept_to_fasta_db', 'prokka-tigrfams_to_hmm', + 'prokka-biocyc_to_fasta_db', 'prokka-clusters_to_hmm', 'prokka-hamap_to_hmm', + 'prokka-uniprot_to_fasta_db', 'prokka-build_kingdom_dbs', 'prokka-genbank_to_fasta_db', + 'prokka-make_tarball'] sanity_check_paths = { - 'files': ["bin/%s" % x for x in bin_files] + - ["binaries/linux/aragorn", - "db/cm/Bacteria", - "doc/ToDoList.txt"], - 'dirs': ["bin", "binaries", - "db", "db/cm","db/genus","db/hmm","db/kingdom", - "doc" ], + 'files': ['bin/%s' % x for x in bin_files] + ['binaries/linux/aragorn', 'db/cm/Bacteria', 'doc/ToDoList.txt'], + 'dirs': ['bin', 'binaries', 'db', 'db/cm', 'db/genus', 'db/hmm', 'db/kingdom', 'doc'], } -modloadmsg = '''prokka scripts are located in \\$EBROOTPROKKA/bin Databases are located: \\$EBROOTPROKKA/db''' +modloadmsg = "prokka scripts are located in \\$EBROOTPROKKA/bin; databases are located in \\$EBROOTPROKKA/db" moduleclass = 'bio' -- GitLab From 522f92db00b83d434ce831910a45705e929457c1 Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Thu, 3 Nov 2016 14:20:54 -0500 Subject: [PATCH 549/741] Added icc 2017-update1 easyconfig file --- .../i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..6400499a51 --- /dev/null +++ b/easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb @@ -0,0 +1,33 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'icc' +version = '2017.1.132' + +homepage = 'http://software.intel.com/en-us/intel-compilers/' +description = "C and C++ compiler from Intel" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['parallel_studio_xe_%(version_major)s_update%(version_minor)s_composer_edition_for_cpp.tgz'] + +checksums = ['41a0e8850ebb5f7169076c89be743ee2'] + +gccver = '5.4.0' +binutilsver = '2.26' +versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) + +dependencies = [ + ('GCCcore', gccver), + ('binutils', binutilsver, '', ('GCCcore', gccver)), +] + +# list of regex for components to install +# full list of components can be obtained from pset/mediaconfig.xml in unpacked sources +# cfr. https://software.intel.com/en-us/articles/intel-composer-xe-2015-silent-installation-guide +components = ['intel-comp', 'intel-ccomp', 'intel-icc', 'intel-openmp', 'intel-ipsc?_'] + +dontcreateinstalldir = 'True' + +license_file = '/opt/easybuild/licenses/intel/license.lic' + +moduleclass = 'compiler' -- GitLab From e3a885652e563dd8cf0fcd7a93980f7d78489147 Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Thu, 3 Nov 2016 14:21:56 -0500 Subject: [PATCH 550/741] Added ifort 2017-update1 easyconfig file --- .../ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..70f7fb91f8 --- /dev/null +++ b/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -0,0 +1,33 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'ifort' +version = '2017.1.132' + +homepage = 'http://software.intel.com/en-us/intel-compilers/' +description = "C and C++ compiler from Intel" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['parallel_studio_xe_%(version_major)s_update%(version_minor)s_composer_edition_for_fortran.tgz'] + +checksums = ['612169f4b40cdded8e212bf097925e4f'] + +gccver = '5.4.0' +binutilsver = '2.26' +versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) + +dependencies = [ + ('GCCcore', gccver), + ('binutils', binutilsver, '', ('GCCcore', gccver)), +] + +# list of regex for components to install +# full list of components can be obtained from pset/mediaconfig.xml in unpacked sources +# cfr. https://software.intel.com/en-us/articles/intel-composer-xe-2015-silent-installation-guide +components = ['intel-comp', 'intel-fcomp', 'intel-ifort', 'intel-openmp', 'intel-ipsf?_'] + +dontcreateinstalldir = 'True' + +license_file = '/opt/easybuild/licenses/intel/license.lic' + +moduleclass = 'compiler' -- GitLab From 1c230699a9cf2c81b080fb9fcfa22d6f7d8aab24 Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Thu, 3 Nov 2016 14:23:01 -0500 Subject: [PATCH 551/741] Added iccifort 2017-update1 easyconfig file --- .../iccifort-2017.1.132-GCC-5.4.0-2.26.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/i/iccifort/iccifort-2017.1.132-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/iccifort/iccifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iccifort/iccifort-2017.1.132-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..8034a2a1e1 --- /dev/null +++ b/easybuild/easyconfigs/i/iccifort/iccifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -0,0 +1,18 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild +easyblock = "Toolchain" + +name = 'iccifort' +version = '2017.1.132' +versionsuffix = '-GCC-5.4.0-2.26' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel Cluster Toolkit Compiler Edition provides Intel C,C++ and fortran compilers, Intel MPI and Intel MKL""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +dependencies = [ + ('icc', version, versionsuffix), + ('ifort', version, versionsuffix), +] + +moduleclass = 'toolchain' -- GitLab From 6ce9bbeee4e57ac909d42a6a1d8c86d1d291ab5c Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Thu, 3 Nov 2016 14:25:31 -0500 Subject: [PATCH 552/741] Added impi 2017-update1 easyconfig file --- ....132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/i/impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..b0c1ffaa40 --- /dev/null +++ b/easybuild/easyconfigs/i/impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -0,0 +1,35 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'impi' +version = '2017.1.132' + +homepage = 'http://software.intel.com/en-us/intel-mpi-library/' +description = """The Intel(R) MPI Library for Linux* OS is a multi-fabric message + passing library based on ANL MPICH2 and OSU MVAPICH2. The Intel MPI Library for + Linux OS implements the Message Passing Interface, version 2 (MPI-2) specification.""" + +toolchain = {'name': 'iccifort', 'version': '2017.1.132-GCC-5.4.0-2.26'} + +sources = ['l_mpi_%(version)s.tgz'] + +checksums = ['d5e941ac2bcf7c5576f85f6bcfee4c18'] + +dontcreateinstalldir = 'True' + +components = ['intel-mpi', 'intel-psxe', 'intel-imb'] + +license_file = '/opt/easybuild/licenses/intel/license.lic' + +# set up all the mpi commands to default to intel compilers +# set_mpi_wrappers_all = 'True' + +postinstallcmds = [ + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libmpich.so', + 'ln -s %(installdir)s/lib64/libmpigc4.so %(installdir)s/lib64/libmpichcxx.so', + 'ln -s %(installdir)s/lib64/libmpigf.so %(installdir)s/lib64/libfmpich.so', + 'ln -s %(installdir)s/lib64/libmpigf.so %(installdir)s/lib64/libmpichf90.so', + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libmpl.so', + 'ln -s %(installdir)s/lib64/libmpi.so %(installdir)s/lib64/libopa.so' +] + +moduleclass = 'mpi' -- GitLab From a8a8745b1e0e0248f7ef8586543793eafc0d5079 Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Thu, 3 Nov 2016 14:26:06 -0500 Subject: [PATCH 553/741] Added iimpi 2017-update1 easyconfig file --- .../i/iimpi/iimpi-2017.01-GCC-5.4.0-2.26.eb | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 easybuild/easyconfigs/i/iimpi/iimpi-2017.01-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/iimpi/iimpi-2017.01-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iimpi/iimpi-2017.01-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..97332c6ea3 --- /dev/null +++ b/easybuild/easyconfigs/i/iimpi/iimpi-2017.01-GCC-5.4.0-2.26.eb @@ -0,0 +1,20 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild +easyblock = "Toolchain" + +name = 'iimpi' +version = '2017.01' +versionsuffix = '-GCC-5.4.0-2.26' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2017.1.132' +dependencies = [ + ('icc', compver, versionsuffix), + ('ifort', compver, versionsuffix), + ('impi', compver, '', ('iccifort', '%s%s' % (compver, versionsuffix))), +] + +moduleclass = 'toolchain' -- GitLab From 6d8b6c578342f29868a9852b945511039263b74f Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Thu, 3 Nov 2016 14:27:22 -0500 Subject: [PATCH 554/741] Added imkl 2017-update1 easyconfig file --- ...-2017.1.132-iimpi-2017.1-GCC-5.4.0-2.26.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.1-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.1-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.1-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..70845ad106 --- /dev/null +++ b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.1-GCC-5.4.0-2.26.eb @@ -0,0 +1,38 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'imkl' +version = '2017.1.132' + +homepage = 'http://software.intel.com/en-us/intel-mkl/' +description = """Intel Math Kernel Library is a library of highly optimized, + extensively threaded math routines for science, engineering, and financial + applications that require maximum performance. Core math functions include + BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" + +toolchain = {'name': 'iimpi', 'version': '2017.01-GCC-5.4.0-2.26'} + +sources = ['l_mkl_%(version)s.tgz'] +checksums = ['7911c0f777c4cb04225bf4518088939e'] + +dontcreateinstalldir = 'True' + +license_file = '/opt/easybuild/licenses/intel/license.lic' + +interfaces = True + +postinstallcmds = [ + # extract the examples + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic_c.tgz -C %(installdir)s/mkl/examples/', +] + +modextravars = { + 'MKL_EXAMPLES': '%(installdir)s/mkl/examples/', +} + +moduleclass = 'numlib' -- GitLab From 22fa0b3e1451a2c3cecd8367199f944f0cea5669 Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Thu, 3 Nov 2016 14:28:22 -0500 Subject: [PATCH 555/741] Added intel 2017-update1 easyconfig file --- .../easyconfigs/i/intel/intel-2017.01.eb | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 easybuild/easyconfigs/i/intel/intel-2017.01.eb diff --git a/easybuild/easyconfigs/i/intel/intel-2017.01.eb b/easybuild/easyconfigs/i/intel/intel-2017.01.eb new file mode 100644 index 0000000000..9993bc8e47 --- /dev/null +++ b/easybuild/easyconfigs/i/intel/intel-2017.01.eb @@ -0,0 +1,24 @@ +easyblock = 'Toolchain' + +name = 'intel' +version = '2017.01' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel Cluster Toolkit Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MPI & Intel MKL.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2017.1.132' +gccver = '5.4.0' +binutilsver = '2.26' +gccsuff = '-GCC-%s-%s' % (gccver, binutilsver) +dependencies = [ + ('GCCcore', gccver), + ('binutils', binutilsver, '-GCCcore-%s' % gccver), + ('icc', compver, gccsuff), + ('ifort', compver, gccsuff), + ('impi', compver, '', ('iccifort', '%s%s' % (compver, gccsuff))), + ('imkl', compver, '', ('iimpi', version + gccsuff)), +] + +moduleclass = 'toolchain' -- GitLab From 1b5f19b4ad1802ba5fcae6837f64d9571d894550 Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Thu, 3 Nov 2016 14:46:52 -0500 Subject: [PATCH 556/741] Fixed file typo --- ....0-2.26.eb => imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/i/imkl/{imkl-2017.1.132-iimpi-2017.1-GCC-5.4.0-2.26.eb => imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb} (100%) diff --git a/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.1-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb similarity index 100% rename from easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.1-GCC-5.4.0-2.26.eb rename to easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb -- GitLab From a0f8f589f0e6da736276e7447c01ed53e8b03b70 Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Fri, 4 Nov 2016 14:03:08 -0500 Subject: [PATCH 557/741] Fixed license path --- easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb | 2 +- .../easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb | 2 +- .../i/imkl/imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb | 2 +- .../impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb index 6400499a51..924f53625d 100644 --- a/easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/icc/icc-2017.1.132-GCC-5.4.0-2.26.eb @@ -28,6 +28,6 @@ components = ['intel-comp', 'intel-ccomp', 'intel-icc', 'intel-openmp', 'intel-i dontcreateinstalldir = 'True' -license_file = '/opt/easybuild/licenses/intel/license.lic' +license_file = HOME + '/licenses/intel/license.lic' moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb index 70f7fb91f8..a400dd9f38 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -28,6 +28,6 @@ components = ['intel-comp', 'intel-fcomp', 'intel-ifort', 'intel-openmp', 'intel dontcreateinstalldir = 'True' -license_file = '/opt/easybuild/licenses/intel/license.lic' +license_file = HOME + '/licenses/intel/license.lic' moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb index 70845ad106..be8b68226a 100644 --- a/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iimpi-2017.01-GCC-5.4.0-2.26.eb @@ -16,7 +16,7 @@ checksums = ['7911c0f777c4cb04225bf4518088939e'] dontcreateinstalldir = 'True' -license_file = '/opt/easybuild/licenses/intel/license.lic' +license_file = HOME + '/licenses/intel/license.lic' interfaces = True diff --git a/easybuild/easyconfigs/i/impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb index b0c1ffaa40..bebecd8cf6 100644 --- a/easybuild/easyconfigs/i/impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/impi/impi-2017.1.132-iccifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -18,7 +18,7 @@ dontcreateinstalldir = 'True' components = ['intel-mpi', 'intel-psxe', 'intel-imb'] -license_file = '/opt/easybuild/licenses/intel/license.lic' +license_file = HOME + '/licenses/intel/license.lic' # set up all the mpi commands to default to intel compilers # set_mpi_wrappers_all = 'True' -- GitLab From 0357b31ee4a0bc1aba5bbc712400e21b2385bda3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 4 Nov 2016 20:08:43 +0100 Subject: [PATCH 558/741] fix location/name of Anaconda easyconfig files --- .../{Anaconda/Anaconda2.4.0.0.eb => Anaconda2/Anaconda2-4.0.0.eb} | 0 .../{Anaconda/Anaconda3.4.0.0.eb => Anaconda3/Anaconda3-4.0.0.eb} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/a/{Anaconda/Anaconda2.4.0.0.eb => Anaconda2/Anaconda2-4.0.0.eb} (100%) rename easybuild/easyconfigs/a/{Anaconda/Anaconda3.4.0.0.eb => Anaconda3/Anaconda3-4.0.0.eb} (100%) diff --git a/easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb similarity index 100% rename from easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb rename to easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb diff --git a/easybuild/easyconfigs/a/Anaconda/Anaconda3.4.0.0.eb b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb similarity index 100% rename from easybuild/easyconfigs/a/Anaconda/Anaconda3.4.0.0.eb rename to easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb -- GitLab From 70b84a08f1614ac0b0bc4b1689870977ea0a5c99 Mon Sep 17 00:00:00 2001 From: Davide Vanzo Date: Fri, 4 Nov 2016 14:17:03 -0500 Subject: [PATCH 559/741] Added HPL 2.2 with intel-2017.01 easyconfig --- .../easyconfigs/h/HPL/HPL-2.2-intel-2017.01.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-intel-2017.01.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-intel-2017.01.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-intel-2017.01.eb new file mode 100644 index 0000000000..64700f3b27 --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-intel-2017.01.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'intel', 'version': '2017.01'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' -- GitLab From f0e1a1abc2d7289aeb3d2914f54172164ac5a9b9 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 4 Nov 2016 21:47:26 +0100 Subject: [PATCH 560/741] use generic CondaCreate easyblock, fix dep --- easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb index 378b53a6e2..258c1c0dbe 100644 --- a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb +++ b/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb @@ -10,7 +10,7 @@ # http://apps.fz-juelich.de/unite/ ## -easyblock = 'EB_CondaCreate' +easyblock = 'CondaCreate' name = "condacreate-module" version = "1.0" @@ -25,13 +25,13 @@ description = """ Conda is a platform- and packages. This repository hosts the corresponding recipes. """ -toolchain = {'name': 'dummy', 'version': 'dummy'} +toolchain = {'name': 'dummy', 'version': ''} requirements = "perl-app-cpanminus" channels = 'bioconda' post_install_cmd = "cpanm --notest ExtUtils::MakeMaker" -builddependencies = [('anaconda', '2-4.0.0')] +builddependencies = [('Anaconda2', '4.0.0')] sanity_check_paths = { 'files': ['bin/cpanm', 'bin/perl'], -- GitLab From cee69040e2a8613c8892b71ce8b4bb17b23982ec Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 7 Nov 2016 09:01:01 +0100 Subject: [PATCH 561/741] add easyconfig Rosetta-3.7-foss-2016b.eb, add easyconfig SCons-2.5.0-foss-2016b-Python-2.7.12.eb --- .../r/Rosetta/Rosetta-3.7-foss-2016b.eb | 20 ++++++++++++++++ .../SCons-2.5.0-foss-2016b-Python-2.7.12.eb | 24 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 easybuild/easyconfigs/r/Rosetta/Rosetta-3.7-foss-2016b.eb create mode 100644 easybuild/easyconfigs/s/SCons/SCons-2.5.0-foss-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/r/Rosetta/Rosetta-3.7-foss-2016b.eb b/easybuild/easyconfigs/r/Rosetta/Rosetta-3.7-foss-2016b.eb new file mode 100644 index 0000000000..dc1928028e --- /dev/null +++ b/easybuild/easyconfigs/r/Rosetta/Rosetta-3.7-foss-2016b.eb @@ -0,0 +1,20 @@ +name = 'Rosetta' +version = '3.7' + +homepage = 'https://www.rosettacommons.org' +description = """Rosetta is the premier software suite for modeling macromolecular structures. As a flexible, +multi-purpose application, it includes tools for structure prediction, design, and remodeling of proteins and +nucleic acids.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'usempi': True} + +sources = ['%(namelower)s_src_%(version)s_bundle.tgz'] + +builddependencies = [('SCons', '2.5.0', '-Python-2.7.12')] + +modextravars = { + 'ROSETTA3_DB': '$root/database', +} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/s/SCons/SCons-2.5.0-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SCons/SCons-2.5.0-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..f7cac2e6e2 --- /dev/null +++ b/easybuild/easyconfigs/s/SCons/SCons-2.5.0-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,24 @@ +easyblock = 'PythonPackage' + +name = 'SCons' +version = '2.5.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.scons.org/' +description = "SCons is a software construction tool." + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] + +dependencies = [('Python', '2.7.12')] + +sanity_check_paths = { + 'files': ['bin/scons', 'bin/scons-time', 'bin/sconsign'], + 'dirs': ['lib/%(namelower)s-%(version)s/%(name)s'], +} + +options = {'modulename': False} + +moduleclass = 'devel' -- GitLab From c34c659ebc4cb2f4023662a0fe3c0344772446e3 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 7 Nov 2016 11:05:58 +0100 Subject: [PATCH 562/741] latest InterProScan. Including required fix for centos6 systems --- .../InterProScan-5.21-60.0-intel-2015b.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/i/InterProScan/InterProScan-5.21-60.0-intel-2015b.eb diff --git a/easybuild/easyconfigs/i/InterProScan/InterProScan-5.21-60.0-intel-2015b.eb b/easybuild/easyconfigs/i/InterProScan/InterProScan-5.21-60.0-intel-2015b.eb new file mode 100644 index 0000000000..1169ea8d18 --- /dev/null +++ b/easybuild/easyconfigs/i/InterProScan/InterProScan-5.21-60.0-intel-2015b.eb @@ -0,0 +1,33 @@ +easyblock = 'Tarball' + +name = 'InterProScan' +version = '5.21-60.0' + +homepage = 'http://www.ebi.ac.uk/interpro/' +description = """InterProScan is a sequence analysis application (nucleotide and protein sequences) that combines + different protein signature recognition methods into one resource.""" + +toolchain = {'name': 'intel', 'version': '2015b'} + +source_urls = ['http://ftp.ebi.ac.uk/pub/software/unix/iprscan/%(version_major)s/%(version)s/', + 'ftp://ftp.ebi.ac.uk/pub/databases/interpro/iprscan/5/bin/'] +sources = ['%(namelower)s-%(version)s-64-bit.tar.gz', 'sfld_binary.zip'] + +dependencies = [ + ('Java', '1.7.0_80', '', True), + ('Perl', '5.20.3'), + ('libgd', '2.1.1'), + ('Python', '2.7.10'), +] + +sanity_check_paths = { + 'files': ['interproscan-%(version_major)s.jar', 'interproscan.sh', 'interproscan.properties'], + 'dirs': ['bin', 'lib', 'data'], +} + +# Workaround required for CentOS 6 systems. Details here: +# https://github.com/ebi-pf-team/interproscan/issues/16 +postinstallcmds = ['cp -f %(builddir)s/sfld_postprocess %(installdir)s/bin/sfld/', + 'cp -f %(builddir)s/sfld_preprocess %(installdir)s/bin/sfld/'] + +moduleclass = 'bio' -- GitLab From f7583c12a5383ce6a20704b8aeec56fda20fda80 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 7 Nov 2016 14:01:08 +0100 Subject: [PATCH 563/741] add easyconfig MUMmer-3.23-foss-2016b.eb --- .../m/MUMmer/MUMmer-3.23-foss-2016b.eb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-foss-2016b.eb diff --git a/easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-foss-2016b.eb b/easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-foss-2016b.eb new file mode 100644 index 0000000000..279406579d --- /dev/null +++ b/easybuild/easyconfigs/m/MUMmer/MUMmer-3.23-foss-2016b.eb @@ -0,0 +1,29 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Cedric Laczny , Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-94.html +## +# foss-2016b modified by: +# Adam Huffman +# The Francis Crick Institute + +name = 'MUMmer' +version = '3.23' + +homepage = 'http://mummer.sourceforge.net/' +description = """MUMmer is a system for rapidly aligning entire genomes, + whether in complete or draft form. AMOS makes use of it.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = ['%(name)s%(version)s.tar.gz'] +source_urls = [('http://sourceforge.net/projects/mummer/files/%(namelower)s/%(version)s/', 'download')] + +moduleclass = 'bio' -- GitLab From 3fb3374e47e352e0072f9eb63d1edb7bdf24a2a6 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 7 Nov 2016 15:35:43 +0100 Subject: [PATCH 564/741] Rewrite header of GROMACS-2016-foss-2016b-hybrid.eb --- .../g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb index 781809d07e..7099241376 100644 --- a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb +++ b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb @@ -1,15 +1,16 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Copyright:: Copyright 2012-2013 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University -# Authors:: Wiktor Jurkowski , Fotis Georgatos , \ -# George Tsouloupas , Kenneth Hoste +# Copyright:: Copyright 2012-2016 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University +# Authors:: +# * Wiktor Jurkowski +# * Fotis Georgatos +# * George Tsouloupas +# * Kenneth Hoste +# * Adam Huffman # License:: MIT/GPL # $Id$ # -# This work implements a part of the HPCBIOS project and is a component of the policy: -# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-93.html -# # Version 5.1.4 # Author: Adam Huffman # The Francis Crick Institute -- GitLab From b28335ce41287d21dde927f34484327f1a9284e4 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Mon, 7 Nov 2016 18:28:45 +0100 Subject: [PATCH 565/741] Added "The Francis Crick Institute" to the Copyright notice. --- .../easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb index 7099241376..be709c1c8d 100644 --- a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb +++ b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb @@ -1,7 +1,7 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Copyright:: Copyright 2012-2016 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University +# Copyright:: Copyright 2012-2016 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University / The Francis Crick Institute # Authors:: # * Wiktor Jurkowski # * Fotis Georgatos @@ -9,7 +9,6 @@ # * Kenneth Hoste # * Adam Huffman # License:: MIT/GPL -# $Id$ # # Version 5.1.4 # Author: Adam Huffman -- GitLab From 5665f85dfa683bc64efbafc95e0a376737ac2945 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 7 Nov 2016 20:01:51 +0100 Subject: [PATCH 566/741] adding easyconfigs: Rust-1.12.1-foss-2016b.eb --- .../r/Rust/Rust-1.12.1-foss-2016b.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/r/Rust/Rust-1.12.1-foss-2016b.eb diff --git a/easybuild/easyconfigs/r/Rust/Rust-1.12.1-foss-2016b.eb b/easybuild/easyconfigs/r/Rust/Rust-1.12.1-foss-2016b.eb new file mode 100644 index 0000000000..a06ae54597 --- /dev/null +++ b/easybuild/easyconfigs/r/Rust/Rust-1.12.1-foss-2016b.eb @@ -0,0 +1,22 @@ +easyblock = 'ConfigureMake' + +name = 'Rust' +version = '1.12.1' + +homepage = 'https://www.rust-lang.org' +description = """Rust is a systems programming language that runs blazingly fast, prevents segfaults, + and guarantees thread safety.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://static.rust-lang.org/dist/'] +sources = ['rustc-%(version)s-src.tar.gz'] + +builddependencies = [('Python', '2.7.12'), ('CMake','3.6.2')] + +sanity_check_paths = { + 'files': ['bin/rustc', 'bin/rustdoc'], + 'dirs': ['share/doc', 'share/man', 'lib/rustlib'], +} + +moduleclass = 'lang' -- GitLab From 150f6d9c3ba5bac58b58fefe5cb30c3878acc10e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 7 Nov 2016 20:18:00 +0100 Subject: [PATCH 567/741] adding easyconfigs: Cargo-0.1.0-foss-2016b.eb --- .../c/Cargo/Cargo-0.1.0-foss-2016b.eb | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 easybuild/easyconfigs/c/Cargo/Cargo-0.1.0-foss-2016b.eb diff --git a/easybuild/easyconfigs/c/Cargo/Cargo-0.1.0-foss-2016b.eb b/easybuild/easyconfigs/c/Cargo/Cargo-0.1.0-foss-2016b.eb new file mode 100644 index 0000000000..70ed1ad009 --- /dev/null +++ b/easybuild/easyconfigs/c/Cargo/Cargo-0.1.0-foss-2016b.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'Cargo' +version = '0.1.0' + +homepage = 'https://crates.io/' +description = "The Rust package manager" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/rust-lang/cargo/archive/'] +sources = ['%(version)s.tar.gz'] + +dependencies = [ + ('Rust', '1.12.1'), +] +builddependencies = [ + ('CMake', '3.6.2'), + ('Python', '2.7.12'), + ('cURL', '7.49.1'), +] + +buildopts = 'VERBOSE=1' + +sanity_check_paths = { + 'files': [], + 'dirs': [], +} + +moduleclass = 'tools' -- GitLab From 3a7f2c437178482b5507070d818fbba0cc0d267b Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Tue, 8 Nov 2016 02:05:17 +0100 Subject: [PATCH 568/741] add easyconfig BEDOPS-2.4.20.eb --- .../easyconfigs/b/BEDOPS/BEDOPS-2.4.20.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/b/BEDOPS/BEDOPS-2.4.20.eb diff --git a/easybuild/easyconfigs/b/BEDOPS/BEDOPS-2.4.20.eb b/easybuild/easyconfigs/b/BEDOPS/BEDOPS-2.4.20.eb new file mode 100644 index 0000000000..7bbeac455b --- /dev/null +++ b/easybuild/easyconfigs/b/BEDOPS/BEDOPS-2.4.20.eb @@ -0,0 +1,27 @@ +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'Tarball' + +name = 'BEDOPS' +version = '2.4.20' + +homepage = 'http://bedops.readthedocs.io/en/latest/index.html' +description = """BEDOPS is an open-source command-line toolkit that performs highly efficient + and scalable Boolean and other set operations, statistical calculations, archiving, conversion + and other management of genomic data of arbitrary scale. Tasks can be easily split by chromosome + for distributing whole-genome analyses across a computational cluster.""" + +toolchain = {'version': 'dummy', 'name': 'dummy'} + +sources = ['%(namelower)s_linux_x86_64-v%(version)s.v2.tar.bz2'] +source_urls = ['https://github.com/%(namelower)s/%(namelower)s/releases/download/v%(version)s/'] + +sanity_check_paths = { + 'files': ['bam2bed', '%(namelower)s', 'convert2bed', 'unstarch'], + 'dirs': ['.'], +} + +modextrapaths = {'PATH': ''} + +moduleclass = 'bio' -- GitLab From cb725b78d26afae7124c32f260af01d3b18ad189 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 8 Nov 2016 10:12:21 +0400 Subject: [PATCH 569/741] cleaning up configs --- .../easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb | 2 +- .../{CondaCreate => Conda}/condacreate-1.0.eb | 6 +++--- .../c/{CondaEnv => Conda}/condaenv-1.0.eb | 19 ++++++------------- .../c/{CondaEnv => Conda}/environment.yml | 0 4 files changed, 10 insertions(+), 17 deletions(-) rename easybuild/easyconfigs/c/{CondaCreate => Conda}/condacreate-1.0.eb (91%) rename easybuild/easyconfigs/c/{CondaEnv => Conda}/condaenv-1.0.eb (53%) rename easybuild/easyconfigs/c/{CondaEnv => Conda}/environment.yml (100%) diff --git a/easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb b/easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb index b5ffaf0935..95588e5f7a 100644 --- a/easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda/Anaconda2.4.0.0.eb @@ -14,6 +14,6 @@ toolchain = {'name': 'dummy', 'version': 'dummy'} source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] -checksums = ['31ed3ef07435d7068e1e03be49381b13' ] +#checksums = ['31ed3ef07435d7068e1e03be49381b13' ] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb b/easybuild/easyconfigs/c/Conda/condacreate-1.0.eb similarity index 91% rename from easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb rename to easybuild/easyconfigs/c/Conda/condacreate-1.0.eb index 378b53a6e2..8ee91dee6b 100644 --- a/easybuild/easyconfigs/c/CondaCreate/condacreate-1.0.eb +++ b/easybuild/easyconfigs/c/Conda/condacreate-1.0.eb @@ -10,9 +10,9 @@ # http://apps.fz-juelich.de/unite/ ## -easyblock = 'EB_CondaCreate' +easyblock = 'EB_Conda' -name = "condacreate-module" +name = "perl-app-cpanminus" version = "1.0" variant = "Linux-x86_64" @@ -31,7 +31,7 @@ requirements = "perl-app-cpanminus" channels = 'bioconda' post_install_cmd = "cpanm --notest ExtUtils::MakeMaker" -builddependencies = [('anaconda', '2-4.0.0')] +builddependencies = [('Anaconda3', '4.0.0')] sanity_check_paths = { 'files': ['bin/cpanm', 'bin/perl'], diff --git a/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb b/easybuild/easyconfigs/c/Conda/condaenv-1.0.eb similarity index 53% rename from easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb rename to easybuild/easyconfigs/c/Conda/condaenv-1.0.eb index ca01537d2c..f6048caf0e 100644 --- a/easybuild/easyconfigs/c/CondaEnv/condaenv-1.0.eb +++ b/easybuild/easyconfigs/c/Conda/condaenv-1.0.eb @@ -10,31 +10,24 @@ # http://apps.fz-juelich.de/unite/ ## -easyblock = 'EB_CondaEnv' +easyblock = 'EB_Conda' -name = "condaenv-module" +name = "gencore_variant_detection" version = "1.0" variant = "Linux-x86_64" -homepage = "https://github.com/bioconda/bioconda-recipes" -description = """ Conda is a platform- and - language-independent package manager that sports - easy distribution, installation and version - management of software. The bioconda channel is a - Conda channel providing bioinformatics related - packages. This repository hosts the corresponding - recipes. """ +homepage = "https://nyuad-cgsb.github.io/variant_detection/public/index.html" +description = """ This is a bundled install of many software packages for doing variant detection analysis. """ toolchain = {'name': 'dummy', 'version': 'dummy'} -builddependencies = [('anaconda', '2-4.0.0')] +builddependencies = [('Anaconda3', '4.0.0')] #Use one of the following - either an environment.yml file or a remote environment definition #sources = ["environment.yml"] -#It is not necessary to specify your environment_file unless it is named something besides environment.yml #environment_file = sources[0] -remote_environment = "jerowe/gencore_python_1.0" +remote_environment = "nyuad-cgsb/gencore_variant_detection_1.0" sanity_check_paths = { 'files': ["bin/conda"], diff --git a/easybuild/easyconfigs/c/CondaEnv/environment.yml b/easybuild/easyconfigs/c/Conda/environment.yml similarity index 100% rename from easybuild/easyconfigs/c/CondaEnv/environment.yml rename to easybuild/easyconfigs/c/Conda/environment.yml -- GitLab From 9aa42c2fa654c9bce69cc543f1fd8344424da471 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 8 Nov 2016 10:16:58 +0400 Subject: [PATCH 570/741] round 2 cleanup --- .../{condaenv-1.0.eb => gencore_variant_detection-1.0.eb} | 0 .../{condacreate-1.0.eb => perl-app-cpanminus-1.7039.eb} | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) rename easybuild/easyconfigs/c/Conda/{condaenv-1.0.eb => gencore_variant_detection-1.0.eb} (100%) rename easybuild/easyconfigs/c/Conda/{condacreate-1.0.eb => perl-app-cpanminus-1.7039.eb} (88%) diff --git a/easybuild/easyconfigs/c/Conda/condaenv-1.0.eb b/easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb similarity index 100% rename from easybuild/easyconfigs/c/Conda/condaenv-1.0.eb rename to easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb diff --git a/easybuild/easyconfigs/c/Conda/condacreate-1.0.eb b/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb similarity index 88% rename from easybuild/easyconfigs/c/Conda/condacreate-1.0.eb rename to easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb index dff22de272..9e876ada58 100644 --- a/easybuild/easyconfigs/c/Conda/condacreate-1.0.eb +++ b/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb @@ -13,7 +13,7 @@ easyblock = 'EB_Conda' name = "perl-app-cpanminus" -version = "1.0" +version = "1.7039" variant = "Linux-x86_64" homepage = "https://github.com/bioconda/bioconda-recipes" @@ -27,9 +27,9 @@ description = """ Conda is a platform- and toolchain = {'name': 'dummy', 'version': ''} -requirements = "perl-app-cpanminus" -channels = 'bioconda' -post_install_cmd = "cpanm --notest ExtUtils::MakeMaker" +requirements = "perl-app-cpanminus=1.7039" +channels = ['bioconda'] +installopts = "&& cpanm --notest ExtUtils::MakeMaker" builddependencies = [('Anaconda2', '4.0.0')] -- GitLab From c88b6676d0b831d4e2b653cd566afa1bb9e32e31 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 8 Nov 2016 10:25:28 +0400 Subject: [PATCH 571/741] example of installopts with anaconda and conda configs --- easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb | 2 ++ easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb index 95588e5f7a..e44fcc0777 100644 --- a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb @@ -15,5 +15,7 @@ toolchain = {'name': 'dummy', 'version': 'dummy'} source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] #checksums = ['31ed3ef07435d7068e1e03be49381b13' ] +# +installopts = " && conda install -y conda " #Update conda on install moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb index 9d77e1debf..783a19b6e6 100644 --- a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb @@ -16,4 +16,6 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['546d1f02597587c685fa890c1d713b51'] +installopts = " && conda install -y conda " #Update conda on install + moduleclass = 'lang' -- GitLab From 31fdff232fc1884f5c746ef3ef34f9b6060d3195 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 8 Nov 2016 12:33:31 +0400 Subject: [PATCH 572/741] fixing anaconda easyblock --- easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb index e44fcc0777..7f580ea182 100644 --- a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb @@ -14,8 +14,6 @@ toolchain = {'name': 'dummy', 'version': 'dummy'} source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] -#checksums = ['31ed3ef07435d7068e1e03be49381b13' ] -# -installopts = " && conda install -y conda " #Update conda on install +checksums = ['31ed3ef07435d7068e1e03be49381b13'] moduleclass = 'lang' -- GitLab From a2727e034b076f9da82757cc9292ad7e8cfe4a3c Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 8 Nov 2016 12:35:14 +0400 Subject: [PATCH 573/741] updating perl-app-cpanminus --- .../easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb b/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb index 9e876ada58..7c8ca89f0d 100644 --- a/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb +++ b/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb @@ -16,14 +16,8 @@ name = "perl-app-cpanminus" version = "1.7039" variant = "Linux-x86_64" -homepage = "https://github.com/bioconda/bioconda-recipes" -description = """ Conda is a platform- and - language-independent package manager that sports - easy distribution, installation and version - management of software. The bioconda channel is a - Conda channel providing bioinformatics related - packages. This repository hosts the corresponding - recipes. """ +homepage = "http://search.cpan.org/~miyagawa/Menlo-1.9003/script/cpanm-menlo" +description = """ cpanm - get, unpack build and install modules from CPAN """ toolchain = {'name': 'dummy', 'version': ''} -- GitLab From f3d473ec98518e0a1a66f4b0dae54d0da6fbc1f7 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 8 Nov 2016 12:35:57 +0400 Subject: [PATCH 574/741] updating perl-app-cpanminus --- easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb b/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb index 7c8ca89f0d..c89b4f646e 100644 --- a/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb +++ b/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb @@ -21,7 +21,7 @@ description = """ cpanm - get, unpack build and install modules from CPAN """ toolchain = {'name': 'dummy', 'version': ''} -requirements = "perl-app-cpanminus=1.7039" +requirements = "%(name)s=%(version)s" channels = ['bioconda'] installopts = "&& cpanm --notest ExtUtils::MakeMaker" -- GitLab From 9625a60e072b50815e2e36dbd3276c5023e8b9a5 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 8 Nov 2016 12:43:31 +0400 Subject: [PATCH 575/741] still cleaning --- easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb b/easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb index f6048caf0e..9cf70a3ec4 100644 --- a/easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb +++ b/easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb @@ -27,7 +27,8 @@ builddependencies = [('Anaconda3', '4.0.0')] #sources = ["environment.yml"] #environment_file = sources[0] -remote_environment = "nyuad-cgsb/gencore_variant_detection_1.0" +#remote_environment = "nyuad-cgsb/gencore_variant_detection_1.0" +remote_environment = "nyuad-cgsb/%(name)s_%(version)s" sanity_check_paths = { 'files': ["bin/conda"], -- GitLab From 2e092b2b2025191b3810f80e2bb8132fa1710bbd Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 8 Nov 2016 12:51:02 +0400 Subject: [PATCH 576/741] more cleanup --- easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb | 2 -- easybuild/easyconfigs/c/Conda/environment.yml | 5 ----- .../gencore_variant_detection-1.0.eb | 0 .../perl_app_cpanminus}/perl-app-cpanminus-1.7039.eb | 1 - 4 files changed, 8 deletions(-) delete mode 100644 easybuild/easyconfigs/c/Conda/environment.yml rename easybuild/easyconfigs/{c/Conda => g/gencore_variant_detection}/gencore_variant_detection-1.0.eb (100%) rename easybuild/easyconfigs/{c/Conda => p/perl_app_cpanminus}/perl-app-cpanminus-1.7039.eb (94%) diff --git a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb index 783a19b6e6..9d77e1debf 100644 --- a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb @@ -16,6 +16,4 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['546d1f02597587c685fa890c1d713b51'] -installopts = " && conda install -y conda " #Update conda on install - moduleclass = 'lang' diff --git a/easybuild/easyconfigs/c/Conda/environment.yml b/easybuild/easyconfigs/c/Conda/environment.yml deleted file mode 100644 index d98bf281fe..0000000000 --- a/easybuild/easyconfigs/c/Conda/environment.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: variant_test -channels: - - bioconda -dependencies: - - samtools=1.3.1 diff --git a/easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb similarity index 100% rename from easybuild/easyconfigs/c/Conda/gencore_variant_detection-1.0.eb rename to easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb diff --git a/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb b/easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb similarity index 94% rename from easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb rename to easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb index c89b4f646e..52ac06d71d 100644 --- a/easybuild/easyconfigs/c/Conda/perl-app-cpanminus-1.7039.eb +++ b/easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb @@ -23,7 +23,6 @@ toolchain = {'name': 'dummy', 'version': ''} requirements = "%(name)s=%(version)s" channels = ['bioconda'] -installopts = "&& cpanm --notest ExtUtils::MakeMaker" builddependencies = [('Anaconda2', '4.0.0')] -- GitLab From fdbbc384f7ff9df9b2e75c9a6cc6309a75289e1e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 8 Nov 2016 10:12:22 +0100 Subject: [PATCH 577/741] use http mirror, add checksums + style fixes in InterProScan easyconfig --- .../InterProScan-5.21-60.0-intel-2015b.eb | 27 +++++++++++++------ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/easybuild/easyconfigs/i/InterProScan/InterProScan-5.21-60.0-intel-2015b.eb b/easybuild/easyconfigs/i/InterProScan/InterProScan-5.21-60.0-intel-2015b.eb index 1169ea8d18..2388f28009 100644 --- a/easybuild/easyconfigs/i/InterProScan/InterProScan-5.21-60.0-intel-2015b.eb +++ b/easybuild/easyconfigs/i/InterProScan/InterProScan-5.21-60.0-intel-2015b.eb @@ -9,9 +9,18 @@ description = """InterProScan is a sequence analysis application (nucleotide and toolchain = {'name': 'intel', 'version': '2015b'} -source_urls = ['http://ftp.ebi.ac.uk/pub/software/unix/iprscan/%(version_major)s/%(version)s/', - 'ftp://ftp.ebi.ac.uk/pub/databases/interpro/iprscan/5/bin/'] -sources = ['%(namelower)s-%(version)s-64-bit.tar.gz', 'sfld_binary.zip'] +source_urls = [ + 'http://ftp.ebi.ac.uk/pub/software/unix/iprscan/%(version_major)s/%(version)s/', + 'http://ftp.ebi.ac.uk/pub/databases/interpro/iprscan/5/bin/', +] +sources = [ + '%(namelower)s-%(version)s-64-bit.tar.gz', + 'sfld_binary.zip', +] +checksums = [ + '8090ff00ba75bce1383a257ff2b8d196', + '17ff8224789b9f35dd9304dcb7dc6a68', +] dependencies = [ ('Java', '1.7.0_80', '', True), @@ -20,14 +29,16 @@ dependencies = [ ('Python', '2.7.10'), ] +# Workaround required for CentOS 6 systems. Details here: +# https://github.com/ebi-pf-team/interproscan/issues/16 +postinstallcmds = [ + "cp -f %(builddir)s/sfld_postprocess %(installdir)s/bin/sfld/", + "cp -f %(builddir)s/sfld_preprocess %(installdir)s/bin/sfld/", +] + sanity_check_paths = { 'files': ['interproscan-%(version_major)s.jar', 'interproscan.sh', 'interproscan.properties'], 'dirs': ['bin', 'lib', 'data'], } -# Workaround required for CentOS 6 systems. Details here: -# https://github.com/ebi-pf-team/interproscan/issues/16 -postinstallcmds = ['cp -f %(builddir)s/sfld_postprocess %(installdir)s/bin/sfld/', - 'cp -f %(builddir)s/sfld_preprocess %(installdir)s/bin/sfld/'] - moduleclass = 'bio' -- GitLab From 2ee3ba017602fd2296c59a2938379625cf14c4af Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 8 Nov 2016 12:10:16 +0100 Subject: [PATCH 578/741] bump version to 0.13.0, also put rust-installer in place --- .../c/Cargo/Cargo-0.13.0-foss-2016b.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb diff --git a/easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb b/easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb new file mode 100644 index 0000000000..d05303a090 --- /dev/null +++ b/easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb @@ -0,0 +1,38 @@ +easyblock = 'ConfigureMake' + +name = 'Cargo' +version = '0.13.0' + +homepage = 'https://crates.io/' +description = "The Rust package manager" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [ + 'https://github.com/rust-lang/cargo/archive/', + 'https://github.com/rust-lang/rust-installer/archive/', +] +sources = [ + '%(version)s.tar.gz', + '4f99485.tar.gz', # rust-installer +] + +dependencies = [ + ('Rust', '1.12.1'), +] +builddependencies = [ + ('CMake', '3.6.2'), + ('Python', '2.7.12'), + ('cURL', '7.49.1'), +] + +buildopts = 'VERBOSE=1' +# rust-installer is a git submodule, but not included in the sources pulled from GitHub +preinstallopts = "cp -a %(builddir)s/rust-installer*/* %(builddir)s/cargo-%(version)s/src/rust-installer && " + +sanity_check_paths = { + 'files': ['bin/cargo'], + 'dirs': ['etc', 'lib/rustlib', 'share'], +} + +moduleclass = 'tools' -- GitLab From 8a5936b4a877f8a1eda13a70a160426cf75cbb43 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 8 Nov 2016 12:25:15 +0100 Subject: [PATCH 579/741] also patch value for WM_PROJECT_VERSION in etc/bashrc and etc/cshrc for OpenFOAM 3.0.1 --- .../o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch index 335b44903b..9111c18ae3 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1_cleanup.patch @@ -44,6 +44,28 @@ diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/applications/utilities/postProcessing wmake libso vtkPV4Readers PV4blockMeshReader/Allwmake +--- OpenFOAM-3.0.x-version-3.0.1.orig/etc/bashrc 2016-11-08 12:21:21.478604080 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/etc/bashrc 2016-11-08 12:21:27.978572000 +0100 +@@ -32,7 +32,7 @@ + #------------------------------------------------------------------------------ + + export WM_PROJECT=OpenFOAM +-export WM_PROJECT_VERSION=3.0.x ++export WM_PROJECT_VERSION=3.0.1 + + ################################################################################ + # USER EDITABLE PART: Changes made here may be lost with the next upgrade +--- OpenFOAM-3.0.x-version-3.0.1.orig/etc/cshrc 2016-11-08 12:21:43.478604102 +0100 ++++ OpenFOAM-3.0.x-version-3.0.1/etc/cshrc 2016-11-08 12:21:50.258390000 +0100 +@@ -31,7 +31,7 @@ + #------------------------------------------------------------------------------ + + setenv WM_PROJECT OpenFOAM +-setenv WM_PROJECT_VERSION 3.0.x ++setenv WM_PROJECT_VERSION 3.0.1 + + ################################################################################ + # USER EDITABLE PART: Changes made here may be lost with the next upgrade diff -ru OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/CGAL.sh OpenFOAM-3.0.x-version-3.0.1/etc/config/CGAL.sh --- OpenFOAM-3.0.x-version-3.0.1.orig/etc/config/CGAL.sh 2015-12-15 12:20:08.000000000 +0100 +++ OpenFOAM-3.0.x-version-3.0.1/etc/config/CGAL.sh 2016-10-25 12:04:22.000000000 +0200 -- GitLab From 9f3d0746bbb15b3cdc971b241c728611834e2011 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 8 Nov 2016 12:29:33 +0100 Subject: [PATCH 580/741] remove easyconfig for ancient Cargo version --- .../c/Cargo/Cargo-0.1.0-foss-2016b.eb | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 easybuild/easyconfigs/c/Cargo/Cargo-0.1.0-foss-2016b.eb diff --git a/easybuild/easyconfigs/c/Cargo/Cargo-0.1.0-foss-2016b.eb b/easybuild/easyconfigs/c/Cargo/Cargo-0.1.0-foss-2016b.eb deleted file mode 100644 index 70ed1ad009..0000000000 --- a/easybuild/easyconfigs/c/Cargo/Cargo-0.1.0-foss-2016b.eb +++ /dev/null @@ -1,30 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'Cargo' -version = '0.1.0' - -homepage = 'https://crates.io/' -description = "The Rust package manager" - -toolchain = {'name': 'foss', 'version': '2016b'} - -source_urls = ['https://github.com/rust-lang/cargo/archive/'] -sources = ['%(version)s.tar.gz'] - -dependencies = [ - ('Rust', '1.12.1'), -] -builddependencies = [ - ('CMake', '3.6.2'), - ('Python', '2.7.12'), - ('cURL', '7.49.1'), -] - -buildopts = 'VERBOSE=1' - -sanity_check_paths = { - 'files': [], - 'dirs': [], -} - -moduleclass = 'tools' -- GitLab From db3ec68d8733f0ee32c7ae8f20d1acd0b01619d1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 8 Nov 2016 13:59:13 +0100 Subject: [PATCH 581/741] add pointer to upstream issue for rust-installer problem --- easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb b/easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb index d05303a090..fc872af329 100644 --- a/easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb +++ b/easybuild/easyconfigs/c/Cargo/Cargo-0.13.0-foss-2016b.eb @@ -28,6 +28,7 @@ builddependencies = [ buildopts = 'VERBOSE=1' # rust-installer is a git submodule, but not included in the sources pulled from GitHub +# see also https://github.com/rust-lang/cargo/issues/2130 preinstallopts = "cp -a %(builddir)s/rust-installer*/* %(builddir)s/cargo-%(version)s/src/rust-installer && " sanity_check_paths = { -- GitLab From ec3621857cd7ddb068e78f7e40c3133ba881759d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 8 Nov 2016 14:59:30 +0100 Subject: [PATCH 582/741] stick to flex 2.5.39 with OpenFOAM 3.0.1, it is not compatible with flex 2.6.0 yet --- .../easyconfigs/f/flex/flex-2.5.39-intel-2016b.eb | 14 ++++++++++++++ .../o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016b.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016b.eb new file mode 100644 index 0000000000..d599b0583d --- /dev/null +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2016b.eb @@ -0,0 +1,14 @@ +name = 'flex' +version = '2.5.39' + +homepage = 'http://flex.sourceforge.net/' +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, + sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb index e27c7e7895..065d8bedfb 100644 --- a/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb +++ b/easybuild/easyconfigs/o/OpenFOAM/OpenFOAM-3.0.1-intel-2016b.eb @@ -30,7 +30,7 @@ dependencies = [ builddependencies = [ ('Bison', '3.0.4'), ('CMake', '3.6.1'), - ('flex', '2.6.0'), + ('flex', '2.5.39'), ] moduleclass = 'cae' -- GitLab From e43d00a903658298da32fe325f6fd4ae75d0bd34 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 8 Nov 2016 15:14:21 +0100 Subject: [PATCH 583/741] adding easyconfigs: flex-2.6.2-intel-2016b.eb, help2man-1.47.4-intel-2016b.eb --- .../f/flex/flex-2.6.2-intel-2016b.eb | 22 +++++++++++++++++++ .../h/help2man/help2man-1.47.4-intel-2016b.eb | 19 ++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 easybuild/easyconfigs/f/flex/flex-2.6.2-intel-2016b.eb create mode 100644 easybuild/easyconfigs/h/help2man/help2man-1.47.4-intel-2016b.eb diff --git a/easybuild/easyconfigs/f/flex/flex-2.6.2-intel-2016b.eb b/easybuild/easyconfigs/f/flex/flex-2.6.2-intel-2016b.eb new file mode 100644 index 0000000000..ac6504cacf --- /dev/null +++ b/easybuild/easyconfigs/f/flex/flex-2.6.2-intel-2016b.eb @@ -0,0 +1,22 @@ +name = 'flex' +version = '2.6.2' + +homepage = 'http://flex.sourceforge.net/' +description = """Flex (Fast Lexical Analyzer) is a tool for generating scanners. A scanner, + sometimes called a tokenizer, is a program which recognizes lexical patterns in text.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['https://github.com/westes/flex/releases/download/v%(version)s/'] + +checksums = ['cc6d76c333db7653d5caf423a3335239'] + +dependencies = [('M4', '1.4.17')] +builddependencies = [ + ('Bison', '3.0.4'), + ('help2man', '1.47.4'), +] + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/h/help2man/help2man-1.47.4-intel-2016b.eb b/easybuild/easyconfigs/h/help2man/help2man-1.47.4-intel-2016b.eb new file mode 100644 index 0000000000..53cf30b69c --- /dev/null +++ b/easybuild/easyconfigs/h/help2man/help2man-1.47.4-intel-2016b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'help2man' +version = '1.47.4' + +homepage = 'https://www.gnu.org/software/help2man/' +description = """help2man produces simple manual pages from the '--help' and '--version' output of other commands.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [GNU_SOURCE] +sources = [SOURCE_TAR_XZ] + +sanity_check_paths = { + 'files': ['bin/help2man'], + 'dirs': [], +} + +moduleclass = 'tools' -- GitLab From 6e20a17bed9a0f34a248ae504fc4039d4c98f09e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 9 Nov 2016 11:49:21 +0100 Subject: [PATCH 584/741] adding easyconfigs: Gurobi-6.5.2.eb, Gurobi-7.0.1.eb --- easybuild/easyconfigs/g/Gurobi/Gurobi-6.5.2.eb | 18 ++++++++++++++++++ easybuild/easyconfigs/g/Gurobi/Gurobi-7.0.1.eb | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/g/Gurobi/Gurobi-6.5.2.eb create mode 100644 easybuild/easyconfigs/g/Gurobi/Gurobi-7.0.1.eb diff --git a/easybuild/easyconfigs/g/Gurobi/Gurobi-6.5.2.eb b/easybuild/easyconfigs/g/Gurobi/Gurobi-6.5.2.eb new file mode 100644 index 0000000000..fdd1e676ca --- /dev/null +++ b/easybuild/easyconfigs/g/Gurobi/Gurobi-6.5.2.eb @@ -0,0 +1,18 @@ +name = 'Gurobi' +version = '6.5.2' + +homepage = 'http://www.gurobi.com' +description = """The Gurobi Optimizer is a state-of-the-art solver for mathematical programming. +The solvers in the Gurobi Optimizer were designed from the ground up to exploit modern +architectures and multi-core processors, using the most advanced implementations of the +latest algorithms.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +# registration is required +# source_urls = ['http://www.gurobi.com/downloads/user/gurobi-optimizer'] +sources = ['%(namelower)s%(version)s_linux64.tar.gz'] + +license_file = HOME + '/licenses/%(name)s/%(namelower)s.lic' + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/g/Gurobi/Gurobi-7.0.1.eb b/easybuild/easyconfigs/g/Gurobi/Gurobi-7.0.1.eb new file mode 100644 index 0000000000..758e95aed3 --- /dev/null +++ b/easybuild/easyconfigs/g/Gurobi/Gurobi-7.0.1.eb @@ -0,0 +1,18 @@ +name = 'Gurobi' +version = '7.0.1' + +homepage = 'http://www.gurobi.com' +description = """The Gurobi Optimizer is a state-of-the-art solver for mathematical programming. +The solvers in the Gurobi Optimizer were designed from the ground up to exploit modern +architectures and multi-core processors, using the most advanced implementations of the +latest algorithms.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +# registration is required +# source_urls = ['http://www.gurobi.com/downloads/user/gurobi-optimizer'] +sources = ['%(namelower)s%(version)s_linux64.tar.gz'] + +license_file = HOME + '/licenses/%(name)s/%(namelower)s.lic' + +moduleclass = 'math' -- GitLab From ac0a0befaf904d69d369768fdd9407b651fe849e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Wed, 9 Nov 2016 12:54:09 +0100 Subject: [PATCH 585/741] SPAdes 3.9.0 with foss 2016a --- .../s/SPAdes/SPAdes-3.9.0-foss-2016a.eb | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 easybuild/easyconfigs/s/SPAdes/SPAdes-3.9.0-foss-2016a.eb diff --git a/easybuild/easyconfigs/s/SPAdes/SPAdes-3.9.0-foss-2016a.eb b/easybuild/easyconfigs/s/SPAdes/SPAdes-3.9.0-foss-2016a.eb new file mode 100644 index 0000000000..af3845c60d --- /dev/null +++ b/easybuild/easyconfigs/s/SPAdes/SPAdes-3.9.0-foss-2016a.eb @@ -0,0 +1,44 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics +# 3.9.0: +# Modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = "CMakeMake" + +name = 'SPAdes' +version = '3.9.0' + +homepage = 'http://bioinf.spbau.ru/en/spades' +description = """Genome assembler for single-cell and isolates data sets""" + +toolchain = {'name': 'foss', 'version': '2016a'} + +source_urls = ['http://spades.bioinf.spbau.ru/release%(version)s/'] +sources = [SOURCE_TAR_GZ] + +builddependencies = [('CMake', '3.5.2')] + +dependencies = [ + ('zlib', '1.2.8'), + ('bzip2', '1.0.6'), +] + +start_dir = 'src' + +separate_build_dir = True + +configopts = ' -DBoost_NO_BOOST_CMAKE=ON' + +sanity_check_commands = [('spades.py', '--test')] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["bwa-spades", "dipspades", "dipspades.py", + "hammer", "ionhammer", "spades", "spades.py"]], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 7ad3c0ac69aeec873d5f7fc9ed299a85b6dffc9a Mon Sep 17 00:00:00 2001 From: Ole Holm Nielsen Date: Wed, 9 Nov 2016 13:24:41 +0100 Subject: [PATCH 586/741] iomkl toolchain with GCC-5.4.0-2.26 and OpenMPI 1.10.3 --- ...11.3.3.210-iompi-2016.09-GCC-5.4.0-2.26.eb | 36 +++++++++++++++++++ .../i/iomkl/iomkl-2016.09-GCC-5.4.0-2.26.eb | 20 +++++++++++ .../i/iompi/iompi-2016.09-GCC-5.4.0-2.26.eb | 20 +++++++++++ 3 files changed, 76 insertions(+) create mode 100644 easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..4739cbc290 --- /dev/null +++ b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iompi-2016.09-GCC-5.4.0-2.26.eb @@ -0,0 +1,36 @@ +name = 'imkl' +version = '11.3.3.210' + +homepage = 'http://software.intel.com/en-us/intel-mkl/' +description = """Intel Math Kernel Library is a library of highly optimized, + extensively threaded math routines for science, engineering, and financial + applications that require maximum performance. Core math functions include + BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" + +toolchain = {'name': 'iompi', 'version': '2016.09-GCC-5.4.0-2.26'} + +sources = ['l_mkl_%(version)s.tgz'] +checksums = ['f72546df27f5ebb0941b5d21fd804e34'] + +dontcreateinstalldir = 'True' + +components = ['intel-mkl'] + +interfaces = True + +license_file = HOME + '/licenses/intel/license.lic' + +postinstallcmds = [ + # extract the examples + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic.tgz -C %(installdir)s/mkl/examples/' +] + +modextravars = { + 'MKL_EXAMPLES': '%(installdir)s/mkl/examples/', +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..6b0377e8e3 --- /dev/null +++ b/easybuild/easyconfigs/i/iomkl/iomkl-2016.09-GCC-5.4.0-2.26.eb @@ -0,0 +1,20 @@ +easyblock = "Toolchain" + +name = 'iomkl' +version = '2016.09-GCC-5.4.0-2.26' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL & OpenMPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2016.3.210-GCC-5.4.0-2.26' + +dependencies = [ + ('icc', compver), + ('ifort', compver), + ('OpenMPI', '1.10.3', '', ('iccifort', compver)), + ('imkl', '11.3.3.210', '', ('iompi', version)), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..6ab1a7b7d5 --- /dev/null +++ b/easybuild/easyconfigs/i/iompi/iompi-2016.09-GCC-5.4.0-2.26.eb @@ -0,0 +1,20 @@ +easyblock = "Toolchain" + +name = 'iompi' +version = '2016.09-GCC-5.4.0-2.26' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Toolchain with Intel C, C++ and Fortran compilers, alongside OpenMPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2016.3.210-GCC-5.4.0-2.26' + +dependencies = [ + ('OpenMPI', '1.10.3', '', ('iccifort', compver)), + ('icc', compver), + ('ifort', compver), +] + +moduleclass = 'toolchain' + -- GitLab From 5ff21d258552657d968bb1e0db073d32734e51a0 Mon Sep 17 00:00:00 2001 From: Ole Holm Nielsen Date: Wed, 9 Nov 2016 15:59:02 +0100 Subject: [PATCH 587/741] HPL test module for the iomkl-2016.09-GCC-5.4.0-2.26 toolchain --- .../HPL-2.2-iomkl-2016.09-GCC-5.4.0-2.26.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2016.09-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2016.09-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2016.09-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..efda5a282c --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2016.09-GCC-5.4.0-2.26.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-5.4.0-2.26'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' -- GitLab From 2090cf95d5727cdd7f33c4467063e4f4c84e2573 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 10 Nov 2016 13:18:03 +0100 Subject: [PATCH 588/741] update Travis config w.r.t. changes framework config defaults and required Lmod version --- .travis.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1100abe24e..253f7f158c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,16 +2,18 @@ language: python python: 2.6 env: matrix: - - ENV_MOD_VERSION=3.2.10 - - LMOD_VERSION=5.6.3 EASYBUILD_MODULES_TOOL=Lmod - - LMOD_VERSION=6.3.1 EASYBUILD_MODULES_TOOL=Lmod EASYBUILD_MODULE_SYNTAX=Lua + - ENV_MOD_VERSION=3.2.10 EASYBUILD_MODULES_TOOL=EnvironmentModulesC EASYBUILD_MODULE_SYNTAX=Tcl + - LMOD_VERSION=5.8 + - LMOD_VERSION=5.8 EASYBUILD_MODULE_SYNTAX=Lua + - LMOD_VERSION=6.6.2 + - LMOD_VERSION=6.6.2 EASYBUILD_MODULE_SYNTAX=Lua matrix: # mark build as finished as soon as job has failed fast_finish: true include: # also test default configuration with Python 2.7 - python: 2.7 - env: ENV_MOD_VERSION=3.2.10 + env: LMOD_VERSION=5.8 addons: apt: packages: -- GitLab From 42df09c2e4730096cc1d7a63147a1c03347aa25e Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 10 Nov 2016 14:00:22 +0100 Subject: [PATCH 589/741] Rename the top level Intel+CUDA toolchain to intelcuda --- .../i/intelc/{intelc-2016.10.0.eb => intelcuda-2016.10.0.eb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename easybuild/easyconfigs/i/intelc/{intelc-2016.10.0.eb => intelcuda-2016.10.0.eb} (97%) diff --git a/easybuild/easyconfigs/i/intelc/intelc-2016.10.0.eb b/easybuild/easyconfigs/i/intelc/intelcuda-2016.10.0.eb similarity index 97% rename from easybuild/easyconfigs/i/intelc/intelc-2016.10.0.eb rename to easybuild/easyconfigs/i/intelc/intelcuda-2016.10.0.eb index 38a1bb71af..6ba471c5d6 100644 --- a/easybuild/easyconfigs/i/intelc/intelc-2016.10.0.eb +++ b/easybuild/easyconfigs/i/intelc/intelcuda-2016.10.0.eb @@ -1,6 +1,6 @@ easyblock = 'Toolchain' -name = 'intelc' +name = 'intelcuda' version = '2016.10.0' homepage = '(none)' -- GitLab From 1d0c31be46e5810c1f370bc31e07112313582714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 10 Nov 2016 17:09:33 +0100 Subject: [PATCH 590/741] MrBayes 3.2.6 with foss/2016a --- .../m/MrBayes/MrBayes-3.2.6-foss-2016a.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.6-foss-2016a.eb diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.6-foss-2016a.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.6-foss-2016a.eb new file mode 100644 index 0000000000..03307965e4 --- /dev/null +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.6-foss-2016a.eb @@ -0,0 +1,22 @@ +name = 'MrBayes' +version = '3.2.6' + +homepage = 'http://mrbayes.csit.fsu.edu' +description = "MrBayes is a program for the Bayesian estimation of phylogeny." + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'optarch': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ["http://downloads.sourceforge.net/project/mrbayes/mrbayes/%(version)s"] + +dependencies = [ + ('beagle-lib', '2.1.2'), + ('libreadline', '6.3'), +] + +builddependencies = [ + ('Autoconf', '2.69'), +] + +moduleclass = 'bio' -- GitLab From 62624b4d2e3d1906e7902a93ddd4f4cb9de1960d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 10 Nov 2016 20:58:22 +0100 Subject: [PATCH 591/741] add HPL easyconfig for intelcuda toolchain + reversion it to 2016.10 --- .../h/HPL/HPL-2.2-intelcuda-2016.10.eb | 18 ++++++++++++++++++ ...da-2016.10.0.eb => iccifortcuda-2016.10.eb} | 2 +- .../{iimpic-2016.10.0.eb => iimpic-2016.10.eb} | 2 +- ....0.eb => imkl-11.3.3.210-iimpic-2016.10.eb} | 2 +- ... => impi-5.1.3.181-iccifortcuda-2016.10.eb} | 2 +- .../intelcuda-2016.10.eb} | 2 +- 6 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-intelcuda-2016.10.eb rename easybuild/easyconfigs/i/iccifortcuda/{iccifortcuda-2016.10.0.eb => iccifortcuda-2016.10.eb} (96%) rename easybuild/easyconfigs/i/iimpic/{iimpic-2016.10.0.eb => iimpic-2016.10.eb} (96%) rename easybuild/easyconfigs/i/imkl/{imkl-11.3.3.210-iimpic-2016.10.0.eb => imkl-11.3.3.210-iimpic-2016.10.eb} (96%) rename easybuild/easyconfigs/i/impi/{impi-5.1.3.181-iccifortcuda-2016.10.0.eb => impi-5.1.3.181-iccifortcuda-2016.10.eb} (95%) rename easybuild/easyconfigs/i/{intelc/intelcuda-2016.10.0.eb => intelcuda/intelcuda-2016.10.eb} (97%) diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-intelcuda-2016.10.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-intelcuda-2016.10.eb new file mode 100644 index 0000000000..05f316bde4 --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-intelcuda-2016.10.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'intelcuda', 'version': '2016.10'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.0.eb b/easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.eb similarity index 96% rename from easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.0.eb rename to easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.eb index 5e070ddc7c..1eeb749c6e 100644 --- a/easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.0.eb +++ b/easybuild/easyconfigs/i/iccifortcuda/iccifortcuda-2016.10.eb @@ -1,7 +1,7 @@ easyblock = 'Toolchain' name = 'iccifortcuda' -version = '2016.10.0' +version = '2016.10' homepage = '(none)' description = """Intel Cluster Toolkit Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MPI & Intel MKL, with CUDA toolkit""" diff --git a/easybuild/easyconfigs/i/iimpic/iimpic-2016.10.0.eb b/easybuild/easyconfigs/i/iimpic/iimpic-2016.10.eb similarity index 96% rename from easybuild/easyconfigs/i/iimpic/iimpic-2016.10.0.eb rename to easybuild/easyconfigs/i/iimpic/iimpic-2016.10.eb index 7e4dd19038..33bf002bbf 100644 --- a/easybuild/easyconfigs/i/iimpic/iimpic-2016.10.0.eb +++ b/easybuild/easyconfigs/i/iimpic/iimpic-2016.10.eb @@ -2,7 +2,7 @@ easyblock = "Toolchain" name = 'iimpic' -version = '2016.10.0' +version = '2016.10' homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" diff --git a/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.0.eb b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.eb similarity index 96% rename from easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.0.eb rename to easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.eb index 60d2bc76e1..601460577a 100644 --- a/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.0.eb +++ b/easybuild/easyconfigs/i/imkl/imkl-11.3.3.210-iimpic-2016.10.eb @@ -9,7 +9,7 @@ description = """Intel Math Kernel Library is a library of highly optimized, applications that require maximum performance. Core math functions include BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" -toolchain = {'name': 'iimpic', 'version': '2016.10.0'} +toolchain = {'name': 'iimpic', 'version': '2016.10'} sources = ['l_mkl_%(version)s.tgz'] checksums = ['f72546df27f5ebb0941b5d21fd804e34'] diff --git a/easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.0.eb b/easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.eb similarity index 95% rename from easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.0.eb rename to easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.eb index 0a845c6fbc..292b8c704e 100644 --- a/easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.0.eb +++ b/easybuild/easyconfigs/i/impi/impi-5.1.3.181-iccifortcuda-2016.10.eb @@ -8,7 +8,7 @@ description = """The Intel(R) MPI Library for Linux* OS is a multi-fabric messag passing library based on ANL MPICH2 and OSU MVAPICH2. The Intel MPI Library for Linux OS implements the Message Passing Interface, version 2 (MPI-2) specification.""" -toolchain = {'name': 'iccifortcuda', 'version': '2016.10.0'} +toolchain = {'name': 'iccifortcuda', 'version': '2016.10'} sources = ['l_mpi_p_%(version)s.tgz'] diff --git a/easybuild/easyconfigs/i/intelc/intelcuda-2016.10.0.eb b/easybuild/easyconfigs/i/intelcuda/intelcuda-2016.10.eb similarity index 97% rename from easybuild/easyconfigs/i/intelc/intelcuda-2016.10.0.eb rename to easybuild/easyconfigs/i/intelcuda/intelcuda-2016.10.eb index 6ba471c5d6..ac6a734e6e 100644 --- a/easybuild/easyconfigs/i/intelc/intelcuda-2016.10.0.eb +++ b/easybuild/easyconfigs/i/intelcuda/intelcuda-2016.10.eb @@ -1,7 +1,7 @@ easyblock = 'Toolchain' name = 'intelcuda' -version = '2016.10.0' +version = '2016.10' homepage = '(none)' description = """Intel Cluster Toolkit Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MPI & Intel MKL, with CUDA toolkit""" -- GitLab From d0f600fadd054a2d4cd6c996d2311373387c90b3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 10 Nov 2016 21:11:50 +0100 Subject: [PATCH 592/741] reversion goolfc 2016.10.0 to goolfc 2016.10 + add HPL easyconfig as testcase --- ...16.10.0.eb => FFTW-3.3.5-gompic-2016.10.eb} | 2 +- ...gcccuda-2016.10.0.eb => gcccuda-2016.10.eb} | 2 +- .../{gompic-2016.10.0.eb => gompic-2016.10.eb} | 2 +- .../{goolfc-2016.10.0.eb => goolfc-2016.10.eb} | 2 +- .../h/HPL/HPL-2.2-goolfc-2016.10.eb | 18 ++++++++++++++++++ ...10.0.eb => hwloc-1.11.4-gcccuda-2016.10.eb} | 2 +- ....0.eb => numactl-2.0.11-gcccuda-2016.10.eb} | 2 +- ...BLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb} | 2 +- ...0.0.eb => OpenMPI-2.0.1-gcccuda-2016.10.eb} | 2 +- ...ic-2016.10-OpenBLAS-0.2.19-LAPACK-3.6.1.eb} | 2 +- 10 files changed, 27 insertions(+), 9 deletions(-) rename easybuild/easyconfigs/f/FFTW/{FFTW-3.3.5-gompic-2016.10.0.eb => FFTW-3.3.5-gompic-2016.10.eb} (95%) rename easybuild/easyconfigs/g/gcccuda/{gcccuda-2016.10.0.eb => gcccuda-2016.10.eb} (94%) rename easybuild/easyconfigs/g/gompic/{gompic-2016.10.0.eb => gompic-2016.10.eb} (96%) rename easybuild/easyconfigs/g/goolfc/{goolfc-2016.10.0.eb => goolfc-2016.10.eb} (98%) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-goolfc-2016.10.eb rename easybuild/easyconfigs/h/hwloc/{hwloc-1.11.4-gcccuda-2016.10.0.eb => hwloc-1.11.4-gcccuda-2016.10.eb} (94%) rename easybuild/easyconfigs/n/numactl/{numactl-2.0.11-gcccuda-2016.10.0.eb => numactl-2.0.11-gcccuda-2016.10.eb} (93%) rename easybuild/easyconfigs/o/OpenBLAS/{OpenBLAS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb => OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb} (96%) rename easybuild/easyconfigs/o/OpenMPI/{OpenMPI-2.0.1-gcccuda-2016.10.0.eb => OpenMPI-2.0.1-gcccuda-2016.10.eb} (95%) rename easybuild/easyconfigs/s/ScaLAPACK/{ScaLAPACK-2.0.2-gompic-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb => ScaLAPACK-2.0.2-gompic-2016.10-OpenBLAS-0.2.19-LAPACK-3.6.1.eb} (91%) diff --git a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.eb similarity index 95% rename from easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb rename to easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.eb index 6df05f5634..2499d7f87a 100644 --- a/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.0.eb +++ b/easybuild/easyconfigs/f/FFTW/FFTW-3.3.5-gompic-2016.10.eb @@ -7,7 +7,7 @@ homepage = 'http://www.fftw.org' description = """FFTW is a C subroutine library for computing the discrete Fourier transform (DFT) in one or more dimensions, of arbitrary input size, and of both real and complex data.""" -toolchain = {'name': 'gompic', 'version': '2016.10.0'} +toolchain = {'name': 'gompic', 'version': '2016.10'} toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] diff --git a/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.0.eb b/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.eb similarity index 94% rename from easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.0.eb rename to easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.eb index 3d0ba0c9cf..ddfec681fb 100644 --- a/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.0.eb +++ b/easybuild/easyconfigs/g/gcccuda/gcccuda-2016.10.eb @@ -1,7 +1,7 @@ easyblock = "Toolchain" name = 'gcccuda' -version = '2016.10.0' +version = '2016.10' homepage = '(none)' description = """GNU Compiler Collection (GCC) based compiler toolchain, along with CUDA toolkit.""" diff --git a/easybuild/easyconfigs/g/gompic/gompic-2016.10.0.eb b/easybuild/easyconfigs/g/gompic/gompic-2016.10.eb similarity index 96% rename from easybuild/easyconfigs/g/gompic/gompic-2016.10.0.eb rename to easybuild/easyconfigs/g/gompic/gompic-2016.10.eb index b0c994f8de..39f562c6fb 100644 --- a/easybuild/easyconfigs/g/gompic/gompic-2016.10.0.eb +++ b/easybuild/easyconfigs/g/gompic/gompic-2016.10.eb @@ -1,7 +1,7 @@ easyblock = "Toolchain" name = 'gompic' -version = '2016.10.0' +version = '2016.10' homepage = '(none)' description = """GNU Compiler Collection (GCC) based compiler toolchain along with CUDA toolkit, diff --git a/easybuild/easyconfigs/g/goolfc/goolfc-2016.10.0.eb b/easybuild/easyconfigs/g/goolfc/goolfc-2016.10.eb similarity index 98% rename from easybuild/easyconfigs/g/goolfc/goolfc-2016.10.0.eb rename to easybuild/easyconfigs/g/goolfc/goolfc-2016.10.eb index 6fd9d7c78b..4ee5c6f696 100644 --- a/easybuild/easyconfigs/g/goolfc/goolfc-2016.10.0.eb +++ b/easybuild/easyconfigs/g/goolfc/goolfc-2016.10.eb @@ -1,7 +1,7 @@ easyblock = "Toolchain" name = 'goolfc' -version = '2016.10.0' +version = '2016.10' homepage = '(none)' description = """GCC based compiler toolchain __with CUDA support__, and including diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-goolfc-2016.10.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-goolfc-2016.10.eb new file mode 100644 index 0000000000..fff961832d --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-goolfc-2016.10.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'goolfc', 'version': '2016.10'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.0.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.eb similarity index 94% rename from easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.0.eb rename to easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.eb index 20cd96a781..a83862d853 100644 --- a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.0.eb +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-gcccuda-2016.10.eb @@ -11,7 +11,7 @@ system attributes such as cache and memory information as well as the locality o network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering information about modern computing hardware so as to exploit it accordingly and efficiently.""" -toolchain = {'name': 'gcccuda', 'version': '2016.10.0'} +toolchain = {'name': 'gcccuda', 'version': '2016.10'} source_urls = ['http://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] sources = [SOURCE_TAR_GZ] diff --git a/easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.0.eb b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.eb similarity index 93% rename from easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.0.eb rename to easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.eb index 6ee99ec4e4..b6d4718450 100644 --- a/easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.0.eb +++ b/easybuild/easyconfigs/n/numactl/numactl-2.0.11-gcccuda-2016.10.eb @@ -8,7 +8,7 @@ description = """The numactl program allows you to run your application program It does this by supplying a NUMA memory policy to the operating system before running your program. The libnuma library provides convenient ways for you to add NUMA memory policies into your own program.""" -toolchain = {'name': 'gcccuda', 'version': '2016.10.0'} +toolchain = {'name': 'gcccuda', 'version': '2016.10'} source_urls = ['ftp://oss.sgi.com/www/projects/libnuma/download/'] sources = [SOURCE_TAR_GZ] diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb similarity index 96% rename from easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb rename to easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb index 665e61e6ba..0102d20b13 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10.0-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb @@ -9,7 +9,7 @@ versionsuffix = '-LAPACK-%s' % lapackver homepage = 'http://xianyi.github.com/OpenBLAS/' description = """OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.""" -toolchain = {'name': 'gompic', 'version': '2016.10.0'} +toolchain = {'name': 'gompic', 'version': '2016.10'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.eb similarity index 95% rename from easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb rename to easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.eb index c4792dca19..3d626a7c80 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.0.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-gcccuda-2016.10.eb @@ -6,7 +6,7 @@ version = '2.0.1' homepage = 'http://www.open-mpi.org/' description = """The Open MPI Project is an open source MPI-2 implementation.""" -toolchain = {'name': 'gcccuda', 'version': '2016.10.0'} +toolchain = {'name': 'gcccuda', 'version': '2016.10'} sources = [SOURCELOWER_TAR_GZ] diff --git a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10-OpenBLAS-0.2.19-LAPACK-3.6.1.eb similarity index 91% rename from easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb rename to easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10-OpenBLAS-0.2.19-LAPACK-3.6.1.eb index dabe226ac2..a4526fee65 100644 --- a/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10.0-OpenBLAS-0.2.19-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/s/ScaLAPACK/ScaLAPACK-2.0.2-gompic-2016.10-OpenBLAS-0.2.19-LAPACK-3.6.1.eb @@ -5,7 +5,7 @@ homepage = 'http://www.netlib.org/scalapack/' description = """The ScaLAPACK (or Scalable LAPACK) library includes a subset of LAPACK routines redesigned for distributed memory MIMD parallel computers.""" -toolchain = {'name': 'gompic', 'version': '2016.10.0'} +toolchain = {'name': 'gompic', 'version': '2016.10'} toolchainopts = {'pic': True} source_urls = [homepage] -- GitLab From d2fe76856c1b3cd088e23fe9a72917e4ed34a3e2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 11 Nov 2016 00:38:31 +0100 Subject: [PATCH 593/741] remove maxparallel in GCCcore easyconfigs --- easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.2.eb | 3 --- easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.3.eb | 3 --- easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.4.eb | 3 --- easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb | 3 --- easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb | 3 --- easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb | 3 --- easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb | 3 --- 7 files changed, 21 deletions(-) diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.2.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.2.eb index 01f4776c64..872c6745e0 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.2.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.2.eb @@ -42,7 +42,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.3.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.3.eb index a4f11a8fbd..d0d9f1d3a7 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.3.eb @@ -41,7 +41,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.4.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.4.eb index 1a8e12a57a..9a01aa75ef 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.4.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-4.9.4.eb @@ -41,7 +41,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb index 1f2fc04edb..5c9d24095b 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb @@ -48,7 +48,4 @@ languages = ['c', 'c++', 'fortran'] withisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb index 5b9a17485e..54a7c67482 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb @@ -48,7 +48,4 @@ languages = ['c', 'c++', 'fortran'] withisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb index 5b9af4041a..23873c04ec 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb @@ -51,7 +51,4 @@ languages = ['c', 'c++', 'fortran'] withisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb index a375f0e539..61ee8bd066 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb @@ -50,7 +50,4 @@ languages = ['c', 'c++', 'fortran'] withisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' -- GitLab From 773d63d43018756141c205c9bcb98e671f7c8caf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 11 Nov 2016 00:39:22 +0100 Subject: [PATCH 594/741] remove maxparallel in GCC 5.x easyconfigs --- easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb | 3 --- 4 files changed, 12 deletions(-) diff --git a/easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb b/easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb index 8bbf0ea88e..4385f0e569 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb @@ -49,7 +49,4 @@ languages = ['c', 'c++', 'fortran'] withisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb b/easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb index a69c58da2c..335fdafa66 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb @@ -43,7 +43,4 @@ languages = ['c', 'c++', 'fortran'] withisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb b/easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb index c25b63f7b1..7db4c1240f 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb @@ -43,7 +43,4 @@ languages = ['c', 'c++', 'fortran'] withisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb b/easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb index 83ebb4cb78..553ae6554a 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb @@ -43,7 +43,4 @@ languages = ['c', 'c++', 'fortran'] withisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' -- GitLab From e4e2fb9c954e01bc8bb982e58dd1b6528dbbad8a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 11 Nov 2016 00:39:53 +0100 Subject: [PATCH 595/741] remove maxparallel in GCC 4.9.x easyconfigs --- easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.0.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.1.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.2-binutils-2.25.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.2.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.3-binutils-2.25.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.9.3.eb | 3 --- 12 files changed, 36 deletions(-) diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb index f77a70efc3..6b00ed1249 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb @@ -48,7 +48,4 @@ clooguseisl = True multilib = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb index 9974833bba..a3369e962d 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb @@ -46,7 +46,4 @@ withcloog = True withisl = True clooguseisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.0.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.0.eb index cd09534c39..288754285b 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.0.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.0.eb @@ -34,7 +34,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb index a3c67d644e..7205bfb68b 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb @@ -48,7 +48,4 @@ clooguseisl = True multilib = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb index b78ac53014..816dca9804 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb @@ -46,7 +46,4 @@ withcloog = True withisl = True clooguseisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.1.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.1.eb index 21e41342d3..d520b55ace 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.1.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.1.eb @@ -34,7 +34,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb index 0906283ab2..3bf02cbff3 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb @@ -48,7 +48,4 @@ clooguseisl = True multilib = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb index 1af6bd9c36..65fefc78d2 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb @@ -46,7 +46,4 @@ withcloog = True withisl = True clooguseisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-binutils-2.25.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-binutils-2.25.eb index 4985b9228e..44e39d233d 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-binutils-2.25.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-binutils-2.25.eb @@ -39,7 +39,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.2.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.2.eb index cb9f3aa4f2..e9df0050c0 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.2.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.2.eb @@ -34,7 +34,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.3-binutils-2.25.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.3-binutils-2.25.eb index d762426d06..8c62c13920 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.3-binutils-2.25.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.3-binutils-2.25.eb @@ -39,7 +39,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.3.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.3.eb index 759f134bcc..e36af87104 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.3.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.3.eb @@ -34,7 +34,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' -- GitLab From 122a5fe537b3b548fc6d27b879415be865a53788 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 11 Nov 2016 00:40:15 +0100 Subject: [PATCH 596/741] remove maxparallel in GCC 4.8.x easyconfigs --- easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.1.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.2-multilib.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.2.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.3.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.4.eb | 3 --- easybuild/easyconfigs/g/GCC/GCC-4.8.5.eb | 3 --- 12 files changed, 36 deletions(-) diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb index 97ecab725e..921e398b74 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb @@ -41,7 +41,4 @@ withcloog = True withisl = True clooguseisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.1.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.1.eb index 18a5c26a04..85085960e8 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.1.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.1.eb @@ -29,7 +29,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb index 0cc4d2d8be..7b8edef7eb 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb @@ -43,7 +43,4 @@ clooguseisl = True multilib = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb index 76ee08688e..de973e9d18 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb @@ -41,7 +41,4 @@ withcloog = True withisl = True clooguseisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-multilib.eb index 45168e2586..8154896aaa 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-multilib.eb @@ -32,7 +32,4 @@ languages = ['c', 'c++', 'fortran'] multilib = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.2.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.2.eb index 4f8e1b941b..525d8bbaf4 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.2.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.2.eb @@ -29,7 +29,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb index 8f71a86f5f..49654a4965 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb @@ -43,7 +43,4 @@ clooguseisl = True multilib = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.3.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.3.eb index 10a1ebfca0..d300b36d8f 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.3.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.3.eb @@ -29,7 +29,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb index a553c070ef..39bb9b0ddb 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb @@ -43,7 +43,4 @@ clooguseisl = True multilib = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb index 7dd0f5df24..6d7c5cab94 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb @@ -41,7 +41,4 @@ withcloog = True withisl = True clooguseisl = True -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.4.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.4.eb index 5ac47478fb..5149d85b52 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.4.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.4.eb @@ -29,7 +29,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.5.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.5.eb index 8618661532..358952fcd9 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.5.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.5.eb @@ -29,7 +29,4 @@ checksums = [ languages = ['c', 'c++', 'fortran'] -# building GCC sometimes fails if make parallelism is too high, so let's limit it -maxparallel = 4 - moduleclass = 'compiler' -- GitLab From c5ccd4254e9fcacef372d527006beee6bde96e69 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sat, 12 Nov 2016 01:14:06 +0100 Subject: [PATCH 597/741] add easyconfig R-3.2.3-foss-2016b.eb, add easyconfig libjpeg-turbo-1.4.2-foss-2016b.eb, add easyconfig NASM-2.11.08-foss-2016b.eb --- .../libjpeg-turbo-1.4.2-foss-2016b.eb | 30 ++ .../n/NASM/NASM-2.11.08-foss-2016b.eb | 31 ++ .../easyconfigs/r/R/R-3.2.3-foss-2016b.eb | 449 ++++++++++++++++++ 3 files changed, 510 insertions(+) create mode 100644 easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.4.2-foss-2016b.eb create mode 100644 easybuild/easyconfigs/n/NASM/NASM-2.11.08-foss-2016b.eb create mode 100644 easybuild/easyconfigs/r/R/R-3.2.3-foss-2016b.eb diff --git a/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.4.2-foss-2016b.eb b/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.4.2-foss-2016b.eb new file mode 100644 index 0000000000..f5e74640f5 --- /dev/null +++ b/easybuild/easyconfigs/l/libjpeg-turbo/libjpeg-turbo-1.4.2-foss-2016b.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'libjpeg-turbo' +version = '1.4.2' + +homepage = 'http://sourceforge.net/projects/libjpeg-turbo/' +description = """libjpeg-turbo is a fork of the original IJG libjpeg which uses SIMD to accelerate baseline JPEG +compression and decompression. libjpeg is a library that implements JPEG image encoding, decoding and transcoding. +""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('NASM', '2.11.08'), +] + +configopts = "--with-jpeg8" +runtest = "test" + +sanity_check_paths = { + 'files': ['bin/cjpeg', 'bin/djpeg', 'bin/jpegtran', 'bin/rdjpgcom', 'bin/tjbench', 'bin/wrjpgcom', + 'lib/libjpeg.a', 'lib/libjpeg.%s' % SHLIB_EXT, 'lib/libturbojpeg.a', 'lib/libturbojpeg.%s' % SHLIB_EXT], + 'dirs': ['include', 'share'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/n/NASM/NASM-2.11.08-foss-2016b.eb b/easybuild/easyconfigs/n/NASM/NASM-2.11.08-foss-2016b.eb new file mode 100644 index 0000000000..72c77d6685 --- /dev/null +++ b/easybuild/easyconfigs/n/NASM/NASM-2.11.08-foss-2016b.eb @@ -0,0 +1,31 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-90.html +## + +easyblock = 'ConfigureMake' + +name = 'NASM' +version = '2.11.08' + +homepage = 'http://www.nasm.us/' +description = """NASM: General-purpose x86 assembler""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['http://www.nasm.us/pub/nasm/releasebuilds/%(version)s'] + +sanity_check_paths = { + 'files': ['bin/nasm'], + 'dirs': [], +} + +moduleclass = 'lang' diff --git a/easybuild/easyconfigs/r/R/R-3.2.3-foss-2016b.eb b/easybuild/easyconfigs/r/R/R-3.2.3-foss-2016b.eb new file mode 100644 index 0000000000..004c178582 --- /dev/null +++ b/easybuild/easyconfigs/r/R/R-3.2.3-foss-2016b.eb @@ -0,0 +1,449 @@ +name = 'R' +version = '3.2.3' + +homepage = 'http://www.r-project.org/' +description = """R is a free software environment for statistical computing and graphics.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = [SOURCE_TAR_GZ] +source_urls = ['http://cran.us.r-project.org/src/base/R-%(version_major)s'] + +preconfigopts = 'BLAS_LIBS="$LIBBLAS" LAPACK_LIBS="$LIBLAPACK"' +configopts = "--with-lapack --with-blas --with-pic --enable-threads --with-x=no --enable-R-shlib" +# some recommended packages may fail in a parallel build (e.g. Matrix), and we're installing them anyway below +configopts += " --with-recommended-packages=no" + +dependencies = [ + ('libreadline', '6.3'), + ('ncurses', '6.0'), + ('libpng', '1.6.23'), # for plotting in R + ('libjpeg-turbo', '1.4.2'), # for plottting in R + ('Java', '1.8.0_92', '', True), # Java bindings are built if Java is found, might as well provide it + ('Tcl', '8.6.5'), # for tcltk + ('Tk', '8.6.5'), # for tcltk + ('cURL', '7.49.1'), # for RCurl + ('libxml2', '2.9.4'), # for XML + ('GDAL', '2.1.0'), # for rgdal + ('PROJ', '4.9.2'), # for rgdal + ('GMP', '6.1.1'), # for igraph +] + +name_tmpl = '%(name)s_%(version)s.tar.gz' +ext_options = { + 'source_urls': [ + 'http://cran.r-project.org/src/contrib/Archive/%(name)s', # package archive + 'http://cran.r-project.org/src/contrib/', # current version of packages + 'http://cran.freestatistics.org/src/contrib', # mirror alternative for current packages + ], + 'source_tmpl': name_tmpl, +} + + +# !! order of packages is important !! +# packages updated on January 21st 2016 +exts_list = [ + # default libraries, only here to sanity check their presence + 'base', + 'datasets', + 'graphics', + 'grDevices', + 'grid', + 'methods', + 'splines', + 'stats', + 'stats4', + 'tools', + 'utils', + # non-standard libraries, should be specified with fixed versions! + ('Rmpi', '0.6-5', ext_options), + ('abind', '1.4-3', ext_options), + ('magic', '1.5-6', ext_options), + ('geometry', '0.3-6', ext_options), + ('bit', '1.1-12', ext_options), + ('filehash', '2.3', ext_options), + ('ff', '2.2-13', ext_options), + ('bnlearn', '3.9', ext_options), + ('bootstrap', '2015.2', ext_options), + ('combinat', '0.0-8', ext_options), + ('deal', '1.2-37', ext_options), + ('fdrtool', '1.2.15', ext_options), + ('formatR', '1.2.1', ext_options), + ('gtools', '3.5.0', ext_options), + ('gdata', '2.17.0', ext_options), + ('GSA', '1.03', ext_options), + ('highr', '0.5.1', ext_options), + ('infotheo', '1.2.0', ext_options), + ('lars', '1.2', ext_options), + ('lazy', '1.2-15', ext_options), + ('kernlab', '0.9-22', ext_options), + ('mime', '0.4', ext_options), + ('markdown', '0.7.7', ext_options), + ('mlbench', '2.1-1', ext_options), + ('NLP', '0.1-8', ext_options), + ('mclust', '5.1', ext_options), + ('RANN', '2.5', ext_options), + ('rmeta', '2.16', ext_options), + ('segmented', '0.5-1.4', ext_options), + ('som', '0.3-5', ext_options), + ('SuppDists', '1.1-9.1', ext_options), + ('stabledist', '0.7-0', ext_options), + ('survivalROC', '1.0.3', ext_options), + ('pspline', '1.0-17', ext_options), + ('timeDate', '3012.100', ext_options), + ('longmemo', '1.0-0', ext_options), + ('ADGofTest', '0.3', ext_options), + ('ade4', '1.7-3', ext_options), + ('AlgDesign', '1.1-7.3', ext_options), + ('base64enc', '0.1-3', ext_options), + ('BH', '1.60.0-1', ext_options), + ('brew', '1.0-6', ext_options), + ('Brobdingnag', '1.2-4', ext_options), + ('corpcor', '1.6.8', ext_options), + ('longitudinal', '1.1.12', ext_options), + ('checkmate', '1.6.3', ext_options), + ('cubature', '1.1-2', ext_options), + ('DEoptimR', '1.0-4', ext_options), + ('digest', '0.6.8', ext_options), + ('fastmatch', '1.0-4', ext_options), + ('ffbase', '0.12.1', ext_options), + ('iterators', '1.0.8', ext_options), + ('maps', '3.0.2', ext_options), + ('nnls', '1.4', ext_options), + ('sendmailR', '1.2-1', ext_options), + ('spam', '1.3-0', ext_options), + ('subplex', '1.1-6', ext_options), + ('stringi', '1.0-1', ext_options), + ('magrittr', '1.5', ext_options), + ('stringr', '1.0.0', ext_options), + ('evaluate', '0.8', ext_options), + ('logspline', '2.1.8', ext_options), + ('ncbit', '2013.03.29', ext_options), + ('permute', '0.8-4', ext_options), + ('plotrix', '3.6-1', ext_options), + ('randomForest', '4.6-12', ext_options), + ('scatterplot3d', '0.3-36', ext_options), + ('SparseM', '1.7', ext_options), + ('tripack', '1.3-7', ext_options), + ('irace', '1.07', ext_options), + ('rJava', '0.9-7', ext_options), + ('lattice', '0.20-33', ext_options), + ('RColorBrewer', '1.1-2', ext_options), + ('latticeExtra', '0.6-26', ext_options), + ('Matrix', '1.2-3', ext_options), + ('png', '0.1-7', ext_options), + ('Rcpp', '0.12.2', ext_options), + ('RcppArmadillo', '0.6.400.2.2', ext_options), + ('plyr', '1.8.3', ext_options), + ('pROC', '1.8', ext_options), + ('quadprog', '1.5-5', ext_options), + ('BB', '2014.10-1', ext_options), + ('BBmisc', '1.9', ext_options), + ('fail', '1.3', ext_options), + ('rlecuyer', '0.3-4', ext_options), + ('snow', '0.4-1', ext_options), + ('MASS', '7.3-45', ext_options), + ('tree', '1.0-36', ext_options), + ('pls', '2.5-0', ext_options), + ('class', '7.3-14', ext_options), + ('e1071', '1.6-7', ext_options), + ('nnet', '7.3-11', ext_options), + ('nlme', '3.1-122', ext_options), + ('minqa', '1.2.4', ext_options), + ('RcppEigen', '0.3.2.5.1', ext_options), + ('MatrixModels', '0.4-1', ext_options), + ('quantreg', '5.19', ext_options), + ('mgcv', '1.8-10', ext_options), + ('colorspace', '1.2-6', ext_options), + ('robustbase', '0.92-5', ext_options), + ('sp', '1.2-1', ext_options), + ('zoo', '1.7-12', ext_options), + ('lmtest', '0.9-34', ext_options), + ('vcd', '1.4-1', ext_options), + ('snowfall', '1.84-6.1', ext_options), + ('rpart', '4.1-10', ext_options), + ('survival', '2.38-3', ext_options), + ('mice', '2.25', ext_options), + ('urca', '1.2-8', ext_options), + ('fracdiff', '1.4-2', ext_options), + ('logistf', '1.21', ext_options), + ('akima', '0.5-12', ext_options), + ('bitops', '1.0-6', ext_options), + ('boot', '1.3-17', ext_options), + ('mixtools', '1.0.3', ext_options), + ('cluster', '2.0.3', ext_options), + ('gclus', '1.3.1', ext_options), + ('coda', '0.18-1', ext_options), + ('codetools', '0.2-14', ext_options), + ('foreach', '1.4.3', ext_options), + ('doMC', '1.3.4', ext_options), + ('DBI', '0.3.1', ext_options), + ('foreign', '0.8-66', ext_options), + ('gam', '1.12', ext_options), + ('gamlss.data', '4.3-2', ext_options), + ('gamlss.dist', '4.3-5', ext_options), + ('hwriter', '1.3.2', ext_options), + ('KernSmooth', '2.23-15', ext_options), + ('xts', '0.9-7', ext_options), + ('TTR', '0.23-0', ext_options), + ('quantmod', '0.4-5', ext_options), + ('mnormt', '1.5-3', ext_options), + ('mvtnorm', '1.0-3', ext_options), + ('pcaPP', '1.9-60', ext_options), + ('numDeriv', '2014.2-1', ext_options), + ('lava', '1.4.1', ext_options), + ('prodlim', '1.5.7', ext_options), + ('pscl', '1.4.9', ext_options), + ('RSQLite', '1.0.0', ext_options), + ('BatchJobs', '1.6', ext_options), + ('sandwich', '2.3-4', ext_options), + ('sfsmisc', '1.0-28', ext_options), + ('spatial', '7.3-11', ext_options), + ('VGAM', '1.0-0', ext_options), + ('waveslim', '1.7.5', ext_options), + ('xtable', '1.8-0', ext_options), + ('profileModel', '0.5-9', ext_options), + ('brglm', '0.5-9', ext_options), + ('deSolve', '1.12', ext_options), + ('tseriesChaos', '0.1-13', ext_options), + ('tseries', '0.10-34', ext_options), + ('fastICA', '1.2-0', ext_options), + ('R.methodsS3', '1.7.0', ext_options), + ('R.oo', '1.19.0', ext_options), + ('cgdsr', '1.2.5', ext_options), + ('R.utils', '2.2.0', ext_options), + ('R.matlab', '3.3.0', ext_options), + ('gbm', '2.1.1', ext_options), + ('dichromat', '2.0-0', ext_options), + ('Formula', '1.2-1', ext_options), + ('acepack', '1.3-3.3', ext_options), + ('reshape2', '1.4.1', ext_options), + ('gtable', '0.1.2', ext_options), + ('munsell', '0.4.2', ext_options), + ('labeling', '0.3', ext_options), + ('scales', '0.3.0', ext_options), + ('proto', '0.3-10', ext_options), + ('ggplot2', '2.0.0', ext_options), + ('gridExtra', '2.0.0', ext_options), + ('Hmisc', '3.17-1', ext_options), + ('fastcluster', '1.1.16', ext_options), + ('chron', '2.3-47', ext_options), + ('data.table', '1.9.6', ext_options), + ('registry', '0.3', ext_options), + ('pkgmaker', '0.22', ext_options), + ('rngtools', '1.2.4', ext_options), + ('doParallel', '1.0.10', ext_options), + ('gridBase', '0.4-7', ext_options), + ('NMF', '0.20.6', ext_options), + ('irlba', '2.0.0', ext_options), + ('igraph', '1.0.1', ext_options), + ('GeneNet', '1.2.13', ext_options), + ('ape', '3.4', ext_options), + ('htmltools', '0.3', ext_options), + ('RJSONIO', '1.3-0', ext_options), + ('caTools', '1.17.1', ext_options), + ('gplots', '2.17.0', ext_options), + ('ROCR', '1.0-7', ext_options), + ('httpuv', '1.3.3', ext_options), + ('R6', '2.1.1', ext_options), + ('jsonlite', '0.9.19', ext_options), + ('rjson', '0.2.15', ext_options), + ('shiny', '0.12.2', ext_options), + ('seqinr', '3.1-3', ext_options), + ('LearnBayes', '2.15', ext_options), + ('deldir', '0.1-9', ext_options), + ('spdep', '0.5-92', ext_options), + ('assertthat', '0.1', ext_options), + ('lazyeval', '0.1.10', ext_options), + ('dplyr', '0.4.3', ext_options), + ('adegenet', '2.0.0', ext_options), + ('rncl', '0.6.0', ext_options), + ('XML', '3.98-1.3', ext_options), + ('memoise', '0.2.1', ext_options), + ('crayon', '1.3.1', ext_options), + ('praise', '1.0.0', ext_options), + ('testthat', '0.11.0', ext_options), + ('yaml', '2.1.13', ext_options), + ('knitr', '1.11', ext_options), + ('rmarkdown', '0.9.2', ext_options), + ('curl', '0.9.4', ext_options), + ('httr', '1.0.0', ext_options), + ('reshape', '0.8.5', ext_options), + ('bold', '0.3.0', ext_options), + ('taxize', '0.7.0', ext_options), + ('tidyr', '0.3.1', ext_options), + ('uuid', '0.1-2', ext_options), + ('RNeXML', '2.0.5', ext_options), + ('phylobase', '0.8.0', ext_options), + ('adephylo', '1.1-6', ext_options), + ('animation', '2.4', ext_options), + ('bigmemory.sri', '0.1.3', ext_options), + ('bigmemory', '4.5.8', ext_options), + ('calibrate', '1.7.2', ext_options), + ('clusterGeneration', '1.3.4', ext_options), + ('raster', '2.5-2', ext_options), + ('dismo', '1.0-12', ext_options), + ('expm', '0.999-0', ext_options), + ('extrafontdb', '1.0', ext_options), + ('Rttf2pt1', '1.3.3', ext_options), + ('extrafont', '0.17', ext_options), + ('fields', '8.3-6', ext_options), + ('shapefiles', '0.7', ext_options), + ('fossil', '0.3.7', ext_options), + ('geiger', '2.0.6', ext_options), + ('glmnet', '2.0-2', ext_options), + ('rgl', '0.95.1441', ext_options), + ('labdsv', '1.7-0', ext_options), + ('stabs', '0.5-1', ext_options), + ('mboost', '2.5-0', ext_options), + ('msm', '1.6', ext_options), + ('nor1mix', '1.2-1', ext_options), + ('np', '0.60-2', ext_options), + ('polynom', '1.3-8', ext_options), + ('polspline', '1.1.12', ext_options), + ('TH.data', '1.0-6', ext_options), + ('multcomp', '1.4-1', ext_options), + ('rms', '4.4-1', ext_options), + ('RWekajars', '3.7.12-1', ext_options), + ('RWeka', '0.4-24', ext_options), + ('slam', '0.1-32', ext_options), + ('tm', '0.6-2', ext_options), + ('TraMineR', '1.8-11', ext_options), + ('chemometrics', '1.3.9', ext_options), + ('FNN', '1.1', ext_options), + ('ipred', '0.9-5', ext_options), + ('statmod', '1.4.23', ext_options), + ('miscTools', '0.6-16', ext_options), + ('maxLik', '1.3-4', ext_options), + ('mlogit', '0.2-4', ext_options), + ('getopt', '1.20.0', ext_options), + ('gsalib', '2.1', ext_options), + ('optparse', '1.3.2', ext_options), + ('klaR', '0.6-12', ext_options), + ('neuRosim', '0.2-12', ext_options), + ('locfit', '1.5-9.1', ext_options), + ('GGally', '1.0.0', ext_options), + ('beanplot', '1.2', ext_options), + ('clValid', '0.6-6', ext_options), + ('matrixStats', '0.50.1', ext_options), + ('DiscriMiner', '0.1-29', ext_options), + ('ellipse', '0.3-8', ext_options), + ('leaps', '2.9', ext_options), + ('nloptr', '1.0.4', ext_options), + ('lme4', '1.1-10', ext_options), + ('pbkrtest', '0.4-4', ext_options), + ('car', '2.1-1', ext_options), + ('flashClust', '1.01-2', ext_options), + ('FactoMineR', '1.31.4', ext_options), + ('modeltools', '0.2-21', ext_options), + ('flexclust', '1.3-4', ext_options), + ('flexmix', '2.3-13', ext_options), + ('prabclus', '2.2-6', ext_options), + ('diptest', '0.75-7', ext_options), + ('trimcluster', '0.1-2', ext_options), + ('fpc', '2.1-10', ext_options), + ('BiasedUrn', '1.07', ext_options), + ('TeachingDemos', '2.9', ext_options), + ('kohonen', '2.0.19', ext_options), + ('base64', '1.1', ext_options), + ('doRNG', '1.6', ext_options), + ('nleqslv', '2.9.1', ext_options), + ('RGCCA', '2.0', ext_options), + ('pheatmap', '1.0.8', ext_options), + ('openxlsx', '3.0.0', ext_options), + ('pvclust', '2.0-0', ext_options), + ('RCircos', '1.1.3', ext_options), + ('lambda.r', '1.1.7', ext_options), + ('futile.options', '1.0.0', ext_options), + ('futile.logger', '1.4.1', ext_options), + ('VennDiagram', '1.6.16', ext_options), + ('xlsxjars', '0.6.1', ext_options), + ('xlsx', '0.5.7', ext_options), + ('vegan', '2.3-2', ext_options), + ('forecast', '6.1', ext_options), + ('fma', '2.01', ext_options), + ('expsmooth', '2.3', ext_options), + ('fpp', '0.5', ext_options), + ('maptools', '0.8-37', ext_options), + ('deldir', '0.1-9', ext_options), + ('tensor', '1.5', ext_options), + ('polyclip', '1.3-2', ext_options), + ('goftest', '1.0-3', ext_options), + ('spatstat', '1.44-1', ext_options), + ('rgdal', '1.1-3', ext_options), + ('gdalUtils', '2.0.1.7', ext_options), + ('pracma', '1.8.8', ext_options), + ('RCurl', '1.95-4.7', ext_options), + ('bio3d', '2.2-4', ext_options), + ('AUC', '0.3.0', ext_options), + ('interpretR', '0.2.3', ext_options), + ('SuperLearner', '2.0-15', ext_options), + ('lpSolve', '5.6.13', ext_options), + ('mediation', '4.4.5', ext_options), + ('caret', '6.0-64', ext_options), + ('adabag', '4.1', ext_options), + ('parallelMap', '1.3', ext_options), + ('ParamHelpers', '1.6', ext_options), + ('ggvis', '0.4.2', ext_options), + ('mlr', '2.7', ext_options), + ('unbalanced', '2.0', ext_options), + ('RSNNS', '0.4-7', ext_options), + ('abc.data', '1.0', ext_options), + ('abc', '2.1', ext_options), + ('lhs', '0.10', ext_options), + ('tensorA', '0.36', ext_options), + ('EasyABC', '1.5', ext_options), + ('shape', '1.4.2', ext_options), + ('whisker', '0.3-2', ext_options), + ('rstudioapi', '0.4.0', ext_options), + ('roxygen2', '5.0.1', ext_options), + ('git2r', '0.13.1', ext_options), + ('xml2', '0.1.2', ext_options), + ('rversions', '1.0.2', ext_options), + ('devtools', '1.9.1', ext_options), + ('Rook', '1.1-1', ext_options), + ('rjson', '0.2.15', ext_options), + ('Cairo', '1.5-9', ext_options), + ('RMTstat', '0.3', ext_options), + ('Lmoments', '1.1-6', ext_options), + ('distillery', '1.0-2', ext_options), + ('extRemes', '2.0-7', ext_options), + ('pixmap', '0.4-11', ext_options), + ('tkrplot', '0.0-23', ext_options), + ('misc3d', '0.8-4', ext_options), + ('multicool', '0.1-9', ext_options), + ('ks', '1.10.1', ext_options), + ('logcondens', '2.1.4', ext_options), + ('Iso', '0.0-17', ext_options), + ('penalized', '0.9-45', ext_options), + ('coin', '1.1-2', ext_options), + ('clusterRepro', '0.5-1.1', ext_options), + ('randomForestSRC', '2.0.7', ext_options), + ('sm', '2.2-5.4', ext_options), + ('psych', '1.5.8', ext_options), + ('pbivnorm', '0.6.0', ext_options), + ('lavaan', '0.5-20', ext_options), + ('matrixcalc', '1.0-3', ext_options), + ('arm', '1.8-6', ext_options), + ('mi', '1.0', ext_options), + ('htmlwidgets', '0.6', ext_options), + ('visNetwork', '0.2.1', ext_options), + ('DiagrammeR', '0.8.2', ext_options), + ('sem', '3.1-6', ext_options), + ('jpeg', '0.1-8', ext_options), + ('sna', '2.3-2', ext_options), + ('glasso', '1.8', ext_options), + ('huge', '1.2.7', ext_options), + ('d3Network', '0.5.2.1', ext_options), + ('ggm', '2.3', ext_options), + ('qgraph', '1.3.2', ext_options), + ('diveRsity', '1.9.89', ext_options), + ('doSNOW', '1.0.14', ext_options), + ('phangorn', '2.0.2', ext_options), + ('geepack', '1.2-0.1', ext_options), + ('lubridate', '1.5.6', ext_options), + ('biom', '0.3.12', ext_options), + ('pim', '2.0.0.2', ext_options), +] + +moduleclass = 'lang' -- GitLab From b84622e961d8d77f5027f539a493e9bd1a183edf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 12 Nov 2016 20:26:55 +0100 Subject: [PATCH 598/741] avoid specifying subtoolchain for flex/Bison build deps --- easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb | 4 ++-- easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb | 4 ++-- easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb | 2 +- easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb b/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb index 9aa1e31e3d..c060125491 100644 --- a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb +++ b/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb @@ -24,8 +24,8 @@ dependencies = [ ] builddependencies = [ - ('flex', '2.5.39', '', ('GNU', '4.9.3-2.25')), - ('Bison', '3.0.4', '', ('GNU', '4.9.3-2.25')), + ('flex', '2.5.39'), + ('Bison', '3.0.4'), ] # don't use parallel make, results in compilation failure diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb b/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb index ec3d535442..6b6b4181f9 100644 --- a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb +++ b/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb @@ -24,8 +24,8 @@ dependencies = [ ] builddependencies = [ - ('flex', '2.5.39', '', ('GNU', '4.9.3-2.25')), - ('Bison', '3.0.4', '', ('GNU', '4.9.3-2.25')), + ('flex', '2.5.39'), + ('Bison', '3.0.4'), ] # don't use parallel make, results in compilation failure diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb index 3f2d3b24f6..0e52dfb998 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb @@ -15,6 +15,6 @@ checksums = [ 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz ] -dependencies = [('M4', '1.4.17', '', ('GNU', '4.9.3-2.25'))] +dependencies = [('M4', '1.4.17')] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb index cc528417f1..c1b7ac5006 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb @@ -15,6 +15,6 @@ checksums = [ 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz ] -dependencies = [('M4', '1.4.17', '', ('GNU', '4.9.3-2.25'))] +dependencies = [('M4', '1.4.17')] moduleclass = 'lang' -- GitLab From b194854e3b36c3e5b4e0f70cbf99159494057087 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 12 Nov 2016 20:56:45 +0100 Subject: [PATCH 599/741] Revert "avoid specifying subtoolchain for flex/Bison build deps" This reverts commit b84622e961d8d77f5027f539a493e9bd1a183edf. --- easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb | 4 ++-- easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb | 4 ++-- easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb | 2 +- easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb b/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb index c060125491..9aa1e31e3d 100644 --- a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb +++ b/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-foss-2015b.eb @@ -24,8 +24,8 @@ dependencies = [ ] builddependencies = [ - ('flex', '2.5.39'), - ('Bison', '3.0.4'), + ('flex', '2.5.39', '', ('GNU', '4.9.3-2.25')), + ('Bison', '3.0.4', '', ('GNU', '4.9.3-2.25')), ] # don't use parallel make, results in compilation failure diff --git a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb b/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb index 6b6b4181f9..ec3d535442 100644 --- a/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb +++ b/easybuild/easyconfigs/c/CP2K/CP2K-2.6.1-intel-2015b.eb @@ -24,8 +24,8 @@ dependencies = [ ] builddependencies = [ - ('flex', '2.5.39'), - ('Bison', '3.0.4'), + ('flex', '2.5.39', '', ('GNU', '4.9.3-2.25')), + ('Bison', '3.0.4', '', ('GNU', '4.9.3-2.25')), ] # don't use parallel make, results in compilation failure diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb index 0e52dfb998..3f2d3b24f6 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-foss-2015b.eb @@ -15,6 +15,6 @@ checksums = [ 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz ] -dependencies = [('M4', '1.4.17')] +dependencies = [('M4', '1.4.17', '', ('GNU', '4.9.3-2.25'))] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb index c1b7ac5006..cc528417f1 100644 --- a/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb +++ b/easybuild/easyconfigs/f/flex/flex-2.5.39-intel-2015b.eb @@ -15,6 +15,6 @@ checksums = [ 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz ] -dependencies = [('M4', '1.4.17')] +dependencies = [('M4', '1.4.17', '', ('GNU', '4.9.3-2.25'))] moduleclass = 'lang' -- GitLab From b779f4246b807359aa013337c8e0c077c2a693d8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 12 Nov 2016 21:59:16 +0100 Subject: [PATCH 600/741] revert back changes to archived easyconfig --- .../__archive__/f/flex/flex-2.5.39-intel-para-2014.12.eb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.39-intel-para-2014.12.eb b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.39-intel-para-2014.12.eb index 09e533d59d..7cd93ab5fc 100644 --- a/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.39-intel-para-2014.12.eb +++ b/easybuild/easyconfigs/__archive__/f/flex/flex-2.5.39-intel-para-2014.12.eb @@ -11,10 +11,4 @@ toolchainopts = {'pic': True} sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://prdownloads.sourceforge.net/%(namelower)s'] -checksums = [ - 'e133e9ead8ec0a58d81166b461244fde', # flex-2.5.39.tar.gz -] - -dependencies = [('M4', '1.4.17')] - moduleclass = 'lang' -- GitLab From 8f0b2e226823d8c62fa25ef7d05a7b518c6d01eb Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 12 Nov 2016 23:16:22 +0100 Subject: [PATCH 601/741] add easyconfig Minimac2-2014.9.15-goolf-1.7.20.eb --- .../Minimac2-2014.9.15-goolf-1.7.20.eb | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 easybuild/easyconfigs/m/Minimac2/Minimac2-2014.9.15-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/m/Minimac2/Minimac2-2014.9.15-goolf-1.7.20.eb b/easybuild/easyconfigs/m/Minimac2/Minimac2-2014.9.15-goolf-1.7.20.eb new file mode 100644 index 0000000000..79a432c81f --- /dev/null +++ b/easybuild/easyconfigs/m/Minimac2/Minimac2-2014.9.15-goolf-1.7.20.eb @@ -0,0 +1,50 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock='MakeCp' + +name = 'Minimac2' +version = '2014.9.15' + +homepage = 'http://genome.sph.umich.edu/wiki/Minimac2' +description = """minimac2 is an improved version of Minimac. It is designed to work on phased + genotypes and can handle very large reference panels with hundreds or thousands of haplotypes. + The name has two parts. The first, mini, refers to the modest amount of computational resources it requires. + The second, mac, is short hand for MaCH, our widely used algorithm for genotype imputation.""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} + +source_urls = ['http://csg.sph.umich.edu/cfuchsb/'] +sources = ['%(namelower)s.%(version)s.src.tgz'] + +osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')] + +dependencies = [ + ('zlib', '1.2.8'), + # This app also depends in openblas +# ('OpenSSL', '1.0.1q'), # OS dependency should be preferred if the os version is more recent then this version, it's +# nice to have an up to date openssl for security reasons +] + +# firt move to folder libStatGen to run make clean && make +# make clean is mandatory because the sources tarball includes +# files from previous build +prebuildopts = ["cd libStatGen && make clean && "] + +# in libStatGen folder run just "make" +# in minimac folder run "make clean && make opt && make openmp" +buildopts = [" && cd ../minimac2 && make clean && make opt && make openmp"] + +# parallel build fails +parallel = 1 + +files_to_copy = [(["minimac2/bin/minimac2", "minimac2/bin/minimac2-omp"], "bin")] + +sanity_check_paths = { + 'files': ['bin/minimac2', 'bin/minimac2-omp'], + 'dirs': [] +} + +moduleclass = 'bio' -- GitLab From ff6c08e6c3161b50a77a6fc785cdcd4056fc1c21 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 13 Nov 2016 16:41:24 +0100 Subject: [PATCH 602/741] adding easyconfigs: Advisor-2017_update1.eb --- .../a/Advisor/Advisor-2017_update1.eb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 easybuild/easyconfigs/a/Advisor/Advisor-2017_update1.eb diff --git a/easybuild/easyconfigs/a/Advisor/Advisor-2017_update1.eb b/easybuild/easyconfigs/a/Advisor/Advisor-2017_update1.eb new file mode 100644 index 0000000000..89c1628d39 --- /dev/null +++ b/easybuild/easyconfigs/a/Advisor/Advisor-2017_update1.eb @@ -0,0 +1,21 @@ +name = 'Advisor' +version = '2017_update1' + +homepage = 'https://software.intel.com/intel-advisor-xe' +description = """Vectorization Optimization and Thread Prototyping + - Vectorize & thread code or performance “dies” + - Easy workflow + data + tips = faster code faster + - Prioritize, Prototype & Predict performance gain + """ + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['advisor_%(version)s.tar.gz'] + +dontcreateinstalldir = 'True' + +# license file +import os +license_file = os.path.join(os.getenv('HOME'), "licenses", "intel", "license.lic") + +moduleclass = 'perf' -- GitLab From 45866919751baf48bc4fb645870cb7347fb32561 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sun, 13 Nov 2016 21:13:28 +0100 Subject: [PATCH 603/741] use 'Conda' easyblock + empty version for dummy toolchain + some minor enhancements --- .../gencore_variant_detection-1.0.eb | 11 ++++------- .../p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb index 9cf70a3ec4..b799146d37 100644 --- a/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb +++ b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb @@ -10,7 +10,7 @@ # http://apps.fz-juelich.de/unite/ ## -easyblock = 'EB_Conda' +easyblock = 'Conda' name = "gencore_variant_detection" version = "1.0" @@ -19,15 +19,12 @@ variant = "Linux-x86_64" homepage = "https://nyuad-cgsb.github.io/variant_detection/public/index.html" description = """ This is a bundled install of many software packages for doing variant detection analysis. """ -toolchain = {'name': 'dummy', 'version': 'dummy'} +toolchain = {'name': 'dummy', 'version': ''} builddependencies = [('Anaconda3', '4.0.0')] -#Use one of the following - either an environment.yml file or a remote environment definition -#sources = ["environment.yml"] -#environment_file = sources[0] - -#remote_environment = "nyuad-cgsb/gencore_variant_detection_1.0" +# Use one of the following - either an environment.yml file or a remote environment definition +#environment_file = '/path/to/conda-environment.yml' remote_environment = "nyuad-cgsb/%(name)s_%(version)s" sanity_check_paths = { diff --git a/easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb b/easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb index 52ac06d71d..c89d3af9f2 100644 --- a/easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb +++ b/easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb @@ -10,13 +10,13 @@ # http://apps.fz-juelich.de/unite/ ## -easyblock = 'EB_Conda' +easyblock = 'Conda' name = "perl-app-cpanminus" version = "1.7039" variant = "Linux-x86_64" -homepage = "http://search.cpan.org/~miyagawa/Menlo-1.9003/script/cpanm-menlo" +homepage = 'https://github.com/miyagawa/cpanminus' description = """ cpanm - get, unpack build and install modules from CPAN """ toolchain = {'name': 'dummy', 'version': ''} -- GitLab From ba67817bf19488e9efb8005ec902fa1a7ae8dca3 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 11:16:50 +0100 Subject: [PATCH 604/741] {data}[intel/2016b] PyTables 3.3.0 w/ Python 2.7.12 + Python 3.5.2 (+ rename pyTables to PyTables) --- ...numexpr-2.6.1-intel-2016b-Python-2.7.12.eb | 27 ++++++++++++++ .../numexpr-2.6.1-intel-2016b-Python-3.5.2.eb | 27 ++++++++++++++ ...yTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb} | 2 +- .../PyTables-3.2.2-fix-libs.patch} | 0 ...Tables-3.2.2-intel-2015b-Python-2.7.10.eb} | 16 +++----- ...yTables-3.3.0-intel-2016b-Python-2.7.12.eb | 37 +++++++++++++++++++ ...PyTables-3.3.0-intel-2016b-Python-3.5.2.eb | 37 +++++++++++++++++++ 7 files changed, 135 insertions(+), 11 deletions(-) create mode 100644 easybuild/easyconfigs/n/numexpr/numexpr-2.6.1-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/n/numexpr/numexpr-2.6.1-intel-2016b-Python-3.5.2.eb rename easybuild/easyconfigs/p/{pyTables/pyTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb => PyTables/PyTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb} (98%) rename easybuild/easyconfigs/p/{pyTables/pyTables-3.2.2-fix-libs.patch => PyTables/PyTables-3.2.2-fix-libs.patch} (100%) rename easybuild/easyconfigs/p/{pyTables/pyTables-3.2.2-intel-2015b-Python-2.7.10.eb => PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb} (79%) create mode 100644 easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/n/numexpr/numexpr-2.6.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/n/numexpr/numexpr-2.6.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..a7f59e992e --- /dev/null +++ b/easybuild/easyconfigs/n/numexpr/numexpr-2.6.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'numexpr' +version = '2.6.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://code.google.com/p/numexpr/' +description = """The numexpr package evaluates multiple-operator array expressions many times faster than NumPy can. + It accepts the expression as a string, analyzes it, rewrites it more efficiently, and compiles it on the fly into + code for its internal virtual machine (VM). Due to its integrated just-in-time (JIT) compiler, it does not require a + compiler at runtime.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/pydata/numexpr/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [ + ('Python', '2.7.12'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/n/numexpr/numexpr-2.6.1-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/n/numexpr/numexpr-2.6.1-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..f2a2e65aae --- /dev/null +++ b/easybuild/easyconfigs/n/numexpr/numexpr-2.6.1-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'numexpr' +version = '2.6.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://code.google.com/p/numexpr/' +description = """The numexpr package evaluates multiple-operator array expressions many times faster than NumPy can. + It accepts the expression as a string, analyzes it, rewrites it more efficiently, and compiles it on the fly into + code for its internal virtual machine (VM). Due to its integrated just-in-time (JIT) compiler, it does not require a + compiler at runtime.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/pydata/numexpr/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [ + ('Python', '3.5.2'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/p/pyTables/pyTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb similarity index 98% rename from easybuild/easyconfigs/p/pyTables/pyTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb rename to easybuild/easyconfigs/p/PyTables/PyTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb index 9295347947..2a4a817730 100644 --- a/easybuild/easyconfigs/p/pyTables/pyTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.0.0-ictce-5.5.0-Python-2.7.6.eb @@ -1,6 +1,6 @@ easyblock = "PythonPackage" -name = 'pyTables' +name = 'PyTables' version = '3.0.0' homepage = 'http://www.pytables.org/moin' diff --git a/easybuild/easyconfigs/p/pyTables/pyTables-3.2.2-fix-libs.patch b/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-fix-libs.patch similarity index 100% rename from easybuild/easyconfigs/p/pyTables/pyTables-3.2.2-fix-libs.patch rename to easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-fix-libs.patch diff --git a/easybuild/easyconfigs/p/pyTables/pyTables-3.2.2-intel-2015b-Python-2.7.10.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb similarity index 79% rename from easybuild/easyconfigs/p/pyTables/pyTables-3.2.2-intel-2015b-Python-2.7.10.eb rename to easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb index c7500dde1e..99a9cd56f0 100644 --- a/easybuild/easyconfigs/p/pyTables/pyTables-3.2.2-intel-2015b-Python-2.7.10.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb @@ -1,7 +1,8 @@ -easyblock = "PythonPackage" +easyblock = 'PythonPackage' -name = 'pyTables' +name = 'PyTables' version = '3.2.2' +versionsuffix = '-Python-%(pyver)s' homepage = 'http://www.pytables.org' description = """PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope @@ -18,15 +19,10 @@ toolchainopts = {'usempi': True} source_urls = ['https://github.com/PyTables/PyTables/archive/'] sources = ['v.%(version)s.tar.gz'] -patches = ['pyTables-%(version)s-fix-libs.patch'] - -python = 'Python' -pythonver = '2.7.10' -pythonshortver = '.'.join(pythonver.split('.')[0:2]) -versionsuffix = '-%s-%s' % (python, pythonver) +patches = ['%(name)s-%(version)s-fix-libs.patch'] dependencies = [ - (python, pythonver), + ('Python', '2.7.10'), ('numpy', '1.10.4', versionsuffix), ('numexpr', '2.4.6', versionsuffix), ('HDF5', '1.8.13'), @@ -34,7 +30,7 @@ dependencies = [ sanity_check_paths = { 'files': ['bin/%s' % x for x in ['pt2to3', 'ptdump', 'ptrepack']], - 'dirs': ['lib/python%s/site-packages' % pythonshortver], + 'dirs': ['lib/python%(pyshortver)ss/site-packages'], } options = {'modulename': 'tables'} diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..affa66b440 --- /dev/null +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,37 @@ +easyblock = 'PythonPackage' + +name = 'PyTables' +version = '3.2.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.pytables.org' +description = """PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope + with extremely large amounts of data. PyTables is built on top of the HDF5 library, using the Python language and the + NumPy package. It features an object-oriented interface that, combined with C extensions for the performance-critical + parts of the code (generated using Cython), makes it a fast, yet extremely easy to use tool for interactively browse, + process and search very large amounts of data. One important feature of PyTables is that it optimizes memory and disk + resources so that data takes much less space (specially if on-flight compression is used) than other solutions such as + relational or object oriented databases.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'usempi': True} + +source_urls = ['https://github.com/PyTables/PyTables/archive/'] +sources = ['v.%(version)s.tar.gz'] + +patches = ['%(name)s-3.2.2-fix-libs.patch'] + +dependencies = [ + ('Python', '2.7.12'), + ('numexpr', '2.6.1', versionsuffix), + ('HDF5', '1.8.17'), +] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ['pt2to3', 'ptdump', 'ptrepack']], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +options = {'modulename': 'tables'} + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..afe7cea34d --- /dev/null +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,37 @@ +easyblock = 'PythonPackage' + +name = 'PyTables' +version = '3.2.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.pytables.org' +description = """PyTables is a package for managing hierarchical datasets and designed to efficiently and easily cope + with extremely large amounts of data. PyTables is built on top of the HDF5 library, using the Python language and the + NumPy package. It features an object-oriented interface that, combined with C extensions for the performance-critical + parts of the code (generated using Cython), makes it a fast, yet extremely easy to use tool for interactively browse, + process and search very large amounts of data. One important feature of PyTables is that it optimizes memory and disk + resources so that data takes much less space (specially if on-flight compression is used) than other solutions such as + relational or object oriented databases.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'usempi': True} + +source_urls = ['https://github.com/PyTables/PyTables/archive/'] +sources = ['v.%(version)s.tar.gz'] + +patches = ['%(name)s-%(version)s-fix-libs.patch'] + +dependencies = [ + ('Python', '3.5.2'), + ('numexpr', '2.6.1', versionsuffix), + ('HDF5', '1.8.17'), +] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ['pt2to3', 'ptdump', 'ptrepack']], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +options = {'modulename': 'tables'} + +moduleclass = 'data' -- GitLab From 41be148edf37c0776946abbe431f81b5f55e5e3d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 11:29:31 +0100 Subject: [PATCH 605/741] adding easyconfigs: dask-0.12.0-intel-2016b-Python-2.7.12.eb, dask-0.12.0-intel-2016b-Python-3.5.2.eb, distributed-1.14.3-intel-2016b-Python-2.7.12.eb, distributed-1.14.3-intel-2016b-Python-3.5.2.eb --- .../dask-0.12.0-intel-2016b-Python-2.7.12.eb | 37 ++++++++++ .../dask-0.12.0-intel-2016b-Python-3.5.2.eb | 37 ++++++++++ ...ibuted-1.14.3-intel-2016b-Python-2.7.12.eb | 68 +++++++++++++++++++ ...ributed-1.14.3-intel-2016b-Python-3.5.2.eb | 68 +++++++++++++++++++ 4 files changed, 210 insertions(+) create mode 100644 easybuild/easyconfigs/d/dask/dask-0.12.0-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/d/dask/dask-0.12.0-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/d/distributed/distributed-1.14.3-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/d/distributed/distributed-1.14.3-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/d/dask/dask-0.12.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/d/dask/dask-0.12.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..0b49bfdbc1 --- /dev/null +++ b/easybuild/easyconfigs/d/dask/dask-0.12.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,37 @@ +easyblock = 'Bundle' + +name = 'dask' +version = '0.12.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://github.com/dask/dask/' +description = """Dask provides multi-core execution on larger-than-memory datasets using blocked algorithms + and task scheduling.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [('Python', '2.7.12')] + +exts_list = [ + ('toolz', '0.8.0', { + 'source_urls': ['https://pypi.python.org/packages/source/t/toolz'], + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/d/dask'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/d/dask/dask-0.12.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/d/dask/dask-0.12.0-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..46b06c2e96 --- /dev/null +++ b/easybuild/easyconfigs/d/dask/dask-0.12.0-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,37 @@ +easyblock = 'Bundle' + +name = 'dask' +version = '0.12.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://github.com/dask/dask/' +description = """Dask provides multi-core execution on larger-than-memory datasets using blocked algorithms + and task scheduling.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [('Python', '3.5.2')] + +exts_list = [ + ('toolz', '0.8.0', { + 'source_urls': ['https://pypi.python.org/packages/source/t/toolz'], + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/d/dask'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/d/distributed/distributed-1.14.3-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/d/distributed/distributed-1.14.3-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..0e72d5ec34 --- /dev/null +++ b/easybuild/easyconfigs/d/distributed/distributed-1.14.3-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,68 @@ +easyblock = 'Bundle' + +name = 'distributed' +version = '1.14.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://distributed.readthedocs.io/' +description = """Dask.distributed is a lightweight library for distributed computing in Python. + It extends both the concurrent.futures and dask APIs to moderate sized clusters.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.12'), + ('dask', '0.12.0', versionsuffix), +] + +exts_list = [ + ('zict', '0.1.0', { + 'source_urls': ['https://pypi.python.org/packages/source/z/zict'], + }), + ('HeapDict', '1.0.0', { + 'source_urls': ['https://pypi.python.org/packages/source/H/HeapDict'], + 'modulename': 'heapdict', + }), + ('tornado', '4.4.2', { + 'source_urls': ['https://pypi.python.org/packages/source/t/tornado'], + }), + ('tblib', '1.3.0', { + 'source_urls': ['https://pypi.python.org/packages/source/t/tblib'], + }), + ('psutil', '5.0.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/psutil'], + 'source_tmpl': 'psutil-%(version)s.zip', + }), + ('msgpack-python', '0.4.8', { + 'source_urls': ['https://pypi.python.org/packages/source/m/msgpack-python'], + 'modulename': 'msgpack', + }), + ('locket', '0.2.0', { + 'source_urls': ['https://pypi.python.org/packages/source/l/locket'], + }), + ('cloudpickle', '0.2.1', { + 'source_urls': ['https://pypi.python.org/packages/source/c/cloudpickle'], + }), + ('click', '6.6', { + 'source_urls': ['https://pypi.python.org/packages/source/c/click'], + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/d/distributed'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['bin/dask-remote', 'bin/dask-scheduler', 'bin/dask-ssh', 'bin/dask-submit', 'bin/dask-worker', + 'bin/dcenter', 'bin/dcluster', 'bin/dscheduler', 'bin/dworker'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/d/distributed/distributed-1.14.3-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/d/distributed/distributed-1.14.3-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..82253f9f50 --- /dev/null +++ b/easybuild/easyconfigs/d/distributed/distributed-1.14.3-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,68 @@ +easyblock = 'Bundle' + +name = 'distributed' +version = '1.14.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://distributed.readthedocs.io/' +description = """Dask.distributed is a lightweight library for distributed computing in Python. + It extends both the concurrent.futures and dask APIs to moderate sized clusters.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '3.5.2'), + ('dask', '0.12.0', versionsuffix), +] + +exts_list = [ + ('zict', '0.1.0', { + 'source_urls': ['https://pypi.python.org/packages/source/z/zict'], + }), + ('HeapDict', '1.0.0', { + 'source_urls': ['https://pypi.python.org/packages/source/H/HeapDict'], + 'modulename': 'heapdict', + }), + ('tornado', '4.4.2', { + 'source_urls': ['https://pypi.python.org/packages/source/t/tornado'], + }), + ('tblib', '1.3.0', { + 'source_urls': ['https://pypi.python.org/packages/source/t/tblib'], + }), + ('psutil', '5.0.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/psutil'], + 'source_tmpl': 'psutil-%(version)s.zip', + }), + ('msgpack-python', '0.4.8', { + 'source_urls': ['https://pypi.python.org/packages/source/m/msgpack-python'], + 'modulename': 'msgpack', + }), + ('locket', '0.2.0', { + 'source_urls': ['https://pypi.python.org/packages/source/l/locket'], + }), + ('cloudpickle', '0.2.1', { + 'source_urls': ['https://pypi.python.org/packages/source/c/cloudpickle'], + }), + ('click', '6.6', { + 'source_urls': ['https://pypi.python.org/packages/source/c/click'], + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/d/distributed'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['bin/dask-remote', 'bin/dask-scheduler', 'bin/dask-ssh', 'bin/dask-submit', 'bin/dask-worker', + 'bin/dcenter', 'bin/dcluster', 'bin/dscheduler', 'bin/dworker'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'tools' -- GitLab From 8fc459db7adfcf411581059cc08d8dd262431ad1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 11:31:19 +0100 Subject: [PATCH 606/741] adding easyconfigs: pandas-0.19.1-intel-2016b-Python-2.7.12.eb, pandas-0.19.1-intel-2016b-Python-3.5.2.eb --- ...pandas-0.19.1-intel-2016b-Python-2.7.12.eb | 23 +++++++++++++++++++ .../pandas-0.19.1-intel-2016b-Python-3.5.2.eb | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 easybuild/easyconfigs/p/pandas/pandas-0.19.1-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/p/pandas/pandas-0.19.1-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/p/pandas/pandas-0.19.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/pandas/pandas-0.19.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..2d89267d1d --- /dev/null +++ b/easybuild/easyconfigs/p/pandas/pandas-0.19.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonPackage' + +name = 'pandas' +version = '0.19.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = "https://pypi.python.org/pypi/pandas/" +description = """pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures + and data analysis tools for the Python programming language.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '2.7.12')] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/pandas/pandas-0.19.1-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/pandas/pandas-0.19.1-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..15fd3118b3 --- /dev/null +++ b/easybuild/easyconfigs/p/pandas/pandas-0.19.1-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonPackage' + +name = 'pandas' +version = '0.19.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = "https://pypi.python.org/pypi/pandas/" +description = """pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures + and data analysis tools for the Python programming language.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [('Python', '3.5.2')] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' -- GitLab From 82f600675d3a5c72525c059dcfe015311070eeb6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 11:34:16 +0100 Subject: [PATCH 607/741] adding easyconfigs: IPython-5.1.0-intel-2016b-Python-3.5.2.eb, PyZMQ-15.4.0-intel-2016b-Python-3.5.2-zmq4.eb, entrypoints-0.2.2-intel-2016b-Python-3.5.2.eb, testpath-0.3-intel-2016b-Python-3.5.2.eb, path.py-8.2.1-intel-2016b-Python-3.5.2.eb, prompt-toolkit-1.0.6-intel-2016b-Python-3.5.2.eb, wcwidth-0.1.7-intel-2016b-Python-3.5.2.eb, configparser-3.5.0-intel-2016b-Python-3.5.2.eb --- ...igparser-3.5.0-intel-2016b-Python-3.5.2.eb | 32 ++++ ...rypoints-0.2.2-intel-2016b-Python-3.5.2.eb | 28 ++++ .../IPython-5.1.0-intel-2016b-Python-3.5.2.eb | 140 ++++++++++++++++++ ...MQ-15.4.0-intel-2016b-Python-3.5.2-zmq4.eb | 28 ++++ .../path.py-8.2.1-intel-2016b-Python-3.5.2.eb | 30 ++++ ...-toolkit-1.0.6-intel-2016b-Python-3.5.2.eb | 30 ++++ .../testpath-0.3-intel-2016b-Python-3.5.2.eb | 27 ++++ .../wcwidth-0.1.7-intel-2016b-Python-3.5.2.eb | 27 ++++ 8 files changed, 342 insertions(+) create mode 100644 easybuild/easyconfigs/c/configparser/configparser-3.5.0-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/e/entrypoints/entrypoints-0.2.2-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/p/PyZMQ/PyZMQ-15.4.0-intel-2016b-Python-3.5.2-zmq4.eb create mode 100644 easybuild/easyconfigs/p/path.py/path.py-8.2.1-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/p/prompt-toolkit/prompt-toolkit-1.0.6-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/t/testpath/testpath-0.3-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/w/wcwidth/wcwidth-0.1.7-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/c/configparser/configparser-3.5.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/c/configparser/configparser-3.5.0-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..e3bb6d9e20 --- /dev/null +++ b/easybuild/easyconfigs/c/configparser/configparser-3.5.0-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,32 @@ +easyblock = 'PythonPackage' + +name = 'configparser' +version = '3.5.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://docs.python.org/3/library/configparser.html' +description = "configparser is a Python library that brings the updated configparser from Python 3.5 to Python 2.6-3.5" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://pypi.python.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/'] +sources = ['configparser-%(version)s.tar.gz'] + +dependencies = [ + ('Python', '3.5.2'), +] + +use_pip = True +unpack_sources = False + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +sanity_check_commands = [ + ('python', "-c 'import configparser'"), + ('python', "-c 'from backports import configparser'"), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/e/entrypoints/entrypoints-0.2.2-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/e/entrypoints/entrypoints-0.2.2-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..af5414eaac --- /dev/null +++ b/easybuild/easyconfigs/e/entrypoints/entrypoints-0.2.2-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,28 @@ +easyblock = 'PythonPackage' + +name = 'entrypoints' +version = '0.2.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/takluyver/entrypoints' +description = """Entry points are a way for Python packages to advertise objects with some common interface.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://pypi.python.org/packages/f8/ad/0e77a853c745a15981ab51fa9a0cb4eca7a7a007b4c1970106ee6ba01e0c/'] +sources = ['entrypoints-0.2.2-py2.py3-none-any.whl'] + +dependencies = [ + ('Python', '3.5.2'), + ('configparser', '3.5.0', versionsuffix), +] + +use_pip = True +unpack_sources = False + +sanity_check_paths = { + 'files': ['lib/python%(pyshortver)s/site-packages/entrypoints.py'], + 'dirs': [] +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..c1cf49347e --- /dev/null +++ b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,140 @@ +easyblock = 'Bundle' + +name = 'IPython' +version = '5.1.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://ipython.org/index.html' +description = """IPython provides a rich architecture for interactive computing with: + Powerful interactive shells (terminal and Qt-based). + A browser-based notebook with support for code, text, mathematical expressions, inline plots and other rich media. + Support for interactive data visualization and use of GUI toolkits. + Flexible, embeddable interpreters to load into your own projects. + Easy to use, high performance tools for parallel computing.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +dependencies = [ + ('Python', '3.5.2'), + ('PyZMQ', '15.4.0', '%s-zmq4' % versionsuffix), + ('entrypoints', '0.2.2', versionsuffix), + ('testpath', '0.3', versionsuffix), + ('path.py', '8.2.1', versionsuffix), + ('prompt-toolkit', '1.0.6', versionsuffix), +] + +# this is a bundle of Python packages +# XXX: the wheel packages (testpath, entrypoints, path.py, prompt-toolkit) have +# to be included as dependencies because bundling wheels does not work +exts_defaultclass = 'PythonPackage' +exts_filter = ("python -c 'import %(ext_name)s'", '') + +exts_list = [ + ('nose', '1.3.7', { + 'source_urls': ['https://pypi.python.org/packages/source/n/nose/'], + }), + ('requests', '2.11.0', { + 'source_urls': ['https://pypi.python.org/packages/source/r/requests/'], + }), + ('nbformat', '4.1.0', { + 'source_urls': ['https://pypi.python.org/packages/source/n/nbformat/'], + }), + ('Pygments', '2.1.3', { + 'source_urls': ['https://pypi.python.org/packages/source/P/Pygments/'], + }), + ('singledispatch', '3.4.0.3', { + 'source_urls': ['https://pypi.python.org/packages/source/s/singledispatch/'], + }), + ('certifi', '2016.8.8', { + 'source_urls': ['https://pypi.python.org/packages/source/c/certifi/'], + }), + ('backports_abc', '0.4', { + 'source_urls': ['https://pypi.python.org/packages/source/b/backports_abc/'], + }), + ('tornado', '4.4.1', { + 'source_urls': ['https://pypi.python.org/packages/source/t/tornado/'], + }), + ('MarkupSafe', '0.23', { + 'source_urls': ['https://pypi.python.org/packages/source/M/MarkupSafe/'], + 'modulename': 'markupsafe', + }), + ('Jinja2', '2.8', { + 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'], + }), + ('jupyter_client', '4.3.0', { + 'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_client/'], + }), + ('jsonschema', '2.5.1', { + 'source_urls': ['https://pypi.python.org/packages/source/j/jsonschema/'], + }), + ('mistune', '0.7.3', { + 'source_urls': ['https://pypi.python.org/packages/source/m/mistune/'], + }), + ('ptyprocess', '0.5.1', { + 'source_urls': ['https://pypi.python.org/packages/source/p/ptyprocess/'], + }), + ('terminado', '0.6', { + 'source_urls': ['https://pypi.python.org/packages/source/t/terminado/'], + }), + ('setuptools', '25.2.0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/setuptools/'], + }), + ('simplegeneric', '0.8.1', { + 'source_urls': ['https://pypi.python.org/packages/source/s/simplegeneric/'], + 'source_tmpl': 'simplegeneric-%(version)s.zip', + }), + ('ipython_genutils', '0.1.0', { + 'source_urls': ['https://pypi.python.org/packages/source/i/ipython_genutils/'], + }), + ('pathlib2', '2.1.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pathlib2/'], + }), + ('pickleshare', '0.7.4', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pickleshare/'], + }), + ('traitlets', '4.2.2', { + 'source_urls': ['https://pypi.python.org/packages/source/t/traitlets/'], + }), + ('notebook', '4.2.2', { + 'source_urls': ['https://pypi.python.org/packages/source/n/notebook/'], + }), + ('jupyter_core', '4.1.1', { + 'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_core/'], + }), + ('ipykernel', '4.4.1', { + 'source_urls': ['https://pypi.python.org/packages/source/i/ipykernel/'], + }), + ('pexpect', '4.2.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/pexpect/'], + }), + ('nbconvert', '4.2.0', { + 'source_urls': ['https://pypi.python.org/packages/source/n/nbconvert/'], + }), + ('backports.shutil_get_terminal_size', '1.0.0', { + 'source_urls': ['https://pypi.python.org/packages/source/b/backports.shutil_get_terminal_size/'], + }), + ('decorator', '4.0.10', { + 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], + }), + ('ipython', version, { + 'source_urls': ['https://pypi.python.org/packages/source/i/ipython/'], + 'patches': ['ipython-5.0.0_fix-test-paths-symlink.patch'], + 'modulename': 'IPython', + }), +] + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +sanity_check_paths = { + 'files': ['bin/ipython'], + 'dirs': ['lib/python%(pyshortver)s/site-packages/IPython'], +} + +sanity_check_commands = [ + ('ipython -h', ''), + ('ipython notebook --help', ''), + ('iptest', ''), + ('iptest3', ''), +] + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/p/PyZMQ/PyZMQ-15.4.0-intel-2016b-Python-3.5.2-zmq4.eb b/easybuild/easyconfigs/p/PyZMQ/PyZMQ-15.4.0-intel-2016b-Python-3.5.2-zmq4.eb new file mode 100644 index 0000000000..f2cb970284 --- /dev/null +++ b/easybuild/easyconfigs/p/PyZMQ/PyZMQ-15.4.0-intel-2016b-Python-3.5.2-zmq4.eb @@ -0,0 +1,28 @@ +easyblock = 'PythonPackage' + +name = 'PyZMQ' +version = '15.4.0' +zmqversion = '4.1.5' +versionsuffix = '-Python-%%(pyver)s-zmq%s' % zmqversion.split('.')[0] + +homepage = 'http://www.zeromq.org/bindings:python' +description = """Python bindings for ZeroMQ""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_LOWER_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('Python', '3.5.2'), + ('ZeroMQ', zmqversion), +] + +options = {'modulename': 'zmq'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/zmq'], +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/p/path.py/path.py-8.2.1-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/path.py/path.py-8.2.1-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..f558dad06a --- /dev/null +++ b/easybuild/easyconfigs/p/path.py/path.py-8.2.1-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,30 @@ +easyblock = 'PythonPackage' + +name = 'path.py' +version = '8.2.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/jaraco/path.py' +description = """path.py is a Python library implementing path objects as first-class entities, + allowing common operations on files to be invoked on those path objects directly.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://pypi.python.org/packages/fc/fc/dcae2146aed6becbea77158eddb4e437718170efeade0f7fdf0aebe46b94/'] +sources = ['path.py-%(version)s-py2.py3-none-any.whl'] + +dependencies = [ + ('Python', '3.5.2'), +] + +use_pip = True +unpack_sources = False + +sanity_check_paths = { + 'files': ['lib/python%(pyshortver)s/site-packages/path.py'], + 'dirs': [], +} + +options = {'modulename': 'path'} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/p/prompt-toolkit/prompt-toolkit-1.0.6-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/prompt-toolkit/prompt-toolkit-1.0.6-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..6c89475fe0 --- /dev/null +++ b/easybuild/easyconfigs/p/prompt-toolkit/prompt-toolkit-1.0.6-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,30 @@ +easyblock = 'PythonPackage' + +name = 'prompt-toolkit' +version = '1.0.6' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/jonathanslenders/python-prompt-toolkit' +description = """prompt_toolkit is a Python library for building powerful interactive command lines and terminal applications.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://pypi.python.org/packages/eb/81/a7ad3c223f323d05381208c262889bd09577852bd5044a13965a9a13f5ed/'] +sources = ['prompt_toolkit-%(version)s-py3-none-any.whl'] + +dependencies = [ + ('Python', '3.5.2'), + ('wcwidth', '0.1.7', versionsuffix), +] + +use_pip = True +unpack_sources = False + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/prompt_toolkit'], +} + +options = {'modulename': 'prompt_toolkit'} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/t/testpath/testpath-0.3-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/t/testpath/testpath-0.3-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..9ba2836ed4 --- /dev/null +++ b/easybuild/easyconfigs/t/testpath/testpath-0.3-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'testpath' +version = '0.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/jupyter/testpath' +description = """Test utilities for code working with files and commands""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://pypi.python.org/packages/py2.py3/t/testpath/'] +sources = ['testpath-%(version)s-py2.py3-none-any.whl'] + +dependencies = [ + ('Python', '3.5.2'), +] + +use_pip = True +unpack_sources = False + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/testpath'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/w/wcwidth/wcwidth-0.1.7-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/w/wcwidth/wcwidth-0.1.7-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..b18845a3b4 --- /dev/null +++ b/easybuild/easyconfigs/w/wcwidth/wcwidth-0.1.7-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'wcwidth' +version = '0.1.7' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/jquast/wcwidth' +description = """wcwidth is a low-level Python library to simplify Terminal emulation.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://pypi.python.org/packages/7e/9f/526a6947247599b084ee5232e4f9190a38f398d7300d866af3ab571a5bfe/'] +sources = ['%(name)s-%(version)s-py2.py3-none-any.whl'] + +dependencies = [ + ('Python', '3.5.2'), +] + +use_pip = True +unpack_sources = False + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/wcwidth'], +} + +moduleclass = 'lib' -- GitLab From cae639ef81e135fa4af275585ae290faee94da95 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 11:39:49 +0100 Subject: [PATCH 608/741] bump Lmod test version to 6.6.3 since 6.6.2 was removed, also test against Lmod 7.0 --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 253f7f158c..13ca5c0612 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,10 @@ env: - ENV_MOD_VERSION=3.2.10 EASYBUILD_MODULES_TOOL=EnvironmentModulesC EASYBUILD_MODULE_SYNTAX=Tcl - LMOD_VERSION=5.8 - LMOD_VERSION=5.8 EASYBUILD_MODULE_SYNTAX=Lua - - LMOD_VERSION=6.6.2 - - LMOD_VERSION=6.6.2 EASYBUILD_MODULE_SYNTAX=Lua + - LMOD_VERSION=6.6.3 + - LMOD_VERSION=6.6.3 EASYBUILD_MODULE_SYNTAX=Lua + - LMOD_VERSION=7.0 + - LMOD_VERSION=7.0 EASYBUILD_MODULE_SYNTAX=Lua matrix: # mark build as finished as soon as job has failed fast_finish: true -- GitLab From 7364f1837a4681fcb19a3d6f32a456753e21a07c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 11:43:04 +0100 Subject: [PATCH 609/741] fix PyTables 3.3.0 version --- .../p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb | 2 +- .../p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb index affa66b440..e03818163d 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb @@ -1,7 +1,7 @@ easyblock = 'PythonPackage' name = 'PyTables' -version = '3.2.2' +version = '3.3.0' versionsuffix = '-Python-%(pyver)s' homepage = 'http://www.pytables.org' diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb index afe7cea34d..6465397fb5 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb @@ -1,7 +1,7 @@ easyblock = 'PythonPackage' name = 'PyTables' -version = '3.2.2' +version = '3.3.0' versionsuffix = '-Python-%(pyver)s' homepage = 'http://www.pytables.org' -- GitLab From 96f5c09498f56be335d8b3da3ae299d6a007b0ba Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Tue, 15 Nov 2016 00:01:47 +1100 Subject: [PATCH 610/741] Update Yasm-1.3.0-goolf-1.7.20.eb --- easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb b/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb index 250d77f32c..0e882e4bb6 100644 --- a/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb @@ -2,7 +2,6 @@ easyblock = 'ConfigureMake' name = 'Yasm' version = '1.3.0' -#versionsuffix = '-20141219' description = "Yasm-1.3.0: Complete rewrite of the NASM assembler with BSD license" @@ -14,9 +13,7 @@ homepage = 'http://www.tortall.net/projects/yasm/' toolchain = {'name': 'goolf', 'version': '1.7.20'} sanity_check_paths = { - 'files': [], ## fixme - 'dirs': ['.'], ## fixme + 'dirs': ['bin/yasm'] } -parallel = 1 # this is a very conservative choice ## fixme -moduleclass = 'base' # please change this from base to right category ## fixme +moduleclass = 'lang' -- GitLab From a340c5084e75c5ab3fdd524722990d78220adc7a Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Tue, 15 Nov 2016 00:05:52 +1100 Subject: [PATCH 611/741] Update Yasm-1.3.0-goolf-1.7.20.eb --- easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb b/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb index 0e882e4bb6..ac0261c145 100644 --- a/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb @@ -5,7 +5,7 @@ version = '1.3.0' description = "Yasm-1.3.0: Complete rewrite of the NASM assembler with BSD license" -sources = [SOURCE_TAR_GZ] +sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://www.tortall.net/projects/yasm/releases/'] homepage = 'http://www.tortall.net/projects/yasm/' -- GitLab From d1df2dedefa8fd4a6d91051e10b1443437e991ce Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Tue, 15 Nov 2016 00:17:25 +1100 Subject: [PATCH 612/741] Update Yasm-1.3.0-goolf-1.7.20.eb --- easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb b/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb index ac0261c145..09279b532a 100644 --- a/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/y/Yasm/Yasm-1.3.0-goolf-1.7.20.eb @@ -3,17 +3,17 @@ easyblock = 'ConfigureMake' name = 'Yasm' version = '1.3.0' +homepage = 'http://www.tortall.net/projects/yasm/' description = "Yasm-1.3.0: Complete rewrite of the NASM assembler with BSD license" sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://www.tortall.net/projects/yasm/releases/'] -homepage = 'http://www.tortall.net/projects/yasm/' - toolchain = {'name': 'goolf', 'version': '1.7.20'} sanity_check_paths = { - 'dirs': ['bin/yasm'] + 'files': ['bin/yasm'], + 'dirs': [], } moduleclass = 'lang' -- GitLab From b25cabd2ff04cb59a12f26a7e14b849af205c046 Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Tue, 15 Nov 2016 00:57:08 +1100 Subject: [PATCH 613/741] Update x264-20160304-goolf-1.7.20.eb --- easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb b/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb index de24dff5a1..ecc982b174 100644 --- a/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb @@ -5,7 +5,7 @@ version = '20160304' homepage = 'http://www.videolan.org/developers/x264.html' description = """x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 - AVC compression format, and is released under the terms of the GNU GPL.""" +AVC compression format, and is released under the terms of the GNU GPL.""" toolchain = {'name': 'goolf', 'version': '1.7.20'} -- GitLab From 6baaf48c2119e82e544f765adf5c1e3be6a940d3 Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Tue, 15 Nov 2016 01:09:29 +1100 Subject: [PATCH 614/741] Update x264-20160304-goolf-1.7.20.eb --- easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb b/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb index ecc982b174..063000f42c 100644 --- a/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb @@ -4,8 +4,7 @@ name = 'x264' version = '20160304' homepage = 'http://www.videolan.org/developers/x264.html' -description = """x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 -AVC compression format, and is released under the terms of the GNU GPL.""" +description = """x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format, and is released under the terms of the GNU GPL.""" toolchain = {'name': 'goolf', 'version': '1.7.20'} -- GitLab From 1d0ed982268eb9645c714e9ec194afe7219e8f1e Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 15:16:50 +0100 Subject: [PATCH 615/741] fix name of patch file for PyTables 3.3.0 --- .../p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb index 6465397fb5..076ef7198c 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb @@ -19,7 +19,7 @@ toolchainopts = {'usempi': True} source_urls = ['https://github.com/PyTables/PyTables/archive/'] sources = ['v.%(version)s.tar.gz'] -patches = ['%(name)s-%(version)s-fix-libs.patch'] +patches = ['pyTables-%(version)s-fix-libs.patch'] dependencies = [ ('Python', '3.5.2'), -- GitLab From 59a3c4de14880ac912fd7b7bc40d65ff6a889acd Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 15:18:38 +0100 Subject: [PATCH 616/741] adding easyconfigs: bokeh-0.12.3-intel-2016b-Python-2.7.12.eb, bokeh-0.12.3-intel-2016b-Python-3.5.2.eb, PyYAML-3.12-intel-2016b-Python-2.7.12.eb --- .../bokeh-0.12.3-intel-2016b-Python-2.7.12.eb | 45 +++++++++++++++++++ .../bokeh-0.12.3-intel-2016b-Python-3.5.2.eb | 45 +++++++++++++++++++ .../PyYAML-3.12-intel-2016b-Python-2.7.12.eb | 27 +++++++++++ 3 files changed, 117 insertions(+) create mode 100644 easybuild/easyconfigs/b/bokeh/bokeh-0.12.3-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/b/bokeh/bokeh-0.12.3-intel-2016b-Python-3.5.2.eb create mode 100644 easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/b/bokeh/bokeh-0.12.3-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/bokeh/bokeh-0.12.3-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..aa1cb3dc2c --- /dev/null +++ b/easybuild/easyconfigs/b/bokeh/bokeh-0.12.3-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,45 @@ +easyblock = 'Bundle' + +name = 'bokeh' +version = '0.12.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://github.com/bokeh/bokeh' +description = "Statistical and novel interactive HTML plots for Python" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.12'), + ('PyYAML', '3.12', versionsuffix), +] + +exts_list = [ + ('Jinja2', '2.8', { + 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2'], + }), + ('requests', '2.11.1', { + 'source_urls': ['https://pypi.python.org/packages/source/r/requests'], + }), + ('tornado', '4.4.2', { + 'source_urls': ['https://pypi.python.org/packages/source/t/tornado'], + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/b/bokeh'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['bin/bokeh', 'bin/bokeh-server'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/b/bokeh/bokeh-0.12.3-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/b/bokeh/bokeh-0.12.3-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..84e9ec4ffb --- /dev/null +++ b/easybuild/easyconfigs/b/bokeh/bokeh-0.12.3-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,45 @@ +easyblock = 'Bundle' + +name = 'bokeh' +version = '0.12.3' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://github.com/bokeh/bokeh' +description = "Statistical and novel interactive HTML plots for Python" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '3.5.2'), + ('PyYAML', '3.12', versionsuffix), +] + +exts_list = [ + ('Jinja2', '2.8', { + 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2'], + }), + ('requests', '2.11.1', { + 'source_urls': ['https://pypi.python.org/packages/source/r/requests'], + }), + ('tornado', '4.4.2', { + 'source_urls': ['https://pypi.python.org/packages/source/t/tornado'], + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/b/bokeh'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['bin/bokeh', 'bin/bokeh-server'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..72a7f70320 --- /dev/null +++ b/easybuild/easyconfigs/p/PyYAML/PyYAML-3.12-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,27 @@ +easyblock = 'PythonPackage' + +name = 'PyYAML' +version = '3.12' +versionsuffix = '-Python-%(pyver)s' + +homepage = "https://pypi.python.org/pypi/PyYAML/" +description = """PyYAML is a YAML parser and emitter for the Python programming language.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +dependencies = [ + ('Python', '2.7.12'), + ('libyaml', '0.1.6'), +] + +options = {'modulename': 'yaml'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' -- GitLab From d7bf1037dc22711f0bc0ce6901b135bcd13aadd5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 15:55:33 +0100 Subject: [PATCH 617/741] revert back name of PyTables patch file, correct source spec for PyTables v3.3.0 --- .../p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb | 2 +- .../p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb | 4 ++-- .../p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb | 2 +- ...les-3.2.2-fix-libs.patch => pyTables-3.2.2-fix-libs.patch} | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename easybuild/easyconfigs/p/PyTables/{PyTables-3.2.2-fix-libs.patch => pyTables-3.2.2-fix-libs.patch} (100%) diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb index 99a9cd56f0..51f246f954 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb @@ -19,7 +19,7 @@ toolchainopts = {'usempi': True} source_urls = ['https://github.com/PyTables/PyTables/archive/'] sources = ['v.%(version)s.tar.gz'] -patches = ['%(name)s-%(version)s-fix-libs.patch'] +patches = ['pyTables-%(version)s-fix-libs.patch'] dependencies = [ ('Python', '2.7.10'), diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb index e03818163d..76d729b7ce 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb @@ -17,9 +17,9 @@ toolchain = {'name': 'intel', 'version': '2016b'} toolchainopts = {'usempi': True} source_urls = ['https://github.com/PyTables/PyTables/archive/'] -sources = ['v.%(version)s.tar.gz'] +sources = ['v%(version)s.tar.gz'] -patches = ['%(name)s-3.2.2-fix-libs.patch'] +patches = ['pyTables-3.2.2-fix-libs.patch'] dependencies = [ ('Python', '2.7.12'), diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb index 076ef7198c..13bf11ff71 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb @@ -17,7 +17,7 @@ toolchain = {'name': 'intel', 'version': '2016b'} toolchainopts = {'usempi': True} source_urls = ['https://github.com/PyTables/PyTables/archive/'] -sources = ['v.%(version)s.tar.gz'] +sources = ['v%(version)s.tar.gz'] patches = ['pyTables-%(version)s-fix-libs.patch'] diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-fix-libs.patch b/easybuild/easyconfigs/p/PyTables/pyTables-3.2.2-fix-libs.patch similarity index 100% rename from easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-fix-libs.patch rename to easybuild/easyconfigs/p/PyTables/pyTables-3.2.2-fix-libs.patch -- GitLab From 6dc253d311b68b96565ec1c9d8eec112b6f17794 Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Tue, 15 Nov 2016 01:59:29 +1100 Subject: [PATCH 618/741] Update x264-20160304-goolf-1.7.20.eb --- easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb b/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb index 063000f42c..25aeefc81a 100644 --- a/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/x/x264/x264-20160304-goolf-1.7.20.eb @@ -4,7 +4,8 @@ name = 'x264' version = '20160304' homepage = 'http://www.videolan.org/developers/x264.html' -description = """x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format, and is released under the terms of the GNU GPL.""" +description = """x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 + AVC compression format, and is released under the terms of the GNU GPL.""" toolchain = {'name': 'goolf', 'version': '1.7.20'} -- GitLab From 9f5a322200a65ecbf390dc0275cd3fcebc373dd8 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 16:14:16 +0100 Subject: [PATCH 619/741] fix patch for PyTables 3.3.0 --- .../p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb index 13bf11ff71..23f78177a2 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb @@ -19,7 +19,7 @@ toolchainopts = {'usempi': True} source_urls = ['https://github.com/PyTables/PyTables/archive/'] sources = ['v%(version)s.tar.gz'] -patches = ['pyTables-%(version)s-fix-libs.patch'] +patches = ['pyTables-3.2.2-fix-libs.patch'] dependencies = [ ('Python', '3.5.2'), -- GitLab From e1d4ff136d18bc8be4373ac3c964c3c8df540d39 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 16:51:48 +0100 Subject: [PATCH 620/741] fix typo in PyTables easyconfig --- .../p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb index 51f246f954..554e1e9785 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.2.2-intel-2015b-Python-2.7.10.eb @@ -30,7 +30,7 @@ dependencies = [ sanity_check_paths = { 'files': ['bin/%s' % x for x in ['pt2to3', 'ptdump', 'ptrepack']], - 'dirs': ['lib/python%(pyshortver)ss/site-packages'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } options = {'modulename': 'tables'} -- GitLab From 0c2f40116b639d14b71a88e85f36e0e38e22d666 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 14 Nov 2016 18:27:37 +0100 Subject: [PATCH 621/741] add easyconfig lbzip2-2.5-goolf-1.7.20.eb --- .../l/lbzip2/lbzip2-2.5-goolf-1.7.20.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/l/lbzip2/lbzip2-2.5-goolf-1.7.20.eb diff --git a/easybuild/easyconfigs/l/lbzip2/lbzip2-2.5-goolf-1.7.20.eb b/easybuild/easyconfigs/l/lbzip2/lbzip2-2.5-goolf-1.7.20.eb new file mode 100644 index 0000000000..5abfa7b4da --- /dev/null +++ b/easybuild/easyconfigs/l/lbzip2/lbzip2-2.5-goolf-1.7.20.eb @@ -0,0 +1,27 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'ConfigureMake' + +name = 'lbzip2' +version = '2.5' + +homepage = 'http://lbzip2.org/' +description = """lbzip2 is a free, multi-threaded compression utility with support for bzip2 compressed file format""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} +toolchainopts = {'openmp': True} + +source_urls = ['http://archive.lbzip2.org/'] +sources = [SOURCELOWER_TAR_GZ] + +buildopts = ' check' + +sanity_check_paths = { + 'files': ['bin/lbunzip2', 'bin/lbzcat', 'bin/lbzip2'], + 'dirs': [], +} + +moduleclass = 'lib' -- GitLab From bf9d3c1eeea81eb8c9b1578c87256635482feb4b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 18:43:48 +0100 Subject: [PATCH 622/741] add LZO and Blosc as dependency in PyTables 3.3.0 easyconfigs --- .../b/Blosc/Blosc-1.11.1-intel-2016b.eb | 21 +++++++++++++ .../easyconfigs/l/LZO/LZO-2.09-intel-2016b.eb | 31 +++++++++++++++++++ ...yTables-3.3.0-intel-2016b-Python-2.7.12.eb | 2 ++ ...PyTables-3.3.0-intel-2016b-Python-3.5.2.eb | 2 ++ 4 files changed, 56 insertions(+) create mode 100644 easybuild/easyconfigs/b/Blosc/Blosc-1.11.1-intel-2016b.eb create mode 100644 easybuild/easyconfigs/l/LZO/LZO-2.09-intel-2016b.eb diff --git a/easybuild/easyconfigs/b/Blosc/Blosc-1.11.1-intel-2016b.eb b/easybuild/easyconfigs/b/Blosc/Blosc-1.11.1-intel-2016b.eb new file mode 100644 index 0000000000..088b4857b5 --- /dev/null +++ b/easybuild/easyconfigs/b/Blosc/Blosc-1.11.1-intel-2016b.eb @@ -0,0 +1,21 @@ +easyblock = 'CMakeMake' + +name = 'Blosc' +version = '1.11.1' + +homepage = 'http://www.blosc.org/' +description = "Blosc, an extremely fast, multi-threaded, meta-compressor library" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/Blosc/c-blosc/archive/'] +sources = ['v%(version)s.tar.gz'] + +builddependencies = [('CMake', '3.6.2')] + +sanity_check_paths = { + 'files': ['include/blosc-export.h', 'include/blosc.h', 'lib/libblosc.a', 'lib/libblosc.%s' % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/l/LZO/LZO-2.09-intel-2016b.eb b/easybuild/easyconfigs/l/LZO/LZO-2.09-intel-2016b.eb new file mode 100644 index 0000000000..6e7ff8a596 --- /dev/null +++ b/easybuild/easyconfigs/l/LZO/LZO-2.09-intel-2016b.eb @@ -0,0 +1,31 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +## + +easyblock = 'ConfigureMake' + +name = 'LZO' +version = '2.09' + +homepage = 'http://www.oberhumer.com/opensource/lzo/' +description = "LZO-2.06: Portable lossless data compression library" + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [homepage + 'download/'] + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +runtest = 'test' + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib', 'include'] +} + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb index 76d729b7ce..bb3c5f680e 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-2.7.12.eb @@ -25,6 +25,8 @@ dependencies = [ ('Python', '2.7.12'), ('numexpr', '2.6.1', versionsuffix), ('HDF5', '1.8.17'), + ('LZO', '2.09'), + ('Blosc', '1.11.1'), ] sanity_check_paths = { diff --git a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb index 23f78177a2..28dfb8ca71 100644 --- a/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/p/PyTables/PyTables-3.3.0-intel-2016b-Python-3.5.2.eb @@ -25,6 +25,8 @@ dependencies = [ ('Python', '3.5.2'), ('numexpr', '2.6.1', versionsuffix), ('HDF5', '1.8.17'), + ('LZO', '2.09'), + ('Blosc', '1.11.1'), ] sanity_check_paths = { -- GitLab From 231c50d2af2463302730ff883bc04d0e957dc29b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 18:53:27 +0100 Subject: [PATCH 623/741] remove backports extensions from IPython 5.1.0 easyconfig --- .../i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb index c1cf49347e..c7fa3c0a41 100644 --- a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb @@ -48,9 +48,6 @@ exts_list = [ ('certifi', '2016.8.8', { 'source_urls': ['https://pypi.python.org/packages/source/c/certifi/'], }), - ('backports_abc', '0.4', { - 'source_urls': ['https://pypi.python.org/packages/source/b/backports_abc/'], - }), ('tornado', '4.4.1', { 'source_urls': ['https://pypi.python.org/packages/source/t/tornado/'], }), @@ -110,9 +107,6 @@ exts_list = [ ('nbconvert', '4.2.0', { 'source_urls': ['https://pypi.python.org/packages/source/n/nbconvert/'], }), - ('backports.shutil_get_terminal_size', '1.0.0', { - 'source_urls': ['https://pypi.python.org/packages/source/b/backports.shutil_get_terminal_size/'], - }), ('decorator', '4.0.10', { 'source_urls': ['https://pypi.python.org/packages/source/d/decorator/'], }), -- GitLab From 5a937cdb96c267b5c273ab6e2a4d8385df2bc85a Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 18:55:49 +0100 Subject: [PATCH 624/741] consistently apply patch for ncurses 6.0 --- easybuild/easyconfigs/n/ncurses/ncurses-6.0-CrayGNU-2016.03.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCC-4.9.3-2.25.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCCcore-4.9.3.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0-GNU-4.9.3-2.25.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016a.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016b.eb | 2 ++ .../easyconfigs/n/ncurses/ncurses-6.0-intel-2016.02-GCC-4.9.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016a.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016b.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb | 2 ++ .../n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb | 2 ++ easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb | 2 ++ 12 files changed, 24 insertions(+) diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-CrayGNU-2016.03.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-CrayGNU-2016.03.eb index e38323ffda..307af92999 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-CrayGNU-2016.03.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-CrayGNU-2016.03.eb @@ -14,6 +14,8 @@ toolchainopts = {'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCC-4.9.3-2.25.eb index 02e4aae6ca..7d6659abd1 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCC-4.9.3-2.25.eb @@ -14,6 +14,8 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCCcore-4.9.3.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCCcore-4.9.3.eb index eab9da36db..52110246d2 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GCCcore-4.9.3.eb @@ -14,6 +14,8 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + builddependencies = [('binutils', '2.25')] configopts = [ diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GNU-4.9.3-2.25.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GNU-4.9.3-2.25.eb index 4012f0e69b..c1921a50bf 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GNU-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-GNU-4.9.3-2.25.eb @@ -14,6 +14,8 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016a.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016a.eb index 6029357e96..8036d044c2 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016a.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016a.eb @@ -14,6 +14,8 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016b.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016b.eb index c9773784c0..2e3653e592 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016b.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-foss-2016b.eb @@ -14,6 +14,8 @@ toolchainopts = {'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016.02-GCC-4.9.eb index 7c1c8c34c6..06011329cd 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016.02-GCC-4.9.eb @@ -14,6 +14,8 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016a.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016a.eb index 852b0df6bb..ae49053391 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016a.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016a.eb @@ -14,6 +14,8 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016b.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016b.eb index 2744e32733..d3393acd54 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016b.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-intel-2016b.eb @@ -14,6 +14,8 @@ toolchainopts = {'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb index 77201153ed..98a4144e52 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.07.eb @@ -14,6 +14,8 @@ toolchainopts = {'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb index ab17db8531..12229c25b5 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -14,6 +14,8 @@ toolchainopts = {'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite', diff --git a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb index dcca941e16..ce06be716d 100644 --- a/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb +++ b/easybuild/easyconfigs/n/ncurses/ncurses-6.0.eb @@ -14,6 +14,8 @@ toolchainopts = {'optarch': True, 'pic': True} source_urls = [GNU_SOURCE] sources = [SOURCE_TAR_GZ] +patches = ['ncurses-%(version)s_gcc-5.patch'] + configopts = [ # default build '--with-shared --enable-overwrite --with-termlib', -- GitLab From b9ad02dbef6147ce8c5c946a425cf74e74e3bb9c Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Mon, 14 Nov 2016 13:00:42 -0500 Subject: [PATCH 625/741] Eliminate dependency on mpi-mic-rt in ifort. This dependency causes Intel mpirun/mpiexec to be added to $PATH when the ifort module is loaded, which is not always desirable, for instance when OpenMPI is already loaded. Fixes hpcugent/easybuild-easyblocks#1032. --- easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb | 3 +++ .../i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb | 3 +++ .../i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb | 3 +++ .../i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb | 3 +++ .../i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb | 3 +++ .../i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb | 3 +++ .../i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb | 3 +++ .../i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb | 3 +++ .../i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb | 3 +++ .../i/ifort/ifort_2017_no_mpi_mic_dependency.patch | 13 +++++++++++++ 10 files changed, 40 insertions(+) create mode 100644 easybuild/easyconfigs/i/ifort/ifort_2017_no_mpi_mic_dependency.patch diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb index c64470205a..a32c4d179f 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran.tg checksums = ['bce7f6a71f7e44f67956197501d00b7c'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2016_no_mpi_mic_dependency.patch'] + # list of regex for components to install # full list of components can be obtained from pset/mediaconfig.xml in unpacked sources # cfr. https://software.intel.com/en-us/articles/intel-composer-xe-2015-silent-installation-guide diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb index aee6ae915e..bb6bb39f91 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran_up checksums = ['1e848c8283cf6a0210bce1d35ecd748b'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2016_no_mpi_mic_dependency.patch'] + gccver = '4.9.3' binutilsver = '2.25' versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb index ffe995c4ac..37686bf975 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran_up checksums = ['70e88db11efc59b1d8ff8b5aadf50f7f'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2016_no_mpi_mic_dependency.patch'] + gccver = '4.9.3' binutilsver = '2.25' versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb index 5844c8abd9..725d9d95e7 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran_up checksums = ['70e88db11efc59b1d8ff8b5aadf50f7f'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2016_no_mpi_mic_dependency.patch'] + gccver = '5.3.0' binutilsver = '2.26' versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb index 303793bfad..8699c5d00e 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran_up checksums = ['70cf1ea91280e3e8ba4bc216bae63e4a'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2016_no_mpi_mic_dependency.patch'] + gccver = '4.9.3' binutilsver = '2.25' versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb index b354753609..40c33c4e59 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran_up checksums = ['70cf1ea91280e3e8ba4bc216bae63e4a'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2016_no_mpi_mic_dependency.patch'] + gccver = '5.3.0' binutilsver = '2.26' versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb index 29953965f2..33422fe405 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran_up checksums = ['70cf1ea91280e3e8ba4bc216bae63e4a'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2016_no_mpi_mic_dependency.patch'] + gccver = '5.4.0' binutilsver = '2.26' versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb index 9f30cbac75..a41293232b 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran.tg checksums = ['8787795951fe10f90ce7dcdcec1b9341'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2017_no_mpi_mic_dependency.patch'] + gccver = '5.4.0' binutilsver = '2.26' versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb index a400dd9f38..4493fad0d2 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -12,6 +12,9 @@ sources = ['parallel_studio_xe_%(version_major)s_update%(version_minor)s_compose checksums = ['612169f4b40cdded8e212bf097925e4f'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2017_no_mpi_mic_dependency.patch'] + gccver = '5.4.0' binutilsver = '2.26' versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/ifort/ifort_2017_no_mpi_mic_dependency.patch b/easybuild/easyconfigs/i/ifort/ifort_2017_no_mpi_mic_dependency.patch new file mode 100644 index 0000000000..8d3929a0f5 --- /dev/null +++ b/easybuild/easyconfigs/i/ifort/ifort_2017_no_mpi_mic_dependency.patch @@ -0,0 +1,13 @@ +Eliminate dependency on intel-mpi-rt-mic which in turn brings in intel-mpi-rt. +author: Bart Oldeman (McGill HPC) +--- pset/mediaconfig.xml.orig 2016-10-20 09:02:57.000000000 +0000 ++++ pset/mediaconfig.xml 2016-11-11 20:09:08.084892189 +0000 +@@ -1551,7 +1551,7 @@ + ${BUNDLE_MAPFILE_DIR} + ${BUNDLE_CHKLIC_IA32} + +- ++ + Intel Fortran Compiler for Intel(R) 64 + Intel(R) Fortran Compiler 17.0 Update 1 + インテル(R) Fortran コンパイラー (インテル(R) 64) -- GitLab From dd1b6d3c2c2822fe53e86ba55c87c7f3c6b4f767 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 19:48:40 +0100 Subject: [PATCH 626/741] include Autotools as build dependency in all beagle-lib and MrBayes easyconfigs --- .../Autotools/Autotools-20150215-intel-2015a.eb | 17 +++++++++++++++++ .../beagle-lib-20120124-goolf-1.4.10.eb | 2 ++ .../beagle-lib-20120124-ictce-5.3.0.eb | 2 ++ .../beagle-lib-20141202-intel-2015a.eb | 6 ++---- .../l/libtool/libtool-2.4.6-intel-2015a.eb | 17 +++++++++++++++++ .../m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb | 9 +++++++-- .../m/MrBayes/MrBayes-3.1.2-ictce-5.3.0.eb | 9 ++++++--- .../m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb | 9 +++++++-- .../m/MrBayes/MrBayes-3.2.0-ictce-5.3.0.eb | 9 ++++++--- .../m/MrBayes/MrBayes-3.2.5-intel-2015a.eb | 8 ++++++-- .../m/MrBayes/MrBayes-3.2.6-foss-2016a.eb | 6 +++--- 11 files changed, 75 insertions(+), 19 deletions(-) create mode 100644 easybuild/easyconfigs/a/Autotools/Autotools-20150215-intel-2015a.eb create mode 100644 easybuild/easyconfigs/l/libtool/libtool-2.4.6-intel-2015a.eb diff --git a/easybuild/easyconfigs/a/Autotools/Autotools-20150215-intel-2015a.eb b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-intel-2015a.eb new file mode 100644 index 0000000000..33124456f6 --- /dev/null +++ b/easybuild/easyconfigs/a/Autotools/Autotools-20150215-intel-2015a.eb @@ -0,0 +1,17 @@ +easyblock = 'Bundle' + +name = 'Autotools' +version = '20150215' # date of the most recent change + +homepage = 'http://autotools.io' +description = """This bundle collect the standard GNU build tools: Autoconf, Automake and libtool""" + +toolchain = {'name': 'intel', 'version': '2015a'} + +dependencies = [ + ('Autoconf', '2.69'), # 20120424 + ('Automake', '1.15'), # 20150105 + ('libtool', '2.4.6'), # 20150215 +] + +moduleclass = 'devel' diff --git a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb b/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb index f54d71284a..bd2ca1ddb3 100644 --- a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb @@ -18,6 +18,8 @@ sources = [SOURCE_TGZ] dependencies = [('Java', '1.7.0_15', '', True)] +builddependencies = [('Autotools', '20150215')] + patches = ['beagle-lib-20120124_GCC-4.7.patch'] # parallel build does not work diff --git a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-ictce-5.3.0.eb b/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-ictce-5.3.0.eb index d4fc0c8fee..6d20b44133 100644 --- a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-ictce-5.3.0.eb @@ -16,6 +16,8 @@ sources = [SOURCE_TGZ] dependencies = [('Java', '1.7.0_15', '', True)] +builddependencies = [('Autotools', '20150215')] + # parallel build does not work parallel = 1 diff --git a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20141202-intel-2015a.eb b/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20141202-intel-2015a.eb index cc7febf444..0349d94e2a 100644 --- a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20141202-intel-2015a.eb +++ b/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20141202-intel-2015a.eb @@ -15,10 +15,8 @@ toolchain = {'name': 'intel', 'version': '2015a'} # svn checkout http://beagle-lib.googlecode.com/svn/trunk/ beagle-lib sources = [SOURCE_TGZ] -dependencies = [ - ('Java', '1.8.0_31', '', True), - ('Autoconf', '2.69') -] +dependencies = [('Java', '1.8.0_31', '', True)] +builddependencies = [('Autotools', '20150215')] preconfigopts = './autogen.sh && ' diff --git a/easybuild/easyconfigs/l/libtool/libtool-2.4.6-intel-2015a.eb b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-intel-2015a.eb new file mode 100644 index 0000000000..32d19e0439 --- /dev/null +++ b/easybuild/easyconfigs/l/libtool/libtool-2.4.6-intel-2015a.eb @@ -0,0 +1,17 @@ +easyblock = 'ConfigureMake' + +name = 'libtool' +version = '2.4.6' + +homepage = 'http://www.gnu.org/software/libtool' +description = """GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries + behind a consistent, portable interface.""" + +toolchain = {'name': 'intel', 'version': '2015a'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +dependencies = [('M4', '1.4.17')] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb index faf00e5014..34b25f1567 100644 --- a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb @@ -3,15 +3,20 @@ version = '3.1.2' homepage = 'http://mrbayes.csit.fsu.edu' description = "MrBayes is a program for the Bayesian estimation of phylogeny." + toolchain = {'name': 'goolf', 'version': '1.4.10'} -toolchainopts = {'optarch': True, 'usempi': True} +toolchainopts = {'usempi': True} +source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCELOWER_TAR_GZ] -source_urls = ["http://downloads.sourceforge.net/project/mrbayes/mrbayes/%s" % (version)] dependencies = [ ('libreadline', '6.2'), ('ncurses', '5.9'), ] +builddependencies = [ + ('Autotools', '20150215'), +] + moduleclass = 'bio' diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-ictce-5.3.0.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-ictce-5.3.0.eb index 72d2021690..3e3e9603f2 100644 --- a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-ictce-5.3.0.eb @@ -4,16 +4,19 @@ version = '3.1.2' homepage = 'http://mrbayes.csit.fsu.edu' description = "MrBayes is a program for the Bayesian estimation of phylogeny." - toolchain = {'name': 'ictce', 'version': '5.3.0'} -toolchainopts = {'optarch': True, 'usempi': True} +toolchainopts = {'usempi': True} +source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCELOWER_TAR_GZ] -source_urls = ["http://downloads.sourceforge.net/project/mrbayes/mrbayes/%s" % (version)] dependencies = [ ('libreadline', '6.2'), ('ncurses', '5.9'), ] +builddependencies = [ + ('Autotools', '20150215'), +] + moduleclass = 'bio' diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb index a474900368..40b01594a5 100644 --- a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb @@ -3,15 +3,20 @@ version = '3.2.0' homepage = 'http://mrbayes.csit.fsu.edu' description = "MrBayes is a program for the Bayesian estimation of phylogeny." + toolchain = {'name': 'goolf', 'version': '1.4.10'} -toolchainopts = {'optarch': True, 'usempi': True} +toolchainopts = {'usempi': True} +source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCELOWER_TAR_GZ] -source_urls = ["http://downloads.sourceforge.net/project/mrbayes/mrbayes/%s" % (version)] dependencies = [ ('beagle-lib', '20120124'), ('libreadline', '6.2'), ] +builddependencies = [ + ('Autotools', '20150215'), +] + moduleclass = 'bio' diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-ictce-5.3.0.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-ictce-5.3.0.eb index 7ac8ffef36..79d0b7f304 100644 --- a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-ictce-5.3.0.eb @@ -4,16 +4,19 @@ version = '3.2.0' homepage = 'http://mrbayes.csit.fsu.edu' description = "MrBayes is a program for the Bayesian estimation of phylogeny." - toolchain = {'name': 'ictce', 'version': '5.3.0'} -toolchainopts = {'optarch': True, 'usempi': True} +toolchainopts = {'usempi': True} +source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCELOWER_TAR_GZ] -source_urls = ["http://downloads.sourceforge.net/project/mrbayes/mrbayes/%s" % (version)] dependencies = [ ('beagle-lib', '20120124'), ('libreadline', '6.2'), ] +builddependencies = [ + ('Autotools', '20150215'), +] + moduleclass = 'bio' diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.5-intel-2015a.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.5-intel-2015a.eb index 5836ec7f0f..421c44d0e5 100644 --- a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.5-intel-2015a.eb +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.5-intel-2015a.eb @@ -5,14 +5,18 @@ homepage = 'http://mrbayes.csit.fsu.edu' description = "MrBayes is a program for the Bayesian estimation of phylogeny." toolchain = {'name': 'intel', 'version': '2015a'} -toolchainopts = {'optarch': True, 'usempi': True} +toolchainopts = {'usempi': True} +source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCELOWER_TAR_GZ] -source_urls = ["http://downloads.sourceforge.net/project/mrbayes/mrbayes/%(version)s"] dependencies = [ ('beagle-lib', '20141202'), ('libreadline', '6.3'), ] +builddependencies = [ + ('Autotools', '20150215'), +] + moduleclass = 'bio' diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.6-foss-2016a.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.6-foss-2016a.eb index 03307965e4..e098f7c88a 100644 --- a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.6-foss-2016a.eb +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.6-foss-2016a.eb @@ -5,10 +5,10 @@ homepage = 'http://mrbayes.csit.fsu.edu' description = "MrBayes is a program for the Bayesian estimation of phylogeny." toolchain = {'name': 'foss', 'version': '2016a'} -toolchainopts = {'optarch': True, 'usempi': True} +toolchainopts = {'usempi': True} +source_urls = [SOURCEFORGE_SOURCE] sources = [SOURCELOWER_TAR_GZ] -source_urls = ["http://downloads.sourceforge.net/project/mrbayes/mrbayes/%(version)s"] dependencies = [ ('beagle-lib', '2.1.2'), @@ -16,7 +16,7 @@ dependencies = [ ] builddependencies = [ - ('Autoconf', '2.69'), + ('Autotools', '20150215'), ] moduleclass = 'bio' -- GitLab From cf10326c6a25733f6866ad4ade149d4596bd32e4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 22:10:26 +0100 Subject: [PATCH 627/741] use Autotools built with GCC/4.7.2 toolchain as build dep for MrBayes/beagle-lib --- .../b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb | 2 +- easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb | 2 +- easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb b/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb index bd2ca1ddb3..eba16d5a4e 100644 --- a/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/b/beagle-lib/beagle-lib-20120124-goolf-1.4.10.eb @@ -18,7 +18,7 @@ sources = [SOURCE_TGZ] dependencies = [('Java', '1.7.0_15', '', True)] -builddependencies = [('Autotools', '20150215')] +builddependencies = [('Autotools', '20150215', '', ('GCC', '4.7.2'))] patches = ['beagle-lib-20120124_GCC-4.7.patch'] diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb index 34b25f1567..85b5fe929e 100644 --- a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.1.2-goolf-1.4.10.eb @@ -16,7 +16,7 @@ dependencies = [ ] builddependencies = [ - ('Autotools', '20150215'), + ('Autotools', '20150215', '', ('GCC', '4.7.2')), ] moduleclass = 'bio' diff --git a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb index 40b01594a5..1ebf8b83b4 100644 --- a/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/m/MrBayes/MrBayes-3.2.0-goolf-1.4.10.eb @@ -16,7 +16,7 @@ dependencies = [ ] builddependencies = [ - ('Autotools', '20150215'), + ('Autotools', '20150215', '', ('GCC', '4.7.2')), ] moduleclass = 'bio' -- GitLab From 60ba248bffea0f38aed8e33f2b915211ac50ee97 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 22:37:40 +0100 Subject: [PATCH 628/741] consistently make OpenBLAS use specified LAPACK version for versions 0.2.18 & 0.2.19 --- .../OpenBLAS-0.2.18-GCC-5.3.0-2.26-LAPACK-3.6.0.eb | 8 ++++++-- .../OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.0.eb | 8 ++++++-- .../OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb | 2 +- .../OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb | 2 +- .../OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb | 2 +- .../OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb | 8 ++++++-- 6 files changed, 21 insertions(+), 9 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.3.0-2.26-LAPACK-3.6.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.3.0-2.26-LAPACK-3.6.0.eb index d8f2e33a19..9dd493110f 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.3.0-2.26-LAPACK-3.6.0.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.3.0-2.26-LAPACK-3.6.0.eb @@ -14,9 +14,14 @@ toolchain = {'name': 'GCC', 'version': '5.3.0-2.26'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' + +lapack_unpack_cmd = 'cd %(name)s-%(version)s; rm -rf lapack-netlib;' +lapack_unpack_cmd += 'mkdir lapack-netlib;' +lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' + sources = [ 'v%(version)s.tar.gz', - lapack_src, + (lapack_src, lapack_unpack_cmd), large_src, timing_src, ] @@ -28,7 +33,6 @@ source_urls = [ ] patches = [ - (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir (large_src, '.'), (timing_src, '.'), ] diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.0.eb index 09e78a78ca..3879abb7bd 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.0.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.0.eb @@ -14,9 +14,14 @@ toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' + +lapack_unpack_cmd = 'cd %(name)s-%(version)s; rm -rf lapack-netlib;' +lapack_unpack_cmd += 'mkdir lapack-netlib;' +lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' + sources = [ 'v%(version)s.tar.gz', - lapack_src, + (lapack_src, lapack_unpack_cmd), large_src, timing_src, ] @@ -28,7 +33,6 @@ source_urls = [ ] patches = [ - (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir (large_src, '.'), (timing_src, '.'), ] diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb index eb1d2f67c9..21a2a7c815 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-5.4.0-2.26-LAPACK-3.6.1.eb @@ -15,7 +15,7 @@ lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' -lapack_unpack_cmd = 'cd %s-%s; rm -rf lapack-netlib;' % (name, version) +lapack_unpack_cmd = 'cd %(name)s-%(version)s; rm -rf lapack-netlib;' lapack_unpack_cmd += 'mkdir lapack-netlib;' lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb index 35ba0998f3..80a706fa33 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-gompi-2016.07-LAPACK-3.6.1.eb @@ -15,7 +15,7 @@ lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' -lapack_unpack_cmd = 'cd %s-%s; rm -rf lapack-netlib;' % (name, version) +lapack_unpack_cmd = 'cd %(name)s-%(version)s; rm -rf lapack-netlib;' lapack_unpack_cmd += 'mkdir lapack-netlib;' lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb index 0755e77fbc..0978b24ced 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompi-2016.09-LAPACK-3.6.1.eb @@ -15,7 +15,7 @@ lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' -lapack_unpack_cmd = 'cd %s-%s; rm -rf lapack-netlib;' % (name, version) +lapack_unpack_cmd = 'cd %(name)s-%(version)s; rm -rf lapack-netlib;' lapack_unpack_cmd += 'mkdir lapack-netlib;' lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb index 0102d20b13..55794b4474 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.19-gompic-2016.10-LAPACK-3.6.1.eb @@ -14,9 +14,14 @@ toolchain = {'name': 'gompic', 'version': '2016.10'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' + +lapack_unpack_cmd = 'cd %(name)s-%(version)s; rm -rf lapack-netlib;' +lapack_unpack_cmd += 'mkdir lapack-netlib;' +lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' + sources = [ 'v%(version)s.tar.gz', - lapack_src, + (lapack_src, lapack_unpack_cmd), large_src, timing_src, ] @@ -28,7 +33,6 @@ source_urls = [ ] patches = [ - (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir (large_src, '.'), (timing_src, '.'), ] -- GitLab From a6988303075209a266a8274b42cae137e307285c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 23:19:09 +0100 Subject: [PATCH 629/741] sync OpenBLAS easyconfig with #3795 --- .../OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb index 5a0c375e93..abbe566e01 100644 --- a/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb +++ b/easybuild/easyconfigs/o/OpenBLAS/OpenBLAS-0.2.18-GCC-4.9.4-2.25-LAPACK-3.6.0.eb @@ -14,9 +14,14 @@ toolchain = {'name': 'GCC', 'version': '4.9.4-2.25'} lapack_src = 'lapack-%s.tgz' % lapackver large_src = 'large.tgz' timing_src = 'timing.tgz' + +lapack_unpack_cmd = 'cd %(name)s-%(version)s; rm -rf lapack-netlib;' +lapack_unpack_cmd += 'mkdir lapack-netlib;' +lapack_unpack_cmd += 'tar -C lapack-netlib --strip-components=1 -zxf %s; cd -' + sources = [ 'v%(version)s.tar.gz', - lapack_src, + (lapack_src, lapack_unpack_cmd), large_src, timing_src, ] @@ -28,7 +33,6 @@ source_urls = [ ] patches = [ - (lapack_src, '.'), # copy LAPACK tarball to unpacked OpenBLAS dir (large_src, '.'), (timing_src, '.'), ] -- GitLab From e8fd6a87f7465e1d7f269aa82468c9f9827169a6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 23:27:02 +0100 Subject: [PATCH 630/741] correctly update $CPATH in libxml2 easyconfig --- easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb index 54c5dad803..e1e1cbadae 100644 --- a/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb +++ b/easybuild/easyconfigs/l/libxml2/libxml2-2.9.2-goolf-1.5.16.eb @@ -26,4 +26,6 @@ sanity_check_paths = { 'dirs': ['bin', 'include/libxml2/libxml'], } +modextrapaths = {'CPATH': ['include/libxml2']} + moduleclass = 'lib' -- GitLab From 60aaae03fc867e054deeeac601fbc04dd1e2bcfc Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 14 Nov 2016 23:44:31 +0100 Subject: [PATCH 631/741] include original download URL for ISL source tarball --- easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb | 1 + easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb | 1 + easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb | 1 + easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb | 2 +- easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb | 1 + easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb | 1 + 20 files changed, 20 insertions(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb index 97ecab725e..51246f2bf5 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.1-CLooG.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_GZ, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb index 0cc4d2d8be..497c0a4c85 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG-multilib.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_GZ, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb index 76ee08688e..c0547aecc5 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.2-CLooG.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_GZ, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb index 8f71a86f5f..6e2d418981 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.3-CLooG-multilib.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_GZ, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb index a553c070ef..36f8d8681c 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG-multilib.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_GZ, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb index 7dd0f5df24..848f51df6b 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.8.4-CLooG.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_GZ, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb index f77a70efc3..799e61d8cc 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG-multilib.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_BZ2, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb index 9974833bba..fc3c2e200b 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.0-CLooG.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_BZ2, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb index a3c67d644e..ae2943aa4a 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG-multilib.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_BZ2, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb index b78ac53014..b25525fd47 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.1-CLooG.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_BZ2, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb index 0906283ab2..93f5790d42 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG-multilib.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_BZ2, diff --git a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb index 1af6bd9c36..4745dd6247 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-4.9.2-CLooG.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.bastoul.net/cloog/pages/download/', # CLooG official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ SOURCELOWER_TAR_BZ2, diff --git a/easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb b/easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb index 8bbf0ea88e..efb1b05bd5 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-5.1.0-binutils-2.25.eb @@ -19,6 +19,7 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ diff --git a/easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb b/easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb index a69c58da2c..4a102e1afe 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-5.1.0.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ diff --git a/easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb b/easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb index c25b63f7b1..28110f5c07 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-5.2.0.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ diff --git a/easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb b/easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb index 83ebb4cb78..58026e971a 100644 --- a/easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb +++ b/easybuild/easyconfigs/g/GCC/GCC-5.3.0.eb @@ -16,6 +16,7 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb index 1f2fc04edb..151877d38d 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.3.0.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb index ac9aa8567c..e03a15a183 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-5.4.0.eb @@ -18,7 +18,7 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies - 'http://isl.gforge.inria.fr/', # original HTTP source for ISL (isl-0.15.tar.bz2) dependency + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb index 5b9af4041a..908db129dc 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.1.0.eb @@ -19,6 +19,7 @@ source_urls = [ 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies 'http://ftpmirror.gnu.org/gcc/gcc-%(version)s', # GCC auto-resolving HTTP mirror 'https://ftp.gnu.org/gnu/gcc/gcc-%(version)s/', # Alternative GCC + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ diff --git a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb index a375f0e539..88ea84242b 100644 --- a/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb +++ b/easybuild/easyconfigs/g/GCCcore/GCCcore-6.2.0.eb @@ -18,6 +18,7 @@ source_urls = [ 'http://www.multiprecision.org/mpc/download', # MPC official 'ftp://gcc.gnu.org/pub/gcc/infrastructure/', # GCC dependencies 'http://gcc.cybermirror.org/infrastructure/', # HTTP mirror for GCC dependencies + 'http://isl.gforge.inria.fr/', # original HTTP source for ISL ] sources = [ -- GitLab From 957c1c35bb24f15e88cbb1a1c7ca57d5c438245d Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 00:00:29 +0100 Subject: [PATCH 632/741] fix/sync copyright/author headers in GROMACS 2016 easyconfigs --- .../GROMACS/GROMACS-2016-foss-2016b-hybrid.eb | 11 ++++------- .../g/GROMACS/GROMACS-2016-foss-2016b-mt.eb | 19 ++++++++----------- 2 files changed, 12 insertions(+), 18 deletions(-) diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb index be709c1c8d..f72c224d32 100644 --- a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb +++ b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-hybrid.eb @@ -1,18 +1,15 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Copyright:: Copyright 2012-2016 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University / The Francis Crick Institute +# Copyright:: Copyright 2012-2016 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, +# Ghent University / The Francis Crick Institute # Authors:: -# * Wiktor Jurkowski -# * Fotis Georgatos +# * Wiktor Jurkowski +# * Fotis Georgatos # * George Tsouloupas # * Kenneth Hoste # * Adam Huffman # License:: MIT/GPL -# -# Version 5.1.4 -# Author: Adam Huffman -# The Francis Crick Institute ## name = 'GROMACS' diff --git a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-mt.eb b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-mt.eb index b1fa93887b..1a85f392c7 100644 --- a/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-mt.eb +++ b/easybuild/easyconfigs/g/GROMACS/GROMACS-2016-foss-2016b-mt.eb @@ -1,18 +1,15 @@ ## # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # -# Copyright:: Copyright 2012-2013 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, Ghent University -# Authors:: Wiktor Jurkowski , Fotis Georgatos , \ -# George Tsouloupas , Kenneth Hoste +# Copyright:: Copyright 2012-2016 University of Luxembourg / LCSB, Cyprus Institute / CaSToRC, +# Ghent University / The Francis Crick Institute +# Authors:: +# * Wiktor Jurkowski +# * Fotis Georgatos +# * George Tsouloupas +# * Kenneth Hoste +# * Adam Huffman # License:: MIT/GPL -# $Id$ -# -# This work implements a part of the HPCBIOS project and is a component of the policy: -# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-93.html -# -# Version 5.1.4 -# Author: Adam Huffman -# The Francis Crick Institute ## name = 'GROMACS' -- GitLab From a070233bd4d8e6bcfbe79b453e52f191c0e3f554 Mon Sep 17 00:00:00 2001 From: eediaz1987 Date: Tue, 15 Nov 2016 00:49:03 +0100 Subject: [PATCH 633/741] Update x265-1.9-goolf-1.7.20.eb --- easybuild/easyconfigs/x/x265/x265-1.9-goolf-1.7.20.eb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/x/x265/x265-1.9-goolf-1.7.20.eb b/easybuild/easyconfigs/x/x265/x265-1.9-goolf-1.7.20.eb index 44548e3d8d..f346f0f6b3 100644 --- a/easybuild/easyconfigs/x/x265/x265-1.9-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/x/x265/x265-1.9-goolf-1.7.20.eb @@ -12,9 +12,11 @@ toolchain = {'name': 'goolf', 'version': '1.7.20'} source_urls = ['http://ftp.videolan.org/pub/videolan/x265/'] sources = ['x265_%(version)s.tar.gz'] -builddependencies = [('CMake', '2.8.11')] +builddependencies = [ + ('CMake', '3.5.2') +] dependencies = [ - ('Yasm','1.3.0'), + ('Yasm','1.3.0'), ] start_dir = 'source' -- GitLab From b94bb016a7c6342580ea35773618d8d4b113b3db Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Mon, 14 Nov 2016 21:50:25 -0500 Subject: [PATCH 634/741] Add forgotten mpi_mic removing dependency patch file for ifort 2016.*. --- .../i/ifort/ifort_2016_no_mpi_mic_dependency.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 easybuild/easyconfigs/i/ifort/ifort_2016_no_mpi_mic_dependency.patch diff --git a/easybuild/easyconfigs/i/ifort/ifort_2016_no_mpi_mic_dependency.patch b/easybuild/easyconfigs/i/ifort/ifort_2016_no_mpi_mic_dependency.patch new file mode 100644 index 0000000000..6c852c220d --- /dev/null +++ b/easybuild/easyconfigs/i/ifort/ifort_2016_no_mpi_mic_dependency.patch @@ -0,0 +1,13 @@ +Eliminate dependency on intel-mpi-rt-mic which in turn brings in intel-mpi-rt. +author: Bart Oldeman (McGill HPC) +--- pset/mediaconfig.xml.orig 2016-11-14 12:57:14.214649000 -0500 ++++ pset/mediaconfig.xml 2016-11-14 12:57:30.108947210 -0500 +@@ -1758,7 +1758,7 @@ + ${PACKAGE_DIR}/rpm + rpm + +- ++ + Intel Fortran Compiler for Intel(R) 64 + Intel(R) Fortran Compiler 16.0 Update 2 + インテル(R) Fortran コンパイラー (インテル(R) 64) -- GitLab From fe96fa72a1ecbde7c169b05bcac6c4df0cec7d2d Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Mon, 14 Nov 2016 21:56:55 -0500 Subject: [PATCH 635/741] Apply no_mpi_mic_dependency patch to forgotten ifort-2016.* easyconfig. --- .../easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb index d331cd8e4a..1f89b45357 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb @@ -10,6 +10,9 @@ toolchain = {'name': 'dummy', 'version': ''} sources = ['parallel_studio_xe_%(version_major)s_composer_edition_for_fortran.tgz'] +# remove dependency on intel-mpi-rt-mic +patches = ['ifort_2016_no_mpi_mic_dependency.patch'] + checksums = ['bce7f6a71f7e44f67956197501d00b7c'] gccver = '4.9.3' -- GitLab From e0e1ce0f884fd0d8fc4c43f2cbe2b150dd517dd9 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 15 Nov 2016 11:19:58 +0400 Subject: [PATCH 636/741] commiting --- .../g/gencore_variant_detection/gencore_variant_detection-1.0.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb index 9cf70a3ec4..b18b2dba0a 100644 --- a/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb +++ b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb @@ -28,6 +28,7 @@ builddependencies = [('Anaconda3', '4.0.0')] #environment_file = sources[0] #remote_environment = "nyuad-cgsb/gencore_variant_detection_1.0" +preinstallopts = "conda install -f -c conda conda-env=2.5.2 && " remote_environment = "nyuad-cgsb/%(name)s_%(version)s" sanity_check_paths = { -- GitLab From 9c8f9c47e6b6a4d6b66577470dcb639c306d3545 Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 15 Nov 2016 12:20:03 +0400 Subject: [PATCH 637/741] commiting --- easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb | 2 ++ easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb index 7f580ea182..49db3e8b28 100644 --- a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb @@ -16,4 +16,6 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['31ed3ef07435d7068e1e03be49381b13'] +postinstallcmds = ["conda install -f -c conda conda-env=2.5.2"] + moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb index 9d77e1debf..a9a1448d38 100644 --- a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb @@ -16,4 +16,6 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['546d1f02597587c685fa890c1d713b51'] +postinstallcmds = ["conda install -f -c conda conda-env=2.5.2"] + moduleclass = 'lang' -- GitLab From 42d2669084a54ada36635a6a26d80c2f5d842e32 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 09:56:30 +0100 Subject: [PATCH 638/741] prefix 'conda install' post install command with update to $PATH so conda is found --- easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb | 2 +- easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb index 49db3e8b28..c05c115ad0 100644 --- a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb @@ -16,6 +16,6 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['31ed3ef07435d7068e1e03be49381b13'] -postinstallcmds = ["conda install -f -c conda conda-env=2.5.2"] +postinstallcmds = ["PATH=%(installdir)s/bin:$PATH conda install -f -c conda conda-env=2.5.2"] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb index a9a1448d38..3ddab5e86a 100644 --- a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb @@ -16,6 +16,6 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['546d1f02597587c685fa890c1d713b51'] -postinstallcmds = ["conda install -f -c conda conda-env=2.5.2"] +postinstallcmds = ["PATH=%(installdir)s/bin:$PATH conda install -f -c conda conda-env=2.5.2"] moduleclass = 'lang' -- GitLab From 01251230681df48ffb31050481f6ec75ef67effb Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 15 Nov 2016 12:59:31 +0400 Subject: [PATCH 639/741] updating anaconda blocks with postinstallcmds --- easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb index 49db3e8b28..2888ffe699 100644 --- a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb @@ -18,4 +18,5 @@ checksums = ['31ed3ef07435d7068e1e03be49381b13'] postinstallcmds = ["conda install -f -c conda conda-env=2.5.2"] + moduleclass = 'lang' -- GitLab From 44a4fa61c04063e01e26c0e10abef36173d3b40f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 10:00:14 +0100 Subject: [PATCH 640/741] remove preinstallopts from gencore_variant_detection easyconfig --- .../gencore_variant_detection/gencore_variant_detection-1.0.eb | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb index bad5214152..b799146d37 100644 --- a/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb +++ b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb @@ -23,8 +23,6 @@ toolchain = {'name': 'dummy', 'version': ''} builddependencies = [('Anaconda3', '4.0.0')] -preinstallopts = "conda install -f -c conda conda-env=2.5.2 && " - # Use one of the following - either an environment.yml file or a remote environment definition #environment_file = '/path/to/conda-environment.yml' remote_environment = "nyuad-cgsb/%(name)s_%(version)s" -- GitLab From 4b7a8240553e93f4b01ea27daab0eefeddf1d25f Mon Sep 17 00:00:00 2001 From: Jillian Rowe Date: Tue, 15 Nov 2016 13:02:06 +0400 Subject: [PATCH 641/741] removing preinstallopts from gencore --- .../gencore_variant_detection/gencore_variant_detection-1.0.eb | 2 -- 1 file changed, 2 deletions(-) diff --git a/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb index bad5214152..b799146d37 100644 --- a/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb +++ b/easybuild/easyconfigs/g/gencore_variant_detection/gencore_variant_detection-1.0.eb @@ -23,8 +23,6 @@ toolchain = {'name': 'dummy', 'version': ''} builddependencies = [('Anaconda3', '4.0.0')] -preinstallopts = "conda install -f -c conda conda-env=2.5.2 && " - # Use one of the following - either an environment.yml file or a remote environment definition #environment_file = '/path/to/conda-environment.yml' remote_environment = "nyuad-cgsb/%(name)s_%(version)s" -- GitLab From c46af2266710a67ff56a211635241e0aa1336d91 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 11:01:16 +0100 Subject: [PATCH 642/741] specify installation directory in postinstallcmd --- easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb | 2 +- easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb index 3ea02d05f6..dff49570f3 100644 --- a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb @@ -16,7 +16,7 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['31ed3ef07435d7068e1e03be49381b13'] -postinstallcmds = ["PATH=%(installdir)s/bin:$PATH conda install -f -c conda conda-env=2.5.2"] +postinstallcmds = ["PATH=%(installdir)s/bin:$PATH conda install -f -p %(installdir)s -c conda conda-env=2.5.2"] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb index 3ddab5e86a..2e63871ba7 100644 --- a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb @@ -16,6 +16,6 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['546d1f02597587c685fa890c1d713b51'] -postinstallcmds = ["PATH=%(installdir)s/bin:$PATH conda install -f -c conda conda-env=2.5.2"] +postinstallcmds = ["PATH=%(installdir)s/bin:$PATH conda install -f -p %(installdir)s -c conda conda-env=2.5.2"] moduleclass = 'lang' -- GitLab From b5f81b4ce4fb104c11a86c0d19c47ef1829c0c2b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 11:37:17 +0100 Subject: [PATCH 643/741] install conda 4.2.12 rather than coda-env 2.5.2 in postinstallcmds --- easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb | 5 +++-- easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb index dff49570f3..c0ff978ea5 100644 --- a/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda2/Anaconda2-4.0.0.eb @@ -16,7 +16,8 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['31ed3ef07435d7068e1e03be49381b13'] -postinstallcmds = ["PATH=%(installdir)s/bin:$PATH conda install -f -p %(installdir)s -c conda conda-env=2.5.2"] - +# a newer version of conda is required to run 'conda env create -p' +prep_env = "PATH=%(installdir)s/bin:$PATH " +postinstallcmds = [prep_env + "conda install -f -p %(installdir)s -c conda conda=4.2.12 ruamel_yaml=0.11.14"] moduleclass = 'lang' diff --git a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb index 2e63871ba7..87325e0a06 100644 --- a/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb +++ b/easybuild/easyconfigs/a/Anaconda3/Anaconda3-4.0.0.eb @@ -16,6 +16,8 @@ source_urls = ['http://repo.continuum.io/archive/'] sources = ['%(name)s-%(version)s-Linux-x86_64.sh'] checksums = ['546d1f02597587c685fa890c1d713b51'] -postinstallcmds = ["PATH=%(installdir)s/bin:$PATH conda install -f -p %(installdir)s -c conda conda-env=2.5.2"] +# a newer version of conda is required to run 'conda env create -p' +prep_env = "PATH=%(installdir)s/bin:$PATH " +postinstallcmds = [prep_env + "conda install -f -p %(installdir)s -c conda conda=4.2.12 ruamel_yaml=0.11.14"] moduleclass = 'lang' -- GitLab From a25de62376f0bf3ebdecd6e8aa62baa0fe4fa81b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 11:56:16 +0100 Subject: [PATCH 644/741] disable installing libiberty for binutils built with intel toolchain --- easybuild/easyconfigs/b/binutils/binutils-2.24-intel-2014b.eb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyconfigs/b/binutils/binutils-2.24-intel-2014b.eb b/easybuild/easyconfigs/b/binutils/binutils-2.24-intel-2014b.eb index 7598e76c07..2c7152bf01 100644 --- a/easybuild/easyconfigs/b/binutils/binutils-2.24-intel-2014b.eb +++ b/easybuild/easyconfigs/b/binutils/binutils-2.24-intel-2014b.eb @@ -13,6 +13,9 @@ dependencies = [ ('zlib', '1.2.8'), ] +# libiberty doesn't seem to compile with Intel compilers +install_libiberty = False + # disable warning/error #175 ("subscript out of range") buildopts = 'CFLAGS="$CFLAGS -wd175"' -- GitLab From 62d554bcf80e059b228cb0fb62458e894d85d326 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 12:49:20 +0100 Subject: [PATCH 645/741] fix directory name for perl-app-cpanminus easyconfigs --- .../perl-app-cpanminus-1.7039.eb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/p/{perl_app_cpanminus => perl-app-cpanminus}/perl-app-cpanminus-1.7039.eb (100%) diff --git a/easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb b/easybuild/easyconfigs/p/perl-app-cpanminus/perl-app-cpanminus-1.7039.eb similarity index 100% rename from easybuild/easyconfigs/p/perl_app_cpanminus/perl-app-cpanminus-1.7039.eb rename to easybuild/easyconfigs/p/perl-app-cpanminus/perl-app-cpanminus-1.7039.eb -- GitLab From 6b4bd2a0fe1880fd51e3d41788dc864819b15640 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 13:58:14 +0100 Subject: [PATCH 646/741] add README for archived easyconfigs --- easybuild/easyconfigs/__archive__/README | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 easybuild/easyconfigs/__archive__/README diff --git a/easybuild/easyconfigs/__archive__/README b/easybuild/easyconfigs/__archive__/README new file mode 100644 index 0000000000..37371576b7 --- /dev/null +++ b/easybuild/easyconfigs/__archive__/README @@ -0,0 +1,10 @@ +This directory contains archived easyconfig files. + +Reasons for archiving easyconfigs include: +* old/obsolete software versions +* use of deprecated toolchains + +These easyconfig may or may not work with current version of EasyBuild. They are no longer actively maintained, +and they are no longer included in the regression testing that is done for every new EasyBuild release. + +Use them with care, and consider to use more recent easyconfigs for the respective software packages instead. -- GitLab From 218ab0dfd94bb4c1bf414d2c71aeb8c97992599c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 15 Nov 2016 15:03:09 +0100 Subject: [PATCH 647/741] bump version to 3.0.0, update release notes --- RELEASE_NOTES | 62 ++++++++++++++++++++++++++++++++++++++++++++++++--- setup.py | 2 +- 2 files changed, 60 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index c74d917ce1..0a73a07315 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -3,8 +3,64 @@ For more detailed information, please see the git log. These release notes can also be consulted at http://easybuild.readthedocs.org/en/latest/Release_notes.html. -The latest version of easybuild-easyconfig provides 7,060 easyconfig files, for 1,085 different software packages, -37 different (compiler) toolchains, 13 software bundles and 1 meta-package. +The latest version of easybuild-easyconfig provides 6,176 easyconfig files, for 1,116 different software packages, +25 different (compiler) toolchains, 13 software bundles and 1 meta-package. + + +v3.0.0 (November 16th 2016) +--------------------------- + +feature release +- backwards incompatible changes: + - archive easyconfigs using old inactive toolchains + - see #3725, #3728, #3729, #3730, #3731, #3732, #3733, #3735, #3736, #3737, #3738 + - only taken into account by EasyBuild if --consider-archived-easyconfigs is enabled + - no easyconfigs available outside of archive for QLogicMPI + 15 toolchains: + - ClangGCC, cgmpich, cgmpolf, cgmvapich2, cgmvolf, cgompi, cgoolf, gmacml, + goalf, gpsmpi, gpsolf, iiqmpi, intel-para, ipsmpi, iqacml + - fix name in PyTables easyconfigs (was pyTables) (#3785) +- added example easyconfig files for 32 new software packages: + - 3to2 (#3655), Anaconda2 (#3337), Anaconda3 (#3337), ART (#3724), atools (#3631), + awscli (#3645), behave (#3751), Blosc (#3785), bokeh (#3790), Cantera (#3655), + Cargo (#3764), dadi v1.7.0, distributed (#3786), ea-utils (#3634), Elk (#3644), + FGSL (#3638), gencore_variant_detection (#3337), help2man (#3768), lbzip2 (#3791), + Log-Log4perl (#3574), Minimac2 (#3783), mypy (#3694), OBITools (#3573), + perl-app-cpanminus (#3337), PGDSpider (#3625), prokka (#3755), Reads2snp (#3609), + spglib-python (#3620), SUNDIALS (#3654, #3655), SelEstim (#3626), XMLStarlet (#3797), + x265 (#3090) +- added easyconfigs for new 'intelcuda' toolchain (#3750) +- added new easyconfigs for existing toolchains: + - goolfc/2016.08 (#3796), goolfc/2016.10 (#3666, #3775), intel/2017.00 (#3543), intel/2017.01 (#3757), + iomkl/2016.09-GCC-4.9.3-2.25 (#3680), iomkl/2016.09-GCC-5.4.0-2.26 (#3772) +- added additional easyconfigs for various supported software packages, including: + - Advisor 2017 update 1, Amber 16, ATLAS 3.10.2, GROMACS 2016, Octave 4.0.3, + OpenFOAM 3.0.1, PyTables 3.3.0, QuantumESPRESSO 6.0, Rust v1.12.1 +- various other enhancements, including: + - STREAM builds using ~56GiB and ~111GiB (#3670) +- various bug fixes, including: + - fix source spec in VASP easyconfig, ensure static linking with Intel MKL (#3381) + - fix source URL in GCCcore 6.2.0 easyconfig (#3608) + - correct STAMP dependency in i-cisTarget, must be 1.3 (#3613) + - consistently specify to use -fgnu89-inline flag in M4 1.4.17 easyconfigs (#3623) + - fix source URLs for Cython (#3636) + - add Bison as build dep and M4 as runtime dep for flex 2.6.0 (#3656) + - enable parallel building of flex 2.6.0 (#3630) + - add zlib and bzip2 dependencies to X11 bundle (#3662) + - use 'letter_dir_for' function rather than just grabbing 1st letter of software name in easyconfigs tests (#3664) + - add patch to fix typo in GRIT 2.0.5 (#3675) + - fix typo in patch for WRF 3.8.0 (#3702) + - use $CC,$CXX rather than $I_MPI_CC,$I_MPI_CXX in patch for OpenFOAM 4.0 (#3703) + - patch FLTK to fix 'undefined symbol' issue when building Octave (#3704) + - include Pillow as a proper dep for scikit-image rather than as extension, since it has deps itself (#3723) + - update Travis config w.r.t. changes framework config defaults and required Lmod version (#3773) + - don't limit parallellism to 4 in recent GCC easyconfigs (#3776, #3777, #3778) + - include M4 as dependency in flex 2.5.39 easyconfigs + fix consistency issues (#3782) + - consistently apply patch for ncurses 6.0 (#3792) + - eliminate dependency on mpi-mic-rt in ifort (#3793) + - include Autotools as build dependency in all beagle-lib and MrBayes easyconfigs (#3794) + - make OpenBLAS use the LAPACK version specified in the easyconfig (v0.2.18 & v0.2.19) (#3795) + - include original download URL for ISL source tarball in GCC easyconfigs (#3798) + - disable installing libiberty for binutils built with intel toolchain (#3802) v2.9.0 (September 23rd 2016) ---------------------------- @@ -1048,7 +1104,7 @@ v0.8 (June 29th 2012) --------------------- - added support for building/installing 17 additional software packages: - - BEAGLE, Doxygen, g2clib, g2lib, HDF, HDF5, JasPer, libpng, Maple, + - BEAGLE, Doxygen, g2clib, g2lib, HDF, HDF5, JasPer, libpng, Maple, MrBayes, NCL, netCDF, netCDF-Fortran, Szip, WPS, WRF, zlib - the build procedure for WRF and WPS includes running the tests available for these packages - various bug fixes and enhancements: diff --git a/setup.py b/setup.py index f4cbb44d3b..97b6b01f04 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from distutils import log # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = '3.0.0.dev0' +VERSION = '3.0.0' API_VERSION = VERSION.split('.')[0] EB_VERSION = '.'.join(VERSION.split('.')[0:2]) -- GitLab From 2c38f64f071f77477487085242bf27a74afc283d Mon Sep 17 00:00:00 2001 From: Pablo Escobar Lopez Date: Tue, 15 Nov 2016 21:51:44 +0100 Subject: [PATCH 648/741] added toolchainopts = {'openmp': True} --- easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb b/easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb index c3aaee9173..e948c06e11 100644 --- a/easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/b/BayPass/BayPass-2.1-goolf-1.7.20.eb @@ -16,6 +16,7 @@ description = """BayPass is a population genomics software which is primarily ai population allele frequencies that originates from the shared history of the populations under study""" toolchain = {'name': 'goolf', 'version': '1.7.20'} +toolchainopts = {'openmp': True} source_urls = ['http://www1.montpellier.inra.fr/CBGP/software/baypass/files/'] sources = ['%(namelower)s_%(version)s.tar.gz'] -- GitLab From def92ab701db2168e5f595e259e17b4ac00e7920 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 16 Nov 2016 19:14:18 +0100 Subject: [PATCH 649/741] include ipywidgets as extension in IPython 5.1.0 easyconfigs --- .../i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb | 3 +++ .../i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb index b9a9c116d2..1522403a69 100644 --- a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb @@ -124,6 +124,9 @@ exts_list = [ 'patches': ['ipython-5.0.0_fix-test-paths-symlink.patch'], 'modulename': 'IPython', }), + ('ipywidgets', '5.2.2', { + 'source_urls': ['https://pypi.python.org/packages/source/i/ipywidgets/'], + }), ] modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} diff --git a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb index c7fa3c0a41..54779b3829 100644 --- a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb @@ -115,6 +115,9 @@ exts_list = [ 'patches': ['ipython-5.0.0_fix-test-paths-symlink.patch'], 'modulename': 'IPython', }), + ('ipywidgets', '5.2.2', { + 'source_urls': ['https://pypi.python.org/packages/source/i/ipywidgets/'], + }), ] modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} -- GitLab From f1544bd20c6289c46287eef2264a33f76275581b Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 16 Nov 2016 19:57:31 +0100 Subject: [PATCH 650/741] adding easyconfigs: EasyBuild-3.0.0.eb --- .../e/EasyBuild/EasyBuild-3.0.0.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.0.eb diff --git a/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.0.eb b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.0.eb new file mode 100644 index 0000000000..a77b43aaad --- /dev/null +++ b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.0.eb @@ -0,0 +1,38 @@ +easyblock = 'EB_EasyBuildMeta' + +name = 'EasyBuild' +version = '3.0.0' + +homepage = 'http://hpcugent.github.com/easybuild/' +description = """EasyBuild is a software build and installation framework + written in Python that allows you to install software in a structured, + repeatable and robust way.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +source_urls = [ + # vsc-install + 'https://pypi.python.org/packages/4a/1c/abb1bcd09523a7c9d52e2703f67dec4807751674c13be17e89a7602677b0', + # vsc-base + 'https://pypi.python.org/packages/73/24/e4244a743e0cfc4af1f3b3b772698e2f4dafc7052bc006a1b829b66f7a3a', + # easybuild-framework + 'https://pypi.python.org/packages/14/5f/1112f3870891992e3c01db8202f913d61577e70975a371c3fd956b9a6b11', + # easybuild-easyblocks + 'https://pypi.python.org/packages/07/e3/68ec2ff700a25a44b51ee45dd28d21352286b384d77b70cfe6dde1db6e28', + # easybuild-easyconfigs + 'https://pypi.python.org/packages/f3/6c/60625b79a2613d229834e7920fa91eebf92cba77ec18bdca0ae2bfd4c99a', +] +# order matters a lot, to avoid having dependencies auto-resolved (--no-deps easy_install option doesn't work?) +sources = [ + 'vsc-install-0.10.19.tar.gz', + 'vsc-base-2.5.5.tar.gz', + 'easybuild-framework-%(version)s.tar.gz', + 'easybuild-easyblocks-%(version)s.tar.gz', + 'easybuild-easyconfigs-%(version)s.tar.gz', +] + +# EasyBuild is a (set of) Python packages, so it depends on Python +# usually, we want to use the system Python, so no actual Python dependency is listed +allow_system_deps = [('Python', SYS_PYTHON_VERSION)] + +moduleclass = 'tools' -- GitLab From d5356626ff1b39d18183ba7c079920f3bf2f3f58 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 16 Nov 2016 20:16:18 +0100 Subject: [PATCH 651/741] bump version to 3.1.0.dev0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 97b6b01f04..003be273e7 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from distutils import log # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = '3.0.0' +VERSION = '3.1.0.dev0' API_VERSION = VERSION.split('.')[0] EB_VERSION = '.'.join(VERSION.split('.')[0:2]) -- GitLab From 1e3fffe4df1aa848b4398edf14f97f0066f65e7d Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Wed, 16 Nov 2016 21:25:01 +0200 Subject: [PATCH 652/741] add easyconfig iomkl-2017.01-GCC-5.4.eb, add easyconfig iompi-2017.01-GCC-5.4.0-2.26.eb --- .../i/iomkl/iomkl-2017.01-GCC-5.4.eb | 26 +++++++++++++++++++ .../i/iompi/iompi-2017.01-GCC-5.4.0-2.26.eb | 20 ++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 easybuild/easyconfigs/i/iomkl/iomkl-2017.01-GCC-5.4.eb create mode 100644 easybuild/easyconfigs/i/iompi/iompi-2017.01-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-2017.01-GCC-5.4.eb b/easybuild/easyconfigs/i/iomkl/iomkl-2017.01-GCC-5.4.eb new file mode 100644 index 0000000000..e65702ede5 --- /dev/null +++ b/easybuild/easyconfigs/i/iomkl/iomkl-2017.01-GCC-5.4.eb @@ -0,0 +1,26 @@ +easyblock = "Toolchain" + +name = 'iomkl' +version = '2017.01' +gcc_maj_min = '5.4' +versionsuffix = '-GCC-%s' % gcc_maj_min + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL & OpenMPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2017.1.132' +gccver = '%s.0' % gcc_maj_min +binutilsver = '2.26' +gccsuff = '-GCC-%s-%s' % (gccver, binutilsver) +dependencies = [ + ('GCCcore', gccver), + ('binutils', binutilsver, '-GCCcore-%s' % gccver), + ('icc', compver, gccsuff), + ('ifort', compver, gccsuff), + ('OpenMPI', '2.0.1', '', ('iccifort', '%s%s' % (compver, gccsuff))), + ('imkl', '2017.1.132', '', ('iompi', '%s%s' % (version, gccsuff))), +] + +moduleclass = 'toolchain' diff --git a/easybuild/easyconfigs/i/iompi/iompi-2017.01-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iompi/iompi-2017.01-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..b5e3d116ce --- /dev/null +++ b/easybuild/easyconfigs/i/iompi/iompi-2017.01-GCC-5.4.0-2.26.eb @@ -0,0 +1,20 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild +easyblock = "Toolchain" + +name = 'iompi' +version = '2017.01' +versionsuffix = '-GCC-5.4.0-2.26' + +homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' +description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +compver = '2017.1.132' +dependencies = [ + ('icc', compver, versionsuffix), + ('ifort', compver, versionsuffix), + ('OpenMPI', '2.0.1', '', ('iccifort', '%s%s' % (compver, versionsuffix))), +] + +moduleclass = 'toolchain' -- GitLab From d102c1af0674183f8bed7b38ee312e01438f4e20 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 10:11:35 +0100 Subject: [PATCH 653/741] bump version to 3.0.1.dev0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 97b6b01f04..7233f88f19 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from distutils import log # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = '3.0.0' +VERSION = '3.0.1.dev0' API_VERSION = VERSION.split('.')[0] EB_VERSION = '.'.join(VERSION.split('.')[0:2]) -- GitLab From c4d7079135ac8346ecbe1ef8cd5e8520f436ca95 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 17 Nov 2016 10:14:17 +0100 Subject: [PATCH 654/741] Fix incorrect descriptions for ifort. Some of the ifort .eb files had gotten an incorrect description, claiming to be C/C++ instead of Fortran. --- .../easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb | 2 +- easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb | 2 +- .../easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb | 2 +- .../easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb | 2 +- .../easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb | 2 +- .../easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb | 2 +- .../easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb | 2 +- .../easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb | 2 +- .../easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb | 2 +- .../easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb index 1f89b45357..9599d68348 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.0.109-GCC-4.9.3-2.25.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2016.0.109' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': ''} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb index a32c4d179f..657a607db3 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.0.109.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2016.0.109' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': 'dummy'} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb index bb6bb39f91..9afeb8bcc9 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.1.150-GCC-4.9.3-2.25.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2016.1.150' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': ''} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb index 37686bf975..39dd006552 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-4.9.3-2.25.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2016.2.181' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': 'dummy'} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb index 725d9d95e7..952e908d84 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.2.181-GCC-5.3.0-2.26.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2016.2.181' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': 'dummy'} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb index 8699c5d00e..624fe2510b 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-4.9.3-2.25.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2016.3.210' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': 'dummy'} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb index 40c33c4e59..148dc06764 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.3.0-2.26.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2016.3.210' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': 'dummy'} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb index 33422fe405..48e857188b 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2016.3.210-GCC-5.4.0-2.26.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2016.3.210' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': 'dummy'} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb index a41293232b..26de8ad254 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2017.0.098-GCC-5.4.0-2.26.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2017.0.098' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': 'dummy'} diff --git a/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb index 4493fad0d2..c275933f9d 100644 --- a/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/ifort/ifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -4,7 +4,7 @@ name = 'ifort' version = '2017.1.132' homepage = 'http://software.intel.com/en-us/intel-compilers/' -description = "C and C++ compiler from Intel" +description = "Fortran compiler from Intel" toolchain = {'name': 'dummy', 'version': 'dummy'} -- GitLab From c07b84a9354651cd1659dc66a9e42a06414f749f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 16 Nov 2016 19:57:31 +0100 Subject: [PATCH 655/741] adding easyconfigs: EasyBuild-3.0.0.eb --- .../e/EasyBuild/EasyBuild-3.0.0.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.0.eb diff --git a/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.0.eb b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.0.eb new file mode 100644 index 0000000000..a77b43aaad --- /dev/null +++ b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.0.eb @@ -0,0 +1,38 @@ +easyblock = 'EB_EasyBuildMeta' + +name = 'EasyBuild' +version = '3.0.0' + +homepage = 'http://hpcugent.github.com/easybuild/' +description = """EasyBuild is a software build and installation framework + written in Python that allows you to install software in a structured, + repeatable and robust way.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +source_urls = [ + # vsc-install + 'https://pypi.python.org/packages/4a/1c/abb1bcd09523a7c9d52e2703f67dec4807751674c13be17e89a7602677b0', + # vsc-base + 'https://pypi.python.org/packages/73/24/e4244a743e0cfc4af1f3b3b772698e2f4dafc7052bc006a1b829b66f7a3a', + # easybuild-framework + 'https://pypi.python.org/packages/14/5f/1112f3870891992e3c01db8202f913d61577e70975a371c3fd956b9a6b11', + # easybuild-easyblocks + 'https://pypi.python.org/packages/07/e3/68ec2ff700a25a44b51ee45dd28d21352286b384d77b70cfe6dde1db6e28', + # easybuild-easyconfigs + 'https://pypi.python.org/packages/f3/6c/60625b79a2613d229834e7920fa91eebf92cba77ec18bdca0ae2bfd4c99a', +] +# order matters a lot, to avoid having dependencies auto-resolved (--no-deps easy_install option doesn't work?) +sources = [ + 'vsc-install-0.10.19.tar.gz', + 'vsc-base-2.5.5.tar.gz', + 'easybuild-framework-%(version)s.tar.gz', + 'easybuild-easyblocks-%(version)s.tar.gz', + 'easybuild-easyconfigs-%(version)s.tar.gz', +] + +# EasyBuild is a (set of) Python packages, so it depends on Python +# usually, we want to use the system Python, so no actual Python dependency is listed +allow_system_deps = [('Python', SYS_PYTHON_VERSION)] + +moduleclass = 'tools' -- GitLab From a232a4f11e1318a6416d60f86912384d1d528f52 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 09:57:01 +0100 Subject: [PATCH 656/741] adding easyconfigs: ABINIT-8.0.8b-intel-2016b.eb --- .../a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb diff --git a/easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb b/easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb new file mode 100644 index 0000000000..ecdc6d26e2 --- /dev/null +++ b/easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'ABINIT' +version = '8.0.8b' + +homepage = 'http://www.abinit.org/' +description = """ABINIT is a package whose main program allows one to find the total energy, charge density and + electronic structure of systems made of electrons and nuclei (molecules and periodic solids) within Density Functional + Theory (DFT), using pseudopotentials and a planewave or wavelet basis.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://ftp.abinit.org/'] +sources = [SOURCELOWER_TAR_GZ] +checksums = ['7b67d9ffc6200b3bcca0db12f7c69581'] + +configopts = "--with-mpi-prefix=$EBROOTIMPI/intel64 --with-trio-flavor='etsf_io+netcdf' --with-dft=flavor='libxc' " +configopts += '--with-netcdf-incs="-I$EBROOTNETCDF/include -I$EBROOTNETCDFMINFORTRAN/include" ' +configopts += '--with-netcdf-libs="-L$EBROOTNETCDF/lib -lnetcdf -L$EBROOTNETCDFMINFORTRAN/lib -lnetcdff" ' +configopts += '--with-libxc-incs="-I$EBROOTLIBXC/include" --with-libxc-libs="-L$EBROOTLIBXC/lib -lxc" ' + +dependencies = [ + ('libxc', '3.0.0'), + ('netCDF', '4.4.1'), + ('netCDF-Fortran', '4.4.4'), +] + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ['abinit', 'aim', 'cut3d', 'conducti', 'mrgddb', 'mrgscr', 'optic']], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'chem' -- GitLab From f748d644d7047489c9c4ae81b80d4b18902de80f Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 17 Nov 2016 10:50:08 +0100 Subject: [PATCH 657/741] Add missing easyconfigs for iomkl-2017.01 chain imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb and OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb --- ...2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb | 38 +++++++++++++++++++ ....0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb | 38 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb create mode 100644 easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..ec50c52adc --- /dev/null +++ b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb @@ -0,0 +1,38 @@ +# This is an easyconfig file for EasyBuild, see http://hpcugent.github.io/easybuild + +name = 'imkl' +version = '2017.1.132' + +homepage = 'http://software.intel.com/en-us/intel-mkl/' +description = """Intel Math Kernel Library is a library of highly optimized, + extensively threaded math routines for science, engineering, and financial + applications that require maximum performance. Core math functions include + BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" + +toolchain = {'name': 'iompi', 'version': '2017.01-GCC-5.4.0-2.26'} + +sources = ['l_mkl_%(version)s.tgz'] +checksums = ['7911c0f777c4cb04225bf4518088939e'] + +dontcreateinstalldir = 'True' + +license_file = HOME + '/licenses/intel/license.lic' + +interfaces = True + +postinstallcmds = [ + # extract the examples + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_cluster_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_core_f.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_f95.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic_c.tgz -C %(installdir)s/mkl/examples/', + 'tar xvzf %(installdir)s/mkl/examples/examples_mic_f.tgz -C %(installdir)s/mkl/examples/' +] + +modextravars = { + 'MKL_EXAMPLES': '%(installdir)s/mkl/examples/', +} + +moduleclass = 'numlib' diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..f1f5284b1f --- /dev/null +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -0,0 +1,38 @@ +easyblock = 'ConfigureMake' + +name = 'OpenMPI' +version = '2.0.1' + +homepage = 'http://www.open-mpi.org/' +description = """The Open MPI Project is an open source MPI-2 implementation.""" + +toolchain = {'name': 'iccifort', 'version': '2017.1.132-GCC-5.4.0-2.26'} + +sources = [SOURCELOWER_TAR_GZ] + +source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] + +#patches = [ +# 'OpenMPI-%(version)s_common-cuda-lib.patch', +# 'OpenMPI-%(version)s-vt_cupti_events.patch', +#] + +dependencies = [('hwloc', '1.11.4')] + +configopts = '--with-threads=posix --enable-shared --with-verbs ' +configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path +configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support +configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading + +# needed for --with-verbs +osdependencies = [('libibverbs-dev', 'libibverbs-devel'),] + +libs = ["mpi_mpifh", "mpi", "ompitrace", "open-pal", "open-rte"] +sanity_check_paths = { + 'files': ["bin/%s" % binfile for binfile in ["ompi_info", "opal_wrapper", "orterun"]] + + ["lib/lib%s.%s" % (libfile, SHLIB_EXT) for libfile in libs] + + ["include/%s.h" % x for x in ["mpi-ext", "mpif-config", "mpif", "mpi", "mpi_portable_platform"]], + 'dirs': [], +} + +moduleclass = 'mpi' -- GitLab From 88dab4fcf61f722358985d7ac2d98ff3c347dcb5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 11:18:35 +0100 Subject: [PATCH 658/741] update checksum --- easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb b/easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb index ecdc6d26e2..5e7c671066 100644 --- a/easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb +++ b/easybuild/easyconfigs/a/ABINIT/ABINIT-8.0.8b-intel-2016b.eb @@ -12,7 +12,7 @@ toolchain = {'name': 'intel', 'version': '2016b'} source_urls = ['http://ftp.abinit.org/'] sources = [SOURCELOWER_TAR_GZ] -checksums = ['7b67d9ffc6200b3bcca0db12f7c69581'] +checksums = ['abc9e303bfa7f9f43f95598f87d84d5d'] configopts = "--with-mpi-prefix=$EBROOTIMPI/intel64 --with-trio-flavor='etsf_io+netcdf' --with-dft=flavor='libxc' " configopts += '--with-netcdf-incs="-I$EBROOTNETCDF/include -I$EBROOTNETCDFMINFORTRAN/include" ' -- GitLab From 0148ebcc5ba25eeb8a6c29bf76b4873318d8d84f Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 17 Nov 2016 12:48:34 +0100 Subject: [PATCH 659/741] Add more missing easyconfigs for iomkl-2017.01 chain hwloc-1.11.4-iccifort-2017.1.132-GCC-5.4.0-2.26.eb --- ...11.4-iccifort-2017.1.132-GCC-5.4.0-2.26.eb | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-iccifort-2017.1.132-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-iccifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-iccifort-2017.1.132-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..a68a5876d6 --- /dev/null +++ b/easybuild/easyconfigs/h/hwloc/hwloc-1.11.4-iccifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -0,0 +1,27 @@ +easyblock = 'ConfigureMake' + +name = 'hwloc' +version = '1.11.4' + +homepage = 'http://www.open-mpi.org/projects/hwloc/' +description = """The Portable Hardware Locality (hwloc) software package provides a portable abstraction + (across OS, versions, architectures, ...) of the hierarchical topology of modern architectures, including + NUMA memory nodes, sockets, shared caches, cores and simultaneous multithreading. It also gathers various + system attributes such as cache and memory information as well as the locality of I/O devices such as + network interfaces, InfiniBand HCAs or GPUs. It primarily aims at helping applications with gathering + information about modern computing hardware so as to exploit it accordingly and efficiently.""" + +toolchain = {'name': 'iccifort', 'version': '2017.1.132-GCC-5.4.0-2.26'} + +source_urls = ['http://www.open-mpi.org/software/hwloc/v%(version_major_minor)s/downloads/'] +sources = [SOURCE_TAR_GZ] + +checksums = ['b6f23eb59074fd09fdd84905d50b103d'] + +dependencies = [ + ('numactl', '2.0.11', '', ('GCCcore', '5.4.0')), +] + +configopts = "--enable-libnuma=$EBROOTNUMACTL" + +moduleclass = 'system' -- GitLab From 5a1ddb7c32e93967be8bd989cc2d178a132d6899 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 13:57:05 +0100 Subject: [PATCH 660/741] adding easyconfigs: Graphviz-2.38.0-intel-2016b.eb --- .../c/cairo/cairo-1.15.2-intel-2016b.eb | 43 ++++++++++++ .../Ghostscript-9.20-intel-2016b.eb | 29 ++++++++ .../g/Graphviz/Graphviz-2.38.0-intel-2016b.eb | 67 +++++++++++++++++++ .../h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb | 34 ++++++++++ .../Pango-1.40.3-intel-2016b-cairo-1.15.2.eb | 33 +++++++++ 5 files changed, 206 insertions(+) create mode 100644 easybuild/easyconfigs/c/cairo/cairo-1.15.2-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb create mode 100644 easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2016b.eb create mode 100644 easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb create mode 100644 easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b-cairo-1.15.2.eb diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.15.2-intel-2016b.eb b/easybuild/easyconfigs/c/cairo/cairo-1.15.2-intel-2016b.eb new file mode 100644 index 0000000000..caaecf87e0 --- /dev/null +++ b/easybuild/easyconfigs/c/cairo/cairo-1.15.2-intel-2016b.eb @@ -0,0 +1,43 @@ +easyblock = 'ConfigureMake' + +name = 'cairo' +version = '1.15.2' + +homepage = 'http://cairographics.org' +description = """Cairo is a 2D graphics library with support for multiple output devices. + Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, + PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://cairographics.org/releases/'] +sources = [SOURCE_TAR_XZ] + +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), + ('libpng', '1.6.24'), + ('freetype', '2.6.5'), + ('pixman', '0.34.0'), + ('expat', '2.2.0'), + ('GLib', '2.49.5'), + ('X11', '20160819'), +] + +# disable symbol lookup, which requires -lbfd, to avoid link issues with (non-PIC) libiberty.a provided by GCC +configopts = "--enable-symbol-lookup=no --enable-gobject=yes --enable-svg=yes --enable-tee=yes --enable-xlib-xcb " + +# workaround for "hidden symbol .* in .* is referenced by DSO" and "ld: final link failed: Bad value" +buildopts = 'LD="$CC" LDFLAGS="$LDFLAGS -shared-intel"' + +sanity_check_paths = { + 'files': ['bin/cairo-trace', 'lib/cairo/libcairo-trace.so', 'lib/cairo/libcairo-trace.a', + 'lib/libcairo.a', 'lib/libcairo-gobject.a', 'lib/libcairo-script-interpreter.a', + 'lib/libcairo-gobject.so', 'lib/libcairo-script-interpreter.so', 'lib/libcairo.so'] + + ['include/cairo/cairo%s.h' % x for x in ['', '-deprecated', '-features', '-ft', '-gobject', '-pdf', '-ps', + '-script', '-script-interpreter', '-svg', '-version', '-xcb', + '-xlib', '-xlib-xrender']], + 'dirs': ['lib/pkgconfig'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb b/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb new file mode 100644 index 0000000000..e040683101 --- /dev/null +++ b/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb @@ -0,0 +1,29 @@ +easyblock = 'ConfigureMake' + +name = 'Ghostscript' +version = '9.20' + +homepage = 'http://ghostscript.com' +description = """Ghostscript is a versatile processor for PostScript data with the ability to render PostScript to + different targets. It used to be part of the cups printing stack, but is no longer used for that.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ["https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs%(version_major)s%(version_minor)s/"] +sources = ["ghostpdl-%(version)s.tar.bz2"] + +dependencies = [ + ('zlib', '1.2.8'), + ('libpng', '1.6.24'), + ('freetype', '2.6.5'), + ('libjpeg-turbo', '1.5.0'), + ('expat', '2.2.0'), + ('GLib', '2.49.5'), + ('cairo', '1.15.2'), + ('LibTIFF', '4.0.6'), +] + +configopts = "--with-system-libtiff --enable-dynamic" + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2016b.eb b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2016b.eb new file mode 100644 index 0000000000..3ad82f7107 --- /dev/null +++ b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2016b.eb @@ -0,0 +1,67 @@ +easyblock = 'ConfigureMake' + +name = 'Graphviz' +version = '2.38.0' + +homepage = 'http://www.graphviz.org/' +description = """Graphviz is open source graph visualization software. Graph visualization + is a way of representing structural information as diagrams of + abstract graphs and networks. It has important applications in networking, + bioinformatics, software engineering, database and web design, machine learning, + and in visual interfaces for other technical domains.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.graphviz.org/pub/graphviz/stable/SOURCES/'] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [ + ('cairo', '1.15.2'), + ('expat', '2.2.0'), + ('freetype', '2.6.5'), + ('Ghostscript', '9.20'), + ('GTS', '0.7.6'), + ('Java', '1.8.0_92', '', True), + ('libpng', '1.6.24'), + ('Pango', '1.40.3', '-cairo-1.15.2'), + ('Perl', '5.24.0'), + ('Qt', '4.8.7'), + ('Tcl', '8.6.5'), + ('zlib', '1.2.8'), +] + +builddependencies = [ + ('M4', '1.4.17'), + ('SWIG', '3.0.10', '-Python-2.7.12-PCRE-8.39'), +] + +patches = [ + 'Graphviz-2.38.0_icc_vmalloc.patch', + 'Graphviz-2.38.0_icc_sfio.patch', +] + +preconfigopts = "sed -i 's/install-data-hook$//g' tclpkg/Makefile.in && " +configopts = '--enable-guile=no --enable-lua=no --enable-ocaml=no ' +configopts += '--enable-r=no --enable-ruby=no ' + +prebuildopts = 'qmake -o cmd/gvedit/qMakefile cmd/gvedit/gvedit.pro && ' + +sanity_check_paths = { + 'files': ['bin/cluster', 'bin/dot', 'bin/gvmap', + 'lib/libcdt.%s' % SHLIB_EXT, 'lib/libgvc.%s' % SHLIB_EXT, 'lib/libxdot.%s' % SHLIB_EXT], + 'dirs': ['include', 'lib/graphviz'] +} + +sanity_check_commands = [ + ("test ! -d $EBROOTTCL/lib/*/graphviz", ''), + ("test ! -d $EBROOTTCL/lib64/*/graphviz", ''), +] + +modextrapaths = { + 'PYTHONPATH': 'lib/graphviz/python', + 'CLASSPATH': 'lib/graphviz/java/org/graphviz', + 'LD_LIBRARY_PATH': 'lib/graphviz/java', + 'TCLLIBPATH': 'lib/graphviz/tcl', +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb new file mode 100644 index 0000000000..46682f0a69 --- /dev/null +++ b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb @@ -0,0 +1,34 @@ +easyblock = 'ConfigureMake' + +name = 'HarfBuzz' +version = '1.3.3' + +homepage = 'http://www.freedesktop.org/wiki/Software/HarfBuzz' +description = """HarfBuzz is an OpenType text shaping engine.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://www.freedesktop.org/software/harfbuzz/release/'] +sources = [SOURCELOWER_TAR_BZ2] + +dependencies = [ + ('GLib', '2.49.5'), + ('cairo', '1.15.2'), + ('freetype', '2.6.5'), +] + +builddependencies = [('GObject-Introspection', '1.49.1')] + +configopts = "--enable-introspection=yes --with-gobject=yes --enable-static --enable-shared --with-cairo " + +modextrapaths = { + 'GI_TYPELIB_PATH': 'share', + 'XDG_DATA_DIRS': 'share', +} + +sanity_check_paths = { + 'files': ['lib/libharfbuzz.%s' % SHLIB_EXT, 'bin/hb-view'], + 'dirs': [] +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b-cairo-1.15.2.eb b/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b-cairo-1.15.2.eb new file mode 100644 index 0000000000..001475ec70 --- /dev/null +++ b/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b-cairo-1.15.2.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'Pango' +version = '1.40.3' + +homepage = 'http://www.pango.org/' +description = """Pango is a library for laying out and rendering of text, with an emphasis on internationalization. +Pango can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the +context of the GTK+ widget toolkit. Pango forms the core of text and font handling for GTK+-2.x.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +cairo_ver = '1.15.2' +versionsuffix = '-cairo-%s' % cairo_ver +dependencies = [ + ('X11', '20160819'), + ('GLib', '2.49.5'), + ('cairo', cairo_ver), + ('HarfBuzz', '1.3.3'), +] + +builddependencies = [('GObject-Introspection', '1.49.1')] + +configopts = "--disable-silent-rules --enable-introspection=yes --enable-static --enable-shared " + +modextrapaths = { + 'XDG_DATA_DIRS': 'share', +} + +moduleclass = 'vis' -- GitLab From d99f9454631357ecf0d39c11b7667bbd1d7627ed Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 13:57:57 +0100 Subject: [PATCH 661/741] adding easyconfigs: matplotlib-1.5.2-intel-2016b-Python-3.5.2.eb --- ...tplotlib-1.5.2-intel-2016b-Python-3.5.2.eb | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.2-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.2-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.2-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..0391b993ae --- /dev/null +++ b/easybuild/easyconfigs/m/matplotlib/matplotlib-1.5.2-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,44 @@ +easyblock = 'Bundle' + +name = 'matplotlib' +version = '1.5.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://matplotlib.org' +description = """matplotlib is a python 2D plotting library which produces publication quality figures in a variety of + hardcopy formats and interactive environments across platforms. matplotlib can be used in python scripts, the python + and ipython shell, web application servers, and six graphical user interface toolkits.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '3.5.2'), + ('freetype', '2.6.5'), + ('libpng', '1.6.24'), +] + +exts_list = [ + ('Cycler', '0.10.0', { + 'modulename': 'cycler', + 'source_urls': ['https://pypi.python.org/packages/source/C/Cycler'], + 'source_tmpl': 'cycler-%(version)s.tar.gz', + }), + (name, version, { + 'source_urls': ['https://pypi.python.org/packages/source/m/matplotlib'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'vis' -- GitLab From 7126e561104a5f56c0d10b1d86da11ab569968ba Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 14:18:07 +0100 Subject: [PATCH 662/741] don't use unstable cairo version, stick to 1.14.6 --- .../Ghostscript-9.20-intel-2016b.eb | 2 +- .../g/Graphviz/Graphviz-2.38.0-intel-2016b.eb | 4 +-- .../h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb | 34 ------------------- .../Pango-1.40.3-intel-2016b-cairo-1.15.2.eb | 33 ------------------ 4 files changed, 3 insertions(+), 70 deletions(-) delete mode 100644 easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb delete mode 100644 easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b-cairo-1.15.2.eb diff --git a/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb b/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb index e040683101..b752bcdfef 100644 --- a/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb +++ b/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb @@ -20,7 +20,7 @@ dependencies = [ ('libjpeg-turbo', '1.5.0'), ('expat', '2.2.0'), ('GLib', '2.49.5'), - ('cairo', '1.15.2'), + ('cairo', '1.14.6'), ('LibTIFF', '4.0.6'), ] diff --git a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2016b.eb b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2016b.eb index 3ad82f7107..50d0e0b449 100644 --- a/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2016b.eb +++ b/easybuild/easyconfigs/g/Graphviz/Graphviz-2.38.0-intel-2016b.eb @@ -16,14 +16,14 @@ source_urls = ['http://www.graphviz.org/pub/graphviz/stable/SOURCES/'] sources = [SOURCELOWER_TAR_GZ] dependencies = [ - ('cairo', '1.15.2'), + ('cairo', '1.14.6'), ('expat', '2.2.0'), ('freetype', '2.6.5'), ('Ghostscript', '9.20'), ('GTS', '0.7.6'), ('Java', '1.8.0_92', '', True), ('libpng', '1.6.24'), - ('Pango', '1.40.3', '-cairo-1.15.2'), + ('Pango', '1.40.3'), ('Perl', '5.24.0'), ('Qt', '4.8.7'), ('Tcl', '8.6.5'), diff --git a/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb b/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb deleted file mode 100644 index 46682f0a69..0000000000 --- a/easybuild/easyconfigs/h/HarfBuzz/HarfBuzz-1.3.3-intel-2016b.eb +++ /dev/null @@ -1,34 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'HarfBuzz' -version = '1.3.3' - -homepage = 'http://www.freedesktop.org/wiki/Software/HarfBuzz' -description = """HarfBuzz is an OpenType text shaping engine.""" - -toolchain = {'name': 'intel', 'version': '2016b'} - -source_urls = ['http://www.freedesktop.org/software/harfbuzz/release/'] -sources = [SOURCELOWER_TAR_BZ2] - -dependencies = [ - ('GLib', '2.49.5'), - ('cairo', '1.15.2'), - ('freetype', '2.6.5'), -] - -builddependencies = [('GObject-Introspection', '1.49.1')] - -configopts = "--enable-introspection=yes --with-gobject=yes --enable-static --enable-shared --with-cairo " - -modextrapaths = { - 'GI_TYPELIB_PATH': 'share', - 'XDG_DATA_DIRS': 'share', -} - -sanity_check_paths = { - 'files': ['lib/libharfbuzz.%s' % SHLIB_EXT, 'bin/hb-view'], - 'dirs': [] -} - -moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b-cairo-1.15.2.eb b/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b-cairo-1.15.2.eb deleted file mode 100644 index 001475ec70..0000000000 --- a/easybuild/easyconfigs/p/Pango/Pango-1.40.3-intel-2016b-cairo-1.15.2.eb +++ /dev/null @@ -1,33 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'Pango' -version = '1.40.3' - -homepage = 'http://www.pango.org/' -description = """Pango is a library for laying out and rendering of text, with an emphasis on internationalization. -Pango can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the -context of the GTK+ widget toolkit. Pango forms the core of text and font handling for GTK+-2.x.""" - -toolchain = {'name': 'intel', 'version': '2016b'} - -source_urls = [FTPGNOME_SOURCE] -sources = [SOURCELOWER_TAR_XZ] - -cairo_ver = '1.15.2' -versionsuffix = '-cairo-%s' % cairo_ver -dependencies = [ - ('X11', '20160819'), - ('GLib', '2.49.5'), - ('cairo', cairo_ver), - ('HarfBuzz', '1.3.3'), -] - -builddependencies = [('GObject-Introspection', '1.49.1')] - -configopts = "--disable-silent-rules --enable-introspection=yes --enable-static --enable-shared " - -modextrapaths = { - 'XDG_DATA_DIRS': 'share', -} - -moduleclass = 'vis' -- GitLab From fa66156f9382fe06a1f0e319dd453227088e9b40 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 14:48:10 +0100 Subject: [PATCH 663/741] also remove easyconfig for cairo 1.15.2 --- .../c/cairo/cairo-1.15.2-intel-2016b.eb | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 easybuild/easyconfigs/c/cairo/cairo-1.15.2-intel-2016b.eb diff --git a/easybuild/easyconfigs/c/cairo/cairo-1.15.2-intel-2016b.eb b/easybuild/easyconfigs/c/cairo/cairo-1.15.2-intel-2016b.eb deleted file mode 100644 index caaecf87e0..0000000000 --- a/easybuild/easyconfigs/c/cairo/cairo-1.15.2-intel-2016b.eb +++ /dev/null @@ -1,43 +0,0 @@ -easyblock = 'ConfigureMake' - -name = 'cairo' -version = '1.15.2' - -homepage = 'http://cairographics.org' -description = """Cairo is a 2D graphics library with support for multiple output devices. - Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, - PostScript, PDF, and SVG file output. Experimental backends include OpenGL, BeOS, OS/2, and DirectFB""" - -toolchain = {'name': 'intel', 'version': '2016b'} - -source_urls = ['http://cairographics.org/releases/'] -sources = [SOURCE_TAR_XZ] - -dependencies = [ - ('bzip2', '1.0.6'), - ('zlib', '1.2.8'), - ('libpng', '1.6.24'), - ('freetype', '2.6.5'), - ('pixman', '0.34.0'), - ('expat', '2.2.0'), - ('GLib', '2.49.5'), - ('X11', '20160819'), -] - -# disable symbol lookup, which requires -lbfd, to avoid link issues with (non-PIC) libiberty.a provided by GCC -configopts = "--enable-symbol-lookup=no --enable-gobject=yes --enable-svg=yes --enable-tee=yes --enable-xlib-xcb " - -# workaround for "hidden symbol .* in .* is referenced by DSO" and "ld: final link failed: Bad value" -buildopts = 'LD="$CC" LDFLAGS="$LDFLAGS -shared-intel"' - -sanity_check_paths = { - 'files': ['bin/cairo-trace', 'lib/cairo/libcairo-trace.so', 'lib/cairo/libcairo-trace.a', - 'lib/libcairo.a', 'lib/libcairo-gobject.a', 'lib/libcairo-script-interpreter.a', - 'lib/libcairo-gobject.so', 'lib/libcairo-script-interpreter.so', 'lib/libcairo.so'] + - ['include/cairo/cairo%s.h' % x for x in ['', '-deprecated', '-features', '-ft', '-gobject', '-pdf', '-ps', - '-script', '-script-interpreter', '-svg', '-version', '-xcb', - '-xlib', '-xlib-xrender']], - 'dirs': ['lib/pkgconfig'], -} - -moduleclass = 'vis' -- GitLab From f4bcf16d4ad14303563f035bea22039de8091c72 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 14:52:49 +0100 Subject: [PATCH 664/741] fix source spec for Ghostscript 9.20 --- .../easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb b/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb index b752bcdfef..2238d98b96 100644 --- a/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb +++ b/easybuild/easyconfigs/g/Ghostscript/Ghostscript-9.20-intel-2016b.eb @@ -11,7 +11,7 @@ toolchain = {'name': 'intel', 'version': '2016b'} toolchainopts = {'pic': True} source_urls = ["https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs%(version_major)s%(version_minor)s/"] -sources = ["ghostpdl-%(version)s.tar.bz2"] +sources = ['ghostscript-%(version)s.tar.gz'] dependencies = [ ('zlib', '1.2.8'), -- GitLab From 193b070ac5355bdd0acb205bd9fbac56fc3f3500 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 15:10:30 +0100 Subject: [PATCH 665/741] adding easyconfigs: Pillow-3.4.2-intel-2016b-Python-3.5.2-freetype-2.6.5.eb --- ...intel-2016b-Python-3.5.2-freetype-2.6.5.eb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-3.5.2-freetype-2.6.5.eb diff --git a/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-3.5.2-freetype-2.6.5.eb b/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-3.5.2-freetype-2.6.5.eb new file mode 100644 index 0000000000..8573700cd5 --- /dev/null +++ b/easybuild/easyconfigs/p/Pillow/Pillow-3.4.2-intel-2016b-Python-3.5.2-freetype-2.6.5.eb @@ -0,0 +1,28 @@ +easyblock = 'PythonPackage' + +name = 'Pillow' +version = '3.4.2' + +homepage = 'http://pillow.readthedocs.org/' +description = """Pillow is the 'friendly PIL fork' by Alex Clark and Contributors. + PIL is the Python Imaging Library by Fredrik Lundh and Contributors.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_TAR_GZ] + +freetype_ver = '2.6.5' +versionsuffix = '-Python-%%(pyver)s-freetype-%s' % freetype_ver +dependencies = [ + ('Python', '3.5.2'), + ('libjpeg-turbo', '1.5.0'), + ('libpng', '1.6.24'), + ('zlib', '1.2.8'), + ('LibTIFF', '4.0.6'), + ('freetype', freetype_ver), +] + +options = {'modulename': 'PIL'} + +moduleclass = 'vis' -- GitLab From 4f33380502ef31dbf83298bafe04786ea553e6a2 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 16:33:44 +0100 Subject: [PATCH 666/741] add widgetsnbextension extension to IPython 5.1.0 easyconfig, fix modulename for Jinja2 and Pygments --- .../i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb | 5 +++++ .../i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb index 1522403a69..ad14e82e32 100644 --- a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb @@ -41,6 +41,7 @@ exts_list = [ }), ('Pygments', '2.1.3', { 'source_urls': ['https://pypi.python.org/packages/source/P/Pygments/'], + 'modulename': 'pygments', }), ('singledispatch', '3.4.0.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/singledispatch/'], @@ -60,6 +61,7 @@ exts_list = [ }), ('Jinja2', '2.8', { 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'], + 'modulename': 'jinja2', }), ('jupyter_client', '4.3.0', { 'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_client/'], @@ -127,6 +129,9 @@ exts_list = [ ('ipywidgets', '5.2.2', { 'source_urls': ['https://pypi.python.org/packages/source/i/ipywidgets/'], }), + ('widgetsnbextension', '1.2.6', { + 'source_urls': ['https://pypi.python.org/packages/source/w/widgetsnbextension/'], + }), ] modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} diff --git a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb index 54779b3829..f205e1577f 100644 --- a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb +++ b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-3.5.2.eb @@ -41,6 +41,7 @@ exts_list = [ }), ('Pygments', '2.1.3', { 'source_urls': ['https://pypi.python.org/packages/source/P/Pygments/'], + 'modulename': 'pygments', }), ('singledispatch', '3.4.0.3', { 'source_urls': ['https://pypi.python.org/packages/source/s/singledispatch/'], @@ -57,6 +58,7 @@ exts_list = [ }), ('Jinja2', '2.8', { 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'], + 'modulename': 'jinja2', }), ('jupyter_client', '4.3.0', { 'source_urls': ['https://pypi.python.org/packages/source/j/jupyter_client/'], @@ -118,6 +120,9 @@ exts_list = [ ('ipywidgets', '5.2.2', { 'source_urls': ['https://pypi.python.org/packages/source/i/ipywidgets/'], }), + ('widgetsnbextension', '1.2.6', { + 'source_urls': ['https://pypi.python.org/packages/source/w/widgetsnbextension/'], + }), ] modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} -- GitLab From a8c8530b03c67ae3a4507123069cf6adc75c4116 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 20:59:26 +0100 Subject: [PATCH 667/741] disable 'nbconvert' in IPython 5.1.0 easyconfig using Python 2.7.12, due to 'backports' Python module installed by configparser causing problems for 'ipython'... --- .../i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb index ad14e82e32..98b1e60b7b 100644 --- a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb @@ -18,7 +18,8 @@ dependencies = [ ('Python', '2.7.12'), ('PyZMQ', '15.4.0', '%s-zmq4' % versionsuffix), ('testpath', '0.3', versionsuffix), - ('entrypoints', '0.2.2', versionsuffix), + # required by 'nbconvert', but causes problems w.r.t. 'backports' module... + #('entrypoints', '0.2.2', versionsuffix), ('path.py', '8.2.1', versionsuffix), ('prompt-toolkit', '1.0.6', versionsuffix), ] @@ -112,9 +113,9 @@ exts_list = [ ('pexpect', '4.2.0', { 'source_urls': ['https://pypi.python.org/packages/source/p/pexpect/'], }), - ('nbconvert', '4.2.0', { - 'source_urls': ['https://pypi.python.org/packages/source/n/nbconvert/'], - }), + #('nbconvert', '4.2.0', { + # 'source_urls': ['https://pypi.python.org/packages/source/n/nbconvert/'], + #}), ('backports.shutil_get_terminal_size', '1.0.0', { 'source_urls': ['https://pypi.python.org/packages/source/b/backports.shutil_get_terminal_size/'], }), -- GitLab From 8d7578450d0eece336322936f44eb6908a732523 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 21:21:08 +0100 Subject: [PATCH 668/741] include ref to #3825 --- .../i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb index 98b1e60b7b..d3bbfe47b7 100644 --- a/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/i/IPython/IPython-5.1.0-intel-2016b-Python-2.7.12.eb @@ -19,6 +19,7 @@ dependencies = [ ('PyZMQ', '15.4.0', '%s-zmq4' % versionsuffix), ('testpath', '0.3', versionsuffix), # required by 'nbconvert', but causes problems w.r.t. 'backports' module... + # see https://github.com/hpcugent/easybuild-easyconfigs/issues/3825 #('entrypoints', '0.2.2', versionsuffix), ('path.py', '8.2.1', versionsuffix), ('prompt-toolkit', '1.0.6', versionsuffix), @@ -113,6 +114,8 @@ exts_list = [ ('pexpect', '4.2.0', { 'source_urls': ['https://pypi.python.org/packages/source/p/pexpect/'], }), + # disabled because entrypoints on which this depends pull in configparser, which causes problems + # see https://github.com/hpcugent/easybuild-easyconfigs/issues/3825 #('nbconvert', '4.2.0', { # 'source_urls': ['https://pypi.python.org/packages/source/n/nbconvert/'], #}), -- GitLab From dc6612e312a2be830849042ef05a402b98b323b1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 21:33:24 +0100 Subject: [PATCH 669/741] adding easyconfigs: graphviz-0.5.1-intel-2016b-Python-2.7.12.eb --- ...raphviz-0.5.1-intel-2016b-Python-2.7.12.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/g/graphviz/graphviz-0.5.1-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/g/graphviz/graphviz-0.5.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/g/graphviz/graphviz-0.5.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..365523c529 --- /dev/null +++ b/easybuild/easyconfigs/g/graphviz/graphviz-0.5.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,25 @@ +easyblock = 'PythonPackage' + +name = 'graphviz' +version = '0.5.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/graphviz' +description = """Simple Python interface for Graphviz""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_ZIP] + +dependencies = [ + ('Python', '2.7.12'), + ('Graphviz', '2.38.0'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'vis' -- GitLab From b9e49c50967d748eca006298721078b268d1ecb7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 17 Nov 2016 21:48:08 +0100 Subject: [PATCH 670/741] also add graphviz easyconfig using Python 3.5.2 --- ...graphviz-0.5.1-intel-2016b-Python-3.5.2.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/g/graphviz/graphviz-0.5.1-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/g/graphviz/graphviz-0.5.1-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/g/graphviz/graphviz-0.5.1-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..236bb55454 --- /dev/null +++ b/easybuild/easyconfigs/g/graphviz/graphviz-0.5.1-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,25 @@ +easyblock = 'PythonPackage' + +name = 'graphviz' +version = '0.5.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://pypi.python.org/pypi/graphviz' +description = """Simple Python interface for Graphviz""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCE_ZIP] + +dependencies = [ + ('Python', '3.5.2'), + ('Graphviz', '2.38.0'), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'vis' -- GitLab From 77d4e302e842749915340cacf26fdbb2f8df4e93 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 18 Nov 2016 12:59:02 +0100 Subject: [PATCH 671/741] adding easyconfigs: Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb --- ...cutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 easybuild/easyconfigs/c/Cookiecutter/Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb diff --git a/easybuild/easyconfigs/c/Cookiecutter/Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb b/easybuild/easyconfigs/c/Cookiecutter/Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb new file mode 100644 index 0000000000..115a55ed2f --- /dev/null +++ b/easybuild/easyconfigs/c/Cookiecutter/Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb @@ -0,0 +1,81 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics + +easyblock = 'Bundle' + +name = 'Cookiecutter' +version = '1.4.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/audreyr/cookiecutter' +description = """Command-line utility that creates projects from cookiecutters (project templates). + E.g. Python package projects, jQuery plugin projects.""" + +toolchain = {'name': 'goolf', 'version': '1.7.20'} + +# this is a bundle of Python packages +exts_defaultclass = 'PythonPackage' + +dependencies = [ + ('Python', '2.7.11'), +] + +# this application also requires numpy, scipy and matplotlib which +# are provided by the Python module +exts_list = [ + ('six', '1.10.0', { + 'source_urls': ['https://pypi.python.org/packages/source/s/six/'], + }), + ('python-dateutil', '2.6.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/python-dateutil/'], + 'modulename': 'dateutil', + }), + ('future', '0.16.0', { + 'source_urls': ['https://pypi.python.org/packages/source/f/future/'], + }), + ('whichcraft', '0.4.0', { + 'source_urls': ['https://pypi.python.org/packages/source/w/whichcraft/'], + }), + ('arrow', '0.8.0', { + 'source_urls': ['https://pypi.python.org/packages/source/a/arrow/'], + }), + ('jinja2-time', '0.2.0', { + 'source_urls': ['https://pypi.python.org/packages/source/j/jinja2-time/'], + 'modulename': 'jinja2', + }), + ('chardet', '2.3.0', { + 'source_urls': ['https://pypi.python.org/packages/source/c/chardet/'], + }), + ('binaryornot', '0.4.0', { + 'source_urls': ['https://pypi.io/packages/source/b/binaryornot/'], + }), + ('Jinja2', '2.8', { + 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'], + }), + ('click', '6.6', { + 'source_urls': ['https://pypi.python.org/packages/source/c/click/'], + }), + ('poyo', '0.4.0', { + 'source_urls': ['https://pypi.python.org/packages/source/p/poyo/'], + }), + ('MarkupSafe', '0.23', { + 'source_urls': ['https://pypi.python.org/packages/source/m/MarkupSafe/'], + }), + ('cookiecutter', version, { + 'source_urls': ['https://pypi.python.org/packages/source/c/cookiecutter/'], + }), +] + +# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module +full_sanity_check = True + +sanity_check_paths = { + 'files': ['bin/%s' % x for x in ['chardetect', 'cookiecutter', 'futurize', 'pasteurize']], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +moduleclass = 'bio' -- GitLab From 1d7580ef4b1279a14b5d7137e1c906349d2b1b26 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Fri, 18 Nov 2016 18:30:50 +0100 Subject: [PATCH 672/741] adding easyconfigs: HTSlib-1.3.1-foss-2016b.eb, HTSlib-1.3.1-intel-2016b.eb --- .../h/HTSlib/HTSlib-1.3.1-foss-2016b.eb | 32 +++++++++++++++++++ .../h/HTSlib/HTSlib-1.3.1-intel-2016b.eb | 30 +++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-foss-2016b.eb create mode 100644 easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-intel-2016b.eb diff --git a/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-foss-2016b.eb b/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-foss-2016b.eb new file mode 100644 index 0000000000..71dc997206 --- /dev/null +++ b/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-foss-2016b.eb @@ -0,0 +1,32 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics +# Modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'ConfigureMake' + +name = 'HTSlib' +version = '1.3.1' + +homepage = 'http://www.htslib.org/' +description = """A C library for reading/writing high-throughput sequencing data. + HTSlib also provides the bgzip, htsfile, and tabix utilities""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/samtools/htslib/releases/download/%(version)s/'] +sources = [SOURCELOWER_TAR_BZ2] + +dependencies = [('zlib', '1.2.8')] + +runtest = 'test' + +sanity_check_paths = { + 'files': ["bin/bgzip", "bin/htsfile", "bin/tabix", "include/htslib/hts.h", "lib/libhts.%s" % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-intel-2016b.eb b/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-intel-2016b.eb new file mode 100644 index 0000000000..68ec706ab3 --- /dev/null +++ b/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-intel-2016b.eb @@ -0,0 +1,30 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# Swiss Institute of Bioinformatics +# Biozentrum - University of Basel +# 1.3.1 modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'ConfigureMake' + +name = 'HTSlib' +version = '1.3.1' + +homepage = "http://www.htslib.org/" +description = """A C library for reading/writing high-throughput sequencing data. + This package includes the utilities bgzip and tabix""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/samtools/%(namelower)s/releases/download/%(version)s/'] +sources = [SOURCELOWER_TAR_BZ2] + +dependencies = [('zlib', '1.2.8')] + +sanity_check_paths = { + 'files': ["bin/bgzip", "bin/tabix", "lib/libhts.%s" % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From d9a7d36900fd7ea7ba463d6b068f98cd1316f2ed Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 20 Nov 2016 12:15:15 +0100 Subject: [PATCH 673/741] Remove inconsistencies between foss and intel versions --- .../h/HTSlib/HTSlib-1.3.1-intel-2016b.eb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-intel-2016b.eb b/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-intel-2016b.eb index 68ec706ab3..38ae993dca 100644 --- a/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-intel-2016b.eb +++ b/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.1-intel-2016b.eb @@ -1,8 +1,8 @@ # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild # Author: Pablo Escobar Lopez -# Swiss Institute of Bioinformatics -# Biozentrum - University of Basel -# 1.3.1 modified by: +# sciCORE - University of Basel +# SIB Swiss Institute of Bioinformatics +# Modified by: # Adam Huffman # The Francis Crick Institute @@ -11,19 +11,21 @@ easyblock = 'ConfigureMake' name = 'HTSlib' version = '1.3.1' -homepage = "http://www.htslib.org/" +homepage = 'http://www.htslib.org/' description = """A C library for reading/writing high-throughput sequencing data. - This package includes the utilities bgzip and tabix""" + HTSlib also provides the bgzip, htsfile, and tabix utilities""" toolchain = {'name': 'intel', 'version': '2016b'} -source_urls = ['https://github.com/samtools/%(namelower)s/releases/download/%(version)s/'] +source_urls = ['https://github.com/samtools/htslib/releases/download/%(version)s/'] sources = [SOURCELOWER_TAR_BZ2] dependencies = [('zlib', '1.2.8')] +runtest = 'test' + sanity_check_paths = { - 'files': ["bin/bgzip", "bin/tabix", "lib/libhts.%s" % SHLIB_EXT], + 'files': ["bin/bgzip", "bin/htsfile", "bin/tabix", "include/htslib/hts.h", "lib/libhts.%s" % SHLIB_EXT], 'dirs': [], } -- GitLab From 8c34375128d4e0dfd6b889b573c5fd9e679c504d Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 20 Nov 2016 22:28:09 +0100 Subject: [PATCH 674/741] adding easyconfigs: ClustalW2-2.1-foss-2016b.eb --- .../c/ClustalW2/ClustalW2-2.1-foss-2016b.eb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/c/ClustalW2/ClustalW2-2.1-foss-2016b.eb diff --git a/easybuild/easyconfigs/c/ClustalW2/ClustalW2-2.1-foss-2016b.eb b/easybuild/easyconfigs/c/ClustalW2/ClustalW2-2.1-foss-2016b.eb new file mode 100644 index 0000000000..2a03b23888 --- /dev/null +++ b/easybuild/easyconfigs/c/ClustalW2/ClustalW2-2.1-foss-2016b.eb @@ -0,0 +1,35 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Cedric Laczny , Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-94.html +## +# foss-2016b modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'ConfigureMake' + +name = 'ClustalW2' +version = '2.1' + +homepage = 'http://www.ebi.ac.uk/Tools/msa/clustalw2/' +description = """ClustalW2 is a general purpose multiple sequence alignment program for DNA or proteins.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['http://www.clustal.org/download/%(version)s'] +sources = ['clustalw-%(version)s.tar.gz'] + +sanity_check_paths = { + 'files': ['bin/clustalw2'], + 'dirs': [] +} + +moduleclass = 'bio' -- GitLab From 687480244a1a19f0986a0e3cee8688c8861b66c8 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 20 Nov 2016 22:57:43 +0100 Subject: [PATCH 675/741] adding easyconfigs: Exonerate-2.4.0-foss-2016b.eb --- .../e/Exonerate/Exonerate-2.4.0-foss-2016b.eb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/e/Exonerate/Exonerate-2.4.0-foss-2016b.eb diff --git a/easybuild/easyconfigs/e/Exonerate/Exonerate-2.4.0-foss-2016b.eb b/easybuild/easyconfigs/e/Exonerate/Exonerate-2.4.0-foss-2016b.eb new file mode 100644 index 0000000000..f186cddd62 --- /dev/null +++ b/easybuild/easyconfigs/e/Exonerate/Exonerate-2.4.0-foss-2016b.eb @@ -0,0 +1,34 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# Swiss Institute of Bioinformatics +# Biozentrum - University of Basel +# foss-2016b modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'ConfigureMake' + +name = 'Exonerate' +version = '2.4.0' + +homepage = 'http://www.ebi.ac.uk/~guy/exonerate/' +description = """ Exonerate is a generic tool for pairwise sequence comparison. + It allows you to align sequences using a many alignment models, using either + exhaustive dynamic programming, or a variety of heuristics. """ + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/nathanweeks/exonerate/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [('GLib', '2.49.5')] + +# parallel build fails +parallel = 1 + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["exonerate", "fastaclip", "fastaoverlap"]], + 'dirs': ["share"], +} + +moduleclass = 'bio' -- GitLab From 0f27dfbfbb5359255f283772a8fe5b7ce551bacc Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 20 Nov 2016 23:01:42 +0100 Subject: [PATCH 676/741] Add missing deps for Exonerate --- .../g/GLib/GLib-2.49.5-foss-2016b.eb | 33 +++++++++++++++++++ .../p/PCRE/PCRE-8.39-foss-2016b.eb | 20 +++++++++++ 2 files changed, 53 insertions(+) create mode 100644 easybuild/easyconfigs/g/GLib/GLib-2.49.5-foss-2016b.eb create mode 100644 easybuild/easyconfigs/p/PCRE/PCRE-8.39-foss-2016b.eb diff --git a/easybuild/easyconfigs/g/GLib/GLib-2.49.5-foss-2016b.eb b/easybuild/easyconfigs/g/GLib/GLib-2.49.5-foss-2016b.eb new file mode 100644 index 0000000000..3e8dd8b2df --- /dev/null +++ b/easybuild/easyconfigs/g/GLib/GLib-2.49.5-foss-2016b.eb @@ -0,0 +1,33 @@ +easyblock = 'ConfigureMake' + +name = 'GLib' +version = '2.49.5' + +homepage = 'http://www.gtk.org/' +description = """GLib is one of the base libraries of the GTK+ project""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [FTPGNOME_SOURCE] +sources = [SOURCELOWER_TAR_XZ] + +dependencies = [ + ('libffi', '3.2.1'), + ('gettext', '0.19.8'), + ('libxml2', '2.9.4'), + ('PCRE', '8.39'), +] + +builddependencies = [('Python', '2.7.12')] + +configopts = "--disable-maintainer-mode --disable-silent-rules --disable-libelf --enable-static --enable-shared --disable-systemtap" + +postinstallcmds = ["sed -i -e 's|#!.*python|#!/usr/bin/env python|' %(installdir)s/bin/*"] + +sanity_check_paths = { + 'files': ['lib/libglib-%(version_major)s.0.a', 'lib/libglib-%%(version_major)s.0.%s' % SHLIB_EXT], + 'dirs': ['bin', 'include'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/PCRE/PCRE-8.39-foss-2016b.eb b/easybuild/easyconfigs/p/PCRE/PCRE-8.39-foss-2016b.eb new file mode 100644 index 0000000000..4941ec3935 --- /dev/null +++ b/easybuild/easyconfigs/p/PCRE/PCRE-8.39-foss-2016b.eb @@ -0,0 +1,20 @@ +easyblock = 'ConfigureMake' + +name = 'PCRE' +version = '8.39' + +homepage = 'http://www.pcre.org/' +description = """ + The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax + and semantics as Perl 5. +""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = [SOURCEFORGE_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +configopts = "--with-pic --disable-cpp --enable-utf --enable-unicode-properties" + +moduleclass = 'devel' -- GitLab From 01715ae2d3f49fdecd65dd4522da5f720248b9f8 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 20 Nov 2016 23:01:42 +0100 Subject: [PATCH 677/741] adding easyconfigs: FASTX-Toolkit-0.0.14-foss-2016b.eb, libgtextutils-0.7-foss-2016b.eb --- .../FASTX-Toolkit-0.0.14-foss-2016b.eb | 47 +++++++++++++++++++ .../libgtextutils-0.7-foss-2016b.eb | 35 ++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 easybuild/easyconfigs/f/FASTX-Toolkit/FASTX-Toolkit-0.0.14-foss-2016b.eb create mode 100644 easybuild/easyconfigs/l/libgtextutils/libgtextutils-0.7-foss-2016b.eb diff --git a/easybuild/easyconfigs/f/FASTX-Toolkit/FASTX-Toolkit-0.0.14-foss-2016b.eb b/easybuild/easyconfigs/f/FASTX-Toolkit/FASTX-Toolkit-0.0.14-foss-2016b.eb new file mode 100644 index 0000000000..ef4b99cd73 --- /dev/null +++ b/easybuild/easyconfigs/f/FASTX-Toolkit/FASTX-Toolkit-0.0.14-foss-2016b.eb @@ -0,0 +1,47 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Cedric Laczny , Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-94.html +## +# foss-2016b modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'ConfigureMake' + +name = 'FASTX-Toolkit' +version = '0.0.14' + +homepage = 'http://hannonlab.cshl.edu/fastx_toolkit/' +description = """The FASTX-Toolkit is a collection of command line tools for + Short-Reads FASTA/FASTQ files preprocessing.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ['https://github.com/agordon/fastx_toolkit/releases/download/%(version)s'] +sources = ['fastx_toolkit-%(version)s.tar.bz2'] + +builddependencies = [('libgtextutils', '0.7')] + +sanity_check_paths = { + 'files': + ['bin/fastx_%s' % x for x in + ['clipper', 'trimmer', 'quality_stats', 'artifacts_filter', 'reverse_complement', + 'collapser', 'uncollapser', 'renamer', 'barcode_splitter.pl', 'nucleotide_distribution_graph.sh', + 'nucleotide_distribution_line_graph.sh']] + + ['bin/fasta_%s' % x for x in + ['clipping_histogram.pl', 'formatter', 'nucleotide_changer']] + + ['bin/fastq_%s' % x for x in + ['quality_boxplot_graph.sh', 'quality_converter', 'to_fasta', 'quality_filter', + 'quality_trimmer', 'masker']], + 'dirs': ['.'] +} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/l/libgtextutils/libgtextutils-0.7-foss-2016b.eb b/easybuild/easyconfigs/l/libgtextutils/libgtextutils-0.7-foss-2016b.eb new file mode 100644 index 0000000000..0c761422aa --- /dev/null +++ b/easybuild/easyconfigs/l/libgtextutils/libgtextutils-0.7-foss-2016b.eb @@ -0,0 +1,35 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Cedric Laczny , Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-94.html +## +# foss-2016b modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'ConfigureMake' + +name = 'libgtextutils' +version = '0.7' + +homepage = 'http://hannonlab.cshl.edu/fastx_toolkit/' +description = """ligtextutils is a dependency of fastx-toolkit and is provided via the same upstream""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ['https://github.com/agordon/libgtextutils/releases/download/%(version)s'] +sources = [SOURCE_TAR_GZ] + +sanity_check_paths = { + 'files': ['lib/libgtextutils.so', 'lib/libgtextutils.a'], + 'dirs': ['lib/pkgconfig'] +} + +moduleclass = 'lib' -- GitLab From bdf53da4e67f57e28951ac8418685b7fb0801488 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 20 Nov 2016 23:19:14 +0100 Subject: [PATCH 678/741] adding easyconfigs: GMAP-GSNAP-2016-11-07-foss-2016b.eb --- .../GMAP-GSNAP-2016-11-07-foss-2016b.eb | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 easybuild/easyconfigs/g/GMAP-GSNAP/GMAP-GSNAP-2016-11-07-foss-2016b.eb diff --git a/easybuild/easyconfigs/g/GMAP-GSNAP/GMAP-GSNAP-2016-11-07-foss-2016b.eb b/easybuild/easyconfigs/g/GMAP-GSNAP/GMAP-GSNAP-2016-11-07-foss-2016b.eb new file mode 100644 index 0000000000..a8ca27958e --- /dev/null +++ b/easybuild/easyconfigs/g/GMAP-GSNAP/GMAP-GSNAP-2016-11-07-foss-2016b.eb @@ -0,0 +1,40 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# Swiss Institute of Bioinformatics +# Biozentrum - University of Basel +# 2016-11-07 modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'ConfigureMake' + +name = 'GMAP-GSNAP' +version = '2016-11-07' + +homepage = 'http://research-pub.gene.com/gmap/' +description = """GMAP: A Genomic Mapping and Alignment Program for mRNA and EST Sequences + GSNAP: Genomic Short-read Nucleotide Alignment Program""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['http://research-pub.gene.com/gmap/src/'] +sources = [SOURCELOWER_TAR_GZ] + +# with these deps you can use standard compressed files +# to support files in gobby format take a look at README for extra dependencies +# http://research-pub.gene.com/gmap/src/README +dependencies = [ + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), +] + +# you can change the MAX_READLENGTH for GSNAP with something like this. +# details in the README http://research-pub.gene.com/gmap/src/README +#configopts = 'MAX_READLENGTH=250' + +sanity_check_paths = { + 'files': ['bin/gmap', 'bin/gsnap'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From b478a601696d13a2f96006a0a77e712cb3cd28e4 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 00:13:58 +0100 Subject: [PATCH 679/741] adding easyconfigs: khmer-1.4.1-foss-2016b-Python-2.7.12.eb --- .../khmer-1.4.1-foss-2016b-Python-2.7.12.eb | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 easybuild/easyconfigs/k/khmer/khmer-1.4.1-foss-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/k/khmer/khmer-1.4.1-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/k/khmer/khmer-1.4.1-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..68addbe817 --- /dev/null +++ b/easybuild/easyconfigs/k/khmer/khmer-1.4.1-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,33 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# Swiss Institute of Bioinformatics +# Biozentrum - University of Basel +# 1.4.1 modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = "PythonPackage" + +name = 'khmer' +version = '1.4.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/ged-lab/khmer/' +description = """ In-memory nucleotide sequence k-mer counting, filtering, graph traversal and more """ + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['https://github.com/ged-lab/khmer/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [ + ('Python', '2.7.12'), +] + +sanity_check_paths = { + 'files': ["bin/%s" % x for x in ["count-median.py", "extract-long-sequences.py", "filter-abund.py", + "load-into-counting.py", "sample-reads-randomly.py"]], + 'dirs': ["lib/python%(pyshortver)s/site-packages/khmer-%(version)s-py%(pyshortver)s-linux-x86_64.egg"], +} + +moduleclass = 'bio' -- GitLab From 8169eaea546118241a2bf3c021cc371758418719 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 00:20:14 +0100 Subject: [PATCH 680/741] adding easyconfigs: MAFFT-7.305-foss-2016b-with-extensions.eb --- .../MAFFT-7.305-foss-2016b-with-extensions.eb | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 easybuild/easyconfigs/m/MAFFT/MAFFT-7.305-foss-2016b-with-extensions.eb diff --git a/easybuild/easyconfigs/m/MAFFT/MAFFT-7.305-foss-2016b-with-extensions.eb b/easybuild/easyconfigs/m/MAFFT/MAFFT-7.305-foss-2016b-with-extensions.eb new file mode 100644 index 0000000000..725469edc9 --- /dev/null +++ b/easybuild/easyconfigs/m/MAFFT/MAFFT-7.305-foss-2016b-with-extensions.eb @@ -0,0 +1,37 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# Swiss Institute of Bioinformatics +# Biozentrum - University of Basel +# 7.305 modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'ConfigureMake' + +name = 'MAFFT' +version = '7.305' +versionsuffix = '-with-extensions' + +homepage = 'http://mafft.cbrc.jp/alignment/software/' +description = """MAFFT is a multiple sequence alignment program + for unix-like operating systems. It offers a range of multiple + alignment methods, L-INS-i (accurate; for alignment of <∼200 sequences), + FFT-NS-2 (fast; for alignment of <∼10,000 sequences), etc.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [homepage] +sources = ['%(namelower)s-%(version)s%(versionsuffix)s-src.tgz'] + +skipsteps = ['configure'] +start_dir = 'core' +installopts = 'PREFIX=%(installdir)s' + +modextrapaths = {'MAFFT_BINARIES': 'libexec/mafft'} + +sanity_check_paths = { + 'files': ['bin/mafft'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 256c16287bea8ebcaa33dc39df37e53a35b4de33 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 00:40:36 +0100 Subject: [PATCH 681/741] adding easyconfigs: picard-2.1.1-Java-1.8.0_112.eb --- .../p/picard/picard-2.1.1-Java-1.8.0_112.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/p/picard/picard-2.1.1-Java-1.8.0_112.eb diff --git a/easybuild/easyconfigs/p/picard/picard-2.1.1-Java-1.8.0_112.eb b/easybuild/easyconfigs/p/picard/picard-2.1.1-Java-1.8.0_112.eb new file mode 100644 index 0000000000..9ac8383024 --- /dev/null +++ b/easybuild/easyconfigs/p/picard/picard-2.1.1-Java-1.8.0_112.eb @@ -0,0 +1,18 @@ +name = 'picard' +version = '2.1.1' +versionsuffix = '-Java-%(javaver)s' + +homepage = 'http://broadinstitute.github.io/picard/' +description = """A set of tools (in Java) for working with next generation sequencing data in the BAM + (http://samtools.github.io/hts-specs) format.""" + +toolchain = {'name': 'dummy', 'version': ''} + +source_urls = ['https://github.com/broadinstitute/picard/releases/download/%(version)s/'] +sources = ['%(name)s-tools-%(version)s.zip'] + +dependencies = [('Java', '1.8.0_112')] + +modloadmsg = "To execute picard run: java -jar \\${EBROOTPICARD}/%(name)s.jar" + +moduleclass = 'bio' -- GitLab From ebf2419cadd0ba788524f5202a8114cba91362f0 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 08:40:52 +0100 Subject: [PATCH 682/741] adding easyconfigs: GSL-2.1-foss-2016b.eb --- .../easyconfigs/g/GSL/GSL-2.1-foss-2016b.eb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016b.eb diff --git a/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016b.eb b/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016b.eb new file mode 100644 index 0000000000..f7799c2690 --- /dev/null +++ b/easybuild/easyconfigs/g/GSL/GSL-2.1-foss-2016b.eb @@ -0,0 +1,19 @@ +easyblock = 'ConfigureMake' + +name = 'GSL' +version = '2.1' + +homepage = 'http://www.gnu.org/software/gsl/' +description = """The GNU Scientific Library (GSL) is a numerical library for C and C++ programmers. + The library provides a wide range of mathematical routines such as random number generators, special functions + and least-squares fitting.""" + +toolchain = {'version': '2016b', 'name': 'foss'} +toolchainopts = {'opt': True, 'optarch': True, 'unroll': True, 'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [GNU_SOURCE] + +configopts = '--with-pic' + +moduleclass = 'numlib' -- GitLab From 6ae0c365f0a83468bf8824080afa5bb70d3ebebd Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 08:54:34 +0100 Subject: [PATCH 683/741] adding easyconfigs: seqtk-1.2-foss-2016b.eb --- .../s/seqtk/seqtk-1.2-foss-2016b.eb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/s/seqtk/seqtk-1.2-foss-2016b.eb diff --git a/easybuild/easyconfigs/s/seqtk/seqtk-1.2-foss-2016b.eb b/easybuild/easyconfigs/s/seqtk/seqtk-1.2-foss-2016b.eb new file mode 100644 index 0000000000..ff933e459c --- /dev/null +++ b/easybuild/easyconfigs/s/seqtk/seqtk-1.2-foss-2016b.eb @@ -0,0 +1,28 @@ +easyblock = 'MakeCp' + +name = 'seqtk' +version = '1.2' + +homepage = 'https://github.com/lh3/seqtk/' +description = """Seqtk is a fast and lightweight tool for processing sequences in the FASTA or FASTQ format. + It seamlessly parses both FASTA and FASTQ files which can also be optionally compressed by gzip.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/lh3/seqtk/archive/'] + +buildopts = 'CC="$CC" CFLAGS="$CLFAGS"' + +files_to_copy = ["seqtk"] + +sanity_check_paths = { + 'files': files_to_copy, + 'dirs': [], +} + +modextrapaths = { + 'PATH': [''], +} + +moduleclass = 'bio' -- GitLab From 3d155e5bd65a55ffa2ec94f0193dc1b6cc4aa607 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 09:02:22 +0100 Subject: [PATCH 684/741] adding easyconfigs: Oases-0.2.08-foss-2016b.eb --- .../o/Oases/Oases-0.2.08-foss-2016b.eb | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 easybuild/easyconfigs/o/Oases/Oases-0.2.08-foss-2016b.eb diff --git a/easybuild/easyconfigs/o/Oases/Oases-0.2.08-foss-2016b.eb b/easybuild/easyconfigs/o/Oases/Oases-0.2.08-foss-2016b.eb new file mode 100644 index 0000000000..335f79d16b --- /dev/null +++ b/easybuild/easyconfigs/o/Oases/Oases-0.2.08-foss-2016b.eb @@ -0,0 +1,47 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 The Cyprus Institute +# Authors:: Andreas Panteli , Fotis Georgatos +# License:: MIT/GPL +# +## +# foss-2016b modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = "MakeCp" + +name = 'Oases' +version = '0.2.08' + +homepage = 'http://www.ebi.ac.uk/~zerbino/oases/' +description = """Oases is a de novo transcriptome assembler designed to produce transcripts from + short read sequencing technologies, such as Illumina, SOLiD, or 454 in the absence of any genomic assembly.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +velvetver = '1.2.10' + +sources = [ + '%(namelower)s_%(version)s.tgz', + 'velvet_%s.tgz' % velvetver, +] + +source_urls = [ + 'http://www.ebi.ac.uk/~zerbino/%(namelower)s', + 'http://www.ebi.ac.uk/~zerbino/velvet', +] + +# listed make targets exclude 'doc' on purpose +buildopts = ['VELVET_DIR=../velvet_%s cleanobj velvet oases' % velvetver] +parallel = 1 + +files_to_copy = [(["oases"], 'bin'), "data", "scripts", "src", "doc", "LICENSE.txt", "README.txt"] + +sanity_check_paths = { + 'files': ["bin/oases", "LICENSE.txt", "README.txt"], + 'dirs': ["data", "scripts", "src", "doc"] +} + +moduleclass = 'bio' -- GitLab From 7fb510317089291e0b7305ae9349b166ce68efd7 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 12:19:48 +0100 Subject: [PATCH 685/741] adding easyconfigs: Biopython-1.68-foss-2016b-Python-2.7.12.eb --- ...Biopython-1.68-foss-2016b-Python-2.7.12.eb | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 easybuild/easyconfigs/b/Biopython/Biopython-1.68-foss-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/b/Biopython/Biopython-1.68-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/Biopython/Biopython-1.68-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..1c5fd3f356 --- /dev/null +++ b/easybuild/easyconfigs/b/Biopython/Biopython-1.68-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,41 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2013 The Cyprus Institute +# Authors:: Andreas Panteli , Thekla Loizou , George Tsouloupas +# License:: MIT/GPL +# +## +# foss-2016b modified by: +# Adam Huffman +# The Francis Crick Institute + +easyblock = "PythonPackage" + +name = 'Biopython' +version = '1.68' +versionsuffix = "-Python-%(pyver)s" + +homepage = 'http://www.biopython.org' +description = """Biopython is a set of freely available tools for biological computation written +in Python by an international team of developers. It is a distributed collaborative effort to +develop Python libraries and applications which address the needs of current and future work in +bioinformatics. """ + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = ['http://biopython.org/DIST'] +sources = ['%(namelower)s-%(version)s.tar.gz'] + +dependencies = [ + ('Python', '2.7.12') +] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/Bio', 'lib/python%(pyshortver)s/site-packages/BioSQL'] +} + +options = {'modulename': 'Bio'} + +moduleclass = 'bio' -- GitLab From c44e603e6a0ff252dba53403e1be171d8a6e425a Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 12:43:20 +0100 Subject: [PATCH 686/741] adding easyconfigs: SAMtools-0.1.19-foss-2016b.eb --- .../s/SAMtools/SAMtools-0.1.19-foss-2016b.eb | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.19-foss-2016b.eb diff --git a/easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.19-foss-2016b.eb b/easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.19-foss-2016b.eb new file mode 100644 index 0000000000..1402be8df0 --- /dev/null +++ b/easybuild/easyconfigs/s/SAMtools/SAMtools-0.1.19-foss-2016b.eb @@ -0,0 +1,21 @@ +name = 'SAMtools' +version = '0.1.19' + +homepage = 'http://www.htslib.org/' +description = """SAM Tools provide various utilities for manipulating alignments in the SAM format, + including sorting, merging, indexing and generating alignments in a per-position format.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = [('http://sourceforge.net/projects/samtools/files/%(namelower)s/%(version)s', 'download')] + +patches = ['SAMtools-%(version)s_Makefile-ncurses.patch'] + +dependencies = [ + ('ncurses', '6.0'), + ('zlib', '1.2.8'), +] + +moduleclass = 'bio' -- GitLab From 9b462dd39aeb5c996dd4ad75b94f5ae3aaff2bf5 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 22 Nov 2016 11:12:48 +0100 Subject: [PATCH 687/741] adding easyconfigs: XGBoost-0.6a2-intel-2016b-Python-2.7.12.eb, XGBoost-0.6a2-intel-2016b-Python-3.5.2.eb --- ...XGBoost-0.6a2-intel-2016b-Python-2.7.12.eb | 23 +++++++++++++++++++ .../XGBoost-0.6a2-intel-2016b-Python-3.5.2.eb | 23 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 easybuild/easyconfigs/x/XGBoost/XGBoost-0.6a2-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/x/XGBoost/XGBoost-0.6a2-intel-2016b-Python-3.5.2.eb diff --git a/easybuild/easyconfigs/x/XGBoost/XGBoost-0.6a2-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/x/XGBoost/XGBoost-0.6a2-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..4359ea417d --- /dev/null +++ b/easybuild/easyconfigs/x/XGBoost/XGBoost-0.6a2-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonPackage' + +name = 'XGBoost' +version = '0.6a2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/dmlc/xgboost' +description = """XGBoost is an optimized distributed gradient boosting library designed to be highly efficient, + flexible and portable.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('Python', '2.7.12')] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/x/XGBoost/XGBoost-0.6a2-intel-2016b-Python-3.5.2.eb b/easybuild/easyconfigs/x/XGBoost/XGBoost-0.6a2-intel-2016b-Python-3.5.2.eb new file mode 100644 index 0000000000..f4be4224b1 --- /dev/null +++ b/easybuild/easyconfigs/x/XGBoost/XGBoost-0.6a2-intel-2016b-Python-3.5.2.eb @@ -0,0 +1,23 @@ +easyblock = 'PythonPackage' + +name = 'XGBoost' +version = '0.6a2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'https://github.com/dmlc/xgboost' +description = """XGBoost is an optimized distributed gradient boosting library designed to be highly efficient, + flexible and portable.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [PYPI_SOURCE] +sources = [SOURCELOWER_TAR_GZ] + +dependencies = [('Python', '3.5.2')] + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'lib' -- GitLab From f9564f62f944c7048563851897bf50b859d1d526 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 22 Nov 2016 13:59:01 +0100 Subject: [PATCH 688/741] adding easyconfigs: OpenCV-3.1.0-intel-2016b.eb --- .../o/OpenCV/OpenCV-3.1.0-intel-2016b.eb | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 easybuild/easyconfigs/o/OpenCV/OpenCV-3.1.0-intel-2016b.eb diff --git a/easybuild/easyconfigs/o/OpenCV/OpenCV-3.1.0-intel-2016b.eb b/easybuild/easyconfigs/o/OpenCV/OpenCV-3.1.0-intel-2016b.eb new file mode 100644 index 0000000000..896ae67a98 --- /dev/null +++ b/easybuild/easyconfigs/o/OpenCV/OpenCV-3.1.0-intel-2016b.eb @@ -0,0 +1,69 @@ +easyblock = 'CMakeMake' + +name = 'OpenCV' +version = '3.1.0' + +homepage = 'http://opencv.org/' +description = """OpenCV (Open Source Computer Vision Library) is an open source computer vision + and machine learning software library. OpenCV was built to provide + a common infrastructure for computer vision applications and to accelerate + the use of machine perception in the commercial products.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/Itseez/opencv/archive/'] +sources = ['%(version)s.zip'] + +patches = ['OpenCV-%(version)s_with_IPP.patch'] + +builddependencies = [ + ('CMake', '3.5.2'), +] + +dependencies = [ + ('Python', '2.7.12'), + ('zlib', '1.2.8'), + ('FFmpeg', '3.1.3'), + ('libjpeg-turbo', '1.5.0'), + ('libpng', '1.6.24'), + ('LibTIFF', '4.0.6'), + ('JasPer', '1.900.1'), + ('Java', '1.8.0_92', '', True), + ('ant', '1.9.7', '-Java-%(javaver)s', True), + ('GLib', '2.49.5'), + ('GTK+', '2.24.31'), +] + +preconfigopts = 'export IPPROOT=$EBROOTICC/ipp && ' + +configopts = '-DCMAKE_BUILD_TYPE=RELEASE ' +configopts += '-DBUILD_PYTHON_SUPPORT=ON ' +configopts += '-DPYTHON_PACKAGES_PATH=%(installdir)s/lib/python%(pyshortver)s/site-packages ' +configopts += '-DBUILD_NEW_PYTHON_SUPPORT=ON ' +configopts += '-DZLIB_LIBRARY=$EBROOTZLIB/lib/libz.%s ' % SHLIB_EXT +configopts += '-DZLIB_INCLUDE_DIR=$EBROOTZLIB/include ' +configopts += '-DTIFF_LIBRARY=$EBROOTLIBTIFF/lib/libtiff.%s ' % SHLIB_EXT +configopts += '-DTIFF_INCLUDE_DIR=$EBROOTLIBTIFF/include ' +configopts += '-DPNG_LIBRARY=$EBROOTLIBPNG/lib/libpng.%s ' % SHLIB_EXT +configopts += '-DPNG_INCLUDE_DIR=$EBROOTLIBPNG/include ' +configopts += '-DJPEG_LIBRARY=$EBROOTLIBJPEGMINTURBO/lib/libjpeg.%s ' % SHLIB_EXT +configopts += '-DJPEG_INCLUDE_DIR=$EBROOTLIBJPEGMINTURBO/include ' +configopts += '-DJASPER_LIBRARY=$EBROOTJASPER/lib/libjasper.a ' +configopts += '-DJASPER_INCLUDE_DIR=$EBROOTJASPER/include ' +configopts += '-DWITH_IPP=ON ' +configopts += '-DENABLE_SSE=ON -DENABLE_SSE2=ON -DENABLE_SSE3=ON ' +configopts += '-DWITH_CUDA=OFF ' + +sanity_check_paths = { + 'files': ['lib/libopencv_core.%s' % SHLIB_EXT ] + + ['lib/python%%(pyshortver)s/site-packages/cv2.%s' % SHLIB_EXT ] + + ['bin/opencv_%s' % x for x in ['annotation', 'createsamples', 'traincascade']], + 'dirs': ['include'] +} + +modextrapaths = { + 'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages', + 'CLASSPATH': 'share/OpenCV/java', +} + +moduleclass = 'vis' -- GitLab From 0880ddd306d100b13e6afdc3ee379ffaba2d685f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 23 Nov 2016 16:14:45 +0100 Subject: [PATCH 689/741] adding easyconfigs: SAMtools-1.3.1-intel-2016b-HTSlib-1.3.2.eb, HTSlib-1.3.2-intel-2016b.eb --- .../h/HTSlib/HTSlib-1.3.2-intel-2016b.eb | 27 ++++++++++++++ ...SAMtools-1.3.1-intel-2016b-HTSlib-1.3.2.eb | 36 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.2-intel-2016b.eb create mode 100644 easybuild/easyconfigs/s/SAMtools/SAMtools-1.3.1-intel-2016b-HTSlib-1.3.2.eb diff --git a/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.2-intel-2016b.eb b/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.2-intel-2016b.eb new file mode 100644 index 0000000000..b0528a8f0c --- /dev/null +++ b/easybuild/easyconfigs/h/HTSlib/HTSlib-1.3.2-intel-2016b.eb @@ -0,0 +1,27 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Pablo Escobar Lopez +# Swiss Institute of Bioinformatics +# Biozentrum - University of Basel + +easyblock = 'ConfigureMake' + +name = 'HTSlib' +version = '1.3.2' + +homepage = "http://www.htslib.org/" +description = """A C library for reading/writing high-throughput sequencing data. + This package includes the utilities bgzip and tabix""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/samtools/%(namelower)s/releases/download/%(version)s/'] +sources = [SOURCELOWER_TAR_BZ2] + +dependencies = [('zlib', '1.2.8')] + +sanity_check_paths = { + 'files': ["bin/bgzip", "bin/tabix", "lib/libhts.%s" % SHLIB_EXT], + 'dirs': [], +} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/s/SAMtools/SAMtools-1.3.1-intel-2016b-HTSlib-1.3.2.eb b/easybuild/easyconfigs/s/SAMtools/SAMtools-1.3.1-intel-2016b-HTSlib-1.3.2.eb new file mode 100644 index 0000000000..cf342e2224 --- /dev/null +++ b/easybuild/easyconfigs/s/SAMtools/SAMtools-1.3.1-intel-2016b-HTSlib-1.3.2.eb @@ -0,0 +1,36 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Robert Schmidt , Cedric Laczny , Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +## + +name = 'SAMtools' +version = '1.3.1' + +homepage = 'http://www.htslib.org/' +description = """Samtools is a suite of programs for interacting with high-throughput sequencing data. + SAMtools - Reading/writing/editing/indexing/viewing SAM/BAM/CRAM format""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'pic': True} + +sources = [SOURCELOWER_TAR_BZ2] +source_urls = ['https://github.com/samtools/%(namelower)s/releases/download/%(version)s'] + +# include proper HTSlib dependency rather than using HTSlib version included with SAMtools +htsver = '1.3.2' +versionsuffix = '-HTSlib-%s' % htsver + +dependencies = [ + ('HTSlib', htsver), + ('ncurses', '6.0'), + ('zlib', '1.2.8'), +] + +configopts = '--with-htslib=$EBROOTHSTLIB' + +moduleclass = 'bio' -- GitLab From 4135c183559633139b8b3c1a33841188d46dc998 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 23 Nov 2016 16:41:25 +0100 Subject: [PATCH 690/741] add easyconfig + patch for LoFreq v2.1.2 with intel/2016b & Python 2.7.12 --- .../LoFreq-2.1.2-intel-2016b-Python-2.7.12.eb | 30 +++++ .../LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch | 124 ++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch diff --git a/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..e9aae8deda --- /dev/null +++ b/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,30 @@ +easyblock = 'ConfigureMake' + +name = 'LoFreq' +version = '2.1.2' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://csb5.github.io/lofreq' +description = "Fast and sensitive variant calling from next-gen sequencing data" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [SOURCEFORGE_SOURCE] +sources = ['lofreq_star-%(version)s.tar.gz'] + +patches = ['LoFreq-%(version)s_SAMtools-HTSlib.patch'] + +dependencies = [ + ('Python', '2.7.12'), + ('SAMtools', '1.3.1', '-HTSlib-1.3.2'), +] + +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} + +sanity_check_paths = { + 'files': ['bin/lofreq'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} +sanity_check_commands = [('python', "-c 'import lofreq_star'")] + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch b/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch new file mode 100644 index 0000000000..dd9b689ba0 --- /dev/null +++ b/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch @@ -0,0 +1,124 @@ +https://github.com/CSB5/lofreq/issues/28 + +diff -ur lofreq_star-2.1.2.orig/configure lofreq_star-2.1.2/configure +--- lofreq_star-2.1.2.orig/configure 2015-05-19 07:40:54.000000000 +0200 ++++ lofreq_star-2.1.2/configure 2016-11-22 11:10:50.084224167 +0100 +@@ -14376,78 +14376,6 @@ + #AC_LIB_LINKFLAGS([hts]) + #AC_LIB_LINKFLAGS([bam]) + +-if test x"$SAMTOOLS" = x""; then +- { { $as_echo "$as_me:$LINENO: error: Samtools directory not defined. Please use SAMTOOLS=/fullpath/to/samtoolsdir/" >&5 +-$as_echo "$as_me: error: Samtools directory not defined. Please use SAMTOOLS=/fullpath/to/samtoolsdir/" >&2;} +- { (exit 1); exit 1; }; } +-fi +- +-if test x"$HTSLIB" = x""; then +- { { $as_echo "$as_me:$LINENO: error: Htslib directory not defined. Please use HTSLIB=/fullpath/to/htslibdir/" >&5 +-$as_echo "$as_me: error: Htslib directory not defined. Please use HTSLIB=/fullpath/to/htslibdir/" >&2;} +- { (exit 1); exit 1; }; } +-fi +-as_ac_File=`$as_echo "ac_cv_file_${SAMTOOLS}/bam.h" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for ${SAMTOOLS}/bam.h" >&5 +-$as_echo_n "checking for ${SAMTOOLS}/bam.h... " >&6; } +-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- test "$cross_compiling" = yes && +- { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} +- { (exit 1); exit 1; }; } +-if test -r "${SAMTOOLS}/bam.h"; then +- eval "$as_ac_File=yes" +-else +- eval "$as_ac_File=no" +-fi +-fi +-ac_res=`eval 'as_val=${'$as_ac_File'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_File'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- : +-else +- { { $as_echo "$as_me:$LINENO: error: bam.h not found" >&5 +-$as_echo "$as_me: error: bam.h not found" >&2;} +- { (exit 1); exit 1; }; } +-fi +- +-as_ac_File=`$as_echo "ac_cv_file_${HTSLIB}/htslib/hts.h" | $as_tr_sh` +-{ $as_echo "$as_me:$LINENO: checking for ${HTSLIB}/htslib/hts.h" >&5 +-$as_echo_n "checking for ${HTSLIB}/htslib/hts.h... " >&6; } +-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then +- $as_echo_n "(cached) " >&6 +-else +- test "$cross_compiling" = yes && +- { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +-$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} +- { (exit 1); exit 1; }; } +-if test -r "${HTSLIB}/htslib/hts.h"; then +- eval "$as_ac_File=yes" +-else +- eval "$as_ac_File=no" +-fi +-fi +-ac_res=`eval 'as_val=${'$as_ac_File'} +- $as_echo "$as_val"'` +- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +-$as_echo "$ac_res" >&6; } +-as_val=`eval 'as_val=${'$as_ac_File'} +- $as_echo "$as_val"'` +- if test "x$as_val" = x""yes; then +- : +-else +- { { $as_echo "$as_me:$LINENO: error: hts.h not found" >&5 +-$as_echo "$as_me: error: hts.h not found" >&2;} +- { (exit 1); exit 1; }; } +-fi +- +- + + + +diff -ur lofreq_star-2.1.2.orig/src/lofreq/Makefile.in lofreq_star-2.1.2/src/lofreq/Makefile.in +--- lofreq_star-2.1.2.orig/src/lofreq/Makefile.in 2015-05-19 07:40:55.000000000 +0200 ++++ lofreq_star-2.1.2/src/lofreq/Makefile.in 2016-11-22 11:10:52.064187293 +0100 +@@ -58,7 +58,7 @@ + samutils.$(OBJEXT) snpcaller.$(OBJEXT) utils.$(OBJEXT) \ + vcf.$(OBJEXT) viterbi.$(OBJEXT) + lofreq_OBJECTS = $(am_lofreq_OBJECTS) +-lofreq_DEPENDENCIES = @HTSLIB@/libhts.a @SAMTOOLS@/libbam.a \ ++lofreq_DEPENDENCIES = $(EBROOTHTSLIB)/lib/libhts.a $(EBROOTSAMTOOLS)/lib/libbam.a \ + ../cdflib90/libcdf.a + DEFAULT_INCLUDES = -I.@am__isrc@ + depcomp = $(SHELL) $(top_srcdir)/depcomp +@@ -80,7 +80,7 @@ + DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + ACLOCAL = @ACLOCAL@ + AMTAR = @AMTAR@ +-AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wall -I../cdflib90/ -I../uthash -I@HTSLIB@ -I@SAMTOOLS@ @AM_CFLAGS@ ++AM_CFLAGS = -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -Wall -I../cdflib90/ -I../uthash -I$(EBROOTHTSLIB)/include -I$(EBROOTSAMTOOLS)/include/bam @AM_CFLAGS@ + AM_LDFLAGS = @AM_LDFLAGS@ + AR = @AR@ + AUTOCONF = @AUTOCONF@ +@@ -234,7 +234,7 @@ + + # note: order matters + #lofreq_LDADD = @htslib_dir@/libhts.a @samtools_dir@/libbam.a +-lofreq_LDADD = @HTSLIB@/libhts.a @SAMTOOLS@/libbam.a ../cdflib90/libcdf.a ++lofreq_LDADD = $(EBROOTHTSLIB)/lib/libhts.a $(EBROOTSAMTOOLS)/lib/libbam.a ../cdflib90/libcdf.a + all: all-am + + .SUFFIXES: + +--- lofreq_star-2.1.2.orig/src/lofreq/bam_md_ext.h 2016-11-22 12:36:36.740198311 +0100 ++++ lofreq_star-2.1.2/src/lofreq/bam_md_ext.h 2016-11-22 12:36:46.820255151 +0100 +@@ -31,4 +31,6 @@ + int baq_flag, int ext_baq, int idaq_flag); + + ++#undef bam_nt16_nt4_table ++ + #endif -- GitLab From 804584d337e2b286295ef89a277855257699aa8f Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 23 Nov 2016 16:53:15 +0100 Subject: [PATCH 691/741] flesh out description in LoFreq patch --- .../easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch b/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch index dd9b689ba0..2ea3e4a060 100644 --- a/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch +++ b/easybuild/easyconfigs/l/LoFreq/LoFreq-2.1.2_SAMtools-HTSlib.patch @@ -1,5 +1,7 @@ -https://github.com/CSB5/lofreq/issues/28 - +patch out hard requirement for SAMtools and HTSlib locations that provides sources, there's no reason at all for it, +and link to SAMtools and HTSlib libraries provided through EasyBuild instead; +undefine bam_nt16_nt4_table symbol to dance around https://github.com/CSB5/lofreq/issues/28 +author: Kenneth Hoste (HPC-UGent) diff -ur lofreq_star-2.1.2.orig/configure lofreq_star-2.1.2/configure --- lofreq_star-2.1.2.orig/configure 2015-05-19 07:40:54.000000000 +0200 +++ lofreq_star-2.1.2/configure 2016-11-22 11:10:50.084224167 +0100 -- GitLab From d37d1f4b488da3273ef08e6b535bbf78d8cec027 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 23 Nov 2016 17:54:25 +0100 Subject: [PATCH 692/741] Add ETE/3.0.0b36 --- .../ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb | 26 +++++++++++++ .../PyQt-4.11.4-intel-2016b-Python-2.7.12.eb | 37 +++++++++++++++++++ .../SIP-4.18.1-intel-2016b-Python-2.7.12.eb | 30 +++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 easybuild/easyconfigs/e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-intel-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/s/SIP/SIP-4.18.1-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..3c4de46e5e --- /dev/null +++ b/easybuild/easyconfigs/e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,26 @@ +easyblock = 'PythonPackage' + +name = 'ETE' +version = '3.0.0b36' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://etetoolkit.org' +description = """A Python framework for the analysis and visualization of trees""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = ['%(version)s.tar.gz'] +source_urls = ['https://github.com/etetoolkit/ete/archive/'] + +dependencies = [ + ('Python', '2.7.12'), + ('lxml', '3.6.4', versionsuffix), + ('PyQt', '4.11.4', versionsuffix), +] + +sanity_check_paths = { + 'files': [], + 'dirs': ["."] +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..b495a5ba45 --- /dev/null +++ b/easybuild/easyconfigs/p/PyQt/PyQt-4.11.4-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,37 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Bart Verleye +# Center for eResearch, Auckland +easyblock = 'ConfigureMakePythonPackage' + +name = 'PyQt' +version = '4.11.4' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.riverbankcomputing.co.uk/software/pyqt' +description = """PyQt is a set of Python v2 and v3 bindings for Digia's Qt application framework.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = ['%(name)s-x11-gpl-%(version)s.tar.gz'] +source_urls = ['http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-%(version)s'] + +dependencies = [ + ('Python', '2.7.12'), + ('SIP', '4.18.1', versionsuffix), + ('Qt', '4.8.7'), +] + +configopts = "configure-ng.py --confirm-license" +configopts += " --destdir=%(installdir)s/lib/python%(pyshortver)s/site-packages " +configopts += " --no-sip-files" + +options = {'modulename': '%(name)s%(version_major)s'} + +modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} + +sanity_check_paths = { + 'files': [], + 'dirs': ['lib/python%(pyshortver)s/site-packages/%(name)s%(version_major)s'], +} + +moduleclass = 'vis' diff --git a/easybuild/easyconfigs/s/SIP/SIP-4.18.1-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SIP/SIP-4.18.1-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..57997a86bf --- /dev/null +++ b/easybuild/easyconfigs/s/SIP/SIP-4.18.1-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,30 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Author: Bart Verleye +# Center for eResearch, Auckland +easyblock = 'ConfigureMakePythonPackage' + +name = 'SIP' +version = '4.18.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.riverbankcomputing.com/software/sip/' +description = """SIP is a tool that makes it very easy to create Python bindings for C and C++ libraries.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://sourceforge.net/projects/pyqt/files/sip/sip-%(version)s'] + +dependencies = [('Python', '2.7.12')] + +configopts = "configure.py --bindir %(installdir)s/bin --incdir %(installdir)s/include " +configopts += "--destdir %(installdir)s/lib/python%(pyshortver)s/site-packages" + +sanity_check_paths = { + 'files': ['bin/sip', 'include/sip.h'] + + ['lib/python%%(pyshortver)s/site-packages/%s' % x + for x in ['sip.%s' % SHLIB_EXT, 'sipconfig.py', 'sipdistutils.py']], + 'dirs': [], +} + +moduleclass = 'lang' -- GitLab From 60e87448c7700e1a21b9161eea326a160237e3d0 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 23 Nov 2016 18:05:17 +0100 Subject: [PATCH 693/741] Fix module name and sanity check --- .../e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb index 3c4de46e5e..c349cc7f20 100644 --- a/easybuild/easyconfigs/e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/e/ETE/ETE-3.0.0b36-intel-2016b-Python-2.7.12.eb @@ -18,9 +18,11 @@ dependencies = [ ('PyQt', '4.11.4', versionsuffix), ] +options = {'modulename': 'ete3'} + sanity_check_paths = { - 'files': [], - 'dirs': ["."] + 'files': ['bin/ete3'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], } moduleclass = 'vis' -- GitLab From eef6760210c4288f9c4ba3d161e77b835ea3abf4 Mon Sep 17 00:00:00 2001 From: Tim Slauson Date: Wed, 23 Nov 2016 13:45:02 -0900 Subject: [PATCH 694/741] Run dadi 1.7.0 test suite as a sanity_check_command --- .../d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb index dcb0dd7c09..2577694b3e 100644 --- a/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb @@ -23,4 +23,8 @@ sanity_check_paths = { 'dirs': ['lib/python%(pyshortver)s/site-packages'], } +sanity_check_commands = [ + ('cd %(builddir)s/gutenkunstlab-dadi-01068e3ad50d/tests && python run_tests.py', '') +] + moduleclass = 'bio' -- GitLab From 2110934414715e183a11c09346a332194d888d8d Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Mon, 21 Nov 2016 13:10:52 +0100 Subject: [PATCH 695/741] adding easyconfigs: Cufflinks-2.2.1-foss-2016b.eb, Boost-1.61.0-foss-2016b-Python-2.7.12.eb, SAMtools-0.1.19-foss-2016b.eb and Eigen Add missing dep Eigen --- .../Boost-1.61.0-foss-2016b-Python-2.7.12.eb | 53 +++++++++++++++++++ .../c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb | 29 ++++++++++ .../e/Eigen/Eigen-3.2.3-foss-2016b.eb | 13 +++++ 3 files changed, 95 insertions(+) create mode 100644 easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb create mode 100644 easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb create mode 100755 easybuild/easyconfigs/e/Eigen/Eigen-3.2.3-foss-2016b.eb diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..d30564e4cf --- /dev/null +++ b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb @@ -0,0 +1,53 @@ +# Built with EasyBuild version 3.0.0 on 2016-11-21_11-54-35 +name = 'Boost' +version = '1.61.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://www.boost.org/' +description = "Boost provides free peer-reviewed portable C++ source libraries." + +toolchain = {'version': '2016b', 'name': 'foss'} +toolchainopts = {'usempi': True, 'pic': True} + +sources = ['%(namelower)s_1_61_0.tar.gz'] +source_urls = [SOURCEFORGE_SOURCE] + +dependencies = [ + ('bzip2', '1.0.6', '', ('GCC', '5.4.0-2.26')), + ('zlib', '1.2.8', '', ('GCCcore', '5.4.0')), + ('Python', '2.7.12'), +] + +parallel = 4 + +unwanted_env_vars = {} +start_dir = '%(builddir)s/boost_1_61_0/' +# also build boost_mpi +boost_mpi = True + +moduleclass = 'devel' +# Build statistics +buildstats = [{ + "build_time": 531.66, + "command_line": ["--buildpath='/camp/apps/eb/build'", '--debug', "--github-user='verdurin'", "--hide-deps='ANTLR,APR,APR-util,AT-SPI2-ATK,AT-SPI2-core,ATK,Autoconf,Automake,Bison,Boost,CUSP,Coreutils,DB,DBus,DocBook-XML,Dyninst,ETSF_IO,FFmpeg,FLTK,FTGL,GCCcore,GDAL,GL2PS,GLEW,GLib,GLPK,GPC,GObject-Introspection,GTI,GTK+,GTS,Gdk-Pixbuf,Ghostscript,GraphicsMagick,GtkSourceView,HarfBuzz,JUnit,JasPer,LibTIFF,LibUUID,Libint,M4,Mesa,NASM,OPARI2,OTF2,PCRE,PDT,PROJ,Pango,PnMPI,PyCairo,PyGObject,PyQt,Qhull,Qt,Qt5,S-Lang,SCons,SIP,SQLite,SWIG,Serf,Szip,Tcl,Tk,UDUNITS,XML-Parser,XZ,XKeyboardConfig,YAXT,Yasm,adwaita-icon-theme,ant,assimp,binutils,byacc,bzip2,cairo,dbus-glib,damageproto,eudev,expat,g2clib,g2lib,gc,glproto,gperf,guile,grib_api,gsettings-desktop-schemas,fixesproto,fontsproto,fontconfig,freeglut,freetype,gettext,icc,ifort,inputproto,intltool,itstool,jhbuild,kbproto,libGLU,libICE,libSM,libX11,libXau,libXaw,libXcursor,libXdamage,libXdmcp,libXext,libXfixes,libXfont,libXft,libXi,libXinerama,libXmu,libXpm,libXrandr,libXrender,libXt,libXtst,libcerf,libcroco,libctl,libdap,libdrm,libdwarf,libelf,libevent,libffi,libfontenc,libgd,libgeotiff,libglade,libidn,libjpeg-turbo,libmatheval,libpng,libpciaccess,libpthread-stubs,libreadline,librsvg,libtool,libunistring,libunwind,libyaml,libxcb,libxkbcommon,libxml2,libxslt,makedepend,motif,ncurses,pixman,pkg-config,pkgconfig,popt,pscom,qrupdate,randrproto,recordproto,renderproto,scrollkeeper,texinfo,util-linux,wxPropertyGrid,wxWidgets,x264,xbitmaps,xcb-proto,xcb-util,xcb-util-image,xcb-util-keysyms,xcb-util-renderutil,xcb-util-wm,xextproto,xineramaproto,xorg-macros,xprop,xproto,xtrans,zlib'", "--installpath='/camp/apps/eb'", '--minimal-toolchains', "--packagepath='/camp/apps/eb/packages'", "--prefix='/camp/apps/eb'", "--repositorypath='/camp/apps/eb/ebfiles_repo'", "--robot='/home/camp/huffmaa/local_easyconfigs:/camp/apps/eb/software/EasyBuild/3.0.0/lib/python2.7/site-packages/easybuild_easyconfigs-3.0.0-py2.7.egg/easybuild/easyconfigs:/camp/apps/eb/ebfiles_repo:/home/camp/huffmaa/src/github/verdurin-easyconfigs-devel:/home/camp/huffmaa/src/github/easybuild-easyconfigs'", "--robot-paths='/home/camp/huffmaa/local_easyconfigs::/camp/apps/eb/ebfiles_repo:/home/camp/huffmaa/src/github/verdurin-easyconfigs-devel:/home/camp/huffmaa/src/github/easybuild-easyconfigs'", "--sourcepath='/camp/apps/eb/sources'", 'Cufflinks-2.2.1-foss-2016b.eb'], + "core_count": 4, + "cpu_model": "Intel Xeon E312xx (Sandy Bridge)", + "cpu_speed": 2399.996, + "cpu_vendor": "Intel", + "easybuild-easyblocks_version": "3.0.0", + "easybuild-framework_version": "3.0.0", + "gcc_version": "Using built-in specs.; COLLECT_GCC=gcc; COLLECT_LTO_WRAPPER=/camp/apps/eb/software/GCCcore/5.4.0/libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/lto-wrapper; Target: x86_64-unknown-linux-gnu; Configured with: ../configure --enable-languages=c,c++,fortran --enable-lto --enable-checking=release --disable-multilib --enable-shared=yes --enable-static=yes --enable-threads=posix --enable-gold=default --enable-plugins --enable-ld --with-plugin-ld=ld.gold --prefix=/camp/apps/eb/software/GCCcore/5.4.0 --with-local-prefix=/camp/apps/eb/software/GCCcore/5.4.0 --enable-bootstrap --with-isl=/camp/apps/eb/build/GCCcore/5.4.0/dummy-/gcc-5.4.0/stage2_stuff; Thread model: posix; gcc version 5.4.0 (GCC) ; ", + "glibc_version": "2.17", + "hostname": "login000.camp.thecrick.org", + "install_size": 180608773, + "modules_tool": ('Lmod', '/usr/share/lmod/lmod/libexec/lmod', '6.3.4'), + "os_name": "centos linux", + "os_type": "Linux", + "os_version": "7.2.1511", + "platform_name": "x86_64-unknown-linux", + "python_version": "2.7.5 (default, Sep 15 2016, 22:37:39) ; [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]", + "system_gcc_path": "/camp/apps/eb/software/GCCcore/5.4.0/bin/gcc", + "system_python_path": "/camp/apps/eb/software/Python/2.7.12-foss-2016b/bin/python", + "timestamp": 1479729271, + "total_memory": 7821, +}] diff --git a/easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb b/easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb new file mode 100644 index 0000000000..9ef27b6332 --- /dev/null +++ b/easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb @@ -0,0 +1,29 @@ +name = 'Cufflinks' +version = '2.2.1' + +homepage = 'http://cole-trapnell-lab.github.io/cufflinks/' +description = """Transcript assembly, differential expression, and differential regulation for RNA-Seq""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://cole-trapnell-lab.github.io/cufflinks/assets/downloads/'] + +dependencies = [ + # issues with boost supposedly fixed now, see https://github.com/cole-trapnell-lab/cufflinks/issues/3 + ('Boost', '1.61.0', '-Python-2.7.12'), + ('SAMtools', '0.1.19'), + ('Eigen', '3.2.3'), + ('zlib', '1.2.8'), +] + +preconfigopts = 'env CPPFLAGS=-I$EBROOTEIGEN/include' +configopts = '--with-boost=$EBROOTBOOST --with-bam-libdir=${EBROOTSAMTOOLS}/lib' + +sanity_check_paths = { + 'files': ['bin/cufflinks'], + 'dirs': [] +} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/e/Eigen/Eigen-3.2.3-foss-2016b.eb b/easybuild/easyconfigs/e/Eigen/Eigen-3.2.3-foss-2016b.eb new file mode 100755 index 0000000000..66e4f6f45f --- /dev/null +++ b/easybuild/easyconfigs/e/Eigen/Eigen-3.2.3-foss-2016b.eb @@ -0,0 +1,13 @@ +name = 'Eigen' +version = '3.2.3' + +homepage = 'http://eigen.tuxfamily.org/index.php?title=Main_Page' +description = """Eigen is a C++ template library for linear algebra: + matrices, vectors, numerical solvers, and related algorithms.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +source_urls = [BITBUCKET_SOURCE] +sources = ['%(version)s.tar.bz2'] + +moduleclass = 'math' -- GitLab From 3182deb324ba942118aa8914cc95d6b993705fb1 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sun, 20 Nov 2016 22:53:37 +0100 Subject: [PATCH 696/741] adding easyconfigs: ea-utils-27a4809-foss-2016b.eb and missing deps Add missing deps for ea-utils --- .../e/ea-utils/ea-utils-27a4809-foss-2016b.eb | 48 + .../p/Perl/Perl-5.22.1-foss-2016b.eb | 885 ++++++++++++++++++ 2 files changed, 933 insertions(+) create mode 100644 easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016b.eb create mode 100644 easybuild/easyconfigs/p/Perl/Perl-5.22.1-foss-2016b.eb diff --git a/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016b.eb b/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016b.eb new file mode 100644 index 0000000000..e8447b7c64 --- /dev/null +++ b/easybuild/easyconfigs/e/ea-utils/ea-utils-27a4809-foss-2016b.eb @@ -0,0 +1,48 @@ +easyblock = 'MakeCp' + +name = 'ea-utils' +version = '27a4809' + +homepage = 'https://code.google.com/p/ea-utils/' +description = """Command-line tools for processing biological sequencing data. +Barcode demultiplexing, adapter trimming, etc. + +Primarily written to support an Illumina based pipeline - +but should work with any FASTQs.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['https://github.com/ExpressionAnalysis/%(name)s/tarball/master'] +sources = [SOURCE_TGZ] + +checksums = ['45eef4b040f83abe2c9f51d4a7d18271'] + +start_dir = 'clipper' + +prebuildopts = "sed -i 's/$(CFLAGS)/$(CFLAGS) $(LDFLAGS) -I./' Makefile && PREFIX=%(installdir)s " +buildopts = 'fastq-mcf fastq-multx fastq-join fastq-stats fastq-clipper sam-stats varcall' + +builddependencies = [ + ('Perl', '5.22.1'), +] + +dependencies = [ + ('GSL', '2.1'), +] + +files_to_copy = [([ + 'fastq-mcf', 'fastq-multx', 'fastq-join', 'fastq-stats', 'fastq-clipper', + 'sam-stats', 'varcall', 'randomFQ', 'alc', 'determine-phred'], 'bin' +)] + + +sanity_check_paths = { + 'files': [ + 'bin/fastq-mcf', 'bin/fastq-multx', 'bin/fastq-join', 'bin/fastq-stats', + 'bin/fastq-clipper', 'bin/sam-stats', 'bin/varcall' + ], + 'dirs': [] +} + +moduleclass = 'bio' diff --git a/easybuild/easyconfigs/p/Perl/Perl-5.22.1-foss-2016b.eb b/easybuild/easyconfigs/p/Perl/Perl-5.22.1-foss-2016b.eb new file mode 100644 index 0000000000..873d35ef8a --- /dev/null +++ b/easybuild/easyconfigs/p/Perl/Perl-5.22.1-foss-2016b.eb @@ -0,0 +1,885 @@ +name = 'Perl' +version = '5.22.1' + +homepage = 'http://www.perl.org/' +description = """Larry Wall's Practical Extraction and Report Language""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['http://www.cpan.org/src/%(version_major)s.0'] +sources = [SOURCELOWER_TAR_GZ] + +exts_list = [ + ('Config::General', '2.60', { + 'source_tmpl': 'Config-General-2.60.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TL/TLINDEN'], + }), + ('File::Listing', '6.04', { + 'source_tmpl': 'File-Listing-6.04.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('ExtUtils::InstallPaths', '0.011', { + 'source_tmpl': 'ExtUtils-InstallPaths-0.011.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'], + }), + ('ExtUtils::Helpers', '0.022', { + 'source_tmpl': 'ExtUtils-Helpers-0.022.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'], + }), + ('Test::Harness', '3.36', { + 'source_tmpl': 'Test-Harness-3.36.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'], + }), + ('ExtUtils::Config', '0.008', { + 'source_tmpl': 'ExtUtils-Config-0.008.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'], + }), + ('Module::Build::Tiny', '0.039', { + 'source_tmpl': 'Module-Build-Tiny-0.039.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'], + }), + ('aliased', '0.34', { + 'source_tmpl': 'aliased-0.34.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Text::Glob', '0.09', { + 'source_tmpl': 'Text-Glob-0.09.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RC/RCLAMP'], + }), + ('Regexp::Common', '2016020301', { + 'source_tmpl': 'Regexp-Common-2016020301.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AB/ABIGAIL'], + }), + ('GO::Utils', '0.15', { + 'source_tmpl': 'go-perl-0.15.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CM/CMUNGALL'], + }), + ('Module::Pluggable', '5.2', { + 'source_tmpl': 'Module-Pluggable-5.2.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SI/SIMONW'], + }), + ('Test::Fatal', '0.014', { + 'source_tmpl': 'Test-Fatal-0.014.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Test::Warnings', '0.026', { + 'source_tmpl': 'Test-Warnings-0.026.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('DateTime::Locale', '1.02', { + 'source_tmpl': 'DateTime-Locale-1.02.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('DateTime::TimeZone', '1.95', { + 'source_tmpl': 'DateTime-TimeZone-1.95.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('Test::Requires', '0.10', { + 'source_tmpl': 'Test-Requires-0.10.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TO/TOKUHIROM'], + }), + ('Module::Implementation', '0.09', { + 'source_tmpl': 'Module-Implementation-0.09.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('Module::Build', '0.4216', { + 'source_tmpl': 'Module-Build-0.4216.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'], + }), + ('Module::Runtime', '0.014', { + 'source_tmpl': 'Module-Runtime-0.014.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/Z/ZE/ZEFRAM'], + }), + ('Try::Tiny', '0.24', { + 'source_tmpl': 'Try-Tiny-0.24.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Params::Validate', '1.22', { + 'source_tmpl': 'Params-Validate-1.22.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('List::MoreUtils', '0.413', { + 'source_tmpl': 'List-MoreUtils-0.413.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RE/REHSACK'], + }), + ('Exporter::Tiny', '0.042', { + 'source_tmpl': 'Exporter-Tiny-0.042.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TO/TOBYINK'], + }), + ('Class::Singleton', '1.5', { + 'source_tmpl': 'Class-Singleton-1.5.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SH/SHAY'], + }), + ('DateTime', '1.25', { + 'source_tmpl': 'DateTime-1.25.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('File::Find::Rule::Perl', '1.15', { + 'source_tmpl': 'File-Find-Rule-Perl-1.15.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Readonly', '2.01', { + 'source_tmpl': 'Readonly-2.01.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SA/SANKO'], + }), + ('Git', '0.41', { + 'source_tmpl': 'Git-0.41.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MS/MSOUTH'], + }), + ('Tree::DAG_Node', '1.29', { + 'source_tmpl': 'Tree-DAG_Node-1.29.tgz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE'], + }), + ('Template', '2.26', { + 'source_tmpl': 'Template-Toolkit-2.26.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AB/ABW'], + }), + ('FreezeThaw', '0.5001', { + 'source_tmpl': 'FreezeThaw-0.5001.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/I/IL/ILYAZ/modules'], + }), + ('DBI', '1.634', { + 'source_tmpl': 'DBI-1.634.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TI/TIMB'], + }), + ('DBD::SQLite', '1.50', { + 'source_tmpl': 'DBD-SQLite-1.50.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI'], + }), + ('Math::Bezier', '0.01', { + 'source_tmpl': 'Math-Bezier-0.01.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AB/ABW'], + }), + ('Archive::Extract', '0.76', { + 'source_tmpl': 'Archive-Extract-0.76.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BI/BINGOS'], + }), + ('DBIx::Simple', '1.35', { + 'source_tmpl': 'DBIx-Simple-1.35.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/J/JU/JUERD'], + }), + ('Shell', '0.73', { + 'source_tmpl': 'Shell-0.73.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/F/FE/FERREIRA'], + }), + ('File::Spec', '3.62', { + 'source_tmpl': 'PathTools-3.62.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('ExtUtils::MakeMaker', '7.10', { + 'source_tmpl': 'ExtUtils-MakeMaker-7.10.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BI/BINGOS'], + }), + ('Test::Simple', '1.001014', { + 'source_tmpl': 'Test-Simple-1.001014.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/EX/EXODIST'], + }), + ('Set::Scalar', '1.29', { + 'source_tmpl': 'Set-Scalar-1.29.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DA/DAVIDO'], + }), + ('IO::Stringy', '2.111', { + 'source_tmpl': 'IO-stringy-2.111.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DS/DSKOLL'], + }), + ('Encode::Locale', '1.05', { + 'source_tmpl': 'Encode-Locale-1.05.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('XML::SAX::Base', '1.08', { + 'source_tmpl': 'XML-SAX-Base-1.08.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GR/GRANTM'], + }), + ('XML::NamespaceSupport', '1.11', { + 'source_tmpl': 'XML-NamespaceSupport-1.11.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN'], + }), + ('XML::SAX', '0.99', { + 'source_tmpl': 'XML-SAX-0.99.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GR/GRANTM'], + }), + ('Test::LeakTrace', '0.15', { + 'source_tmpl': 'Test-LeakTrace-0.15.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GF/GFUJI'], + }), + ('Test::Exception', '0.43', { + 'source_tmpl': 'Test-Exception-0.43.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/EX/EXODIST'], + }), + ('Text::Table', '1.130', { + 'source_tmpl': 'Text-Table-1.130.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF'], + }), + ('MIME::Types', '2.13', { + 'source_tmpl': 'MIME-Types-2.13.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MA/MARKOV'], + }), + ('Module::Build::XSUtil', '0.16', { + 'source_tmpl': 'Module-Build-XSUtil-0.16.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/H/HI/HIDEAKIO'], + }), + ('Tie::Function', '0.02', { + 'source_tmpl': 'Tie-Function-0.02.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DA/DAVIDNICO/handy_tied_functions'], + }), + ('Template::Plugin::Number::Format', '1.06', { + 'source_tmpl': 'Template-Plugin-Number-Format-1.06.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DA/DARREN'], + }), + ('HTML::Parser', '3.72', { + 'source_tmpl': 'HTML-Parser-3.72.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('Date::Handler', '1.2', { + 'source_tmpl': 'Date-Handler-1.2.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BB/BBEAUSEJ'], + }), + ('Params::Util', '1.07', { + 'source_tmpl': 'Params-Util-1.07.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AD/ADAMK'], + }), + ('IO::HTML', '1.001', { + 'source_tmpl': 'IO-HTML-1.001.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CJ/CJM'], + }), + ('Data::Grove', '0.08', { + 'source_tmpl': 'libxml-perl-0.08.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/K/KM/KMACLEOD'], + }), + ('Class::ISA', '0.36', { + 'source_tmpl': 'Class-ISA-0.36.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SM/SMUELLER'], + }), + ('URI', '1.71', { + 'source_tmpl': 'URI-1.71.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Ima::DBI', '0.35', { + 'source_tmpl': 'Ima-DBI-0.35.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/P/PE/PERRIN'], + }), + ('Tie::IxHash', '1.23', { + 'source_tmpl': 'Tie-IxHash-1.23.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CH/CHORNY'], + }), + ('GO', '0.04', { + 'source_tmpl': 'go-db-perl-0.04.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SJ/SJCARBON'], + }), + ('Class::DBI::SQLite', '0.11', { + 'source_tmpl': 'Class-DBI-SQLite-0.11.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA'], + }), + ('Pod::POM', '2.01', { + 'source_tmpl': 'Pod-POM-2.01.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/N/NE/NEILB'], + }), + ('Math::Round', '0.07', { + 'source_tmpl': 'Math-Round-0.07.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GR/GROMMEL'], + }), + ('Text::Diff', '1.44', { + 'source_tmpl': 'Text-Diff-1.44.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/N/NE/NEILB'], + }), + ('Log::Message::Simple', '0.10', { + 'source_tmpl': 'Log-Message-Simple-0.10.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BI/BINGOS'], + }), + ('IO::Socket::SSL', '2.024', { + 'source_tmpl': 'IO-Socket-SSL-2.024.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SU/SULLR'], + }), + ('Fennec::Lite', '0.004', { + 'source_tmpl': 'Fennec-Lite-0.004.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/EX/EXODIST'], + }), + ('Sub::Uplevel', '0.25', { + 'source_tmpl': 'Sub-Uplevel-0.25.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN'], + }), + ('Meta::Builder', '0.003', { + 'source_tmpl': 'Meta-Builder-0.003.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/EX/EXODIST'], + }), + ('Exporter::Declare', '0.114', { + 'source_tmpl': 'Exporter-Declare-0.114.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/EX/EXODIST'], + }), + ('Getopt::Long', '2.48', { + 'source_tmpl': 'Getopt-Long-2.48.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/J/JV/JV'], + }), + ('Log::Message', '0.08', { + 'source_tmpl': 'Log-Message-0.08.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BI/BINGOS'], + }), + ('Mouse', 'v2.4.5', { + 'source_tmpl': 'Mouse-v2.4.5.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SY/SYOHEX'], + }), + ('Test::Version', '2.03', { + 'source_tmpl': 'Test-Version-2.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/P/PL/PLICEASE'], + }), + ('DBIx::Admin::TableInfo', '3.01', { + 'source_tmpl': 'DBIx-Admin-TableInfo-3.01.tgz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE'], + }), + ('Net::HTTP', '6.09', { + 'source_tmpl': 'Net-HTTP-6.09.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Test::Deep', '1.120', { + 'source_tmpl': 'Test-Deep-1.120.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Test::Warn', '0.30', { + 'source_tmpl': 'Test-Warn-0.30.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CH/CHORNY'], + }), + ('MRO::Compat', '0.12', { + 'source_tmpl': 'MRO-Compat-0.12.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BO/BOBTFISH'], + }), + ('Moo', '2.001001', { + 'source_tmpl': 'Moo-2.001001.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/H/HA/HAARG'], + }), + ('Hash::Merge', '0.200', { + 'source_tmpl': 'Hash-Merge-0.200.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RE/REHSACK'], + }), + ('SQL::Abstract', '1.81', { + 'source_tmpl': 'SQL-Abstract-1.81.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RI/RIBASUSHI'], + }), + ('HTML::Form', '6.03', { + 'source_tmpl': 'HTML-Form-6.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('File::Copy::Recursive', '0.38', { + 'source_tmpl': 'File-Copy-Recursive-0.38.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DM/DMUEY'], + }), + ('Number::Compare', '0.03', { + 'source_tmpl': 'Number-Compare-0.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RC/RCLAMP'], + }), + ('IPC::Run', '0.94', { + 'source_tmpl': 'IPC-Run-0.94.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TO/TODDR'], + }), + ('HTML::Entities::Interpolate', '1.09', { + 'source_tmpl': 'HTML-Entities-Interpolate-1.09.tgz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE'], + }), + ('Test::ClassAPI', '1.06', { + 'source_tmpl': 'Test-ClassAPI-1.06.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AD/ADAMK'], + }), + ('Test::Most', '0.34', { + 'source_tmpl': 'Test-Most-0.34.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/O/OV/OVID'], + }), + ('Class::Accessor', '0.34', { + 'source_tmpl': 'Class-Accessor-0.34.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/K/KA/KASEI'], + }), + ('Test::Differences', '0.64', { + 'source_tmpl': 'Test-Differences-0.64.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DC/DCANTRELL'], + }), + ('HTTP::Tiny', '0.056', { + 'source_tmpl': 'HTTP-Tiny-0.056.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN'], + }), + ('Package::DeprecationManager', '0.15', { + 'source_tmpl': 'Package-DeprecationManager-0.15.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('Digest::SHA1', '2.13', { + 'source_tmpl': 'Digest-SHA1-2.13.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('Date::Language', '2.30', { + 'source_tmpl': 'TimeDate-2.30.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GB/GBARR'], + }), + ('version', '0.9915', { + 'source_tmpl': 'version-0.9915.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/J/JP/JPEACOCK'], + }), + ('Sub::Uplevel', '0.25', { + 'source_tmpl': 'Sub-Uplevel-0.25.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN'], + }), + # fails: uses 'gcc' + ('XML::Bare', '0.53', { + 'source_tmpl': 'XML-Bare-0.53.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CO/CODECHILD'], + }), + ('Dist::CheckConflicts', '0.11', { + 'source_tmpl': 'Dist-CheckConflicts-0.11.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DO/DOY'], + }), + ('Sub::Name', '0.14', { + 'source_tmpl': 'Sub-Name-0.14.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Time::Piece', '1.31', { + 'source_tmpl': 'Time-Piece-1.31.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ES/ESAYM'], + }), + ('Digest::HMAC', '1.03', { + 'source_tmpl': 'Digest-HMAC-1.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('HTTP::Negotiate', '6.01', { + 'source_tmpl': 'HTTP-Negotiate-6.01.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('MIME::Lite', '3.030', { + 'source_tmpl': 'MIME-Lite-3.030.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Crypt::Rijndael', '1.13', { + 'source_tmpl': 'Crypt-Rijndael-1.13.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'], + }), + ('B::Lint', '1.20', { + 'source_tmpl': 'B-Lint-1.20.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Canary::Stability', '2006', { + 'source_tmpl': 'Canary-Stability-2006.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN'], + }), + ('AnyEvent', '7.12', { + 'source_tmpl': 'AnyEvent-7.12.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN'], + }), + ('Object::Accessor', '0.48', { + 'source_tmpl': 'Object-Accessor-0.48.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BI/BINGOS'], + }), + ('Data::UUID', '1.221', { + 'source_tmpl': 'Data-UUID-1.221.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Test::Pod', '1.51', { + 'source_tmpl': 'Test-Pod-1.51.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('AppConfig', '1.71', { + 'source_tmpl': 'AppConfig-1.71.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/N/NE/NEILB'], + }), + ('Net::SMTP::SSL', '1.03', { + 'source_tmpl': 'Net-SMTP-SSL-1.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('XML::Tiny', '2.06', { + 'source_tmpl': 'XML-Tiny-2.06.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DC/DCANTRELL'], + }), + ('HTML::Tagset', '3.20', { + 'source_tmpl': 'HTML-Tagset-3.20.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/P/PE/PETDANCE'], + }), + ('HTML::Tree', '5.03', { + 'source_tmpl': 'HTML-Tree-5.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CJ/CJM'], + }), + ('Devel::GlobalDestruction', '0.13', { + 'source_tmpl': 'Devel-GlobalDestruction-0.13.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/H/HA/HAARG'], + }), + ('WWW::RobotRules', '6.02', { + 'source_tmpl': 'WWW-RobotRules-6.02.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('Expect', '1.32', { + 'source_tmpl': 'Expect-1.32.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SZ/SZABGAB'], + }), + ('Term::UI', '0.46', { + 'source_tmpl': 'Term-UI-0.46.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BI/BINGOS'], + }), + ('Net::SNMP', 'v6.0.1', { + 'source_tmpl': 'Net-SNMP-v6.0.1.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DT/DTOWN'], + }), + ('XML::SAX::Writer', '0.56', { + 'source_tmpl': 'XML-SAX-Writer-0.56.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN'], + }), + ('Statistics::Descriptive', '3.0612', { + 'source_tmpl': 'Statistics-Descriptive-3.0612.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF'], + }), + ('Class::Load', '0.23', { + 'source_tmpl': 'Class-Load-0.23.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('LWP::Simple', '6.15', { + 'source_tmpl': 'libwww-perl-6.15.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Time::Piece::MySQL', '0.06', { + 'source_tmpl': 'Time-Piece-MySQL-0.06.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/K/KA/KASEI'], + }), + ('Package::Stash::XS', '0.28', { + 'source_tmpl': 'Package-Stash-XS-0.28.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DO/DOY'], + }), + ('GD::Graph', '1.52', { + 'source_tmpl': 'GDGraph-1.52.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RU/RUZ'], + }), + ('Set::Array', '0.30', { + 'source_tmpl': 'Set-Array-0.30.tgz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RS/RSAVAGE'], + }), + ('boolean', '0.45', { + 'source_tmpl': 'boolean-0.45.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/I/IN/INGY'], + }), + ('Number::Format', '1.75', { + 'source_tmpl': 'Number-Format-1.75.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/W/WR/WRW'], + }), + ('Data::Stag', '0.14', { + 'source_tmpl': 'Data-Stag-0.14.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CM/CMUNGALL'], + }), + ('Test::NoWarnings', '1.04', { + 'source_tmpl': 'Test-NoWarnings-1.04.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AD/ADAMK'], + }), + ('Crypt::DES', '2.07', { + 'source_tmpl': 'Crypt-DES-2.07.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DP/DPARIS'], + }), + ('Exporter', '5.72', { + 'source_tmpl': 'Exporter-5.72.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TO/TODDR'], + }), + ('Class::Inspector', '1.28', { + 'source_tmpl': 'Class-Inspector-1.28.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AD/ADAMK'], + }), + ('Parse::RecDescent', '1.967013', { + 'source_tmpl': 'Parse-RecDescent-1.967013.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/J/JT/JTBRAUN'], + }), + ('Carp', '1.38', { + 'source_tmpl': 'Carp-1.38.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('XML::XPath', '1.33', { + 'source_tmpl': 'XML-XPath-1.33.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MA/MANWAR'], + }), + ('Capture::Tiny', '0.36', { + 'source_tmpl': 'Capture-Tiny-0.36.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN'], + }), + ('JSON', '2.90', { + 'source_tmpl': 'JSON-2.90.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MA/MAKAMAKA'], + }), + ('Sub::Exporter', '0.987', { + 'source_tmpl': 'Sub-Exporter-0.987.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Class::Load::XS', '0.09', { + 'source_tmpl': 'Class-Load-XS-0.09.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Set::IntSpan::Fast', '1.15', { + 'source_tmpl': 'Set-IntSpan-Fast-1.15.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AN/ANDYA'], + }), + ('Sub::Exporter::Progressive', '0.001011', { + 'source_tmpl': 'Sub-Exporter-Progressive-0.001011.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/F/FR/FREW'], + }), + ('Data::Dumper::Concise', '2.022', { + 'source_tmpl': 'Data-Dumper-Concise-2.022.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/F/FR/FREW'], + }), + ('File::Slurp::Tiny', '0.004', { + 'source_tmpl': 'File-Slurp-Tiny-0.004.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/L/LE/LEONT'], + }), + ('Algorithm::Diff', '1.1903', { + 'source_tmpl': 'Algorithm-Diff-1.1903.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TY/TYEMQ'], + }), + ('AnyData', '0.12', { + 'source_tmpl': 'AnyData-0.12.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RE/REHSACK'], + }), + ('Text::Iconv', '1.7', { + 'source_tmpl': 'Text-Iconv-1.7.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MP/MPIOTR'], + }), + ('Class::Data::Inheritable', '0.08', { + 'source_tmpl': 'Class-Data-Inheritable-0.08.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TM/TMTM'], + }), + ('Text::Balanced', '2.03', { + 'source_tmpl': 'Text-Balanced-2.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SH/SHAY'], + }), + ('strictures', '2.000002', { + 'source_tmpl': 'strictures-2.000002.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/H/HA/HAARG'], + }), + ('Switch', '2.17', { + 'source_tmpl': 'Switch-2.17.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CH/CHORNY'], + }), + ('File::Which', '1.21', { + 'source_tmpl': 'File-Which-1.21.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/P/PL/PLICEASE'], + }), + ('Email::Date::Format', '1.005', { + 'source_tmpl': 'Email-Date-Format-1.005.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Error', '0.17024', { + 'source_tmpl': 'Error-0.17024.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF'], + }), + ('Mock::Quick', '1.110', { + 'source_tmpl': 'Mock-Quick-1.110.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/EX/EXODIST'], + }), + ('Text::CSV', '1.33', { + 'source_tmpl': 'Text-CSV-1.33.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MA/MAKAMAKA'], + }), + ('Test::Output', '1.03', { + 'source_tmpl': 'Test-Output-1.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BD/BDFOY'], + }), + ('Class::DBI', 'v3.0.17', { + 'source_tmpl': 'Class-DBI-v3.0.17.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TM/TMTM'], + }), + ('List::AllUtils', '0.09', { + 'source_tmpl': 'List-AllUtils-0.09.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('UNIVERSAL::moniker', '0.08', { + 'source_tmpl': 'UNIVERSAL-moniker-0.08.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/K/KA/KASEI'], + }), + ('Exception::Class', '1.40', { + 'source_tmpl': 'Exception-Class-1.40.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('File::CheckTree', '4.42', { + 'source_tmpl': 'File-CheckTree-4.42.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Math::VecStat', '0.08', { + 'source_tmpl': 'Math-VecStat-0.08.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AS/ASPINELLI'], + }), + ('Pod::LaTeX', '0.61', { + 'source_tmpl': 'Pod-LaTeX-0.61.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TJ/TJENNESS'], + }), + ('Eval::Closure', '0.13', { + 'source_tmpl': 'Eval-Closure-0.13.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DO/DOY'], + }), + ('HTTP::Request', '6.11', { + 'source_tmpl': 'HTTP-Message-6.11.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('XML::Twig', '3.49', { + 'source_tmpl': 'XML-Twig-3.49.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MI/MIROD'], + }), + ('IO::String', '1.08', { + 'source_tmpl': 'IO-String-1.08.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('XML::Simple', '2.22', { + 'source_tmpl': 'XML-Simple-2.22.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GR/GRANTM'], + }), + ('Sub::Install', '0.928', { + 'source_tmpl': 'Sub-Install-0.928.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('HTTP::Cookies', '6.01', { + 'source_tmpl': 'HTTP-Cookies-6.01.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('Pod::Plainer', '1.04', { + 'source_tmpl': 'Pod-Plainer-1.04.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RM/RMBARKER'], + }), + ('Test::Exception::LessClever', '0.006', { + 'source_tmpl': 'Test-Exception-LessClever-0.006.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/EX/EXODIST'], + }), + ('LWP::MediaTypes', '6.02', { + 'source_tmpl': 'LWP-MediaTypes-6.02.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('Scalar::Util', '1.43', { + 'source_tmpl': 'Scalar-List-Utils-1.43.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/P/PE/PEVANS'], + }), + ('Data::Section::Simple', '0.07', { + 'source_tmpl': 'Data-Section-Simple-0.07.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA'], + }), + ('Class::Trigger', '0.14', { + 'source_tmpl': 'Class-Trigger-0.14.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA'], + }), + ('HTTP::Daemon', '6.01', { + 'source_tmpl': 'HTTP-Daemon-6.01.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('File::HomeDir', '1.00', { + 'source_tmpl': 'File-HomeDir-1.00.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AD/ADAMK'], + }), + ('HTTP::Date', '6.02', { + 'source_tmpl': 'HTTP-Date-6.02.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GAAS'], + }), + ('Authen::SASL', '2.16', { + 'source_tmpl': 'Authen-SASL-2.16.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GB/GBARR'], + }), + ('Clone', '0.38', { + 'source_tmpl': 'Clone-0.38.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/G/GA/GARU'], + }), + ('Data::Types', '0.09', { + 'source_tmpl': 'Data-Types-0.09.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DW/DWHEELER'], + }), + ('Import::Into', '1.002005', { + 'source_tmpl': 'Import-Into-1.002005.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/H/HA/HAARG'], + }), + ('DateTime::Tiny', '1.04', { + 'source_tmpl': 'DateTime-Tiny-1.04.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AD/ADAMK'], + }), + ('DBD::AnyData', '0.110', { + 'source_tmpl': 'DBD-AnyData-0.110.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RE/REHSACK'], + }), + ('Text::Format', '0.59', { + 'source_tmpl': 'Text-Format-0.59.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SH/SHLOMIF'], + }), + ('Devel::CheckCompiler', '0.06', { + 'source_tmpl': 'Devel-CheckCompiler-0.06.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SY/SYOHEX'], + }), + ('Log::Handler', '0.84', { + 'source_tmpl': 'Log-Handler-0.84.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BL/BLOONIX'], + }), + ('DBIx::ContextualFetch', '1.03', { + 'source_tmpl': 'DBIx-ContextualFetch-1.03.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TM/TMTM'], + }), + ('Devel::StackTrace', '2.01', { + 'source_tmpl': 'Devel-StackTrace-2.01.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DR/DROLSKY'], + }), + ('Term::ReadKey', '2.33', { + 'source_tmpl': 'TermReadKey-2.33.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/J/JS/JSTOWE'], + }), + ('Set::IntSpan', '1.19', { + 'source_tmpl': 'Set-IntSpan-1.19.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/S/SW/SWMCD'], + }), + ('Moose', '2.1605', { + 'source_tmpl': 'Moose-2.1605.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/E/ET/ETHER'], + }), + ('Algorithm::Dependency', '1.110', { + 'source_tmpl': 'Algorithm-Dependency-1.110.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/A/AD/ADAMK'], + }), + ('Font::TTF', '1.05', { + 'source_tmpl': 'Font-TTF-1.05.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MH/MHOSKEN'], + }), + ('IPC::Run3', '0.048', { + 'source_tmpl': 'IPC-Run3-0.048.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('File::Find::Rule', '0.34', { + 'source_tmpl': 'File-Find-Rule-0.34.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RC/RCLAMP'], + }), + ('SQL::Statement', '1.407', { + 'source_tmpl': 'SQL-Statement-1.407.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RE/REHSACK'], + }), + ('File::Slurp', '9999.19', { + 'source_tmpl': 'File-Slurp-9999.19.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/U/UR/URI'], + }), + ('Package::Stash', '0.37', { + 'source_tmpl': 'Package-Stash-0.37.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/D/DO/DOY'], + }), + ('Data::OptList', '0.109', { + 'source_tmpl': 'Data-OptList-0.109.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('CPANPLUS', '0.9156', { + 'source_tmpl': 'CPANPLUS-0.9156.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BI/BINGOS'], + }), + ('IO::Tty', '1.12', { + 'source_tmpl': 'IO-Tty-1.12.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/T/TO/TODDR'], + }), + ('Text::Soundex', '3.05', { + 'source_tmpl': 'Text-Soundex-3.05.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RJ/RJBS'], + }), + ('Lingua::EN::PluralToSingular', '0.18', { + 'source_tmpl': 'Lingua-EN-PluralToSingular-0.18.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/B/BK/BKB'], + }), + ('Want', '0.29', { + 'source_tmpl': 'Want-0.29.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/R/RO/ROBIN'], + }), + ('Cwd::Guard', '0.04', { + 'source_tmpl': 'Cwd-Guard-0.04.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/K/KA/KAZEBURO'], + }), + ('Bundle::BioPerl', '2.1.9', { + 'source_tmpl': 'Bundle-BioPerl-2.1.9.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/C/CJ/CJFIELDS'], + }), + ('Mail::Util', '2.14', { + 'source_tmpl': 'MailTools-2.14.tar.gz', + 'source_urls': ['https://cpan.metacpan.org/authors/id/M/MA/MARKOV'], + }), +] + +moduleclass = 'lang' -- GitLab From 8e0c7658e8156d1845748cd6cb0e1b8513805253 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Wed, 23 Nov 2016 23:18:40 +0000 Subject: [PATCH 697/741] Use foss-2016b for deps, not minimal toolchain style --- .../Boost-1.61.0-foss-2016b-Python-2.7.12.eb | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb index d30564e4cf..19044f0be3 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb @@ -1,4 +1,3 @@ -# Built with EasyBuild version 3.0.0 on 2016-11-21_11-54-35 name = 'Boost' version = '1.61.0' versionsuffix = '-Python-%(pyver)s' @@ -13,41 +12,15 @@ sources = ['%(namelower)s_1_61_0.tar.gz'] source_urls = [SOURCEFORGE_SOURCE] dependencies = [ - ('bzip2', '1.0.6', '', ('GCC', '5.4.0-2.26')), - ('zlib', '1.2.8', '', ('GCCcore', '5.4.0')), + ('bzip2', '1.0.6'), + ('zlib', '1.2.8'), ('Python', '2.7.12'), ] parallel = 4 -unwanted_env_vars = {} start_dir = '%(builddir)s/boost_1_61_0/' # also build boost_mpi boost_mpi = True moduleclass = 'devel' -# Build statistics -buildstats = [{ - "build_time": 531.66, - "command_line": ["--buildpath='/camp/apps/eb/build'", '--debug', "--github-user='verdurin'", "--hide-deps='ANTLR,APR,APR-util,AT-SPI2-ATK,AT-SPI2-core,ATK,Autoconf,Automake,Bison,Boost,CUSP,Coreutils,DB,DBus,DocBook-XML,Dyninst,ETSF_IO,FFmpeg,FLTK,FTGL,GCCcore,GDAL,GL2PS,GLEW,GLib,GLPK,GPC,GObject-Introspection,GTI,GTK+,GTS,Gdk-Pixbuf,Ghostscript,GraphicsMagick,GtkSourceView,HarfBuzz,JUnit,JasPer,LibTIFF,LibUUID,Libint,M4,Mesa,NASM,OPARI2,OTF2,PCRE,PDT,PROJ,Pango,PnMPI,PyCairo,PyGObject,PyQt,Qhull,Qt,Qt5,S-Lang,SCons,SIP,SQLite,SWIG,Serf,Szip,Tcl,Tk,UDUNITS,XML-Parser,XZ,XKeyboardConfig,YAXT,Yasm,adwaita-icon-theme,ant,assimp,binutils,byacc,bzip2,cairo,dbus-glib,damageproto,eudev,expat,g2clib,g2lib,gc,glproto,gperf,guile,grib_api,gsettings-desktop-schemas,fixesproto,fontsproto,fontconfig,freeglut,freetype,gettext,icc,ifort,inputproto,intltool,itstool,jhbuild,kbproto,libGLU,libICE,libSM,libX11,libXau,libXaw,libXcursor,libXdamage,libXdmcp,libXext,libXfixes,libXfont,libXft,libXi,libXinerama,libXmu,libXpm,libXrandr,libXrender,libXt,libXtst,libcerf,libcroco,libctl,libdap,libdrm,libdwarf,libelf,libevent,libffi,libfontenc,libgd,libgeotiff,libglade,libidn,libjpeg-turbo,libmatheval,libpng,libpciaccess,libpthread-stubs,libreadline,librsvg,libtool,libunistring,libunwind,libyaml,libxcb,libxkbcommon,libxml2,libxslt,makedepend,motif,ncurses,pixman,pkg-config,pkgconfig,popt,pscom,qrupdate,randrproto,recordproto,renderproto,scrollkeeper,texinfo,util-linux,wxPropertyGrid,wxWidgets,x264,xbitmaps,xcb-proto,xcb-util,xcb-util-image,xcb-util-keysyms,xcb-util-renderutil,xcb-util-wm,xextproto,xineramaproto,xorg-macros,xprop,xproto,xtrans,zlib'", "--installpath='/camp/apps/eb'", '--minimal-toolchains', "--packagepath='/camp/apps/eb/packages'", "--prefix='/camp/apps/eb'", "--repositorypath='/camp/apps/eb/ebfiles_repo'", "--robot='/home/camp/huffmaa/local_easyconfigs:/camp/apps/eb/software/EasyBuild/3.0.0/lib/python2.7/site-packages/easybuild_easyconfigs-3.0.0-py2.7.egg/easybuild/easyconfigs:/camp/apps/eb/ebfiles_repo:/home/camp/huffmaa/src/github/verdurin-easyconfigs-devel:/home/camp/huffmaa/src/github/easybuild-easyconfigs'", "--robot-paths='/home/camp/huffmaa/local_easyconfigs::/camp/apps/eb/ebfiles_repo:/home/camp/huffmaa/src/github/verdurin-easyconfigs-devel:/home/camp/huffmaa/src/github/easybuild-easyconfigs'", "--sourcepath='/camp/apps/eb/sources'", 'Cufflinks-2.2.1-foss-2016b.eb'], - "core_count": 4, - "cpu_model": "Intel Xeon E312xx (Sandy Bridge)", - "cpu_speed": 2399.996, - "cpu_vendor": "Intel", - "easybuild-easyblocks_version": "3.0.0", - "easybuild-framework_version": "3.0.0", - "gcc_version": "Using built-in specs.; COLLECT_GCC=gcc; COLLECT_LTO_WRAPPER=/camp/apps/eb/software/GCCcore/5.4.0/libexec/gcc/x86_64-unknown-linux-gnu/5.4.0/lto-wrapper; Target: x86_64-unknown-linux-gnu; Configured with: ../configure --enable-languages=c,c++,fortran --enable-lto --enable-checking=release --disable-multilib --enable-shared=yes --enable-static=yes --enable-threads=posix --enable-gold=default --enable-plugins --enable-ld --with-plugin-ld=ld.gold --prefix=/camp/apps/eb/software/GCCcore/5.4.0 --with-local-prefix=/camp/apps/eb/software/GCCcore/5.4.0 --enable-bootstrap --with-isl=/camp/apps/eb/build/GCCcore/5.4.0/dummy-/gcc-5.4.0/stage2_stuff; Thread model: posix; gcc version 5.4.0 (GCC) ; ", - "glibc_version": "2.17", - "hostname": "login000.camp.thecrick.org", - "install_size": 180608773, - "modules_tool": ('Lmod', '/usr/share/lmod/lmod/libexec/lmod', '6.3.4'), - "os_name": "centos linux", - "os_type": "Linux", - "os_version": "7.2.1511", - "platform_name": "x86_64-unknown-linux", - "python_version": "2.7.5 (default, Sep 15 2016, 22:37:39) ; [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]", - "system_gcc_path": "/camp/apps/eb/software/GCCcore/5.4.0/bin/gcc", - "system_python_path": "/camp/apps/eb/software/Python/2.7.12-foss-2016b/bin/python", - "timestamp": 1479729271, - "total_memory": 7821, -}] -- GitLab From 8da437c405f3bf61a12eb0318f8c521561912717 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 24 Nov 2016 08:58:47 +0100 Subject: [PATCH 698/741] Change version numbering for iomkl/iompi Drop GCC suffix in toolchain version. --- .../iomkl/{iomkl-2017.01-GCC-5.4.eb => iomkl-2017.01.eb} | 3 +-- ...{iompi-2017.01-GCC-5.4.0-2.26.eb => iompi-2017.01.eb} | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) rename easybuild/easyconfigs/i/iomkl/{iomkl-2017.01-GCC-5.4.eb => iomkl-2017.01.eb} (95%) rename easybuild/easyconfigs/i/iompi/{iompi-2017.01-GCC-5.4.0-2.26.eb => iompi-2017.01.eb} (68%) diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-2017.01-GCC-5.4.eb b/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb similarity index 95% rename from easybuild/easyconfigs/i/iomkl/iomkl-2017.01-GCC-5.4.eb rename to easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb index e65702ede5..5cbe29e428 100644 --- a/easybuild/easyconfigs/i/iomkl/iomkl-2017.01-GCC-5.4.eb +++ b/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb @@ -2,8 +2,6 @@ easyblock = "Toolchain" name = 'iomkl' version = '2017.01' -gcc_maj_min = '5.4' -versionsuffix = '-GCC-%s' % gcc_maj_min homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' description = """Intel Cluster Toolchain Compiler Edition provides Intel C/C++ and Fortran compilers, Intel MKL & OpenMPI.""" @@ -11,6 +9,7 @@ description = """Intel Cluster Toolchain Compiler Edition provides Intel C/C++ a toolchain = {'name': 'dummy', 'version': 'dummy'} compver = '2017.1.132' +gcc_maj_min = '5.4' gccver = '%s.0' % gcc_maj_min binutilsver = '2.26' gccsuff = '-GCC-%s-%s' % (gccver, binutilsver) diff --git a/easybuild/easyconfigs/i/iompi/iompi-2017.01-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/iompi/iompi-2017.01.eb similarity index 68% rename from easybuild/easyconfigs/i/iompi/iompi-2017.01-GCC-5.4.0-2.26.eb rename to easybuild/easyconfigs/i/iompi/iompi-2017.01.eb index b5e3d116ce..9c2c6b52a5 100644 --- a/easybuild/easyconfigs/i/iompi/iompi-2017.01-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/iompi/iompi-2017.01.eb @@ -3,7 +3,6 @@ easyblock = "Toolchain" name = 'iompi' version = '2017.01' -versionsuffix = '-GCC-5.4.0-2.26' homepage = 'http://software.intel.com/en-us/intel-cluster-toolkit-compiler/' description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" @@ -11,10 +10,12 @@ description = """Intel C/C++ and Fortran compilers, alongside Intel MPI.""" toolchain = {'name': 'dummy', 'version': 'dummy'} compver = '2017.1.132' +compversuff = '-GCC-5.4.0-2.26' + dependencies = [ - ('icc', compver, versionsuffix), - ('ifort', compver, versionsuffix), - ('OpenMPI', '2.0.1', '', ('iccifort', '%s%s' % (compver, versionsuffix))), + ('icc', compver, compversuff), + ('ifort', compver, compversuff), + ('OpenMPI', '2.0.1', '', ('iccifort', '%s%s' % (compver, compversuff))), ] moduleclass = 'toolchain' -- GitLab From e8278b20632f0dc4ca5ed3710005368f765eea68 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 24 Nov 2016 09:00:05 +0100 Subject: [PATCH 699/741] Drop unused patch block and re-enable enable-mpi-thread-multiple. The patches aren't needed any longer. Re-enable enable-mpi-thread-multiple, it was a site local change that shouldn't have been there in the first place. --- .../OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb index f1f5284b1f..24387ce01b 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -12,14 +12,9 @@ sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/downloads',] -#patches = [ -# 'OpenMPI-%(version)s_common-cuda-lib.patch', -# 'OpenMPI-%(version)s-vt_cupti_events.patch', -#] - dependencies = [('hwloc', '1.11.4')] -configopts = '--with-threads=posix --enable-shared --with-verbs ' +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs' configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading -- GitLab From 3cb746259f8ddd5968ec74aabde7a83092fabfc7 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 24 Nov 2016 09:32:42 +0100 Subject: [PATCH 700/741] Use the correct version for imkl/iompi toolchains and dependencies. --- ...17.01-GCC-5.4.0-2.26.eb => imkl-2017.1.132-iompi-2017.01.eb} | 2 +- easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename easybuild/easyconfigs/i/imkl/{imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb => imkl-2017.1.132-iompi-2017.01.eb} (95%) diff --git a/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01.eb similarity index 95% rename from easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb rename to easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01.eb index ec50c52adc..1f68711972 100644 --- a/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/i/imkl/imkl-2017.1.132-iompi-2017.01.eb @@ -9,7 +9,7 @@ description = """Intel Math Kernel Library is a library of highly optimized, applications that require maximum performance. Core math functions include BLAS, LAPACK, ScaLAPACK, Sparse Solvers, Fast Fourier Transforms, Vector Math, and more.""" -toolchain = {'name': 'iompi', 'version': '2017.01-GCC-5.4.0-2.26'} +toolchain = {'name': 'iompi', 'version': '2017.01'} sources = ['l_mkl_%(version)s.tgz'] checksums = ['7911c0f777c4cb04225bf4518088939e'] diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb b/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb index 5cbe29e428..e3f0d29f39 100644 --- a/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb +++ b/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb @@ -19,7 +19,7 @@ dependencies = [ ('icc', compver, gccsuff), ('ifort', compver, gccsuff), ('OpenMPI', '2.0.1', '', ('iccifort', '%s%s' % (compver, gccsuff))), - ('imkl', '2017.1.132', '', ('iompi', '%s%s' % (version, gccsuff))), + ('imkl', '2017.1.132', '', ('iompi', version)), ] moduleclass = 'toolchain' -- GitLab From 11f7e67ca7dcbe190c5d6547b7220658d0b28414 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 24 Nov 2016 09:35:02 +0100 Subject: [PATCH 701/741] Add HPL easyconfig as test case for the new iomkl/2017.01 toolchain. --- .../easyconfigs/h/HPL/HPL-2.2-iomkl-2017.01.eb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2017.01.eb diff --git a/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2017.01.eb b/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2017.01.eb new file mode 100644 index 0000000000..d890354a7b --- /dev/null +++ b/easybuild/easyconfigs/h/HPL/HPL-2.2-iomkl-2017.01.eb @@ -0,0 +1,18 @@ +name = 'HPL' +version = '2.2' + +homepage = 'http://www.netlib.org/benchmark/hpl/' +description = """HPL is a software package that solves a (random) dense linear system in double precision (64 bits) arithmetic + on distributed-memory computers. It can thus be regarded as a portable as well as freely available implementation of the + High Performance Computing Linpack Benchmark.""" + +toolchain = {'name': 'iomkl', 'version': '2017.01'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['http://www.netlib.org/benchmark/%(namelower)s'] + +# fix Make dependencies, so parallel build also works +patches = ['HPL_parallel-make.patch'] + +moduleclass = 'tools' -- GitLab From 8a33a0b86702de0e5412ee11c2fd9861dc936639 Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 24 Nov 2016 10:58:24 +0100 Subject: [PATCH 702/741] Remove redundant depenedncies. --- easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb b/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb index e3f0d29f39..6039ebaad3 100644 --- a/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb +++ b/easybuild/easyconfigs/i/iomkl/iomkl-2017.01.eb @@ -13,9 +13,8 @@ gcc_maj_min = '5.4' gccver = '%s.0' % gcc_maj_min binutilsver = '2.26' gccsuff = '-GCC-%s-%s' % (gccver, binutilsver) + dependencies = [ - ('GCCcore', gccver), - ('binutils', binutilsver, '-GCCcore-%s' % gccver), ('icc', compver, gccsuff), ('ifort', compver, gccsuff), ('OpenMPI', '2.0.1', '', ('iccifort', '%s%s' % (compver, gccsuff))), -- GitLab From 53e75ffe6b7fb727d4eb4757eb2341c5b0de9d4e Mon Sep 17 00:00:00 2001 From: Ake Sandgren Date: Thu, 24 Nov 2016 11:09:17 +0100 Subject: [PATCH 703/741] Fix missing " " --- .../OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb index 24387ce01b..7d74bf0639 100644 --- a/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/o/OpenMPI/OpenMPI-2.0.1-iccifort-2017.1.132-GCC-5.4.0-2.26.eb @@ -14,7 +14,7 @@ source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/d dependencies = [('hwloc', '1.11.4')] -configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs' +configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs ' configopts += '--enable-mpirun-prefix-by-default ' # suppress failure modes in relation to mpirun path configopts += '--with-hwloc=$EBROOTHWLOC ' # hwloc support configopts += '--disable-dlopen ' # statically link component, don't do dynamic loading -- GitLab From 7340994d98162f3de3ca248f2340c11a7ebda4cf Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 24 Nov 2016 14:33:33 +0100 Subject: [PATCH 704/741] adding easyconfigs: PhyloBayes-MPI-20161021-intel-2016b.eb --- .../PhyloBayes-MPI-20161021-intel-2016b.eb | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 easybuild/easyconfigs/p/PhyloBayes-MPI/PhyloBayes-MPI-20161021-intel-2016b.eb diff --git a/easybuild/easyconfigs/p/PhyloBayes-MPI/PhyloBayes-MPI-20161021-intel-2016b.eb b/easybuild/easyconfigs/p/PhyloBayes-MPI/PhyloBayes-MPI-20161021-intel-2016b.eb new file mode 100644 index 0000000000..7fb0e0c330 --- /dev/null +++ b/easybuild/easyconfigs/p/PhyloBayes-MPI/PhyloBayes-MPI-20161021-intel-2016b.eb @@ -0,0 +1,29 @@ +easyblock = 'MakeCp' + +name = 'PhyloBayes-MPI' +version = '20161021' +commit = 'e4ea1ca' + +homepage = 'https://github.com/bayesiancook/pbmpi' +description = "A Bayesian software for phylogenetic reconstruction using mixture models" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['https://github.com/bayesiancook/pbmpi/archive/'] +sources = ['%s.tar.gz' % commit] + +start_dir = 'sources' + +# get rid of included binaries to ensur they're recompiled +prebuildopts = "rm -f data/* &&" + +buildopts = 'CC="$MPICXX" CPPFLAGS="$CXXFLAGS -c" LDFLAGS="$CXXFLAGS"' + +files_to_copy = [(['data/*'], 'bin')] + +sanity_check_paths = { + 'files': ['bin/bpcomp', 'bin/cvrep', 'bin/pb_mpi', 'bin/readpb_mpi', 'bin/tracecomp'], + 'dirs': [], +} + +moduleclass = 'bio' -- GitLab From 30cc8f3080cb95e6d3ff5c1f0d56d87a0d810af7 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Fri, 25 Nov 2016 00:17:18 +0000 Subject: [PATCH 705/741] Remove unwanted build artefacts and outdated comment re upstream Cufflinks/Boost bug --- .../b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb | 5 +---- .../easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb index 19044f0be3..8d63b34e5c 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb @@ -5,7 +5,7 @@ versionsuffix = '-Python-%(pyver)s' homepage = 'http://www.boost.org/' description = "Boost provides free peer-reviewed portable C++ source libraries." -toolchain = {'version': '2016b', 'name': 'foss'} +toolchain = {'name': 'foss', 'version': '2016b'} toolchainopts = {'usempi': True, 'pic': True} sources = ['%(namelower)s_1_61_0.tar.gz'] @@ -17,9 +17,6 @@ dependencies = [ ('Python', '2.7.12'), ] -parallel = 4 - -start_dir = '%(builddir)s/boost_1_61_0/' # also build boost_mpi boost_mpi = True diff --git a/easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb b/easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb index 9ef27b6332..5337cc8919 100644 --- a/easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb +++ b/easybuild/easyconfigs/c/Cufflinks/Cufflinks-2.2.1-foss-2016b.eb @@ -11,7 +11,6 @@ sources = [SOURCELOWER_TAR_GZ] source_urls = ['http://cole-trapnell-lab.github.io/cufflinks/assets/downloads/'] dependencies = [ - # issues with boost supposedly fixed now, see https://github.com/cole-trapnell-lab/cufflinks/issues/3 ('Boost', '1.61.0', '-Python-2.7.12'), ('SAMtools', '0.1.19'), ('Eigen', '3.2.3'), -- GitLab From 47dab1f47a742ac3d40ff1490ddcf23103a49ede Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sat, 26 Nov 2016 08:45:02 +0000 Subject: [PATCH 706/741] Update Boost-1.61.0-foss-2016b-Python-2.7.12.eb Fix hard coded source file version --- .../b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb index 8d63b34e5c..a0f2183ed3 100644 --- a/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/b/Boost/Boost-1.61.0-foss-2016b-Python-2.7.12.eb @@ -8,7 +8,7 @@ description = "Boost provides free peer-reviewed portable C++ source libraries." toolchain = {'name': 'foss', 'version': '2016b'} toolchainopts = {'usempi': True, 'pic': True} -sources = ['%(namelower)s_1_61_0.tar.gz'] +sources = ['%%(namelower)s_%s.tar.gz' % '_'.join(version.split('.'))] source_urls = [SOURCEFORGE_SOURCE] dependencies = [ -- GitLab From b9ed878639594865bd816e87eefc87cbe4abbb10 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sat, 26 Nov 2016 14:01:20 +0100 Subject: [PATCH 707/741] adding easyconfigs: findhap-4.eb --- easybuild/easyconfigs/f/findhap/findhap-4.eb | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/f/findhap/findhap-4.eb diff --git a/easybuild/easyconfigs/f/findhap/findhap-4.eb b/easybuild/easyconfigs/f/findhap/findhap-4.eb new file mode 100644 index 0000000000..ed99ac9de5 --- /dev/null +++ b/easybuild/easyconfigs/f/findhap/findhap-4.eb @@ -0,0 +1,38 @@ +# Adam Huffman +# The Francis Crick Institute + +easyblock = 'Tarball' + +name = 'findhap' +version = '4' + +homepage = 'http://aipl.arsusda.gov/software/findhap/' +description = """Find haplotypes and impute genotypes using multiple chip sets and sequence data""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +sources = ['%(name)sV%(version)s.zip'] +source_urls = ['http://aipl.arsusda.gov/software/%(name)s/'] + +modextrapaths = { + 'PATH': '', +} + +modloadmsg = """ +Copy the following file to the directory from which you will be running the executable: +\\$EBROOTFINDHAP/findhap.options + +Other files in the \\$EBROOTFINDHAP directory are: + +\\$EBROOTFINDHAP/genotypes.txt +\\$EBROOTFINDHAP/chromosome.data +\\$EBROOTFINDHAP/pedigree.file +\\$EBROOTFINDHAP/sequences.readdepth +""" + +sanity_check_paths = { + 'files': ['findhap4', 'findhap4.f90'], + 'dirs': ["Example_Output"] +} + +moduleclass = 'bio' -- GitLab From dda37b550f4089981fb7fcc2df4f6e093922dfdd Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sat, 26 Nov 2016 14:53:42 +0100 Subject: [PATCH 708/741] Add example input files to sanity_check --- easybuild/easyconfigs/f/findhap/findhap-4.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/f/findhap/findhap-4.eb b/easybuild/easyconfigs/f/findhap/findhap-4.eb index ed99ac9de5..06eb1f492a 100644 --- a/easybuild/easyconfigs/f/findhap/findhap-4.eb +++ b/easybuild/easyconfigs/f/findhap/findhap-4.eb @@ -31,7 +31,7 @@ Other files in the \\$EBROOTFINDHAP directory are: """ sanity_check_paths = { - 'files': ['findhap4', 'findhap4.f90'], + 'files': ['findhap4', 'findhap4.f90', 'genotypes.txt', 'chromosome.data', 'pedigree.file', 'sequences.readdepth'], 'dirs': ["Example_Output"] } -- GitLab From 43484a6cc3379026d422d0897d03aeacd80e3770 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 26 Nov 2016 17:19:17 +0100 Subject: [PATCH 709/741] adding easyconfigs: BLAST-2.2.26-Linux_x86_64.eb --- easybuild/easyconfigs/b/BLAST/BLAST-2.2.26-Linux_x86_64.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/b/BLAST/BLAST-2.2.26-Linux_x86_64.eb b/easybuild/easyconfigs/b/BLAST/BLAST-2.2.26-Linux_x86_64.eb index 22babb46e9..5befdd3e11 100644 --- a/easybuild/easyconfigs/b/BLAST/BLAST-2.2.26-Linux_x86_64.eb +++ b/easybuild/easyconfigs/b/BLAST/BLAST-2.2.26-Linux_x86_64.eb @@ -3,7 +3,7 @@ # Swiss Institute of Bioinformatics # Biozentrum - University of Basel -easyblock = "Tarball" +easyblock = 'Tarball' name = 'BLAST' version = '2.2.26' @@ -16,7 +16,7 @@ description = """Basic Local Alignment Search Tool, or BLAST, is an algorithm toolchain = {'name': 'dummy', 'version': 'dummy'} -source_urls = ['http://ftp.ncbi.nlm.nih.gov/blast/executables/release/%(version)s/'] +source_urls = ['https://ftp.ncbi.nlm.nih.gov/blast//executables/legacy/%(version)s/'] sources = ['%(namelower)s-%(version)s-x64-linux.tar.gz'] sanity_check_paths = { -- GitLab From 0d4aecf091505ef58551acd6d7bcc40c263f9d66 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Lopez Date: Sat, 26 Nov 2016 20:20:07 +0100 Subject: [PATCH 710/741] change order or dependencies --- .../Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/easybuild/easyconfigs/c/Cookiecutter/Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb b/easybuild/easyconfigs/c/Cookiecutter/Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb index 115a55ed2f..7cce1f3518 100644 --- a/easybuild/easyconfigs/c/Cookiecutter/Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb +++ b/easybuild/easyconfigs/c/Cookiecutter/Cookiecutter-1.4.0-goolf-1.7.20-Python-2.7.11.eb @@ -41,18 +41,18 @@ exts_list = [ ('arrow', '0.8.0', { 'source_urls': ['https://pypi.python.org/packages/source/a/arrow/'], }), - ('jinja2-time', '0.2.0', { - 'source_urls': ['https://pypi.python.org/packages/source/j/jinja2-time/'], - 'modulename': 'jinja2', - }), ('chardet', '2.3.0', { 'source_urls': ['https://pypi.python.org/packages/source/c/chardet/'], }), ('binaryornot', '0.4.0', { 'source_urls': ['https://pypi.io/packages/source/b/binaryornot/'], - }), + }), ('Jinja2', '2.8', { 'source_urls': ['https://pypi.python.org/packages/source/J/Jinja2/'], + }), + ('jinja2-time', '0.2.0', { + 'source_urls': ['https://pypi.python.org/packages/source/j/jinja2-time/'], + 'modulename': 'jinja2', }), ('click', '6.6', { 'source_urls': ['https://pypi.python.org/packages/source/c/click/'], -- GitLab From 9581b13aeeebdf31b4e8dc554829c2a29239aed7 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 28 Nov 2016 13:44:06 +0100 Subject: [PATCH 711/741] adding easyconfigs: BBMap-36.62-intel-2016b-Java-1.8.0_112.eb --- .../BBMap-36.62-intel-2016b-Java-1.8.0_112.eb | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 easybuild/easyconfigs/b/BBMap/BBMap-36.62-intel-2016b-Java-1.8.0_112.eb diff --git a/easybuild/easyconfigs/b/BBMap/BBMap-36.62-intel-2016b-Java-1.8.0_112.eb b/easybuild/easyconfigs/b/BBMap/BBMap-36.62-intel-2016b-Java-1.8.0_112.eb new file mode 100644 index 0000000000..539e3c2d20 --- /dev/null +++ b/easybuild/easyconfigs/b/BBMap/BBMap-36.62-intel-2016b-Java-1.8.0_112.eb @@ -0,0 +1,34 @@ +easyblock = 'MakeCp' + +name = 'BBMap' +version = '36.62' +versionsuffix = '-Java-%(javaver)s' + +homepage = 'https://sourceforge.net/projects/bbmap/' +description = """BBMap short read aligner, and other bioinformatic tools.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = [SOURCEFORGE_SOURCE] +sources = ['%(name)s_%(version)s.tar.gz' ] + +dependencies = [('Java', '1.8.0_112', '', True)] + +prebuildopts = 'cd jni && ' + +suff = {'Darwin': 'osx', 'Linux': 'linux'}[OS_TYPE] +buildopts = "-f makefile.%s" % suff + +files_to_copy = ['*'] + +sanity_check_paths = { + 'files': ['bbmap.sh'], + 'dirs': [] +} + +modextrapaths = {'PATH': ''} + +modloadmsg = """For improved speed, add 'usejni=t' to the command line of %(name)s tools which support the use of the + compiled jni C code.""" + +moduleclass = 'bio' -- GitLab From acc095582e575f45930d00f3cba7965f2861e6e4 Mon Sep 17 00:00:00 2001 From: Tim Slauson Date: Mon, 28 Nov 2016 09:29:45 -0900 Subject: [PATCH 712/741] Rewrite sanity_check_commands to specify a string and use a glob --- .../d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb index 2577694b3e..d5229b9259 100644 --- a/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/d/dadi/dadi-1.7.0-intel-2016b-Python-2.7.12.eb @@ -23,8 +23,6 @@ sanity_check_paths = { 'dirs': ['lib/python%(pyshortver)s/site-packages'], } -sanity_check_commands = [ - ('cd %(builddir)s/gutenkunstlab-dadi-01068e3ad50d/tests && python run_tests.py', '') -] +sanity_check_commands = ["cd %(builddir)s/*/tests && python run_tests.py"] moduleclass = 'bio' -- GitLab From 1042d30a2d7542c5a9fb7189aaecada714abf592 Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Tue, 29 Nov 2016 17:30:16 +0800 Subject: [PATCH 713/741] prepare release notes for eb301 --- RELEASE_NOTES | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 0a73a07315..d97c6d3fcb 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -6,6 +6,15 @@ These release notes can also be consulted at http://easybuild.readthedocs.org/en The latest version of easybuild-easyconfig provides 6,176 easyconfig files, for 1,116 different software packages, 25 different (compiler) toolchains, 13 software bundles and 1 meta-package. +v3.0.1 (November 30th 2016) +--------------------------- + +bugfix release +- various enhancements, including: + - update SAMtools easyblock for recent versions (#1048) +- various bugfixes, including: + - fix QuantumESPRESSO easyblock to handle gipaw correctly (#1041) + v3.0.0 (November 16th 2016) --------------------------- -- GitLab From 7c361db319c392317cc7abbe6c1aef8758bea9ea Mon Sep 17 00:00:00 2001 From: Miguel Dias Costa Date: Tue, 29 Nov 2016 18:02:54 +0800 Subject: [PATCH 714/741] fix release notes for eb301 --- RELEASE_NOTES | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index d97c6d3fcb..c001e2f08f 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -10,10 +10,15 @@ v3.0.1 (November 30th 2016) --------------------------- bugfix release +- added example easyconfig files for 6 new software packages: + - Cookiecutter (#3827), ETE (#3857), findhap (#3860), LoFreq (#3856), PhyloBayes-MPI (#3859), XGBoost (#3849) +- added additional easyconfigs for various supported software packages - various enhancements, including: - - update SAMtools easyblock for recent versions (#1048) -- various bugfixes, including: - - fix QuantumESPRESSO easyblock to handle gipaw correctly (#1041) + - add ipywidgets and widgetsnbextension extensions to IPython 5.1.0 easyconfigs (#3818, #3823) +- various bug fixes, including: + - fix incorrect descriptions for ifort (#3817) + - fix modulename for Jinja2 and Pygments (#3823) + - fix download URL in BLAST 2.2.26 easyconfig (#3861) v3.0.0 (November 16th 2016) -- GitLab From f33aaa6274b839cfac14e182cbc91a67ab50c256 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 29 Nov 2016 12:09:34 +0100 Subject: [PATCH 715/741] include #3858 in release notes for EasyBuild v3.0.1 --- RELEASE_NOTES | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index c001e2f08f..69993c7bec 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -15,6 +15,7 @@ bugfix release - added additional easyconfigs for various supported software packages - various enhancements, including: - add ipywidgets and widgetsnbextension extensions to IPython 5.1.0 easyconfigs (#3818, #3823) + - run dadi test suite as a sanity check command (#3858) - various bug fixes, including: - fix incorrect descriptions for ifort (#3817) - fix modulename for Jinja2 and Pygments (#3823) -- GitLab From 0e0ea6d42b5f6bc0a2888b5d48bb8a6403411cca Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 29 Nov 2016 12:15:23 +0100 Subject: [PATCH 716/741] include #3826, update counts --- RELEASE_NOTES | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 69993c7bec..44fdf028c3 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -3,15 +3,16 @@ For more detailed information, please see the git log. These release notes can also be consulted at http://easybuild.readthedocs.org/en/latest/Release_notes.html. -The latest version of easybuild-easyconfig provides 6,176 easyconfig files, for 1,116 different software packages, +The latest version of easybuild-easyconfig provides 6,225 easyconfig files, for 1,123 different software packages, 25 different (compiler) toolchains, 13 software bundles and 1 meta-package. v3.0.1 (November 30th 2016) --------------------------- bugfix release -- added example easyconfig files for 6 new software packages: - - Cookiecutter (#3827), ETE (#3857), findhap (#3860), LoFreq (#3856), PhyloBayes-MPI (#3859), XGBoost (#3849) +- added example easyconfig files for 7 new software packages: + - Cookiecutter (#3827), ETE (#3857), findhap (#3860), graphviz (Python bindings, #3826), LoFreq (#3856), + PhyloBayes-MPI (#3859), XGBoost (#3849) - added additional easyconfigs for various supported software packages - various enhancements, including: - add ipywidgets and widgetsnbextension extensions to IPython 5.1.0 easyconfigs (#3818, #3823) -- GitLab From 36cf05383853a7d844c4ac838d14ea7fabdb0b62 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 29 Nov 2016 12:15:44 +0100 Subject: [PATCH 717/741] bump version to v3.0.1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 003be273e7..2eabfbcddb 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from distutils import log # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = '3.1.0.dev0' +VERSION = '3.0.1' API_VERSION = VERSION.split('.')[0] EB_VERSION = '.'.join(VERSION.split('.')[0:2]) -- GitLab From 8a02629508be3ff4811f561432d8b3841cb4eead Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 29 Nov 2016 13:44:45 +0100 Subject: [PATCH 718/741] adding easyconfigs: ccache-3.3.3.eb --- .../easyconfigs/c/ccache/ccache-3.3.3.eb | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 easybuild/easyconfigs/c/ccache/ccache-3.3.3.eb diff --git a/easybuild/easyconfigs/c/ccache/ccache-3.3.3.eb b/easybuild/easyconfigs/c/ccache/ccache-3.3.3.eb new file mode 100644 index 0000000000..f3c8b6240f --- /dev/null +++ b/easybuild/easyconfigs/c/ccache/ccache-3.3.3.eb @@ -0,0 +1,36 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Uni.Lu/LCSB, NTUA +# Authors:: Fotis Georgatos +# License:: MIT/GPL +# $Id$ +## +easyblock = 'ConfigureMake' + +name = 'ccache' +version = '3.3.3' + +homepage = 'http://ccache.samba.org/' +description = """ccache-3.1.9: Cache for C/C++ compilers""" + +toolchain = {'name': 'dummy', 'version': ''} +toolchainopts = {'static': True} + +source_urls = ['https://github.com/ccache/ccache/archive/'] +sources = ['v%(version)s.tar.gz'] + +builddependencies = [ + ('Autotools', '20150215'), + ('zlib', '1.2.8'), +] + +preconfigopts = "./autogen.sh && " +buildopts = 'LDFLAGS="-static"' + +sanity_check_paths = { + 'files': ['bin/ccache'], + 'dirs': [] +} + +moduleclass = 'tools' -- GitLab From f06800a62ad08e3ac47992e8d146fd48eed9a933 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 30 Nov 2016 11:59:55 +0100 Subject: [PATCH 719/741] adding easyconfigs: EasyBuild-3.0.1.eb --- .../e/EasyBuild/EasyBuild-3.0.1.eb | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.1.eb diff --git a/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.1.eb b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.1.eb new file mode 100644 index 0000000000..3d9fd92508 --- /dev/null +++ b/easybuild/easyconfigs/e/EasyBuild/EasyBuild-3.0.1.eb @@ -0,0 +1,38 @@ +easyblock = 'EB_EasyBuildMeta' + +name = 'EasyBuild' +version = '3.0.1' + +homepage = 'http://hpcugent.github.com/easybuild/' +description = """EasyBuild is a software build and installation framework + written in Python that allows you to install software in a structured, + repeatable and robust way.""" + +toolchain = {'name': 'dummy', 'version': 'dummy'} + +source_urls = [ + # vsc-install + 'https://pypi.python.org/packages/9c/fa/648c7484cef36f752a41f7a3d8ef1db7ed7741b0440eae87694b7de835ae', + # vsc-base + 'https://pypi.python.org/packages/73/24/e4244a743e0cfc4af1f3b3b772698e2f4dafc7052bc006a1b829b66f7a3a', + # easybuild-framework + 'https://pypi.python.org/packages/78/63/d0d2cc49885c1fa86bdbbf3c3a314526fe4d7ddd43fa79b6b41fdd959ede', + # easybuild-easyblocks + 'https://pypi.python.org/packages/0b/36/9b492be00eb4f0ac229ccba354bc5c327cbbf590be85f4d996a40ce956b6', + # easybuild-easyconfigs + 'https://pypi.python.org/packages/5b/d2/6f9a02af09c77adc19176227657a313eb06eb28faf0372ca6dead231404d', +] +# order matters a lot, to avoid having dependencies auto-resolved (--no-deps easy_install option doesn't work?) +sources = [ + 'vsc-install-0.10.20.tar.gz', + 'vsc-base-2.5.5.tar.gz', + 'easybuild-framework-%(version)s.tar.gz', + 'easybuild-easyblocks-%(version)s.tar.gz', + 'easybuild-easyconfigs-%(version)s.tar.gz', +] + +# EasyBuild is a (set of) Python packages, so it depends on Python +# usually, we want to use the system Python, so no actual Python dependency is listed +allow_system_deps = [('Python', SYS_PYTHON_VERSION)] + +moduleclass = 'tools' -- GitLab From db1ece495992930708578afaaa35175780c312f1 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 30 Nov 2016 12:01:37 +0100 Subject: [PATCH 720/741] bump version (again) to 3.1.0.dev0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2eabfbcddb..003be273e7 100644 --- a/setup.py +++ b/setup.py @@ -47,7 +47,7 @@ from distutils import log # recent setuptools versions will *TRANSFORM* something like 'X.Y.Zdev' into 'X.Y.Z.dev0', with a warning like # UserWarning: Normalizing '2.4.0dev' to '2.4.0.dev0' # This causes problems further up the dependency chain... -VERSION = '3.0.1' +VERSION = '3.1.0.dev0' API_VERSION = VERSION.split('.')[0] EB_VERSION = '.'.join(VERSION.split('.')[0:2]) -- GitLab From 3b8d9616a5cbc24fa6e2dd52a39619d55ec8ef74 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Wed, 30 Nov 2016 13:46:14 +0100 Subject: [PATCH 721/741] adding easyconfigs: Spark-2.0.2.eb --- easybuild/easyconfigs/s/Spark/Spark-2.0.2.eb | 27 ++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 easybuild/easyconfigs/s/Spark/Spark-2.0.2.eb diff --git a/easybuild/easyconfigs/s/Spark/Spark-2.0.2.eb b/easybuild/easyconfigs/s/Spark/Spark-2.0.2.eb new file mode 100644 index 0000000000..8f5ba91181 --- /dev/null +++ b/easybuild/easyconfigs/s/Spark/Spark-2.0.2.eb @@ -0,0 +1,27 @@ +easyblock = 'Tarball' + +name = 'Spark' +version = '2.0.2' + +homepage = 'http://spark.apache.org' +description = """Spark is Hadoop MapReduce done in memory""" + +toolchain = {'name': 'dummy', 'version': ''} + +sources = ['%(namelower)s-%(version)s-bin-hadoop2.6.tgz'] +source_urls = [ + 'http://apache.belnet.be/%(namelower)s/%(namelower)s-%(version)s/', + 'http://www.eu.apache.org/dist/%(namelower)s/%(namelower)s-%(version)s/', + 'http://www.us.apache.org/dist/%(namelower)s/%(namelower)s-%(version)s/', +] + +dependencies = [('Java', '1.7.0_80')] + +sanity_check_paths = { + 'files': ['bin/spark-shell'], + 'dirs': ['python'] +} + +modextrapaths = {'PYTHONPATH': 'python'} + +moduleclass = 'devel' -- GitLab From cf3d6c6b499166f9ff041325032ed0fd74adb386 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 30 Nov 2016 13:49:16 +0100 Subject: [PATCH 722/741] {bio} [inte/2016b] BWA/0.7.15 --- .../b/BWA/BWA-0.7.15-intel-2016b.eb | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 easybuild/easyconfigs/b/BWA/BWA-0.7.15-intel-2016b.eb diff --git a/easybuild/easyconfigs/b/BWA/BWA-0.7.15-intel-2016b.eb b/easybuild/easyconfigs/b/BWA/BWA-0.7.15-intel-2016b.eb new file mode 100644 index 0000000000..62b042ace9 --- /dev/null +++ b/easybuild/easyconfigs/b/BWA/BWA-0.7.15-intel-2016b.eb @@ -0,0 +1,32 @@ +## +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# +# Copyright:: Copyright 2012-2014 Cyprus Institute / CaSToRC, Uni.Lu/LCSB, NTUA +# Authors:: George Tsouloupas , Fotis Georgatos +# License:: MIT/GPL +# $Id$ +# +# This work implements a part of the HPCBIOS project and is a component of the policy: +# http://hpcbios.readthedocs.org/en/latest/HPCBIOS_2012-94.html +# +# Version >= 0.7.15 +# Author: Adam Huffman +# The Francis Crick Institute +# +# Note that upstream development is mainly at: https://github.com/lh3/bwa +## + +name = 'BWA' +version = '0.7.15' + +homepage = 'http://bio-bwa.sourceforge.net/' +description = """Burrows-Wheeler Aligner (BWA) is an efficient program that aligns + relatively short nucleotide sequences against a long reference sequence such as the human genome.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +source_urls = ['https://github.com/lh3/%(name)s/archive/'] +sources = ['v%(version)s.tar.gz'] + +moduleclass = 'bio' -- GitLab From 7e1ee444ddff62180666d46e0f4ab50c8a36bec4 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 30 Nov 2016 14:39:57 +0100 Subject: [PATCH 723/741] {geo} [intel/2016b] SimPEG/0.3.0 --- .../SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb diff --git a/easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb new file mode 100644 index 0000000000..4b2df190b5 --- /dev/null +++ b/easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb @@ -0,0 +1,28 @@ +easyblock = 'PythonPackage' + +name = 'SimPEG' +version = '0.3.0' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://simpeg.xyz' +description = """Simulation and Parameter Estimation in Geophysics: a python package for simulation and gradient +based parameter estimation in the context of geophysical applications.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/simpeg/simpeg/archive/'] + +dependencies = [ + ('Python', '2.7.12'), + ('matplotlib', '1.5.3', versionsuffix), +] + +options = {'modulename': 'SimPEG'} + +sanity_check_paths = { + 'files': ['bin/TreeUtils.pyx'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'geo' -- GitLab From 41825bb1b2167a97cd7b2779bef7656a5d0bb9e4 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Wed, 30 Nov 2016 16:42:34 +0100 Subject: [PATCH 724/741] Switch to Pypi and use latest release for SimPEG --- ...-2.7.12.eb => SimPEG-0.3.1-intel-2016b-Python-2.7.12.eb} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename easybuild/easyconfigs/s/SimPEG/{SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb => SimPEG-0.3.1-intel-2016b-Python-2.7.12.eb} (84%) diff --git a/easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb b/easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.1-intel-2016b-Python-2.7.12.eb similarity index 84% rename from easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb rename to easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.1-intel-2016b-Python-2.7.12.eb index 4b2df190b5..d9e07f44c5 100644 --- a/easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.0-intel-2016b-Python-2.7.12.eb +++ b/easybuild/easyconfigs/s/SimPEG/SimPEG-0.3.1-intel-2016b-Python-2.7.12.eb @@ -1,7 +1,7 @@ easyblock = 'PythonPackage' name = 'SimPEG' -version = '0.3.0' +version = '0.3.1' versionsuffix = '-Python-%(pyver)s' homepage = 'http://simpeg.xyz' @@ -10,8 +10,8 @@ based parameter estimation in the context of geophysical applications.""" toolchain = {'name': 'intel', 'version': '2016b'} -sources = ['v%(version)s.tar.gz'] -source_urls = ['https://github.com/simpeg/simpeg/archive/'] +sources = [SOURCE_TAR_GZ] +source_urls = [PYPI_SOURCE] dependencies = [ ('Python', '2.7.12'), -- GitLab From ead467d3d75749aa17e47ae1eac677f30e1643e6 Mon Sep 17 00:00:00 2001 From: edo Date: Wed, 30 Nov 2016 18:31:02 +0100 Subject: [PATCH 725/741] adding easyconfigs: HDF5-1.8.17-foss-2016a-serial.eb --- .../h/HDF5/HDF5-1.8.17-foss-2016a-serial.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/h/HDF5/HDF5-1.8.17-foss-2016a-serial.eb diff --git a/easybuild/easyconfigs/h/HDF5/HDF5-1.8.17-foss-2016a-serial.eb b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.17-foss-2016a-serial.eb new file mode 100644 index 0000000000..1cc3adf6f7 --- /dev/null +++ b/easybuild/easyconfigs/h/HDF5/HDF5-1.8.17-foss-2016a-serial.eb @@ -0,0 +1,22 @@ +name = 'HDF5' +version = '1.8.17' +versionsuffix = '-serial' + +homepage = 'http://www.hdfgroup.org/HDF5/' +description = """HDF5 is a unique technology suite that makes possible the management of + extremely large and complex data collections.""" + +toolchain = {'name': 'foss', 'version': '2016a'} +toolchainopts = {'optarch': True, 'pic': True, 'usempi': False} + +source_urls = ['http://www.hdfgroup.org/ftp/HDF5/releases/hdf5-%(version)s/src'] +sources = [SOURCELOWER_TAR_GZ] + +patches = ['configure_libtool.patch'] + +dependencies = [ + ('zlib', '1.2.8'), + ('Szip', '2.1'), +] + +moduleclass = 'data' -- GitLab From 471e5a1676b4c4fe3c56a215cdb091fa0cb4c81c Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 1 Dec 2016 12:19:15 +0100 Subject: [PATCH 726/741] {chem}[intel/2016b] DL_POLY_Classic v1.9 w/ PLUMED 2.2.3 --- ...LY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb | 27 + .../DL_POLY_Classic-1.9-intel-2016b.eb | 16 + ...Y_Classic-1.9_fix-PLUMED-integration.patch | 1355 +++++++++++++++++ 3 files changed, 1398 insertions(+) create mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb create mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb create mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9_fix-PLUMED-integration.patch diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb new file mode 100644 index 0000000000..9541b2f02f --- /dev/null +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb @@ -0,0 +1,27 @@ +name = 'DL_POLY_Classic' +version = '1.9' + +homepage = 'http://ccpforge.cse.rl.ac.uk/gf/project/dl_poly_classic/' +description = """DL_POLY Classic is a freely available molecular dynamics program developed + from the DL_POLY_2 package. This version does not install the java gui.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] +sources = [ + 'dl_class_%(version)s.tar.gz', + # download from https://groups.google.com/group/plumed-users/attach/85c9fdc16956d/dlpoly2.tar.gz?part=0.1&authuser=0 + # see https://groups.google.com/d/msg/plumed-users/cWaIDU5F6Bw/bZUW3J9cCAAJ + 'dlpoly2.tar.gz', +] +patches = [('DL_POLY_Classic-%(version)s_fix-PLUMED-integration.patch', '..')] + +plumedversion = '2.2.3' +versionsuffix = '-PLUMED-%s' % plumedversion + +dependencies = [('PLUMED', plumedversion)] + +# parallel build tends to break +parallel = 1 + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb new file mode 100644 index 0000000000..c4fcfd2f6b --- /dev/null +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb @@ -0,0 +1,16 @@ +name = 'DL_POLY_Classic' +version = '1.9' + +homepage = 'http://ccpforge.cse.rl.ac.uk/gf/project/dl_poly_classic/' +description = """DL_POLY Classic is a freely available molecular dynamics program developed + from the DL_POLY_2 package. This version does not install the java gui.""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = ['dl_class_%(version)s.tar.gz'] +source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] + +# parallel build tends to break +parallel = 1 + +moduleclass = 'chem' diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9_fix-PLUMED-integration.patch b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9_fix-PLUMED-integration.patch new file mode 100644 index 0000000000..550a4ce5fb --- /dev/null +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9_fix-PLUMED-integration.patch @@ -0,0 +1,1355 @@ +fix patch to make DL_Poly Classic 1.9 work with PLUMED +original patch is obtained as a tarball named dlpoly2.tar.gz from +https://groups.google.com/group/plumed-users/attach/85c9fdc16956d/dlpoly2.tar.gz?part=0.1&authuser=0 +see also https://groups.google.com/d/msg/plumed-users/cWaIDU5F6Bw/bZUW3J9cCAAJ + +author: Kenneth Hoste, Ward Poelmans (HPC-UGent) +--- dlpoly-2.20.diff/srcmod/dlpoly.f.preplumed.orig 2016-11-25 16:52:49.870981815 +0100 ++++ dlpoly-2.20.diff/srcmod/dlpoly.f.preplumed 2016-11-25 16:57:11.720654972 +0100 +@@ -1,21 +1,14 @@ +- program dlpoly ++ program dlpoly_classic + + c*********************************************************************** + c +-c dl_poly is an cclrc/ccp5 program package for the dynamical +-c simulation of molecular systems. ++c dl_poly classic is an stfc/ccp5 program package for the ++c dynamical simulation of molecular systems. + c +-c dl_poly is the property of the cclrc daresbury laboratory, +-c daresbury, warrington wa4 4ad. no part of the package may +-c be redistributed to third parties without the consent of +-c daresbury laboratory. ++c dl_poly is the copyright of the stfc daresbury laboratory, ++c daresbury, warrington wa4 4ad. + c +-c dl_poly is available free of charge to academic institutions +-c engaged in non-commercial research only. potential users not +-c in this category must consult the ccp5 program librarian at +-c daresbury to negotiate terms of use. +-c +-c neither the cclrc, daresbury laboratory, ccp5 nor the authors ++c neither the stfc, daresbury laboratory, ccp5 nor the authors + c of this package claim that it is free from errors and do not + c accept liability for any loss or damage that may arise from + c its use. it is the users responsibility to verify that the +@@ -23,19 +16,13 @@ + c it. + c + c users of this package are recommended to consult the dl_poly +-c user and reference manuals for the full terms and conditions +-c of its use. ++c user manual for the full description of its use and purpose. + c + c authors: w.smith and t.r.forester 1995 + c copyright daresbury laboratory 1995 + c +-c release 2.20 +-c +-c wl +-c 2009/01/15 11:55:48 +-c 1.20 +-c Exp +-c ++c DL_POLY CLASSIC VERSION 1.9 ++c + c*********************************************************************** + + c declare required modules +@@ -57,6 +44,7 @@ + use integrator_module + use inversion_module + use metal_module ++ use metafreeze_module + use nlist_builders_module + use pair_module + use pmf_module +@@ -76,11 +64,14 @@ + + implicit none + ++ character*1 hms,dec ++ character*8 seek ++ + logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle + logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb + logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd + logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch +- logical lghost,llswitch ++ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect + + integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn + integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt +@@ -91,7 +82,7 @@ + integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k + integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit + integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode +- integer natms2,ntghost,nsolva,isolva ++ integer natms2,ntghost,nsolva,isolva,nofic + + real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup + real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd +@@ -100,53 +91,44 @@ + real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter + real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom + real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf +- real(8) consv,engke,engrot,sigma,virtot,engcfg ++ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim + real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen + real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol + real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit +- real(8) ebias,vmin,boost,heinc,tboost,hyp_units,estar +- ++ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl ++ real(8) engord,virord + real(8), allocatable :: tbuffer(:) + + data timelp/0.d0/,lminnow/.false./,ntrack/10/ +- data npage,lines/8,0/,recycle/.true./,boost/1.d0/ ++ data npage,lines/8,0/,recycle/.true./ + data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ + data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ + data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ +-CVAM +-CVAM include 'VT.inc' +-CVAM + + c set up the communications + + call initcomms() + call gsync() + +-c set up VAMPIR +- +-CVAM call VTSETUP() +-CVAM call VTTRACEON(ierr) +-CVAM call VTBEGIN(99, ierr) +- + c determine processor identities + + call machine(idnode,mxnode) +- +-c open main printing file +- +- if(idnode.eq.0)open(nrite,file='OUTPUT') +- if(idnode.eq.0) write (nrite, +- x "(/,20x,'DL_POLY Version 2.20', +- x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode +- ++ + c activate for limited-life executable + + CBOMB call bomb(idnode,2008,6,30) + + allocate (tbuffer(10),stat=memr) + +- call parset(idnode,mxnode,tbuffer) ++ call parset(redirect,idnode,mxnode,tbuffer) ++ ++c open main printing file + ++ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') ++ if(idnode.eq.0) write (nrite, ++ x "(/,20x,'DL_POLY Classic 1.9', ++ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode ++ + c allocate arrays for each function + + call alloc_ang_arrays(idnode) +@@ -184,24 +166,24 @@ + c input the control parameters defining the simulation + + call simdef +- x (lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal,lzeql, +- x lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall,lsolva, +- x lfree,lfrmas,lexcite,lswitch,lghost,idnode,minstp,intsta,istraj, +- x keybpd,keyens,keyfce,keyres,keyver,keytrj,kmax1,kmax2,kmax3, +- x multt,nstack,nstbgr,nsbzdn,nstbpo,nhko,nlatt,nstbts,nsteql, +- x nstraj,nstrun,nospl,keytol,numgau,khit,nhit,nblock,ntrack, +- x blkout,numneb,mode,nsolva,isolva,alpha,delr,epsq,fmax,press, +- x quattol,rcut,rprim,rvdw,taup,taut,temp,timcls,timjob,tolnce, +- x tstep,rlxtol,opttol,zlen,ehit,xhit,yhit,zhit,ebias,vmin,heinc, +- x catchrad,sprneb,deltad,tlow,hyp_units) ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) + + c input the system force field + + call sysdef + x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, + x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, +- x ntpter,nshels,keyshl,ntghost,dlrpot,engunit,rvdw,rcuttb,rctter, +- x rcutfb) ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) + + if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) + +@@ -237,11 +219,23 @@ + c read thermodynamic and structural data from restart file + + call sysinit +- x (lgofr,lzden,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, + x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, + x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, +- x rvdw,volm,virtot,vircom,tboost) ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) + ++c metadynamics by d. quigley ++ ++ if(lmetadyn) then ++ ++c make copy of excluded atom list for use by metadynamics ++ call exclude_copy_mtd(idnode) ++ ++c initialise metadynamics, read order parameter definitions etc. ++ call define_metadynamics(idnode,mxnode,natms,ntpatm,temp) ++ ++ end if ++ + c synchronise LRC, SIC and system charge terms for switching + + llswitch=.false. +@@ -283,6 +277,19 @@ + + sigma=temp*boltz*degfre*0.5d0 + ++c metadynamics by d. quigley ++ ++ sigma_shl=boltz*degshl*0.5d0 ++ ++c convert BPD parameters to internal units ++ ++ if(lbpd)then ++ ++ ebias=0.5d0*boltz*degfre*ebias ++ vmin=0.5d0*boltz*degfre*vmin ++ ++ endif ++ + c time check + + call timchk(1,tzero) +@@ -309,7 +316,7 @@ + x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, + x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, + x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, +- x virtot,sigma,tolnce,engunit) ++ x virtot,sigma,tolnce,engunit,engord,virord) + + c calculate initial conditions for velocity verlet + +@@ -340,12 +347,11 @@ + x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, + x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, + x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, +- x virtbp,virter,virtet,volm,engmet,virtot) ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) + + c bias potential dynamics option - reset forces + +- if(lbpd)call bpd_forces +- x (natms,vmin,ebias,temp,engcfg,boost) ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) + + endif + +@@ -354,14 +360,14 @@ + c construct the first reference state + + call hyper_start +- x (lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, + x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, + x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, + x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, +- x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,alpha, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, + x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, + x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, +- x tboost,hyp_units) ++ x hyp_units) + + endif + +@@ -430,7 +436,7 @@ + vxo_fre(:)=vxx(:) + vyo_fre(:)=vyy(:) + vzo_fre(:)=vzz(:) +- ++ + endif + + endif +@@ -524,10 +530,11 @@ + if(llswitch)call copy_force(idnode,mxnode) + + call vv_integrate +- x (lcnb,lshmov,isw,idnode,mxnode,imcon,natms2,ngrp,keyens, +- x nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,tstep,engke, +- x engrot,tolnce,vircon,vircom,virtot,temp,press,volm,sigma, +- x taut,taup,chit,chip,consv,conint,elrc,virlrc,virpmf) ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) + + if(lghost)call update_ghost(idnode,mxnode) + +@@ -560,10 +567,10 @@ + x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, + x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, + x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, +- x virtot,sigma,tolnce,engunit) ++ x virtot,sigma,tolnce,engunit,engord,virord) + + elseif(loptim.or.keyshl.ne.2)then +- ++ + call molecular_dynamics + x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, + x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, +@@ -577,7 +584,7 @@ + x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, + x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, + x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, +- x virtbp,virter,virtet,volm,engmet,virtot) ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) + + else + +@@ -593,14 +600,13 @@ + x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, + x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, + x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, +- x pass1,pass2) ++ x pass1,pass2,engord,virord) + + endif + + c bias potential dynamics option - reset forces + +- if(lbpd)call bpd_forces +- x (natms,vmin,ebias,temp,engcfg,boost) ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) + + c switching option for excitation simulation + +@@ -613,11 +619,11 @@ + c integrate equations of motion by leapfrog verlet + + if(.not.(loptim.or.lminnow))call lf_integrate +- x (lcnb,lshmov,idnode,mxnode,imcon,natms2,ngrp,keyens, +- x nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,tstep,engke, +- x engrot,tolnce,quattol,vircon,vircom,virtot,temp,press, +- x volm,sigma,taut,taup,chit,chip,consv,conint,elrc, +- x virlrc,virpmf) ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) + + else if(keyver.gt.0)then + +@@ -625,11 +631,11 @@ + + isw=2 + if(.not.loptim)call vv_integrate +- x (lcnb,lshmov,isw,idnode,mxnode,imcon,natms2,ngrp,keyens, +- x nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,tstep,engke, +- x engrot,tolnce,vircon,vircom,virtot,temp,press, +- x volm,sigma,taut,taup,chit,chip,consv,conint,elrc, +- x virlrc,virpmf) ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) + + endif + +@@ -651,23 +657,36 @@ + + engtke=engke+engrot + call hyper_driver +- x (ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql,newlst, +- x prechk,tadall,nblock,ntrack,idnode,imcon,keyfce,keyfld, +- x keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp, +- x ntcons,nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep, +- x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, +- x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, + x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, + x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, + x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, +- x tolnce,tboost,hyp_units) ++ x tolnce,hyp_units,ebias,vmin) ++ ++ endif ++ ++c reset average boost factor in BPD during equilibration ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numbpd=0 ++ tboost=0.d0 + + endif + ++ endif ++ + c calculate shell kinetic energy + + if(keyshl.eq.1)then +- ++ + call corshl(idnode,mxnode,ntshl,shlke) + + endif +@@ -686,6 +705,7 @@ + x mod(nstep-nsteql,nstbts).eq.0)then + + chit=0.d0 ++ chit_shl=0.d0 + chip=0.d0 + do i=1,9 + eta(i)=0.d0 +@@ -722,13 +742,13 @@ + + if(nstep.gt.0)call static + x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, +- x nstep,nsteql,ntpatm,numacc,mxnode,nblock,consv,degfre, +- x degrot,engang,engbnd,engcpe,engdih,enginv,engke,engrot, +- x engsrp,engunit,engcfg,stpeng,stpeth,stpprs,stptmp,stpvir, +- x stpvol,tstep,virbnd,engfbp,vircom,vircon,vircpe,virsrp, +- x engfld,virfld,engtbp,virtbp,virpmf,virshl,engshl,engtet, +- x virtet,degshl,shlke,virang,width,engmet,virmet,engter, +- x virter,boost,tboost,ebias,heinc) ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) + + c z density calculation + +@@ -746,41 +766,39 @@ + call revive + x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, + x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, +- x tboost) ++ x tboost,chit_shl) + call error(idnode,95) + + endif + + c line-printer output every nstbpo steps + +-CVAM +-CVAM call VTBEGIN(68, ierr) +-CVAM +- + if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then +- ++ + call timchk(0,timelp) + if(idnode.eq.0)then + ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) + if(mod(lines,npage).eq.0) + x write(nrite,"(1x,120('-'), + x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, + x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', + x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, +- x 'time(ps)',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', ++ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', + x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', +- x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu (s)',6x, ++ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, + x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', + x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', + x 7x,'press',/,/, +- x 1x,120('-'))") +- write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f8.1,1p,9e12.4, +- x /,1x,0p,f8.1,1p,9e12.4)") ++ x 1x,120('-'))") ++ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)") + x nstep,(stpval(i),i=1,9), +- x dble(nstep)*tstep,(stpval(i),i=10,18), +- x timelp,(stpval(i),i=19,27) ++ x simtim,dec,(stpval(i),i=10,18), ++ x prntim,hms,(stpval(i),i=19,27) + write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', +- x 1p,9e12.4,/,9x,9e12.4)") (ravval(i),i=1,27) ++ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) + write(nrite,"(1x,120('-'))") + + endif +@@ -788,9 +806,7 @@ + lines=lines+1 + + endif +-CVAM +-CVAM call VTEND(68, ierr) +-CVAM ++ + c report end of equilibration period + + if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then +@@ -850,9 +866,10 @@ + call revive + x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, + x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, +- x tboost) ++ x tboost,chit_shl) + +- if(ltad.or.lbpd)call hyper_close(idnode,mxnode,natms,nsteql) ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) + + endif + +@@ -870,11 +887,11 @@ + c last time check + + call timchk(0,timelp) +- ++ call get_prntime(hms,timjob,prntim) + if(idnode.eq.0)write(nrite, +- x "(/,/,1x,'run terminating. elapsed cpu time = ',f13.3, +- x ', job time = ',f13.3,', close time = ',f13.3,/)") +- x timelp,timjob,timcls ++ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, ++ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") ++ x timelp,prntim,hms,timcls + + c shell relaxation convergence statistics + +@@ -891,13 +908,15 @@ + levcfg=2 + if(loptim)levcfg=0 + if(.not.lneb)call result +- x (lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, +- x levcfg,nzden,nstep,ntpatm,numacc,numrdf,chip,chit,conint, +- x rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost) ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, ++ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, ++ x chit_shl) + + c write hyperdynamics restart file + +- if(ltad.or.lbpd)call hyper_close(idnode,mxnode,natms,nsteql) ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) + + c close output channels + +@@ -911,9 +930,7 @@ + endif + + c terminate job +-CVAM +-CVAM call VTEND(99, ierr) +-CVAM ++ + call exitcomms() + + end +--- dlpoly-2.20.diff/srcmod/dlpoly.f.orig 2015-09-15 11:23:19.383901148 +0200 ++++ dlpoly-2.20.diff/srcmod/dlpoly.f 2016-11-25 18:01:54.766283535 +0100 +@@ -1,21 +1,14 @@ +- program dlpoly ++ program dlpoly_classic + + c*********************************************************************** + c +-c dl_poly is an cclrc/ccp5 program package for the dynamical +-c simulation of molecular systems. ++c dl_poly classic is an stfc/ccp5 program package for the ++c dynamical simulation of molecular systems. + c +-c dl_poly is the property of the cclrc daresbury laboratory, +-c daresbury, warrington wa4 4ad. no part of the package may +-c be redistributed to third parties without the consent of +-c daresbury laboratory. ++c dl_poly is the copyright of the stfc daresbury laboratory, ++c daresbury, warrington wa4 4ad. + c +-c dl_poly is available free of charge to academic institutions +-c engaged in non-commercial research only. potential users not +-c in this category must consult the ccp5 program librarian at +-c daresbury to negotiate terms of use. +-c +-c neither the cclrc, daresbury laboratory, ccp5 nor the authors ++c neither the stfc, daresbury laboratory, ccp5 nor the authors + c of this package claim that it is free from errors and do not + c accept liability for any loss or damage that may arise from + c its use. it is the users responsibility to verify that the +@@ -23,19 +16,13 @@ + c it. + c + c users of this package are recommended to consult the dl_poly +-c user and reference manuals for the full terms and conditions +-c of its use. ++c user manual for the full description of its use and purpose. + c + c authors: w.smith and t.r.forester 1995 + c copyright daresbury laboratory 1995 + c +-c release 2.20 +-c +-c wl +-c 2009/01/15 11:55:48 +-c 1.20 +-c Exp +-c ++c DL_POLY CLASSIC VERSION 1.9 ++c + c*********************************************************************** + + c declare required modules +@@ -57,6 +44,7 @@ + use integrator_module + use inversion_module + use metal_module ++ use metafreeze_module + use nlist_builders_module + use pair_module + use pmf_module +@@ -76,11 +64,14 @@ + + implicit none + ++ character*1 hms,dec ++ character*8 seek ++ + logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle + logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb + logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd + logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch +- logical lghost,llswitch ++ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect + + integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn + integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt +@@ -91,7 +82,7 @@ + integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k + integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit + integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode +- integer natms2,ntghost,nsolva,isolva ++ integer natms2,ntghost,nsolva,isolva,nofic + + real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup + real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd +@@ -100,58 +91,50 @@ + real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter + real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom + real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf +- real(8) consv,engke,engrot,sigma,virtot,engcfg ++ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim + real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen + real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol + real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit +- real(8) ebias,vmin,boost,heinc,tboost,hyp_units,estar ++ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl ++ real(8) engord,virord + c PLUMED modifications + real(8) energyUnits,lengthUnits,timeUnits + integer(8) get_comms + c PLUMED modifications +- ++ + real(8), allocatable :: tbuffer(:) + integer :: plumedavaiable + + data timelp/0.d0/,lminnow/.false./,ntrack/10/ +- data npage,lines/8,0/,recycle/.true./,boost/1.d0/ ++ data npage,lines/8,0/,recycle/.true./ + data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ + data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ + data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ +-CVAM +-CVAM include 'VT.inc' +-CVAM + + c set up the communications + + call initcomms() + call gsync() + +-c set up VAMPIR +- +-CVAM call VTSETUP() +-CVAM call VTTRACEON(ierr) +-CVAM call VTBEGIN(99, ierr) +- + c determine processor identities + + call machine(idnode,mxnode) +- +-c open main printing file +- +- if(idnode.eq.0)open(nrite,file='OUTPUT') +- if(idnode.eq.0) write (nrite, +- x "(/,20x,'DL_POLY Version 2.20', +- x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode +- ++ + c activate for limited-life executable + + CBOMB call bomb(idnode,2008,6,30) + + allocate (tbuffer(10),stat=memr) + +- call parset(idnode,mxnode,tbuffer) ++ call parset(redirect,idnode,mxnode,tbuffer) ++ ++c open main printing file + ++ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') ++ if(idnode.eq.0) write (nrite, ++ x "(/,20x,'DL_POLY Classic 1.9', ++ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode ++ + c allocate arrays for each function + + call alloc_ang_arrays(idnode) +@@ -189,24 +172,24 @@ + c input the control parameters defining the simulation + + call simdef +- x (lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal,lzeql, +- x lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall,lsolva, +- x lfree,lfrmas,lexcite,lswitch,lghost,idnode,minstp,intsta,istraj, +- x keybpd,keyens,keyfce,keyres,keyver,keytrj,kmax1,kmax2,kmax3, +- x multt,nstack,nstbgr,nsbzdn,nstbpo,nhko,nlatt,nstbts,nsteql, +- x nstraj,nstrun,nospl,keytol,numgau,khit,nhit,nblock,ntrack, +- x blkout,numneb,mode,nsolva,isolva,alpha,delr,epsq,fmax,press, +- x quattol,rcut,rprim,rvdw,taup,taut,temp,timcls,timjob,tolnce, +- x tstep,rlxtol,opttol,zlen,ehit,xhit,yhit,zhit,ebias,vmin,heinc, +- x catchrad,sprneb,deltad,tlow,hyp_units) ++ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, ++ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, ++ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, ++ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, ++ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, ++ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, ++ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, ++ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, ++ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, ++ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) + + c input the system force field + + call sysdef + x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, + x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, +- x ntpter,nshels,keyshl,ntghost,dlrpot,engunit,rvdw,rcuttb,rctter, +- x rcutfb) ++ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, ++ x rctter,rcutfb) + + if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) + +@@ -242,11 +225,23 @@ + c read thermodynamic and structural data from restart file + + call sysinit +- x (lgofr,lzden,lsolva,lfree,lghost,idnode,imcon,keyfce, ++ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, + x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, + x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, +- x rvdw,volm,virtot,vircom,tboost) ++ x rvdw,volm,virtot,vircom,tboost,chit_shl) + ++c metadynamics by d. quigley ++ ++ if(lmetadyn) then ++ ++c make copy of excluded atom list for use by metadynamics ++ call exclude_copy_mtd(idnode) ++ ++c initialise metadynamics, read order parameter definitions etc. ++ call define_metadynamics(idnode,mxnode,natms,ntpatm,temp) ++ ++ end if ++ + c synchronise LRC, SIC and system charge terms for switching + + llswitch=.false. +@@ -317,6 +312,19 @@ + + sigma=temp*boltz*degfre*0.5d0 + ++c metadynamics by d. quigley ++ ++ sigma_shl=boltz*degshl*0.5d0 ++ ++c convert BPD parameters to internal units ++ ++ if(lbpd)then ++ ++ ebias=0.5d0*boltz*degfre*ebias ++ vmin=0.5d0*boltz*degfre*vmin ++ ++ endif ++ + c time check + + call timchk(1,tzero) +@@ -343,7 +351,7 @@ + x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, + x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, + x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, +- x virtot,sigma,tolnce,engunit) ++ x virtot,sigma,tolnce,engunit,engord,virord) + + c calculate initial conditions for velocity verlet + +@@ -374,12 +382,11 @@ + x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, + x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, + x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, +- x virtbp,virter,virtet,volm,engmet,virtot) ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) + + c bias potential dynamics option - reset forces + +- if(lbpd)call bpd_forces +- x (natms,vmin,ebias,temp,engcfg,boost) ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) + + endif + +@@ -388,14 +395,14 @@ + c construct the first reference state + + call hyper_start +- x (lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, ++ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, + x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, + x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, + x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, +- x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,alpha, ++ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, + x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, + x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, +- x tboost,hyp_units) ++ x hyp_units) + + endif + +@@ -464,7 +471,7 @@ + vxo_fre(:)=vxx(:) + vyo_fre(:)=vyy(:) + vzo_fre(:)=vzz(:) +- ++ + endif + + endif +@@ -558,10 +565,11 @@ + if(llswitch)call copy_force(idnode,mxnode) + + call vv_integrate +- x (lcnb,lshmov,isw,idnode,mxnode,imcon,natms2,ngrp,keyens, +- x nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,tstep,engke, +- x engrot,tolnce,vircon,vircom,virtot,temp,press,volm,sigma, +- x taut,taup,chit,chip,consv,conint,elrc,virlrc,virpmf) ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) + + if(lghost)call update_ghost(idnode,mxnode) + +@@ -594,10 +602,10 @@ + x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, + x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, + x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, +- x virtot,sigma,tolnce,engunit) ++ x virtot,sigma,tolnce,engunit,engord,virord) + + elseif(loptim.or.keyshl.ne.2)then +- ++ + call molecular_dynamics + x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, + x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, +@@ -611,7 +619,7 @@ + x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, + x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, + x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, +- x virtbp,virter,virtet,volm,engmet,virtot) ++ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) + + else + +@@ -627,14 +635,13 @@ + x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, + x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, + x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, +- x pass1,pass2) ++ x pass1,pass2,engord,virord) + + endif + + c bias potential dynamics option - reset forces + +- if(lbpd)call bpd_forces +- x (natms,vmin,ebias,temp,engcfg,boost) ++ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) + + c switching option for excitation simulation + +@@ -647,11 +654,11 @@ + c integrate equations of motion by leapfrog verlet + + if(.not.(loptim.or.lminnow))call lf_integrate +- x (lcnb,lshmov,idnode,mxnode,imcon,natms2,ngrp,keyens, +- x nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,tstep,engke, +- x engrot,tolnce,quattol,vircon,vircom,virtot,temp,press, +- x volm,sigma,taut,taup,chit,chip,consv,conint,elrc, +- x virlrc,virpmf) ++ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, ++ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, ++ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, ++ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, ++ x elrc,virlrc,virpmf) + + else if(keyver.gt.0)then + +@@ -659,11 +666,11 @@ + + isw=2 + if(.not.loptim)call vv_integrate +- x (lcnb,lshmov,isw,idnode,mxnode,imcon,natms2,ngrp,keyens, +- x nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,tstep,engke, +- x engrot,tolnce,vircon,vircom,virtot,temp,press, +- x volm,sigma,taut,taup,chit,chip,consv,conint,elrc, +- x virlrc,virpmf) ++ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, ++ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, ++ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, ++ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, ++ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) + + endif + +@@ -685,23 +692,36 @@ + + engtke=engke+engrot + call hyper_driver +- x (ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql,newlst, +- x prechk,tadall,nblock,ntrack,idnode,imcon,keyfce,keyfld, +- x keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp, +- x ntcons,nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep, +- x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, +- x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, ++ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, ++ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, ++ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, ++ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, ++ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, ++ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, + x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, + x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, + x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, +- x tolnce,tboost,hyp_units) ++ x tolnce,hyp_units,ebias,vmin) + + endif + ++c reset average boost factor in BPD during equilibration ++ ++ if(lbpd.and.keybpd.eq.1)then ++ ++ if(lzeql.and.nstep.le.nsteql)then ++ ++ numbpd=0 ++ tboost=0.d0 ++ ++ endif ++ ++ endif ++ + c calculate shell kinetic energy + + if(keyshl.eq.1)then +- ++ + call corshl(idnode,mxnode,ntshl,shlke) + + endif +@@ -720,6 +740,7 @@ + x mod(nstep-nsteql,nstbts).eq.0)then + + chit=0.d0 ++ chit_shl=0.d0 + chip=0.d0 + do i=1,9 + eta(i)=0.d0 +@@ -756,13 +777,13 @@ + + if(nstep.gt.0)call static + x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, +- x nstep,nsteql,ntpatm,numacc,mxnode,nblock,consv,degfre, +- x degrot,engang,engbnd,engcpe,engdih,enginv,engke,engrot, +- x engsrp,engunit,engcfg,stpeng,stpeth,stpprs,stptmp,stpvir, +- x stpvol,tstep,virbnd,engfbp,vircom,vircon,vircpe,virsrp, +- x engfld,virfld,engtbp,virtbp,virpmf,virshl,engshl,engtet, +- x virtet,degshl,shlke,virang,width,engmet,virmet,engter, +- x virter,boost,tboost,ebias,heinc) ++ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, ++ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, ++ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, ++ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, ++ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, ++ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, ++ x virmet,engter,virter,boost,tboost) + + c z density calculation + +@@ -780,41 +801,39 @@ + call revive + x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, + x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, +- x tboost) ++ x tboost,chit_shl) + call error(idnode,95) + + endif + + c line-printer output every nstbpo steps + +-CVAM +-CVAM call VTBEGIN(68, ierr) +-CVAM +- + if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then +- ++ + call timchk(0,timelp) + if(idnode.eq.0)then + ++ call get_prntime(hms,timelp,prntim) ++ call get_simtime(dec,nstep,tstep,simtim) + if(mod(lines,npage).eq.0) + x write(nrite,"(1x,120('-'), + x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, + x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', + x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, +- x 'time(ps)',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', ++ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', + x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', +- x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu (s)',6x, ++ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, + x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', + x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', + x 7x,'press',/,/, +- x 1x,120('-'))") +- write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f8.1,1p,9e12.4, +- x /,1x,0p,f8.1,1p,9e12.4)") ++ x 1x,120('-'))") ++ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, ++ x /,1x,0p,f7.3,a1,1p,9e12.4)") + x nstep,(stpval(i),i=1,9), +- x dble(nstep)*tstep,(stpval(i),i=10,18), +- x timelp,(stpval(i),i=19,27) ++ x simtim,dec,(stpval(i),i=10,18), ++ x prntim,hms,(stpval(i),i=19,27) + write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', +- x 1p,9e12.4,/,9x,9e12.4)") (ravval(i),i=1,27) ++ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) + write(nrite,"(1x,120('-'))") + + endif +@@ -822,9 +841,7 @@ + lines=lines+1 + + endif +-CVAM +-CVAM call VTEND(68, ierr) +-CVAM ++ + c report end of equilibration period + + if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then +@@ -884,9 +901,10 @@ + call revive + x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, + x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, +- x tboost) ++ x tboost,chit_shl) + +- if(ltad.or.lbpd)call hyper_close(idnode,mxnode,natms,nsteql) ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) + + endif + +@@ -904,11 +922,11 @@ + c last time check + + call timchk(0,timelp) +- ++ call get_prntime(hms,timjob,prntim) + if(idnode.eq.0)write(nrite, +- x "(/,/,1x,'run terminating. elapsed cpu time = ',f13.3, +- x ', job time = ',f13.3,', close time = ',f13.3,/)") +- x timelp,timjob,timcls ++ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, ++ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") ++ x timelp,prntim,hms,timcls + + c shell relaxation convergence statistics + +@@ -925,13 +943,15 @@ + levcfg=2 + if(loptim)levcfg=0 + if(.not.lneb)call result +- x (lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, +- x levcfg,nzden,nstep,ntpatm,numacc,numrdf,chip,chit,conint, +- x rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost) ++ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, ++ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, ++ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, ++ x chit_shl) + + c write hyperdynamics restart file + +- if(ltad.or.lbpd)call hyper_close(idnode,mxnode,natms,nsteql) ++ if(ltad.or.lbpd) ++ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) + + c close output channels + +@@ -945,10 +965,7 @@ + endif + + c terminate job +-CVAM +-CVAM call VTEND(99, ierr) +-CVAM +- ++ + c PLUMED + if(lplumed) call plumed_f_gcmd() + c PLUMED +--- dlpoly-2.20.diff/srcmod/basic_comms.f.preplumed.orig 2016-12-01 11:17:21.148368366 +0100 ++++ dlpoly-2.20.diff/srcmod/basic_comms.f.preplumed 2016-12-01 11:17:28.908143066 +0100 +@@ -4,14 +4,10 @@ + c + c communication harness initialisation + c ++c copyright - daresbury laboratory + c MPI version - t.forester may 1995 + c CPP version - w.smith may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c********************************************************************* + + implicit none +@@ -27,6 +23,8 @@ + return + end + ++ subroutine machine(idnode,mxnode) ++ + c********************************************************************* + c + c dl_poly subroutine for obtaining charcteristics of +@@ -37,9 +35,6 @@ + c + c MPI version - t.forester may 1995 + c +-c wl +-c 1.4 +-c Exp + c********************************************************************* + + implicit none +@@ -58,13 +53,9 @@ + c + c routine to determine identity of processing node + c ++c copyright - daresbury laboratory + c MPI version - t.forester may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c********************************************************************* + + implicit none +@@ -86,13 +77,9 @@ + c + c calculate dimension of hypercube + c ++c copyright - daresbury laboratory + c MPI version - t.forester may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c********************************************************************* + + implicit none +@@ -122,13 +109,9 @@ + c + c calculate number of nodes + c ++c copyright - daresbury laboratory + c MPI version - t.forester may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c********************************************************************* + + implicit none +@@ -150,14 +133,10 @@ + c + c Intel-like csend (double precision) + c ++c copyright - daresbury laboratory + c MPI version - t.forester may 1995 + c CPP version - w.smith may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c********************************************************************* + + implicit none +@@ -183,14 +162,10 @@ + c + c Intel-like crecv (double precision) + c ++c copyright - daresbury laboratory + c MPI version - t.forester may 1995 + c CPP version - w.smith may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c********************************************************************* + + implicit none +@@ -223,11 +198,6 @@ + c MPI version - t.forester may 1995 + c CPP version - w.smith may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c*********************************************************************** + + use setup_module +@@ -265,11 +235,6 @@ + c MPI version - t.forester may 1995 + c CPP version - w.smith may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c*********************************************************************** + + implicit none +@@ -305,11 +270,6 @@ + c MPI version - t.forester may 1995 + c CPP version - w.smith may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c*********************************************************************** + + use setup_module +@@ -344,9 +304,6 @@ + c author - w. smith march 1992 + c MPI version - t. forester may 1995 + c +-c wl +-c 1.4 +-c Exp + c*********************************************************************** + + +@@ -371,14 +328,10 @@ + c + c barrier / synchronization routine + c ++c copyright - daresbury laboratory + c MPI version - t.forester may 1995 + c CPP version - w.smith + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c********************************************************************* + + implicit none +@@ -400,14 +353,10 @@ + c + c exitcomms: exit from communication harness + c ++c copyright - daresbury laboratory + c MPI version - t.forester may 1995 + c CPP version - w.smith may 1995 + c +-c wl +-c 2008/01/14 13:33:07 +-c 1.4 +-c Exp +-c + c********************************************************************* + + implicit none -- GitLab From d0164f6a03d416833fb819cca0c4cd901e077b87 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 1 Dec 2016 12:42:25 +0100 Subject: [PATCH 727/741] clean up DL_POLY Classic easyconfigs with PLUMED to use enhanced easyblock in https://github.com/hpcugent/easybuild-easyblocks/pull/829 --- ...OLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb | 26 +- ...OLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb | 25 +- .../d/DL_POLY_Classic/PLUMED-2.1.4.patch | 95318 ---------------- .../d/DL_POLY_Classic/PLUMED-2.2.0.patch | 93945 --------------- 4 files changed, 14 insertions(+), 189300 deletions(-) delete mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.1.4.patch delete mode 100644 easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb index 4f3144bb99..957737f32e 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb @@ -1,5 +1,3 @@ -easyblock = 'MakeCp' - name = 'DL_POLY_Classic' version = '1.9' @@ -8,31 +6,21 @@ description = """DL_POLY Classic is a freely available molecular dynamics progra from the DL_POLY_2 package. This version does not install the java gui.""" toolchain = {'name': 'foss', 'version': '2015b'} -toolchainopts = {'usempi': True} -sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] +sources = [ + 'dl_class_%(version)s.tar.gz', + # download from https://groups.google.com/group/plumed-users/attach/85c9fdc16956d/dlpoly2.tar.gz?part=0.1&authuser=0 + # see https://groups.google.com/d/msg/plumed-users/cWaIDU5F6Bw/bZUW3J9cCAAJ + 'dlpoly2.tar.gz', +] +patches = [('DL_POLY_Classic-%(version)s_fix-PLUMED-integration.patch', '..')] plumedversion = '2.1.4' versionsuffix = '-PLUMED-%s' % plumedversion dependencies = [('PLUMED', plumedversion)] -# this patch needs to be regenerated for another version of PLUMED -patches = [('PLUMED-%s.patch' % plumedversion, 1)] - -prebuildopts = 'cd srcmod && ' -buildopts = 'gfortran' - -files_to_copy = [(["execute/cleanup", "execute/copy", "execute/DLPOLY.X", - "execute/gopoly", "execute/gui", "execute/select", - "execute/store", "execute/supa"], 'bin')] - -sanity_check_paths = { - 'files': ['bin/DLPOLY.X'], - 'dirs': [] -} - # parallel build tends to break parallel = 1 diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb index e386c9a274..6ccf002e66 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb @@ -1,5 +1,3 @@ -easyblock = 'MakeCp' - name = 'DL_POLY_Classic' version = '1.9' @@ -9,29 +7,20 @@ description = """DL_POLY Classic is a freely available molecular dynamics progra toolchain = {'name': 'foss', 'version': '2015b'} -sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] +sources = [ + 'dl_class_%(version)s.tar.gz', + # download from https://groups.google.com/group/plumed-users/attach/85c9fdc16956d/dlpoly2.tar.gz?part=0.1&authuser=0 + # see https://groups.google.com/d/msg/plumed-users/cWaIDU5F6Bw/bZUW3J9cCAAJ + 'dlpoly2.tar.gz', +] +patches = [('DL_POLY_Classic-%(version)s_fix-PLUMED-integration.patch', '..')] plumedversion = '2.2.0' versionsuffix = '-PLUMED-%s' % plumedversion dependencies = [('PLUMED', plumedversion)] -# this patch needs to be regenerated for another version of PLUMED -patches = [('PLUMED-%s.patch' % plumedversion, 1)] - -prebuildopts = 'cd srcmod && ' -buildopts = 'gfortran' - -files_to_copy = [(["execute/cleanup", "execute/copy", "execute/DLPOLY.X", - "execute/gopoly", "execute/gui", "execute/select", - "execute/store", "execute/supa"], 'bin')] - -sanity_check_paths = { - 'files': ['bin/DLPOLY.X'], - 'dirs': [] -} - # parallel build tends to break parallel = 1 diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.1.4.patch b/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.1.4.patch deleted file mode 100644 index 5f59693c28..0000000000 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.1.4.patch +++ /dev/null @@ -1,95318 +0,0 @@ -# This patch allows to use Plumed 2.1.4 with DL_POLY. It is autogenerated with the help -# of Plumed and https://groups.google.com/forum/#!topic/plumed-users/cWaIDU5F6Bw -# Follow the instructions on that forum and you can generate the patch below -# The makefile is also adjust to use the EB set values for building -# Ward Poelmans - -diff -urN dl_class_1.9.orig/build/MakePAR dl_class_1.9/build/MakePAR ---- dl_class_1.9.orig/build/MakePAR 2011-02-22 12:46:11.000000000 +0100 -+++ dl_class_1.9/build/MakePAR 2015-11-16 17:17:11.322040795 +0100 -@@ -6,10 +6,10 @@ - #======================================================================= - - BINROOT = ../execute --CC = gcc -+CC := $(MPICC) - EX = DLPOLY.X - EXE = $(BINROOT)/$(EX) --FC=undefined -+FC := $(MPIF90) - SHELL=/bin/sh - TYPE=par - -@@ -54,9 +54,9 @@ - - #================== GNU Fortran, MPI version ============================== - gfortran: -- $(MAKE) FC="mpif90" LD="mpif90 -o" \ -- LDFLAGS="-O2 -ffast-math" \ -- FFLAGS="-c -O2 -ffast-math" \ -+ $(MAKE) FC="$(MPIF90)" LD="$(MPIF90) -o" \ -+ LDFLAGS="$(LDFLAGS)" \ -+ FFLAGS="-c $(FFLAGS)" \ - EX=$(EX) BINROOT=$(BINROOT) $(TYPE) - - #================= Woodcrest ========================================= -diff -urN dl_class_1.9.orig/Plumed.cmake dl_class_1.9/Plumed.cmake ---- dl_class_1.9.orig/Plumed.cmake 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/Plumed.cmake 2015-11-16 17:23:39.940977000 +0100 -@@ -0,0 +1,3 @@ -+# PLUMED: runtime installation -+set(PLUMED_LOAD -L$ENV{EBROOTPLUMED}/lib -lplumed -ldl ) -+set(PLUMED_DEPENDENCIES) -diff -urN dl_class_1.9.orig/Plumed.h dl_class_1.9/Plumed.h ---- dl_class_1.9.orig/Plumed.h 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/Plumed.h 2015-10-13 11:08:41.000000000 +0200 -@@ -0,0 +1,494 @@ -+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -+ Copyright (c) 2011-2014 The plumed team -+ (see the PEOPLE file at the root of the distribution for a list of names) -+ -+ See http://www.plumed-code.org for more information. -+ -+ This file is part of plumed, version 2. -+ -+ plumed is free software: you can redistribute it and/or modify -+ it under the terms of the GNU Lesser General Public License as published by -+ the Free Software Foundation, either version 3 of the License, or -+ (at your option) any later version. -+ -+ plumed is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with plumed. If not, see . -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -+#ifndef __PLUMED_wrapper_Plumed_h -+#define __PLUMED_wrapper_Plumed_h -+ -+/** -+\page ReferencePlumedH Reference for interfacing MD codes with PLUMED -+ -+ Plumed.h and Plumed.c contain the external plumed interface, which is used to -+ integrate it with MD engines. This interface is very general, and is expected -+ not to change across plumed versions. Plumed.c also implements a dummy version -+ of the interface, so as to allow a code to be fully linked even if the plumed -+ library is not available yet. These files could be directly included in the official -+ host MD distribution. In this manner, it will be sufficient to link the plumed -+ library at link time (on all systems) or directly at runtime (on system where -+ dynamic loading is enabled) to include plumed features. -+ -+ Why is Plumed.c written in C and not C++? The reason is that the resulting Plumed.o -+ needs to be linked with the host MD code immediately (whereas the rest of plumed -+ could be linked a posteriori). Imagine the MD code is written in FORTRAN: when we -+ link the Plumed.o file we would like not to need any C++ library linked. In this -+ manner, we do not need to know which C++ compiler will be used to compile plumed. -+ The C++ library is only linked to the "rest" of plumed, which actually use it. -+ Anyway, Plumed.c is written in such a manner to allow its compilation also in C++ -+ (C++ is a bit stricter than C; compatibility is checked when PlumedStatic.cpp, -+ which basically includes Plumed.c, is compiled with the C++ compiler). This will -+ allow e.g. MD codes written in C++ to just incorporate Plumed.c (maybe renamed into -+ Plumed.cpp), without the need of configuring a plain C compiler. -+ -+ Plumed interface can be used from C, C++ and FORTRAN. Everything concerning plumed -+ is hidden inside a single object type, which is described in C by a structure -+ (struct \ref plumed), in C++ by a class (PLMD::Plumed) and in FORTRAN by a -+ fixed-length string (CHARACTER(LEN=32)). Obviously C++ can use both struct -+ and class interfaces, but the first should be preferred. The reference interface -+ is the C one, whereas FORTRAN and C++ interfaces are implemented as wrappers -+ around it. -+ -+ In the C++ interface, all the routines are implemented as methods of PLMD::Plumed. -+ In the C and FORTRAN interfaces, all the routines are named plumed_*, to -+ avoid potential name clashes. Notice that the entire plumed library -+ is implemented in C++, and it is hidden inside the PLMD namespace. -+ -+ Handlers to the plumed object can be converted among different representations, -+ to allow inter-operability among languages. In C, there are tools to convert -+ to/from FORTRAN, whereas in C++ there are tools to convert to/from FORTRAN and C. -+ -+ These handlers only contain a pointer to the real structure, so that -+ when a plumed object is brought from one language to another, -+ it brings a reference to the same environment. -+ -+ Moreover, to simplify life in all cases where a single Plumed object is -+ required for the entire simulation (which covers most of the practical -+ applications with conventional MD codes) it is possible to take advantage -+ of a global interface, which is implicitly referring to a unique global instance. -+ The global object should still be initialized and finalized properly. -+ -+ The basic method to send a message to plumed is -+\verbatim -+ (C) plumed_cmd -+ (C++) PLMD::Plumed::cmd -+ (FORTRAN) PLUMED_F_CMD -+\endverbatim -+ -+ To initialize a plumed object, use: -+\verbatim -+ (C) plumed_create -+ (C++) (constructor of PLMD::Plumed) -+ (FORTRAN) PLUMED_F_CREATE -+\endverbatim -+ -+ To finalize it, use -+\verbatim -+ (C) plumed_finalize -+ (C++) (destructor of PLMD::Plumed) -+ (FORTRAN) PLUMED_F_FINALIZE -+\endverbatim -+ -+ To access to the global-object, use -+\verbatim -+ (C) plumed_gcreate, plumed_gfinalize, plumed_gcmd -+ (C++) PLMD::Plumed::gcreate, PLMD::Plumed::gfinalize, PLMD::Plumed::gcmd -+ (FORTRAN) PLUMED_F_GCREATE, PLUMED_F_GFINALIZE, PLUMED_F_GCMD -+\endverbatim -+ -+ To check if the global object has been initialized, use -+\verbatim -+ (C) plumed_ginitialized -+ (C++) PLMD::Plumed::ginitialized -+ (FORTRAN) PLUMED_F_GINITIALIZED -+\endverbatim -+ -+ To check if plumed library is available (this is useful for runtime linking), use -+\verbatim -+ (C) plumed_installed -+ (C++) PLMD::Plumed::installed -+ (FORTRAN) PLUMED_F_INSTALLED -+\endverbatim -+ -+ To convert handlers use -+\verbatim -+ (C) plumed_c2f (C to FORTRAN) -+ (C) plumed_f2c (FORTRAN to C) -+ (C++) Plumed(plumed) constructor (C to C++) -+ (C++) operator plumed() cast (C++ to C) -+ (C++) Plumed(char*) constructor (FORTRAN to C++) -+ (C++) toFortran(char*) (C++ to FORTRAN) -+\endverbatim -+ -+\verbatim -+ FORTRAN interface -+ SUBROUTINE PLUMED_F_INSTALLED(i) -+ INTEGER, INTENT(OUT) :: i -+ SUBROUTINE PLUMED_F_GINITIALIZED(i) -+ INTEGER, INTENT(OUT) :: i -+ SUBROUTINE PLUMED_F_GCREATE() -+ SUBROUTINE PLUMED_F_GCMD(key,val) -+ CHARACTER(LEN=*), INTENT(IN) :: key -+ UNSPECIFIED_TYPE, INTENT(INOUT) :: val(*) -+ SUBROUTINE PLUMED_F_GFINALIZE() -+ SUBROUTINE PLUMED_F_GLOBAL(p) -+ CHARACTER(LEN=32), INTENT(OUT) :: p -+ SUBROUTINE PLUMED_F_CREATE(p) -+ CHARACTER(LEN=32), INTENT(OUT) :: p -+ SUBROUTINE PLUMED_F_CMD(p,key,val) -+ CHARACTER(LEN=32), INTENT(IN) :: p -+ CHARACTER(LEN=*), INTENT(IN) :: key -+ UNSPECIFIED_TYPE, INTENT(INOUT) :: val(*) -+ SUBROUTINE PLUMED_F_FINALIZE(p) -+ CHARACTER(LEN=32), INTENT(IN) :: p -+\endverbatim -+ -+ The main routine is "cmd", which accepts two arguments: -+ key is a string containing the name of the command -+ val is the argument. it is declared const so as to use allow passing const objects, but in practice plumed -+ is going to modify val in several cases (using a const_cast). -+ In some cases val can be omitted: just pass a NULL pointer (in C++, val is optional and can be omitted). -+ The set of possible keys is the real API of the plumed library, and will be expanded with time. -+ New commands will be added, but backward compatibility will be retained as long as possible. -+ -+ To pass plumed a callback function use the following syntax (not available in FORTRAN yet) -+\verbatim -+ plumed_function_holder ff; -+ ff.p=your_function; -+ plumed_cmd(plumed,"xxxx",&ff); -+\endverbatim -+ (this is passing the your_function() function to the "xxxx" command) -+*/ -+ -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ -+/* Generic function pointer */ -+typedef void (*plumed_function_pointer)(void); -+ -+/** -+ \brief Holder for function pointer. -+ -+ To pass plumed a callback function use the following syntax: -+\verbatim -+ plumed_function_holder ff; -+ ff.p=your_function; -+ plumed_cmd(plumed,"xxxx",&ff); -+\endverbatim -+ (this is going to pass the your_function() function to the "xxxx" command) -+*/ -+ -+typedef struct { -+ plumed_function_pointer p; -+} plumed_function_holder; -+ -+/** -+ \brief Main plumed object -+ -+ This is an object containing a Plumed instance, which should be used in -+ the MD engine. It should first be initialized with plumed_create(), -+ then it communicates with the MD engine using plumed_cmd(). Finally, -+ before the termination, it should be deallocated with plumed_finalize(). -+ Its interface is very simple and general, and is expected -+ not to change across plumed versions. See \ref ReferencePlumedH. -+*/ -+typedef struct { -+/** -+ \private -+ \brief Void pointer holding the real PlumedMain structure -+*/ -+ void*p; -+} plumed; -+ -+/** \relates plumed -+ \brief Constructor -+ -+ \return The constructed plumed object -+*/ -+plumed plumed_create(void); -+ -+/** \relates plumed -+ \brief Tells p to execute a command -+ -+ \param p The plumed object on which command is acting -+ \param key The name of the command to be executed -+ \param val The argument. It is declared as const to allow calls like plumed_cmd(p,"A","B"), -+ but for some choice of key it can change the content -+*/ -+void plumed_cmd(plumed p,const char*key,const void*val); -+ -+/** \relates plumed -+ \brief Destructor -+ -+ \param p The plumed object to be deallocated -+*/ -+void plumed_finalize(plumed p); -+ -+/** \relates plumed -+ \brief Check if plumed is installed (for runtime binding) -+ -+ \return 1 if plumed is installed, to 0 otherwise -+*/ -+int plumed_installed(void); -+ -+/** \relates plumed -+ \brief Retrieves an handler to the global structure. -+*/ -+plumed plumed_global(void); -+ -+/** \relates plumed -+ \brief Check if the global interface has been initialized -+ -+ \return 1 if plumed has been initialized, 0 otherwise -+*/ -+int plumed_ginitialized(void); -+ -+/* global C interface, working on a global object */ -+ -+/** \relates plumed -+ \brief Constructor for the global interface. -+ -+ \note Equivalent to plumed_create(), but initialize a static global plumed object -+*/ -+void plumed_gcreate(void); -+ -+/** \relates plumed -+ \brief Tells to the global interface to execute a command. -+ -+ \param key The name of the command to be executed -+ \param val The argument. It is declared as const to allow calls like plumed_gcmd("A","B"), -+ but for some choice of key it can change the content -+ -+ \note Equivalent to plumed_cmd(), but skipping the plumed argument -+*/ -+void plumed_gcmd(const char* key,const void* val); -+ -+/** \relates plumed -+ \brief Destructor for the global interface. -+ -+ \note Equivalent to plumed_finalize(), but skipping the plumed argument -+*/ -+void plumed_gfinalize(void); -+ -+/* routines to convert char handler from/to plumed objects */ -+ -+/** \related plumed -+ \brief Converts a C handler to a FORTRAN handler -+ -+ \param p The C handler -+ \param c The FORTRAN handler (a char[32]) -+*/ -+void plumed_c2f(plumed p,char* c); -+ -+/** \related plumed -+ \brief Converts a FORTRAN handler to a C handler -+ \param c The FORTRAN handler (a char[32]) -+ \return The C handler -+*/ -+plumed plumed_f2c(const char* c); -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#ifdef __cplusplus -+ -+/* this is to include the NULL pointer */ -+#include -+ -+/* C++ interface is hidden in PLMD namespace (same as plumed library) */ -+namespace PLMD { -+ -+/** -+ C++ wrapper for \ref plumed. -+ -+ This class provides a C++ interface to PLUMED. -+*/ -+ -+class Plumed{ -+ plumed main; -+/** -+ keeps track if the object was created from scratch using -+ the defaults destructor (cloned=false) or if it was imported -+ from C or FORTRAN (cloned-true). In the latter case, the -+ plumed_finalize() method is not called when destructing the object, -+ since it is expected to be finalized in the C/FORTRAN code -+*/ -+ bool cloned; -+public: -+/** -+ Check if plumed is installed (for runtime binding) -+ \return true if plumed is installed, false otherwise -+*/ -+ static bool installed(); -+/** -+ Check if global-plumed has been initialized -+ \return true if global plumed object (see global()) is initialized (i.e. if gcreate() has been -+ called), false otherwise. -+*/ -+ static bool ginitialized(); -+/** -+ Initialize global-plumed -+*/ -+ static void gcreate(); -+/** -+ Send a command to global-plumed -+ \param key The name of the command to be executed -+ \param val The argument. It is declared as const to allow calls like gcmd("A","B"), -+ but for some choice of key it can change the content -+*/ -+ static void gcmd(const char* key,const void* val); -+/** -+ Finalize global-plumed -+*/ -+ static void gfinalize(); -+/** -+ Returns the Plumed global object -+ \return The Plumed global object -+*/ -+ static Plumed global(); -+/** -+ Constructor -+*/ -+ Plumed(); -+/** -+ Clone a Plumed object from a FORTRAN char* handler -+ \param c The FORTRAN handler (a char[32]). -+ -+ \attention The Plumed object created in this manner -+ will not finalize the corresponding plumed structure. -+ It is expected that the FORTRAN code calls plumed_c_finalize for it -+*/ -+ Plumed(const char*c); -+/** -+ Clone a Plumed object from a C plumed structure -+ \param p The C plumed structure. -+ -+ \attention The Plumed object created in this manner -+ will not finalize the corresponding plumed structure. -+ It is expected that the C code calls plumed_finalize for it -+*/ -+ Plumed(plumed p); -+private: -+/** Copy constructor is disabled (private and unimplemented) -+ The problem here is that after copying it will not be clear who is -+ going to finalize the corresponding plumed structure. -+*/ -+ Plumed(const Plumed&); -+/** Assignment operator is disabled (private and unimplemented) -+ The problem here is that after copying it will not be clear who is -+ going to finalize the corresponding plumed structure. -+*/ -+ Plumed&operator=(const Plumed&); -+public: -+/** -+ Retrieve the C plumed structure for this object -+*/ -+ operator plumed()const; -+/** -+ Retrieve a FORTRAN handler for this object -+ \param c The FORTRAN handler (a char[32]). -+*/ -+ void toFortran(char*c)const; -+/** -+ Send a command to this plumed object -+ \param key The name of the command to be executed -+ \param val The argument. It is declared as const to allow calls like p.cmd("A","B"), -+ but for some choice of key it can change the content -+*/ -+ void cmd(const char*key,const void*val=NULL); -+/** -+ Destructor -+ -+ Destructor is virtual so as to allow correct inheritance from Plumed object. -+ To avoid linking problems with g++, I specify "inline" also here (in principle -+ it should be enough to specify it down in the definition of the function, but -+ for some reason that I do not understand g++ does not inline it properly in that -+ case and complains when Plumed.h is included but Plumed.o is not linked. Anyway, the -+ way it is done here seems to work properly). -+*/ -+ inline virtual ~Plumed(); -+}; -+ -+/* All methods are inlined so as to avoid the compilation of an extra c++ file */ -+ -+inline -+bool Plumed::installed(){ -+ return plumed_installed(); -+} -+ -+inline -+Plumed::Plumed(): -+ main(plumed_create()), -+ cloned(false) -+{} -+ -+inline -+Plumed::Plumed(const char*c): -+ main(plumed_f2c(c)), -+ cloned(true) -+{} -+ -+inline -+Plumed::Plumed(plumed p): -+ main(p), -+ cloned(true) -+{} -+ -+inline -+Plumed::operator plumed()const{ -+ return main; -+} -+ -+inline -+void Plumed::toFortran(char*c)const{ -+ plumed_c2f(main,c); -+} -+ -+inline -+void Plumed::cmd(const char*key,const void*val){ -+ plumed_cmd(main,key,val); -+} -+ -+inline -+Plumed::~Plumed(){ -+ if(!cloned)plumed_finalize(main); -+} -+ -+inline -+bool Plumed::ginitialized(){ -+ return plumed_ginitialized(); -+} -+ -+inline -+void Plumed::gcreate(){ -+ plumed_gcreate(); -+} -+ -+inline -+void Plumed::gcmd(const char* key,const void* val){ -+ plumed_gcmd(key,val); -+} -+ -+inline -+void Plumed::gfinalize(){ -+ plumed_gfinalize(); -+} -+ -+inline -+Plumed Plumed::global(){ -+ return plumed_global(); -+} -+ -+} -+ -+#endif -+ -+ -+#endif -diff -urN dl_class_1.9.orig/Plumed.inc dl_class_1.9/Plumed.inc ---- dl_class_1.9.orig/Plumed.inc 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/Plumed.inc 2015-11-16 17:22:29.921325000 +0100 -@@ -0,0 +1,3 @@ -+# PLUMED: runtime installation -+PLUMED_LOAD= -L$(EBROOTPLUMED)/lib -lplumed -ldl -+PLUMED_DEPENDENCIES= -diff -urN dl_class_1.9.orig/srcmod/angles_module.f dl_class_1.9/srcmod/angles_module.f ---- dl_class_1.9.orig/srcmod/angles_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/angles_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,741 @@ -+ module angles_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining valence angle potentials -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c modified - p.-a.cazade oct 2007 : solvation etc. -+c modified - d. quigley 2010 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmang(:,:) -+ integer, allocatable :: listang(:,:) -+ integer, allocatable :: numang(:),keyang(:),lstang(:,:) -+ -+ save prmang,listang,numang,keyang,lstang -+ -+ contains -+ -+ subroutine alloc_ang_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining valence angle potential arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(5) -+ -+ do i=1,5 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmang(mxtang,mxpang),stat=fail(1)) -+ allocate (numang(mxtmls),stat=fail(2)) -+ allocate (keyang(mxtang),stat=fail(3)) -+ allocate (lstang(mxtang,3),stat=fail(4)) -+ allocate (listang(mxangl,4),stat=fail(5)) -+ -+ do i=1,5 -+ if(fail(i).gt.0)call error(idnode,1010) -+ enddo -+ -+ do i=1,mxtmls -+ numang(i)=0 -+ enddo -+ -+ end subroutine alloc_ang_arrays -+ -+ subroutine define_angles -+ x (safe,idnode,itmols,nangle,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining bond angles -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,itmols,nangle,nsite,ntmp,i,iang,iang1 -+ integer idum,iatm1,iatm2,iatm3,isite1,isite2,isite3,ia,ja -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numang(itmols)=numang(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of bond angles', -+ x 10x,i10)")ntmp -+ write(nrite,"(/,/,1x,'bond angle details:', -+ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, -+ x 'index',5x,'f-const',7x,'angle',/)") -+ endif -+ -+ iang1=numang(itmols) -+ do iang=1,iang1 -+ -+c read bond angle potential parameters -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ iatm3=intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ isite3=nsite-numsit(itmols)+iatm3 -+ -+ if(lfzsit(isite1)*lfzsit(isite2)* -+ x lfzsit(isite3).ne.0)then -+ -+ numang(itmols)=numang(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ nangle=nangle+1 -+ -+ if(nangle.gt.mxtang)call error(idnode,50) -+ -+ if(keyword(1:4).eq.'harm')then -+ keyang(nangle)=1 -+ elseif(keyword(1:4).eq.'-hrm')then -+ keyang(nangle)=-1 -+ elseif(keyword(1:4).eq.'quar')then -+ keyang(nangle)=2 -+ elseif(keyword(1:4).eq.'-qur')then -+ keyang(nangle)=-2 -+ elseif(keyword(1:4).eq.'thrm')then -+ keyang(nangle)=3 -+ elseif(keyword(1:4).eq.'-thm')then -+ keyang(nangle)=-3 -+ elseif(keyword(1:4).eq.'shrm')then -+ keyang(nangle)=4 -+ elseif(keyword(1:4).eq.'-shm')then -+ keyang(nangle)=-4 -+ elseif(keyword(1:4).eq.'bvs1')then -+ keyang(nangle)=5 -+ elseif(keyword(1:4).eq.'-bv1')then -+ keyang(nangle)=-5 -+ elseif(keyword(1:4).eq.'bvs2')then -+ keyang(nangle)=6 -+ elseif(keyword(1:4).eq.'-bv2')then -+ keyang(nangle)=-6 -+ elseif(keyword(1:4).eq.'hcos')then -+ keyang(nangle)=7 -+ elseif(keyword(1:4).eq.'-hcs')then -+ keyang(nangle)=-7 -+ elseif(keyword(1:4).eq.'cos ')then -+ keyang(nangle)=8 -+ elseif(keyword(1:4).eq.'-cos')then -+ keyang(nangle)=-8 -+ elseif(keyword(1:4).eq.'mmsb')then -+ keyang(nangle)=9 -+ elseif(keyword(1:4).eq.'-msb')then -+ keyang(nangle)=-9 -+ elseif(keyword(1:4).eq.'stst') then -+ keyang(nangle)=10 -+ elseif(keyword(1:4).eq.'-sts') then -+ keyang(nangle)=-10 -+ elseif(keyword(1:4).eq.'stbe') then -+ keyang(nangle)=11 -+ elseif(keyword(1:4).eq.'-stb') then -+ keyang(nangle)=-11 -+ elseif(keyword(1:4).eq.'cmps') then -+ keyang(nangle)=12 -+ elseif(keyword(1:4).eq.'-cmp') then -+ keyang(nangle)=-12 -+ else -+ if(idnode.eq.0)write(nrite,*)message -+ call error(idnode,440) -+ endif -+ -+ lstang(nangle,1)=iatm1 -+ lstang(nangle,2)=iatm2 -+ lstang(nangle,3)=iatm3 -+ prmang(nangle,1)=dblstr(record,lenrec,idum) -+ prmang(nangle,2)=dblstr(record,lenrec,idum) -+ prmang(nangle,3)=dblstr(record,lenrec,idum) -+ prmang(nangle,4)=dblstr(record,lenrec,idum) -+ prmang(nangle,5)=dblstr(record,lenrec,idum) -+ prmang(nangle,6)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,3i10,1p,e12.4,0p,9f12.6)") -+ x keyword(1:4),(lstang(nangle,ia),ia=1,3), -+ x (prmang(nangle,ja),ja=1,mxpang) -+ -+c convert energies to internal units -+ -+ prmang(nangle,1)=prmang(nangle,1)*engunit -+ if(abs(keyang(nangle)).eq.2)then -+ prmang(nangle,3)=prmang(nangle,3)*engunit -+ prmang(nangle,4)=prmang(nangle,4)*engunit -+ elseif(abs(keyang(nangle)).eq.12)then -+ prmang(nangle,2)=prmang(nangle,2)*engunit -+ prmang(nangle,3)=prmang(nangle,3)*engunit -+ endif -+ -+c convert angles to radians -+ -+ if(abs(keyang(nangle)).eq.12)then -+ prmang(nangle,4)=prmang(nangle,4)*(pi/180.d0) -+ elseif(abs(keyang(nangle)).ne.10)then -+ prmang(nangle,2)=prmang(nangle,2)*(pi/180.d0) -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_angles -+ -+ subroutine angfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntangl,engang,virang) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating bond angle energy and -+c force terms in molecular dynamics. -+c -+c replicated data - blocked version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith may 1992 -+c modified - t. forester feb 1993 -+c modified - t. forester nov 1994 : block data -+c modified - t. forester may 1995 : stress tensor -+c modified - p.-a.cazade oct 2007 : solvation etc. -+c modified - d. quigley nov 2010 : metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect -+ logical idrive,jdrive,kdrive -+ integer idnode,mxnode,imcon,ntangl,fail1,fail2 -+ integer ii,iang1,iang2,i,ia,ib,ic,kk,keya -+ real(8) engang,virang,theta,fxc,fyc,fzc,rab,xab -+ real(8) yab,zab,rbc,xbc,ybc,zbc,sint,cost,pterm,vterm -+ real(8) gamma,gamsa,gamsc,rrbc,rrab,fxa,fya,fza -+ real(8) strs(6),strs_loc(6) -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ real(8), allocatable :: xdbc(:),ydbc(:),zdbc(:) -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) -+ allocate (xdbc(msbad),ydbc(msbad),zdbc(msbad),stat=fail2) -+ if(fail1.ne.fail2)call error(idnode,1020) -+ -+c flag for undefined potentials -+ -+ safe=.true. -+ -+c check size of work arrays -+ -+ if((ntangl-mxnode+1)/mxnode.gt.msbad)call error(idnode,419) -+ -+c block indices -+ -+ iang1=(idnode*ntangl)/mxnode+1 -+ iang2=((idnode+1)*ntangl)/mxnode -+ -+c zero accumulators -+ -+ engang=0.d0 -+ virang=0.d0 -+ ang_fre=0.d0 -+ ang_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(2)=.true. -+ ang_sol(:)=0.d0 -+ if(lexcite)ang_exc(:)=0.d0 -+ -+ endif -+ -+c calculate atom separation vectors -+ -+ ii=0 -+ do i=iang1,iang2 -+ -+ ii=ii+1 -+ -+c indices of bonded atoms -+ -+ ia=listang(ii,2) -+ ib=listang(ii,3) -+ ic=listang(ii,4) -+ -+c components of first bond vector -+ -+ xdab(ii)=xxx(ia)-xxx(ib) -+ ydab(ii)=yyy(ia)-yyy(ib) -+ zdab(ii)=zzz(ia)-zzz(ib) -+ -+c components of second bond vector -+ -+ xdbc(ii)=xxx(ic)-xxx(ib) -+ ydbc(ii)=yyy(ic)-yyy(ib) -+ zdbc(ii)=zzz(ic)-zzz(ib) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ call images(imcon,0,1,ii,cell,xdbc,ydbc,zdbc) -+ -+c loop over all specified angle potentials -+ -+ ii=0 -+ do i=iang1,iang2 -+ -+ ii=ii+1 -+ -+c define components of first bond vector -+ -+ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) -+ rrab=1.d0/rab -+ -+ xab=xdab(ii)*rrab -+ yab=ydab(ii)*rrab -+ zab=zdab(ii)*rrab -+ -+c define components of second bond vector -+ -+ rbc=sqrt(xdbc(ii)**2+ydbc(ii)**2+zdbc(ii)**2) -+ rrbc=1.d0/rbc -+ -+ xbc=xdbc(ii)*rrbc -+ ybc=ydbc(ii)*rrbc -+ zbc=zdbc(ii)*rrbc -+ -+c index of potential function parameters -+ -+ kk=listang(ii,1) -+ -+c determine bond angle and calculate potential energy -+ -+ cost=(xab*xbc+yab*ybc+zab*zbc) -+ theta=acos(cost) -+ sint=max(1.d-8,sqrt(1.d0-cost**2)) -+ -+ keya=abs(keyang(kk)) -+ -+ if(keya.eq.1)then -+ -+c harmonic potential -+ -+ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2 -+ gamma=prmang(kk,1)*(theta-prmang(kk,2))/sint -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ elseif(keya.eq.2)then -+ -+c quartic potential -+ -+ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2+ -+ x 1.d0/3.d0*prmang(kk,3)*(theta-prmang(kk,2))**3+ -+ x 0.25d0*prmang(kk,4)*(theta-prmang(kk,2))**4 -+ gamma=(prmang(kk,1)*(theta-prmang(kk,2))+ -+ x prmang(kk,3)*(theta-prmang(kk,2))**2+ -+ x prmang(kk,4)*(theta-prmang(kk,2))**3)/sint -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ elseif(keya.eq.3)then -+ -+c truncated harmonic potential -+ -+ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2* -+ x exp(-(rab**8+rbc**8)/prmang(kk,3)**8) -+ gamma=prmang(kk,1)*(theta-prmang(kk,2))* -+ x exp(-(rab**8+rbc**8)/prmang(kk,3)**8)/sint -+ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmang(kk,3)**8 -+ gamsa=(8.d0*pterm/prmang(kk,3)**8)*rab**7 -+ gamsc=(8.d0*pterm/prmang(kk,3)**8)*rbc**7 -+ -+ elseif(keya.eq.4)then -+ -+c screened harmonic potential -+ -+ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2* -+ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4))) -+ gamma=prmang(kk,1)*(theta-prmang(kk,2))* -+ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4)))/sint -+ vterm=-pterm*(rab/prmang(kk,3)+rbc/prmang(kk,4)) -+ gamsa=(pterm/prmang(kk,3)) -+ gamsc=(pterm/prmang(kk,4)) -+ -+ elseif(keya.eq.5)then -+ -+c screened vessal potential (type 1) -+ -+ pterm=(prmang(kk,1)/(8.d0*(prmang(kk,2)-pi)**2)* -+ x (((prmang(kk,2)-pi)**2-(theta-pi)**2)**2))* -+ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4))) -+ gamma=(prmang(kk,1)/(2.d0*(prmang(kk,2)-pi)**2)* -+ x ((prmang(kk,2)-pi)**2-(theta-pi)**2)*(theta-pi))* -+ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4)))/sint -+ vterm=-pterm*(rab/prmang(kk,3)+rbc/prmang(kk,4)) -+ gamsa=(pterm/prmang(kk,3)) -+ gamsc=(pterm/prmang(kk,4)) -+ -+ elseif(keya.eq.6)then -+ -+c truncated vessal potential (type 2) -+ -+ pterm=prmang(kk,1)*(theta**prmang(kk,3)*(theta-prmang(kk,2)) -+ x **2*(theta+prmang(kk,2)-2.d0*pi)**2-0.5d0*prmang(kk,3)*pi -+ x **(prmang(kk,3)-1.d0)*(theta-prmang(kk,2))**2*(pi-prmang(kk, -+ x 2))**3)*exp(-(rab**8+rbc**8)/prmang(kk,4)**8) -+ gamma=prmang(kk,1)*(theta**(prmang(kk,3)-1.d0)*(theta-prmang -+ x (kk,2))*(theta+prmang(kk,2)-2.d0*pi)*((prmang(kk,3)+4.d0)* -+ x theta**2-2.d0*pi*(prmang(kk,3)+2.d0)*theta+prmang(kk,3)* -+ x prmang(kk,2)*(2.d0*pi-prmang(kk,2)))-prmang(kk,3)*pi** -+ x (prmang(kk,3)-1.d0)*(theta-prmang(kk,2))*(pi-prmang(kk,2)) -+ x **3)*exp(-(rab**8+rbc**8)/prmang(kk,4)**8)/sint -+ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmang(kk,4)**8 -+ gamsa=(8.d0*pterm/prmang(kk,4)**8)*rab**7 -+ gamsc=(8.d0*pterm/prmang(kk,4)**8)*rbc**7 -+ -+ elseif(keya.eq.7)then -+ -+c harmonic cosine potential -+ -+ pterm=0.5d0*prmang(kk,1)*(cos(theta)-cos(prmang(kk,2)))**2 -+ gamma=-prmang(kk,1)*(cos(theta)-cos(prmang(kk,2))) -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ elseif(keya.eq.8)then -+ -+c ordinary cosine potential -+ -+ pterm=prmang(kk,1)*(1+cos(prmang(kk,3)*theta-prmang(kk,2))) -+ gamma=-prmang(kk,1)*prmang(kk,3)*sin(prmang(kk,3)*theta- -+ x prmang(kk,2))/sint -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ elseif(keya.eq.9)then -+ -+c mm3 stretch-bend potential -+ -+ pterm=prmang(kk,1)*(theta-prmang(kk,2))* -+ x (rab-prmang(kk,3))*(rbc-prmang(kk,4)) -+ gamma=prmang(kk,1)*(rab-prmang(kk,3))*(rbc- -+ x prmang(kk,4))/sint -+ gamsa=-prmang(kk,1)*(theta-prmang(kk,2))*(rbc-prmang(kk,4)) -+ gamsc=-prmang(kk,1)*(theta-prmang(kk,2))*(rab-prmang(kk,3)) -+ vterm=-(gamsa*rab+gamsc*rbc) -+ -+ elseif(keya.eq.10)then -+ -+c compass stretch-stretch potential -+ -+ pterm=prmang(kk,1)*(rab-prmang(kk,2))*(rbc-prmang(kk,3)) -+ gamma=0.d0 -+ gamsa=-prmang(kk,1)*(rbc-prmang(kk,3)) -+ gamsc=-prmang(kk,1)*(rab-prmang(kk,2)) -+ vterm=-(gamsa*rab+gamsc*rbc) -+ -+ elseif(keya.eq.11)then -+ -+c compass stretch-bend potential -+ -+ pterm=prmang(kk,1)*(theta-prmang(kk,2))*(rab-prmang(kk,3)) -+ gamma=prmang(kk,1)*(rab-prmang(kk,3))/sint -+ gamsa=-prmang(kk,1)*(theta-prmang(kk,2)) -+ gamsc=0.d0 -+ vterm=-gamsa*rab -+ -+ elseif(keya.eq.12)then -+ -+c combined compass angle potential with 3 coupling terms -+ -+ pterm=prmang(kk,1)*(rab-prmang(kk,5))*(rbc-prmang(kk,6))+ -+ x (theta-prmang(kk,4))*(prmang(kk,2)*(rab-prmang(kk,5))+ -+ x prmang(kk,3)*(rbc-prmang(kk,6))) -+ gamma=(prmang(kk,2)*(rab-prmang(kk,5))+ -+ x prmang(kk,3)*(rbc-prmang(kk,6)))/sint -+ gamsa=-prmang(kk,2)*(theta-prmang(kk,4))- -+ x prmang(kk,1)*(rbc-prmang(kk,6)) -+ gamsc=-prmang(kk,3)*(theta-prmang(kk,4))- -+ x prmang(kk,1)*(rab-prmang(kk,5)) -+ vterm=-(gamsa*rab+gamsc*rbc) -+ -+ else -+ -+c undefined potential -+ -+ safe=.false. -+ pterm=0.d0 -+ vterm=0.d0 -+ gamma=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ endif -+ -+c indices of bonded atoms -+ -+ ia=listang(ii,2) -+ ib=listang(ii,3) -+ ic=listang(ii,4) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ kdrive=driven(ltype(ic)) -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. -+ x (atm_fre(ic).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic).eq.0) -+ -+ if(lsolva)then -+ ang_exc(atmolt(ia))=ang_exc(atmolt(ia))+pterm -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. -+ x (atm_fre(ic).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ ang_fre=ang_fre-pterm -+ ang_vir=ang_vir-vterm -+ pterm=lambda1*pterm -+ vterm=lambda1*vterm -+ gamma=lambda1*gamma -+ gamsa=lambda1*gamsa -+ gamsc=lambda1*gamsc -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. -+ x (atm_fre(ic).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ ang_fre=ang_fre+pterm -+ ang_vir=ang_vir+vterm -+ pterm=lambda2*pterm -+ vterm=lambda2*vterm -+ gamma=lambda2*gamma -+ gamsa=lambda2*gamsa -+ gamsc=lambda2*gamsc -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c sum potential energy and virial -+ -+ engang=engang+pterm -+ virang=virang+vterm -+ -+c calculate solvation energy -+ -+ if(lsolva)then -+ ang_sol(atmolt(ia))=ang_sol(atmolt(ia))+pterm -+ endif -+ -+c calculate atomic forces -+ -+ fxa=gamma*(xbc-xab*cost)*rrab+gamsa*xab -+ fya=gamma*(ybc-yab*cost)*rrab+gamsa*yab -+ fza=gamma*(zbc-zab*cost)*rrab+gamsa*zab -+ -+ fxc=gamma*(xab-xbc*cost)*rrbc+gamsc*xbc -+ fyc=gamma*(yab-ybc*cost)*rrbc+gamsc*ybc -+ fzc=gamma*(zab-zbc*cost)*rrbc+gamsc*zbc -+ -+c sum atomic forces -+ -+ fxx(ia)=fxx(ia)+fxa -+ fyy(ia)=fyy(ia)+fya -+ fzz(ia)=fzz(ia)+fza -+ -+ fxx(ib)=fxx(ib)-fxa-fxc -+ fyy(ib)=fyy(ib)-fya-fyc -+ fzz(ib)=fzz(ib)-fza-fzc -+ -+ fxx(ic)=fxx(ic)+fxc -+ fyy(ic)=fyy(ic)+fyc -+ fzz(ic)=fzz(ic)+fzc -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+rab*xab*fxa+rbc*xbc*fxc -+ strs(2)=strs(2)+rab*xab*fya+rbc*xbc*fyc -+ strs(3)=strs(3)+rab*xab*fza+rbc*xbc*fzc -+ strs(4)=strs(4)+rab*yab*fya+rbc*ybc*fyc -+ strs(5)=strs(5)+rab*yab*fza+rbc*ybc*fzc -+ strs(6)=strs(6)+rab*zab*fza+rbc*zbc*fzc -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+pterm -+ vir_loc=vir_loc+vterm -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fxa -+ fyy_loc(ia)=fyy_loc(ia)+fya -+ fzz_loc(ia)=fzz_loc(ia)+fza -+ -+ fxx_loc(ib)=fxx_loc(ib)-fxa-fxc -+ fyy_loc(ib)=fyy_loc(ib)-fya-fyc -+ fzz_loc(ib)=fzz_loc(ib)-fza-fzc -+ -+ fxx_loc(ic)=fxx_loc(ic)+fxc -+ fyy_loc(ic)=fyy_loc(ic)+fyc -+ fzz_loc(ic)=fzz_loc(ic)+fzc -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+rab*xab*fxa+rbc*xbc*fxc -+ strs_loc(2)=strs_loc(2)+rab*xab*fya+rbc*xbc*fyc -+ strs_loc(3)=strs_loc(3)+rab*xab*fza+rbc*xbc*fzc -+ strs_loc(4)=strs_loc(4)+rab*yab*fya+rbc*ybc*fyc -+ strs_loc(5)=strs_loc(5)+rab*yab*fza+rbc*ybc*fzc -+ strs_loc(6)=strs_loc(6)+rab*zab*fza+rbc*zbc*fzc -+ -+ endif -+ -+ enddo -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,440) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c sum up contributions to potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engang -+ buffer(2)=virang -+ buffer(3)=ang_fre -+ buffer(4)=ang_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engang=buffer(1) -+ virang=buffer(2) -+ ang_fre=buffer(3) -+ ang_vir=buffer(4) -+ -+c sum up solvation energies -+ -+ if(lsolva)then -+ -+ call gdsum(ang_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(ang_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ deallocate (xdab,ydab,zdab,stat=fail1) -+ deallocate (xdbc,ydbc,zdbc,stat=fail2) -+ -+ return -+ end subroutine angfrc -+ -+ end module angles_module -diff -urN dl_class_1.9.orig/srcmod/basic_comms.f dl_class_1.9/srcmod/basic_comms.f ---- dl_class_1.9.orig/srcmod/basic_comms.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/basic_comms.f 2015-11-16 17:21:51.184041995 +0100 -@@ -0,0 +1,389 @@ -+ subroutine initcomms() -+ -+c********************************************************************* -+c -+c communication harness initialisation -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_init MPI_init_ -+ -+ call MPI_init(ierr) -+ -+ return -+ end -+ -+c PLUMED -+ integer*8 function get_comms() -+ -+c********************************************************************* -+c -+c dl_poly subroutine for obtaining the communicator -+c this is used by plumed -+c -+c author - G. Tribello -+c -+c********************************************************************* -+ -+ get_comms=MPI_COMM_WORLD -+ end -+ -+ subroutine machine(idnode,mxnode) -+c PLUMED -+ -+c********************************************************************* -+c -+c dl_poly subroutine for obtaining charcteristics of -+c the computer on which the program is being run -+c -+c copyright daresbury laboratory 1992 -+c author - w.smith july 1992 -+c -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,mynode,numnodes -+ -+ idnode=mynode() -+ mxnode=numnodes() -+ -+ return -+ end -+ -+ integer function mynode() -+ -+c********************************************************************* -+c -+c routine to determine identity of processing node -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_COMM_RANK MPI_COMM_RANK_ -+ -+ call MPI_COMM_RANK(MPI_COMM_WORLD, mynode ,ierr) -+ -+ return -+ end -+ -+ integer function nodedim() -+ -+c********************************************************************* -+c -+c calculate dimension of hypercube -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer i,n,ierr,mxnode -+ -+CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ -+ -+ call MPI_COMM_SIZE(MPI_COMM_WORLD, mxnode ,ierr) -+ n=1 -+ nodedim = -1 -+ do i=0,16 -+ -+ if(n.eq.mxnode)nodedim=i -+ n=2*n -+ -+ enddo -+ -+ return -+ end -+ -+ integer function numnodes() -+ -+c********************************************************************* -+c -+c calculate number of nodes -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ -+ -+ call MPI_COMM_SIZE(MPI_COMM_WORLD, numnodes, ierr) -+ -+ return -+ end -+ -+ subroutine csend(tagmsg,buf,length,pe,idum) -+ -+c********************************************************************* -+c -+c Intel-like csend (double precision) -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer tagmsg,length,pe,idum -+ -+ integer ierr -+ real(8) buf(*) -+ -+CMPIU define MPI_send MPI_send_ -+ -+ call MPI_send(buf,length,MPI_DOUBLE_PRECISION,pe,tagmsg, -+ x MPI_COMM_WORLD,ierr) -+ -+ return -+ end -+ -+ subroutine crecv(tagmsg,buf,length) -+ -+c********************************************************************* -+c -+c Intel-like crecv (double precision) -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer tagmsg,length -+ -+ integer ierr -+ integer status(MPI_STATUS_SIZE) -+ real(8) buf(*) -+ -+CMPIU define MPI_RECV MPI_RECV_ -+ -+ call MPI_RECV(buf,length,MPI_DOUBLE_PRECISION,MPI_ANY_SOURCE, -+ x tagmsg,MPI_COMM_WORLD,status,ierr) -+ -+ return -+ end -+ -+ subroutine gisum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global summation subroutine for hypercube - MPI version -+c integer version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ integer nnn,i,ierror,iii,kk,k,k0,k1,k2,msg1,msg2 -+ integer aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+ -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, -+ x MPI_SUM,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gdsum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global summation subroutine for MPI - hypercube assumed -+c double precision version -+c -+c copyright - daresbury laboratory 1995 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn,i,iii,kk,k1,k2,ierror -+ real(8) aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+ -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_DOUBLE_PRECISION, -+ x MPI_SUM,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gimax(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global maximum subroutine for hypercube - MPI version -+c integer version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ integer nnn,i,iii,kk,k1,k2,k,k0msg1,msg2,ierror -+ integer aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, -+ x MPI_MAX,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gstate(check) -+ -+c*********************************************************************** -+c -+c dl_poly global status subroutine : gisum version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992 -+c MPI version - t. forester may 1995 -+c -+c*********************************************************************** -+ -+ -+ implicit none -+ -+ logical check -+ integer i,idum -+ -+ i = 0 -+ if(.not.check) i = 1 -+ -+ call gisum(i,1,idum) -+ -+ check = (i.eq.0) -+ -+ return -+ end -+ -+ subroutine gsync() -+ -+c********************************************************************* -+c -+c barrier / synchronization routine -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ierr -+ -+ include "comms.inc" -+ -+CMPIU define MPI_BARRIER MPI_BARRIER_ -+ -+ call MPI_BARRIER(MPI_COMM_WORLD,ierr) -+ -+ return -+ end -+ -+ subroutine exitcomms() -+ -+c********************************************************************* -+c -+c exitcomms: exit from communication harness -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+CMPIU define MPI_FINALIZE MPI_FINALIZE_ -+ -+ call MPI_FINALIZE(ierr) -+ call exit(0) -+ -+ return -+ end -diff -urN dl_class_1.9.orig/srcmod/basic_comms.f.preplumed dl_class_1.9/srcmod/basic_comms.f.preplumed ---- dl_class_1.9.orig/srcmod/basic_comms.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/basic_comms.f.preplumed 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,373 @@ -+ subroutine initcomms() -+ -+c********************************************************************* -+c -+c communication harness initialisation -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_init MPI_init_ -+ -+ call MPI_init(ierr) -+ -+ return -+ end -+ -+ subroutine machine(idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for obtaining charcteristics of -+c the computer on which the program is being run -+c -+c copyright daresbury laboratory 1992 -+c author - w.smith july 1992 -+c -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,mynode,numnodes -+ -+ idnode=mynode() -+ mxnode=numnodes() -+ -+ return -+ end -+ -+ integer function mynode() -+ -+c********************************************************************* -+c -+c routine to determine identity of processing node -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_COMM_RANK MPI_COMM_RANK_ -+ -+ call MPI_COMM_RANK(MPI_COMM_WORLD, mynode ,ierr) -+ -+ return -+ end -+ -+ integer function nodedim() -+ -+c********************************************************************* -+c -+c calculate dimension of hypercube -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer i,n,ierr,mxnode -+ -+CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ -+ -+ call MPI_COMM_SIZE(MPI_COMM_WORLD, mxnode ,ierr) -+ n=1 -+ nodedim = -1 -+ do i=0,16 -+ -+ if(n.eq.mxnode)nodedim=i -+ n=2*n -+ -+ enddo -+ -+ return -+ end -+ -+ integer function numnodes() -+ -+c********************************************************************* -+c -+c calculate number of nodes -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ -+ -+ call MPI_COMM_SIZE(MPI_COMM_WORLD, numnodes, ierr) -+ -+ return -+ end -+ -+ subroutine csend(tagmsg,buf,length,pe,idum) -+ -+c********************************************************************* -+c -+c Intel-like csend (double precision) -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer tagmsg,length,pe,idum -+ -+ integer ierr -+ real(8) buf(*) -+ -+CMPIU define MPI_send MPI_send_ -+ -+ call MPI_send(buf,length,MPI_DOUBLE_PRECISION,pe,tagmsg, -+ x MPI_COMM_WORLD,ierr) -+ -+ return -+ end -+ -+ subroutine crecv(tagmsg,buf,length) -+ -+c********************************************************************* -+c -+c Intel-like crecv (double precision) -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer tagmsg,length -+ -+ integer ierr -+ integer status(MPI_STATUS_SIZE) -+ real(8) buf(*) -+ -+CMPIU define MPI_RECV MPI_RECV_ -+ -+ call MPI_RECV(buf,length,MPI_DOUBLE_PRECISION,MPI_ANY_SOURCE, -+ x tagmsg,MPI_COMM_WORLD,status,ierr) -+ -+ return -+ end -+ -+ subroutine gisum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global summation subroutine for hypercube - MPI version -+c integer version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ integer nnn,i,ierror,iii,kk,k,k0,k1,k2,msg1,msg2 -+ integer aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+ -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, -+ x MPI_SUM,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gdsum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global summation subroutine for MPI - hypercube assumed -+c double precision version -+c -+c copyright - daresbury laboratory 1995 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn,i,iii,kk,k1,k2,ierror -+ real(8) aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+ -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_DOUBLE_PRECISION, -+ x MPI_SUM,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gimax(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global maximum subroutine for hypercube - MPI version -+c integer version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ integer nnn,i,iii,kk,k1,k2,k,k0msg1,msg2,ierror -+ integer aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, -+ x MPI_MAX,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gstate(check) -+ -+c*********************************************************************** -+c -+c dl_poly global status subroutine : gisum version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992 -+c MPI version - t. forester may 1995 -+c -+c*********************************************************************** -+ -+ -+ implicit none -+ -+ logical check -+ integer i,idum -+ -+ i = 0 -+ if(.not.check) i = 1 -+ -+ call gisum(i,1,idum) -+ -+ check = (i.eq.0) -+ -+ return -+ end -+ -+ subroutine gsync() -+ -+c********************************************************************* -+c -+c barrier / synchronization routine -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ierr -+ -+ include "comms.inc" -+ -+CMPIU define MPI_BARRIER MPI_BARRIER_ -+ -+ call MPI_BARRIER(MPI_COMM_WORLD,ierr) -+ -+ return -+ end -+ -+ subroutine exitcomms() -+ -+c********************************************************************* -+c -+c exitcomms: exit from communication harness -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+CMPIU define MPI_FINALIZE MPI_FINALIZE_ -+ -+ call MPI_FINALIZE(ierr) -+ call exit(0) -+ -+ return -+ end -diff -urN dl_class_1.9.orig/srcmod/bonds_module.f dl_class_1.9/srcmod/bonds_module.f ---- dl_class_1.9.orig/srcmod/bonds_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/bonds_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,579 @@ -+ module bonds_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining bond potential arrays -+c copyright - daresbury laboratory -+c -+c author - w. smith sep 2003 -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c adapted for metadynamics -+c - d. quigley 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmbnd(:,:) -+ integer, allocatable :: listbnd(:,:) -+ integer, allocatable :: numbonds(:),keybnd(:),lstbnd(:,:) -+ -+ save prmbnd,listbnd,numbonds,keybnd,lstbnd -+ -+ contains -+ -+ subroutine alloc_bnd_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(5) -+ -+ do i=1,5 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmbnd(mxtbnd,mxpbnd),stat=fail(1)) -+ allocate (numbonds(mxtmls),stat=fail(2)) -+ allocate (keybnd(mxtbnd),stat=fail(3)) -+ allocate (lstbnd(mxtbnd,3),stat=fail(4)) -+ allocate (listbnd(mxbond,4),stat=fail(5)) -+ -+ do i=1,5 -+ if(fail(i).gt.0)call error(idnode,1030) -+ enddo -+ -+ do i=1,mxtmls -+ numbonds(i)=0 -+ enddo -+ -+ end subroutine alloc_bnd_arrays -+ -+ subroutine define_bonds -+ x (safe,idnode,itmols,nbonds,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining bonds -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,itmols,nbonds,nsite,ntmp,ibond,ibond1 -+ integer iatm1,iatm2,isite1,isite2,idum,i,j -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numbonds(itmols)=numbonds(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of chemical bonds', -+ x 7x,i10)")ntmp -+ write(nrite,"(/,/,1x,'chemical bond details:', -+ x /,/,21x,7x,'key',5x,'index',5x,'index',28x, -+ x 'parameters', /)") -+ endif -+ -+ ibond1=numbonds(itmols) -+ do ibond=1,ibond1 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ -+ if(lfzsit(isite1)*lfzsit(isite2).ne.0)then -+ -+ numbonds(itmols)=numbonds(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(12x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ nbonds=nbonds+1 -+ if(nbonds.gt.mxtbnd)call error(idnode,30) -+ -+ if(keyword(1:4).eq.'harm')then -+ keybnd(nbonds)=1 -+ elseif(keyword(1:4).eq.'-hrm')then -+ keybnd(nbonds)=-1 -+ elseif(keyword(1:4).eq.'mors')then -+ keybnd(nbonds)=2 -+ elseif(keyword(1:4).eq.'-mrs')then -+ keybnd(nbonds)=-2 -+ elseif(keyword(1:4).eq.'12-6')then -+ keybnd(nbonds)=3 -+ elseif(keyword(1:4).eq.'-126')then -+ keybnd(nbonds)=-3 -+ elseif(keyword(1:4).eq.'rhrm')then -+ keybnd(nbonds)=4 -+ elseif(keyword(1:4).eq.'-rhm')then -+ keybnd(nbonds)=-4 -+ elseif(keyword(1:4).eq.'quar')then -+ keybnd(nbonds)=5 -+ elseif(keyword(1:4).eq.'-qur')then -+ keybnd(nbonds)=-5 -+ elseif(keyword(1:4).eq.'buck')then -+ keybnd(nbonds)=6 -+ elseif(keyword(1:4).eq.'-bck')then -+ keybnd(nbonds)=-6 -+ elseif(keyword(1:4).eq.'fene')then -+ keybnd(nbonds)=7 -+ elseif(keyword(1:4).eq.'-fen')then -+ keybnd(nbonds)=-7 -+ elseif(keyword(1:4).eq.'coul')then -+ keybnd(nbonds)=8 -+ elseif(keyword(1:4).eq.'-cou')then -+ keybnd(nbonds)=-8 -+ else -+ if(idnode.eq.0)write(nrite,*)message -+ call error(idnode,444) -+ endif -+ -+ lstbnd(nbonds,1)=iatm1 -+ lstbnd(nbonds,2)=iatm2 -+ prmbnd(nbonds,1)=dblstr(record,lenrec,idum) -+ prmbnd(nbonds,2)=dblstr(record,lenrec,idum) -+ prmbnd(nbonds,3)=dblstr(record,lenrec,idum) -+ prmbnd(nbonds,4)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,2i10,2x,1p,10e15.6)") -+ x keyword(1:4),lstbnd(nbonds,1), -+ x lstbnd(nbonds,2),(prmbnd(nbonds,j),j=1,mxpbnd) -+c -+c convert energy units to internal units -+ -+ if(abs(keybnd(nbonds)).eq.3)then -+ prmbnd(nbonds,2)=prmbnd(nbonds,2)*engunit -+ endif -+ if(abs(keybnd(nbonds)).eq.5)then -+ prmbnd(nbonds,3)=prmbnd(nbonds,3)*engunit -+ prmbnd(nbonds,4)=prmbnd(nbonds,4)*engunit -+ endif -+ if(abs(keybnd(nbonds)).eq.6)then -+ prmbnd(nbonds,3)=prmbnd(nbonds,3)*engunit -+ endif -+ -+ if(abs(keybnd(nbonds)).ne.8) -+ x prmbnd(nbonds,1)=prmbnd(nbonds,1)*engunit -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_bonds -+ -+ subroutine bndfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntbond,epsq, -+ x engbnd,virbnd) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating chemical bond energy and -+c force terms in molecular dynamics. -+c -+c replicated data - blocked data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992 -+c modified - t. forester march 1993 -+c modified - t. forester march 1994 -+c modified - t. forester may 1994 -+c modified - t. forester nov 1994 -+c modified - w. smith nov 2006 -+c modified - p.-a. cazade oct 2007, solvation etc. -+c modified - d. quigley 2007, metdynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect -+ logical idrive,jdrive -+ integer i,fail,ibnd1,ibnd2,idnode,mxnode,ii,ia,ib,imcon -+ integer keyb,kk,ntbond -+ real(8) strs(6),strs_loc(6) -+ real(8) rab,rrab,omega,gamma,fx,fy,fz,engbnd,virbnd,epsq -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail) -+ if(fail.ne.0)call error(idnode,1040) -+ -+c flag for undefined potential -+ -+ safe=.true. -+ -+c check size of work arrays -+ -+ if((ntbond-mxnode+1)/mxnode.gt.msbad)call error(idnode,418) -+ -+c block indices -+ -+ ibnd1=(idnode*ntbond)/mxnode+1 -+ ibnd2=((idnode+1)*ntbond)/mxnode -+ -+c initialise accumulators -+ -+ engbnd=0.d0 -+ virbnd=0.d0 -+ bnd_fre=0.d0 -+ bnd_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(1)=.true. -+ bnd_sol(:)=0.d0 -+ if(lexcite)bnd_exc(:)=0.d0 -+ -+ endif -+ -+c calculate atom separation vectors -+ -+ ii=0 -+ do i=ibnd1,ibnd2 -+ -+ ii=ii+1 -+ -+c indices of bonded atoms -+ -+ ia=listbnd(ii,2) -+ ib=listbnd(ii,3) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ -+ endif -+ -+c components of bond vector -+ -+ xdab(ii)=xxx(ia)-xxx(ib) -+ ydab(ii)=yyy(ia)-yyy(ib) -+ zdab(ii)=zzz(ia)-zzz(ib) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ -+c loop over all specified chemical bond potentials -+ -+ ii=0 -+ do i=ibnd1,ibnd2 -+ -+ ii=ii+1 -+ -+c define components of bond vector -+ -+ rrab=0.d0 -+ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) -+ if(rab.gt.1.d-6)rrab=1.d0/rab -+ -+c index of potential function parameters -+ -+ kk=listbnd(ii,1) -+ keyb=abs(keybnd(kk)) -+ -+c calculate scalar constant terms -+ -+ if(keyb.eq.0)then -+ -+c null interaction -+ -+ omega=0.d0 -+ gamma=0.d0 -+ -+ elseif(keyb.eq.1)then -+ -+c harmonic potential -+ -+ omega=0.5d0*prmbnd(kk,1)*(rab-prmbnd(kk,2))**2 -+ gamma=prmbnd(kk,1)*(rab-prmbnd(kk,2))*rrab -+ -+ else if(keyb.eq.2)then -+ -+c morse potential -+ -+ omega=prmbnd(kk,1)*((1.d0-exp(-prmbnd(kk,3)* -+ x (rab-prmbnd(kk,2))))**2-1.d0) -+ gamma=2.d0*prmbnd(kk,1)*prmbnd(kk,3)*(1.d0- -+ x exp(-prmbnd(kk,3)*(rab-prmbnd(kk,2))))* -+ x exp(-prmbnd(kk,3)*(rab-prmbnd(kk,2)))*rrab -+ -+ else if(keyb.eq.3)then -+ -+c 12-6 potential -+ -+ omega=(prmbnd(kk,1)*rrab**6-prmbnd(kk,2))*rrab**6 -+ gamma=(6.d0*prmbnd(kk,2)-12.d0*prmbnd(kk,1)*rrab**6)* -+ x rrab**8 -+ -+ elseif(keyb.eq.4)then -+ -+c restrained harmonic -+ -+ rab=rab-prmbnd(kk,2) -+ omega=0.5d0*prmbnd(kk,1)*(min(abs(rab),prmbnd(kk,3)))**2 -+ x +prmbnd(kk,1)*prmbnd(kk,3)*max(abs(rab)-prmbnd(kk,3),0.d0) -+ gamma=rrab*prmbnd(kk,1)*(sign(min(abs(rab),prmbnd(kk,3)),rab)) -+ -+ elseif(keyb.eq.5)then -+ -+c quartic potential -+ -+ omega=0.5d0*prmbnd(kk,1)*(rab-prmbnd(kk,2))**2+ -+ x 1.d0/3.d0*prmbnd(kk,3)*(rab-prmbnd(kk,2))**3+ -+ x 0.25d0*prmbnd(kk,4)*(rab-prmbnd(kk,2))**4 -+ gamma=rrab*(prmbnd(kk,1)*(rab-prmbnd(kk,2))+ -+ x prmbnd(kk,3)*(rab-prmbnd(kk,2))**2+ -+ x prmbnd(kk,4)*(rab-prmbnd(kk,2))**3) -+ -+ else if(keyb.eq.6)then -+ -+c buckingham exp-6 potential -+ -+ omega=prmbnd(kk,1)*exp(-rab/prmbnd(kk,2))-prmbnd(kk,3)* -+ x rrab**6 -+ gamma=-rrab*prmbnd(kk,1)*exp(-rab/prmbnd(kk,2))/prmbnd(kk,2)+ -+ x 6.d0*prmbnd(kk,3)*rrab**8 -+ -+ else if(keyb.eq.7)then -+ -+c FENE bond potential -+ -+ omega=-0.5d0*prmbnd(kk,1)*prmbnd(kk,2)**2*log(1.d0- -+ x ((rab-prmbnd(kk,3))/prmbnd(kk,2))**2) -+ gamma=rrab*prmbnd(kk,1)*(rab-prmbnd(kk,3))/ -+ x (1.d0-((rab-prmbnd(kk,3))/prmbnd(kk,2))**2) -+ -+ else if(keyb.eq.8)then -+ -+c coulomb bond potential -+ -+ omega=prmbnd(kk,1)*prmbnd(kk,2)*rrab*r4pie0/epsq -+ gamma=-omega*rrab*rrab -+ -+ else -+ -+c undefined potential -+ -+ omega=0.d0 -+ gamma=0.d0 -+ safe=.false. -+ -+ endif -+ -+c indices of bonded atoms -+ -+ ia=listbnd(ii,2) -+ ib=listbnd(ii,3) -+ -+c set selection control -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib).eq.0) -+ -+ if(lsolva)then -+ bnd_exc(atmolt(ia))=bnd_exc(atmolt(ia))+omega -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ bnd_fre=bnd_fre-omega -+ bnd_vir=bnd_vir-gamma*rab*rab -+ omega=lambda1*omega -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ bnd_fre=bnd_fre+omega -+ bnd_vir=bnd_vir+gamma*rab*rab -+ omega=lambda2*omega -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate bond energy and virial -+ -+ engbnd=engbnd+omega -+ virbnd=virbnd+gamma*rab*rab -+ -+c calculate solvation energy -+ -+ if(lsolva)then -+ bnd_sol(atmolt(ia))=bnd_sol(atmolt(ia))+omega -+ endif -+ -+c calculate forces -+ -+ fx=-gamma*xdab(ii) -+ fy=-gamma*ydab(ii) -+ fz=-gamma*zdab(ii) -+ -+ fxx(ia)=fxx(ia)+fx -+ fyy(ia)=fyy(ia)+fy -+ fzz(ia)=fzz(ia)+fz -+ -+ fxx(ib)=fxx(ib)-fx -+ fyy(ib)=fyy(ib)-fy -+ fzz(ib)=fzz(ib)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdab(ii)*fx -+ strs(2)=strs(2)+xdab(ii)*fy -+ strs(3)=strs(3)+xdab(ii)*fz -+ strs(4)=strs(4)+ydab(ii)*fy -+ strs(5)=strs(5)+ydab(ii)*fz -+ strs(6)=strs(6)+zdab(ii)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc+gamma*rab*rab -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fx -+ fyy_loc(ia)=fyy_loc(ia)+fy -+ fzz_loc(ia)=fzz_loc(ia)+fz -+ -+ fxx_loc(ib)=fxx_loc(ib)-fx -+ fyy_loc(ib)=fyy_loc(ib)-fy -+ fzz_loc(ib)=fzz_loc(ib)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdab(ii)*fx -+ strs_loc(2)=strs_loc(2)+xdab(ii)*fy -+ strs_loc(3)=strs_loc(3)+xdab(ii)*fz -+ strs_loc(4)=strs_loc(4)+ydab(ii)*fy -+ strs_loc(5)=strs_loc(5)+ydab(ii)*fz -+ strs_loc(6)=strs_loc(6)+zdab(ii)*fz -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,444) -+ -+c sum contributions to potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engbnd -+ buffer(2)=virbnd -+ buffer(3)=bnd_fre -+ buffer(4)=bnd_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engbnd=buffer(1) -+ virbnd=buffer(2) -+ bnd_fre=buffer(3) -+ bnd_vir=buffer(4) -+ -+ if(lsolva)then -+ -+ call gdsum(bnd_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(bnd_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ deallocate (xdab,ydab,zdab,stat=fail) -+ -+ return -+ end subroutine bndfrc -+ -+ end module bonds_module -diff -urN dl_class_1.9.orig/srcmod/comms.inc dl_class_1.9/srcmod/comms.inc ---- dl_class_1.9.orig/srcmod/comms.inc 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/comms.inc 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,42 @@ -+c********************************************************************* -+c -+c dl_poly include file for MPI, PVM and SHMEM -+c copyright - daresbury laboratory -+c -+c********************************************************************* -+ -+CMPIU define mpipriv mpipriv_ -+ -+ include "mpif.h" -+ -+c parameters for message tags -+ -+ integer Xgcopy_tag, Merge1_tag -+ integer Dgsum_tag1, Dgsum_tag2 -+ integer Igmax_tag1, Igmax_tag2 -+ integer Igsum_tag1, Igsum_tag2 -+ integer Shmove_tag, Merge_tag -+ integer Merge4_tag, Shell_tag -+ integer Gstate_tag1, Gstate_tag2 -+ integer Passcon_tag, Msgtag -+ -+c MPI tagsizes -+ -+ parameter( -+ $ Xgcopy_tag = 105, -+ $ Dgsum_tag1 = 6001, -+ $ Dgsum_tag2 = 9001, -+ $ Igsum_tag1 = 12001, -+ $ Igsum_tag2 = 15001, -+ $ Shmove_tag = 18001, -+ $ Merge_tag = 6001, -+ $ Merge1_tag = 9001, -+ $ Merge4_tag = 12001, -+ $ Gstate_tag1 = 15001, -+ $ Gstate_tag2 = 18001, -+ $ Shell_tag = 21001, -+ $ Passcon_tag = 3001, -+ $ Igmax_tag1 = 24001, -+ $ Igmax_tag2 = 27001, -+ $ Msgtag = 30000) -+ -diff -urN dl_class_1.9.orig/srcmod/config_module.f dl_class_1.9/srcmod/config_module.f ---- dl_class_1.9.orig/srcmod/config_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/config_module.f 2015-11-16 17:18:13.402475437 +0100 -@@ -0,0 +1,103 @@ -+ module config_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining simulation configuration data -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ character*1 cfgname(80) -+ character*1 sysname(80) -+ real(8) cell(9),rcell(9),celprp(10) -+ real(8) eta(9),stress(9),stresl(9),strcns(9),strbod(9) -+ -+ character*8, allocatable :: atmnam(:) -+ real(8), allocatable :: xxx(:),yyy(:),zzz(:) -+ real(8), allocatable :: vxx(:),vyy(:),vzz(:) -+ real(8), allocatable :: fxx(:),fyy(:),fzz(:) -+ real(8), allocatable :: flx(:),fly(:),flz(:) -+ real(8), allocatable :: chge(:),weight(:),rmass(:) -+ integer, allocatable :: ltype(:),lstfrz(:) -+ integer, allocatable :: neulst(:),lstneu(:) -+ integer, allocatable :: lentry(:),list(:,:) -+ integer, allocatable :: lstout(:),link(:) -+ integer, allocatable :: lct(:),lst(:) -+ -+ real(8), allocatable :: buffer(:) -+ -+c PLUMED variables -+ logical, save :: lplumed -+c PLUMED variables -+ -+ save atmnam,neulst,lstneu,cfgname,sysname -+ save cell,xxx,yyy,zzz,vxx,vyy,vzz,fxx,fyy,fzz -+ save buffer,weight,chge,ltype,lstfrz,flx,fly,flz -+ save lentry,list,lstout,link,lct,lst,celprp,rmass -+ save eta,stress,stresl,strcns,rcell -+ -+ contains -+ -+ subroutine alloc_config_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining simulation configuration arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ integer, parameter :: nnn=27 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (xxx(mxatms),stat=fail(1)) -+ allocate (yyy(mxatms),stat=fail(2)) -+ allocate (zzz(mxatms),stat=fail(3)) -+ allocate (vxx(mxatms),stat=fail(4)) -+ allocate (vyy(mxatms),stat=fail(5)) -+ allocate (vzz(mxatms),stat=fail(6)) -+ allocate (fxx(mxatms),stat=fail(7)) -+ allocate (fyy(mxatms),stat=fail(8)) -+ allocate (fzz(mxatms),stat=fail(9)) -+ allocate (weight(mxatms),stat=fail(11)) -+ allocate (chge(mxatms),stat=fail(12)) -+ allocate (ltype(mxatms),stat=fail(13)) -+ allocate (lstfrz(mxatms),stat=fail(14)) -+ allocate (flx(mxatms),stat=fail(15)) -+ allocate (fly(mxatms),stat=fail(16)) -+ allocate (flz(mxatms),stat=fail(17)) -+ allocate (atmnam(mxatms),stat=fail(18)) -+ allocate (neulst(mxneut),stat=fail(19)) -+ allocate (lstneu(mxatms),stat=fail(20)) -+ allocate (lstout(mxatms),stat=fail(21)) -+ allocate (lentry(msatms),stat=fail(22)) -+ allocate (list(msatms,mxlist),stat=fail(23)) -+ allocate (link(mxatms),stat=fail(24)) -+ allocate (lct(mxcell),stat=fail(25)) -+ allocate (lst(mxcell),stat=fail(26)) -+ allocate (rmass(mxatms),stat=fail(27)) -+ allocate (buffer(mxbuff),stat=fail(10)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)then -+ if(idnode.eq.0)write(nrite,'(10i5)')fail -+ call error(idnode,1000) -+ endif -+ enddo -+ -+ end subroutine alloc_config_arrays -+ -+ end module config_module -diff -urN dl_class_1.9.orig/srcmod/config_module.f.preplumed dl_class_1.9/srcmod/config_module.f.preplumed ---- dl_class_1.9.orig/srcmod/config_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/config_module.f.preplumed 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,99 @@ -+ module config_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining simulation configuration data -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ character*1 cfgname(80) -+ character*1 sysname(80) -+ real(8) cell(9),rcell(9),celprp(10) -+ real(8) eta(9),stress(9),stresl(9),strcns(9),strbod(9) -+ -+ character*8, allocatable :: atmnam(:) -+ real(8), allocatable :: xxx(:),yyy(:),zzz(:) -+ real(8), allocatable :: vxx(:),vyy(:),vzz(:) -+ real(8), allocatable :: fxx(:),fyy(:),fzz(:) -+ real(8), allocatable :: flx(:),fly(:),flz(:) -+ real(8), allocatable :: chge(:),weight(:),rmass(:) -+ integer, allocatable :: ltype(:),lstfrz(:) -+ integer, allocatable :: neulst(:),lstneu(:) -+ integer, allocatable :: lentry(:),list(:,:) -+ integer, allocatable :: lstout(:),link(:) -+ integer, allocatable :: lct(:),lst(:) -+ -+ real(8), allocatable :: buffer(:) -+ -+ save atmnam,neulst,lstneu,cfgname,sysname -+ save cell,xxx,yyy,zzz,vxx,vyy,vzz,fxx,fyy,fzz -+ save buffer,weight,chge,ltype,lstfrz,flx,fly,flz -+ save lentry,list,lstout,link,lct,lst,celprp,rmass -+ save eta,stress,stresl,strcns,rcell -+ -+ contains -+ -+ subroutine alloc_config_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining simulation configuration arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ integer, parameter :: nnn=27 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (xxx(mxatms),stat=fail(1)) -+ allocate (yyy(mxatms),stat=fail(2)) -+ allocate (zzz(mxatms),stat=fail(3)) -+ allocate (vxx(mxatms),stat=fail(4)) -+ allocate (vyy(mxatms),stat=fail(5)) -+ allocate (vzz(mxatms),stat=fail(6)) -+ allocate (fxx(mxatms),stat=fail(7)) -+ allocate (fyy(mxatms),stat=fail(8)) -+ allocate (fzz(mxatms),stat=fail(9)) -+ allocate (weight(mxatms),stat=fail(11)) -+ allocate (chge(mxatms),stat=fail(12)) -+ allocate (ltype(mxatms),stat=fail(13)) -+ allocate (lstfrz(mxatms),stat=fail(14)) -+ allocate (flx(mxatms),stat=fail(15)) -+ allocate (fly(mxatms),stat=fail(16)) -+ allocate (flz(mxatms),stat=fail(17)) -+ allocate (atmnam(mxatms),stat=fail(18)) -+ allocate (neulst(mxneut),stat=fail(19)) -+ allocate (lstneu(mxatms),stat=fail(20)) -+ allocate (lstout(mxatms),stat=fail(21)) -+ allocate (lentry(msatms),stat=fail(22)) -+ allocate (list(msatms,mxlist),stat=fail(23)) -+ allocate (link(mxatms),stat=fail(24)) -+ allocate (lct(mxcell),stat=fail(25)) -+ allocate (lst(mxcell),stat=fail(26)) -+ allocate (rmass(mxatms),stat=fail(27)) -+ allocate (buffer(mxbuff),stat=fail(10)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)then -+ if(idnode.eq.0)write(nrite,'(10i5)')fail -+ call error(idnode,1000) -+ endif -+ enddo -+ -+ end subroutine alloc_config_arrays -+ -+ end module config_module -diff -urN dl_class_1.9.orig/srcmod/core_shell_module.f dl_class_1.9/srcmod/core_shell_module.f ---- dl_class_1.9.orig/srcmod/core_shell_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/core_shell_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,826 @@ -+ module core_shell_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining core_shell arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use pair_module -+ use parse_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use site_module -+ use solvation_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmshl(:,:) -+ integer, allocatable :: listshl(:,:) -+ integer, allocatable :: numshl(:),lstshl(:,:) -+ -+ save prmshl,listshl,numshl,lstshl -+ -+ contains -+ -+ subroutine alloc_csh_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining core_shell arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(4) -+ -+ do i=1,4 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmshl(mxtshl,2),stat=fail(1)) -+ allocate (numshl(mxtmls),stat=fail(2)) -+ allocate (lstshl(mxtshl,2),stat=fail(3)) -+ allocate (listshl(mxshl,3),stat=fail(4)) -+ -+ do i=1,4 -+ if(fail(i).gt.0)call error(idnode,1100) -+ enddo -+ -+ do i=1,mxtmls -+ numshl(i)=0 -+ enddo -+ -+ end subroutine alloc_csh_arrays -+ -+ subroutine define_core_shell -+ x (safe,idnode,itmols,nshels,nsite,keyshl,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining core-shell units -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ logical safe -+ integer idnode,itmols,nshels,nsite,ntmp,ishls -+ integer iatm1,iatm2,isite1,isite2,keyshl,kshl,idum -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numshl(itmols)=numshl(itmols)+ntmp -+ kshl=intstr(record,lenrec,idum) -+ if(keyshl.eq.0)then -+ keyshl=kshl -+ elseif(kshl.ne.keyshl)then -+ call error(idnode,1960) -+ endif -+ if(idnode.eq.0) then -+ -+ write(nrite, -+ x "(/,1x,'number of core-shell units',5x,i10)") -+ x ntmp -+ if(keyshl.eq.1)then -+ -+ write(nrite, -+ x "(/,/,1x,'core-shell details:',/,/,21x, -+ x 5x,'index',5x,'index',6x,'parameter')") -+ -+ else -+ -+ write(nrite, -+ x "(/,/,1x,'core-shell details:',/,/,21x, -+ x 6x,'core',5x,'shell',6x,'parameter')") -+ -+ endif -+ -+ endif -+ -+ do ishls=1,numshl(itmols) -+ -+ nshels=nshels+1 -+ if(nshels.gt.mxtshl) call error(idnode,57) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ lstshl(nshels,1)=iatm1 -+ lstshl(nshels,2)=iatm2 -+ prmshl(nshels,1)=dblstr(record,lenrec,idum) -+ prmshl(nshels,2)=dblstr(record,lenrec,idum) -+ if(idnode.eq.0) write(nrite, -+ x "(21x,2i10,2f15.4)") -+ x lstshl(nshels,1),lstshl(nshels,2), -+ x prmshl(nshels,1),prmshl(nshels,2) -+ -+c test for frozen cores or shells -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ if(lfzsit(isite1)*lfzsit(isite2).ne.0) -+ x call error(idnode,49) -+ -+c convert energy units to internal units -+ -+ prmshl(nshels,1)=prmshl(nshels,1)*engunit -+ prmshl(nshels,2)=prmshl(nshels,2)*engunit -+ -+ enddo -+ -+ return -+ end subroutine define_core_shell -+ -+ subroutine corshl(idnode,mxnode,ntshl,shlke) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating the internal kinetic -+c energy of core-shell units in the shell polarisation model -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith july 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m -+ real(8) shlke,ppp,ccc,sss -+ -+ shlke=0.d0 -+ -+c block indices -+ -+ ishl1=(idnode*ntshl)/mxnode+1 -+ ishl2=((idnode+1)*ntshl)/mxnode -+ -+c loop over all specified core-shell pairs -+ -+ m=0 -+ -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c indices of atoms involved -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+c calculate atom translational kinetic energy -+ -+ ppp=((weight(i)*vxx(i)+weight(j)*vxx(j))**2 -+ x +(weight(i)*vyy(i)+weight(j)*vyy(j))**2 -+ x +(weight(i)*vzz(i)+weight(j)*vzz(j))**2) -+ x /(weight(i)+weight(j)) -+ -+c calculate individual core and shell kinetic energies -+ -+ ccc=weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ sss=weight(j)*(vxx(j)**2+vyy(j)**2+vzz(j)**2) -+ -+c calculate core-shell internal kinetic energy -+ -+ shlke=shlke+0.5d0*(ccc+sss-ppp) -+ -+ enddo -+ -+c global average of core-shell internal kinetic energy -+ -+ if(mxnode.gt.1)then -+ buffer(1)=shlke -+ call gdsum(buffer(1),1,buffer(2)) -+ shlke=buffer(1) -+ endif -+ -+ return -+ end subroutine corshl -+ -+ subroutine put_shells_on_cores(idnode,mxnode,ntshl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for placing shells on top of cores in the -+c shell model at the start of a simulation -+c -+c copyright - daresbury laboratory -+c author - w. smith feb 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, allocatable :: ltop(:) -+ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m,fail -+ -+c allocate ltop array -+ -+ allocate(ltop(ntshl),stat=fail) -+ -+c block indices -+ -+ ishl1=(idnode*ntshl)/mxnode+1 -+ ishl2=((idnode+1)*ntshl)/mxnode -+ -+c zero ltop array -+ -+ do i=1,ntshl -+ ltop(i)=0 -+ enddo -+ -+c loop over all specified core-shell pairs -+ -+ m=0 -+ -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c indices of atoms involved -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+c set shell and core positions equal -+ -+ ltop(m)=j -+ xxx(j)=xxx(i) -+ yyy(j)=yyy(i) -+ zzz(j)=zzz(i) -+ -+ enddo -+ -+c merge data on different processors -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,ntshl,ltop,xxx,yyy,zzz,buffer) -+ -+c deallocate ltop array -+ -+ deallocate(ltop,stat=fail) -+ -+ return -+ end subroutine put_shells_on_cores -+ -+ subroutine shlfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntshl,engshl,virshl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating shell model spring energy and -+c force terms in molecular dynamics. -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith july 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lexcite,lselect -+ integer idnode,imcon,mxnode,ntshl,ishl1,ishl2,i,j,k,m,kk -+ real(8) engshl,virshl,rij2,omega,gamma,ffx,ffy,ffz,strs -+ -+ dimension strs(6) -+ -+c check adequate workspace is available -+ -+ if(mxxdf.lt.mxshl)call error(idnode,423) -+ -+c block indices -+ -+ ishl1=(idnode*ntshl)/mxnode+1 -+ ishl2=((idnode+1)*ntshl)/mxnode -+ -+c initialise accumulators -+ -+ engshl=0.d0 -+ virshl=0.d0 -+ shl_fre=0.d0 -+ shl_vir=0.d0 -+ -+ do i=1,6 -+ strs(i)=0.d0 -+ enddo -+ -+ if(lsolva)then -+ -+ lcomp(5)=.true. -+ shl_sol(:)=0.d0 -+ if(lexcite)shl_exc(:)=0.d0 -+ -+ endif -+ -+c calculate core-shell separation vectors -+ -+ m=0 -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c indices of core and shell -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+c components of bond vector -+ -+ xdf(m)=xxx(i)-xxx(j) -+ ydf(m)=yyy(i)-yyy(j) -+ zdf(m)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,m,cell,xdf,ydf,zdf) -+ -+c loop over all specified core-shell units -+ -+ m=0 -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c index of potential parameters -+ -+ kk=listshl(m,1) -+ -+c core-shell separation -+ -+ rij2=xdf(m)**2+ydf(m)**2+zdf(m)**2 -+ -+c calculate scalar constant terms -+ -+ omega=(0.5d0*prmshl(kk,1)+0.25d0*prmshl(kk,2)*rij2)*rij2 -+ gamma=prmshl(kk,1)+prmshl(kk,2)*rij2 -+ -+c indices of core and shell -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+c set selection control -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(i).ne.1).and.(atm_fre(j).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(i)+atm_fre(i).eq.0) -+ -+ if(lsolva)then -+ shl_exc(atmolt(i))=shl_exc(atmolt(i))+omega -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(i).eq.1).or.(atm_fre(j).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ shl_fre=shl_fre-omega -+ shl_vir=shl_vir-gamma*rij2 -+ omega=lambda1*omega -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(i).eq.2).or.(atm_fre(j).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ shl_fre=shl_fre+omega -+ shl_vir=shl_vir+gamma*rij2 -+ omega=lambda2*omega -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate spring energy and virial -+ -+ engshl=engshl+omega -+ virshl=virshl+gamma*rij2 -+ -+ if(lsolva)then -+ shl_sol(atmolt(i))=shl_sol(atmolt(i))+omega -+ endif -+ -+c calculate spring forces -+ -+ ffx=-gamma*xdf(m) -+ ffy=-gamma*ydf(m) -+ ffz=-gamma*zdf(m) -+ -+ fxx(i)=fxx(i)+ffx -+ fyy(i)=fyy(i)+ffy -+ fzz(i)=fzz(i)+ffz -+ -+ fxx(j)=fxx(j)-ffx -+ fyy(j)=fyy(j)-ffy -+ fzz(j)=fzz(j)-ffz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*ffx -+ strs(2)=strs(2)+xdf(m)*ffy -+ strs(3)=strs(3)+xdf(m)*ffz -+ strs(4)=strs(4)+ydf(m)*ffy -+ strs(5)=strs(5)+ydf(m)*ffz -+ strs(6)=strs(6)+zdf(m)*ffz -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+c sum contributions to potential and virial -+ -+ if(mxnode.gt.1) then -+ -+ buffer(1)=engshl -+ buffer(2)=virshl -+ buffer(3)=shl_fre -+ buffer(4)=shl_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engshl=buffer(1) -+ virshl=buffer(2) -+ shl_fre=buffer(3) -+ shl_vir=buffer(4) -+ -+c sum up solvation energies -+ -+ if(lsolva)then -+ -+ call gdsum(shl_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(shl_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine shlfrc -+ -+ subroutine check_shells(idnode,itmols,nshels,ngrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to check no core-shell units are in -+c rigid bodies -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,itmols,nshels,ngrp,k1,ia,ib,kk -+ integer id,jj,ia1,jk,ib1 -+ -+ nshels=nshels-numshl(itmols) -+ do k1=1,numshl(itmols) -+ -+ nshels=nshels+1 -+ ia=lstshl(nshels,1) -+ ib=lstshl(nshels,2) -+ -+ ngrp=ngrp-numgrp(itmols) -+ -+ do kk=1,numgrp(itmols) -+ -+ ngrp=ngrp+1 -+ id=listyp(ngrp) -+ -+ do jj=1,numgsit(id)-1 -+ -+ ia1=lstgst(ngrp,jj) -+ if(ia1.eq.ia) then -+ -+ do jk=jj,numgsit(id) -+ -+ ib1=lstgst(ngrp,jk) -+ if(ib1.eq.ib) then -+ -+ if(idnode.eq.0)write(nrite,'(/,13x,a,2i10)') -+ x 'error: sites ',ia,ib -+ call error(idnode,456) -+ -+ endif -+ -+ enddo -+ -+ elseif(ia1.eq.ib) then -+ -+ do jk=jj,numgsit(id) -+ -+ ib1=lstgst(ngrp,jk) -+ if(ib1.eq.ia) then -+ -+ if(idnode.eq.0)write(nrite,'(/,13x,a,2i10)') -+ x 'error: sites ',ia,ib -+ call error(idnode,456) -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ enddo -+ enddo -+ -+ return -+ end subroutine check_shells -+ -+ subroutine relax_shells -+ x (relaxed,keyrlx,idnode,mxnode,natms,ntpmls,tstep,rlxtol) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for relaxing shells to zero force -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical relaxed,newjob -+ integer keyrlx,idnode,mxnode,natms,i,j,itmols,imols -+ integer iatm1,iatm2,fail,numopt,isite,ishls,jshls,lshls,ntpmls -+ integer nbuff -+ real(8) hnorm,grad0,grad1,grad2,stride,tstep,step -+ real(8) ggg,gam2,sgn,rlxtol -+ -+ dimension fail(4) -+ -+ integer, allocatable :: lstopt(:) -+ real(8), allocatable :: ggx(:),ggy(:),ggz(:) -+ real(8), allocatable :: hhx(:),hhy(:),hhz(:) -+ real(8), allocatable :: oxx(:),oyy(:),ozz(:) -+ -+ save hnorm,grad0,grad1,grad2,stride,lstopt -+ save ggx,ggy,ggz,hhx,hhy,hhz,oxx,oyy,ozz,numopt,nbuff,sgn -+ -+ data newjob/.true./,fail/0,0,0,0/ -+ -+c define initial data -+ -+ if(newjob)then -+ -+ newjob=.false. -+ allocate(lstopt(mxatms),stat=fail(1)) -+ allocate(ggx(mxatms),ggy(mxatms),ggz(mxatms),stat=fail(2)) -+ allocate(hhx(mxatms),hhy(mxatms),hhz(mxatms),stat=fail(3)) -+ allocate(oxx(mxatms),oyy(mxatms),ozz(mxatms),stat=fail(4)) -+ do i=1,4 -+ if(fail(i).ne.0)call error(idnode,1970) -+ enddo -+ -+c identify the shells -+ -+ isite=0 -+ ishls=0 -+ jshls=0 -+ do i=1,natms -+ -+ lstopt(i)=0 -+ -+ enddo -+ do itmols=1,ntpmls -+ -+ do imols=1,nummols(itmols) -+ -+ do lshls=1,numshl(itmols) -+ -+ ishls=ishls+1 -+ lstopt(lstshl(lshls+jshls,2)+isite)=1 -+ -+ enddo -+ -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ jshls=jshls+numshl(itmols) -+ -+ enddo -+ -+ numopt=ishls -+ -+ endif -+ -+c load coordinates of shells -+ -+ j=0 -+ do i=1,natms -+ -+ if(lstopt(i).gt.0)then -+ -+ j=j+1 -+ oxx(j)=xxx(i) -+ oyy(j)=yyy(i) -+ ozz(j)=zzz(i) -+ ggx(j)=fxx(i) -+ ggy(j)=fyy(i) -+ ggz(j)=fzz(i) -+ -+ endif -+ -+ enddo -+ -+c step length for relaxation -+ -+ step=tstep**2 -+ -+c define atoms for this nodes -+ -+ iatm1=(idnode*numopt)/mxnode+1 -+ iatm2=((idnode+1)*numopt)/mxnode -+ -+ ggg=0.d0 -+ do i=iatm1,iatm2 -+ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 -+ enddo -+ if(mxnode.gt.1)then -+ buffer(1)=ggg -+ call gdsum(buffer(1),1,buffer(2)) -+ ggg=buffer(1) -+ endif -+ ggg=sqrt(ggg) -+ -+c check convergence -+ -+ if(abs(ggg)/dble(numopt).lt.rlxtol)then -+ -+ relaxed=.true. -+ return -+ -+ endif -+ -+ if(keyrlx.eq.0) then -+ -+c set original search direction -+ -+ hnorm=ggg -+ grad0=ggg -+ grad2=ggg -+ do i=iatm1,iatm2 -+ -+ hhx(i)=ggx(i) -+ hhy(i)=ggy(i) -+ hhz(i)=ggz(i) -+ oxx(i)=oxx(i)+step*hhx(i) -+ oyy(i)=oyy(i)+step*hhy(i) -+ ozz(i)=ozz(i)+step*hhz(i) -+ -+ enddo -+ keyrlx=1 -+ sgn=1.d0 -+ -+ elseif(keyrlx.eq.1)then -+ -+c line search along chosen direction -+ -+ grad1=grad2 -+ grad2=0.d0 -+ do i=iatm1,iatm2 -+ grad2=grad2+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) -+ enddo -+ if(mxnode.gt.1)then -+ buffer(1)=grad2 -+ call gdsum(buffer(1),1,buffer(2)) -+ grad2=buffer(1) -+ endif -+ grad2=sgn*grad2/hnorm -+ -+c linear extrapolation to minimum -+ -+ stride=sgn*step -+ if(grad2.lt.0.d0)then -+ -+ keyrlx=2 -+ stride=sgn*step*grad2/(grad1-grad2) -+ -+ endif -+ -+ do i=iatm1,iatm2 -+ -+ oxx(i)=oxx(i)+stride*hhx(i) -+ oyy(i)=oyy(i)+stride*hhy(i) -+ ozz(i)=ozz(i)+stride*hhz(i) -+ -+ enddo -+ -+ elseif(keyrlx.eq.2)then -+ -+c construct conjugate search vector -+ -+ gam2=(ggg/grad0)**2 -+ hnorm=0.d0 -+ grad0=ggg -+ grad2=0.d0 -+ do i=iatm1,iatm2 -+ -+ hhx(i)=ggx(i)+gam2*hhx(i) -+ hhy(i)=ggy(i)+gam2*hhy(i) -+ hhz(i)=ggz(i)+gam2*hhz(i) -+ hnorm=hnorm+hhx(i)**2+hhy(i)**2+hhz(i)**2 -+ grad2=grad2+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) -+ -+ enddo -+ if(mxnode.gt.1)then -+ -+ buffer(1)=hnorm -+ buffer(2)=grad2 -+ call gdsum(buffer(1),2,buffer(3)) -+ hnorm=buffer(1) -+ grad2=buffer(2) -+ -+ endif -+ hnorm=sqrt(hnorm) -+ grad2=grad2/hnorm -+ sgn=sign(1.d0,grad2) -+ grad2=sgn*grad2 -+ -+ do i=iatm1,iatm2 -+ -+ oxx(i)=oxx(i)+sgn*step*hhx(i) -+ oyy(i)=oyy(i)+sgn*step*hhy(i) -+ ozz(i)=ozz(i)+sgn*step*hhz(i) -+ -+ enddo -+ -+ keyrlx=1 -+ -+ endif -+ -+c merge coordinate arrays -+ -+ if(mxnode.gt.1)then -+ -+ nbuff=6*(numopt+mxnode-1)/mxnode -+ call merge(idnode,mxnode,numopt,nbuff,oxx,oyy,ozz,buffer) -+ -+ endif -+ -+c unload coordinates of shells -+ -+ j=0 -+ do i=1,natms -+ -+ if(lstopt(i).gt.0)then -+ -+ j=j+1 -+ xxx(i)=oxx(j) -+ yyy(i)=oyy(j) -+ zzz(i)=ozz(j) -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine relax_shells -+ -+ end module core_shell_module -diff -urN dl_class_1.9.orig/srcmod/coulomb_module.f dl_class_1.9/srcmod/coulomb_module.f ---- dl_class_1.9.orig/srcmod/coulomb_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/coulomb_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1542 @@ -+ module coulomb_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining coulomb terms -+c copyright - daresbury laboratory -+c -+c author - w. smith sep 2003 -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ewald_module -+ use metafreeze_module -+ use pair_module -+ use property_module -+ use setup_module -+ use solvation_module -+ -+ implicit none -+ -+ contains -+ -+ subroutine coul0 -+ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic force. -+c 1/r potential, no truncation or damping -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester february 1993 -+c stress tensor - t.forester may 1994 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,kkk -+ real(8) rcsq,chgea,rsq,chgprd,rrr,coul,fcoul,fi,fx,fy,fz -+ real(8) engcpe,vircpe,rcut,epsq,strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ chgea=chge(iatm)/epsq*r4pie0 -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ -+c coulomb potential and force -+ -+ coul=chgprd/rrr -+ fcoul=coul/rsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+coul -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-coul -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate forces -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-coul -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul0 -+ -+ subroutine coul1 -+ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces -+c assuming a standard coulomb potential truncated at rcut -+c and shifted to zero at rcut. -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith december 1992. -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c stress tensor t.forester may 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,kkk -+ real(8) engcpe,vircpe,rcut,epsq,rcsq,chgea,rsq -+ real(8) fi,chgprd,omega,egamma,fx,fy,fz,rrr -+ real(8) strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+ chgea=chge(iatm)*r4pie0/epsq -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+c start of primary loop for forces evaluation -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10) then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ -+c calculate potential energy and virial -+ -+ omega=chgprd*(rcut-rrr)/(rrr*rcut) -+ egamma=chgprd/(rrr*rsq) -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+omega -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-omega -+ cou_vir=cou_vir+egamma*rsq -+ omega=lambda1*omega -+ egamma=lambda1*egamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+omega -+ cou_vir=cou_vir-egamma*rsq -+ omega=lambda2*omega -+ egamma=lambda2*egamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engcpe=engcpe+omega -+ vircpe=vircpe-egamma*rsq -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+omega -+ -+c calculate forces -+ -+ fx=egamma*xdf(m) -+ fy=egamma*ydf(m) -+ fz=egamma*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc-egamma*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul1 -+ -+ subroutine coul2 -+ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces -+c assuming a distance dependant dielectric `constant'. -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester april 1993 -+c stress tensor added - t.forester may 1994 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,kkk -+ real(8) engcpe,vircpe,rcut,epsq -+ real(8) fi,rcsq,chgea,chgprd,rsq,rrsq,coul,egamma,fx,fy,fz -+ real(8) strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+ chgea=chge(iatm)/epsq*r4pie0 -+ if(abs(chgea).gt.1.d-10)then -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+c calculate potential energy and Virial -+ -+ rrsq=1.d0/rsq -+ coul=chgprd*rrsq -+ egamma=2.d0*coul*rrsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+2.d0*coul -+ coul=lambda1*coul -+ egamma=lambda1*egamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-2.d0*coul -+ coul=lambda2*coul -+ egamma=lambda2*egamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and Virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-2.d0*coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate forces -+ -+ fx=egamma*xdf(m) -+ fy=egamma*ydf(m) -+ fz=egamma*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-2.d0*coul -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul2 -+ -+ subroutine coul3 -+ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic force. -+c reaction field potential -+c Ref: M Neumann, J Chem Phys, 82, 5633, (1985) -+c adapted for fennell-gezelter coulombic model -+c by w.smith june 2007 -+c Ref: CJ Fennell and JD Gezelter, J Chem Phys, -+c 124, 234104, (2006) -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1995 -+c author - t. forester february 1995 -+c stress tensor - t.forester feb 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,l,kkk -+ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,fi,rcsq -+ real(8) b0,rfld0,rfld1,rfld2,chgea,chgprd,rsq,coul,omega -+ real(8) fx,fy,fz,fcoul,rrr,vk0,vk1,vk2,gk0,gk1,gk2,t1,t2 -+ real(8) strs(6),strs_loc(6) -+ dimension fi(3) -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c reaction field terms -+ -+ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) -+ rfld0=b0/rcut**3 -+ rfld1=(1.d0+b0*0.5d0)/rcut -+ rfld2=rfld0*0.5d0 -+ -+c screened coulomb terms -+ -+ vcon=erc(mxegrd-4)+rfld2*rcut**2-rfld1 -+ fcon=rcut*fer(mxegrd-4)-rfld0*rcut -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ rdr=dble(mxegrd-4)/rcut -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ chgea=chge(iatm)*r4pie0 -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ -+c calculate potential energy using 3-point interpolation -+ -+ vk0=erc(l) -+ vk1=erc(l+1) -+ vk2=erc(l+2) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ omega=t1+(t2-t1)*ppp*0.5d0-vcon+fcon*(rrr-rcut) -+ coul=chgprd*(omega+rfld2*rsq-rfld1) -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=fer(l) -+ gk1=fer(l+1) -+ gk2=fer(l+2) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ fcoul=chgprd*((t1+(t2-t1)*ppp*0.5d0)-fcon/rrr-rfld0) -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+fcoul*rsq -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-fcoul*rsq -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate coulombic energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-fcoul*rsq -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate coulombic force -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-fcoul*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul3 -+ -+ subroutine coul4 -+ X (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces -+c assuming a force shifted coulomb potential. -+c adapted for fennell-gezelter coulombic model -+c by w.smith may 2007 -+c Ref: CJ Fennell and JD Gezelter, J Chem Phys, -+c 124, 234104, (2006) -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1995 -+c author - t.forester october 1995 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,l,kkk -+ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,fi,rcsq,coul -+ real(8) strs9,chgea,chgprd,rsq,rrr,omega,fcoul,fx,fy,fz -+ real(8) vk0,vk1,vk2,gk0,gk1,gk2,t1,t2 -+ real(8) strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c screened coulomb terms -+ -+ vcon=erc(mxegrd-4) -+ fcon=rcut*fer(mxegrd-4) -+ rdr=dble(mxegrd-4)/rcut -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+ chgea=chge(iatm)*r4pie0/epsq -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+c start of primary loop for forces evaluation -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ -+c calculate potential energy using 3-point interpolation -+ -+ vk0=erc(l) -+ vk1=erc(l+1) -+ vk2=erc(l+2) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ omega=t1+(t2-t1)*ppp*0.5d0 -+ coul=chgprd*(omega-vcon+fcon*(rrr-rcut)) -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=fer(l) -+ gk1=fer(l+1) -+ gk2=fer(l+2) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ fcoul=chgprd*((t1+(t2-t1)*ppp*0.5d0)-fcon/rrr) -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+fcoul*rsq -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-fcoul*rsq -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate the coulombic energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-fcoul*rsq -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate coulombic forces -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-fcoul*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul4 -+ -+ subroutine coul_nsq -+ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, -+ x engcpe,vircpe) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic potential and forces -+c for the all-pairs algorithm beyond the range of the normal cutoff -+c i.e. the 'tertiary' forces. frozen atom option included -+c -+c to be used with multiple_nsq -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w.smith august 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip -+ integer natms,idnode,mxnode,imcon,ibig,i,last,mpm2 -+ integer npm2,m,ii,j,idum,kkk -+ real(8) engcpe,epsq,rcut,vircpe,rsq,rrr,chgprd,fcoul,coul,rct2 -+ -+ lskip=(lfree.or.lghost) -+ -+c zero energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c zero force arrays -+ -+ do i=1,natms -+ -+ flx(i)=0.d0 -+ fly(i)=0.d0 -+ flz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stresl(i)=0.d0 -+ enddo -+ -+c zero solvation and excitation accumulators -+ -+ if(lsolva)then -+ -+ cou_sol_lng(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc_lng(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c set control variables -+ -+ last=natms -+ mpm2=natms/2 -+ npm2=(natms-1)/2 -+ -+c set cutoff radius -+ -+ rct2=rcut**2 -+ -+c outer loop over atoms -+ -+ do m=1,mpm2 -+ -+ if(m.gt.npm2)last=mpm2 -+ -+c inner loop over atoms -+ -+ ii=0 -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ if(lskip)then -+ if(atm_fre(i)*atm_fre(j).eq.2)cycle -+ endif -+ -+c calculate interatomic displacements -+ -+ ii=ii+1 -+ xdf(ii)=xxx(i)-xxx(j) -+ ydf(ii)=yyy(i)-yyy(j) -+ zdf(ii)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c apply minimum image convention -+ -+ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) -+ -+c calculate coulomb terms -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ if(lskip)then -+ if(atm_fre(i)*atm_fre(j).eq.2)cycle -+ endif -+ -+ ii=ii+1 -+ if(lstfrz(i).eq.0.or.lstfrz(j).eq.0)then -+ -+c reject frozen atoms and calculate interatomic distance -+ -+ rsq=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ -+c running check of neighbour list array capacity -+ -+ if(rsq.ge.rct2)then -+ -+ chgprd=chge(i)*chge(j)*r4pie0/epsq -+ rrr=sqrt(rsq) -+ -+c calculate potential energy and force -+ -+ coul=chgprd/rrr -+ fcoul=coul/rsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(i),atmolt(j)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(i).ne.1).and.(atm_fre(j).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(i)+atm_fre(j).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc_lng(kkk)=cou_exc_lng(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(i).eq.1).or.(atm_fre(j).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+coul -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(i).eq.2).or.(atm_fre(j).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-coul -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol_lng(kkk)=cou_sol_lng(kkk)+coul -+ -+c calculate forces -+ -+ flx(i)=flx(i)+fcoul*xdf(ii) -+ fly(i)=fly(i)+fcoul*ydf(ii) -+ flz(i)=flz(i)+fcoul*zdf(ii) -+ -+ flx(j)=flx(j)-fcoul*xdf(ii) -+ fly(j)=fly(j)-fcoul*ydf(ii) -+ flz(j)=flz(j)-fcoul*zdf(ii) -+ -+c stress tensor -+ -+ stresl(1)=stresl(1)+xdf(ii)*fcoul*xdf(ii) -+ stresl(2)=stresl(2)+xdf(ii)*fcoul*ydf(ii) -+ stresl(3)=stresl(3)+xdf(ii)*fcoul*zdf(ii) -+ stresl(5)=stresl(5)+ydf(ii)*fcoul*ydf(ii) -+ stresl(6)=stresl(6)+ydf(ii)*fcoul*zdf(ii) -+ stresl(9)=stresl(9)+zdf(ii)*fcoul*zdf(ii) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c complete stress tensor -+ -+ stresl(4)=stresl(2) -+ stresl(7)=stresl(3) -+ stresl(8)=stresl(6) -+ -+ return -+ end subroutine coul_nsq -+ -+ end module coulomb_module -diff -urN dl_class_1.9.orig/srcmod/define_system_module.f dl_class_1.9/srcmod/define_system_module.f ---- dl_class_1.9.orig/srcmod/define_system_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/define_system_module.f 2015-11-16 17:18:13.422475594 +0100 -@@ -0,0 +1,6004 @@ -+ module define_system_module -+ -+c*********************************************************************** -+c -+c dl_poly module for utility subroutines and functions -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - p.-a. cazade oct 2007, solvation, free energy -+c and excitation -+c adapted - d. quigley nov 2010, metadynamics -+c -+c*********************************************************************** -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use dihedral_module -+ use ensemble_tools_module -+ use error_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use inversion_module -+ use metafreeze_module -+ use metal_module -+ use parse_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use vdw_module -+ -+ contains -+ -+ subroutine simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading in the simulation control -+c parameters -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992. -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c modified -+c author - t.forester may 1993 -+c amended - t.forester sept 1994 - dl_poly_1.1 -+c amended - t.forester nov 1994 - macro version -+c amended - w.smith dec 1994 - t3d adaptation -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit,seek -+ character*1 hms -+ character*1 directive(lenrec) -+ logical lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,lpsoc -+ logical ltscal,lzeql,loptim,ltraj,lfcap,lgofr,lpgr,lpres,safe -+ logical lstep,ltemp,lcut,ldelr,lprim,lforc,lens,lvdw,lrvdw,kill -+ logical lnsq,lzden,lewald,lspme,lhke,loop,lzero,nolink,newgau -+ logical lminim,lminopt,ltad,lneb,lhit,lbpd,prechk,tadall,nebgo -+ integer idnode,intsta,istraj,keyens,keyfce,keyres,nstbpo,nsbzdn -+ integer keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,khit,nhit -+ integer nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,ntrack -+ integer idum,imcon,keyver,keytol,nblock,blkout,numgau -+ integer minstp,numneb,i,keybpd,mode,nsolva,isolva,nofic -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,rlxtol,opttol -+ real(8) eps,tol,fm,densvar,delrdf,delzdn,zlen,ehit,hyp_units -+ real(8) catchrad,sprneb,deltad,tlow,xhit,yhit,zhit,ebias,vmin -+ real(8) prntim -+ -+CSGIC real(8) dummy -+CCRAY real(8) dummy -+CFFTWc FFTW instruction codes -+CFFTW -+CFFTW integer FFTW_FORWARD,FFTW_BACKWARD -+CFFTW parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) -+CFFTW -+CFFTW integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL -+CFFTW parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) -+CFFTW -+CFFTW integer FFTW_ESTIMATE,FFTW_MEASURE -+CFFTW parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) -+CFFTW -+CFFTW integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM -+CFFTW parameter (FFTW_OUT_OF_PLACE=0) -+CFFTW parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) -+CFFTW -+CFFTW integer FFTW_THREADSAFE -+CFFTW parameter (FFTW_THREADSAFE=128) -+CFFTW -+ -+c intitialize system variables: temperature,pressure,ensemble key -+c force key, cutoff, primary cutoff, verlet shell width, relative -+c dielectric constant,timestep,temperature scaling flag, -+c temp scaling interval -+ -+ mode=0 -+ nhko=0 -+ nlatt=0 -+ nsteql=0 -+ nstrun=0 -+ minstp=0 -+ keybpd=0 -+ keyres=0 -+ keyens=0 -+ keyver=0 -+ taut=0.d0 -+ nstbts=0 -+ nstbgr=0 -+ nsbzdn=0 -+ nstbpo=100 -+ nstack=mxstak -+ intsta=0 -+ nstraj=0 -+ istraj=1 -+ keytrj=0 -+ numgau=1 -+ alpha=0.d0 -+ kmax1=0 -+ kmax2=0 -+ kmax3=0 -+ nospl=min(8,mxspl) -+ isolva=1 -+ nsolva=0 -+ niswitch=0 -+ nswitch=0 -+ nofic=1000 -+ -+ fmax=1000.d0 -+ keyfce=0 -+ multt=1 -+ keytol=0 -+ tstep=0.d0 -+ temp=0.d0 -+ press=0.d0 -+ rcut=0.d0 -+ rprim=0.d0 -+ rvdw=0.d0 -+ delr=0.d0 -+ epsq=1.d0 -+ rlxtol=1.d0 -+ opttol=1.d0 -+ tolnce=1.d-8 -+ quattol=1.d-8 -+ timjob=0.d0 -+ timcls=0.d0 -+ delrdf=0.d0 -+ delzdn=0.d0 -+ zlen=0.d0 -+ ehit=0.d0 -+ xhit=0.d0 -+ yhit=0.d0 -+ zhit=0.d0 -+ vmin=0.d0 -+ ebias=0.d0 -+ catchrad=0.d0 -+ pfree=0.d0 -+ -+ lhit=.false. -+ lbpd=.false. -+ ltad=.false. -+ lneb=.false. -+ loop=.true. -+ lnfic=.false. -+ lpsoc=.false. -+ lzero=.false. -+ ltscal=.false. -+ lewald=.false. -+ lspme=.false. -+ lhke=.false. -+ lgofr=.false. -+ lpgr=.false. -+ lzeql=.true. -+ loptim=.false. -+ lminim=.false. -+ lminopt=.false. -+ ltraj=.false. -+ lfcap=.false. -+ ltemp=.false. -+ lstep=.false. -+ lcut=.false. -+ ldelr=.false. -+ lprim=.false. -+ lforc=.false. -+ lens=.false. -+ lvdw=.false. -+ lrvdw=.false. -+ lpres=.false. -+ kill=.false. -+ lnsq=.false. -+ lzden=.false. -+ nolink=.false. -+ newgau=.false. -+ prechk=.false. -+ tadall=.false. -+ lsolva=.false. -+ lfree=.false. -+ lfrmas=.false. -+ lexcite=.false. -+ lswitch=.false. -+ lghost=.false. -+ nebgo=.true. -+ seek='all ' -+ -+c open the simulation input file -+ -+ if(idnode.eq.0)open(nread,file='CONTROL',status='old') -+ -+ -+c PlUMED defaults -+ lplumed=.false. -+c PLUMED defaults -+c read job title -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ -+ call copystring(record,sysname,80) -+ if(idnode.eq.0)then -+ -+ write(nrite,"(3(1x,120('*'),/),1x,15('*'),5x,80a1,5x,15('*'),/, -+ x 3(1x,120('*'),/),/,/,1x,'SIMULATION CONTROL PARAMETERS',/)") -+ x sysname -+ -+ endif -+ -+c read and process directives from CONTROL file -+ -+ do while(loop) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ -+c convert to lowercase and strip out leading blanks -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.' ')then -+ -+c record is commented out -+ cycle -+ -+ elseif(findstring('redirect',directive,idum))then -+ -+c ignore this option in this context -+ -+c PLUMED modifications -+ elseif(findstring('plumed',directive,idum))then -+ if(findstring('on',directive,idum)) lplumed=.true. -+ if(findstring('off',directive,idum)) lplumed=.false. -+c PLUMED modifications -+ cycle -+ -+ elseif(findstring('steps',directive,idum))then -+ -+c number of timesteps -+ -+ nstrun=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'selected number of timesteps',3x,i10)")nstrun -+ -+ elseif(findstring('integ',directive,idum))then -+ -+c choice of integration algorithm -+ -+ if(findstring('leapfrog',directive,idum))then -+ -+ keyver=0 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'leapfrog verlet integration selected')") -+ -+ elseif(findstring('velocity',directive,idum))then -+ -+ keyver=1 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'velocity verlet integration selected')") -+ -+ endif -+ -+ elseif(findstring('no fic',directive,idum))then -+ -+c cancel possible "flying ice cube" in Berendsen thermostats -+ -+ lnfic=.true. -+ nofic=intstr(directive,lenrec,idum) -+ -+ elseif(findstring('shells',directive,idum).and. -+ x findstring('on',directive,idum).and. -+ x findstring('cores',directive,idum))then -+ -+c put shells on cores at start - shell model only (else null) -+ -+ lpsoc=.true. -+ -+ elseif(findstring('densvar',directive,idum))then -+ -+c specify allowed density variation -+ -+ densvar=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'allowed density variation ',3x,1p,e12.4)") -+ x densvar -+ -+ elseif(findstring('no link',directive,idum))then -+ -+c switch off link cell option -+ -+ nolink=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'link cells option deactivated')") -+ -+ elseif(findstring('equil',directive,idum))then -+ -+c number of equilibration timesteps -+ -+ nsteql=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'equilibration period ',3x,i10)")nsteql -+ -+ elseif(findstring('restart',directive,idum))then -+ -+c restart control -+ -+ if(findstring('noscale',directive,idum))then -+ -+ keyres=3 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'noscale restart requested')") -+ -+ elseif(findstring('scale',directive,idum))then -+ -+ keyres=2 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'scaled restart requested')") -+ -+ else -+ -+ keyres=1 -+ if(idnode.eq.0)write(nrite,"(/,1x,'restart requested')") -+ -+ endif -+ -+ elseif(findstring('ensemble',directive,idum))then -+ -+c ensemble selection -+ -+ call ensemble_selection(directive,lens,kill,idnode,keyens, -+ x mode,taut,taup) -+ -+ elseif(findstring('regauss',directive,idum))then -+ -+c re-initialise velocities option (regaussing) -+ -+ newgau=.true. -+ numgau=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'regaussing option activated', -+ x /,1x,'regaussing interval set to ',3x,i10)") -+ x numgau -+ -+ elseif(findstring('scale',directive,idum))then -+ -+ nstbts=intstr(directive,lenrec,idum) -+ if(nstbts.gt.0)then -+ ltscal=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'temperature scaling on' -+ x /,1x,'temperature scaling interval',3x,i10)") -+ x nstbts -+ -+ endif -+ -+ elseif(findstring('rdf',directive,idum))then -+ -+ if(findstring('print',directive,idum))then -+ -+ lpgr=.true. -+ lpgr=(lgofr.and.lpgr) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'g(r) printing option on ')") -+ -+ else -+ -+ lgofr=.true. -+ nstbgr=intstr(directive,lenrec,idum) -+ delrdf=dblstr(directive,lenrec,idum) -+ if(nstbgr.eq.0)nstbgr=10 -+ if(delrdf.lt.1.d-8)delrdf=0.05d0 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'radial distribution functions on ', -+ x /,1x,'g(r) collection interval ',3x,i10)")nstbgr -+ write(nrite, -+ x "(1x,'g(r) bin width ',3x,1p,e12.4)") -+ x delrdf -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('zden',directive,idum))then -+ -+ lzden=.true. -+ nsbzdn=intstr(directive,lenrec,idum) -+ delzdn=dblstr(directive,lenrec,idum) -+ zlen=dblstr(directive,lenrec,idum) -+ if(nsbzdn.eq.0)nsbzdn=10 -+ if(delzdn.lt.1.d-8)then -+ zlen=0.1d0*dble(mxzdn) -+ delzdn=0.1d0 -+ elseif(zlen.lt.1.d-8)then -+ zlen=delzdn*dble(mxzdn) -+ endif -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'Z density profile requested', -+ x /,1x,'zdensity collection interval',3x,i10)")nsbzdn -+ write(nrite, -+ x "(1x,'zdensity bin width ',3x,1p,e12.4)") -+ x delzdn -+ write(nrite, -+ x "(1x,'zdensity range ',3x,1p,e12.4)") -+ x zlen -+ -+ endif -+ -+ elseif(findstring('collect',directive,idum))then -+ -+ lzeql=.false. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'equilibration included in overall averages')") -+ -+ elseif(findstring('neb',directive,idum))then -+ -+c activate nudged elastic band option -+ -+ call neb_option(directive,lneb,lminopt,idnode, -+ x numneb,keytol,sprneb,opttol,hyp_units) -+ -+ elseif(findstring('impact',directive,idum))then -+ -+c activate the impact option -+ -+ if(lhit)call error(idnode,516) -+ lhit=.true. -+ khit=intstr(directive,lenrec,idum) -+ nhit=intstr(directive,lenrec,idum) -+ ehit=dblstr(directive,lenrec,idum) -+ xhit=dblstr(directive,lenrec,idum) -+ yhit=dblstr(directive,lenrec,idum) -+ zhit=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,1x,'impact option selected')") -+ write(nrite,"( -+ x /,1x,'identity of impact atom ',i10, -+ x /,1x,'time step of impact ',i10, -+ x /,1x,'impact recoil energy (keV) ',1p,e12.4, -+ x /,1x,'impact direction (x component) ',1p,e12.4, -+ x /,1x,'impact direction (y component) ',1p,e12.4, -+ x /,1x,'impact direction (z component) ',1p,e12.4)") -+ x khit,nhit,ehit,xhit,yhit,zhit -+ -+ endif -+ -+c convert impact energy from keV to internal units -+ -+ ehit=ehit*9648530.821d0 -+ -+ elseif(findstring('bpd',directive,idum))then -+ -+c activate the BPD option -+ -+ call bpd_option(directive,seek,lbpd,ltad,lminopt,prechk, -+ x nebgo,keybpd,idnode,nblock,ntrack,keytol,ebias,vmin, -+ x catchrad,sprneb,opttol,hyp_units) -+ -+ elseif(findstring('tad',directive,idum))then -+ -+c activate temperature accelerated dynamics option -+ -+ call tad_option(directive,ltad,lbpd,lminopt,prechk,tadall, -+ x idnode,nblock,ntrack,blkout,keytol,catchrad,sprneb,tlow, -+ x deltad,opttol,hyp_units) -+ -+ elseif(findstring('minim',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ if(findstring('forc',directive,idum))keytol=0 -+ if(findstring('ener',directive,idum))keytol=1 -+ if(findstring('posi',directive,idum))keytol=2 -+ hyp_units=energy_unit() -+ minstp=intstr(directive,lenrec,idum) -+ opttol=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ lminim=.true. -+ loptim=.false. -+ lzero=.false. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'minimisation programme requested')") -+ write(nrite, -+ x "(1x,'structure minimisation interval ', -+ x 3x,i10)")minstp -+ call print_optim(keytol) -+ write(nrite, -+ x "(1x,'structure minimisation tolerance', -+ x 3x,1p,e12.4,1x,a8)")opttol,cunit -+ -+ endif -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ elseif(findstring('optim',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ if(findstring('forc',directive,idum))keytol=0 -+ if(findstring('ener',directive,idum))keytol=1 -+ if(findstring('posi',directive,idum))keytol=2 -+ hyp_units=energy_unit() -+ opttol=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ loptim=.true. -+ lminim=.false. -+ lzero=.false. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'structure optimisation requested')") -+ call print_optim(keytol) -+ write(nrite, -+ x "(1x,'tolerance for structure optimisation ', -+ x 3x,1p,e12.4,1x,a8)")opttol,cunit -+ -+ endif -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ elseif(findstring('zero',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ temp=1.d0 -+ lzero=.true. -+ loptim=.false. -+ lminim=.false. -+ ltemp=.true. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'zero K optimisation requested')") -+ write(nrite, -+ x "(' temperature reset to',1p,e12.4)")1.d0 -+ -+ endif -+ -+ else if(findstring('solva',directive,idum))then -+ -+ call solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+ else if(findstring('decomp',directive,idum))then -+ -+ call solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+ elseif(findstring('metafreeze',directive,idum).or. -+ x findstring('metadyn',directive,idum))then -+ -+c activate metadynamics option - d. quigley -+ -+ call metadyn_option -+ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, -+ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, -+ x locpe_scale,ref_W_aug,h_aug,wt_Dt) -+ -+ else if(findstring('free',directive,idum))then -+ -+ call free_energy_option(directive,lfree,lfrmas,idnode) -+ -+ else if(findstring('excite',directive,idum))then -+ -+ call excitation_option -+ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) -+ -+ else if(findstring('switch',directive,idum))then -+ -+ call switching_option -+ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) -+ -+ elseif(findstring('print',directive,idum))then -+ -+ nstbpo=intstr(directive,lenrec,idum) -+ nstbpo=max(nstbpo,1) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'data printing interval ',3x,i10)")nstbpo -+ -+ elseif(findstring('stack',directive,idum))then -+ -+ nstack=intstr(directive,lenrec,idum) -+ -+c reset stack limit if too large -+ -+ nstack=min(nstack,mxstak) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'data stacking interval ',3x,i10)")nstack -+ -+ elseif(findstring('stats',directive,idum))then -+ -+ intsta=intstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'statistics file interval ',3x,i10)")intsta -+ -+ elseif(findstring('traj',directive,idum))then -+ -+ ltraj=.true. -+ nstraj=intstr(directive,lenrec,idum) -+ istraj=max(intstr(directive,lenrec,idum),1) -+ keytrj=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'trajectory file option on ', -+ x /,1x,'trajectory file start ',3x,i10, -+ x /,1x,'trajectory file interval ',3x,i10 -+ x /,1x,'trajectory file info key ',3x,i10)") -+ x nstraj,istraj,keytrj -+ -+ elseif(findstring('ewald',directive,idum).or. -+ x findstring('spme',directive,idum).or. -+ x findstring('hke',directive,idum))then -+ -+c read Ewald or HK-Ewald or SPM-Ewald sum parameters -+ -+ call ewald_selection(directive,lhke,lspme,lewald,lcut, -+ x lforc,kill,idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2, -+ x kmax3,alpha,rcut) -+ -+ elseif(findstring('distan',directive,idum))then -+ -+ keyfce=4 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Distance dependent dielectric')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('coul',directive,idum))then -+ -+ keyfce=6 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Coulombic potential')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('shift',directive,idum))then -+ -+ keyfce=8 -+ alpha=0.d0 -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Shifted Coulombic potential')") -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(.not.lcut)then -+ call error(idnode,-435) -+ kill=.true. -+ else -+ -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(1x,'Specified precision parameter : ',1p, -+ x e12.4)")eps -+ write(nrite, -+ x "(1x,'Calculated damping parameter: ',1p, -+ x e12.4)")alpha -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('damp',directive,idum))then -+ -+ alpha=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(1x,'Specified damping parameter : ',1p,e12.4)") -+ x alpha -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('reaction',directive,idum))then -+ -+ keyfce=10 -+ alpha=0.d0 -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : reaction field')") -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(.not.lcut)then -+ call error(idnode,-435) -+ kill=.true. -+ else -+ -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(1x,'Specified precision parameter : ',1p, -+ x e12.4)")eps -+ write(nrite, -+ x "(1x,'Calculated damping parameter: ',1p, -+ x e12.4)")alpha -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('damp',directive,idum))then -+ -+ alpha=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(1x,'Specified damping parameter : ',1p,e12.4)") -+ x alpha -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('cap',directive,idum))then -+ -+ lfcap=.true. -+ fm=dblstr(directive,lenrec,idum) -+ if(fm.gt.0.d0)fmax=fm -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'force capping :',16x,1p,e12.4,' kT/A')")fmax -+ -+ elseif(findstring('no vdw',directive,idum))then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'short-range potential terms off')") -+ lvdw=.true. -+ -+ elseif(findstring('no elec',directive,idum))then -+ -+ keyfce=0 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'electrostatic potential terms off')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('mult',directive,idum))then -+ -+ multt=max(intstr(directive,lenrec,idum),1) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'multiple timestep interval ',3x,i10)")multt -+ -+ elseif(findstring('timestep',directive,idum))then -+ -+ lstep=.true. -+ tstep=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation timestep ',3x,1p,e12.4)")tstep -+ -+ elseif(findstring('temp',directive,idum))then -+ -+ ltemp=.true. -+ temp=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation temperature ',3x,1p,e12.4)")temp -+ -+ elseif(findstring('pres',directive,idum))then -+ -+ press=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation pressure (katm) ',3x,1p,e12.4)")press -+ -+c convert from katm to internal units of pressure -+ -+ press=press/prsunt -+ lpres=.true. -+ -+ elseif(findstring('prim',directive,idum))then -+ -+c primary cutoff -+ -+ lprim=.true. -+ rprim=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'primary neighbour cut off ',3x,1p,e12.4)")rprim -+ -+ elseif(findstring('rvdw',directive,idum))then -+ -+c cutoff for short range potentials -+ -+ rvdw=dblstr(directive,lenrec,idum) -+ lrvdw=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'real space cut off (vdw) ',3x,1p,e12.4)")rvdw -+ -+ elseif(findstring('delr',directive,idum))then -+ -+c Verlet shell width -+ -+ ldelr=.true. -+ delr=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'border width of Verlet shell',3x,1p,e12.4)")delr -+ -+ elseif(findstring('cut',directive,idum))then -+ -+c cutoff -+ -+ lcut=.true. -+ rcut=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'real space cut off ',3x,1p,e12.4)")rcut -+ -+ elseif(findstring('eps',directive,idum))then -+ -+c relative dielectric constant -+ -+ epsq=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'relative dielectric constant',3x,1p,e12.4)")epsq -+ -+ elseif(findstring('rlxtol',directive,idum))then -+ -+c force tolerance for shell relaxation -+ -+ rlxtol=max(rlxtol,dblstr(directive,lenrec,idum)) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for shell relaxn. ',3x,1p,e12.4)")rlxtol -+ -+ elseif(findstring('shake',directive,idum))then -+ -+c tolerance for shake -+ -+ tolnce=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for SHAKE ',3x,1p,e12.4)")tolnce -+ -+ elseif(findstring('quaternion',directive,idum))then -+ -+c tolerance for quaternion integration -+ -+ quattol=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for Quaternions ',3x,1p,e12.4)")quattol -+ -+ elseif(findstring('job time',directive,idum))then -+ -+c time for simulation (in seconds/minutes/hours/days or indefinite) -+ -+ if(findstring('indef',directive,idum))then -+ timjob=1.0d6*365.25d0*24.d0*60.d0*60.d0 -+ else -+ timjob=dblstr(directive,lenrec,idum) -+ if(findstring('m',directive,idum))then -+ timjob=6.0d1*timjob -+ elseif(findstring('h',directive,idum))then -+ timjob=3.6d3*timjob -+ elseif(findstring('d',directive,idum))then -+ timjob=8.64d4*timjob -+ endif -+ endif -+ -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'user allocated job time (',a1,') ',3x,f8.4)") -+ x hms,prntim -+ -+ elseif(findstring('close time',directive,idum))then -+ -+c time for winding up a job (in seconds) -+ -+ timcls=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'job closure time (s) ',3x,f8.3)")timcls -+ -+ elseif(findstring('all pairs',directive,idum))then -+ -+c full minimum image - N^2 interactions each timestep -+ -+ lnsq=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'All-pairs requested for electrostatics')") -+ -+ elseif(findstring('nospl',directive,idum))then -+ -+c set ewald_spme interpolation order -+ -+ nospl=intstr(directive,lenrec,idum) -+ -+ elseif(findstring('finish',directive,idum))then -+ -+c safe termination of reading CONTROL file -+ -+ loop=.false. -+ -+ else -+ -+c unrecognised directive in control file -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ enddo -+ -+c check on steps before temperature scaling -+ -+ if(nstbts.eq.0)nstbts=nstrun+1 -+ -+c conduct consistency checks on directives -+ -+ if(lminim)then -+ -+c ensure final configuration follows minimisation -+ -+ if(minstp.eq.0)minstp=nstrun -+ nstrun=minstp*(nstrun/minstp) -+ -+ endif -+ -+c check force activation options -+ -+ if(.not.lforc)then -+ -+c check if any forces are in operation -+ -+ if(.not.lvdw)then -+ -+ kill=.true. -+ call error(idnode,-383) -+ -+ endif -+ -+ else -+ -+c turn on short range forces -+ -+ if(lvdw)then -+ -+ if(keyfce.eq.0)then -+ -+ lcut=.true. -+ ldelr=.true. -+ -+ endif -+ -+ else -+ -+ keyfce=keyfce+1 -+ -+ endif -+ -+ endif -+ -+c if tad selected use only leap frog -+ -+ if(ltad.and.keyver.eq.1)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'switching to leapfrog for TAD dynamics')") -+ keyver=0 -+ -+ endif -+ -+c error checking -+ -+ if(lmetadyn.and.keyens.ne.3.and.keyens.ne.5.and.keyens.ne.7)then -+ -+ kill=.true. -+ call error(idnode,-2360) -+ -+ endif -+ -+ if(lsolva.or.lfree.or.lexcite.or.lswitch)then -+ -+ if(lspme)then -+ -+ kill=.true. -+ call error(idnode,-601) -+ -+ endif -+ -+ if(lhke)then -+ -+ kill=.true. -+ call error(idnode,-602) -+ -+ endif -+ -+ endif -+ -+ if(lghost.and.nstbgr.ne.isolva)then -+ -+ call warning(idnode,130,dble(isolva),0.d0,0.d0) -+ nstbgr=isolva -+ -+ endif -+ if(lfree.and.lgofr)then -+ -+ call warning(idnode,140,0.d0,0.d0,0.d0) -+ lgofr=.false. -+ lpgr=.false. -+ -+ endif -+ if(loptim)then -+ -+ temp=0.d0 -+ -+ elseif(.not.ltemp)then -+ -+ kill=.true. -+ call error(idnode,-380) -+ -+ endif -+ -+ if(.not.lstep)then -+ -+ kill=.true. -+ call error(idnode,-381) -+ -+ endif -+ -+ if(.not.lcut)then -+ -+ kill=.true. -+ call error(idnode,-382) -+ -+ endif -+ -+c check if van der Waals cutoff set -+ -+ if(.not.lrvdw.and.mod(keyfce,2).eq.1)then -+ -+ if(rcut.gt.0.d0)then -+ -+ rvdw=rcut -+ -+ else -+ -+ kill=.true. -+ call error(idnode,-402) -+ -+ endif -+ -+ endif -+ -+ if(.not.ldelr)then -+ -+ kill=.true. -+ call error(idnode,-384) -+ -+ endif -+ -+ if(multt.gt.1)then -+ -+ if(.not.lprim)then -+ -+ kill=.true. -+ call error(idnode,-385) -+ -+ elseif(rprim.gt.rcut)then -+ -+ kill=.true. -+ call error(idnode,-386) -+ -+ endif -+ -+ endif -+ -+c check settings in nvt ensemble -+ -+ if(keyens.ge.2.and.keyens.le.3)then -+ -+ if(taut.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-464) -+ -+ endif -+ -+ endif -+ -+c check settings in npt ensemble -+ -+ if(keyens.ge.4.and.keyens.le.7)then -+ -+ if(.not.lpres)then -+ -+ kill=.true. -+ call error(idnode,-387) -+ -+ endif -+ -+c check barostat and thermostat rates non zero -+ -+ if(taut.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-464) -+ -+ endif -+ if(taup.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-466) -+ -+ endif -+ -+ endif -+ -+c check multiple timestep cutoffs are sensible -+ -+ if(multt.gt.1)then -+ if(rcut-rprim.lt.delr)then -+ -+ kill=.true. -+ call error(idnode,-398) -+ -+ endif -+ endif -+ -+c check rcut > rvdw (for verlet list constructor) -+ -+ if(rcut.lt.rvdw)then -+ -+ kill=.true. -+ call error(idnode,-400) -+ -+ endif -+ -+c check spme is not being used with incorrect pbc -+ -+ if(lspme)then -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+ kill=.true. -+ call error(idnode,-513) -+ -+ endif -+ -+ endif -+ -+c check on all-pairs calculation request -+ -+ if(lnsq)then -+ -+ if(multt.eq.1)then -+ -+ kill=.true. -+ call error(idnode,-422) -+ -+ endif -+ -+ if(keyfce/2.lt.2.or.keyfce/2.gt.3)then -+ -+ kill=.true. -+ call error(idnode,-424) -+ -+ endif -+ -+ endif -+ -+c cancel rdf option if no vdw or coulombic forces -+ -+ if(lgofr.and.keyfce.eq.0)then -+ -+ lgofr=.false. -+ call warning(idnode,120,0.d0,0.d0,0.d0) -+ -+ endif -+ -+ if(kill)call abort_control_read(2,idnode,nread) -+ -+c close CONTROL file -+ -+ if(idnode.eq.0)close(nread) -+ -+ return -+ end subroutine simdef -+ -+ subroutine sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading in the molecular specifications -+c of the system to be simulated -+c version for rigid unit data and neutral groups -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith may 1992. -+c amended - w.smith march 1994 -+c amended - t.forester april 1994 -+c amended - w.smith dec 1994 - getrec etc -+c amended - a.smondyrev may 2000 - keydih=5 for -+c ryckaert-bellemans potential in dihedrals -+c amended - a.smondyrev may 2000 - keydih=6 for -+c fluorinated ryckaert-bellemans potential in dihedrals -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lunits,lmols,lneut,ltable,lnsq,lshl,safe,lpmf -+ logical loop1,loop2,lsolva,lfree,lexcite,lswitch,lghost -+ -+ integer idnode,keyfce,keyfld,natms,ngrp,ntpatm,ntpmls -+ integer ntpvdw,ntptbp,ntpmet,ntpfbp,nshels,ksite -+ integer nsite,nconst,nangle,ndihed,ninver,nbonds -+ integer nteth,nspmf,itmols,i,idum,keyver -+ integer ntpter,keyshl,iatm,natmsr,ntghost -+ -+ real(8) dlrpot,engunit,rvdw,rcuttb,rctter,rcutfb -+ real(8) sumchg -+ -+ data loop1/.true./,loop2/.true./ -+ -+c initialise system counters: atomic site index, number of -+c constraints, bond angles, dihedrals, inversions, chemical bonds, -+c unique atom types, total number of atoms, -+c total number of rigid groups, number of tethered atoms, -+c number of three body potentials -+ -+ nsite=0 -+ nconst=0 -+ nangle=0 -+ ndihed=0 -+ ninver=0 -+ nbonds=0 -+ ntpatm=0 -+ natms=0 -+ ngrp=0 -+ nteth=0 -+ ntptbp=0 -+ ntpter=0 -+ ntpmet=0 -+ ntpvdw=0 -+ ntpfbp=0 -+ nshels=0 -+ nspmf=0 -+ keyfld=0 -+ keyshl=0 -+ ntghost=0 -+ natmsr=0 -+ ntcons_ghost=0 -+ -+ lunits=.false. -+ lmols=.false. -+ lneut=.false. -+ ltable=.false. -+ lmetab=.false. -+ lshl=.false. -+ lpmf=.false. -+ engunit=1.d0 -+ -+ numbonds(:)=0 -+ numpmf(:)=0 -+ numcon(:)=0 -+ numdih(:)=0 -+ numinv(:)=0 -+ numgrp(:)=0 -+ numsit(:)=0 -+ numteth(:)=0 -+ numshl(:)=0 -+ npmf(:)=0 -+ indpmf(:)=0 -+ -+c open force field data file -+ -+ if(idnode.eq.0)open (nfield,file='FIELD',status='old') -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,'SYSTEM SPECIFICATION')") -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read and process directives from field file -+ -+ do while(loop1) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c convert to lowercase and remove leading blanks -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.' ')then -+ -+c record is commented out -+ cycle -+ -+ elseif(findstring('units',record,idum))then -+ -+c identify energy unit for input/output -+ -+ lunits=.true. -+ call define_units(idnode,engunit) -+ -+c neutral group control option -+ -+ elseif(findstring('neut',record,idum))then -+ -+ lneut=.true. -+ if(idnode.eq.0) -+ x write(nrite,"(/,' neutral group implementation in use')") -+ -+c can't have neutral groups with all-pairs -+ -+ if(lnsq)call error(idnode,426) -+ -+c specify molecular species -+ -+ elseif(findstring('molecu',record,idum))then -+ -+c number of molecular types -+ -+ if(lmols)call error(idnode,11) -+ lmols=.true. -+ ntpmls=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,1x,'number of molecular types',6x,i10)") -+ x ntpmls -+ -+ if(ntpmls.gt.mxtmls)call error(idnode,10) -+ -+c initialise total system charge -+ -+ sumchg=0.d0 -+ -+c read in molecular characteristics -+ -+ do itmols=1,ntpmls -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'molecular species type',9x,i10)") -+ x itmols -+ -+c name of molecular species -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+ call copystring(record,molnam(1,itmols),40) -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,1x,'name of species:',13x,40a1)") -+ x (molnam(i,itmols),i=1,40) -+ -+c stop processing if energy unit has not been specified -+ -+ if(.not.lunits)call error(idnode,6) -+ -+c read molecular data -+ -+ loop2=.true. -+ -+ do while(loop2) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ -+ ksite=0 -+ -+ if(findstring('nummol',record,idum))then -+ -+ nummols(itmols)=intstr(record,lenrec,idum) -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'number of molecules ', -+ x 10x,i10)")nummols(itmols) -+ -+ elseif(findstring('atoms',record,idum))then -+ -+c read in atomic details -+ -+ call define_atoms -+ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read core - shell spring parameters -+ -+ elseif(findstring('shell',record,idum))then -+ -+ lshl=.true. -+ call define_core_shell -+ x (safe,idnode,itmols,nshels,nsite,keyshl, -+ x engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read chemical bond force constant and bondlength -+ -+ elseif(findstring('bonds',record,idum))then -+ -+ call define_bonds -+ x (safe,idnode,itmols,nbonds,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read bond atom indices and constraint bondlength -+ -+ elseif(findstring('constr',record,idum))then -+ -+ call define_constraints -+ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read pmf bond atom indices, weights and constraint bondlength -+ -+ elseif(findstring('pmf',record,idum))then -+ -+ if(lpmf)call error(idnode,484) -+ lpmf=.true. -+ call define_pmf(safe,idnode,itmols,nspmf) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular angular potential parameters -+ -+ elseif(findstring('angles',record,idum))then -+ -+ call define_angles -+ x (safe,idnode,itmols,nangle,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular dihedral potential parameters -+ -+ elseif(findstring('dihedr',record,idum))then -+ -+ call define_dihedrals -+ x (safe,idnode,itmols,ndihed,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular inversion potential parameters -+ -+ elseif(findstring('invers',record,idum))then -+ -+ call define_inversions -+ x (safe,idnode,itmols,ninver,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read rigid body data -+ -+ elseif(findstring('rigid',record,idum))then -+ -+ call define_rigid_body -+ x (safe,lghost,idnode,itmols,ngrp,natmsr) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read tethered atom indices and tethering parameters -+ -+ elseif(findstring('teth',record,idum))then -+ -+ call define_tethers -+ x (safe,idnode,itmols,nteth,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c finish of data for one molecular type -+ -+ elseif(findstring('finish',record,idum))then -+ -+c running total of number of atoms in system -+ -+ natms=natms+nummols(itmols)*numsit(itmols) -+ if(natms.gt.mxatms)call error(idnode,75) -+ -+c check core-shell units are not both in same rigid body unit -+ -+ call check_shells(idnode,itmols,nshels,ngrp) -+ -+ loop2=.false. -+ -+ else -+ -+c error exit for unidentified directive in molecular data -+ -+ if(idnode.eq.0)write(nrite,'(12x,a)')record -+ call error(idnode,12) -+ -+ endif -+ -+ enddo -+ -+c construction of atmolt table for solvation calculation -+ -+ if(lsolva)then -+ -+ do iatm=natmsr+1,natms -+ atmolt(iatm)=itmols -+ enddo -+ natmsr=natms -+ -+ endif -+ -+ enddo -+ -+c construction of atm_fre table for free energy or excitation -+ -+ if(lfree.or.lexcite.or.lswitch)then -+ -+ atm_fre(:)=0 -+ if((ind_fre(1).ne.0).and.(ind_fre(2).ne.0))then -+ -+ do iatm=ind_fre(1),ind_fre(2) -+ atm_fre(iatm)=1 -+ enddo -+ -+ endif -+ -+ if((ind_fre(3).ne.0).and.(ind_fre(4).ne.0))then -+ -+ do iatm=ind_fre(3),ind_fre(4) -+ -+ atm_fre(iatm)=2 -+ if(lghost)ntghost=ntghost+1 -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c calculate system charge -+ -+ call check_syschg(idnode,ntpmls,sumchg) -+ -+c read in the nonbonded potential energy parameters -+ -+ elseif(findstring('vdw',record,idum))then -+ -+ call define_van_der_waals -+ x (safe,ltable,lunits,lmols,idnode,ntpvdw, -+ x ntpatm,keyfce,dlrpot,rvdw,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read in the metal potential energy parameters -+ -+ elseif(findstring('met',record,idum))then -+ -+ call define_metals -+ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rvdw,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read the three body potential energy parameters -+ -+ elseif(findstring('tbp',record,idum))then -+ -+ call define_three_body -+ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read the tersoff potential energy parameters -+ -+ elseif(findstring('tersoff',record,idum))then -+ -+ call define_tersoff -+ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read in the four body potential energy parameters -+ -+ elseif(findstring('fbp',record,idum))then -+ -+ call define_four_body -+ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, -+ x rcutfb,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read external field data -+ -+ elseif(findstring('extern',record,idum))then -+ -+ call define_external_field -+ x (safe,lunits,idnode,keyfld,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c normal end of FIELD file -+ -+ elseif(findstring('close',record,idum))then -+ -+ loop1=.false. -+ if(ntpvdw.eq.0.and.ntpmet.eq.0.and. -+ x mod(keyfce,2).eq.1)call error(idnode,145) -+ -+c error exit for unidentified directive -+ -+ else -+ -+ if(idnode.eq.0)write(nrite,'(100a)')record -+ call abort_field_read(2,idnode,nfield) -+ -+ endif -+ -+ enddo -+ -+c close force field file -+ -+ if(idnode.eq.0)close (nfield) -+ -+ -+ if(lshl.and.idnode.eq.0)then -+ -+ if(keyshl.eq.1)write(nrite, -+ x "(/,/,'adiabatic shell model in operation')") -+ -+ if(keyshl.eq.2)write(nrite, -+ x "(/,/,'relaxed shell model in operation')") -+ -+ endif -+ -+ if(lshl.and.keyshl.eq.0)call error(idnode,1951) -+ -+c if metadynamics and shell selected use only velocity verlet -+ -+ if(lshl.and.lmetadyn.and.keyver.eq.0)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'switching to velocity verlet for metadynamics')") -+ keyver=1 -+ -+ endif -+ -+ return -+ end subroutine sysdef -+ -+ subroutine sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading the configuration data file -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 atname(8) -+ -+ logical loglnk,safe,lneut,nolink,lfree,lfrmas -+ integer idnode,imcon,keyens,keyfce,keyres,levcfg,multt -+ integer ntpmls,i,indatm,indnam,indneu,k,ilx,ily,ilz -+ integer m,l,ncells,idum,mxnode -+ real(8) delr,rcut,volm,xcoord,ycoord,zcoord,totmas,xveloc -+ real(8) yveloc,zveloc,xforce,yforce,zforce,axx,rt3,xhi,yhi,zhi -+ real(8) width,dum1,dum2,test,com(3) -+ -+c open the system input file -+ -+ if(idnode.eq.0)open (nconf,file='CONFIG') -+ -+c read the CONFIG file header -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ -+ call copystring(record,cfgname,80) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'configuration file name: ',/,/,10x,80a1)")cfgname -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ -+ levcfg=intstr(record,lenrec,idum) -+ imcon=intstr(record,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'selected image convention',6x,i10)")imcon -+ -+c check config file contents for consistent data -+ -+ if((imcon.eq.0.or.imcon.eq.6).and. -+ x (keyfce/2.eq.1.or.keyfce/2.eq.6)) -+ x call error(idnode,180) -+ -+ if(imcon.eq.0.and.(.not.lneut).and.(keyfce.gt.1) -+ x .and.(multt.eq.1))call warning(idnode,30,0.d0,0.d0,0.d0) -+ -+ if(imcon.eq.0.and.(keyens.ge.4.and.keyens.le.7)) -+ x call error(idnode,390) -+ if(imcon.le.2.and.(keyens.eq.6.or.keyens.eq.7))imcon=3 -+ if(keyres.gt.0.and.levcfg.lt.1)call error(idnode,85) -+ -+c specify molecular dynamics simulation cell -+ -+ if(imcon.eq.0)then -+ -+c if no periodic boundaries - set zero values for cell -+c vectors and cell volume -+ -+ cell(:)=0.d0 -+ volm=0.d0 -+ -+ else -+ -+c read cell vectors -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(1)=dblstr(record,lenrec,idum) -+ cell(2)=dblstr(record,lenrec,idum) -+ cell(3)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(4)=dblstr(record,lenrec,idum) -+ cell(5)=dblstr(record,lenrec,idum) -+ cell(6)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(7)=dblstr(record,lenrec,idum) -+ cell(8)=dblstr(record,lenrec,idum) -+ cell(9)=dblstr(record,lenrec,idum) -+ -+ endif -+ -+c read the atomic coordinates -+ -+ indatm=0 -+ indnam=0 -+ indneu=0 -+ safe=.true. -+ -+ do k=1,ntpmls -+ -+ do l=1,nummols(k) -+ -+ do m=1,numsit(k) -+ -+ indatm=indatm+1 -+ -+ if(indatm.gt.mxatms)call error(idnode,45) -+ -+ xxx(indatm)=0.d0 -+ yyy(indatm)=0.d0 -+ zzz(indatm)=0.d0 -+ vxx(indatm)=0.d0 -+ vyy(indatm)=0.d0 -+ vzz(indatm)=0.d0 -+ fxx(indatm)=0.d0 -+ fyy(indatm)=0.d0 -+ fzz(indatm)=0.d0 -+ -+ if(idnode.eq.0)then -+ -+ if(levcfg.eq.0)then -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ -+ elseif(levcfg.eq.1)then -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc -+ -+ else -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc -+ read(nconf,'(3f20.0)',end=100)xforce,yforce,zforce -+ -+ endif -+ -+c strip blanks off atom name -+ -+ call strip(atname,8) -+ -+ if(sitnam(indnam+m).eq.mkwd8(atname))then -+ -+ xxx(indatm)=xcoord -+ yyy(indatm)=ycoord -+ zzz(indatm)=zcoord -+ -+ if(levcfg.gt.0)then -+ -+ vxx(indatm)=xveloc -+ vyy(indatm)=yveloc -+ vzz(indatm)=zveloc -+ -+ endif -+ -+ if(levcfg.gt.1)then -+ -+ fxx(indatm)=xforce -+ fyy(indatm)=yforce -+ fzz(indatm)=zforce -+ -+ endif -+ -+ else -+ -+ write(nrite,"(/,/,'unidentified atom label :',8a1, -+ x ': atom number ',i5)")atname,indatm -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ call gstate(safe) -+ if(.not.safe)call error(idnode,25) -+ -+ ltype(indatm)=ltpsit(indnam+m) -+ weight(indatm)=wgtsit(indnam+m) -+ chge(indatm)=chgsit(indnam+m) -+ atmnam(indatm)=sitnam(indnam+m) -+ lstfrz(indatm)=lfzsit(indnam+m) -+ if(lneut)lstneu(indatm)=nugrp(indnam+m)+indneu -+ -+c reset atomic masses according to free energy definitions -+ -+ if(lfree)then -+ -+ weight_sav(indatm)=weight(indatm) -+ -+ if(lfrmas)then -+ -+ if(indatm.ge.ind_fre(1).and.indatm.le.ind_fre(2))then -+ weight(indatm)=lambda1*weight(indatm) -+ elseif(indatm.ge.ind_fre(3).and.indatm.le.ind_fre(4)) -+ x then -+ weight(indatm)=lambda2*weight(indatm) -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ indneu=indneu+nugrp(indnam+numsit(k)) -+ -+ enddo -+ -+ indnam=indnam+numsit(k) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ call gdsum(xxx,indatm,buffer) -+ call gdsum(yyy,indatm,buffer) -+ call gdsum(zzz,indatm,buffer) -+ -+ if(levcfg.gt.0)then -+ -+ call gdsum(vxx,indatm,buffer) -+ call gdsum(vyy,indatm,buffer) -+ call gdsum(vzz,indatm,buffer) -+ -+ endif -+ -+ if(levcfg.gt.1)then -+ -+ call gdsum(fxx,indatm,buffer) -+ call gdsum(fyy,indatm,buffer) -+ call gdsum(fzz,indatm,buffer) -+ -+ endif -+ -+ endif -+ -+c check integrity of cell vectors : for cubic, TO and RD cases -+c ie. cell(1)=cell(5)=cell(9) (or cell(9)/sqrt(2) for RD) -+ -+ if((imcon.eq.1).or.(imcon.eq.4).or.(imcon.eq.5))then -+ -+ axx=(abs(cell(1))+abs(cell(5)))/2.d0 -+ test=1.d-8*axx -+ if(abs(cell(1)-axx).gt.test)call error(idnode,410) -+ if(abs(cell(5)-axx).gt.test)call error(idnode,410) -+ if(imcon.eq.5)then -+ if(abs(cell(9)-axx*sqrt(2.d0)).gt.test) -+ x call error(idnode,410) -+ else -+ if(abs(cell(9)-axx).gt.test)call error(idnode,410) -+ endif -+ -+ endif -+ -+c check integrity of hexagonal prism cell vectors -+ -+ if(imcon.eq.7)then -+ -+ rt3=sqrt(3.d0) -+ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) -+ x call error(idnode,410) -+ -+ endif -+ -+c check 2D PBC for imcon=6 -+ -+ if(imcon.eq.6)then -+ -+ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) -+ -+ endif -+ -+c check for diagonal cell matrix if appropriate -+ -+ if((imcon.eq.1).or.(imcon.eq.2).or.(imcon.eq.4).or. -+ x (imcon.eq.5).or.(imcon.eq.7))then -+ -+ if(abs(cell(2)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(4)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) -+ -+ endif -+ -+c put centre of mass at centre of coordinates if imcon=0 -+ -+ if(imcon.eq.0)then -+ -+ totmas=getmass(indatm,idnode,mxnode) -+ call getcom(indatm,idnode,mxnode,totmas,com) -+ -+ do i=1,indatm -+ -+ xxx(i)=xxx(i)-com(1) -+ yyy(i)=yyy(i)-com(2) -+ zzz(i)=zzz(i)-com(3) -+ -+ enddo -+ -+ endif -+ -+c set widths if unset - needed for check on link cells below -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+ xhi=abs(xxx(1)) -+ yhi=abs(yyy(1)) -+ zhi=abs(zzz(1)) -+ do i=2,indatm -+ -+ xhi=max(xhi,abs(xxx(i))) -+ yhi=max(yhi,abs(yyy(i))) -+ zhi=max(zhi,abs(zzz(i))) -+ -+ enddo -+ if(imcon.eq.0)then -+ -+ cell(1)=max(2.d0*xhi+rcut+delr,3.d0*(rcut+delr)) -+ cell(5)=max(2.d0*yhi+rcut+delr,3.d0*(rcut+delr)) -+ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) -+ -+ endif -+ -+ if(imcon.eq.6.and.cell(9).lt.1.d-6)then -+ -+ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) -+ -+ endif -+ -+ endif -+ -+c calculate dimensional properties of simulation cell -+ -+ call dcell(cell,celprp) -+ -+ if(imcon.eq.0)then -+ -+ volm=0.d0 -+ -+ elseif(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ else -+ -+ volm=celprp(10) -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,/,1x,'simulation cell vectors'/,/)") -+ write(nrite,"(21x,3f12.6)")cell -+ -+ write(nrite, -+ x "(/,/,1x,'system volume ',2x,1p,g22.12)")volm -+ -+ endif -+ -+c check value of cutoff and reset if necessary -+ -+ if(imcon.gt.0)then -+ -+ width=min(celprp(7),celprp(8),celprp(9))/2.d0 -+ if(imcon.eq.4)width=sqrt(3.d0)*cell(1)/4.d0 -+ if(imcon.eq.5)width=cell(1)/2.d0 -+ if(imcon.eq.6)width=min(celprp(7),celprp(8))/2.d0 -+ -+c halt program if potential cutoff exceeds cell width -+ -+ if(rcut.gt.width)call error(idnode,95) -+ -+ endif -+ -+c decide on whether to use link cells for verlet list constructor -+ -+ if(nolink)then -+ -+ loglnk=.false. -+ -+ else -+ -+ loglnk=.true. -+ -+ ilx=int(celprp(7)/(rcut+delr)) -+ ily=int(celprp(8)/(rcut+delr)) -+ ilz=int(celprp(9)/(rcut+delr)) -+ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. -+ ncells=ilx*ily*ilz -+ if(lneut.and.ncells.le.36)loglnk=.false. -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. -+ if(loglnk.and.ncells.gt.mxcell)then -+ -+ dum1=dble(ncells) -+ dum2=dble(mxcell) -+ call warning(idnode,90,dum1,dum2,dum2) -+ loglnk=.false. -+ -+ endif -+ -+ endif -+ -+ if(loglnk.and.idnode.eq.0) -+ x write(nrite,"(/,/,' link cell algorithm in use')") -+ -+ if(idnode.eq.0)close (nconf) -+ -+c ensure PBC compliance of starting structure -+ -+ if(keyres.eq.0.and.imcon.gt.0)then -+ -+ call images(imcon,idnode,mxnode,indatm,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,indatm,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ return -+ -+c error exit for config file read -+ -+ 100 call abort_config_read(2,idnode,nconf) -+ -+ end subroutine sysgen -+ -+ subroutine sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading the REVIVE file data and -+c defining the initial thermodynamic and structural accumulators. -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c adapted - d. quigley nov 2010, metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzden,lfree,lsolva,lghost,lpsoc -+ integer idnode,imcon,keyfce,keyres,mxnode,natms,nstep,numacc -+ integer numrdf,ntpatm,nzden,i,j,k,ntpmet,ntshl,ntpvdw -+ real(8) chip,chit,conint,elrc,engunit,virlrc,rvdw,volm -+ real(8) dnumrd,dnstep,dnumac,dnzden,virtot,vircom,tboost -+ real(8) chit_shl -+ -+c read or initialise accumulator arrays -+ -+ if(keyres.eq.1.and.idnode.eq.0)then -+ -+c read accumulator data from dump file -+ -+ open(nrest,file='REVOLD',form='unformatted') -+ -+ read(nrest) dnstep,dnumac,dnumrd,chit,chip,conint,dnzden, -+ x tboost,chit_shl -+ read(nrest) virtot,vircom,eta,strcns,strbod -+ read(nrest) stpval -+ read(nrest) sumval -+ read(nrest) ssqval -+ read(nrest) zumval -+ read(nrest) ravval -+ read(nrest) stkval -+ read(nrest) xx0,yy0,zz0 -+ read(nrest) xxs,yys,zzs -+ -+ if(lgofr) read(nrest)rdf -+ if(lzden) read(nrest)zdens -+ -+ nstep=nint(dnstep) -+ numacc=nint(dnumac) -+ numrdf=nint(dnumrd) -+ nzden=nint(dnzden) -+ close (nrest) -+ -+ else -+ -+c initialise step counters -+ -+ nstep=0 -+ numacc=0 -+ numrdf=0 -+ nzden=0 -+ -+c initialise temperature and pressure coupling parameters -+c and integral for conserved quantity -+ -+ chit=0.d0 -+ chip=0.d0 -+ conint=0.d0 -+ virtot=0.d0 -+ vircom=0.d0 -+ chit_shl=0.d0 -+ do i=1,9 -+ -+ eta(i)=0.d0 -+ strcns(i)=0.d0 -+ strbod(i)=0.d0 -+ -+ enddo -+ -+c initialise accumulator arrays -+ -+ do i=1,mxnstk -+ -+ stpval(i)=0.d0 -+ sumval(i)=0.d0 -+ ssqval(i)=0.d0 -+ zumval(i)=0.d0 -+ ravval(i)=0.d0 -+ -+ enddo -+ -+ do i=1,mxatms -+ -+ xx0(i)=0.d0 -+ yy0(i)=0.d0 -+ zz0(i)=0.d0 -+ xxs(i)=0.d0 -+ yys(i)=0.d0 -+ zzs(i)=0.d0 -+ -+ enddo -+ -+ do j=1,mxnstk -+ -+ do i=1,mxstak -+ -+ stkval(i,j)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ if(lgofr)then -+ -+ do i=1,mxxtyp -+ -+ do j=1,mxrdf -+ -+ rdf(j,i)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(lzden)then -+ -+ do i=1,mxatyp -+ -+ do j=1,mxzdn -+ zdens(j,i)=0.d0 -+ enddo -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c put shells on cores at start -+ -+ if(lpsoc.and.keyres.ne.1.and.ntshl.gt.0) -+ x call put_shells_on_cores(idnode,mxnode,ntshl) -+ -+c if restart then broadcast stored variables via a global sum -+ -+ if(keyres.eq.1.and.mxnode.gt.1)then -+ -+ if(mxbuff.lt.natms.or.mxbuff.lt.mxnstk*mxstak) -+ x call error(idnode,186) -+ -+ buffer(1)=chit -+ buffer(2)=chip -+ buffer(3)=conint -+ buffer(4)=dble(nstep) -+ buffer(5)=dble(numacc) -+ buffer(6)=dble(numrdf) -+ buffer(7)=dble(nzden) -+ buffer(8)=tboost -+ buffer(9)=virtot -+ buffer(10)=vircom -+ buffer(11)=chit_shl -+ call gdsum(buffer(1),11,buffer(12)) -+ chit=buffer(1) -+ chip=buffer(2) -+ conint=buffer(3) -+ nstep=nint(buffer(4)) -+ numacc=nint(buffer(5)) -+ numrdf=nint(buffer(6)) -+ nzden=nint(buffer(7)) -+ tboost=buffer(8) -+ virtot=buffer(9) -+ vircom=buffer(10) -+ chit_shl=buffer(11) -+ -+ call gdsum(eta,9,buffer) -+ call gdsum(strcns,9,buffer) -+ call gdsum(strbod,9,buffer) -+ call gdsum(stpval,mxnstk,buffer) -+ call gdsum(sumval,mxnstk,buffer) -+ call gdsum(ssqval,mxnstk,buffer) -+ call gdsum(zumval,mxnstk,buffer) -+ call gdsum(ravval,mxnstk,buffer) -+ call gdsum(stkval,mxnstk*mxstak,buffer) -+ call gdsum(xx0,natms,buffer) -+ call gdsum(yy0,natms,buffer) -+ call gdsum(zz0,natms,buffer) -+ call gdsum(xxs,natms,buffer) -+ call gdsum(yys,natms,buffer) -+ call gdsum(zzs,natms,buffer) -+ -+c for rdf table - broadcast and normalise -+ -+ if(lgofr)then -+ -+ do k=1,mxxtyp -+ -+ call gdsum(rdf(1,k),mxrdf,buffer) -+ -+ do j=1,mxrdf -+ rdf(j,k)=rdf(j,k)/dble(mxnode) -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(lzden)then -+ -+ do k=1,mxatyp -+ -+ call gdsum(zdens(1,k),mxzdn,buffer) -+ -+ do j=1,mxzdn -+ zdens(j,k)=zdens(j,k)/dble(mxnode) -+ enddo -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c number densities and long-range corrections -+ -+ elrc=0.d0 -+ virlrc=0.d0 -+ -+ if(imcon.eq.0.or.imcon.eq.6)volm=4.d0*pi/3.d0*rvdw**3 -+ -+ call lrcorrect -+ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, -+ x ntpatm,ntpvdw,elrc,engunit,virlrc,rvdw,volm) -+ -+ if(lmetab.or.ntpmet.eq.0)then -+ -+ elrcm(0)=0.d0 -+ vlrcm(0)=0.d0 -+ -+ else -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+ if(imcon.eq.0.or.imcon.eq.6)volm=0.d0 -+ -+ return -+ end subroutine sysinit -+ -+ subroutine systemp -+ x (idnode,imcon,keyres,mxnode,natms,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for setting the initial system temperature -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,keyres,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,ntshl,levcfg,i,io,k,keyshl -+ real(8) degfre,degshl,degrot,temp,tolnce,sigma,rsq -+ -+c number of degrees of freedom -+c 3 for com translation -+c 3 for angular momentum about origin (non-periodic systems only) -+ -+ degfre=dble(3*(ntfree-ntshl)-3-ntcons)+degfre -+ if(imcon.eq.0.or.imcon.eq.6)degfre=degfre-3.0d0 -+ if(imcon.eq.0.or.imcon.eq.6)degrot=max(0.d0,degrot-3.0d0) -+ degshl=dble(3*ntshl) -+ -+c lose one degree of freedom if temperature constrained -+c gaussian constraints -+ -+c if(keyens.eq.1)degfre=degfre-1.d0 -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,' total degrees of freedom ',f20.0,/, -+ x ' rotational degrees of freedom ',f20.0,/, -+ x ' shell pseudo degrees of freedom',f20.0)") -+ x degfre,degrot,degshl -+ if(degfre.lt.1.d0)call error(idnode,350) -+ -+c define reciprocal masses of atoms -+ -+ do i=1,natms -+ -+ if(lstfrz(i).ne.0.or.weight(i).lt.1.d-6)then -+ -+ rmass(i)=0.d0 -+ weight(i)=0.d0 -+ -+ else -+ -+ rmass(i)=1.d0/weight(i) -+ -+ endif -+ -+ enddo -+ -+c generate starting velocities -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+ if(keyres.eq.0)then -+ -+ call gauss(natms,vxx,vyy,vzz) -+ -+ do i=1,natms -+ -+ rsq=sqrt(rmass(i)) -+ vxx(i)=vxx(i)*rsq -+ vyy(i)=vyy(i)*rsq -+ vzz(i)=vzz(i)*rsq -+ -+ enddo -+ -+ if(ntcons.gt.0)call quench -+ x (imcon,idnode,mxnode,natms,nscons,tolnce) -+ -+ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ if(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ elseif(keyres.eq.1.or.keyres.eq.3)then -+ -+ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ elseif(keyres.eq.2)then -+ -+ if(ngrp.gt.0)then -+ -+ call vscaleg -+ x (idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ elseif(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c print out sample of initial configuration -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'sample of starting configuration',/)") -+ -+ io=(natms+19)/20 -+ if((levcfg.le.1).and.(idnode.eq.0)) -+ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',/,/)") -+ if((levcfg.eq.2).and.(idnode.eq.0)) -+ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)', -+ x 7x,'fx(i)',7x,'fy(i)',7x,'fz(i)',/,/)") -+ -+ do i=1,natms,io -+ -+ if(levcfg.le.1)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i) -+ -+ elseif(levcfg.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i), -+ x vxx(i),vyy(i),vzz(i),fxx(i),fyy(i),fzz(i) -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine systemp -+ -+ subroutine sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine defining global bookkeeping -+c arrays -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical loglnk,lneut,lshmov,lcnb,lsolva,lghost -+ integer idnode,imcon,mxnode,natms,nneut,ngrp,nscons,ntangl,i -+ integer ntbond,ntcons,ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,ii,isol,itmols,igsol,iggsol,natmsf,natmsl -+ integer ntghost,natms2 -+ real(8) degfre,degrot -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c neutral group bookkeeping -+ -+ call neutbook(lneut,idnode,natms,nneut) -+ -+c rigid body bookkeeping -+ -+ call quatbook -+ x (lsolva,idnode,imcon,mxnode,natms2,ngrp,ntpmls, -+ x ntfree,degfre,degrot) -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ -+ numcon(mxtmls)=numcon(mxtmls)+ntcons_ghost -+ numgrp(mxtmls)=numgrp(mxtmls)+ngrp_ghost -+ -+ endif -+ -+c construct list of excluded pair interactions -+ -+ if(lneut)then -+ -+ call exclude(idnode,mxnode,natms,ntpmls) -+ call excludeneu(idnode,mxnode,nneut) -+ -+ elseif(.not.lneut)then -+ -+ call exclude(idnode,mxnode,natms,ntpmls) -+ -+ if(loglnk)then -+ -+ call exclude_link(idnode,mxnode,ntpmls) -+ -+ else -+ -+ call exclude_atom(idnode,mxnode,natms,ntpmls) -+ -+ endif -+ -+ endif -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ -+ numcon(mxtmls)=numcon(mxtmls)-ntcons_ghost -+ numgrp(mxtmls)=numgrp(mxtmls)-ngrp_ghost -+ -+ endif -+ -+c construct interaction lists for bonded forces -+ -+ call intlist -+ x (lshmov,lcnb,idnode,mxnode,natms2,nscons,ntangl,ntbond, -+ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) -+ -+c adaptations for solvation and excitation simulations -+ -+ if(lsolva.or.lghost)then -+ -+ natmsf=0 -+ natmsl=0 -+ natm_sol(:)=0 -+ const_sol(:)=numcon(:)*nummols(:) -+ rigid_sol(:)=numgrp(:)*nummols(:) -+ -+ if(ngrp.eq.0)then -+ -+ do itmols=1,mxtmls -+ -+ natmsl=natmsl+numsit(itmols)*nummols(itmols) -+ -+ do isol=natmsf+1,natmsl -+ -+ if(lstfrz(isol).eq.0)then -+ natm_sol(itmols)=natm_sol(itmols)+1 -+ endif -+ -+ enddo -+ -+ natmsf=natmsl -+ -+ enddo -+ -+ else -+ -+ ii=1 -+ -+ do itmols=1,mxtmls -+ -+ natmsl=natmsl+numsit(itmols)*nummols(itmols) -+ -+ do isol=natmsf+1,natmsl -+ -+ if(lstgot_sol(ii).eq.isol)then -+ ii=ii+1 -+ else -+ -+ if(lstfrz(isol).eq.0)then -+ natm_sol(itmols)=natm_sol(itmols)+1 -+ endif -+ -+ endif -+ -+ enddo -+ -+ natmsf=natmsl -+ -+ enddo -+ -+ degrot_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 -+ degfre_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 -+ -+ endif -+ -+ if(lghost)natm_sol(mxtmls)=natm_sol(mxtmls)-ntghost -+ degfre_sol(:)=dble(3*(natm_sol(:))-const_sol(:))+degfre_sol(:) -+ -+ endif -+ -+ return -+ end subroutine sysbook -+ -+ subroutine define_units(idnode,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting energy units -+c -+c copyright - daresbury laboratory -+c author - w. smith august 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,idum,i -+ real(8) engunit -+ logical blank -+ -+ blank=.true. -+ -+ do i=6,lenrec -+ if(record(i).ne.' ')blank=.false. -+ enddo -+ -+ if(blank)then -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=dl_poly internal ', -+ x 'units ')") -+ -+ elseif(findstring('ev',record,idum))then -+ -+ engunit=9648.530821d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=electron volts ')") -+ -+ elseif(findstring('kev',record,idum))then -+ -+ engunit=9648530.821d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kilo electron volts ')") -+ -+ elseif(findstring('kcal',record,idum))then -+ -+ engunit=418.4d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kcal/ mol ')") -+ -+ elseif(findstring('kj',record,idum))then -+ -+ engunit=1.d2 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kjoule/mol ')") -+ -+ elseif(findstring('k',record,idum))then -+ -+ engunit=boltz -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kelvin ')") -+ -+ elseif(findstring('internal',record,idum))then -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=dl_poly internal', -+ x ' units ')") -+ -+ else -+ -+ if(idnode.eq.0)write(nrite,'(a)')record -+ call error(idnode,5) -+ -+ endif -+ -+ return -+ end subroutine define_units -+ -+ subroutine quatbook -+ x (lsolva,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree, -+ x degfre,degrot) -+ -+c************************************************************************** -+c -+c dl_poly subroutine for setting up bookkeeping for rigid bodies -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c************************************************************************* -+ -+ implicit none -+ -+ logical safe,pass1,pass2,linear,lsolva -+ integer fail,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree -+ integer i,igrp,jgrp,kgrp,jr,jt,igrp1,igrp2,itmols,imols,lgrp,id -+ integer ii,jj,isite,k,kk,ill,i1,i2,i3,j,ngp,ifre1,ifre2,ig,ij -+ integer fngrp,lngrp -+ real(8) degfre,degrot,dnorm,a1,rtall,rotall,rot,aa,rotinr,bb,rot1 -+ real(8) rsq,det,dettest,aq,bq,cq,dq,eq,fq,gq,hq,rnorm,tol,rotxyz -+ real(8) rotlim,rrr -+ -+ integer, allocatable :: ind(:,:),lstgot(:) -+ real(8), allocatable :: gaxs(:,:),rotmin(:),accum(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ dimension rot(9),aa(9),rotinr(3,3),bb(9),rot1(3,3),fail(5) -+ -+ data fail/0,0,0,0,0/ -+ -+c allocate working arrays -+ -+ allocate (ind(mxgrp,3),lstgot(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) -+ allocate (gaxs(mxungp,9),rotmin(mxungp),stat=fail(4)) -+ allocate (accum(mxungp),stat=fail(5)) -+ do i=1,5 -+ if(fail(i).ne.0)call error(idnode,1790) -+ enddo -+ -+c initialise bookkeeping indices -+ -+ igrp=0 -+ jgrp=0 -+ kgrp=0 -+ isite=0 -+ jr=0 -+ jt=0 -+ safe=.true. -+ degfre=0.d0 -+ degrot=0.d0 -+ -+c rigid body identifier -+ -+ do i=1,natms -+ lstbod(i)=0 -+ enddo -+ -+c number of rigid groups in system -+ -+ ngrp=0 -+ do itmols=1,ntpmls -+ ngrp=ngrp+nummols(itmols)*numgrp(itmols) -+ enddo -+ -+c block indices for groups -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c loop over molecule types -+ -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if(igrp.le.mxgrp)then -+ -+ lstgtp(igrp)=listyp(lgrp+kgrp) -+ id=listyp(lgrp+kgrp) -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2))then -+ -+ jgrp=jgrp+1 -+ -+ do jj=1,numgsit(id) -+ -+ jr=jr+1 -+ jt=jt+1 -+ -+ if(jr.le.mxatms.and.jt.le.mxatms)then -+ -+ lstrgd(jr)=lstgst(id,jj)+isite -+ lstgot(jt)=lstgst(id,jj)+isite -+ lstbod(lstgst(id,jj)+isite)=igrp -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ else -+ -+ do jj=1,numgsit(id) -+ -+ jt=jt+1 -+ if(jt.le.mxatms)then -+ -+ lstgot(jt)=lstgst(id,jj)+isite -+ lstbod(lstgst(id,jj)+isite)=igrp -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,304) -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ kgrp=kgrp+numgrp(itmols) -+ -+ enddo -+ -+ if(ngrp.eq.0)then -+ -+ j=0 -+ do i=1,natms -+ -+ if(lstfrz(i).eq.0)then -+ -+ j=j+1 -+ lstfre(j)=i -+ -+ endif -+ -+ enddo -+ ntfree=j -+ -+ else -+ -+c centre of mass of groups -+c assumes group dimensions are smaller than half box width -+ -+ do i=1,natms -+ lstme(i)=0 -+ enddo -+ -+ do id=1,mxungp -+ gmass(id)=0.d0 -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c working com is first site in group -+ -+ i=lstrgd(jr+1) -+ txx(ig)=xxx(i) -+ tyy(ig)=yyy(i) -+ tzz(ig)=zzz(i) -+ -+ id=lstgtp(ig) -+ safe=.false. -+ if(abs(gmass(id)).lt.1.d-10)safe=.true. -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ xxt(jr)=xxx(i)-txx(ig) -+ yyt(jr)=yyy(i)-tyy(ig) -+ zzt(jr)=zzz(i)-tzz(ig) -+ if(safe)gmass(id)=gmass(id)+weight(i) -+ -+ enddo -+ -+ enddo -+ -+c minimum image from working com -+ -+ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=0.d0 -+ gcmy(ig)=0.d0 -+ gcmz(ig)=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ gcmx(ig)=gcmx(ig)+weight(i)*xxt(jr) -+ gcmy(ig)=gcmy(ig)+weight(i)*yyt(jr) -+ gcmz(ig)=gcmz(ig)+weight(i)*zzt(jr) -+ -+ enddo -+ -+ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) -+ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) -+ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) -+ -+ enddo -+ -+c global communications -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+c make sure all nodes have same copy of gmass -+ -+ if(mxnode.gt.1)then -+ -+ do id=1,mxungp -+ -+ accum(id)=0.d0 -+ if(gmass(id).gt.0.d0)accum(id)=1.d0 -+ -+ enddo -+ -+ call gdsum(gmass(1),mxungp,buffer(1)) -+ call gdsum(accum(1),mxungp,buffer(1)) -+ -+ do id=1,mxungp -+ -+ dnorm=max(1.d0,accum(id)) -+ gmass(id)=gmass(id)/dnorm -+ -+ enddo -+ -+ endif -+ -+c find a group of each type on this node to -+c find principal axis system of the group type -+ -+ do id=1,mxungp -+ -+ jr=0 -+ ij=0 -+ safe=.false. -+ -+ do while(.not.safe.and.ij.lt.ngrp) -+ -+ ij=ij+1 -+ jr=jr+numgsit(lstgtp(ij)) -+ if(lstgtp(ij).eq.id)safe=.true. -+ -+ enddo -+ -+ if(safe)then -+ -+c rotational inertia accumulator -+ -+ do k=1,3 -+ -+ do kk=1,3 -+ -+ rotinr(k,kk)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstgot(jr) -+ -+ xxt(jr)=xxx(i)-gcmx(ij) -+ yyt(jr)=yyy(i)-gcmy(ij) -+ zzt(jr)=zzz(i)-gcmz(ij) -+ -+ call images(imcon,0,1,1,cell,xxt(jr),yyt(jr),zzt(jr)) -+ -+ rotinr(1,1)=rotinr(1,1)+weight(i)*(xxt(jr)**2) -+ rotinr(1,2)=rotinr(1,2)+weight(i)*xxt(jr)*yyt(jr) -+ rotinr(1,3)=rotinr(1,3)+weight(i)*xxt(jr)*zzt(jr) -+ rotinr(2,2)=rotinr(2,2)+weight(i)*(yyt(jr)**2) -+ rotinr(2,3)=rotinr(2,3)+weight(i)*yyt(jr)*zzt(jr) -+ rotinr(3,3)=rotinr(3,3)+weight(i)*(zzt(jr)**2) -+ -+ enddo -+ -+ rotinr(2,1)=rotinr(1,2) -+ rotinr(3,1)=rotinr(1,3) -+ rotinr(3,2)=rotinr(2,3) -+ -+ call jacobi(rotinr,rot1,3) -+ -+ rot(1)=rot1(1,1) -+ rot(4)=rot1(2,1) -+ rot(7)=rot1(3,1) -+ rot(2)=rot1(1,2) -+ rot(5)=rot1(2,2) -+ rot(8)=rot1(3,2) -+ rot(3)=rot1(1,3) -+ rot(6)=rot1(2,3) -+ rot(9)=rot1(3,3) -+ -+c rotational inertia accumulators -+ -+ rotinx(id,1)=0.d0 -+ rotiny(id,1)=0.d0 -+ rotinz(id,1)=0.d0 -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstgot(jr) -+ -+c site positions in principal axis system -+ -+ gxx(id,j)=rot(1)*xxt(jr)+rot(4)*yyt(jr)+rot(7)*zzt(jr) -+ gyy(id,j)=rot(2)*xxt(jr)+rot(5)*yyt(jr)+rot(8)*zzt(jr) -+ gzz(id,j)=rot(3)*xxt(jr)+rot(6)*yyt(jr)+rot(9)*zzt(jr) -+ -+c impose rounding -+ -+ if(abs(gxx(id,j)).lt.1.d-8)gxx(id,j)=0.d0 -+ if(abs(gyy(id,j)).lt.1.d-8)gyy(id,j)=0.d0 -+ if(abs(gzz(id,j)).lt.1.d-8)gzz(id,j)=0.d0 -+ -+c rotational inertia tensor of group type -+ -+ rotinx(id,1)=rotinx(id,1)+ -+ x weight(i)*(gyy(id,j)**2+gzz(id,j)**2) -+ rotiny(id,1)=rotiny(id,1)+ -+ x weight(i)*(gzz(id,j)**2+gxx(id,j)**2) -+ rotinz(id,1)=rotinz(id,1)+ -+ x weight(i)*(gxx(id,j)**2+gyy(id,j)**2) -+ -+ enddo -+ -+c set axis system such that: Ixx >=Iyy >=Izz -+ -+ rotxyz=max(rotinx(id,1),rotiny(id,1),rotinz(id,1)) -+ -+ if(rotxyz.ge.rotinx(id,1))then -+ -+ if(rotiny(id,1).ge.rotxyz)then -+ -+ do j=1,numgsit(id) -+ -+ a1=gxx(id,j) -+ gxx(id,j)=gyy(id,j) -+ gyy(id,j)=-a1 -+ -+ enddo -+ -+ rotiny(id,1)=rotinx(id,1) -+ rotinx(id,1)=rotxyz -+ -+ elseif(rotinz(id,1).ge.rotxyz)then -+ -+ do j=1,numgsit(id) -+ -+ a1=gxx(id,j) -+ gxx(id,j)=gzz(id,j) -+ gzz(id,j)=-a1 -+ -+ enddo -+ -+ rotinz(id,1)=rotinx(id,1) -+ rotinx(id,1)=rotxyz -+ -+ endif -+ -+ endif -+ -+ if(rotinz(id,1).gt.rotiny(id,1))then -+ -+ do j=1,numgsit(id) -+ -+ a1=gyy(id,j) -+ gyy(id,j)=gzz(id,j) -+ gzz(id,j)=-a1 -+ -+ enddo -+ -+ a1=rotinz(id,1) -+ rotinz(id,1)=rotiny(id,1) -+ rotiny(id,1)=a1 -+ -+ endif -+ -+c set up principal axis system in terms of site positions -+ -+c test for (near) linear unit -+ -+ ill=0 -+ rtall=(rotinx(id,1)+rotiny(id,1)+rotinz(id,1)) -+ -+ if(rtall.gt.1.d-5)then -+ rotall=rtall -+ else -+ rotall=1.d0 -+ endif -+ -+ rotmin(id)=min(rotinx(id,1),rotiny(id,1)) -+ rotmin(id)=min(rotmin(id),rotinz(id,1))/rotall -+ -+ if((rotinx(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ if((rotiny(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ if((rotinz(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ -+ if(ill.ge.2)then -+ -+c point particle only -+ -+ ind(id,1)=1 -+ ind(id,2)=1 -+ ind(id,3)=1 -+ -+ do jj=1,9 -+ gaxs(id,jj)=0.d0 -+ enddo -+ -+ elseif(ill.eq.1)then -+ -+c linear molecule -+ -+ ind(id,1)=1 -+ ind(id,2)=2 -+ ind(id,3)=1 -+ -+ aa(1)=gxx(id,1)-gxx(id,2) -+ aa(4)=gyy(id,1)-gyy(id,2) -+ aa(7)=gzz(id,1)-gzz(id,2) -+ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) -+ -+ if(abs(aa(7)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(7)**2) -+ aa(2)=0.d0 -+ aa(5)=aa(7)/rsq -+ aa(8)=-aa(4)/rsq -+ -+ elseif(abs(aa(4)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(1)**2) -+ aa(2)=-aa(4)/rsq -+ aa(5)=aa(1)/rsq -+ aa(8)=0.d0 -+ -+ elseif(abs(aa(1)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(1)**2+aa(7)**2) -+ aa(2)=-aa(7)/rsq -+ aa(5)=0.d0 -+ aa(8)=aa(1)/rsq -+ -+ endif -+ -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+ call invert(aa,bb,det) -+ -+ if(abs(det).lt.1.d-5)call error(idnode,306) -+ -+ do j=1,9 -+ gaxs(id,j)=bb(j) -+ enddo -+ -+ elseif(ill.eq.0)then -+ -+c non-linear molecule -+ -+ i1=1 -+ i2=1 -+ i3=1 -+ pass1=.true. -+ dettest=1.d-1 -+ -+ do while(pass1.and.i2.lt.numgsit(id)-1) -+ -+ i2=i2+1 -+ i3=i2 -+ pass2=.true. -+ -+ do while(pass2.and.i3.lt.numgsit(id)) -+ -+ i3=i3+1 -+ -+ aa(1)=gxx(id,i1)-gxx(id,i2) -+ aa(4)=gyy(id,i1)-gyy(id,i2) -+ aa(7)=gzz(id,i1)-gzz(id,i2) -+ aa(2)=gxx(id,i1)-gxx(id,i3) -+ aa(5)=gyy(id,i1)-gyy(id,i3) -+ aa(8)=gzz(id,i1)-gzz(id,i3) -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+c invert matrix -+ -+ call invert(aa,bb,det) -+ -+c check on size of determinant - to see if the 3 sites are -+c too close to being linear for safety. -+ -+ pass2=abs(det).lt.dettest -+ -+ enddo -+ -+ pass1=abs(det).lt.dettest -+ -+ enddo -+ -+ if(abs(det).lt.dettest)call error(idnode,306) -+ -+c store indices used -+ -+ ind(id,1)=i1 -+ ind(id,2)=i2 -+ ind(id,3)=i3 -+ -+c store coefficients -+ -+ do j=1,9 -+ -+ gaxs(id,j)=bb(j) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c check that rigid unit does not contain frozen atoms -+ -+ safe=.true. -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ if(lstfrz(i).ne.0)safe=.false. -+ -+ enddo -+ -+ enddo -+ -+c global check on error condition -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,360) -+ -+c quaternions for all rigid groups in system -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ i1=lstrgd(jr+ind(id,1)) -+ i2=lstrgd(jr+ind(id,2)) -+ i3=lstrgd(jr+ind(id,3)) -+ -+ jr=jr+numgsit(id) -+ -+c group basis vectors -+ -+ aa(1)=xxx(i1)-xxx(i2) -+ aa(4)=yyy(i1)-yyy(i2) -+ aa(7)=zzz(i1)-zzz(i2) -+ -+ call images(imcon,0,1,1,cell,aa(1),aa(4),aa(7)) -+ -+ if(rotmin(id).gt.1.d-5)then -+ -+ aa(2)=xxx(i1)-xxx(i3) -+ aa(5)=yyy(i1)-yyy(i3) -+ aa(8)=zzz(i1)-zzz(i3) -+ -+ else -+ -+ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) -+ -+ if(abs(aa(7)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(7)**2) -+ aa(2)=0.d0 -+ aa(5)=aa(7)/rsq -+ aa(8)=-aa(4)/rsq -+ -+ elseif(abs(aa(4)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(1)**2) -+ aa(2)=-aa(4)/rsq -+ aa(5)=aa(1)/rsq -+ aa(8)=0.d0 -+ -+ elseif(abs(aa(1)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(1)**2+aa(7)**2) -+ aa(2)=-aa(7)/rsq -+ aa(5)=0.d0 -+ aa(8)=aa(1)/rsq -+ -+ endif -+ -+ endif -+ -+ call images(imcon,0,1,1,cell,aa(2),aa(5),aa(8)) -+ -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+c group rotational matrix -+ -+ rot(1)=gaxs(id,1)*aa(1)+gaxs(id,4)*aa(2)+gaxs(id,7)*aa(3) -+ rot(2)=gaxs(id,2)*aa(1)+gaxs(id,5)*aa(2)+gaxs(id,8)*aa(3) -+ rot(3)=gaxs(id,3)*aa(1)+gaxs(id,6)*aa(2)+gaxs(id,9)*aa(3) -+ rot(4)=gaxs(id,1)*aa(4)+gaxs(id,4)*aa(5)+gaxs(id,7)*aa(6) -+ rot(5)=gaxs(id,2)*aa(4)+gaxs(id,5)*aa(5)+gaxs(id,8)*aa(6) -+ rot(6)=gaxs(id,3)*aa(4)+gaxs(id,6)*aa(5)+gaxs(id,9)*aa(6) -+ rot(7)=gaxs(id,1)*aa(7)+gaxs(id,4)*aa(8)+gaxs(id,7)*aa(9) -+ rot(8)=gaxs(id,2)*aa(7)+gaxs(id,5)*aa(8)+gaxs(id,8)*aa(9) -+ rot(9)=gaxs(id,3)*aa(7)+gaxs(id,6)*aa(8)+gaxs(id,9)*aa(9) -+ -+c determine quaternions from rotational matrix -+ -+ aq=rot(1)+rot(5) -+ bq=rot(2)-rot(4) -+ cq=rot(6)-rot(8) -+ dq=rot(2)+rot(4) -+ eq=rot(3)+rot(7) -+ fq=rot(6)+rot(8) -+ gq=rot(3)-rot(7) -+ hq=rot(1)-rot(5) -+ -+ q0(ig)=0.5d0*sqrt(aq+sqrt(aq*aq+bq*bq)) -+ -+ if(q0(ig).gt.1.d-4)then -+ -+ q1(ig)=-0.25d0*cq/q0(ig) -+ q2(ig)=0.25d0*gq/q0(ig) -+ q3(ig)=-0.25d0*bq/q0(ig) -+ -+ else -+ -+ q1(ig)=0.5d0*sqrt(hq+sqrt(hq*hq+dq*dq)) -+ -+ if(q1(ig).gt.1.d-4)then -+ -+ q2(ig)=0.25d0*dq/q1(ig) -+ q3(ig)=0.25d0*eq/q1(ig) -+ -+ else -+ -+ q2(ig)=0.5d0*sqrt(-hq+sqrt(hq*hq+dq*dq)) -+ -+ if(q2(ig).gt.1.d-4)then -+ -+ q3(ig)=0.25d0*fq/q2(ig) -+ -+ else -+ -+ q3(ig)=1.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c normalise quaternions -+ -+ rnorm=1.d0/sqrt(q0(ig)**2+q1(ig)**2+q2(ig)**2+q3(ig)**2) -+ q0(ig)=rnorm*q0(ig) -+ q1(ig)=rnorm*q1(ig) -+ q2(ig)=rnorm*q2(ig) -+ q3(ig)=rnorm*q3(ig) -+ -+ enddo -+ -+c test for redundant degrees of freedom -+c and ensure rotational inertias are non-zero -+ -+ degrot=0.d0 -+ -+ if(lsolva)then -+ degrot_sol(:)=0.d0 -+ endif -+ -+ do ig=1,ngrp -+ -+ id=lstgtp(ig) -+ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1)) -+ -+ if(rotall*rotinx(id,1).lt.1.d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ if(rotall*rotiny(id,1).lt.1.d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ if(rotall*rotinz(id,1).lt.1d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ enddo -+ -+c rotational degrees of freedom and rigid body contribution -+c to total degrees of freedom -+ -+ degrot=degrot+dble(ngrp)*3.d0 -+ degfre=degrot+dble(ngrp)*3.d0 -+ -+ if(lsolva)then -+ -+ fngrp=1 -+ lngrp=0 -+ -+ do itmols=1,mxtmls -+ -+ lngrp=lngrp+nummols(itmols)*numgrp(itmols) -+ -+ do ig=fngrp,lngrp -+ -+ id=lstgtp(ig) -+ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1)) -+ -+ if(rotall*rotinx(id,1).lt.1.d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ if(rotall*rotiny(id,1).lt.1.d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ if(rotall*rotinz(id,1).lt.1d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ enddo -+ -+ fngrp=lngrp+1 -+ -+ enddo -+ -+ endif -+ -+c summarise results -+ -+ if(idnode.eq.0)then -+ -+ if(gmass(1).gt.0.d0)then -+ -+ write(nrite,'(/,/,12x,a)')' summary of rigid body set up' -+ -+ do id=1,mxungp -+ -+ if(gmass(id).gt.0.d0)then -+ -+ write(nrite,'(/,a,i10)')' group of type ',id -+ write(nrite,'(12x,a,f20.10)')' total mass ', -+ x gmass(id) -+ write(nrite,'(12x,a,3f20.10)')' rot. inertia ', -+ x rotinx(id,1),rotiny(id,1),rotinz(id,1) -+ write(nrite,'(/,12x,a,3(8x,a7))')' site','a coord', -+ x 'b coord','c coord' -+ do j=1,numgsit(id) -+ write(nrite,'(12x,i5,1p,3e15.5)')j,gxx(id,j), -+ x gyy(id,j),gzz(id,j) -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c find number of unique groups -+ -+ ngp=0 -+ do ig=1,ngrp -+ ngp=max(ngp,lstgtp(ig)) -+ enddo -+ -+c calculate reciprocal of rotational inertias -+ -+ do id=1,ngp -+ -+ rotlim=max(1.d-2,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1))*1.d-5 -+ -+ if(rotinx(id,1).lt.rotlim)then -+ rotinx(id,2)=0.d0 -+ else -+ rotinx(id,2)=1.d0/rotinx(id,1) -+ endif -+ -+ if(rotiny(id,1).lt.rotlim)then -+ rotiny(id,2)=0.d0 -+ else -+ rotiny(id,2)=1.d0/rotiny(id,1) -+ endif -+ -+ if(rotinz(id,1).lt.rotlim)then -+ rotinz(id,2)=0.d0 -+ else -+ rotinz(id,2)=1.d0/rotinz(id,1) -+ endif -+ -+ enddo -+ -+c Check of quaternion set up with atomic positions -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c group type -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 -+ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) -+ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) -+ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) -+ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 -+ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) -+ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) -+ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) -+ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxt(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyt(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzt(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ -+ txx(jr)=xxx(i)-xxt(i) -+ tyy(jr)=yyy(i)-yyt(i) -+ tzz(jr)=zzz(i)-zzt(i) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,jr,cell,txx,tyy,tzz) -+ -+c set tolerance for testing quaternion setup. -+ -+ rsq=0.d0 -+ tol=1.d-2 -+ -+ do i=1,jr -+ -+ rrr=txx(i)**2+tyy(i)**2+tzz(i)**2 -+ if(rrr.gt.tol)then -+ -+ rsq=rrr -+ -+ endif -+ -+ enddo -+ -+c exit if error in set up -+ -+ safe=.true. -+ if(rsq.gt.tol)safe=.false. -+ if(mxnode.gt.1)call gstate(safe) -+ -+ if(.not.safe)call error(idnode,310) -+ -+c sort lstgot into ascending order -+ -+ call shellsort(jt,lstgot) -+ -+c check that no site is in more than 1 rigid group -+ -+ i=1 -+ safe=.true. -+ do while(i.lt.jt) -+ -+ i=i+1 -+ linear=.true. -+ do while(linear) -+ -+ linear=.false. -+ -+ if(lstgot(i).eq.lstgot(i-1))then -+ -+ linear=.true. -+ safe=.false. -+ jt=jt-1 -+ -+ do j=i,jt -+ lstgot(j)=lstgot(j+1) -+ enddo -+ -+ endif -+ -+ if(i.ge.jt)linear=.false. -+ -+ enddo -+ -+ enddo -+ -+ if(.not.safe)call error(idnode,320) -+ -+c list of 'free' sites -+ -+ ii=1 -+ jj=0 -+ do i=1,natms -+ -+ if(lstgot(ii).eq.i)then -+ -+ ii=ii+1 -+ -+ else -+ -+ if(lstfrz(i).eq.0)then -+ jj=jj+1 -+ lstfre(jj)=i -+ endif -+ -+ endif -+ -+ enddo -+ -+c number of free sites -+ -+ ntfree=jj -+ -+c list of atoms integrated on this node -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ jr=jr+numgsit(id) -+ -+ enddo -+ -+ do i=1,jr -+ lstme(i)=lstrgd(i) -+ enddo -+ -+c block parameters for free atoms -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+ do i=ifre1,ifre2 -+ -+ jr=jr+1 -+ lstme(jr)=lstfre(i) -+ -+ enddo -+ -+c exchange quaternion data with other nodes -+ -+ if(mxnode.gt.1)call merge4 -+ x (idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+ if(lsolva)lstgot_sol(:)=lstgot(:) -+ -+c deallocate work arrays -+ -+ deallocate (ind,lstgot,stat=fail(1)) -+ deallocate (txx,tyy,tzz,stat=fail(2)) -+ deallocate (xxt,yyt,zzt,stat=fail(3)) -+ deallocate (gaxs,rotmin,stat=fail(4)) -+ deallocate (accum,stat=fail(5)) -+ -+ return -+ end subroutine quatbook -+ -+ subroutine abort_field_read(kode,idnode,nfield) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting FIELD file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nfield -+ -+ if(idnode.eq.0)close (nfield) -+ -+ if(kode.eq.1)then -+ -+c end of field file error exit -+ -+ call error(idnode,52) -+ -+ elseif(kode.eq.2)then -+ -+c unrecognised directive in field file -+ -+ call error(idnode,4) -+ -+ endif -+ -+ return -+ end subroutine abort_field_read -+ -+ subroutine abort_control_read(kode,idnode,nread) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting CONTROL file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nread -+ -+ if(idnode.eq.0)close (nread) -+ -+ if(kode.eq.1)then -+ -+c end of control file error exit -+ -+ call error(idnode,53) -+ -+ elseif(kode.eq.2)then -+ -+c general error exit from field file processing -+ -+ call error(idnode,0) -+ -+ endif -+ -+ return -+ end subroutine abort_control_read -+ -+ subroutine abort_config_read(kode,idnode,nconf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting CONTROL file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nconf -+ -+ if(idnode.eq.0)close (nconf) -+ -+ if(kode.eq.1)then -+ -+c general error exit from field file processing -+ -+ call error(idnode,54) -+ -+ elseif(kode.eq.2)then -+ -+c end of config file error exit -+ -+ call error(idnode,55) -+ -+ endif -+ -+ return -+ end subroutine abort_config_read -+ -+ subroutine neutbook(lneut,idnode,natms,nneut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for neutral group bookkeeping -+c -+c copyright - daresbury laboratory -+c author - w. smith nov 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lneut,safe -+ integer idnode,natms,nneut,i -+ -+ safe=.true. -+ -+c neutral group bookkeeping: sites must be listed consecutively -+ -+ if(lneut)then -+ -+ if(lstneu(1).ne.1)call error(idnode,230) -+ -+ neulst(1)=1 -+ nneut=1 -+ -+ do i=2,natms -+ -+ safe=.false. -+ if(lstneu(i).eq.lstneu(i-1))safe=.true. -+ if(lstneu(i).eq.lstneu(i-1)+1)then -+ -+ safe=.true. -+ nneut=nneut+1 -+ if(nneut.gt.mxneut)call error(idnode,220) -+ neulst(nneut)=i -+ -+ endif -+ -+ if(.not.safe)call error(idnode,230) -+ -+ enddo -+ -+ neulst(nneut+1)=natms+1 -+ -+ endif -+ -+ return -+ -+ end subroutine neutbook -+ -+ subroutine intlist -+ x (lshmov,lcnb,idnode,mxnode,natms,nscons,ntangl,ntbond, -+ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the interaction lists -+c for the entire simulated system -+c -+c parallel replicated dat version : block data -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992 -+c amended - t.forester oct 1993 -+c amended - t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,safe1,lcnb,lchk,lfail -+ integer idnode,mxnode,natms,nscons,ntangl,ntbond,ntcons -+ integer ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf -+ integer ibonds,jbonds,kbonds,ipmf,jpmf,iangle,jangle,kangle -+ integer idihed,jdihed,kdihed,iinver,jinver,kinver,iteths -+ integer jteths,kteths,ishels,jshels,kshels,ntbon0,ntpmf0 -+ integer ntang0,ntdih0,ntinv0,nttet0,ntshl0,ntcon0,idum -+ integer itmols,isite,iconst,jconst,kconst,ibnd1,ibnd2,ipmf1 -+ integer ipmf2,iang1,iang2,idih1,idih2,iinv1,iinv2,itet1 -+ integer itet2,ishl1,ishl2,imols,lbonds,lpmf,jj,nnn,langle -+ integer ldihed,linver,lteths,lshels,i,ii,ntmp,klo,khi,ngrp -+ integer klo0,ifail,iloop,nnode,nscons0,nscons1,icon,fail -+ integer kcons,id,jdnode,lconst,itry,iatom,jatom,j,nfail -+ real(8) tol -+ -+ integer, allocatable :: itest(:),index(:),kscons(:) -+ integer, allocatable :: msite(:),mconst(:),listin(:) -+ -+ dimension fail(4) -+ -+ data fail/0,0,0,0/ -+ -+c allocate work arrays -+ -+ allocate (itest(mxtmls),index(mxtmls),stat=fail(1)) -+ allocate (msite(mxtmls),mconst(mxtmls),stat=fail(2)) -+ allocate (listin(mxatms),stat=fail(3)) -+ allocate (kscons(0:mxproc-1),stat=fail(4)) -+ do i=1,4 -+ if(fail(i).ne.0)call error(idnode,1800) -+ enddo -+ -+c initialise bookkeeping indices -+ -+ ibonds=0 -+ jbonds=0 -+ kbonds=0 -+ ipmf=0 -+ jpmf=0 -+ iangle=0 -+ jangle=0 -+ kangle=0 -+ idihed=0 -+ jdihed=0 -+ kdihed=0 -+ iinver=0 -+ jinver=0 -+ kinver=0 -+ iteths=0 -+ jteths=0 -+ kteths=0 -+ ishels=0 -+ jshels=0 -+ kshels=0 -+ safe=.true. -+ safe1=.true. -+ -+c find total number of bonds,pmf constraints,bond constraints, -+c angles,dihedrals,inversions, tethers,core-shells, in system -+c - ignoring frozen atoms -+ -+ ntbon0=0 -+ ntpmf0=0 -+ ntcon0=0 -+ ntang0=0 -+ ntdih0=0 -+ ntinv0=0 -+ nttet0=0 -+ ntshl0=0 -+ nscons=0 -+ ntcons=0 -+ -+ do itmols=1,ntpmls -+ -+ ntbon0=ntbon0+nummols(itmols)*numbonds(itmols) -+ ntpmf0=ntpmf0+nummols(itmols)*numpmf(itmols) -+ ntcon0=ntcon0+nummols(itmols)*numcon(itmols) -+ ntang0=ntang0+nummols(itmols)*numang(itmols) -+ ntdih0=ntdih0+nummols(itmols)*numdih(itmols) -+ ntinv0=ntinv0+nummols(itmols)*numinv(itmols) -+ nttet0=nttet0+nummols(itmols)*numteth(itmols) -+ ntshl0=ntshl0+nummols(itmols)*numshl(itmols) -+ -+ enddo -+ -+ isite=0 -+ iconst=0 -+ jconst=0 -+ kconst=0 -+ -+c first and last index of bonds, angles etc for this node -+ -+ ibnd1=(idnode*ntbon0)/mxnode+1 -+ ibnd2=((idnode+1)*ntbon0)/mxnode -+ -+ ipmf1=(idnode*ntpmf0)/mxnode+1 -+ ipmf2=((idnode+1)*ntpmf0)/mxnode -+ ntpmf=ntpmf0 -+ nspmf=ipmf2+1-ipmf1 -+ -+ iang1=(idnode*ntang0)/mxnode+1 -+ iang2=((idnode+1)*ntang0)/mxnode -+ -+ idih1=(idnode*ntdih0)/mxnode+1 -+ idih2=((idnode+1)*ntdih0)/mxnode -+ -+ iinv1=(idnode*ntinv0)/mxnode+1 -+ iinv2=((idnode+1)*ntinv0)/mxnode -+ -+ itet1=(idnode*nttet0)/mxnode+1 -+ itet2=((idnode+1)*nttet0)/mxnode -+ -+ ishl1=(idnode*ntshl0)/mxnode+1 -+ ishl2=((idnode+1)*ntshl0)/mxnode -+ -+c loop over molecule types -+ -+ do itmols=1,ntpmls -+ -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct bond constraint list later -+c construct chemical bond interaction list -+ -+ do lbonds=1,numbonds(itmols) -+ -+ ibonds=ibonds+1 -+ -+ if(ibonds.ge.ibnd1.and.ibonds.le.ibnd2)then -+ -+ jbonds=jbonds+1 -+ if(jbonds.le.mxbond)then -+ -+ listbnd(jbonds,1)=lbonds+kbonds -+ listbnd(jbonds,2)=lstbnd(lbonds+kbonds,1) -+ x +isite -+ listbnd(jbonds,3)=lstbnd(lbonds+kbonds,2) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,31) -+ -+c construct pmf site lists - no exclusions -+ -+ do lpmf=1,numpmf(itmols) -+ -+ ipmf=ipmf+1 -+ -+ if(ipmf.ge.ipmf1.and.ipmf.le.ipmf2)then -+ -+ jpmf=jpmf+1 -+ if(jpmf.le.mspmf)then -+ -+ nnn=npmf(1)+npmf(2) -+ if(nnn.le.mxspmf)then -+ -+ do jj=1,npmf(1)+npmf(2) -+ lstpmf(jj,jpmf)=indpmf(jj)+isite -+ enddo -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ else -+ -+ safe1=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe1) -+ if(.not.safe1)call error(idnode,458) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,460) -+ -+c construct valence angle interaction list -+ -+ do langle=1,numang(itmols) -+ -+ iangle=iangle+1 -+ -+ if(iangle.ge.iang1.and.iangle.le.iang2)then -+ -+ jangle=jangle+1 -+ if(jangle.le.mxangl)then -+ -+ listang(jangle,1)=langle+kangle -+ listang(jangle,2)=lstang(langle+kangle,1) -+ x +isite -+ listang(jangle,3)=lstang(langle+kangle,2) -+ x +isite -+ listang(jangle,4)=lstang(langle+kangle,3) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,51) -+ -+c construct dihedral angle interaction list -+ -+ do ldihed=1,numdih(itmols) -+ -+ idihed=idihed+1 -+ -+ if(idihed.ge.idih1.and.idihed.le.idih2)then -+ -+ jdihed=jdihed+1 -+ if(jdihed.le.mxdihd)then -+ -+ listdih(jdihed,1)=ldihed+kdihed -+ listdih(jdihed,2)=lstdih(ldihed+kdihed,1) -+ x +isite -+ listdih(jdihed,3)=lstdih(ldihed+kdihed,2) -+ x +isite -+ listdih(jdihed,4)=lstdih(ldihed+kdihed,3) -+ x +isite -+ listdih(jdihed,5)=lstdih(ldihed+kdihed,4) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,61) -+ -+c construct inversion potential list -+ -+ do linver=1,numinv(itmols) -+ -+ iinver=iinver+1 -+ -+ if(iinver.ge.iinv1.and.iinver.le.iinv2)then -+ -+ jinver=jinver+1 -+ if(jinver.le.mxinv)then -+ -+ listinv(jinver,1)=linver+kinver -+ listinv(jinver,2)=lstinv(linver+kinver,1) -+ x +isite -+ listinv(jinver,3)=lstinv(linver+kinver,2) -+ x +isite -+ listinv(jinver,4)=lstinv(linver+kinver,3) -+ x +isite -+ listinv(jinver,5)=lstinv(linver+kinver,4) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,77) -+ -+c construct tethered atoms interaction list -+ -+ do lteths=1,numteth(itmols) -+ -+ iteths=iteths+1 -+ -+ if(iteths.ge.itet1.and.iteths.le.itet2)then -+ -+ jteths=jteths+1 -+ if(jteths.le.msteth)then -+ -+ listtet(jteths,1)=lteths+kteths -+ listtet(jteths,2)=lsttet(lteths+kteths)+isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,63) -+ -+c construct core-shell list -+ -+ do lshels=1,numshl(itmols) -+ -+ ishels=ishels+1 -+ -+ if(ishels.ge.ishl1.and.ishels.le.ishl2)then -+ -+ jshels=jshels+1 -+ if(jshels.le.mxshl)then -+ -+ listshl(jshels,1)=lshels+kshels -+ listshl(jshels,2)=lstshl(lshels+kshels,1) -+ x +isite -+ listshl(jshels,3)=lstshl(lshels+kshels,2) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,59) -+ -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ kbonds=kbonds+numbonds(itmols) -+ kangle=kangle+numang(itmols) -+ kdihed=kdihed+numdih(itmols) -+ kinver=kinver+numinv(itmols) -+ kteths=kteths+numteth(itmols) -+ kshels=kshels+numshl(itmols) -+ -+ enddo -+ -+c store array counters for bookkeeping -+ -+ ntbond=ibonds -+ ntangl=iangle -+ ntdihd=idihed -+ ntinv=iinver -+ ntteth=iteths -+ ntshl=ishels -+ -+c pass bond constraint information to other nodes -+ -+ if(ntcon0.gt.0)then -+ -+ ntcons=ntcon0 -+ -+c find starting site no. and constraint no. for each molec. type -+ -+ msite(1)=0 -+ mconst(1)=0 -+ -+ do itmols=2,ntpmls -+ -+ msite(itmols)=msite(itmols-1)+numsit(itmols-1)* -+ x nummols(itmols-1) -+ mconst(itmols)=mconst(itmols-1)+numcon(itmols-1) -+ -+ enddo -+ -+c sort molecules into ascending order of number of constraints -+ -+ do i=1,ntpmls -+ -+ itest(i)=numcon(i) -+ index(i)=0 -+ -+ enddo -+ -+ call shellsort(ntpmls,itest) -+ -+ do i=1,ntpmls -+ -+ lchk=.true. -+ do j=1,ntpmls -+ -+ if(itest(i).eq.numcon(j))then -+ -+ if(lchk)then -+ index(i)=j -+ lchk=.false. -+ -+ endif -+ -+ do ii=1,i-1 -+ if(index(ii).eq.j)lchk=.true. -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c load balance to within 10% -+ -+ tol=1.0d0+(0.10d0)/2.d0 -+ kcons=(ntcons)/mxnode -+ ntmp=0 -+ -+c find smallest constrained molecule to allocate to a node -+ -+ do i=1,ntpmls -+ -+ if(ntmp.le.mxnode)then -+ -+ if(numcon(index(i)).gt.0)then -+ ntmp=ntmp+nummols(index(i)) -+ klo=max(0,kcons-numcon(index(i))/2) -+ khi=klo+numcon(index(i))+1 -+ endif -+ -+ endif -+ -+ enddo -+ -+c reset hi/lo limits if molecules contain too many constraints -+ -+ if(dble(khi)/dble(max(1,klo)).gt.tol)then -+ klo=nint(dble(kcons)/tol) -+ khi=nint(dble(kcons)*tol)+1 -+ endif -+ -+c store lo value for later -+ -+ klo0=klo -+ -+c begin assignment of constraints ---------------------------------- -+ -+ ifail=-1 -+ lfail=.true. -+ do while(lfail) -+ -+ ifail=ifail+1 -+ -+ if(ifail.gt.ntpmls)then -+ call error(idnode,432) -+ endif -+ -+ iconst=0 -+ jconst=0 -+ kconst=0 -+ lconst=0 -+ -+c zero running totals of constraints on each processor -+ -+ do id=0,mxnode-1 -+ kscons(id)=0 -+ enddo -+ -+ iloop=0 -+ lfail=.false. -+ iconst=0 -+ jconst=0 -+ nnode=0 -+ -+c assign difficult molecules in blocks -+ -+ if(ifail.gt.0)then -+ -+ nfail=0 -+ do i=1,ifail -+ -+ ii=ntpmls+1-i -+ nfail=nfail+nummols(index(ii))*numcon(index(ii)) -+ -+ enddo -+ -+c decide on number of processors to split over -+ -+ nnode=int(dble(nfail)/dble(max(kcons,1))+1.d0/tol) -+ nnode=max(2,nnode) -+ nnode=min(nnode,mxnode) -+ -+c assign to processors 0..nnode-1 -+ -+ do id=0,nnode-1 -+ -+ nscons0=(id*nfail)/nnode+1 -+ nscons1=((id+1)*nfail)/nnode -+ -+ kscons(id)=nscons1+1-nscons0 -+ -+ enddo -+ -+c this processors block -+ -+ nscons0=(idnode*nfail)/nnode+1 -+ nscons1=((idnode+1)*nfail)/nnode -+ -+c assign in blocks -+ -+ do itmols=ntpmls,ntpmls-ifail+1,-1 -+ -+ ii=index(itmols) -+ icon=numcon(ii) -+ kconst=mconst(ii) -+ -+ do imols=1,nummols(ii) -+ -+ isite=msite(ii)+(imols-1)*numsit(ii) -+ -+c construct bond constraint list -+ -+ do lconst=1,numcon(ii) -+ -+ iconst=iconst+1 -+ -+ if(iconst.ge.nscons0.and.iconst.le.nscons1)then -+ -+ jconst=jconst+1 -+ -+ if(jconst.le.mxcons)then -+ -+ listcon(jconst,1)=lconst+kconst -+ iatom=lstcon(lconst+kconst,1)+isite -+ jatom=lstcon(lconst+kconst,2)+isite -+ -+ listcon(jconst,2)=iatom -+ listcon(jconst,3)=jatom -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c assign non-problematic molecules -+ -+ jdnode=mod(nnode+1,mxnode) -+ -+ do itmols=ntpmls-ifail,1,-1 -+ -+ ii=index(itmols) -+ icon=numcon(ii) -+ kconst=mconst(ii) -+ -+ do imols=1,nummols(ii) -+ -+ itry=0 -+ lchk=.true. -+ do while(lchk) -+ -+ if(kscons(jdnode)+icon.le.klo)then -+ -+ if(jdnode.ne.idnode)then -+ kscons(jdnode)=kscons(jdnode)+icon -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.false. -+ else -+ -+c construct bond constraint list -+ -+ isite=msite(ii)+(imols-1)*numsit(ii) -+ do lconst=1,numcon(ii) -+ -+ jconst=jconst+1 -+ -+ if(jconst.le.mxcons)then -+ -+ listcon(jconst,1)=lconst+kconst -+ iatom=lstcon(lconst+kconst,1)+isite -+ jatom=lstcon(lconst+kconst,2)+isite -+ listcon(jconst,2)=iatom -+ listcon(jconst,3)=jatom -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ kscons(jdnode)=kscons(jdnode)+icon -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.false. -+ -+ endif -+ -+ else -+ -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.true. -+ itry=itry+1 -+ -+ endif -+ -+ if(lchk.and.itry.gt.mxnode)then -+ -+ klo=kcons -+ kcons=khi -+ itry=0 -+ iloop=iloop+1 -+ -+ endif -+ -+c split molecule across nodes if have to -+ -+ if(iloop.gt.3)then -+ lfail=.true. -+ kcons=ntcons/mxnode -+ klo=klo0 -+ lchk=.false. -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c check no node has less than minimum number -+ -+ do id=0,mxnode-1 -+ if(kscons(id).lt.klo0)then -+ lfail=.true. -+ endif -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)then -+ -+ if(mxnode.gt.1)call gimax(jconst,1,idum) -+ if(idnode.eq.0)write(nrite,'(a,i10,a,i10)') -+ x 'Number of constraints found ',jconst,'Max allowed ',mxcons -+ -+ call error(idnode,41) -+ -+ endif -+ -+ nscons=kscons(idnode) -+ -+ call passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+ endif -+ -+ if(npmf(1).gt.0)then -+ -+ call passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+ endif -+ -+c pass rigid body data -+ -+ lcnb=.false. -+ if(ntcons.gt.0.and.ngrp.gt.0)then -+ -+ call passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp, -+ x numgsit) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(itest,index,msite,stat=fail(1)) -+ deallocate(mconst,kscons,listin,stat=fail(2)) -+ -+ return -+ end subroutine intlist -+ -+ subroutine ensemble_selection -+ x (directive,lens,kill,idnode,keyens,mode,taut,taup) -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the ensemble and reading -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical kill,lens -+ integer keyens,idnode,idum,mode -+ real(8) taut,taup -+ -+ if(findstring('nve',directive,idum))then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'microcanonical ensemble')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('nvt',directive,idum))then -+ -+ if(findstring('evans',directive,idum))then -+ -+ keyens=1 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Evans Gaussian temperature constraints', -+ x ' in use')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('ber',directive,idum))then -+ -+ keyens=2 -+ taut=dblstr(directive,69,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen thermostat', -+ x /,1x,'thermostat relaxation time ',1p,e12.4)") -+ x taut -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=3 -+ taut=dblstr(directive,69,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4)") -+ x taut -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ elseif(findstring('npt',directive,idum))then -+ -+ if(findstring('ber',directive,idum))then -+ -+ keyens=4 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen isotropic N-P-T', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=5 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover (Melchionna) isotropic N-P-T ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ elseif(findstring('nst',directive,idum))then -+ -+ mode=0 -+ if(findstring('block',directive,idum))mode=1 -+ if(findstring('surf',directive,idum))mode=2 -+ if(findstring('slab',directive,idum))mode=3 -+ -+ if(findstring('ber',directive,idum))then -+ -+ keyens=6 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen anisotropic N-P-T', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=7 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover (Melchionna) anisotropic N-P-T ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ if(mode.eq.0)then -+ write(nrite,"(/,1x,'NST mode 0 X<>Y<>Z')") -+ elseif(mode.eq.1)then -+ write(nrite, -+ x "(/,1x,'NST mode 1 X<>Y<>Z (rectangular block)')") -+ elseif(mode.eq.2)then -+ write(nrite, -+ x "(/,1x,'NST mode 2 X=Y<>Z (liquid surface)')") -+ elseif(mode.eq.3)then -+ write(nrite, -+ x "(/,1x,'NST mode 3 X<>Y<>Z (solid slab)')") -+ endif -+ -+ endif -+ -+ elseif(findstring('pmf',directive,idum))then -+ -+ keyens=8 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'potential of mean force calculation (NVE)')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ call error(idnode,-436) -+ kill=.true. -+ -+ endif -+ -+ return -+ end subroutine ensemble_selection -+ -+ subroutine neb_option -+ x (directive,lneb,lminopt,idnode,numneb,keytol,sprneb, -+ x opttol,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for NEB option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit -+ character*1 directive(lenrec) -+ logical lneb,lminopt,endneb,safe -+ integer numneb,idnode,keytol,i,idum -+ real(8) sprneb,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ lminopt=.true. -+ lneb=.true. -+ endneb=.false. -+ numneb=intstr(directive,lenrec,idum) -+ if(numneb.eq.0)numneb=1 -+ numneb=min(maxneb,numneb) -+ -+ hyp_units=1.d0 -+ do while(.not.endneb) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endneb',directive,idum))then -+ endneb=.true. -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('basin_1',directive,idum))then -+ call striptext(directive,lenrec,1) -+ do i=1,numneb -+ bsn_1(i)=intstr(directive,lenrec,idum) -+ enddo -+ elseif(findstring('basin_2',directive,idum))then -+ call striptext(directive,lenrec,1) -+ do i=1,numneb -+ bsn_2(i)=intstr(directive,lenrec,idum) -+ enddo -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,1x,'NEB calculation controls')") -+ write(nrite,"(/,1x,'identity of basin 1 ', -+ x 10i10)")(bsn_1(i),i=1,numneb) -+ write(nrite,"(1x,'identity of basin 2 ', -+ x 10i10)")(bsn_2(i),i=1,numneb) -+ write(nrite, -+ x "(1x,'NEB spring constant ',e12.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'energy units ',2x,a8)") -+ x sprneb,opttol,cunit -+ -+ call print_optim(keytol) -+ -+ endif -+ -+c units conversion -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ return -+ end subroutine neb_option -+ -+ subroutine bpd_option -+ x (directive,seek,lbpd,ltad,lminopt,prechk,nebgo,keybpd,idnode, -+ x nblock,ntrack,keytol,ebias,vmin,catchrad,sprneb,opttol, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for bias potential -+c dynamics option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit,seek -+ character*1 directive(lenrec) -+ logical lbpd,ltad,lminopt,prechk,endbpd,safe,nebgo -+ integer keybpd,idnode,nblock,ntrack,keytol,idum -+ real(8) ebias,vmin,catchrad,sprneb,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ if(ltad)call error(idnode,2355) -+ lminopt=.true. -+ lbpd=.true. -+ endbpd=.false. -+ cunit=" dl_poly" -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'bias potential dynamics controls')") -+ -+ if(findstring('dyn',directive,idum))then -+ -+ keybpd=1 -+ hyp_units=energy_unit() -+ ebias=dblstr(directive,lenrec,idum) -+ vmin=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ if(idnode.eq.0)write(nrite,"( -+ x 1x,'dynamics option selected ', -+ x /,1x,'bias potential E_bias (kelvin)',f10.4, -+ x /,1x,'bias potential V_min (kelvin)',f10.4 -+ x /,1x,'energy units ',2x,a8)") -+ x ebias,vmin,cunit -+ -+ elseif(findstring('path',directive,idum))then -+ -+ keybpd=2 -+ nebgo=.true. -+ hyp_units=1.d0 -+ do while(.not.endbpd) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endbpd',directive,idum))then -+ endbpd=.true. -+ elseif(findstring('pre',directive,idum))then -+ prechk=.true. -+ if(findstring('false',directive,idum))prechk=.false. -+ elseif(findstring('noneb',directive,idum))then -+ nebgo=.false. -+ elseif(findstring('target',directive,idum))then -+ call getword(seek,directive,8,lenrec) -+ call getword(seek,directive,8,lenrec) -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('ebias',directive,idum))then -+ ebias=dblstr(directive,lenrec,idum) -+ elseif(findstring('vmin',directive,idum))then -+ vmin=dblstr(directive,lenrec,idum) -+ elseif(findstring('num_block',directive,idum))then -+ nblock=intstr(directive,lenrec,idum) -+ elseif(findstring('num_track',directive,idum))then -+ ntrack=intstr(directive,lenrec,idum) -+ elseif(findstring('catch_radius',directive,idum))then -+ catchrad=dblstr(directive,lenrec,idum) -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"( -+ x 1x,'dynamics with path analysis selected', -+ x /,1x,'bias potential E_bias (kelvin)',f10.4, -+ x /,1x,'bias potential V_min (kelvin)',f10.4, -+ x /,1x,'steps per time block ',i10, -+ x /,1x,'steps per tracking block ',i10, -+ x /,1x,'configuration catch radius (A)',f10.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'atom type to be tracked ',2x,a8, -+ x /,1x,'energy units ',2x,a8)") -+ x ebias,vmin,nblock,ntrack,catchrad,opttol,seek,cunit -+ if(nebgo)write(nrite, -+ x "(1x,'NEB spring constant ',e12.4)")sprneb -+ if(prechk)write(nrite, -+ x "(1x,'transition prechecking option selected')") -+ call print_optim(keytol) -+ -+ endif -+ -+c energy unit conversions -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ endif -+ -+ return -+ end subroutine bpd_option -+ -+ subroutine tad_option -+ x (directive,ltad,lbpd,lminopt,prechk,tadall,idnode,nblock, -+ x ntrack,blkout,keytol,catchrad,sprneb,tlow,deltad,opttol, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for TAD option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit -+ character*1 directive(lenrec) -+ logical ltad,lbpd,lminopt,prechk,tadall,endtad,safe -+ integer idnode,nblock,ntrack,blkout,keytol,idum -+ real(8) catchrad,sprneb,deltad,tlow,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ if(lbpd)call error(idnode,2355) -+ lminopt=.true. -+ ltad=.true. -+ endtad=.false. -+ hyp_units=1.d0 -+ -+ do while(.not.endtad) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endtad',directive,idum))then -+ endtad=.true. -+ elseif(findstring('pre',directive,idum))then -+ prechk=.true. -+ if(findstring('false',directive,idum))prechk=.false. -+ elseif(findstring('all',directive,idum))then -+ tadall=.true. -+ if(findstring('false',directive,idum))tadall=.false. -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('num_block',directive,idum))then -+ nblock=intstr(directive,lenrec,idum) -+ elseif(findstring('num_track',directive,idum))then -+ ntrack=intstr(directive,lenrec,idum) -+ elseif(findstring('blackout',directive,idum))then -+ blkout=intstr(directive,lenrec,idum) -+ elseif(findstring('catch_radius',directive,idum))then -+ catchrad=dblstr(directive,lenrec,idum) -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('deltad',directive,idum))then -+ deltad=dblstr(directive,lenrec,idum) -+ elseif(findstring('low_temp',directive,idum))then -+ tlow=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'TAD dynamics controls' -+ x /,1x,'steps per time block ',i10, -+ x /,1x,'steps per tracking block ',i10, -+ x /,1x,'steps in blackout periods ',i10, -+ x /,1x,'configuration catch radius ',1p,e12.4, -+ x /,1x,'NEB spring constant ',e12.4, -+ x /,1x,'stopping parameter ',e12.4, -+ x /,1x,'target low temperature ',e12.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'energy units ',2x,a8)") -+ x nblock,ntrack,blkout,catchrad,sprneb,deltad, -+ x tlow,opttol,cunit -+ if(prechk)write(nrite, -+ x "(1x,'transition prechecking option selected')") -+ if(tadall)write(nrite, -+ x "(1x,'option for all basins analysis selected')") -+ call print_optim(keytol) -+ -+ endif -+ -+c energy unit conversions -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ return -+ end subroutine tad_option -+ -+ subroutine metadyn_option -+ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, -+ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, -+ x locpe_scale,ref_W_aug,h_aug,wt_Dt) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for metadynamics option -+c copyright - daresbury laboratory -+c author - w. smith jan 2011 -+c -+c note: default values are set in metafreeze_module -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lmetadyn,endmet,lstein,ltet,lglobpe,llocpe,safe -+ integer idnode,idum,ncolvar,nq4,nq6,ntet,hkey,meta_step_int -+ real(8) globpe_scale,locpe_scale,ref_W_aug,h_aug,wt_Dt -+ -+ lmetadyn=.true. -+ endmet=.false. -+ -+ do while(.not.endmet) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endmet',directive,idum))then -+ endmet=.true. -+ elseif(findstring('ncolvar',directive,idum))then -+ ncolvar=intstr(directive,lenrec,idum) -+ elseif(findstring('lstein',directive,idum))then -+ lstein=.true. -+ if(findstring('false',directive,idum))lstein=.false. -+ elseif(findstring('ltet',directive,idum))then -+ ltet=.true. -+ if(findstring('false',directive,idum))ltet=.false. -+ elseif(findstring('lglobpe',directive,idum))then -+ lglobpe=.true. -+ if(findstring('false',directive,idum))lglobpe=.false. -+ elseif(findstring('llocpe',directive,idum))then -+ llocpe=.true. -+ if(findstring('false',directive,idum))llocpe=.false. -+ elseif(findstring('globpe_scale',directive,idum))then -+ globpe_scale=dblstr(directive,lenrec,idum) -+ elseif(findstring('locpe_scale',directive,idum))then -+ locpe_scale=dblstr(directive,lenrec,idum) -+ elseif(findstring('nq4',directive,idum))then -+ nq4=intstr(directive,lenrec,idum) -+ nq4=intstr(directive,lenrec,idum) ! do twice - number in name! -+ elseif(findstring('nq6',directive,idum))then -+ nq6=intstr(directive,lenrec,idum) -+ nq6=intstr(directive,lenrec,idum) ! do twice - number in name! -+ elseif(findstring('ntet',directive,idum))then -+ ntet=intstr(directive,lenrec,idum) -+ elseif(findstring('meta_step_int',directive,idum))then -+ meta_step_int=intstr(directive,lenrec,idum) -+ elseif(findstring('ref_w_aug',directive,idum))then -+ ref_W_aug=dblstr(directive,lenrec,idum) -+ elseif(findstring('h_aug',directive,idum))then -+ h_aug=dblstr(directive,lenrec,idum) -+ elseif(findstring('hkey',directive,idum))then -+ hkey=intstr(directive,lenrec,idum) -+ elseif(findstring('wt_dt',directive,idum))then -+ wt_dt=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'metadynamics controls' -+ x /,1x,'total number of collective variables',i10, -+ x /,1x,'steinhardt parameters option (Q4/Q6)',l10, -+ x /,1x,'tetrahedral parameters option (zeta)',l10, -+ x /,1x,'global potential parameter option ',l10, -+ x /,1x,'local potential parameter option ',l10, -+ x /,1x,'global potential param. scale factor',e12.4, -+ x /,1x,'local potential param. scale factor ',e12.4)") -+ x ncolvar,lstein,ltet,lglobpe,llocpe,globpe_scale,locpe_scale -+ -+ write(nrite, -+ x "( 1x,'number of Q4 atom pair types ',i10, -+ x /,1x,'number of Q6 atom pair types ',i10, -+ x /,1x,'number of zeta atom triplet types ',i10)") -+ x nq4,nq6,ntet -+ -+ write(nrite, -+ x "( 1x,'gaussian deposition interval ',i10, -+ x /,1x,'reference gaussian height ',e12.4, -+ x /,1x,'gaussian width parameter ',e12.4, -+ x /,1x,'height control key ',i10, -+ x /,1x,'well-tempered control parameter ',e12.4)") -+ x meta_step_int,ref_W_aug,h_aug,hkey,wt_Dt -+ -+ endif -+ -+ return -+ end subroutine metadyn_option -+ -+ subroutine ewald_selection -+ x (directive,lhke,lspme,lewald,lcut,lforc,kill,idnode,keyfce, -+ x imcon,nhko,nlatt,kmax1,kmax2,kmax3,alpha,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the ewald method and reading -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lhke,lspme,lewald,lcut,lforc,kill,safe -+ integer idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2,kmax3,idum -+ integer kmaxpow2 -+ real(8) alpha,rcut,eps,tol,fac,tol1 -+ -+ lhke=findstring('hke',directive,idum) -+ lspme=findstring('spme',directive,idum) -+ lewald=findstring('ewald',directive,idum) -+ if(lewald)keyfce=2 -+ if(lspme)keyfce=12 -+ if(lhke)keyfce=14 -+ if(idnode.eq.0)open(nconf,file='CONFIG') -+ call getrec(safe,idnode,nconf) -+ call getrec(safe,idnode,nconf) -+ imcon=intstr(record,lenrec,idum) -+ imcon=intstr(record,lenrec,idum) -+ if(.not.lhke.and.(imcon.eq.0.or.imcon.eq.6))then -+ -+ call error(idnode,-180) -+ kill=.true. -+ -+ endif -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Ewald sum precision ',7x,1p,e12.4)")eps -+ -+ if(lhke)then -+ -+ nhko=min(intstr(directive,lenrec,idum),3) -+ nlatt=min(intstr(directive,lenrec,idum),2) -+ if(nlatt.eq.0)nlatt=1 -+ if(nhko.eq.0)nhko=1 -+ -+ endif -+ -+ if(.not.lcut)then -+ call error(idnode,-433) -+ kill=.true. -+ else -+ -+c retreive cell vectors -+ -+ call getrec(safe,idnode,nconf) -+ cell(1)=dblstr(record,lenrec,idum) -+ cell(2)=dblstr(record,lenrec,idum) -+ cell(3)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ cell(4)=dblstr(record,lenrec,idum) -+ cell(5)=dblstr(record,lenrec,idum) -+ cell(6)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ cell(7)=dblstr(record,lenrec,idum) -+ cell(8)=dblstr(record,lenrec,idum) -+ cell(9)=dblstr(record,lenrec,idum) -+ -+c compute alpha and the kmax -+ -+ if(lewald.or.lspme)then -+ -+ call dcell(cell,celprp) -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) -+ fac=1.d0 -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x fac=2.d0**(1.d0/3.d0) -+ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) -+ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) -+ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) -+ -+ elseif(lhke)then -+ -+ if(nhko.eq.0)then -+ if(eps.le.1.d-6)then -+ alpha=3.46d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=3.14d0/rcut -+ else -+ alpha=2.76d0/rcut -+ endif -+ elseif(nhko.eq.1)then -+ if(eps.le.1.d-6)then -+ alpha=4.37d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.08d0/rcut -+ else -+ alpha=3.75d0/rcut -+ endif -+ elseif(nhko.eq.2)then -+ if(eps.le.1.d-6)then -+ alpha=5.01d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.74d0/rcut -+ else -+ alpha=4.44d0/rcut -+ endif -+ elseif(nhko.eq.3)then -+ if(eps.le.1.d-6)then -+ alpha=5.55d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=5.28d0/rcut -+ else -+ alpha=5.00d0/rcut -+ endif -+ endif -+ alpha=alpha/dble(2*nlatt+1) -+ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 -+ call dcell(cell,celprp) -+ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) -+ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) -+ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) -+ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) -+ kmax3=1 -+ -+ endif -+ -+ endif -+ -+ else -+ -+ alpha=dblstr(directive,lenrec,idum) -+ kmax1=intstr(directive,lenrec,idum) -+ kmax2=intstr(directive,lenrec,idum) -+ -+ if(lhke)then -+ -+ kmax3=1 -+ nhko=min(intstr(directive,lenrec,idum),3) -+ nlatt=min(intstr(directive,lenrec,idum),2) -+ -+ else -+ -+ kmax3=intstr(directive,lenrec,idum) -+ -+ endif -+ -+ endif -+ -+c if spme double kmax and set to next power of 2, with current upper -+c limit of 512. -+ -+ if(lspme)then -+ -+ kmaxpow2=1 -+ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax1=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax2=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax3=2 * kmaxpow2 -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ close(nconf) -+ -+ if(lspme)then -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : SPME ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") -+ x alpha,kmax1/2,kmax2/2,kmax3/2 -+ -+ elseif(lhke)then -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : Hautman-Klein-Ewald sum ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 ',2i5)") -+ x alpha,kmax1,kmax2 -+ -+ write(nrite, -+ x "(1x,'HKE expansion order ',7x,i10, -+ x /,1x,'HKE lattice control ',7x,i10)")nhko,nlatt -+ -+ else -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : Ewald sum ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") -+ x alpha,kmax1,kmax2,kmax3 -+ -+ endif -+ -+ endif -+ -+ if(lspme)then -+ -+c Initialize fft tables -+ -+CFFTW call fftw3d_f77_create_plan -+CFFTW x (fplan,kmaxd,kmaxe,kmaxf, -+CFFTW x FFTW_FORWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) -+CFFTW -+CFFTW call fftw3d_f77_create_plan -+CFFTW x (bplan,kmaxd,kmaxe,kmaxf, -+CFFTW x FFTW_BACKWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) -+ -+CSGIC call zzfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, -+CSGIC x dummy,1,1,ffttable,dummy,dummy ) -+ -+CCRAY call ccfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, -+CCRAY x dummy,1,1,ffttable,dummy,dummy ) -+ -+ endif -+ -+ if(lspme)then -+ -+ if(kmax1.gt.kmaxd.or.kmax2.gt.kmaxe.or.kmax3.gt.kmaxf)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ elseif(lhke)then -+ -+ if(kmax2.gt.kmaxb)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ else -+ -+ if(kmax2.gt.kmaxb.or.kmax3.gt.kmaxc)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ lforc=.true. -+ -+ return -+ end subroutine ewald_selection -+ -+ subroutine print_optim(keytol) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for printing the optimisation option -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer keytol -+ -+ if(keytol.eq.0)then -+ write(nrite, -+ x "(1x,'convergence to minimum force selected')") -+ elseif(keytol.eq.1)then -+ write(nrite, -+ x "(1x,'convergence to minimum energy selected')") -+ else -+ write(nrite, -+ x "(1x,'convergence to minimum position selected')") -+ endif -+ -+ return -+ end subroutine print_optim -+ -+ function energy_unit() -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for assigning energy conversion factors -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idum -+ real(8) energy_unit -+ -+ energy_unit=1.d0 -+ if(findstring('ev',record,idum))then -+ energy_unit=9648.530821d0 -+ elseif(findstring('kev',record,idum))then -+ energy_unit=9648530.821d0 -+ elseif(findstring('kcal',record,idum))then -+ energy_unit=418.4d0 -+ elseif(findstring('kj',record,idum))then -+ energy_unit=1.d2 -+ elseif(findstring('k',record,idum))then -+ energy_unit=boltz -+ endif -+ -+ return -+ end function energy_unit -+ -+ subroutine solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for solvation option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,endsol,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ endsol=.false. -+ -+ nsolva=intstr(directive,lenrec,idum) -+ isolva=intstr(directive,lenrec,idum) -+ -+ if(nsolva.eq.0.and.isolva.eq.0)then -+ -+ do while(.not.endsol) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endsol',directive,idum))then -+ endsol=.true. -+ elseif(findstring('enddec',directive,idum))then -+ endsol=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=max(intstr(directive,lenrec,idum),1) -+ endif -+ -+ enddo -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'solvation calculation selected', -+ x /,1x,'start of solvation calculation ',i10, -+ x /,1x,'solvation calculation interval ',i10)") -+ x nsolva,isolva -+ -+ endif -+ -+ return -+ end subroutine solvation_option -+ -+ subroutine free_energy_option(directive,lfree,lfrmas,idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for free energy option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lfree,lfrmas,endfre,safe -+ integer idnode,idum -+ -+ mfree=1 -+ kfree=1 -+ lfree=.true. -+ lfrmas=.false. -+ endfre=.false. -+ -+ do while(.not.endfre) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endfre',directive,idum))then -+ endfre=.true. -+ elseif(findstring('start',directive,idum))then -+ nfrn=intstr(directive,lenrec,idum) -+ elseif(findstring('interval',directive,idum))then -+ ifrn=intstr(directive,lenrec,idum) -+ elseif(findstring('lambda',directive,idum))then -+ pfree=dblstr(directive,lenrec,idum) -+ elseif(findstring('mix',directive,idum))then -+ mfree=intstr(directive,lenrec,idum) -+ elseif(findstring('expo',directive,idum))then -+ kfree=intstr(directive,lenrec,idum) -+ elseif(findstring('reset_mass',directive,idum))then -+ lfrmas=.true. -+ if(findstring('false',directive,idum))lfrmas=.false. -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(mfree.eq.1)kfree=1 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'free energy option selected', -+ x /,1x,'start of free energy calculation ',i10, -+ x /,1x,'sampling interval ',i10, -+ x /,1x,'free energy parameter (lambda) ',f10.3, -+ x /,1x,'mixing rule selected ',i10, -+ x /,1x,'mixing rule exponent ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10, -+ x /,1x,'mass scaling option ',l10)") -+ x nfrn,ifrn,pfree,mfree,kfree,ind_fre,lfrmas -+ -+ endif -+ -+c define free energy scaling parameters -+ -+ call freegen() -+ -+ return -+ end subroutine free_energy_option -+ -+ subroutine excitation_option -+ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for excitation option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,lexcite,lghost,endexc,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ lghost=.true. -+ lexcite=.true. -+ endexc=.false. -+ -+ do while(.not.endexc) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endexc',directive,idum))then -+ endexc=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=intstr(directive,lenrec,idum) -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'excitation option selected', -+ x /,1x,'energy decomposition start ',i10, -+ x /,1x,'energy decomposition interval ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10)") -+ x nsolva,isolva,ind_fre -+ -+ endif -+ -+ return -+ end subroutine excitation_option -+ -+ subroutine switching_option -+ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for switching option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,lswitch,lghost,endswi,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ lghost=.true. -+ lswitch=.true. -+ endswi=.false. -+ niswitch=0 -+ -+ do while(.not.endswi) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endswi',directive,idum))then -+ endswi=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=intstr(directive,lenrec,idum) -+ elseif(findstring('period',directive,idum))then -+ niswitch=max(intstr(directive,lenrec,idum),2) -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(niswitch.eq.0)niswitch=nsolva -+ nswitch=nsolva -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'switching option selected', -+ x /,1x,'energy decomposition start ',i10, -+ x /,1x,'energy decomposition interval ',i10, -+ x /,1x,'switching period ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10)") -+ x nsolva,isolva,niswitch,ind_fre -+ -+ endif -+ -+ return -+ end subroutine switching_option -+ -+ end module define_system_module -+ -diff -urN dl_class_1.9.orig/srcmod/define_system_module.f.preplumed dl_class_1.9/srcmod/define_system_module.f.preplumed ---- dl_class_1.9.orig/srcmod/define_system_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/define_system_module.f.preplumed 2011-10-17 17:32:15.000000000 +0200 -@@ -0,0 +1,5994 @@ -+ module define_system_module -+ -+c*********************************************************************** -+c -+c dl_poly module for utility subroutines and functions -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - p.-a. cazade oct 2007, solvation, free energy -+c and excitation -+c adapted - d. quigley nov 2010, metadynamics -+c -+c*********************************************************************** -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use dihedral_module -+ use ensemble_tools_module -+ use error_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use inversion_module -+ use metafreeze_module -+ use metal_module -+ use parse_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use vdw_module -+ -+ contains -+ -+ subroutine simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading in the simulation control -+c parameters -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992. -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c modified -+c author - t.forester may 1993 -+c amended - t.forester sept 1994 - dl_poly_1.1 -+c amended - t.forester nov 1994 - macro version -+c amended - w.smith dec 1994 - t3d adaptation -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit,seek -+ character*1 hms -+ character*1 directive(lenrec) -+ logical lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,lpsoc -+ logical ltscal,lzeql,loptim,ltraj,lfcap,lgofr,lpgr,lpres,safe -+ logical lstep,ltemp,lcut,ldelr,lprim,lforc,lens,lvdw,lrvdw,kill -+ logical lnsq,lzden,lewald,lspme,lhke,loop,lzero,nolink,newgau -+ logical lminim,lminopt,ltad,lneb,lhit,lbpd,prechk,tadall,nebgo -+ integer idnode,intsta,istraj,keyens,keyfce,keyres,nstbpo,nsbzdn -+ integer keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,khit,nhit -+ integer nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,ntrack -+ integer idum,imcon,keyver,keytol,nblock,blkout,numgau -+ integer minstp,numneb,i,keybpd,mode,nsolva,isolva,nofic -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,rlxtol,opttol -+ real(8) eps,tol,fm,densvar,delrdf,delzdn,zlen,ehit,hyp_units -+ real(8) catchrad,sprneb,deltad,tlow,xhit,yhit,zhit,ebias,vmin -+ real(8) prntim -+ -+CSGIC real(8) dummy -+CCRAY real(8) dummy -+CFFTWc FFTW instruction codes -+CFFTW -+CFFTW integer FFTW_FORWARD,FFTW_BACKWARD -+CFFTW parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) -+CFFTW -+CFFTW integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL -+CFFTW parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) -+CFFTW -+CFFTW integer FFTW_ESTIMATE,FFTW_MEASURE -+CFFTW parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) -+CFFTW -+CFFTW integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM -+CFFTW parameter (FFTW_OUT_OF_PLACE=0) -+CFFTW parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) -+CFFTW -+CFFTW integer FFTW_THREADSAFE -+CFFTW parameter (FFTW_THREADSAFE=128) -+CFFTW -+ -+c intitialize system variables: temperature,pressure,ensemble key -+c force key, cutoff, primary cutoff, verlet shell width, relative -+c dielectric constant,timestep,temperature scaling flag, -+c temp scaling interval -+ -+ mode=0 -+ nhko=0 -+ nlatt=0 -+ nsteql=0 -+ nstrun=0 -+ minstp=0 -+ keybpd=0 -+ keyres=0 -+ keyens=0 -+ keyver=0 -+ taut=0.d0 -+ nstbts=0 -+ nstbgr=0 -+ nsbzdn=0 -+ nstbpo=100 -+ nstack=mxstak -+ intsta=0 -+ nstraj=0 -+ istraj=1 -+ keytrj=0 -+ numgau=1 -+ alpha=0.d0 -+ kmax1=0 -+ kmax2=0 -+ kmax3=0 -+ nospl=min(8,mxspl) -+ isolva=1 -+ nsolva=0 -+ niswitch=0 -+ nswitch=0 -+ nofic=1000 -+ -+ fmax=1000.d0 -+ keyfce=0 -+ multt=1 -+ keytol=0 -+ tstep=0.d0 -+ temp=0.d0 -+ press=0.d0 -+ rcut=0.d0 -+ rprim=0.d0 -+ rvdw=0.d0 -+ delr=0.d0 -+ epsq=1.d0 -+ rlxtol=1.d0 -+ opttol=1.d0 -+ tolnce=1.d-8 -+ quattol=1.d-8 -+ timjob=0.d0 -+ timcls=0.d0 -+ delrdf=0.d0 -+ delzdn=0.d0 -+ zlen=0.d0 -+ ehit=0.d0 -+ xhit=0.d0 -+ yhit=0.d0 -+ zhit=0.d0 -+ vmin=0.d0 -+ ebias=0.d0 -+ catchrad=0.d0 -+ pfree=0.d0 -+ -+ lhit=.false. -+ lbpd=.false. -+ ltad=.false. -+ lneb=.false. -+ loop=.true. -+ lnfic=.false. -+ lpsoc=.false. -+ lzero=.false. -+ ltscal=.false. -+ lewald=.false. -+ lspme=.false. -+ lhke=.false. -+ lgofr=.false. -+ lpgr=.false. -+ lzeql=.true. -+ loptim=.false. -+ lminim=.false. -+ lminopt=.false. -+ ltraj=.false. -+ lfcap=.false. -+ ltemp=.false. -+ lstep=.false. -+ lcut=.false. -+ ldelr=.false. -+ lprim=.false. -+ lforc=.false. -+ lens=.false. -+ lvdw=.false. -+ lrvdw=.false. -+ lpres=.false. -+ kill=.false. -+ lnsq=.false. -+ lzden=.false. -+ nolink=.false. -+ newgau=.false. -+ prechk=.false. -+ tadall=.false. -+ lsolva=.false. -+ lfree=.false. -+ lfrmas=.false. -+ lexcite=.false. -+ lswitch=.false. -+ lghost=.false. -+ nebgo=.true. -+ seek='all ' -+ -+c open the simulation input file -+ -+ if(idnode.eq.0)open(nread,file='CONTROL',status='old') -+ -+c read job title -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ -+ call copystring(record,sysname,80) -+ if(idnode.eq.0)then -+ -+ write(nrite,"(3(1x,120('*'),/),1x,15('*'),5x,80a1,5x,15('*'),/, -+ x 3(1x,120('*'),/),/,/,1x,'SIMULATION CONTROL PARAMETERS',/)") -+ x sysname -+ -+ endif -+ -+c read and process directives from CONTROL file -+ -+ do while(loop) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ -+c convert to lowercase and strip out leading blanks -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.' ')then -+ -+c record is commented out -+ cycle -+ -+ elseif(findstring('redirect',directive,idum))then -+ -+c ignore this option in this context -+ cycle -+ -+ elseif(findstring('steps',directive,idum))then -+ -+c number of timesteps -+ -+ nstrun=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'selected number of timesteps',3x,i10)")nstrun -+ -+ elseif(findstring('integ',directive,idum))then -+ -+c choice of integration algorithm -+ -+ if(findstring('leapfrog',directive,idum))then -+ -+ keyver=0 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'leapfrog verlet integration selected')") -+ -+ elseif(findstring('velocity',directive,idum))then -+ -+ keyver=1 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'velocity verlet integration selected')") -+ -+ endif -+ -+ elseif(findstring('no fic',directive,idum))then -+ -+c cancel possible "flying ice cube" in Berendsen thermostats -+ -+ lnfic=.true. -+ nofic=intstr(directive,lenrec,idum) -+ -+ elseif(findstring('shells',directive,idum).and. -+ x findstring('on',directive,idum).and. -+ x findstring('cores',directive,idum))then -+ -+c put shells on cores at start - shell model only (else null) -+ -+ lpsoc=.true. -+ -+ elseif(findstring('densvar',directive,idum))then -+ -+c specify allowed density variation -+ -+ densvar=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'allowed density variation ',3x,1p,e12.4)") -+ x densvar -+ -+ elseif(findstring('no link',directive,idum))then -+ -+c switch off link cell option -+ -+ nolink=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'link cells option deactivated')") -+ -+ elseif(findstring('equil',directive,idum))then -+ -+c number of equilibration timesteps -+ -+ nsteql=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'equilibration period ',3x,i10)")nsteql -+ -+ elseif(findstring('restart',directive,idum))then -+ -+c restart control -+ -+ if(findstring('noscale',directive,idum))then -+ -+ keyres=3 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'noscale restart requested')") -+ -+ elseif(findstring('scale',directive,idum))then -+ -+ keyres=2 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'scaled restart requested')") -+ -+ else -+ -+ keyres=1 -+ if(idnode.eq.0)write(nrite,"(/,1x,'restart requested')") -+ -+ endif -+ -+ elseif(findstring('ensemble',directive,idum))then -+ -+c ensemble selection -+ -+ call ensemble_selection(directive,lens,kill,idnode,keyens, -+ x mode,taut,taup) -+ -+ elseif(findstring('regauss',directive,idum))then -+ -+c re-initialise velocities option (regaussing) -+ -+ newgau=.true. -+ numgau=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'regaussing option activated', -+ x /,1x,'regaussing interval set to ',3x,i10)") -+ x numgau -+ -+ elseif(findstring('scale',directive,idum))then -+ -+ nstbts=intstr(directive,lenrec,idum) -+ if(nstbts.gt.0)then -+ ltscal=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'temperature scaling on' -+ x /,1x,'temperature scaling interval',3x,i10)") -+ x nstbts -+ -+ endif -+ -+ elseif(findstring('rdf',directive,idum))then -+ -+ if(findstring('print',directive,idum))then -+ -+ lpgr=.true. -+ lpgr=(lgofr.and.lpgr) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'g(r) printing option on ')") -+ -+ else -+ -+ lgofr=.true. -+ nstbgr=intstr(directive,lenrec,idum) -+ delrdf=dblstr(directive,lenrec,idum) -+ if(nstbgr.eq.0)nstbgr=10 -+ if(delrdf.lt.1.d-8)delrdf=0.05d0 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'radial distribution functions on ', -+ x /,1x,'g(r) collection interval ',3x,i10)")nstbgr -+ write(nrite, -+ x "(1x,'g(r) bin width ',3x,1p,e12.4)") -+ x delrdf -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('zden',directive,idum))then -+ -+ lzden=.true. -+ nsbzdn=intstr(directive,lenrec,idum) -+ delzdn=dblstr(directive,lenrec,idum) -+ zlen=dblstr(directive,lenrec,idum) -+ if(nsbzdn.eq.0)nsbzdn=10 -+ if(delzdn.lt.1.d-8)then -+ zlen=0.1d0*dble(mxzdn) -+ delzdn=0.1d0 -+ elseif(zlen.lt.1.d-8)then -+ zlen=delzdn*dble(mxzdn) -+ endif -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'Z density profile requested', -+ x /,1x,'zdensity collection interval',3x,i10)")nsbzdn -+ write(nrite, -+ x "(1x,'zdensity bin width ',3x,1p,e12.4)") -+ x delzdn -+ write(nrite, -+ x "(1x,'zdensity range ',3x,1p,e12.4)") -+ x zlen -+ -+ endif -+ -+ elseif(findstring('collect',directive,idum))then -+ -+ lzeql=.false. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'equilibration included in overall averages')") -+ -+ elseif(findstring('neb',directive,idum))then -+ -+c activate nudged elastic band option -+ -+ call neb_option(directive,lneb,lminopt,idnode, -+ x numneb,keytol,sprneb,opttol,hyp_units) -+ -+ elseif(findstring('impact',directive,idum))then -+ -+c activate the impact option -+ -+ if(lhit)call error(idnode,516) -+ lhit=.true. -+ khit=intstr(directive,lenrec,idum) -+ nhit=intstr(directive,lenrec,idum) -+ ehit=dblstr(directive,lenrec,idum) -+ xhit=dblstr(directive,lenrec,idum) -+ yhit=dblstr(directive,lenrec,idum) -+ zhit=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,1x,'impact option selected')") -+ write(nrite,"( -+ x /,1x,'identity of impact atom ',i10, -+ x /,1x,'time step of impact ',i10, -+ x /,1x,'impact recoil energy (keV) ',1p,e12.4, -+ x /,1x,'impact direction (x component) ',1p,e12.4, -+ x /,1x,'impact direction (y component) ',1p,e12.4, -+ x /,1x,'impact direction (z component) ',1p,e12.4)") -+ x khit,nhit,ehit,xhit,yhit,zhit -+ -+ endif -+ -+c convert impact energy from keV to internal units -+ -+ ehit=ehit*9648530.821d0 -+ -+ elseif(findstring('bpd',directive,idum))then -+ -+c activate the BPD option -+ -+ call bpd_option(directive,seek,lbpd,ltad,lminopt,prechk, -+ x nebgo,keybpd,idnode,nblock,ntrack,keytol,ebias,vmin, -+ x catchrad,sprneb,opttol,hyp_units) -+ -+ elseif(findstring('tad',directive,idum))then -+ -+c activate temperature accelerated dynamics option -+ -+ call tad_option(directive,ltad,lbpd,lminopt,prechk,tadall, -+ x idnode,nblock,ntrack,blkout,keytol,catchrad,sprneb,tlow, -+ x deltad,opttol,hyp_units) -+ -+ elseif(findstring('minim',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ if(findstring('forc',directive,idum))keytol=0 -+ if(findstring('ener',directive,idum))keytol=1 -+ if(findstring('posi',directive,idum))keytol=2 -+ hyp_units=energy_unit() -+ minstp=intstr(directive,lenrec,idum) -+ opttol=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ lminim=.true. -+ loptim=.false. -+ lzero=.false. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'minimisation programme requested')") -+ write(nrite, -+ x "(1x,'structure minimisation interval ', -+ x 3x,i10)")minstp -+ call print_optim(keytol) -+ write(nrite, -+ x "(1x,'structure minimisation tolerance', -+ x 3x,1p,e12.4,1x,a8)")opttol,cunit -+ -+ endif -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ elseif(findstring('optim',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ if(findstring('forc',directive,idum))keytol=0 -+ if(findstring('ener',directive,idum))keytol=1 -+ if(findstring('posi',directive,idum))keytol=2 -+ hyp_units=energy_unit() -+ opttol=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ loptim=.true. -+ lminim=.false. -+ lzero=.false. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'structure optimisation requested')") -+ call print_optim(keytol) -+ write(nrite, -+ x "(1x,'tolerance for structure optimisation ', -+ x 3x,1p,e12.4,1x,a8)")opttol,cunit -+ -+ endif -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ elseif(findstring('zero',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ temp=1.d0 -+ lzero=.true. -+ loptim=.false. -+ lminim=.false. -+ ltemp=.true. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'zero K optimisation requested')") -+ write(nrite, -+ x "(' temperature reset to',1p,e12.4)")1.d0 -+ -+ endif -+ -+ else if(findstring('solva',directive,idum))then -+ -+ call solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+ else if(findstring('decomp',directive,idum))then -+ -+ call solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+ elseif(findstring('metafreeze',directive,idum).or. -+ x findstring('metadyn',directive,idum))then -+ -+c activate metadynamics option - d. quigley -+ -+ call metadyn_option -+ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, -+ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, -+ x locpe_scale,ref_W_aug,h_aug,wt_Dt) -+ -+ else if(findstring('free',directive,idum))then -+ -+ call free_energy_option(directive,lfree,lfrmas,idnode) -+ -+ else if(findstring('excite',directive,idum))then -+ -+ call excitation_option -+ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) -+ -+ else if(findstring('switch',directive,idum))then -+ -+ call switching_option -+ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) -+ -+ elseif(findstring('print',directive,idum))then -+ -+ nstbpo=intstr(directive,lenrec,idum) -+ nstbpo=max(nstbpo,1) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'data printing interval ',3x,i10)")nstbpo -+ -+ elseif(findstring('stack',directive,idum))then -+ -+ nstack=intstr(directive,lenrec,idum) -+ -+c reset stack limit if too large -+ -+ nstack=min(nstack,mxstak) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'data stacking interval ',3x,i10)")nstack -+ -+ elseif(findstring('stats',directive,idum))then -+ -+ intsta=intstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'statistics file interval ',3x,i10)")intsta -+ -+ elseif(findstring('traj',directive,idum))then -+ -+ ltraj=.true. -+ nstraj=intstr(directive,lenrec,idum) -+ istraj=max(intstr(directive,lenrec,idum),1) -+ keytrj=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'trajectory file option on ', -+ x /,1x,'trajectory file start ',3x,i10, -+ x /,1x,'trajectory file interval ',3x,i10 -+ x /,1x,'trajectory file info key ',3x,i10)") -+ x nstraj,istraj,keytrj -+ -+ elseif(findstring('ewald',directive,idum).or. -+ x findstring('spme',directive,idum).or. -+ x findstring('hke',directive,idum))then -+ -+c read Ewald or HK-Ewald or SPM-Ewald sum parameters -+ -+ call ewald_selection(directive,lhke,lspme,lewald,lcut, -+ x lforc,kill,idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2, -+ x kmax3,alpha,rcut) -+ -+ elseif(findstring('distan',directive,idum))then -+ -+ keyfce=4 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Distance dependent dielectric')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('coul',directive,idum))then -+ -+ keyfce=6 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Coulombic potential')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('shift',directive,idum))then -+ -+ keyfce=8 -+ alpha=0.d0 -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Shifted Coulombic potential')") -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(.not.lcut)then -+ call error(idnode,-435) -+ kill=.true. -+ else -+ -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(1x,'Specified precision parameter : ',1p, -+ x e12.4)")eps -+ write(nrite, -+ x "(1x,'Calculated damping parameter: ',1p, -+ x e12.4)")alpha -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('damp',directive,idum))then -+ -+ alpha=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(1x,'Specified damping parameter : ',1p,e12.4)") -+ x alpha -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('reaction',directive,idum))then -+ -+ keyfce=10 -+ alpha=0.d0 -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : reaction field')") -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(.not.lcut)then -+ call error(idnode,-435) -+ kill=.true. -+ else -+ -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(1x,'Specified precision parameter : ',1p, -+ x e12.4)")eps -+ write(nrite, -+ x "(1x,'Calculated damping parameter: ',1p, -+ x e12.4)")alpha -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('damp',directive,idum))then -+ -+ alpha=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(1x,'Specified damping parameter : ',1p,e12.4)") -+ x alpha -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('cap',directive,idum))then -+ -+ lfcap=.true. -+ fm=dblstr(directive,lenrec,idum) -+ if(fm.gt.0.d0)fmax=fm -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'force capping :',16x,1p,e12.4,' kT/A')")fmax -+ -+ elseif(findstring('no vdw',directive,idum))then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'short-range potential terms off')") -+ lvdw=.true. -+ -+ elseif(findstring('no elec',directive,idum))then -+ -+ keyfce=0 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'electrostatic potential terms off')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('mult',directive,idum))then -+ -+ multt=max(intstr(directive,lenrec,idum),1) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'multiple timestep interval ',3x,i10)")multt -+ -+ elseif(findstring('timestep',directive,idum))then -+ -+ lstep=.true. -+ tstep=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation timestep ',3x,1p,e12.4)")tstep -+ -+ elseif(findstring('temp',directive,idum))then -+ -+ ltemp=.true. -+ temp=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation temperature ',3x,1p,e12.4)")temp -+ -+ elseif(findstring('pres',directive,idum))then -+ -+ press=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation pressure (katm) ',3x,1p,e12.4)")press -+ -+c convert from katm to internal units of pressure -+ -+ press=press/prsunt -+ lpres=.true. -+ -+ elseif(findstring('prim',directive,idum))then -+ -+c primary cutoff -+ -+ lprim=.true. -+ rprim=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'primary neighbour cut off ',3x,1p,e12.4)")rprim -+ -+ elseif(findstring('rvdw',directive,idum))then -+ -+c cutoff for short range potentials -+ -+ rvdw=dblstr(directive,lenrec,idum) -+ lrvdw=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'real space cut off (vdw) ',3x,1p,e12.4)")rvdw -+ -+ elseif(findstring('delr',directive,idum))then -+ -+c Verlet shell width -+ -+ ldelr=.true. -+ delr=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'border width of Verlet shell',3x,1p,e12.4)")delr -+ -+ elseif(findstring('cut',directive,idum))then -+ -+c cutoff -+ -+ lcut=.true. -+ rcut=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'real space cut off ',3x,1p,e12.4)")rcut -+ -+ elseif(findstring('eps',directive,idum))then -+ -+c relative dielectric constant -+ -+ epsq=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'relative dielectric constant',3x,1p,e12.4)")epsq -+ -+ elseif(findstring('rlxtol',directive,idum))then -+ -+c force tolerance for shell relaxation -+ -+ rlxtol=max(rlxtol,dblstr(directive,lenrec,idum)) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for shell relaxn. ',3x,1p,e12.4)")rlxtol -+ -+ elseif(findstring('shake',directive,idum))then -+ -+c tolerance for shake -+ -+ tolnce=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for SHAKE ',3x,1p,e12.4)")tolnce -+ -+ elseif(findstring('quaternion',directive,idum))then -+ -+c tolerance for quaternion integration -+ -+ quattol=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for Quaternions ',3x,1p,e12.4)")quattol -+ -+ elseif(findstring('job time',directive,idum))then -+ -+c time for simulation (in seconds/minutes/hours/days or indefinite) -+ -+ if(findstring('indef',directive,idum))then -+ timjob=1.0d6*365.25d0*24.d0*60.d0*60.d0 -+ else -+ timjob=dblstr(directive,lenrec,idum) -+ if(findstring('m',directive,idum))then -+ timjob=6.0d1*timjob -+ elseif(findstring('h',directive,idum))then -+ timjob=3.6d3*timjob -+ elseif(findstring('d',directive,idum))then -+ timjob=8.64d4*timjob -+ endif -+ endif -+ -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'user allocated job time (',a1,') ',3x,f8.4)") -+ x hms,prntim -+ -+ elseif(findstring('close time',directive,idum))then -+ -+c time for winding up a job (in seconds) -+ -+ timcls=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'job closure time (s) ',3x,f8.3)")timcls -+ -+ elseif(findstring('all pairs',directive,idum))then -+ -+c full minimum image - N^2 interactions each timestep -+ -+ lnsq=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'All-pairs requested for electrostatics')") -+ -+ elseif(findstring('nospl',directive,idum))then -+ -+c set ewald_spme interpolation order -+ -+ nospl=intstr(directive,lenrec,idum) -+ -+ elseif(findstring('finish',directive,idum))then -+ -+c safe termination of reading CONTROL file -+ -+ loop=.false. -+ -+ else -+ -+c unrecognised directive in control file -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ enddo -+ -+c check on steps before temperature scaling -+ -+ if(nstbts.eq.0)nstbts=nstrun+1 -+ -+c conduct consistency checks on directives -+ -+ if(lminim)then -+ -+c ensure final configuration follows minimisation -+ -+ if(minstp.eq.0)minstp=nstrun -+ nstrun=minstp*(nstrun/minstp) -+ -+ endif -+ -+c check force activation options -+ -+ if(.not.lforc)then -+ -+c check if any forces are in operation -+ -+ if(.not.lvdw)then -+ -+ kill=.true. -+ call error(idnode,-383) -+ -+ endif -+ -+ else -+ -+c turn on short range forces -+ -+ if(lvdw)then -+ -+ if(keyfce.eq.0)then -+ -+ lcut=.true. -+ ldelr=.true. -+ -+ endif -+ -+ else -+ -+ keyfce=keyfce+1 -+ -+ endif -+ -+ endif -+ -+c if tad selected use only leap frog -+ -+ if(ltad.and.keyver.eq.1)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'switching to leapfrog for TAD dynamics')") -+ keyver=0 -+ -+ endif -+ -+c error checking -+ -+ if(lmetadyn.and.keyens.ne.3.and.keyens.ne.5.and.keyens.ne.7)then -+ -+ kill=.true. -+ call error(idnode,-2360) -+ -+ endif -+ -+ if(lsolva.or.lfree.or.lexcite.or.lswitch)then -+ -+ if(lspme)then -+ -+ kill=.true. -+ call error(idnode,-601) -+ -+ endif -+ -+ if(lhke)then -+ -+ kill=.true. -+ call error(idnode,-602) -+ -+ endif -+ -+ endif -+ -+ if(lghost.and.nstbgr.ne.isolva)then -+ -+ call warning(idnode,130,dble(isolva),0.d0,0.d0) -+ nstbgr=isolva -+ -+ endif -+ if(lfree.and.lgofr)then -+ -+ call warning(idnode,140,0.d0,0.d0,0.d0) -+ lgofr=.false. -+ lpgr=.false. -+ -+ endif -+ if(loptim)then -+ -+ temp=0.d0 -+ -+ elseif(.not.ltemp)then -+ -+ kill=.true. -+ call error(idnode,-380) -+ -+ endif -+ -+ if(.not.lstep)then -+ -+ kill=.true. -+ call error(idnode,-381) -+ -+ endif -+ -+ if(.not.lcut)then -+ -+ kill=.true. -+ call error(idnode,-382) -+ -+ endif -+ -+c check if van der Waals cutoff set -+ -+ if(.not.lrvdw.and.mod(keyfce,2).eq.1)then -+ -+ if(rcut.gt.0.d0)then -+ -+ rvdw=rcut -+ -+ else -+ -+ kill=.true. -+ call error(idnode,-402) -+ -+ endif -+ -+ endif -+ -+ if(.not.ldelr)then -+ -+ kill=.true. -+ call error(idnode,-384) -+ -+ endif -+ -+ if(multt.gt.1)then -+ -+ if(.not.lprim)then -+ -+ kill=.true. -+ call error(idnode,-385) -+ -+ elseif(rprim.gt.rcut)then -+ -+ kill=.true. -+ call error(idnode,-386) -+ -+ endif -+ -+ endif -+ -+c check settings in nvt ensemble -+ -+ if(keyens.ge.2.and.keyens.le.3)then -+ -+ if(taut.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-464) -+ -+ endif -+ -+ endif -+ -+c check settings in npt ensemble -+ -+ if(keyens.ge.4.and.keyens.le.7)then -+ -+ if(.not.lpres)then -+ -+ kill=.true. -+ call error(idnode,-387) -+ -+ endif -+ -+c check barostat and thermostat rates non zero -+ -+ if(taut.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-464) -+ -+ endif -+ if(taup.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-466) -+ -+ endif -+ -+ endif -+ -+c check multiple timestep cutoffs are sensible -+ -+ if(multt.gt.1)then -+ if(rcut-rprim.lt.delr)then -+ -+ kill=.true. -+ call error(idnode,-398) -+ -+ endif -+ endif -+ -+c check rcut > rvdw (for verlet list constructor) -+ -+ if(rcut.lt.rvdw)then -+ -+ kill=.true. -+ call error(idnode,-400) -+ -+ endif -+ -+c check spme is not being used with incorrect pbc -+ -+ if(lspme)then -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+ kill=.true. -+ call error(idnode,-513) -+ -+ endif -+ -+ endif -+ -+c check on all-pairs calculation request -+ -+ if(lnsq)then -+ -+ if(multt.eq.1)then -+ -+ kill=.true. -+ call error(idnode,-422) -+ -+ endif -+ -+ if(keyfce/2.lt.2.or.keyfce/2.gt.3)then -+ -+ kill=.true. -+ call error(idnode,-424) -+ -+ endif -+ -+ endif -+ -+c cancel rdf option if no vdw or coulombic forces -+ -+ if(lgofr.and.keyfce.eq.0)then -+ -+ lgofr=.false. -+ call warning(idnode,120,0.d0,0.d0,0.d0) -+ -+ endif -+ -+ if(kill)call abort_control_read(2,idnode,nread) -+ -+c close CONTROL file -+ -+ if(idnode.eq.0)close(nread) -+ -+ return -+ end subroutine simdef -+ -+ subroutine sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading in the molecular specifications -+c of the system to be simulated -+c version for rigid unit data and neutral groups -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith may 1992. -+c amended - w.smith march 1994 -+c amended - t.forester april 1994 -+c amended - w.smith dec 1994 - getrec etc -+c amended - a.smondyrev may 2000 - keydih=5 for -+c ryckaert-bellemans potential in dihedrals -+c amended - a.smondyrev may 2000 - keydih=6 for -+c fluorinated ryckaert-bellemans potential in dihedrals -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lunits,lmols,lneut,ltable,lnsq,lshl,safe,lpmf -+ logical loop1,loop2,lsolva,lfree,lexcite,lswitch,lghost -+ -+ integer idnode,keyfce,keyfld,natms,ngrp,ntpatm,ntpmls -+ integer ntpvdw,ntptbp,ntpmet,ntpfbp,nshels,ksite -+ integer nsite,nconst,nangle,ndihed,ninver,nbonds -+ integer nteth,nspmf,itmols,i,idum,keyver -+ integer ntpter,keyshl,iatm,natmsr,ntghost -+ -+ real(8) dlrpot,engunit,rvdw,rcuttb,rctter,rcutfb -+ real(8) sumchg -+ -+ data loop1/.true./,loop2/.true./ -+ -+c initialise system counters: atomic site index, number of -+c constraints, bond angles, dihedrals, inversions, chemical bonds, -+c unique atom types, total number of atoms, -+c total number of rigid groups, number of tethered atoms, -+c number of three body potentials -+ -+ nsite=0 -+ nconst=0 -+ nangle=0 -+ ndihed=0 -+ ninver=0 -+ nbonds=0 -+ ntpatm=0 -+ natms=0 -+ ngrp=0 -+ nteth=0 -+ ntptbp=0 -+ ntpter=0 -+ ntpmet=0 -+ ntpvdw=0 -+ ntpfbp=0 -+ nshels=0 -+ nspmf=0 -+ keyfld=0 -+ keyshl=0 -+ ntghost=0 -+ natmsr=0 -+ ntcons_ghost=0 -+ -+ lunits=.false. -+ lmols=.false. -+ lneut=.false. -+ ltable=.false. -+ lmetab=.false. -+ lshl=.false. -+ lpmf=.false. -+ engunit=1.d0 -+ -+ numbonds(:)=0 -+ numpmf(:)=0 -+ numcon(:)=0 -+ numdih(:)=0 -+ numinv(:)=0 -+ numgrp(:)=0 -+ numsit(:)=0 -+ numteth(:)=0 -+ numshl(:)=0 -+ npmf(:)=0 -+ indpmf(:)=0 -+ -+c open force field data file -+ -+ if(idnode.eq.0)open (nfield,file='FIELD',status='old') -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,'SYSTEM SPECIFICATION')") -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read and process directives from field file -+ -+ do while(loop1) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c convert to lowercase and remove leading blanks -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.' ')then -+ -+c record is commented out -+ cycle -+ -+ elseif(findstring('units',record,idum))then -+ -+c identify energy unit for input/output -+ -+ lunits=.true. -+ call define_units(idnode,engunit) -+ -+c neutral group control option -+ -+ elseif(findstring('neut',record,idum))then -+ -+ lneut=.true. -+ if(idnode.eq.0) -+ x write(nrite,"(/,' neutral group implementation in use')") -+ -+c can't have neutral groups with all-pairs -+ -+ if(lnsq)call error(idnode,426) -+ -+c specify molecular species -+ -+ elseif(findstring('molecu',record,idum))then -+ -+c number of molecular types -+ -+ if(lmols)call error(idnode,11) -+ lmols=.true. -+ ntpmls=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,1x,'number of molecular types',6x,i10)") -+ x ntpmls -+ -+ if(ntpmls.gt.mxtmls)call error(idnode,10) -+ -+c initialise total system charge -+ -+ sumchg=0.d0 -+ -+c read in molecular characteristics -+ -+ do itmols=1,ntpmls -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'molecular species type',9x,i10)") -+ x itmols -+ -+c name of molecular species -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+ call copystring(record,molnam(1,itmols),40) -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,1x,'name of species:',13x,40a1)") -+ x (molnam(i,itmols),i=1,40) -+ -+c stop processing if energy unit has not been specified -+ -+ if(.not.lunits)call error(idnode,6) -+ -+c read molecular data -+ -+ loop2=.true. -+ -+ do while(loop2) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ -+ ksite=0 -+ -+ if(findstring('nummol',record,idum))then -+ -+ nummols(itmols)=intstr(record,lenrec,idum) -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'number of molecules ', -+ x 10x,i10)")nummols(itmols) -+ -+ elseif(findstring('atoms',record,idum))then -+ -+c read in atomic details -+ -+ call define_atoms -+ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read core - shell spring parameters -+ -+ elseif(findstring('shell',record,idum))then -+ -+ lshl=.true. -+ call define_core_shell -+ x (safe,idnode,itmols,nshels,nsite,keyshl, -+ x engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read chemical bond force constant and bondlength -+ -+ elseif(findstring('bonds',record,idum))then -+ -+ call define_bonds -+ x (safe,idnode,itmols,nbonds,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read bond atom indices and constraint bondlength -+ -+ elseif(findstring('constr',record,idum))then -+ -+ call define_constraints -+ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read pmf bond atom indices, weights and constraint bondlength -+ -+ elseif(findstring('pmf',record,idum))then -+ -+ if(lpmf)call error(idnode,484) -+ lpmf=.true. -+ call define_pmf(safe,idnode,itmols,nspmf) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular angular potential parameters -+ -+ elseif(findstring('angles',record,idum))then -+ -+ call define_angles -+ x (safe,idnode,itmols,nangle,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular dihedral potential parameters -+ -+ elseif(findstring('dihedr',record,idum))then -+ -+ call define_dihedrals -+ x (safe,idnode,itmols,ndihed,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular inversion potential parameters -+ -+ elseif(findstring('invers',record,idum))then -+ -+ call define_inversions -+ x (safe,idnode,itmols,ninver,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read rigid body data -+ -+ elseif(findstring('rigid',record,idum))then -+ -+ call define_rigid_body -+ x (safe,lghost,idnode,itmols,ngrp,natmsr) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read tethered atom indices and tethering parameters -+ -+ elseif(findstring('teth',record,idum))then -+ -+ call define_tethers -+ x (safe,idnode,itmols,nteth,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c finish of data for one molecular type -+ -+ elseif(findstring('finish',record,idum))then -+ -+c running total of number of atoms in system -+ -+ natms=natms+nummols(itmols)*numsit(itmols) -+ if(natms.gt.mxatms)call error(idnode,75) -+ -+c check core-shell units are not both in same rigid body unit -+ -+ call check_shells(idnode,itmols,nshels,ngrp) -+ -+ loop2=.false. -+ -+ else -+ -+c error exit for unidentified directive in molecular data -+ -+ if(idnode.eq.0)write(nrite,'(12x,a)')record -+ call error(idnode,12) -+ -+ endif -+ -+ enddo -+ -+c construction of atmolt table for solvation calculation -+ -+ if(lsolva)then -+ -+ do iatm=natmsr+1,natms -+ atmolt(iatm)=itmols -+ enddo -+ natmsr=natms -+ -+ endif -+ -+ enddo -+ -+c construction of atm_fre table for free energy or excitation -+ -+ if(lfree.or.lexcite.or.lswitch)then -+ -+ atm_fre(:)=0 -+ if((ind_fre(1).ne.0).and.(ind_fre(2).ne.0))then -+ -+ do iatm=ind_fre(1),ind_fre(2) -+ atm_fre(iatm)=1 -+ enddo -+ -+ endif -+ -+ if((ind_fre(3).ne.0).and.(ind_fre(4).ne.0))then -+ -+ do iatm=ind_fre(3),ind_fre(4) -+ -+ atm_fre(iatm)=2 -+ if(lghost)ntghost=ntghost+1 -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c calculate system charge -+ -+ call check_syschg(idnode,ntpmls,sumchg) -+ -+c read in the nonbonded potential energy parameters -+ -+ elseif(findstring('vdw',record,idum))then -+ -+ call define_van_der_waals -+ x (safe,ltable,lunits,lmols,idnode,ntpvdw, -+ x ntpatm,keyfce,dlrpot,rvdw,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read in the metal potential energy parameters -+ -+ elseif(findstring('met',record,idum))then -+ -+ call define_metals -+ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rvdw,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read the three body potential energy parameters -+ -+ elseif(findstring('tbp',record,idum))then -+ -+ call define_three_body -+ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read the tersoff potential energy parameters -+ -+ elseif(findstring('tersoff',record,idum))then -+ -+ call define_tersoff -+ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read in the four body potential energy parameters -+ -+ elseif(findstring('fbp',record,idum))then -+ -+ call define_four_body -+ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, -+ x rcutfb,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read external field data -+ -+ elseif(findstring('extern',record,idum))then -+ -+ call define_external_field -+ x (safe,lunits,idnode,keyfld,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c normal end of FIELD file -+ -+ elseif(findstring('close',record,idum))then -+ -+ loop1=.false. -+ if(ntpvdw.eq.0.and.ntpmet.eq.0.and. -+ x mod(keyfce,2).eq.1)call error(idnode,145) -+ -+c error exit for unidentified directive -+ -+ else -+ -+ if(idnode.eq.0)write(nrite,'(100a)')record -+ call abort_field_read(2,idnode,nfield) -+ -+ endif -+ -+ enddo -+ -+c close force field file -+ -+ if(idnode.eq.0)close (nfield) -+ -+ -+ if(lshl.and.idnode.eq.0)then -+ -+ if(keyshl.eq.1)write(nrite, -+ x "(/,/,'adiabatic shell model in operation')") -+ -+ if(keyshl.eq.2)write(nrite, -+ x "(/,/,'relaxed shell model in operation')") -+ -+ endif -+ -+ if(lshl.and.keyshl.eq.0)call error(idnode,1951) -+ -+c if metadynamics and shell selected use only velocity verlet -+ -+ if(lshl.and.lmetadyn.and.keyver.eq.0)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'switching to velocity verlet for metadynamics')") -+ keyver=1 -+ -+ endif -+ -+ return -+ end subroutine sysdef -+ -+ subroutine sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading the configuration data file -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 atname(8) -+ -+ logical loglnk,safe,lneut,nolink,lfree,lfrmas -+ integer idnode,imcon,keyens,keyfce,keyres,levcfg,multt -+ integer ntpmls,i,indatm,indnam,indneu,k,ilx,ily,ilz -+ integer m,l,ncells,idum,mxnode -+ real(8) delr,rcut,volm,xcoord,ycoord,zcoord,totmas,xveloc -+ real(8) yveloc,zveloc,xforce,yforce,zforce,axx,rt3,xhi,yhi,zhi -+ real(8) width,dum1,dum2,test,com(3) -+ -+c open the system input file -+ -+ if(idnode.eq.0)open (nconf,file='CONFIG') -+ -+c read the CONFIG file header -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ -+ call copystring(record,cfgname,80) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'configuration file name: ',/,/,10x,80a1)")cfgname -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ -+ levcfg=intstr(record,lenrec,idum) -+ imcon=intstr(record,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'selected image convention',6x,i10)")imcon -+ -+c check config file contents for consistent data -+ -+ if((imcon.eq.0.or.imcon.eq.6).and. -+ x (keyfce/2.eq.1.or.keyfce/2.eq.6)) -+ x call error(idnode,180) -+ -+ if(imcon.eq.0.and.(.not.lneut).and.(keyfce.gt.1) -+ x .and.(multt.eq.1))call warning(idnode,30,0.d0,0.d0,0.d0) -+ -+ if(imcon.eq.0.and.(keyens.ge.4.and.keyens.le.7)) -+ x call error(idnode,390) -+ if(imcon.le.2.and.(keyens.eq.6.or.keyens.eq.7))imcon=3 -+ if(keyres.gt.0.and.levcfg.lt.1)call error(idnode,85) -+ -+c specify molecular dynamics simulation cell -+ -+ if(imcon.eq.0)then -+ -+c if no periodic boundaries - set zero values for cell -+c vectors and cell volume -+ -+ cell(:)=0.d0 -+ volm=0.d0 -+ -+ else -+ -+c read cell vectors -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(1)=dblstr(record,lenrec,idum) -+ cell(2)=dblstr(record,lenrec,idum) -+ cell(3)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(4)=dblstr(record,lenrec,idum) -+ cell(5)=dblstr(record,lenrec,idum) -+ cell(6)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(7)=dblstr(record,lenrec,idum) -+ cell(8)=dblstr(record,lenrec,idum) -+ cell(9)=dblstr(record,lenrec,idum) -+ -+ endif -+ -+c read the atomic coordinates -+ -+ indatm=0 -+ indnam=0 -+ indneu=0 -+ safe=.true. -+ -+ do k=1,ntpmls -+ -+ do l=1,nummols(k) -+ -+ do m=1,numsit(k) -+ -+ indatm=indatm+1 -+ -+ if(indatm.gt.mxatms)call error(idnode,45) -+ -+ xxx(indatm)=0.d0 -+ yyy(indatm)=0.d0 -+ zzz(indatm)=0.d0 -+ vxx(indatm)=0.d0 -+ vyy(indatm)=0.d0 -+ vzz(indatm)=0.d0 -+ fxx(indatm)=0.d0 -+ fyy(indatm)=0.d0 -+ fzz(indatm)=0.d0 -+ -+ if(idnode.eq.0)then -+ -+ if(levcfg.eq.0)then -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ -+ elseif(levcfg.eq.1)then -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc -+ -+ else -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc -+ read(nconf,'(3f20.0)',end=100)xforce,yforce,zforce -+ -+ endif -+ -+c strip blanks off atom name -+ -+ call strip(atname,8) -+ -+ if(sitnam(indnam+m).eq.mkwd8(atname))then -+ -+ xxx(indatm)=xcoord -+ yyy(indatm)=ycoord -+ zzz(indatm)=zcoord -+ -+ if(levcfg.gt.0)then -+ -+ vxx(indatm)=xveloc -+ vyy(indatm)=yveloc -+ vzz(indatm)=zveloc -+ -+ endif -+ -+ if(levcfg.gt.1)then -+ -+ fxx(indatm)=xforce -+ fyy(indatm)=yforce -+ fzz(indatm)=zforce -+ -+ endif -+ -+ else -+ -+ write(nrite,"(/,/,'unidentified atom label :',8a1, -+ x ': atom number ',i5)")atname,indatm -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ call gstate(safe) -+ if(.not.safe)call error(idnode,25) -+ -+ ltype(indatm)=ltpsit(indnam+m) -+ weight(indatm)=wgtsit(indnam+m) -+ chge(indatm)=chgsit(indnam+m) -+ atmnam(indatm)=sitnam(indnam+m) -+ lstfrz(indatm)=lfzsit(indnam+m) -+ if(lneut)lstneu(indatm)=nugrp(indnam+m)+indneu -+ -+c reset atomic masses according to free energy definitions -+ -+ if(lfree)then -+ -+ weight_sav(indatm)=weight(indatm) -+ -+ if(lfrmas)then -+ -+ if(indatm.ge.ind_fre(1).and.indatm.le.ind_fre(2))then -+ weight(indatm)=lambda1*weight(indatm) -+ elseif(indatm.ge.ind_fre(3).and.indatm.le.ind_fre(4)) -+ x then -+ weight(indatm)=lambda2*weight(indatm) -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ indneu=indneu+nugrp(indnam+numsit(k)) -+ -+ enddo -+ -+ indnam=indnam+numsit(k) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ call gdsum(xxx,indatm,buffer) -+ call gdsum(yyy,indatm,buffer) -+ call gdsum(zzz,indatm,buffer) -+ -+ if(levcfg.gt.0)then -+ -+ call gdsum(vxx,indatm,buffer) -+ call gdsum(vyy,indatm,buffer) -+ call gdsum(vzz,indatm,buffer) -+ -+ endif -+ -+ if(levcfg.gt.1)then -+ -+ call gdsum(fxx,indatm,buffer) -+ call gdsum(fyy,indatm,buffer) -+ call gdsum(fzz,indatm,buffer) -+ -+ endif -+ -+ endif -+ -+c check integrity of cell vectors : for cubic, TO and RD cases -+c ie. cell(1)=cell(5)=cell(9) (or cell(9)/sqrt(2) for RD) -+ -+ if((imcon.eq.1).or.(imcon.eq.4).or.(imcon.eq.5))then -+ -+ axx=(abs(cell(1))+abs(cell(5)))/2.d0 -+ test=1.d-8*axx -+ if(abs(cell(1)-axx).gt.test)call error(idnode,410) -+ if(abs(cell(5)-axx).gt.test)call error(idnode,410) -+ if(imcon.eq.5)then -+ if(abs(cell(9)-axx*sqrt(2.d0)).gt.test) -+ x call error(idnode,410) -+ else -+ if(abs(cell(9)-axx).gt.test)call error(idnode,410) -+ endif -+ -+ endif -+ -+c check integrity of hexagonal prism cell vectors -+ -+ if(imcon.eq.7)then -+ -+ rt3=sqrt(3.d0) -+ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) -+ x call error(idnode,410) -+ -+ endif -+ -+c check 2D PBC for imcon=6 -+ -+ if(imcon.eq.6)then -+ -+ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) -+ -+ endif -+ -+c check for diagonal cell matrix if appropriate -+ -+ if((imcon.eq.1).or.(imcon.eq.2).or.(imcon.eq.4).or. -+ x (imcon.eq.5).or.(imcon.eq.7))then -+ -+ if(abs(cell(2)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(4)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) -+ -+ endif -+ -+c put centre of mass at centre of coordinates if imcon=0 -+ -+ if(imcon.eq.0)then -+ -+ totmas=getmass(indatm,idnode,mxnode) -+ call getcom(indatm,idnode,mxnode,totmas,com) -+ -+ do i=1,indatm -+ -+ xxx(i)=xxx(i)-com(1) -+ yyy(i)=yyy(i)-com(2) -+ zzz(i)=zzz(i)-com(3) -+ -+ enddo -+ -+ endif -+ -+c set widths if unset - needed for check on link cells below -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+ xhi=abs(xxx(1)) -+ yhi=abs(yyy(1)) -+ zhi=abs(zzz(1)) -+ do i=2,indatm -+ -+ xhi=max(xhi,abs(xxx(i))) -+ yhi=max(yhi,abs(yyy(i))) -+ zhi=max(zhi,abs(zzz(i))) -+ -+ enddo -+ if(imcon.eq.0)then -+ -+ cell(1)=max(2.d0*xhi+rcut+delr,3.d0*(rcut+delr)) -+ cell(5)=max(2.d0*yhi+rcut+delr,3.d0*(rcut+delr)) -+ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) -+ -+ endif -+ -+ if(imcon.eq.6.and.cell(9).lt.1.d-6)then -+ -+ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) -+ -+ endif -+ -+ endif -+ -+c calculate dimensional properties of simulation cell -+ -+ call dcell(cell,celprp) -+ -+ if(imcon.eq.0)then -+ -+ volm=0.d0 -+ -+ elseif(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ else -+ -+ volm=celprp(10) -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,/,1x,'simulation cell vectors'/,/)") -+ write(nrite,"(21x,3f12.6)")cell -+ -+ write(nrite, -+ x "(/,/,1x,'system volume ',2x,1p,g22.12)")volm -+ -+ endif -+ -+c check value of cutoff and reset if necessary -+ -+ if(imcon.gt.0)then -+ -+ width=min(celprp(7),celprp(8),celprp(9))/2.d0 -+ if(imcon.eq.4)width=sqrt(3.d0)*cell(1)/4.d0 -+ if(imcon.eq.5)width=cell(1)/2.d0 -+ if(imcon.eq.6)width=min(celprp(7),celprp(8))/2.d0 -+ -+c halt program if potential cutoff exceeds cell width -+ -+ if(rcut.gt.width)call error(idnode,95) -+ -+ endif -+ -+c decide on whether to use link cells for verlet list constructor -+ -+ if(nolink)then -+ -+ loglnk=.false. -+ -+ else -+ -+ loglnk=.true. -+ -+ ilx=int(celprp(7)/(rcut+delr)) -+ ily=int(celprp(8)/(rcut+delr)) -+ ilz=int(celprp(9)/(rcut+delr)) -+ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. -+ ncells=ilx*ily*ilz -+ if(lneut.and.ncells.le.36)loglnk=.false. -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. -+ if(loglnk.and.ncells.gt.mxcell)then -+ -+ dum1=dble(ncells) -+ dum2=dble(mxcell) -+ call warning(idnode,90,dum1,dum2,dum2) -+ loglnk=.false. -+ -+ endif -+ -+ endif -+ -+ if(loglnk.and.idnode.eq.0) -+ x write(nrite,"(/,/,' link cell algorithm in use')") -+ -+ if(idnode.eq.0)close (nconf) -+ -+c ensure PBC compliance of starting structure -+ -+ if(keyres.eq.0.and.imcon.gt.0)then -+ -+ call images(imcon,idnode,mxnode,indatm,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,indatm,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ return -+ -+c error exit for config file read -+ -+ 100 call abort_config_read(2,idnode,nconf) -+ -+ end subroutine sysgen -+ -+ subroutine sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading the REVIVE file data and -+c defining the initial thermodynamic and structural accumulators. -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c adapted - d. quigley nov 2010, metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzden,lfree,lsolva,lghost,lpsoc -+ integer idnode,imcon,keyfce,keyres,mxnode,natms,nstep,numacc -+ integer numrdf,ntpatm,nzden,i,j,k,ntpmet,ntshl,ntpvdw -+ real(8) chip,chit,conint,elrc,engunit,virlrc,rvdw,volm -+ real(8) dnumrd,dnstep,dnumac,dnzden,virtot,vircom,tboost -+ real(8) chit_shl -+ -+c read or initialise accumulator arrays -+ -+ if(keyres.eq.1.and.idnode.eq.0)then -+ -+c read accumulator data from dump file -+ -+ open(nrest,file='REVOLD',form='unformatted') -+ -+ read(nrest) dnstep,dnumac,dnumrd,chit,chip,conint,dnzden, -+ x tboost,chit_shl -+ read(nrest) virtot,vircom,eta,strcns,strbod -+ read(nrest) stpval -+ read(nrest) sumval -+ read(nrest) ssqval -+ read(nrest) zumval -+ read(nrest) ravval -+ read(nrest) stkval -+ read(nrest) xx0,yy0,zz0 -+ read(nrest) xxs,yys,zzs -+ -+ if(lgofr) read(nrest)rdf -+ if(lzden) read(nrest)zdens -+ -+ nstep=nint(dnstep) -+ numacc=nint(dnumac) -+ numrdf=nint(dnumrd) -+ nzden=nint(dnzden) -+ close (nrest) -+ -+ else -+ -+c initialise step counters -+ -+ nstep=0 -+ numacc=0 -+ numrdf=0 -+ nzden=0 -+ -+c initialise temperature and pressure coupling parameters -+c and integral for conserved quantity -+ -+ chit=0.d0 -+ chip=0.d0 -+ conint=0.d0 -+ virtot=0.d0 -+ vircom=0.d0 -+ chit_shl=0.d0 -+ do i=1,9 -+ -+ eta(i)=0.d0 -+ strcns(i)=0.d0 -+ strbod(i)=0.d0 -+ -+ enddo -+ -+c initialise accumulator arrays -+ -+ do i=1,mxnstk -+ -+ stpval(i)=0.d0 -+ sumval(i)=0.d0 -+ ssqval(i)=0.d0 -+ zumval(i)=0.d0 -+ ravval(i)=0.d0 -+ -+ enddo -+ -+ do i=1,mxatms -+ -+ xx0(i)=0.d0 -+ yy0(i)=0.d0 -+ zz0(i)=0.d0 -+ xxs(i)=0.d0 -+ yys(i)=0.d0 -+ zzs(i)=0.d0 -+ -+ enddo -+ -+ do j=1,mxnstk -+ -+ do i=1,mxstak -+ -+ stkval(i,j)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ if(lgofr)then -+ -+ do i=1,mxxtyp -+ -+ do j=1,mxrdf -+ -+ rdf(j,i)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(lzden)then -+ -+ do i=1,mxatyp -+ -+ do j=1,mxzdn -+ zdens(j,i)=0.d0 -+ enddo -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c put shells on cores at start -+ -+ if(lpsoc.and.keyres.ne.1.and.ntshl.gt.0) -+ x call put_shells_on_cores(idnode,mxnode,ntshl) -+ -+c if restart then broadcast stored variables via a global sum -+ -+ if(keyres.eq.1.and.mxnode.gt.1)then -+ -+ if(mxbuff.lt.natms.or.mxbuff.lt.mxnstk*mxstak) -+ x call error(idnode,186) -+ -+ buffer(1)=chit -+ buffer(2)=chip -+ buffer(3)=conint -+ buffer(4)=dble(nstep) -+ buffer(5)=dble(numacc) -+ buffer(6)=dble(numrdf) -+ buffer(7)=dble(nzden) -+ buffer(8)=tboost -+ buffer(9)=virtot -+ buffer(10)=vircom -+ buffer(11)=chit_shl -+ call gdsum(buffer(1),11,buffer(12)) -+ chit=buffer(1) -+ chip=buffer(2) -+ conint=buffer(3) -+ nstep=nint(buffer(4)) -+ numacc=nint(buffer(5)) -+ numrdf=nint(buffer(6)) -+ nzden=nint(buffer(7)) -+ tboost=buffer(8) -+ virtot=buffer(9) -+ vircom=buffer(10) -+ chit_shl=buffer(11) -+ -+ call gdsum(eta,9,buffer) -+ call gdsum(strcns,9,buffer) -+ call gdsum(strbod,9,buffer) -+ call gdsum(stpval,mxnstk,buffer) -+ call gdsum(sumval,mxnstk,buffer) -+ call gdsum(ssqval,mxnstk,buffer) -+ call gdsum(zumval,mxnstk,buffer) -+ call gdsum(ravval,mxnstk,buffer) -+ call gdsum(stkval,mxnstk*mxstak,buffer) -+ call gdsum(xx0,natms,buffer) -+ call gdsum(yy0,natms,buffer) -+ call gdsum(zz0,natms,buffer) -+ call gdsum(xxs,natms,buffer) -+ call gdsum(yys,natms,buffer) -+ call gdsum(zzs,natms,buffer) -+ -+c for rdf table - broadcast and normalise -+ -+ if(lgofr)then -+ -+ do k=1,mxxtyp -+ -+ call gdsum(rdf(1,k),mxrdf,buffer) -+ -+ do j=1,mxrdf -+ rdf(j,k)=rdf(j,k)/dble(mxnode) -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(lzden)then -+ -+ do k=1,mxatyp -+ -+ call gdsum(zdens(1,k),mxzdn,buffer) -+ -+ do j=1,mxzdn -+ zdens(j,k)=zdens(j,k)/dble(mxnode) -+ enddo -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c number densities and long-range corrections -+ -+ elrc=0.d0 -+ virlrc=0.d0 -+ -+ if(imcon.eq.0.or.imcon.eq.6)volm=4.d0*pi/3.d0*rvdw**3 -+ -+ call lrcorrect -+ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, -+ x ntpatm,ntpvdw,elrc,engunit,virlrc,rvdw,volm) -+ -+ if(lmetab.or.ntpmet.eq.0)then -+ -+ elrcm(0)=0.d0 -+ vlrcm(0)=0.d0 -+ -+ else -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+ if(imcon.eq.0.or.imcon.eq.6)volm=0.d0 -+ -+ return -+ end subroutine sysinit -+ -+ subroutine systemp -+ x (idnode,imcon,keyres,mxnode,natms,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for setting the initial system temperature -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,keyres,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,ntshl,levcfg,i,io,k,keyshl -+ real(8) degfre,degshl,degrot,temp,tolnce,sigma,rsq -+ -+c number of degrees of freedom -+c 3 for com translation -+c 3 for angular momentum about origin (non-periodic systems only) -+ -+ degfre=dble(3*(ntfree-ntshl)-3-ntcons)+degfre -+ if(imcon.eq.0.or.imcon.eq.6)degfre=degfre-3.0d0 -+ if(imcon.eq.0.or.imcon.eq.6)degrot=max(0.d0,degrot-3.0d0) -+ degshl=dble(3*ntshl) -+ -+c lose one degree of freedom if temperature constrained -+c gaussian constraints -+ -+c if(keyens.eq.1)degfre=degfre-1.d0 -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,' total degrees of freedom ',f20.0,/, -+ x ' rotational degrees of freedom ',f20.0,/, -+ x ' shell pseudo degrees of freedom',f20.0)") -+ x degfre,degrot,degshl -+ if(degfre.lt.1.d0)call error(idnode,350) -+ -+c define reciprocal masses of atoms -+ -+ do i=1,natms -+ -+ if(lstfrz(i).ne.0.or.weight(i).lt.1.d-6)then -+ -+ rmass(i)=0.d0 -+ weight(i)=0.d0 -+ -+ else -+ -+ rmass(i)=1.d0/weight(i) -+ -+ endif -+ -+ enddo -+ -+c generate starting velocities -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+ if(keyres.eq.0)then -+ -+ call gauss(natms,vxx,vyy,vzz) -+ -+ do i=1,natms -+ -+ rsq=sqrt(rmass(i)) -+ vxx(i)=vxx(i)*rsq -+ vyy(i)=vyy(i)*rsq -+ vzz(i)=vzz(i)*rsq -+ -+ enddo -+ -+ if(ntcons.gt.0)call quench -+ x (imcon,idnode,mxnode,natms,nscons,tolnce) -+ -+ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ if(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ elseif(keyres.eq.1.or.keyres.eq.3)then -+ -+ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ elseif(keyres.eq.2)then -+ -+ if(ngrp.gt.0)then -+ -+ call vscaleg -+ x (idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ elseif(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c print out sample of initial configuration -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'sample of starting configuration',/)") -+ -+ io=(natms+19)/20 -+ if((levcfg.le.1).and.(idnode.eq.0)) -+ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',/,/)") -+ if((levcfg.eq.2).and.(idnode.eq.0)) -+ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)', -+ x 7x,'fx(i)',7x,'fy(i)',7x,'fz(i)',/,/)") -+ -+ do i=1,natms,io -+ -+ if(levcfg.le.1)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i) -+ -+ elseif(levcfg.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i), -+ x vxx(i),vyy(i),vzz(i),fxx(i),fyy(i),fzz(i) -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine systemp -+ -+ subroutine sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine defining global bookkeeping -+c arrays -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical loglnk,lneut,lshmov,lcnb,lsolva,lghost -+ integer idnode,imcon,mxnode,natms,nneut,ngrp,nscons,ntangl,i -+ integer ntbond,ntcons,ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,ii,isol,itmols,igsol,iggsol,natmsf,natmsl -+ integer ntghost,natms2 -+ real(8) degfre,degrot -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c neutral group bookkeeping -+ -+ call neutbook(lneut,idnode,natms,nneut) -+ -+c rigid body bookkeeping -+ -+ call quatbook -+ x (lsolva,idnode,imcon,mxnode,natms2,ngrp,ntpmls, -+ x ntfree,degfre,degrot) -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ -+ numcon(mxtmls)=numcon(mxtmls)+ntcons_ghost -+ numgrp(mxtmls)=numgrp(mxtmls)+ngrp_ghost -+ -+ endif -+ -+c construct list of excluded pair interactions -+ -+ if(lneut)then -+ -+ call exclude(idnode,mxnode,natms,ntpmls) -+ call excludeneu(idnode,mxnode,nneut) -+ -+ elseif(.not.lneut)then -+ -+ call exclude(idnode,mxnode,natms,ntpmls) -+ -+ if(loglnk)then -+ -+ call exclude_link(idnode,mxnode,ntpmls) -+ -+ else -+ -+ call exclude_atom(idnode,mxnode,natms,ntpmls) -+ -+ endif -+ -+ endif -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ -+ numcon(mxtmls)=numcon(mxtmls)-ntcons_ghost -+ numgrp(mxtmls)=numgrp(mxtmls)-ngrp_ghost -+ -+ endif -+ -+c construct interaction lists for bonded forces -+ -+ call intlist -+ x (lshmov,lcnb,idnode,mxnode,natms2,nscons,ntangl,ntbond, -+ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) -+ -+c adaptations for solvation and excitation simulations -+ -+ if(lsolva.or.lghost)then -+ -+ natmsf=0 -+ natmsl=0 -+ natm_sol(:)=0 -+ const_sol(:)=numcon(:)*nummols(:) -+ rigid_sol(:)=numgrp(:)*nummols(:) -+ -+ if(ngrp.eq.0)then -+ -+ do itmols=1,mxtmls -+ -+ natmsl=natmsl+numsit(itmols)*nummols(itmols) -+ -+ do isol=natmsf+1,natmsl -+ -+ if(lstfrz(isol).eq.0)then -+ natm_sol(itmols)=natm_sol(itmols)+1 -+ endif -+ -+ enddo -+ -+ natmsf=natmsl -+ -+ enddo -+ -+ else -+ -+ ii=1 -+ -+ do itmols=1,mxtmls -+ -+ natmsl=natmsl+numsit(itmols)*nummols(itmols) -+ -+ do isol=natmsf+1,natmsl -+ -+ if(lstgot_sol(ii).eq.isol)then -+ ii=ii+1 -+ else -+ -+ if(lstfrz(isol).eq.0)then -+ natm_sol(itmols)=natm_sol(itmols)+1 -+ endif -+ -+ endif -+ -+ enddo -+ -+ natmsf=natmsl -+ -+ enddo -+ -+ degrot_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 -+ degfre_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 -+ -+ endif -+ -+ if(lghost)natm_sol(mxtmls)=natm_sol(mxtmls)-ntghost -+ degfre_sol(:)=dble(3*(natm_sol(:))-const_sol(:))+degfre_sol(:) -+ -+ endif -+ -+ return -+ end subroutine sysbook -+ -+ subroutine define_units(idnode,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting energy units -+c -+c copyright - daresbury laboratory -+c author - w. smith august 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,idum,i -+ real(8) engunit -+ logical blank -+ -+ blank=.true. -+ -+ do i=6,lenrec -+ if(record(i).ne.' ')blank=.false. -+ enddo -+ -+ if(blank)then -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=dl_poly internal ', -+ x 'units ')") -+ -+ elseif(findstring('ev',record,idum))then -+ -+ engunit=9648.530821d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=electron volts ')") -+ -+ elseif(findstring('kev',record,idum))then -+ -+ engunit=9648530.821d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kilo electron volts ')") -+ -+ elseif(findstring('kcal',record,idum))then -+ -+ engunit=418.4d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kcal/ mol ')") -+ -+ elseif(findstring('kj',record,idum))then -+ -+ engunit=1.d2 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kjoule/mol ')") -+ -+ elseif(findstring('k',record,idum))then -+ -+ engunit=boltz -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kelvin ')") -+ -+ elseif(findstring('internal',record,idum))then -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=dl_poly internal', -+ x ' units ')") -+ -+ else -+ -+ if(idnode.eq.0)write(nrite,'(a)')record -+ call error(idnode,5) -+ -+ endif -+ -+ return -+ end subroutine define_units -+ -+ subroutine quatbook -+ x (lsolva,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree, -+ x degfre,degrot) -+ -+c************************************************************************** -+c -+c dl_poly subroutine for setting up bookkeeping for rigid bodies -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c************************************************************************* -+ -+ implicit none -+ -+ logical safe,pass1,pass2,linear,lsolva -+ integer fail,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree -+ integer i,igrp,jgrp,kgrp,jr,jt,igrp1,igrp2,itmols,imols,lgrp,id -+ integer ii,jj,isite,k,kk,ill,i1,i2,i3,j,ngp,ifre1,ifre2,ig,ij -+ integer fngrp,lngrp -+ real(8) degfre,degrot,dnorm,a1,rtall,rotall,rot,aa,rotinr,bb,rot1 -+ real(8) rsq,det,dettest,aq,bq,cq,dq,eq,fq,gq,hq,rnorm,tol,rotxyz -+ real(8) rotlim,rrr -+ -+ integer, allocatable :: ind(:,:),lstgot(:) -+ real(8), allocatable :: gaxs(:,:),rotmin(:),accum(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ dimension rot(9),aa(9),rotinr(3,3),bb(9),rot1(3,3),fail(5) -+ -+ data fail/0,0,0,0,0/ -+ -+c allocate working arrays -+ -+ allocate (ind(mxgrp,3),lstgot(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) -+ allocate (gaxs(mxungp,9),rotmin(mxungp),stat=fail(4)) -+ allocate (accum(mxungp),stat=fail(5)) -+ do i=1,5 -+ if(fail(i).ne.0)call error(idnode,1790) -+ enddo -+ -+c initialise bookkeeping indices -+ -+ igrp=0 -+ jgrp=0 -+ kgrp=0 -+ isite=0 -+ jr=0 -+ jt=0 -+ safe=.true. -+ degfre=0.d0 -+ degrot=0.d0 -+ -+c rigid body identifier -+ -+ do i=1,natms -+ lstbod(i)=0 -+ enddo -+ -+c number of rigid groups in system -+ -+ ngrp=0 -+ do itmols=1,ntpmls -+ ngrp=ngrp+nummols(itmols)*numgrp(itmols) -+ enddo -+ -+c block indices for groups -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c loop over molecule types -+ -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if(igrp.le.mxgrp)then -+ -+ lstgtp(igrp)=listyp(lgrp+kgrp) -+ id=listyp(lgrp+kgrp) -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2))then -+ -+ jgrp=jgrp+1 -+ -+ do jj=1,numgsit(id) -+ -+ jr=jr+1 -+ jt=jt+1 -+ -+ if(jr.le.mxatms.and.jt.le.mxatms)then -+ -+ lstrgd(jr)=lstgst(id,jj)+isite -+ lstgot(jt)=lstgst(id,jj)+isite -+ lstbod(lstgst(id,jj)+isite)=igrp -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ else -+ -+ do jj=1,numgsit(id) -+ -+ jt=jt+1 -+ if(jt.le.mxatms)then -+ -+ lstgot(jt)=lstgst(id,jj)+isite -+ lstbod(lstgst(id,jj)+isite)=igrp -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,304) -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ kgrp=kgrp+numgrp(itmols) -+ -+ enddo -+ -+ if(ngrp.eq.0)then -+ -+ j=0 -+ do i=1,natms -+ -+ if(lstfrz(i).eq.0)then -+ -+ j=j+1 -+ lstfre(j)=i -+ -+ endif -+ -+ enddo -+ ntfree=j -+ -+ else -+ -+c centre of mass of groups -+c assumes group dimensions are smaller than half box width -+ -+ do i=1,natms -+ lstme(i)=0 -+ enddo -+ -+ do id=1,mxungp -+ gmass(id)=0.d0 -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c working com is first site in group -+ -+ i=lstrgd(jr+1) -+ txx(ig)=xxx(i) -+ tyy(ig)=yyy(i) -+ tzz(ig)=zzz(i) -+ -+ id=lstgtp(ig) -+ safe=.false. -+ if(abs(gmass(id)).lt.1.d-10)safe=.true. -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ xxt(jr)=xxx(i)-txx(ig) -+ yyt(jr)=yyy(i)-tyy(ig) -+ zzt(jr)=zzz(i)-tzz(ig) -+ if(safe)gmass(id)=gmass(id)+weight(i) -+ -+ enddo -+ -+ enddo -+ -+c minimum image from working com -+ -+ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=0.d0 -+ gcmy(ig)=0.d0 -+ gcmz(ig)=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ gcmx(ig)=gcmx(ig)+weight(i)*xxt(jr) -+ gcmy(ig)=gcmy(ig)+weight(i)*yyt(jr) -+ gcmz(ig)=gcmz(ig)+weight(i)*zzt(jr) -+ -+ enddo -+ -+ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) -+ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) -+ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) -+ -+ enddo -+ -+c global communications -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+c make sure all nodes have same copy of gmass -+ -+ if(mxnode.gt.1)then -+ -+ do id=1,mxungp -+ -+ accum(id)=0.d0 -+ if(gmass(id).gt.0.d0)accum(id)=1.d0 -+ -+ enddo -+ -+ call gdsum(gmass(1),mxungp,buffer(1)) -+ call gdsum(accum(1),mxungp,buffer(1)) -+ -+ do id=1,mxungp -+ -+ dnorm=max(1.d0,accum(id)) -+ gmass(id)=gmass(id)/dnorm -+ -+ enddo -+ -+ endif -+ -+c find a group of each type on this node to -+c find principal axis system of the group type -+ -+ do id=1,mxungp -+ -+ jr=0 -+ ij=0 -+ safe=.false. -+ -+ do while(.not.safe.and.ij.lt.ngrp) -+ -+ ij=ij+1 -+ jr=jr+numgsit(lstgtp(ij)) -+ if(lstgtp(ij).eq.id)safe=.true. -+ -+ enddo -+ -+ if(safe)then -+ -+c rotational inertia accumulator -+ -+ do k=1,3 -+ -+ do kk=1,3 -+ -+ rotinr(k,kk)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstgot(jr) -+ -+ xxt(jr)=xxx(i)-gcmx(ij) -+ yyt(jr)=yyy(i)-gcmy(ij) -+ zzt(jr)=zzz(i)-gcmz(ij) -+ -+ call images(imcon,0,1,1,cell,xxt(jr),yyt(jr),zzt(jr)) -+ -+ rotinr(1,1)=rotinr(1,1)+weight(i)*(xxt(jr)**2) -+ rotinr(1,2)=rotinr(1,2)+weight(i)*xxt(jr)*yyt(jr) -+ rotinr(1,3)=rotinr(1,3)+weight(i)*xxt(jr)*zzt(jr) -+ rotinr(2,2)=rotinr(2,2)+weight(i)*(yyt(jr)**2) -+ rotinr(2,3)=rotinr(2,3)+weight(i)*yyt(jr)*zzt(jr) -+ rotinr(3,3)=rotinr(3,3)+weight(i)*(zzt(jr)**2) -+ -+ enddo -+ -+ rotinr(2,1)=rotinr(1,2) -+ rotinr(3,1)=rotinr(1,3) -+ rotinr(3,2)=rotinr(2,3) -+ -+ call jacobi(rotinr,rot1,3) -+ -+ rot(1)=rot1(1,1) -+ rot(4)=rot1(2,1) -+ rot(7)=rot1(3,1) -+ rot(2)=rot1(1,2) -+ rot(5)=rot1(2,2) -+ rot(8)=rot1(3,2) -+ rot(3)=rot1(1,3) -+ rot(6)=rot1(2,3) -+ rot(9)=rot1(3,3) -+ -+c rotational inertia accumulators -+ -+ rotinx(id,1)=0.d0 -+ rotiny(id,1)=0.d0 -+ rotinz(id,1)=0.d0 -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstgot(jr) -+ -+c site positions in principal axis system -+ -+ gxx(id,j)=rot(1)*xxt(jr)+rot(4)*yyt(jr)+rot(7)*zzt(jr) -+ gyy(id,j)=rot(2)*xxt(jr)+rot(5)*yyt(jr)+rot(8)*zzt(jr) -+ gzz(id,j)=rot(3)*xxt(jr)+rot(6)*yyt(jr)+rot(9)*zzt(jr) -+ -+c impose rounding -+ -+ if(abs(gxx(id,j)).lt.1.d-8)gxx(id,j)=0.d0 -+ if(abs(gyy(id,j)).lt.1.d-8)gyy(id,j)=0.d0 -+ if(abs(gzz(id,j)).lt.1.d-8)gzz(id,j)=0.d0 -+ -+c rotational inertia tensor of group type -+ -+ rotinx(id,1)=rotinx(id,1)+ -+ x weight(i)*(gyy(id,j)**2+gzz(id,j)**2) -+ rotiny(id,1)=rotiny(id,1)+ -+ x weight(i)*(gzz(id,j)**2+gxx(id,j)**2) -+ rotinz(id,1)=rotinz(id,1)+ -+ x weight(i)*(gxx(id,j)**2+gyy(id,j)**2) -+ -+ enddo -+ -+c set axis system such that: Ixx >=Iyy >=Izz -+ -+ rotxyz=max(rotinx(id,1),rotiny(id,1),rotinz(id,1)) -+ -+ if(rotxyz.ge.rotinx(id,1))then -+ -+ if(rotiny(id,1).ge.rotxyz)then -+ -+ do j=1,numgsit(id) -+ -+ a1=gxx(id,j) -+ gxx(id,j)=gyy(id,j) -+ gyy(id,j)=-a1 -+ -+ enddo -+ -+ rotiny(id,1)=rotinx(id,1) -+ rotinx(id,1)=rotxyz -+ -+ elseif(rotinz(id,1).ge.rotxyz)then -+ -+ do j=1,numgsit(id) -+ -+ a1=gxx(id,j) -+ gxx(id,j)=gzz(id,j) -+ gzz(id,j)=-a1 -+ -+ enddo -+ -+ rotinz(id,1)=rotinx(id,1) -+ rotinx(id,1)=rotxyz -+ -+ endif -+ -+ endif -+ -+ if(rotinz(id,1).gt.rotiny(id,1))then -+ -+ do j=1,numgsit(id) -+ -+ a1=gyy(id,j) -+ gyy(id,j)=gzz(id,j) -+ gzz(id,j)=-a1 -+ -+ enddo -+ -+ a1=rotinz(id,1) -+ rotinz(id,1)=rotiny(id,1) -+ rotiny(id,1)=a1 -+ -+ endif -+ -+c set up principal axis system in terms of site positions -+ -+c test for (near) linear unit -+ -+ ill=0 -+ rtall=(rotinx(id,1)+rotiny(id,1)+rotinz(id,1)) -+ -+ if(rtall.gt.1.d-5)then -+ rotall=rtall -+ else -+ rotall=1.d0 -+ endif -+ -+ rotmin(id)=min(rotinx(id,1),rotiny(id,1)) -+ rotmin(id)=min(rotmin(id),rotinz(id,1))/rotall -+ -+ if((rotinx(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ if((rotiny(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ if((rotinz(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ -+ if(ill.ge.2)then -+ -+c point particle only -+ -+ ind(id,1)=1 -+ ind(id,2)=1 -+ ind(id,3)=1 -+ -+ do jj=1,9 -+ gaxs(id,jj)=0.d0 -+ enddo -+ -+ elseif(ill.eq.1)then -+ -+c linear molecule -+ -+ ind(id,1)=1 -+ ind(id,2)=2 -+ ind(id,3)=1 -+ -+ aa(1)=gxx(id,1)-gxx(id,2) -+ aa(4)=gyy(id,1)-gyy(id,2) -+ aa(7)=gzz(id,1)-gzz(id,2) -+ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) -+ -+ if(abs(aa(7)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(7)**2) -+ aa(2)=0.d0 -+ aa(5)=aa(7)/rsq -+ aa(8)=-aa(4)/rsq -+ -+ elseif(abs(aa(4)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(1)**2) -+ aa(2)=-aa(4)/rsq -+ aa(5)=aa(1)/rsq -+ aa(8)=0.d0 -+ -+ elseif(abs(aa(1)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(1)**2+aa(7)**2) -+ aa(2)=-aa(7)/rsq -+ aa(5)=0.d0 -+ aa(8)=aa(1)/rsq -+ -+ endif -+ -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+ call invert(aa,bb,det) -+ -+ if(abs(det).lt.1.d-5)call error(idnode,306) -+ -+ do j=1,9 -+ gaxs(id,j)=bb(j) -+ enddo -+ -+ elseif(ill.eq.0)then -+ -+c non-linear molecule -+ -+ i1=1 -+ i2=1 -+ i3=1 -+ pass1=.true. -+ dettest=1.d-1 -+ -+ do while(pass1.and.i2.lt.numgsit(id)-1) -+ -+ i2=i2+1 -+ i3=i2 -+ pass2=.true. -+ -+ do while(pass2.and.i3.lt.numgsit(id)) -+ -+ i3=i3+1 -+ -+ aa(1)=gxx(id,i1)-gxx(id,i2) -+ aa(4)=gyy(id,i1)-gyy(id,i2) -+ aa(7)=gzz(id,i1)-gzz(id,i2) -+ aa(2)=gxx(id,i1)-gxx(id,i3) -+ aa(5)=gyy(id,i1)-gyy(id,i3) -+ aa(8)=gzz(id,i1)-gzz(id,i3) -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+c invert matrix -+ -+ call invert(aa,bb,det) -+ -+c check on size of determinant - to see if the 3 sites are -+c too close to being linear for safety. -+ -+ pass2=abs(det).lt.dettest -+ -+ enddo -+ -+ pass1=abs(det).lt.dettest -+ -+ enddo -+ -+ if(abs(det).lt.dettest)call error(idnode,306) -+ -+c store indices used -+ -+ ind(id,1)=i1 -+ ind(id,2)=i2 -+ ind(id,3)=i3 -+ -+c store coefficients -+ -+ do j=1,9 -+ -+ gaxs(id,j)=bb(j) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c check that rigid unit does not contain frozen atoms -+ -+ safe=.true. -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ if(lstfrz(i).ne.0)safe=.false. -+ -+ enddo -+ -+ enddo -+ -+c global check on error condition -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,360) -+ -+c quaternions for all rigid groups in system -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ i1=lstrgd(jr+ind(id,1)) -+ i2=lstrgd(jr+ind(id,2)) -+ i3=lstrgd(jr+ind(id,3)) -+ -+ jr=jr+numgsit(id) -+ -+c group basis vectors -+ -+ aa(1)=xxx(i1)-xxx(i2) -+ aa(4)=yyy(i1)-yyy(i2) -+ aa(7)=zzz(i1)-zzz(i2) -+ -+ call images(imcon,0,1,1,cell,aa(1),aa(4),aa(7)) -+ -+ if(rotmin(id).gt.1.d-5)then -+ -+ aa(2)=xxx(i1)-xxx(i3) -+ aa(5)=yyy(i1)-yyy(i3) -+ aa(8)=zzz(i1)-zzz(i3) -+ -+ else -+ -+ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) -+ -+ if(abs(aa(7)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(7)**2) -+ aa(2)=0.d0 -+ aa(5)=aa(7)/rsq -+ aa(8)=-aa(4)/rsq -+ -+ elseif(abs(aa(4)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(1)**2) -+ aa(2)=-aa(4)/rsq -+ aa(5)=aa(1)/rsq -+ aa(8)=0.d0 -+ -+ elseif(abs(aa(1)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(1)**2+aa(7)**2) -+ aa(2)=-aa(7)/rsq -+ aa(5)=0.d0 -+ aa(8)=aa(1)/rsq -+ -+ endif -+ -+ endif -+ -+ call images(imcon,0,1,1,cell,aa(2),aa(5),aa(8)) -+ -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+c group rotational matrix -+ -+ rot(1)=gaxs(id,1)*aa(1)+gaxs(id,4)*aa(2)+gaxs(id,7)*aa(3) -+ rot(2)=gaxs(id,2)*aa(1)+gaxs(id,5)*aa(2)+gaxs(id,8)*aa(3) -+ rot(3)=gaxs(id,3)*aa(1)+gaxs(id,6)*aa(2)+gaxs(id,9)*aa(3) -+ rot(4)=gaxs(id,1)*aa(4)+gaxs(id,4)*aa(5)+gaxs(id,7)*aa(6) -+ rot(5)=gaxs(id,2)*aa(4)+gaxs(id,5)*aa(5)+gaxs(id,8)*aa(6) -+ rot(6)=gaxs(id,3)*aa(4)+gaxs(id,6)*aa(5)+gaxs(id,9)*aa(6) -+ rot(7)=gaxs(id,1)*aa(7)+gaxs(id,4)*aa(8)+gaxs(id,7)*aa(9) -+ rot(8)=gaxs(id,2)*aa(7)+gaxs(id,5)*aa(8)+gaxs(id,8)*aa(9) -+ rot(9)=gaxs(id,3)*aa(7)+gaxs(id,6)*aa(8)+gaxs(id,9)*aa(9) -+ -+c determine quaternions from rotational matrix -+ -+ aq=rot(1)+rot(5) -+ bq=rot(2)-rot(4) -+ cq=rot(6)-rot(8) -+ dq=rot(2)+rot(4) -+ eq=rot(3)+rot(7) -+ fq=rot(6)+rot(8) -+ gq=rot(3)-rot(7) -+ hq=rot(1)-rot(5) -+ -+ q0(ig)=0.5d0*sqrt(aq+sqrt(aq*aq+bq*bq)) -+ -+ if(q0(ig).gt.1.d-4)then -+ -+ q1(ig)=-0.25d0*cq/q0(ig) -+ q2(ig)=0.25d0*gq/q0(ig) -+ q3(ig)=-0.25d0*bq/q0(ig) -+ -+ else -+ -+ q1(ig)=0.5d0*sqrt(hq+sqrt(hq*hq+dq*dq)) -+ -+ if(q1(ig).gt.1.d-4)then -+ -+ q2(ig)=0.25d0*dq/q1(ig) -+ q3(ig)=0.25d0*eq/q1(ig) -+ -+ else -+ -+ q2(ig)=0.5d0*sqrt(-hq+sqrt(hq*hq+dq*dq)) -+ -+ if(q2(ig).gt.1.d-4)then -+ -+ q3(ig)=0.25d0*fq/q2(ig) -+ -+ else -+ -+ q3(ig)=1.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c normalise quaternions -+ -+ rnorm=1.d0/sqrt(q0(ig)**2+q1(ig)**2+q2(ig)**2+q3(ig)**2) -+ q0(ig)=rnorm*q0(ig) -+ q1(ig)=rnorm*q1(ig) -+ q2(ig)=rnorm*q2(ig) -+ q3(ig)=rnorm*q3(ig) -+ -+ enddo -+ -+c test for redundant degrees of freedom -+c and ensure rotational inertias are non-zero -+ -+ degrot=0.d0 -+ -+ if(lsolva)then -+ degrot_sol(:)=0.d0 -+ endif -+ -+ do ig=1,ngrp -+ -+ id=lstgtp(ig) -+ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1)) -+ -+ if(rotall*rotinx(id,1).lt.1.d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ if(rotall*rotiny(id,1).lt.1.d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ if(rotall*rotinz(id,1).lt.1d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ enddo -+ -+c rotational degrees of freedom and rigid body contribution -+c to total degrees of freedom -+ -+ degrot=degrot+dble(ngrp)*3.d0 -+ degfre=degrot+dble(ngrp)*3.d0 -+ -+ if(lsolva)then -+ -+ fngrp=1 -+ lngrp=0 -+ -+ do itmols=1,mxtmls -+ -+ lngrp=lngrp+nummols(itmols)*numgrp(itmols) -+ -+ do ig=fngrp,lngrp -+ -+ id=lstgtp(ig) -+ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1)) -+ -+ if(rotall*rotinx(id,1).lt.1.d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ if(rotall*rotiny(id,1).lt.1.d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ if(rotall*rotinz(id,1).lt.1d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ enddo -+ -+ fngrp=lngrp+1 -+ -+ enddo -+ -+ endif -+ -+c summarise results -+ -+ if(idnode.eq.0)then -+ -+ if(gmass(1).gt.0.d0)then -+ -+ write(nrite,'(/,/,12x,a)')' summary of rigid body set up' -+ -+ do id=1,mxungp -+ -+ if(gmass(id).gt.0.d0)then -+ -+ write(nrite,'(/,a,i10)')' group of type ',id -+ write(nrite,'(12x,a,f20.10)')' total mass ', -+ x gmass(id) -+ write(nrite,'(12x,a,3f20.10)')' rot. inertia ', -+ x rotinx(id,1),rotiny(id,1),rotinz(id,1) -+ write(nrite,'(/,12x,a,3(8x,a7))')' site','a coord', -+ x 'b coord','c coord' -+ do j=1,numgsit(id) -+ write(nrite,'(12x,i5,1p,3e15.5)')j,gxx(id,j), -+ x gyy(id,j),gzz(id,j) -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c find number of unique groups -+ -+ ngp=0 -+ do ig=1,ngrp -+ ngp=max(ngp,lstgtp(ig)) -+ enddo -+ -+c calculate reciprocal of rotational inertias -+ -+ do id=1,ngp -+ -+ rotlim=max(1.d-2,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1))*1.d-5 -+ -+ if(rotinx(id,1).lt.rotlim)then -+ rotinx(id,2)=0.d0 -+ else -+ rotinx(id,2)=1.d0/rotinx(id,1) -+ endif -+ -+ if(rotiny(id,1).lt.rotlim)then -+ rotiny(id,2)=0.d0 -+ else -+ rotiny(id,2)=1.d0/rotiny(id,1) -+ endif -+ -+ if(rotinz(id,1).lt.rotlim)then -+ rotinz(id,2)=0.d0 -+ else -+ rotinz(id,2)=1.d0/rotinz(id,1) -+ endif -+ -+ enddo -+ -+c Check of quaternion set up with atomic positions -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c group type -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 -+ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) -+ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) -+ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) -+ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 -+ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) -+ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) -+ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) -+ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxt(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyt(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzt(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ -+ txx(jr)=xxx(i)-xxt(i) -+ tyy(jr)=yyy(i)-yyt(i) -+ tzz(jr)=zzz(i)-zzt(i) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,jr,cell,txx,tyy,tzz) -+ -+c set tolerance for testing quaternion setup. -+ -+ rsq=0.d0 -+ tol=1.d-2 -+ -+ do i=1,jr -+ -+ rrr=txx(i)**2+tyy(i)**2+tzz(i)**2 -+ if(rrr.gt.tol)then -+ -+ rsq=rrr -+ -+ endif -+ -+ enddo -+ -+c exit if error in set up -+ -+ safe=.true. -+ if(rsq.gt.tol)safe=.false. -+ if(mxnode.gt.1)call gstate(safe) -+ -+ if(.not.safe)call error(idnode,310) -+ -+c sort lstgot into ascending order -+ -+ call shellsort(jt,lstgot) -+ -+c check that no site is in more than 1 rigid group -+ -+ i=1 -+ safe=.true. -+ do while(i.lt.jt) -+ -+ i=i+1 -+ linear=.true. -+ do while(linear) -+ -+ linear=.false. -+ -+ if(lstgot(i).eq.lstgot(i-1))then -+ -+ linear=.true. -+ safe=.false. -+ jt=jt-1 -+ -+ do j=i,jt -+ lstgot(j)=lstgot(j+1) -+ enddo -+ -+ endif -+ -+ if(i.ge.jt)linear=.false. -+ -+ enddo -+ -+ enddo -+ -+ if(.not.safe)call error(idnode,320) -+ -+c list of 'free' sites -+ -+ ii=1 -+ jj=0 -+ do i=1,natms -+ -+ if(lstgot(ii).eq.i)then -+ -+ ii=ii+1 -+ -+ else -+ -+ if(lstfrz(i).eq.0)then -+ jj=jj+1 -+ lstfre(jj)=i -+ endif -+ -+ endif -+ -+ enddo -+ -+c number of free sites -+ -+ ntfree=jj -+ -+c list of atoms integrated on this node -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ jr=jr+numgsit(id) -+ -+ enddo -+ -+ do i=1,jr -+ lstme(i)=lstrgd(i) -+ enddo -+ -+c block parameters for free atoms -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+ do i=ifre1,ifre2 -+ -+ jr=jr+1 -+ lstme(jr)=lstfre(i) -+ -+ enddo -+ -+c exchange quaternion data with other nodes -+ -+ if(mxnode.gt.1)call merge4 -+ x (idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+ if(lsolva)lstgot_sol(:)=lstgot(:) -+ -+c deallocate work arrays -+ -+ deallocate (ind,lstgot,stat=fail(1)) -+ deallocate (txx,tyy,tzz,stat=fail(2)) -+ deallocate (xxt,yyt,zzt,stat=fail(3)) -+ deallocate (gaxs,rotmin,stat=fail(4)) -+ deallocate (accum,stat=fail(5)) -+ -+ return -+ end subroutine quatbook -+ -+ subroutine abort_field_read(kode,idnode,nfield) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting FIELD file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nfield -+ -+ if(idnode.eq.0)close (nfield) -+ -+ if(kode.eq.1)then -+ -+c end of field file error exit -+ -+ call error(idnode,52) -+ -+ elseif(kode.eq.2)then -+ -+c unrecognised directive in field file -+ -+ call error(idnode,4) -+ -+ endif -+ -+ return -+ end subroutine abort_field_read -+ -+ subroutine abort_control_read(kode,idnode,nread) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting CONTROL file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nread -+ -+ if(idnode.eq.0)close (nread) -+ -+ if(kode.eq.1)then -+ -+c end of control file error exit -+ -+ call error(idnode,53) -+ -+ elseif(kode.eq.2)then -+ -+c general error exit from field file processing -+ -+ call error(idnode,0) -+ -+ endif -+ -+ return -+ end subroutine abort_control_read -+ -+ subroutine abort_config_read(kode,idnode,nconf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting CONTROL file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nconf -+ -+ if(idnode.eq.0)close (nconf) -+ -+ if(kode.eq.1)then -+ -+c general error exit from field file processing -+ -+ call error(idnode,54) -+ -+ elseif(kode.eq.2)then -+ -+c end of config file error exit -+ -+ call error(idnode,55) -+ -+ endif -+ -+ return -+ end subroutine abort_config_read -+ -+ subroutine neutbook(lneut,idnode,natms,nneut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for neutral group bookkeeping -+c -+c copyright - daresbury laboratory -+c author - w. smith nov 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lneut,safe -+ integer idnode,natms,nneut,i -+ -+ safe=.true. -+ -+c neutral group bookkeeping: sites must be listed consecutively -+ -+ if(lneut)then -+ -+ if(lstneu(1).ne.1)call error(idnode,230) -+ -+ neulst(1)=1 -+ nneut=1 -+ -+ do i=2,natms -+ -+ safe=.false. -+ if(lstneu(i).eq.lstneu(i-1))safe=.true. -+ if(lstneu(i).eq.lstneu(i-1)+1)then -+ -+ safe=.true. -+ nneut=nneut+1 -+ if(nneut.gt.mxneut)call error(idnode,220) -+ neulst(nneut)=i -+ -+ endif -+ -+ if(.not.safe)call error(idnode,230) -+ -+ enddo -+ -+ neulst(nneut+1)=natms+1 -+ -+ endif -+ -+ return -+ -+ end subroutine neutbook -+ -+ subroutine intlist -+ x (lshmov,lcnb,idnode,mxnode,natms,nscons,ntangl,ntbond, -+ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the interaction lists -+c for the entire simulated system -+c -+c parallel replicated dat version : block data -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992 -+c amended - t.forester oct 1993 -+c amended - t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,safe1,lcnb,lchk,lfail -+ integer idnode,mxnode,natms,nscons,ntangl,ntbond,ntcons -+ integer ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf -+ integer ibonds,jbonds,kbonds,ipmf,jpmf,iangle,jangle,kangle -+ integer idihed,jdihed,kdihed,iinver,jinver,kinver,iteths -+ integer jteths,kteths,ishels,jshels,kshels,ntbon0,ntpmf0 -+ integer ntang0,ntdih0,ntinv0,nttet0,ntshl0,ntcon0,idum -+ integer itmols,isite,iconst,jconst,kconst,ibnd1,ibnd2,ipmf1 -+ integer ipmf2,iang1,iang2,idih1,idih2,iinv1,iinv2,itet1 -+ integer itet2,ishl1,ishl2,imols,lbonds,lpmf,jj,nnn,langle -+ integer ldihed,linver,lteths,lshels,i,ii,ntmp,klo,khi,ngrp -+ integer klo0,ifail,iloop,nnode,nscons0,nscons1,icon,fail -+ integer kcons,id,jdnode,lconst,itry,iatom,jatom,j,nfail -+ real(8) tol -+ -+ integer, allocatable :: itest(:),index(:),kscons(:) -+ integer, allocatable :: msite(:),mconst(:),listin(:) -+ -+ dimension fail(4) -+ -+ data fail/0,0,0,0/ -+ -+c allocate work arrays -+ -+ allocate (itest(mxtmls),index(mxtmls),stat=fail(1)) -+ allocate (msite(mxtmls),mconst(mxtmls),stat=fail(2)) -+ allocate (listin(mxatms),stat=fail(3)) -+ allocate (kscons(0:mxproc-1),stat=fail(4)) -+ do i=1,4 -+ if(fail(i).ne.0)call error(idnode,1800) -+ enddo -+ -+c initialise bookkeeping indices -+ -+ ibonds=0 -+ jbonds=0 -+ kbonds=0 -+ ipmf=0 -+ jpmf=0 -+ iangle=0 -+ jangle=0 -+ kangle=0 -+ idihed=0 -+ jdihed=0 -+ kdihed=0 -+ iinver=0 -+ jinver=0 -+ kinver=0 -+ iteths=0 -+ jteths=0 -+ kteths=0 -+ ishels=0 -+ jshels=0 -+ kshels=0 -+ safe=.true. -+ safe1=.true. -+ -+c find total number of bonds,pmf constraints,bond constraints, -+c angles,dihedrals,inversions, tethers,core-shells, in system -+c - ignoring frozen atoms -+ -+ ntbon0=0 -+ ntpmf0=0 -+ ntcon0=0 -+ ntang0=0 -+ ntdih0=0 -+ ntinv0=0 -+ nttet0=0 -+ ntshl0=0 -+ nscons=0 -+ ntcons=0 -+ -+ do itmols=1,ntpmls -+ -+ ntbon0=ntbon0+nummols(itmols)*numbonds(itmols) -+ ntpmf0=ntpmf0+nummols(itmols)*numpmf(itmols) -+ ntcon0=ntcon0+nummols(itmols)*numcon(itmols) -+ ntang0=ntang0+nummols(itmols)*numang(itmols) -+ ntdih0=ntdih0+nummols(itmols)*numdih(itmols) -+ ntinv0=ntinv0+nummols(itmols)*numinv(itmols) -+ nttet0=nttet0+nummols(itmols)*numteth(itmols) -+ ntshl0=ntshl0+nummols(itmols)*numshl(itmols) -+ -+ enddo -+ -+ isite=0 -+ iconst=0 -+ jconst=0 -+ kconst=0 -+ -+c first and last index of bonds, angles etc for this node -+ -+ ibnd1=(idnode*ntbon0)/mxnode+1 -+ ibnd2=((idnode+1)*ntbon0)/mxnode -+ -+ ipmf1=(idnode*ntpmf0)/mxnode+1 -+ ipmf2=((idnode+1)*ntpmf0)/mxnode -+ ntpmf=ntpmf0 -+ nspmf=ipmf2+1-ipmf1 -+ -+ iang1=(idnode*ntang0)/mxnode+1 -+ iang2=((idnode+1)*ntang0)/mxnode -+ -+ idih1=(idnode*ntdih0)/mxnode+1 -+ idih2=((idnode+1)*ntdih0)/mxnode -+ -+ iinv1=(idnode*ntinv0)/mxnode+1 -+ iinv2=((idnode+1)*ntinv0)/mxnode -+ -+ itet1=(idnode*nttet0)/mxnode+1 -+ itet2=((idnode+1)*nttet0)/mxnode -+ -+ ishl1=(idnode*ntshl0)/mxnode+1 -+ ishl2=((idnode+1)*ntshl0)/mxnode -+ -+c loop over molecule types -+ -+ do itmols=1,ntpmls -+ -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct bond constraint list later -+c construct chemical bond interaction list -+ -+ do lbonds=1,numbonds(itmols) -+ -+ ibonds=ibonds+1 -+ -+ if(ibonds.ge.ibnd1.and.ibonds.le.ibnd2)then -+ -+ jbonds=jbonds+1 -+ if(jbonds.le.mxbond)then -+ -+ listbnd(jbonds,1)=lbonds+kbonds -+ listbnd(jbonds,2)=lstbnd(lbonds+kbonds,1) -+ x +isite -+ listbnd(jbonds,3)=lstbnd(lbonds+kbonds,2) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,31) -+ -+c construct pmf site lists - no exclusions -+ -+ do lpmf=1,numpmf(itmols) -+ -+ ipmf=ipmf+1 -+ -+ if(ipmf.ge.ipmf1.and.ipmf.le.ipmf2)then -+ -+ jpmf=jpmf+1 -+ if(jpmf.le.mspmf)then -+ -+ nnn=npmf(1)+npmf(2) -+ if(nnn.le.mxspmf)then -+ -+ do jj=1,npmf(1)+npmf(2) -+ lstpmf(jj,jpmf)=indpmf(jj)+isite -+ enddo -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ else -+ -+ safe1=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe1) -+ if(.not.safe1)call error(idnode,458) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,460) -+ -+c construct valence angle interaction list -+ -+ do langle=1,numang(itmols) -+ -+ iangle=iangle+1 -+ -+ if(iangle.ge.iang1.and.iangle.le.iang2)then -+ -+ jangle=jangle+1 -+ if(jangle.le.mxangl)then -+ -+ listang(jangle,1)=langle+kangle -+ listang(jangle,2)=lstang(langle+kangle,1) -+ x +isite -+ listang(jangle,3)=lstang(langle+kangle,2) -+ x +isite -+ listang(jangle,4)=lstang(langle+kangle,3) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,51) -+ -+c construct dihedral angle interaction list -+ -+ do ldihed=1,numdih(itmols) -+ -+ idihed=idihed+1 -+ -+ if(idihed.ge.idih1.and.idihed.le.idih2)then -+ -+ jdihed=jdihed+1 -+ if(jdihed.le.mxdihd)then -+ -+ listdih(jdihed,1)=ldihed+kdihed -+ listdih(jdihed,2)=lstdih(ldihed+kdihed,1) -+ x +isite -+ listdih(jdihed,3)=lstdih(ldihed+kdihed,2) -+ x +isite -+ listdih(jdihed,4)=lstdih(ldihed+kdihed,3) -+ x +isite -+ listdih(jdihed,5)=lstdih(ldihed+kdihed,4) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,61) -+ -+c construct inversion potential list -+ -+ do linver=1,numinv(itmols) -+ -+ iinver=iinver+1 -+ -+ if(iinver.ge.iinv1.and.iinver.le.iinv2)then -+ -+ jinver=jinver+1 -+ if(jinver.le.mxinv)then -+ -+ listinv(jinver,1)=linver+kinver -+ listinv(jinver,2)=lstinv(linver+kinver,1) -+ x +isite -+ listinv(jinver,3)=lstinv(linver+kinver,2) -+ x +isite -+ listinv(jinver,4)=lstinv(linver+kinver,3) -+ x +isite -+ listinv(jinver,5)=lstinv(linver+kinver,4) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,77) -+ -+c construct tethered atoms interaction list -+ -+ do lteths=1,numteth(itmols) -+ -+ iteths=iteths+1 -+ -+ if(iteths.ge.itet1.and.iteths.le.itet2)then -+ -+ jteths=jteths+1 -+ if(jteths.le.msteth)then -+ -+ listtet(jteths,1)=lteths+kteths -+ listtet(jteths,2)=lsttet(lteths+kteths)+isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,63) -+ -+c construct core-shell list -+ -+ do lshels=1,numshl(itmols) -+ -+ ishels=ishels+1 -+ -+ if(ishels.ge.ishl1.and.ishels.le.ishl2)then -+ -+ jshels=jshels+1 -+ if(jshels.le.mxshl)then -+ -+ listshl(jshels,1)=lshels+kshels -+ listshl(jshels,2)=lstshl(lshels+kshels,1) -+ x +isite -+ listshl(jshels,3)=lstshl(lshels+kshels,2) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,59) -+ -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ kbonds=kbonds+numbonds(itmols) -+ kangle=kangle+numang(itmols) -+ kdihed=kdihed+numdih(itmols) -+ kinver=kinver+numinv(itmols) -+ kteths=kteths+numteth(itmols) -+ kshels=kshels+numshl(itmols) -+ -+ enddo -+ -+c store array counters for bookkeeping -+ -+ ntbond=ibonds -+ ntangl=iangle -+ ntdihd=idihed -+ ntinv=iinver -+ ntteth=iteths -+ ntshl=ishels -+ -+c pass bond constraint information to other nodes -+ -+ if(ntcon0.gt.0)then -+ -+ ntcons=ntcon0 -+ -+c find starting site no. and constraint no. for each molec. type -+ -+ msite(1)=0 -+ mconst(1)=0 -+ -+ do itmols=2,ntpmls -+ -+ msite(itmols)=msite(itmols-1)+numsit(itmols-1)* -+ x nummols(itmols-1) -+ mconst(itmols)=mconst(itmols-1)+numcon(itmols-1) -+ -+ enddo -+ -+c sort molecules into ascending order of number of constraints -+ -+ do i=1,ntpmls -+ -+ itest(i)=numcon(i) -+ index(i)=0 -+ -+ enddo -+ -+ call shellsort(ntpmls,itest) -+ -+ do i=1,ntpmls -+ -+ lchk=.true. -+ do j=1,ntpmls -+ -+ if(itest(i).eq.numcon(j))then -+ -+ if(lchk)then -+ index(i)=j -+ lchk=.false. -+ -+ endif -+ -+ do ii=1,i-1 -+ if(index(ii).eq.j)lchk=.true. -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c load balance to within 10% -+ -+ tol=1.0d0+(0.10d0)/2.d0 -+ kcons=(ntcons)/mxnode -+ ntmp=0 -+ -+c find smallest constrained molecule to allocate to a node -+ -+ do i=1,ntpmls -+ -+ if(ntmp.le.mxnode)then -+ -+ if(numcon(index(i)).gt.0)then -+ ntmp=ntmp+nummols(index(i)) -+ klo=max(0,kcons-numcon(index(i))/2) -+ khi=klo+numcon(index(i))+1 -+ endif -+ -+ endif -+ -+ enddo -+ -+c reset hi/lo limits if molecules contain too many constraints -+ -+ if(dble(khi)/dble(max(1,klo)).gt.tol)then -+ klo=nint(dble(kcons)/tol) -+ khi=nint(dble(kcons)*tol)+1 -+ endif -+ -+c store lo value for later -+ -+ klo0=klo -+ -+c begin assignment of constraints ---------------------------------- -+ -+ ifail=-1 -+ lfail=.true. -+ do while(lfail) -+ -+ ifail=ifail+1 -+ -+ if(ifail.gt.ntpmls)then -+ call error(idnode,432) -+ endif -+ -+ iconst=0 -+ jconst=0 -+ kconst=0 -+ lconst=0 -+ -+c zero running totals of constraints on each processor -+ -+ do id=0,mxnode-1 -+ kscons(id)=0 -+ enddo -+ -+ iloop=0 -+ lfail=.false. -+ iconst=0 -+ jconst=0 -+ nnode=0 -+ -+c assign difficult molecules in blocks -+ -+ if(ifail.gt.0)then -+ -+ nfail=0 -+ do i=1,ifail -+ -+ ii=ntpmls+1-i -+ nfail=nfail+nummols(index(ii))*numcon(index(ii)) -+ -+ enddo -+ -+c decide on number of processors to split over -+ -+ nnode=int(dble(nfail)/dble(max(kcons,1))+1.d0/tol) -+ nnode=max(2,nnode) -+ nnode=min(nnode,mxnode) -+ -+c assign to processors 0..nnode-1 -+ -+ do id=0,nnode-1 -+ -+ nscons0=(id*nfail)/nnode+1 -+ nscons1=((id+1)*nfail)/nnode -+ -+ kscons(id)=nscons1+1-nscons0 -+ -+ enddo -+ -+c this processors block -+ -+ nscons0=(idnode*nfail)/nnode+1 -+ nscons1=((idnode+1)*nfail)/nnode -+ -+c assign in blocks -+ -+ do itmols=ntpmls,ntpmls-ifail+1,-1 -+ -+ ii=index(itmols) -+ icon=numcon(ii) -+ kconst=mconst(ii) -+ -+ do imols=1,nummols(ii) -+ -+ isite=msite(ii)+(imols-1)*numsit(ii) -+ -+c construct bond constraint list -+ -+ do lconst=1,numcon(ii) -+ -+ iconst=iconst+1 -+ -+ if(iconst.ge.nscons0.and.iconst.le.nscons1)then -+ -+ jconst=jconst+1 -+ -+ if(jconst.le.mxcons)then -+ -+ listcon(jconst,1)=lconst+kconst -+ iatom=lstcon(lconst+kconst,1)+isite -+ jatom=lstcon(lconst+kconst,2)+isite -+ -+ listcon(jconst,2)=iatom -+ listcon(jconst,3)=jatom -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c assign non-problematic molecules -+ -+ jdnode=mod(nnode+1,mxnode) -+ -+ do itmols=ntpmls-ifail,1,-1 -+ -+ ii=index(itmols) -+ icon=numcon(ii) -+ kconst=mconst(ii) -+ -+ do imols=1,nummols(ii) -+ -+ itry=0 -+ lchk=.true. -+ do while(lchk) -+ -+ if(kscons(jdnode)+icon.le.klo)then -+ -+ if(jdnode.ne.idnode)then -+ kscons(jdnode)=kscons(jdnode)+icon -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.false. -+ else -+ -+c construct bond constraint list -+ -+ isite=msite(ii)+(imols-1)*numsit(ii) -+ do lconst=1,numcon(ii) -+ -+ jconst=jconst+1 -+ -+ if(jconst.le.mxcons)then -+ -+ listcon(jconst,1)=lconst+kconst -+ iatom=lstcon(lconst+kconst,1)+isite -+ jatom=lstcon(lconst+kconst,2)+isite -+ listcon(jconst,2)=iatom -+ listcon(jconst,3)=jatom -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ kscons(jdnode)=kscons(jdnode)+icon -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.false. -+ -+ endif -+ -+ else -+ -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.true. -+ itry=itry+1 -+ -+ endif -+ -+ if(lchk.and.itry.gt.mxnode)then -+ -+ klo=kcons -+ kcons=khi -+ itry=0 -+ iloop=iloop+1 -+ -+ endif -+ -+c split molecule across nodes if have to -+ -+ if(iloop.gt.3)then -+ lfail=.true. -+ kcons=ntcons/mxnode -+ klo=klo0 -+ lchk=.false. -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c check no node has less than minimum number -+ -+ do id=0,mxnode-1 -+ if(kscons(id).lt.klo0)then -+ lfail=.true. -+ endif -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)then -+ -+ if(mxnode.gt.1)call gimax(jconst,1,idum) -+ if(idnode.eq.0)write(nrite,'(a,i10,a,i10)') -+ x 'Number of constraints found ',jconst,'Max allowed ',mxcons -+ -+ call error(idnode,41) -+ -+ endif -+ -+ nscons=kscons(idnode) -+ -+ call passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+ endif -+ -+ if(npmf(1).gt.0)then -+ -+ call passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+ endif -+ -+c pass rigid body data -+ -+ lcnb=.false. -+ if(ntcons.gt.0.and.ngrp.gt.0)then -+ -+ call passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp, -+ x numgsit) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(itest,index,msite,stat=fail(1)) -+ deallocate(mconst,kscons,listin,stat=fail(2)) -+ -+ return -+ end subroutine intlist -+ -+ subroutine ensemble_selection -+ x (directive,lens,kill,idnode,keyens,mode,taut,taup) -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the ensemble and reading -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical kill,lens -+ integer keyens,idnode,idum,mode -+ real(8) taut,taup -+ -+ if(findstring('nve',directive,idum))then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'microcanonical ensemble')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('nvt',directive,idum))then -+ -+ if(findstring('evans',directive,idum))then -+ -+ keyens=1 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Evans Gaussian temperature constraints', -+ x ' in use')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('ber',directive,idum))then -+ -+ keyens=2 -+ taut=dblstr(directive,69,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen thermostat', -+ x /,1x,'thermostat relaxation time ',1p,e12.4)") -+ x taut -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=3 -+ taut=dblstr(directive,69,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4)") -+ x taut -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ elseif(findstring('npt',directive,idum))then -+ -+ if(findstring('ber',directive,idum))then -+ -+ keyens=4 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen isotropic N-P-T', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=5 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover (Melchionna) isotropic N-P-T ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ elseif(findstring('nst',directive,idum))then -+ -+ mode=0 -+ if(findstring('block',directive,idum))mode=1 -+ if(findstring('surf',directive,idum))mode=2 -+ if(findstring('slab',directive,idum))mode=3 -+ -+ if(findstring('ber',directive,idum))then -+ -+ keyens=6 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen anisotropic N-P-T', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=7 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover (Melchionna) anisotropic N-P-T ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ if(mode.eq.0)then -+ write(nrite,"(/,1x,'NST mode 0 X<>Y<>Z')") -+ elseif(mode.eq.1)then -+ write(nrite, -+ x "(/,1x,'NST mode 1 X<>Y<>Z (rectangular block)')") -+ elseif(mode.eq.2)then -+ write(nrite, -+ x "(/,1x,'NST mode 2 X=Y<>Z (liquid surface)')") -+ elseif(mode.eq.3)then -+ write(nrite, -+ x "(/,1x,'NST mode 3 X<>Y<>Z (solid slab)')") -+ endif -+ -+ endif -+ -+ elseif(findstring('pmf',directive,idum))then -+ -+ keyens=8 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'potential of mean force calculation (NVE)')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ call error(idnode,-436) -+ kill=.true. -+ -+ endif -+ -+ return -+ end subroutine ensemble_selection -+ -+ subroutine neb_option -+ x (directive,lneb,lminopt,idnode,numneb,keytol,sprneb, -+ x opttol,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for NEB option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit -+ character*1 directive(lenrec) -+ logical lneb,lminopt,endneb,safe -+ integer numneb,idnode,keytol,i,idum -+ real(8) sprneb,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ lminopt=.true. -+ lneb=.true. -+ endneb=.false. -+ numneb=intstr(directive,lenrec,idum) -+ if(numneb.eq.0)numneb=1 -+ numneb=min(maxneb,numneb) -+ -+ hyp_units=1.d0 -+ do while(.not.endneb) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endneb',directive,idum))then -+ endneb=.true. -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('basin_1',directive,idum))then -+ call striptext(directive,lenrec,1) -+ do i=1,numneb -+ bsn_1(i)=intstr(directive,lenrec,idum) -+ enddo -+ elseif(findstring('basin_2',directive,idum))then -+ call striptext(directive,lenrec,1) -+ do i=1,numneb -+ bsn_2(i)=intstr(directive,lenrec,idum) -+ enddo -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,1x,'NEB calculation controls')") -+ write(nrite,"(/,1x,'identity of basin 1 ', -+ x 10i10)")(bsn_1(i),i=1,numneb) -+ write(nrite,"(1x,'identity of basin 2 ', -+ x 10i10)")(bsn_2(i),i=1,numneb) -+ write(nrite, -+ x "(1x,'NEB spring constant ',e12.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'energy units ',2x,a8)") -+ x sprneb,opttol,cunit -+ -+ call print_optim(keytol) -+ -+ endif -+ -+c units conversion -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ return -+ end subroutine neb_option -+ -+ subroutine bpd_option -+ x (directive,seek,lbpd,ltad,lminopt,prechk,nebgo,keybpd,idnode, -+ x nblock,ntrack,keytol,ebias,vmin,catchrad,sprneb,opttol, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for bias potential -+c dynamics option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit,seek -+ character*1 directive(lenrec) -+ logical lbpd,ltad,lminopt,prechk,endbpd,safe,nebgo -+ integer keybpd,idnode,nblock,ntrack,keytol,idum -+ real(8) ebias,vmin,catchrad,sprneb,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ if(ltad)call error(idnode,2355) -+ lminopt=.true. -+ lbpd=.true. -+ endbpd=.false. -+ cunit=" dl_poly" -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'bias potential dynamics controls')") -+ -+ if(findstring('dyn',directive,idum))then -+ -+ keybpd=1 -+ hyp_units=energy_unit() -+ ebias=dblstr(directive,lenrec,idum) -+ vmin=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ if(idnode.eq.0)write(nrite,"( -+ x 1x,'dynamics option selected ', -+ x /,1x,'bias potential E_bias (kelvin)',f10.4, -+ x /,1x,'bias potential V_min (kelvin)',f10.4 -+ x /,1x,'energy units ',2x,a8)") -+ x ebias,vmin,cunit -+ -+ elseif(findstring('path',directive,idum))then -+ -+ keybpd=2 -+ nebgo=.true. -+ hyp_units=1.d0 -+ do while(.not.endbpd) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endbpd',directive,idum))then -+ endbpd=.true. -+ elseif(findstring('pre',directive,idum))then -+ prechk=.true. -+ if(findstring('false',directive,idum))prechk=.false. -+ elseif(findstring('noneb',directive,idum))then -+ nebgo=.false. -+ elseif(findstring('target',directive,idum))then -+ call getword(seek,directive,8,lenrec) -+ call getword(seek,directive,8,lenrec) -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('ebias',directive,idum))then -+ ebias=dblstr(directive,lenrec,idum) -+ elseif(findstring('vmin',directive,idum))then -+ vmin=dblstr(directive,lenrec,idum) -+ elseif(findstring('num_block',directive,idum))then -+ nblock=intstr(directive,lenrec,idum) -+ elseif(findstring('num_track',directive,idum))then -+ ntrack=intstr(directive,lenrec,idum) -+ elseif(findstring('catch_radius',directive,idum))then -+ catchrad=dblstr(directive,lenrec,idum) -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"( -+ x 1x,'dynamics with path analysis selected', -+ x /,1x,'bias potential E_bias (kelvin)',f10.4, -+ x /,1x,'bias potential V_min (kelvin)',f10.4, -+ x /,1x,'steps per time block ',i10, -+ x /,1x,'steps per tracking block ',i10, -+ x /,1x,'configuration catch radius (A)',f10.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'atom type to be tracked ',2x,a8, -+ x /,1x,'energy units ',2x,a8)") -+ x ebias,vmin,nblock,ntrack,catchrad,opttol,seek,cunit -+ if(nebgo)write(nrite, -+ x "(1x,'NEB spring constant ',e12.4)")sprneb -+ if(prechk)write(nrite, -+ x "(1x,'transition prechecking option selected')") -+ call print_optim(keytol) -+ -+ endif -+ -+c energy unit conversions -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ endif -+ -+ return -+ end subroutine bpd_option -+ -+ subroutine tad_option -+ x (directive,ltad,lbpd,lminopt,prechk,tadall,idnode,nblock, -+ x ntrack,blkout,keytol,catchrad,sprneb,tlow,deltad,opttol, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for TAD option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit -+ character*1 directive(lenrec) -+ logical ltad,lbpd,lminopt,prechk,tadall,endtad,safe -+ integer idnode,nblock,ntrack,blkout,keytol,idum -+ real(8) catchrad,sprneb,deltad,tlow,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ if(lbpd)call error(idnode,2355) -+ lminopt=.true. -+ ltad=.true. -+ endtad=.false. -+ hyp_units=1.d0 -+ -+ do while(.not.endtad) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endtad',directive,idum))then -+ endtad=.true. -+ elseif(findstring('pre',directive,idum))then -+ prechk=.true. -+ if(findstring('false',directive,idum))prechk=.false. -+ elseif(findstring('all',directive,idum))then -+ tadall=.true. -+ if(findstring('false',directive,idum))tadall=.false. -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('num_block',directive,idum))then -+ nblock=intstr(directive,lenrec,idum) -+ elseif(findstring('num_track',directive,idum))then -+ ntrack=intstr(directive,lenrec,idum) -+ elseif(findstring('blackout',directive,idum))then -+ blkout=intstr(directive,lenrec,idum) -+ elseif(findstring('catch_radius',directive,idum))then -+ catchrad=dblstr(directive,lenrec,idum) -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('deltad',directive,idum))then -+ deltad=dblstr(directive,lenrec,idum) -+ elseif(findstring('low_temp',directive,idum))then -+ tlow=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'TAD dynamics controls' -+ x /,1x,'steps per time block ',i10, -+ x /,1x,'steps per tracking block ',i10, -+ x /,1x,'steps in blackout periods ',i10, -+ x /,1x,'configuration catch radius ',1p,e12.4, -+ x /,1x,'NEB spring constant ',e12.4, -+ x /,1x,'stopping parameter ',e12.4, -+ x /,1x,'target low temperature ',e12.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'energy units ',2x,a8)") -+ x nblock,ntrack,blkout,catchrad,sprneb,deltad, -+ x tlow,opttol,cunit -+ if(prechk)write(nrite, -+ x "(1x,'transition prechecking option selected')") -+ if(tadall)write(nrite, -+ x "(1x,'option for all basins analysis selected')") -+ call print_optim(keytol) -+ -+ endif -+ -+c energy unit conversions -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ return -+ end subroutine tad_option -+ -+ subroutine metadyn_option -+ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, -+ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, -+ x locpe_scale,ref_W_aug,h_aug,wt_Dt) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for metadynamics option -+c copyright - daresbury laboratory -+c author - w. smith jan 2011 -+c -+c note: default values are set in metafreeze_module -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lmetadyn,endmet,lstein,ltet,lglobpe,llocpe,safe -+ integer idnode,idum,ncolvar,nq4,nq6,ntet,hkey,meta_step_int -+ real(8) globpe_scale,locpe_scale,ref_W_aug,h_aug,wt_Dt -+ -+ lmetadyn=.true. -+ endmet=.false. -+ -+ do while(.not.endmet) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endmet',directive,idum))then -+ endmet=.true. -+ elseif(findstring('ncolvar',directive,idum))then -+ ncolvar=intstr(directive,lenrec,idum) -+ elseif(findstring('lstein',directive,idum))then -+ lstein=.true. -+ if(findstring('false',directive,idum))lstein=.false. -+ elseif(findstring('ltet',directive,idum))then -+ ltet=.true. -+ if(findstring('false',directive,idum))ltet=.false. -+ elseif(findstring('lglobpe',directive,idum))then -+ lglobpe=.true. -+ if(findstring('false',directive,idum))lglobpe=.false. -+ elseif(findstring('llocpe',directive,idum))then -+ llocpe=.true. -+ if(findstring('false',directive,idum))llocpe=.false. -+ elseif(findstring('globpe_scale',directive,idum))then -+ globpe_scale=dblstr(directive,lenrec,idum) -+ elseif(findstring('locpe_scale',directive,idum))then -+ locpe_scale=dblstr(directive,lenrec,idum) -+ elseif(findstring('nq4',directive,idum))then -+ nq4=intstr(directive,lenrec,idum) -+ nq4=intstr(directive,lenrec,idum) ! do twice - number in name! -+ elseif(findstring('nq6',directive,idum))then -+ nq6=intstr(directive,lenrec,idum) -+ nq6=intstr(directive,lenrec,idum) ! do twice - number in name! -+ elseif(findstring('ntet',directive,idum))then -+ ntet=intstr(directive,lenrec,idum) -+ elseif(findstring('meta_step_int',directive,idum))then -+ meta_step_int=intstr(directive,lenrec,idum) -+ elseif(findstring('ref_w_aug',directive,idum))then -+ ref_W_aug=dblstr(directive,lenrec,idum) -+ elseif(findstring('h_aug',directive,idum))then -+ h_aug=dblstr(directive,lenrec,idum) -+ elseif(findstring('hkey',directive,idum))then -+ hkey=intstr(directive,lenrec,idum) -+ elseif(findstring('wt_dt',directive,idum))then -+ wt_dt=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'metadynamics controls' -+ x /,1x,'total number of collective variables',i10, -+ x /,1x,'steinhardt parameters option (Q4/Q6)',l10, -+ x /,1x,'tetrahedral parameters option (zeta)',l10, -+ x /,1x,'global potential parameter option ',l10, -+ x /,1x,'local potential parameter option ',l10, -+ x /,1x,'global potential param. scale factor',e12.4, -+ x /,1x,'local potential param. scale factor ',e12.4)") -+ x ncolvar,lstein,ltet,lglobpe,llocpe,globpe_scale,locpe_scale -+ -+ write(nrite, -+ x "( 1x,'number of Q4 atom pair types ',i10, -+ x /,1x,'number of Q6 atom pair types ',i10, -+ x /,1x,'number of zeta atom triplet types ',i10)") -+ x nq4,nq6,ntet -+ -+ write(nrite, -+ x "( 1x,'gaussian deposition interval ',i10, -+ x /,1x,'reference gaussian height ',e12.4, -+ x /,1x,'gaussian width parameter ',e12.4, -+ x /,1x,'height control key ',i10, -+ x /,1x,'well-tempered control parameter ',e12.4)") -+ x meta_step_int,ref_W_aug,h_aug,hkey,wt_Dt -+ -+ endif -+ -+ return -+ end subroutine metadyn_option -+ -+ subroutine ewald_selection -+ x (directive,lhke,lspme,lewald,lcut,lforc,kill,idnode,keyfce, -+ x imcon,nhko,nlatt,kmax1,kmax2,kmax3,alpha,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the ewald method and reading -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lhke,lspme,lewald,lcut,lforc,kill,safe -+ integer idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2,kmax3,idum -+ integer kmaxpow2 -+ real(8) alpha,rcut,eps,tol,fac,tol1 -+ -+ lhke=findstring('hke',directive,idum) -+ lspme=findstring('spme',directive,idum) -+ lewald=findstring('ewald',directive,idum) -+ if(lewald)keyfce=2 -+ if(lspme)keyfce=12 -+ if(lhke)keyfce=14 -+ if(idnode.eq.0)open(nconf,file='CONFIG') -+ call getrec(safe,idnode,nconf) -+ call getrec(safe,idnode,nconf) -+ imcon=intstr(record,lenrec,idum) -+ imcon=intstr(record,lenrec,idum) -+ if(.not.lhke.and.(imcon.eq.0.or.imcon.eq.6))then -+ -+ call error(idnode,-180) -+ kill=.true. -+ -+ endif -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Ewald sum precision ',7x,1p,e12.4)")eps -+ -+ if(lhke)then -+ -+ nhko=min(intstr(directive,lenrec,idum),3) -+ nlatt=min(intstr(directive,lenrec,idum),2) -+ if(nlatt.eq.0)nlatt=1 -+ if(nhko.eq.0)nhko=1 -+ -+ endif -+ -+ if(.not.lcut)then -+ call error(idnode,-433) -+ kill=.true. -+ else -+ -+c retreive cell vectors -+ -+ call getrec(safe,idnode,nconf) -+ cell(1)=dblstr(record,lenrec,idum) -+ cell(2)=dblstr(record,lenrec,idum) -+ cell(3)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ cell(4)=dblstr(record,lenrec,idum) -+ cell(5)=dblstr(record,lenrec,idum) -+ cell(6)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ cell(7)=dblstr(record,lenrec,idum) -+ cell(8)=dblstr(record,lenrec,idum) -+ cell(9)=dblstr(record,lenrec,idum) -+ -+c compute alpha and the kmax -+ -+ if(lewald.or.lspme)then -+ -+ call dcell(cell,celprp) -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) -+ fac=1.d0 -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x fac=2.d0**(1.d0/3.d0) -+ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) -+ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) -+ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) -+ -+ elseif(lhke)then -+ -+ if(nhko.eq.0)then -+ if(eps.le.1.d-6)then -+ alpha=3.46d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=3.14d0/rcut -+ else -+ alpha=2.76d0/rcut -+ endif -+ elseif(nhko.eq.1)then -+ if(eps.le.1.d-6)then -+ alpha=4.37d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.08d0/rcut -+ else -+ alpha=3.75d0/rcut -+ endif -+ elseif(nhko.eq.2)then -+ if(eps.le.1.d-6)then -+ alpha=5.01d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.74d0/rcut -+ else -+ alpha=4.44d0/rcut -+ endif -+ elseif(nhko.eq.3)then -+ if(eps.le.1.d-6)then -+ alpha=5.55d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=5.28d0/rcut -+ else -+ alpha=5.00d0/rcut -+ endif -+ endif -+ alpha=alpha/dble(2*nlatt+1) -+ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 -+ call dcell(cell,celprp) -+ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) -+ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) -+ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) -+ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) -+ kmax3=1 -+ -+ endif -+ -+ endif -+ -+ else -+ -+ alpha=dblstr(directive,lenrec,idum) -+ kmax1=intstr(directive,lenrec,idum) -+ kmax2=intstr(directive,lenrec,idum) -+ -+ if(lhke)then -+ -+ kmax3=1 -+ nhko=min(intstr(directive,lenrec,idum),3) -+ nlatt=min(intstr(directive,lenrec,idum),2) -+ -+ else -+ -+ kmax3=intstr(directive,lenrec,idum) -+ -+ endif -+ -+ endif -+ -+c if spme double kmax and set to next power of 2, with current upper -+c limit of 512. -+ -+ if(lspme)then -+ -+ kmaxpow2=1 -+ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax1=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax2=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax3=2 * kmaxpow2 -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ close(nconf) -+ -+ if(lspme)then -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : SPME ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") -+ x alpha,kmax1/2,kmax2/2,kmax3/2 -+ -+ elseif(lhke)then -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : Hautman-Klein-Ewald sum ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 ',2i5)") -+ x alpha,kmax1,kmax2 -+ -+ write(nrite, -+ x "(1x,'HKE expansion order ',7x,i10, -+ x /,1x,'HKE lattice control ',7x,i10)")nhko,nlatt -+ -+ else -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : Ewald sum ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") -+ x alpha,kmax1,kmax2,kmax3 -+ -+ endif -+ -+ endif -+ -+ if(lspme)then -+ -+c Initialize fft tables -+ -+CFFTW call fftw3d_f77_create_plan -+CFFTW x (fplan,kmaxd,kmaxe,kmaxf, -+CFFTW x FFTW_FORWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) -+CFFTW -+CFFTW call fftw3d_f77_create_plan -+CFFTW x (bplan,kmaxd,kmaxe,kmaxf, -+CFFTW x FFTW_BACKWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) -+ -+CSGIC call zzfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, -+CSGIC x dummy,1,1,ffttable,dummy,dummy ) -+ -+CCRAY call ccfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, -+CCRAY x dummy,1,1,ffttable,dummy,dummy ) -+ -+ endif -+ -+ if(lspme)then -+ -+ if(kmax1.gt.kmaxd.or.kmax2.gt.kmaxe.or.kmax3.gt.kmaxf)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ elseif(lhke)then -+ -+ if(kmax2.gt.kmaxb)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ else -+ -+ if(kmax2.gt.kmaxb.or.kmax3.gt.kmaxc)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ lforc=.true. -+ -+ return -+ end subroutine ewald_selection -+ -+ subroutine print_optim(keytol) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for printing the optimisation option -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer keytol -+ -+ if(keytol.eq.0)then -+ write(nrite, -+ x "(1x,'convergence to minimum force selected')") -+ elseif(keytol.eq.1)then -+ write(nrite, -+ x "(1x,'convergence to minimum energy selected')") -+ else -+ write(nrite, -+ x "(1x,'convergence to minimum position selected')") -+ endif -+ -+ return -+ end subroutine print_optim -+ -+ function energy_unit() -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for assigning energy conversion factors -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idum -+ real(8) energy_unit -+ -+ energy_unit=1.d0 -+ if(findstring('ev',record,idum))then -+ energy_unit=9648.530821d0 -+ elseif(findstring('kev',record,idum))then -+ energy_unit=9648530.821d0 -+ elseif(findstring('kcal',record,idum))then -+ energy_unit=418.4d0 -+ elseif(findstring('kj',record,idum))then -+ energy_unit=1.d2 -+ elseif(findstring('k',record,idum))then -+ energy_unit=boltz -+ endif -+ -+ return -+ end function energy_unit -+ -+ subroutine solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for solvation option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,endsol,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ endsol=.false. -+ -+ nsolva=intstr(directive,lenrec,idum) -+ isolva=intstr(directive,lenrec,idum) -+ -+ if(nsolva.eq.0.and.isolva.eq.0)then -+ -+ do while(.not.endsol) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endsol',directive,idum))then -+ endsol=.true. -+ elseif(findstring('enddec',directive,idum))then -+ endsol=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=max(intstr(directive,lenrec,idum),1) -+ endif -+ -+ enddo -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'solvation calculation selected', -+ x /,1x,'start of solvation calculation ',i10, -+ x /,1x,'solvation calculation interval ',i10)") -+ x nsolva,isolva -+ -+ endif -+ -+ return -+ end subroutine solvation_option -+ -+ subroutine free_energy_option(directive,lfree,lfrmas,idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for free energy option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lfree,lfrmas,endfre,safe -+ integer idnode,idum -+ -+ mfree=1 -+ kfree=1 -+ lfree=.true. -+ lfrmas=.false. -+ endfre=.false. -+ -+ do while(.not.endfre) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endfre',directive,idum))then -+ endfre=.true. -+ elseif(findstring('start',directive,idum))then -+ nfrn=intstr(directive,lenrec,idum) -+ elseif(findstring('interval',directive,idum))then -+ ifrn=intstr(directive,lenrec,idum) -+ elseif(findstring('lambda',directive,idum))then -+ pfree=dblstr(directive,lenrec,idum) -+ elseif(findstring('mix',directive,idum))then -+ mfree=intstr(directive,lenrec,idum) -+ elseif(findstring('expo',directive,idum))then -+ kfree=intstr(directive,lenrec,idum) -+ elseif(findstring('reset_mass',directive,idum))then -+ lfrmas=.true. -+ if(findstring('false',directive,idum))lfrmas=.false. -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(mfree.eq.1)kfree=1 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'free energy option selected', -+ x /,1x,'start of free energy calculation ',i10, -+ x /,1x,'sampling interval ',i10, -+ x /,1x,'free energy parameter (lambda) ',f10.3, -+ x /,1x,'mixing rule selected ',i10, -+ x /,1x,'mixing rule exponent ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10, -+ x /,1x,'mass scaling option ',l10)") -+ x nfrn,ifrn,pfree,mfree,kfree,ind_fre,lfrmas -+ -+ endif -+ -+c define free energy scaling parameters -+ -+ call freegen() -+ -+ return -+ end subroutine free_energy_option -+ -+ subroutine excitation_option -+ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for excitation option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,lexcite,lghost,endexc,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ lghost=.true. -+ lexcite=.true. -+ endexc=.false. -+ -+ do while(.not.endexc) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endexc',directive,idum))then -+ endexc=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=intstr(directive,lenrec,idum) -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'excitation option selected', -+ x /,1x,'energy decomposition start ',i10, -+ x /,1x,'energy decomposition interval ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10)") -+ x nsolva,isolva,ind_fre -+ -+ endif -+ -+ return -+ end subroutine excitation_option -+ -+ subroutine switching_option -+ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for switching option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,lswitch,lghost,endswi,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ lghost=.true. -+ lswitch=.true. -+ endswi=.false. -+ niswitch=0 -+ -+ do while(.not.endswi) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endswi',directive,idum))then -+ endswi=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=intstr(directive,lenrec,idum) -+ elseif(findstring('period',directive,idum))then -+ niswitch=max(intstr(directive,lenrec,idum),2) -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(niswitch.eq.0)niswitch=nsolva -+ nswitch=nsolva -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'switching option selected', -+ x /,1x,'energy decomposition start ',i10, -+ x /,1x,'energy decomposition interval ',i10, -+ x /,1x,'switching period ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10)") -+ x nsolva,isolva,niswitch,ind_fre -+ -+ endif -+ -+ return -+ end subroutine switching_option -+ -+ end module define_system_module -+ -diff -urN dl_class_1.9.orig/srcmod/dihedral_module.f dl_class_1.9/srcmod/dihedral_module.f ---- dl_class_1.9.orig/srcmod/dihedral_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/dihedral_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1121 @@ -+ module dihedral_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining dihedral potential arrays -+c copyright - daresbury laboratory -+c -+c author - w. smith sep 2003 -+c adapted - p.-a. cazade oct 2007 : solvation, free energy, etc. -+c adapted - w.smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmdih(:,:) -+ integer, allocatable :: listdih(:,:) -+ integer, allocatable :: numdih(:),keydih(:),lstdih(:,:) -+ -+ save prmdih,listdih,numdih,keydih,lstdih -+ -+ contains -+ -+ subroutine alloc_dih_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(5) -+ -+ do i=1,5 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmdih(mxtdih,mxpdih),stat=fail(1)) -+ allocate (numdih(mxtmls),stat=fail(2)) -+ allocate (keydih(mxtdih),stat=fail(3)) -+ allocate (lstdih(mxtdih,4),stat=fail(4)) -+ allocate (listdih(mxdihd,5),stat=fail(5)) -+ -+ do i=1,5 -+ if(fail(i).gt.0)call error(idnode,1011) -+ enddo -+ -+ do i=1,mxtmls -+ numdih(i)=0 -+ enddo -+ -+ end subroutine alloc_dih_arrays -+ -+ subroutine define_dihedrals -+ x (safe,idnode,itmols,ndihed,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining dihedral angles -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,itmols,ndihed,nsite,ntmp,idih,idih1,i -+ integer iatm1,iatm2,iatm3,iatm4,idum,isite1,isite2,isite3 -+ integer isite4,ia,ja -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numdih(itmols)=numdih(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of dihedral angles', -+ x 6x,i10)")ntmp -+ write(nrite,"(/,/,1x,'dihedral angle details:', -+ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, -+ x 'index',5x,'index',5x,'f-const',7x,'angle', -+ x 8x,'trig',4x,'1-4 elec',5x,'1-4 vdw',/)") -+ endif -+ -+ idih1=numdih(itmols) -+ do idih=1,idih1 -+ -+c read dihedral bond angle potential parameters -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ iatm3=intstr(record,lenrec,idum) -+ iatm4=intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ isite3=nsite-numsit(itmols)+iatm3 -+ isite4=nsite-numsit(itmols)+iatm4 -+ -+ if(lfzsit(isite1)*lfzsit(isite2)* -+ x lfzsit(isite3)*lfzsit(isite4).ne.0)then -+ -+ numdih(itmols)=numdih(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ ndihed=ndihed+1 -+ -+ if(ndihed.gt.mxtdih)call error(idnode,60) -+ -+ if(keyword(1:4).eq.'cos ')then -+ keydih(ndihed)=1 -+ elseif(keyword(1:4).eq.'harm')then -+ keydih(ndihed)=2 -+ elseif(keyword(1:4).eq.'hcos')then -+ keydih(ndihed)=3 -+ elseif(keyword(1:4).eq.'cos3')then -+ keydih(ndihed)=4 -+ elseif(keyword(1:4).eq.'ryck')then -+ keydih(ndihed)=5 -+ elseif(keyword(1:4).eq.'rbf')then -+ keydih(ndihed)=6 -+ elseif(keyword(1:4).eq.'opls')then -+ keydih(ndihed)=7 -+ else -+ if(idnode.eq.0)write(nrite,*)message -+ call error(idnode,448) -+ endif -+ -+ lstdih(ndihed,1)=iatm1 -+ lstdih(ndihed,2)=iatm2 -+ lstdih(ndihed,3)=iatm3 -+ lstdih(ndihed,4)=iatm4 -+ prmdih(ndihed,1)=dblstr(record,lenrec,idum) -+ prmdih(ndihed,2)=dblstr(record,lenrec,idum) -+ prmdih(ndihed,3)=dblstr(record,lenrec,idum) -+ prmdih(ndihed,4)=dblstr(record,lenrec,idum) -+ prmdih(ndihed,5)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,4i10,1p,e12.4,0p,9f12.6)") -+ x keyword(1:4),(lstdih(ndihed,ia),ia=1,4), -+ x (prmdih(ndihed,ja),ja=1,mxpdih) -+ -+c convert energies to internal units and angles to radians -+ -+ prmdih(ndihed,1)=prmdih(ndihed,1)*engunit -+ -+ if(keydih(ndihed).eq.4)then -+ -+ prmdih(ndihed,2)=prmdih(ndihed,2)*engunit -+ prmdih(ndihed,3)=prmdih(ndihed,3)*engunit -+ -+ elseif(keydih(ndihed).eq.7)then -+ -+ prmdih(ndihed,2)=prmdih(ndihed,2)*engunit -+ prmdih(ndihed,3)=prmdih(ndihed,3)*engunit -+ prmdih(ndihed,4)=prmdih(ndihed,4)*engunit -+ prmdih(ndihed,5)=prmdih(ndihed,5)*(pi/180.d0) -+ -+ else -+ -+ prmdih(ndihed,2)=prmdih(ndihed,2)*(pi/180.d0) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_dihedrals -+ -+ subroutine dihfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntdihd,keyfce, -+ x dlrpot,epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe, -+ x virdih,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating dihedral energy and force -+c terms in molecular dynamics. -+c -+c version 3: scale factors for reduces electrostatic and vdw -+c 1-4 interactions. -+c -+c NOTE: assumes 1-4 interactions are in the exclude list -+c -+c block as opposed to stride version -+c -+c copyright - daresbury laboratory -+c author - w. smith mar 1992 -+c modified - t. forester dec 1993 -+c modified - t. forester jun 1995 - stress tensor added -+c modified - a. smondyrev may 2000 - ryckaert-bellemans potentials -+c modified - p.-a. cazade oct 2007 - solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect -+ logical idrive,jdrive,kdrive,ldrive -+ integer i,k,ii,kk,ntdihd,idnode,mxnode,idih1,idih2,ia,ib -+ integer ic,id,imcon,ka,kb,l,keyfce,fail1,fail2,fail3,kkk -+ real(8) phi,twopi,rtwopi,dterm,srpot -+ real(8) engdih,virdih,engc14,engs14,virs14,rrbc,xab,yab,erc,fer -+ real(8) zab,xbc,ybc,zbc,xcd,ycd,zcd,pbx,pby,pbz,pb2,rpb1,rpb2 -+ real(8) pcx,pcy,pcz,pc2,rpc1,rpc2,pbpc,cosp,sinp,rsinp,exp1 -+ real(8) gamma,fax,fay,faz,fcx,fcy,fcz,fb1x,fb1y,fb1z,fd1x,fd1y -+ real(8) fd1z,scale,xad,yad,zad,rad,chgprd,coul,fcoul,fx,fy,fz -+ real(8) ppp,dlrpot,t1,t2,vk0,vk1,vk2,gk0,gk1,gk2,epsq,engcpe -+ real(8) vircpe,rcut,rvdw,engsrp,virsrp,xac,yac,zac,vcon,fcon -+ real(8) virc14,b0,rfld0,rfld1,rfld2,alpha,a1,a2,a3,a4,a5,pp,tt -+ real(8) cou14_vir,vdw14_vir,strs(6),strs_loc(6) -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ real(8), allocatable :: xdbc(:),ydbc(:),zdbc(:) -+ real(8), allocatable :: xdcd(:),ydcd(:),zdcd(:) -+ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ -+ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ -+ data fail1,fail2,fail3/0,0,0/ -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) -+ allocate (xdbc(msbad),ydbc(msbad),zdbc(msbad),stat=fail2) -+ allocate (xdcd(msbad),ydcd(msbad),zdcd(msbad),stat=fail3) -+ if(fail1.ne.0.or.fail2.ne.0.or.fail3.ne.0) -+ x call error(idnode,1060) -+ -+ twopi=2.d0*pi -+ rtwopi=1.d0/twopi -+ safe=.true. -+ -+c check size of work arrays -+ -+ if((ntdihd-mxnode+1)/mxnode.gt.msbad) call error(idnode,421) -+ -+c block indices -+ -+ idih1=(idnode*ntdihd)/mxnode+1 -+ idih2=((idnode+1)*ntdihd)/mxnode -+ -+c initialise accumulators -+ -+ engdih=0.d0 -+ virdih=0.d0 -+ dih_fre=0.d0 -+ dih_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(3)=.true. -+ dih_sol(:)=0.d0 -+ if(lexcite)dih_exc(:)=0.d0 -+ -+ endif -+ -+ if(keyfce/2.eq.4)then -+ -+c constant terms for shifted coulombic potential -+ -+ tt=1.d0/(1.d0+pp*alpha*rcut) -+ exp1=exp(-(alpha*rcut)**2) -+ vcon=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut -+ fcon=(vcon+2.d0*(alpha/sqrpi)*exp1)/rcut -+ -+ elseif(keyfce/2.eq.5)then -+ -+c constant terms for reaction field potential -+ -+ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) -+ rfld0=b0/rcut**3 -+ rfld1=(1.d0+b0*0.5d0)/rcut -+ rfld2=rfld0*0.5d0 -+ tt=1.d0/(1.d0+pp*alpha*rcut) -+ exp1=exp(-(alpha*rcut)**2) -+ vcon=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut -+ fcon=(vcon+2.d0*(alpha/sqrpi)*exp1)/rcut-rfld0*rcut -+ vcon=vcon+rfld2*rcut**2-rfld1 -+ -+ endif -+ -+c calculate bond vectors -+ -+ ii=0 -+ do i=idih1,idih2 -+ -+ ii=ii+1 -+ -+c indices of bonded atoms -+ -+ ia=listdih(ii,2) -+ ib=listdih(ii,3) -+ ic=listdih(ii,4) -+ id=listdih(ii,5) -+ -+c define components of bond vectors -+ -+ xdab(ii)=xxx(ia)-xxx(ib) -+ ydab(ii)=yyy(ia)-yyy(ib) -+ zdab(ii)=zzz(ia)-zzz(ib) -+ -+ xdbc(ii)=xxx(ib)-xxx(ic) -+ ydbc(ii)=yyy(ib)-yyy(ic) -+ zdbc(ii)=zzz(ib)-zzz(ic) -+ -+ xdcd(ii)=xxx(ic)-xxx(id) -+ ydcd(ii)=yyy(ic)-yyy(id) -+ zdcd(ii)=zzz(ic)-zzz(id) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ call images(imcon,0,1,ii,cell,xdbc,ydbc,zdbc) -+ call images(imcon,0,1,ii,cell,xdcd,ydcd,zdcd) -+ -+c zero dihedral energy accumulator -+ -+ engdih=0.d0 -+ virdih=0.d0 -+ -+c zero scaled 1-4 electrostatic and short range potential accumulators -+ -+ engc14=0.d0 -+ virc14=0.d0 -+ engs14=0.d0 -+ virs14=0.d0 -+ vdw14_vir=0.d0 -+ cou14_vir=0.d0 -+ -+c loop over all specified dihedrals -+ -+ ii=0 -+ do i=idih1,idih2 -+ -+c define components of bond vectors -+ -+ ii=ii+1 -+ -+ xab=xdab(ii) -+ yab=ydab(ii) -+ zab=zdab(ii) -+ -+ xbc=xdbc(ii) -+ ybc=ydbc(ii) -+ zbc=zdbc(ii) -+ rrbc=1.d0/sqrt(xbc*xbc+ybc*ybc+zbc*zbc) -+ -+ xcd=xdcd(ii) -+ ycd=ydcd(ii) -+ zcd=zdcd(ii) -+ -+ xac=xab+xbc -+ yac=yab+ybc -+ zac=zab+zbc -+ -+c construct first dihedral vector -+ -+ pbx=yab*zbc-zab*ybc -+ pby=zab*xbc-xab*zbc -+ pbz=xab*ybc-yab*xbc -+ pb2=pbx*pbx+pby*pby+pbz*pbz -+ rpb1=1.d0/sqrt(pb2) -+ rpb2=rpb1*rpb1 -+ -+c construct second dihedral vector -+ -+ pcx=ybc*zcd-zbc*ycd -+ pcy=zbc*xcd-xbc*zcd -+ pcz=xbc*ycd-ybc*xcd -+ pc2=pcx*pcx+pcy*pcy+pcz*pcz -+ rpc1=1.d0/sqrt(pc2) -+ rpc2=rpc1*rpc1 -+ -+c determine dihedral angle -+ -+ pbpc=pbx*pcx+pby*pcy+pbz*pcz -+ cosp=pbpc*rpb1*rpc1 -+ sinp=(xbc*(pcy*pbz-pcz*pby)+ybc*(pbx*pcz-pbz*pcx)+ -+ x zbc*(pcx*pby-pcy*pbx))*(rpb1*rpc1*rrbc) -+ -+ phi=atan2(sinp,cosp) -+ -+c avoid singularity in sinp -+ -+ sinp=sign(max(1.d-8,abs(sinp)),sinp) -+ rsinp=1.d0/sinp -+ -+c selection of potential energy function type -+ -+ kk=listdih(ii,1) -+ -+c calculate potential energy and scalar force term -+ -+ if(keydih(kk).eq.1)then -+ -+c key=1 for torsion dihedral potential -+ -+ dterm=prmdih(kk,1)*(1.d0+cos(prmdih(kk,3)*phi- -+ x prmdih(kk,2))) -+ gamma=-rpb1*rpc1*rsinp*prmdih(kk,1)*prmdih(kk,3)* -+ x sin(prmdih(kk,3)*phi-prmdih(kk,2)) -+ -+ else if(keydih(kk).eq.2)then -+ -+c key=2 for harmonic improper dihedral -+ -+ phi=phi-prmdih(kk,2) -+ phi=phi-nint(phi*rtwopi)*twopi -+ dterm=0.5d0*prmdih(kk,1)*(phi*phi) -+ gamma=rpb1*rpc1*rsinp*prmdih(kk,1)*phi -+ -+ else if(keydih(kk).eq.3)then -+ -+c key=3 for harmonic cosine dihedral -+ -+ dterm=0.5d0*prmdih(kk,1)*(cos(phi)- -+ x cos(prmdih(kk,2)))**2 -+ gamma=-rpb1*rpc1*prmdih(kk,1)*(cos(phi)-cos(prmdih(kk,2))) -+ -+ else if(keydih(kk).eq.4)then -+ -+c key=4 for 3-term cosine dihedral -+ -+ dterm=0.5d0*(prmdih(kk,1)*(1.d0+cos(phi))+ -+ x prmdih(kk,2)*(1.d0-cos(2.d0*phi))+prmdih(kk,3)* -+ x (1.d0+cos(3.d0*phi))) -+ gamma=-rpb1*rpc1*rsinp*0.5d0*(prmdih(kk,1)*sin(phi)- -+ x 2.d0*prmdih(kk,2)*sin(2.d0*phi)+3.d0*prmdih(kk,3)* -+ x sin(3.d0*phi)) -+ -+ else if(keydih(kk).eq.5)then -+ -+c key=5 for ryckaert-bellemans potential -+c chem.phys.lett., vol.30, p.123, 1975. -+c ATTENTION !!! Modified to have trans configuration -+c correspond to phi=180 rather than -+c phi=0 as in original form. -+ -+ dterm=prmdih(kk,1)*(1.116d0-1.462d0*cos(phi)- -+ x 1.578d0*(cos(phi))**2+0.368d0*(cos(phi))**3+ -+ x 3.156d0*(cos(phi))**4+3.788d0*(cos(phi))**5) -+ gamma=prmdih(kk,1)*(1.462d0+3.156d0*cos(phi)- -+ x 1.104d0*(cos(phi))**2-12.624d0*(cos(phi))**3- -+ x 18.94d0*(cos(phi))**4)*rpb1*rpc1 -+ -+ else if(keydih(kk).eq.6)then -+ -+c key=6 for fluorinated ryckaert-bellemans potential -+c Rice at al., JCP 104, 2101, (1996). -+ -+ dterm=prmdih(kk,1)*(3.55d0-2.78d0*cos(phi)- -+ x 3.56d0*(cos(phi))**2-1.64d0*(cos(phi))**3+ -+ x 7.13d0*(cos(phi))**4+12.84d0*(cos(phi))**5+ -+ x 9.67d0*exp(-56.d0*(phi-pi)**2)) -+ gamma=(prmdih(kk,1)*(2.78d0+7.12d0*cos(phi)+ -+ x 4.92d0*(cos(phi))**2-28.52d0*(cos(phi))**3- -+ x 64.2d0*(cos(phi))**4)-1083.04d0*(phi-pi)* -+ x exp(-56.0*(phi-pi)**2))*rpb1*rpc1 -+ -+ else if(keydih(kk).eq.7)then -+ -+c key=7 for opls cosine dihedral -+ -+ phi=phi-prmdih(kk,5) -+ dterm=prmdih(kk,1)+0.5d0*(prmdih(kk,2)* -+ x (1.d0+cos(phi))+prmdih(kk,3)*(1.d0-cos(2.d0*phi))+ -+ x prmdih(kk,4)*(1.d0+cos(3.d0*phi))) -+ gamma=-0.5d0*(prmdih(kk,2)*sin(phi)-2.d0*prmdih(kk,3)* -+ x sin(2.d0*phi)+3.d0*prmdih(kk,4)*sin(3.d0*phi))*rpb1* -+ x rpc1*rsinp -+ -+ else -+ -+c undefined potential -+ -+ safe=.false. -+ dterm=0.d0 -+ gamma=0.d0 -+ -+ endif -+ -+c indices of bonded atoms -+ -+ ia=listdih(ii,2) -+ ib=listdih(ii,3) -+ ic=listdih(ii,4) -+ id=listdih(ii,5) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ kdrive=driven(ltype(ic)) -+ ldrive=driven(ltype(id)) -+ -+ endif -+ -+c set selection control for angle potential -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. -+ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ -+ x atm_fre(id).eq.0) -+ -+ if(lsolva)then -+ dih_exc(atmolt(ia))=dih_exc(atmolt(ia))+dterm -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. -+ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ dih_fre=dih_fre-dterm -+ dterm=lambda1*dterm -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. -+ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ dih_fre=dih_fre+dterm -+ dterm=lambda2*dterm -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy -+ -+ engdih=engdih+dterm -+ -+c calculate solvation energy for dihedral term -+ -+ if(lsolva)then -+ dih_sol(atmolt(ia))=dih_sol(atmolt(ia))+dterm -+ endif -+ -+c calculate atomic forces for dihedral term -+ -+ fax=gamma*((-pcy*zbc+pcz*ybc)-pbpc*rpb2*(-pby*zbc+pbz*ybc)) -+ fay=gamma*(( pcx*zbc-pcz*xbc)-pbpc*rpb2*( pbx*zbc-pbz*xbc)) -+ faz=gamma*((-pcx*ybc+pcy*xbc)-pbpc*rpb2*(-pbx*ybc+pby*xbc)) -+ -+ fcx=gamma*((-pcy*zab+pcz*yab)-pbpc*rpb2*(-pby*zab+pbz*yab)) -+ fcy=gamma*(( pcx*zab-pcz*xab)-pbpc*rpb2*( pbx*zab-pbz*xab)) -+ fcz=gamma*((-pcx*yab+pcy*xab)-pbpc*rpb2*(-pbx*yab+pby*xab)) -+ -+ fb1x=gamma*((-pby*zcd+pbz*ycd)-pbpc*rpc2*(-pcy*zcd+pcz*ycd)) -+ fb1y=gamma*(( pbx*zcd-pbz*xcd)-pbpc*rpc2*( pcx*zcd-pcz*xcd)) -+ fb1z=gamma*((-pbx*ycd+pby*xcd)-pbpc*rpc2*(-pcx*ycd+pcy*xcd)) -+ -+ fd1x=gamma*((-pby*zbc+pbz*ybc)-pbpc*rpc2*(-pcy*zbc+pcz*ybc)) -+ fd1y=gamma*(( pbx*zbc-pbz*xbc)-pbpc*rpc2*( pcx*zbc-pcz*xbc)) -+ fd1z=gamma*((-pbx*ybc+pby*xbc)-pbpc*rpc2*(-pcx*ybc+pcy*xbc)) -+ -+ fxx(ia)=fxx(ia)+fax -+ fyy(ia)=fyy(ia)+fay -+ fzz(ia)=fzz(ia)+faz -+ -+ fxx(ib)=fxx(ib)-fax-fcx+fb1x -+ fyy(ib)=fyy(ib)-fay-fcy+fb1y -+ fzz(ib)=fzz(ib)-faz-fcz+fb1z -+ -+ fxx(ic)=fxx(ic)+fcx-fb1x-fd1x -+ fyy(ic)=fyy(ic)+fcy-fb1y-fd1y -+ fzz(ic)=fzz(ic)+fcz-fb1z-fd1z -+ -+ fxx(id)=fxx(id)+fd1x -+ fyy(id)=fyy(id)+fd1y -+ fzz(id)=fzz(id)+fd1z -+ -+c stress tensor for dihedral term -+ -+ strs(1)=strs(1)+xab*fax+xbc*(fb1x-fcx)-xcd*fd1x -+ strs(2)=strs(2)+yab*fax+ybc*(fb1x-fcx)-ycd*fd1x -+ strs(3)=strs(3)+zab*fax+zbc*(fb1x-fcx)-zcd*fd1x -+ strs(4)=strs(4)+yab*fay+ybc*(fb1y-fcy)-ycd*fd1y -+ strs(5)=strs(5)+yab*faz+ybc*(fb1z-fcz)-ycd*fd1z -+ strs(6)=strs(6)+zab*faz+zbc*(fb1z-fcz)-zcd*fd1z -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then -+ -+c local energy (no virial) -+ -+ eng_loc=eng_loc+dterm -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fax -+ fyy_loc(ia)=fyy_loc(ia)+fay -+ fzz_loc(ia)=fzz_loc(ia)+faz -+ -+ fxx_loc(ib)=fxx_loc(ib)-fax-fcx+fb1x -+ fyy_loc(ib)=fyy_loc(ib)-fay-fcy+fb1y -+ fzz_loc(ib)=fzz_loc(ib)-faz-fcz+fb1z -+ -+ fxx_loc(ic)=fxx_loc(ic)+fcx-fb1x-fd1x -+ fyy_loc(ic)=fyy_loc(ic)+fcy-fb1y-fd1y -+ fzz_loc(ic)=fzz_loc(ic)+fcz-fb1z-fd1z -+ -+ fxx_loc(id)=fxx_loc(id)+fd1x -+ fyy_loc(id)=fyy_loc(id)+fd1y -+ fzz_loc(id)=fzz_loc(id)+fd1z -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xab*fax+xbc*(fb1x-fcx)-xcd*fd1x -+ strs_loc(2)=strs_loc(2)+yab*fax+ybc*(fb1x-fcx)-ycd*fd1x -+ strs_loc(3)=strs_loc(3)+zab*fax+zbc*(fb1x-fcx)-zcd*fd1x -+ strs_loc(4)=strs_loc(4)+yab*fay+ybc*(fb1y-fcy)-ycd*fd1y -+ strs_loc(5)=strs_loc(5)+yab*faz+ybc*(fb1z-fcz)-ycd*fd1z -+ strs_loc(6)=strs_loc(6)+zab*faz+zbc*(fb1z-fcz)-zcd*fd1z -+ -+ endif -+ -+c calculate 1-4 dihedral interactions (coulombic and short ranged) -+c assumes 1-4 interactions are in the exclude list -+ -+ kk=listdih(ii,1) -+ -+c bypass OPLS 1-4 terms (not present) -+ -+ if(keydih(kk).ne.7)then -+ -+c 1-4 electrostatics : adjust by weighting factor -+ -+ scale=prmdih(kk,4) -+ -+ xad=xac+xcd -+ yad=yac+ycd -+ zad=zac+zcd -+ -+ rad=sqrt(xad**2+yad**2+zad**2) -+ -+c scaled charge product*dielectric -+ -+ chgprd=scale*chge(ia)*chge(id)*r4pie0 -+ coul=0.d0 -+ fcoul=0.d0 -+ -+c truncation of potential for all schemes except ewald sum -+ -+ if(abs(chgprd).gt.1.d-10.and.keyfce.gt.0)then -+ -+c electrostatics by ewald sum -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6.or.keyfce/2.eq.7)then -+ -+ coul=chgprd/(epsq*rad) -+ fcoul=coul/(rad**2) -+ -+c distance dependent dielectric -+ -+ elseif(rcut.gt.rad)then -+ -+ if(keyfce/2.eq.2)then -+ -+ coul=chgprd/(epsq*rad**2) -+ fcoul=2.0d0*coul/(rad**2) -+ -+c unmodified coulombic -+ -+ else if(keyfce/2.eq.3)then -+ -+ coul=chgprd/(epsq*rad) -+ fcoul=coul/(rad**2) -+ -+c truncated and shifted coulombic -+ -+ else if(keyfce/2.eq.4)then -+ -+ tt=1.d0/(1.d0+pp*alpha*rad) -+ exp1=exp(-(alpha*rad)**2) -+ erc=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rad -+ fer=(erc+2.d0*(alpha/sqrpi)*exp1)/rad**2 -+ -+c calculate potential energy and forces -+ -+ coul=chgprd*(erc-vcon+fcon*(rad-rcut))/epsq -+ fcoul=chgprd*(fer-fcon/rad)/epsq -+ -+c reaction field -+ -+ else if(keyfce/2.eq.5)then -+ -+ tt=1.d0/(1.d0+pp*alpha*rad) -+ exp1=exp(-(alpha*rad)**2) -+ erc=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rad -+ fer=(erc+2.d0*(alpha/sqrpi)*exp1)/rad**2 -+ coul=chgprd*(erc-vcon+fcon*(rad-rcut)+ -+ x rfld2*rad*rad-rfld1) -+ fcoul=chgprd*(fer-fcon/rad-rfld0) -+ -+ elseif(keyfce/2.eq.0)then -+ -+ coul=0.d0 -+ fcoul=0.d0 -+ -+ else -+ -+ call error(idnode,446) -+ -+ endif -+ -+ endif -+ -+c set selection control for coulombic 1-4 terms -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(ia),atmolt(id)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(id).ne.1))then -+ -+c set selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(id).eq.0) -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou14_vir=cou14_vir+fcoul*rad**2 -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou14_vir=cou14_vir-fcoul*rad**2 -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c electrostatic energy and virial for 1-4 term -+ -+ engc14=engc14+coul -+ virc14=virc14-fcoul*rad**2 -+ -+c solvation energy for coulombic 1-4 term -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c coulombic force for 1-4 term -+ -+ fx=fcoul*xad -+ fy=fcoul*yad -+ fz=fcoul*zad -+ -+ fxx(ia)=fxx(ia)+fx -+ fyy(ia)=fyy(ia)+fy -+ fzz(ia)=fzz(ia)+fz -+ -+ fxx(id)=fxx(id)-fx -+ fyy(id)=fyy(id)-fy -+ fzz(id)=fzz(id)-fz -+ -+c stress tensor for coulombic 1-4 term -+ -+ strs(1)=strs(1)+xad*fx -+ strs(2)=strs(2)+xad*fy -+ strs(3)=strs(3)+xad*fz -+ strs(4)=strs(4)+yad*fy -+ strs(5)=strs(5)+yad*fz -+ strs(6)=strs(6)+zad*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.ldrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-fcoul*rad**2 -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fx -+ fyy_loc(ia)=fyy_loc(ia)+fy -+ fzz_loc(ia)=fzz_loc(ia)+fz -+ -+ fxx_loc(id)=fxx_loc(id)-fx -+ fyy_loc(id)=fyy_loc(id)-fy -+ fzz_loc(id)=fzz_loc(id)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xad*fx -+ strs_loc(2)=strs_loc(2)+xad*fy -+ strs_loc(3)=strs_loc(3)+xad*fz -+ strs_loc(4)=strs_loc(4)+yad*fy -+ strs_loc(5)=strs_loc(5)+yad*fz -+ strs_loc(6)=strs_loc(6)+zad*fz -+ -+ endif -+ -+ endif -+ -+c 1-4 short ranged : adjust by weighting factor -+ -+ scale=prmdih(kk,5) -+ gamma=0.d0 -+ -+ if(mod(keyfce,2).eq.1)then -+ -+c atomic and potential function indices -+ -+ ka=max(ltype(ia),ltype(id)) -+ kb=min(ltype(ia),ltype(id)) -+ k=lstvdw((ka*(ka-1))/2+kb) -+ -+ if(abs(scale*vvv(1,k)).gt.1.d-10)then -+ -+c apply truncation of potential -+ -+ if(rvdw.gt.rad)then -+ -+c determine interpolation panel for force arrays -+ -+ l=int(rad/dlrpot) -+ ppp=rad/dlrpot-dble(l) -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0=vvv(l,k) -+ vk1=vvv(l+1,k) -+ vk2=vvv(l+2,k) -+ -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ -+ srpot=scale*(t1+(t2-t1)*ppp*0.5d0) -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=ggg(l,k) -+ gk1=ggg(l+1,k) -+ gk2=ggg(l+2,k) -+ -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ -+ gamma=scale*(t1+(t2-t1)*ppp*0.5d0)/(rad**2) -+ -+c set selection control for short ranged 1-4 terms -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(ia),atmolt(id)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(id).ne.1))then -+ -+c set selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(id).eq.0) -+ -+ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+srpot -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ vdw_fre=vdw_fre-srpot -+ vdw14_vir=vdw14_vir+gamma*rad**2 -+ srpot=lambda1*srpot -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ vdw_fre=vdw_fre+srpot -+ vdw14_vir=vdw14_vir-gamma*rad**2 -+ srpot=lambda2*srpot -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c short ranged energy and virial for 1-4 term -+ -+ engs14=engs14+srpot -+ virs14=virs14-gamma*rad**2 -+ -+c solvation energy for short ranged 1-4 term -+ -+ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+srpot -+ -+c short ranged forces for 1-4 term -+ -+ fx=gamma*xad -+ fy=gamma*yad -+ fz=gamma*zad -+ -+ fxx(ia)=fxx(ia)+fx -+ fyy(ia)=fyy(ia)+fy -+ fzz(ia)=fzz(ia)+fz -+ -+ fxx(id)=fxx(id)-fx -+ fyy(id)=fyy(id)-fy -+ fzz(id)=fzz(id)-fz -+ -+c stress tensor for short ranged 1-4 term -+ -+ strs(1)=strs(1)+xad*fx -+ strs(2)=strs(2)+xad*fy -+ strs(3)=strs(3)+xad*fz -+ strs(4)=strs(4)+yad*fy -+ strs(5)=strs(5)+yad*fz -+ strs(6)=strs(6)+zad*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.ldrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+srpot -+ vir_loc=vir_loc-gamma*rad**2 -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fx -+ fyy_loc(ia)=fyy_loc(ia)+fy -+ fzz_loc(ia)=fzz_loc(ia)+fz -+ -+ fxx_loc(id)=fxx_loc(id)-fx -+ fyy_loc(id)=fyy_loc(id)-fy -+ fzz_loc(id)=fzz_loc(id)-fz -+ -+c stress tensor for short ranged 1-4 term -+ -+ strs_loc(1)=strs_loc(1)+xad*fx -+ strs_loc(2)=strs_loc(2)+xad*fy -+ strs_loc(3)=strs_loc(3)+xad*fz -+ strs_loc(4)=strs_loc(4)+yad*fy -+ strs_loc(5)=strs_loc(5)+yad*fz -+ strs_loc(6)=strs_loc(6)+zad*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c sum contributions to potentials -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engdih -+ buffer(2)=engc14 -+ buffer(3)=virc14 -+ buffer(4)=engs14 -+ buffer(5)=virs14 -+ buffer(6)=dih_fre -+ buffer(7)=dih_vir -+ buffer(8)=vdw14_vir -+ buffer(9)=cou14_vir -+ call gdsum(buffer(1),9,buffer(10)) -+ engdih=buffer(1) -+ engc14=buffer(2) -+ virc14=buffer(3) -+ engs14=buffer(4) -+ virs14=buffer(5) -+ dih_fre=buffer(6) -+ dih_vir=buffer(7) -+ vdw14_vir=buffer(8) -+ cou14_vir=buffer(9) -+ -+ if(lsolva)then -+ -+ call gdsum(dih_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(dih_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ engcpe=engcpe+engc14 -+ vircpe=vircpe+virc14 -+ engsrp=engsrp+engs14 -+ virsrp=virsrp+virs14 -+ vdw_vir=vdw_vir+vdw14_vir -+ cou_vir=cou_vir+cou14_vir -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,448) -+ -+ deallocate (xdab,ydab,zdab,stat=fail1) -+ deallocate (xdbc,ydbc,zdbc,stat=fail2) -+ deallocate (xdcd,ydcd,zdcd,stat=fail3) -+ -+ return -+ end subroutine dihfrc -+ -+ end module dihedral_module -diff -urN dl_class_1.9.orig/srcmod/dlpoly.f dl_class_1.9/srcmod/dlpoly.f ---- dl_class_1.9.orig/srcmod/dlpoly.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/dlpoly.f 2015-11-16 17:39:33.860700901 +0100 -@@ -0,0 +1,969 @@ -+ program dlpoly_classic -+ -+c*********************************************************************** -+c -+c dl_poly classic is an stfc/ccp5 program package for the -+c dynamical simulation of molecular systems. -+c -+c dl_poly is the copyright of the stfc daresbury laboratory, -+c daresbury, warrington wa4 4ad. -+c -+c neither the stfc, daresbury laboratory, ccp5 nor the authors -+c of this package claim that it is free from errors and do not -+c accept liability for any loss or damage that may arise from -+c its use. it is the users responsibility to verify that the -+c package dl_poly is fit for the purpose the user intends for -+c it. -+c -+c users of this package are recommended to consult the dl_poly -+c user manual for the full description of its use and purpose. -+c -+c authors: w.smith and t.r.forester 1995 -+c copyright daresbury laboratory 1995 -+c -+c DL_POLY CLASSIC VERSION 1.9 -+c -+c*********************************************************************** -+ -+c declare required modules -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use define_system_module -+ use dihedral_module -+ use driver_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use forces_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use integrator_module -+ use inversion_module -+ use metal_module -+ use metafreeze_module -+ use nlist_builders_module -+ use pair_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ character*1 hms,dec -+ character*8 seek -+ -+ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle -+ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb -+ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd -+ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch -+ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect -+ -+ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn -+ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt -+ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj -+ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw -+ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp -+ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k -+ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit -+ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode -+ integer natms2,ntghost,nsolva,isolva,nofic -+ -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd -+ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint -+ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter -+ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom -+ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf -+ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim -+ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen -+ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol -+ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit -+ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl -+ real(8) engord,virord -+ -+c PLUMED modifications -+ real(8) energyUnits,lengthUnits,timeUnits -+ integer(8) get_comms -+c PLUMED modifications -+ -+ real(8), allocatable :: tbuffer(:) -+ integer :: plumedavaiable -+ -+ data timelp/0.d0/,lminnow/.false./,ntrack/10/ -+ data npage,lines/8,0/,recycle/.true./ -+ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ -+ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ -+ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ -+ -+c set up the communications -+ -+ call initcomms() -+ call gsync() -+ -+c determine processor identities -+ -+ call machine(idnode,mxnode) -+ -+c activate for limited-life executable -+ -+CBOMB call bomb(idnode,2008,6,30) -+ -+ allocate (tbuffer(10),stat=memr) -+ -+ call parset(redirect,idnode,mxnode,tbuffer) -+ -+c open main printing file -+ -+ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') -+ if(idnode.eq.0) write (nrite, -+ x "(/,20x,'DL_POLY Classic 1.9', -+ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode -+ -+c allocate arrays for each function -+ -+ call alloc_ang_arrays(idnode) -+ call alloc_bnd_arrays(idnode) -+ call alloc_config_arrays(idnode) -+ call alloc_csh_arrays(idnode) -+ call alloc_dih_arrays(idnode) -+ call alloc_ewald_arrays(idnode) -+ call alloc_exc_arrays(idnode) -+ call alloc_exi_arrays(idnode) -+ call alloc_fbp_arrays(idnode) -+ call alloc_fld_arrays(idnode) -+ call alloc_free_arrays(idnode) -+ call alloc_hke_arrays(idnode) -+ call alloc_hyper_arrays(idnode) -+ call alloc_inv_arrays(idnode) -+ call alloc_met_arrays(idnode) -+ call alloc_pair_arrays(idnode) -+ call alloc_pmf_arrays(idnode) -+ call alloc_prp_arrays(idnode) -+ call alloc_rgbdy_arrays(idnode) -+ call alloc_shake_arrays(idnode) -+ call alloc_site_arrays(idnode) -+ call alloc_sol_arrays(idnode) -+ call alloc_spme_arrays(idnode) -+ call alloc_tbp_arrays(idnode) -+ call alloc_ter_arrays(idnode) -+ call alloc_tet_arrays(idnode) -+ call alloc_vdw_arrays(idnode) -+ -+c start clock -+ -+ call timchk(0,tzero) -+ -+c input the control parameters defining the simulation -+ -+ call simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c input the system force field -+ -+ call sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) -+ -+c construct initial configuration of system -+ -+ call sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c construct initial bookkeeping arrays -+ -+ call sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c reset atom numbers for excitation simulation -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c set initial system temperature -+ -+ call systemp -+ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c read thermodynamic and structural data from restart file -+ -+ call sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c metadynamics by d. quigley -+ -+ if(lmetadyn) -+ x call define_metadynamics(idnode,mxnode,natms,temp) -+ -+c synchronise LRC, SIC and system charge terms for switching -+ -+ llswitch=.false. -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod((nstep-nswitch)/niswitch,2).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.true. -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c PLUMED modifications -+ if(lplumed)then -+ -+ call plumed_f_installed(plumedavaiable) -+ -+ if (plumedavaiable<=0) then -+ if(idnode.eq.0) write(nrite,*)"PLUMED NOT AVAILABLE" -+ stop -+ else -+ call plumed_f_gcreate() -+ call plumed_f_gcmd("setMPIFComm"//char(0),get_comms()) -+ call plumed_f_gcmd("setRealPrecision"//char(0),8) -+ energyUnits=0.01 -+ lengthUnits=0.1 -+ timeUnits=1 -+ call plumed_f_gcmd("setMDEnergyUnits"//char(0),energyUnits) -+ call plumed_f_gcmd("setMDLengthUnits"//char(0),lengthUnits) -+ call plumed_f_gcmd("setMDTimeUnits"//char(0),timeUnits) -+ call plumed_f_gcmd("setPlumedDat"//char(0),"plumed.dat"//char(0)) -+ call plumed_f_gcmd("setLogFile"//char(0),"PLUMED.OUT"//char(0)) -+ call plumed_f_gcmd("setNatoms"//char(0),natms) -+ call plumed_f_gcmd("setMDEngine"//char(0),"dlpoly2.20"//char(0)) -+ call plumed_f_gcmd("setTimestep"//char(0),tstep) -+ call plumed_f_gcmd("init"//char(0),0) -+ end if -+ endif -+ -+c PLUMED modifications -+ -+c zero long range component of stress -+ -+ do i=1,9 -+ stresl(i)=0.d0 -+ enddo -+ -+c zero contraint terms -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ if(lminim.or.loptim.or.ntcons.eq.0)then -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c define target kinetic energy -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+c metadynamics by d. quigley -+ -+ sigma_shl=boltz*degshl*0.5d0 -+ -+c convert BPD parameters to internal units -+ -+ if(lbpd)then -+ -+ ebias=0.5d0*boltz*degfre*ebias -+ vmin=0.5d0*boltz*degfre*vmin -+ -+ endif -+ -+c time check -+ -+ call timchk(1,tzero) -+ -+c control variable for structure optimizer -+ -+ keystr=0 -+ stropt=.false. -+ -+ if(lminim)then -+ -+c first step of minimisation programme -+ -+ if(idnode.eq.0)write(nrite,"(1x,120('-'))") -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+c calculate initial conditions for velocity verlet -+ -+ elseif(keyver.eq.1.and.nstep.eq.0)then -+ -+c kinetic stress tensor at start -+ -+ call dcell(cell,celprp) -+ width=min(celprp(7),celprp(8),celprp(9)) -+ call kinstress(natms,idnode,mxnode,stress) -+ engke=0.5d0*(stress(1)+stress(5)+stress(9)) -+ do i=1,9 -+ stress(i)=stress(i)/dble(mxnode) -+ enddo -+ -+c calculate initial forces -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+ endif -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+c construct the first reference state -+ -+ call hyper_start -+ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, -+ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, -+ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, -+ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, -+ x hyp_units) -+ -+ endif -+ -+c perform selected NEB calculation -+ -+ if(lneb)then -+ -+ do i=1,numneb -+ -+ call neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), -+ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+ call scan_profile(nturn,estar) -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(1x,120('-'))") -+ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') -+ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ enddo -+ -+c bypass the MD cycle for this option -+ -+ recycle=.false. -+ -+ endif -+ -+c*********************************************************************** -+c start of molecular dynamics calculations -+c*********************************************************************** -+ -+ do while(recycle) -+ -+c increase step counter -+ -+ nstep=nstep+1 -+ recycle=(nstep.lt.nstrun) -+ -+c store velocities for free energy or solvation simulation -+ -+ if(keyver.eq.0)then -+ -+ if(lsolva)then -+ -+ vxo_sol(:)=vxx(:) -+ vyo_sol(:)=vyy(:) -+ vzo_sol(:)=vzz(:) -+ -+ elseif(lfree)then -+ -+ vxo_fre(:)=vxx(:) -+ vyo_fre(:)=vyy(:) -+ vzo_fre(:)=vzz(:) -+ -+ endif -+ -+ endif -+ -+c molecular switching option for excitation -+ -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod(nstep-nswitch,niswitch).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.not.llswitch -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c switch on the minimiser -+ -+ if(lminim)then -+ -+ lminnow=(mod(nstep,minstp).eq.0) -+ -+ endif -+ -+c conserved quantity (other than K + U) -+ -+ consv=0.d0 -+ -+c energy accumulators -+ -+ if(.not.lminnow)then -+ -+ engke=0.d0 -+ engrot=0.d0 -+ -+ endif -+ -+c calculate volume of simulation cell -+ -+ if(imcon.ne.0.and.imcon.ne.6)then -+ -+ call dcell(cell,celprp) -+ volm=celprp(10) -+ if(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ endif -+ -+ else -+ -+ volm=0.d0 -+ -+ endif -+ -+c reset sutton chen long range corrections (constant pressure only) -+ -+ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+c activate the impact option at designated time step -+ -+ if(lhit.and.nstep.eq.nhit)call impact -+ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) -+ -+c integrate equations of motion stage 1 of velocity verlet -+ -+ if(keyver.gt.0)then -+ -+ isw=1 -+ if(.not.loptim)then -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+ call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+ endif -+ -+ if(lminnow)then -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+ elseif(loptim.or.keyshl.ne.2)then -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+ else -+ -+ call shell_relaxation -+ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, -+ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, -+ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, -+ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, -+ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, -+ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, -+ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, -+ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, -+ x pass1,pass2,engord,virord) -+ -+ endif -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+c switching option for excitation simulation -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+c integrate equations of motion -+ -+ if(keyver.eq.0)then -+ -+c integrate equations of motion by leapfrog verlet -+ -+ if(.not.(loptim.or.lminnow))call lf_integrate -+ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, -+ x elrc,virlrc,virpmf) -+ -+ else if(keyver.gt.0)then -+ -+c integrate equations of motion by velocity verlet (stage 2) -+ -+ isw=2 -+ if(.not.loptim)call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ endif -+ -+c update the atomic positions for the ghost molecule -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+c long range correction adjustment for free energy and solvation -+ -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+c application of transition analysis procedures -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+ engtke=engke+engrot -+ call hyper_driver -+ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, -+ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, -+ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, -+ x tolnce,hyp_units,ebias,vmin) -+ -+ endif -+ -+c reset average boost factor in BPD during equilibration -+ -+ if(lbpd.and.keybpd.eq.1)then -+ -+ if(lzeql.and.nstep.le.nsteql)then -+ -+ numbpd=0 -+ tboost=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate shell kinetic energy -+ -+ if(keyshl.eq.1)then -+ -+ call corshl(idnode,mxnode,ntshl,shlke) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+c apply temperature scaling -+ -+ if((ltscal.and.nstep.le.nsteql).and. -+ x mod(nstep-nsteql,nstbts).eq.0)then -+ -+ chit=0.d0 -+ chit_shl=0.d0 -+ chip=0.d0 -+ do i=1,9 -+ eta(i)=0.d0 -+ enddo -+ -+ if(keyshl.eq.1) then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c reset atom velocities at intervals if required -+ -+ if(newgau)then -+ -+ if(mod(nstep,numgau).eq.0)call regauss -+ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+ endif -+ -+c calculate physical quantities -+ -+ if(nstep.gt.0)call static -+ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, -+ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, -+ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, -+ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, -+ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, -+ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, -+ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, -+ x virmet,engter,virter,boost,tboost) -+ -+c z density calculation -+ -+ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then -+ -+ call zden0(idnode,natms,mxnode,nzden,zlen) -+ -+ endif -+ -+c terminate program if boundary conditions violated -+ -+ if(imcon.gt.0.and.rcut.gt.width)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ call error(idnode,95) -+ -+ endif -+ -+c line-printer output every nstbpo steps -+ -+ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then -+ -+ call timchk(0,timelp) -+ if(idnode.eq.0)then -+ -+ call get_prntime(hms,timelp,prntim) -+ call get_simtime(dec,nstep,tstep,simtim) -+ if(mod(lines,npage).eq.0) -+ x write(nrite,"(1x,120('-'), -+ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, -+ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', -+ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, -+ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', -+ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', -+ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, -+ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', -+ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', -+ x 7x,'press',/,/, -+ x 1x,120('-'))") -+ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, -+ x /,1x,0p,f7.3,a1,1p,9e12.4)") -+ x nstep,(stpval(i),i=1,9), -+ x simtim,dec,(stpval(i),i=10,18), -+ x prntim,hms,(stpval(i),i=19,27) -+ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', -+ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ lines=lines+1 -+ -+ endif -+ -+c report end of equilibration period -+ -+ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then -+ -+ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) -+ x write(nrite,"(/,/,1x,'switching off temperature ', -+ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep -+ ltscal=.false. -+ -+ endif -+ -+c write trajectory data -+ -+ if(ltraj.and.nstep.ge.nstraj) then -+ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then -+ -+ call traject -+ x (ltraj,idnode,imcon,istraj,keytrj,natms, -+ x nstraj,nstep,tstep) -+ -+ endif -+ -+ endif -+ -+c write solvation energy file -+ -+ if(lsolva.and.nstep.ge.nsolva)then -+ -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ call solva_temp(idnode,mxnode,natms2,keyver) -+ call solvation_write(lexcite,lswitch,idnode,natms, -+ x nstep,nsolva,isolva,tstep,engunit,elrc) -+ -+ endif -+ -+ endif -+ -+c write free energy file -+ -+ if(lfree.and.nstep.ge.nfrn)then -+ -+ if(mod(nstep-nfrn,ifrn).eq.0)then -+ -+ call free_kinetic(lfrmas,idnode,mxnode,keyver) -+ call free_energy_write(idnode,nstep,engunit) -+ -+ endif -+ -+ endif -+ -+c save restart data in event of system crash -+ -+ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+ endif -+ -+c cycle time check -+ -+ call timchk(0,timelp) -+ recycle=(recycle.and.timjob-timelp.gt.timcls) -+ -+ enddo -+ -+c*********************************************************************** -+c end of molecular dynamics calculations -+c*********************************************************************** -+ -+c last time check -+ -+ call timchk(0,timelp) -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, -+ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") -+ x timelp,prntim,hms,timcls -+ -+c shell relaxation convergence statistics -+ -+ if(.not.loptim.and.keyshl.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'shell relaxation statistics : average cycles = ', -+ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 -+ -+ endif -+ -+c produce summary of simulation -+ -+c PLUMED -+ if(lplumed) call plumed_f_gcmd() -+c PLUMED -+ -+ levcfg=2 -+ if(loptim)levcfg=0 -+ if(.not.lneb)call result -+ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, -+ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, -+ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, -+ x chit_shl) -+ -+c write hyperdynamics restart file -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+c close output channels -+ -+ if(idnode.eq.0) then -+ -+ close (nrite) -+ close (nstats) -+ close (nhist) -+ close (nevnt) -+ -+ endif -+ -+c terminate job -+ -+ call exitcomms() -+ -+ end -diff -urN dl_class_1.9.orig/srcmod/dlpoly.f~ dl_class_1.9/srcmod/dlpoly.f~ ---- dl_class_1.9.orig/srcmod/dlpoly.f~ 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/dlpoly.f~ 2015-11-16 17:31:56.327749683 +0100 -@@ -0,0 +1,969 @@ -+ program dlpoly_classic -+ -+c*********************************************************************** -+c -+c dl_poly classic is an stfc/ccp5 program package for the -+c dynamical simulation of molecular systems. -+c -+c dl_poly is the copyright of the stfc daresbury laboratory, -+c daresbury, warrington wa4 4ad. -+c -+c neither the stfc, daresbury laboratory, ccp5 nor the authors -+c of this package claim that it is free from errors and do not -+c accept liability for any loss or damage that may arise from -+c its use. it is the users responsibility to verify that the -+c package dl_poly is fit for the purpose the user intends for -+c it. -+c -+c users of this package are recommended to consult the dl_poly -+c user manual for the full description of its use and purpose. -+c -+c authors: w.smith and t.r.forester 1995 -+c copyright daresbury laboratory 1995 -+c -+c DL_POLY CLASSIC VERSION 1.9 -+c -+c*********************************************************************** -+ -+c declare required modules -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use define_system_module -+ use dihedral_module -+ use driver_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use forces_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use integrator_module -+ use inversion_module -+ use metal_module -+ use metafreeze_module -+ use nlist_builders_module -+ use pair_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ character*1 hms,dec -+ character*8 seek -+ -+ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle -+ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb -+ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd -+ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch -+ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect -+ -+ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn -+ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt -+ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj -+ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw -+ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp -+ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k -+ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit -+ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode -+ integer natms2,ntghost,nsolva,isolva,nofic -+ -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd -+ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint -+ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter -+ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom -+ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf -+ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim -+ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen -+ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol -+ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit -+ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl -+ real(8) engord,virord -+ -+c PLUMED modifications -+ real(8) energyUnits,lengthUnits,timeUnits -+ integer(8) get_comms -+c PLUMED modifications -+ -+ real(8), allocatable :: tbuffer(:) -+ integer :: plumedavaiable -+ -+ data timelp/0.d0/,lminnow/.false./,ntrack/10/ -+ data npage,lines/8,0/,recycle/.true./ -+ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ -+ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ -+ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ -+ -+c set up the communications -+ -+ call initcomms() -+ call gsync() -+ -+c determine processor identities -+ -+ call machine(idnode,mxnode) -+ -+c activate for limited-life executable -+ -+CBOMB call bomb(idnode,2008,6,30) -+ -+ allocate (tbuffer(10),stat=memr) -+ -+ call parset(redirect,idnode,mxnode,tbuffer) -+ -+c open main printing file -+ -+ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') -+ if(idnode.eq.0) write (nrite, -+ x "(/,20x,'DL_POLY Classic 1.9', -+ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode -+ -+c allocate arrays for each function -+ -+ call alloc_ang_arrays(idnode) -+ call alloc_bnd_arrays(idnode) -+ call alloc_config_arrays(idnode) -+ call alloc_csh_arrays(idnode) -+ call alloc_dih_arrays(idnode) -+ call alloc_ewald_arrays(idnode) -+ call alloc_exc_arrays(idnode) -+ call alloc_exi_arrays(idnode) -+ call alloc_fbp_arrays(idnode) -+ call alloc_fld_arrays(idnode) -+ call alloc_free_arrays(idnode) -+ call alloc_hke_arrays(idnode) -+ call alloc_hyper_arrays(idnode) -+ call alloc_inv_arrays(idnode) -+ call alloc_met_arrays(idnode) -+ call alloc_pair_arrays(idnode) -+ call alloc_pmf_arrays(idnode) -+ call alloc_prp_arrays(idnode) -+ call alloc_rgbdy_arrays(idnode) -+ call alloc_shake_arrays(idnode) -+ call alloc_site_arrays(idnode) -+ call alloc_sol_arrays(idnode) -+ call alloc_spme_arrays(idnode) -+ call alloc_tbp_arrays(idnode) -+ call alloc_ter_arrays(idnode) -+ call alloc_tet_arrays(idnode) -+ call alloc_vdw_arrays(idnode) -+ -+c start clock -+ -+ call timchk(0,tzero) -+ -+c input the control parameters defining the simulation -+ -+ call simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c input the system force field -+ -+ call sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) -+ -+c construct initial configuration of system -+ -+ call sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c construct initial bookkeeping arrays -+ -+ call sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c reset atom numbers for excitation simulation -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c set initial system temperature -+ -+ call systemp -+ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c read thermodynamic and structural data from restart file -+ -+ call sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c metadynamics by d. quigley -+ -+ if(lmetadyn) -+ x call define_metadynamics(idnode,mxnode,natms,temp) -+ -+c synchronise LRC, SIC and system charge terms for switching -+ -+ llswitch=.false. -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod((nstep-nswitch)/niswitch,2).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.true. -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c PLUMED modifications -+ if(lplumed)then -+ -+ call plumed_f_installed(plumedavaiable) -+ -+ if (plumedavaiable<=0) then -+ if(idnode.eq.0) write(nrite,*)"PLUMED NOT AVAILABLE" -+ stop -+ else -+ call plumed_f_gcreate() -+ call plumed_f_gcmd("setMPIFComm"//char(0),get_comms()) -+ call plumed_f_gcmd("setRealPrecision"//char(0),8) -+ energyUnits=0.01 -+ lengthUnits=0.1 -+ timeUnits=1 -+ call plumed_f_gcmd("setMDEnergyUnits"//char(0),energyUnits) -+ call plumed_f_gcmd("setMDLengthUnits"//char(0),lengthUnits) -+ call plumed_f_gcmd("setMDTimeUnits"//char(0),timeUnits) -+ call plumed_f_gcmd("setPlumedDat"//char(0),"plumed.dat"//char(0)) -+ call plumed_f_gcmd("setLogFile"//char(0),"PLUMED.OUT"//char(0)) -+ call plumed_f_gcmd("setNatoms"//char(0),natms) -+ call plumed_f_gcmd("setMDEngine"//char(0),"dlpoly2.20"//char(0)) -+ call plumed_f_gcmd("setTimestep"//char(0),tstep) -+ call plumed_f_gcmd("init"//char(0),0) -+ end if -+ endif -+ -+c PLUMED modifications -+ -+c zero long range component of stress -+ -+ do i=1,9 -+ stresl(i)=0.d0 -+ enddo -+ -+c zero contraint terms -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ if(lminim.or.loptim.or.ntcons.eq.0)then -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c define target kinetic energy -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+c metadynamics by d. quigley -+ -+ sigma_shl=boltz*degshl*0.5d0 -+ -+c convert BPD parameters to internal units -+ -+ if(lbpd)then -+ -+ ebias=0.5d0*boltz*degfre*ebias -+ vmin=0.5d0*boltz*degfre*vmin -+ -+ endif -+ -+c time check -+ -+ call timchk(1,tzero) -+ -+c control variable for structure optimizer -+ -+ keystr=0 -+ stropt=.false. -+ -+ if(lminim)then -+ -+c first step of minimisation programme -+ -+ if(idnode.eq.0)write(nrite,"(1x,120('-'))") -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+c calculate initial conditions for velocity verlet -+ -+ elseif(keyver.eq.1.and.nstep.eq.0)then -+ -+c kinetic stress tensor at start -+ -+ call dcell(cell,celprp) -+ width=min(celprp(7),celprp(8),celprp(9)) -+ call kinstress(natms,idnode,mxnode,stress) -+ engke=0.5d0*(stress(1)+stress(5)+stress(9)) -+ do i=1,9 -+ stress(i)=stress(i)/dble(mxnode) -+ enddo -+ -+c calculate initial forces -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+ endif -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+c construct the first reference state -+ -+ call hyper_start -+ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, -+ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, -+ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, -+ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, -+ x hyp_units) -+ -+ endif -+ -+c perform selected NEB calculation -+ -+ if(lneb)then -+ -+ do i=1,numneb -+ -+ call neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), -+ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+ call scan_profile(nturn,estar) -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(1x,120('-'))") -+ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') -+ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ enddo -+ -+c bypass the MD cycle for this option -+ -+ recycle=.false. -+ -+ endif -+ -+c*********************************************************************** -+c start of molecular dynamics calculations -+c*********************************************************************** -+ -+ do while(recycle) -+ -+c increase step counter -+ -+ nstep=nstep+1 -+ recycle=(nstep.lt.nstrun) -+ -+c store velocities for free energy or solvation simulation -+ -+ if(keyver.eq.0)then -+ -+ if(lsolva)then -+ -+ vxo_sol(:)=vxx(:) -+ vyo_sol(:)=vyy(:) -+ vzo_sol(:)=vzz(:) -+ -+ elseif(lfree)then -+ -+ vxo_fre(:)=vxx(:) -+ vyo_fre(:)=vyy(:) -+ vzo_fre(:)=vzz(:) -+ -+ endif -+ -+ endif -+ -+c molecular switching option for excitation -+ -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod(nstep-nswitch,niswitch).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.not.llswitch -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c switch on the minimiser -+ -+ if(lminim)then -+ -+ lminnow=(mod(nstep,minstp).eq.0) -+ -+ endif -+ -+c conserved quantity (other than K + U) -+ -+ consv=0.d0 -+ -+c energy accumulators -+ -+ if(.not.lminnow)then -+ -+ engke=0.d0 -+ engrot=0.d0 -+ -+ endif -+ -+c calculate volume of simulation cell -+ -+ if(imcon.ne.0.and.imcon.ne.6)then -+ -+ call dcell(cell,celprp) -+ volm=celprp(10) -+ if(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ endif -+ -+ else -+ -+ volm=0.d0 -+ -+ endif -+ -+c reset sutton chen long range corrections (constant pressure only) -+ -+ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+c activate the impact option at designated time step -+ -+ if(lhit.and.nstep.eq.nhit)call impact -+ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) -+ -+c integrate equations of motion stage 1 of velocity verlet -+ -+ if(keyver.gt.0)then -+ -+ isw=1 -+ if(.not.loptim)then -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+ call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+ endif -+ -+ if(lminnow)then -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+ elseif(loptim.or.keyshl.ne.2)then -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+ else -+ -+ call shell_relaxation -+ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, -+ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, -+ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, -+ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, -+ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, -+ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, -+ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, -+ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, -+ x pass1,pass2,engord,virord) -+ -+ endif -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+c switching option for excitation simulation -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+c integrate equations of motion -+ -+ if(keyver.eq.0)then -+ -+c integrate equations of motion by leapfrog verlet -+ -+ if(.not.(loptim.or.lminnow))call lf_integrate -+ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, -+ x elrc,virlrc,virpmf) -+ -+ else if(keyver.gt.0)then -+ -+c integrate equations of motion by velocity verlet (stage 2) -+ -+ isw=2 -+ if(.not.loptim)call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ endif -+ -+c update the atomic positions for the ghost molecule -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+c long range correction adjustment for free energy and solvation -+ -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+c application of transition analysis procedures -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+ engtke=engke+engrot -+ call hyper_driver -+ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, -+ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, -+ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, -+ x tolnce,hyp_units,ebias,vmin) -+ -+ endif -+ -+c reset average boost factor in BPD during equilibration -+ -+ if(lbpd.and.keybpd.eq.1)then -+ -+ if(lzeql.and.nstep.le.nsteql)then -+ -+ numbpd=0 -+ tboost=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate shell kinetic energy -+ -+ if(keyshl.eq.1)then -+ -+ call corshl(idnode,mxnode,ntshl,shlke) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+c apply temperature scaling -+ -+ if((ltscal.and.nstep.le.nsteql).and. -+ x mod(nstep-nsteql,nstbts).eq.0)then -+ -+ chit=0.d0 -+ chit_shl=0.d0 -+ chip=0.d0 -+ do i=1,9 -+ eta(i)=0.d0 -+ enddo -+ -+ if(keyshl.eq.1) then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c reset atom velocities at intervals if required -+ -+ if(newgau)then -+ -+ if(mod(nstep,numgau).eq.0)call regauss -+ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+ endif -+ -+c calculate physical quantities -+ -+ if(nstep.gt.0)call static -+ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, -+ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, -+ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, -+ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, -+ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, -+ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, -+ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, -+ x virmet,engter,virter,boost,tboost) -+ -+c z density calculation -+ -+ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then -+ -+ call zden0(idnode,natms,mxnode,nzden,zlen) -+ -+ endif -+ -+c terminate program if boundary conditions violated -+ -+ if(imcon.gt.0.and.rcut.gt.width)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ call error(idnode,95) -+ -+ endif -+ -+c line-printer output every nstbpo steps -+ -+ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then -+ -+ call timchk(0,timelp) -+ if(idnode.eq.0)then -+ -+ call get_prntime(hms,timelp,prntim) -+ call get_simtime(dec,nstep,tstep,simtim) -+ if(mod(lines,npage).eq.0) -+ x write(nrite,"(1x,120('-'), -+ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, -+ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', -+ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, -+ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', -+ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', -+ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, -+ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', -+ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', -+ x 7x,'press',/,/, -+ x 1x,120('-'))") -+ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, -+ x /,1x,0p,f7.3,a1,1p,9e12.4)") -+ x nstep,(stpval(i),i=1,9), -+ x simtim,dec,(stpval(i),i=10,18), -+ x prntim,hms,(stpval(i),i=19,27) -+ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', -+ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ lines=lines+1 -+ -+ endif -+ -+c report end of equilibration period -+ -+ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then -+ -+ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) -+ x write(nrite,"(/,/,1x,'switching off temperature ', -+ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep -+ ltscal=.false. -+ -+ endif -+ -+c write trajectory data -+ -+ if(ltraj.and.nstep.ge.nstraj) then -+ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then -+ -+ call traject -+ x (ltraj,idnode,imcon,istraj,keytrj,natms, -+ x nstraj,nstep,tstep) -+ -+ endif -+ -+ endif -+ -+c write solvation energy file -+ -+ if(lsolva.and.nstep.ge.nsolva)then -+ -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ call solva_temp(idnode,mxnode,natms2,keyver) -+ call solvation_write(lexcite,lswitch,idnode,natms, -+ x nstep,nsolva,isolva,tstep,engunit,elrc) -+ -+ endif -+ -+ endif -+ -+c write free energy file -+ -+ if(lfree.and.nstep.ge.nfrn)then -+ -+ if(mod(nstep-nfrn,ifrn).eq.0)then -+ -+ call free_kinetic(lfrmas,idnode,mxnode,keyver) -+ call free_energy_write(idnode,nstep,engunit) -+ -+ endif -+ -+ endif -+ -+c save restart data in event of system crash -+ -+ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+ endif -+ -+c cycle time check -+ -+ call timchk(0,timelp) -+ recycle=(recycle.and.timjob-timelp.gt.timcls) -+ -+ enddo -+ -+c*********************************************************************** -+c end of molecular dynamics calculations -+c*********************************************************************** -+ -+c last time check -+ -+ call timchk(0,timelp) -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, -+ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") -+ x timelp,prntim,hms,timcls -+ -+c shell relaxation convergence statistics -+ -+ if(.not.loptim.and.keyshl.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'shell relaxation statistics : average cycles = ', -+ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 -+ -+ endif -+ -+c produce summary of simulation -+ -+ levcfg=2 -+ if(loptim)levcfg=0 -+ if(.not.lneb)call result -+ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, -+ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, -+ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, -+ x chit_shl) -+ -+c PLUMED -+ if(lplumed) call plumed_f_gcmd() -+c PLUMED -+ -+c write hyperdynamics restart file -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+c close output channels -+ -+ if(idnode.eq.0) then -+ -+ close (nrite) -+ close (nstats) -+ close (nhist) -+ close (nevnt) -+ -+ endif -+ -+c terminate job -+ -+ call exitcomms() -+ -+ end -diff -urN dl_class_1.9.orig/srcmod/dlpoly.f.preplumed dl_class_1.9/srcmod/dlpoly.f.preplumed ---- dl_class_1.9.orig/srcmod/dlpoly.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/dlpoly.f.preplumed 2012-04-10 16:32:54.000000000 +0200 -@@ -0,0 +1,929 @@ -+ program dlpoly_classic -+ -+c*********************************************************************** -+c -+c dl_poly classic is an stfc/ccp5 program package for the -+c dynamical simulation of molecular systems. -+c -+c dl_poly is the copyright of the stfc daresbury laboratory, -+c daresbury, warrington wa4 4ad. -+c -+c neither the stfc, daresbury laboratory, ccp5 nor the authors -+c of this package claim that it is free from errors and do not -+c accept liability for any loss or damage that may arise from -+c its use. it is the users responsibility to verify that the -+c package dl_poly is fit for the purpose the user intends for -+c it. -+c -+c users of this package are recommended to consult the dl_poly -+c user manual for the full description of its use and purpose. -+c -+c authors: w.smith and t.r.forester 1995 -+c copyright daresbury laboratory 1995 -+c -+c DL_POLY CLASSIC VERSION 1.9 -+c -+c*********************************************************************** -+ -+c declare required modules -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use define_system_module -+ use dihedral_module -+ use driver_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use forces_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use integrator_module -+ use inversion_module -+ use metal_module -+ use metafreeze_module -+ use nlist_builders_module -+ use pair_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ character*1 hms,dec -+ character*8 seek -+ -+ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle -+ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb -+ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd -+ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch -+ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect -+ -+ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn -+ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt -+ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj -+ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw -+ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp -+ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k -+ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit -+ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode -+ integer natms2,ntghost,nsolva,isolva,nofic -+ -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd -+ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint -+ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter -+ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom -+ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf -+ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim -+ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen -+ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol -+ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit -+ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl -+ real(8) engord,virord -+ real(8), allocatable :: tbuffer(:) -+ -+ data timelp/0.d0/,lminnow/.false./,ntrack/10/ -+ data npage,lines/8,0/,recycle/.true./ -+ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ -+ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ -+ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ -+ -+c set up the communications -+ -+ call initcomms() -+ call gsync() -+ -+c determine processor identities -+ -+ call machine(idnode,mxnode) -+ -+c activate for limited-life executable -+ -+CBOMB call bomb(idnode,2008,6,30) -+ -+ allocate (tbuffer(10),stat=memr) -+ -+ call parset(redirect,idnode,mxnode,tbuffer) -+ -+c open main printing file -+ -+ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') -+ if(idnode.eq.0) write (nrite, -+ x "(/,20x,'DL_POLY Classic 1.9', -+ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode -+ -+c allocate arrays for each function -+ -+ call alloc_ang_arrays(idnode) -+ call alloc_bnd_arrays(idnode) -+ call alloc_config_arrays(idnode) -+ call alloc_csh_arrays(idnode) -+ call alloc_dih_arrays(idnode) -+ call alloc_ewald_arrays(idnode) -+ call alloc_exc_arrays(idnode) -+ call alloc_exi_arrays(idnode) -+ call alloc_fbp_arrays(idnode) -+ call alloc_fld_arrays(idnode) -+ call alloc_free_arrays(idnode) -+ call alloc_hke_arrays(idnode) -+ call alloc_hyper_arrays(idnode) -+ call alloc_inv_arrays(idnode) -+ call alloc_met_arrays(idnode) -+ call alloc_pair_arrays(idnode) -+ call alloc_pmf_arrays(idnode) -+ call alloc_prp_arrays(idnode) -+ call alloc_rgbdy_arrays(idnode) -+ call alloc_shake_arrays(idnode) -+ call alloc_site_arrays(idnode) -+ call alloc_sol_arrays(idnode) -+ call alloc_spme_arrays(idnode) -+ call alloc_tbp_arrays(idnode) -+ call alloc_ter_arrays(idnode) -+ call alloc_tet_arrays(idnode) -+ call alloc_vdw_arrays(idnode) -+ -+c start clock -+ -+ call timchk(0,tzero) -+ -+c input the control parameters defining the simulation -+ -+ call simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c input the system force field -+ -+ call sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) -+ -+c construct initial configuration of system -+ -+ call sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c construct initial bookkeeping arrays -+ -+ call sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c reset atom numbers for excitation simulation -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c set initial system temperature -+ -+ call systemp -+ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c read thermodynamic and structural data from restart file -+ -+ call sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c metadynamics by d. quigley -+ -+ if(lmetadyn) -+ x call define_metadynamics(idnode,mxnode,natms,temp) -+ -+c synchronise LRC, SIC and system charge terms for switching -+ -+ llswitch=.false. -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod((nstep-nswitch)/niswitch,2).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.true. -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c zero long range component of stress -+ -+ do i=1,9 -+ stresl(i)=0.d0 -+ enddo -+ -+c zero contraint terms -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ if(lminim.or.loptim.or.ntcons.eq.0)then -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c define target kinetic energy -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+c metadynamics by d. quigley -+ -+ sigma_shl=boltz*degshl*0.5d0 -+ -+c convert BPD parameters to internal units -+ -+ if(lbpd)then -+ -+ ebias=0.5d0*boltz*degfre*ebias -+ vmin=0.5d0*boltz*degfre*vmin -+ -+ endif -+ -+c time check -+ -+ call timchk(1,tzero) -+ -+c control variable for structure optimizer -+ -+ keystr=0 -+ stropt=.false. -+ -+ if(lminim)then -+ -+c first step of minimisation programme -+ -+ if(idnode.eq.0)write(nrite,"(1x,120('-'))") -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+c calculate initial conditions for velocity verlet -+ -+ elseif(keyver.eq.1.and.nstep.eq.0)then -+ -+c kinetic stress tensor at start -+ -+ call dcell(cell,celprp) -+ width=min(celprp(7),celprp(8),celprp(9)) -+ call kinstress(natms,idnode,mxnode,stress) -+ engke=0.5d0*(stress(1)+stress(5)+stress(9)) -+ do i=1,9 -+ stress(i)=stress(i)/dble(mxnode) -+ enddo -+ -+c calculate initial forces -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+ endif -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+c construct the first reference state -+ -+ call hyper_start -+ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, -+ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, -+ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, -+ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, -+ x hyp_units) -+ -+ endif -+ -+c perform selected NEB calculation -+ -+ if(lneb)then -+ -+ do i=1,numneb -+ -+ call neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), -+ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+ call scan_profile(nturn,estar) -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(1x,120('-'))") -+ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') -+ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ enddo -+ -+c bypass the MD cycle for this option -+ -+ recycle=.false. -+ -+ endif -+ -+c*********************************************************************** -+c start of molecular dynamics calculations -+c*********************************************************************** -+ -+ do while(recycle) -+ -+c increase step counter -+ -+ nstep=nstep+1 -+ recycle=(nstep.lt.nstrun) -+ -+c store velocities for free energy or solvation simulation -+ -+ if(keyver.eq.0)then -+ -+ if(lsolva)then -+ -+ vxo_sol(:)=vxx(:) -+ vyo_sol(:)=vyy(:) -+ vzo_sol(:)=vzz(:) -+ -+ elseif(lfree)then -+ -+ vxo_fre(:)=vxx(:) -+ vyo_fre(:)=vyy(:) -+ vzo_fre(:)=vzz(:) -+ -+ endif -+ -+ endif -+ -+c molecular switching option for excitation -+ -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod(nstep-nswitch,niswitch).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.not.llswitch -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c switch on the minimiser -+ -+ if(lminim)then -+ -+ lminnow=(mod(nstep,minstp).eq.0) -+ -+ endif -+ -+c conserved quantity (other than K + U) -+ -+ consv=0.d0 -+ -+c energy accumulators -+ -+ if(.not.lminnow)then -+ -+ engke=0.d0 -+ engrot=0.d0 -+ -+ endif -+ -+c calculate volume of simulation cell -+ -+ if(imcon.ne.0.and.imcon.ne.6)then -+ -+ call dcell(cell,celprp) -+ volm=celprp(10) -+ if(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ endif -+ -+ else -+ -+ volm=0.d0 -+ -+ endif -+ -+c reset sutton chen long range corrections (constant pressure only) -+ -+ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+c activate the impact option at designated time step -+ -+ if(lhit.and.nstep.eq.nhit)call impact -+ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) -+ -+c integrate equations of motion stage 1 of velocity verlet -+ -+ if(keyver.gt.0)then -+ -+ isw=1 -+ if(.not.loptim)then -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+ call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+ endif -+ -+ if(lminnow)then -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+ elseif(loptim.or.keyshl.ne.2)then -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+ else -+ -+ call shell_relaxation -+ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, -+ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, -+ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, -+ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, -+ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, -+ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, -+ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, -+ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, -+ x pass1,pass2,engord,virord) -+ -+ endif -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+c switching option for excitation simulation -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+c integrate equations of motion -+ -+ if(keyver.eq.0)then -+ -+c integrate equations of motion by leapfrog verlet -+ -+ if(.not.(loptim.or.lminnow))call lf_integrate -+ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, -+ x elrc,virlrc,virpmf) -+ -+ else if(keyver.gt.0)then -+ -+c integrate equations of motion by velocity verlet (stage 2) -+ -+ isw=2 -+ if(.not.loptim)call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ endif -+ -+c update the atomic positions for the ghost molecule -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+c long range correction adjustment for free energy and solvation -+ -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+c application of transition analysis procedures -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+ engtke=engke+engrot -+ call hyper_driver -+ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, -+ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, -+ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, -+ x tolnce,hyp_units,ebias,vmin) -+ -+ endif -+ -+c reset average boost factor in BPD during equilibration -+ -+ if(lbpd.and.keybpd.eq.1)then -+ -+ if(lzeql.and.nstep.le.nsteql)then -+ -+ numbpd=0 -+ tboost=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate shell kinetic energy -+ -+ if(keyshl.eq.1)then -+ -+ call corshl(idnode,mxnode,ntshl,shlke) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+c apply temperature scaling -+ -+ if((ltscal.and.nstep.le.nsteql).and. -+ x mod(nstep-nsteql,nstbts).eq.0)then -+ -+ chit=0.d0 -+ chit_shl=0.d0 -+ chip=0.d0 -+ do i=1,9 -+ eta(i)=0.d0 -+ enddo -+ -+ if(keyshl.eq.1) then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c reset atom velocities at intervals if required -+ -+ if(newgau)then -+ -+ if(mod(nstep,numgau).eq.0)call regauss -+ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+ endif -+ -+c calculate physical quantities -+ -+ if(nstep.gt.0)call static -+ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, -+ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, -+ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, -+ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, -+ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, -+ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, -+ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, -+ x virmet,engter,virter,boost,tboost) -+ -+c z density calculation -+ -+ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then -+ -+ call zden0(idnode,natms,mxnode,nzden,zlen) -+ -+ endif -+ -+c terminate program if boundary conditions violated -+ -+ if(imcon.gt.0.and.rcut.gt.width)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ call error(idnode,95) -+ -+ endif -+ -+c line-printer output every nstbpo steps -+ -+ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then -+ -+ call timchk(0,timelp) -+ if(idnode.eq.0)then -+ -+ call get_prntime(hms,timelp,prntim) -+ call get_simtime(dec,nstep,tstep,simtim) -+ if(mod(lines,npage).eq.0) -+ x write(nrite,"(1x,120('-'), -+ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, -+ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', -+ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, -+ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', -+ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', -+ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, -+ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', -+ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', -+ x 7x,'press',/,/, -+ x 1x,120('-'))") -+ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, -+ x /,1x,0p,f7.3,a1,1p,9e12.4)") -+ x nstep,(stpval(i),i=1,9), -+ x simtim,dec,(stpval(i),i=10,18), -+ x prntim,hms,(stpval(i),i=19,27) -+ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', -+ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ lines=lines+1 -+ -+ endif -+ -+c report end of equilibration period -+ -+ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then -+ -+ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) -+ x write(nrite,"(/,/,1x,'switching off temperature ', -+ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep -+ ltscal=.false. -+ -+ endif -+ -+c write trajectory data -+ -+ if(ltraj.and.nstep.ge.nstraj) then -+ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then -+ -+ call traject -+ x (ltraj,idnode,imcon,istraj,keytrj,natms, -+ x nstraj,nstep,tstep) -+ -+ endif -+ -+ endif -+ -+c write solvation energy file -+ -+ if(lsolva.and.nstep.ge.nsolva)then -+ -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ call solva_temp(idnode,mxnode,natms2,keyver) -+ call solvation_write(lexcite,lswitch,idnode,natms, -+ x nstep,nsolva,isolva,tstep,engunit,elrc) -+ -+ endif -+ -+ endif -+ -+c write free energy file -+ -+ if(lfree.and.nstep.ge.nfrn)then -+ -+ if(mod(nstep-nfrn,ifrn).eq.0)then -+ -+ call free_kinetic(lfrmas,idnode,mxnode,keyver) -+ call free_energy_write(idnode,nstep,engunit) -+ -+ endif -+ -+ endif -+ -+c save restart data in event of system crash -+ -+ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+ endif -+ -+c cycle time check -+ -+ call timchk(0,timelp) -+ recycle=(recycle.and.timjob-timelp.gt.timcls) -+ -+ enddo -+ -+c*********************************************************************** -+c end of molecular dynamics calculations -+c*********************************************************************** -+ -+c last time check -+ -+ call timchk(0,timelp) -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, -+ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") -+ x timelp,prntim,hms,timcls -+ -+c shell relaxation convergence statistics -+ -+ if(.not.loptim.and.keyshl.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'shell relaxation statistics : average cycles = ', -+ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 -+ -+ endif -+ -+c produce summary of simulation -+ -+ levcfg=2 -+ if(loptim)levcfg=0 -+ if(.not.lneb)call result -+ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, -+ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, -+ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, -+ x chit_shl) -+ -+c write hyperdynamics restart file -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+c close output channels -+ -+ if(idnode.eq.0) then -+ -+ close (nrite) -+ close (nstats) -+ close (nhist) -+ close (nevnt) -+ -+ endif -+ -+c terminate job -+ -+ call exitcomms() -+ -+ end -diff -urN dl_class_1.9.orig/srcmod/driver_module.f dl_class_1.9/srcmod/driver_module.f ---- dl_class_1.9.orig/srcmod/driver_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/driver_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,498 @@ -+ module driver_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining simulation driver routines -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - d.quigley nov 2010 metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use forces_module -+ use nlist_builders_module -+ use optimiser_module -+ use temp_scalers_module -+ -+ implicit none -+ -+ integer, parameter :: mxpass=250 -+ -+ contains -+ -+ subroutine molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero,newlst, -+ x stropt,cycle,ltad,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,keyfld,keyshl,keystr,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp, -+ x ntpter,ntpvdw,ntshl,ntteth,ntcons,numrdf,nsolva,isolva, -+ x alpha,delr,dlrpot,drewd,elrc,engang,engbnd,engcpe,engdih, -+ x engfbp,engfld,enginv,engshl,engsrp,engtbp,engter,engtet, -+ x epsq,fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih,virfbp,virfld, -+ x virinv,virlrc,virmet,virshl,virsrp,virtbp,virter,virtet,volm, -+ x engmet,virtot,engord,virord) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling subroutine calls in a standard -+c molecular dynamics simulation -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d.quigley nov 2010 metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero -+ logical newlst,stropt,cycle,ltad,lsolva,lfree,lghost -+ -+ integer idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons -+ integer keystr,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp -+ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql -+ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet -+ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,nsolva -+ integer isolva -+ -+ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd -+ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp -+ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp -+ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp -+ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp -+ real(8) virtbp,virter,virtet,volm,engmet,virtot -+ real(8) engord,virord -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces -+ -+ call force_manager -+ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c structure optimisation -+ -+ if(loptim.or.lzero)then -+ -+ call optimisation_selector -+ x (loptim,stropt,lzero,idnode,mxnode,natms,imcon,ntcons, -+ x nscons,ngrp,ntfree,keystr,keytol,engcfg,tstep,opttol) -+ -+ if(stropt.and.idnode.eq.0) -+ x write(nrite,"(/,/,1x,'structure optimisation converged ', -+ x 'at step ',i6,/,/,/,1x,120('-'))") nstep -+ -+ cycle=(cycle.and.(.not.stropt)) -+ -+ endif -+ -+c total virial (excluding constraint virial and c.o.m virial) -+c for npt routines note: virsrp already includes virlrc -+ -+ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet+virord -+ -+ return -+ end subroutine molecular_dynamics -+ -+ subroutine shell_relaxation -+ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, -+ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, -+ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, -+ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, -+ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, -+ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, -+ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, -+ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, -+ x pass1,pass2,engord,virord) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling subroutine calls in a -+c relaxed shell molecular dynamics simulation -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d.quigley nov 2010 metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical,save :: lfirst = .true. -+ logical lfcap,lgofr,lneut,lnsq,loglnk,lzeql,ltad -+ logical newlst,relaxed,shgofr,lsolva,lfree,lghost -+ -+ integer idnode,imcon,keyfce,keyfld,keyshl -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms -+ integer nhko,nlatt,nneut,nospl,nstbgr,nstep,nsteql -+ integer ntangl,ntbond,ntdihd,ntinv,ntpfbp,ntpmet -+ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf -+ integer keyrlx,ntpmls,pass,nsolva,isolva,ia,ib,ishl -+ -+ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd -+ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp -+ real(8) engtbp,engter,engtet,epsq,fmax,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp -+ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp -+ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp -+ real(8) virtbp,virter,virtet,volm,engmet,virtot,rlxtol -+ real(8) pass0,pass1,pass2,engord,virord -+ -+ real(8),allocatable,dimension(:),save :: xdcs,ydcs,zdcs -+ -+ pass=0 -+ keyrlx=0 -+ shgofr=lgofr -+ relaxed=.false. -+ -+ if(lfirst)then -+ -+ allocate(xdcs(1:ntshl)) -+ allocate(ydcs(1:ntshl)) -+ allocate(zdcs(1:ntshl)) -+ lfirst = .false. -+ -+ else -+ -+ do ishl=1,ntshl -+ -+ ia=listshl(ishl,2) -+ ib=listshl(ishl,3) -+ xxx(ib)=xxx(ia)+xdcs(ishl) -+ yyy(ib)=yyy(ia)+ydcs(ishl) -+ zzz(ib)=zzz(ia)+zdcs(ishl) -+ -+ enddo -+ -+ endif -+ -+ do while(.not.relaxed.and.pass.le.mxpass) -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces -+ -+ call force_manager -+ x (newlst,lneut,lnsq,shgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c total virial (excluding constraint virial and c.o.m virial) -+c for npt routines note: virsrp already includes virlrc -+ -+ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet+virord -+ -+c relaxed shell option -+ -+ call relax_shells -+ x (relaxed,keyrlx,idnode,mxnode,natms,ntpmls,tstep, -+ x rlxtol) -+ -+ if(relaxed)then -+ -+ pass1=pass0*pass1 -+ pass0=pass0+1.d0 -+ pass1=pass1/pass0+pass/pass0 -+ pass2=max(dble(pass),pass2) -+c$$$ write(104,'("Relaxed shells before step: ",I5)')pass+1 -+ -+ endif -+ -+ pass=pass+1 -+ if(pass.gt.mxpass)call error(idnode,1950) -+ shgofr=.false. -+ -+c end of shell relaxation -+ -+ enddo -+ -+c store vector connecting the cores to the shells -+ -+ do ishl=1,ntshl -+ -+ ia=listshl(ishl,2) -+ ib=listshl(ishl,3) -+ xdcs(ishl)=xxx(ib)-xxx(ia) -+ ydcs(ishl)=yyy(ib)-yyy(ia) -+ zdcs(ishl)=zzz(ib)-zzz(ia) -+ -+ enddo -+ -+ call images(imcon,0,1,ntshl,cell,xdcs,ydcs,zdcs) -+ -+ return -+ end subroutine shell_relaxation -+ -+ subroutine minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling subroutine calls in a -+c minimisation simulation -+c -+c copyright - daresbury laboratory -+c author - w. smith may 2007 -+c adapted - d.quigley nov 2010 metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lfcap,lneut,lnsq,loglnk,lzeql,newlst,stropt,shgofr -+ logical conopt,newjob,ltad,lsolva,lfree,lghost -+ -+ integer idnode,imcon,keyfce,keyfld,keyshl,keystr,pass,i -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,keytol -+ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql -+ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet -+ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,ntcons -+ integer fail,nsolva,isolva -+ -+ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd -+ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp -+ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter,sigma -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp -+ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp -+ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp,tolnce -+ real(8) virtbp,virter,virtet,volm,engmet,virtot,engcon -+ real(8) cfgmin,engunit,hnorm,grad0,grad1,ff1,sgn -+ real(8) engord,virord -+ -+ real(8), allocatable :: sxx(:),syy(:),szz(:) -+ -+ save cfgmin,newjob -+ -+ data newjob/.true./ -+ -+ pass=0 -+ keystr=0 -+ shgofr=.false. -+ stropt=.false. -+ -+c dummy variables -+ -+ ltad=.false. -+ lsolva=.false. -+ lfree=.false. -+ lghost=.false. -+ nsolva=0 -+ isolva=1 -+ -+c$$$c diagnostic printing (not usually active) -+c$$$ -+c$$$ if(idnode.eq.0)then -+c$$$ -+c$$$ write(nrite,"(1x,120('-'), -+c$$$ x /,/,1x,' pass',5x,'eng_cfg',5x,'eng_vdw',5x,'eng_cou', -+c$$$ x 5x,'eng_bnd',5x,'eng_ang',5x,'eng_dih',5x,'eng_tet', -+c$$$ x 5x,'eng_met',/,1x,120('-'))") -+c$$$ -+c$$$ endif -+ -+ do while(.not.stropt.and.pass.lt.mxpass) -+ -+ pass=pass+1 -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces -+ -+ call force_manager -+ x (newlst,lneut,lnsq,shgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c total virial (excluding constraint virial and c.o.m virial) -+c for npt routines note: virsrp already includes virlrc -+ -+ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet+virord -+ -+c conjugate gradient structure optimisation -+ -+ call strucopt -+ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+c$$$c diagnostic printing (not usually active) -+c$$$ -+c$$$ if(idnode.eq.0)then -+c$$$ -+c$$$ write(nrite,"(1x,i8,1p,8e12.4)") -+c$$$ x pass,engcfg/engunit,engsrp/engunit,engcpe/engunit, -+c$$$ x engbnd/engunit,engang/engunit,engdih/engunit,engtet/ -+c$$$ x engunit,engmet/engunit -+c$$$ write(nrite,"(1x,120('-'))") -+c$$$ -+c$$$ endif -+ -+c end of structure minimisation -+ -+ enddo -+ -+c ensure constraints are satisfied -+ -+ if(stropt.and.ntcons.gt.0)then -+ -+ allocate(sxx(mxatms),syy(mxatms),szz(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,9999) -+ -+c store current forces -+ -+ do i=1,natms -+ -+ sxx(i)=fxx(i) -+ syy(i)=fyy(i) -+ szz(i)=fzz(i) -+ -+ enddo -+ -+ keystr=0 -+ conopt=.false. -+ -+ do while(.not.conopt.and.pass.lt.mxpass) -+ -+ pass=pass+1 -+ engcon=0.d0 -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c conjugate gradient structure optimisation of constraint bonds -+ -+ call strucopt -+ x (conopt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,engcon,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+ enddo -+ -+c restore current forces -+ -+ do i=1,natms -+ -+ fxx(i)=sxx(i) -+ fyy(i)=syy(i) -+ fzz(i)=szz(i) -+ -+ enddo -+ -+ deallocate(sxx,syy,szz,stat=fail) -+ -+ endif -+ -+c write data summary -+ -+ if(idnode.eq.0)then -+ -+ if(stropt)then -+ -+ write(nrite,'(1x,"minimisation converged after ",i6," cycles" -+ x ," energy minimum: ",1pe12.4)')pass,engcfg/engunit -+ -+ else -+ -+ write(nrite,'(1x,"minimisation NOT converged after ",i6, -+ x " cycles")')pass -+ -+ endif -+ -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+c reset velocities after structure optimisation -+ -+ call regauss(idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+c write out minimised structure if lowest obtained so far -+ -+ if(newjob.or.cfgmin.gt.engcfg)then -+ -+ if(idnode.eq.0)call config_write('CFGMIN',0,imcon,natms,engcfg) -+ cfgmin=engcfg -+ newjob=.false. -+ -+ endif -+ -+ return -+ end subroutine minimiser -+ -+ end module driver_module -diff -urN dl_class_1.9.orig/srcmod/ensemble_tools_module.f dl_class_1.9/srcmod/ensemble_tools_module.f ---- dl_class_1.9.orig/srcmod/ensemble_tools_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/ensemble_tools_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1934 @@ -+ module ensemble_tools_module -+ -+c*********************************************************************** -+c -+c dl_poly module defining tools for ensemble simulations -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use core_shell_module -+ use property_module -+ use rigid_body_module -+ use utility_module -+ -+ contains -+ -+ function getmass(natms,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate total system mass -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,i,iatm0,iatm1 -+ real(8) getmass -+ -+ iatm0 = (idnode*natms)/mxnode+1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+ getmass=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ getmass=getmass+weight(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=getmass -+ call gdsum(buffer(1),1,buffer(2)) -+ getmass=buffer(1) -+ -+ endif -+ -+ return -+ end function getmass -+ -+ subroutine getcom(natms,idnode,mxnode,totmas,com) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system centre of mass -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,i,iatm0,iatm1 -+ real(8) totmas -+ -+ real(8) com(3) -+ -+ iatm0 = (idnode*natms)/mxnode+1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+ com(1)=0.d0 -+ com(2)=0.d0 -+ com(3)=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ com(1)=com(1)+weight(i)*xxx(i) -+ com(2)=com(2)+weight(i)*yyy(i) -+ com(3)=com(3)+weight(i)*zzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1) call gdsum(com,3,buffer) -+ -+ com(1)=com(1)/totmas -+ com(2)=com(2)/totmas -+ com(3)=com(3)/totmas -+ -+ return -+ end subroutine getcom -+ -+ subroutine getvom(natms,idnode,mxnode,totmas,vom) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system centre of mass -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,i,iatm0,iatm1 -+ real(8) totmas -+ -+ real(8) vom(3) -+ -+ iatm0 = (idnode*natms)/mxnode+1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+ vom(1)=0.d0 -+ vom(2)=0.d0 -+ vom(3)=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ vom(1)=vom(1)+weight(i)*vxx(i) -+ vom(2)=vom(2)+weight(i)*vyy(i) -+ vom(3)=vom(3)+weight(i)*vzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1) call gdsum(vom,3,buffer) -+ -+ vom(1)=vom(1)/totmas -+ vom(2)=vom(2)/totmas -+ vom(3)=vom(3)/totmas -+ -+ return -+ end subroutine getvom -+ -+ subroutine nvtscale -+ x (idnode,mxnode,natms,engke,sigma,tstep,qmass,taut,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NVT thermostat -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,i,iatm0,iatm1 -+ real(8) engke,sigma,tstep,qmass,chit,conint,scale,taut -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c update chit to 1/2 step -+ -+ chit=chit+tstep*(engke-sigma)/qmass -+ -+c thermostat the velocities -+ -+ scale=exp(-tstep*chit) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ engke=engke*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*qmass/taut**2 -+ -+c update chit to full step -+ -+ chit=chit+tstep*(engke-sigma)/qmass -+ -+ return -+ end subroutine nvtscale -+ -+ subroutine nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,tstep,pmass,qmass,taut, -+ x chip,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT thermostat -+c -+c copyright daresbury laboratory -+c author - w.smith july 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,i,iatm0,iatm1 -+ real(8) engke,temp,sigma,tstep,pmass,qmass,chip,chit,conint,scale -+ real(8) taut -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c update chit to 1/2 step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip**2-boltz*temp)/qmass -+ -+c thermostat the velocities -+ -+ scale=exp(-tstep*chit) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ engke=engke*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp) -+ -+c update chit to full step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip**2-boltz*temp)/qmass -+ -+ return -+ end subroutine nptscale_t -+ -+ subroutine nptscale_p -+ x (idnode,mxnode,natms,engke,tstep,pmass,chip,chit, -+ x volm,press,vircon,virtot) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT barostat -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,i,iatm0,iatm1 -+ real(8) engke,tstep,pmass,chip,press,vircon,virtot -+ real(8) volm,scale,chit -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c propagate chip to 1/2 step -+ -+ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon)- -+ x 3.d0*press*volm)/pmass-chip*chit) -+ -+c barostat the velocities -+ -+ scale=exp(-tstep*chip) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ engke=engke*scale**2 -+ -+c update volume parameter to full step -+ -+ volm=volm*exp(3.d0*tstep*chip) -+ -+c update chip to full step -+ -+ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon)- -+ x 3.d0*press*volm)/pmass-chip*chit) -+ -+ return -+ end subroutine nptscale_p -+ -+ subroutine nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x tstep,qmass,taut,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NVT thermostat -+c to atomic, group and quaternion momenta -+c -+c copyright daresbury laboratory -+c author - w.smith april 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 -+ integer ig -+ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut -+ real(8) conint,scale -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn+engrot -+ -+c update chit to 1/2 step -+ -+ chit=chit+tstep*(engke-sigma)/qmass -+ -+c thermostat scale parameter -+ -+ scale=exp(-tstep*chit) -+ -+c thermostat free atoms -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=scale*omx(ig) -+ omy(ig)=scale*omy(ig) -+ omz(ig)=scale*omz(ig) -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ engrot=engrot*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*qmass/taut**2 -+ -+c update chit to full step -+ -+ engke=engfke+engtrn+engrot -+ chit=chit+tstep*(engke-sigma)/qmass -+ -+ return -+ end subroutine nvtqscl -+ -+ subroutine nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp,sigma, -+ x tstep,pmass,qmass,taut,chip,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT thermostat -+c to atomic, group and quaternion momenta -+c -+c copyright daresbury laboratory -+c author - w.smith april 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 -+ integer ig -+ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut -+ real(8) conint,scale,chip,pmass,temp -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn+engrot -+ -+c update chit to 1/2 tstep -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip**2-boltz*temp)/qmass -+ -+c thermostat scale parameter -+ -+ scale=exp(-tstep*chit) -+ -+c thermostat free atoms -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=scale*omx(ig) -+ omy(ig)=scale*omy(ig) -+ omz(ig)=scale*omz(ig) -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ engrot=engrot*scale**2 -+ -+c update chi to full tstep -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp) -+ -+c update chit to full tstep -+ -+ engke=engfke+engtrn+engrot -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip**2-boltz*temp)/qmass -+ -+ return -+ end subroutine nptqscl_t -+ -+ subroutine nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,tstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT barostat -+c for system with atomic sites and rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,i,ngrp,ntfree,igrp1,igrp2,ifre1,ifre2 -+ integer j,ig -+ real(8) engke,tstep,pmass,chip,press,vircon,virtot -+ real(8) vircom,volm,scale,engtrn,engfke,chit -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c propagate chip to 1/2 tstep -+ -+ engke=engfke+engtrn -+ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon-vircom)- -+ x 3.d0*press*volm)/pmass-chip*chit) -+ -+c barostat the free atom velocities -+ -+ scale=exp(-tstep*chip) -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c barostat the group translational velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ -+c update volume parameter to full tstep -+ -+ volm=volm*exp(3.d0*tstep*chip) -+ -+c update chip to full tstep -+ -+ engke=engfke+engtrn -+ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon-vircom)- -+ x 3.d0*press*volm)/pmass-chip*chit) -+ -+ return -+ end subroutine nptqscl_p -+ -+ subroutine nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,tstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NST thermostat -+c -+c copyright daresbury laboratory -+c author - w.smith july 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,mode,i,iatm0,iatm1 -+ real(8) engke,temp,sigma,tstep,pmass,qmass,chip2,chit,conint,scale -+ real(8) taut,fac(0:3) -+ data fac/9.d0,3.d0,2.d0,5.d0/ -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate kinetic energy -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ engke=getkin(natms,idnode,mxnode) -+ -+c update chit to 1/2 step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+c thermostat the velocities -+ -+ scale=exp(-tstep*chit) -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ engke=engke*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) -+ -+c update chit to full step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+ return -+ end subroutine nstscale_t -+ -+ subroutine nstscale_p -+ x (idnode,mxnode,natms,mode,tstep,pmass,chit,press,volm) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT anisotropic barostat -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,mode,i,iatm0,iatm1 -+ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit -+ real(8) strkin(9),uni(9),celp(10) -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c propagate barostat momentum to 1/2 step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c barostat the velocities -+ -+ do i=iatm0,iatm1 -+ -+ txx=vxx(i) -+ tyy=vyy(i) -+ tzz=vzz(i) -+ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c new cell vectors -+ -+ call cell_update(tstep,cell,eta) -+ -+c update volume to full time step -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+c calculate kinetic energy and contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c propagate barostat momentum to full step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ return -+ end subroutine nstscale_p -+ -+ subroutine nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,tstep,pmass,qmass,taut,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT thermostat -+c to atomic, group and quaternion momenta -+c -+c copyright daresbury laboratory -+c author - w.smith april 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 -+ integer ig,mode -+ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut -+ real(8) conint,scale,chip2,pmass,temp,fac(0:3) -+ data fac/9.d0,3.d0,2.d0,5.d0/ -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c calculate kinetic energy -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn+engrot -+ -+c update chit to 1/2 step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+c thermostat scale parameter -+ -+ scale=exp(-tstep*chit) -+ -+c thermostat free atoms -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=scale*omx(ig) -+ omy(ig)=scale*omy(ig) -+ omz(ig)=scale*omz(ig) -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ engrot=engrot*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) -+ -+c update chit to full step -+ -+ engke=engfke+engtrn+engrot -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+ return -+ end subroutine nstqscl_t -+ -+ subroutine nstqscl_p -+ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT anisotropic barostat -+c for system with atomic sites and rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith may 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j -+ integer mode -+ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit -+ real(8) strkin(9),strgrp(9),uni(9),celp(10) -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c propagate barostat momentum to 1/2 step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c subtract kinetic contribution from stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ do i=1,9 -+ stress(i)=stress(i)-strkin(i)-strgrp(i) -+ enddo -+ -+c barostat the free atom velocities -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ txx=vxx(i) -+ tyy=vyy(i) -+ tzz=vzz(i) -+ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c barostat the group translational velocities -+ -+ do ig=igrp1,igrp2 -+ -+ txx=gvxx(ig) -+ tyy=gvyy(ig) -+ tzz=gvzz(ig) -+ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c new cell vectors -+ -+ call cell_update(tstep,cell,eta) -+ -+c new system volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+c add new kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i) -+ enddo -+ -+c propagate barostat momentum to full step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ return -+ end subroutine nstqscl_p -+ -+ subroutine nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,tstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT thermostat -+c to atomic, group and quaternion momenta -+c -+c copyright daresbury laboratory -+c author - w.smith april 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 -+ integer ig,mode -+ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut -+ real(8) conint,scale,chip2,pmass,temp,fac(0:3) -+ real(8) strkin(9),strgrp(9) -+ data fac/9.d0,3.d0,2.d0,5.d0/ -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c remove old kinetic term from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strkin(i)-strgrp(i) -+ enddo -+ -+c calculate kinetic energy -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn+engrot -+ -+c update chit to 1/2 step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+c thermostat scale parameter -+ -+ scale=exp(-tstep*chit) -+ -+c thermostat free atoms -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=scale*omx(ig) -+ omy(ig)=scale*omy(ig) -+ omz(ig)=scale*omz(ig) -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ engrot=engrot*scale**2 -+ -+c scale kinetic energy tensors -+ -+ do i=1,9 -+ -+ strkin(i)=strkin(i)*scale**2 -+ strgrp(i)=strgrp(i)*scale**2 -+ -+ enddo -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) -+ -+c update chit to full step -+ -+ engke=engfke+engtrn+engrot -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+c add new kinetic terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ return -+ end subroutine nstqscl_t2 -+ -+ subroutine nstqscl_p2 -+ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm, -+ x strkin,strgrp) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT anisotropic barostat -+c for system with atomic sites and rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith may 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j -+ integer mode -+ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit -+ real(8) strkin(9),strgrp(9),uni(9),celp(10) -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c propagate barostat momentum to 1/2 step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c subtract kinetic contribution from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strkin(i)-strgrp(i) -+ enddo -+ -+c barostat the free atom velocities -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ txx=vxx(i) -+ tyy=vyy(i) -+ tzz=vzz(i) -+ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c barostat the group translational velocities -+ -+ do ig=igrp1,igrp2 -+ -+ txx=gvxx(ig) -+ tyy=gvyy(ig) -+ tzz=gvzz(ig) -+ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c new cell vectors -+ -+ call cell_update(tstep,cell,eta) -+ -+c new system volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+c add new kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i) -+ enddo -+ -+c propagate barostat momentum to full step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ return -+ end subroutine nstqscl_p2 -+ -+ subroutine cell_update(tstep,cell,eta) -+ -+c*********************************************************************** -+c -+c dlpoly utility to update the cell vectors in the hoover -+c nst algorithms (velocity verlet version) -+c -+c copyright daresbury laboratory -+c author w.smith july 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i -+ real(8) tstep,cell(9),eta(9),ctmp(9),uni(9) -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ do i=1,9 -+ ctmp(i)=uni(i)+tstep*eta(i) -+ enddo -+ -+ call mat_mul(ctmp,cell,cell) -+ -+ return -+ end subroutine cell_update -+ -+ subroutine cell_propagate(tstep,cell,eta) -+ -+c*********************************************************************** -+c -+c dlpoly utility to update the cell vectors in the hoover -+c nst algorithms (leapfrog version) -+c -+c copyright daresbury laboratory -+c author w.smith july 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i -+ real(8) tstep -+ real(8) cell(9),eta(9),aaa(9),bbb(9),uni(9) -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ do i=1,9 -+ aaa(i)=tstep*eta(i) -+ enddo -+ -+ call mat_mul(aaa,aaa,bbb) -+ -+ do i=1,9 -+ bbb(i)=uni(i)+aaa(i)+0.5d0*bbb(i) -+ enddo -+ -+ call mat_mul(bbb,cell,cell) -+ -+ return -+ end subroutine cell_propagate -+ -+ subroutine nstqmtk_p -+ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm, -+ x engfke,engtrn,engrot,temp,sigma) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT anisotropic barostat -+c of martyna tobias and klein to atomic, group and quaternion -+c system with atomic sites and rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith may 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j -+ integer mode -+ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit,temp,sigma,degfre -+ real(8) engtke,engfke,engtrn,engrot,trace -+ real(8) strkin(9),strgrp(9),uni(9),ctmp(9) -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ degfre=2.d0*sigma/(temp*boltz) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c calculate kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c propagate barostat momentum to 1/2 step -+ -+ call invert(cell,ctmp,volm) -+ volm=abs(volm) -+ engtke=2.d0*(engfke+engtrn+engrot)/degfre -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)+strgrp(i)+ -+ x (engtke-press*volm)*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c barostat the free atom velocities -+ -+ trace=(eta(1)+eta(5)+eta(9))/degfre -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ txx=vxx(i) -+ tyy=vyy(i) -+ tzz=vzz(i) -+ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz+trace) -+ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz+trace) -+ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz+trace) -+ -+ enddo -+ -+c barostat the group translational velocities -+ -+ do ig=igrp1,igrp2 -+ -+ txx=gvxx(ig) -+ tyy=gvyy(ig) -+ tzz=gvzz(ig) -+ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz+trace) -+ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz+trace) -+ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz+trace) -+ -+ enddo -+ -+c update volume to full time step -+ -+ volm=volm*exp(tstep*(eta(1)+eta(5)+eta(9))) -+ -+c calculate kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate new kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=2.d0*(engfke+engtrn+engrot)/degfre -+ -+c propagate barostat momentum to full step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)+strgrp(i)+ -+ x (engtke-press*volm)*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ return -+ end subroutine nstqmtk_p -+ -+ subroutine kinstr(idnode,mxnode,natms,tstep) -+ -+c*********************************************************************** -+c -+c dlpoly routine to calculate the kinetic energy contribution to -+c the stress tensor -+c -+c assumes velocities are half-timestep behind forces -+c -+c replicated data version / block data -+c -+c copyright daresbury laboratory 1994 -+c author t.forester may 1994 -+c amended t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,i,iatm1,iatm2 -+ real(8) tstep,vxt,vyt,vzt -+ -+c block indices -+ -+ iatm1 = (idnode*natms)/mxnode + 1 -+ iatm2 = ((idnode+1)*natms)/mxnode -+ -+ do i = iatm1,iatm2 -+ -+ if(rmass(i).gt.0.d0) then -+ -+ vxt = vxx(i)+fxx(i)*rmass(i)*tstep*0.5d0 -+ vyt = vyy(i)+fyy(i)*rmass(i)*tstep*0.5d0 -+ vzt = vzz(i)+fzz(i)*rmass(i)*tstep*0.5d0 -+ -+ stress(1)=stress(1)-weight(i)*vxt*vxt -+ stress(2)=stress(2)-weight(i)*vxt*vyt -+ stress(3)=stress(3)-weight(i)*vxt*vzt -+ stress(4)=stress(4)-weight(i)*vyt*vxt -+ stress(5)=stress(5)-weight(i)*vyt*vyt -+ stress(6)=stress(6)-weight(i)*vyt*vzt -+ stress(7)=stress(7)-weight(i)*vzt*vxt -+ stress(8)=stress(8)-weight(i)*vzt*vyt -+ stress(9)=stress(9)-weight(i)*vzt*vzt -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine kinstr -+ -+ function getkin(natms,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system kinetic energy -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,i,iatm0,iatm1 -+ real(8) getkin,engke -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ engke=0.d0 -+ -+ do i=iatm0,iatm1 -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ call gdsum(buffer(1),1,buffer(2)) -+ engke=buffer(1) -+ -+ endif -+ -+ getkin=0.5d0*engke -+ -+ return -+ end function getkin -+ -+ function getkinf(ntfree,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate kinetic energy of atoms not in -+c rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ntfree,idnode,mxnode,i,j,ifre0,ifre1 -+ real(8) getkinf,engke -+ -+ ifre0=(idnode*ntfree)/mxnode+1 -+ ifre1=((idnode+1)*ntfree)/mxnode -+ -+ engke=0.d0 -+ -+ do j=ifre0,ifre1 -+ -+ i=lstfre(j) -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ call gdsum(buffer(1),1,buffer(2)) -+ engke=buffer(1) -+ -+ endif -+ -+ getkinf=0.5d0*engke -+ -+ return -+ end function getkinf -+ -+ subroutine getking(ngrp,idnode,mxnode,engtrn,engrot) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system kinetic energy -+c for rigid groups only -+c -+c copyright daresbury laboratory -+c author - m.leslie february 2003 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id -+ real(8) engtrn,engrot -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ engtrn=0.d0 -+ engrot=0.d0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c group kinetic energy -+ -+ engtrn=engtrn+ -+ x gmass(id)*(gvxx(ig)**2+gvyy(ig)**2+gvzz(ig)**2) -+ -+c rotational kinetic energy -+ -+ engrot=engrot+(rotinx(id,1)*omx(ig)**2 -+ x +rotiny(id,1)*omy(ig)**2 -+ x +rotinz(id,1)*omz(ig)**2) -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+ buffer(5)=engtrn -+ buffer(6)=engrot -+ call gdsum(buffer(5),2,buffer(1)) -+ engtrn=buffer(5) -+ engrot=buffer(6) -+ -+ endif -+ -+ engtrn=0.5d0*engtrn -+ engrot=0.5d0*engrot -+ -+ return -+ end subroutine getking -+ -+ function getkint(ngrp,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate translational kinetic energy -+c for rigid groups only -+c -+c copyright daresbury laboratory -+c author - w.smith october 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id -+ real(8) engtrn,getkint -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ engtrn=0.d0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c group kinetic energy -+ -+ engtrn=engtrn+ -+ x gmass(id)*(gvxx(ig)**2+gvyy(ig)**2+gvzz(ig)**2) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engtrn -+ call gdsum(buffer(1),1,buffer(2)) -+ engtrn=buffer(1) -+ -+ endif -+ -+ getkint=0.5d0*engtrn -+ -+ return -+ end function getkint -+ -+ function getkinr(ngrp,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate rotational kinetic energy -+c for rigid groups only -+c -+c copyright daresbury laboratory -+c author - w.smith october 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id -+ real(8) engrot,getkinr -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ engrot=0.d0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c rotational kinetic energy -+ -+ engrot=engrot+(rotinx(id,1)*omx(ig)**2 -+ x +rotiny(id,1)*omy(ig)**2 -+ x +rotinz(id,1)*omz(ig)**2) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engrot -+ call gdsum(buffer(1),1,buffer(2)) -+ engrot=buffer(1) -+ -+ endif -+ -+ getkinr=0.5d0*engrot -+ -+ return -+ end function getkinr -+ -+ subroutine kinstress(natms,idnode,mxnode,stresh) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate kinetic contribution to the -+c stress tensor -+c -+c copyright daresbury laboratory -+c author - w.smith november 2002 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,iatm0,iatm1,i -+ real(8) stresh(9) -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise stress tensor -+ -+ do i=1,9 -+ stresh(i)=0.d0 -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ do i=iatm0,iatm1 -+ -+ stresh(1)=stresh(1)+weight(i)*vxx(i)*vxx(i) -+ stresh(2)=stresh(2)+weight(i)*vxx(i)*vyy(i) -+ stresh(3)=stresh(3)+weight(i)*vxx(i)*vzz(i) -+ stresh(5)=stresh(5)+weight(i)*vyy(i)*vyy(i) -+ stresh(6)=stresh(6)+weight(i)*vyy(i)*vzz(i) -+ stresh(9)=stresh(9)+weight(i)*vzz(i)*vzz(i) -+ -+ enddo -+ -+ stresh(4)=stresh(2) -+ stresh(7)=stresh(3) -+ stresh(8)=stresh(6) -+ -+c global sum of stress tensor -+ -+ if(mxnode.gt.1) call gdsum(stresh,9,buffer) -+ -+ return -+ end subroutine kinstress -+ -+ subroutine kinstressg(ngrp,idnode,mxnode,stresh) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate kinetic contribution to the -+c stress tensor -+c -+c copyright daresbury laboratory -+c author - m.leslie february 2003 -+c -+c********************************************************************* -+ -+ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id -+ real(8) stresh(9) -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c initialise stress tensor -+ -+ do i=1,9 -+ stresh(i)=0.d0 -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ stresh(1)=stresh(1)+gmass(id)*gvxx(ig)*gvxx(ig) -+ stresh(2)=stresh(2)+gmass(id)*gvxx(ig)*gvyy(ig) -+ stresh(3)=stresh(3)+gmass(id)*gvxx(ig)*gvzz(ig) -+ stresh(5)=stresh(5)+gmass(id)*gvyy(ig)*gvyy(ig) -+ stresh(6)=stresh(6)+gmass(id)*gvyy(ig)*gvzz(ig) -+ stresh(9)=stresh(9)+gmass(id)*gvzz(ig)*gvzz(ig) -+ -+ enddo -+ -+ stresh(4)=stresh(2) -+ stresh(7)=stresh(3) -+ stresh(8)=stresh(6) -+ -+c global sum of stress tensor -+ -+ if(mxnode.gt.1) call gdsum(stresh,9,buffer) -+ -+ return -+ end subroutine kinstressg -+ -+ subroutine getkins(natms,idnode,mxnode,getkin) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system kinetic energy -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005: f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,iatm0,iatm1,i -+ real(8) getkin,engke -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ engke=0.d0 -+ -+ do i=iatm0,iatm1 -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ call gdsum(buffer(1),1,buffer(2)) -+ engke=buffer(1) -+ -+ endif -+ -+ getkin=0.5d0*engke -+ -+ return -+ end subroutine getkins -+ -+ subroutine kinstressf(ntfree,idnode,mxnode,stresh) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate kinetic contribution to the -+c stress tensor for unconstrained atoms -+c -+c copyright daresbury laboratory -+c author - m.leslie february 2003 -+c amended - w.smith january 2005: f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ntfree,idnode,mxnode,i,ifre1,ifre2,ifre -+ real(8) stresh(9) -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c initialise stress tensor -+ -+ do i=1,9 -+ stresh(i)=0.d0 -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ stresh(1)=stresh(1)+weight(i)*vxx(i)*vxx(i) -+ stresh(2)=stresh(2)+weight(i)*vxx(i)*vyy(i) -+ stresh(3)=stresh(3)+weight(i)*vxx(i)*vzz(i) -+ stresh(5)=stresh(5)+weight(i)*vyy(i)*vyy(i) -+ stresh(6)=stresh(6)+weight(i)*vyy(i)*vzz(i) -+ stresh(9)=stresh(9)+weight(i)*vzz(i)*vzz(i) -+ -+ enddo -+ -+ stresh(4)=stresh(2) -+ stresh(7)=stresh(3) -+ stresh(8)=stresh(6) -+ -+c global sum of stress tensor -+ -+ if(mxnode.gt.1) call gdsum(stresh,9,buffer) -+ -+ return -+ end subroutine kinstressf -+ -+ subroutine nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,tstep,qmass_shl, -+ x taut,chit_shl,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NVT thermostat -+c thermostats the core-shell relative motion -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c adapted - d. quigley 2006 : core-shell motion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl,i,ishl1,ishl2,j,k,m -+ real(8) shlke,sigma_shl,tstep,qmass_shl,chit_shl,conint -+ real(8) dvx,dvy,dvz,tmx,tmy,tmz,rmu,scale,taut -+ -+ ishl1=(idnode*ntshl)/mxnode+1 -+ ishl2=((idnode+1)*ntshl)/mxnode -+ -+c calculate kinetic energy -+ -+ call corshl(idnode,mxnode,ntshl,shlke) -+ -+c update chit to 1/2 step -+ -+ chit_shl=chit_shl+tstep*(shlke-sigma_shl)/qmass_shl -+ -+c thermostat the velocities -+ -+ scale=exp(-tstep*chit_shl) -+ -+ m=0 -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+ rmu=(weight(i)*weight(j))/(weight(i)+weight(j)) -+ -+ if(rmu.gt.0.d0)then -+ -+ dvx=vxx(j)-vxx(i) -+ dvy=vyy(j)-vyy(i) -+ dvz=vzz(j)-vzz(i) -+ -+ tmx=weight(i)*vxx(i)+weight(j)*vxx(j) -+ tmy=weight(i)*vyy(i)+weight(j)*vyy(j) -+ tmz=weight(i)*vzz(i)+weight(j)*vzz(j) -+ -+ vxx(i)=tmx/(weight(i)+weight(j))-scale*rmu*dvx/weight(i) -+ vxx(j)=tmx/(weight(i)+weight(j))+scale*rmu*dvx/weight(j) -+ vyy(i)=tmy/(weight(i)+weight(j))-scale*rmu*dvy/weight(i) -+ vyy(j)=tmy/(weight(i)+weight(j))+scale*rmu*dvy/weight(j) -+ vzz(i)=tmz/(weight(i)+weight(j))-scale*rmu*dvz/weight(i) -+ vzz(j)=tmz/(weight(i)+weight(j))+scale*rmu*dvz/weight(j) -+ -+ endif -+ -+ enddo -+ -+ shlke=shlke*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit_shl*qmass_shl/taut**2 -+ -+c update chit to full step -+ -+ chit_shl=chit_shl+tstep*(shlke-sigma_shl)/qmass_shl -+ -+ if(mxnode.gt.1) call shlmerge(idnode,mxnode,ntshl) -+ -+ return -+ end subroutine nvtscale_shl -+ -+ end module ensemble_tools_module -+ -diff -urN dl_class_1.9.orig/srcmod/error_module.f dl_class_1.9/srcmod/error_module.f ---- dl_class_1.9.orig/srcmod/error_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/error_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1513 @@ -+ module error_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining bond potentials -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ contains -+ -+ subroutine error(idnode,iode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for printing error messages and bringing -+c about a controlled termination of the program -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c -+c warning - this routine terminates the job. user must ensure -+c that all nodes are informed of error condition before this -+c subroutine is called. e.g. using subroutine gstate(). -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ logical kill -+ integer idnode,iode,kode -+ -+ kill=(iode.ge.0) -+ kode = abs(iode) -+ -+ if(idnode.eq.0)then -+ -+ if(kill)then -+ write(nrite,'(/,/,1x,a,i5)') -+ x 'DL_POLY terminated due to error ', kode -+ -+ else -+ -+ write(nrite,'(/,/,1x,a,i5)') -+ x 'DL_POLY will terminate due to error ', kode -+ -+ endif -+ -+ if(kode.lt.50)then -+ -+ if(kode.eq. 0)then -+ -+c dummy entry -+ -+ elseif(kode.eq. 3)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown directive found in CONTROL file' -+ elseif(kode.eq. 4)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown directive found in FIELD file' -+ elseif(kode.eq. 5)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown energy unit requested' -+ elseif(kode.eq. 6)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - energy unit not specified' -+ elseif(kode.eq. 7)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - energy unit respecified' -+ elseif(kode.eq. 8)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - time step not specified' -+ elseif(kode.eq.10)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many molecule types specified' -+ elseif(kode.eq.11)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate molecule directive in FIELD file' -+ elseif(kode.eq.12)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown molecule directive in FIELD file' -+ elseif(kode.eq.13)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - molecular species not yet specified' -+ elseif(kode.eq.14)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many unique atom types specified' -+ elseif(kode.eq.15)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate pair potential specified' -+ elseif(kode.eq.16)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - strange exit from FIELD file processing' -+ elseif(kode.eq.17)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - strange exit from CONTROL file processing' -+ elseif(kode.eq.18)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate 3-body potential specified' -+ elseif(kode.eq.19)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate 4-body potential specified' -+ elseif(kode.eq.20)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many molecule sites specified' -+ elseif(kode.eq.21)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate tersoff potential specified' -+ elseif(kode.eq.22)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unsuitable radial increment in TABLE file' -+ elseif(kode.eq.23)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incompatible FIELD and TABLE file potentials' -+ elseif(kode.eq.24)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of file encountered in TABLE file' -+ elseif(kode.eq.25)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - wrong atom type found in CONFIG file' -+ elseif(kode.eq.26)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cutoff smaller than EAM potential range' -+ elseif(kode.eq.27)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incompatible FIELD and TABEAM file potentials' -+ elseif(kode.eq.28)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer too small in mettab' -+ elseif(kode.eq.29)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of file encountered in TABEAM file' -+ elseif(kode.eq.30)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many chemical bonds specified' -+ elseif(kode.eq.31)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many chemical bonds in system' -+ elseif(kode.eq.32)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - integer array memory allocation failure' -+ elseif(kode.eq.33)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - real array memory allocation failure' -+ elseif(kode.eq.34)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - character array memory allocation failure' -+ elseif(kode.eq.35)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - logical array memory allocation failure' -+ elseif(kode.eq.36)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - failed fmet array allocation in mettab' -+ elseif(kode.eq.40)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many bond constraints specified' -+ elseif(kode.eq.41)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many bond constraints in system' -+ elseif(kode.eq.42)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer too small in merge1' -+ elseif(kode.eq.45)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many atoms in CONFIG file' -+ elseif(kode.eq.46)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - ewlbuf array too small in ewald1' -+ elseif(kode.eq.47)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer too small in merge' -+ elseif(kode.eq.48)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer too small in fortab' -+ elseif(kode.eq.49)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - frozen core-shell unit specified' -+ endif -+ -+ elseif(kode.lt.100)then -+ -+ if(kode.eq.50)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many bond angles specified' -+ elseif(kode.eq.51)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many bond angles in system' -+ elseif(kode.eq.52)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of FIELD file encountered' -+ elseif(kode.eq.53)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of CONTROL file encountered' -+ elseif(kode.eq.54)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - problem reading CONFIG file' -+ elseif(kode.eq.55)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of CONFIG file encountered' -+ elseif(kode.eq.57)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many core-shell units specified' -+ elseif(kode.eq.59)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many core-shell units in system' -+ elseif(kode.eq.60)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many dihedral angles specified' -+ elseif(kode.eq.61)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many dihedral angles in system' -+ elseif(kode.eq.62)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many tethered atoms specified' -+ elseif(kode.eq.63)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many tethered atoms in system' -+ elseif(kode.eq.65)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many excluded pairs specified' -+ elseif(kode.eq.66)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect boundary condition for HK ewald' -+ elseif(kode.eq.67)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect boundary condition in thbfrc' -+ elseif(kode.eq.69)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many link cells required in thbfrc' -+ elseif(kode.eq.70)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - constraint bond quench failure' -+ elseif(kode.eq.71)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many metal potentials specified' -+ elseif(kode.eq.72)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - different metal potential types specified' -+ elseif(kode.eq.73)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many inversion potentials specified' -+ elseif(kode.eq.75)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many atoms in specified system' -+ elseif(kode.eq.77)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many inversion potentials in system' -+ elseif(kode.eq.79)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect boundary condition in fbpfrc' -+ elseif(kode.eq.80)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many pair potentials specified' -+ elseif(kode.eq.81)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in pair potential list' -+ elseif(kode.eq.82)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - calculated pair potential index too large' -+ elseif(kode.eq.83)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many three body potentials specified' -+ elseif(kode.eq.84)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in 3-body potential list' -+ elseif(kode.eq.85)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - required velocities not in CONFIG file' -+ elseif(kode.eq.86)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - calculated 3-body potential index too large' -+ elseif(kode.eq.87)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many link cells required in fbpfrc' -+ elseif(kode.eq.88)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many tersoff potentials specified' -+ elseif(kode.eq.89)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many four body potentials specified' -+ elseif(kode.eq.90)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - system total electric charge nonzero' -+ elseif(kode.eq.91)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in 4-body potential list' -+ elseif(kode.eq.92)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in tersoff potential list' -+ elseif(kode.eq.93)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cannot use shell model with rigid molecules' -+ elseif(kode.eq.95)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - potential cutoff exceeds half-cell width' -+ elseif(kode.eq.97)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cannot use shell model with neutral groups' -+ elseif(kode.eq.99)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cannot use shell model with constraints' -+ endif -+ -+ elseif(kode.lt.150)then -+ -+ if(kode.eq.100)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - forces working arrays too small' -+ elseif(kode.eq.101)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - calculated 4-body potential index too large' -+ elseif(kode.eq.102)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - parameter mxproc exceeded in shake arrays' -+ elseif(kode.eq.103)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - parameter mxlshp exceeded in shake arrays' -+ elseif(kode.eq.105)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - shake algorithm failed to converge' -+ elseif(kode.eq.106)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parlink ' -+ x //'subroutine' -+ elseif(kode.eq.107)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parlinkneu ' -+ x //'subroutine' -+ elseif(kode.eq.108)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parneulst ' -+ x //'subroutine' -+ elseif(kode.eq.109)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parlst_nsq ' -+ x //'subroutine' -+ elseif(kode.eq.110)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parlst ' -+ x //'subroutine' -+ elseif(kode.eq.112)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - vertest array too small' -+ elseif(kode.eq.120)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - invalid determinant in matrix inversion' -+ elseif(kode.eq.130)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect octahedral boundary condition' -+ elseif(kode.eq.135)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect hexagonal prism boundary condition' -+ elseif(kode.eq.140)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect dodecahedral boundary condition' -+ elseif(kode.eq.141)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate metal potential specified' -+ elseif(kode.eq.142)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - interpolation outside range of metal '// -+ x 'potential attempted' -+ elseif(kode.eq.145)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - no van der waals potentials defined' -+ endif -+ -+ elseif(kode.lt.200)then -+ -+ if(kode.eq.150)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown van der waals potential selected' -+ elseif(kode.eq.151)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown metal potential selected' -+ elseif(kode.eq.153)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - metals not permitted with multiple timestep' -+ elseif(kode.eq.160)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unaccounted for atoms in exclude list ' -+ elseif(kode.eq.170)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many variables for statistic array ' -+ elseif(kode.eq.180)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - Ewald sum requested in non-periodic system' -+ elseif(kode.eq.185)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many reciprocal space vectors' -+ elseif(kode.eq.186)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer array too small in sysgen' -+ elseif(kode.eq.190)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - buffer array too small in splice' -+ endif -+ -+ elseif(kode.lt.250)then -+ -+ if(kode.eq.200)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - rdf buffer array too small in revive' -+ elseif(kode.eq.220)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many neutral groups in system' -+ elseif(kode.eq.225)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - multiple selection of optimisation options' -+ elseif(kode.eq.230)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neutral groups improperly arranged' -+ endif -+ -+ elseif(kode.lt.300)then -+ -+ if(kode.eq.250)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - Ewald sum requested with neutral groups' -+ elseif(kode.eq.260)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - parameter mxexcl exceeded in excludeneu routine' -+ endif -+ -+ elseif(kode.lt.350)then -+ -+ if(kode.eq.300)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect boundary condition in parlink' -+ elseif(kode.eq.301)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many rigid body types ' -+ elseif(kode.eq.302)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many sites in rigid body ' -+ elseif(kode.eq.303)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many rigid bodies specified' -+ elseif(kode.eq.304)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many rigid body sites in system ' -+ elseif(kode.eq.305)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - box size too small for link cells' -+ elseif(kode.eq.306)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - failed to find principal axis system' -+ elseif(kode.eq.310)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - quaternion setup failed ' -+ elseif(kode.eq.320)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - site in multiple rigid bodies' -+ elseif(kode.eq.321)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - quaternion integrator failed' -+ elseif(kode.eq.330)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - mxewld parameter incorrect' -+ elseif(kode.eq.331)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - mxhke parameter incorrect' -+ elseif(kode.eq.332)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - mxhko parameter too small' -+ elseif(kode.eq.340)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - invalid integration option requested' -+ endif -+ -+ elseif(kode.lt.400)then -+ -+ if(kode.eq.350)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too few degrees of freedom' -+ elseif(kode.eq.360)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - frozen atom found in rigid body' -+ elseif(kode.eq.380)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - simulation temperature not specified' -+ elseif(kode.eq.381)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - simulation timestep not specified' -+ elseif(kode.eq.382)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - simulation cutoff not specified' -+ elseif(kode.eq.383)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - simulation forces option not specified' -+ elseif(kode.eq.384)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - verlet strip width not specified' -+ elseif(kode.eq.385)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - primary cutoff not specified' -+ elseif(kode.eq.386)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - primary cutoff larger than rcut' -+ elseif(kode.eq.387)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - system pressure not specified' -+ elseif(kode.eq.388)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - npt incompatible with multiple timestep' -+ elseif(kode.eq.389)then -+ write(nrite,'(/,/,1x,a)') -+ x 'number of pimd beads not specified in field file' -+ elseif(kode.eq.390)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - npt ensemble requested in non-periodic system' -+ elseif(kode.eq.391)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect number of pimd beads in config file' -+ elseif(kode.eq.392)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many link cells requested' -+ elseif(kode.eq.394)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - minimum image arrays exceeded' -+ elseif(kode.eq.396)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - interpolation array exceeded' -+ elseif(kode.eq.398)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cutoff too small for rprim and delr' -+ endif -+ -+ elseif(kode.lt.450)then -+ -+ if(kode.eq.400)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - rvdw greater than cutoff' -+ elseif(kode.eq.402)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - van der waals cutoff unset' -+ elseif(kode.eq.410)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cell not consistent with image convention' -+ elseif(kode.eq.412)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - mxxdf parameter too small for shake routine' -+ elseif(kode.eq.414)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - conflicting ensemble options in CONTROL file' -+ elseif(kode.eq.416)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - conflicting force options in CONTROL file' -+ elseif(kode.eq.418)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in bndfrc' -+ elseif(kode.eq.419)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in angfrc' -+ elseif(kode.eq.420)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in tethfrc' -+ elseif(kode.eq.421)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in dihfrc' -+ elseif(kode.eq.422)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - all-pairs must use multiple timestep' -+ elseif(kode.eq.423)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in shlfrc' -+ elseif(kode.eq.424)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - electrostatics incorrect for all-pairs' -+ elseif(kode.eq.425)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer array too small in shlmerge' -+ elseif(kode.eq.426)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neutral groups not permitted with all-pairs' -+ elseif(kode.eq.427)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in invfrc' -+ elseif(kode.eq.430)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - integration routine not available' -+ elseif(kode.eq.432)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - intlist failed to assign constraints ' -+ elseif(kode.eq.433)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - specify rcut before the Ewald sum precision' -+ elseif(kode.eq.434)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - illegal entry into STRESS related routine' -+ elseif(kode.eq.435)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - specify rcut before the coulomb precision' -+ elseif(kode.eq.436)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unrecognised ensemble ' -+ elseif(kode.eq.438)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - PMF constraints failed to converge' -+ elseif(kode.eq.440)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined angular potential' -+ elseif(kode.eq.442)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined three body potential' -+ elseif(kode.eq.443)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined four body potential' -+ elseif(kode.eq.444)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined bond potential' -+ elseif(kode.eq.445)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined many body potential' -+ elseif(kode.eq.446)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined electrostatic key in dihfrc' -+ elseif(kode.eq.447)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - 1-4 separation exceeds cutoff range' -+ elseif(kode.eq.448)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined dihedral potential' -+ elseif(kode.eq.449)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined inversion potential' -+ endif -+ -+ elseif(kode.lt.500)then -+ -+ if(kode.eq.450)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined tethering potential' -+ elseif(kode.eq.451)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - three body potential cutoff undefined' -+ elseif(kode.eq.452)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined pair potential' -+ elseif(kode.eq.453)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - four body potential cutoff undefined' -+ elseif(kode.eq.454)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined external field' -+ elseif(kode.eq.456)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - core and shell in same rigid unit' -+ elseif(kode.eq.458)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many PMF constraints - param. mspmf too ' -+ x //'small' -+ elseif(kode.eq.460)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many PMF sites - parameter mxspmf too small' -+ elseif(kode.eq.461)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined metal potential' -+ elseif(kode.eq.462)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - PMF UNIT record expected' -+ elseif(kode.eq.463)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in metal potential list' -+ elseif(kode.eq.464)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - thermostat time constant must be > 0.d0' -+ elseif(kode.eq.465)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - calculated pair potential index too large' -+ elseif(kode.eq.466)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - barostat time constant must be > 0.d0' -+ elseif(kode.eq.468)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - r0 too large for snm potential with current ' -+ x //'cutoff' -+ elseif(kode.eq.470)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - n= ',nsatms -+ call error(idnode,100) -+ -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+c variables for array bound checking -+ -+ ibig=0 -+ safe=.true. -+ -+c initialise excluded atom arrays -+ -+ do i=1,mxsite -+ -+ nexsit(i)=0 -+ -+ enddo -+ -+ do i=1,msatms -+ -+ nexatm(i)=0 -+ -+ enddo -+ -+ do j=1,mxexcl -+ -+ do i=1,mxsite -+ -+ lexsit(i,j)=0 -+ -+ enddo -+ -+ do i=1,msatms -+ -+ lexatm(i,j)=0 -+ -+ enddo -+ -+ enddo -+ -+ -+c loop over molecules in system -+ -+ ibonds=0 -+ iangle=0 -+ iconst=0 -+ idihdr=0 -+ invers=0 -+ igrp =0 -+ isite =0 -+ ishels=0 -+ -+ do itmols=1,ntpmls -+ -+c exclude sites on basis of chemical bonds -+ -+ do i=1,numbonds(itmols) -+ -+ ibonds=ibonds+1 -+ -+ if(keybnd(ibonds).gt.0)then -+ -+ ia=lstbnd(ibonds,1)+isite -+ ib=lstbnd(ibonds,2)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of bond constraints -+ -+ do i=1,numcon(itmols) -+ -+ iconst=iconst+1 -+ ia=lstcon(iconst,1)+isite -+ ib=lstcon(iconst,2)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+ enddo -+ -+c exclude sites on basis of bond angles -+ -+ do i=1,numang(itmols) -+ -+ iangle=iangle+1 -+ if(keyang(iangle).gt.0)then -+ ia=lstang(iangle,1)+isite -+ ib=lstang(iangle,2)+isite -+ ic=lstang(iangle,3)+isite -+ -+c check if already added to lists .. -+c ia - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+c ib - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib),mxexcl) -+ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib)=nexsit(ib)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ib,nexsit(ib))=ic-isite -+ lexsit(ic,nexsit(ic))=ib-isite -+ endif -+ endif -+ -+c ia - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ic-isite -+ lexsit(ic,nexsit(ic))=ia-isite -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude on basis of rigid groups -+ -+ do i=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ id=listyp(igrp) -+ -+ do jj=1,numgsit(id)-1 -+ -+ ia=lstgst(igrp,jj)+isite -+ -+ do jk=jj+1,numgsit(id) -+ -+ ib=lstgst(igrp,jk)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c exclude sites on basis of 1-4 dihedral angles -+ -+ do i=1,numdih(itmols) -+ -+ idihdr=idihdr+1 -+ ia=lstdih(idihdr,1)+isite -+ ib=lstdih(idihdr,2)+isite -+ ic=lstdih(idihdr,3)+isite -+ id=lstdih(idihdr,4)+isite -+ -+c check if already added to lists .. -+c ia - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+c ib - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib),mxexcl) -+ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib)=nexsit(ib)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ib,nexsit(ib))=ic-isite -+ lexsit(ic,nexsit(ic))=ib-isite -+ endif -+ endif -+ -+c ia - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ic-isite -+ lexsit(ic,nexsit(ic))=ia-isite -+ endif -+ endif -+ -+c id - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(id),mxexcl) -+ if(lexsit(id,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(id)=nexsit(id)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(id),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(id),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(id,nexsit(id))=ib-isite -+ lexsit(ib,nexsit(ib))=id-isite -+ endif -+ endif -+ -+c id - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(id),mxexcl) -+ if(lexsit(id,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(id)=nexsit(id)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(id),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(id),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(id,nexsit(id))=ic-isite -+ lexsit(ic,nexsit(ic))=id-isite -+ endif -+ endif -+ -+c ia - id interaction: may need to reset vdw and elec scale factors -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.id-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(id)=nexsit(id)+1 -+ if(max(nexsit(ia),nexsit(id)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(id)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=id-isite -+ lexsit(id,nexsit(id))=ia-isite -+ endif -+ -+ elseif(keydih(idihdr).ne.7)then -+ -+c if already excluded reset 1..4 vdw and coulombic scale factors -+ -+ check=((abs(prmdih(idihdr,4)).gt.1.d-10).or. -+ x (abs(prmdih(idihdr,5)).gt.1.d-10)) -+ -+ if(check)then -+ -+ a1=dble(itmols) -+ a2=dble(ia) -+ a3=dble(id) -+ call warning(idnode,20,a1,a2,a3) -+ -+ prmdih(idihdr,4)=0.d0 -+ prmdih(idihdr,5)=0.d0 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of inversion potentials -+ -+ do i=1,numinv(itmols) -+ -+ invers=invers+1 -+ ia=lstinv(invers,1)+isite -+ ib=lstinv(invers,2)+isite -+ ic=lstinv(invers,3)+isite -+ id=lstinv(invers,4)+isite -+ -+c check if already added to lists .. -+c ia - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+c ib - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib),mxexcl) -+ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib)=nexsit(ib)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ib,nexsit(ib))=ic-isite -+ lexsit(ic,nexsit(ic))=ib-isite -+ endif -+ endif -+ -+c ia - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ic-isite -+ lexsit(ic,nexsit(ic))=ia-isite -+ endif -+ endif -+ -+c id - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(id),mxexcl) -+ if(lexsit(id,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(id)=nexsit(id)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(id),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(id),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(id,nexsit(id))=ib-isite -+ lexsit(ib,nexsit(ib))=id-isite -+ endif -+ endif -+ -+c id - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(id),mxexcl) -+ if(lexsit(id,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(id)=nexsit(id)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(id),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(id),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(id,nexsit(id))=ic-isite -+ lexsit(ic,nexsit(ic))=id-isite -+ endif -+ endif -+ -+c ia - id interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.id-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(id)=nexsit(id)+1 -+ if(max(nexsit(ia),nexsit(id)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(id)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=id-isite -+ lexsit(id,nexsit(id))=ia-isite -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of core-shell units -+ -+ do i=1,numshl(itmols) -+ -+ ishels=ishels+1 -+ -+ ia=lstshl(ishels,1)+isite -+ ib=lstshl(ishels,2)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+c exclude sites on basis of bonds to core-shell units -+ -+ ibonds=ibonds-numbonds(itmols) -+ do kk=1,numbonds(itmols) -+ -+ ibonds=ibonds+1 -+ -+ if(keybnd(ibonds).gt.0)then -+ -+ ia1=lstbnd(ibonds,1)+isite -+ ib1=lstbnd(ibonds,2)+isite -+ -+ if(ia.eq.ia1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib1),mxexcl) -+ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib1)=nexsit(ib1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ib1,nexsit(ib1))=ib-isite -+ lexsit(ib,nexsit(ib))=ib1-isite -+ endif -+ endif -+ -+ endif -+ -+ if(ia.eq.ib1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia1),mxexcl) -+ if(lexsit(ia1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia1)=nexsit(ia1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia1,nexsit(ia1))=ib-isite -+ lexsit(ib,nexsit(ib))=ia1-isite -+ endif -+ endif -+ -+ endif -+ -+ if(ib.eq.ia1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib1)=nexsit(ib1)+1 -+ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib1-isite -+ lexsit(ib1,nexsit(ib1))=ia-isite -+ endif -+ endif -+ -+ endif -+ if(ib.eq.ib1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ia1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ia1)=nexsit(ia1)+1 -+ if(max(nexsit(ia),nexsit(ia1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ia1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ia1-isite -+ lexsit(ia1,nexsit(ia1))=ia-isite -+ endif -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of constraint bonds to core-shell units -+ -+ iconst=iconst-numcon(itmols) -+ do kk=1,numcon(itmols) -+ -+ iconst=iconst+1 -+ -+ ia1=lstcon(iconst,1)+isite -+ ib1=lstcon(iconst,2)+isite -+ -+ if(ia.eq.ia1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib1),mxexcl) -+ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib1)=nexsit(ib1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ib1,nexsit(ib1))=ib-isite -+ lexsit(ib,nexsit(ib))=ib1-isite -+ endif -+ endif -+ -+ endif -+ -+ if(ia.eq.ib1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia1),mxexcl) -+ if(lexsit(ia1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia1)=nexsit(ia1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia1,nexsit(ia1))=ib-isite -+ lexsit(ib,nexsit(ib))=ia1-isite -+ endif -+ endif -+ -+ endif -+ -+ if(ib.eq.ia1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib1)=nexsit(ib1)+1 -+ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib1-isite -+ lexsit(ib1,nexsit(ib1))=ia-isite -+ endif -+ endif -+ -+ endif -+ if(ib.eq.ib1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ia1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ia1)=nexsit(ia1)+1 -+ if(max(nexsit(ia),nexsit(ia1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ia1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ia1-isite -+ lexsit(ia1,nexsit(ia1))=ia-isite -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of rigid units involving core or shell -+ -+ igrp=igrp-numgrp(itmols) -+ do kk=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ id=listyp(igrp) -+ -+ do jj=1,numgsit(id) -+ -+ ia1=lstgst(igrp,jj)+isite -+ if(ia1.eq.ia)then -+ -+ do jk=1,numgsit(id) -+ -+ if(jk.ne.jj)then -+ ib1=lstgst(igrp,jk)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib1),mxexcl) -+ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib1)=nexsit(ib1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ib1,nexsit(ib1))=ib-isite -+ lexsit(ib,nexsit(ib))=ib1-isite -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ if(ia1.eq.ib)then -+ -+ do jk=1,numgsit(id) -+ -+ if(jk.ne.jj)then -+ ib1=lstgst(igrp,jk)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib1)=nexsit(ib1)+1 -+ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib1-isite -+ lexsit(ib1,nexsit(ib1))=ia-isite -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ ntpsit=isite -+ -+c check for exceeded array bounds -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)then -+ if(mxnode.gt.1)call gimax(ibig,1,jj) -+ if(idnode.eq.0)write(nrite,*)'mxexcl must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxexcl is currently ',mxexcl -+ call error(idnode,65) -+ endif -+ -+c remove redundant entries from exclusion list -+c (there shouldn't be any!) -+ -+ do i=1,ntpsit -+ -+ nlast=nexsit(i) -+ do j=1,nexsit(i)-1 -+ -+ if(j.lt.nlast)then -+ -+ kk=j -+ do k=j+1,nexsit(i) -+ -+ if(lexsit(i,j).eq.lexsit(i,k))then -+ -+ nlast=nlast-1 -+ lexsit(i,k)=0 -+ -+ else if(lexsit(i,k).gt.0)then -+ -+ kk=kk+1 -+ lexsav=lexsit(i,k) -+ lexsit(i,k)=0 -+ lexsit(i,kk)=lexsav -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ nexsit(i)=nlast -+ -+ enddo -+ -+ return -+ end subroutine exclude -+ -+ subroutine excludeneu(idnode,mxnode,nneut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the excluded pair -+c interaction list of the system to be simulated -+c part 2 - neutral group implementation -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk -+ integer idnode,mxnode,nneut,ibig,iatom,jatom,last,mpm2 -+ integer npm2,m,ii,im,itmols,inoff,isoff,isit,iolsit,jm,jtmols -+ integer jnoff,jsoff,jsit,jolsit,jn1,jno1,jsite,jsite0,in1,ino1 -+ integer jj0,isite,ij,idum,it -+ -+c construct excluded pair list for verlet neighbour correction -+ -+ ibig=0 -+ iatom=0 -+ jatom=0 -+ -+c generate all atomic pairs and check for exclusions -+c with Brode Ahlrichs ordering of groups -+ -+ last=nneut -+ lchk=.true. -+ mpm2=nneut/2+1 -+ npm2=(nneut-1)/2+1 -+ -+c outer loop over groups -+ -+ do m=1,mpm2 -+ -+ if(m.gt.npm2)last=mpm2-1 -+ -+c inner loop over groups - include intragroup interactions -+ -+ ii=0 -+ -+ do im=idnode+1,last,mxnode -+ -+ ii=ii+1 -+ -+c first site in neutral group -+ -+ itmols=1 -+ inoff=0 -+ isoff=0 -+ isit=numsit(itmols)*nummols(itmols) -+ iolsit=numsit(itmols) -+ -+c calculate j group indices -+ -+ jm=im+m-1 -+ if(jm.gt.nneut)jm=jm-nneut -+ -+c inner loop over neutral groups -+ -+ jtmols=1 -+ jnoff=0 -+ jsoff=0 -+ jsit=numsit(jtmols)*nummols(jtmols) -+ jolsit=numsit(jtmols) -+ -+c test first sites in neutral group -+ -+ jatom=neulst(jm) -+ -+c establish pointer to sets -+ -+ do while(jatom.gt.jsit) -+ -+ jtmols=jtmols+1 -+ jnoff=jsit -+ jsoff=jsoff+jolsit -+ jsit=jsit+nummols(jtmols)*numsit(jtmols) -+ jolsit=numsit(jtmols) -+ -+ enddo -+ -+ jn1=jatom-jnoff -+ jno1=(jn1/jolsit)*jolsit -+ jsite=jn1-jno1 -+ if(jsite.eq.0)then -+ jsite=jolsit -+ jno1=jno1-jolsit -+ endif -+ jsite=jsite+jsoff -+ jsite0=jsite-1 -+ -+ do iatom=neulst(im),neulst(im+1)-1 -+ -+c establish pointer to sets -+ -+ do while(iatom.gt.isit) -+ -+ itmols=itmols+1 -+ inoff=isit -+ isoff=isoff+iolsit -+ isit=isit+nummols(itmols)*numsit(itmols) -+ iolsit=numsit(itmols) -+ -+ enddo -+ -+ in1=iatom-inoff -+ ino1=(in1/iolsit)*iolsit -+ isite=in1-ino1 -+ if(isite.eq.0)then -+ isite=iolsit -+ ino1=ino1-iolsit -+ endif -+ isite=isite+isoff -+ -+c test im and jm are neutral groups on same molecule -+ -+ if((jnoff.eq.inoff).and.(ino1.eq.jno1))then -+ if(abs(im-jm).lt.iolsit)then -+ -+ jj0=neulst(jm) -+ jsite=jsite0 -+ -+c special case for im=jm (ie. same group) -+ -+ if(im.eq.jm)then -+ -+ jj0=iatom+1 -+ jsite=isite -+ -+ endif -+ -+c test for excluded interaction -+ -+ do jatom=jj0,neulst(jm+1)-1 -+ -+ jsite=jsite+1 -+ -+ do ij=1,nexsit(isite) -+ -+ if(lexsit(isite,ij).eq.jsite-jsoff)then -+ -+ it=nexatm(ii) -+ -+ if(it+2.gt.mxexcl)then -+ -+ ibig=max(it+2,ibig) -+ nexatm(ii)=it+2 -+ lchk=.false. -+ -+ else -+ -+ lexatm(ii,it+1)=iatom -+ lexatm(ii,it+2)=jatom -+ nexatm(ii)=nexatm(ii)+2 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ endif -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c global check -+ -+ call gstate(lchk) -+ if(.not.lchk)then -+ -+ if(mxnode.gt.1)call gimax(ibig,1,idum) -+ if(idnode.eq.0)write(nrite,*)'mxexcl must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxexcl is currently ',mxexcl -+ call error(idnode,260) -+ -+ endif -+ -+ return -+ end subroutine excludeneu -+ -+ subroutine exclude_link(idnode,mxnode,ntpmls) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the excluded pair -+c interaction list of the system to be simulated -+c -+c part 2 - link cell implementation -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith june 1992 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,ntpmls,iatom,jatom,lsite,ksite -+ integer itmols,imols,isite,kk,newatm,k -+ -+c construct excluded pair list for verlet neighbour correction -+ -+ iatom=0 -+ jatom=0 -+ lsite=0 -+ ksite=0 -+ -+ do itmols=1,ntpmls -+ -+ do imols=1,nummols(itmols) -+ -+ do isite=1,numsit(itmols) -+ -+ iatom=iatom+1 -+ -+ if(mod(iatom-1,mxnode).eq.idnode)then -+ -+ kk=0 -+ jatom=jatom+1 -+ -+ do k=1,nexsit(ksite+isite) -+ -+ newatm=lexsit(ksite+isite,k)+lsite -+ -+ kk=kk+1 -+ lexatm(jatom,kk)=newatm -+ -+ enddo -+ -+ nexatm(jatom)=kk -+ -+ endif -+ -+ enddo -+ -+ lsite=lsite+numsit(itmols) -+ -+ enddo -+ -+ ksite=ksite+numsit(itmols) -+ -+ enddo -+ -+ return -+ end subroutine exclude_link -+ -+ subroutine exclude_atom(idnode,mxnode,natms,ntpmls) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the excluded pair -+c interaction list of the system to be simulated -+c part 2 -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith june 1992 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,ntpmls,iatom,jatom,lsite -+ integer ksite,itmols,isite,imols,k,kk,newatm,j,latom,i,ii -+ -+c construct excluded pair list for verlet neighbour correction -+ -+ iatom=0 -+ jatom=0 -+ lsite=0 -+ ksite=0 -+ -+ do itmols=1,ntpmls -+ -+ do imols=1,nummols(itmols) -+ -+ do isite=1,numsit(itmols) -+ -+ iatom=iatom+1 -+ -+ if(mod(iatom-1,mxnode).eq.idnode)then -+ -+ kk=0 -+ jatom=jatom+1 -+ -+ do k=1,nexsit(ksite+isite) -+ -+ newatm=lexsit(ksite+isite,k)+lsite -+ -+c keep only brode-ahlrichs combinations of indices -+ -+ if(((newatm.gt.iatom).and. -+ x (newatm-iatom.le.natms/2)).or. -+ x ((newatm.lt.iatom).and. -+ x (newatm+natms-iatom.le.(natms-1)/2)))then -+ -+ kk=kk+1 -+ lexatm(jatom,kk)=newatm -+ -+ if(kk.gt.1)then -+ -+c sort the excluded atom list in ascending indices -+ -+ do j=kk,2,-1 -+ -+ if(lexatm(jatom,j).lt.lexatm(jatom,j-1)) -+ x then -+ latom=lexatm(jatom,j) -+ lexatm(jatom,j)=lexatm(jatom,j-1) -+ lexatm(jatom,j-1)=latom -+ endif -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ nexatm(jatom)=kk -+ -+ endif -+ -+ enddo -+ -+ lsite=lsite+numsit(itmols) -+ -+ enddo -+ -+ ksite=ksite+numsit(itmols) -+ -+ enddo -+ -+c final sort into brode-ahlrichs ordering -+ -+ ii=0 -+ do i=1+idnode,natms,mxnode -+ -+ ii=ii+1 -+ do j=1,nexatm(ii) -+ -+ if(lexatm(ii,1).lt.i)then -+ -+ latom=lexatm(ii,1) -+ -+ do k=1,nexatm(ii)-1 -+ -+ lexatm(ii,k)=lexatm(ii,k+1) -+ -+ enddo -+ -+ lexatm(ii,nexatm(ii))=latom -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine exclude_atom -+ -+ end module exclude_module -+ -diff -urN dl_class_1.9.orig/srcmod/external_field_module.f dl_class_1.9/srcmod/external_field_module.f ---- dl_class_1.9.orig/srcmod/external_field_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/external_field_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,347 @@ -+ module external_field_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining external field potential arrays -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use parse_module -+ use setup_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmfld(:) -+ -+ save prmfld -+ -+ contains -+ -+ subroutine alloc_fld_arrays(idnode) -+ -+ implicit none -+ -+ integer fail,idnode -+ -+ data fail/0/ -+ -+ allocate (prmfld(mxfld),stat=fail) -+ if(fail.ne.0)call error(idnode,1200) -+ -+ end subroutine alloc_fld_arrays -+ -+ subroutine define_external_field -+ x (safe,lunits,idnode,keyfld,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to define external fields -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c amended - p.-l. chau jun 2009 z-restraint option -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,keyfld,nfld,i,k,idum -+ real(8) engunit -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call strip(record,lenrec) -+ call lowcase(record,lenrec) -+ call copystring(record,message,80) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'elec') then -+ keyfld=1 -+ elseif(keyword(1:4).eq.'oshr') then -+ keyfld=2 -+ elseif(keyword(1:4).eq.'shrx') then -+ keyfld=3 -+ elseif(keyword(1:4).eq.'grav') then -+ keyfld=4 -+ elseif(keyword(1:4).eq.'magn') then -+ keyfld=5 -+ elseif(keyword(1:4).eq.'sphr') then -+ keyfld=6 -+ elseif(keyword(1:4).eq.'zbnd') then -+ keyfld=7 -+ elseif(keyword(1:4).eq.'zres') then -+ keyfld=9 -+ else -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,454) -+ endif -+ -+ do i=1,mxfld -+ prmfld(i)=0.d0 -+ enddo -+ -+ nfld=intstr(record,lenrec,idum) -+ if(nfld.eq.0)nfld=5 -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ do k=1,nfld -+ -+ prmfld(k)=dblstr(record,lenrec,idum) -+ if(idum.gt.lenrec.and.k.lt.nfld)then -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'external field key ',13x,a4, -+ x /,/,30x,'external field parameters')") keyword(1:4) -+ write(nrite,"(2(/,1x,1p,5e15.5))") prmfld -+ -+ endif -+ -+c convert to internal units -+ -+ if(keyfld.eq.1.or.keyfld.eq.4.or.keyfld.eq.5) then -+ -+ if(.not.lunits)call error(idnode,6) -+ -+ do i=1,3 -+ prmfld(i)=prmfld(i)*engunit -+ enddo -+ -+ elseif(keyfld.eq.2.or.keyfld.eq.6.or.keyfld.eq.7) then -+ -+ prmfld(1)=prmfld(1)*engunit -+ -+ elseif(keyfld.eq.9) then -+ -+ prmfld(3)=prmfld(3)*engunit -+ -+ endif -+ -+ return -+ end subroutine define_external_field -+ -+ subroutine extnfld -+ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) -+ -+c*********************************************************************** -+c -+c dl_poly routine for application of an external field -+c -+c replicated data version / block data -+c -+c copyright daresbury laboratory 1993 -+c author - t.forester october 1993 -+c amended - t.forester dec 1994 -+c amended - p.-l. chau jun 2009 z-restraint option -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,keyfld,mxnode,natms,iatm1,iatm2,i,j -+ integer istart,ifinish,numresat -+ real(8) engfld,virfld,rz,rrr,gamma,zdif,totwgt -+ real(8) com(3) -+ -+c energy and virial accumulators -+ -+ engfld=0.d0 -+ virfld=0.d0 -+ -+c block indices -+ -+ iatm1=(idnode*natms)/mxnode+1 -+ iatm2=((idnode+1)*natms)/mxnode -+ -+ if(keyfld.eq.1) then -+ -+c electric field: prmfld(1-3) are field components -+ -+ do i=iatm1,iatm2 -+ -+ fxx(i)=fxx(i)+chge(i)*prmfld(1) -+ fyy(i)=fyy(i)+chge(i)*prmfld(2) -+ fzz(i)=fzz(i)+chge(i)*prmfld(3) -+ -+ enddo -+ -+ elseif(keyfld.eq.2) then -+ -+c oscillating shear: orthorhombic box: Fx=a*cos(b.2.pi.z/L) -+ -+ rz=2.d0*pi/cell(9) -+ -+ do i=iatm1,iatm2 -+ -+ fxx(i)=fxx(i)+prmfld(1)*cos(prmfld(2)*zzz(i)*rz) -+ -+ enddo -+ -+ elseif(keyfld.eq.3.and.imcon.eq.6) then -+ -+c continuous shear of walls : 2D periodic box (imcon=6) -+c shear rate=prmfld(1) angstrom per ps for atoms at -+c abs(z) > prmfld(2) -+ -+ do i=iatm1,iatm2 -+ -+ if(abs(zzz(i)).gt.prmfld(2)) then -+ -+ vxx(i)=0.5d0*sign(prmfld(1),zzz(i)) -+ -+ endif -+ -+ enddo -+ -+ elseif(keyfld.eq.4) then -+ -+c gravitational field: field components given by prmfld(1-3) -+ -+ do i=iatm1,iatm2 -+ -+ fxx(i)=fxx(i)+prmfld(1)*weight(i) -+ fyy(i)=fyy(i)+prmfld(2)*weight(i) -+ fzz(i)=fzz(i)+prmfld(3)*weight(i) -+ -+ enddo -+ -+ elseif(keyfld.eq.5) then -+ -+c magnetic field: field components given by prmfld(1-3) -+ -+ do i=iatm1,iatm2 -+ -+ fxx(i)=fxx(i)+(vyy(i)*prmfld(3)-vzz(i)*prmfld(2)) -+ x *chge(i) -+ fyy(i)=fyy(i)+(vzz(i)*prmfld(1)-vxx(i)*prmfld(3)) -+ x *chge(i) -+ fzz(i)=fzz(i)+(vxx(i)*prmfld(2)-vyy(i)*prmfld(1)) -+ x *chge(i) -+ -+ enddo -+ -+ elseif(keyfld.eq.6) then -+ -+c containing sphere : r^(-n) potential -+ -+ do i=iatm1,iatm2 -+ -+ rrr=sqrt(xxx(i)**2+yyy(i)**2+zzz(i)**2) -+ if(rrr.gt.prmfld(4)) then -+ rrr=prmfld(2)-rrr -+ if(rrr.lt.0.d0) rrr=0.1d0 -+ -+ gamma =prmfld(1)*rrr**(-prmfld(3)) -+ engfld=engfld+gamma -+ -+ gamma=-prmfld(3)*gamma/((prmfld(2)-rrr)*rrr) -+ -+ fxx(i)=fxx(i)+gamma*xxx(i) -+ fyy(i)=fyy(i)+gamma*yyy(i) -+ fzz(i)=fzz(i)+gamma*zzz(i) -+ -+ endif -+ -+ enddo -+ -+ elseif(keyfld.eq.7) then -+ -+c repulsive wall (harmonic) starting at z0 -+ -+ do i=iatm1,iatm2 -+ -+ if(prmfld(3)*zzz(i).gt.prmfld(3)*prmfld(2)) then -+ -+ zdif=zzz(i)-prmfld(2) -+ gamma=-prmfld(1)*zdif -+ -+ fzz(i)=fzz(i)+gamma -+ engfld=engfld-gamma*zdif/2. -+ -+ endif -+ -+ enddo -+ -+ elseif(keyfld.eq.9) then -+ -+c keyfld=9. restrain molecule z-position -+c prmfld(1) is number of first atom of restrained molecule -+c prmfld(2) is number of last atom of restrained molecule -+c prmfld(3) is the restraining constant -+c prmfld(4) is z-min -+c prmfld(5) is z-max -+ -+ istart=nint(prmfld(1)) -+ ifinish=nint(prmfld(2)) -+ numresat=ifinish-istart+1 -+ -+c calculate the centre of mass of the molecule -+ -+ call getcom_mol(istart,ifinish,imcon,idnode,mxnode,totwgt,com) -+ -+c apply restraint force according to location -+ -+ if(com(3).lt.prmfld(4))then -+ -+c if centre of mass is below z-min, activate restraining force -+ -+ do i=istart,ifinish -+ -+ fzz(i)=fzz(i)-prmfld(3)*(weight(i)/totwgt)* -+ x (com(3)-prmfld(4)) -+ -+ enddo -+ -+ elseif(com(3).gt.prmfld(5))then -+ -+c if centre of mass if above z-max, activate restraining force -+ -+ do i=istart,ifinish -+ -+ fzz(i)=fzz(i)-prmfld(3)*(weight(i)/totwgt)* -+ x (com(3)-prmfld(5)) -+ -+ enddo -+ -+ endif -+ -+ else -+ -+c unidentified field potential error exit -+ -+ call error(idnode,454) -+ -+ endif -+ -+c global sum of external field potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engfld -+ buffer(2)=virfld -+ call gdsum(buffer(1),2,buffer(3)) -+ engfld=buffer(1) -+ virfld=buffer(2) -+ -+ endif -+ -+ return -+ end subroutine extnfld -+ -+ end module external_field_module -diff -urN dl_class_1.9.orig/srcmod/forces_module.f dl_class_1.9/srcmod/forces_module.f ---- dl_class_1.9.orig/srcmod/forces_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/forces_module.f 2015-11-16 17:18:13.442475750 +0100 -@@ -0,0 +1,2970 @@ -+ module forces_module -+ -+c*********************************************************************** -+c -+c dl_poly module for calculation of atomic forces -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - d. quigley : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use coulomb_module -+ use error_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use four_body_module -+ use hkewald_module -+ use metafreeze_module -+ use metal_module -+ use neu_coul_module -+ use nlist_builders_module -+ use pair_module -+ use property_module -+ use setup_module -+ use solvation_module -+ use spme_module -+ use tersoff_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ contains -+ -+ subroutine force_manager -+ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c********************************************************************* -+c -+c dl_poly subroutine to manage the calculation of the atomic forces -+c from all force field terms. -+c -+c copyright - daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva -+ logical lfree,lghost,llsolva -+ -+ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,numrdf -+ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ntpmet -+ integer i,nospl,multt,nneut,ntbond,ntangl,ntdihd,nsolva,isolva -+ integer ntinv,ntteth,ntshl,ntptbp,ntpfbp,ntpter,keyshl,keyfld -+ -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet -+ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp -+ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang,engdih -+ real(8) virdih,enginv,virinv,engtet,virtet,engshl,virshl,engfld -+ real(8) virfld,fmax,temp,shlke,engcfg,tmpeng,tmpvir,engord,virord -+ -+ llsolva=.false. -+ -+c initialize energy and virial accumulators -+ -+ engbnd=0.d0 -+ virbnd=0.d0 -+ engang=0.d0 -+ virang=0.d0 -+ engdih=0.d0 -+ virdih=0.d0 -+ enginv=0.d0 -+ virinv=0.d0 -+ engtbp=0.d0 -+ virtbp=0.d0 -+ engter=0.d0 -+ virter=0.d0 -+ engfbp=0.d0 -+ virfbp=0.d0 -+ engsrp=0.d0 -+ virsrp=0.d0 -+ engcpe=0.d0 -+ vircpe=0.d0 -+ engfld=0.d0 -+ virfld=0.d0 -+ engshl=0.d0 -+ virshl=0.d0 -+ shlke =0.d0 -+ engtet=0.d0 -+ virtet=0.d0 -+ engmet=0.d0 -+ virmet=0.d0 -+ virord=0.0d0 -+ engord=0.0d0 -+ -+ if(lmetadyn)then -+ -+ eng_loc=0.0d0 -+ vir_loc=0.0d0 -+ fxx_loc(:)=0.0d0 -+ fyy_loc(:)=0.0d0 -+ fzz_loc(:)=0.0d0 -+ stress_loc(:)=0.0d0 -+ -+ endif -+ -+c initialise free energy accumulators -+ -+ if(lfree)then -+ -+ ang_fre=0.d0 -+ bnd_fre=0.d0 -+ dih_fre=0.d0 -+ inv_fre=0.d0 -+ tbp_fre=0.d0 -+ fbp_fre=0.d0 -+ cou_fre=0.d0 -+ vdw_fre=0.d0 -+ shl_fre=0.d0 -+ ang_vir=0.d0 -+ bnd_vir=0.d0 -+ dih_vir=0.d0 -+ inv_vir=0.d0 -+ tbp_vir=0.d0 -+ fbp_vir=0.d0 -+ cou_vir=0.d0 -+ vdw_vir=0.d0 -+ shl_vir=0.d0 -+ eng_cfg_fre=0.d0 -+ vir_cfg_fre=0.d0 -+ -+ endif -+ -+c initialise solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ if(keyfce/2.gt.0)lcomp(6)=.true. -+ if(mod(keyfce,2).eq.1)lcomp(7)=.true. -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ llsolva=.true. -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c initialise the force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ if(nstep.gt.0)then -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+ endif -+ -+ if(keyfce.gt.0)then -+ -+c calculate pair forces, including coulombic forces -+ -+ if(lnsq)then -+ -+c multiple timestep - all-pairs -+ -+ call multiple_nsq -+ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp) -+ -+ elseif(.not.lneut)then -+ -+c single timestep -+ -+ if(multt.eq.1)then -+ -+ call forces -+ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw, -+ x ntpmet,natms,nstbgr,nstep,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw, -+ x vircpe,virsrp,volm,engmet,virmet) -+ -+ else -+ -+ call multiple -+ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, -+ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, -+ x rvdw,vircpe,virsrp,volm) -+ -+ endif -+ -+ elseif(lneut)then -+ -+c neutral groups -+ -+ if(multt.eq.1)then -+ -+ call forces_neu -+ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, -+ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, -+ x vircpe,virsrp) -+ -+ else -+ -+ call multiple_neu -+ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rprim,rcut,rvdw,alpha,vircpe,virsrp) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c add in long range corrections to energy and pressure -+ -+ engsrp=engsrp+elrc -+ virsrp=virsrp+virlrc -+ engmet=engmet+elrcm(0) -+ virmet=virmet+vlrcm(0) -+ if(lfree)then -+ vdw_fre=vdw_fre+elrc_fre -+ vdw_vir=vdw_vir+vlrc_fre -+ endif -+ -+c calculate three body forces -+ -+ if(ntptbp.gt.0)call thbfrc -+ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcuttb, -+ x engtbp,virtbp) -+ -+c calculate four body forces -+ -+ if(ntpfbp.gt.0)call fbpfrc -+ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcutfb, -+ x engfbp,virfbp) -+ -+c calculate tersoff potential forces -+ -+ if(ntpter.gt.0)call tersoff -+ x (idnode,mxnode,natms,imcon,rctter,engter,virter) -+ -+c calculate bond forces -+ -+ if(ntbond.gt.0)call bndfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntbond,epsq, -+ x engbnd,virbnd) -+ -+c calculate valence angle forces -+ -+ if(ntangl.gt.0)call angfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntangl,engang,virang) -+ -+c calculate dihedral forces -+ -+ if(ntdihd.gt.0)call dihfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntdihd,keyfce,dlrpot, -+ x epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe,virdih,virsrp) -+ -+c calculate inversion forces -+ -+ if(ntinv.gt.0)call invfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntinv,enginv,virinv) -+ -+c calculate tethered atom forces -+ -+ if(ntteth.gt.0)call tethfrc -+ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) -+ -+c calculate shell model forces -+ -+ if(keyshl.gt.0)call shlfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntshl,engshl,virshl) -+ -+c external field -+ -+ if(keyfld.gt.0)call extnfld -+ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) -+ -+c metadynamics option : use potential energy as order parameter -+ -+ if(lmetadyn)then -+ -+ tmpeng=engsrp+engcpe+engbnd+engang+engdih+engfld+ -+ x engtbp+engfbp+engshl+enginv+engter+engmet -+ -+ tmpvir=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet -+ -+ call metafreeze_driver -+ x (imcon,natms,temp,nstep,tmpeng,tmpvir,engord,virord) -+ -+ endif -+ -+c global summation of force arrays (basic replicated data strategy) -+ -+ call global_sum_forces(natms,mxnode,fxx,fyy,fzz) -+ -+c global sum of stress arrays -+ -+ if(mxnode.gt.1)call gdsum(stress,9,buffer) -+ -+c add long range correction to diagonal terms of stress tensor -+ -+ stress(1)=stress(1)-(virlrc+vlrcm(0))/3.d0 -+ stress(5)=stress(5)-(virlrc+vlrcm(0))/3.d0 -+ stress(9)=stress(9)-(virlrc+vlrcm(0))/3.d0 -+ -+c cap forces in equilibration mode -+ -+ if(nstep.le.nsteql.and.lfcap) -+ x call fcap(lfcap,natms,fmax,temp) -+ -+c total configuration energy -+ -+ engcfg=engsrp+engcpe+engbnd+engang+engdih+engfld+engtbp+ -+ x engfbp+engshl+enginv+engter+engmet -+ -+c PLUMED modifications -+ if(lplumed)then -+ call plumed_f_gcmd("setStep"//char(0),nstep) -+ call plumed_f_gcmd("setMasses"//char(0),weight) -+ call plumed_f_gcmd("setCharges"//char(0),chge) -+ call plumed_f_gcmd("setPositionsX"//char(0),xxx) -+ call plumed_f_gcmd("setPositionsY"//char(0),yyy) -+ call plumed_f_gcmd("setPositionsZ"//char(0),zzz) -+ call plumed_f_gcmd("setBox"//char(0),cell) -+ call plumed_f_gcmd("setEnergy"//char(0),engcfg) -+ call plumed_f_gcmd("setForcesX"//char(0),fxx) -+ call plumed_f_gcmd("setForcesY"//char(0),fyy) -+ call plumed_f_gcmd("setForcesZ"//char(0),fzz) -+ call plumed_f_gcmd("setVirial"//char(0),stress) -+ call plumed_f_gcmd("calc"//char(0) ) -+ endif -+c PLUMED modifications -+ -+c total derivative of the configurational free energy -+ -+ if(lfree)then -+ -+ eng_cfg_fre=dlambda*(ang_fre+bnd_fre+dih_fre+inv_fre+ -+ x tbp_fre+fbp_fre+cou_fre+vdw_fre+shl_fre) -+ vir_cfg_fre=dlambda*(ang_vir+bnd_vir+dih_vir+inv_vir+ -+ x tbp_vir+fbp_vir+cou_vir+vdw_vir+shl_vir) -+ -+ endif -+ -+c sum solvation and excitation energies for pair forces -+ -+ if(mxnode.gt.1)then -+ -+ if(llsolva)then -+ -+ call gdsum(vdw_sol,mxtmls_sol2,buffer) -+ call gdsum(cou_sol,mxtmls_sol2,buffer) -+ -+ if(lghost)then -+ -+ call gdsum(vdw_exc,mxtmls_exc2,buffer) -+ call gdsum(cou_exc,mxtmls_exc2,buffer) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c add long range corrections to solvation terms -+ -+ if(lsolva)then -+ -+ vdw_sol(:)=vdw_sol(:)+elrc_sol(:) -+ if(lghost)vdw_exc(:)=vdw_exc(:)+elrc_exc(:) -+ -+ endif -+ -+ return -+ end subroutine force_manager -+ -+ subroutine forces -+ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw,ntpmet,natms, -+ x nstbgr,nstep,nsteql,numrdf,nospl,nsolva,isolva,alpha,dlrpot, -+ x drewd,engcpe,engsrp,epsq,rcut,rvdw,vircpe,virsrp,volm,engmet, -+ x virmet) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c amended - t. forester sept 1994 -+c amended - w. smith june 1995 for metal potentials -+c -+c key: -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ Ewald sum : ewald1,2,3 -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ truncated and shifted coulombic : coul4 -+c = 10,11 ----- reaction field : coul3 -+c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3] -+c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzeql,loglnk,lewald,lspme,lhke,newjob,lcshft,safe -+ logical lsolva,lfree,lghost,llsolva -+ -+ integer idnode,imcon,keyfce,kmax1,kmax2,kmax3,nhko,nlatt -+ integer mxnode,ntpvdw,natms,nstbgr,nstep,nsteql,numrdf -+ integer ntpmet,nospl,nsolva,isolva,i,j,k,ii -+ -+ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw,eps -+ real(8) vircpe,virsrp,volm,engacc,engac1,viracc,engmet,virmet -+ -+ save newjob -+ -+ data newjob/.true./ -+ -+ safe=.true. -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ lhke=(keyfce/2.eq.7) -+ lspme=(keyfce/2.eq.6) -+ lewald=(keyfce/2.eq.1) -+ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) -+ -+c create ewald interpolation arrays -+ -+ if(newjob)then -+ -+ if(lhke)then -+ -+ call hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) -+ -+ else if(lewald.or.lspme.or.lcshft)then -+ -+ call erfcgen(alpha,drewd,rcut) -+ -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+c initialise force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c calculate local density in metals -+ -+ if(ntpmet.gt.0)then -+ -+ call metdens -+ x (idnode,imcon,mxnode,natms,engmet,virmet) -+ -+ stress(1)=stress(1)-virmet/3.d0 -+ stress(5)=stress(5)-virmet/3.d0 -+ stress(9)=stress(9)-virmet/3.d0 -+ -+ endif -+ -+c fourier contribution to coulombic forces in Ewald sum -+ -+ if(lewald)then -+ -+ call ewald1 -+ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, -+ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) -+ -+ engcpe=engcpe+engac1 -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c hautman-klein-ewald method -+ -+ if(lhke)then -+ -+c fourier terms of hk-ewald -+ -+ call hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engacc,viracc,alpha,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+c real space terms of hk-ewald -+ -+ call hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engacc,viracc, -+ x drewd,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c smoothed particle mesh ewald -+ -+ if(lspme)then -+ -+ call ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engac1,viracc,alpha,volm,epsq) -+ -+ engcpe=engcpe+engac1 -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c outer loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ ilist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) -+ -+c square of distances -+ -+ do k=1,lentry(ii) -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c calculate metal forces and potential -+ -+ if(ntpmet.gt.0)then -+ -+ call metfrc(safe,i,lentry(ii),engacc,viracc) -+ -+ engmet=engmet+engacc -+ virmet=virmet+viracc -+ -+ endif -+ -+c calculate short range force and potential terms -+ -+ if(ntpvdw.gt.0.and.mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc, -+ x rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme)then -+ -+ call ewald2(llsolva,lfree,lghost,i,lentry(ii),engacc, -+ x viracc,drewd,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions -+ -+ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then -+ -+ if(mod(nstep,nstbgr).eq.0)then -+ -+ call rdf0(i,lentry(ii),rcut) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c check metal interpolation is safe -+ -+ if(ntpmet.gt.0)then -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,142) -+ -+ endif -+ -+c calculate corrections for intramolecular coulomb terms in -+c Ewald sum -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ eps=epsq -+ if(loglnk)eps=eps*2.0d0 -+ -+c outer loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,nexatm(ii) -+ -+ j=lexatm(ii,k) -+ jlist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) -+ -+c calculate correction terms -+ -+ if(lhke)then -+ -+ call hkewald3(i,ii,engacc,viracc,eps) -+ -+ else -+ -+ call ewald3 -+ x (llsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) -+ -+ endif -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ enddo -+ -+ endif -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then -+ -+ if(mod(nstep,nstbgr).eq.0)then -+ -+ numrdf=numrdf+1 -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=engmet -+ buffer(6)=virmet -+ buffer(7)=vdw_fre -+ buffer(8)=cou_fre -+ buffer(9)=vdw_vir -+ buffer(10)=cou_vir -+ call gdsum(buffer(1),10,buffer(11)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ engmet=buffer(5) -+ virmet=buffer(6) -+ vdw_fre=buffer(7) -+ cou_fre=buffer(8) -+ vdw_vir=buffer(9) -+ cou_vir=buffer(10) -+ -+ endif -+ -+ return -+ end subroutine forces -+ -+ subroutine forces_neu -+ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, -+ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, -+ x vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c neutral group implemenation - no Ewald sum option -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c -+c modified - t. forester april 1993 -+c key: -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ invalid -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ invalid -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzeql,newlst,lchk,lsolva,lfree,lghost,llsolva -+ -+ integer idnode,imcon,keyfce,mxnode,natms,nneut,nstbgr -+ integer nstep,nsteql,numrdf,i,fail,jneu,jj0,jj1,j -+ integer ibig,ia,ineu,isn,ik,nsolva,isolva -+ real(8) dlrpot,engcpe,engsrp,epsq,rcut,rvdw,vircpe -+ real(8) virsrp,engacc,viracc,anorm,alpha -+ -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ -+ dimension fail(2) -+ -+ data fail/0,0/ -+ -+c allocate working arrays -+ -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ do i=1,2 -+ if(fail(i).ne.0)call error(idnode,1820) -+ enddo -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c initialise force and stress arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c initialise energy and virial accumulators -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c intra group vectors com -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-xxx(jj0) -+ tyy(j)=yyy(j)-yyy(jj0) -+ tzz(j)=zzz(j)-zzz(jj0) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,natms,cell,txx,tyy,tzz) -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ xxx(j)=txx(j)+xxx(jj0) -+ yyy(j)=tyy(j)+yyy(jj0) -+ zzz(j)=tzz(j)+zzz(jj0) -+ -+ enddo -+ -+c centre of molecule -+ -+ uxx(jneu)=0.d0 -+ uyy(jneu)=0.d0 -+ uzz(jneu)=0.d0 -+ anorm=1.d0/dble(jj1-jj0+1) -+ -+ do j=jj0,jj1 -+ -+ uxx(jneu)=uxx(jneu)+xxx(j)*anorm -+ uyy(jneu)=uyy(jneu)+yyy(j)*anorm -+ uzz(jneu)=uzz(jneu)+zzz(j)*anorm -+ -+ enddo -+ -+c vector from site to geometric centre -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-uxx(jneu) -+ tyy(j)=yyy(j)-uyy(jneu) -+ tzz(j)=zzz(j)-uzz(jneu) -+ -+ enddo -+ -+ enddo -+ -+c outer loop over neutral groups -+ -+ lchk=.true. -+ ibig=0 -+ ia=0 -+ -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ newlst=.true. -+ -+ isn=1 -+ call neutlst -+ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrceneu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions -+ -+ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. -+ x mod(nstep,nstbgr).eq.0)then -+ -+ call rdf0neu(ik,rcut) -+ -+ endif -+ -+ enddo -+ -+c check on validity of call to neutlst -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ if(.not.lchk)then -+ call gimax(ibig,1,i) -+ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf -+ call error(idnode,478) -+ endif -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) -+ -+c counter for rdf statistics outside loop structure -+ -+ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. -+ x mod(nstep,nstbgr).eq.0)numrdf=numrdf+1 -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,stat=fail(2)) -+ -+ return -+ end subroutine forces_neu -+ -+ subroutine multiple -+ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, -+ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, -+ x rvdw,vircpe,virsrp,volm) -+c*************************************************************************** -+c -+c dl_poly subroutine for multiple time step algorithm -+c reciprocal space calculated on long time steps. -+c -+c copyright daresbury laboratory -+c -+c author t. forester, may 1993 -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ Ewald sum : ewald1,2,3,4 -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ truncated and shifted coulombic : coul4 -+c = 10,11 ----- reaction field : coul3 -+c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3,4] -+c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3,4 -+c -+c**************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=5 -+ -+ logical newplst,newlst,lgofr,lzeql,lgr,loglnk,lewald,lspme -+ logical lhke,newjob,lcshft,lsolva,lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt -+ integer mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,fail -+ integer numlsts,i,nstep0,nsolva,isolva,ii,k,j,ik -+ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,volm,stresp,engcpl,engacc,viracc,engac1 -+ real(8) vircpl,eps,ann,engsr1,viracl,engsrl,virsrl,virac2,engcp1 -+ real(8) vircp1,engacl,engac2,virsr1 -+ -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension stresp(9),fail(nnn) -+ -+ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 -+ save engsr1,virsr1,stresp,fpx,fpy,fpz,newjob -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data newjob/.true./ -+ data numlsts/-1/ -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ lhke=(keyfce/2.eq.7) -+ lspme=(keyfce/2.eq.6) -+ lewald=(keyfce/2.eq.1) -+ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) -+ if(newlst)nstep0=nstep -+ newplst=(newlst).or.(mod(nstep-nstep0,multt).eq.0) -+ -+c allocate working arrays -+ -+ if(newjob)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) -+ endif -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1840) -+ enddo -+ -+ endif -+ -+c create ewald interpolation arrays -+ -+ if(newjob)then -+ -+ if(lspme.or.lewald.or.lcshft)then -+ -+ call erfcgen(alpha,drewd,rcut) -+ -+ endif -+ -+ endif -+ -+ newjob=.false. -+ -+c divide neighbour list into primary and secondary neighbours -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call primlst(idnode,mxnode,natms,imcon,rprim) -+ -+ endif -+ -+c flag for accumulating rdfs -+ -+ lgr=.false. -+ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) -+ lgr=(lgr.and.(newplst.and.lgofr)) -+ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) -+ -+c zero force and stress arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c ********************PROCESS SECONDARY NEIGHBOURS****************** -+ -+ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then -+ -+c zero accumulators -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ engsrl=0.d0 -+ virsrl=0.d0 -+ llsolva=lsolva -+ if(lsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate fourier contribution to secondary coulombic forces -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ if(lewald)then -+ -+ call ewald1 -+ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, -+ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) -+ -+c hautman-klein-ewald method -+ -+ elseif(lhke)then -+ -+ call hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engac1,viracc,alpha,epsq) -+ -+c real space terms of hk-ewald -+ -+ call hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engac2, -+ x virac2,drewd,rcut,epsq) -+ -+ engac1=engac1+engac2 -+ viracc=viracc+virac2 -+ -+ elseif(lspme)then -+ -+c smoothed particle mesh ewald -+ -+ call ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engac1,viracc,alpha,volm,epsq) -+ -+ endif -+ -+ engcpl=engcpl+engac1 -+ vircpl=vircpl+viracc -+ -+c calculate corrections for intramolecular coulomb terms in -+c Ewald sum -+c note: if using link cells - have double counted excluded -+c interactions use temporary adjustment to relative dielectric -+c constant -+ -+ eps=epsq -+ if(loglnk)eps=epsq*2.0d0 -+ -+c calculate self interaction corrections for fourier contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,nexatm(ii) -+ -+ j=lexatm(ii,k) -+ jlist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) -+ -+c calculate correction terms -+ -+ if(lhke)then -+ -+ call hkewald3(i,ii,engacc,viracc,eps) -+ -+ else -+ -+ call ewald3 -+ x (lsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) -+ -+ endif -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ enddo -+ -+ endif -+ -+c calculate pair contributions to secondary neighbour forces -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of distance -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrl=engsrl+engacc -+ virsrl=virsrl+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme)then -+ -+ call ewald2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,drewd,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ endif -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ flx(i)=fxx(i) -+ fly(i)=fyy(i) -+ flz(i)=fzz(i) -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stress(i) -+ stress(i)=0.d0 -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol(:) -+ cou_sol_lng(:)=cou_sol(:) -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc(:) -+ cou_exc_lng(:)=cou_exc(:) -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c calculate pair force contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=-list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of distance -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ if(newplst.or. -+ x (mod(nstep-nstep0,multt).le.1))then -+ -+ if(lhke)then -+ -+ call hkewald4(i,ik,engacc,viracc,engacl,viracl,rcut,epsq) -+ -+ else -+ -+ call ewald4 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,engacl,viracl, -+ x drewd,rcut,epsq) -+ -+ endif -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ engcpl=engcpl+engacl -+ vircpl=vircpl+viracl -+ -+ else -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+ enddo -+ -+c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary neighbour contributions to force, energy etc -+ -+ if(newplst)then -+ -+ do i=1,natms -+ -+ fpx(i)=flx(i) -+ fpy(i)=fly(i) -+ fpz(i)=flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stresl(i) -+ enddo -+ -+ engsr1=engsrl -+ virsr1=virsrl -+ engcp1=engcpl -+ vircp1=vircpl -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol_lng(:) -+ cou_sol_put(:)=cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc_lng(:) -+ cou_exc_put(:)=cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c calculate force increments etc -+ -+ if(mod(nstep-nstep0,multt).eq.1)then -+ -+ do i=1,natms -+ -+ flx(i)=flx(i)-fpx(i) -+ fly(i)=fly(i)-fpy(i) -+ flz(i)=flz(i)-fpz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stresl(i)-stresp(i) -+ enddo -+ -+ virsrl=virsrl-virsr1 -+ engsrl=engsrl-engsr1 -+ vircpl=vircpl-vircp1 -+ engcpl=engcpl-engcp1 -+ -+c solvation and excitation increments -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) -+ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) -+ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c extrapolate long range terms -+ -+ ann=dble(mod(nstep-nstep0,multt)) -+ -+ do i=1,natms -+ -+ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) -+ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) -+ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresp(i)+stresl(i)*ann -+ enddo -+ -+ engsrp=engsr1+engsrl*ann+engsrp -+ virsrp=virsr1+virsrl*ann+virsrp -+ engcpe=engcp1+engcpl*ann+engcpe -+ vircpe=vircp1+vircpl*ann+vircpe -+ -+c solvation and excitation extrapolation -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) -+ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) -+ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+ return -+ end subroutine multiple -+ -+ subroutine multiple_neu -+ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rprim,rcut,rvdw,alpha,vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c neutral group implemenation - no Ewald sum option -+c multiple timestep option -+c -+c parallel replicated data version -+c -+c fpx,fpy,fpz : forces from electrostatics fron rprim < r <= rcut -+c fxx,fyy,fzz : total force -+c -+c copyright daresbury laboratory april 1994 -+c author - t. forester april 1993 -+c key: -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ invalid -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ invalid -+c = 10,11 ----- reaction field : coul3 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical lgofr,lzeql,newlst,newplst,lgr,lchk,newjob,lsolva -+ logical lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,multt,mxnode,natms,nneut,nstbgr -+ integer nstep,nsteql,numrdf,fail,i,numlsts,jneu,jj0,j -+ integer jj1,ineu,ia,isn,ibig,ik,nstep0,nsolva,isolva -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rprim,rcut,rvdw,vircpe -+ real(8) virsrp,engcpl,vircpl,engsrl,virsrl,anorm,ann,stresp -+ real(8) engacc,viracc,engsr1,virsr1,engcp1,vircp1,alpha -+ -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension fail(nnn),stresp(9) -+ -+ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 -+ save engsr1,virsr1,stresp,fpx,fpy,fpz -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data newjob/.true./ -+ data numlsts/-1/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ if(newjob)then -+ -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(3)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(4)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(5)) -+ -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(6)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(7)) -+ endif -+ -+ endif -+ newjob=.false. -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1850) -+ enddo -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c error if ewald sum requested -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) -+ -+c create list of primary and secondary neighbours -+ -+ if(newlst)nstep0=nstep -+ newplst=(mod(nstep-nstep0,multt).eq.0) -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) -+ -+ endif -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c zero force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress arrays -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c flag for accumulating rdfs -+ -+ lgr=.false. -+ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) -+ lgr=(lgr.and.(newplst.and.lgofr)) -+ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) -+ -+c intra group vectors com -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-xxx(jj0) -+ tyy(j)=yyy(j)-yyy(jj0) -+ tzz(j)=zzz(j)-zzz(jj0) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,natms,cell,txx,tyy,tzz) -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ xxx(j)=txx(j)+xxx(jj0) -+ yyy(j)=tyy(j)+yyy(jj0) -+ zzz(j)=tzz(j)+zzz(jj0) -+ -+ enddo -+ -+c centre of molecule -+ -+ uxx(jneu)=0.d0 -+ uyy(jneu)=0.d0 -+ uzz(jneu)=0.d0 -+ anorm=1.d0/dble(jj1-jj0+1) -+ -+ do j=jj0,jj1 -+ -+ uxx(jneu)=uxx(jneu)+xxx(j)*anorm -+ uyy(jneu)=uyy(jneu)+yyy(j)*anorm -+ uzz(jneu)=uzz(jneu)+zzz(j)*anorm -+ -+ enddo -+ -+c vector from site to geometric centre -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-uxx(jneu) -+ tyy(j)=yyy(j)-uyy(jneu) -+ tzz(j)=zzz(j)-uzz(jneu) -+ -+ enddo -+ -+ enddo -+ -+c ********************PROCESS SECONDARY NEIGHBOURS******************** -+ -+ lchk=.true. -+ ibig=0 -+ ia=0 -+ -+ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then -+ -+c zero accumulators for secondary neighbour energies and virial -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ engsrl=0.d0 -+ virsrl=0.d0 -+ -+c initialise solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c outer loop over neutral groups -+ -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ isn=-1 -+ call neutlst -+ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1.and.(rvdw.gt.rprim-delr))then -+ -+ call srfrceneu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrl=engsrl+engacc -+ virsrl=virsrl+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ else -+ -+ call error(idnode,250) -+ -+ endif -+ -+c accumulate radial distribution functions out to rcut -+ -+ if(lgr)then -+ call rdf0neu(ik,rcut) -+ endif -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ flx(i)=fxx(i) -+ fly(i)=fyy(i) -+ flz(i)=fzz(i) -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ -+ stresl(i)=stress(i) -+ stress(i)=0.d0 -+ -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol(:) -+ cou_sol_lng(:)=cou_sol(:) -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc(:) -+ cou_exc_lng(:)=cou_exc(:) -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+ ia=0 -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ isn=1 -+ call neutlst -+ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrceneu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions out to rcut -+ -+ if(lgr)then -+ call rdf0neu(ik,rcut) -+ endif -+ -+ enddo -+ -+c ******************END OF PRIMARY NEIGHBOUR PROCESSING************* -+ -+c check on validity of call to neutlst -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ if(.not.lchk)then -+ call gimax(ibig,1,i) -+ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf -+ call error(idnode,479) -+ endif -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary neighbour contributions to force, energy etc -+ -+ if(newplst)then -+ -+ do i=1,natms -+ -+ fpx(i)=flx(i) -+ fpy(i)=fly(i) -+ fpz(i)=flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stresl(i) -+ enddo -+ -+ engsr1=engsrl -+ virsr1=virsrl -+ engcp1=engcpl -+ vircp1=vircpl -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol_lng(:) -+ cou_sol_put(:)=cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc_lng(:) -+ cou_exc_put(:)=cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c calculate force increments etc -+ -+ if(mod(nstep-nstep0,multt).eq.1)then -+ -+ do i=1,natms -+ -+ flx(i)=flx(i)-fpx(i) -+ fly(i)=fly(i)-fpy(i) -+ flz(i)=flz(i)-fpz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stresl(i)-stresp(i) -+ enddo -+ -+ virsrl=virsrl-virsr1 -+ engsrl=engsrl-engsr1 -+ vircpl=vircpl-vircp1 -+ engcpl=engcpl-engcp1 -+ -+c solvation and excitation increments -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) -+ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) -+ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c extrapolate long range terms -+ -+ ann=dble(mod(nstep-nstep0,multt)) -+ -+ do i=1,natms -+ -+ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) -+ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) -+ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresl(i)*ann+stresp(i) -+ enddo -+ -+ engsrp=engsr1+engsrl*ann+engsrp -+ virsrp=virsr1+virsrl*ann+virsrp -+ engcpe=engcp1+engcpl*ann+engcpe -+ vircpe=vircp1+vircpl*ann+vircpe -+ -+c solvation and excitation extrapolation -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) -+ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) -+ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (txx,tyy,tzz,uxx,uyy,uzz,stat=fail(1)) -+ -+ return -+ end subroutine multiple_neu -+ -+ subroutine multiple_nsq -+ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for multiple time step algorithm -+c to be used with all-pairs option -+c -+c flx,fly,flz : forces from electrostatics from r > rcut -+c fpx,fpy,fpz : forces from electrostatics from rprim < r <= rcut -+c fxx,fyy,fzz : total force -+c -+c copyright daresbury laboratory 1993 -+c -+c author t. forester, may 1993 -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c Ewald sum --- not used -+c = 4,5 ------ Distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c truncated and shifted coulombic -- not used -+c reaction field - not used -+c -+c**************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=5 -+ logical newplst,newlst,lgofr,lzeql,lgr,lnsq,newjob,lsolva -+ logical lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,multt,mxnode,natms,nstep,nstbgr -+ integer nsteql,numrdf,fail,nstep0,ii,ik,k,numlsts,nsolva -+ integer isolva,i,j -+ real(8) delr,dlrpot,engcpe,engsrp,engcp3,epsq,rcut -+ real(8) rprim,rvdw,vircpe,virsrp,vircp3,rcut1,engcp2,vircp2 -+ real(8) engsr2,virsr2,stresp,engacc,viracc -+ -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension stresp(9),fail(nnn) -+ -+ save engsr2,virsr2,engcp2,vircp2,nstep0,numlsts,stresp,fpx,fpy,fpz -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data numlsts/-1/ -+ data newjob/.true./ -+ -+c allocate work arrays -+ -+ if(newjob)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) -+ endif -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1860) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+ if(lnsq)then -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c divide neighbour list into primary and secondary neighbours -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call primlst(idnode,mxnode,natms,imcon,rprim) -+ -+ endif -+ -+c flag for accumulating rdfs -+ -+ lgr=(lgofr.and.(.not.lzeql.or.(nstep-nsteql.gt.0))) -+ lgr=(lgr.and.newplst.and.(mod(numlsts,nstbgr).eq.0)) -+ -+c set extended cutoff for electrostatics - secondary shell -+ -+ rcut1=rcut+delr -+ -+ if(newlst)nstep0=nstep -+ newplst=(newlst.or.mod(nstep-nstep0,multt).eq.0) -+ -+c ********************PROCESS TERTIARY NEIGHBOURS********************* -+ -+ if(newplst)then -+ -+ call coul_nsq -+ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, -+ x engcp3,vircp3) -+ -+ endif -+ -+c ****************END OF TERTIARY NEIGHBOUR PROCESSING************** -+ -+c ********************PROCESS SECONDARY NEIGHBOURS******************** -+ -+ if(newplst)then -+ -+c zero accumulators for secondary neighbour energies and virial -+ -+ engcp2=0.d0 -+ vircp2=0.d0 -+ engsr2=0.d0 -+ virsr2=0.d0 -+ -+c zero secondary forces -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+ ii=0 -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic vectors -+ -+ ik=0 -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary condition only for interactions > rprim -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of interatomic distances -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c short range forces for secondary shell -+ -+ if((mod(keyfce,2).eq.1).and.(rvdw.gt.rprim-delr))then -+ -+ call srfrce -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsr2=engsr2+engacc -+ virsr2=virsr2+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then -+ -+ call error(idnode,424) -+ -+ elseif(keyfce/2.eq.2)then -+ -+c distance dependent dielectric -+ -+ call coul2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) -+ -+ engcp2=engcp2+engacc -+ vircp2=vircp2+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+c coulombic potential -+ -+ call coul0 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) -+ -+ engcp2=engcp2+engacc -+ vircp2=vircp2+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+c truncated shifted coulombic potential -+ -+ call error(idnode,424) -+ -+ endif -+ -+c accumulate radial distribution functions : out to rcut -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ fpx(i)=fxx(i) -+ fpy(i)=fyy(i) -+ fpz(i)=fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stress(i) -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol(:) -+ cou_sol_put(:)=cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc(:) -+ cou_exc_put(:)=cou_exc(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c zero primary forces -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c zero solvation and excitation arrays -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate primary pair force contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=-list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of interatomic distances -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions : out to rcut -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then -+ -+ call error(idnode,424) -+ -+ elseif(keyfce/2.eq.2)then -+ -+c distance dependent dielectric -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+c coulombic potential -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,424) -+ -+ endif -+ -+ enddo -+ -+c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary and tertiary neighbour contributions to -+c force, energy etc -+ -+ do i=1,natms -+ -+ fxx(i)=fxx(i)+fpx(i)+flx(i) -+ fyy(i)=fyy(i)+fpy(i)+fly(i) -+ fzz(i)=fzz(i)+fpz(i)+flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresp(i) -+ enddo -+ -+ engsrp=engsrp+engsr2 -+ virsrp=virsrp+virsr2 -+ -+ engcpe=engcpe+engcp2+engcp3 -+ vircpe=vircpe+vircp2+vircp3 -+ -+c calculate solvation and excitation arrays -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol(:)+vdw_sol_put(:)+vdw_sol_lng(:) -+ cou_sol(:)=cou_sol(:)+cou_sol_put(:)+cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc(:)+vdw_exc_put(:)+vdw_exc_lng(:) -+ cou_exc(:)=cou_exc(:)+cou_exc_put(:)+cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine multiple_nsq -+ -+ subroutine neutlst -+ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ll, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c*********************************************************************** -+c -+c dlpoly routine to create pair lists for neutral group -+c implementations. -+c loops over group ineu -+c -+c replicated data version -+c -+c copyright daresbury laboratory 1994 -+c author t.forester march 1994 -+c -+c isn = -1 => secondary neighbours -+c isn = 1 => primary neighbours - must contain excld interactions -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newlst,lchk,lexc -+ integer isn,imcon,idnode,ineu,ia,ll,i,jj,jj0,jj1 -+ integer fail,ibig,keyexc,lenia,j,jneu,in0,in1 -+ real(8) txx,tyy,tzz,uxx,uyy,uzz -+ -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1830) -+ -+ if(newlst)then -+ -+ ibig=0 -+ -+c set cutoff radius -+ -+ ll=0 -+ -+c number of excludes found -+ -+ if(isn.lt.0)then -+ keyexc=nexatm(ia)+2 -+ else -+ keyexc=1 -+ endif -+ -+c do centre - centre distances -+ -+ lenia=lentry(ia) -+ -+ do j=1,lenia -+ -+ jneu=abs(list(ia,j)) -+ xxt(j)=uxx(ineu)-uxx(jneu) -+ yyt(j)=uyy(ineu)-uyy(jneu) -+ zzt(j)=uzz(ineu)-uzz(jneu) -+ -+ enddo -+ -+ call images(imcon,0,1,lenia,cell,xxt,yyt,zzt) -+ -+c working intragroup vectors of central group -+c - for periodic boundaries -+ -+ in0=neulst(ineu) -+ in1=neulst(ineu+1)-1 -+ -+c loop over neutral groups sites of a -+ -+ -+c loop over groups in list -+ -+ do jj=1,lentry(ia) -+ -+ jneu=list(ia,jj)*isn -+ -+ if(jneu.gt.0)then -+ -+ do i=in0,in1 -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+ if(ineu.eq.jneu)jj0=i+1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+c reject atoms in excluded pair list -+ -+ lexc=.false. -+ -+ if(keyexc.lt.nexatm(ia))then -+ -+ if(lexatm(ia,keyexc).eq.i)then -+ if(lexatm(ia,keyexc+1).eq.j)then -+ lexc=.true. -+ keyexc=keyexc+2 -+ endif -+ endif -+ -+ endif -+ -+c reject frozen atom pairs -+ -+ if(lstfrz(i).ne.0)then -+ if(lstfrz(j).ne.0)lexc=.true. -+ endif -+ -+ if(.not.lexc)then -+ -+ ll=ll+1 -+ if(ll.le.mxxdf)then -+ -+ xdf(ll)=txx(i)+xxt(jj)-txx(j) -+ ydf(ll)=tyy(i)+yyt(jj)-tyy(j) -+ zdf(ll)=tzz(i)+zzt(jj)-tzz(j) -+ rsqdf(ll)=xdf(ll)**2+ydf(ll)**2+zdf(ll)**2 -+ ilist(ll)=i -+ jlist(ll)=j -+ -+ else -+ -+ lchk=.false. -+ ibig=max(ibig,ll) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail) -+ -+ return -+ end subroutine neutlst -+ -+ end module forces_module -+ -diff -urN dl_class_1.9.orig/srcmod/forces_module.f.preplumed dl_class_1.9/srcmod/forces_module.f.preplumed ---- dl_class_1.9.orig/srcmod/forces_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/forces_module.f.preplumed 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,2952 @@ -+ module forces_module -+ -+c*********************************************************************** -+c -+c dl_poly module for calculation of atomic forces -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - d. quigley : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use coulomb_module -+ use error_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use four_body_module -+ use hkewald_module -+ use metafreeze_module -+ use metal_module -+ use neu_coul_module -+ use nlist_builders_module -+ use pair_module -+ use property_module -+ use setup_module -+ use solvation_module -+ use spme_module -+ use tersoff_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ contains -+ -+ subroutine force_manager -+ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c********************************************************************* -+c -+c dl_poly subroutine to manage the calculation of the atomic forces -+c from all force field terms. -+c -+c copyright - daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva -+ logical lfree,lghost,llsolva -+ -+ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,numrdf -+ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ntpmet -+ integer i,nospl,multt,nneut,ntbond,ntangl,ntdihd,nsolva,isolva -+ integer ntinv,ntteth,ntshl,ntptbp,ntpfbp,ntpter,keyshl,keyfld -+ -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet -+ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp -+ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang,engdih -+ real(8) virdih,enginv,virinv,engtet,virtet,engshl,virshl,engfld -+ real(8) virfld,fmax,temp,shlke,engcfg,tmpeng,tmpvir,engord,virord -+ -+ llsolva=.false. -+ -+c initialize energy and virial accumulators -+ -+ engbnd=0.d0 -+ virbnd=0.d0 -+ engang=0.d0 -+ virang=0.d0 -+ engdih=0.d0 -+ virdih=0.d0 -+ enginv=0.d0 -+ virinv=0.d0 -+ engtbp=0.d0 -+ virtbp=0.d0 -+ engter=0.d0 -+ virter=0.d0 -+ engfbp=0.d0 -+ virfbp=0.d0 -+ engsrp=0.d0 -+ virsrp=0.d0 -+ engcpe=0.d0 -+ vircpe=0.d0 -+ engfld=0.d0 -+ virfld=0.d0 -+ engshl=0.d0 -+ virshl=0.d0 -+ shlke =0.d0 -+ engtet=0.d0 -+ virtet=0.d0 -+ engmet=0.d0 -+ virmet=0.d0 -+ virord=0.0d0 -+ engord=0.0d0 -+ -+ if(lmetadyn)then -+ -+ eng_loc=0.0d0 -+ vir_loc=0.0d0 -+ fxx_loc(:)=0.0d0 -+ fyy_loc(:)=0.0d0 -+ fzz_loc(:)=0.0d0 -+ stress_loc(:)=0.0d0 -+ -+ endif -+ -+c initialise free energy accumulators -+ -+ if(lfree)then -+ -+ ang_fre=0.d0 -+ bnd_fre=0.d0 -+ dih_fre=0.d0 -+ inv_fre=0.d0 -+ tbp_fre=0.d0 -+ fbp_fre=0.d0 -+ cou_fre=0.d0 -+ vdw_fre=0.d0 -+ shl_fre=0.d0 -+ ang_vir=0.d0 -+ bnd_vir=0.d0 -+ dih_vir=0.d0 -+ inv_vir=0.d0 -+ tbp_vir=0.d0 -+ fbp_vir=0.d0 -+ cou_vir=0.d0 -+ vdw_vir=0.d0 -+ shl_vir=0.d0 -+ eng_cfg_fre=0.d0 -+ vir_cfg_fre=0.d0 -+ -+ endif -+ -+c initialise solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ if(keyfce/2.gt.0)lcomp(6)=.true. -+ if(mod(keyfce,2).eq.1)lcomp(7)=.true. -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ llsolva=.true. -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c initialise the force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ if(nstep.gt.0)then -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+ endif -+ -+ if(keyfce.gt.0)then -+ -+c calculate pair forces, including coulombic forces -+ -+ if(lnsq)then -+ -+c multiple timestep - all-pairs -+ -+ call multiple_nsq -+ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp) -+ -+ elseif(.not.lneut)then -+ -+c single timestep -+ -+ if(multt.eq.1)then -+ -+ call forces -+ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw, -+ x ntpmet,natms,nstbgr,nstep,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw, -+ x vircpe,virsrp,volm,engmet,virmet) -+ -+ else -+ -+ call multiple -+ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, -+ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, -+ x rvdw,vircpe,virsrp,volm) -+ -+ endif -+ -+ elseif(lneut)then -+ -+c neutral groups -+ -+ if(multt.eq.1)then -+ -+ call forces_neu -+ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, -+ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, -+ x vircpe,virsrp) -+ -+ else -+ -+ call multiple_neu -+ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rprim,rcut,rvdw,alpha,vircpe,virsrp) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c add in long range corrections to energy and pressure -+ -+ engsrp=engsrp+elrc -+ virsrp=virsrp+virlrc -+ engmet=engmet+elrcm(0) -+ virmet=virmet+vlrcm(0) -+ if(lfree)then -+ vdw_fre=vdw_fre+elrc_fre -+ vdw_vir=vdw_vir+vlrc_fre -+ endif -+ -+c calculate three body forces -+ -+ if(ntptbp.gt.0)call thbfrc -+ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcuttb, -+ x engtbp,virtbp) -+ -+c calculate four body forces -+ -+ if(ntpfbp.gt.0)call fbpfrc -+ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcutfb, -+ x engfbp,virfbp) -+ -+c calculate tersoff potential forces -+ -+ if(ntpter.gt.0)call tersoff -+ x (idnode,mxnode,natms,imcon,rctter,engter,virter) -+ -+c calculate bond forces -+ -+ if(ntbond.gt.0)call bndfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntbond,epsq, -+ x engbnd,virbnd) -+ -+c calculate valence angle forces -+ -+ if(ntangl.gt.0)call angfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntangl,engang,virang) -+ -+c calculate dihedral forces -+ -+ if(ntdihd.gt.0)call dihfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntdihd,keyfce,dlrpot, -+ x epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe,virdih,virsrp) -+ -+c calculate inversion forces -+ -+ if(ntinv.gt.0)call invfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntinv,enginv,virinv) -+ -+c calculate tethered atom forces -+ -+ if(ntteth.gt.0)call tethfrc -+ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) -+ -+c calculate shell model forces -+ -+ if(keyshl.gt.0)call shlfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntshl,engshl,virshl) -+ -+c external field -+ -+ if(keyfld.gt.0)call extnfld -+ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) -+ -+c metadynamics option : use potential energy as order parameter -+ -+ if(lmetadyn)then -+ -+ tmpeng=engsrp+engcpe+engbnd+engang+engdih+engfld+ -+ x engtbp+engfbp+engshl+enginv+engter+engmet -+ -+ tmpvir=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet -+ -+ call metafreeze_driver -+ x (imcon,natms,temp,nstep,tmpeng,tmpvir,engord,virord) -+ -+ endif -+ -+c global summation of force arrays (basic replicated data strategy) -+ -+ call global_sum_forces(natms,mxnode,fxx,fyy,fzz) -+ -+c global sum of stress arrays -+ -+ if(mxnode.gt.1)call gdsum(stress,9,buffer) -+ -+c add long range correction to diagonal terms of stress tensor -+ -+ stress(1)=stress(1)-(virlrc+vlrcm(0))/3.d0 -+ stress(5)=stress(5)-(virlrc+vlrcm(0))/3.d0 -+ stress(9)=stress(9)-(virlrc+vlrcm(0))/3.d0 -+ -+c cap forces in equilibration mode -+ -+ if(nstep.le.nsteql.and.lfcap) -+ x call fcap(lfcap,natms,fmax,temp) -+ -+c total configuration energy -+ -+ engcfg=engsrp+engcpe+engbnd+engang+engdih+engfld+engtbp+ -+ x engfbp+engshl+enginv+engter+engmet -+ -+c total derivative of the configurational free energy -+ -+ if(lfree)then -+ -+ eng_cfg_fre=dlambda*(ang_fre+bnd_fre+dih_fre+inv_fre+ -+ x tbp_fre+fbp_fre+cou_fre+vdw_fre+shl_fre) -+ vir_cfg_fre=dlambda*(ang_vir+bnd_vir+dih_vir+inv_vir+ -+ x tbp_vir+fbp_vir+cou_vir+vdw_vir+shl_vir) -+ -+ endif -+ -+c sum solvation and excitation energies for pair forces -+ -+ if(mxnode.gt.1)then -+ -+ if(llsolva)then -+ -+ call gdsum(vdw_sol,mxtmls_sol2,buffer) -+ call gdsum(cou_sol,mxtmls_sol2,buffer) -+ -+ if(lghost)then -+ -+ call gdsum(vdw_exc,mxtmls_exc2,buffer) -+ call gdsum(cou_exc,mxtmls_exc2,buffer) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c add long range corrections to solvation terms -+ -+ if(lsolva)then -+ -+ vdw_sol(:)=vdw_sol(:)+elrc_sol(:) -+ if(lghost)vdw_exc(:)=vdw_exc(:)+elrc_exc(:) -+ -+ endif -+ -+ return -+ end subroutine force_manager -+ -+ subroutine forces -+ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw,ntpmet,natms, -+ x nstbgr,nstep,nsteql,numrdf,nospl,nsolva,isolva,alpha,dlrpot, -+ x drewd,engcpe,engsrp,epsq,rcut,rvdw,vircpe,virsrp,volm,engmet, -+ x virmet) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c amended - t. forester sept 1994 -+c amended - w. smith june 1995 for metal potentials -+c -+c key: -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ Ewald sum : ewald1,2,3 -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ truncated and shifted coulombic : coul4 -+c = 10,11 ----- reaction field : coul3 -+c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3] -+c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzeql,loglnk,lewald,lspme,lhke,newjob,lcshft,safe -+ logical lsolva,lfree,lghost,llsolva -+ -+ integer idnode,imcon,keyfce,kmax1,kmax2,kmax3,nhko,nlatt -+ integer mxnode,ntpvdw,natms,nstbgr,nstep,nsteql,numrdf -+ integer ntpmet,nospl,nsolva,isolva,i,j,k,ii -+ -+ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw,eps -+ real(8) vircpe,virsrp,volm,engacc,engac1,viracc,engmet,virmet -+ -+ save newjob -+ -+ data newjob/.true./ -+ -+ safe=.true. -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ lhke=(keyfce/2.eq.7) -+ lspme=(keyfce/2.eq.6) -+ lewald=(keyfce/2.eq.1) -+ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) -+ -+c create ewald interpolation arrays -+ -+ if(newjob)then -+ -+ if(lhke)then -+ -+ call hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) -+ -+ else if(lewald.or.lspme.or.lcshft)then -+ -+ call erfcgen(alpha,drewd,rcut) -+ -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+c initialise force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c calculate local density in metals -+ -+ if(ntpmet.gt.0)then -+ -+ call metdens -+ x (idnode,imcon,mxnode,natms,engmet,virmet) -+ -+ stress(1)=stress(1)-virmet/3.d0 -+ stress(5)=stress(5)-virmet/3.d0 -+ stress(9)=stress(9)-virmet/3.d0 -+ -+ endif -+ -+c fourier contribution to coulombic forces in Ewald sum -+ -+ if(lewald)then -+ -+ call ewald1 -+ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, -+ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) -+ -+ engcpe=engcpe+engac1 -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c hautman-klein-ewald method -+ -+ if(lhke)then -+ -+c fourier terms of hk-ewald -+ -+ call hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engacc,viracc,alpha,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+c real space terms of hk-ewald -+ -+ call hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engacc,viracc, -+ x drewd,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c smoothed particle mesh ewald -+ -+ if(lspme)then -+ -+ call ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engac1,viracc,alpha,volm,epsq) -+ -+ engcpe=engcpe+engac1 -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c outer loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ ilist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) -+ -+c square of distances -+ -+ do k=1,lentry(ii) -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c calculate metal forces and potential -+ -+ if(ntpmet.gt.0)then -+ -+ call metfrc(safe,i,lentry(ii),engacc,viracc) -+ -+ engmet=engmet+engacc -+ virmet=virmet+viracc -+ -+ endif -+ -+c calculate short range force and potential terms -+ -+ if(ntpvdw.gt.0.and.mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc, -+ x rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme)then -+ -+ call ewald2(llsolva,lfree,lghost,i,lentry(ii),engacc, -+ x viracc,drewd,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions -+ -+ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then -+ -+ if(mod(nstep,nstbgr).eq.0)then -+ -+ call rdf0(i,lentry(ii),rcut) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c check metal interpolation is safe -+ -+ if(ntpmet.gt.0)then -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,142) -+ -+ endif -+ -+c calculate corrections for intramolecular coulomb terms in -+c Ewald sum -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ eps=epsq -+ if(loglnk)eps=eps*2.0d0 -+ -+c outer loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,nexatm(ii) -+ -+ j=lexatm(ii,k) -+ jlist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) -+ -+c calculate correction terms -+ -+ if(lhke)then -+ -+ call hkewald3(i,ii,engacc,viracc,eps) -+ -+ else -+ -+ call ewald3 -+ x (llsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) -+ -+ endif -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ enddo -+ -+ endif -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then -+ -+ if(mod(nstep,nstbgr).eq.0)then -+ -+ numrdf=numrdf+1 -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=engmet -+ buffer(6)=virmet -+ buffer(7)=vdw_fre -+ buffer(8)=cou_fre -+ buffer(9)=vdw_vir -+ buffer(10)=cou_vir -+ call gdsum(buffer(1),10,buffer(11)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ engmet=buffer(5) -+ virmet=buffer(6) -+ vdw_fre=buffer(7) -+ cou_fre=buffer(8) -+ vdw_vir=buffer(9) -+ cou_vir=buffer(10) -+ -+ endif -+ -+ return -+ end subroutine forces -+ -+ subroutine forces_neu -+ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, -+ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, -+ x vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c neutral group implemenation - no Ewald sum option -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c -+c modified - t. forester april 1993 -+c key: -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ invalid -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ invalid -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzeql,newlst,lchk,lsolva,lfree,lghost,llsolva -+ -+ integer idnode,imcon,keyfce,mxnode,natms,nneut,nstbgr -+ integer nstep,nsteql,numrdf,i,fail,jneu,jj0,jj1,j -+ integer ibig,ia,ineu,isn,ik,nsolva,isolva -+ real(8) dlrpot,engcpe,engsrp,epsq,rcut,rvdw,vircpe -+ real(8) virsrp,engacc,viracc,anorm,alpha -+ -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ -+ dimension fail(2) -+ -+ data fail/0,0/ -+ -+c allocate working arrays -+ -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ do i=1,2 -+ if(fail(i).ne.0)call error(idnode,1820) -+ enddo -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c initialise force and stress arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c initialise energy and virial accumulators -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c intra group vectors com -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-xxx(jj0) -+ tyy(j)=yyy(j)-yyy(jj0) -+ tzz(j)=zzz(j)-zzz(jj0) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,natms,cell,txx,tyy,tzz) -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ xxx(j)=txx(j)+xxx(jj0) -+ yyy(j)=tyy(j)+yyy(jj0) -+ zzz(j)=tzz(j)+zzz(jj0) -+ -+ enddo -+ -+c centre of molecule -+ -+ uxx(jneu)=0.d0 -+ uyy(jneu)=0.d0 -+ uzz(jneu)=0.d0 -+ anorm=1.d0/dble(jj1-jj0+1) -+ -+ do j=jj0,jj1 -+ -+ uxx(jneu)=uxx(jneu)+xxx(j)*anorm -+ uyy(jneu)=uyy(jneu)+yyy(j)*anorm -+ uzz(jneu)=uzz(jneu)+zzz(j)*anorm -+ -+ enddo -+ -+c vector from site to geometric centre -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-uxx(jneu) -+ tyy(j)=yyy(j)-uyy(jneu) -+ tzz(j)=zzz(j)-uzz(jneu) -+ -+ enddo -+ -+ enddo -+ -+c outer loop over neutral groups -+ -+ lchk=.true. -+ ibig=0 -+ ia=0 -+ -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ newlst=.true. -+ -+ isn=1 -+ call neutlst -+ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrceneu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions -+ -+ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. -+ x mod(nstep,nstbgr).eq.0)then -+ -+ call rdf0neu(ik,rcut) -+ -+ endif -+ -+ enddo -+ -+c check on validity of call to neutlst -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ if(.not.lchk)then -+ call gimax(ibig,1,i) -+ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf -+ call error(idnode,478) -+ endif -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) -+ -+c counter for rdf statistics outside loop structure -+ -+ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. -+ x mod(nstep,nstbgr).eq.0)numrdf=numrdf+1 -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,stat=fail(2)) -+ -+ return -+ end subroutine forces_neu -+ -+ subroutine multiple -+ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, -+ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, -+ x rvdw,vircpe,virsrp,volm) -+c*************************************************************************** -+c -+c dl_poly subroutine for multiple time step algorithm -+c reciprocal space calculated on long time steps. -+c -+c copyright daresbury laboratory -+c -+c author t. forester, may 1993 -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ Ewald sum : ewald1,2,3,4 -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ truncated and shifted coulombic : coul4 -+c = 10,11 ----- reaction field : coul3 -+c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3,4] -+c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3,4 -+c -+c**************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=5 -+ -+ logical newplst,newlst,lgofr,lzeql,lgr,loglnk,lewald,lspme -+ logical lhke,newjob,lcshft,lsolva,lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt -+ integer mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,fail -+ integer numlsts,i,nstep0,nsolva,isolva,ii,k,j,ik -+ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,volm,stresp,engcpl,engacc,viracc,engac1 -+ real(8) vircpl,eps,ann,engsr1,viracl,engsrl,virsrl,virac2,engcp1 -+ real(8) vircp1,engacl,engac2,virsr1 -+ -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension stresp(9),fail(nnn) -+ -+ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 -+ save engsr1,virsr1,stresp,fpx,fpy,fpz,newjob -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data newjob/.true./ -+ data numlsts/-1/ -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ lhke=(keyfce/2.eq.7) -+ lspme=(keyfce/2.eq.6) -+ lewald=(keyfce/2.eq.1) -+ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) -+ if(newlst)nstep0=nstep -+ newplst=(newlst).or.(mod(nstep-nstep0,multt).eq.0) -+ -+c allocate working arrays -+ -+ if(newjob)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) -+ endif -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1840) -+ enddo -+ -+ endif -+ -+c create ewald interpolation arrays -+ -+ if(newjob)then -+ -+ if(lspme.or.lewald.or.lcshft)then -+ -+ call erfcgen(alpha,drewd,rcut) -+ -+ endif -+ -+ endif -+ -+ newjob=.false. -+ -+c divide neighbour list into primary and secondary neighbours -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call primlst(idnode,mxnode,natms,imcon,rprim) -+ -+ endif -+ -+c flag for accumulating rdfs -+ -+ lgr=.false. -+ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) -+ lgr=(lgr.and.(newplst.and.lgofr)) -+ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) -+ -+c zero force and stress arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c ********************PROCESS SECONDARY NEIGHBOURS****************** -+ -+ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then -+ -+c zero accumulators -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ engsrl=0.d0 -+ virsrl=0.d0 -+ llsolva=lsolva -+ if(lsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate fourier contribution to secondary coulombic forces -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ if(lewald)then -+ -+ call ewald1 -+ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, -+ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) -+ -+c hautman-klein-ewald method -+ -+ elseif(lhke)then -+ -+ call hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engac1,viracc,alpha,epsq) -+ -+c real space terms of hk-ewald -+ -+ call hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engac2, -+ x virac2,drewd,rcut,epsq) -+ -+ engac1=engac1+engac2 -+ viracc=viracc+virac2 -+ -+ elseif(lspme)then -+ -+c smoothed particle mesh ewald -+ -+ call ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engac1,viracc,alpha,volm,epsq) -+ -+ endif -+ -+ engcpl=engcpl+engac1 -+ vircpl=vircpl+viracc -+ -+c calculate corrections for intramolecular coulomb terms in -+c Ewald sum -+c note: if using link cells - have double counted excluded -+c interactions use temporary adjustment to relative dielectric -+c constant -+ -+ eps=epsq -+ if(loglnk)eps=epsq*2.0d0 -+ -+c calculate self interaction corrections for fourier contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,nexatm(ii) -+ -+ j=lexatm(ii,k) -+ jlist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) -+ -+c calculate correction terms -+ -+ if(lhke)then -+ -+ call hkewald3(i,ii,engacc,viracc,eps) -+ -+ else -+ -+ call ewald3 -+ x (lsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) -+ -+ endif -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ enddo -+ -+ endif -+ -+c calculate pair contributions to secondary neighbour forces -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of distance -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrl=engsrl+engacc -+ virsrl=virsrl+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme)then -+ -+ call ewald2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,drewd,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ endif -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ flx(i)=fxx(i) -+ fly(i)=fyy(i) -+ flz(i)=fzz(i) -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stress(i) -+ stress(i)=0.d0 -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol(:) -+ cou_sol_lng(:)=cou_sol(:) -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc(:) -+ cou_exc_lng(:)=cou_exc(:) -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c calculate pair force contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=-list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of distance -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ if(newplst.or. -+ x (mod(nstep-nstep0,multt).le.1))then -+ -+ if(lhke)then -+ -+ call hkewald4(i,ik,engacc,viracc,engacl,viracl,rcut,epsq) -+ -+ else -+ -+ call ewald4 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,engacl,viracl, -+ x drewd,rcut,epsq) -+ -+ endif -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ engcpl=engcpl+engacl -+ vircpl=vircpl+viracl -+ -+ else -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+ enddo -+ -+c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary neighbour contributions to force, energy etc -+ -+ if(newplst)then -+ -+ do i=1,natms -+ -+ fpx(i)=flx(i) -+ fpy(i)=fly(i) -+ fpz(i)=flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stresl(i) -+ enddo -+ -+ engsr1=engsrl -+ virsr1=virsrl -+ engcp1=engcpl -+ vircp1=vircpl -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol_lng(:) -+ cou_sol_put(:)=cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc_lng(:) -+ cou_exc_put(:)=cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c calculate force increments etc -+ -+ if(mod(nstep-nstep0,multt).eq.1)then -+ -+ do i=1,natms -+ -+ flx(i)=flx(i)-fpx(i) -+ fly(i)=fly(i)-fpy(i) -+ flz(i)=flz(i)-fpz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stresl(i)-stresp(i) -+ enddo -+ -+ virsrl=virsrl-virsr1 -+ engsrl=engsrl-engsr1 -+ vircpl=vircpl-vircp1 -+ engcpl=engcpl-engcp1 -+ -+c solvation and excitation increments -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) -+ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) -+ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c extrapolate long range terms -+ -+ ann=dble(mod(nstep-nstep0,multt)) -+ -+ do i=1,natms -+ -+ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) -+ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) -+ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresp(i)+stresl(i)*ann -+ enddo -+ -+ engsrp=engsr1+engsrl*ann+engsrp -+ virsrp=virsr1+virsrl*ann+virsrp -+ engcpe=engcp1+engcpl*ann+engcpe -+ vircpe=vircp1+vircpl*ann+vircpe -+ -+c solvation and excitation extrapolation -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) -+ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) -+ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+ return -+ end subroutine multiple -+ -+ subroutine multiple_neu -+ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rprim,rcut,rvdw,alpha,vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c neutral group implemenation - no Ewald sum option -+c multiple timestep option -+c -+c parallel replicated data version -+c -+c fpx,fpy,fpz : forces from electrostatics fron rprim < r <= rcut -+c fxx,fyy,fzz : total force -+c -+c copyright daresbury laboratory april 1994 -+c author - t. forester april 1993 -+c key: -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ invalid -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ invalid -+c = 10,11 ----- reaction field : coul3 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical lgofr,lzeql,newlst,newplst,lgr,lchk,newjob,lsolva -+ logical lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,multt,mxnode,natms,nneut,nstbgr -+ integer nstep,nsteql,numrdf,fail,i,numlsts,jneu,jj0,j -+ integer jj1,ineu,ia,isn,ibig,ik,nstep0,nsolva,isolva -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rprim,rcut,rvdw,vircpe -+ real(8) virsrp,engcpl,vircpl,engsrl,virsrl,anorm,ann,stresp -+ real(8) engacc,viracc,engsr1,virsr1,engcp1,vircp1,alpha -+ -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension fail(nnn),stresp(9) -+ -+ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 -+ save engsr1,virsr1,stresp,fpx,fpy,fpz -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data newjob/.true./ -+ data numlsts/-1/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ if(newjob)then -+ -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(3)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(4)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(5)) -+ -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(6)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(7)) -+ endif -+ -+ endif -+ newjob=.false. -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1850) -+ enddo -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c error if ewald sum requested -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) -+ -+c create list of primary and secondary neighbours -+ -+ if(newlst)nstep0=nstep -+ newplst=(mod(nstep-nstep0,multt).eq.0) -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) -+ -+ endif -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c zero force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress arrays -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c flag for accumulating rdfs -+ -+ lgr=.false. -+ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) -+ lgr=(lgr.and.(newplst.and.lgofr)) -+ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) -+ -+c intra group vectors com -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-xxx(jj0) -+ tyy(j)=yyy(j)-yyy(jj0) -+ tzz(j)=zzz(j)-zzz(jj0) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,natms,cell,txx,tyy,tzz) -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ xxx(j)=txx(j)+xxx(jj0) -+ yyy(j)=tyy(j)+yyy(jj0) -+ zzz(j)=tzz(j)+zzz(jj0) -+ -+ enddo -+ -+c centre of molecule -+ -+ uxx(jneu)=0.d0 -+ uyy(jneu)=0.d0 -+ uzz(jneu)=0.d0 -+ anorm=1.d0/dble(jj1-jj0+1) -+ -+ do j=jj0,jj1 -+ -+ uxx(jneu)=uxx(jneu)+xxx(j)*anorm -+ uyy(jneu)=uyy(jneu)+yyy(j)*anorm -+ uzz(jneu)=uzz(jneu)+zzz(j)*anorm -+ -+ enddo -+ -+c vector from site to geometric centre -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-uxx(jneu) -+ tyy(j)=yyy(j)-uyy(jneu) -+ tzz(j)=zzz(j)-uzz(jneu) -+ -+ enddo -+ -+ enddo -+ -+c ********************PROCESS SECONDARY NEIGHBOURS******************** -+ -+ lchk=.true. -+ ibig=0 -+ ia=0 -+ -+ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then -+ -+c zero accumulators for secondary neighbour energies and virial -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ engsrl=0.d0 -+ virsrl=0.d0 -+ -+c initialise solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c outer loop over neutral groups -+ -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ isn=-1 -+ call neutlst -+ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1.and.(rvdw.gt.rprim-delr))then -+ -+ call srfrceneu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrl=engsrl+engacc -+ virsrl=virsrl+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ else -+ -+ call error(idnode,250) -+ -+ endif -+ -+c accumulate radial distribution functions out to rcut -+ -+ if(lgr)then -+ call rdf0neu(ik,rcut) -+ endif -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ flx(i)=fxx(i) -+ fly(i)=fyy(i) -+ flz(i)=fzz(i) -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ -+ stresl(i)=stress(i) -+ stress(i)=0.d0 -+ -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol(:) -+ cou_sol_lng(:)=cou_sol(:) -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc(:) -+ cou_exc_lng(:)=cou_exc(:) -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+ ia=0 -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ isn=1 -+ call neutlst -+ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrceneu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions out to rcut -+ -+ if(lgr)then -+ call rdf0neu(ik,rcut) -+ endif -+ -+ enddo -+ -+c ******************END OF PRIMARY NEIGHBOUR PROCESSING************* -+ -+c check on validity of call to neutlst -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ if(.not.lchk)then -+ call gimax(ibig,1,i) -+ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf -+ call error(idnode,479) -+ endif -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary neighbour contributions to force, energy etc -+ -+ if(newplst)then -+ -+ do i=1,natms -+ -+ fpx(i)=flx(i) -+ fpy(i)=fly(i) -+ fpz(i)=flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stresl(i) -+ enddo -+ -+ engsr1=engsrl -+ virsr1=virsrl -+ engcp1=engcpl -+ vircp1=vircpl -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol_lng(:) -+ cou_sol_put(:)=cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc_lng(:) -+ cou_exc_put(:)=cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c calculate force increments etc -+ -+ if(mod(nstep-nstep0,multt).eq.1)then -+ -+ do i=1,natms -+ -+ flx(i)=flx(i)-fpx(i) -+ fly(i)=fly(i)-fpy(i) -+ flz(i)=flz(i)-fpz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stresl(i)-stresp(i) -+ enddo -+ -+ virsrl=virsrl-virsr1 -+ engsrl=engsrl-engsr1 -+ vircpl=vircpl-vircp1 -+ engcpl=engcpl-engcp1 -+ -+c solvation and excitation increments -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) -+ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) -+ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c extrapolate long range terms -+ -+ ann=dble(mod(nstep-nstep0,multt)) -+ -+ do i=1,natms -+ -+ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) -+ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) -+ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresl(i)*ann+stresp(i) -+ enddo -+ -+ engsrp=engsr1+engsrl*ann+engsrp -+ virsrp=virsr1+virsrl*ann+virsrp -+ engcpe=engcp1+engcpl*ann+engcpe -+ vircpe=vircp1+vircpl*ann+vircpe -+ -+c solvation and excitation extrapolation -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) -+ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) -+ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (txx,tyy,tzz,uxx,uyy,uzz,stat=fail(1)) -+ -+ return -+ end subroutine multiple_neu -+ -+ subroutine multiple_nsq -+ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for multiple time step algorithm -+c to be used with all-pairs option -+c -+c flx,fly,flz : forces from electrostatics from r > rcut -+c fpx,fpy,fpz : forces from electrostatics from rprim < r <= rcut -+c fxx,fyy,fzz : total force -+c -+c copyright daresbury laboratory 1993 -+c -+c author t. forester, may 1993 -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c Ewald sum --- not used -+c = 4,5 ------ Distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c truncated and shifted coulombic -- not used -+c reaction field - not used -+c -+c**************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=5 -+ logical newplst,newlst,lgofr,lzeql,lgr,lnsq,newjob,lsolva -+ logical lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,multt,mxnode,natms,nstep,nstbgr -+ integer nsteql,numrdf,fail,nstep0,ii,ik,k,numlsts,nsolva -+ integer isolva,i,j -+ real(8) delr,dlrpot,engcpe,engsrp,engcp3,epsq,rcut -+ real(8) rprim,rvdw,vircpe,virsrp,vircp3,rcut1,engcp2,vircp2 -+ real(8) engsr2,virsr2,stresp,engacc,viracc -+ -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension stresp(9),fail(nnn) -+ -+ save engsr2,virsr2,engcp2,vircp2,nstep0,numlsts,stresp,fpx,fpy,fpz -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data numlsts/-1/ -+ data newjob/.true./ -+ -+c allocate work arrays -+ -+ if(newjob)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) -+ endif -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1860) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+ if(lnsq)then -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c divide neighbour list into primary and secondary neighbours -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call primlst(idnode,mxnode,natms,imcon,rprim) -+ -+ endif -+ -+c flag for accumulating rdfs -+ -+ lgr=(lgofr.and.(.not.lzeql.or.(nstep-nsteql.gt.0))) -+ lgr=(lgr.and.newplst.and.(mod(numlsts,nstbgr).eq.0)) -+ -+c set extended cutoff for electrostatics - secondary shell -+ -+ rcut1=rcut+delr -+ -+ if(newlst)nstep0=nstep -+ newplst=(newlst.or.mod(nstep-nstep0,multt).eq.0) -+ -+c ********************PROCESS TERTIARY NEIGHBOURS********************* -+ -+ if(newplst)then -+ -+ call coul_nsq -+ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, -+ x engcp3,vircp3) -+ -+ endif -+ -+c ****************END OF TERTIARY NEIGHBOUR PROCESSING************** -+ -+c ********************PROCESS SECONDARY NEIGHBOURS******************** -+ -+ if(newplst)then -+ -+c zero accumulators for secondary neighbour energies and virial -+ -+ engcp2=0.d0 -+ vircp2=0.d0 -+ engsr2=0.d0 -+ virsr2=0.d0 -+ -+c zero secondary forces -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+ ii=0 -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic vectors -+ -+ ik=0 -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary condition only for interactions > rprim -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of interatomic distances -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c short range forces for secondary shell -+ -+ if((mod(keyfce,2).eq.1).and.(rvdw.gt.rprim-delr))then -+ -+ call srfrce -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsr2=engsr2+engacc -+ virsr2=virsr2+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then -+ -+ call error(idnode,424) -+ -+ elseif(keyfce/2.eq.2)then -+ -+c distance dependent dielectric -+ -+ call coul2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) -+ -+ engcp2=engcp2+engacc -+ vircp2=vircp2+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+c coulombic potential -+ -+ call coul0 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) -+ -+ engcp2=engcp2+engacc -+ vircp2=vircp2+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+c truncated shifted coulombic potential -+ -+ call error(idnode,424) -+ -+ endif -+ -+c accumulate radial distribution functions : out to rcut -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ fpx(i)=fxx(i) -+ fpy(i)=fyy(i) -+ fpz(i)=fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stress(i) -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol(:) -+ cou_sol_put(:)=cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc(:) -+ cou_exc_put(:)=cou_exc(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c zero primary forces -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c zero solvation and excitation arrays -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate primary pair force contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=-list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of interatomic distances -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions : out to rcut -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then -+ -+ call error(idnode,424) -+ -+ elseif(keyfce/2.eq.2)then -+ -+c distance dependent dielectric -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+c coulombic potential -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,424) -+ -+ endif -+ -+ enddo -+ -+c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary and tertiary neighbour contributions to -+c force, energy etc -+ -+ do i=1,natms -+ -+ fxx(i)=fxx(i)+fpx(i)+flx(i) -+ fyy(i)=fyy(i)+fpy(i)+fly(i) -+ fzz(i)=fzz(i)+fpz(i)+flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresp(i) -+ enddo -+ -+ engsrp=engsrp+engsr2 -+ virsrp=virsrp+virsr2 -+ -+ engcpe=engcpe+engcp2+engcp3 -+ vircpe=vircpe+vircp2+vircp3 -+ -+c calculate solvation and excitation arrays -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol(:)+vdw_sol_put(:)+vdw_sol_lng(:) -+ cou_sol(:)=cou_sol(:)+cou_sol_put(:)+cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc(:)+vdw_exc_put(:)+vdw_exc_lng(:) -+ cou_exc(:)=cou_exc(:)+cou_exc_put(:)+cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine multiple_nsq -+ -+ subroutine neutlst -+ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ll, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c*********************************************************************** -+c -+c dlpoly routine to create pair lists for neutral group -+c implementations. -+c loops over group ineu -+c -+c replicated data version -+c -+c copyright daresbury laboratory 1994 -+c author t.forester march 1994 -+c -+c isn = -1 => secondary neighbours -+c isn = 1 => primary neighbours - must contain excld interactions -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newlst,lchk,lexc -+ integer isn,imcon,idnode,ineu,ia,ll,i,jj,jj0,jj1 -+ integer fail,ibig,keyexc,lenia,j,jneu,in0,in1 -+ real(8) txx,tyy,tzz,uxx,uyy,uzz -+ -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1830) -+ -+ if(newlst)then -+ -+ ibig=0 -+ -+c set cutoff radius -+ -+ ll=0 -+ -+c number of excludes found -+ -+ if(isn.lt.0)then -+ keyexc=nexatm(ia)+2 -+ else -+ keyexc=1 -+ endif -+ -+c do centre - centre distances -+ -+ lenia=lentry(ia) -+ -+ do j=1,lenia -+ -+ jneu=abs(list(ia,j)) -+ xxt(j)=uxx(ineu)-uxx(jneu) -+ yyt(j)=uyy(ineu)-uyy(jneu) -+ zzt(j)=uzz(ineu)-uzz(jneu) -+ -+ enddo -+ -+ call images(imcon,0,1,lenia,cell,xxt,yyt,zzt) -+ -+c working intragroup vectors of central group -+c - for periodic boundaries -+ -+ in0=neulst(ineu) -+ in1=neulst(ineu+1)-1 -+ -+c loop over neutral groups sites of a -+ -+ -+c loop over groups in list -+ -+ do jj=1,lentry(ia) -+ -+ jneu=list(ia,jj)*isn -+ -+ if(jneu.gt.0)then -+ -+ do i=in0,in1 -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+ if(ineu.eq.jneu)jj0=i+1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+c reject atoms in excluded pair list -+ -+ lexc=.false. -+ -+ if(keyexc.lt.nexatm(ia))then -+ -+ if(lexatm(ia,keyexc).eq.i)then -+ if(lexatm(ia,keyexc+1).eq.j)then -+ lexc=.true. -+ keyexc=keyexc+2 -+ endif -+ endif -+ -+ endif -+ -+c reject frozen atom pairs -+ -+ if(lstfrz(i).ne.0)then -+ if(lstfrz(j).ne.0)lexc=.true. -+ endif -+ -+ if(.not.lexc)then -+ -+ ll=ll+1 -+ if(ll.le.mxxdf)then -+ -+ xdf(ll)=txx(i)+xxt(jj)-txx(j) -+ ydf(ll)=tyy(i)+yyt(jj)-tyy(j) -+ zdf(ll)=tzz(i)+zzt(jj)-tzz(j) -+ rsqdf(ll)=xdf(ll)**2+ydf(ll)**2+zdf(ll)**2 -+ ilist(ll)=i -+ jlist(ll)=j -+ -+ else -+ -+ lchk=.false. -+ ibig=max(ibig,ll) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail) -+ -+ return -+ end subroutine neutlst -+ -+ end module forces_module -+ -diff -urN dl_class_1.9.orig/srcmod/four_body_module.f dl_class_1.9/srcmod/four_body_module.f ---- dl_class_1.9.orig/srcmod/four_body_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/four_body_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,979 @@ -+ module four_body_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining four-body potential arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - w. smith aug 2008 : solvation, free energy, excitation -+c adapted - w. smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ -+ implicit none -+ -+ logical, allocatable :: filter(:) -+ real(8), allocatable :: prmfbp(:,:),rcut4b(:) -+ integer, allocatable :: lstfbp(:),ltpfbp(:),latfbp(:) -+ -+ save prmfbp,rcut4b,lstfbp,ltpfbp,latfbp,filter -+ -+ contains -+ -+ subroutine alloc_fbp_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(6) -+ -+ do i=1,6 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmfbp(mxfbp,mxpfbp),stat=fail(1)) -+ allocate (rcut4b(mxfbp),stat=fail(2)) -+ allocate (lstfbp(mxfbp),stat=fail(3)) -+ allocate (ltpfbp(mxfbp),stat=fail(4)) -+ allocate (latfbp(mxatms),stat=fail(5)) -+ allocate (filter(mxsite),stat=fail(6)) -+ -+ do i=1,6 -+ if(fail(i).gt.0)call error(idnode,1140) -+ enddo -+ -+ end subroutine alloc_fbp_arrays -+ -+ subroutine define_four_body -+ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, -+ x rcutfb,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining four body potentials -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits,lmols -+ character*8 keyword -+ character*8 atom0,atom1,atom2,atom3 -+ character*1 message(80) -+ integer idnode,ntpfbp,ntpatm,ifbp,itpfbp,keypot,katm0 -+ integer i,katm1,katm2,katm3,jtpatm,ka1,ka2,ka3,keyfbp,kfbp -+ integer j,fail,idum -+ real(8) rcutfb,engunit -+ real(8), allocatable :: parpot(:) -+ -+ data fail/0/ -+ -+ allocate (parpot(mxpfbp),stat=fail) -+ if(fail.ne.0)call error(idnode,1150) -+ -+ ntpfbp=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'number of specified four ', -+ x 'body potentials',i10)") ntpfbp -+ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ','atom 3 ', -+ x 'atom 4 ',3x,' key',30x,'parameters'/,/)") -+ -+ endif -+ if(ntpfbp.gt.mxfbp) call error(idnode,89) -+ if(.not.lunits) call error(idnode,6) -+ if(.not.lmols) call error(idnode,13) -+ -+ do i=1,mxsite -+ filter(i)=.false. -+ enddo -+ -+ do ifbp=1,mxfbp -+ lstfbp(ifbp)=0 -+ enddo -+ -+ do ifbp=1,mxfbp,mx3fbp -+ lstfbp(ifbp)=-1 -+ enddo -+ -+ rcutfb=0.d0 -+ -+ do itpfbp=1,ntpfbp -+ -+ do i=1,mxpfbp -+ parpot(i)=0.d0 -+ enddo -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+c Note the order!! atom0 is the central atom -+ -+ call copystring(record,message,80) -+ call getword(atom0,record,8,lenrec) -+ call getword(atom1,record,8,lenrec) -+ call getword(atom2,record,8,lenrec) -+ call getword(atom3,record,8,lenrec) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'harm') then -+ keypot=1 -+ elseif(keyword(1:4).eq.'hcos') then -+ keypot=2 -+ elseif(keyword(1:4).eq.'plan') then -+ keypot=3 -+ else -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,443) -+ endif -+ -+ parpot(1)=dblstr(record,lenrec,idum) -+ parpot(2)=dblstr(record,lenrec,idum) -+ parpot(3)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(16x,4a8,4x,a4,1x,1p,9e13.5)") -+ x atom0,atom1,atom2,atom3,keyword(1:4),(parpot(j),j=1,mxpfbp) -+ -+ katm0=0 -+ katm1=0 -+ katm2=0 -+ katm3=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm -+ if(atom3.eq.unqatm(jtpatm))katm3=jtpatm -+ -+ enddo -+ -+ if(katm0.eq.0.or.katm1.eq.0.or.katm2.eq.0.or. -+ x katm3.eq.0) call error(idnode,91) -+ -+ filter(katm0)=.true. -+ filter(katm1)=.true. -+ filter(katm2)=.true. -+ filter(katm3)=.true. -+ -+ ka1=max(katm1,katm2,katm3) -+ ka3=min(katm1,katm2,katm3) -+ ka2=katm1+katm2+katm3-ka1-ka3 -+ keyfbp=ka3+(ka2*(ka2-1))/2+(ka1*(ka1**2-1))/6+ -+ x (katm0-1)*mx3fbp -+ -+ if(keyfbp.gt.mxfbp) call error(idnode,101) -+ -+c convert parameters to internal units -+ -+ parpot(1)=parpot(1)*engunit -+ parpot(2)=parpot(2)*(pi/180.d0) -+ -+ if(keypot.eq.2)then -+ -+ parpot(2)=cos(parpot(2)) -+ -+ endif -+ -+ if(lstfbp(keyfbp).gt.0) call error(idnode,19) -+ lstfbp(keyfbp)=itpfbp -+ ltpfbp(itpfbp)=keypot -+ kfbp=mx3fbp*((keyfbp-1)/mx3fbp)+1 -+ if(lstfbp(kfbp).lt.0)lstfbp(kfbp)=0 -+ -+c calculate max four body cutoff -+ -+ rcutfb=max(rcutfb,parpot(3)) -+ rcut4b(itpfbp)=parpot(3) -+ -+c store four body potential parameters -+ -+ do i=1,mxpfbp -+ prmfbp(itpfbp,i)=parpot(i) -+ enddo -+ -+ enddo -+ -+ if(rcutfb.lt.1.d-6)call error(idnode,453) -+ -+ deallocate (parpot,stat=fail) -+ -+ return -+ end subroutine define_four_body -+ -+ subroutine fbpfrc -+ x (lsolva,lfree,lexcite,idnode,mxnode,natms,imcon,rcutfb, -+ x engfbp,virfbp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating four body inversion forces -+c arising from the inversion angle between three atoms around a -+c nominated central atom -+c -+c Note: the subroutine converts coordinates to reduced units -+c to avoid a call to images.f. The link cell algorithm used -+c here necessitates a parallelepiped cell geometry -+c -+c copyright - daresbury laboratory 1996 -+c author - w.smith july 1996 -+c adapted - w.smith aug 2008 solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect,lskip -+ logical idrive,jdrive,kdrive,ldrive -+ integer idnode,mxnode,natms,imcon,nix,niy,niz -+ integer i,j,k,nbx,nby,nbz,ncells,ix,iy,iz,icell,jx,jy -+ integer jz,jj,kk,ia,ib,ifbp,jfbp,kfbp,jklbd,kkfbp,ktyp,ii -+ integer ic,ll,id,lfbp,l,limit,jcell,kkk -+ real(8) rcutfb,engfbp,virfbp,vbn,vcn,pterm,xm,ym,zm -+ real(8) strs,cprp,det,xdc,ydc,zdc,sxx,syy,szz,sxab,strs_loc -+ real(8) syab,szab,xab,yab,zab,rab2,sxac,syac,szac,xac,yac -+ real(8) zac,rac2,sxad,syad,szad,xad,yad,zad,rad2,rrab,rrac -+ real(8) rrad,rbc,rcd,rdb,ubx,uby,ubz,ubn,rub,vbx,vby,vbz -+ real(8) rvb,wwb,ucx,ucy,ucz,ucn,ruc,vcx,vcy,vcz,rvc,wwc -+ real(8) udx,udy,udz,udn,rud,vdx,vdy,vdz,vdn,rvd,wwd,cosb -+ real(8) cosc,cosd,thb,thc,thd,gamb,gamc,gamd,rubc,rubd -+ real(8) rucd,rucb,rudb,rudc,rvbc,rvbd,rvcd,rvcb,rvdb,rvdc -+ real(8) fax,fay,faz,fbx,fby,fbz,fcx,fcy,fcz,fdx,fdy,fdz -+ dimension cprp(10),strs(6),nix(27),niy(27),niz(27),strs_loc(6) -+ -+ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, -+ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ -+ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, -+ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ -+ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ -+ -+ lskip=(lfree.or.lexcite) -+ -+c flag for undefined potentials -+ -+ safe=.true. -+ -+c initialise accumulators -+ -+ engfbp=0.d0 -+ virfbp=0.d0 -+ fbp_fre=0.d0 -+ fbp_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(9)=.true. -+ en4_sol(:)=0.d0 -+ if(lexcite)en4_exc(:)=0.d0 -+ -+ endif -+ -+c create mock cell vectors for non-periodic system -+ -+ if(imcon.eq.0) then -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ do i=1,natms -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ enddo -+ -+ cell(1)=2.d0*xm+rcutfb -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(5)=2.d0*ym+rcutfb -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ cell(9)=2.d0*zm+rcutfb -+ -+ endif -+ -+c check for appropriate boundary conditions -+ -+ if(imcon.gt.3)call error(idnode,79) -+ call invert(cell,rcell,det) -+ call dcell(cell,cprp) -+ -+c calculate link cell numbers -+ -+ nbx=int(cprp(7)/(rcutfb+1.d-6)) -+ nby=int(cprp(8)/(rcutfb+1.d-6)) -+ nbz=int(cprp(9)/(rcutfb+1.d-6)) -+ ncells=nbx*nby*nbz -+ if(ncells.gt.mxcell) then -+ -+ if(idnode.eq.0) write(nrite,'(a,i6)') -+ x 'number of required link cells in routine fbpfrc is ',ncells -+ write(nrite,'(a,i6)') -+ x 'number of default link cells in routine fbpfrc is ',mxcell -+ call error(idnode,87) -+ -+ endif -+ -+c transform atomic coordinates and construct link cells -+ -+ do l=1,ncells -+ -+ lct(l)=0 -+ lst(l)=0 -+ -+ enddo -+ -+ xdc=dble(nbx) -+ ydc=dble(nby) -+ zdc=dble(nbz) -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ xxx(i)=sxx -+ yyy(i)=syy -+ zzz(i)=szz -+ -+ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) -+ iy=min(int(ydc*(syy+0.5d0)),nby-1) -+ iz=min(int(zdc*(szz+0.5d0)),nbz-1) -+ k=1+ix+nbx*(iy+nby*iz) -+ lst(k)=lst(k)+1 -+ link(i)=lct(k) -+ lct(k)=i -+ -+ endif -+ -+ enddo -+ -+c loop over central atoms of inversion -+ -+ ix=0 -+ iy=1 -+ iz=1 -+ do icell=1,ncells -+ -+ ix=ix+1 -+ if(ix.gt.nbx)then -+ ix=1 -+ iy=iy+1 -+ if(iy.gt.nby)then -+ iy=1 -+ iz=iz+1 -+ endif -+ endif -+ -+ k=0 -+ do kk=1,27 -+ -+ jx=ix+nix(kk) -+ jy=iy+niy(kk) -+ jz=iz+niz(kk) -+ -+ if(jx.gt.nbx)jx=1 -+ if(jy.gt.nby)jy=1 -+ if(jz.gt.nbz)jz=1 -+ if(jx.lt.1)jx=jx+nbx -+ if(jy.lt.1)jy=jy+nby -+ if(jz.lt.1)jz=jz+nbz -+ -+ jcell=jx+nbx*(jy-1+nby*(jz-1)) -+ j=lct(jcell) -+ -+ do ii=1,lst(jcell) -+ -+ k=k+1 -+ latfbp(k)=j -+ j=link(j) -+ -+ enddo -+ -+ enddo -+ -+ limit=k -+ -+ do ii=1,lst(icell) -+ -+ ia=latfbp(ii) -+ if(lmetadyn)idrive=driven(ltype(ia)) -+ ifbp=mx3fbp*(ltype(ia)-1) -+ if(mod(ia,mxnode).eq.idnode.and.lstfbp(ifbp+1).ge.0)then -+ -+ do jj=1,limit-2 -+ -+ ib=latfbp(jj) -+ if(lmetadyn)jdrive=driven(ltype(ib)) -+ -+ do kk=jj+1,limit-1 -+ -+ ic=latfbp(kk) -+ if(lmetadyn)kdrive=driven(ltype(ic)) -+ -+ do ll=kk+1,limit -+ -+ id=latfbp(ll) -+ if(lmetadyn)ldrive=driven(ltype(id)) -+ -+ if(lskip)then -+ -+ if((atm_fre(ia).eq.1.or.atm_fre(ib).eq.1.or. -+ x atm_fre(ic).eq.1.or.atm_fre(id).eq.1).and. -+ x (atm_fre(ia).eq.2.or.atm_fre(ib).eq.2.or. -+ x atm_fre(ic).eq.2.or.atm_fre(id).eq.2))cycle -+ -+ endif -+ -+ jfbp=max(ltype(ib),ltype(ic),ltype(id)) -+ lfbp=min(ltype(ib),ltype(ic),ltype(id)) -+ kfbp=ltype(ib)+ltype(ic)+ltype(id)-jfbp-lfbp -+ jklbd=ifbp+lfbp+(kfbp*(kfbp-1))/2+(jfbp*(jfbp**2-1))/6 -+ kkfbp=lstfbp(jklbd) -+ if(kkfbp.gt.0)then -+ -+ sxab=xxx(ib)-xxx(ia) -+ sxab=sxab-nint(sxab) -+ syab=yyy(ib)-yyy(ia) -+ syab=syab-nint(syab) -+ szab=zzz(ib)-zzz(ia) -+ szab=szab-nint(szab) -+ -+ xab=cell(1)*sxab+cell(4)*syab+cell(7)*szab -+ if(abs(xab).lt.rcutfb)then -+ -+ yab=cell(2)*sxab+cell(5)*syab+cell(8)*szab -+ if(abs(yab).lt.rcutfb)then -+ -+ zab=cell(3)*sxab+cell(6)*syab+cell(9)*szab -+ if(abs(zab).lt.rcutfb)then -+ -+ rab2=xab*xab+yab*yab+zab*zab -+ -+ sxac=xxx(ic)-xxx(ia) -+ sxac=sxac-nint(sxac) -+ syac=yyy(ic)-yyy(ia) -+ syac=syac-nint(syac) -+ szac=zzz(ic)-zzz(ia) -+ szac=szac-nint(szac) -+ -+ xac=cell(1)*sxac+cell(4)*syac+cell(7)*szac -+ if(abs(xac).lt.rcutfb)then -+ -+ yac=cell(2)*sxac+cell(5)*syac+cell(8)*szac -+ if(abs(yac).lt.rcutfb)then -+ -+ zac=cell(3)*sxac+cell(6)*syac+cell(9)*szac -+ if(abs(zac).lt.rcutfb)then -+ -+ rac2=xac*xac+yac*yac+zac*zac -+ -+ sxad=xxx(id)-xxx(ia) -+ sxad=sxad-nint(sxad) -+ syad=yyy(id)-yyy(ia) -+ syad=syad-nint(syad) -+ szad=zzz(id)-zzz(ia) -+ szad=szad-nint(szad) -+ -+ xad=cell(1)*sxad+cell(4)*syad+cell(7)*szad -+ if(abs(xad).lt.rcutfb)then -+ -+ yad=cell(2)*sxad+cell(5)*syad+cell(8)*szad -+ if(abs(yad).lt.rcutfb)then -+ -+ zad=cell(3)*sxad+cell(6)*syad+cell(9)*szad -+ if(abs(zad).lt.rcutfb)then -+ -+ rad2=xad*xad+yad*yad+zad*zad -+ -+ if(rcut4b(kkfbp)**2.ge.max(rab2,rac2,rad2))then -+ -+ rrab=1.d0/sqrt(rab2) -+ rrac=1.d0/sqrt(rac2) -+ rrad=1.d0/sqrt(rad2) -+ -+ rbc=xab*xac+yab*yac+zab*zac -+ rcd=xac*xad+yac*yad+zac*zad -+ rdb=xad*xab+yad*yab+zad*zab -+ -+c calculate bond-angle-plane vectors -+ -+ ubx=xac*rrac+xad*rrad -+ uby=yac*rrac+yad*rrad -+ ubz=zac*rrac+zad*rrad -+ ubn=1.d0/sqrt(ubx**2+uby**2+ubz**2) -+ ubx=ubn*ubx -+ uby=ubn*uby -+ ubz=ubn*ubz -+ rub=xab*ubx+yab*uby+zab*ubz -+ -+ vbx=xac*rrac-xad*rrad -+ vby=yac*rrac-yad*rrad -+ vbz=zac*rrac-zad*rrad -+ vbn=1.d0/sqrt(vbx**2+vby**2+vbz**2) -+ vbx=vbn*vbx -+ vby=vbn*vby -+ vbz=vbn*vbz -+ rvb=xab*vbx+yab*vby+zab*vbz -+ wwb=sqrt(rub**2+rvb**2) -+ -+ ucx=xad*rrad+xab*rrab -+ ucy=yad*rrad+yab*rrab -+ ucz=zad*rrad+zab*rrab -+ ucn=1.d0/sqrt(ucx**2+ucy**2+ucz**2) -+ ucx=ucn*ucx -+ ucy=ucn*ucy -+ ucz=ucn*ucz -+ ruc=xac*ucx+yac*ucy+zac*ucz -+ -+ vcx=xad*rrad-xab*rrab -+ vcy=yad*rrad-yab*rrab -+ vcz=zad*rrad-zab*rrab -+ vcn=1.d0/sqrt(vcx**2+vcy**2+vcz**2) -+ vcx=vcn*vcx -+ vcy=vcn*vcy -+ vcz=vcn*vcz -+ rvc=xac*vcx+yac*vcy+zac*vcz -+ wwc=sqrt(ruc**2+rvc**2) -+ -+ udx=xab*rrab+xac*rrac -+ udy=yab*rrab+yac*rrac -+ udz=zab*rrab+zac*rrac -+ udn=1.d0/sqrt(udx**2+udy**2+udz**2) -+ udx=udn*udx -+ udy=udn*udy -+ udz=udn*udz -+ rud=xad*udx+yad*udy+zad*udz -+ -+ vdx=xab*rrab-xac*rrac -+ vdy=yab*rrab-yac*rrac -+ vdz=zab*rrab-zac*rrac -+ vdn=1.d0/sqrt(vdx**2+vdy**2+vdz**2) -+ vdx=vdn*vdx -+ vdy=vdn*vdy -+ vdz=vdn*vdz -+ rvd=xad*vdx+yad*vdy+zad*vdz -+ wwd=sqrt(rud**2+rvd**2) -+ -+c calculate inversion angle cosines -+ -+ cosb=wwb*rrab -+ cosc=wwc*rrac -+ cosd=wwd*rrad -+ if(abs(cosb).gt.1.d0)cosb=sign(1.d0,cosb) -+ if(abs(cosc).gt.1.d0)cosc=sign(1.d0,cosc) -+ if(abs(cosd).gt.1.d0)cosd=sign(1.d0,cosd) -+ -+c select potential energy function type -+ -+ ktyp=ltpfbp(kkfbp) -+ -+c calculate potential energy and scalar force term -+ -+ if(ktyp.eq.1)then -+ -+c key=1 for harmonic potential -+ -+ thb=acos(cosb) -+ thc=acos(cosc) -+ thd=acos(cosd) -+ -+ pterm=0.5d0*prmfbp(kkfbp,1)* -+ x ((thb-prmfbp(kkfbp,2))**2+ -+ x (thc-prmfbp(kkfbp,2))**2+ -+ x (thd-prmfbp(kkfbp,2))**2)/3.d0 -+ -+ gamb=0.d0 -+ if(abs(thb).gt.1.d-12)gamb=prmfbp(kkfbp,1)* -+ x (thb-prmfbp(kkfbp,2))/(3.d0*sin(thb)) -+ gamc=0.d0 -+ if(abs(thc).gt.1.d-12)gamc=prmfbp(kkfbp,1)* -+ x (thc-prmfbp(kkfbp,2))/(3.d0*sin(thc)) -+ gamd=0.d0 -+ if(abs(thd).gt.1.d-12)gamd=prmfbp(kkfbp,1)* -+ x (thd-prmfbp(kkfbp,2))/(3.d0*sin(thd)) -+ -+ else if(ktyp.eq.2)then -+ -+c key=2 for harmonic cosine inversion potential -+ -+ pterm=0.5d0*prmfbp(kkfbp,1)* -+ x ((cosb-prmfbp(kkfbp,2))**2+ -+ x (cosc-prmfbp(kkfbp,2))**2+ -+ x (cosd-prmfbp(kkfbp,2))**2)/3.d0 -+ -+ gamb=-prmfbp(kkfbp,1)*(cosb-prmfbp(kkfbp,2))/3.d0 -+ gamc=-prmfbp(kkfbp,1)*(cosc-prmfbp(kkfbp,2))/3.d0 -+ gamd=-prmfbp(kkfbp,1)*(cosd-prmfbp(kkfbp,2))/3.d0 -+ -+ else if(ktyp.eq.3)then -+ -+c key=3 for planar inversion potentials -+ -+ pterm=prmfbp(kkfbp,1)* -+ x (3.d0-cosb-cosc-cosd)/3.d0 -+ -+ gamb=-prmfbp(kkfbp,1)/3.d0 -+ gamc=-prmfbp(kkfbp,1)/3.d0 -+ gamd=-prmfbp(kkfbp,1)/3.d0 -+ -+ else -+ -+c undefined potential -+ -+ safe=.false. -+ pterm=0.d0 -+ gamb=0.d0 -+ gamc=0.d0 -+ gamd=0.d0 -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set quadruple index -+ -+ if(lsolva) -+ x kkk=loc4(atmolt(ia),atmolt(ib),atmolt(ic),atmolt(id)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. -+ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ -+ x atm_fre(id).eq.0) -+ -+ if(lsolva)en4_exc(kkk)=en4_exc(kkk)+pterm -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. -+ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ fbp_fre=fbp_fre-pterm -+ pterm=lambda1*pterm -+ gamb=lambda1*gamb -+ gamc=lambda1*gamc -+ gamd=lambda1*gamd -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. -+ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ fbp_fre=fbp_fre+pterm -+ pterm=lambda2*pterm -+ gamb=lambda2*gamb -+ gamc=lambda2*gamc -+ gamd=lambda2*gamd -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential -+ -+ engfbp=engfbp+pterm -+ -+ if(lsolva)en4_sol(kkk)=en4_sol(kkk)+pterm -+ -+c calculate bond and u,v scalar products -+ -+ rubc=xab*ucx+yab*ucy+zab*ucz -+ rubd=xab*udx+yab*udy+zab*udz -+ rucd=xac*udx+yac*udy+zac*udz -+ rucb=xac*ubx+yac*uby+zac*ubz -+ rudb=xad*ubx+yad*uby+zad*ubz -+ rudc=xad*ucx+yad*ucy+zad*ucz -+ -+ rvbc=xab*vcx+yab*vcy+zab*vcz -+ rvbd=xab*vdx+yab*vdy+zab*vdz -+ rvcd=xac*vdx+yac*vdy+zac*vdz -+ rvcb=xac*vbx+yac*vby+zac*vbz -+ rvdb=xad*vbx+yad*vby+zad*vbz -+ rvdc=xad*vcx+yad*vcy+zad*vcz -+ -+c calculate atomic forces -+ -+ fbx=gamb*(-cosb*xab*rrab**2+rrab*(rub*ubx+rvb*vbx)/wwb) -+ x +(ruc*ucn*rrab*(xac-ruc*ucx-(rbc-ruc*rubc)*xab*rrab**2) -+ x - rvc*vcn*rrab*(xac-rvc*vcx-(rbc-rvc*rvbc)*xab*rrab**2)) -+ x * gamc*rrac/wwc -+ x +(rud*udn*rrab*(xad-rud*udx-(rdb-rud*rubd)*xab*rrab**2) -+ x + rvd*vdn*rrab*(xad-rvd*vdx-(rdb-rvd*rvbd)*xab*rrab**2)) -+ x * gamd*rrad/wwd -+ -+ fby=gamb*(-cosb*yab*rrab**2+rrab*(rub*uby+rvb*vby)/wwb) -+ x +(ruc*ucn*rrab*(yac-ruc*ucy-(rbc-ruc*rubc)*yab*rrab**2) -+ x - rvc*vcn*rrab*(yac-rvc*vcy-(rbc-rvc*rvbc)*yab*rrab**2)) -+ x * gamc*rrac/wwc -+ x +(rud*udn*rrab*(yad-rud*udy-(rdb-rud*rubd)*yab*rrab**2) -+ x + rvd*vdn*rrab*(yad-rvd*vdy-(rdb-rvd*rvbd)*yab*rrab**2)) -+ x * gamd*rrad/wwd -+ -+ fbz=gamb*(-cosb*zab*rrab**2+rrab*(rub*ubz+rvb*vbz)/wwb) -+ x +(ruc*ucn*rrab*(zac-ruc*ucz-(rbc-ruc*rubc)*zab*rrab**2) -+ x - rvc*vcn*rrab*(zac-rvc*vcz-(rbc-rvc*rvbc)*zab*rrab**2)) -+ x * gamc*rrac/wwc -+ x +(rud*udn*rrab*(zad-rud*udz-(rdb-rud*rubd)*zab*rrab**2) -+ x + rvd*vdn*rrab*(zad-rvd*vdz-(rdb-rvd*rvbd)*zab*rrab**2)) -+ x * gamd*rrad/wwd -+ -+ fcx=gamc*(-cosc*xac*rrac**2+rrac*(ruc*ucx+rvc*vcx)/wwc) -+ x +(rud*udn*rrac*(xad-rud*udx-(rcd-rud*rucd)*xac*rrac**2) -+ x - rvd*vdn*rrac*(xad-rvd*vdx-(rcd-rvd*rvcd)*xac*rrac**2)) -+ x * gamd*rrad/wwd -+ x +(rub*ubn*rrac*(xab-rub*ubx-(rbc-rub*rucb)*xac*rrac**2) -+ x + rvb*vbn*rrac*(xab-rvb*vbx-(rbc-rvb*rvcb)*xac*rrac**2)) -+ x * gamb*rrab/wwb -+ -+ fcy=gamc*(-cosc*yac*rrac**2+rrac*(ruc*ucy+rvc*vcy)/wwc) -+ x +(rud*udn*rrac*(yad-rud*udy-(rcd-rud*rucd)*yac*rrac**2) -+ x - rvd*vdn*rrac*(yad-rvd*vdy-(rcd-rvd*rvcd)*yac*rrac**2)) -+ x * gamd*rrad/wwd -+ x +(rub*ubn*rrac*(yab-rub*uby-(rbc-rub*rucb)*yac*rrac**2) -+ x + rvb*vbn*rrac*(yab-rvb*vby-(rbc-rvb*rvcb)*yac*rrac**2)) -+ x * gamb*rrab/wwb -+ -+ fcz=gamc*(-cosc*zac*rrac**2+rrac*(ruc*ucz+rvc*vcz)/wwc) -+ x +(rud*udn*rrac*(zad-rud*udz-(rcd-rud*rucd)*zac*rrac**2) -+ x - rvd*vdn*rrac*(zad-rvd*vdz-(rcd-rvd*rvcd)*zac*rrac**2)) -+ x * gamd*rrad/wwd -+ x +(rub*ubn*rrac*(zab-rub*ubz-(rbc-rub*rucb)*zac*rrac**2) -+ x + rvb*vbn*rrac*(zab-rvb*vbz-(rbc-rvb*rvcb)*zac*rrac**2)) -+ x * gamb*rrab/wwb -+ -+ fdx=gamd*(-cosd*xad*rrad**2+rrad*(rud*udx+rvd*vdx)/wwd) -+ x +(rub*ubn*rrad*(xab-rub*ubx-(rdb-rub*rudb)*xad*rrad**2) -+ x - rvb*vbn*rrad*(xab-rvb*vbx-(rdb-rvb*rvdb)*xad*rrad**2)) -+ x * gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(xac-ruc*ucx-(rcd-ruc*rudc)*xad*rrad**2) -+ x + rvc*vcn*rrad*(xac-rvc*vcx-(rcd-rvc*rvdc)*xad*rrad**2)) -+ x * gamc*rrac/wwc -+ -+ fdy=gamd*(-cosd*yad*rrad**2+rrad*(rud*udy+rvd*vdy)/wwd) -+ x +(rub*ubn*rrad*(yab-rub*uby-(rdb-rub*rudb)*yad*rrad**2) -+ x - rvb*vbn*rrad*(yab-rvb*vby-(rdb-rvb*rvdb)*yad*rrad**2)) -+ x * gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(yac-ruc*ucy-(rcd-ruc*rudc)*yad*rrad**2) -+ x + rvc*vcn*rrad*(yac-rvc*vcy-(rcd-rvc*rvdc)*yad*rrad**2)) -+ x * gamc*rrac/wwc -+ -+ fdz=gamd*(-cosd*zad*rrad**2+rrad*(rud*udz+rvd*vdz)/wwd) -+ x +(rub*ubn*rrad*(zab-rub*ubz-(rdb-rub*rudb)*zad*rrad**2) -+ x - rvb*vbn*rrad*(zab-rvb*vbz-(rdb-rvb*rvdb)*zad*rrad**2)) -+ x * gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(zac-ruc*ucz-(rcd-ruc*rudc)*zad*rrad**2) -+ x + rvc*vcn*rrad*(zac-rvc*vcz-(rcd-rvc*rvdc)*zad*rrad**2)) -+ x * gamc*rrac/wwc -+ -+ fax=-(fbx+fcx+fdx) -+ fay=-(fby+fcy+fdy) -+ faz=-(fbz+fcz+fdz) -+ -+ fxx(ia)=fxx(ia)+fax -+ fyy(ia)=fyy(ia)+fay -+ fzz(ia)=fzz(ia)+faz -+ -+ fxx(ib)=fxx(ib)+fbx -+ fyy(ib)=fyy(ib)+fby -+ fzz(ib)=fzz(ib)+fbz -+ -+ fxx(ic)=fxx(ic)+fcx -+ fyy(ic)=fyy(ic)+fcy -+ fzz(ic)=fzz(ic)+fcz -+ -+ fxx(id)=fxx(id)+fdx -+ fyy(id)=fyy(id)+fdy -+ fzz(id)=fzz(id)+fdz -+ -+c stress tensor calculation for inversion terms -+ -+ strs(1)=strs(1)+xab*fbx+xac*fcx+xad*fdx -+ strs(2)=strs(2)+yab*fbx+yac*fcx+yad*fdx -+ strs(3)=strs(3)+zab*fbx+zac*fcx+zad*fdx -+ strs(4)=strs(4)+yab*fby+yac*fcy+yad*fdy -+ strs(5)=strs(5)+yab*fbz+yac*fcz+yad*fdz -+ strs(6)=strs(6)+zab*fbz+zac*fcz+zad*fdz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then -+ -+c local energy (no virial) -+ -+ eng_loc=eng_loc+pterm -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fax -+ fyy_loc(ia)=fyy_loc(ia)+fay -+ fzz_loc(ia)=fzz_loc(ia)+faz -+ -+ fxx_loc(ib)=fxx_loc(ib)+fbx -+ fyy_loc(ib)=fyy_loc(ib)+fby -+ fzz_loc(ib)=fzz_loc(ib)+fbz -+ -+ fxx_loc(ic)=fxx_loc(ic)+fcx -+ fyy_loc(ic)=fyy_loc(ic)+fcy -+ fzz_loc(ic)=fzz_loc(ic)+fcz -+ -+ fxx_loc(id)=fxx_loc(id)+fdx -+ fyy_loc(id)=fyy_loc(id)+fdy -+ fzz_loc(id)=fzz_loc(id)+fdz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xab*fbx+xac*fcx+xad*fdx -+ strs_loc(2)=strs_loc(2)+yab*fbx+yac*fcx+yad*fdx -+ strs_loc(3)=strs_loc(3)+zab*fbx+zac*fcx+zad*fdx -+ strs_loc(4)=strs_loc(4)+yab*fby+yac*fcy+yad*fdy -+ strs_loc(5)=strs_loc(5)+yab*fbz+yac*fcz+yad*fdz -+ strs_loc(6)=strs_loc(6)+zab*fbz+zac*fcz+zad*fdz -+ -+ endif -+ -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ -+ enddo -+ enddo -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,443) -+ -+c global sum of four body potential and virial -+ -+ buffer(1)=engfbp -+ buffer(2)=virfbp -+ buffer(3)=fbp_fre -+ buffer(4)=fbp_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engfbp=buffer(1) -+ virfbp=buffer(2) -+ fbp_fre=buffer(3) -+ fbp_vir=buffer(4) -+ -+c sum up solvation energies -+ -+ if(lsolva)then -+ -+ call gdsum(en4_sol,mxtmls_sol4,buffer(1)) -+ if(lexcite)call gdsum(en4_exc,mxtmls_exc4,buffer(1)) -+ -+ endif -+ -+c restore coordinate array to original representation -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=xxx(i) -+ syy=yyy(i) -+ szz=zzz(i) -+ -+ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz -+ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz -+ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz -+ -+ endif -+ -+ enddo -+ -+c restore cell vector -+ -+ if(imcon.eq.0) then -+ cell(1)=0.d0 -+ cell(5)=0.d0 -+ cell(9)=0.d0 -+ endif -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine fbpfrc -+ -+ end module four_body_module -diff -urN dl_class_1.9.orig/srcmod/hkewald_module.f dl_class_1.9/srcmod/hkewald_module.f ---- dl_class_1.9.orig/srcmod/hkewald_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/hkewald_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1292 @@ -+ module hkewald_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining hautman-klein ewald sum arrays -+c copyright - daresbury laboratory -+c author - w. smith nov 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use exclude_module -+ use error_module -+ use pair_module -+ use property_module -+ use setup_module -+ -+ implicit none -+ -+ real(8), allocatable :: ahk(:),crn(:,:) -+ real(8), allocatable :: elc(:,:),els(:,:) -+ real(8), allocatable :: emc(:,:),ems(:,:) -+ real(8), allocatable :: zzn(:),zzd(:) -+ real(8), allocatable :: hon(:,:),znp(:,:) -+ real(8), allocatable :: dhn(:,:),zgs(:) -+ real(8), allocatable :: fon(:,:),zgc(:) -+ real(8), allocatable :: ckc(:),cks(:) -+ real(8), allocatable :: pp(:),sss(:) -+ -+ save ahk,crn,elc,els,emc,ems,zzn,zzd,hon,znp,dhn,zgs -+ save fon,zgc,ckc,cks,pp,sss -+ -+ contains -+ -+ subroutine alloc_hke_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=9 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (ahk(0:mxhko),crn(0:mxhko,0:mxhko),stat=fail(1)) -+ allocate (elc(mxewld,0:1),els(mxewld,0:1),stat=fail(2)) -+ allocate (emc(mxewld,0:kmaxb),ems(mxewld,0:kmaxb),stat=fail(3)) -+ allocate (zzn(mxxdf),zzd(mxxdf),stat=fail(4)) -+ allocate (hon(mxgrid,0:mxhko),znp(mxhke,0:2*mxhko),stat=fail(5)) -+ allocate (dhn(mxgrid,0:mxhko),zgs(0:2*mxhko),stat=fail(6)) -+ allocate (fon(mxegrd,0:7),zgc(0:2*mxhko),stat=fail(7)) -+ allocate (ckc(mxewld),cks(mxewld),stat=fail(8)) -+ allocate (pp(2*mxhko),sss(mxxdf),stat=fail(9)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1730) -+ enddo -+ -+ end subroutine alloc_hke_arrays -+ -+ subroutine hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for generating convergence function -+c arrays for hautman klein ewald method (up to order 3 only) -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith february 2000 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,idnode,nhko,nlatt,k -+ real(8) alpha,drewd,rcut,ecut,den,fac,ss1,aaa,ss2 -+ -+ if(nhko.gt.mxhko)call error(idnode,332) -+ -+c define effective cutoff -+ -+ ecut=rcut*dble(2*nlatt+1) -+ -+c define grid resolution for potential arrays -+ -+ drewd=ecut/dble(mxegrd-4) -+ -+c calculate HKE coefficients -+ -+ ahk(0)=1.d0 -+ -+ do i=1,nhko -+ -+ ahk(i)=-0.25d0*ahk(i-1)*dble(2*i*(2*i-1))/dble(i*i) -+ -+ enddo -+ -+c generate convergence function arrays -+ -+ do i=1,mxegrd -+ -+ hon(i,0)=0.d0 -+ hon(i,1)=dble(i-1)*drewd -+ hon(i,2)=(2.d0*alpha/sqrpi)*exp(-(alpha*hon(i,1))**2) -+ -+ enddo -+ -+c generate error function and derivatives by recursion -+ -+ do k=100,1,-1 -+ -+ den=1.d0/dble(2*k-1) -+ fac=(2.d0*alpha**2)**(k-1) -+ -+ do i=1,mxegrd -+ -+ hon(i,0)=den*(hon(i,0)*hon(i,1)**2+fac*hon(i,2)) -+ -+ enddo -+ -+ if(k.le.2*nhko+2)then -+ -+ do i=1,mxegrd -+ -+ fon(i,k-1)=hon(i,0) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c zeroth order function -+c note: hon(1,0)=2.d0*alpha/sqrpi -+ -+ do i=1,mxegrd -+ -+ hon(i,0)= fon(i,0) -+ dhn(i,0)=-fon(i,1) -+ -+ enddo -+ -+ if(nhko.eq.0)then -+ -+ ss1=dble(mxegrd-1)*drewd -+ aaa=abs(1.d0-hon(mxegrd,nhko)*ss1) -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,100,aaa,0.d0,0.d0) -+ -+ endif -+ -+ return -+ -+ endif -+ -+c first order function -+c note: hon(1,1)=8.d0*alpha**3/(3.d0*sqrpi) -+ -+ do i=1,mxegrd -+ -+ ss2=(dble(i-1)*drewd)**2 -+ -+ hon(i,1)=-(2.d0*fon(i,1)-fon(i,2)*ss2) -+ dhn(i,1)= (4.d0*fon(i,2)-fon(i,3)*ss2) -+ -+ enddo -+ -+ if(nhko.eq.1)then -+ -+ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,100,aaa,0.d0,0.d0) -+ -+ endif -+ -+ return -+ -+ endif -+ -+c second order function -+c note: hon(1,2)=64.d0*alpha**5/(45.d0*sqrpi) -+ -+ do i=1,mxegrd -+ -+ ss2=(dble(i-1)*drewd)**2 -+ -+ hon(i,2)=(8.d0*fon(i,2)+ss2*(-8.d0*fon(i,3)+ss2*fon(i,4)))/9.d0 -+ dhn(i,2)=(-24.d0*fon(i,3)+ss2*(12.d0*fon(i,4)-ss2*fon(i,5))) -+ x /9.d0 -+ -+ enddo -+ -+ if(nhko.eq.2)then -+ -+ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,100,aaa,0.d0,0.d0) -+ -+ endif -+ -+ return -+ -+ endif -+ -+c third order function (enough for anyone!) -+c note: hon(1,3)=768.d0*alpha**7/(14175.d0*sqrpi) -+ -+ do i=1,mxegrd -+ -+ ss2=(dble(i-1)*drewd)**2 -+ -+ hon(i,3)=-(48.d0*fon(i,3)+ss2*(-72.d0*fon(i,4)+ss2*( -+ x 18.d0*fon(i,5)-ss2*fon(i,6))))/225.d0 -+ dhn(i,3)= (192.d0*fon(i,4)+ss2*(-144.d0*fon(i,5)+ss2*( -+ x 24.d0*fon(i,6)-ss2*fon(i,7))))/225.d0 -+ -+ enddo -+ -+ if(nhko.eq.3)then -+ -+ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,100,aaa,0.d0,0.d0) -+ -+ endif -+ -+ return -+ -+ endif -+ -+ return -+ end subroutine hkgen -+ -+ subroutine hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engcpe,vircpe,alpha,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces in a -+c periodic system using Hautman Klein Ewald method -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith february 2000 -+c -+c part 1 - reciprocal space terms (fourier part) -+c -+c note - in loop over all k vectors k=2pi(ll/cl,mm/cl) -+c the values of ll and mm are selected so that the symmetry of -+c reciprocal lattice is taken into account i.e. the following -+c rules apply. -+c -+c ll ranges over the values 0 to kmax1 only. -+c -+c mm ranges over 1 to kmax2 when ll=0 and over -+c -kmax2 to kmax2 otherwise. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,mxnode,natms,imcon,nhko,kmax1,kmax2,i -+ integer iatm0,iatm1,j,k,limit,mmin,l,ll,m,mm,n -+ real(8) engcpe,vircpe,alpha,epsq,twopi,ralph,area,rarea -+ real(8) det,rcpcut,rcpct2,aaa,engsic,pm1,pm2,term,ssx,ssy -+ real(8) tmp,rkx1,rky1,rkx2,rky2,rksq,rkk,fac,eterm,fng,fn0,gaus -+ real(8) bkk,force0,forcez,pterm,scale,cprop,omg,cs -+c$$$ real(8) erfc -+ -+ dimension cprop(10),omg(9) -+ -+ save newjob,engsic -+ -+ data newjob/.true./ -+ -+c initialise coulombic potential energy -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ if(alpha.lt.1.d-8)return -+ -+c set working parameters -+ -+ twopi=2.d0*pi -+ ralph=0.5d0/alpha -+ call dcell(cell,cprop) -+ area=cprop(1)*cprop(2)*sqrt(1.d0-cprop(4)**2) -+ rarea=pi/area -+ -+c set up atoms numbers for nodes -+ -+ iatm0 = (idnode*natms)/mxnode + 1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+c initalize stress tensor working arrays -+ -+ do i = 1,9 -+ -+ omg(i) = 0.d0 -+ -+ enddo -+ -+c construct reciprocal lattice vectors and set k vector range -+ -+ call invert(cell,rcell,det) -+ if(abs(det).lt.1.d-6)call error(idnode,120) -+ call dcell(rcell,cprop) -+ rcpcut=min(dble(kmax1)*cprop(7),dble(kmax2)*cprop(8))* -+ x 1.05d0*twopi -+ rcpct2=rcpcut**2 -+ -+c compute quantities for first entry -+ -+ if(newjob)then -+ -+ newjob=.false. -+ -+c pbc check and array bound checks -+ -+ if(imcon.ne.6)call error(idnode,66) -+ if(mxhke.ne.msatms) call error(idnode,331) -+ if(mxewld.ne.msatms) call error(idnode,330) -+ -+c check hk screening function at cutoff -+ -+ aaa=cerfr(ralph,rcpcut) -+c$$$ aaa=erfc(ralph*rcpcut)/rcpcut -+ -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,105,aaa,0.d0,0.d0) -+c call error(idnode,487) -+ -+ endif -+ -+c calculate self interaction correction -+ -+ engsic=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ engsic=engsic+chge(i)**2 -+ -+ enddo -+ -+ engsic=-r4pie0*alpha*engsic/(sqrpi*epsq) -+ -+c binomial coefficients -+ -+ k=0 -+ crn(0,0)=0.5d0 -+ do i=1,2*nhko -+ -+ pp(i)=1.d0 -+ pm1=pp(1) -+ -+ do j=2,i -+ -+ pm2=pp(j) -+ pp(j)=pm2+pm1 -+ pm1=pm2 -+ -+ enddo -+ -+ if(mod(i,2).eq.0)then -+ -+ k=k+1 -+ do j=0,k -+ -+ term=pp(j+1)*(-1.d0)**j -+ crn(j,k)=term -+ crn(k,j)=term -+ -+ enddo -+ -+ crn(k,k)=0.5d0*crn(k,k) -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+c calculate and store powers of z_i -+ -+ i=0 -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ znp(i,0)=1.d0 -+ znp(i,1)=zzz(j) -+ -+ enddo -+ -+ limit=i -+ -+ do k=2,2*nhko -+ -+ do i=1,limit -+ -+ znp(i,k)=znp(i,k-1)*znp(i,1) -+ -+ enddo -+ -+ enddo -+ -+c calculate and store exponential factors -+ -+ i=0 -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ elc(i,0)=1.d0 -+ emc(i,0)=1.d0 -+ els(i,0)=0.d0 -+ ems(i,0)=0.d0 -+ ssx=rcell(1)*xxx(j)+rcell(4)*yyy(j) -+ ssy=rcell(2)*xxx(j)+rcell(5)*yyy(j) -+ elc(i,1)=cos(twopi*ssx) -+ emc(i,1)=cos(twopi*ssy) -+ els(i,1)=sin(twopi*ssx) -+ ems(i,1)=sin(twopi*ssy) -+ -+ enddo -+ -+ do l=2,kmax2 -+ -+ do i=1,limit -+ -+ emc(i,l)=emc(i,l-1)*emc(i,1)-ems(i,l-1)*ems(i,1) -+ ems(i,l)=ems(i,l-1)*emc(i,1)+emc(i,l-1)*ems(i,1) -+ -+ enddo -+ -+ enddo -+ -+c start of main loop over k vectors -+ -+ mmin=1 -+ -+ do ll=0,kmax1 -+ -+ l=ll -+ tmp = twopi*dble(ll) -+ rkx1=tmp*rcell(1) -+ rky1=tmp*rcell(4) -+ -+c put cos(i,L) terms into cos(i,0) array -+ -+ if(l.eq.1) then -+ -+ do i=1,limit -+ -+ elc(i,0)=elc(i,1) -+ els(i,0)=els(i,1) -+ -+ enddo -+ -+ elseif(l.gt.1) then -+ -+ do i=1,limit -+ -+ cs=elc(i,0) -+ elc(i,0)=cs*elc(i,1)-els(i,0)*els(i,1) -+ els(i,0)=els(i,0)*elc(i,1)+cs*els(i,1) -+ -+ enddo -+ -+ endif -+ -+ do mm=mmin,kmax2 -+ -+ m=iabs(mm) -+ tmp = twopi*dble(mm) -+ rkx2=rkx1+tmp*rcell(2) -+ rky2=rky1+tmp*rcell(5) -+ -+c test on magnitude of k vector -+ -+ rksq=rkx2*rkx2+rky2*rky2 -+ -+ if(rksq.le.rcpct2)then -+ -+c calculate exp(ikr) terms and product with charges -+ -+ i=0 -+ -+ if(mm.ge.0)then -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ ckc(i)=chge(j)*(elc(i,0)*emc(i,m)-els(i,0)*ems(i,m)) -+ cks(i)=chge(j)*(els(i,0)*emc(i,m)+ems(i,m)*elc(i,0)) -+ -+ enddo -+ -+ else -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ -+ ckc(i)=chge(j)*(elc(i,0)*emc(i,m)+els(i,0)*ems(i,m)) -+ cks(i)=chge(j)*(els(i,0)*emc(i,m)-ems(i,m)*elc(i,0)) -+ -+ enddo -+ -+ endif -+ -+c calculate sum of products of powers of z_i and q_i exp(ik.s_i) -+ -+ do k=0,2*nhko -+ -+ zgc(k)=0.d0 -+ zgs(k)=0.d0 -+ -+ do i=1,limit -+ -+ zgc(k)=zgc(k)+ckc(i)*znp(i,k) -+ zgs(k)=zgs(k)+cks(i)*znp(i,k) -+ -+ enddo -+ -+ enddo -+ -+c perform global summation of zgc and zgs arrays -+ -+ if(mxnode.gt.1)then -+ -+ call gdsum(zgc(0),2*nhko+1,buffer) -+ call gdsum(zgs(0),2*nhko+1,buffer) -+ -+ endif -+ -+c calculate 0th order screening function -+ -+ rkk=sqrt(rksq) -+ fn0=cerfr(ralph,rkk) -+c$$$ fn0=erfc(ralph*rkk)/rkk -+ gaus=exp(-(ralph*rkk)**2)/(alpha*sqrpi) -+ -+c sum terms for orders of the screening function -+ -+ fac=1.d0 -+ -+ do k=0,nhko -+ -+c sum over z_i binomial contributions -+ -+ eterm=0.d0 -+ fng=fac*fn0 -+ do m=0,k -+ -+ n=2*k-m -+ -+c sum energy terms -+ -+ eterm=eterm+crn(m,k)*(zgc(m)*zgc(n)+zgs(m)*zgs(n)) -+ -+c calculate force contribution to each site -+ -+ i=0 -+ bkk=-fng*crn(m,k) -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ force0=bkk*(znp(i,n)*(zgs(m)*ckc(i)-zgc(m)*cks(i))+ -+ x znp(i,m)*(zgs(n)*ckc(i)-zgc(n)*cks(i))) -+ fxx(j)=fxx(j)+rkx2*force0 -+ fyy(j)=fyy(j)+rky2*force0 -+ -+ omg(3)=omg(3)+rkx2*force0*zzz(j) -+ omg(6)=omg(6)+rky2*force0*zzz(j) -+ -+ if(k.gt.0)then -+ -+ if(m.eq.0)then -+ -+ forcez=bkk*dble(n)*znp(i,n-1)*(zgc(m)*ckc(i)+ -+ x zgs(m)*cks(i)) -+ -+ else -+ -+ forcez=bkk*(dble(m)*znp(i,m-1)*(zgc(n)*ckc(i)+ -+ x zgs(n)*cks(i))+dble(n)*znp(i,n-1)*(zgc(m)* -+ x ckc(i)+zgs(m)*cks(i))) -+ -+ endif -+ -+ omg(9)=omg(9)+forcez*zzz(j) -+ fzz(j)=fzz(j)+forcez -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c accumulate potential energy and stress tensor -+ -+ engcpe=engcpe+fng*eterm -+ pterm=(dble(2*k-1)*fng-fac*gaus)/rksq -+ omg(1)=omg(1)+eterm*(fng+pterm*rkx2*rkx2) -+ omg(5)=omg(5)+eterm*(fng+pterm*rky2*rky2) -+ omg(2)=omg(2)+eterm*pterm*rky2*rkx2 -+ fac=fac*rksq/(dble(2*(k+1))*dble(2*k+1)) -+ -+c end of loop over orders of screening function -+ -+ enddo -+ -+c end of if-block for rksq < rcpct2 -+ -+ endif -+ -+c end of inner loop over reciprocal lattice vectors -+ -+ enddo -+ -+ mmin=-kmax2 -+ -+c end of outer loop over reciprocal lattice vectors -+ -+ enddo -+ -+ engcpe=engcpe/dble(mxnode) -+ do i = 1,9 -+ -+ omg(i) = omg(i)/dble(mxnode) -+ -+ enddo -+ -+c add self interaction correction to potential -+ -+ scale=4.d0*rarea*r4pie0/epsq -+ engcpe=scale*engcpe+engsic -+ -+c virial term -+ -+ vircpe=vircpe-scale*(omg(1)+omg(5)+omg(9)) -+ -+c calculate final forces -+ -+ do i=iatm0,iatm1 -+ -+ fxx(i)=scale*fxx(i) -+ fyy(i)=scale*fyy(i) -+ fzz(i)=scale*fzz(i) -+ -+ enddo -+ -+c calculate stress tensor (symmetrical) -+ -+ stress(1) = stress(1)+scale*omg(1) -+ stress(2) = stress(2)+scale*omg(2) -+ stress(3) = stress(3)+scale*omg(3) -+ stress(4) = stress(4)+scale*omg(2) -+ stress(5) = stress(5)+scale*omg(5) -+ stress(6) = stress(6)+scale*omg(6) -+ stress(7) = stress(7)+scale*omg(3) -+ stress(8) = stress(8)+scale*omg(6) -+ stress(9) = stress(9)+scale*omg(9) -+ -+ return -+ end subroutine hkewald1 -+ -+ subroutine hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engcpe, -+ x vircpe,drewd,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating real-space contributions to -+c the hautman-klein-ewald electrostatic method -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith may 2000 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,nhko,nlatt,imcon,natms,nix,niy -+ integer nboxes,i,j,k,n,m,ma,mpm2,npm2,ii,l0,l1,l2,last -+ real(8) engcpe,vircpe,drewd,rcut,epsq -+ real(8) step,rcsq,rdrewd,strs1,strs2,strs3 -+ real(8) strs5,strs6,strs9,dcx,dcy,udx,udy,fac,chgea,chgprd -+ real(8) ddx,ddy,ssx,ssy,ssq,coul,fcoul,rrr,ppp,vk0,vk1,vk2 -+ real(8) eterm,t1,t2,egamma,fx,fy,fz,det -+ -+ dimension nix(25),niy(25) -+ -+ data nix/ 0, 1, 1, 0,-1,-1,-1, 0, 1, 2, 2, -+ x 2, 1, 0,-1,-2,-2,-2,-2,-2,-1, 0, 1, 2, 2/ -+ data niy/ 0, 0, 1, 1, 1, 0,-1,-1,-1, 0, 1, -+ x 2, 2, 2, 2, 2, 1, 0,-1,-2,-2,-2,-2,-2,-1/ -+ -+CDIR$ CACHE_ALIGN fi -+ -+c check boundary condition -+ -+ if(imcon.ne.6)call error(idnode,66) -+ -+c number of neighbouring real space cells -+ -+ if(nlatt.gt.2)call error(idnode,488) -+ step=dble(2*nlatt+1) -+ nboxes=(2*nlatt+1)**2 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c set cutoff condition for pair forces -+ -+ rcsq=(step*rcut)**2 -+ -+c reciprocal of interpolation interval -+ -+ rdrewd = 1.d0/drewd -+ -+c reciprocal cell -+ -+ call invert(cell,rcell,det) -+ do i=1,9 -+ -+ rcell(i)=rcell(i)/step -+ -+ enddo -+ -+c initialise stress tensor accumulators -+ strs3 = 0.d0 -+ strs6 = 0.d0 -+ strs9 = 0.d0 -+ strs1 = 0.d0 -+ strs2 = 0.d0 -+ strs5 = 0.d0 -+ -+c loop over image cells, starting with central cell -+ -+ ma=1 -+ mpm2=natms/2 -+ npm2=(natms-1)/2 -+ -+ do k=1,nboxes -+ -+ last=natms -+ dcx=dble(nix(k)) -+ dcy=dble(niy(k)) -+ udx=cell(1)*dcx+cell(4)*dcy -+ udy=cell(2)*dcx+cell(5)*dcy -+ -+c outer loop over atoms -+ -+ do m=ma,mpm2 -+ -+ fac=r4pie0/epsq -+ if(m.eq.0)fac=fac*0.5d0 -+ if(m.gt.npm2)last=mpm2 -+ -+c set initial array values -+ -+ ii=0 -+ do i=idnode+1,last,mxnode -+ -+ ii=ii+1 -+ chgea=fac*chge(i) -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ chgprd=chgea*chge(j) -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+ zzn(ii)=1.d0 -+ zzd(ii)=0.d0 -+ -+c calculate interatomic separation -+ -+ ddx=xxx(i)-xxx(j)+udx -+ ddy=yyy(i)-yyy(j)+udy -+ ssx=rcell(1)*ddx+rcell(4)*ddy -+ ssy=rcell(2)*ddx+rcell(5)*ddy -+ ssx=ssx-nint(ssx) -+ ssy=ssy-nint(ssy) -+ xdf(ii)=step*(ssx*cell(1)+ssy*cell(4)) -+ ydf(ii)=step*(ssx*cell(2)+ssy*cell(5)) -+ zdf(ii)=zzz(i)-zzz(j) -+ rsqdf(ii)=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c loop over HK orders -+ -+ do n=0,nhko -+ -+c inner loop over atoms -+ -+ ii=0 -+ do i=idnode+1,last,mxnode -+ -+ ii=ii+1 -+ chgea = fac*chge(i) -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ chgprd=chgea*chge(j) -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+c apply truncation of potential -+ -+ ssq=rsqdf(ii)-zdf(ii)*zdf(ii) -+ -+ if(rcsq.gt.ssq)then -+ -+c calculate potential energy and virial -+ -+ coul=0.d0 -+ fcoul=0.d0 -+ rrr = sqrt(rsqdf(ii)) -+ sss(ii)=sqrt(ssq) -+ -+ if(n.eq.0)then -+ -+ coul = chgprd/rrr -+ fcoul = coul/rsqdf(ii) -+ -+ endif -+ -+c interpolation parameters -+ -+ l0=int(sss(ii)*rdrewd) -+ ppp=sss(ii)*rdrewd-dble(l0) -+ l0=l0+1 -+ l1=l0+1 -+ l2=l0+2 -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0 = hon(l0,n) -+ vk1 = hon(l1,n) -+ vk2 = hon(l2,n) -+ t1 = vk0 + (vk1 - vk0)*ppp -+ t2 = vk1 + (vk2 - vk1)*(ppp - 1.0d0) -+ -+ eterm=(t1+(t2-t1)*ppp*0.5d0)*ahk(n)*chgprd -+ engcpe=engcpe+coul-eterm*zzn(ii) -+ -+c calculate forces using 3pt interpolation -+ -+ vk0 = dhn(l0,n) -+ vk1 = dhn(l1,n) -+ vk2 = dhn(l2,n) -+ -+ t1 = vk0 + (vk1 - vk0)*ppp -+ t2 = vk1 + (vk2 - vk1)*(ppp - 1.0d0) -+ -+c calculate in-plane forces -+ -+ egamma=fcoul+ -+ x (t1+(t2-t1)*ppp*0.5d0)*chgprd*zzn(ii)*ahk(n) -+ fx=egamma*xdf(ii) -+ fy=egamma*ydf(ii) -+ -+c calculate perpendicular forces -+ -+ fz=fcoul*zdf(ii)+2.d0*dble(n)*eterm*zzd(ii) -+ -+c add to force accumulators -+ -+ fxx(i)=fxx(i)+fx -+ fyy(i)=fyy(i)+fy -+ fzz(i)=fzz(i)+fz -+ -+ fxx(j)=fxx(j)-fx -+ fyy(j)=fyy(j)-fy -+ fzz(j)=fzz(j)-fz -+ -+c reset zzn array for next order of convergence function -+ -+ zzd(ii)=zzn(ii)*zdf(ii) -+ zzn(ii)=zzd(ii)*zdf(ii) -+ -+c calculate stress tensor -+ -+ strs1 = strs1 + xdf(ii)*fx -+ strs2 = strs2 + xdf(ii)*fy -+ strs3 = strs3 + xdf(ii)*fz -+ strs5 = strs5 + ydf(ii)*fy -+ strs6 = strs6 + ydf(ii)*fz -+ strs9 = strs9 + zdf(ii)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ ma=0 -+ -+ enddo -+ -+c calculate virial -+ -+ vircpe=vircpe-(strs1+strs5+strs9) -+ -+c complete stress tensor -+ -+ stress(1) = stress(1) + strs1 -+ stress(2) = stress(2) + strs2 -+ stress(3) = stress(3) + strs3 -+ stress(4) = stress(4) + strs2 -+ stress(5) = stress(5) + strs5 -+ stress(6) = stress(6) + strs6 -+ stress(7) = stress(7) + strs3 -+ stress(8) = stress(8) + strs6 -+ stress(9) = stress(9) + strs9 -+ -+ return -+ end subroutine hkewald2 -+ -+ subroutine hkewald3(iatm,ik,engcpe,vircpe,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating exclusion corrections to -+c the hautman-klein-ewald electrostatic method -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith may 2000 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer iatm,ik,m,jatm -+ real(8) engcpe,vircpe,epsq,fx,fy,fz,strs1,strs2,strs3 -+ real(8) strs5,strs6,strs9,chgea,chgprd,rrr,rsq,coul,fcoul -+ -+CDIR$ CACHE_ALIGN fi -+ -+c initialise stress tensor accumulators -+ -+ strs1 = 0.d0 -+ strs2 = 0.d0 -+ strs3 = 0.d0 -+ strs5 = 0.d0 -+ strs6 = 0.d0 -+ strs9 = 0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ chgea=chge(iatm)/epsq*r4pie0 -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ do m=1,nexatm(ik) -+ -+c atomic index and charge product -+ -+ jatm=lexatm(ik,m) -+ chgprd=chgea*chge(jatm) -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=xdf(m)**2+ydf(m)**2+zdf(m)**2 -+ rrr = sqrt(rsq) -+ -+c calculate potential energy and virial -+ -+ coul = chgprd/rrr -+ engcpe = engcpe - coul -+ -+c calculate forces -+ -+ fcoul = coul/rsq -+ fx = fcoul*xdf(m) -+ fy = fcoul*ydf(m) -+ fz = fcoul*zdf(m) -+ -+ fxx(iatm) = fxx(iatm) - fx -+ fyy(iatm) = fyy(iatm) - fy -+ fzz(iatm) = fzz(iatm) - fz -+ -+ fxx(jatm) = fxx(jatm) + fx -+ fyy(jatm) = fyy(jatm) + fy -+ fzz(jatm) = fzz(jatm) + fz -+ -+c calculate stress tensor -+ -+ strs1 = strs1 - xdf(m)*fx -+ strs2 = strs2 - xdf(m)*fy -+ strs3 = strs3 - xdf(m)*fz -+ strs5 = strs5 - ydf(m)*fy -+ strs6 = strs6 - ydf(m)*fz -+ strs9 = strs9 - zdf(m)*fz -+ -+ endif -+ -+ enddo -+ -+c virial -+ -+ vircpe=vircpe-engcpe -+ -+c complete stress tensor -+ -+ stress(1) = stress(1) + strs1 -+ stress(2) = stress(2) + strs2 -+ stress(3) = stress(3) + strs3 -+ stress(4) = stress(4) + strs2 -+ stress(5) = stress(5) + strs5 -+ stress(6) = stress(6) + strs6 -+ stress(7) = stress(7) + strs3 -+ stress(8) = stress(8) + strs6 -+ stress(9) = stress(9) + strs9 -+ -+ endif -+ -+ return -+ end subroutine hkewald3 -+ -+ subroutine hkewald4(iatm,ik,engcpe,vircpe,engcpl,vircpl,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces in a -+c periodic system using the hautman-klein-ewald method -+c -+c modified to allow direct calculation of primary (short-range) -+c interactions for multiple-time step corrections -+ -+c primary neighbours are taken out of the Ewald sum -+c electrostatics are evaluated directly instead -+c -+c parallel replicated data version - real space terms -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith july 2000 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer iatm,ik,m,jatm -+ real(8) engcpe,vircpe,engcpl,vircpl,rcut,epsq -+ real(8) fi,fli,rcsq,strs1,strs2,strs3,strs5,strs6 -+ real(8) strs9,strl1,strl2,strl3,strl5,strl6,strl9,chgea,chgprd -+ real(8) rsq,rrr,coul,egamma,fx,fy,fz -+ -+ dimension fi(3),fli(3) -+ -+CDIR$ CACHE_ALIGN fi -+CDIR$ CACHE_ALIGN fli -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ -+c initialise stress tensor accumulators -+ -+ strs1 = 0.d0 -+ strs2 = 0.d0 -+ strs3 = 0.d0 -+ strs5 = 0.d0 -+ strs6 = 0.d0 -+ strs9 = 0.d0 -+ strl1 = 0.d0 -+ strl2 = 0.d0 -+ strl3 = 0.d0 -+ strl5 = 0.d0 -+ strl6 = 0.d0 -+ strl9 = 0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ chgea=chge(iatm)/epsq*r4pie0 -+ if(abs(chgea).gt.1.d-10)then -+ -+c temporary arrays for cache aligning -+ -+ fi(1) = fxx(iatm) -+ fi(2) = fyy(iatm) -+ fi(3) = fzz(iatm) -+ -+ fli(1) = flx(iatm) -+ fli(2) = fly(iatm) -+ fli(3) = flz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ chgprd=chgea*chge(jatm) -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+ if(rcsq.gt.rsq)then -+ -+c coulombic energy -+ -+ rrr = sqrt(rsq) -+ coul = chgprd/rrr -+ -+c sum contributions to the totals -+ -+ engcpe = engcpe + coul -+ engcpl = engcpl - coul -+ vircpe = vircpe - coul -+ vircpl = vircpl + coul -+ -+c calculate coulombic forces -+ -+ egamma = coul/rsq -+ -+ fx = egamma*xdf(m) -+ fy = egamma*ydf(m) -+ fz = egamma*zdf(m) -+ -+c add in contributions to instantaneous force -+ -+ fi(1) = fi(1) + fx -+ fi(2) = fi(2) + fy -+ fi(3) = fi(3) + fz -+ -+ fxx(jatm) = fxx(jatm) - fx -+ fyy(jatm) = fyy(jatm) - fy -+ fzz(jatm) = fzz(jatm) - fz -+ -+c add in contributions to the long-range force -+ -+ fli(1) = fli(1) - fx -+ fli(2) = fli(2) - fy -+ fli(3) = fli(3) - fz -+ -+ flx(jatm) = flx(jatm) + fx -+ fly(jatm) = fly(jatm) + fy -+ flz(jatm) = flz(jatm) + fz -+ -+c calculate long and short range stress tensors -+ -+ strs1 = strs1 + xdf(m)*fx -+ strl1 = strl1 - xdf(m)*fx -+ strs2 = strs2 + xdf(m)*fy -+ strl2 = strl2 - xdf(m)*fy -+ strs3 = strs3 + xdf(m)*fz -+ strl3 = strl3 - xdf(m)*fz -+ strs5 = strs5 + ydf(m)*fy -+ strl5 = strl5 - ydf(m)*fy -+ strs6 = strs6 + ydf(m)*fz -+ strl6 = strl6 - ydf(m)*fz -+ strs9 = strs9 + zdf(m)*fz -+ strl9 = strl9 - zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c copy back temporaries -+ -+ fxx(iatm) = fi(1) -+ fyy(iatm) = fi(2) -+ fzz(iatm) = fi(3) -+ -+ flx(iatm) = fli(1) -+ fly(iatm) = fli(2) -+ flz(iatm) = fli(3) -+ -+c complete stress tensor -+ -+ stresl(1) = stresl(1) + strl1 -+ stresl(2) = stresl(2) + strl2 -+ stresl(3) = stresl(3) + strl3 -+ stresl(4) = stresl(4) + strl2 -+ stresl(5) = stresl(5) + strl5 -+ stresl(6) = stresl(6) + strl6 -+ stresl(7) = stresl(7) + strl3 -+ stresl(8) = stresl(8) + strl6 -+ stresl(9) = stresl(9) + strl9 -+ -+ stress(1) = stress(1) + strs1 -+ stress(2) = stress(2) + strs2 -+ stress(3) = stress(3) + strs3 -+ stress(4) = stress(4) + strs2 -+ stress(5) = stress(5) + strs5 -+ stress(6) = stress(6) + strs6 -+ stress(7) = stress(7) + strs3 -+ stress(8) = stress(8) + strs6 -+ stress(9) = stress(9) + strs9 -+ -+ endif -+ -+ return -+ end subroutine hkewald4 -+ -+ function cerfr(alpha,rrr) -+ -+c*********************************************************************** -+c -+c dl_poly function for generating complementary error function -+c divided by r -+c -+c copyright - daresbury laboratory 2001 -+c author - w. smith february 2001 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer k -+ real(8) cerfr,sqrpi,h0,h1,alpha,rrr,rr2,fac -+ -+ sqrpi=1.7724538509055159d0 -+ -+c starting values -+ -+ h0=0.d0 -+ h1=(2.d0*alpha/sqrpi)*exp(-(alpha*rrr)**2) -+ -+c generate function by recursion -+ -+ rr2=rrr*rrr -+ do k=100,1,-1 -+ -+ fac=(2.d0*alpha**2)**(k-1) -+ h0=(h0*rr2+fac*h1)/dble(2*k-1) -+ -+ enddo -+ -+ cerfr=1.d0/rrr-h0 -+ -+ return -+ end function cerfr -+ -+ end module hkewald_module -+ -diff -urN dl_class_1.9.orig/srcmod/hyper_dynamics_module.f dl_class_1.9/srcmod/hyper_dynamics_module.f ---- dl_class_1.9.orig/srcmod/hyper_dynamics_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/hyper_dynamics_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,2821 @@ -+ module hyper_dynamics_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining hyperdynamics routines -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use forces_module -+ use nlist_builders_module -+ use optimiser_module -+ use property_module -+ use setup_module -+ use shake_module -+ use temp_scalers_module -+ use vv_motion_module -+ -+ implicit none -+ -+ integer, parameter :: mxtrn=10 -+ integer, parameter :: mxbsn=1000 -+ integer, parameter :: mxneb=8 -+ integer, parameter :: mxdiffs=300 -+ integer, parameter :: hyper_tag=35000 -+ -+ integer numbsn,numpro,numtrk,ndiff,maxtrk,numdark,home_bsn,numbpd -+ integer nbsa(mxbsn),nbsb(mxbsn),ktrn(mxtrn) -+ real(8) xtrn(mxtrn),ytrn(mxtrn) -+ real(8) tstop,tkeres,timhyp,timres,tboost,boost,vbase -+ -+ integer, allocatable :: idabsn(:),keymin(:) -+ real(8), allocatable :: xbas(:),ybas(:),zbas(:) -+ real(8), allocatable :: xchk(:),ychk(:),zchk(:) -+ real(8), allocatable :: xres(:),yres(:),zres(:) -+ real(8), allocatable :: vxrs(:),vyrs(:),vzrs(:) -+ real(8), allocatable :: fxrs(:),fyrs(:),fzrs(:) -+ real(8), allocatable :: xhyp(:),yhyp(:),zhyp(:) -+ real(8), allocatable :: vxhp(:),vyhp(:),vzhp(:) -+ real(8), allocatable :: fxhp(:),fyhp(:),fzhp(:) -+ real(8), allocatable :: xdiffs(:),ydiffs(:),zdiffs(:) -+ real(8), allocatable :: celneb(:,:),path(:),optk(:,:) -+ real(8), allocatable :: xneb(:),yneb(:),zneb(:),engneb(:) -+ real(8), allocatable :: fxneb(:),fyneb(:),fzneb(:) -+ real(8), allocatable :: hxneb(:),hyneb(:),hzneb(:) -+ real(8), allocatable :: taux(:),tauy(:),tauz(:) -+ real(8), allocatable :: track(:) -+ -+ integer bsn_1(maxneb),bsn_2(maxneb) -+ real(8) strhyp(9),strres(9),engbsn(2) -+ real(8) celbas(9),celhyp(9),celchk(9),celres(9) -+ -+ save numbsn,numtrk,numpro,ndiff,numdark,timres -+ save xbas,ybas,zbas,xchk,ychk,zchk,timhyp,vbase -+ save xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs -+ save xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp -+ save celbas,celhyp,celres,celchk,strhyp,strres -+ save idabsn,nbsa,nbsb,xdiffs,ydiffs,zdiffs,tkeres -+ save xneb,yneb,zneb,engneb,taux,tauy,tauz,keymin -+ save fxneb,fyneb,fzneb,hxneb,hyneb,hzneb,path -+ save optk,tstop,tboost,boost,numbpd -+ -+ contains -+ -+ subroutine alloc_hyper_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining hyperdynamics arrays and -+c initialising control variables -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ -+ integer i,fail,idnode,nebmax -+ dimension fail(nnn) -+ -+ nebmax=msatms*(mxneb+1) -+ -+c initialise control variables -+ -+ numbpd=0 -+ numtrk=0 -+ numbsn=0 -+ numpro=0 -+ ndiff=0 -+ numdark=0 -+ home_bsn=0 -+ tkeres=0.d0 -+ tstop=1.d30 -+ timhyp=0.d0 -+ timres=0.d0 -+ boost=1.d0 -+ tboost=0.d0 -+ vbase=-huge(1.d0) -+ do i=1,maxneb -+ bsn_1(i)=0 -+ bsn_2(i)=0 -+ enddo -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (xbas(msatms),ybas(msatms),zbas(msatms),stat=fail(1)) -+ allocate (xchk(msatms),ychk(msatms),zchk(msatms),stat=fail(2)) -+ allocate (xres(msatms),yres(msatms),zres(msatms),stat=fail(3)) -+ allocate (vxrs(msatms),vyrs(msatms),vzrs(msatms),stat=fail(4)) -+ allocate (fxrs(msatms),fyrs(msatms),fzrs(msatms),stat=fail(5)) -+ allocate (xhyp(msatms),yhyp(msatms),zhyp(msatms),stat=fail(6)) -+ allocate (vxhp(msatms),vyhp(msatms),vzhp(msatms),stat=fail(7)) -+ allocate (fxhp(msatms),fyhp(msatms),fzhp(msatms),stat=fail(8)) -+ allocate (xdiffs(mxdiffs),ydiffs(mxdiffs),zdiffs(mxdiffs), -+ x stat=fail(9)) -+ allocate (idabsn(mxdiffs),keymin(0:mxneb),stat=fail(10)) -+ allocate (xneb(nebmax),yneb(nebmax),zneb(nebmax),stat=fail(11)) -+ allocate (fxneb(nebmax),fyneb(nebmax),fzneb(nebmax),stat=fail(12)) -+ allocate (taux(msatms),tauy(msatms),tauz(msatms),stat=fail(13)) -+ allocate (engneb(0:mxneb),celneb(9,0:mxneb),path(0:mxneb), -+ x stat=fail(14)) -+ allocate (hxneb(nebmax),hyneb(nebmax),hzneb(nebmax),stat=fail(15)) -+ allocate (optk(5,0:mxneb),stat=fail(16)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)then -+ if(idnode.eq.0)write(nrite,'(10i5)')fail -+ call error(idnode,1115) -+ endif -+ enddo -+ -+ end subroutine alloc_hyper_arrays -+ -+ subroutine hyper_start -+ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, -+ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, -+ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, -+ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for starting a hyperdynamics simulation -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,savflg -+ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt -+ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond -+ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,i,j -+ integer ntpvdw,ntshl,ntteth,numblock,iatm0,iatm1,ntcons -+ integer ktol,pass,fail,ntrack -+ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,engcfg -+ real(8) virlrc,cvgerr,dum,otol,cgerr,sigma,hyp_units -+ -+c allocate track array for BPD -+ -+ if(lbpd)then -+ allocate (track(0:nblock/ntrack),stat=fail) -+ endif -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c current block number -+ -+ numblock=nstep/nblock -+ -+c open hyperdynamics journal file -+ -+ if(idnode.eq.0) -+ x open(nevnt,file="EVENTS",form='formatted',position='append') -+ -+c set up hyperdynamics for simulation start -+ -+ if(nstep.eq.0)then -+ -+c initialise bias potential boost factor -+ -+ numbpd=0 -+ boost=1.d0 -+ tboost=0.d0 -+ -+c set basin difference markers -+ -+ do i=1,mxbsn -+ -+ nbsa(i)=0 -+ nbsb(i)=0 -+ -+ enddo -+ -+c store the starting configuration -+ -+ savflg=.true. -+ tkeres=sigma -+ call store_config(savflg,idnode,mxnode,natms,strres,celres, -+ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) -+ -+c minimise starting structure -+ -+ call define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,engcfg,cvgerr) -+ -+c define zero energy for BPD dynamics mode -+ -+ vbase=engcfg -+ -+c write events entry for minimisation -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x engcfg/hyp_units,cvgerr/hyp_units -+ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x engcfg/hyp_units,cvgerr/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+c save minimised starting structure as basin file -+ -+ call write_reference_config -+ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode,engcfg) -+ -+c save details of starting home basin -+ -+ engbsn(1)=engcfg -+ -+ do i=1,9 -+ celbas(i)=cell(i) -+ enddo -+ -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ enddo -+ -+c restore the starting configuration -+ -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strres,celres, -+ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) -+ -+ else -+ -+c restore previous data from hyperdynamics backup file -+ -+ call hyper_open(ltad,idnode,mxnode,natms,nsteql) -+ -+c reset home basin for hyperdynamics (home basin is 0 for TAD) -+ -+ if(lbpd)home_bsn=numbsn-1 -+ -+c store the current configuration -+ -+ savflg=.true. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+c read minimised starting structure from home basin file -+ -+ call read_reference_config -+ x ('CFGBSN','BASINS',nbsn,home_bsn,natms,imcon,idnode,engcfg) -+ -+c save details of current home basin -+ -+ engbsn(1)=engcfg -+ -+ do i=1,9 -+ celbas(i)=cell(i) -+ enddo -+ -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ enddo -+ -+c restore the current configuration -+ -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+ endif -+ -+ return -+ end subroutine hyper_start -+ -+ subroutine hyper_driver -+ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, -+ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, -+ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, -+ x tolnce,hyp_units,ebias,vmin) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for implementing a hyperdynamics simulation -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 seek -+ logical lbpd,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb -+ logical lrefmin,same,savflg,recycle,scan,prechk,tadall,nebgo -+ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol,ntrack -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt -+ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond -+ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw -+ integer ntshl,ntteth,blkout,numblock,bsn1,bsn2,itrack -+ integer nturn,ntcons,mdiff,newbsn,iatm0,iatm1,pass,i,j,itrk -+ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,catchrad -+ real(8) cvgerr,estar,engcfg,cfgtmp,engcpe,engsrp,catch -+ real(8) vircpe,engmet,virmet,virlrc,engtbp,virtbp,dum -+ real(8) engfbp,virfbp,engter,virter,engbnd,virbnd,engang -+ real(8) virang,engdih,virdih,enginv,virinv,engtet,virtet -+ real(8) engshl,shlke,virshl,engfld,virfld,virsrp,sprneb -+ real(8) deltad,deltal,tlow,timhop,timlow,engtke,tolnce,hyp_units -+ real(8) ebias,vmin -+ -+ data bsn1,bsn2/0,0/ -+ -+c control variables -+ -+ lneb=.false. -+ numblock=nstep/nblock -+ maxtrk=nblock/ntrack -+ if(numdark.eq.0)numdark=nsteql -+ lrefmin=(mod(nstep,nblock).eq.0) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c BPD/TAD simulation time -+ -+ timhyp=timhyp+tstep -+ -+c track the tboost value -+ -+ if(mod(nstep,ntrack).eq.0)track(mod(numtrk,maxtrk))=tboost -+ -+c provisional check for transition - compare current config with -+c the reference state (not in dark period) -+ -+ same=.true. -+ scan=.false. -+ if(prechk.and.(mod(nstep,ntrack).eq.0).and. -+ x (lbpd.or.(ltad.and.(nstep.gt.numdark))))then -+ -+ catch=0.65d0*catchrad -+ call check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catch) -+ -+ if(.not.same.and.idnode.eq.0)then -+ -+ write(nevnt,'("PRE",i10)')nstep -+ write(nrite,'(1x,"PRE",i10)')nstep -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ endif -+ -+ if(.not.same.or.lrefmin)then -+ -+c store the current configuration -+ -+ savflg=.true. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+c minimise current structure -+ -+ call define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) -+ -+c write events entry for minimisation -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x cfgtmp/hyp_units,cvgerr/hyp_units -+ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x cfgtmp/hyp_units,cvgerr/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+c confirm any transition -+ -+ if(ltad)scan=.true. -+ call check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catchrad) -+ -+c transition detected - proceed with transition analysis -+ -+ if(.not.same)then -+ -+c store new basin energy -+ -+ engbsn(2)=cfgtmp -+ -+c save new minimised state (bias potential dynamics only) -+ -+ if(lbpd)then -+ -+ do i=1,9 -+ celres(i)=cell(i) -+ enddo -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xres(j)=xxx(i) -+ yres(j)=yyy(i) -+ zres(j)=zzz(i) -+ -+ enddo -+ -+ endif -+ -+c record transition (for TAD only if outside blackout period) -+ -+ if(lbpd.or.nstep.gt.numdark)then -+ -+c check if transition results in unique new basin (TAD only) -+ -+ if(ltad)call check_basins(newbsn,mdiff,mxnode) -+ -+c analysis of new basin -+ -+ if(lbpd.or.tadall.or.newbsn.eq.numbsn)then -+ -+c set difference counters and pointers (TAD only) -+ -+ if(ltad)then -+ -+ if(numbsn.gt.mxbsn)call error(idnode,2330) -+ -+ ndiff=mdiff -+ -+ if(numbsn.gt.1)then -+ nbsa(numbsn)=nbsb(numbsn-1)+1 -+ else -+ nbsa(numbsn)=1 -+ endif -+ -+ nbsb(numbsn)=mdiff -+ -+ endif -+ -+c save the basin file and store basin energy -+ -+ call write_reference_config -+ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode, -+ x cfgtmp) -+ -+c determine minimum (reaction) path and activation energy -+ -+ if(nebgo)call neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn1, -+ x bsn2,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,cfgtmp,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+c analyse the transition - determine e-star and destination state -+ -+ if(nebgo)call transition_properties -+ x (seek,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,nturn,numbsn,alpha,delr,dlrpot, -+ x drewd,elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr,estar, -+ x catchrad,hyp_units) -+ -+c estimate time of transition from past trajectory -+ -+ call transition_time -+ x (seek,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl, -+ x ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp, -+ x ntpter,ntrack,ntpvdw,ntshl,ntteth,ntcons,itrk, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,cfgtmp,cvgerr,catchrad,timhop,hyp_units) -+ -+c update TAD control variables -+ -+ if(ltad)then -+ -+c update blackout period -+ -+ numdark=nblock*((nstep+blkout)/nblock+1) -+ -+c calculate stopping time -+ -+ timlow=timhop*exp(-(estar/temp-estar/tlow)/boltz) -+ tstop=min(tstop,deltad*(timlow/deltad)**(tlow/temp)) -+ -+c write transition data for TAD only -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("TRA",i10,3i6,1p,4e14.5)') -+ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, -+ x timhop,timlow,tstop -+ write(nevnt,'("BLK",2i10)')nstep,numdark -+ write(nrite,'(1x,"TRA",i10,3i6,1p,4e14.5)') -+ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, -+ x timhop,timlow,tstop -+ write(nrite,'(1x,"BLK",2i10)')nstep,numdark -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ elseif(nebgo.and.idnode.eq.0)then -+ -+c write transition data for bias potential dynamics with NEB -+ -+ write(nevnt,'("TRA",i10,3i6,1p,3e14.5)') -+ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, -+ x timhop,timhop*tboost -+ write(nrite,'(1x,"TRA",i10,3i6,1p,3e14.5)') -+ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, -+ x timhop,timhop*tboost -+ write(nrite,"(1x,120('-'))") -+ -+ numbpd=0 -+ tboost=0.0 -+ -+ elseif(idnode.eq.0)then -+ -+c write transition data for bias potential dynamics without NEB -+ -+ write(nevnt,'("TRA",i10,2i6,1p,3e14.5)') -+ x nstep,home_bsn,numbsn-1,ebias/hyp_units, -+ x timhop,timhop*tboost -+ write(nrite,'(1x,"TRA",i10,2i6,1p,3e14.5)') -+ x nstep,home_bsn,numbsn-1,ebias/hyp_units, -+ x timhop,timhop*tboost -+ write(nrite,"(1x,120('-'))") -+ -+ numbpd=0 -+ tboost=0.0 -+ -+ endif -+ -+ else -+ -+c update blackout period when transition not unique (TAD only) -+ -+ numdark=nblock*((nstep+blkout)/nblock+1) -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("TRR",i10,3i6)')nstep,home_bsn,newbsn -+ write(nevnt,'("BLK",2i10)')nstep,numdark -+ write(nrite,'(1x,"TRR",i10,3i6)')nstep,home_bsn,newbsn -+ write(nrite,'(1x,"BLK",2i10)')nstep,numdark -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ endif -+ -+c actions when new basin has been visited before (TAD only) -+ -+ elseif(ltad)then -+ -+c ignore dark transition and extend blackout period (TAD only) -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("TRI",i10)')nstep -+ write(nrite,'(1x,"TRI",i10)')nstep -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ if(nstep.le.nsteql)then -+ -+ nsteql=nsteql+blkout -+ numdark=nsteql+blkout -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("EQL",2i10)')nstep,nsteql -+ write(nrite,'(1x,"EQL",2i10)')nstep,nsteql -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ else -+ -+ numdark=nblock*((nstep+blkout)/nblock+1) -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("BLK",3i10)')nstep,numdark -+ write(nrite,'(1x,"BLK",3i10)')nstep,numdark -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ if(ltad)then -+ -+c return to the block starting state after transition (TAD only) -+ -+ timhyp=timres -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strres,celres, -+ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) -+ -+c scramble the velocities (and conserve system energy) -+ -+ call regauss(idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, -+ x ntshl,keyshl,tkeres,temp,tolnce) -+ -+ elseif(lbpd)then -+ -+c reset reference state to new basin (bias potential dynamics only) -+ -+ home_bsn=home_bsn+1 -+ engbsn(1)=engbsn(2) -+ -+ do i=1,9 -+ celbas(i)=celres(i) -+ enddo -+ -+ call invert(celbas,rcell,dum) -+ -+ do i=1,iatm1-iatm0+1 -+ -+ xbas(i)=rcell(1)*xres(i)+rcell(4)*yres(i)+rcell(7)*zres(i) -+ ybas(i)=rcell(2)*xres(i)+rcell(5)*yres(i)+rcell(8)*zres(i) -+ zbas(i)=rcell(3)*xres(i)+rcell(6)*yres(i)+rcell(9)*zres(i) -+ -+ enddo -+ -+c restore current hyperdynamics configuration -+ -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+c reset boost factor -+ -+ numbpd=0 -+ tboost=0.d0 -+ -+ endif -+ -+c no transition detected so restore current trajectory -+ -+ else -+ -+c restore the current configuration -+ -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+c save the block configuration as reset state (TAD only) -+ -+ if(ltad.and.lrefmin)then -+ -+ savflg=.true. -+ tkeres=engtke -+ timres=timhyp -+ call store_config(savflg,idnode,mxnode,natms,strres,celres, -+ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c close down if TAD stopping time reached -+ -+ if(ltad.and.tstop.lt.timhyp)recycle=.false. -+ -+c write a tracking file -+ -+ if(mod(nstep,ntrack).eq.0)then -+ -+ itrack=mod(numtrk,maxtrk) -+ call write_reference_config -+ x ('CFGTRK','TRACKS',ntrk,itrack,natms,imcon,idnode,engcfg) -+ -+ numtrk=numtrk+1 -+ -+ endif -+ -+ return -+ end subroutine hyper_driver -+ -+ subroutine define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,engcfg,cvgerr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling subroutine calls for a -+c structural minimisation to define a minimum state for -+c hyperdynamics simulations -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lfcap,nogofr,lneut,lnsq,loglnk,stropt,lzeql -+ logical newlst,ltad,lsolva,lfree,lexcite -+ -+ integer idnode,imcon,keyfce,keyfld,keyshl,keytol -+ integer keystr,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp -+ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql -+ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet -+ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf -+ integer nblock,pass,mxpass,mstep,ntcons,nsolva,isolva -+ -+ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd -+ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp -+ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp -+ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp -+ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp -+ real(8) virtbp,virter,virtet,volm,engmet,cfgold,cvgerr -+ real(8) hnorm,grad0,grad1,ff1,sgn,engord,virord -+ -+ data mxpass/1000/ -+ -+c control variables -+ -+ pass=0 -+ keystr=0 -+ numrdf=0 -+ ltad=.true. -+ engcfg=1.d30 -+ stropt=.false. -+ nogofr=.false. -+ -+c dummy variables -+ -+ lsolva=.false. -+ lfree=.false. -+ lexcite=.false. -+ nsolva=0 -+ isolva=1 -+ engord=0.d0 -+ virord=0.d0 -+ -+c relax the current structure -+ -+ do while(.not.stropt.and.pass.lt.mxpass) -+ -+ pass=pass+1 -+ cfgold=engcfg -+ mstep=nstep+pass -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces -+ -+ call force_manager -+ x (newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lexcite,idnode,mxnode,natms,imcon,mstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c structure optimisation -+ -+ call strucopt -+ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+ cvgerr=abs(engcfg-cfgold) -+ -+ enddo -+ -+ return -+ end subroutine define_minimum_state -+ -+ subroutine write_reference_config -+ x (fnam,direct,nfil,nnn,natms,imcon,idnode,engcfg) -+ -+c*********************************************************************** -+c -+c dlpoly utility to write a minimum structure file in CONFIG -+c format -+c -+c copyright daresbury laboratory -+c author w.smith june 2006 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ character*6 fnam -+ character*4 tail -+ character*6 direct -+ integer nfil,nnn,i,natms,imcon,idnode,levcfg -+ real(8) engcfg -+ -+ levcfg=0 -+ -+c node zero handles i/o -+ -+ if(idnode.eq.0)then -+ -+c write configuration data to new configuration file -+ -+ write(tail,'(i4.4)')nnn -+ open(nfil,file=direct//'/'//fnam//tail,form='formatted') -+ -+ write(nfil,'(a10)')fnam//tail -+ write(nfil,'(3i10,g20.12)') levcfg,imcon,natms,engcfg -+ -+ if(imcon.gt.0) write(nfil,'(3f20.12)') cell -+ -+ do i=1,natms -+ -+ write(nfil,'(a8,i10)') atmnam(i),i -+ write(nfil,'(3g20.10)') xxx(i),yyy(i),zzz(i) -+ -+ enddo -+ -+ close (nfil) -+ -+ endif -+ -+ nnn=nnn+1 -+ -+ return -+ end subroutine write_reference_config -+ -+ subroutine read_reference_config -+ x (fnam,direct,nfil,nnn,natms,imcon,idnode,engcfg) -+ -+c*********************************************************************** -+c -+c dlpoly utility to read a reference structure file in CONFIG -+c format -+c -+c copyright daresbury laboratory -+c author w.smith february 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ character*6 fnam -+ character*4 tail -+ character*6 direct -+ integer nfil,nnn,i,natms,imcon,idnode,levcfg -+ real(8) engcfg -+ -+c node zero handles i/o -+ -+ if(idnode.eq.0)then -+ -+c read configuration data from configuration file on proc 0 -+ -+ write(tail,'(i4.4)')nnn -+ open(nfil,file=direct//'/'//fnam//tail,form='formatted') -+ -+ read(nfil,*) -+ read(nfil,'(3i10,g20.12)')levcfg,imcon,natms,engcfg -+ buffer(1)=dble(levcfg) -+ buffer(2)=dble(imcon) -+ buffer(3)=dble(natms) -+ buffer(4)=engcfg -+ if(imcon.gt.0) read(nfil,'(3f20.12)') cell -+ do i=1,9 -+ buffer(i+4)=cell(i) -+ enddo -+ call gdsum(buffer(1),13,buffer(14)) -+ -+ do i=1,natms -+ -+ read(nfil,'(a8)') atmnam(i) -+ read(nfil,'(3g20.10)') xxx(i),yyy(i),zzz(i) -+ -+ enddo -+ -+ close (nfil) -+ -+ else -+ -+c gather data from configuration file on procs > 0 -+ -+ do i=1,13 -+ buffer(i)=0.d0 -+ enddo -+ call gdsum(buffer(1),13,buffer(14)) -+ -+ levcfg=nint(buffer(1)) -+ imcon=nint(buffer(2)) -+ natms=nint(buffer(3)) -+ engcfg=buffer(4) -+ do i=1,9 -+ cell(i)=buffer(i+4) -+ enddo -+ do i=1,natms -+ xxx(i)=0.d0 -+ yyy(i)=0.d0 -+ zzz(i)=0.d0 -+ enddo -+ -+ endif -+ -+c global gather of atomic coordinates -+ -+ call gdsum(xxx,natms,buffer) -+ call gdsum(yyy,natms,buffer) -+ call gdsum(zzz,natms,buffer) -+ -+ return -+ end subroutine read_reference_config -+ -+ subroutine store_config(lsave,idnode,mxnode,natms,strold,celold, -+ x xold,yold,zold,vxold,vyold,vzold,fxold,fyold,fzold) -+ -+c*********************************************************************** -+c -+c dlpoly hyperdynamics routine for storing the current -+c configuration -+c -+c copyright daresbury laboratory -+c author w.smith sep 2006 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical lsave -+ integer idnode,mxnode,natms,iatm0,iatm1,i,j -+ -+ real(8) strold(9),celold(9) -+ real(8) xold(msatms),yold(msatms),zold(msatms) -+ real(8) vxold(msatms),vyold(msatms),vzold(msatms) -+ real(8) fxold(msatms),fyold(msatms),fzold(msatms) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ if(lsave)then -+ -+c save cell and stress tensors -+ -+ do i=1,9 -+ -+ celold(i)=cell(i) -+ strold(i)=stress(i) -+ -+ enddo -+ -+c save configuration -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xold(j)=xxx(i) -+ yold(j)=yyy(i) -+ zold(j)=zzz(i) -+ vxold(j)=vxx(i) -+ vyold(j)=vyy(i) -+ vzold(j)=vzz(i) -+ fxold(j)=fxx(i) -+ fyold(j)=fyy(i) -+ fzold(j)=fzz(i) -+ -+ enddo -+ -+ else -+ -+c restore cell and stress tensors -+ -+ do i=1,9 -+ -+ cell(i)=celold(i) -+ stress(i)=strold(i) -+ -+ enddo -+ -+c restore configuration -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxx(i)=xold(j) -+ yyy(i)=yold(j) -+ zzz(i)=zold(j) -+ vxx(i)=vxold(j) -+ vyy(i)=vyold(j) -+ vzz(i)=vzold(j) -+ fxx(i)=fxold(j) -+ fyy(i)=fyold(j) -+ fzz(i)=fzold(j) -+ -+ enddo -+ -+c replication of full configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine store_config -+ -+ subroutine check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catchrad) -+ -+c*********************************************************************** -+c -+c dlpoly hyperdynamics routine for checking when a transition -+c has occured in a configuration -+c -+c copyright daresbury laboratory -+c author w.smith sep 2006 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ character*8 seek -+ logical same,safe,scan,all -+ integer idnode,mxnode,natms,imcon,nblock,mdiff -+ integer iatm0,iatm1,i,j -+ real(8) catchrad,catch2,rr2,dum,sxx,syy,szz,txx,tyy,tzz,pp2 -+ -+ all=(seek.eq.'all ') -+ -+c flag for comparing structures -+ -+ same=.true. -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise search parameters -+ -+ catch2=catchrad**2 -+ -+c construct coordinate check arrays -+ -+ do i=1,9 -+ celchk(i)=cell(i) -+ enddo -+ -+c store structure in reduced coordinates (target atoms only) -+ -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ if(all.or.atmnam(i).eq.seek)then -+ -+ xchk(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ychk(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zchk(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ endif -+ -+ enddo -+ -+c compare current structure with reference basin -+ -+ j=0 -+ pp2=0.d0 -+ safe=.true. -+ mdiff=ndiff -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ if(all.or.atmnam(i).eq.seek)then -+ -+c calculate separations in reduced units -+ -+ sxx=xchk(j)-xbas(j) -+ syy=ychk(j)-ybas(j) -+ szz=zchk(j)-zbas(j) -+ -+c calculate minimum image separations -+ -+ sxx=sxx-nint(sxx) -+ syy=syy-nint(syy) -+ szz=szz-nint(szz) -+ -+c set trial structure at minimum displacements from reference -+ -+ xchk(j)=xbas(j)+sxx -+ ychk(j)=ybas(j)+syy -+ zchk(j)=zbas(j)+szz -+ -+c calculate atomic separations in real coordinates -+ -+ txx=(celchk(1)*xchk(j)+celchk(4)*ychk(j)+celchk(7)*zchk(j)) -+ x -(celbas(1)*xbas(j)+celbas(4)*ybas(j)+celbas(7)*zbas(j)) -+ tyy=(celchk(2)*xchk(j)+celchk(5)*ychk(j)+celchk(8)*zchk(j)) -+ x -(celbas(2)*xbas(j)+celbas(5)*ybas(j)+celbas(8)*zbas(j)) -+ tzz=(celchk(3)*xchk(j)+celchk(6)*ychk(j)+celchk(9)*zchk(j)) -+ x -(celbas(3)*xbas(j)+celbas(6)*ybas(j)+celbas(9)*zbas(j)) -+ -+c calculate total structural difference -+ -+ rr2=txx**2+tyy**2+tzz**2 -+ pp2=max(pp2,rr2) -+ -+c identify and store the displaced atoms -+ -+ if(scan.and.rr2.ge.catch2)then -+ -+ mdiff=mdiff+1 -+ -+ if(mdiff.le.mxdiffs)then -+ -+ idabsn(mdiff)=i -+ xdiffs(mdiff)=txx -+ ydiffs(mdiff)=tyy -+ zdiffs(mdiff)=tzz -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c global check on diffs arrays -+ -+ if(scan)then -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'number of current diffs',i10)")mdiff -+ call error(idnode,2340) -+ -+ endif -+ -+ endif -+ -+c global transition check -+ -+ same=(pp2.lt.catch2) -+ if(mxnode.gt.1)call gstate(same) -+ -+ return -+ end subroutine check_for_transition -+ -+ subroutine check_basins(newbsn,mdiff,mxnode) -+ -+c*********************************************************************** -+c -+c dlpoly hyperdynamics routine for checking that a new basin is not -+c one already known -+c -+c copyright daresbury laboratory -+c author w.smith jan 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical same -+ integer newbsn,ia,ib,ic,id,ibsn,i,j,k,mxnode,mdiff -+ -+ ibsn=1 -+ newbsn=0 -+ ib=mdiff -+ ia=ndiff+1 -+ same=.false. -+ do while(.not.same.and.ibsn.lt.numbsn) -+ -+ ic=nbsa(ibsn) -+ id=nbsb(ibsn) -+ -+ if(ib-ia.eq.id-ic)then -+ -+ same=.true. -+ -+ do k=0,ib-ia -+ -+ i=ia+k -+ j=ic+k -+ -+ if(.not.((idabsn(i).eq.idabsn(j)).and. -+ x (abs(xdiffs(i)-xdiffs(j)).lt.0.1d0).and. -+ x (abs(ydiffs(i)-ydiffs(j)).lt.0.1d0).and. -+ x (abs(zdiffs(i)-zdiffs(j)).lt.0.1d0)))same=.false. -+ -+ enddo -+ -+ endif -+ -+c check if same on all processors -+ -+ if(mxnode.gt.1)call gstate(same) -+ if(same)newbsn=ibsn -+ -+ ibsn=ibsn+1 -+ -+ enddo -+ -+c if not same - must be new basin! -+ -+ if(.not.same)newbsn=numbsn -+ -+ return -+ end subroutine check_basins -+ -+ subroutine neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn1, -+ x bsn2,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling a nudged elastic band -+c calculation -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lneb,newlst,lneut,lnsq,stropt -+ logical lzeql,loglnk,lfcap -+ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,mstep -+ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw -+ integer ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl -+ integer keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nscons -+ integer ngrp,keytol,ntfree,iatm0,iatm1,iatm2,ntcons -+ integer i,j,k,n,pass,mxpass,nkinks,bsn1,bsn2,itrk -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet -+ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp -+ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtet,virtet,engshl -+ real(8) shlke,virshl,engfld,virfld,engcfg,fmax,temp,tstep -+ real(8) sprneb,opttol,hyp_units,fac,xxn,yyn,zzn,tol,cvg,dum -+ -+ data mxpass/100/ -+ -+c control variables -+ -+ stropt=.false. -+ do n=0,mxneb -+ -+ keymin(n)=0 -+ do i=1,5 -+ optk(i,n)=0.d0 -+ enddo -+ -+ enddo -+ if(lneb)numpro=-(100*bsn1+bsn2) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+c read in the required start and end point configurations -+ -+ if(lneb)then -+ -+c read data for first reference structure -+ -+ call read_reference_config -+ x ('CFGBSN','BASINS',nbsn,bsn1,natms,imcon,idnode,engcfg) -+ -+ engbsn(1)=engcfg -+ -+ do i=1,9 -+ celbas(i)=cell(i) -+ enddo -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ enddo -+ -+c read data for second reference structure -+ -+ call read_reference_config -+ x ('CFGBSN','BASINS',nbsn,bsn2,natms,imcon,idnode,engcfg) -+ -+ engbsn(2)=engcfg -+ -+ do i=1,9 -+ celchk(i)=cell(i) -+ enddo -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xchk(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ychk(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zchk(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ enddo -+ -+ endif -+ -+c construct initial `bead' configurations in chain -+ -+ k=0 -+ do n=0,mxneb -+ -+ j=0 -+ fac=dble(n)/dble(mxneb) -+ -+c construct linear mix of cell vectors -+ -+ do i=1,9 -+ celneb(i,n)=(1.d0-fac)*celbas(i)+fac*celchk(i) -+ enddo -+ -+c construct beads by linear interpolation -+ -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ k=k+1 -+ -+ xxn=xbas(j)+fac*((xchk(j)-xbas(j))-nint(xchk(j)-xbas(j))) -+ yyn=ybas(j)+fac*((ychk(j)-ybas(j))-nint(ychk(j)-ybas(j))) -+ zzn=zbas(j)+fac*((zchk(j)-zbas(j))-nint(zchk(j)-zbas(j))) -+ xneb(k)=celneb(1,n)*xxn+celneb(4,n)*yyn+celneb(7,n)*zzn -+ yneb(k)=celneb(2,n)*xxn+celneb(5,n)*yyn+celneb(8,n)*zzn -+ zneb(k)=celneb(3,n)*xxn+celneb(6,n)*yyn+celneb(9,n)*zzn -+ -+ enddo -+ -+ enddo -+ -+c start of NEB optimisation -+ -+ pass=0 -+ safe=.false. -+ do while(.not.safe.and.pass.lt.mxpass) -+ -+ pass=pass+1 -+ safe=.true. -+ mstep=nstep+pass -+ -+c calculate system forces on all beads -+ -+ call neb_system_forces -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,mxnode, -+ x natms,mstep,imcon,nstbgr,nsteql,keyfce,kmax1,kmax2, -+ x kmax3,nhko,nlatt,ntpvdw,ntpmet,nospl,multt,nneut,ntptbp, -+ x ntpfbp,ntpter,keyshl,keyfld,ntbond,ntangl,ntdihd,ntinv, -+ x ntteth,ntshl,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep) -+ -+c calculate spring forces on all beads -+ -+ call neb_spring_forces(idnode,mxnode,natms,nkinks,sprneb) -+ -+c energy minimisation of each bead -+ -+ do n=0,mxneb -+ -+c construct cell vectors for nth bead -+ -+ do i=1,9 -+ cell(i)=celneb(i,n) -+ enddo -+ -+c construct coordinate and force arrays for nth bead -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ xxx(i)=xneb(k) -+ yyy(i)=yneb(k) -+ zzz(i)=zneb(k) -+ fxx(i)=fxneb(k) -+ fyy(i)=fyneb(k) -+ fzz(i)=fzneb(k) -+ -+ enddo -+ -+c restore search direction vector if keymin > 0 -+ -+ if(keymin(n).gt.0)then -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ hhx(i)=hxneb(k) -+ hhy(i)=hyneb(k) -+ hhz(i)=hzneb(k) -+ -+ enddo -+ -+ endif -+ -+c form complete global arrays -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ if(keymin(n).gt.0) -+ x call merge(idnode,mxnode,natms,mxbuff,hhx,hhy,hhz,buffer) -+ -+ endif -+ -+c structure optimisation -+ -+ call strucopt -+ x (stropt,keymin(n),keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,10.d0*opttol,engneb(n),optk(1,n), -+ x optk(2,n),optk(3,n),optk(4,n),optk(5,n)) -+ safe=safe.and.stropt -+ stropt=.false. -+ -+c update coordinate arrays for nth bead -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ xneb(k)=xxx(i) -+ yneb(k)=yyy(i) -+ zneb(k)=zzz(i) -+ hxneb(k)=hhx(i) -+ hyneb(k)=hhy(i) -+ hzneb(k)=hhz(i) -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c convergence check -+ -+c$$$ if(.not.safe)then -+c$$$ -+c$$$ call error(idnode,2320) -+c$$$ -+c$$$ else -+ -+c save neb profile -+ -+ call write_profile(idnode,mxnode,natms,hyp_units) -+ -+c write neb summary -+ -+ if(idnode.eq.0)then -+ -+ if(lneb)then -+ -+ write(nrite,'(/,1x,"summary of NEB calculation",/)') -+ write(nrite,'(1x,"path and energy for state",i4, -+ x " ---> state",i4," transition")')bsn1,bsn2 -+ write(nrite,'(1x,"convergence status :",l4)')safe -+ write(nrite,'(1x,"obtained after ",i4," iterations",/)')pass -+ -+ do n=0,mxneb -+ write(nrite,'(6x,1p,2e14.6)')path(n),engneb(n)/hyp_units -+ enddo -+ -+ else -+ -+ write(nevnt,'("NEB",i10,3i6,1p,2e14.5)') -+ x nstep,pass,mxpass,mxneb+1,engbsn(1)/hyp_units, -+ x engbsn(2)/hyp_units -+ write(nrite,'(1x,"NEB",i10,3i6,1p,2e14.5)') -+ x nstep,pass,mxpass,mxneb+1,engbsn(1)/hyp_units, -+ x engbsn(2)/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ endif -+ -+c$$$ endif -+ -+c end of NEB optimisation -+ -+ return -+ end subroutine neb_driver -+ -+ subroutine neb_system_forces -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,mxnode, -+ x natms,mstep,imcon,nstbgr,nsteql,keyfce,kmax1,kmax2, -+ x kmax3,nhko,nlatt,ntpvdw,ntpmet,nospl,multt,nneut,ntptbp, -+ x ntpfbp,ntpter,keyshl,keyfld,ntbond,ntangl,ntdihd,ntinv, -+ x ntteth,ntshl,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating system forces in a nudged -+c elastic band calculation -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,ltad -+ logical lsolva,lfree,lexcite -+ integer idnode,mxnode,natms,imcon,nstbgr,nsteql,mstep -+ integer numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw -+ integer ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl -+ integer keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl -+ integer iatm0,iatm1,iatm2,i,k,n,nsolva,isolva -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet -+ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp -+ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtet,virtet,engshl -+ real(8) shlke,virshl,engfld,virfld,engcfg,fmax,temp,tstep -+ real(8) engord,virord -+ -+ numrdf=0 -+ ltad=.true. -+ nogofr=.false. -+ -+c dummy variables -+ -+ lsolva=.false. -+ lfree=.false. -+ lexcite=.false. -+ nsolva=0 -+ isolva=1 -+ engord=0.d0 -+ virord=0.d0 -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+c calculate system forces for all beads -+ -+ do n=0,mxneb -+ -+c construct cell vectors for one bead -+ -+ do i=1,9 -+ cell(i)=celneb(i,n) -+ enddo -+ -+c construct coordinate array for one bead -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ xxx(i)=xneb(k) -+ yyy(i)=yneb(k) -+ zzz(i)=zneb(k) -+ -+ enddo -+ -+c form complete global arrays -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces for one bead -+ -+ call force_manager -+ x (newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lexcite,idnode,mxnode,natms,imcon,mstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c store configuration energy of bead -+ -+ engneb(n)=engcfg -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c allocate forces to bead atoms -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ fxneb(k)=fxx(i) -+ fyneb(k)=fyy(i) -+ fzneb(k)=fzz(i) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine neb_system_forces -+ -+ subroutine neb_spring_forces(idnode,mxnode,natms,nkinks,sprneb) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating spring forces in a nudged -+c elastic band calculation -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,j,k,n,kp,km,idnode,mxnode,natms,iatm0,iatm1,iatm2 -+ integer nkinks -+ real(8) rp2,rm2,tau2,fpar,vv0,vp1,vm1,aaa,bbb,txx,tyy,tzz -+ real(8) uxx,uyy,uzz,wxx,wyy,wzz,sxx,syy,szz,rxx,ryy,rzz -+ real(8) sprneb,fac,kink,det -+ real(8) rcella(9),rcellb(9),rcellc(9),cella(9),cellb(9),cellc(9) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+c energies of first and last basins -+ -+ engneb(0)=engbsn(1) -+ engneb(mxneb)=engbsn(2) -+ -+c calculate spring tangents for all beads -+ -+ nkinks=0 -+ do n=1,mxneb-1 -+ -+ rp2=0.d0 -+ rm2=0.d0 -+ tau2=0.d0 -+ fpar=0.d0 -+ kink=0.d0 -+ vv0=engneb(n) -+ vp1=engneb(n+1) -+ vm1=engneb(n-1) -+ -+c calculate tangent vector and scalar product with system force -+ -+ if(vp1.gt.vv0.and.vv0.gt.vm1)then -+ -+ aaa=1.d0 -+ bbb=0.d0 -+ -+ else if(vp1.lt.vv0.and.vv0.lt.vm1)then -+ -+ aaa=0.d0 -+ bbb=1.d0 -+ -+ else if(vp1.gt.vm1)then -+ -+ aaa=max(abs(vp1-vv0),abs(vv0-vm1)) -+ bbb=min(abs(vp1-vv0),abs(vv0-vm1)) -+ -+ else -+ -+ aaa=min(abs(vp1-vv0),abs(vv0-vm1)) -+ bbb=max(abs(vp1-vv0),abs(vv0-vm1)) -+ -+ endif -+ -+c invert cell matrices -+ -+ do i=1,9 -+ cella(i)=celneb(i,n-1) -+ cellb(i)=celneb(i,n) -+ cellc(i)=celneb(i,n+1) -+ enddo -+ call invert(cella,rcella,det) -+ call invert(cellb,rcellb,det) -+ call invert(cellc,rcellc,det) -+ -+ j=0 -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ k=k+1 -+ km=k-iatm2 -+ -+c calculate first spring vector (pbc corrected) -+ -+ sxx=rcellb(1)*xneb(k)+rcellb(4)*yneb(k)+rcellb(7)*zneb(k) -+ syy=rcellb(2)*xneb(k)+rcellb(5)*yneb(k)+rcellb(8)*zneb(k) -+ szz=rcellb(3)*xneb(k)+rcellb(6)*yneb(k)+rcellb(9)*zneb(k) -+ rxx=rcella(1)*xneb(km)+rcella(4)*yneb(km)+rcella(7)*zneb(km) -+ ryy=rcella(2)*xneb(km)+rcella(5)*yneb(km)+rcella(8)*zneb(km) -+ rzz=rcella(3)*xneb(km)+rcella(6)*yneb(km)+rcella(9)*zneb(km) -+ rxx=rxx-nint(rxx-sxx) -+ ryy=ryy-nint(ryy-syy) -+ rzz=rzz-nint(rzz-szz) -+ txx=xneb(k)- -+ x (rxx*celneb(1,n-1)+ryy*celneb(4,n-1)+rzz*celneb(7,n-1)) -+ tyy=yneb(k)- -+ x (rxx*celneb(2,n-1)+ryy*celneb(5,n-1)+rzz*celneb(8,n-1)) -+ tzz=zneb(k)- -+ x (rxx*celneb(3,n-1)+ryy*celneb(6,n-1)+rzz*celneb(9,n-1)) -+ -+c calculate second spring vector (pbc corrected) -+ -+ kp=k+iatm2 -+ rxx=rcellc(1)*xneb(kp)+rcellc(4)*yneb(kp)+rcellc(7)*zneb(kp) -+ ryy=rcellc(2)*xneb(kp)+rcellc(5)*yneb(kp)+rcellc(8)*zneb(kp) -+ rzz=rcellc(3)*xneb(kp)+rcellc(6)*yneb(kp)+rcellc(9)*zneb(kp) -+ rxx=rxx-nint(rxx-sxx) -+ ryy=ryy-nint(ryy-syy) -+ rzz=rzz-nint(rzz-szz) -+ uxx=-xneb(k)+ -+ x rxx*celneb(1,n+1)+ryy*celneb(4,n+1)+rzz*celneb(7,n+1) -+ uyy=-yneb(k)+ -+ x rxx*celneb(2,n+1)+ryy*celneb(5,n+1)+rzz*celneb(8,n+1) -+ uzz=-zneb(k)+ -+ x rxx*celneb(3,n+1)+ryy*celneb(6,n+1)+rzz*celneb(9,n+1) -+ -+ rp2=rp2+uxx*uxx+uyy*uyy+uzz*uzz -+ rm2=rm2+txx*txx+tyy*tyy+tzz*tzz -+ wxx=aaa*uxx+bbb*txx -+ wyy=aaa*uyy+bbb*tyy -+ wzz=aaa*uzz+bbb*tzz -+ taux(j)=wxx -+ tauy(j)=wyy -+ tauz(j)=wzz -+ tau2=tau2+wxx*wxx+wyy*wyy+wzz*wzz -+ fpar=fpar+wxx*fxneb(k)+wyy*fyneb(k)+wzz*fzneb(k) -+ kink=kink+txx*uxx+tyy*uyy+tzz*uzz -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=rp2 -+ buffer(2)=rm2 -+ buffer(3)=tau2 -+ buffer(4)=fpar -+ buffer(5)=kink -+ call gdsum(buffer(1),5,buffer(6)) -+ rp2=buffer(1) -+ rm2=buffer(2) -+ tau2=buffer(3) -+ fpar=buffer(4) -+ kink=buffer(5) -+ -+ endif -+ -+c check for kinking of NEB -+ -+ kink=cos(kink/sqrt(rp2*rm2)) -+ if(kink.lt.0.5d0)nkinks=nkinks+1 -+ -+c calculate final forces -+ -+ j=0 -+ k=n*iatm2 -+ tau2=sqrt(tau2) -+ fac=(sprneb*(sqrt(rp2)-sqrt(rm2))-fpar/tau2)/tau2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ k=k+1 -+ fxneb(k)=fxneb(k)+fac*taux(j) -+ fyneb(k)=fyneb(k)+fac*tauy(j) -+ fzneb(k)=fzneb(k)+fac*tauz(j) -+ -+ enddo -+ -+ enddo -+ -+c abort if kinks detected -+ -+ if(nkinks.gt.0)then -+ -+ if(idnode.eq.0) -+ x write(nrite,'(1x,"number of kinks detected ",i6)')nkinks -+ call error(idnode,2350) -+ -+ endif -+ -+ return -+ end subroutine neb_spring_forces -+ -+ subroutine transition_properties -+ x (seek,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut,nospl, -+ x nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree, -+ x ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth, -+ x nturn,numbsn,alpha,delr,dlrpot,drewd,elrc,virlrc,epsq, -+ x fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,cfgtmp,cvgerr,estar,catchrad,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for analysing the NEB path and determining -+c the destination state (if not end of chain). -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 seek -+ logical lfcap,lneut,lnsq,loglnk,lzeql,newlst,ltad,scan,same -+ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt -+ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond -+ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,pass -+ integer ntpvdw,ntshl,ntteth,nturn,i,k,n,iatm0,iatm1,iatm2 -+ integer numblock,numbsn,mdiff -+ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp -+ real(8) virlrc,cvgerr,estar,catchrad,hyp_units -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+c analyse neb profile -+ -+ call scan_profile(nturn,estar) -+ -+c determine true new state from first maximum -+ -+ if(nturn.gt.1)then -+ -+ i=1 -+ do while(ktrn(i).ge.0) -+ i=i+1 -+ enddo -+ n=-ktrn(i) -+ -+c construct cell vectors for nth bead -+ -+ do i=1,9 -+ cell(i)=celneb(i,n) -+ enddo -+ -+c construct coordinate force arrays for nth bead -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ xxx(i)=xneb(k) -+ yyy(i)=yneb(k) -+ zzz(i)=zneb(k) -+ -+ enddo -+ -+c now minimise structure - this is correct new state -+ -+ call define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) -+ -+c write events entry for minimisation -+ -+ numblock=nstep/nblock -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x cfgtmp/hyp_units,cvgerr/hyp_units -+ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x cfgtmp/hyp_units,cvgerr/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ if(ltad)then -+ -+c determine differences for new state (TAD only) -+ -+ scan=.true. -+ call check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catchrad) -+ -+c set difference counters and pointers -+ -+ if(numbsn.gt.mxbsn)call error(idnode,2330) -+ -+ ndiff=mdiff -+ -+ if(numbsn.gt.1)then -+ nbsa(numbsn)=nbsb(numbsn-1)+1 -+ else -+ nbsa(numbsn)=1 -+ endif -+ -+ nbsb(numbsn)=mdiff -+ -+c save minimised starting structure as basin file -+ -+ call write_reference_config -+ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode,cfgtmp) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine transition_properties -+ -+ subroutine write_profile(idnode,mxnode,natms,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing profile file for NEB path -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ character*4 tail -+ integer idnode,mxnode,natms,i,j,k,n,iatm0,iatm1,iatm2 -+ real(8) hyp_units -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+ if(idnode.eq.0)then -+ -+c open profile data file -+ -+ if(numpro.lt.0)then -+ -+ write(tail,'(i4.4)')iabs(numpro) -+ open(npro,file='PROFILES'//'/'//'PRX'//tail//'.XY', -+ x form='formatted') -+ -+ else -+ -+ write(tail,'(i4.4)')numpro -+ open(npro,file='PROFILES'//'/'//'PRO'//tail//'.XY', -+ x form='formatted') -+ -+ endif -+ -+ endif -+ -+c calculate path -+ -+ path(0)=0.d0 -+ if(idnode.eq.0)write(npro,'(1p,2e14.6)')path(0), -+ x engneb(0)/hyp_units -+ -+ do n=1,mxneb -+ -+ path(n)=0.d0 -+ k=n*iatm2 -+ j=(n-1)*iatm2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ k=k+1 -+ path(n)=(xneb(k)-xneb(j))**2+(yneb(k)-yneb(j))**2+ -+ x (zneb(k)-zneb(j))**2+path(n) -+ -+ enddo -+ -+ if(mxnode.gt.1)call gdsum(path(n),1,buffer(1)) -+ -+ path(n)=sqrt(path(n))+path(n-1) -+ if(idnode.eq.0)write(npro,'(1p,2e14.6)')path(n), -+ x engneb(n)/hyp_units -+ -+ enddo -+ -+ numpro=numpro+1 -+ -+ if(idnode.eq.0)close(npro) -+ -+ return -+ end subroutine write_profile -+ -+ subroutine scan_profile(nturn,estar) -+ -+c********************************************************************* -+c -+c dl_poly routine for analysing neb energy profile -+c -+c copyright - daresbury laboratory -+c author - w.smith january 2007 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer, parameter :: nscan=100 -+ -+ integer i,np,n1,n2,npnts,fail,nturn -+ real(8) di,dj,rpd,uu,vv,v0,ss,estar -+ real(8), allocatable :: aa(:),dd(:),gg(:),zz(:) -+ -+c allocate working arrays -+ -+ allocate (aa(0:mxneb),dd(0:mxneb),gg(0:mxneb),zz(0:mxneb), -+ x stat=fail) -+ -+ npnts=mxneb+1 -+ n1=npnts-1 -+ n2=npnts-2 -+ -+c calculate spline coefficients -+ -+ gg(0)=0.d0 -+ dd(0)=path(1)-path(0) -+ -+ do i=1,n1-1 -+ -+ dd(i)=path(i+1)-path(i) -+ gg(i)=2.d0*(path(i+1)-path(i-1)) -+ zz(i)=6.d0*((engneb(i+1)-engneb(i))/dd(i)- -+ x (engneb(i)-engneb(i-1))/dd(i-1)) -+ -+ enddo -+ -+ gg(n1)=0.d0 -+ dd(n1)=0.d0 -+ aa(0)=0.d0 -+ aa(1)=dd(1)/gg(1) -+ -+ do i=2,n2-1 -+ -+ gg(i)=gg(i)-dd(i-1)*aa(i-1) -+ aa(i)=dd(i)/gg(i) -+ -+ enddo -+ -+ gg(n1-1)=gg(n1-1)-dd(n2-1)*aa(n2-1) -+ gg(1)=zz(1)/gg(1) -+ -+ do i=2,n1-1 -+ gg(i)=(zz(i)-dd(i-1)*gg(i-1))/gg(i) -+ enddo -+ -+ do i=1,n2-1 -+ gg(n1-i)=gg(n1-i)-aa(n1-i)*gg(npnts-i) -+ enddo -+ -+c now scan across the profile locating maxima and minima -+ -+ np=1 -+ nturn=0 -+ ss=1.d0 -+ v0=engneb(0) -+ rpd=(path(npnts-1)-path(0))/dble(nscan) -+ -+ do i=2,nscan-1 -+ -+ uu=rpd*dble(i)+path(0) -+ -+ do while(np.lt.npnts.and.uu.gt.path(np)) -+ np=np+1 -+ enddo -+ -+ di=uu-path(np-1) -+ dj=path(np)-uu -+ vv=(di*engneb(np)+dj*engneb(np-1)-di*dj* -+ x ((dd(np-1)+dj)*gg(np-1)+(dd(np-1)+di)*gg(np))/6.d0)/dd(np-1) -+ -+ if(ss.gt.0.d0.and.vv.le.v0)then -+ -+ nturn=nturn+1 -+ xtrn(nturn)=uu -+ ytrn(nturn)=vv -+ ktrn(nturn)=np -+ -+ else if(ss.lt.0.d0.and.vv.gt.v0)then -+ -+ nturn=nturn+1 -+ xtrn(nturn)=uu -+ ytrn(nturn)=vv -+ ktrn(nturn)=-np -+ -+ endif -+ -+ ss=sign(1.d0,vv-v0) -+ v0=vv -+ -+ enddo -+ -+c estimated activation energy -+ -+ i=1 -+ do while(ktrn(i).lt.0) -+ i=i+1 -+ enddo -+ estar=ytrn(i)-engbsn(1) -+ -+c deallocate working arrays -+ -+ deallocate (aa,dd,gg,zz,stat=fail) -+ -+ return -+ end subroutine scan_profile -+ -+ subroutine transition_time -+ x (seek,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3, -+ x multt,mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntrack,ntpvdw,ntshl,ntteth, -+ x ntcons,itrk,alpha,delr,dlrpot,drewd,elrc,virlrc,epsq, -+ x fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,cfgtmp,cvgerr,catchrad,timhop,hyp_units) -+ -+c********************************************************************* -+c -+c dl_poly routine for estimating the time of a transition -+c from a backlog of previous configurations -+c -+c copyright - daresbury laboratory -+c author - w.smith february 2007 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ character*8 seek -+ logical same,minflg,lfcap,lneut,lnsq,loglnk,scan -+ logical lzeql,newlst -+ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt -+ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond -+ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter -+ integer ntpvdw,ntshl,ntteth,ntcons,ntrack,itrk,mdiff,pass -+ integer nback,ntry,numblock -+ real(8) alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol -+ real(8) rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep -+ real(8) volm,cfgtmp,cvgerr,eng,tol,catchrad,timhop,hyp_units -+ -+c determine starting tracking file -+ -+ nback=min(numtrk,maxtrk) -+ -+c search track files for transition -+ -+ itrk=0 -+ same=.false. -+ -+ do while(.not.same.and.itrk.le.nback) -+ -+ itrk=itrk+1 -+ ntry=mod(numtrk-itrk,maxtrk) -+ -+ call read_reference_config -+ x ('CFGTRK','TRACKS',ntrk,ntry,natms,imcon,idnode,eng) -+ -+ call define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) -+ -+c write events entry for minimisation (normally deactivated) -+ -+c$$$ if(idnode.eq.0)then -+c$$$ -+c$$$ numblock=nstep/nblock -+c$$$ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') -+c$$$ x nstep,pass,numblock,keytol,opttol/hyp_units, -+c$$$ x cfgtmp/hyp_units,cvgerr/hyp_units -+c$$$ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') -+c$$$ x nstep,pass,numblock,keytol,opttol/hyp_units, -+c$$$ x cfgtmp/hyp_units,cvgerr/hyp_units -+c$$$ write(nrite,"(1x,120('-'))") -+c$$$ -+c$$$ endif -+ -+c check if still in base state -+ -+ scan=.false. -+ call check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catchrad) -+ -+ enddo -+ -+ timhop=timhyp-tstep*dble(ntrack)*(dble(itrk)-0.5d0) -+ tboost=track(ntry) -+ -+ return -+ end subroutine transition_time -+ -+ subroutine scramble_velocities(idnode,natms) -+ -+c*********************************************************************** -+c -+c dlpoly hyperdynamics routine for randomising velocities after a -+c transition has occured (use with identical species only) -+c -+c copyright daresbury laboratory -+c author w.smith jan 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer idnode,natms,i,j,k,m,n -+ real(8) vvv -+ -+ do j=1,10 -+ -+ do i=1,natms -+ -+ k=int(natms*duni())+1 -+ vvv=vxx(i) -+ vxx(i)=vxx(k) -+ vxx(k)=vvv -+ m=int(natms*duni())+1 -+ vvv=vyy(i) -+ vyy(i)=vyy(m) -+ vyy(m)=vvv -+ n=int(natms*duni())+1 -+ vvv=vzz(i) -+ vzz(i)=vzz(n) -+ vzz(n)=vvv -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine scramble_velocities -+ -+ subroutine hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+c*********************************************************************** -+c -+c dlpoly routine for saving hyperdynamics restart data -+c -+c copyright daresbury laboratory -+c author w.smith dec 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical ltad -+ integer idnode,mxnode,natms,nsteql -+ integer iatm0,iatm1,i,j,k,n,last,ierr,netdif -+ real(8) buff(2) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c total number of atomic differences -+ -+ buff(1)=dble(ndiff) -+ call gdsum(buff(1),1,buff(2)) -+ netdif=nint(buff(1)) -+ -+ if(idnode.eq.0)then -+ -+c open hyperdynamics restart file -+ -+ open(nhrs,file="HYPREV",form="unformatted") -+ -+c write control variables -+ -+ write(nhrs)ltad,dble(numbsn),dble(numtrk),dble(numpro), -+ x dble(netdif),dble(numdark),dble(nsteql),dble(numbpd), -+ x timhyp,timres,tstop,tkeres,tboost,vbase,strres,celres -+ write(nhrs)track -+ endif -+ -+ if(ltad.and.numbsn.gt.1)then -+ -+c load basin difference data -+ -+ n=0 -+ do i=1,numbsn-1 -+ -+ do j=nbsa(i),nbsb(i) -+ -+ buffer(n+1)=dble(idabsn(j)) -+ buffer(n+2)=dble(i) -+ buffer(n+3)=xdiffs(j) -+ buffer(n+4)=ydiffs(j) -+ buffer(n+5)=zdiffs(j) -+ n=n+5 -+ -+ enddo -+ -+ enddo -+ last=n -+ -+c write basin difference data -+ -+ do k=1,mxnode-1 -+ -+ if(idnode.eq.0)then -+ -+ -+ call csend(hyper_tag+k,buff,1,k,ierr) -+ call crecv(2*hyper_tag+k,buff,1) -+ call crecv(3*hyper_tag+k,buffer(last+1),nint(buff(1))) -+ last=nint(buff(1))+last -+ -+ elseif(k.eq.idnode)then -+ -+ call crecv(hyper_tag+k,buff,1) -+ buff(1)=dble(last) -+ call csend(2*hyper_tag+k,buff,1,0,ierr) -+ call csend(3*hyper_tag+k,buffer,last,0,ierr) -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)write(nhrs)(buffer(i),i=1,last) -+ call gsync() -+ -+ endif -+ -+c load reference block configuration data -+ -+ j=0 -+ k=1 -+ do i=iatm0,iatm1 -+ -+ buffer(j+1)=xres(k) -+ buffer(j+2)=yres(k) -+ buffer(j+3)=zres(k) -+ j=j+3 -+ k=k+1 -+ -+ enddo -+ last=j -+ -+c write reference block configuration data -+ -+ do k=1,mxnode-1 -+ -+ if(idnode.eq.0)then -+ -+ call csend(hyper_tag+k,buff,1,k,ierr) -+ call crecv(2*hyper_tag+k,buff,1) -+ call crecv(3*hyper_tag+k,buffer(last+1),nint(buff(1))) -+ last=nint(buff(1))+last -+ -+ elseif(k.eq.idnode)then -+ -+ call crecv(hyper_tag+k,buff,1) -+ buff(1)=dble(last) -+ call csend(2*hyper_tag+k,buff,1,0,ierr) -+ call csend(3*hyper_tag+k,buffer,last,0,ierr) -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nhrs)(buffer(i),i=1,last) -+ close(nhrs) -+ -+ endif -+ call gsync() -+ -+ return -+ end subroutine hyper_close -+ -+ subroutine hyper_open(ltad,idnode,mxnode,natms,nsteql) -+ -+c*********************************************************************** -+c -+c dlpoly routine for reading hyperdynamics restart data -+c -+c copyright daresbury laboratory -+c author w.smith dec 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical ltad,mtad -+ integer idnode,mxnode,natms,nsteql -+ integer iatm0,iatm1,i,j,k,n,last,netdif,ierr -+ real(8) buff(1) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c restore control variables -+ -+ mtad=.true. -+ if(idnode.eq.0)then -+ -+c open hyperdynamics restart file -+ -+ open(nhrs,file="HYPOLD",form="unformatted") -+ -+ read(nhrs)mtad,(buffer(i),i=1,30) -+ read(nhrs)track -+ -+ else -+ -+ do i=1,30 -+ buffer(i)=0.d0 -+ enddo -+ track(:)=0.d0 -+ -+ endif -+ -+c check restart file is tad compatible -+ -+ call gstate(mtad) -+ if(ltad.and.(.not.mtad))call error(idnode,2341) -+ -+ call gdsum(buffer(1),31,buffer(32)) -+ -+ numbsn=nint(buffer(1)) -+ numtrk=nint(buffer(2)) -+ numpro=nint(buffer(3)) -+ netdif=nint(buffer(4)) -+ numdark=nint(buffer(5)) -+ nsteql=nint(buffer(6)) -+ numbpd=nint(buffer(7)) -+ timhyp=buffer(8) -+ timres=buffer(9) -+ tstop=buffer(10) -+ tkeres=buffer(11) -+ tboost=buffer(12) -+ vbase=buffer(13) -+ do i=1,9 -+ -+ strres(i)=buffer(i+13) -+ celres(i)=buffer(i+22) -+ -+ enddo -+ last=size(track) -+ call gdsum(track,last,buffer) -+ -+ if(ltad.and.numbsn.gt.1)then -+ -+c restore basin difference data -+ -+ last=5*netdif -+ if(idnode.eq.0)read(nhrs)(buffer(i),i=1,last) -+ -+ do k=1,mxnode-1 -+ -+ if(idnode.eq.0)then -+ -+ call csend(hyper_tag+k,buffer,last,k,ierr) -+ -+ elseif(k.eq.idnode)then -+ -+ call crecv(hyper_tag+k,buffer,last) -+ -+ endif -+ -+ enddo -+ -+c reject nonlocal basin difference data -+ -+ j=0 -+ do i=1,last,5 -+ -+ n=nint(buffer(i)) -+ if(n.ge.iatm0.and.n.le.iatm1)then -+ -+ buffer(j+1)=buffer(i) -+ buffer(j+2)=buffer(i+1) -+ buffer(j+3)=buffer(i+2) -+ buffer(j+4)=buffer(i+3) -+ buffer(j+5)=buffer(i+4) -+ j=j+5 -+ -+ endif -+ -+ enddo -+ last=j -+ -+c unload basin difference data -+ -+ n=0 -+ nbsa(1)=1 -+ do i=1,numbsn-1 -+ -+ if(i.gt.1)nbsa(i)=n+1 -+ -+ do j=1,last,5 -+ -+ if(nint(buffer(j+1)).eq.i)then -+ -+ n=n+1 -+ idabsn(n)=nint(buffer(j)) -+ xdiffs(n)=buffer(j+2) -+ ydiffs(n)=buffer(j+3) -+ zdiffs(n)=buffer(j+4) -+ -+ endif -+ -+ enddo -+ -+ nbsb(i)=n -+ -+ enddo -+ ndiff=n -+ call gsync() -+ -+ endif -+ -+c retrieve reference block configuration data -+ -+ last=3*natms -+ if(idnode.eq.0)read(nhrs)(buffer(i),i=1,last) -+ -+ do k=1,mxnode-1 -+ -+c read reference block configuration data -+ -+ if(idnode.eq.0)then -+ -+ call csend(hyper_tag+k,buffer,last,k,ierr) -+ -+ elseif(k.eq.idnode)then -+ -+ call crecv(hyper_tag+k,buffer,last) -+ -+ endif -+ -+ enddo -+ -+c unload reference block configuration data -+ -+ n=1 -+ j=3*(iatm0-1) -+ do i=iatm0,iatm1 -+ -+ xres(n)=buffer(j+1) -+ yres(n)=buffer(j+2) -+ zres(n)=buffer(j+3) -+ j=j+3 -+ n=n+1 -+ -+ enddo -+ -+ if(idnode.eq.0)close(nhrs) -+ call gsync() -+ -+ return -+ end subroutine hyper_open -+ -+ subroutine bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for scaling forces in a bias potential dynamics -+c simulation using hamelberg, mongan and mccammon factor -+c J. Chem. Phys. 120 (2004) 11919 -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2008 -+c -+c*********************************************************************** -+ -+ integer i,natms,mynode,keybpd -+ real(8) alpha,vmin,ebias,beta,temp,engcfg,eboost,hscale -+ real(8) engtmp -+ -+ boost=1.d0 -+ numbpd=numbpd+1 -+ -+c reset potential energy wrt base level -+ -+ if(keybpd.eq.1)then -+ engtmp=engcfg-vbase -+ else -+ engtmp=engcfg-engbsn(1) -+ endif -+ -+ if(ebias.gt.engtmp)then -+ -+c bias potental boost -+ -+ alpha=ebias*(ebias-vmin)/vmin -+ beta=1.d0/(boltz*temp*dble(natms)) -+ eboost=(ebias-engtmp)**2/(alpha+ebias-engtmp) -+ boost=exp(beta*eboost) -+ -+c bias potential forces scaling factor -+ -+ hscale=(alpha/(alpha+ebias-engtmp))**2 -+ -+c scale forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxx(i)*hscale -+ fyy(i)=fyy(i)*hscale -+ fzz(i)=fzz(i)*hscale -+ -+ enddo -+ -+ endif -+ -+c accumulative average of boost factor -+ -+ tboost=boost/dble(numbpd)+dble(numbpd-1)*tboost/dble(numbpd) -+ -+ return -+ end subroutine bpd_forces -+ -+ end module hyper_dynamics_module -diff -urN dl_class_1.9.orig/srcmod/integrator_module.f dl_class_1.9/srcmod/integrator_module.f ---- dl_class_1.9.orig/srcmod/integrator_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/integrator_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,624 @@ -+ module integrator_module -+ -+c*********************************************************************** -+c -+c dl_poly module for selecting verlet integration schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use error_module -+ use lf_motion_module -+ use lf_rotation1_module -+ use lf_rotation2_module -+ use pmf_module -+ use temp_scalers_module -+ use vv_motion_module -+ use vv_rotation1_module -+ use vv_rotation2_module -+ -+ contains -+ -+ subroutine lf_integrate -+ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, -+ x elrc,virlrc,virpmf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the integration algorithm -+c to solve the the equations of motion. based on the leapfrog -+c verlet algorithm -+c -+c copyright - daresbury laboratory -+c author - w. smith december 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,safep,safeq,lcnb,lshmov,lnfic -+ integer idnode,mxnode,imcon,natms,ngrp,keyens,nscons,nofic -+ integer ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nstep -+ real(8) tstep,engke,engrot,tolnce,quattol,vircon,vircom -+ real(8) virtot,temp,press,volm,sigma,taut,taup,chit,chip -+ real(8) consv,conint,elrc,virlrc,virpmf -+ -+ safe=.true. -+ safeq=.true. -+ safep=.true. -+ -+ if(ngrp.eq.0) then -+ -+ if(keyens.eq.0) then -+ -+c verlet leapfrog -+ -+ call nve_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,tolnce,tstep,vircon) -+ -+ else if(keyens.eq.1) then -+ -+c Evans Gaussian Temperature constraints -+ -+ call nvt_e1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,tolnce,tstep,vircon) -+ -+ else if(keyens.eq.2) then -+ -+c Berendsen thermostat -+ -+ call nvt_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,taut,sigma,tolnce,tstep,vircon) -+ -+ else if(keyens.eq.3) then -+ -+c Nose-Hoover thermostat -+ -+ call nvt_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon) -+ -+ elseif(keyens.eq.4) then -+ -+c Berendsen thermostat and isotropic barostat -+ -+ call npt_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, -+ x tstep,virtot,vircon,volm) -+ -+ else if(keyens.eq.5) then -+ -+c Nose-Hoover thermostat and isotropic barostat -+ -+ call npt_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,chip,chit,conint,consv,elrc,engke,virlrc,press, -+ x taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm) -+ -+ else if(keyens.eq.6) then -+ -+c Berendsen thermostat and barostat (cell shape varying) -+ -+ call nst_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,mode,elrc,engke,virlrc,press,taup,taut,sigma, -+ x tolnce,tstep,vircon,volm) -+ -+ else if(keyens.eq.7) then -+ -+c Nose-Hoover thermostat and barostat (cell shape varying) -+ -+ call nst_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,mode,chit,conint,consv,elrc,engke,virlrc,press, -+ x taup,taut,sigma,temp,tolnce,tstep,vircon,volm) -+ -+ elseif(keyens.eq.8) then -+ -+c Potential of mean force in NVE -+ -+ call pmflf -+ x (safe,safep,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) -+ -+ endif -+ -+ elseif(ngrp.gt.0) then -+ -+c apply rigid body equations of motion -+ -+ if(keyens.eq.0) then -+ -+ if(.not.lcnb) then -+ -+ call nveq_1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon) -+ -+ else -+ -+ call nveq_2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon) -+ -+ endif -+ -+ elseif(keyens.eq.1) then -+ -+c invalid option -+ -+ call error(idnode,430) -+ -+ elseif(keyens.eq.2) then -+ -+ if(.not.lcnb) then -+ -+ call nvtq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, -+ x tstep,vircom,vircon) -+ -+ else -+ -+ call nvtq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, -+ x tstep,vircom,vircon) -+ -+ endif -+ -+ elseif(keyens.eq.3) then -+ -+ if(.not.lcnb) then -+ -+ call nvtq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,chit,consv,conint,engke,engrot,quattol, -+ x sigma,taut,tolnce,tstep,vircom,vircon) -+ -+ else -+ -+ call nvtq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,conint,consv,chit,engke,engrot,quattol, -+ x sigma,taut,tolnce,tstep,vircom,vircon) -+ -+ endif -+ -+ elseif(keyens.eq.4) then -+ -+ if(.not.lcnb) then -+ -+ call nptq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,virtot,vircom, -+ x vircon,volm) -+ -+ else -+ -+ call nptq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon, -+ x virtot,volm) -+ -+ endif -+ -+ elseif(keyens.eq.5) then -+ -+ if(.not.lcnb) then -+ -+ call nptq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,virtot,vircom,vircon,volm) -+ -+ else -+ -+ call nptq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,vircom,vircon,virtot,volm) -+ -+ endif -+ -+ elseif(keyens.eq.6) then -+ -+ if(.not.lcnb) then -+ -+ call nstq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) -+ -+ else -+ -+ call nstq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) -+ -+ endif -+ -+ elseif(keyens.eq.7) then -+ -+ if(.not.lcnb) then -+ -+ call nstq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,vircom,vircon,volm) -+ -+ else -+ -+ call nstq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,vircom,vircon,volm) -+ -+ endif -+ -+ else -+ -+c invalid option -+ -+ call error(idnode,430) -+ -+ endif -+ -+ endif -+ -+c check on convergence of pmf-shake -+ -+ if(ntpmf.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safep) -+ if(.not.safep) call error(idnode,438) -+ -+ endif -+ -+c check on convergence of shake -+ -+ if(ntcons.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,105) -+ -+ endif -+ -+c check on convergence of quaternion algorithm -+ -+ if(ngrp.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safeq) -+ if(.not.safeq) call error(idnode,321) -+ -+ endif -+ -+c eliminate "flying ice cube" in long simulations (Berendsen) -+ -+ if(lnfic.and.(keyens.eq.2.or.keyens.eq.4.or.keyens.eq.6))then -+ -+ if(mod(nstep,nofic).eq.0)then -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine lf_integrate -+ -+ subroutine vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint,elrc, -+ x virlrc,virpmf,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the integration algorithm -+c to solve the the equations of motion. based on the velocity -+c verlet algorithm -+c -+c copyright - daresbury laboratory -+c author - w. smith february 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,safep,lcnb,lshmov,lnfic -+ integer isw,idnode,mxnode,imcon,natms,ngrp,keyens,nscons -+ integer ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nstep,nofic -+ integer ntshl,keyshl -+ real(8) tstep,engke,engrot,tolnce,vircon,vircom -+ real(8) virtot,temp,press,volm,sigma,taut,taup,chit,chip -+ real(8) consv,conint,elrc,virlrc,virpmf,chit_shl,sigma_shl -+ -+ if(ngrp.eq.0) then -+ -+ if(keyens.eq.0) then -+ -+c verlet leapfrog -+ -+ call nvevv_1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,tstep,engke,tolnce,vircon) -+ -+ else if(keyens.eq.1) then -+ -+c Evans Gaussian Temperature constraints -+ -+ call nvtvv_e1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,tstep,engke,tolnce,vircon) -+ -+ else if(keyens.eq.2) then -+ -+c Berendsen thermostat -+ -+ call nvtvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,tstep,taut,sigma,engke,tolnce,vircon) -+ -+ else if(keyens.eq.3) then -+ -+c Nose-Hoover thermostat -+ -+ call nvtvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntshl,keyshl,tstep,taut,sigma,chit,consv, -+ x conint,engke,tolnce,vircon,chit_shl,sigma_shl) -+ -+ elseif(keyens.eq.4) then -+ -+c Berendsen thermostat and isotropic barostat -+ -+ call nptvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,tstep,taut,taup,sigma,engke,press,elrc, -+ x virlrc,tolnce,virtot,vircon,volm) -+ -+ else if(keyens.eq.5) then -+ -+c Nose-Hoover thermostat and isotropic barostat -+ -+ call nptvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,ntshl,keyshl,tstep,taut,taup,sigma,temp, -+ x chip,chit,consv,conint,engke,elrc,tolnce,vircon, -+ x virtot,virlrc,volm,press,chit_shl,sigma_shl) -+ -+ else if(keyens.eq.6) then -+ -+c Berendsen thermostat and barostat (cell shape varying) -+ -+ call nstvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,mode,tstep,taut,taup,sigma,engke,press, -+ x elrc,virlrc,tolnce,vircon,volm) -+ -+ else if(keyens.eq.7) then -+ -+c Nose-Hoover thermostat and barostat (cell shape varying) -+ -+ call nstvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,mode,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chit,consv,conint,engke,elrc,tolnce,vircon, -+ x virlrc,volm,press,chit_shl,sigma_shl) -+ -+ elseif(keyens.eq.8) then -+ -+c Potential of mean force in NVE -+ -+ call pmfvv -+ x (safe,safep,lshmov,isw,idnode,mxnode,imcon,natms,nscons, -+ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) -+ -+ endif -+ -+ elseif(ngrp.gt.0) then -+ -+c apply rigid body equations of motion -+ -+ if(keyens.eq.0) then -+ -+ if(.not.lcnb) then -+ -+ call nveqvv_1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) -+ -+ else -+ -+ call nveqvv_2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) -+ -+ endif -+ -+ elseif(keyens.eq.1) then -+ -+c invalid option -+ -+ call error(idnode,430) -+ -+ elseif(keyens.eq.2) then -+ -+ if(.not.lcnb) then -+ -+ call nvtqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, -+ x vircom,vircon) -+ -+ else -+ -+ call nvtqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, -+ x vircom,vircon) -+ -+ endif -+ -+ elseif(keyens.eq.3) then -+ -+ if(.not.lcnb) then -+ -+ call nvtqvv_h1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke, -+ x engrot,taut,sigma,tolnce,tstep,vircom,vircon,chit_shl, -+ x sigma_shl) -+ -+ else -+ -+ call nvtqvv_h2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke, -+ x engrot,taut,sigma,tolnce,tstep,vircom,vircon,chit_shl, -+ x sigma_shl) -+ -+ endif -+ -+ elseif(keyens.eq.4) then -+ -+ if(.not.lcnb) then -+ -+ call nptqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) -+ -+ else -+ -+ call nptqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) -+ -+ endif -+ -+ elseif(keyens.eq.5) then -+ -+ if(.not.lcnb) then -+ -+ call nptqvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircon,virtot,virlrc,vircom,volm,press,chit_shl, -+ x sigma_shl) -+ -+ else -+ -+ call nptqvv_h2 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircom,vircon,virtot,virlrc,volm,press,chit_shl, -+ x sigma_shl) -+ -+ endif -+ -+ elseif(keyens.eq.6) then -+ -+ if(.not.lcnb) then -+ -+ call nstqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup, -+ x sigma,tolnce,tstep,vircom,vircon,elrc,virlrc,volm) -+ -+ else -+ -+ call nstqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup, -+ x sigma,tolnce,tstep,vircom,vircon,elrc,virlrc,volm) -+ -+ endif -+ -+ elseif(keyens.eq.7) then -+ -+ if(.not.lcnb) then -+ -+ call nstqvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, -+ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircon,virlrc,vircom,volm,press,chit_shl,sigma_shl) -+ -+ else -+ -+ call nstqvv_h2 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, -+ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircom,vircon,virlrc,volm,press,chit_shl,sigma_shl) -+ -+ endif -+ -+ else -+ -+c invalid option -+ -+ call error(idnode,430) -+ -+ endif -+ -+ endif -+ -+c check on convergence of pmf-shake -+ -+ if(ntpmf.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safep) -+ if(.not.safep) call error(idnode,438) -+ -+ endif -+ -+c check on convergence of shake -+ -+ if(ntcons.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,105) -+ -+ endif -+ -+c eliminate "flying ice cube" in long simulations (Berendsen) -+ -+ if(lnfic.and.(keyens.eq.2.or.keyens.eq.4.or.keyens.eq.6))then -+ -+ if(mod(nstep,nofic).eq.0)then -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine vv_integrate -+ -+ end module integrator_module -diff -urN dl_class_1.9.orig/srcmod/inversion_module.f dl_class_1.9/srcmod/inversion_module.f ---- dl_class_1.9.orig/srcmod/inversion_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/inversion_module.f 2011-08-16 14:42:52.000000000 +0200 -@@ -0,0 +1,828 @@ -+ module inversion_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining inversion potential arrays -+c copyright - daresbury laboratory -+c -+c author - w. smith sep 2003 -+c adapted - w. smith jun 2008 : solvation, free energy, excitation -+c adapted - w. smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use solvation_module -+ -+ implicit none -+ -+ real(8), allocatable :: prminv(:,:) -+ integer, allocatable :: listinv(:,:) -+ integer, allocatable :: numinv(:),keyinv(:),lstinv(:,:) -+ -+ save prminv,listinv,numinv,keyinv,lstinv -+ -+ contains -+ -+ subroutine alloc_inv_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(5) -+ -+ do i=1,5 -+ fail(i)=0 -+ enddo -+ -+ allocate (prminv(mxtinv,mxpinv),stat=fail(1)) -+ allocate (numinv(mxtmls),stat=fail(2)) -+ allocate (keyinv(mxtinv),stat=fail(3)) -+ allocate (lstinv(mxtinv,4),stat=fail(4)) -+ allocate (listinv(mxinv,5),stat=fail(5)) -+ -+ do i=1,5 -+ if(fail(i).gt.0)call error(idnode,1120) -+ enddo -+ -+ do i=1,mxtmls -+ numinv(i)=0 -+ enddo -+ -+ end subroutine alloc_inv_arrays -+ -+ subroutine define_inversions -+ x (safe,idnode,itmols,ninver,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining inversion angle potentials -+c note: includes calcite planar potential which is not strictly -+c an inversion potential and is different in implementation -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,itmols,ninver,nsite,ntmp,inv,inv1,i -+ integer iatm1,iatm2,iatm3,iatm4,isite1,isite2,isite3,isite4 -+ integer ia,ja,idum -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numinv(itmols)=numinv(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of inversion terms', -+ x 6x,i10)")ntmp -+ write(nrite,"(/,/,1x,'inversion potential details:', -+ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, -+ x 'index',5x,'index',5x,'f-const',7x,'angle',/)") -+ endif -+ -+ inv1=numinv(itmols) -+ do inv=1,inv1 -+ -+c read inversion potential parameters -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ iatm3=intstr(record,lenrec,idum) -+ iatm4=intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ isite3=nsite-numsit(itmols)+iatm3 -+ isite4=nsite-numsit(itmols)+iatm4 -+ -+ if(lfzsit(isite1)*lfzsit(isite2)* -+ x lfzsit(isite3)*lfzsit(isite4).ne.0)then -+ -+ numinv(itmols)=numinv(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ ninver=ninver+1 -+ -+ if(ninver.gt.mxtinv)call error(idnode,73) -+ -+ if(keyword(1:4).eq.'harm')then -+ keyinv(ninver)=1 -+ elseif(keyword(1:4).eq.'hcos')then -+ keyinv(ninver)=2 -+ elseif(keyword(1:4).eq.'plan')then -+ keyinv(ninver)=3 -+ elseif(keyword(1:4).eq.'calc')then -+ keyinv(ninver)=4 -+ else -+ if(idnode.eq.0)write(nrite,*)record -+ call error(idnode,449) -+ endif -+ -+ lstinv(ninver,1)=iatm1 -+ lstinv(ninver,2)=iatm2 -+ lstinv(ninver,3)=iatm3 -+ lstinv(ninver,4)=iatm4 -+ prminv(ninver,1)=dblstr(record,lenrec,idum) -+ prminv(ninver,2)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,4i10,1p,e12.4,0p,9f12.6)") -+ x keyword(1:4),(lstinv(ninver,ia),ia=1,4), -+ x (prminv(ninver,ja),ja=1,mxpinv) -+ -+c convert energies to internal units and angles to radians -+ -+ prminv(ninver,1)=prminv(ninver,1)*engunit -+ -+ if(keyinv(ninver).eq.2)then -+ -+ prminv(ninver,2)=cos(prminv(ninver,2)*(pi/180.d0)) -+ -+ elseif(keyinv(ninver).eq.4)then -+ -+ prminv(ninver,2)=prminv(ninver,2)*engunit -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_inversions -+ -+ subroutine invfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntinv,enginv,virinv) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating inversion energy and force -+c terms in molecular dynamics. -+c -+c copyright - daresbury laboratory 1996 -+c author - w. smith may 1996 -+c modified - w.smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect,lcalcite -+ logical idrive,jdrive,kdrive,ldrive -+ integer idnode,imcon,mxnode,ntinv,fail1,fail2 -+ integer fail3,inv1,inv2,i,ii,ia,id,kk,ib,ic -+ real(8) strs(6),strs_loc(6) -+ real(8) xab,yab,zab,rab2,rrab,xac,yac,zac,rac2,rrac,xad,yad -+ real(8) zad,rad2,rrad,rbc,rcd,rdb,ubx,uby,ubz,ubn,rub,vbx -+ real(8) vby,vbz,rvb,wwb,ucx,ucy,ucz,ucn,vcx,vcy,vcz,rvc,wwc -+ real(8) udx,udy,udz,udn,vdx,vdy,vdz,vdn,rvd,wwd,cosb,cosc -+ real(8) cosd,thb,thc,thd,gamb,gamc,gamd,rubc,rubd,rucd,rucb -+ real(8) rudb,rudc,rvbc,rvbd,rvcd,rvcb,rvdb,rvdc,fax,fay,faz -+ real(8) fbx,fby,fbz,fcx,fcy,fcz,fdx,fdy,fdz,vbn,vcn,ruc,rud -+ real(8) uuu,uu2,uun,uux,uuy,uuz,enginv,virinv,omega,gamma -+ real(8) gamvir -+ -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ real(8), allocatable :: xdac(:),ydac(:),zdac(:) -+ real(8), allocatable :: xdad(:),ydad(:),zdad(:) -+ -+ data fail1,fail2,fail3/0,0,0/ -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) -+ allocate (xdac(msbad),ydac(msbad),zdac(msbad),stat=fail2) -+ allocate (xdad(msbad),ydad(msbad),zdad(msbad),stat=fail3) -+ if(fail1.ne.0.or.fail2.ne.0.or.fail3.ne.0) -+ x call error(idnode,1130) -+ -+c check size of work arrays -+ -+ if((ntinv-mxnode+1)/mxnode.gt.msbad)call error(idnode,427) -+ -+c block indices -+ -+ inv1=(idnode*ntinv)/mxnode+1 -+ inv2=((idnode+1)*ntinv)/mxnode -+ -+ safe=.true. -+ -+c initialise accumulators -+ -+ enginv=0.d0 -+ virinv=0.d0 -+ inv_fre=0.d0 -+ inv_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(4)=.true. -+ inv_sol(:)=0.d0 -+ if(lexcite)inv_exc(:)=0.d0 -+ -+ endif -+ -+c calculate bond vectors -+ -+ ii=0 -+ do i=inv1,inv2 -+ -+ ii=ii+1 -+ -+c potential energy function type -+ -+ kk=listinv(ii,1) -+ -+c indices of bonded atoms -+ -+ ia=listinv(ii,2) -+ ib=listinv(ii,3) -+ ic=listinv(ii,4) -+ id=listinv(ii,5) -+ -+c define components of bond vectors -+ -+ xdab(ii)=xxx(ib)-xxx(ia) -+ ydab(ii)=yyy(ib)-yyy(ia) -+ zdab(ii)=zzz(ib)-zzz(ia) -+ -+ if(keyinv(kk).eq.4)then -+ -+ xdac(ii)=xxx(ic)-xxx(ib) -+ ydac(ii)=yyy(ic)-yyy(ib) -+ zdac(ii)=zzz(ic)-zzz(ib) -+ -+ xdad(ii)=xxx(id)-xxx(ib) -+ ydad(ii)=yyy(id)-yyy(ib) -+ zdad(ii)=zzz(id)-zzz(ib) -+ -+ else -+ -+ xdac(ii)=xxx(ic)-xxx(ia) -+ ydac(ii)=yyy(ic)-yyy(ia) -+ zdac(ii)=zzz(ic)-zzz(ia) -+ -+ xdad(ii)=xxx(id)-xxx(ia) -+ ydad(ii)=yyy(id)-yyy(ia) -+ zdad(ii)=zzz(id)-zzz(ia) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ call images(imcon,0,1,ii,cell,xdac,ydac,zdac) -+ call images(imcon,0,1,ii,cell,xdad,ydad,zdad) -+ -+c loop over all specified inversions -+ -+ ii=0 -+ do i=inv1,inv2 -+ -+ ii=ii+1 -+ -+c select potential energy function type -+ -+ kk=listinv(ii,1) -+ lcalcite=(keyinv(kk).eq.4) -+ -+c define components of bond vectors -+ -+ xab=xdab(ii) -+ yab=ydab(ii) -+ zab=zdab(ii) -+ rab2=xab*xab+yab*yab+zab*zab -+ rrab=1.d0/sqrt(rab2) -+ -+ xac=xdac(ii) -+ yac=ydac(ii) -+ zac=zdac(ii) -+ rac2=xac*xac+yac*yac+zac*zac -+ rrac=1.d0/sqrt(rac2) -+ -+ xad=xdad(ii) -+ yad=ydad(ii) -+ zad=zdad(ii) -+ rad2=xad*xad+yad*yad+zad*zad -+ rrad=1.d0/sqrt(rad2) -+ -+ if(lcalcite)then -+ -+c calculate vector normal to plane -+ -+ uux=yac*zad-zac*yad -+ uuy=zac*xad-xac*zad -+ uuz=xac*yad-yac*xad -+ uun=1.d0/sqrt(uux**2+uuy**2+uuz**2) -+ uux=uun*uux -+ uuy=uun*uuy -+ uuz=uun*uuz -+ uuu=xab*uux+yab*uuy+zab*uuz -+ -+ else -+ -+c scalar products of bond vectors -+ -+ rbc=xab*xac+yab*yac+zab*zac -+ rcd=xac*xad+yac*yad+zac*zad -+ rdb=xad*xab+yad*yab+zad*zab -+ -+c calculate bond-angle-plane vectors -+ -+ ubx=xac*rrac+xad*rrad -+ uby=yac*rrac+yad*rrad -+ ubz=zac*rrac+zad*rrad -+ ubn=1.d0/sqrt(ubx**2+uby**2+ubz**2) -+ ubx=ubn*ubx -+ uby=ubn*uby -+ ubz=ubn*ubz -+ rub=xab*ubx+yab*uby+zab*ubz -+ -+ vbx=xac*rrac-xad*rrad -+ vby=yac*rrac-yad*rrad -+ vbz=zac*rrac-zad*rrad -+ vbn=1.d0/sqrt(vbx**2+vby**2+vbz**2) -+ vbx=vbn*vbx -+ vby=vbn*vby -+ vbz=vbn*vbz -+ rvb=xab*vbx+yab*vby+zab*vbz -+ wwb=sqrt(rub**2+rvb**2) -+ -+ ucx=xad*rrad+xab*rrab -+ ucy=yad*rrad+yab*rrab -+ ucz=zad*rrad+zab*rrab -+ ucn=1.d0/sqrt(ucx**2+ucy**2+ucz**2) -+ ucx=ucn*ucx -+ ucy=ucn*ucy -+ ucz=ucn*ucz -+ ruc=xac*ucx+yac*ucy+zac*ucz -+ -+ vcx=xad*rrad-xab*rrab -+ vcy=yad*rrad-yab*rrab -+ vcz=zad*rrad-zab*rrab -+ vcn=1.d0/sqrt(vcx**2+vcy**2+vcz**2) -+ vcx=vcn*vcx -+ vcy=vcn*vcy -+ vcz=vcn*vcz -+ rvc=xac*vcx+yac*vcy+zac*vcz -+ wwc=sqrt(ruc**2+rvc**2) -+ -+ udx=xab*rrab+xac*rrac -+ udy=yab*rrab+yac*rrac -+ udz=zab*rrab+zac*rrac -+ udn=1.d0/sqrt(udx**2+udy**2+udz**2) -+ udx=udn*udx -+ udy=udn*udy -+ udz=udn*udz -+ rud=xad*udx+yad*udy+zad*udz -+ -+ vdx=xab*rrab-xac*rrac -+ vdy=yab*rrab-yac*rrac -+ vdz=zab*rrab-zac*rrac -+ vdn=1.d0/sqrt(vdx**2+vdy**2+vdz**2) -+ vdx=vdn*vdx -+ vdy=vdn*vdy -+ vdz=vdn*vdz -+ rvd=xad*vdx+yad*vdy+zad*vdz -+ wwd=sqrt(rud**2+rvd**2) -+ -+c calculate inversion angle cosines -+ -+ cosb=wwb*rrab -+ cosc=wwc*rrac -+ cosd=wwd*rrad -+ -+ endif -+ -+c calculate potential energy and scalar force term -+ -+ if(keyinv(kk).eq.1)then -+ -+c key=1 for harmonic inversion potential -+ -+ thb=acos(cosb) -+ thc=acos(cosc) -+ thd=acos(cosd) -+ omega=0.5d0*prminv(kk,1)*((thb-prminv(kk,2))**2+ -+ x (thc-prminv(kk,2))**2+(thd-prminv(kk,2))**2)/3.d0 -+ gamvir=0.d0 -+ -+ gamb=0.d0 -+ if(abs(thb).gt.1.d-12) -+ x gamb=prminv(kk,1)*(thb-prminv(kk,2))/(3.d0*sin(thb)) -+ gamc=0.d0 -+ if(abs(thc).gt.1.d-12) -+ x gamc=prminv(kk,1)*(thc-prminv(kk,2))/(3.d0*sin(thc)) -+ gamd=0.d0 -+ if(abs(thd).gt.1.d-12) -+ x gamd=prminv(kk,1)*(thd-prminv(kk,2))/(3.d0*sin(thd)) -+ -+ else if(keyinv(kk).eq.2)then -+ -+c key=2 for harmonic cosine inversion potential -+ -+ omega=0.5d0*prminv(kk,1)*((cosb-prminv(kk,2))**2+ -+ x (cosc-prminv(kk,2))**2+(cosb-prminv(kk,2))**2)/3.d0 -+ gamvir=0.d0 -+ -+ gamb=-prminv(kk,1)*(cosb-prminv(kk,2))/3.d0 -+ gamc=-prminv(kk,1)*(cosc-prminv(kk,2))/3.d0 -+ gamd=-prminv(kk,1)*(cosd-prminv(kk,2))/3.d0 -+ -+ else if(keyinv(kk).eq.3)then -+ -+c key=3 for planar inversion potentials -+ -+ omega=prminv(kk,1)*((1.d0-cosb)+(1.d0-cosc)+(1.d0-cosd))/3.d0 -+ gamvir=0.d0 -+ -+ gamb=prminv(kk,1)/3.d0 -+ gamc=prminv(kk,1)/3.d0 -+ gamd=prminv(kk,1)/3.d0 -+ -+ else if(keyinv(kk).eq.4)then -+ -+c key=4 for planar calcite potential -+ -+ uu2=uuu*uuu -+ omega=uu2*(prminv(kk,1)+prminv(kk,2)*uu2) -+ gamvir=uu2*(2.d0*prminv(kk,1)+4.d0*prminv(kk,2)*uu2) -+ gamma=-uuu*(2.d0*prminv(kk,1)+4.d0*prminv(kk,2)*uu2) -+ -+ else -+ -+c undefined potential -+ -+ safe=.false. -+ gamvir=0.d0 -+ gamb=0.d0 -+ gamc=0.d0 -+ gamd=0.d0 -+ -+ endif -+ -+c indices of bonded atoms -+ -+ ia=listinv(ii,2) -+ ib=listinv(ii,3) -+ ic=listinv(ii,4) -+ id=listinv(ii,5) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ kdrive=driven(ltype(ic)) -+ ldrive=driven(ltype(id)) -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. -+ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ -+ x atm_fre(id).eq.0) -+ -+ if(lsolva)then -+ inv_exc(atmolt(ia))=inv_exc(atmolt(ia))+omega -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. -+ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ inv_fre=inv_fre-omega -+ omega=lambda1*omega -+ gamb=lambda1*gamb -+ gamc=lambda1*gamc -+ gamd=lambda1*gamd -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. -+ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ inv_fre=inv_fre+omega -+ omega=lambda2*omega -+ gamb=lambda2*gamb -+ gamc=lambda2*gamc -+ gamd=lambda2*gamd -+ -+ endif -+ -+ endif -+ -+c calculate bond and u,v scalar products -+ -+ if(.not.lcalcite)then -+ -+ rubc=xab*ucx+yab*ucy+zab*ucz -+ rubd=xab*udx+yab*udy+zab*udz -+ rucd=xac*udx+yac*udy+zac*udz -+ rucb=xac*ubx+yac*uby+zac*ubz -+ rudb=xad*ubx+yad*uby+zad*ubz -+ rudc=xad*ucx+yad*ucy+zad*ucz -+ -+ rvbc=xab*vcx+yab*vcy+zab*vcz -+ rvbd=xab*vdx+yab*vdy+zab*vdz -+ rvcd=xac*vdx+yac*vdy+zac*vdz -+ rvcb=xac*vbx+yac*vby+zac*vbz -+ rvdb=xad*vbx+yad*vby+zad*vbz -+ rvdc=xad*vcx+yad*vcy+zad*vcz -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ enginv=enginv+omega -+ virinv=virinv+gamvir -+ -+c calculate solvation energy -+ -+ if(lsolva)then -+ inv_sol(atmolt(ia))=inv_sol(atmolt(ia))+omega -+ endif -+ -+c calculate atomic forces -+ -+ if(lcalcite)then -+ -+ fax=-gamma*uux -+ fay=-gamma*uuy -+ faz=-gamma*uuz -+ -+ fcx=gamma*uun*((yad*zab-zad*yab)-uuu*(yad*uuz-zad*uuy)) -+ fcy=gamma*uun*((zad*xab-xad*zab)-uuu*(zad*uux-xad*uuz)) -+ fcz=gamma*uun*((xad*yab-yad*xab)-uuu*(xad*uuy-yad*uux)) -+ -+ fdx=gamma*uun*((yab*zac-zab*yac)-uuu*(zac*uuy-yac*uuz)) -+ fdy=gamma*uun*((zab*xac-xab*zac)-uuu*(xac*uuz-zac*uux)) -+ fdz=gamma*uun*((xab*yac-yab*xac)-uuu*(yac*uux-xac*uuy)) -+ -+ fbx=-(fax+fcx+fdx) -+ fby=-(fay+fcy+fdy) -+ fbz=-(faz+fcz+fdz) -+ -+c stress tensor calculation for calcite terms -+ -+ strs(1)=strs(1)+uuu*gamma*uux*uux -+ strs(2)=strs(2)+uuu*gamma*uux*uuy -+ strs(3)=strs(3)+uuu*gamma*uux*uuz -+ strs(4)=strs(4)+uuu*gamma*uuy*uuy -+ strs(5)=strs(5)+uuu*gamma*uuy*uuz -+ strs(6)=strs(6)+uuu*gamma*uuz*uuz -+ -+ else -+ -+ fbx=gamb*(-cosb*xab*rrab**2+rrab*(rub*ubx+rvb*vbx)/wwb) -+ x +(ruc*ucn*rrab*(xac-ruc*ucx-(rbc-ruc*rubc)*xab*rrab**2) -+ x -rvc*vcn*rrab*(xac-rvc*vcx-(rbc-rvc*rvbc)*xab*rrab**2)) -+ x *gamc*rrac/wwc -+ x +(rud*udn*rrab*(xad-rud*udx-(rdb-rud*rubd)*xab*rrab**2) -+ x +rvd*vdn*rrab*(xad-rvd*vdx-(rdb-rvd*rvbd)*xab*rrab**2)) -+ x *gamd*rrad/wwd -+ -+ fby=gamb*(-cosb*yab*rrab**2+rrab*(rub*uby+rvb*vby)/wwb) -+ x +(ruc*ucn*rrab*(yac-ruc*ucy-(rbc-ruc*rubc)*yab*rrab**2) -+ x -rvc*vcn*rrab*(yac-rvc*vcy-(rbc-rvc*rvbc)*yab*rrab**2)) -+ x *gamc*rrac/wwc -+ x +(rud*udn*rrab*(yad-rud*udy-(rdb-rud*rubd)*yab*rrab**2) -+ x +rvd*vdn*rrab*(yad-rvd*vdy-(rdb-rvd*rvbd)*yab*rrab**2)) -+ x *gamd*rrad/wwd -+ -+ fbz=gamb*(-cosb*zab*rrab**2+rrab*(rub*ubz+rvb*vbz)/wwb) -+ x +(ruc*ucn*rrab*(zac-ruc*ucz-(rbc-ruc*rubc)*zab*rrab**2) -+ x -rvc*vcn*rrab*(zac-rvc*vcz-(rbc-rvc*rvbc)*zab*rrab**2)) -+ x *gamc*rrac/wwc -+ x +(rud*udn*rrab*(zad-rud*udz-(rdb-rud*rubd)*zab*rrab**2) -+ x +rvd*vdn*rrab*(zad-rvd*vdz-(rdb-rvd*rvbd)*zab*rrab**2)) -+ x *gamd*rrad/wwd -+ -+ fcx=gamc*(-cosc*xac*rrac**2+rrac*(ruc*ucx+rvc*vcx)/wwc) -+ x +(rud*udn*rrac*(xad-rud*udx-(rcd-rud*rucd)*xac*rrac**2) -+ x -rvd*vdn*rrac*(xad-rvd*vdx-(rcd-rvd*rvcd)*xac*rrac**2)) -+ x *gamd*rrad/wwd -+ x +(rub*ubn*rrac*(xab-rub*ubx-(rbc-rub*rucb)*xac*rrac**2) -+ x +rvb*vbn*rrac*(xab-rvb*vbx-(rbc-rvb*rvcb)*xac*rrac**2)) -+ x *gamb*rrab/wwb -+ -+ fcy=gamc*(-cosc*yac*rrac**2+rrac*(ruc*ucy+rvc*vcy)/wwc) -+ x +(rud*udn*rrac*(yad-rud*udy-(rcd-rud*rucd)*yac*rrac**2) -+ x -rvd*vdn*rrac*(yad-rvd*vdy-(rcd-rvd*rvcd)*yac*rrac**2)) -+ x *gamd*rrad/wwd -+ x +(rub*ubn*rrac*(yab-rub*uby-(rbc-rub*rucb)*yac*rrac**2) -+ x +rvb*vbn*rrac*(yab-rvb*vby-(rbc-rvb*rvcb)*yac*rrac**2)) -+ x *gamb*rrab/wwb -+ -+ fcz=gamc*(-cosc*zac*rrac**2+rrac*(ruc*ucz+rvc*vcz)/wwc) -+ x +(rud*udn*rrac*(zad-rud*udz-(rcd-rud*rucd)*zac*rrac**2) -+ x -rvd*vdn*rrac*(zad-rvd*vdz-(rcd-rvd*rvcd)*zac*rrac**2)) -+ x *gamd*rrad/wwd -+ x +(rub*ubn*rrac*(zab-rub*ubz-(rbc-rub*rucb)*zac*rrac**2) -+ x +rvb*vbn*rrac*(zab-rvb*vbz-(rbc-rvb*rvcb)*zac*rrac**2)) -+ x *gamb*rrab/wwb -+ -+ fdx=gamd*(-cosd*xad*rrad**2+rrad*(rud*udx+rvd*vdx)/wwd) -+ x +(rub*ubn*rrad*(xab-rub*ubx-(rdb-rub*rudb)*xad*rrad**2) -+ x -rvb*vbn*rrad*(xab-rvb*vbx-(rdb-rvb*rvdb)*xad*rrad**2)) -+ x *gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(xac-ruc*ucx-(rcd-ruc*rudc)*xad*rrad**2) -+ x +rvc*vcn*rrad*(xac-rvc*vcx-(rcd-rvc*rvdc)*xad*rrad**2)) -+ x *gamc*rrac/wwc -+ -+ fdy=gamd*(-cosd*yad*rrad**2+rrad*(rud*udy+rvd*vdy)/wwd) -+ x +(rub*ubn*rrad*(yab-rub*uby-(rdb-rub*rudb)*yad*rrad**2) -+ x -rvb*vbn*rrad*(yab-rvb*vby-(rdb-rvb*rvdb)*yad*rrad**2)) -+ x *gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(yac-ruc*ucy-(rcd-ruc*rudc)*yad*rrad**2) -+ x +rvc*vcn*rrad*(yac-rvc*vcy-(rcd-rvc*rvdc)*yad*rrad**2)) -+ x *gamc*rrac/wwc -+ -+ fdz=gamd*(-cosd*zad*rrad**2+rrad*(rud*udz+rvd*vdz)/wwd) -+ x +(rub*ubn*rrad*(zab-rub*ubz-(rdb-rub*rudb)*zad*rrad**2) -+ x -rvb*vbn*rrad*(zab-rvb*vbz-(rdb-rvb*rvdb)*zad*rrad**2)) -+ x *gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(zac-ruc*ucz-(rcd-ruc*rudc)*zad*rrad**2) -+ x +rvc*vcn*rrad*(zac-rvc*vcz-(rcd-rvc*rvdc)*zad*rrad**2)) -+ x *gamc*rrac/wwc -+ -+ fax=-(fbx+fcx+fdx) -+ fay=-(fby+fcy+fdy) -+ faz=-(fbz+fcz+fdz) -+ -+c stress tensor calculation for inversion terms -+ -+ strs(1)=strs(1)+xab*fbx+xac*fcx+xad*fdx -+ strs(2)=strs(2)+yab*fbx+yac*fcx+yad*fdx -+ strs(3)=strs(3)+zab*fbx+zac*fcx+zad*fdx -+ strs(4)=strs(4)+yab*fby+yac*fcy+yad*fdy -+ strs(5)=strs(5)+yab*fbz+yac*fcz+yad*fdz -+ strs(6)=strs(6)+zab*fbz+zac*fcz+zad*fdz -+ -+ endif -+ -+ fxx(ia)=fxx(ia)+fax -+ fyy(ia)=fyy(ia)+fay -+ fzz(ia)=fzz(ia)+faz -+ -+ fxx(ib)=fxx(ib)+fbx -+ fyy(ib)=fyy(ib)+fby -+ fzz(ib)=fzz(ib)+fbz -+ -+ fxx(ic)=fxx(ic)+fcx -+ fyy(ic)=fyy(ic)+fcy -+ fzz(ic)=fzz(ic)+fcz -+ -+ fxx(id)=fxx(id)+fdx -+ fyy(id)=fyy(id)+fdy -+ fzz(id)=fzz(id)+fdz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc+gamvir -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fax -+ fyy_loc(ia)=fyy_loc(ia)+fay -+ fzz_loc(ia)=fzz_loc(ia)+faz -+ -+ fxx_loc(ib)=fxx_loc(ib)+fbx -+ fyy_loc(ib)=fyy_loc(ib)+fby -+ fzz_loc(ib)=fzz_loc(ib)+fbz -+ -+ fxx_loc(ic)=fxx_loc(ic)+fcx -+ fyy_loc(ic)=fyy_loc(ic)+fcy -+ fzz_loc(ic)=fzz_loc(ic)+fcz -+ -+ fxx_loc(id)=fxx_loc(id)+fdx -+ fyy_loc(id)=fyy_loc(id)+fdy -+ fzz_loc(id)=fzz_loc(id)+fdz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xab*fbx+xac*fcx+xad*fdx -+ strs_loc(2)=strs_loc(2)+yab*fbx+yac*fcx+yad*fdx -+ strs_loc(3)=strs_loc(3)+zab*fbx+zac*fcx+zad*fdx -+ strs_loc(4)=strs_loc(4)+yab*fby+yac*fcy+yad*fdy -+ strs_loc(5)=strs_loc(5)+yab*fbz+yac*fcz+yad*fdz -+ strs_loc(6)=strs_loc(6)+zab*fbz+zac*fcz+zad*fdz -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,449) -+ -+c sum contributions over all nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=enginv -+ buffer(2)=virinv -+ buffer(3)=inv_fre -+ buffer(4)=inv_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ enginv=buffer(1) -+ virinv=buffer(2) -+ inv_fre=buffer(3) -+ inv_vir=buffer(4) -+ -+ if(lsolva)then -+ -+ call gdsum(inv_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(inv_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ deallocate (xdab,ydab,zdab,stat=fail1) -+ deallocate (xdac,ydac,zdac,stat=fail2) -+ deallocate (xdad,ydad,zdad,stat=fail3) -+ -+ return -+ end subroutine invfrc -+ -+ end module inversion_module -diff -urN dl_class_1.9.orig/srcmod/lf_motion_module.f dl_class_1.9/srcmod/lf_motion_module.f ---- dl_class_1.9.orig/srcmod/lf_motion_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/lf_motion_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,2994 @@ -+ module lf_motion_module -+ -+c*********************************************************************** -+c -+c dl_poly module for verlet leap frog integration schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use property_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ contains -+ -+ subroutine rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,stresh) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for applying bond constraint corrections after -+c atomic integration. -+c Must be used in conjunction with integration algorithms -+c -+c assume bond vectors dxx,dyy,dzz are input -+c dxx =xxx(i) - xxx(j) etc -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith august 1992. -+c amended - t. forester march 1994. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,icyc,i,j,k -+ real(8) tolnce,tstep,vircon,stresh,dxx,dyy,dzz,strs1,strs2 -+ real(8) strs3,strs5,strs6,strs9,tstep2,esig,esig1 -+ real(8) dis,amti,amtj,omega2,gamma,gammi,gammj,dli,dlj -+ real(8) dxt,dyt,dzt,txx,tyy,tzz,xxt,yyt,zzt -+ -+ dimension stresh(9) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ -+c test size of work arrays -+ -+ safe=.true. -+ if(mxxdf.lt.nscons)safe=.false. -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,412) -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c accumulators for stress tensor -+ -+ vircon=0.d0 -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ safe=.false. -+ -+ do while(.not.safe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate temporary bond vector -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c calculate maximum error in bondlength -+ -+ esig=0.d0 -+ -+ do k=1,nscons -+ -+c set bond parameter -+ -+ dis=prmcon(listcon(k,1)) -+ esig1=abs(dxt(k)**2+dyt(k)**2+dzt(k)**2-dis**2)/dis -+ esig=max(esig,esig1) -+ -+ enddo -+ -+ esig=esig*0.5d0 -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+c bypass calculations if all tolerances satisfied -+ -+ if(.not.safe)then -+ -+c initialise increment arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint forces -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c set constraint parameters -+ -+ dis=prmcon(listcon(k,1)) -+ omega2=dis*dis -+ amti= tstep2/weight(i) -+ amtj=-tstep2/weight(j) -+ -+ if(lstfrz(i).ne.0) amti=0.d0 -+ if(lstfrz(j).ne.0) amtj=0.d0 -+ -+c constraint force parameter -+ -+ gamma=(omega2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/ -+ x (-2.d0*(amti-amtj)* -+ x (dxx(k)*dxt(k)+dyy(k)*dyt(k)+dzz(k)*dzt(k))) -+ -+c accumulate bond virial -+ -+ vircon=vircon+gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ -+ strs1=strs1-gamma*dxx(k)*dxx(k) -+ strs2=strs2-gamma*dxx(k)*dyy(k) -+ strs3=strs3-gamma*dxx(k)*dzz(k) -+ strs5=strs5-gamma*dyy(k)*dyy(k) -+ strs6=strs6-gamma*dyy(k)*dzz(k) -+ strs9=strs9-gamma*dzz(k)*dzz(k) -+ -+c improve approximate atomic positions -+ -+ gammi=-gamma*amti -+ xxt(i)=xxt(i)+dxx(k)*gammi -+ yyt(i)=yyt(i)+dyy(k)*gammi -+ zzt(i)=zzt(i)+dzz(k)*gammi -+ -+ gammj=-gamma*amtj -+ xxt(j)=xxt(j)+dxx(k)*gammj -+ yyt(j)=yyt(j)+dyy(k)*gammj -+ zzt(j)=zzt(j)+dzz(k)*gammj -+ -+ enddo -+ -+c transport temporary positions to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov) call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ dlj=1.d0/dble(listme(j)) -+ -+ xxx(i)=xxx(i)+xxt(i)*dli -+ yyy(i)=yyy(i)+yyt(i)*dli -+ zzz(i)=zzz(i)+zzt(i)*dli -+ xxx(j)=xxx(j)+xxt(j)*dlj -+ yyy(j)=yyy(j)+yyt(j)*dlj -+ zzz(j)=zzz(j)+zzt(j)*dlj -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c error exit for non-convergence -+ -+ if(.not.safe)return -+ -+c complete stress tensor -+ -+ stresh(1)=strs1 -+ stresh(2)=strs2 -+ stresh(3)=strs3 -+ stresh(4)=strs2 -+ stresh(5)=strs5 -+ stresh(6)=strs6 -+ stresh(7)=strs3 -+ stresh(8)=strs6 -+ stresh(9)=strs9 -+ -+c splice coordinate arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(stresh,9,buffer) -+ call splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ return -+ end subroutine rdshake_1 -+ -+ subroutine nve_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,tolnce,tstep,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics. Verlet leapfrog With RD-SHAKE -+c -+c parallel replicated data version : block data -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith august 1992. -+c amended - t.forester sept 1994 -+c amended - t.forester dec 1994 : block data -+c amended - w.smith oct 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,iatm0 -+ integer iatm1,i,j,k -+ real(8) engke,tolnce,tstep,vircon,strkin,rstep -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),fail(7) -+ -+c allocate working arrays -+ -+ do i=1,7 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(7)) -+ do i=1,7 -+ if(fail(i).ne.0)call error(idnode,1380) -+ enddo -+ -+ safe=.false. -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c move atoms by leapfrog algorithm -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c update velocities -+ -+ uxx(i)=vxx(i)+tstep*rmass(i)*fxx(i) -+ uyy(i)=vyy(i)+tstep*rmass(i)*fyy(i) -+ uzz(i)=vzz(i)+tstep*rmass(i)*fzz(i) -+ -+c update positions -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+c calculate velocity correction -+ -+ j=0 -+ rstep=1.d0/tstep -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=(xxx(i)-xxo(j))*rstep -+ uyy(i)=(yyy(i)-yyo(j))*rstep -+ uzz(i)=(zzz(i)-zzo(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=(uxx(i)-vxo(j))*weight(i)*rstep -+ fyy(i)=(uyy(i)-vyo(j))*weight(i)*rstep -+ fzz(i)=(uzz(i)-vzo(j))*weight(i)*rstep -+ -+ enddo -+ -+ endif -+ -+c calculate full timestep velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=0.5d0*(vxx(i)+uxx(i)) -+ vyy(i)=0.5d0*(vyy(i)+uyy(i)) -+ vzz(i)=0.5d0*(vzz(i)+uzz(i)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nve_1 -+ -+ subroutine nvt_e1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,tolnce,tstep,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Evans -+c thermostat. -+c Comp. Phys. reports 1, 299, (1984) -+c -+c parallel replicated data version : block data -+c -+c for systems using bond CONSTRAINTS. -+c -+c copyright - daresbury laboratory -+c author - t forester july 1993 -+c amended - w.smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,iatm0 -+ integer iatm1,i,j,k,iter,mxiter -+ real(8) engke,tolnce,tstep,vircon,strkin -+ real(8) rstep,chit,viracc,strcon,vdotf -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),strcon(9),fail(7) -+ -+c allocate working arrays -+ -+ do i=1,7 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(7)) -+ do i=1,7 -+ if(fail(i).ne.0)call error(idnode,1390) -+ enddo -+ -+ safe=.false. -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial positions and velocities -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c begin temperature control iteration -+ -+ mxiter=3 -+ if(ntcons.eq.0)mxiter=2 -+ chit=0.d0 -+ -+ do iter=1,mxiter -+ -+c move atoms by leapfrog algorithm -+ -+ j=0 -+ -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c update velocities -+ -+ uxx(i)=vxo(j)+tstep*(rmass(i)*fxx(i)-chit*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(rmass(i)*fyy(i)-chit*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(rmass(i)*fzz(i)-chit*vzz(i)) -+ -+c update positions -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c merge configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=(xxx(i)-xxo(j))*rstep -+ uyy(i)=(yyy(i)-yyo(j))*rstep -+ uzz(i)=(zzz(i)-zzo(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=(uxx(i)-vxo(j))*weight(i)*rstep -+ fyy(i)=(uyy(i)-vyo(j))*weight(i)*rstep -+ fzz(i)=(uzz(i)-vzo(j))*weight(i)*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy and evans thermostat parameter -+ -+ engke=0.d0 -+ vdotf=0.d0 -+ do i=iatm0,iatm1 -+ -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ buffer(2)=vdotf -+ call gdsum(buffer(1),2,buffer(3)) -+ engke=buffer(1) -+ vdotf=buffer(2) -+ -+ endif -+ chit=vdotf/engke -+ engke=0.5d0*engke -+ -+c end of thermal constraint iteration -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nvt_e1 -+ -+ subroutine nvt_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,taut,sigma,tolnce,tstep,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat. -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester may 1993 -+c amended : t.forester sept 1994 -+c amended : t.forester dec 1994 : block data -+c amended - w.smith oct 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail -+ integer iatm0,iatm1,i,j,k,maxit,iter -+ real(8) engke,taut,sigma,tolnce,tstep,vircon,strkin,viracc -+ real(8) rstep,rtsq,chit0,strcon -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),fail(8),strcon(9) -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1400) -+ enddo -+ -+ safe=.false. -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c estimate kinetic energy at full timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=3 -+ if(ntcons.eq.0) maxit=maxit-1 -+ do iter=1,maxit -+ -+c temperature scaling coefficient - taut is the decay constant -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+c unconstrained new positions with thermostat -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+c store uncorrected positions -+ -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0.and.iter.eq.1)then -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c calculate kinetic energy -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c estimate velocity at the full step -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nvt_b1 -+ -+ subroutine nvt_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat. -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c copyright - daresbury laboratory -+c author - t. forester may 1993 -+c amended - w.smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,i,j,k -+ integer iatm0,iatm1,maxit,iter -+ real(8) chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon -+ real(8) strkin,rstep,rtsq,qmass,chitp,chit0,viracc -+ real(8) chitnew,strcon -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),fail(8),strcon(9) -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1410) -+ enddo -+ -+ safe=.false. -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c estimate velocities at full time step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy at full time step -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c propagate chit -+ -+ chitp=2.d0*(engke-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=4 -+ if(ntcons.eq.0) maxit=maxit-1 -+ -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-chit0*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-chit0*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-chit0*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+c store uncorrected positions -+ -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0.and.iter.eq.1)then -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c improved prediction of chit -+ -+ chitp=2.d0*(engke-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c update thermostat -+ -+ chit=chitnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*qmass/taut**2 -+ consv=conint+0.5d0*qmass*chit0**2 -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nvt_h1 -+ -+ subroutine npt_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, -+ x tstep,virtot,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat and isotropic pressure control -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version -+c -+c for systems using bond CONSTRAINTS. Frozen atoms feb 1994 -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester dec 1993 -+c amended - w.smith oct 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons -+ integer fail,i,j,k,iatm0,iatm1,maxit,iter -+ real(8) elrc,engke,virlrc,press,taup,taut,sigma,tolnce,tstep -+ real(8) virtot,vircon,volm,strkin,beta,volm0,cell0 -+ real(8) elrc0,virlrc0,rstep,rtsq,psyst,chip0,scale -+ real(8) chit0,viracc,strcon -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),cell0(9),fail(8),strcon(9) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0 -+ -+ data newjob/.true./ -+ data beta/7.3728d-3/ -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1420) -+ enddo -+ -+ safe=.false. -+ -+c store initial values of volume and long range corrections -+ -+ if(newjob)then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1430) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise constraint virial terms -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial cell vectors -+ -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c estimate velocity at full timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy at current timestep -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c pressure control variable - taup is pressure relaxation time -+ -+ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ -+c temperature scaling coefficient - taut is temperature relaxation time -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=5 -+ if(ntcons.eq.0)maxit=maxit-1 -+ -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+scale*xxo(j) -+ yyy(i)=tstep*uyy(i)+scale*yyo(j) -+ zzz(i)=tstep*uzz(i)+scale*zzo(j) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c store integrated positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c estimate new cell tensor -+ -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c improved prediction of chip and chit -+ -+ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c update volume -+ -+ volm=volm*chip0 -+ -+c scale cell vectors - isotropic -+ -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c construct scaling tensor (for use with tethers) -+ -+ do i=2,8 -+ eta(i)=0.d0 -+ enddo -+ eta(1)=scale -+ eta(5)=scale -+ eta(9)=scale -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine npt_b1 -+ -+ subroutine npt_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,chip,chit,conint,consv,elrc,engke,virlrc,press, -+ x taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat+piston. -+c -+c reference: Melchionna, Ciccotti and Holian, -+c Mol Phys 1993, 78, p533 -+c -+c parallel replicated data version -+c -+c for systems using bond constraints (using atomic pressure) -+c -+c copyright daresbury laboratory 1995 -+c author - s. melchionna april 1995 -+c and - t. forester april 1995 -+c amended - w. smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons -+ integer i,j,k,iatm0,iatm1,fail,maxit,iter -+ real(8) chip,chit,conint,consv,elrc,engke,virlrc,press -+ real(8) taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm -+ real(8) strcon,volm0,elrc0,virlrc0,rstep,rtsq,qmass -+ real(8) chipnew,chitp,chitnew,chit0,volnew,scale,viracc,vold -+ real(8) cons1,cons2,cons3,strkin,cell0 -+ real(8) pmass,totmas,chipp,chip0,com,vom -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strcon(9),fail(8),strkin(9),com(3),vom(3),cell0(9) -+ -+ save newjob,volm0,elrc0,virlrc0,cell0,dens0 -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1440) -+ enddo -+ -+ safe=.false. -+ -+c store initial values of volume, long range corrections etc -+ -+ if(newjob)then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1450) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c estimate kinetic energy at current timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c estimate velocity at the full step -+ -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c propagate chip -+ -+ chipp=(2.d0*engke-virtot-vircon-3.d0*press*volm)/pmass- -+ x chit*chip -+ chipnew=chip+tstep*chipp -+ chip0=0.5d0*(chip+chipnew) -+ -+c propagate chit -+ -+ chitp=(2.d0*(engke-sigma)+pmass*chip**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=5 -+ if(ntcons.eq.0) maxit=maxit-1 -+ -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*(uxx(i)+ -+ x chipnew*((xxx(i)+xxo(j))*0.5d0-com(1))) -+ yyy(i)=yyo(j)+tstep*(uyy(i)+ -+ x chipnew*((yyy(i)+yyo(j))*0.5d0-com(2))) -+ zzz(i)=zzo(j)+tstep*(uzz(i)+ -+ x chipnew*((zzz(i)+zzo(j))*0.5d0-com(3))) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c store integrated positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c estimate new cell tensor -+ -+ volnew=volm*exp(3.d0*tstep*chipnew) -+ scale=(volnew/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c improved prediction of chip and chit -+ -+ chipp=(2.d0*engke-virtot-vircon-3.d0*press*volm)/pmass- -+ x chit0*chip0 -+ chipnew=chip+tstep*chipp -+ chip0=0.5d0*(chip+chipnew) -+ -+ chitp=(2.d0*(engke-sigma)+pmass*chip0**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c update volume -+ -+ vold=volm -+ volm=volm*exp(3.d0*tstep*chipnew) -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=2,8 -+ eta(i)=0.d0 -+ enddo -+ eta(1)=chipnew -+ eta(5)=chipnew -+ eta(9)=chipnew -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ chip=chipnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) -+ cons1=0.5d0*qmass*chit0**2 -+ cons2=press*vold -+ cons3=0.5d0*pmass*chip0**2 -+ consv=conint+cons1+cons2+cons3 -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine npt_h1 -+ -+ subroutine nst_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,mode,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, -+ x tstep,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat and anisotropic pressure control -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version -+c -+c for systems using bond CONSTRAINTS. Frozen atoms feb 1994 -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester december 1993 -+c amended - w. smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons,mode -+ integer fail,i,j,k,iatm0,iatm1,maxit,iter -+ real(8) elrc,engke,virlrc,press,taup,taut,sigma,tolnce,tstep -+ real(8) vircon,volm,beta,volm0,elrc0,virlrc0,rstep,rtsq,chit0 -+ real(8) viracc,strkin,strcon,cell0,stres0,uni -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),strcon(9),cell0(9),fail(8),stres0(9),uni(9) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data beta/7.3728d-3/ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1460) -+ enddo -+ -+ safe=.false. -+ -+c store initial values of volume, long range corrections etc -+ -+ if(newjob)then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1470) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store original cell vectors and stress tensor -+ -+ do i=1,9 -+ -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c estimate kinetic energy at current timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c current estimate of stres tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i) -+ enddo -+ -+c initial estimate of eta matrix and chit -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=5 -+ if(ntcons.eq.0)maxit=maxit-1 -+ -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+ -+ x eta(1)*xxo(j)+eta(4)*yyo(j)+eta(7)*zzo(j) -+ yyy(i)=tstep*uyy(i)+ -+ x eta(2)*xxo(j)+eta(5)*yyo(j)+eta(8)*zzo(j) -+ zzz(i)=tstep*uzz(i)+ -+ x eta(3)*xxo(j)+eta(6)*yyo(j)+eta(9)*zzo(j) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c store integrated positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c estimate new cell parameters -+ -+ call mat_mul(eta,cell0,cell) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strcns(i)+strkin(i) -+ enddo -+ -+c improved calculation of eta matrix and chit -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c end of thermostat and barostat iterations -+ -+ enddo -+ -+c update volume -+ -+ volm=volm*eta(1)*eta(5)*eta(9) -+ -+c adjust cell vectors - anisotropic -+ -+ call mat_mul(eta,cell0,cell) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c restore half step velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nst_b1 -+ -+ subroutine nst_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,mode,chit,conint,consv,elrc,engke,virlrc,press, -+ x taup,taut,sigma,temp,tolnce,tstep,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat+piston. -+c -+c Parrinello - Rahman type : changing cell shape. -+c -+c reference: Melchionna, Ciccotti and Holian, -+c Mol Phys 1993, 78, p533 -+c -+c parallel replicated data version -+c -+c for systems using bond constraints (using atomic pressure) -+c -+c copyright daresbury laboratory 1995 -+c author - t. forester june 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons -+ integer fail,i,j,k,iatm0,iatm1,maxit,iter,mode -+ real(8) chip,chit,conint,consv,elrc,engke,virlrc,press -+ real(8) taup,taut,sigma,temp,tolnce,tstep,vircon,volm -+ real(8) strcon,strkin,etanew,eta0,cell0,volm0,elrc0,virlrc0 -+ real(8) rstep,rtsq,pmass,qmass,totmas,com,vom,uni,fac -+ real(8) chitp,chitnew,chit0,xxa,yya,zza,etadot -+ real(8) viracc,cons1,cons2,cons3,vold,stres0 -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),strcon(9),fail(8),com(3),vom(3) -+ dimension etanew(9),eta0(9),cell0(9),stres0(9),uni(9) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0 -+ -+ data newjob/.true./,uni/1.d0,3*0.d0,1.d0,3*0.d0,1.d0/ -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1480) -+ enddo -+ -+ safe=.false. -+ -+c store initial values of volume, long range corrections etc -+ -+ if(newjob)then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1490) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store original cell vectors and stress tensor -+ -+ do i=1,9 -+ -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c estimate kinetic energy at current timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c estimate position at current time step -+ -+ xxx(i)=xxo(j)+tstep*(vxo(j)+tstep*rmass(i)*fxx(i)) -+ yyy(i)=yyo(j)+tstep*(vyo(j)+tstep*rmass(i)*fyy(i)) -+ zzz(i)=zzo(j)+tstep*(vzo(j)+tstep*rmass(i)*fzz(i)) -+ -+c estimate velocity at the full step -+ -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c initial estimate of stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i) -+ enddo -+ -+c propagation of eta -+ -+ fac=9.d0 -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ fac=5.d0 -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ fac=3.d0 -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ fac=2.d0 -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=0.5d0*(etanew(i)+eta(i)) -+ enddo -+ -+c propagate chit -+ -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ chitp=(2.d0*(engke-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=5 -+ if(ntcons.eq.0) maxit=maxit-1 -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(eta0(1)+chit0)*vxx(i)- -+ x eta0(4)*vyy(i)-eta0(7)*vzz(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(eta0(5)+chit0)*vyy(i)- -+ x eta0(2)*vxx(i)-eta0(8)*vzz(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(eta0(9)+chit0)*vzz(i)- -+ x eta0(3)*vxx(i)-eta0(6)*vyy(i)) -+ -+c advance positions using leapfrog -+ -+ xxa=(xxx(i)+xxo(j))*0.5d0-com(1) -+ yya=(yyy(i)+yyo(j))*0.5d0-com(2) -+ zza=(zzz(i)+zzo(j))*0.5d0-com(3) -+ -+ xxx(i)=xxo(j)+tstep*(uxx(i)+ -+ x etanew(1)*xxa+etanew(4)*yya+etanew(7)*zza) -+ yyy(i)=yyo(j)+tstep*(uyy(i)+ -+ x etanew(2)*xxa+etanew(5)*yya+etanew(8)*zza) -+ zzz(i)=zzo(j)+tstep*(uzz(i)+ -+ x etanew(3)*xxa+etanew(6)*yya+etanew(9)*zza) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c store integrated positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c estimate new cell parameters -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ call cell_propagate(tstep,cell,etanew) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strcns(i)+strkin(i) -+ enddo -+ -+c improved prediction of eta -+ -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit0*eta0(i)) -+ enddo -+ if(mode.gt.0)then -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=0.5d0*(etanew(i)+eta(i)) -+ enddo -+ -+c improved prediction of chit -+ -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ chitp=(2.d0*(engke-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ do i=1,9 -+ eta(i)=etanew(i) -+ enddo -+ -+c update volume -+ -+ chip=eta(1)+eta(5)+eta(9) -+ vold=volm -+ volm=volm*exp(tstep*chip) -+ -+c adjust cell vectors - anisotropic -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ call cell_propagate(tstep,cell,eta) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c conserved quantity less kinetic and potential energy -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) -+ cons1=0.5d0*qmass*chit0**2 -+ cons2=press*vold -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ cons3=0.5d0*pmass*etadot -+ consv=conint+cons1+cons2+cons3 -+ -+c restore half step velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nst_h1 -+ -+ end module lf_motion_module -diff -urN dl_class_1.9.orig/srcmod/lf_rotation1_module.f dl_class_1.9/srcmod/lf_rotation1_module.f ---- dl_class_1.9.orig/srcmod/lf_rotation1_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/lf_rotation1_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,5315 @@ -+ module lf_rotation1_module -+ -+c*********************************************************************** -+c -+c dl_poly module 1 for verlet leap frog rotational integration -+c schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use lf_motion_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ contains -+ -+ subroutine update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c*********************************************************************** -+c -+c dlpoly routine to update the quaternion arrays as part of -+c the leapfrog algorithm -+c -+c copyright daresbury laboratory -+c author - w.smith october 2005 -+c based on - t.forester oct. 1993 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safeq -+ integer igrp1,igrp2,jg,itq,ig -+ real(8) qn0,qn1,qn2,qn3,qn0a,qn1a,qn2a,qn3a,qn0b,qn1b,qn2b,qn3b -+ real(8) rnorm,tstep,quattol,eps -+ real(8) opx(msgrp),opy(msgrp),opz(msgrp) -+ real(8) oqx(msgrp),oqy(msgrp),oqz(msgrp) -+ -+ jg=0 -+ safeq=.true. -+ -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c first iteration of new quaternions (lab fixed) -+ -+ qn0=q0(ig)+(-q1(ig)*opx(jg)-q2(ig)*opy(jg)-q3(ig)*opz(jg)) -+ x *tstep*pt5 -+ qn1=q1(ig)+( q0(ig)*opx(jg)-q3(ig)*opy(jg)+q2(ig)*opz(jg)) -+ x *tstep*pt5 -+ qn2=q2(ig)+( q3(ig)*opx(jg)+q0(ig)*opy(jg)-q1(ig)*opz(jg)) -+ x *tstep*pt5 -+ qn3=q3(ig)+(-q2(ig)*opx(jg)+q1(ig)*opy(jg)+q0(ig)*opz(jg)) -+ x *tstep*pt5 -+ -+ qn0b=0.d0 -+ qn1b=0.d0 -+ qn2b=0.d0 -+ qn3b=0.d0 -+ -+ itq=0 -+ eps=1.0d9 -+ do while((itq.lt.mxquat).and.(eps.gt.quattol)) -+ -+ itq=itq+1 -+ -+ qn0a=pt5*(-q1(ig)*opx(jg)-q2(ig)*opy(jg)-q3(ig)*opz(jg)) -+ x +pt5*(-qn1*oqx(jg)-qn2*oqy(jg)-qn3*oqz(jg)) -+ qn1a=pt5*( q0(ig)*opx(jg)-q3(ig)*opy(jg)+q2(ig)*opz(jg)) -+ x + pt5*( qn0*oqx(jg)-qn3*oqy(jg)+qn2*oqz(jg)) -+ qn2a=pt5*( q3(ig)*opx(jg)+q0(ig)*opy(jg)-q1(ig)*opz(jg)) -+ x + pt5*( qn3*oqx(jg)+qn0*oqy(jg)-qn1*oqz(jg)) -+ qn3a=pt5*(-q2(ig)*opx(jg)+q1(ig)*opy(jg)+q0(ig)*opz(jg)) -+ x + pt5*(-qn2*oqx(jg)+qn1*oqy(jg)+qn0*oqz(jg)) -+ -+ qn0=q0(ig)+pt5*qn0a*tstep -+ qn1=q1(ig)+pt5*qn1a*tstep -+ qn2=q2(ig)+pt5*qn2a*tstep -+ qn3=q3(ig)+pt5*qn3a*tstep -+ -+ rnorm=1.d0/sqrt(qn0**2+qn1**2+qn2**2+qn3**2) -+ qn0=qn0*rnorm -+ qn1=qn1*rnorm -+ qn2=qn2*rnorm -+ qn3=qn3*rnorm -+ -+c convergence test -+ -+ eps=sqrt(((qn0a-qn0b)**2+(qn1a-qn1b)**2+(qn2a-qn2b)**2 -+ x +(qn3a-qn3b)**2)*tstep**2) -+ -+ qn0b=qn0a -+ qn1b=qn1a -+ qn2b=qn2a -+ qn3b=qn3a -+ -+ enddo -+ -+ if(itq.ge.mxquat) safeq=.false. -+ -+c store new quaternions -+ -+ q0(ig)=qn0 -+ q1(ig)=qn1 -+ q2(ig)=qn2 -+ q3(ig)=qn3 -+ -+ enddo -+ -+ return -+ end subroutine update_quaternions -+ -+ subroutine nveq_1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame -+c omx,omy,omz = angular velocity in body fixed frame (principal axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newjob -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer fail,i,igrp,igrp1,igrp2,idum,ifre1,ifre2,j,ifre -+ integer jg,ig,k,id,jr -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) strkin,rot,rstep,rtsq,engtrn,vaa,vbb,vcc -+ real(8) trx,try,trz,delx,dely,delz,engfke -+ real(8) strgrp,tqx,tqy,tqz,fmx,fmy,fmz -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension strkin(9),strgrp(9),rot(9),fail(nnn) -+ -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(12)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1500) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(i)=vxo(j)+tstep*rmass(i)*fxx(i) -+ uyy(i)=vyo(j)+tstep*rmass(i)*fyy(i) -+ uzz(i)=vzo(j)+tstep*rmass(i)*fzz(i) -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+c calculate force and velocity corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational rigid body motion -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) -+ uyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) -+ uzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcmx(ig)+tstep*uxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*uyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*uzz(ig) -+ -+c estimate velocity at full time step -+ -+ gvxx(ig)=0.5d0*(gvxx(ig)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyy(ig)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzz(ig)+uzz(ig)) -+ -+ enddo -+ -+c calculate rigid body translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c total translational kinetic energy -+ -+ engke=engtrn+engfke -+ -+c calculate rigid body kinetic stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore rigid body half timestep velocity -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx=0.d0 -+ tqy=0.d0 -+ tqz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx=tqx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy=tqy+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz=tqz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c store current angular velocity -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx*rot(1)+tqy*rot(4)+tqz*rot(7))*rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) -+ try=(tqx*rot(2)+tqy*rot(5)+tqz*rot(8))*rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) -+ trz=(tqx*rot(3)+tqy*rot(6)+tqz*rot(9))*rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+delx*pt5 -+ opy(jg)=omy(ig)+dely*pt5 -+ opz(jg)=omz(ig)+delz*pt5 -+ -+ enddo -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omx(ig)+delx -+ uyy(ig)=omy(ig)+dely -+ uzz(ig)=omz(ig)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omx(ig)+delx*1.5d0 -+ oqy(jg)=omy(ig)+dely*1.5d0 -+ oqz(jg)=omz(ig)+delz*1.5d0 -+ -+c angular velocity at timestep n -+ -+ omx(ig)=omx(ig)+pt5*delx -+ omy(ig)=omy(ig)+pt5*dely -+ omz(ig)=omz(ig)+pt5*delz -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies - relative to c.o.m -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate(opx,opy,opz,xxt,yyt,zzt,stat=fail(1)) -+ deallocate(oqx,oqy,oqz,dtx,dty,dtz,stat=fail(2)) -+ deallocate(dxx,dyy,dzz,uxx,uyy,uzz,stat=fail(3)) -+ deallocate(txx,tyy,tzz,dxt,dyt,dzt,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,xx1,yy1,zz1,stat=fail(5)) -+ deallocate(vxo,vyo,vzo,gcxo,gcyo,gczo,stat=fail(6)) -+ -+ return -+ end subroutine nveq_1 -+ -+ subroutine nvtq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, -+ x tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat. -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame -+c omx,omy,omz = angular velocity in body fixed frame (principle axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,safeq,newjob -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer i,fail,igrp,igrp1,igrp2,ifre,ifre1,ifre2,jg,ig -+ integer j,k,jr,id,mxiter,iter,idum -+ real(8) engke,engrot,quattol,sigma,taut,tolnce,tstep,vircom -+ real(8) vircon,strkin,strgrp,rot,rstep,rtsq -+ real(8) engtrn,trx,try,trz,chit0,rgmas,engfke -+ real(8) vaa,vbb,vcc,engtot,viracc,strcon -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+ dimension strkin(9),strgrp(9),strcon(9),rot(9),fail(nnn) -+ -+ save igrp1,igrp2,ifre1,ifre2,newjob -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1510) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c initialise constraint virial terms -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacements -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c estimate velocity and temperature at half-time step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate kinetic energy of rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translation kinetic energy of rigid bodies -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rigid body rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c temperature scaling coefficient - taut is the relaxation time -+ -+ engtot=engfke+engrot+engtrn -+ chit0= sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=2 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+xxo(j) -+ yyy(i)=tstep*vyy(i)+yyo(j) -+ zzz(i)=tstep*uzz(i)+zzo(j) -+ -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0.and.iter.eq.1) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate force and velocity corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ if(iter.eq.mxiter)call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ********: rigid body motion - thermostated :************ -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 -+ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 -+ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 -+ -+c update positions -+ -+ gcmx(ig)=gcxo(jg)+tstep*uxx(ig) -+ gcmy(ig)=gcyo(jg)+tstep*uyy(ig) -+ gcmz(ig)=gczo(jg)+tstep*uzz(ig) -+ -+c calculate full step velocities -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 -+ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 -+ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 -+ uyy(ig)=(omyo(jg)+tstep*try)*chit0 -+ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 -+ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 -+ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 -+ -+ enddo -+ -+c calculate rigid body rotational energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c total translational kinetic energy -+ -+ engke=engtrn+engfke -+ -+c total kinetic energy -+ -+ engtot=engke+engrot -+ -+c improved prediction of chit -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c end of thermostat/barostat iterations -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nvtq_b1 -+ -+ subroutine nvtq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,chit,consv,conint,engke,engrot,quattol, -+ x sigma,taut,tolnce,tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat. -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame -+c omx,omy,omz = angular velocity in body fixed frame (principle axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,safeq,newjob -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer fail,i,idum,igrp,igrp1,igrp2,ifre,ifre1,ifre2 -+ integer j,k,ig,jg,jr,id,iter,mxiter -+ real(8) chit,consv,conint,engke,engrot,quattol,sigma,taut -+ real(8) tolnce,tstep,vircom,vircon,strkin,strgrp,strcon,rot -+ real(8) rstep,rtsq,qmass,engtrn,cons1,engtot,vaa,vbb,vcc -+ real(8) chit0,chitnew,chitp,viracc,rgmas,trx,try,trz,delx -+ real(8) dely,delz,engfke -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension strkin(9),strgrp(9),strcon(9),rot(9),fail(nnn) -+ -+ save igrp1,igrp2,ifre1,ifre2,qmass,newjob -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1520) -+ enddo -+ -+ if(newjob)then -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c initialise constraint virial terms -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacements -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c estimate velocity and temperature at half-time step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate kinetic energy of rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translation kinetic energy of rigid bodies -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rigid body rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c propagate chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chitp=2.d0*(engtot-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=4 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-chit0*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-chit0*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-chit0*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0.and.iter.eq.1) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate force and velocity corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+ if(iter.eq.mxiter)then -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+ endif -+ -+c ********: rigid body motion - thermostated :************ -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas-chit0*gvxx(ig)) -+ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas-chit0*gvyy(ig)) -+ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas-chit0*gvzz(ig)) -+ -+c update positions -+ -+ gcmx(ig)=gcxo(jg)+tstep*uxx(ig) -+ gcmy(ig)=gcyo(jg)+tstep*uyy(ig) -+ gcmz(ig)=gczo(jg)+tstep*uzz(ig) -+ -+c calculate full step velocities -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ if(iter.eq.mxiter)then -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+ endif -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ safeq=.true. -+ engrot=0.d0 -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omxo(jg)+delx -+ uyy(ig)=omyo(jg)+dely -+ uzz(ig)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c calculate rigid body rotational energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c improved prediction of chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chitp=2.d0*(engtot-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update thermostat variable -+ -+ chit=chitnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*qmass/taut**2 -+ cons1=0.5d0*qmass*chit0**2 -+ consv=conint+cons1 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nvtq_h1 -+ -+ subroutine nptq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,virtot,vircom, -+ x vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat and barostat. -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principl axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob,safeq -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ntpatm,i,fail,igrp,igrp1,igrp2,idum,ifre,ifre1 -+ integer ifre2,j,jg,ig,jr,k,id,iter,mxiter -+ real(8) elrc,engke,engrot,virlrc,press,quattol,sigma,taup,taut -+ real(8) tolnce,tstep,virtot,vircom,vircon,volm,rot,engfke,uni -+ real(8) cell0,beta,volm0,elrc0,virlrc0,rstep,rtsq -+ real(8) engtrn,trx,try,trz,chip0,scale,engtot,chit0,viracc,czero -+ real(8) rgmas,vaa,vbb,vcc,strkin,strcon,strgrp,psyst -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension fail(nnn),rot(9),cell0(9),czero(9),uni(9) -+ dimension strcon(9),strgrp(9),strkin(9) -+ -+ save newjob,volm0,elrc0,virlrc0,cell0,dens0,igrp1,igrp2 -+ save ifre1,ifre2 -+ -+ data newjob/.true./,beta/7.3728d-3/ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1530) -+ enddo -+ -+ if(newjob) then -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1540) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c constraint stress tensor accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c current cell vectors -+ -+ do i=1,9 -+ czero(i)=cell(i) -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacements -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c estimate velocity and temperature at half-time step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate kinetic energy of rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translation kinetic energy of rigid bodies -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rigid body rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c pressure control variable - taup is the relaxation time -+ -+ engke=engfke+engtrn -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ -+c temperature scaling coefficient - taut is the relaxation time -+ -+ engtot=engke+engrot -+ chit0= sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=5 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+scale*xxo(j) -+ yyy(i)=tstep*uyy(i)+scale*yyo(j) -+ zzz(i)=tstep*uzz(i)+scale*zzo(j) -+ -+ enddo -+ -+c estimate new cell tensor -+ -+ do i=1,9 -+ cell(i)=scale*czero(i) -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate force correction -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ if(iter.eq.mxiter)call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ********: rigid body motion - thermostated :************ -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 -+ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 -+ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 -+ -+c update positions : -+ -+ gcmx(ig)=scale*gcxo(jg)+tstep*uxx(ig) -+ gcmy(ig)=scale*gcyo(jg)+tstep*uyy(ig) -+ gcmz(ig)=scale*gczo(jg)+tstep*uzz(ig) -+ -+c calculate full step velocities -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 -+ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 -+ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 -+ uyy(ig)=(omyo(jg)+tstep*try)*chit0 -+ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 -+ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 -+ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 -+ -+ enddo -+ -+c calculate rigid body rotational energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c total translational kinetic energy -+ -+ engke=engtrn+engfke -+ -+c total kinetic energy -+ -+ engtot=engke+engrot -+ -+c improved pressure control variable -+ -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ -+c improved temperature scaling coefficient -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c end of thermostat/barostat iterations -+ -+ enddo -+ -+c scale cell vectors -+ -+ scale=((chip0*volm)/volm0)**(1.d0/3.d0) -+ -+ do i=1,9 -+ cell(i)=scale*cell0(i) -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=1,9 -+ eta(i)=scale*uni(i) -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nptq_b1 -+ -+ subroutine nptq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,virtot,vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat and barostat (Melchionna et al variant) -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principl axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newjob -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ntpatm,fail,i,igrp,igrp1,igrp2,ifre,ifre1,ifre2 -+ integer j,k,ig,jg,jr,id,iter,mxiter,idum -+ real(8) chip,chit,consv,conint,elrc,engke,engrot,virlrc,press -+ real(8) quattol,sigma,taup,taut,temp,tolnce,tstep,virtot,vircom -+ real(8) vircon,volm,cell0,rot,volm0,elrc0,rtsq,uni -+ real(8) virlrc0,strkin,rstep,qmass,pmass,strgrp,strcon -+ real(8) trx,try,trz,chipp,chipnew,chip0,engtot,chitp -+ real(8) chitnew,chit0,volnew,scale,viracc,rgmas -+ real(8) vaa,vbb,vcc,vold,cons1,cons2,cons3,delx,dely,delz -+ real(8) engtrn,totmas,com,vom,engfke -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension fail(nnn),rot(9),cell0(9),uni(9) -+ dimension strkin(9),strcon(9),strgrp(9),com(3),vom(3) -+ -+ save newjob,volm0,elrc0,virlrc0,cell0,dens0,pmass,qmass -+ save igrp1,igrp2,ifre1,ifre2,totmas -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1550) -+ enddo -+ -+ if(newjob) then -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1560) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c temporary stress tensor accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+c correction to velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacements -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c estimate velocity at full step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate kinetic energy of rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translation kinetic energy of rigid bodies -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rigid body rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c propagate chip -+ -+ engke=engfke+engtrn -+ chipp=(2.d0*engke-virtot-vircon-vircom-3.d0*press*volm)/pmass- -+ x chit*chip -+ chipnew=chip+tstep*chipp -+ chip0=0.5d0*(chip+chipnew) -+ -+c propagate chit -+ -+ engtot=engke+engrot -+ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=5 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*(uxx(i)+ -+ x chipnew*((xxx(i)+xxo(j))*0.5d0-com(1))) -+ yyy(i)=yyo(j)+tstep*(uyy(i)+ -+ x chipnew*((yyy(i)+yyo(j))*0.5d0-com(2))) -+ zzz(i)=zzo(j)+tstep*(uzz(i)+ -+ x chipnew*((zzz(i)+zzo(j))*0.5d0-com(3))) -+ -+ enddo -+ -+c estimate new cell parameters -+ -+ volnew=volm*exp(3.d0*tstep*chipnew) -+ scale=(volnew/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate force correction -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ if(iter.eq.mxiter)then -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+ endif -+ -+c ********: rigid body motion - thermostated :*********** -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas-(chit0+chip0)* -+ x gvxx(ig)) -+ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas-(chit0+chip0)* -+ x gvyy(ig)) -+ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas-(chit0+chip0)* -+ x gvzz(ig)) -+ -+c advance positions using leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*(uxx(ig)+ -+ x chipnew*((gcmx(ig)+gcxo(jg))*0.5d0-com(1))) -+ gcmy(ig)=gcyo(jg)+tstep*(uyy(ig)+ -+ x chipnew*((gcmy(ig)+gcyo(jg))*0.5d0-com(2))) -+ gcmz(ig)=gczo(jg)+tstep*(uzz(ig)+ -+ x chipnew*((gcmz(ig)+gczo(jg))*0.5d0-com(3))) -+ -+c calculate full step velocities -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate kinetic energy and stress tensor -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omxo(jg)+delx -+ uyy(ig)=omyo(jg)+dely -+ uzz(ig)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c calculate rigid body rotational energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c improved prediction of chip -+ -+ engke=engfke+engtrn -+ chipp=(2.d0*engke-virtot-vircom-vircon-3.d0*press*volm)/pmass- -+ x chit0*chip0 -+ chipnew=chip+tstep*chipp -+ chip0=0.5d0*(chip+chipnew) -+ -+c improved prediction of chit -+ -+ engtot=engke+engrot -+ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update volume -+ -+ vold=volm -+ volm=volm*exp(3.d0*tstep*chipnew) -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=1,9 -+ eta(i)=chipnew*uni(i) -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ chip=chipnew -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) -+ cons1=0.5d0*qmass*chit0**2 -+ cons2=press*vold -+ cons3=0.5d0*pmass*chip0**2 -+ consv=conint+cons1+cons2+cons3 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nptq_h1 -+ -+ subroutine nstq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat and barostat. (cell may change shape). -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principl axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob,safeq -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ntpatm,fail,i,idum,igrp,igrp1,igrp2,ifre,ifre1,mode -+ integer ifre2,j,k,ig,jg,jr,id,iter,mxiter -+ real(8) elrc,engke,engrot,virlrc,press,quattol,sigma,taup,taut -+ real(8) tolnce,tstep,vircom,vircon,volm,beta,uni,cell0 -+ real(8) volm0,elrc0,virlrc0,rot,rstep,rtsq,engfke -+ real(8) engtrn,trx,try,trz,engtot,chit0,rgmas -+ real(8) vaa,vbb,vcc,viracc,strkin,strcon,strgrp,stres0 -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension strkin(9),strcon(9),strgrp(9),stres0(9),rot(9) -+ dimension fail(nnn),uni(9),cell0(9) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0 -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./, beta/7.3728d-3/ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxxdf),yyo(mxxdf),zzo(mxxdf),stat=fail(9)) -+ allocate (xx1(mxxdf),yy1(mxxdf),zz1(mxxdf),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1570) -+ enddo -+ -+ if(newjob) then -+ -+c store initial values of volume, long range corrections etc -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1580) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe= (igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c temporary stress tensor accumulators and new cell -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+c construct current bond vectors - required by shake -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from coms -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c estimate velocity at half-time step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c estimate kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c stress tensor of free atoms -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c estimate translational kinetic energy of rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c forces on centre of mass -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translational kinetic energy of rigid body -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c stress tensor of rigid body -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c calculate rotational kinetic energy of rigid bodies -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c find eta - taup is the relaxation time -+ -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c temperature scaling coefficient - taut is the relaxation time -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=5 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+eta(1)*xxo(j)+eta(4)*yyo(j)+eta(7)*zzo(j) -+ yyy(i)=tstep*uyy(i)+eta(2)*xxo(j)+eta(5)*yyo(j)+eta(8)*zzo(j) -+ zzz(i)=tstep*uzz(i)+eta(3)*xxo(j)+eta(6)*yyo(j)+eta(9)*zzo(j) -+ -+ enddo -+ -+c estimate new cell tensor -+ -+ call mat_mul(eta,cell0,cell) -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate current stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ if(iter.eq.mxiter)then -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+ endif -+ -+c ********: rigid body motion - thermostated :*********** -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 -+ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 -+ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 -+ -+c update positions : -+ -+ gcmx(ig)=tstep*uxx(ig)+eta(1)*gcxo(jg)+eta(4)*gcyo(jg)+ -+ x eta(7)*gczo(jg) -+ gcmy(ig)=tstep*uyy(ig)+eta(2)*gcxo(jg)+eta(5)*gcyo(jg)+ -+ x eta(8)*gczo(jg) -+ gcmz(ig)=tstep*uzz(ig)+eta(3)*gcxo(jg)+eta(6)*gcyo(jg)+ -+ x eta(9)*gczo(jg) -+ -+c full step com velocity -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate rigid body kinetic energy and stress tensor -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 -+ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 -+ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 -+ uyy(ig)=(omyo(jg)+tstep*try)*chit0 -+ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 -+ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 -+ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c complete stress tensor - add all contributions -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) -+ enddo -+ -+c improved prediction of eta and chit -+ -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c end of thermostat/barostat iterations -+ -+ enddo -+ -+c update cell vectors -+ -+ call mat_mul(eta,cell0,cell) -+ -+c update volume -+ -+ volm=volm*eta(1)*eta(5)*eta(9) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nstq_b1 -+ -+ subroutine nstq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke,engrot, -+ x virlrc,press,quattol,sigma,taup,taut,temp,tolnce,tstep, -+ x vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover like -+c thermostat and barostat. (cell may change shape). -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principle axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob,safeq -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ntpatm,fail,i,igrp,igrp1,igrp2,ifre,ifre1,ifre2 -+ integer j,k,ig,jg,jr,id,iter,mxiter,idum,mode -+ real(8) chit,conint,consv,elrc,engke,engrot,virlrc,press,quattol -+ real(8) sigma,taup,taut,temp,tolnce,tstep,vircom,vircon,volm -+ real(8) strkin,strcon,strgrp,eta0,etanew,rot,cell0,volm0,stres0 -+ real(8) elrc0,virlrc0,rstep,rtsq,qmass,pmass,totmas -+ real(8) engtrn,trx,try,trz,engtot,engfke,fac,etadot -+ real(8) chitp,chitnew,chit0,xxa,yya,zza,viracc,rgmas,uni -+ real(8) delx,dely,delz,vold,cons1,cons2,cons3 -+ real(8) vaa,vbb,vcc,chip,com,vom -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension eta0(9),etanew(9),rot(9),cell0(9),fail(nnn),uni(9) -+ dimension strkin(9),strcon(9),strgrp(9),stres0(9),com(3),vom(3) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0,pmass,qmass,totmas -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1590) -+ enddo -+ -+ if(newjob) then -+ -+c store initial values of volume, long range corrections etc -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1600) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c calculate total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c initialise stress tensor accumulators -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+c correction to velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c estimate velocity at full step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c estimate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c estimate rigid body translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep/gmass(id)*fmx(jg) -+ gvyy(ig)=gvyo(jg)+pt5*tstep/gmass(id)*fmy(jg) -+ gvzz(ig)=gvzo(jg)+pt5*tstep/gmass(id)*fmz(jg) -+ -+ enddo -+ -+c rigid body translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c rigid body stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate rgid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velcoity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c calculate rotational kinetic energy of rigid bodies -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c propagate eta -+ -+ fac=9.d0 -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ fac=5.d0 -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ fac=3.d0 -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ fac=2.d0 -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=0.5d0*(etanew(i)+eta(i)) -+ enddo -+ -+c propagate chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=5 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)- -+ x (chit0+eta0(1))*vxx(i)-eta0(4)*vyy(i)-eta0(7)*vzz(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)- -+ x eta0(2)*vxx(i)-(eta0(5)+chit0)*vyy(i)-eta0(8)*vzz(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)- -+ x eta0(3)*vxx(i)-eta0(6)*vyy(i)-(eta0(9)+chit0)*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxa=(xxx(i)+xxo(j))*0.5d0-com(1) -+ yya=(yyy(i)+yyo(j))*0.5d0-com(2) -+ zza=(zzz(i)+zzo(j))*0.5d0-com(3) -+ -+ xxx(i)=xxo(j)+tstep*(uxx(i)+ -+ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) -+ yyy(i)=yyo(j)+tstep*(uyy(i)+ -+ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) -+ zzz(i)=zzo(j)+tstep*(uzz(i)+ -+ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) -+ -+ enddo -+ -+c estimate new cell parameters -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ call cell_propagate(tstep,cell,etanew) -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free half step velocity -+ -+ if(iter.eq.mxiter)then -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+ endif -+ -+c ********: rigid body motion - thermostated :*********** -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas- -+ x (chit0+eta0(1))*gvxx(ig)-eta0(4)*gvyy(ig)-eta0(7)*gvzz(ig)) -+ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas- -+ x eta0(2)*gvxx(ig)-(eta0(5)+chit0)*gvyy(ig)-eta0(8)*gvzz(ig)) -+ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas- -+ x eta0(3)*gvxx(ig)-eta0(6)*gvyy(ig)-(eta0(9)+chit0)*gvzz(ig)) -+ -+c advance positions using leapfrog -+ -+ xxa=(gcmx(ig)+gcxo(jg))*0.5d0-com(1) -+ yya=(gcmy(ig)+gcyo(jg))*0.5d0-com(2) -+ zza=(gcmz(ig)+gczo(jg))*0.5d0-com(3) -+ -+ gcmx(ig)=gcxo(jg)+tstep*(uxx(ig)+ -+ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) -+ gcmy(ig)=gcyo(jg)+tstep*(uyy(ig)+ -+ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) -+ gcmz(ig)=gczo(jg)+tstep*(uzz(ig)+ -+ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) -+ -+c full step com velocity -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate rigid body kinetic energy and stress tensor -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ if(iter.eq.mxiter)then -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+ endif -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omxo(jg)+delx -+ uyy(ig)=omyo(jg)+dely -+ uzz(ig)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c complete stress tensor - add all contributions -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) -+ enddo -+ -+c improved prediction of eta and chit -+ -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit0*eta0(i)) -+ enddo -+ if(mode.gt.0)then -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=0.5d0*(etanew(i)+eta(i)) -+ enddo -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat/barostat iterations -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ do i=1,9 -+ eta(i)=etanew(i) -+ enddo -+ -+c update volume -+ -+ chip=eta(1)+eta(5)+eta(9) -+ vold=volm -+ volm=volm*exp(tstep*chip) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c conserved quantity less kinetic and potential energy -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) -+ cons1=0.5d0*qmass*chit0**2 -+ cons2=press*vold -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ cons3=0.5d0*pmass*etadot -+ consv=conint+cons1+cons2+cons3 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nstq_h1 -+ -+ end module lf_rotation1_module -diff -urN dl_class_1.9.orig/srcmod/lf_rotation2_module.f dl_class_1.9/srcmod/lf_rotation2_module.f ---- dl_class_1.9.orig/srcmod/lf_rotation2_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/lf_rotation2_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,5007 @@ -+ module lf_rotation2_module -+ -+c*********************************************************************** -+c -+c dl_poly module 2 for verlet leap frog rotational integration -+c schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use lf_rotation1_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ contains -+ -+ subroutine nveq_2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principal axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) rot,strkin,strcon,strgrp,engfke,engtrn -+ real(8) delx,dely,delz,trx,try,trz,vaa,vbb,vcc,viracc -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ -+ save newjob,igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1620) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c accumulators for constraint and virial stress tensor -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c start of shake cycle -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=1 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(j)=vxo(j)+tstep*rmass(i)*fxx(i) -+ uyy(j)=vyo(j)+tstep*rmass(i)*fyy(i) -+ uzz(j)=vzo(j)+tstep*rmass(i)*fzz(i) -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(i)+tstep*uxx(j) -+ yyy(i)=yyo(i)+tstep*uyy(j) -+ zzz(i)=zzo(i)+tstep*uzz(j) -+ -+c estimate full step velocities -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(jg)=gvxo(jg)+tstep/gmass(id)*fmx(jg) -+ uyy(jg)=gvyo(jg)+tstep/gmass(id)*fmy(jg) -+ uzz(jg)=gvzo(jg)+tstep/gmass(id)*fmz(jg) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*uxx(jg) -+ gcmy(ig)=gcyo(jg)+tstep*uyy(jg) -+ gcmz(ig)=gczo(jg)+tstep*uzz(jg) -+ -+c centre of mass velocities at full step -+ -+ gvxx(ig)=pt5*(uxx(jg)+gvxo(jg)) -+ gvyy(ig)=pt5*(uyy(jg)+gvyo(jg)) -+ gvzz(ig)=pt5*(uzz(jg)+gvzo(jg)) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+ opx(jg)=omxo(jg)+delx*pt5 -+ opy(jg)=omyo(jg)+dely*pt5 -+ opz(jg)=omzo(jg)+delz*pt5 -+ -+ enddo -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=omxo(jg)+delx -+ uyy(jg)=omyo(jg)+dely -+ uzz(jg)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+c angular velocity at time step n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c total kinetic energy -+ -+ engke=engfke+engtrn -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,fmx,fmy,fmz,stat=fail(5)) -+ deallocate (tqx,tqy,tqz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nveq_2 -+ -+ subroutine nvtq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, -+ x tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Berendsen thermostat. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,engfke -+ real(8) rot,strkin,strgrp,strcon,engtrn,trx,try,trz -+ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,engtot,chit0 -+ real(8) sigma,taut -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ -+ save chit0,igrp1,igrp2,ifre1,ifre2,newjob -+ -+ data chit0/1.d0/,newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1630) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c accumulators for constraint stress and virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c shake and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=2 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(i)+tstep*uxx(j) -+ yyy(i)=yyo(i)+tstep*uyy(j) -+ zzz(i)=zzo(i)+tstep*uzz(j) -+ -+c calculate full time velocity -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c update centre of mass velocities -+ -+ gvxx(ig)=gvxo(jg)+tstep/gmass(id)*fmx(jg) -+ gvyy(ig)=gvyo(jg)+tstep/gmass(id)*fmy(jg) -+ gvzz(ig)=gvzo(jg)+tstep/gmass(id)*fmz(jg) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c advance velocity by leapfrog -+ -+ gvxx(ig)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 -+ gvyy(ig)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 -+ gvzz(ig)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=gcyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=gczo(jg)+tstep*gvzz(ig) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+ opx(jg)=(omxo(jg)+delx*pt5) -+ opy(jg)=(omyo(jg)+dely*pt5) -+ opz(jg)=(omzo(jg)+delz*pt5) -+ -+ enddo -+ -+c scaled angular velocity at timestep n -+ -+ omx(ig)=opx(jg)*chit0 -+ omy(ig)=opy(jg)*chit0 -+ omz(ig)=opz(jg)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 -+ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 -+ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 -+ -+c angular velocity at full time step -+ -+ uxx(jg)=(omxo(jg)+delx)*chit0 -+ uyy(jg)=(omyo(jg)+dely)*chit0 -+ uzz(jg)=(omzo(jg)+delz)*chit0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c new estimate of chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nvtq_b2 -+ -+ subroutine nvtq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,conint,consv,chit,engke,engrot,quattol, -+ x sigma,taut,tolnce,tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Hoover thermostat. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principal axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,engtot -+ real(8) rot,strkin,strcon,strgrp,engtrn,engfke,trx,try,trz -+ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,sigma,taut,chit0 -+ real(8) chitnew,chitp,conint,consv,chit,qmass -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ -+ save newjob,igrp1,igrp2,ifre1,ifre2,qmass -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1640) -+ enddo -+ -+ if(newjob)then -+ -+c mass parameters for thermostat -+ -+ qmass=2.d0*sigma*taut**2 -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atoms displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c initial thermostat variable -+ -+ chit0=chit -+ -+c accumulators for constraint stress and virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c shake iterations and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=3 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0)* -+ x pt5*(vxx(i)+vxo(j))) -+ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0)* -+ x pt5*(vyy(i)+vyo(j))) -+ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0)* -+ x pt5*(vzz(i)+vzo(j))) -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(i)+tstep*uxx(j) -+ yyy(i)=yyo(i)+tstep*uyy(j) -+ zzz(i)=zzo(i)+tstep*uzz(j) -+ -+c estimate full step velocities -+ -+ vxx(i)=pt5*(vxo(j)+uxx(j)) -+ vyy(i)=pt5*(vyo(j)+uyy(j)) -+ vzz(i)=pt5*(vzo(j)+uzz(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)-chit0* -+ x pt5*(gvxx(ig)+gvxo(jg))) -+ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)-chit0* -+ x pt5*(gvyy(ig)+gvyo(jg))) -+ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)-chit0* -+ x pt5*(gvzz(ig)+gvzo(jg))) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*uxx(jg) -+ gcmy(ig)=gcyo(jg)+tstep*uyy(jg) -+ gcmz(ig)=gczo(jg)+tstep*uzz(jg) -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omxo(jg)+pt5*tstep*trx -+ opy(jg)=omyo(jg)+pt5*tstep*try -+ opz(jg)=omzo(jg)+pt5*tstep*trz -+ -+ enddo -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=omxo(jg)+delx -+ uyy(jg)=omyo(jg)+dely -+ uzz(jg)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c new estimate of chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chitp=2.d0*(engtot-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=pt5*(chit+chitnew) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10.and.icyc.gt.3)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c update thermostat variable -+ -+ chit=chitnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*qmass/taut**2 -+ consv=conint+pt5*qmass*chit0**2 -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nvtq_h2 -+ -+ subroutine nptq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon, -+ x virtot,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Berendsen thermostat and barostat. -+c (cell may change volume) -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith sep 1999 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) rot,strkin,strgrp,strcon,engtrn,engfke,trx,try,trz -+ real(8) delx,dely,delz,czero -+ real(8) vaa,vbb,vcc,viracc,beta,elrc,virlrc,press,engtot -+ real(8) sigma,taup,taut,virtot,volm,cell0,elrc0,virlrc0 -+ real(8) chit0,volm0,chip0,psyst,scale -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ dimension cell0(9),czero(9) -+ -+ save newjob,volm0,elrc0,virlrc0,czero,chit0,chip0,dens0 -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./ -+ data beta/7.3728d-3/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1670) -+ enddo -+ -+c store initial values of volume and long range corrections -+ -+ if(newjob) then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1660) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ do i=1,9 -+ czero(i)=cell(i) -+ enddo -+ newjob=.false. -+ -+ chit0=1.d0 -+ chip0=1.d0 -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c set constraint stress and virial and inital cell vectors -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c length scaling parameter -+ -+ scale=chip0**(1.d0/3.d0) -+ -+c shake iterations and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=3 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore cell vectors -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(i)*scale+tstep*uxx(j) -+ yyy(i)=yyo(i)*scale+tstep*uyy(j) -+ zzz(i)=zzo(i)*scale+tstep*uzz(j) -+ -+c estimate full step velocity -+ -+ vxx(i)=pt5*(vxo(j)+uxx(j)) -+ vyy(i)=pt5*(vyo(j)+uyy(j)) -+ vzz(i)=pt5*(vzo(j)+uzz(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(jg)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 -+ uyy(jg)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 -+ uzz(jg)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)*scale+tstep*uxx(jg) -+ gcmy(ig)=gcyo(jg)*scale+tstep*uyy(jg) -+ gcmz(ig)=gczo(jg)*scale+tstep*uzz(jg) -+ -+c centre of mass velocities at full step -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=(omxo(jg)+pt5*delx) -+ opy(jg)=(omyo(jg)+pt5*dely) -+ opz(jg)=(omzo(jg)+pt5*delz) -+ -+ enddo -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=opx(jg)*chit0 -+ omy(ig)=opy(jg)*chit0 -+ omz(ig)=opz(jg)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 -+ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 -+ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=(omxo(jg)+delx)*chit0 -+ uyy(jg)=(omyo(jg)+dely)*chit0 -+ uzz(jg)=(omzo(jg)+delz)*chit0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c pressure control variable -+ -+ engke=engfke+engtrn -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ -+c new estimate of chit -+ -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+c new cell parameters -+ -+ do i=1,9 -+ cell(i)=scale*cell0(i) -+ enddo -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c scale cell vectors -+ -+ scale=((chip0*volm)/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=scale*czero(i) -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=2,8 -+ eta(i)=0.d0 -+ enddo -+ eta(1)=scale -+ eta(5)=scale -+ eta(9)=scale -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nptq_b2 -+ -+ subroutine nptq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,vircom,vircon,virtot,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Hoover thermostat and barostat. -+c (cell may change volume) -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,com -+ real(8) rot,strkin,strcon,strgrp,vom,engtrn,trx,try,trz -+ real(8) delx,dely,delz,engfke -+ real(8) vaa,vbb,vcc,viracc,pmass,qmass,totmas,czero -+ real(8) chip,chit,consv,conint,elrc,virlrc,press,sigma,taup,taut -+ real(8) temp,virtot,cell0,volm0,elrc0,virlrc0 -+ real(8) chit0,chip0,chipnew,chipp,engtot,chitnew,chitp,volnew -+ real(8) scale,volm,vold,cons1,cons2,cons3 -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ dimension czero(9),cell0(9),com(3),vom(3) -+ -+ save newjob,volm0,elrc0,virlrc0,czero,dens0,pmass,qmass -+ save igrp1,igrp2,ifre1,ifre2,totmas -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1670) -+ enddo -+ -+ if(newjob) then -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1680) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ do i=1,9 -+ czero(i)=cell(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+c calculate system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c initial thermostat and barostat variables -+ -+ chit0=chit -+ chip0=chip -+ chipnew=chip -+ -+c initialise constraint stress and virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ -+ enddo -+ -+c shake iterations and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=4 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore cell vectors -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)* -+ x pt5*(vxx(i)+vxo(j))) -+ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)* -+ x pt5*(vyy(i)+vyo(j))) -+ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)* -+ x pt5*(vzz(i)+vzo(j))) -+ -+c advance position using leapfrog -+ -+ xxx(i)=xxo(i)+tstep*(uxx(j)+ -+ x chipnew*((xxx(i)+xxo(i))*pt5-com(1))) -+ yyy(i)=yyo(i)+tstep*(uyy(j)+ -+ x chipnew*((yyy(i)+yyo(i))*pt5-com(2))) -+ zzz(i)=zzo(i)+tstep*(uzz(j)+ -+ x chipnew*((zzz(i)+zzo(i))*pt5-com(3))) -+ -+c estimate full step velocity -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)-(chit0+chip0)* -+ x pt5*(gvxx(ig)+gvxo(jg))) -+ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)-(chit0+chip0)* -+ x pt5*(gvyy(ig)+gvyo(jg))) -+ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)-(chit0+chip0)* -+ x pt5*(gvzz(ig)+gvzo(jg))) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*(uxx(jg)+ -+ x chipnew*((gcxo(jg)+gcmx(ig))*pt5-com(1))) -+ gcmy(ig)=gcyo(jg)+tstep*(uyy(jg)+ -+ x chipnew*((gcyo(jg)+gcmy(ig))*pt5-com(2))) -+ gcmz(ig)=gczo(jg)+tstep*(uzz(jg)+ -+ x chipnew*((gczo(jg)+gcmz(ig))*pt5-com(3))) -+ -+c estimate full step velocities -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omxo(jg)+pt5*tstep*trx -+ opy(jg)=omyo(jg)+pt5*tstep*try -+ opz(jg)=omzo(jg)+pt5*tstep*trz -+ -+ enddo -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=omxo(jg)+delx -+ uyy(jg)=omyo(jg)+dely -+ uzz(jg)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c new estimate of chip and chit -+ -+ engke=engfke+engtrn -+ chipp=(2.d0*engke-virtot-vircom-vircon-3.d0*press*volm)/pmass- -+ x chit0*chip0 -+ chipnew=chip+tstep*chipp -+ chip0=pt5*(chip+chipnew) -+ -+ engtot=engke+engrot -+ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=pt5*(chit+chitnew) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+c estimate new cell tensor -+ -+ volnew=volm*exp(3.d0*tstep*chipnew) -+ scale=(volnew/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=czero(i)*scale -+ enddo -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c update volume -+ -+ vold=volm -+ volm=volm*exp(3.d0*tstep*chipnew) -+ -+c scale cell vectors-isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=czero(i)*scale -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=2,8 -+ eta(i)=0.d0 -+ enddo -+ eta(1)=chipnew -+ eta(5)=chipnew -+ eta(9)=chipnew -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ chip=chipnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) -+ cons1=pt5*qmass*chit0**2 -+ cons2=press*vold -+ cons3=pt5*pmass*chip0**2 -+ consv=conint+cons1+cons2+cons3 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nptq_h2 -+ -+ subroutine nstq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints. Rigid body sites and constraint sites may -+c coincide. -+c -+c verlet leapfrog with Berendsen thermostat and barostat. -+c (cell may change shape) -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob,safeq,newstep,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons,mode -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) rot,strkin,strcon,strgrp,engtrn,trx,try,trz -+ real(8) delx,dely,delz,engfke -+ real(8) vaa,vbb,vcc,viracc,elrc,virlrc,press,sigma -+ real(8) taup,taut,volm,cell0,volm0,elrc0,chit0,uni -+ real(8) beta,stres0,engtot,virlrc0 -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ dimension cell0(9),uni(9),stres0(9) -+ -+ save newjob,volm0,elrc0,virlrc0,chit0,dens0 -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ data beta/7.3728d-3/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1690) -+ enddo -+ -+c store initial values of volume, long range corrections etc -+ -+ if(newjob) then -+ -+ chit0=1.d0 -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1700) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c set virial, strain and stress tensors -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ eta(i)=uni(i) -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c shake iterations and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=4 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(j)+eta(1)*xxo(i)+eta(4)*yyo(i)+eta(7)*zzo(i) -+ yyy(i)=tstep*uyy(j)+eta(2)*xxo(i)+eta(5)*yyo(i)+eta(8)*zzo(i) -+ zzz(i)=tstep*uzz(j)+eta(3)*xxo(i)+eta(6)*yyo(i)+eta(9)*zzo(i) -+ -+c calculate velocity at full time step -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ********: rigid body motion - thermostated :*********** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c calculate thermostated velocities -+ -+ uxx(jg)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 -+ uyy(jg)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 -+ uzz(jg)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 -+ -+c update positions -+ -+ gcmx(ig)=tstep*uxx(jg)+ -+ x eta(1)*gcxo(jg)+eta(4)*gcyo(jg)+eta(7)*gczo(jg) -+ gcmy(ig)=tstep*uyy(jg)+ -+ x eta(2)*gcxo(jg)+eta(5)*gcyo(jg)+eta(8)*gczo(jg) -+ gcmz(ig)=tstep*uzz(jg)+ -+ x eta(3)*gcxo(jg)+eta(6)*gcyo(jg)+eta(9)*gczo(jg) -+ -+c centre of mass velocities at full step -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=(omxo(jg)+pt5*delx) -+ opy(jg)=(omyo(jg)+pt5*dely) -+ opz(jg)=(omzo(jg)+pt5*delz) -+ -+ enddo -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=opx(jg)*chit0 -+ omy(ig)=opy(jg)*chit0 -+ omz(ig)=opz(jg)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 -+ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 -+ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=(omxo(jg)+delx)*chit0 -+ uyy(jg)=(omyo(jg)+dely)*chit0 -+ uzz(jg)=(omzo(jg)+delz)*chit0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c calculate total stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c calculate new cell tensor -+ -+ call mat_mul(eta,cell0,cell) -+ -+c calculate eta tensor -+ -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c new estimate of chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c update volume -+ -+ volm=volm*eta(1)*eta(5)*eta(9) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nstq_b2 -+ -+ subroutine nstq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke,engrot, -+ x virlrc,press,quattol,sigma,taup,taut,temp,tolnce,tstep, -+ x vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints- rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Hoover like thermostat and barostat. -+c (cell may change shape) -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm,mode -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) rot,strkin,strcon,strgrp,engtrn,vxt,vyt,vzt,trx,try,trz -+ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,com,fac,etadot -+ real(8) chit,conint,consv,virlrc,elrc,press,sigma,taut,taup -+ real(8) volm,eta0,etanew,cell0,volm0,elrc0,virlrc0,pmass,qmass -+ real(8) totmas,chit0,xxa,yya,zza,chip,chitp,vom,engfke -+ real(8) chitnew,vold,cons1,cons2,cons3,temp,uni -+ real(8) stres0,engtot -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn),vom(3) -+ dimension cell0(9),eta0(9),etanew(9),stres0(9),uni(9),com(3) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0,pmass,qmass -+ save igrp1,igrp2,ifre1,ifre2,totmas -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1710) -+ enddo -+ -+ if(newjob) then -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c store initial values of volume, long range corrections etc -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1720) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+c system total mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+c correction to velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c initial thermostat and barostat variables and new cell -+ -+ chit0=chit -+ do i=1,9 -+ -+ eta0(i)=eta(i) -+ cell0(i)=cell(i) -+ -+ enddo -+ -+c initialise constraint stress and virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c shake and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=4 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore cell vectors -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ vxt=pt5*(vxx(i)+vxo(j)) -+ vyt=pt5*(vyy(i)+vyo(j)) -+ vzt=pt5*(vzz(i)+vzo(j)) -+ -+ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)- -+ x (eta0(1)+chit0)*vxt-eta0(4)*vyt-eta0(7)*vzt) -+ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)- -+ x eta0(2)*vxt-(eta0(5)+chit0)*vyt-eta0(8)*vzt) -+ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)- -+ x eta0(3)*vxt-eta0(6)*vyt-(eta0(9)+chit0)*vzt) -+ -+c advance positions using leapfrog -+ -+ xxa=(xxx(i)+xxo(i))*pt5-com(1) -+ yya=(yyy(i)+yyo(i))*pt5-com(2) -+ zza=(zzz(i)+zzo(i))*pt5-com(3) -+ -+ xxx(i)=xxo(i)+tstep*(uxx(j)+ -+ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) -+ yyy(i)=yyo(i)+tstep*(uyy(j)+ -+ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) -+ zzz(i)=zzo(i)+tstep*(uzz(j)+ -+ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) -+ -+c estimate full step velocities -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ********: rigid body motion - thermostated :************ -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c calculate thermostated velocities -+ -+ vxt=pt5*(gvxx(ig)+gvxo(jg)) -+ vyt=pt5*(gvyy(ig)+gvyo(jg)) -+ vzt=pt5*(gvzz(ig)+gvzo(jg)) -+ -+ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)- -+ x (chit0+eta0(1))*vxt-eta0(4)*vyt-eta0(7)*vzt) -+ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)- -+ x eta0(2)*vxt-(eta0(5)+chit0)*vyt-eta0(8)*vzt) -+ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)- -+ x eta0(3)*vxt-eta0(6)*vyt-(eta0(9)+chit0)*vzt) -+ -+c advance positions using leapfrog -+ -+ xxa=(gcmx(ig)+gcxo(jg))*pt5-com(1) -+ yya=(gcmy(ig)+gcyo(jg))*pt5-com(2) -+ zza=(gcmz(ig)+gczo(jg))*pt5-com(3) -+ -+ gcmx(ig)=gcxo(jg)+tstep*(uxx(jg)+ -+ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) -+ gcmy(ig)=gcyo(jg)+tstep*(uyy(jg)+ -+ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) -+ gcmz(ig)=gczo(jg)+tstep*(uzz(jg)+ -+ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) -+ -+c estimate full step velocities -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omxo(jg)+pt5*tstep*trx -+ opy(jg)=omyo(jg)+pt5*tstep*try -+ opz(jg)=omzo(jg)+pt5*tstep*trz -+ -+ enddo -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=omxo(jg)+delx -+ uyy(jg)=omyo(jg)+dely -+ uzz(jg)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c calculate total stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c propagate eta -+ -+ fac=9.d0 -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit0*eta0(i)) -+ enddo -+ if(mode.gt.0)then -+ fac=5.d0 -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ fac=3.d0 -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ fac=2.d0 -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=pt5*(etanew(i)+eta(i)) -+ enddo -+ -+c propagate chit -+ -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=pt5*(chit+chitnew) -+ -+c estimate new cell parameters -+ -+ call cell_propagate(tstep,cell,etanew) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ do i=1,9 -+ eta(i)=etanew(i) -+ enddo -+ -+c update volume -+ -+ chip=eta(1)+eta(5)+eta(9) -+ vold=volm -+ volm=volm*exp(tstep*chip) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c conserved quantity less kinetic and potential energy -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) -+ cons1=pt5*qmass*chit0**2 -+ cons2=press*vold -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ cons3=pt5*pmass*etadot -+ consv=conint+cons1+cons2+cons3 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nstq_h2 -+ -+ subroutine qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,stresh) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for appling bond constraint corrections after -+c atomic integration. Assumes rigid bodies connected by constraints -+c If this is not so use rdshake_1 instead -+c Must be used in conjunction with leapfrog integration algorithms -+c -+c copyright - daresbury laboratory 1995 -+c author - t. forester june 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newstep,newjob -+ integer fail,idnode,imcon,mxnode,natms,nscons,i,j,k -+ integer ik,ig,id,jj -+ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,txx,tyy -+ real(8) tzz,xxt,yyt,zzt,stresh,tstep2,esig,dis,dis2 -+ real(8) xxa,yya,zza,tax,tay,taz,doti,amti,amtj -+ real(8) trx,try,trz,vix,viy,viz,vxi,vyi,vzi -+ real(8) vjx,vjy,vjz,vxj,vyj,vzj,gamma,dli,dlj,rot -+ -+ real(8), allocatable :: redmass(:),esig1(:) -+ -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ dimension stresh(9),rot(9) -+ -+ save newjob,esig1,redmass -+ -+ data newjob/.true./,fail/0/ -+ -+ if(newjob)then -+ -+ allocate (redmass(mxcons),esig1(mxcons),stat=fail) -+ if(fail.ne.0)call error(idnode,1610) -+ newjob=.false. -+ -+ endif -+ -+c constraint virial -+ -+ vircon=0.d0 -+ -+c accumulators for stress tensor -+ -+ do i=1,9 -+ stresh(i)=0.d0 -+ enddo -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c one iteration of constraint (shake) algorithm -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate temporary bond vector -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c calculate maximum error in bondlength -+ -+ esig=0.d0 -+ do k=1,nscons -+ -+c set bond parameter -+ -+ dis=prmcon(listcon(k,1)) -+ dis2=dis*dis -+ esig1(k)=0.5d0*(dis2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/dis2 -+ esig=max(esig,abs(esig1(k))) -+ -+ enddo -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+c terminate iteration if all tolerances satisfied -+ -+ if (.not.safe) then -+ -+c initialise force increment arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint forces -+ -+ ik=0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c assign effective reduced mass -+ -+ if(newstep) then -+ -+ ig=lstbod(i) -+ -+ if(ig.eq.0) then -+ -+ amti=rmass(i) -+ -+ else -+ -+ ik=ik+1 -+ id=lstgtp(ig) -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ jj=lstcsit(ik) -+ -+c site to com in lab frame -+ -+ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+ -+ x gzz(id,jj)*rot(3)) -+ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+ -+ x gzz(id,jj)*rot(6)) -+ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+ -+ x gzz(id,jj)*rot(9)) -+ -+c find cross product between interatomic vector and vector to com -+ -+ tax=yya*dzz(k)-zza*dyy(k) -+ tay=zza*dxx(k)-xxa*dzz(k) -+ taz=xxa*dyy(k)-yya*dxx(k) -+ -+c transform to body fixed frame -+ -+ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) -+ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) -+ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) -+ -+c direction of induced velocites in body frame -+ -+ vix=try*gzz(id,jj)-trz*gyy(id,jj) -+ viy=trz*gxx(id,jj)-trx*gzz(id,jj) -+ viz=trx*gyy(id,jj)-try*gxx(id,jj) -+ -+c transform to lab frame -+ -+ vxi=vix*rot(1)+viy*rot(2)+viz*rot(3) -+ vyi=vix*rot(4)+viy*rot(5)+viz*rot(6) -+ vzi=vix*rot(7)+viy*rot(8)+viz*rot(9) -+ -+c find dot product between induced translational and rotational velocities -+ -+ doti=abs(vxi*dxx(k)+vyi*dyy(k)+vzi*dzz(k)) -+ doti=doti/dis2 -+ -+ amti=(1.d0/gmass(id)+doti) -+ -+ endif -+ -+ ig=lstbod(j) -+ if(ig.eq.0) then -+ -+ amtj=rmass(j) -+ -+ else -+ -+ ik=ik+1 -+ id=lstgtp(ig) -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ jj=lstcsit(ik) -+ -+c site to com in lab frame -+ -+ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+ -+ x gzz(id,jj)*rot(3)) -+ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+ -+ x gzz(id,jj)*rot(6)) -+ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+ -+ x gzz(id,jj)*rot(9)) -+ -+c find cross product between interatomic vector and vector to com -+ -+ tax =yya*dzz(k)-zza*dyy(k) -+ tay =zza*dxx(k)-xxa*dzz(k) -+ taz =xxa*dyy(k)-yya*dxx(k) -+ -+c transform to body fixed frame -+ -+ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) -+ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) -+ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) -+ -+c direction of induced velocites in body frame -+ -+ vjx=try*gzz(id,jj)-trz*gyy(id,jj) -+ vjy=trz*gxx(id,jj)-trx*gzz(id,jj) -+ vjz=trx*gyy(id,jj)-try*gxx(id,jj) -+ -+c transform to lab frame -+ -+ vxj=vjx*rot(1)+vjy*rot(2)+vjz*rot(3) -+ vyj=vjx*rot(4)+vjy*rot(5)+vjz*rot(6) -+ vzj=vjx*rot(7)+vjy*rot(8)+vjz*rot(9) -+ -+c find dot product between induced translational and rotational velocities -+ -+ doti=abs(vxj*dxx(k)+vyj*dyy(k)+vzj*dzz(k)) -+ doti=doti/dis2 -+ -+ amtj=(1.d0/gmass(id)+doti) -+ -+ endif -+ -+ redmass(k)=1.d0/(amti+amtj)/tstep2 -+ -+ endif -+ -+c constraint force parameter -+ -+ gamma=esig1(k)*redmass(k) -+ -+c accumulate bond virial -+ -+ vircon=vircon-gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ -+ stresh(1)=stresh(1)+gamma*dxx(k)*dxx(k) -+ stresh(2)=stresh(2)+gamma*dxx(k)*dyy(k) -+ stresh(3)=stresh(3)+gamma*dxx(k)*dzz(k) -+ stresh(5)=stresh(5)+gamma*dyy(k)*dyy(k) -+ stresh(6)=stresh(6)+gamma*dyy(k)*dzz(k) -+ stresh(9)=stresh(9)+gamma*dzz(k)*dzz(k) -+ -+c improved atomic force -+ -+ xxt(i)=xxt(i)+dxx(k)*gamma -+ yyt(i)=yyt(i)+dyy(k)*gamma -+ zzt(i)=zzt(i)+dzz(k)*gamma -+ -+ xxt(j)=xxt(j)-dxx(k)*gamma -+ yyt(j)=yyt(j)-dyy(k)*gamma -+ zzt(j)=zzt(j)-dzz(k)*gamma -+ -+ enddo -+ -+c transport temporary positions to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov) call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ dlj=1.d0/dble(listme(j)) -+ -+ fxx(i)=fxx(i)+xxt(i)*dli -+ fyy(i)=fyy(i)+yyt(i)*dli -+ fzz(i)=fzz(i)+zzt(i)*dli -+ fxx(j)=fxx(j)+xxt(j)*dlj -+ fyy(j)=fyy(j)+yyt(j)*dlj -+ fzz(j)=fzz(j)+zzt(j)*dlj -+ -+ enddo -+ -+c complete (symmetrical) stress tensor -+ -+ stresh(4)=stresh(2) -+ stresh(7)=stresh(3) -+ stresh(8)=stresh(6) -+ -+c splice force arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(stresh,9,buffer) -+ call splice -+ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine qshake -+ -+ end module lf_rotation2_module -diff -urN dl_class_1.9.orig/srcmod/Makefile dl_class_1.9/srcmod/Makefile ---- dl_class_1.9.orig/srcmod/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/Makefile 2015-11-16 17:18:13.342474971 +0100 -@@ -0,0 +1,101 @@ -+# Master makefile for DL_POLY Classic -+# Author: W. Smith January Dec 2010 -+# -+#======================================================================= -+# Define default settings -+#======================================================================= -+ -+include ../Plumed.inc -+ -+ -+BINROOT = ../execute -+CC := $(MPICC) -+EX = DLPOLY.X -+EXE = $(BINROOT)/$(EX) -+FC := $(MPIF90) -+SHELL=/bin/sh -+TYPE=par -+ -+#===================================================================== -+# Define object files -+ -+OBJ_MOD = parse_module.o setup_module.o error_module.o \ -+ site_module.o config_module.o pair_module.o utility_module.o \ -+ metafreeze_module.o solvation_module.o tether_module.o \ -+ vdw_module.o property_module.o rigid_body_module.o \ -+ angles_module.o bonds_module.o shake_module.o \ -+ inversion_module.o dihedral_module.o core_shell_module.o \ -+ exclude_module.o ewald_module.o coulomb_module.o\ -+ external_field_module.o four_body_module.o \ -+ hkewald_module.o metal_module.o ensemble_tools_module.o \ -+ temp_scalers_module.o three_body_module.o spme_module.o \ -+ tersoff_module.o neu_coul_module.o \ -+ nlist_builders_module.o forces_module.o \ -+ lf_motion_module.o lf_rotation1_module.o \ -+ lf_rotation2_module.o vv_motion_module.o \ -+ vv_rotation1_module.o vv_rotation2_module.o \ -+ pmf_module.o integrator_module.o optimiser_module.o \ -+ hyper_dynamics_module.o driver_module.o \ -+ define_system_module.o -+ -+OBJ_SRC = dlpoly.o -+ -+OBJ_PAR = basic_comms.o merge_tools.o pass_tools.o -+ -+#===================================================================== -+# Define targets -+all: -+ @echo "Error - please specify a target machine!" -+ @echo "Permissible targets for this Makefile are:" -+ @echo " " -+ @echo "gfortran (parallel)" -+ @echo "woodcrest (parallel)" -+ @echo " " -+ @echo "Please examine Makefile for details" -+ -+# system specific targets follow : -+ -+#================== GNU Fortran, MPI version ============================== -+gfortran: -+ $(MAKE) FC="$(MPIF90)" LD="$(MPIF90) -o" \ -+ LDFLAGS="$(LDFLAGS)" \ -+ FFLAGS="-c $(FFLAGS)" \ -+ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) -+ -+#================= Woodcrest ========================================= -+woodcrest: -+ $(MAKE) LD="mpif90 -o" LDFLAGS="" \ -+ FC=mpif90 FFLAGS="-c -O3" \ -+ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) -+ -+#===================================================================== -+# Default code for parallel (MPI) execution -+ -+par: check $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) $(PLUMED_DEPENDENCIES) -+ $(LD) $(EX) $(LDFLAGS) $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) $(PLUMED_LOAD) -+ mv $(EX) $(EXE) -+ -+#===================================================================== -+# Check that a machine has been specified -+check: -+ @if test $(FC) = "undefined";\ -+ then echo "You must specify a target machine!"; \ -+ exit 99;\ -+ fi -+ -+#===================================================================== -+# Clean up the source directory -+clean: -+ rm -f $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) *.mod -+ -+#===================================================================== -+# Declare dependencies -+.f.o: -+ $(FC) $(FFLAGS) $*.f -+.c.o: -+ $(CC) -c $*.c -+ -+#===================================================================== -+# Declare dependency on module files -+ -+$(OBJ_SRC): $(OBJ_MOD) -diff -urN dl_class_1.9.orig/srcmod/Makefile.plumedbck dl_class_1.9/srcmod/Makefile.plumedbck ---- dl_class_1.9.orig/srcmod/Makefile.plumedbck 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/Makefile.plumedbck 2015-11-16 17:17:11.322040795 +0100 -@@ -0,0 +1,98 @@ -+# Master makefile for DL_POLY Classic -+# Author: W. Smith January Dec 2010 -+# -+#======================================================================= -+# Define default settings -+#======================================================================= -+ -+BINROOT = ../execute -+CC := $(MPICC) -+EX = DLPOLY.X -+EXE = $(BINROOT)/$(EX) -+FC := $(MPIF90) -+SHELL=/bin/sh -+TYPE=par -+ -+#===================================================================== -+# Define object files -+ -+OBJ_MOD = parse_module.o setup_module.o error_module.o \ -+ site_module.o config_module.o pair_module.o utility_module.o \ -+ metafreeze_module.o solvation_module.o tether_module.o \ -+ vdw_module.o property_module.o rigid_body_module.o \ -+ angles_module.o bonds_module.o shake_module.o \ -+ inversion_module.o dihedral_module.o core_shell_module.o \ -+ exclude_module.o ewald_module.o coulomb_module.o\ -+ external_field_module.o four_body_module.o \ -+ hkewald_module.o metal_module.o ensemble_tools_module.o \ -+ temp_scalers_module.o three_body_module.o spme_module.o \ -+ tersoff_module.o neu_coul_module.o \ -+ nlist_builders_module.o forces_module.o \ -+ lf_motion_module.o lf_rotation1_module.o \ -+ lf_rotation2_module.o vv_motion_module.o \ -+ vv_rotation1_module.o vv_rotation2_module.o \ -+ pmf_module.o integrator_module.o optimiser_module.o \ -+ hyper_dynamics_module.o driver_module.o \ -+ define_system_module.o -+ -+OBJ_SRC = dlpoly.o -+ -+OBJ_PAR = basic_comms.o merge_tools.o pass_tools.o -+ -+#===================================================================== -+# Define targets -+all: -+ @echo "Error - please specify a target machine!" -+ @echo "Permissible targets for this Makefile are:" -+ @echo " " -+ @echo "gfortran (parallel)" -+ @echo "woodcrest (parallel)" -+ @echo " " -+ @echo "Please examine Makefile for details" -+ -+# system specific targets follow : -+ -+#================== GNU Fortran, MPI version ============================== -+gfortran: -+ $(MAKE) FC="$(MPIF90)" LD="$(MPIF90) -o" \ -+ LDFLAGS="$(LDFLAGS)" \ -+ FFLAGS="-c $(FFLAGS)" \ -+ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) -+ -+#================= Woodcrest ========================================= -+woodcrest: -+ $(MAKE) LD="mpif90 -o" LDFLAGS="" \ -+ FC=mpif90 FFLAGS="-c -O3" \ -+ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) -+ -+#===================================================================== -+# Default code for parallel (MPI) execution -+ -+par: check $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) -+ $(LD) $(EX) $(LDFLAGS) $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) -+ mv $(EX) $(EXE) -+ -+#===================================================================== -+# Check that a machine has been specified -+check: -+ @if test $(FC) = "undefined";\ -+ then echo "You must specify a target machine!"; \ -+ exit 99;\ -+ fi -+ -+#===================================================================== -+# Clean up the source directory -+clean: -+ rm -f $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) *.mod -+ -+#===================================================================== -+# Declare dependencies -+.f.o: -+ $(FC) $(FFLAGS) $*.f -+.c.o: -+ $(CC) -c $*.c -+ -+#===================================================================== -+# Declare dependency on module files -+ -+$(OBJ_SRC): $(OBJ_MOD) -diff -urN dl_class_1.9.orig/srcmod/merge_tools.f dl_class_1.9/srcmod/merge_tools.f ---- dl_class_1.9.orig/srcmod/merge_tools.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/merge_tools.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,670 @@ -+ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for merging coordinate arrays across -+c a number of processors -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith november 1992. -+c MPI version - t. forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ use error_module -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nbuff,nsize,ierr,iatm1,iatm2 -+ integer j,i,k,jdnode,kdnode,katm1,katm2,iatm,katm -+ real*8 xxx(natms),yyy(natms),zzz(natms),buffer(nbuff) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+c check that buffer is large enough -+ -+ nsize=(natms+mxnode-1)/mxnode -+ if(nbuff.lt.6*nsize)call error(idnode,47) -+ -+c load initial transfer buffer -+ -+ j=0 -+ -+c set up this nodes atoms -+ -+ iatm1 = (idnode*natms)/mxnode + 1 -+ iatm2 = ((idnode+1)*natms)/mxnode -+ -+ iatm = iatm2-iatm1+1 -+ -+ do i=iatm1,iatm2 -+ -+ buffer(j+1)=xxx(i) -+ buffer(j+2)=yyy(i) -+ buffer(j+3)=zzz(i) -+ j=j+3 -+ -+ enddo -+ -+ -+ call gsync() -+ -+c identity of neighbour node for systolic transfer -+ -+ jdnode=mod(idnode+1,mxnode) -+ -+ do k=1,mxnode-1 -+ -+c identity of node of origin of incoming data -+ -+ kdnode=mod(idnode+mxnode-k,mxnode) -+ -+c identity of incoming atoms -+ -+ katm1 = (kdnode*natms)/mxnode + 1 -+ katm2 = ((kdnode+1)*natms)/mxnode -+ katm = katm2-katm1 + 1 -+ -+c systolic data pulse to transfer data -+ -+ call MPI_IRECV(buffer(3*nsize+1),3*nsize,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Merge_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(buffer(1),3*nsize,MPI_DOUBLE_PRECISION,jdnode, -+ x Merge_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+c merge the incoming data into current arrays -+ -+ j=3*nsize -+ -+ do i=katm1,katm2 -+ -+ xxx(i)=buffer(j+1) -+ yyy(i)=buffer(j+2) -+ zzz(i)=buffer(j+3) -+ j=j+3 -+ -+ enddo -+ -+c shift new data to start of buffer -+ -+ do i=1,3*nsize -+ -+ buffer(i)=buffer(3*nsize+i) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for merging together coordinate arrays -+c across a number of processors during rigid body algorithm -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - t.forester november 1993 -+c systolic pulse version. T3D t.forester sept 1994 -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ logical safe -+ integer idnode,mxnode,natms,ierr,i,j,k,l,mxb,nout,nin -+ integer nin1,jdnode,j1,kdnode -+ integer lstme(natms) -+ real*8 xxx(mxatms),yyy(mxatms),zzz(mxatms),buffer(mxbuff) -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+ -+ safe =.true. -+ -+c load up buffers -+ -+ j=1 -+ l=1 -+ do while(lstme(l).gt.0.and.l.le.natms) -+ -+ i=lstme(l) -+ buffer(j+1)=dble(i) -+ buffer(j+2)=xxx(i) -+ buffer(j+3)=yyy(i) -+ buffer(j+4)=zzz(i) -+ j=j+4 -+ l=l+1 -+ -+ enddo -+ -+c length of message -+ -+ buffer(1) = dble(j) -+ -+c array position for incoming messages -+ -+ mxb = mxbuff/2 -+ -+c load initial transfer buffer -+ -+ call gsync() -+ -+c identity of neighbour node for systolic transfer -+ -+ jdnode=mod(idnode+1,mxnode) -+ -+ do k=1,mxnode-1 -+ -+c identity of node of origin of incoming data -+ -+ kdnode=mod(idnode+mxnode-k,mxnode) -+ -+c out going message size -+ -+ nout = nint(buffer(1)) -+ -+ call MPI_IRECV(nin,1,MPI_INTEGER, -+ x MPI_ANY_SOURCE,Merge1_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(nout,1,MPI_INTEGER,jdnode, -+ x Merge1_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+ call MPI_IRECV(buffer(mxb),nin,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Merge1_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(buffer(1),nout,MPI_DOUBLE_PRECISION,jdnode, -+ x Merge1_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+c check buffer array not exceeded -+ -+ if(nin.gt.mxbuff-mxb) safe =.false. -+ -+c position of first data element in incoming array -+ -+ nin1 = (nin-1)/4 -+ j = mxb+1 -+ -+ do j1=1,nin1 -+ -+ i = nint(buffer(j)) -+ xxx(i)=buffer(j+1) -+ yyy(i)=buffer(j+2) -+ zzz(i)=buffer(j+3) -+ j=j+4 -+ -+ enddo -+ -+c shift new data to start of buffer -+ -+ do i=1,nin -+ -+ buffer(i)=buffer(mxb-1+i) -+ -+ enddo -+ -+ enddo -+ -+c global check -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,47) -+ -+ return -+ end -+ -+ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for merging coordinate arrays across -+c a number of processors -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t.forester february 1994 -+c T3D version - sept 1994 t.forester -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ use error_module -+ -+ implicit none -+ -+ integer idnode,mxnode,ngrp,nbuff,ierr,nsize,i,j,igrp1,igrp2 -+ integer k,jdnode,kdnode,kgrp1,kgrp2 -+ real*8 q0(ngrp),q1(ngrp),q2(ngrp),q3(ngrp),buffer(nbuff) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+ -+c check that buffer is large enough -+ -+ nsize=(ngrp+mxnode-1)/mxnode -+ if(nbuff.lt.8*nsize)call error(idnode,47) -+ -+c load initial transfer buffer -+ -+ j=0 -+ -+ igrp1 = (idnode*ngrp)/mxnode+1 -+ igrp2 = ((idnode+1)*ngrp)/mxnode -+ -+ do i=igrp1,igrp2 -+ -+ buffer(j+1)=q0(i) -+ buffer(j+2)=q1(i) -+ buffer(j+3)=q2(i) -+ buffer(j+4)=q3(i) -+ j=j+4 -+ -+ enddo -+ -+ call gsync() -+ -+c identity of neighbour node for systolic transfer -+ -+ jdnode=mod(idnode+1,mxnode) -+ -+ do k=1,mxnode-1 -+ -+c identity of node of origin of incoming data -+ -+ kdnode=mod(idnode+mxnode-k,mxnode) -+ -+c identity of incoming groups -+ -+ kgrp1 = (kdnode*ngrp)/mxnode+1 -+ kgrp2 = ((kdnode+1)*ngrp)/mxnode -+ -+ call MPI_IRECV(buffer(4*nsize+1),4*nsize,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Merge4_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(buffer(1),4*nsize,MPI_DOUBLE_PRECISION,jdnode, -+ x Merge4_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+c merge the incoming data into current arrays -+ -+ j=4*nsize -+ -+ do i=kgrp1,kgrp2 -+ -+ q0(i)=buffer(j+1) -+ q1(i)=buffer(j+2) -+ q2(i)=buffer(j+3) -+ q3(i)=buffer(j+4) -+ j=j+4 -+ -+ enddo -+ -+c shift new data to start of buffer -+ -+ do i=1,4*nsize -+ -+ buffer(i)=buffer(4*nsize+i) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine shlmerge(idnode,mxnode,ntshl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for merging core-shell velocity data -+c to restore data replication on all nodes -+c -+c copyright - daresbury laboratory 1993 -+c author - w. smith february 1993 -+c MPI version - w. smith june 1995 -+c CPP version - w. smith june 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use config_module -+ use core_shell_module -+ use error_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer idnode,mxnode,ntshl,ierr,i,j,k,n,m,ishl1,ishl2,nsize -+ integer jdnode,kshl1,kshl2,kdnode -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+c check that buffer is large enough -+ -+ nsize=8*((ntshl+mxnode-1)/mxnode) -+ -+ if(mxbuff.lt.2*nsize)call error(idnode,425) -+ -+c block indices -+ -+ ishl1 = (idnode*ntshl)/mxnode+1 -+ ishl2 = ((idnode+1)*ntshl)/mxnode -+ -+c load initial transfer buffer -+ -+ n=0 -+ m=0 -+ -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c indices of core and shell -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ buffer(n+1)=dble(i) -+ buffer(n+2)=dble(j) -+ buffer(n+3)=vxx(i) -+ buffer(n+4)=vyy(i) -+ buffer(n+5)=vzz(i) -+ buffer(n+6)=vxx(j) -+ buffer(n+7)=vyy(j) -+ buffer(n+8)=vzz(j) -+ n=n+8 -+ -+ enddo -+ -+ call gsync() -+ -+c identity of neighbour node for systolic transfer -+ -+ jdnode=mod(idnode+1,mxnode) -+ -+ do k=1,mxnode-1 -+ -+c identity of node of origin of incoming data -+ -+ kdnode=mod(idnode+mxnode-k,mxnode) -+ -+c systolic data pulse to transfer data -+ -+ call MPI_IRECV(buffer(nsize+1),nsize,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Shell_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(buffer(1),nsize,MPI_DOUBLE_PRECISION,jdnode, -+ x Shell_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+c merge the incoming data into current arrays -+ -+ n=nsize -+ -+c block indices -+ -+ kshl1 = (kdnode*ntshl)/mxnode+1 -+ kshl2 = ((kdnode+1)*ntshl)/mxnode -+ -+ do m=kshl1,kshl2 -+ -+ i=nint(buffer(n+1)) -+ j=nint(buffer(n+2)) -+ -+ vxx(i)=buffer(n+3) -+ vyy(i)=buffer(n+4) -+ vzz(i)=buffer(n+5) -+ vxx(j)=buffer(n+6) -+ vyy(j)=buffer(n+7) -+ vzz(j)=buffer(n+8) -+ -+ n=n+8 -+ -+ enddo -+ -+c shift new data to start of buffer -+ -+ do i=1,nsize -+ -+ buffer(i)=buffer(nsize+i) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for passing coordinate updates between -+c nodes during the shake iteration cycle -+c -+c parallel replicated data algorithm -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith august 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer idnode, mxnode, natms,ierr,i,k,j0,k0,n,jdnode,j -+ integer lishap(mxlshp),lashap(mxproc) -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+ real*8 xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ real*8 txx(mxatms),tyy(mxatms),tzz(mxatms) -+ real*8 buffer(mxbuff) -+ -+c store increments to be transferred -+ -+ do i=1,natms -+ -+ txx(i)=xxt(i) -+ tyy(i)=yyt(i) -+ tzz(i)=zzt(i) -+ -+ enddo -+ -+c transfer coordinate data to all nodes -+ -+ call gsync() -+ -+ do k=1,mxnode-1 -+ -+ i=0 -+ j0=0 -+ if(k.gt.1)j0=lashap(k-1) -+ -+ do j=j0+1,lashap(k) -+ -+ buffer(i+1)=txx(lishap(j)) -+ buffer(i+2)=tyy(lishap(j)) -+ buffer(i+3)=tzz(lishap(j)) -+ i=i+3 -+ -+ enddo -+ -+c inter node communication -+ -+ k0=0 -+ -+ if(k+1.lt.mxnode)k0=lashap(mxnode-k-1) -+ n=3*(lashap(mxnode-k)-k0) -+ jdnode=mod(idnode+k,mxnode) -+ -+c check for zero length messages -+ -+ if(n.gt.0) call MPI_IRECV(buffer(i+1),n,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Shmove_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ if(i.gt.0) call MPI_SEND(buffer(1),i,MPI_DOUBLE_PRECISION, -+ x jdnode,Shmove_tag+k,MPI_COMM_WORLD,ierr) -+ -+ if(n.gt.0) call MPI_WAIT(request,status,ierr) -+ -+c consolidate transferred data -+ -+ do j=k0+1,lashap(mxnode-k) -+ -+ xxt(lishap(j))=xxt(lishap(j))+buffer(i+1) -+ yyt(lishap(j))=yyt(lishap(j))+buffer(i+2) -+ zzt(lishap(j))=zzt(lishap(j))+buffer(i+3) -+ i=i+3 -+ -+ enddo -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for splicing together coordinate arrays -+c across a number of processors during shake algorithm -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - w. smith march 1993 -+c -+c second version of splice -+c -+c********************************************************************* -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ integer idnode,natms,listme,listot,j,n3,i,lastot -+ real*8 xxx,yyy,zzz,buffer -+ -+ dimension listme(mxatms),listot(mxatms) -+ dimension xxx(natms),yyy(natms),zzz(natms) -+ dimension buffer(mxbuff) -+ -+c check buffer size -+ -+ if(mxbuff.lt.6*natms) call error(idnode,190) -+ -+c load initial transfer buffers -+ -+ j=3*natms -+ n3=3*natms -+ -+ do i=1,natms -+ -+ if(listot(i).gt.0)then -+ -+ if(listme(i).gt.0)then -+ -+ buffer(j+1)=xxx(i) -+ buffer(j+2)=yyy(i) -+ buffer(j+3)=zzz(i) -+ -+ else -+ -+ buffer(j+1)=0.d0 -+ buffer(j+2)=0.d0 -+ buffer(j+3)=0.d0 -+ -+ endif -+ -+ j=j+3 -+ -+ endif -+ -+ enddo -+ -+ lastot=j-n3 -+ -+c splice constraint coordinates -+ -+ if(lastot.gt.0) call gdsum(buffer(n3+1),lastot,buffer(1)) -+ -+c reconstitute coordinate arrays -+ -+ j=n3 -+ -+ do i=1,natms -+ -+ if(listot(i).gt.0)then -+ -+ xxx(i)=buffer(j+1)/dble(listot(i)) -+ yyy(i)=buffer(j+2)/dble(listot(i)) -+ zzz(i)=buffer(j+3)/dble(listot(i)) -+ -+ j=j+3 -+ -+ endif -+ -+ enddo -+ -+ return -+ end -diff -urN dl_class_1.9.orig/srcmod/metafreeze_module.f dl_class_1.9/srcmod/metafreeze_module.f ---- dl_class_1.9.orig/srcmod/metafreeze_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/metafreeze_module.f 2011-07-26 18:53:41.000000000 +0200 -@@ -0,0 +1,3990 @@ -+ module metafreeze_module -+ -+c--------------------------------------------------------------------- -+c -+c Metafreeze module for metadynamics -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c Adapted for dl_poly classic w. smith dec 2010 -+c -+c--------------------------------------------------------------------- -+ -+ implicit none -+ -+c Minimise usage by making everything private -+ -+ private -+ -+c--------------------------------------------------------------------- -+c P u b l i c R o u t i n e s -+c ... unless exposed here. -+c--------------------------------------------------------------------- -+ -+ public :: define_metadynamics ! Called to intitialise this module -+ public :: metafreeze_driver ! Called at every MD time-step -+ -+c--------------------------------------------------------------------- -+c P u b l i c V a r i a b l e s -+c--------------------------------------------------------------------- -+ -+ public :: lmetadyn ! Is this a metadynamics calculation? -+ public :: driven ! Is this atom site involved in metadynamics -+ public :: lstein,ltet,lglobpe,llocpe,ncolvar,nq4,nq6,ntet,hkey -+ public :: meta_step_int,globpe_scale,locpe_scale,ref_W_aug -+ public :: h_aug,wt_Dt -+ -+c------------------------------------ -+c Populated from CONTROL file -+c------------------------------------ -+ -+ logical,save :: lmetadyn =.false. ! Master metadynamics flag -+ -+c------------------------------------------------------- -+c Energy, virial, stress and forces from 'local' pe -+c Populated by dlpoly energy routines -+c------------------------------------------------------- -+ -+ -+ public :: eng_loc,vir_loc,stress_loc -+ public :: fxx_loc,fyy_loc,fzz_loc -+ -+c---------------------------------------------------------------------- -+c Data accumulated for local potential energy (computed elsewhere) -+c---------------------------------------------------------------------- -+ -+ real(8),save :: eng_loc,vir_loc -+ real(8),dimension(9),save :: stress_loc -+ real(8),allocatable,dimension(:),save :: fxx_loc,fyy_loc,fzz_loc -+ -+c--------------------------------------------------------------------- -+c P r i v a t e V a r i a b l e s -+c--------------------------------------------------------------------- -+ -+c---------------------------------------------------------------- -+c Collective variables and derivatives of v_aug w.r.t colvars -+c---------------------------------------------------------------- -+ -+ integer,parameter :: maxhis = 150000 ! Size of history arrays -+ real(8),allocatable,dimension(:),save :: colvar,dcolvar -+ real(8),allocatable,dimension(:),save :: colvar_scale -+ -+c---------------------------------------------------------------- -+c Positions and heights of previous Gaussians in colvar space -+c---------------------------------------------------------------- -+ -+ real(8),allocatable,dimension(:,:),save :: colvar_his -+ real(8),allocatable,dimension(:),save :: w_aug -+ -+c------------------------------ -+c Read from CONTROL file -+c------------------------------ -+ -+ integer,save :: ncolvar = 0 ! Total number of collvars -+ logical,save :: lstein =.false. ! Q4/Q6 collective variables -+ logical,save :: ltet =.false. ! Tetrahedral order parameter -+ logical,save :: lglobpe =.false. ! Global potential energy -+ logical,save :: llocpe =.false. ! Local potential energy -+ -+ integer,save :: nq4 = 0 ! Number of Q4 pair types -+ integer,save :: nq6 = 0 ! Number of Q6 pair types -+ integer,save :: ntet = 0 ! Number of zeta triplets -+ -+ real(8),save :: globpe_scale = 1.0d0 ! Scaling factors for local -+ real(8),save :: locpe_scale = 1.0d0 ! and global pe colvars -+ -+ real(8),save :: ref_W_aug=1.0d0 ! Reference Gaussian height -+ real(8),save :: h_aug=1.0d0 ! Gaussian width -+ integer,save :: hkey=0 ! Height control scheme -+ real(8),save :: wt_Dt=100.0d0 ! "Well-tempered" parameter -+ integer,save :: meta_step_int=5 ! interval between depositions -+ -+c---------------------------------------- -+c Read from STEINHARDT or TETRAHEDRAL -+c---------------------------------------- -+ -+c Global Steinhardt order parameters -+ -+ real(8),allocatable,dimension(:),save :: q4_global -+ real(8),allocatable,dimension(:),save :: q6_global -+ -+c Global Tetrahedral order parameters -+ -+ real(8),allocatable,dimension(:),save :: zeta_global -+ -+c Bookkeeping arrays for order parameter computation -+ -+ character(8),allocatable,dimension(:,:),save :: q4label -+ character(8),allocatable,dimension(:,:),save :: q6label -+ character(8),allocatable,dimension(:),save :: zetalabel -+ -+c Inner and outer cutoffs -+ -+ real(8),allocatable,dimension(:,:),save :: q4cutoff -+ real(8),allocatable,dimension(:,:),save :: q6cutoff -+ real(8),allocatable,dimension(:,:),save :: zetacutoff -+ -+c Scaling factors for q4 and q6 -+ -+ real(8),allocatable,dimension(:),save :: q4scale -+ real(8),allocatable,dimension(:),save :: q6scale -+ real(8),allocatable,dimension(:),save :: zetascale -+ -+c Number of nearest neighbours for q4, q6 and zeta -+ -+ integer,allocatable,dimension(:),save :: q4nn,q6nn -+ integer,allocatable,dimension(:),save :: zetann -+ -+c------------------------------------------------------------ -+c Arrays holding data for computation of order parameters -+c------------------------------------------------------------ -+ -+c Steinhardt site-site interaction arrays -+ -+ integer,allocatable,dimension(:,:),save :: q4site -+ integer,allocatable,dimension(:,:),save :: q6site -+ integer,allocatable,dimension(:) ,save :: zetasite -+ -+c Number of included sites -+ -+ integer,allocatable,dimension(:),save :: q4ninc -+ integer,allocatable,dimension(:),save :: q6ninc -+ integer,allocatable,dimension(:),save :: zetaninc -+ -+c Real and imaginary parts of q4bar and q6bar -+ -+ real(8),allocatable,dimension(:,:),save :: ReQ6bar,ImQ6bar -+ real(8),allocatable,dimension(:,:),save :: ReQ4bar,ImQ4bar -+ -+c Max number of entries in co-ordination shell -+ -+ integer,parameter :: mxflist = 50 -+ integer :: mxninc -+ -+c Full neighbour list for Tetrahedral order parameter -+ -+ integer,allocatable,dimension(:) ,save :: nflist -+ integer,allocatable,dimension(:,:),save :: flist -+ -+c------------------------------------- -+c Internal bookkeeping -+c------------------------------------- -+ -+ logical,allocatable,dimension(:),save :: driven ! Metadynamics option -+ integer,save :: meta_step=1 ! Current metadynamics step number -+ real(8),save :: meta_energy ! Value of metadynamics bias potential -+ -+ integer,save :: wl_nbins=30 ! Number of bins for WL recursion -+ integer,save :: wl_cycle=0 ! Current WL cycle -+ real(8),save :: wl_range=0.175 ! range of WL -+ real(8),allocatable,dimension(:),save :: wl_bin ! WL bins -+ -+c-------------------------------------- -+c Miscellaneous internal variables -+c-------------------------------------- -+ -+ integer,allocatable,dimension(:) :: buff ! Comms buffer -+ -+c File units -+ -+ integer,save :: stn = 91 ! STEINHARDT -+ integer,save :: mtd = 92 ! METADYNAMICS -+ integer,save :: zta = 93 ! ZETA -+ integer,save :: wlb = 94 ! WL_BINS.DAT -+ -+c Error flag -+ -+ integer,dimension(100) :: ierr = 0 -+ -+c Local store of comms variables -+c Assuming no task farming, comms will require changing if farmed -+ -+ integer, save :: myrank,commsize -+ logical, save :: onroot -+ real(8),save :: kt -+ -+ contains -+ -+ Subroutine Metafreeze_Driver -+ x (imcon,natms,temp,nstep,engcfg,virtot,engord,virord) -+ -+c--------------------------------------------------------------------- -+c Top level metadynamics routine called after evaluation of all -+c other energetic and force terms within the main molecular -+c dynamics loop. -+c -+c 1. Computes the ncolvar order parameters -+c 2. Deposits a new Gaussian at the current collective variables -+c as the current number of steps reaches meta_step_int -+c 3. Computed the bias potential and its derivative w.r.t. the -+c ncolvar collective variables. -+c 4. Computes the forces stresses and virial resulting from the -+c bias -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ use setup_module, only : boltz -+ use config_module, only : fxx,fyy,fzz,stress -+ -+ implicit none -+ -+ integer,intent(in) :: nstep,imcon,natms -+ real(8),intent(in) :: engcfg,virtot,temp -+ real(8),intent(out) :: engord,virord -+ -+c Local variables -+ -+ integer :: k,iq,itet,ibin,nfail,my_meta_step -+ integer,save :: nlastg = 0 -+ real(8) :: height,buff1,wl_mean -+ logical :: flat,safe -+ -+c------------------------------------------------------ -+c Compute order parameters / collective variables -+c------------------------------------------------------ -+ -+c Steinhardt order parameters -+ -+ if ( nq4>0.or.nq6>0 ) call compute_steinhardt(imcon,natms) -+ -+ k = 1 -+ do iq = 1,nq4 -+ colvar(k) = q4_global(iq) -+ k = k + 1 -+ end do -+ do iq = 1,nq6 -+ colvar(k) = q6_global(iq) -+ k = k + 1 -+ end do -+ -+c Tetrahedral order parameters -+ -+ if ( ntet > 0 ) then -+ call compute_tet_nlist(imcon,natms) -+ call compute_tetrahedral(imcon,natms) -+ end if -+ -+ do itet = 1,ntet -+ colvar(k) = zeta_global(itet) -+ k = k + 1 -+ end do -+ -+c Energy order parameters -+ -+ if (lglobpe) then -+ colvar(k) = engcfg -+ k = k + 1 -+ end if -+ if (llocpe) then -+ -+c Global reduction of local virial and energy -+ -+ if ( commsize > 1 ) call gdsum(eng_loc,1,buff1) -+ if ( commsize > 1 ) call gdsum(vir_loc,1,buff1) -+ colvar(k) = eng_loc -+ k = k + 1 -+ end if -+ -+ if ( k-1/=ncolvar ) call Mfrz_Error(2500,0.d0) -+ -+ if ( hkey==1 ) then -+ k = int(dble(wl_nbins)*colvar(1)/wl_range) + 1 -+ if ( k < wl_nbins) wl_bin(k) = wl_bin(k) + 1.0d0 -+ end if -+ -+c-------------------------------------------------------- -+c Deposit a new Gaussian if now is the correct time -+c-------------------------------------------------------- -+ -+ if ( (mod(nstep,meta_step_int)==0).and.(nstep>nlastg) ) then -+ nlastg = nstep ! Avoid multiple depositions at the -+ ! same timestep (relaxed shell model) -+ -+ select case (hkey) -+ -+ case(0) -+ -+c Always deposit Gaussians of the same height -+ -+ height = ref_W_aug -+ -+ case(1) -+ -+c Wang-Landau style recursion -+ -+ open(unit=wlb,file='WL_BINS.DAT',status='replace') -+ -+ do ibin = 1,wl_nbins -+ write(wlb,*)ibin,wl_bin(ibin) -+ end do -+ -+ close(wlb) -+ -+ if ( ncolvar/=1 ) then -+ call Mfrz_Error(2501,0.d0) -+ else -+ -+ height = ref_W_aug*(0.5d0**dble(wl_cycle)) -+ -+ nfail = 0 -+ wl_mean = 0.d0 -+ do ibin = 6,wl_nbins-5 -+ wl_mean = wl_mean + wl_bin(ibin) -+ nfail = nfail + 1 -+ end do -+ wl_mean = wl_mean/dble(nfail) -+ -+ nfail = 0 -+ flat = .true. -+ do ibin = 6,wl_nbins-5 -+ if ( wl_bin(ibin) < 0.8d0*wl_mean ) then -+ if ( nfail > 2 ) flat = .false. -+ nfail = nfail + 1 -+ end if -+ end do -+ -+ if ( flat.and.(sum(wl_bin)>50.0d0) ) then -+ wl_cycle = wl_cycle + 1 -+ wl_bin = 0.0d0 -+ end if -+ -+ height = ref_W_aug*(0.5d0**dble(wl_cycle)) -+ -+ end if -+ -+ case(2) -+ -+c Well-tempered metadynamics -+ -+ meta_energy = 0.0d0 -+ call compute_bias_potential() -+ -+ height = ref_W_aug*exp(-meta_energy/wt_Dt) -+ -+ case default -+ -+ call Mfrz_Error(2502,0.d0) -+ -+ end select -+ -+ call deposit_gaussian(height,temp) -+ my_meta_step = (meta_step-1)/commsize + 1 -+ safe = ( maxhis >= my_meta_step ) -+ call gstate(safe) -+ if ( .not.safe ) call Mfrz_Error(2503,0.d0) -+ -+ end if -+ -+c----------------------------------------------------------- -+c Compute the bias potential and its derivatives w.r.t. -+c to the ncolvar collective variables. -+c----------------------------------------------------------- -+ -+ call compute_bias_potential() -+ -+c----------------------------------------------------------- -+c Add in the forces, stresses and virial contributions -+c from this derivative. -+c----------------------------------------------------------- -+ -+ virord = 0.0d0 ! Zero the virial -+ -+c Must compute contributions from pe order parameters -+c first before we change any forces. -+ -+ k = nq4+nq6+ntet+1 -+ -+c Energy order parameters -+ -+ if (lglobpe) then -+ -+ fxx(:) = fxx(:)*(1.0d0+dcolvar(k)) -+ fyy(:) = fyy(:)*(1.0d0+dcolvar(k)) -+ fzz(:) = fzz(:)*(1.0d0+dcolvar(k)) -+ -+c correct for later summation: -+ -+ virord = virord+dcolvar(k)*virtot/dble(commsize) -+ stress = stress*(1.0d0+dcolvar(k)) -+ -+ end if -+ if (llocpe) then -+ -+ fxx(:) = fxx(:) + fxx_loc(:)*dcolvar(k) -+ fyy(:) = fyy(:) + fyy_loc(:)*dcolvar(k) -+ fzz(:) = fzz(:) + fzz_loc(:)*dcolvar(k) -+ -+c correct for later summation: -+ -+ virord = virord + dcolvar(k)*vir_loc/dble(commsize) -+ stress = stress + stress_loc*dcolvar(k) -+ -+ end if -+ -+c Steinhardt order parameters -+ -+ if ( nq4>0.or.nq6>0 ) call -+ x compute_steinhardt_forces(imcon,natms,engord,virord) -+ -+c Tetrahedral order parameters -+ -+ if ( ntet > 0 ) call -+ x compute_tetrahedral_forces(imcon,natms,engord,virord) -+ -+c global reduction of virord -+ -+ if ( commsize > 1 ) call gdsum(virord,1,buff1) -+ -+ engord = meta_energy -+ -+ return -+ -+ end Subroutine Metafreeze_Driver -+ -+ Subroutine Deposit_Gaussian(height,temp) -+ -+c--------------------------------------------------------------------- -+c -+c Deposits a new Gaussian at the current collective variables and -+c appends to the METADYNAMICs file. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ use setup_module, only : boltz -+ -+ implicit none -+ -+ real(8),intent(in) :: height,temp -+ integer :: my_meta_step -+ character(11) :: fmtstring -+ -+c store current order parameters and Gaussian height -+ -+ if ( mod(meta_step-1,commsize) == myrank ) then -+ -+ my_meta_step = (meta_step-1)/commsize + 1 -+ w_aug(my_meta_step) = height -+ colvar_his(:,my_meta_step) = colvar(:) -+ -+ end if -+ -+ if (onroot) then -+ -+c Create format string -+ -+ write(fmtstring,'("(I8,",I1,"E15.6)")')ncolvar+1 -+ -+c write METADYNAMICS file -+ -+ open(unit=mtd,file='METADYNAMICS',status='old',position= -+ x 'append',iostat=ierr(1)) -+ write(unit=mtd,fmt=fmtstring)meta_step,colvar(:), -+ x height/(temp*boltz) -+ close(unit=mtd) -+ -+ end if -+ -+ meta_step = meta_step+1 -+ -+ return -+ -+ end Subroutine Deposit_Gaussian -+ -+ Subroutine Compute_Bias_Potential() -+ -+c--------------------------------------------------------------------- -+c -+c Computes the augmenting bias potential as a function of the -+c collective variables. Also computes the derivative of the bias -+c potential w.r.t. the collective variables required to compute -+c the metadynamics forces. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ implicit none -+ -+ integer :: istep,ic,k,my_meta_step -+ real(8) :: vsq,exp1,dWpsq -+ real(8),allocatable,dimension(:) :: buff1,buff2 -+ -+ allocate(buff1(1:2*(ncolvar+1)),stat=ierr(1)) -+ allocate(buff2(1:2*(ncolvar+1)),stat=ierr(2)) -+ -+ if (any(ierr/=0)) call Mfrz_Error(2504,0.d0) -+ -+c Set squared-width of gaussians -+ -+ dWpsq = 1.0d0/h_aug**2 -+ meta_energy = 0.0d0 -+ -+c Zero accumulators of derivative w.r.t. each order parameter -+ -+ dcolvar(:) = 0.0d0 -+ my_meta_step = (meta_step-1)/commsize + 1 -+ do istep=1,my_meta_step -+ -+ vsq = 0.0d0 -+ do ic = 1,ncolvar -+ vsq = vsq + ( colvar_scale(ic)*(colvar(ic) - -+ x colvar_his(ic,istep)) )**2 -+ end do -+ exp1 = w_aug(istep)*exp(-0.5d0*vsq*dWpsq) -+ do ic = 1,ncolvar -+ dcolvar(ic) = dcolvar(ic) - (colvar_scale(ic)**2)*exp1* -+ x (colvar(ic) - colvar_his(ic,istep))*dWpsq -+ end do -+ -+ meta_energy = meta_energy + exp1 -+ -+ end do -+ -+ buff1(1) = meta_energy -+ k = 2 -+ do ic = 1,ncolvar -+ buff1(k) = dcolvar(ic) -+ k = k + 1 -+ end do -+ -+ if ( commsize > 1 ) then -+ call gdsum(buff1,ncolvar+1,buff2) -+ end if -+ -+ meta_energy = buff1(1) -+ -+ k = 2 -+ do ic=1,ncolvar -+ dcolvar(ic) = buff1(k) -+ k = k + 1 -+ end do -+ -+ deallocate(buff1,buff2,stat=ierr(1)) -+ -+ return -+ -+ end Subroutine Compute_Bias_Potential -+ -+ Subroutine Define_Metadynamics(tm,ts,natms,temp) -+ -+c--------------------------------------------------------------------- -+c Processes the metadynamics input file. This is done in several -+c stages. -+c 1. Process the metadynamics control data read from the CONTROL -+c file, which defines the number of collective variables and -+c indicates if we need to read from auxilliary input files -+c (e.g. STEINHARDT or ZETA) which define order parameters. -+c 2. Read and process these auxilliary files. -+c 3. Process the information obtained from the CONTROL file which -+c controls the properties of the Gaussians used to build the -+c bias potential. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c Adapted w. smith - jan 2011 -+c -+c--------------------------------------------------------------------- -+ -+ use site_module -+ use config_module, only : ltype -+ use parse_module -+ -+ implicit none -+ -+ integer,intent(in) :: tm,ts,natms -+ real(8),intent(in) :: temp -+ -+c Local variables -+ -+ integer :: isite,jsite,ilin,i,iq,iatm0,iatm1,istrd,iatm,k,n,idum -+ logical :: lexist,go,safe -+ real(8) :: waug,dummy(1) -+ -+c Allocate the driven list. Modifications elsewhere in DLPOLY always -+c check if sites are driven (for accumulation of local PE) and hence -+c this should be allocated if this is a metadynamics run or not. -+ -+ allocate(driven(1:size(unqatm)),stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2505,0.d0) -+ driven = .false. -+ -+c Do nothing else if the metafreeze flag has not been set in CONTROL -+ -+ if (.not.lmetadyn) then -+ return -+ end if -+ -+c Make local copy of rank and communicator size and set onroot flag -+ -+ myrank=tm -+ commsize = ts -+ onroot = (myrank==0) -+ -+c$$$ DEBUG -+cc$$$ if (onroot) write(0,'("================================")') -+cc$$$ if (onroot) write(0,'("Available sites from site module")') -+cc$$$ if (onroot) write(0,'("================================")') -+cc$$$ if (onroot) then -+cc$$$ do isite = 1,size(unqatm) -+cc$$$ write(0,'("Site index ",i4,": ",a8)')isite,unqatm(isite) -+cc$$$ end do -+cc$$$ end if -+ -+c Cannot bias the global and local PE in the same run. -+ -+ if ( lglobpe.and.llocpe ) call Mfrz_Error(2509,0.d0) -+ -+c Allocate local force arrays if anything is driven. -+ -+ allocate(fxx_loc(1:mxatms),stat=ierr(1)) -+ allocate(fyy_loc(1:mxatms),stat=ierr(2)) -+ allocate(fzz_loc(1:mxatms),stat=ierr(3)) -+ if (any(ierr/=0)) call Mfrz_Error(2510,0.d0) -+ -+c Allocate arrays to hold collective variables -+ -+ allocate( colvar(1:ncolvar),stat=ierr(1)) -+ allocate(dcolvar(1:ncolvar),stat=ierr(2)) -+ allocate(colvar_his(1:ncolvar,1:maxhis),stat=ierr(3)) -+ allocate(colvar_scale(1:ncolvar),stat=ierr(4)) -+ allocate(w_aug(1:maxhis),stat=ierr(5)) -+ if (any(ierr/=0)) call Mfrz_Error(2511,0.d0) -+ -+c Allocate Wang-Landau bin array -+ -+ allocate(wl_bin(1:wl_nbins),stat=ierr(1)) -+ if (any(ierr/=0)) call Mfrz_Error(2512,0.d0) -+ wl_bin = 0.0d0 -+ -+c------------------------------------------------------------- -+c Process Steinhardt order parameter settings if present -+c------------------------------------------------------------- -+ -+ if ( lstein ) then -+ -+ allocate(q4label(1:2,1:nq4),stat=ierr(1)) -+ allocate(q6label(1:2,1:nq6),stat=ierr(2)) -+ allocate(q4cutoff(1:2,1:nq4),stat=ierr(3)) -+ allocate(q6cutoff(1:2,1:nq6),stat=ierr(4)) -+ allocate(q4scale(1:nq4),stat=ierr(5)) -+ allocate(q6scale(1:nq6),stat=ierr(6)) -+ allocate(q4nn(1:nq4),stat=ierr(7)) -+ allocate(q6nn(1:nq6),stat=ierr(8)) -+ allocate(q4ninc(1:nq4),stat=ierr(9)) -+ allocate(q6ninc(1:nq6),stat=ierr(10)) -+ allocate(buff(1:max(nq4,nq6)),stat=ierr(11)) -+ allocate(q4_global(1:nq4),stat=ierr(12)) -+ allocate(q6_global(1:nq6),stat=ierr(13)) -+ allocate(ReQ4Bar(-4:+4,1:nq4),stat=ierr(14)) -+ allocate(ImQ4Bar(-4:+4,1:nq4),stat=ierr(15)) -+ allocate(ReQ6Bar(-6:+6,1:nq6),stat=ierr(16)) -+ allocate(ImQ6Bar(-6:+6,1:nq6),stat=ierr(17)) -+ if (any(ierr/=0)) call Mfrz_Error(2515,0.d0) -+ -+c Open STEINHARDT file and process -+ -+ if (onroot) then -+ open(unit=stn,file='STEINHARDT',status='old',iostat=ierr(1)) -+ else -+ ierr(1)=0 -+ endif -+ call gisum(ierr(1),1,ierr(2)) -+ if ( ierr(1)/=0 ) call Mfrz_Error(2516,0.d0) -+ -+ ilin = 1 -+ safe=.true. -+ if (nq4>0) then -+ call getrec(safe,myrank,stn) ! Ignore q4 comment line -+ ilin = ilin + 1 -+ do i = 1,nq4 -+ call getrec(safe,myrank,stn) -+ if (safe) then -+ call getword(q4label(1,i),record,8,lenrec) -+ call getword(q4label(2,i),record,8,lenrec) -+ q4cutoff(1,i)=dblstr(record,lenrec,idum) -+ q4cutoff(2,i)=dblstr(record,lenrec,idum) -+ q4scale(i)=dblstr(record,lenrec,idum) -+ q4nn(i)=intstr(record,lenrec,idum) -+ ierr(ilin)=0 -+ else -+ ierr(ilin)=1 -+ endif -+ ilin = ilin + 1 -+ end do -+ end if -+ if (nq6>0) then -+ call getrec(safe,myrank,stn) ! Ignore q6 comment line -+ ilin = ilin + 1 -+ do i = 1,nq6 -+ call getrec(safe,myrank,stn) -+ if (safe) then -+ call getword(q6label(1,i),record,8,lenrec) -+ call getword(q6label(2,i),record,8,lenrec) -+ q6cutoff(1,i)=dblstr(record,lenrec,idum) -+ q6cutoff(2,i)=dblstr(record,lenrec,idum) -+ q6scale(i)=dblstr(record,lenrec,idum) -+ q6nn(i)=intstr(record,lenrec,idum) -+ ierr(ilin)=0 -+ else -+ ierr(ilin)=1 -+ endif -+ ilin = ilin + 1 -+ end do -+ end if -+ if (onroot) close(unit=stn) -+ -+ call gisum(ierr(1),ilin-1,ierr(ilin)) -+ do i = 1,ilin-1 -+ if (ierr(i)/=0) then -+ call Mfrz_Error(2521,dble(i)) -+ end if -+ end do -+ -+c Create array indicating which site-site connections use -+c which set of q4 cut-offs, scaling factors and num neighbours. -+ -+ allocate(q4site(1:size(unqatm),1:size(unqatm)),stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2517,0.d0) -+ q4site(:,:) = 0 -+ -+ do isite = 1,size(unqatm) -+ do jsite = isite,size(unqatm) -+ do iq = 1,nq4 -+ if ((q4label(1,iq)==unqatm(isite)).and. -+ x q4label(2,iq)==unqatm(jsite)) then -+ q4site(jsite,isite) = iq -+ q4site(isite,jsite) = iq -+ driven(jsite) = .true. -+ driven(isite) = .true. -+ end if -+ end do -+ end do -+ end do -+ -+ allocate(q6site(1:size(unqatm),1:size(unqatm)),stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2518,0.d0) -+ q6site(:,:) = 0 -+ do isite = 1,size(unqatm) -+ do jsite = isite,size(unqatm) -+ do iq = 1,nq6 -+ if ((q6label(1,iq)==unqatm(isite)).and. -+ x q6label(2,iq)==unqatm(jsite)) then -+ q6site(jsite,isite) = iq -+ q6site(isite,jsite) = iq -+ driven(jsite) = .true. -+ driven(isite) = .true. -+ end if -+ end do -+ end do -+ end do -+ -+c Count number of included sites -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ q4ninc = 0 -+ q6ninc = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ isite = ltype(iatm) -+ -+ do iq = 1,nq4 -+ if (unqatm(isite)==q4label(1,iq)) q4ninc(iq) = q4ninc(iq) + 1 -+ end do -+ do iq = 1,nq6 -+ if (unqatm(isite)==q6label(1,iq)) q6ninc(iq) = q6ninc(iq) + 1 -+ end do -+ -+ end do -+ -+ if ( commsize > 0 ) then -+ if (nq4>0) call gisum(q4ninc,nq4,buff(1:nq4)) -+ if (nq6>0) call gisum(q6ninc,nq6,buff(1:nq6)) -+ end if -+ -+ deallocate(buff,stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2519,0.d0) -+ -+ end if ! end if steinhardt order parameters -+ -+ if ( ltet ) then -+ -+ allocate(zetacutoff(1:2,1:ntet),stat=ierr(1)) -+ allocate(zeta_global(1:ntet),stat=ierr(2)) -+ allocate(zetascale(1:ntet),stat=ierr(3)) -+ allocate(zetalabel(1:ntet),stat=ierr(4)) -+ allocate(zetann(1:ntet),stat=ierr(5)) -+ allocate(zetaninc(1:ntet),stat=ierr(6)) -+ allocate(buff(1:ntet),stat=ierr(7)) -+ if (any(ierr/=0)) call Mfrz_Error(2522,0.d0) -+ -+c Open ZETA file and process -+ -+ if (onroot) then -+ open(unit=zta,file='ZETA',status='old',iostat=ierr(1)) -+ else -+ ierr(1)=0 -+ endif -+ call gisum(ierr(1),1,ierr(2)) -+ if ( ierr(1)/=0 ) call Mfrz_Error(2523,0.d0) -+ -+ ilin = 1 -+ safe=.true. -+ if (ntet>0) then -+ call getrec(safe,myrank,zta) ! Ignore comment line -+ ilin = ilin + 1 -+ do i = 1,ntet -+ read(unit=zta,fmt=*,iostat=ierr(ilin)) -+ x zetalabel(i),zetacutoff(:,i),zetascale(i),zetann(i) -+ call getrec(safe,myrank,zta) -+ if (safe) then -+ call getword(zetalabel(i),record,8,lenrec) -+ zetacutoff(1,i)=dblstr(record,lenrec,idum) -+ zetacutoff(2,i)=dblstr(record,lenrec,idum) -+ zetascale(i)=dblstr(record,lenrec,idum) -+ zetann(i)=intstr(record,lenrec,idum) -+ ierr(ilin)=0 -+ else -+ ierr(ilin)=1 -+ endif -+ ilin = ilin + 1 -+ end do -+ end if -+ if (onroot) close(unit=zta) -+ -+ call gisum(ierr(1),ilin-1,ierr(ilin)) -+ do i = 1,ilin-1 -+ if (ierr(i)/=0) then -+ call Mfrz_Error(2529,dble(i)) -+ end if -+ end do -+ -+c Create array indicating which site-site connections use -+c which set of q4 cut-offs, scaling factors and num neighbours. -+ -+ allocate(zetasite(1:size(unqatm)),stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2524,0.d0) -+ zetasite(:) = 0 -+ -+ do isite = 1,size(unqatm) -+ do iq = 1,ntet -+ if (zetalabel(iq)==unqatm(isite)) then -+ zetasite(isite) = iq -+ driven(isite) = .true. -+ end if -+ end do -+ end do -+ -+c Count number of included sites -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ zetaninc(:) = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ isite = ltype(iatm) -+ -+ do iq = 1,ntet -+ if (unqatm(isite)==zetalabel(iq)) -+ x zetaninc(iq) = zetaninc(iq) + 1 -+ end do -+ end do -+ -+ if (commsize>1) then -+ if (ntet>0) call gisum(zetaninc,ntet,buff) -+ end if -+ -+c$$$ do iq = 1,ntet -+c$$$ write(0,'("Number of sites for zeta type ",I5," : ",I5)') -+c$$$ x iq,zetaninc(iq) -+c$$$ end do -+ -+ mxninc = max(100,2*maxval(zetaninc)/commsize) -+ allocate(nflist(1:mxninc),stat=ierr(1)) -+ allocate(flist(1:mxflist,1:mxninc),stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2525,0.d0) -+ -+ deallocate(buff,stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2519,0.d0) -+ -+ end if ! end if tetrahedral order parameters -+ -+c Check total number of collective variables (ncolvar) matches total -+c number specified by nq4, nq6, ntet and potential energy flags. -+ -+ k = 0 -+ if (llocpe ) k = k + 1 -+ if (lglobpe ) k = k + 1 -+ k = k + ntet + nq4 + nq6 -+ if ( k /= ncolvar ) call Mfrz_Error(2527,0.d0) -+ -+c populate colvar_scale -+ -+ k = 1 -+ do iq = 1,nq4 -+ colvar_scale(k) = q4scale(iq) -+ k = k + 1 -+ end do -+ do iq = 1,nq6 -+ colvar_scale(k) = q6scale(iq) -+ k = k + 1 -+ end do -+ do iq = 1,ntet -+ colvar_scale(k) = zetascale(iq) -+ k = k + 1 -+ end do -+ if (lglobpe) then -+ colvar_scale(k) = globpe_scale -+ k = k + 1 -+ end if -+ if (llocpe) then -+ colvar_scale(k) = locpe_scale -+ k = k + 1 -+ end if -+ -+ -+c Convert into internal units -+ -+ wt_Dt = wt_Dt*temp*boltz -+ ref_W_aug = ref_W_aug*temp*boltz -+ kt = temp*boltz -+ -+c--------------------------------------------------------------------- -+c Purge the METADYNAMICS file or re-open and read if this is a -+c restart. N.B. we assume a restart if REVOLD if present and -+c ignore keyres. -+c--------------------------------------------------------------------- -+ -+ if (onroot) then -+ inquire(file='REVOLD',exist=lexist) -+ else -+ lexist=.true. -+ endif -+ call gstate(lexist) -+ -+ if (lexist) then -+ -+c read contents of METADYNAMICS file -+ -+ if (onroot) then -+ -+ open(unit=mtd,file='METADYNAMICS',status='old',iostat=ierr(1)) -+ -+ k = 0 -+ do -+ read(unit=mtd,fmt=*,end=10)meta_step,colvar(:),waug -+ waug = waug*temp*boltz -+ if (k == 0) then -+ n = (meta_step-1)/commsize + 1 -+ colvar_his(:,n)=colvar(:) -+ w_aug(n)=waug -+ else -+ dummy(1)=dble(meta_step) -+ call csend(17947,dummy,1,k,idum) -+ call csend(17948,colvar,ncolvar,k,ierr(3)) -+ dummy(1)=waug -+ call csend(17949,dummy,1,k,ierr(4)) -+ end if -+ -+ k = k + 1 -+ if (k == commsize) k = 0 -+ end do -+ -+ 10 close(unit=mtd) -+ -+ do k=1,commsize-1 -+ dummy(1)=-dble(meta_step) -+ call csend(17947,dummy,1,k,ierr(2)) -+ end do -+ -+ else -+ -+ go = .true. -+ do while(go) -+ -+ call crecv(17947,dummy,1) -+ meta_step=nint(dummy(1)) -+ ierr(2)=0 -+ -+ if ( meta_step < 0 ) then -+ meta_step = -meta_step -+ go = .false. -+ else -+ call crecv(17948,colvar,ncolvar) -+ ierr(3)=0 -+ call crecv(17949,dummy,1) -+ waug=dummy(1) -+ ierr(4)=0 -+ n = (meta_step-1)/commsize + 1 -+ colvar_his(:,n)=colvar(:) -+ w_aug(n)=waug -+ end if -+ -+ enddo -+ -+ end if -+ call gisum(ierr(1),4,ierr(5)) -+ do i=1,4 -+ if (ierr(i)/=0) call Mfrz_Error(2531,0.d0) -+ enddo -+ meta_step = meta_step + 1 -+ -+ else -+ -+c purge any existing METADYNAMICS file -+ -+ if (onroot) then -+ -+ open(unit=mtd,file='METADYNAMICS',status='replace', -+ x iostat=ierr(1)) -+ close(unit=mtd) -+ -+ end if -+ -+ end if -+ -+ return -+ -+ end Subroutine Define_Metadynamics -+ -+ Function Fc(r,inner_cut,outer_cut) -+ -+c--------------------------------------------------------------------- -+c -+c Computes the smooth cut-off function used when computing an order -+c parameter as a function of pair separation. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ implicit none -+ -+ real(8),parameter :: Pi=3.141592653589793238462643383279502884d0 -+ real(8),intent(in) :: r,inner_cut,outer_cut -+ real(8) :: fc -+ -+ if ( r > outer_cut ) then -+ fc = 0.0d0 -+ elseif ( r > inner_cut ) then -+ fc = 0.5d0*cos((r-inner_cut)*Pi/(outer_cut-inner_cut))+0.5d0 -+ elseif ( r <= inner_cut ) then -+ fc = 1.0d0 -+ else -+ call Mfrz_Error(2532,r) -+ end if -+ -+ return -+ -+ end Function Fc -+ -+ Function Dfc(r,inner_cut,outer_cut) -+ -+c--------------------------------------------------------------------- -+c Computes the derivative of the smooth cut-off function used when -+c computing an order parameter as a function of pair separation. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ implicit none -+ -+ real(8),parameter :: Pi=3.141592653589793238462643383279502884d0 -+ real(8),intent(in) :: r,inner_cut,outer_cut -+ real(8) :: dfc -+ -+ if ( r > outer_cut ) then -+ dfc = 0.0d0 -+ elseif ( r > inner_cut ) then -+ dfc = -0.5d0*sin((r-inner_cut)*Pi/(outer_cut-inner_cut)) -+ x *Pi/(outer_cut-inner_cut) -+ else -+ dfc = 0.0d0 -+ end if -+ -+ return -+ -+ end Function Dfc -+ -+ subroutine compute_steinhardt(imcon,natms) -+ -+c--------------------------------------------------------------------- -+c -+c Computes nq4 Q4 and nq6 Q6 global order parameters. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use setup_module, only : mxlist -+ use utility_module, only : images -+ -+ implicit none -+ -+c Arguments -+ -+ integer,intent(in) :: imcon,natms -+ -+c sqrt(pi/13) , sqrt(pi/9) , 1/3 -+ -+ real(8),parameter :: rpibtt = 0.491590249d0 -+ real(8),parameter :: rpibn = 0.590817950d0 -+ real(8),parameter :: third = 1.0d0/3.0d0 -+ -+c Prefactors for spherical harmonics with l = 6 -+ -+ real(8),parameter :: ypre6m6 = 0.48308411358006625446748d0 -+ real(8),parameter :: ypre6m5 = 1.67345245810009801701312d0 -+ real(8),parameter :: ypre6m4 = 0.35678126285399802686271d0 -+ real(8),parameter :: ypre6m3 = 0.65139048586771575166665d0 -+ real(8),parameter :: ypre6m2 = 0.32569524293385787583333d0 -+ real(8),parameter :: ypre6m1 = 0.41197551630114082055201d0 -+ real(8),parameter :: ypre6m0 = 0.06356920226762842462964d0 -+ real(8),parameter :: ypre6p1 = -0.41197551630114082055201d0 -+ real(8),parameter :: ypre6p2 = 0.32569524293385787583333d0 -+ real(8),parameter :: ypre6p3 = -0.65139048586771575166665d0 -+ real(8),parameter :: ypre6p4 = 0.35678126285399802686271d0 -+ real(8),parameter :: ypre6p5 = -1.67345245810009801701312d0 -+ real(8),parameter :: ypre6p6 = 0.48308411358006625446748d0 -+ -+c Prefactors for spherical harmonics with l = 4 -+ -+ real(8),parameter :: ypre4m4 = 0.44253269244498261159038d0 -+ real(8),parameter :: ypre4m3 = 1.25167147089835228968013d0 -+ real(8),parameter :: ypre4m2 = 0.33452327177864460416856d0 -+ real(8),parameter :: ypre4m1 = 0.47308734787878004013351d0 -+ real(8),parameter :: ypre4m0 = 0.10578554691520430930396d0 -+ real(8),parameter :: ypre4p1 = -0.47308734787878004013351d0 -+ real(8),parameter :: ypre4p2 = 0.33452327177864460416856d0 -+ real(8),parameter :: ypre4p3 = -1.25167147089835228968013d0 -+ real(8),parameter :: ypre4p4 = 0.44253269244498261159038d0 -+ -+c Maximum no. of entries in solvation list -+ -+ integer :: maxneigh -+ -+c Solvation shell information - Q4 -+ -+ real(8),allocatable,dimension(:) :: solvx4,solvy4,solvz4 -+ real(8),allocatable,dimension(:) :: solvrmag4,solvimag4,solvrsq4 -+ integer,allocatable,dimension(:) :: solvlist4,solvtype4 -+ integer :: isolvmax4 -+ -+c Solvation shell information - Q6 -+ -+ real(8),allocatable,dimension(:) :: solvx6,solvy6,solvz6 -+ real(8),allocatable,dimension(:) :: solvrmag6,solvimag6,solvrsq6 -+ integer,allocatable,dimension(:) :: solvlist6,solvtype6 -+ integer :: isolvmax6 -+ -+c separation vectors and powers thereof -+ -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ real(8) :: x,y,z -+ real(8) :: x2,y2,z2,x3,y3,z3 -+ real(8) :: x4,y4,z4,x5,y5,z5 -+ real(8) :: x6,y6,z6 -+ real(8) :: invrc,invrs -+ -+c Comms buffers -+ -+ real(8),allocatable,dimension(:) :: buff1,buff2 -+ -+c Temporaries -+ -+ real(8) :: tmpsq,f_ij,df_ij,ReYlm,ImYlm,tmpvar -+ -+c Loop counters -+ -+ integer :: iatm1,iatm0,iatm,isite,istrd,ii,isolv4,isolv6,isolv -+ integer :: idi,idj,limit,nn,k,jatm,jsite,q4type,q6type -+ integer :: itype,jtype,l,m,iq -+ -+ maxneigh = 100 ! Max number of atoms in coordination shell -+ -+ ierr = 0 ! Error flags -+ -+ allocate(xdf(1:mxlist),stat=ierr(1)) -+ allocate(ydf(1:mxlist),stat=ierr(2)) -+ allocate(zdf(1:mxlist),stat=ierr(3)) -+ -+ allocate(solvx4(1:maxneigh),stat=ierr(4)) -+ allocate(solvy4(1:maxneigh),stat=ierr(5)) -+ allocate(solvz4(1:maxneigh),stat=ierr(6)) -+ allocate(solvrmag4(1:maxneigh),stat=ierr(7)) -+ allocate(solvimag4(1:maxneigh),stat=ierr(8)) -+ allocate(solvrsq4 (1:maxneigh),stat=ierr(9)) -+ allocate(solvlist4(1:maxneigh),stat=ierr(10)) -+ allocate(solvtype4(1:maxneigh),stat=ierr(11)) -+ -+ allocate(solvx6(1:maxneigh),stat=ierr(12)) -+ allocate(solvy6(1:maxneigh),stat=ierr(13)) -+ allocate(solvz6(1:maxneigh),stat=ierr(14)) -+ allocate(solvrmag6(1:maxneigh),stat=ierr(15)) -+ allocate(solvimag6(1:maxneigh),stat=ierr(16)) -+ allocate(solvrsq6 (1:maxneigh),stat=ierr(17)) -+ allocate(solvlist6(1:maxneigh),stat=ierr(18)) -+ allocate(solvtype6(1:maxneigh),stat=ierr(19)) -+ if (any(ierr/=0)) call Mfrz_Error(2533,0.d0) -+ -+ allocate(buff1(1:18*nq4+26*nq6),stat=ierr(1)) -+ allocate(buff2(1:18*nq4+26*nq6),stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2534,0.d0) -+ -+c Zero accumulators used in Steinhardt order parameters -+ -+ ReQ6bar = 0.0d0 -+ ImQ6bar = 0.0d0 -+ ReQ4bar = 0.0d0 -+ ImQ4bar = 0.0d0 -+ -+c Set atoms looped over by current rank -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+c -------------------------------------------------------------- -+c Build a list of the required connections to iatm. This -+c differs depending on the version of DLPOLY we are using. -+c Note that excluded pairs will NOT have connections -+c computed and are therefore not included in computation -+c of these order parameters. -+c--------------------------------------------------------------- -+ -+ ii = ii + 1 -+ isite=ltype(iatm) -+ limit=lentry(ii) -+ nn = 0 -+ do k = 1,limit -+ -+ jatm = list(ii,k) -+ jsite = ltype(jatm) -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ xdf(nn)=xxx(jatm)-xxx(iatm) -+ ydf(nn)=yyy(jatm)-yyy(iatm) -+ zdf(nn)=zzz(jatm)-zzz(iatm) -+ -+ end do -+ -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ nn = 0 -+ isolvmax4 = 0 -+ isolvmax6 = 0 -+ isolv4 = 0 -+ isolv6 = 0 -+ do k = 1,limit -+ jatm = list(ii,k) -+ jsite = ltype(jatm) -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ q4type = q4site(jsite,isite) -+ q6type = q6site(jsite,isite) -+ -+ tmpsq = xdf(nn)*xdf(nn)+ydf(nn)*ydf(nn)+zdf(nn)*zdf(nn) -+ -+ if (nq4>0) then -+ -+c Add to solvation lists if within cut-off -+ -+ if ( tmpsq < q4cutoff(2,q4type)**2 ) then -+ isolv4 = isolv4 + 1 -+ solvlist4(isolv4) = jatm -+ solvrsq4(isolv4) = tmpsq -+ solvrmag4(isolv4) = sqrt(tmpsq) -+ solvimag4(isolv4) = 1.0d0/solvrmag4(isolv4) -+ solvx4(isolv4) = xdf(nn) -+ solvy4(isolv4) = ydf(nn) -+ solvz4(isolv4) = zdf(nn) -+ solvtype4(isolv4) = q4type -+ end if -+ end if -+ -+ if (nq6>0) then -+ -+c Add to solvation lists if within cut-off -+ -+ if ( tmpsq < q6cutoff(2,q6type)**2 ) then -+ isolv6 = isolv6 + 1 -+ solvlist6(isolv6) = jatm -+ solvrsq6(isolv6) = tmpsq -+ solvrmag6(isolv6) = sqrt(tmpsq) -+ solvimag6(isolv6) = 1.0d0/solvrmag6(isolv6) -+ solvx6(isolv6) = xdf(nn) -+ solvy6(isolv6) = ydf(nn) -+ solvz6(isolv6) = zdf(nn) -+ solvtype6(isolv6) = q6type -+ end if -+ end if -+ isolvmax4 = isolv4 -+ isolvmax6 = isolv6 -+ if ((isolv4>maxneigh) .or. (isolv6>maxneigh)) -+ x call Mfrz_Error(2535,0.d0) -+ -+ end do ! end loop over k -+ -+c--------------------------------------------------------- -+c Compute Q4 Steinhardt order parameters -+c--------------------------------------------------------- -+ -+ if ( (nq4>0).and.isolvmax4>0 ) then -+ -+ do isolv4 = 1,isolvmax4 -+ -+ jatm = solvlist4(isolv4) -+ itype = solvtype4(isolv4) -+ -+ invrc = solvimag4(isolv4)**6 -+ invrs = solvimag4(isolv4)**4 -+ -+ x = solvx4(isolv4) -+ y = solvy4(isolv4) -+ z = solvz4(isolv4) -+ -+ f_ij = fc(solvrmag4(isolv4),q4cutoff(1,itype), -+ x q4cutoff(2,itype)) -+ -+ x2 = x*x -+ y2 = y*y -+ z2 = z*z -+ -+ x3 = x2*x -+ y3 = y2*y -+ z3 = z2*z -+ -+ x4 = x2*x2 -+ y4 = y2*y2 -+ z4 = z2*z2 -+ -+ x5 = x4*x -+ y5 = y4*y -+ z5 = z4*z -+ -+ x6 = x4*x2 -+ y6 = y4*y2 -+ z6 = z4*z2 -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(-4) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre4m4*invrs*(x4-6.d0*x2*y2+y4) -+ ImYlm = ypre4m4*invrs*(-4.d0*x3*y+4.d0*x*y3) -+ -+ ReQ4bar(-4,itype) = ReQ4bar(-4,itype) + f_ij*ReYlm -+ ImQ4bar(-4,itype) = ImQ4bar(-4,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(-3) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre4m3*invrs*z*(x3-3.d0*x*y2) -+ ImYlm = ypre4m3*invrs*z*(-3.d0*x2*y+y3) -+ -+ ReQ4bar(-3,itype) = ReQ4bar(-3,itype) + f_ij*ReYlm -+ ImQ4bar(-3,itype) = ImQ4bar(-3,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(-2) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre4m2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) -+ ImYlm = ypre4m2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y -+ -+ ReQ4bar(-2,itype) = ReQ4bar(-2,itype) + f_ij*ReYlm -+ ImQ4bar(-2,itype) = ImQ4bar(-2,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(-1) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x -+ ImYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y -+ -+ ReQ4bar(-1,itype) = ReQ4bar(-1,itype) + f_ij*ReYlm -+ ImQ4bar(-1,itype) = ImQ4bar(-1,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(0) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre4m0*invrs*(8.d0*z4-24.d0*z2*x2-24.d0*z2*y2+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+ ReQ4bar(0,itype) = ReQ4bar(0,itype) + f_ij*ReYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(1) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre4p1*invrs*z*(-4.d0*z2+3.d0*x2+3.0d0*y2)*x -+ ImYlm = -ypre4p1*invrs*z*(-4.d0*z2+3.d0*x2+3.0d0*y2)*y -+ -+ ReQ4bar(+1,itype) = ReQ4bar(+1,itype) + f_ij*ReYlm -+ ImQ4bar(+1,itype) = ImQ4bar(+1,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(2) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre4p2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) -+ ImYlm = -ypre4p2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y -+ -+ ReQ4bar(+2,itype) = ReQ4bar(+2,itype) + f_ij*ReYlm -+ ImQ4bar(+2,itype) = ImQ4bar(+2,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(3) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre4p3*invrs*z*(x3-3.d0*x*y2) -+ ImYlm = ypre4p3*invrs*z*(3.d0*x2*y-y3) -+ -+ ReQ4bar(+3,itype) = ReQ4bar(+3,itype) + f_ij*ReYlm -+ ImQ4bar(+3,itype) = ImQ4bar(+3,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(4) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre4p4*invrs*(x4-6.d0*x2*y2+y4) -+ ImYlm = ypre4p4*invrs*(4.d0*x3*y-4.d0*x*y3) -+ -+ ReQ4bar(+4,itype) = ReQ4bar(+4,itype) + f_ij*ReYlm -+ ImQ4bar(+4,itype) = ImQ4bar(+4,itype) + f_ij*ImYlm -+ -+ end do ! end loop over connection list for iatm -+ -+ end if ! end if computing Q4 -+ -+c------------------------------------------------ -+c Compute Q6 Steinhardt order parameters -+c------------------------------------------------ -+ -+ if ( (nq6>0).and.isolvmax6>0 ) then -+ -+ do isolv6 = 1,isolvmax6 -+ -+ jatm = solvlist6(isolv6) -+ itype = solvtype6(isolv6) -+ -+ invrc = solvimag6(isolv6)**6 -+ invrs = solvimag6(isolv6)**4 -+ -+ x = solvx6(isolv6) -+ y = solvy6(isolv6) -+ z = solvz6(isolv6) -+ -+ f_ij = fc(solvrmag6(isolv6),q6cutoff(1,itype), -+ x q6cutoff(2,itype)) -+ -+ x2 = x*x -+ y2 = y*y -+ z2 = z*z -+ -+ x3 = x2*x -+ y3 = y2*y -+ z3 = z2*z -+ -+ x4 = x2*x2 -+ y4 = y2*y2 -+ z4 = z2*z2 -+ -+ x5 = x4*x -+ y5 = y4*y -+ z5 = z4*z -+ -+ x6 = x4*x2 -+ y6 = y4*y2 -+ z6 = z4*z2 -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-6) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m6*invrc*(x6-15.0d0*x4*y2+15.0d0*x2*y4-y6) -+ ImYlm = ypre6m6*invrc*(-6.0d0*x5*y+20.0d0*x3*y3-6.0d0*x*y5) -+ -+ ReQ6bar(-6,itype) = ReQ6bar(-6,itype) + f_ij*ReYlm -+ ImQ6bar(-6,itype) = ImQ6bar(-6,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-5) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre6m5*invrc*z*(-x5+10.0d0*x3*y2-5.0d0*x*y4) -+ ImYlm = -ypre6m5*invrc*z*(5.0d0*x4*y-10.0d0*x2*y3+y5) -+ -+ ReQ6bar(-5,itype) = ReQ6bar(-5,itype) + f_ij*ReYlm -+ ImQ6bar(-5,itype) = ImQ6bar(-5,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-4) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(x4-6.0d0*x2*y2+y4) -+ ImYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(-4.0d0*x3*y- -+ x 4.0d0*x*y3) -+ -+ ReQ6bar(-4,itype) = ReQ6bar(-4,itype) + f_ij*ReYlm -+ ImQ6bar(-4,itype) = ImQ6bar(-4,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-3) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* -+ x (-x3+3.0d0*x*y2) -+ ImYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* -+ x (3.0d0*x2*y-y3) -+ -+ ReQ6bar(-3,itype) = ReQ6bar(-3,itype) + f_ij*ReYlm -+ ImQ6bar(-3,itype) = ImQ6bar(-3,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-2) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m2*invrc*(16.0d0*z4-16.0d0*z2*x2-16.0d0*z2*y2+ -+ x x4+2.0d0*x2*y2+y4)*(x2-y2) -+ ImYlm = -ypre6m2*invrc*2.0d0*(16.0d0*z4-16.0d0*z2*x2-16.0d0* -+ x z2*y2+x4+2.0d0*x2*y2+y4)*x*y -+ -+ ReQ6bar(-2,itype) = ReQ6bar(-2,itype) + f_ij*ReYlm -+ ImQ6bar(-2,itype) = ImQ6bar(-2,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-1) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ -+ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x -+ ImYlm = -ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ -+ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y -+ -+ ReQ6bar(-1,itype) = ReQ6bar(-1,itype) + f_ij*ReYlm -+ ImQ6bar(-1,itype) = ImQ6bar(-1,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(0) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m0*invrc*(16.0d0*z6-120.0d0*z4*x2-120.0d0*z4* -+ x y2+90.0d0*z2*x4+180.0d0*z2*x2*y2+90.0d0*z2*y4-5.0d0 -+ x *x6-15.0d0*x4*y2-15.0d0*x2*y4-5.0d0*y6) -+ -+ ReQ6bar(0,itype) = ReQ6bar(0,itype) + f_ij*ReYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(1) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6p1*invrc*z*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ -+ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x -+ ImYlm = ypre6p1*invrc*z*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ -+ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y -+ -+ ReQ6bar(1,itype) = ReQ6bar(1,itype) + f_ij*ReYlm -+ ImQ6bar(1,itype) = ImQ6bar(1,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(2) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6p2*invrc*(16.d0*z4-16.d0*z2*x2-16.d0*z2*y2+ -+ x x4+2.d0*x2*y2+y4)*(x2-y2) -+ ImYlm = 2.d0*ypre6p2*invrc*(16.d0*z4-16.d0*z2*x2-16.d0*z2*y2+ -+ x x4+2.d0*x2*y2+y4)*x*y -+ -+ ReQ6bar(2,itype) = ReQ6bar(2,itype) + f_ij*ReYlm -+ ImQ6bar(2,itype) = ImQ6bar(2,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(3) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6p3*invrc*z*(8.d0*z2-3.d0*x2-3.d0*y2)* -+ x (x3-3.d0*x*y2) -+ ImYlm = ypre6p3*invrc*z*(8.d0*z2-3.d0*x2-3.d0*y2)* -+ x (3.d0*x2*y-y3) -+ -+ ReQ6bar(3,itype) = ReQ6bar(3,itype) + f_ij*ReYlm -+ ImQ6bar(3,itype) = ImQ6bar(3,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(4) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6p4*invrc*(10.d0*z2-x2-y2)*(x4-6.d0*x2*y2+y4) -+ ImYlm = ypre6p4*invrc*(10.d0*z2-x2-y2)*(4.d0*x3*y-4.d0*x*y3) -+ -+ ReQ6bar(4,itype) = ReQ6bar(4,itype) + f_ij*ReYlm -+ ImQ6bar(4,itype) = ImQ6bar(4,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(5) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6p5*invrc*z*(x5-10.d0*x3*y2+5.d0*x*y4) -+ ImYlm = ypre6p5*invrc*z*(5.d0*x4*y-10.d0*x2*y3+y5) -+ -+ ReQ6bar(5,itype) = ReQ6bar(5,itype) + f_ij*ReYlm -+ ImQ6bar(5,itype) = ImQ6bar(5,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(6) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6p6*invrc*(x6-15.d0*x4*y2+15.d0*x2*y4-y6) -+ ImYlm = ypre6p6*invrc*(6.d0*x5*y-20.d0*x3*y3+6.d0*x*y5) -+ -+ ReQ6bar(6,itype) = ReQ6bar(6,itype) + f_ij*ReYlm -+ ImQ6bar(6,itype) = ImQ6bar(6,itype) + f_ij*ImYlm -+ -+ end do ! end loop over connection list for iatm -+ -+ end if ! end if computing Q6 -+ -+ end do ! end loop over iatm -+ -+c----------------------------------------------- -+c Global summation of order parameters -+c----------------------------------------------- -+ -+ l = 1 -+ do itype = 1,nq4 -+ do m = -4,4 -+ buff1(l) = ReQ4bar(m,itype) -+ l = l + 1 -+ end do -+ do m = -4,4 -+ buff1(l) = ImQ4bar(m,itype) -+ l = l + 1 -+ end do -+ end do -+ do itype = 1,nq6 -+ do m = -6,6 -+ buff1(l) = ReQ6bar(m,itype) -+ l = l + 1 -+ end do -+ do m = -6,6 -+ buff1(l) = ImQ6bar(m,itype) -+ l = l + 1 -+ end do -+ end do -+ -+ if (commsize>1) call gdsum(buff1,18*nq4+26*nq6,buff2) -+ -+ l = 1 -+ do itype = 1,nq4 -+ do m = -4,4 -+ ReQ4bar(m,itype) = buff1(l) -+ l = l + 1 -+ end do -+ do m = -4,4 -+ ImQ4bar(m,itype) = buff1(l) -+ l = l + 1 -+ end do -+ end do -+ do itype = 1,nq6 -+ do m = -6,6 -+ ReQ6bar(m,itype) = buff1(l) -+ l = l + 1 -+ end do -+ do m = -6,6 -+ ImQ6bar(m,itype) = buff1(l) -+ l = l + 1 -+ end do -+ end do -+ -+c--------------------------------------------------- -+c Final computation of global order parameters -+c--------------------------------------------------- -+ -+ l = 1 -+ do iq = 1,nq4 -+ tmpvar = 0.0d0 -+ do m = 1,18 -+ tmpvar = tmpvar + buff1(l)**2 -+ l = l + 1 -+ end do -+ q4_global(iq) = 4.0d0*rpibn*sqrt(tmpvar)/ -+ x dble(q4ninc(iq)*q4nn(iq)) -+ end do -+ -+ do iq = 1,nq6 -+ tmpvar = 0.0d0 -+ do m = 1,26 -+ tmpvar = tmpvar + buff1(l)**2 -+ l = l + 1 -+ end do -+ q6_global(iq) = 4.0d0*rpibtt*sqrt(tmpvar)/ -+ x dble(q6ninc(iq)*q6nn(iq)) -+ end do -+ -+c Tidy up -+ -+ deallocate(xdf,stat=ierr(1)) -+ deallocate(ydf,stat=ierr(2)) -+ deallocate(zdf,stat=ierr(3)) -+ -+ deallocate(solvx4,stat=ierr(4)) -+ deallocate(solvy4,stat=ierr(5)) -+ deallocate(solvz4,stat=ierr(6)) -+ deallocate(solvrmag4,stat=ierr(7)) -+ deallocate(solvimag4,stat=ierr(8)) -+ deallocate(solvrsq4 ,stat=ierr(9)) -+ deallocate(solvlist4,stat=ierr(10)) -+ deallocate(solvtype4,stat=ierr(11)) -+ -+ deallocate(solvx6,stat=ierr(12)) -+ deallocate(solvy6,stat=ierr(13)) -+ deallocate(solvz6,stat=ierr(14)) -+ deallocate(solvrmag6,stat=ierr(15)) -+ deallocate(solvimag6,stat=ierr(16)) -+ deallocate(solvrsq6 ,stat=ierr(17)) -+ deallocate(solvlist6,stat=ierr(18)) -+ deallocate(solvtype6,stat=ierr(19)) -+ if (any(ierr/=0)) call Mfrz_Error(2536,0.d0) -+ -+ deallocate(buff1,stat=ierr(1)) -+ deallocate(buff2,stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2537,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Steinhardt -+ -+ Subroutine Compute_Steinhardt_Forces(imcon,natms,engord,virord) -+ -+c--------------------------------------------------------------------- -+c -+c Computes forces from nq4 Q4 and nq6 Q6 global order parameters. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use setup_module, only : mxlist -+ use utility_module, only : images -+ implicit none -+ -+c Arguments -+ -+ integer,intent(in) :: imcon,natms -+ -+ real(8),intent(inout) :: engord,virord -+ -+c sqrt(pi/13) , sqrt(pi/9) , 1/3 -+ -+ real(8),parameter :: rpibtt = 0.491590249d0 -+ real(8),parameter :: rpibn = 0.590817950d0 -+ real(8),parameter :: third = 1.0d0/3.0d0 -+ -+c Prefactors for spherical harmonics with l = 6 -+ -+ real(8),parameter :: ypre6m6 = 0.48308411358006625446748d0 -+ real(8),parameter :: ypre6m5 = 1.67345245810009801701312d0 -+ real(8),parameter :: ypre6m4 = 0.35678126285399802686271d0 -+ real(8),parameter :: ypre6m3 = 0.65139048586771575166665d0 -+ real(8),parameter :: ypre6m2 = 0.32569524293385787583333d0 -+ real(8),parameter :: ypre6m1 = 0.41197551630114082055201d0 -+ real(8),parameter :: ypre6m0 = 0.06356920226762842462964d0 -+ real(8),parameter :: ypre6p1 = -0.41197551630114082055201d0 -+ real(8),parameter :: ypre6p2 = 0.32569524293385787583333d0 -+ real(8),parameter :: ypre6p3 = -0.65139048586771575166665d0 -+ real(8),parameter :: ypre6p4 = 0.35678126285399802686271d0 -+ real(8),parameter :: ypre6p5 = -1.67345245810009801701312d0 -+ real(8),parameter :: ypre6p6 = 0.48308411358006625446748d0 -+ -+c Prefactors for speherical harmonics with l = 4 -+ -+ real(8),parameter :: ypre4m4 = 0.44253269244498261159038d0 -+ real(8),parameter :: ypre4m3 = 1.25167147089835228968013d0 -+ real(8),parameter :: ypre4m2 = 0.33452327177864460416856d0 -+ real(8),parameter :: ypre4m1 = 0.47308734787878004013351d0 -+ real(8),parameter :: ypre4m0 = 0.10578554691520430930396d0 -+ real(8),parameter :: ypre4p1 = -0.47308734787878004013351d0 -+ real(8),parameter :: ypre4p2 = 0.33452327177864460416856d0 -+ real(8),parameter :: ypre4p3 = -1.25167147089835228968013d0 -+ real(8),parameter :: ypre4p4 = 0.44253269244498261159038d0 -+ -+c Maximum no. of entries in solvation list -+ -+ integer :: maxneigh -+ -+c Solvation shell information - Q4 -+ -+ real(8),allocatable,dimension(:) :: solvx4,solvy4,solvz4 -+ real(8),allocatable,dimension(:) :: solvrmag4,solvimag4,solvrsq4 -+ integer,allocatable,dimension(:) :: solvlist4,solvtype4 -+ integer :: isolvmax4 -+ -+c Solvation shell information - Q6 -+ -+ real(8),allocatable,dimension(:) :: solvx6,solvy6,solvz6 -+ real(8),allocatable,dimension(:) :: solvrmag6,solvimag6,solvrsq6 -+ integer,allocatable,dimension(:) :: solvlist6,solvtype6 -+ integer :: isolvmax6 -+ -+c Prefactors arising from derivative of bias potential -+ -+ real(8),allocatable,dimension(:) :: q4prefactor,q6prefactor -+ -+c Separation vectors and powers thereof -+ -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ real(8) :: x,y,z -+ real(8) :: x2,y2,z2,x3,y3,z3 -+ real(8) :: x4,y4,z4,x5,y5,z5 -+ real(8) :: x6,y6,z6 -+ real(8) :: invrc,invrs,invrq -+ -+c Comms buffers -+ -+ real(8),allocatable,dimension(:) :: buff1,buff2 -+ -+c Temporaries -+ -+ real(8) :: tmpsq,f_ij,df_ij,ReYlm,ImYlm,tmpvar,invrN -+ real(8) :: fx,fy,fz,fx2,fy2,fz2,prefactor2,fx1,fy1,fz1 -+ real(8) :: strs1,strs2,strs3,strs4,strs5,strs6,strs7,strs8,strs9 -+ -+ integer :: iatm1,iatm0,iatm,isite,istrd,ii,isolv4,isolv6,isolv -+ integer :: idi,idj,limit,nn,k,jatm,jsite,q4type,q6type -+ integer :: itype,jtype,l,m,iq -+ -+ maxneigh = 500 ! Max number of atoms in coordination shell -+ -+ ierr = 0 ! Error flags -+ -+ allocate(xdf(1:mxlist),stat=ierr(1)) -+ allocate(ydf(1:mxlist),stat=ierr(2)) -+ allocate(zdf(1:mxlist),stat=ierr(3)) -+ -+ allocate(solvx4(1:maxneigh),stat=ierr(4)) -+ allocate(solvy4(1:maxneigh),stat=ierr(5)) -+ allocate(solvz4(1:maxneigh),stat=ierr(6)) -+ allocate(solvrmag4(1:maxneigh),stat=ierr(7)) -+ allocate(solvimag4(1:maxneigh),stat=ierr(8)) -+ allocate(solvrsq4 (1:maxneigh),stat=ierr(9)) -+ allocate(solvlist4(1:maxneigh),stat=ierr(10)) -+ allocate(solvtype4(1:maxneigh),stat=ierr(11)) -+ -+ allocate(solvx6(1:maxneigh),stat=ierr(12)) -+ allocate(solvy6(1:maxneigh),stat=ierr(13)) -+ allocate(solvz6(1:maxneigh),stat=ierr(14)) -+ allocate(solvrmag6(1:maxneigh),stat=ierr(15)) -+ allocate(solvimag6(1:maxneigh),stat=ierr(16)) -+ allocate(solvrsq6 (1:maxneigh),stat=ierr(17)) -+ allocate(solvlist6(1:maxneigh),stat=ierr(18)) -+ allocate(solvtype6(1:maxneigh),stat=ierr(19)) -+ if (any(ierr/=0)) call Mfrz_Error(2538,0.d0) -+ -+ allocate(buff1(1:18*nq4+26*nq6),stat=ierr(1)) -+ allocate(buff2(1:18*nq4+26*nq6),stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2534,0.d0) -+ -+ allocate(q4prefactor(1:nq4),stat=ierr(1)) -+ allocate(q6prefactor(1:nq6),stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2540,0.d0) -+ -+c Compute the prefactors associated from dV_aug/d_q4 -+ -+ k = 1 -+ do iq = 1,nq4 -+ invrN = 1.0d0/dble(q4ninc(iq)*q4nn(iq)) -+ q4prefactor(iq) = -16.0d0*(rpibn**2)*(invrN**2)*dcolvar(k)/ -+ x Q4_global(iq) -+ k = k + 1 -+ end do -+ -+c Compute the prefactors associated from dV_aug/d_q6 -+ -+ do iq = 1,nq6 -+ invrN = 1.0d0/dble(q6ninc(iq)*q6nn(iq)) -+ q6prefactor(iq) = -16.0d0*(rpibtt**2)*(invrN**2)*dcolvar(k)/ -+ x Q6_global(iq) -+ k = k + 1 -+ end do -+ -+c Set atoms looper over by current rank -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ strs1 = 0.0d0 -+ strs2 = 0.0d0 -+ strs3 = 0.0d0 -+ strs4 = 0.0d0 -+ strs5 = 0.0d0 -+ strs6 = 0.0d0 -+ strs7 = 0.0d0 -+ strs8 = 0.0d0 -+ strs9 = 0.0d0 -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+c--------------------------------------------------------------- -+c Build a list of the required connections to iatm. This -+c differs depending on the version of DLPOLY we are using. -+c Note that excluded pairs will NOT have connections -+c computed. -+c--------------------------------------------------------------- -+ -+ ii = ii + 1 -+ isite=ltype(iatm) -+ limit=lentry(ii) -+ -+ nn = 0 -+ do k = 1,limit -+ -+ jatm = list(ii,k) -+ jsite = ltype(jatm) -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ xdf(nn)=xxx(jatm)-xxx(iatm) -+ ydf(nn)=yyy(jatm)-yyy(iatm) -+ zdf(nn)=zzz(jatm)-zzz(iatm) -+ -+ end do -+ -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ -+ nn = 0 -+ isolvmax4 = 0 -+ isolvmax6 = 0 -+ isolv4 = 0 -+ isolv6 = 0 -+ do k = 1,limit -+ jatm = list(ii,k) -+ jsite = ltype(jatm) -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ q4type = q4site(jsite,isite) -+ q6type = q6site(jsite,isite) -+ -+ tmpsq = xdf(nn)*xdf(nn)+ydf(nn)*ydf(nn)+zdf(nn)*zdf(nn) -+ if (nq4>0) then -+ -+c Add to solvation lists if within cut-off -+ -+ if ( tmpsq < q4cutoff(2,q4type)**2 ) then -+ isolv4 = isolv4 + 1 -+ solvlist4(isolv4) = jatm -+ solvrsq4(isolv4) = tmpsq -+ solvrmag4(isolv4) = sqrt(tmpsq) -+ solvimag4(isolv4) = 1.0d0/solvrmag4(isolv4) -+ solvx4(isolv4) = xdf(nn) -+ solvy4(isolv4) = ydf(nn) -+ solvz4(isolv4) = zdf(nn) -+ solvtype4(isolv4) = q4type -+ end if -+ end if -+ -+ if (nq6>0) then -+ -+c Add to solvation lists if within cut-off -+ -+ if ( tmpsq < q6cutoff(2,q6type)**2 ) then -+ isolv6 = isolv6 + 1 -+ solvlist6(isolv6) = jatm -+ solvrsq6(isolv6) = tmpsq -+ solvrmag6(isolv6) = sqrt(tmpsq) -+ solvimag6(isolv6) = 1.0d0/solvrmag6(isolv6) -+ solvx6(isolv6) = xdf(nn) -+ solvy6(isolv6) = ydf(nn) -+ solvz6(isolv6) = zdf(nn) -+ solvtype6(isolv6) = q6type -+ end if -+ end if -+ isolvmax4 = isolv4 -+ isolvmax6 = isolv6 -+ if ((isolv4>maxneigh) .or. (isolv6>maxneigh)) -+ x call Mfrz_Error(2535,0.d0) -+ -+ end do ! end loop over k -+ -+c--------------------------------------------------------- -+c--------------------------------------------------------- -+c Compute forces arising from Q4 order parameters -+c--------------------------------------------------------- -+c--------------------------------------------------------- -+ -+ if ( (nq4>0).and.isolvmax4>0 ) then -+ -+ do isolv4 = 1,isolvmax4 -+ -+ jatm = solvlist4(isolv4) -+ itype = solvtype4(isolv4) -+ -+ invrc = solvimag4(isolv4)**6 -+ invrq = solvimag4(isolv4)**8 -+ invrs = solvimag4(isolv4)**4 -+ -+ x = solvx4(isolv4) -+ y = solvy4(isolv4) -+ z = solvz4(isolv4) -+ -+ f_ij = fc(solvrmag4(isolv4),q4cutoff(1,itype), -+ x q4cutoff(2,itype)) -+ df_ij = dfc(solvrmag4(isolv4),q4cutoff(1,itype), -+ x q4cutoff(2,itype)) -+ -+ x2 = x*x -+ y2 = y*y -+ z2 = z*z -+ -+ x3 = x2*x -+ y3 = y2*y -+ z3 = z2*z -+ -+ x4 = x2*x2 -+ y4 = y2*y2 -+ z4 = z2*z2 -+ -+ x5 = x4*x -+ y5 = y4*y -+ z5 = z4*z -+ -+ x6 = x4*x2 -+ y6 = y4*y2 -+ z6 = z4*z2 -+ -+ fx = 0.0d0 -+ fy = 0.0d0 -+ fz = 0.0d0 -+ -+c------------------------------------- -+c Gradient of f_ij w.r.t. r_{j} -+c------------------------------------- -+ -+ fx2 = df_ij*x*solvimag4(isolv4) -+ fy2 = df_ij*y*solvimag4(isolv4) -+ fz2 = df_ij*z*solvimag4(isolv4) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -4 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre4m4*invrs*(x4-6.d0*x2*y2+y4) -+ ImYlm = ypre4m4*invrs*(-4.d0*x3*y+4.d0*x*y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = -4 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(-4,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{4,-4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrc*ypre4m4*4.d0*x*(4.d0*x2*y2-4.d0*y4+z2*x2- -+ x 3.d0*z2*y2) -+ fy1 = -invrc*ypre4m4*4.d0*y*(4.d0*x4-4.d0*x2*y2+3.d0* -+ x z2*x2-z2*y2) -+ fz1 = -invrc*ypre4m4*4.d0*z*(x4-6.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -4 (imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ImQ4bar(-4,itype) -+ -+c---------------------------------------------- -+c Gradient of Im(Y_{4,-4}) w.r.t r_{j} -+c---------------------------------------------- -+ -+ fx1 = invrc*ypre4m4*4.d0*y*(x4-6.d0*x2*y2-3.d0*z2*x2+ -+ x y4+z2*y2) -+ fy1 = -invrc*ypre4m4*4.d0*x*(-6.d0*x2*y2+y4+x4+z2*x2- -+ x 3.d0*z2*y2) -+ fz1 = invrc*ypre4m4*16.d0*x*y*z*(x2-y2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -3 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre4m3*invrs*z*(x3-3.d0*x*y2) -+ ImYlm = ypre4m3*invrs*z*(-3.d0*x2*y+y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = -3 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(-3,itype) -+ -+c--------------------------------------------- -+c Gradient of Re(Y_{4,-3}) w.r.t r_{j} -+c--------------------------------------------- -+ -+ fx1 = -invrc*ypre4m3*z*(x4-12.d0*x2*y2-3.d0*z2*x2+ -+ x 3.d0*y4+3.d0*z2*y2) -+ fy1 = -invrc*ypre4m3*2.d0*z*x*y*(5.0d0*x2-3.d0*y2+ -+ x 3.d0*z2) -+ fz1 = invrc*ypre4m3*x*(x2-3.d0*y2)*(x2+y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = -3 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ImQ4bar(-3,itype) -+ -+c-------------------------------------------------- -+c Gradient of Im(Y_{4,-3}) w.r.t r_{j} -+c-------------------------------------------------- -+ -+ fx1 = invrc*ypre4m3*2.d0*z*x*y*(3.d0*x2-5.d0*y2-3.0d0*z2) -+ fy1 = -invrc*ypre4m3*z*(-12.d0*x2*y2+y4+3.d0*x4+3.d0*z2*x2 -+ x -3.d0*z2*y2) -+ fz1 = -invrc*ypre4m3*y*(3.d0*x2-y2)*(x2+y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -2 -+c-------------------------------------------------------- -+ -+ ReYlm = -ypre4m2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) -+ ImYlm = ypre4m2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y -+ -+c-------------------------------------------------- -+c Force contributions from m = -2 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(-2,itype) -+ -+c--------------------------------------------- -+c Gradient of Re(Y_{4,-2}) w.r.t r_{j} -+c--------------------------------------------- -+ -+ fx1 = -invrc*ypre4m2*4.d0*x*(4.d0*z2*x2+y4-9.d0*z2*y2- -+ x 3.d0*z4+x2*y2) -+ fy1 = invrc*ypre4m2*4.d0*y*(x4-9.d0*z2*x2+4.d0*z2*y2- -+ x 3.d0*z4+x2*y2) -+ fz1 = invrc*ypre4m2*4.d0*z*(x2-y2)*(4.d0*x2+4.d0*y2- -+ x 3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = -2 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ImQ4bar(-2,itype) -+ -+c----------------------------------------- -+c Gradient of Im(Y_{4,-2}) w.r.t r_{j} -+c----------------------------------------- -+ -+ fx1 = -invrc*ypre4m2*2.d0*y*(x4-21.d0*z2*x2+5.d0*z2*y2+ -+ x 6.d0*z4-y4) -+ fy1 = invrc*ypre4m2*2.d0*x*(-y4+21.d0*z2*y2-5.d0*z2*x2 -+ x -6.d0*z4+x4) -+ fz1 = -invrc*ypre4m2*8.d0*z*x*y*(4.d0*x2+4.d0*y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -1 -+c-------------------------------------------------------- -+ -+ ReYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x -+ ImYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y -+ -+c-------------------------------------------------- -+c Force contributions from m = -1 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(-1,itype) -+ -+c---------------------------------------- -+c Gradient of Re(Y_{4,-1}) w.r.t r_{j} -+c---------------------------------------- -+ -+ fx1 = invrc*ypre4m1*z*(3.d0*x4-21.d0*z2*x2+z2*y2+4.d0*z4- -+ x 3.d0*y4) -+ fy1 = invrc*ypre4m1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) -+ fz1 = -invrc*ypre4m1*x*(-21.d0*x2*z2-21.d0*z2*y2+4.d0*z4+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = -1 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ImQ4bar(-1,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{4,-1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -invrc*ypre4m1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) -+ fy1 = invrc*ypre4m1*z*(-3.d0*y4+21.d0*z2*y2-z2*x2-4.d0*z4+ -+ x 3.d0*x4) -+ fz1 = invrc*ypre4m1*y*(-21.d0*z2*x2-21.d0*z2*y2+4.d0*z4+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Real spherical harmonics for m = 0 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre4m0*invrs*(8.d0*z4-24.d0*z2*x2-24.d0*z2*y2+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+c-------------------------------------------------- -+c Force contributions from m = 0 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(0,itype) -+ -+c------------------------------------------- -+c Gradient of Re(Y_{4,0}) w.r.t r_{j} -+c------------------------------------------- -+ -+ fx1 = 20.d0*ypre4m0*invrc*z2*(-4.d0*z2+3.d0*x2+3.d0*y2)*x -+ fy1 = 20.d0*ypre4m0*invrc*z2*(-4.d0*z2+3.d0*x2+3.d0*y2)*y -+ fz1 = -20.d0*ypre4m0*invrc*z*(-4.d0*z2*x2-4.d0*z2*y2+3.d0* -+ x x4+6.d0*x2*y2+3.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = +1 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x -+ ImYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y -+ -+c-------------------------------------------------- -+c Force contributions from m = +1 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(+1,itype) -+ -+c------------------------------------------- -+c Gradient of Re(Y_{4,+1}) w.r.t r_{j} -+c------------------------------------------- -+ -+ fx1 = invrc*ypre4p1*z*(3.d0*x4-21.d0*z2*x2+z2*y2+4.d0*z4- -+ x 3.d0*y4) -+ fy1 = invrc*ypre4p1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) -+ fz1 = -invrc*ypre4p1*x*(-21.d0*x2*z2-21.d0*z2*y2+4.d0*z4+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------ -+c Force contributions from m = +1 (imaginary part) -+c------------------------------------------------------ -+ -+ prefactor2 = q4prefactor(itype)*ImQ4bar(+1,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{4,+1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrc*ypre4p1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) -+ fy1 = -invrc*ypre4p1*z*(-3.d0*y4+21.d0*z2*y2-z2*x2-4.d0*z4 -+ x +3.d0*x4) -+ fz1 = -invrc*ypre4p1*y*(-21.d0*z2*x2-21.d0*z2*y2+4.d0*z4+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = 2 -+c-------------------------------------------------------- -+ -+ ReYlm = -ypre4p2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) -+ ImYlm = -ypre4p2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y -+ -+c-------------------------------------------------- -+c Force contributions from m = 2 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(+2,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{4,+2}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -invrc*ypre4p2*4.d0*x*(4.d0*z2*x2+y4-9.d0*z2*y2- -+ x 3.d0*z4+x2*y2) -+ fy1 = invrc*ypre4p2*4.d0*y*(x4-9.d0*z2*x2+4.d0*z2*y2- -+ x 3.d0*z4+x2*y2) -+ fz1 = invrc*ypre4p2*4.d0*z*(x2-y2)*(4.d0*x2+4.d0*y2- -+ x 3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = 2 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ImQ4bar(+2,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{4,+2}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrc*ypre4p2*2.d0*y*(x4-21.d0*z2*x2+5.d0*z2*y2+ -+ x 6.d0*z4-y4) -+ fy1 = -invrc*ypre4p2*2.d0*x*(-y4+21.d0*z2*y2-5.d0*z2*x2 -+ x -6.d0*z4+x4) -+ fz1 = invrc*ypre4p2*8.d0*z*x*y*(4.d0*x2+4.d0*y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = 3 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre4p3*invrs*z*(x3-3.d0*x*y2) -+ ImYlm = -ypre4p3*invrs*z*(-3.d0*x2*y+y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = +3 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(+3,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{4,+3}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -invrc*ypre4p3*z*(x4-12.d0*x2*y2-3.d0*z2*x2+3.d0*y4 -+ x +3.d0*z2*y2) -+ fy1 = -invrc*ypre4p3*2.d0*z*x*y*(5.0d0*x2-3.d0*y2+3.d0*z2) -+ fz1 = invrc*ypre4p3*x*(x2-3.d0*y2)*(x2+y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = +3 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ImQ4bar(+3,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{4,+3}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -invrc*ypre4p3*2.d0*z*x*y*(3.d0*x2-5.d0*y2-3.0d0*z2) -+ fy1 = invrc*ypre4p3*z*(-12.d0*x2*y2+y4+3.d0*x4+3.d0*z2*x2 -+ x -3.d0*z2*y2) -+ fz1 = invrc*ypre4p3*y*(3.d0*x2-y2)*(x2+y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = +4 -+c------------------------------------------------------------- -+ -+ ReYlm = ypre4p4*invrs*(x4-6.d0*x2*y2+y4) -+ ImYlm = -ypre4p4*invrs*(-4.d0*x3*y+4.d0*x*y3) -+ -+c------------------------------------------------------- -+c Force contributions from m = +4 (real part) -+c------------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(+4,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{4,-4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrc*ypre4p4*4.d0*x*(4.d0*x2*y2-4.d0*y4+z2*x2- -+ x 3.d0*z2*y2) -+ fy1 = -invrc*ypre4p4*4.d0*y*(4.d0*x4-4.d0*x2*y2+3.d0* -+ x z2*x2-z2*y2) -+ fz1 = -invrc*ypre4p4*4.d0*z*(x4-6.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = -4 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ImQ4bar(+4,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{4,-4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -invrc*ypre4p4*4.d0*y*(x4-6.d0*x2*y2-3.d0*z2*x2+ -+ x y4+z2*y2) -+ fy1 = invrc*ypre4p4*4.d0*x*(-6.d0*x2*y2+y4+x4+z2*x2- -+ x 3.d0*z2*y2) -+ fz1 = -invrc*ypre4p4*16.d0*x*y*z*(x2-y2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c Add into global force and stress arrays -+ -+ fxx(jatm) = fxx(jatm) + fx -+ fyy(jatm) = fyy(jatm) + fy -+ fzz(jatm) = fzz(jatm) + fz -+ fxx(iatm) = fxx(iatm) - fx -+ fyy(iatm) = fyy(iatm) - fy -+ fzz(iatm) = fzz(iatm) - fz -+ -+c Virial -+ -+ virord = virord - (fx*x + fy*y + fz*z) -+ -+c Stress -+ -+ strs1=strs1+x*fx -+ strs2=strs2+x*fy -+ strs3=strs3+x*fz -+ strs5=strs5+y*fy -+ strs6=strs6+y*fz -+ strs9=strs9+z*fz -+ -+ end do ! end loop over connection list for iatm -+ -+ end if ! end of computing Q4 -+ -+c--------------------------------------------------------- -+c--------------------------------------------------------- -+c Compute forces arising from Q6 order parameters -+c--------------------------------------------------------- -+c--------------------------------------------------------- -+ -+ if ( (nq6>0).and.isolvmax6>0 ) then -+ -+ do isolv6 = 1,isolvmax6 -+ -+ jatm = solvlist6(isolv6) -+ itype = solvtype6(isolv6) -+ -+ invrc = solvimag6(isolv6)**6 -+ invrq = solvimag6(isolv6)**8 -+ invrs = solvimag6(isolv6)**4 -+ -+ x = solvx6(isolv6) -+ y = solvy6(isolv6) -+ z = solvz6(isolv6) -+ -+ f_ij = fc(solvrmag6(isolv6),q6cutoff(1,itype), -+ x q6cutoff(2,itype)) -+ df_ij = dfc(solvrmag6(isolv6),q6cutoff(1,itype), -+ x q6cutoff(2,itype)) -+ -+ x2 = x*x -+ y2 = y*y -+ z2 = z*z -+ -+ x3 = x2*x -+ y3 = y2*y -+ z3 = z2*z -+ -+ x4 = x2*x2 -+ y4 = y2*y2 -+ z4 = z2*z2 -+ -+ x5 = x4*x -+ y5 = y4*y -+ z5 = z4*z -+ -+ x6 = x4*x2 -+ y6 = y4*y2 -+ z6 = z4*z2 -+ -+ fx = 0.0d0 -+ fy = 0.0d0 -+ fz = 0.0d0 -+ -+c---------------------------------------- -+c Gradient of f_ij w.r.t. r_{j} -+c---------------------------------------- -+ -+ fx2 = df_ij*x*solvimag6(isolv6) -+ fy2 = df_ij*y*solvimag6(isolv6) -+ fz2 = df_ij*z*solvimag6(isolv6) -+ -+c----------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -6 -+c----------------------------------------------------------- -+ -+ ReYlm = ypre6m6*invrc*(x6-15.0d0*x4*y2+15.0d0*x2*y4-y6) -+ ImYlm = ypre6m6*invrc*(-6.0d0*x5*y+20.0d0*x3*y3-6.0d0* -+ x x*y5) -+ -+c----------------------------------------------------- -+c Force contributions from m = -6 (real part) -+c----------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(-6,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-6}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrq*ypre6m6*6.0d0*x*(6.0d0*x4*y2-20.0d0*x2*y4+ -+ x 6.0d0*y6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fy1 = -invrq*ypre6m6*6.0d0*y*(6.0d0*x6-20.0d0*x4*y2+6.0d0 -+ x *x2*y4+5.0d0*z2*x4-10.0d0*z2*x2*y2-z2*y4) -+ fz1 = -invrq*ypre6m6*6.0d0*z*(x6-15.0d0*x4*y2+15.0d0*x2* -+ x y4-y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c---------------------------------------------------------- -+c Force contributions from m = -6 (Imaginary part) -+c---------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(-6,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-6}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -invrq*ypre6m6*6.0d0*y*(-x6+15.0d0*x4*y2-15.0d0*x2* -+ x y4+5.0d0*z2*x4-10.0d0*z2*x2*y2+y6+z2*y4) -+ fy1 = -invrq*ypre6m6*6.0d0*x*(-15.0d0*x4*y2+15.0d0*x2*y4- -+ x y6+x6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fz1 = invrq*ypre6m6*12.0d0*x*y*z*(3.0d0*x4-10.0d0*x2*y2+ -+ x 3.0d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c--------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -5 -+c--------------------------------------------------------- -+ -+ ReYlm = -ypre6m5*invrc*z*(-x5+10.0d0*x3*y2-5.0d0*x*y4) -+ ImYlm = -ypre6m5*invrc*z*(5.0d0*x4*y-10.0d0*x2*y3+y5) -+ -+c-------------------------------------------------- -+c Force contributions from m = -5 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(-5,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-5}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = ypre6m5*invrq*z*(-x6+35.0d0*x4*y2-55.d0*x2*y4+ -+ x 5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*y6+5.0d0*z2*y4) -+ fy1 = -2.0d0*ypre6m5*invrq*x*y*z*(13.0d0*x4-30.0d0*x2 -+ x *y2+5.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) -+ fz1 = -ypre6m5*invrq*x*(x4-10.0d0*x2*y2+5.0d0*y4)* -+ x (-x2-y2+5.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -5 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(-5,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-5}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -2.0d0*ypre6m5*invrq*x*y*z*(-5.0d0*x4+30.0d0*x2*y2 -+ x -13.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) -+ fy1 = -ypre6m5*invrq*z*(-55.0d0*x4*y2+35.0d0*x2*y4-y6+ -+ x 5.0d0*x6+5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fz1 = ypre6m5*invrq*y*(5.0d0*x4-10.0d0*x2*y2+y4)* -+ x (-x2-y2+5.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -4 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(x4-6.0d0*x2*y2+y4) -+ ImYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(-4.0d0*x3*y-4.0d0* -+ x x*y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = -4 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(-4,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.0d0*ypre6m4*invrq*x*(-8.0d0*x4*y2-13.0d0*z2*x4+ -+ x 150.0d0*z2*x2*y2+8.0d0*y6-85.0d0*z2*y4+20.0d0*z4* -+ x x2-60.0d0*z4*y2) -+ fy1 =-2.0d0*ypre6m4*invrq*y*(-8.0d0*x6+85.0d0*z2*x4+8.0d0 -+ x *x2*y4-150.0d0*z2*x2*y2+13.0d0*z2*y4+60.0d0*z4*x2- -+ x 20.0d0*z4*y2) -+ fz1 =-2.0d0*ypre6m4*invrq*z*(x4-6.0d0*x2*y2+y4)*(-13.0d0 -+ x *x2-13.0d0*y2+20.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -4 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(-4,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -2.0d0*ypre6m4*invrq*y*(x4-6.0d0*x2*y2+y4)*(-13.0d0 -+ x *x2-13.0d0*y2+20.0d0*z2) -+ fy1 = -4.0d0*ypre6m4*invrq*x*(5.0d0*x4*y2-80.0d0*z2*x2*y2 -+ x -y6+35.0d0*z2*y4+9.0d0*z2*x4+10.0d0*z4*x2-30.0d0*z4 -+ x *y2-x6+5.0d0*x2*y4) -+ fz1 = 8.0d0*ypre6m4*invrq*z*x*y*(x2-y2)*(-13.0d0*x2- -+ x 13.0d0*y2+20.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -3 -+c-------------------------------------------------------- -+ -+ ReYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* -+ x (-x3+3.0d0*x*y2) -+ ImYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* -+ x (3.0d0*x2*y-y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = -3 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(-3,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-3}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 3.d0*ypre6m3*invrq*z*(x6-11.d0*x4*y2-13.d0*z2*x4- -+ x 9.d0*x2*y4+54.d0*z2*x2*y2+8.d0*z4*x2-5.d0*z2*y4- -+ x 8.d0*z4*y2+3.d0*y6) -+ fy1 = -6.d0*ypre6m3*invrq*z*x*y*(-5.d0*x4-2.d0*x2*y2+14.d0 -+ x *z2*x2+3.d0*y4-22.d0*z2*y2+8.d0*z4) -+ fz1 = -3.d0*ypre6m3*invrq*x*(x2-3.d0*y2)*(-13.d0*z2*x2- -+ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -3 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(-3,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-3}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -6.d0*ypre6m3*invrq*z*x*y*(3.d0*x4-2.d0*x2*y2-22.d0 -+ x *z2*x2-5.d0*y4+14.d0*z2*y2+8.d0*z4) -+ fy1 = -3.d0*ypre6m3*invrq*z*(9.d0*x4*y2+11.d0*x2*y4-54.d0 -+ x *z2*x2*y2-y6+13.d0*z2*y4+5.d0*z2*x4+8.d0*z4*x2-8.d0 -+ x *z4*y2-3.d0*x6) -+ fz1 = 3.d0*ypre6m3*invrq*z*(3.d0*x2-y2)*(-13.d0*z2*x2- -+ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -2 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6m2*invrc*(16.0d0*z4-16.0d0*z2*x2-16.0d0*z2 -+ x *y2+x4+2.0d0*x2*y2+y4)*(x2-y2) -+ ImYlm = -ypre6m2*invrc*2.0d0*(16.0d0*z4-16.0d0*z2*x2- -+ x 16.0d0*z2*y2+x4+2.0d0*x2*y2+y4)*x*y -+ -+c-------------------------------------------------- -+c Force contributions from m = -2 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(-2,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-2}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.d0*ypre6m2*invrq*x*( 19.d0*z2*x4-64.d0*z4*x2- -+ x 49.d0*z2*y4+64.d0*z4*y2+2.d0*x4*y2+4.d0*x2*y4+ -+ x 2.d0*y6+16.d0*z6-30.d0*z2*x2*y2) -+ fy1 = -2.d0*ypre6m2*invrq*y*(-49.d0*z2*x4+64.d0*z4*x2+ -+ x 19.d0*z2*y4-64.d0*z4*y2+2.d0*x6+4.d0*x4*y2+2.d0* -+ x x2*y4+16.d0*z6-30.d0*z2*x2*y2) -+ fz1 = -2.d0*ypre6m2*invrq*z*(x2-y2)*(-64.d0*z2*x2-64.d0 -+ x *z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -2 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(-2,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-2}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -2.d0*ypre6m2*invrq*y*(53.d0*z2*x4+38.d0*z2*x2* -+ x y2-128.d0*z4*x2-x6-x4*y2+x2*y4+16.d0*z6-15.d0* -+ x z2*y4+y6) -+ fy1 = -2.d0*ypre6m2*invrq*x*(38.d0*z2*x2*y2+53.d0*z2* -+ x y4-128.d0*z4*y2+x4*y2-x2*y4-y6+16.d0*z6-15.d0* -+ x z2*x4+x6) -+ fz1 = 4.d0*ypre6m2*invrq*z*x*y*(-64.d0*z2*x2-64.d0* -+ x z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -1 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2 -+ x +5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x -+ ImYlm = -ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2 -+ x +5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y -+ -+c-------------------------------------------------- -+c Force contributions from m = -1 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(-1,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = ypre6m1*invrq*z*(85.d0*x2*x4+70.d0*z2*x2*y2 -+ x -100.d0*z4*x2-5.d0*x6-5.d0*x4*y2+5.d0*x2*y4-12.d0 -+ x *z4*y2+8.d0*z6-15.d0*z2*y4+5.d0*y6) -+ fy1 = -2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0*z2* -+ x y2+44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) -+ fz1 = -ypre6m1*invrq*x*(-100.d0*z4*x2-100.d0*z4*y2+ -+ x 8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0*z2*y4- -+ x 5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -1 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(-1,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0* -+ x z2*y2+44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) -+ fy1 = -ypre6m1*invrq*z*(70.d0*z2*x2*y2+85.d0*z2 -+ x *y4-100.d0*z4*y2+5.d0*x4*y2-5.d0*x2*y4-5.d0*y6 -+ x -12.d0*z4*x2+8.d0*z6-15.d0*z2*x4+5.d0*x6) -+ fz1 = ypre6m1*invrq*y*(-100.d0*z4*x2-100.d0*z4 -+ x *y2+8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0* -+ x z2*y4-5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real spherical harmonics for m = 0 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6m0*invrc*(16.0d0*z6-120.0d0*z4*x2-120.0d0 -+ x *z4*y2+90.0d0*z2*x4+180.0d0*z2*x2*y2+90.0d0*z2*y4 -+ x -5.0d0*x6-15.0d0*x4*y2-15.0d0*x2*y4-5.0d0*y6) -+ -+c-------------------------------------------------- -+c Force contributions from m = 0 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(0,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,0}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -42.d0*ypre6m0*invrq*z2*(8.d0*z4-20.d0*z2*x2-20.d0 -+ x *z2*y2+5.d0*x4+10.d0*x2*y2+5.d0*y4)*x -+ fy1 = -42.d0*ypre6m0*invrq*z2*(8.d0*z4-20.d0*z2*x2-20.d0 -+ x *z2*y2+5.d0*x4+10.d0*x2*y2+5.d0*y2)*y -+ fz1 = 42.d0*ypre6m0*invrq*z*(8.d0*z4*x2+8.d0*z4*y2-20.d0 -+ x *z2*x4-40.d0*z2*x2*y2-20.d0*z2*y4+5.d0*x6+15.d0*x4* -+ x y2+15.d0*x2*y4+5.d0*y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = +1 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6p1*invrc*z*(8.0d0*z4-20.0d0*z2*x2-20.0d0 -+ x *z2*y2+5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x -+ ImYlm = ypre6p1*invrc*z*(8.0d0*z4-20.0d0*z2*x2-20.0d0 -+ x *z2*y2+5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y -+ -+c-------------------------------------------------- -+c Force contributions from m = +1 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(1,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = ypre6p1*invrq*z*(85.d0*x2*x4+70.d0*z2*x2*y2- -+ x 100.d0*z4*x2-5.d0*x6-5.d0*x4*y2+5.d0*x2*y4-12.d0* -+ x z4*y2+8.d0*z6-15.d0*z2*y4+5.d0*y6) -+ fy1 = -2.d0*ypre6p1*invrq*z*x*y*(-50.d0*z2*x2-50.d0*z2*y2 -+ x +44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) -+ fz1 = -ypre6p1*invrq*x*(-100.d0*z4*x2-100.d0*z4*y2+ -+ x 8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0*z2*y4- -+ x 5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = 1 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(1,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0*z2*y2+ -+ x 44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) -+ fy1 = ypre6m1*invrq*z*(70.d0*z2*x2*y2+85.d0*z2*y4- -+ x 100.d0*z4*y2+5.d0*x4*y2-5.d0*x2*y4-5.d0*y6-12.d0*z4 -+ x *x2+8.d0*z6-15.d0*z2*x4+5.d0*x6) -+ fz1 = -ypre6m1*invrq*y*(-100.d0*z4*x2-100.d0*z4*y2+ -+ x 8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0*z2*y4- -+ x 5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = +2 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6p2*invrc*(16.d0*z4-16.d0*z2*x2-16.d0* -+ x z2*y2+x4+2.d0*x2*y2+y4)*(x2-y2) -+ ImYlm = 2.d0*ypre6p2*invrc*(16.d0*z4-16.d0*z2*x2-16.d0* -+ x z2*y2+x4+2.d0*x2*y2+y4)*x*y -+ -+c-------------------------------------------------- -+c Force contributions from m = +2 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(2,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,2}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.d0*ypre6p2*invrq*x*( 19.d0*z2*x4-64.d0*z4*x2- -+ x 49.d0*z2*y4+64.d0*z4*y2+2.d0*x4*y2+4.d0*x2*y4+ -+ x 2.d0*y6+16.d0*z6-30.d0*z2*x2*y2) -+ fy1 = -2.d0*ypre6p2*invrq*y*(-49.d0*z2*x4+64.d0*z4*x2+ -+ x 19.d0*z2*y4-64.d0*z4*y2+2.d0*x6+4.d0*x4*y2+2.d0 -+ x *x2*y4+16.d0*z6-30.d0*z2*x2*y2) -+ fz1 = -2.d0*ypre6p2*invrq*z*(x2-y2)*(-64.d0*z2*x2-64.d0 -+ x *z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = 2 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(2,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,2}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.d0*ypre6p2*invrq*y*(53.d0*z2*x4+38.d0*z2*x2*y2- -+ x 128.d0*z4*x2-x6-x4*y2+x2*y4+16.d0*z6-15.d0*z2*y4+y6) -+ fy1 = 2.d0*ypre6p2*invrq*x*(38.d0*z2*x2*y2+53.d0*z2*y4- -+ x 128.d0*z4*y2+x4*y2-x2*y4-y6+16.d0*z6-15.d0*z2*x4+x6) -+ fz1 = -4.d0*ypre6p2*invrq*z*x*y*(-64.d0*z2*x2-64.d0*z2*y2+ -+ x 16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = +3 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6p3*invrc*z*(8.d0*z2-3.d0*x2-3.d0*y2)* -+ x (x3-3.d0*x*y2) -+ ImYlm = ypre6p3*invrc*z*(8.d0*z2-3.d0*x2-3.d0*y2)* -+ x (3.d0*x2*y-y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = +3 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(3,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,3}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 3.d0*ypre6p3*invrq*z*(x6-11.d0*x4*y2-13.d0*z2*x4- -+ x 9.d0*x2*y4+54.d0*z2*x2*y2+8.d0*z4*x2-5.d0*z2*y4- -+ x 8.d0*z4*y2+3.d0*y6) -+ fy1 = -6.d0*ypre6p3*invrq*z*x*y*(-5.d0*x4-2.d0*x2*y2+ -+ x 14.d0*z2*x2+3.d0*y4-22.d0*z2*y2+8.d0*z4) -+ fz1 = -3.d0*ypre6p3*invrq*x*(x2-3.d0*y2)*(-13.d0*z2*x2- -+ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = 3 (Imaginary part ) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(3,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,3}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 6.d0*ypre6p3*invrq*z*x*y*(3.d0*x4-2.d0*x2*y2-22.d0 -+ x *z2*x2-5.d0*y4+14.d0*z2*y2+8.d0*z4) -+ fy1 = 3.d0*ypre6p3*invrq*z*(9.d0*x4*y2+11.d0*x2*y4-54.d0 -+ x *z2*x2*y2-y6+13.d0*z2*y4+5.d0*z2*x4+8.d0*z4*x2-8.d0 -+ x *z4*y2-3.d0*x6) -+ fz1 = -3.d0*ypre6p3*invrq*z*(3.d0*x2-y2)*(-13.d0*z2*x2- -+ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = +4 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6p4*invrc*(10.d0*z2-x2-y2)*(x4-6.d0*x2*y2+y4) -+ ImYlm = ypre6p4*invrc*(10.d0*z2-x2-y2)*(4.d0*x3*y-4.d0* -+ x x*y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = +4 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(4,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.0d0*ypre6p4*invrq*x*(-8.0d0*x4*y2-13.0d0*z2*x4+ -+ x 150.0d0*z2*x2*y2+8.0d0*y6-85.0d0*z2*y4+20.0d0*z4*x2 -+ x -60.0d0*z4*y2) -+ fy1 =-2.0d0*ypre6p4*invrq*y*(-8.0d0*x6+85.0d0*z2*x4+8.0d0 -+ x *x2*y4-150.0d0*z2*x2*y2+13.0d0*z2*y4+60.0d0*z4*x2- -+ x 20.0d0*z4*y2) -+ fz1 =-2.0d0*ypre6p4*invrq*z*(x4-6.0d0*x2*y2+y4)*(-13.0d0* -+ x x2-13.0d0*y2+20.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = 4 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(4,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.0d0*ypre6p4*invrq*y*(x4-6.0d0*x2*y2+y4)*(-13.0d0 -+ x *x2-13.0d0*y2+20.0d0*z2) -+ fy1 = 4.0d0*ypre6p4*invrq*x*(5.0d0*x4*y2-80.0d0*z2*x2*y2 -+ x -y6+35.0d0*z2*y4+9.0d0*z2*x4+10.0d0*z4*x2-30.0d0*z4 -+ x *y2-x6+5.0d0*x2*y4) -+ fz1 = -8.0d0*ypre6p4*invrq*z*x*y*(x2-y2)*(-13.0d0*x2- -+ x 13.0d0*y2+20.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = +5 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6p5*invrc*z*(x5-10.d0*x3*y2+5.d0*x*y4) -+ ImYlm = ypre6p5*invrc*z*(5.d0*x4*y-10.d0*x2*y3+y5) -+ -+c-------------------------------------------------- -+c Force contributions from m = +5 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(5,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,5}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = ypre6p5*invrq*z*(-x6+35.0d0*x4*y2-55*x2*y4 -+ x +5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*y6+5.0d0*z2*y4) -+ fy1 = -2.0d0*ypre6p5*invrq*x*y*z*(13.0d0*x4-30.0d0*x2*y2 -+ x +5.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) -+ fz1 = -ypre6p5*invrq*x*(x4-10.0d0*x2*y2+5.0d0*y4)* -+ x (-x2-y2+5.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = 5 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(5,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,5}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.0d0*ypre6p5*invrq*x*y*z*(-5.0d0*x4+30.0d0*x2*y2- -+ x 13.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) -+ fy1 = +ypre6p5*invrq*z*(-55.0d0*x4*y2+35.0d0*x2*y4- -+ x y6+5.0d0*x6+5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fz1 = -ypre6p5*invrq*y*(5.0d0*x4-10.0d0*x2*y2+y4)* -+ x (-x2-y2+5.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = +6 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6p6*invrc*(x6-15.d0*x4*y2+15.d0*x2*y4-y6) -+ ImYlm = ypre6p6*invrc*(6.d0*x5*y-20.d0*x3*y3+6.d0*x*y5) -+ -+c-------------------------------------------------- -+c Force contributions from m = +6 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(6,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,6}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrq*ypre6p6*6.0d0*x*(6.0d0*x4*y2-20.0d0*x2*y4+ -+ x 6.0d0*y6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fy1 = -invrq*ypre6p6*6.0d0*y*(6.0d0*x6-20.0d0*x4*y2+ -+ x 6.0d0*x2*y4+5.0d0*z2*x4-10.0d0*z2*x2*y2-z2*y4) -+ fz1 = -invrq*ypre6p6*6.0d0*z*(x6-15.0d0*x4*y2+15.0d0*x2 -+ x *y4-y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = 6 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ImQ6bar(6,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,6}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrq*ypre6p6*6.0d0*y*(-x6+15.0d0*x4*y2-15.0d0* -+ x x2*y4+5.0d0*z2*x4-10.0d0*z2*x2*y2+y6+z2*y4) -+ fy1 = invrq*ypre6p6*6.0d0*x*(-15.0d0*x4*y2+15.0d0*x2* -+ x y4-y6+x6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fz1 = -invrq*ypre6p6*12.0d0*x*y*z*(3.0d0*x4-10.0d0*x2* -+ x y2+3.0d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c Add into global force and stress arrays -+ -+ fxx(jatm) = fxx(jatm) + fx -+ fyy(jatm) = fyy(jatm) + fy -+ fzz(jatm) = fzz(jatm) + fz -+ fxx(iatm) = fxx(iatm) - fx -+ fyy(iatm) = fyy(iatm) - fy -+ fzz(iatm) = fzz(iatm) - fz -+ -+c Virial -+ -+ virord = virord - (fx*x + fy*y + fz*z) -+ -+c Stress -+ -+ strs1=strs1+x*fx -+ strs2=strs2+x*fy -+ strs3=strs3+x*fz -+ strs5=strs5+y*fy -+ strs6=strs6+y*fz -+ strs9=strs9+z*fz -+ -+ end do ! end loop over connection list for iatm -+ -+ end if ! end of computing Q6 -+ -+ -+ end do ! end loop over iatm -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs1 -+ stress(2)=stress(2)+strs2 -+ stress(3)=stress(3)+strs3 -+ stress(4)=stress(4)+strs2 -+ stress(5)=stress(5)+strs5 -+ stress(6)=stress(6)+strs6 -+ stress(7)=stress(7)+strs3 -+ stress(8)=stress(8)+strs6 -+ stress(9)=stress(9)+strs9 -+ -+c tidy up -+ -+ ierr = 0 -+ -+ deallocate(xdf,stat=ierr(1)) -+ deallocate(ydf,stat=ierr(2)) -+ deallocate(zdf,stat=ierr(3)) -+ -+ deallocate(solvx4,stat=ierr(4)) -+ deallocate(solvy4,stat=ierr(5)) -+ deallocate(solvz4,stat=ierr(6)) -+ deallocate(solvrmag4,stat=ierr(7)) -+ deallocate(solvimag4,stat=ierr(8)) -+ deallocate(solvrsq4 ,stat=ierr(9)) -+ deallocate(solvlist4,stat=ierr(10)) -+ deallocate(solvtype4,stat=ierr(11)) -+ -+ deallocate(solvx6,stat=ierr(12)) -+ deallocate(solvy6,stat=ierr(13)) -+ deallocate(solvz6,stat=ierr(14)) -+ deallocate(solvrmag6,stat=ierr(15)) -+ deallocate(solvimag6,stat=ierr(16)) -+ deallocate(solvrsq6 ,stat=ierr(17)) -+ deallocate(solvlist6,stat=ierr(18)) -+ deallocate(solvtype6,stat=ierr(19)) -+ if (any(ierr/=0)) call Mfrz_Error(2536,0.d0) -+ -+ deallocate(buff1,stat=ierr(1)) -+ deallocate(buff2,stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2537,0.d0) -+ -+ deallocate(q4prefactor,stat=ierr(1)) -+ deallocate(q6prefactor,stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2540,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Steinhardt_Forces -+ -+ Subroutine Compute_Tet_Nlist(imcon,natms) -+ -+c--------------------------------------------------------------------- -+c -+c The existing neighbour list is not known by all nodes and -+c therefore we compute a new one from scratch rather than trying -+c to merge a full neighbour list across all MPI tasks or restore -+c symmetry. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use utility_module, only : images -+ -+ implicit none -+ integer,intent(in) :: imcon,natms -+ integer :: nlast,megatm -+ -+ integer :: iatm0,iatm1,istrd,iatm,jatm,nn,itype,jtype -+ integer :: ninclude,ifi,ii,ztype,nnn,k -+ real(8) :: rsq,rangesq -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ ninclude = maxval(zetaninc) -+ -+ nlast = natms -+ megatm = natms -+ -+ nnn = int(dble(ninclude*nlast*1.2)/dble(megatm)) -+ -+ allocate(xdf(1:nnn),stat=ierr(1)) -+ allocate(ydf(1:nnn),stat=ierr(2)) -+ allocate(zdf(1:nnn),stat=ierr(3)) -+ if (any(ierr/=0)) call Mfrz_Error(2541,0.d0) -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ itype = ltype(iatm) -+ -+ ztype = zetasite(itype) -+ if ( ztype==0 ) cycle -+ -+ nn = 0 ! Number of images to compute -+ ii = ii + 1 ! index for this list -+ ifi = 0 ! index for entries in this list -+ -+ if (ii>mxninc) call Mfrz_Error(2542,0.d0) -+ -+ do jatm = 1,nlast -+ -+ jtype = ltype(jatm) -+ -+ if ( itype/=jtype ) cycle -+ if ( iatm == jatm ) cycle -+ -+ nn = nn + 1 -+ xdf(nn) = xxx(iatm) - xxx(jatm) ! separation vector -+ ydf(nn) = yyy(iatm) - yyy(jatm) -+ zdf(nn) = zzz(iatm) - zzz(jatm) -+ -+ end do -+ -+ if ( nn > nnn ) call Mfrz_Error(2543,0.d0) -+ -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ -+ nn = 0 -+ do jatm = 1,nlast -+ -+ jtype = ltype(jatm) -+ -+ if ( itype/=jtype ) cycle -+ if ( iatm == jatm ) cycle -+ -+ nn = nn + 1 -+ rsq = xdf(nn)*xdf(nn) + ydf(nn)*ydf(nn) + zdf(nn)*zdf(nn) -+ -+ rangesq = zetacutoff(2,ztype)**2 -+ -+ if ( rsq < rangesq ) then -+ -+ ifi = ifi + 1 -+ flist(ifi,ii) = jatm -+ -+ end if -+ -+ end do -+ if ( ifi > mxflist ) call Mfrz_Error(2544,0.d0) -+ nflist(ii) = ifi -+ -+ end do ! end loop over iatm -+ -+ deallocate(xdf,stat=ierr(1)) -+ deallocate(ydf,stat=ierr(2)) -+ deallocate(zdf,stat=ierr(3)) -+ if (any(ierr/=0))call Mfrz_Error(2545,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Tet_Nlist -+ -+ Subroutine Compute_Tetrahedral(imcon,natms) -+ -+c--------------------------------------------------------------------- -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use utility_module, only : images -+ -+ implicit none -+ integer,intent(in) :: imcon,natms -+ -+ integer :: iatm0,iatm1,istrd,iatm,jatm,nn,itype,jtype -+ integer :: ninclude,ifi,ii,k,ztype,mm,katm,ktype,it -+ real(8) :: f_ij,f_ik,r_ij,r_ik,x,y,z,dot -+ real(8),parameter :: third=1.0d0/3.0d0 -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ real(8),allocatable,dimension(:) :: buff1 -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ allocate(xdf(1:mxflist),stat=ierr(1)) -+ allocate(ydf(1:mxflist),stat=ierr(2)) -+ allocate(zdf(1:mxflist),stat=ierr(3)) -+ allocate(buff1(1:ntet),stat=ierr(4)) -+ if (any(ierr/=0)) call Mfrz_Error(2546,0.d0) -+ -+ zeta_global(:) = 0.0d0 -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ itype = ltype(iatm) -+ -+c no tetrahedral contributions from this atom type? -+ -+ ztype = zetasite(itype) -+ if ( ztype == 0 ) cycle -+ -+ ii = ii + 1 ! index for this list -+ -+ do k = 1,nflist(ii) -+ -+ jatm = flist(k,ii) -+ -+ xdf(k) = xxx(jatm) - xxx(iatm) ! separation vector -+ ydf(k) = yyy(jatm) - yyy(iatm) -+ zdf(k) = zzz(jatm) - zzz(iatm) -+ -+ end do -+ -+ nn = nflist(ii) -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ -+ do k = 1,nflist(ii) -+ -+ jatm = flist(k,ii) -+ -+ r_ij = sqrt(xdf(k)*xdf(k) + ydf(k)*ydf(k) + zdf(k)*zdf(k)) -+ f_ij = fc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ -+ x = xdf(k) ; y = ydf(k) ; z = zdf(k) -+ -+c loop over all other entries katm -+ -+ do mm = k+1,nflist(ii) -+ -+c katm also in solvation shell of iatm -+ -+ katm = flist(mm,ii) -+ -+ r_ik = sqrt(xdf(mm)*xdf(mm) + ydf(mm)*ydf(mm) + -+ x zdf(mm)*zdf(mm)) -+ f_ik = fc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ -+c The node holding the central atom keeps the contrib -+ -+ dot = (x*xdf(mm) + y*ydf(mm) + z*zdf(mm)) / (r_ij*r_ik) + -+ x third -+ zeta_global(ztype) = zeta_global(ztype) + f_ij*f_ik*dot*dot -+ end do -+ end do -+ -+ end do -+ -+ call gdsum(zeta_global(1),ntet,buff1(1:ntet)) -+ -+ do it = 1,ntet -+ zeta_global(it) = 1.0d0 - zeta_global(it)/dble(zetaninc(it)* -+ x zetann(it)) -+ end do -+ -+ deallocate(xdf ,stat=ierr(1)) -+ deallocate(ydf ,stat=ierr(2)) -+ deallocate(zdf ,stat=ierr(3)) -+ deallocate(buff1,stat=ierr(4)) -+ if (any(ierr/=0)) call Mfrz_Error(2547,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Tetrahedral -+ -+ Subroutine Compute_Tetrahedral_Forces(imcon,natms,engord,virord) -+ -+c--------------------------------------------------------------------- -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use utility_module, only : images -+ -+ implicit none -+ integer,intent(in) :: imcon,natms -+ real(8),intent(inout) :: engord,virord -+ -+ integer :: iatm,jatm,katm,iatm0,iatm1,istrd,nn -+ integer :: ii,k,m,itet,itype,jtype,ztype,it -+ -+ real(8),parameter :: third = 1.0d0/3.0d0 -+ real(8) :: strs1,strs2,strs3,strs5,strs6,strs9 -+ real(8) :: xj,yj,zj,xk,yk,zk,tmpvar,tmpvar2,dot -+ real(8) :: r_ij,r_ik,f_ij,f_ik,df_ij,df_ik -+ real(8) :: invrij,invrik,ctheta -+ real(8) :: fxj,fyj,fzj,fxk,fyk,fzk -+ -+ real(8),dimension(3) :: rij_hat,rik_hat -+ -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ real(8),allocatable,dimension(:) :: tetprefactor -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ allocate(xdf(1:mxflist),stat=ierr(1)) -+ allocate(ydf(1:mxflist),stat=ierr(2)) -+ allocate(zdf(1:mxflist),stat=ierr(3)) -+ allocate(tetprefactor(1:ntet),stat=ierr(4)) -+ if (any(ierr/=0)) call Mfrz_Error(2548,0.d0) -+ -+c Compute the prefactor -+ -+ k = nq4+nq6+1 -+ do it = 1,ntet -+ tetprefactor = dcolvar(k)/dble(zetaninc(it)*zetann(it)) -+ k = k + 1 -+ end do -+ -+c zero contribution to the stress tensor -+ -+ strs1=0.0d0 -+ strs2=0.0d0 -+ strs3=0.0d0 -+ strs5=0.0d0 -+ strs6=0.0d0 -+ strs9=0.0d0 -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ itype = ltype(iatm) -+ -+c no tetrahedral contributions from this atom type? -+ -+ ztype = zetasite(itype) -+ if ( ztype == 0 ) cycle -+ -+ ii = ii + 1 ! index for this list -+ -+ do k = 1,nflist(ii) -+ -+ jatm = flist(k,ii) -+ -+ xdf(k) = xxx(jatm) - xxx(iatm) ! separation vector -+ ydf(k) = yyy(jatm) - yyy(iatm) -+ zdf(k) = zzz(jatm) - zzz(iatm) -+ -+ end do -+ -+ nn = nflist(ii) -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ -+ do k = 1,nflist(ii) -+ -+ jatm = flist(k,ii) -+ -+ r_ij = sqrt(xdf(k)*xdf(k) + ydf(k)*ydf(k) + zdf(k)*zdf(k)) -+ f_ij = fc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ df_ij = dfc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ -+ xj = xdf(k) ; yj = ydf(k) ; zj = zdf(k) -+ -+ invrij = 1.0d0/r_ij -+ -+ rij_hat(1) = xj*invrij -+ rij_hat(2) = yj*invrij -+ rij_hat(3) = zj*invrij -+ -+ do m = k + 1,nflist(ii) -+ -+ r_ik = sqrt(xdf(m)*xdf(m) + ydf(m)*ydf(m) + zdf(m)*zdf(m)) -+ f_ik = fc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ df_ik = dfc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ -+ xk = xdf(m) ; yk = ydf(m) ; zk = zdf(m) -+ -+ invrik = 1.0d0/r_ik -+ -+ rik_hat(1) = xk*invrik -+ rik_hat(2) = yk*invrik -+ rik_hat(3) = zk*invrik -+ -+ ctheta = dot_product(rij_hat,rik_hat) -+ dot = ctheta + third -+ -+ tmpvar = 2.0d0*dot*f_ij*f_ik*tetprefactor(ztype)*invrij -+ tmpvar2 = tetprefactor(ztype)*dot*dot*df_ij*f_ik -+ -+c force between atom i and atom j due to second term -+c i.e. ( f_ij*f_ik*dot*dot ) -+ -+ fxj = tmpvar*(rik_hat(1) - rij_hat(1)*ctheta) + -+ x tmpvar2*rij_hat(1) -+ fyj = tmpvar*(rik_hat(2) - rij_hat(2)*ctheta) + -+ x tmpvar2*rij_hat(2) -+ fzj = tmpvar*(rik_hat(3) - rij_hat(3)*ctheta) + -+ x tmpvar2*rij_hat(3) -+ -+ tmpvar = 2.0d0*dot*f_ij*f_ik*tetprefactor(ztype)*invrik -+ tmpvar2 = tetprefactor(ztype)*dot*dot*df_ik*f_ij -+ -+c force between atom i and atom k due to second term -+c i.e ( f_ij*f_ik*dot*dot ) -+ -+ fxk = tmpvar*(rij_hat(1) - rik_hat(1)*ctheta) + -+ x tmpvar2*rik_hat(1) -+ fyk = tmpvar*(rij_hat(2) - rik_hat(2)*ctheta) + -+ x tmpvar2*rik_hat(2) -+ fzk = tmpvar*(rij_hat(3) - rik_hat(3)*ctheta) + -+ x tmpvar2*rik_hat(3) -+ -+c Add in to forces, virial and stress tensor -+ -+ katm = flist(m,ii) -+ -+ fxx(iatm) = fxx(iatm) + fxj + fxk -+ fyy(iatm) = fyy(iatm) + fyj + fyk -+ fzz(iatm) = fzz(iatm) + fzj + fzk -+ -+ fxx(jatm) = fxx(jatm) - fxj -+ fyy(jatm) = fyy(jatm) - fyj -+ fzz(jatm) = fzz(jatm) - fzj -+ -+ fxx(katm) = fxx(katm) - fxk -+ fyy(katm) = fyy(katm) - fyk -+ fzz(katm) = fzz(katm) - fzk -+ -+ virord = virord - fxj*xj - fyj*yj - fzj*zj -+ virord = virord - fxk*xk - fyk*yk - fzk*zk -+ -+ strs1 = strs1 + xk*fxk + xj*fxj -+ strs2 = strs2 + xk*fyk + xj*fyj -+ strs3 = strs3 + xk*fzk + xj*fzj -+ strs5 = strs5 + yk*fyk + yj*fyj -+ strs6 = strs6 + yk*fzk + yj*fzj -+ strs9 = strs9 + zk*fzk + zj*fzj -+ -+ end do -+ end do -+ end do -+ -+c Complete stress tensor -+ -+ stress(1)=stress(1)+strs1 -+ stress(2)=stress(2)+strs2 -+ stress(3)=stress(3)+strs3 -+ stress(4)=stress(4)+strs2 -+ stress(5)=stress(5)+strs5 -+ stress(6)=stress(6)+strs6 -+ stress(7)=stress(7)+strs3 -+ stress(8)=stress(8)+strs6 -+ stress(9)=stress(9)+strs9 -+ -+ -+c Tidy up -+ -+ deallocate(xdf,stat=ierr(1)) -+ deallocate(ydf,stat=ierr(2)) -+ deallocate(zdf,stat=ierr(3)) -+ if (any(ierr/=0)) call Mfrz_Error(2547,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Tetrahedral_Forces -+ -+ Subroutine Mfrz_Error(kode,arg) -+ -+c--------------------------------------------------------------------- -+c -+c Author W. Smith Daresbury Laboratory January 2011 -+c Adapted from D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use setup_module, only : nrite,nhist,nread,nconf,nstats, -+ x nrest,nfield,ntable,nevnt -+ -+ implicit none -+ integer,intent(in) :: kode -+ real(8),intent(in) :: arg -+ -+ if(onroot)then -+ -+ if(kode.eq.2500)then -+ -+ write(nrite,"( -+ x 'Error in number of collective variables - '// -+ x 'ncolvar too small?' -+ x )") -+ -+ elseif(kode.eq.2501)then -+ -+ write(nrite,"( -+ x 'Wang-Landau style recursion not yet implemented'// -+ x 'for ncolvar > 1' -+ x )") -+ -+ elseif(kode.eq.2502)then -+ -+ write(nrite,"('Unrecognised Gaussian height scheme')") -+ -+ elseif(kode.eq.2503)then -+ -+ write(nrite,"('Error maxhis exceeded in metadynamics')") -+ -+ elseif(kode.eq.2504)then -+ -+ write(nrite,"( -+ x 'Error allocating comms buffer in compute_bias_potential' -+ x )") -+ -+ elseif(kode.eq.2505)then -+ -+ write(nrite,"('Error allocating driven array')") -+ -+ elseif(kode.eq.2506)then -+ -+ write(nrite,"('Could not open METACONTROL')") -+ -+ elseif(kode.eq.2508)then -+ -+ write(nrite,"('Comms error in metadynamics setup')") -+ -+ elseif(kode.eq.2509)then -+ -+ write(nrite,"( -+ x 'Cannot bias local and global PE in same run' -+ x )") -+ -+ elseif(kode.eq.2510)then -+ -+ write(nrite,"('Error allocating local force arrays')") -+ -+ elseif(kode.eq.2511)then -+ -+ write(nrite,"( -+ x 'Error allocating collective variables arrays' -+ x )") -+ -+ elseif(kode.eq.2512)then -+ -+ write(nrite,"('Error allocating Wang-Landau bins')") -+ -+ elseif(kode.eq.2515)then -+ -+ write(nrite,"( -+ x 'Error allocating Steinhardt parameter arrays' -+ x )") -+ -+ elseif(kode.eq.2516)then -+ -+ write(nrite,"('Could not open STEINHARDT')") -+ -+ elseif(kode.eq.2517)then -+ -+ write(nrite,"('Error allocating q4site')") -+ -+ elseif(kode.eq.2518)then -+ -+ write(nrite,"('Error allocating q6site')") -+ -+ elseif(kode.eq.2519)then -+ -+ write(nrite,"('Error deallocating buff')") -+ -+ elseif(kode.eq.2521)then -+ -+ write(nrite,"('Error reading line ',i5,' of STEINHARDT' -+ x )")nint(arg) -+ -+ elseif(kode.eq.2522)then -+ -+ write(nrite,"( -+ x 'Error allocating Steinhardt parameter arrays' -+ x )") -+ -+ elseif(kode.eq.2523)then -+ -+ write(nrite,"('Could not open ZETA')") -+ -+ elseif(kode.eq.2524)then -+ -+ write(nrite,"('Error allocating zetasite')") -+ -+ elseif(kode.eq.2525)then -+ -+ write(nrite,"('Error allocating full neighbour list')") -+ -+ elseif(kode.eq.2527)then -+ -+ write(nrite,"( -+ x 'Number of collective variables incorrect for specified'// -+ x 'order parameters' -+ x )") -+ -+ elseif(kode.eq.2529)then -+ -+ write(nrite,"('Error reading line ',i5,' of ZETA' -+ x )")nint(arg) -+ -+ elseif(kode.eq.2531)then -+ -+ write(nrite,"('Comms error on reading METADYNAMICS')") -+ -+ elseif(kode.eq.2532)then -+ -+ write(nrite,"('Error in fc function - out of range')") -+ write(nrite,"('Value of r was ',1p,e14.6)")arg -+ -+ elseif(kode.eq.2533)then -+ -+ write(nrite,"( -+ x 'Error allocating solvation arrays for metadynamics' -+ x )") -+ -+ elseif(kode.eq.2534)then -+ -+ write(nrite,"('Error allocating comms buffer arrays')") -+ -+ elseif(kode.eq.2535)then -+ -+ write(nrite,"('Solvation list overrun')") -+ -+ elseif(kode.eq.2536)then -+ -+ write(nrite,"( -+ x 'Error deallocating solvation arrays for metadynamics' -+ x )") -+ -+ elseif(kode.eq.2537)then -+ -+ write(nrite,"('Error deallocating comms buffer arrays')") -+ -+ elseif(kode.eq.2538)then -+ -+ write(nrite,"( -+ x 'Error allocating solvation arrays for metadynamics' -+ x )") -+ -+ elseif(kode.eq.2540)then -+ -+ write(nrite,"('Error allocating force prefactor arrays')") -+ -+ elseif(kode.eq.2541)then -+ -+ write(nrite,"( -+ x 'Memory allocation error in compute_tet_nlist' -+ x )") -+ -+ elseif(kode.eq.2542)then -+ -+ write(nrite,"( -+ x 'Error in metafreeze_module.f90 mxninc too small' -+ x )") -+ -+ elseif(kode.eq.2543)then -+ -+ write(nrite,"('nnn too small in compute_tet_nlist')") -+ -+ elseif(kode.eq.2544)then -+ -+ write(nrite,"('mxflist too small in metafreeze_module')") -+ -+ elseif(kode.eq.2545)then -+ -+ write(nrite,"( -+ x 'Memory deallocation error in compute_tet_nlist' -+ x )") -+ -+ elseif(kode.eq.2546)then -+ -+ write(nrite,"( -+ x 'Memory allocation error in compute_tet_nlist' -+ x )") -+ -+ elseif(kode.eq.2547)then -+ -+ write(nrite,"( -+ x 'Memory deallocation error in compute_tet_nlist' -+ x )") -+ -+ elseif(kode.eq.2548)then -+ -+ write(nrite,"( -+ x 'Memory allocation error in compute_tet_nlist' -+ x )") -+ -+ endif -+ -+c close all i/o channels -+ -+ close (nrite) -+ close (nhist) -+ close (nread) -+ close (nconf) -+ close (nstats) -+ close (nrest) -+ close (nfield) -+ close (ntable) -+ close (nevnt) -+ close (stn) -+ close (zta) -+ close (mtd) -+ -+ endif -+ -+c shut down communications -+ -+ call gsync() -+ call exitcomms() -+ -+ end Subroutine Mfrz_Error -+ -+ end module metafreeze_module -+ -diff -urN dl_class_1.9.orig/srcmod/metal_module.f dl_class_1.9/srcmod/metal_module.f ---- dl_class_1.9.orig/srcmod/metal_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/metal_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1669 @@ -+ module metal_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining metal potential arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use pair_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use utility_module -+ -+ implicit none -+ -+ logical lmetab -+ integer, allocatable :: ltpmet(:),lstmet(:) -+ real(8), allocatable :: prmmet(:,:),vmet(:,:,:),dmet(:,:,:) -+ real(8), allocatable :: rho(:),elrcm(:),vlrcm(:),fmet(:,:,:) -+ -+ save lmetab,ltpmet,lstmet,prmmet,vmet,dmet,fmet,rho,elrcm,vlrcm -+ -+ contains -+ -+ subroutine alloc_met_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ integer i,fail,idnode -+ -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (ltpmet(mxmet),stat=fail(1)) -+ allocate (lstmet(mxmet),stat=fail(2)) -+ allocate (prmmet(mxmet,mxpmet),stat=fail(3)) -+ allocate (vmet(mxgrid,mxmet,2),stat=fail(4)) -+ allocate (dmet(mxgrid,mxmet,2),stat=fail(5)) -+ allocate (rho(mxatms),stat=fail(6)) -+ allocate (elrcm(0:mxsmet),stat=fail(7)) -+ allocate (vlrcm(0:mxsmet),stat=fail(8)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1280) -+ enddo -+ -+ end subroutine alloc_met_arrays -+ -+ subroutine define_metals -+ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rmet,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining metal potentials -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits,lmols -+ character*8 keyword -+ character*8 atom1,atom2 -+ character*1 message(80) -+ integer idnode,ntpmet,ntpatm,idum,imet,j -+ integer keypot,numpar,katm1,katm2,keymet,ntab,i,fail,itpmet -+ integer jtpatm -+ real(8) rmet,engunit -+ -+ real(8), allocatable :: parpot(:) -+ allocate (parpot(mxpmet),stat=fail) -+ -+ ntpmet=intstr(record,lenrec,idum) -+ -+ lmetab=.false. -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'number of specified metal ', -+ x 'potentials',i10)") ntpmet -+ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ',3x, -+ x ' key',30x,'parameters'/,/)") -+ -+ endif -+ -+ if(ntpmet.ge.mxmet) call error(idnode,71) -+ if(.not.lunits) call error(idnode,6) -+ if(.not.lmols) call error(idnode,13) -+ -+ do imet=1,mxmet -+ lstmet(imet)=0 -+ ltpmet(imet)=0 -+ enddo -+ -+ do itpmet=1,ntpmet -+ -+ do i=1,mxpmet -+ parpot(i)=0.d0 -+ enddo -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call getword(atom1,record,8,lenrec) -+ call getword(atom2,record,8,lenrec) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'stch') then -+ keypot=1 -+ numpar=5 -+ else if(keyword(1:4).eq.'fnsc') then -+ keypot=2 -+ numpar=7 -+ else if(keyword(1:4).eq.'gupt') then -+ keypot=3 -+ numpar=5 -+ elseif(keyword(1:4).eq.'eam ') then -+ keypot=999 -+ lmetab=.true. -+ numpar=0 -+ else -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,461) -+ endif -+ -+ if(.not.lmetab)then -+ -+ parpot(1)=dblstr(record,lenrec,idum) -+ parpot(2)=dblstr(record,lenrec,idum) -+ parpot(3)=dblstr(record,lenrec,idum) -+ parpot(4)=dblstr(record,lenrec,idum) -+ parpot(5)=dblstr(record,lenrec,idum) -+ parpot(6)=dblstr(record,lenrec,idum) -+ parpot(7)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(16x,2a8,2x,a4,3x,1p,9e13.5)") -+ x atom1,atom2,keyword(1:4),(parpot(j),j=1,numpar) -+ -+ endif -+ -+ katm1=0 -+ katm2=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm -+ -+ enddo -+ -+ if(katm1.eq.0.or.katm2.eq.0) then -+ call error(idnode,463) -+ endif -+ -+ keymet=loc2(katm1,katm2) -+ -+c convert energies to internal unit -+ -+ if(keymet.ge.mxmet) call error(idnode,465) -+ -+ parpot(1)=parpot(1)*engunit -+ -+ if(keypot.eq.2)then -+ -+ parpot(2)=parpot(2)*engunit -+ parpot(3)=parpot(3)*engunit -+ parpot(5)=parpot(5)*engunit -+ -+ endif -+ -+ if(keypot.eq.3)then -+ parpot(4)=parpot(4)*engunit -+ endif -+ -+ if(lstmet(keymet).ne.0) call error(idnode,141) -+ lstmet(keymet)=itpmet -+ ltpmet(itpmet)=keypot -+ if(itpmet.gt.1)then -+ if(keypot.ne.ltpmet(itpmet-1))call error(idnode,72) -+ endif -+ -+ if(.not.lmetab)then -+ -+ do i=1,numpar -+ prmmet(itpmet,i)=parpot(i) -+ enddo -+ -+ endif -+ -+ enddo -+ -+c check for unspecified atom-atom potentials -+ -+ ntab=(ntpatm*(ntpatm+1))/2 -+ -+ if(ntpmet.lt.ntab) then -+ -+ call warning(idnode,110,0.d0,0.d0,0.d0) -+ -+ do i=1,ntab -+ if(lstmet(i).eq.0) lstmet(i)=ntpmet+1 -+ enddo -+ -+c set zero potential for undefined interactions -+ -+ do i=1,mxmet -+ -+ vmet(1,i,1)=0.d0 -+ vmet(1,i,2)=0.d0 -+ dmet(1,i,1)=0.d0 -+ dmet(1,i,2)=0.d0 -+ -+ enddo -+ -+ endif -+ -+c generate metal force arrays -+ -+ call metgen(idnode,ntpatm,rmet) -+ -+ if(lmetab) -+ x call mettab(ntpatm,idnode,rmet,engunit) -+ -+ deallocate (parpot,stat=fail) -+ -+ return -+ end subroutine define_metals -+ -+ subroutine metdens -+ x (idnode,imcon,mxnode,natms,engmet,virden) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating local density in metals -+c using the verlet neighbour list and sutton-chen potentials -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1995 -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer idnode,imcon,mxnode,natms,i,j,k,ii,k0,l -+ real(8) engmet,engtmp,virden,rhosqr,rrr,ppp,fk0,fk1,fk2,t1,t2 -+ -+ safe=.true. -+ -+c initialise energy accumulator -+ -+ engmet=0.d0 -+ virden=0.d0 -+ -+c initialise density array -+ -+ do i=1,natms -+ rho(i)=0.d0 -+ enddo -+ -+c calculate local atomic density -+ -+ ii=0 -+ -+c outer loop over atoms -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ ilist(k)=j -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) -+ -+c square of distances -+ -+ do k=1,lentry(ii) -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ enddo -+ -+ if(lmetab)then -+ -+c calculate EAM density contributions -+ -+ call eamden(safe,i,lentry(ii)) -+ -+ else -+ -+c calculate FS density contributions -+ -+ call fsden(safe,i,lentry(ii)) -+ -+ endif -+ -+ enddo -+ -+c global sum of local atomic densities -+ -+ if(mxnode.gt.1)call gdsum(rho,natms,buffer) -+ -+c calculate embedding energy -+ -+ if(lmetab)then -+ -+c density terms for eam potentials -+ -+ do i=1,natms -+ -+ if(rho(i).gt.0.d0)then -+ -+ k0=ltype(i) -+ rrr=rho(i)-fmet(2,k0,1) -+ l=min(nint(rrr/fmet(4,k0,1)),int(fmet(1,k0,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ -+ else -+ -+ ppp=(rrr/fmet(4,k0,1))-dble(l) -+ -+c calculate embedding energy using 3-point interpolation -+ -+ fk0=fmet(l-1,k0,1) -+ fk1=fmet(l,k0,1) -+ fk2=fmet(l+1,k0,1) -+ -+ t1=fk1+(fk1-fk0)*ppp -+ t2=fk1+(fk2-fk1)*ppp -+ if(ppp.lt.0.d0)then -+ engtmp=-(t1+0.5d0*(t2-t1)*(ppp+1.d0)) -+ else -+ engtmp=-(t2+0.5d0*(t2-t1)*(ppp-1.d0)) -+ endif -+ -+ engmet=engmet+engtmp -+ -+c calculate derivative of embedding function wrt density using 3-point -+c interpolation - store result in rho array -+ -+ fk0=fmet(l-1,k0,2) -+ fk1=fmet(l,k0,2) -+ fk2=fmet(l+1,k0,2) -+ -+ t1=fk1+(fk1-fk0)*ppp -+ t2=fk1+(fk2-fk1)*ppp -+ if(ppp.lt.0.d0)then -+ rho(i)=(t1+0.5d0*(t2-t1)*(ppp+1.d0)) -+ else -+ rho(i)=(t2+0.5d0*(t2-t1)*(ppp-1.d0)) -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ else -+ -+c analytical square root of density dependence -+ -+ do i=1,natms -+ -+ if(rho(i).gt.0.d0)then -+ -+ rhosqr=sqrt(rho(i)+elrcm(ltype(i))) -+ engmet=engmet+rhosqr -+ rho(i)=0.5d0/rhosqr -+ virden=virden+vlrcm(ltype(i))/rhosqr -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ engmet=-engmet/dble(mxnode) -+ virden=virden/dble(mxnode) -+ -+c check interpolation is safe -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,142) -+ -+ return -+ end subroutine metdens -+ -+ subroutine fsden(safe,iatm,ik) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating local atomic density -+c for FS type metal potentials -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer iatm,jatm,ik,m,k0,l -+ real(8) rdr,ai,aj,ab,rsq,rrr,ppp,t1,t2 -+ real(8) vk0,vk1,vk2,density -+ -+c start of primary loop for density -+ -+ ai=dble(ltype(iatm)) -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ jatm=ilist(m) -+ -+ aj=dble(ltype(jatm)) -+ if(ai.gt.aj) then -+ ab=ai*(ai-1.d0)*0.5d0+aj+0.5d0 -+ else -+ ab=aj*(aj-1.d0)*0.5d0+ai+0.5d0 -+ endif -+ -+ k0=lstmet(int(ab)) -+ -+ if((ltpmet(k0).ge.1).and.(abs(dmet(1,k0,1)).gt.0.d0))then -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+c apply cutoff condition -+ -+ if(rsq.le.dmet(3,k0,1)**2)then -+ -+c interpolation parameters -+ -+ rdr=1.d0/dmet(4,k0,1) -+ rrr=sqrt(rsq)-dmet(2,k0,1) -+ l=min(nint(rrr*rdr),int(dmet(1,k0,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ -+ else -+ -+ ppp=rrr*rdr-dble(l) -+ -+c calculate density using 3-point interpolation -+ -+ vk0=dmet(l-1,k0,1) -+ vk1=dmet(l,k0,1) -+ vk2=dmet(l+1,k0,1) -+ -+ t1=vk1+ppp*(vk1-vk0) -+ t2=vk1+ppp*(vk2-vk1) -+ if(ppp.lt.0.d0)then -+ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ if(ai.gt.aj)then -+ -+ rho(iatm)=rho(iatm)+density*dmet(1,k0,2) -+ rho(jatm)=rho(jatm)+density*dmet(2,k0,2) -+ -+ else -+ -+ rho(iatm)=rho(iatm)+density*dmet(2,k0,2) -+ rho(jatm)=rho(jatm)+density*dmet(1,k0,2) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine fsden -+ -+ subroutine eamden(safe,iatm,ik) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating local atomic density -+c for EAM type metal potentials -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ logical safe -+ integer iatm,jatm,ik,m,l,ktyp1,ktyp2 -+ real(8) rdr,rsq,rrr,ppp,t1,t2 -+ real(8) vk0,vk1,vk2,density -+ -+c start of primary loop for density -+ -+ ktyp1=ltype(iatm) -+ -+ do m=1,ik -+ -+c first metal atom density -+ -+ jatm=ilist(m) -+ ktyp2=ltype(jatm) -+ -+ if(abs(dmet(1,ktyp2,1)).gt.0.d0)then -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+ if(rsq.le.dmet(3,ktyp2,1)**2)then -+ -+c interpolation parameters -+ -+ rdr=1.d0/dmet(4,ktyp2,1) -+ rrr=sqrt(rsq)-dmet(2,ktyp2,1) -+ l=min(nint(rrr*rdr),int(dmet(1,ktyp2,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ -+ else -+ -+ ppp=rrr*rdr-dble(l) -+ -+c calculate density using 3-point interpolation -+ -+ vk0=dmet(l-1,ktyp2,1) -+ vk1=dmet(l,ktyp2,1) -+ vk2=dmet(l+1,ktyp2,1) -+ -+ t1=vk1+ppp*(vk1-vk0) -+ t2=vk1+ppp*(vk2-vk1) -+ if(ppp.lt.0.d0)then -+ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ rho(iatm)=rho(iatm)+density -+ if(ktyp1.eq.ktyp2)rho(jatm)=rho(jatm)+density -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c second metal atom density -+ -+ if(ktyp1.ne.ktyp2)then -+ -+ if(abs(dmet(1,ktyp1,1)).gt.0.d0)then -+ -+c apply truncation of potential -+ -+ if(rsq.le.dmet(3,ktyp1,1)**2)then -+ -+c interpolation parameters -+ -+ rdr=1.d0/dmet(4,ktyp1,1) -+ rrr=sqrt(rsq)-dmet(2,ktyp1,1) -+ l=min(nint(rrr*rdr),int(dmet(1,ktyp1,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ -+ else -+ -+ ppp=rrr*rdr-dble(l) -+ -+c calculate density using 3-point interpolation -+ -+ vk0=dmet(l-1,ktyp1,1) -+ vk1=dmet(l,ktyp1,1) -+ vk2=dmet(l+1,ktyp1,1) -+ -+ t1=vk1+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*ppp -+ if(ppp.lt.0.d0)then -+ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ rho(jatm)=rho(jatm)+density -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine eamden -+ -+ subroutine metfrc(safe,iatm,ik,engmet,virmet) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating metal forces -+c for EAM and FS potentials using a verlet neighbour list -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer iatm,jatm,ik,m,k0,l,ld,ktyp1,ktyp2 -+ real(8) engmet,virmet,strs -+ real(8) rdr,rsq,rrr,ppp,vk0,vk1,vk2,t1,t2,gk0,gk1,gk2 -+ real(8) gamma,gamma1,gamma2,gamma3,fx,fy,fz,fi -+ dimension fi(3),strs(6) -+ -+CDIR$ CACHE_ALIGN fi -+ -+c initialise potential energy and virial -+ -+ engmet=0.d0 -+ virmet=0.d0 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ -+c store forces for iatm -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ ktyp1=ltype(iatm) -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ jatm=ilist(m) -+ ktyp2=ltype(jatm) -+ k0=lstmet(loc2(ktyp1,ktyp2)) -+ -+ if((ltpmet(k0).gt.0).and.(abs(vmet(1,k0,1)).gt.0.d0))then -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+ if(rsq.le.vmet(3,k0,1)**2)then -+ -+c interpolation parameters -+ -+ rdr=1.d0/vmet(4,k0,1) -+ rrr=sqrt(rsq)-vmet(2,k0,1) -+ l=min(nint(rrr*rdr),int(vmet(1,k0,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ gamma1=0.d0 -+ -+ else -+ -+ ppp=rrr*rdr-dble(l) -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0=vmet(l-1,k0,1) -+ vk1=vmet(l,k0,1) -+ vk2=vmet(l+1,k0,1) -+ -+ t1=vk1+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*ppp -+ if(ppp.lt.0.d0)then -+ engmet=engmet+t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ engmet=engmet+t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+c calculate pair forces using 3-point interpolation -+ -+ gk0=vmet(l-1,k0,2) -+ gk1=vmet(l,k0,2) -+ gk2=vmet(l+1,k0,2) -+ -+ t1=gk1+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*ppp -+ if(ppp.lt.0.d0)then -+ gamma1=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ gamma1=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ endif -+ -+c calculate embedding forces using 3-point interpolation -+ -+ if(lmetab)then -+ -+ if(rsq.le.dmet(3,ktyp2,1)**2)then -+ -+ rdr=1.d0/dmet(4,ktyp2,1) -+ rrr=sqrt(rsq)-dmet(2,ktyp2,1) -+ ld=min(nint(rrr*rdr),int(dmet(1,ktyp2,1))-1) -+ if(ld.lt.1)then -+ -+ safe=.false. -+ gamma2=0.d0 -+ -+ else -+ -+ ppp=rrr*rdr-dble(ld) -+ -+ gk0=dmet(ld-1,ktyp2,2) -+ gk1=dmet(ld,ktyp2,2) -+ gk2=dmet(ld+1,ktyp2,2) -+ -+ t1=gk1+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*ppp -+ if(ppp.lt.0.d0)then -+ gamma2=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ gamma2=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ endif -+ -+ else -+ -+ gamma2=0.d0 -+ -+ endif -+ -+ if(ktyp1.eq.ktyp2)then -+ -+ gamma3=gamma2 -+ -+ elseif(rsq.le.dmet(3,ktyp1,1)**2)then -+ -+ rdr=1.d0/dmet(4,ktyp1,1) -+ rrr=sqrt(rsq)-dmet(2,ktyp1,1) -+ ld=min(nint(rrr*rdr),int(dmet(1,ktyp1,1))-1) -+ if(ld.lt.1)then -+ -+ safe=.false. -+ gamma3=0.d0 -+ -+ else -+ -+ ppp=rrr*rdr-dble(ld) -+ gk0=dmet(ld-1,ktyp1,2) -+ gk1=dmet(ld,ktyp1,2) -+ gk2=dmet(ld+1,ktyp1,2) -+ -+ t1=gk1+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*ppp -+ if(ppp.lt.0.d0)then -+ gamma3=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ gamma3=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ endif -+ -+ else -+ -+ gamma3=0.d0 -+ -+ endif -+ -+ gamma=(gamma1+(gamma2*rho(iatm)+gamma3*rho(jatm)))/rsq -+ -+ else -+ -+ if(safe.and.rsq.le.dmet(3,k0,1)**2)then -+ -+ gk0=dmet(l-1,k0,2) -+ gk1=dmet(l,k0,2) -+ gk2=dmet(l+1,k0,2) -+ -+ t1=gk1+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*ppp -+ if(ppp.lt.0.d0)then -+ gamma2=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ gamma2=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ else -+ -+ gamma2=0.d0 -+ -+ endif -+ -+ if(ktyp1.gt.ktyp2)then -+ -+ gamma=(gamma1-gamma2*(rho(iatm)*dmet(1,k0,2)+ -+ x rho(jatm)*dmet(2,k0,2)))/rsq -+ -+ else -+ -+ gamma=(gamma1-gamma2*(rho(iatm)*dmet(2,k0,2)+ -+ x rho(jatm)*dmet(1,k0,2)))/rsq -+ -+ endif -+ -+ endif -+ -+c calculate forces -+ -+ fx=gamma*xdf(m) -+ fy=gamma*ydf(m) -+ fz=gamma*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+c calculate virial -+ -+ virmet=virmet-gamma*rsq -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ return -+ end subroutine metfrc -+ -+ subroutine metgen(idnode,ntpatm,rmet) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for generating potential energy and -+c force arrays for metal potentials -+c -+c copyright - daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,kmet,mmet,katm1,katm2,ntpatm,imet,nmet -+ integer idnode,nnn,mmm -+ real(8) dlrpot,rmet,rrr,eps,sig,cc0,cc1,cc2,ccc -+ real(8) ddd,bet,cut1,cut2,aaa,rr0,ppp,qqq -+ -+c define grid resolution for potential arrays -+ -+ dlrpot=rmet/dble(mxgrid-1) -+ -+c construct arrays for metal potentials -+ -+ kmet=0 -+ do katm1=1,ntpatm -+ -+ do katm2=1,katm1 -+ -+ kmet=kmet+1 -+ imet=lstmet(kmet) -+ -+ if(ltpmet(imet).gt.0)then -+ -+c store array specification parameters -+ -+ vmet(1,imet,1)=dble(mxgrid) -+ vmet(2,imet,1)=0.d0 -+ vmet(3,imet,1)=rmet -+ vmet(4,imet,1)=dlrpot -+ -+ do i=1,4 -+ -+ vmet(i,imet,2)=vmet(i,imet,1) -+ dmet(i,imet,1)=vmet(i,imet,1) -+ dmet(i,imet,2)=0.d0 -+ -+ enddo -+ -+ if(ltpmet(imet).eq.1)then -+ -+c sutton-chen potentials -+ -+ eps=prmmet(imet,1) -+ sig=prmmet(imet,2) -+ nnn=nint(prmmet(imet,3)) -+ mmm=nint(prmmet(imet,4)) -+ -+ do i=5,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ vmet(i,imet,1)=eps*(sig/rrr)**nnn -+ vmet(i,imet,2)=dble(nnn)*eps*(sig/rrr)**nnn -+ dmet(i,imet,1)=(sig/rrr)**mmm -+ dmet(i,imet,2)=dble(mmm)*(sig/rrr)**mmm -+ -+ enddo -+ -+ if(katm1.eq.katm2)then -+ -+ dmet(1,imet,2)=(prmmet(imet,1)*prmmet(imet,5))**2 -+ dmet(2,imet,2)=(prmmet(imet,1)*prmmet(imet,5))**2 -+ -+ else -+ -+ nmet=lstmet((katm1*(katm1+1))/2) -+ mmet=lstmet((katm2*(katm2+1))/2) -+ dmet(1,imet,2)=(prmmet(nmet,1)*prmmet(nmet,5))**2 -+ dmet(2,imet,2)=(prmmet(mmet,1)*prmmet(mmet,5))**2 -+ -+ endif -+ -+ else if(ltpmet(imet).eq.2)then -+ -+c finnis sinclair potentials -+ -+ cc0=prmmet(imet,1) -+ cc1=prmmet(imet,2) -+ cc2=prmmet(imet,3) -+ ccc=prmmet(imet,4) -+ ddd=prmmet(imet,6) -+ bet=prmmet(imet,7) -+ cut1=ccc+4.d0*dlrpot -+ cut2=ddd+4.d0*dlrpot -+ -+ do i=5,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ vmet(i,imet,1)=0.d0 -+ vmet(i,imet,2)=0.d0 -+ dmet(i,imet,1)=0.d0 -+ dmet(i,imet,2)=0.d0 -+ -+ if(rrr.le.cut1)then -+ -+ vmet(i,imet,1)=(cc0+cc1*rrr+cc2*rrr*rrr)*(rrr-ccc)**2 -+ vmet(i,imet,2)=-rrr*(2.d0*(cc0+cc1*rrr+cc2*rrr*rrr)* -+ x (rrr-ccc)+(cc1+2.d0*cc2*rrr)*(rrr-ccc)**2) -+ -+ endif -+ -+ if(rrr.le.cut2)then -+ -+ dmet(i,imet,1)=(rrr-ddd)**2+bet*(rrr-ddd)**3/ddd -+ dmet(i,imet,2)=-rrr*(2.d0*(rrr-ddd)+ -+ x 3.d0*bet*(rrr-ddd)**2/ddd) -+ -+ endif -+ -+ enddo -+ -+ if(katm1.eq.katm2)then -+ -+ dmet(1,imet,2)=prmmet(imet,5)**2 -+ dmet(2,imet,2)=prmmet(imet,5)**2 -+ -+ else -+ -+ nmet=lstmet((katm1*(katm1+1))/2) -+ mmet=lstmet((katm2*(katm2+1))/2) -+ dmet(1,imet,2)=prmmet(nmet,5)**2 -+ dmet(2,imet,2)=prmmet(mmet,5)**2 -+ -+ endif -+ -+ else if(ltpmet(imet).eq.3)then -+ -+c gupta potentials -+ -+ aaa=prmmet(imet,1) -+ rr0=prmmet(imet,2) -+ ppp=prmmet(imet,3) -+ qqq=prmmet(imet,5) -+ -+ do i=5,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ vmet(i,imet,1)=aaa*exp(-ppp*(rrr-rr0)/rr0) -+ vmet(i,imet,2)=vmet(i,imet,1)*rrr*ppp/rr0 -+ dmet(i,imet,1)=exp(-2.d0*qqq*(rrr-rr0)/rr0) -+ dmet(i,imet,2)=2.d0*dmet(i,imet,1)*rrr*qqq/rr0 -+ -+ enddo -+ -+ dmet(1,imet,2)=prmmet(imet,4)**2 -+ dmet(2,imet,2)=prmmet(imet,4)**2 -+ -+ else if(.not.lmetab)then -+ -+ call error(idnode,151) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine metgen -+ -+ subroutine lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rmet,volm) -+ -+c************************************************************************* -+c -+c DL_POLY subroutine to evaluate long-range corrections to -+c pressure and energy in a periodic metal system. -+c -+c copyright daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*************************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,imcon,natms,ntpatm,i,ka,j -+ integer kmet,k0,k1,k2 -+ real(8) engunit,rmet,volm,twopi,forpi,eps,sig,nnn,mmm,ccc -+ real(8) elrcm0,elrcm1,elrcm2,vlrcm0,vlrcm1,vlrcm2,aaa,rr0,ppp -+ real(8) zet,qqq,eee -+ -+ save newjob -+ data newjob/.true./ -+ -+ twopi=2.0d0*pi -+ forpi=4.0d0*pi -+ -+c initalise counter arrays -+ -+ do i=1,mxsmet -+ numtyp(i)=0 -+ enddo -+ -+c evaluate species populations in system -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ numtyp(ka)=numtyp(ka)+1 -+ -+ enddo -+ -+c number densities -+ -+ do i=1,ntpatm -+ dens(i)=dble(numtyp(i))/volm -+ enddo -+ -+c long range corrections to density, energy and pressure -+ -+ do i=0,mxsmet -+ -+ elrcm(i)=0.d0 -+ vlrcm(i)=0.d0 -+ -+ enddo -+ -+ if(imcon.ne.0.and.imcon.ne.6) then -+ -+ kmet=0 -+ do i=1,ntpatm -+ -+ do j=1,i -+ -+ elrcm0=0.d0 -+ elrcm1=0.d0 -+ elrcm2=0.d0 -+ vlrcm0=0.d0 -+ vlrcm1=0.d0 -+ vlrcm2=0.d0 -+ -+ kmet=kmet+1 -+ k0=lstmet(kmet) -+ -+ if(ltpmet(k0).eq.1) then -+ -+c sutton-chen potentials -+ -+ eps=prmmet(k0,1) -+ sig=prmmet(k0,2) -+ nnn=prmmet(k0,3) -+ mmm=prmmet(k0,4) -+ ccc=prmmet(k0,5) -+ -+ elrcm0=eps*sig**3*(sig/rmet)**(nnn-3.d0)/(nnn-3.d0) -+ vlrcm0=eps*nnn*sig**3*(sig/rmet)**(nnn-3.d0)/(nnn-3.d0) -+ if(i.ne.j) then -+ elrcm0=elrcm0*2.d0 -+ vlrcm0=vlrcm0*2.d0 -+ endif -+ elrcm(0)=elrcm(0)+twopi*volm*dens(i)*dens(j)*elrcm0 -+ vlrcm(0)=vlrcm(0)-twopi*volm*dens(i)*dens(j)*vlrcm0 -+ -+ if(i.eq.j) then -+ -+ elrcm1=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (eps*ccc)**2 -+ elrcm(i)=elrcm(i)+forpi*dens(i)*elrcm1 -+ -+ vlrcm1=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (eps*ccc)**2 -+ vlrcm(i)=vlrcm(i)+twopi*dens(i)*vlrcm1 -+ -+ else -+ -+ k1=lstmet((i*(i+1))/2) -+ k2=lstmet((j*(j+1))/2) -+ elrcm1=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (prmmet(k1,1)*prmmet(k1,5))**2 -+ elrcm2=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (prmmet(k2,1)*prmmet(k2,5))**2 -+ elrcm(i)=elrcm(i)+forpi*dens(j)*elrcm1 -+ elrcm(j)=elrcm(j)+forpi*dens(i)*elrcm2 -+ -+ vlrcm1=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (prmmet(k1,1)*prmmet(k1,5))**2 -+ vlrcm2=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (prmmet(k2,1)*prmmet(k2,5))**2 -+ vlrcm(i)=vlrcm(i)+twopi*dens(j)*vlrcm1 -+ vlrcm(j)=vlrcm(j)+twopi*dens(i)*vlrcm2 -+ -+ endif -+ -+ else if(ltpmet(k0).eq.3) then -+ -+c gupta potentials -+ -+ aaa=prmmet(k0,1) -+ rr0=prmmet(k0,2) -+ ppp=prmmet(k0,3) -+ zet=prmmet(k0,4) -+ qqq=prmmet(k0,5) -+ eee=exp(-ppp*(rmet-rr0)/rr0) -+ -+ elrcm0=aaa*(rr0/ppp)*(rmet**2+2.d0*rmet*(rr0/ppp)+ -+ x 2.d0*(rr0/ppp)**2)*eee -+ vlrcm0=aaa*(rmet**3+3.d0*rmet**2*(rr0/ppp)+ -+ x 6.d0*rmet*(rr0/ppp)**2+6.d0*(rr0/rmet)**3)*eee -+ if(i.ne.j) then -+ elrcm0=elrcm0*2.d0 -+ vlrcm0=vlrcm0*2.d0 -+ endif -+ elrcm(0)=elrcm(0)+twopi*volm*dens(i)*dens(j)*elrcm0 -+ vlrcm(0)=vlrcm(0)-twopi*volm*dens(i)*dens(j)*vlrcm0 -+ -+ eee=exp(-2.d0*qqq*(rmet-rr0)/rr0) -+ -+ if(i.eq.j) then -+ -+ elrcm1=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ -+ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee*zet**2 -+ elrcm(i)=elrcm(i)+forpi*dens(i)*elrcm1 -+ -+ vlrcm1=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ -+ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* -+ x eee*zet**2 -+ vlrcm(i)=vlrcm(i)+twopi*dens(i)*vlrcm1 -+ -+ else -+ -+ elrcm1=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ -+ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee* -+ x zet**2 -+ elrcm2=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ -+ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee* -+ x zet**2 -+ elrcm(i)=elrcm(i)+forpi*dens(j)*elrcm1 -+ elrcm(j)=elrcm(j)+forpi*dens(i)*elrcm2 -+ -+ vlrcm1=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ -+ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* -+ x eee*zet**2 -+ vlrcm2=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ -+ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* -+ x eee*zet**2 -+ vlrcm(i)=vlrcm(i)+twopi*dens(j)*vlrcm1 -+ vlrcm(j)=vlrcm(j)+twopi*dens(i)*vlrcm2 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(newjob)then -+ -+ newjob=.false. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,/, -+ x 'long range corrections for metal potentials',/)") -+ write(nrite, -+ x "('short range energy and virial corrections:', -+ x 1p,2e15.6,/)") -+ x elrcm(0)/engunit,vlrcm(0)/engunit -+ write(nrite, -+ x "('density dependent energy and virial corrections',/)") -+ -+ do i=1,ntpatm -+ -+ kmet=lstmet((i*(i+1))/2) -+ if(lstmet(kmet).gt.0)then -+ -+ write(nrite,"(25x,a8,1p,2e15.6)")unqatm(i), -+ x elrcm(i)/engunit,vlrcm(i)/engunit -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine lrcmetal -+ -+ subroutine mettab(ntpatm,idnode,rmet,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading potential energy and -+c force arrays for EAM metal forces only -+c -+c copyright - daresbury laboratory -+c author - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 atom1,atom2,type -+ integer idnode,ntpatm,idum,fail -+ integer imet,katm1,katm2,jtpatm,i,j,k,ktype -+ integer numpot,numpts,ipot -+ real(8) rmet,engunit,start,finish -+ data fail/0/ -+ -+c allocate embedding array -+ -+ allocate(fmet(mxgrid,mxmet,2),stat=fail) -+ if(fail.ne.0)call error(idnode,36) -+ -+c define zero function for undefined interactions -+ -+ do i=1,mxmet -+ -+ fmet(1,i,1)=0.d0 -+ fmet(1,i,2)=0.d0 -+ -+ enddo -+ -+ if(idnode.eq.0)open (ntable,file='TABEAM') -+ -+c skip header record -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_eamtable_read(idnode,ntable) -+ -+c read number of potential functions in file -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_eamtable_read(idnode,ntable) -+ numpot=intstr(record,lenrec,idum) -+ -+ do ipot=1,numpot -+ -+c read data type, atom labels, number of points, start and end -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_eamtable_read(idnode,ntable) -+ -+c indentify data type -+ -+ ktype=1 -+ if(findstring('dens',record,idum).or. -+ x findstring('DENS',record,idum))ktype=2 -+ if(findstring('embe',record,idum).or. -+ x findstring('EMBE',record,idum))ktype=3 -+ call getword(type,record,8,lenrec) -+ -+c identify atom types -+ -+ call getword(atom1,record,8,lenrec) -+ if(ktype.eq.1)then -+ call getword(atom2,record,8,lenrec) -+ else -+ atom2=atom1 -+ endif -+ -+c data specifiers -+ -+ numpts=intstr(record,lenrec,idum) -+ start=dblstr(record,lenrec,idum) -+ finish=dblstr(record,lenrec,idum) -+ -+c check atom indentities -+ -+ katm1=0 -+ katm2=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm -+ -+ enddo -+ -+ if(katm1.eq.0.or.katm2.eq.0) then -+ if(idnode.eq.0) -+ x write(nrite,'(a)') ' **** '//atom1//' *** '//atom2//' ****' -+ call error(idnode,81) -+ endif -+ -+c check array dimensions -+ -+ if(mxbuff.lt.numpts+4)then -+ -+ if(idnode.eq.0) -+ x write(nrite,*) 'mxbuff must be >=',numpts+4,' in mettab' -+ call error(idnode,28) -+ -+ endif -+ -+c store working parameters (start shifted for DL_POLY interpolation) -+ -+ buffer(1)=dble(numpts+4) -+ buffer(4)=(finish-start)/dble(numpts-1) -+ buffer(2)=start-5.d0*buffer(4) -+ buffer(3)=finish -+ if(idnode.eq.0) -+ x write(nrite,"(16x,2a8,2x,a4,3x,1p,4e13.5)") -+ x atom1,atom2,type,dble(numpts),start,finish,buffer(4) -+ -+c read potential arrays -+ -+ k=4 -+ do j=1,(numpts+3)/4 -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_eamtable_read(idnode,ntable) -+ buffer(k+1)=dblstr(record,lenrec,idum) -+ buffer(k+2)=dblstr(record,lenrec,idum) -+ buffer(k+3)=dblstr(record,lenrec,idum) -+ buffer(k+4)=dblstr(record,lenrec,idum) -+ k=k+4 -+ -+ enddo -+ -+c copy data to internal arrays -+ -+ if(ktype.eq.1)then -+ -+c check range against specified cutoff -+ -+ if(rmet.lt.finish)call error(idnode,26) -+ -+c identify potential -+ -+ imet=lstmet(loc2(katm1,katm2)) -+ -+c pair potential terms -+ -+ vmet(1,imet,1)=buffer(1) -+ vmet(2,imet,1)=buffer(2) -+ vmet(3,imet,1)=buffer(3) -+ vmet(4,imet,1)=buffer(4) -+ -+ do i=5,mxgrid -+ -+ if(i-4.gt.numpts)then -+ vmet(i,imet,1)=0.d0 -+ else -+ vmet(i,imet,1)=buffer(i)*engunit -+ buffer(i)=buffer(i)*engunit -+ endif -+ -+ enddo -+ -+c calculate derivative of pair potential function -+ -+ call metal_deriv(imet,vmet,buffer) -+ -+c adapt derivatives for use in interpolation -+ -+ do i=5,numpts+4 -+ vmet(i,imet,2)=-(dble(i)*buffer(4)+buffer(2))* -+ x vmet(i,imet,2) -+ enddo -+ -+ else if(ktype.eq.2)then -+ -+c check range against specified cutoff -+ -+ if(rmet.lt.finish)call error(idnode,26) -+ -+c density terms -+ -+ dmet(1,katm1,1)=buffer(1) -+ dmet(2,katm1,1)=buffer(2) -+ dmet(3,katm1,1)=buffer(3) -+ dmet(4,katm1,1)=buffer(4) -+ -+ do i=5,mxgrid -+ -+ if(i-4.gt.numpts)then -+ dmet(i,katm1,1)=0.d0 -+ else -+ dmet(i,katm1,1)=buffer(i) -+ endif -+ -+ enddo -+ -+c calculate derivative of density function -+ -+ call metal_deriv(katm1,dmet,buffer) -+ -+c adapt derivatives for use in interpolation -+ -+ dmet(1,katm1,2)=0.d0 -+ dmet(2,katm1,2)=0.d0 -+ dmet(3,katm1,2)=0.d0 -+ dmet(4,katm1,2)=0.d0 -+ do i=5,numpts+4 -+ dmet(i,katm1,2)=-(dble(i)*buffer(4)+buffer(2))* -+ x dmet(i,katm1,2) -+ enddo -+ -+ else if(ktype.eq.3)then -+ -+c embedding function arrays -+ -+ fmet(1,katm1,1)=buffer(1) -+ fmet(2,katm1,1)=buffer(2) -+ fmet(3,katm1,1)=buffer(3) -+ fmet(4,katm1,1)=buffer(4) -+ -+ do i=5,mxgrid -+ -+ if(i-4.gt.numpts)then -+ fmet(i,katm1,1)=0.d0 -+ else -+ fmet(i,katm1,1)=buffer(i)*engunit -+ buffer(i)=buffer(i)*engunit -+ endif -+ -+ enddo -+ -+c calculate derivative of embedding function -+ -+ call metal_deriv(katm1,fmet,buffer) -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)close (ntable) -+ -+ if(idnode.eq.0)write(nrite,'(/,/,1x,a)') -+ x 'potential tables read from TABEAM file' -+ -+ return -+ end subroutine mettab -+ -+ subroutine metal_deriv(ityp,vvv,buffer) -+ -+c********************************************************************** -+c -+c calculate numerical derivatives of tabulated EAM metal potentials -+c -+c copyright - daresbury laboratory -+c author - w.smith march 2006 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer ityp,i,npt -+ real(8) vvv,buffer,delmet,aa0,aa1,aa2,aa3,aa4,d1y,d2y,d3y,d4y -+ real(8) f0,f1,f2,f3,f4 -+ -+ dimension vvv(mxgrid,mxmet,2),buffer(mxbuff) -+ -+c interpolation parameters -+ -+ vvv(1,ityp,2)=buffer(1) -+ vvv(2,ityp,2)=buffer(2) -+ vvv(3,ityp,2)=buffer(3) -+ vvv(4,ityp,2)=buffer(4) -+ -+c construct interpolation table -+ -+ delmet=buffer(4) -+ npt=nint(buffer(1))-2 -+ do i=7,npt -+ -+ aa0=buffer(i) -+ f0=buffer(i-2)/aa0 -+ f1=buffer(i-1)/aa0 -+ f2=1.d0 -+ f3=buffer(i+1)/aa0 -+ f4=buffer(i+2)/aa0 -+ -+c calculate numerical differences for 5-point interpolation -+ -+ d1y=(f1-f0) -+ d2y=(f2-f1)-(f1-f0) -+ d3y=(f3-f0)+3.d0*(f1-f2) -+ d4y=(f4-f3)+3.d0*(f2-f3)+3.d0*(f2-f1)+(f0-f1) -+ -+c calculate polynomial coefficients -+ -+ aa0=aa0/delmet -+ aa4=d4y/24.d0 -+ aa3=(d3y+12.d0*aa4)/6.d0 -+ aa2=(d2y+6.d0*aa3-14.d0*aa4)/2.d0 -+ aa1=d1y+3.d0*aa2-7.d0*aa3+15.d0*aa4 -+ -+c calculate derivatives -+ -+ vvv(i,ityp,2)=aa1*aa0 -+ -+c derivatives at extremes of range -+ -+ if(i.eq.7)then -+ -+ vvv(5,ityp,2)=(aa1-4.d0*aa2+12.d0*aa3-32.d0*aa4)*aa0 -+ vvv(6,ityp,2)=(aa1-2.d0*aa2+3.d0*aa3-4.d0*aa4)*aa0 -+ -+ else if(i.eq.npt)then -+ -+ vvv(npt+1,ityp,2)=(aa1+2.d0*aa2+3.d0*aa3+4.d0*aa4)*aa0 -+ vvv(npt+2,ityp,2)=(aa1+4.d0*aa2+12.d0*aa3+32.d0*aa4)*aa0 -+ -+ endif -+ -+ enddo -+ -+c set derivatives to zero beyond end point of function -+ -+ do i=npt+3,mxgrid -+ vvv(i,ityp,2)=0.d0 -+ enddo -+ -+ return -+ end subroutine metal_deriv -+ -+ subroutine abort_eamtable_read(idnode,ntable) -+ -+c*********************************************************************** -+c -+c dl_poly error exit subroutine for reading TABEAM file -+c -+c copyright - daresbury laboratory -+c author - w. smith mar 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ integer idnode,ntable -+ -+ if(idnode.eq.0)close (ntable) -+ -+ call error(idnode,29) -+ -+ end subroutine abort_eamtable_read -+ -+ end module metal_module -diff -urN dl_class_1.9.orig/srcmod/neu_coul_module.f dl_class_1.9/srcmod/neu_coul_module.f ---- dl_class_1.9.orig/srcmod/neu_coul_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/neu_coul_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,731 @@ -+ module neu_coul_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining neutral group coulomb terms -+c copyright - daresbury laboratory -+c -+c author - w. smith aug 2006 -+c adapted - p.-a. cazade oct 2007 : solvation, free energy etc -+c adapted - w. smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use ewald_module -+ use metafreeze_module -+ use pair_module -+ use setup_module -+ use solvation_module -+ -+ contains -+ -+ subroutine coul0neu -+ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic force. -+c 1/r potential, no truncation or damping. -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lexcite,lselect,lskip,idrive,jdrive -+ integer ik,m,iatm,jatm,kkk -+ real(8) engcpe,vircpe,epsq,chgprd,rsq,rrr,coul,reps,fcoul -+ real(8) fx,fy,fz -+ real(8) strs(6),strs_loc(6) -+ -+ lskip=(lfree.or.lexcite) -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ reps=r4pie0/epsq -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ iatm=ilist(m) -+ jatm=jlist(m) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(iatm)) -+ jdrive=driven(ltype(jatm)) -+ -+ endif -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chge(jatm)*chge(iatm)*reps -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+ rsq=rsqdf(m) -+ rrr=sqrt(rsq) -+ -+c calculate coulomb energy and force -+ -+ coul=chgprd/rrr -+ fcoul=coul/rsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+coul -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-coul -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate forces -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fxx(iatm)=fxx(iatm)+fx -+ fyy(iatm)=fyy(iatm)+fy -+ fzz(iatm)=fzz(iatm)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local definitions -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-coul -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine coul0neu -+ -+ subroutine coul2neu -+ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces -+c assuming a distance dependant dielectric `constant'. -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lexcite,lselect,lskip,idrive,jdrive -+ integer ik,m,iatm,jatm,kkk -+ real(8) engcpe,vircpe,epsq,fx,fy,fz,chgprd,rrsq,coul,egamma -+ real(8) strs(6),strs_loc(6) -+ -+ lskip=(lfree.or.lexcite) -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ iatm=ilist(m) -+ jatm=jlist(m) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(iatm)) -+ jdrive=driven(ltype(jatm)) -+ -+ endif -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chge(iatm)*chge(jatm)*r4pie0/epsq -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate potential energy -+ -+ rrsq=1.d0/rsqdf(m) -+ coul=chgprd*rrsq -+ egamma=2.d0*coul*rrsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+2.d0*coul -+ coul=lambda1*coul -+ egamma=lambda1*egamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-2.d0*coul -+ coul=lambda2*coul -+ egamma=lambda2*egamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and Virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-2.d0*coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate forces -+ -+ fx=egamma*xdf(m) -+ fy=egamma*ydf(m) -+ fz=egamma*zdf(m) -+ -+ fxx(iatm)=fxx(iatm)+fx -+ fyy(iatm)=fyy(iatm)+fy -+ fzz(iatm)=fzz(iatm)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local definitions -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-2.d0*coul -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine coul2neu -+ -+ subroutine coul3neu -+ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq,rcut,alpha) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic force. -+c reaction field potential -+c Ref: M Neumann, J Chem Phys, 82, 5633, (1985) -+c adapted for fennell-gezelter coulombic model -+c by w.smith june 2007 -+c Ref: CJ Fennell and JD Gezelter, J Chem Phys, -+c 124, 234104, (2006) -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1995 -+c author - t. forester february 1995 -+c stress tensor - t.forester feb 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lexcite,lselect,lskip,newjob,idrive,jdrive -+ integer ik,m,iatm,jatm,kkk -+ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,erc1,fer1 -+ real(8) rcsq,b0,rfld0,rfld1,rfld2,chgprd,rsq,coul,omega,fcoul -+ real(8) fx,fy,fz,rrr,alpha,a1,a2,a3,a4,a5,pp,tt,exp1 -+ real(8) strs(6),strs_loc(6) -+ -+ save newjob,b0,rfld0,rfld1,rfld2,vcon,fcon -+ -+ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ -+ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ -+ data newjob/.true./ -+ -+ if(newjob)then -+ -+c reaction field terms -+ -+ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) -+ rfld0=b0/rcut**3 -+ rfld1=(1.d0+b0*0.5d0)/rcut -+ rfld2=rfld0*0.5d0 -+ -+c screened coulomb terms -+ -+ tt=1.d0/(1.d0+pp*alpha*rcut) -+ exp1=exp(-(alpha*rcut)**2) -+ erc1=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut -+ fer1=(erc1+2.d0*(alpha/sqrpi)*exp1)/(rcut*rcut) -+ vcon=erc1+rfld2*rcut**2-rfld1 -+ fcon=rcut*fer1-rfld0*rcut -+ -+ endif -+ -+ lskip=(lfree.or.lexcite) -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ iatm=ilist(m) -+ jatm=jlist(m) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(iatm)) -+ jdrive=driven(ltype(jatm)) -+ -+ endif -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chge(jatm)*chge(iatm)*r4pie0 -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ rrr=sqrt(rsq) -+ -+c error function terms -+ -+ tt=1.d0/(1.d0+pp*alpha*rrr) -+ exp1=exp(-(alpha*rrr)**2) -+ erc1=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rrr -+ fer1=(erc1+2.d0*(alpha/sqrpi)*exp1)/rsq -+ -+c calculate potential energy -+ -+ omega=erc1-vcon+fcon*(rrr-rcut) -+ coul=chgprd*(omega+rfld2*rsq-rfld1) -+ -+c calculate forces -+ -+ fcoul=chgprd*(fer1-fcon/rrr-rfld0) -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+fcoul*rsq -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-fcoul*rsq -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate coulombic energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-fcoul*rsq -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate coulombic force -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fxx(iatm)=fxx(iatm)+fx -+ fyy(iatm)=fyy(iatm)+fy -+ fzz(iatm)=fzz(iatm)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local definitions -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-fcoul*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine coul3neu -+ -+ end module neu_coul_module -diff -urN dl_class_1.9.orig/srcmod/nlist_builders_module.f dl_class_1.9/srcmod/nlist_builders_module.f ---- dl_class_1.9.orig/srcmod/nlist_builders_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/nlist_builders_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,2216 @@ -+ module nlist_builders_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining neighbourlist builder routines -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use exclude_module -+ use pair_module -+ use setup_module -+ use utility_module -+ -+ contains -+ -+ subroutine nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c********************************************************************* -+c -+c dl_poly subroutine to select and implement neighbour list -+c builders for short range force calculations -+c -+c copyright - daresbury laboratory -+c author - w. smith june 2006 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,lneut,lnsq,loglnk,newjob,ltad -+ integer natms,idnode,mxnode,imcon,nneut,keyfce -+ real(8) rcut,delr,tstep -+ -+ save newjob -+ -+ data newjob/.true./ -+ -+c skip if no pair force calculations required -+ -+ if(keyfce.gt.0)then -+ -+c test for updating the Verlet list -+ -+ if(ltad)then -+ -+ call vertest2(newlst,idnode,mxnode,natms,imcon,delr,tstep) -+ -+ else -+ -+ call vertest(newlst,idnode,mxnode,natms,delr,tstep) -+ -+ endif -+ -+c set up nonbonded interaction (verlet) list -+ -+ newlst=(newjob.or.newlst) -+ -+ if(newlst)then -+ -+ if(.not.lneut)then -+ -+ if(lnsq)then -+ -+c calculate distant interactions explicitly -+ -+ call parlst_nsq(newlst,natms,idnode,mxnode,imcon,rcut) -+ -+ elseif(loglnk)then -+ -+c ignore real space distant interactions -+ -+ call parlink -+ x (newlst,natms,idnode,mxnode,imcon,rcut,delr) -+ -+ else -+ -+ call parlst -+ x (newlst,natms,idnode,mxnode,imcon,rcut,delr) -+ -+ endif -+ -+ else -+ -+ if(.not.loglnk)then -+ -+ call parneulst -+ x (newlst,lneut,nneut,idnode,mxnode,imcon,rcut, -+ x delr) -+ -+ else -+ -+ call parlinkneu -+ x (newlst,natms,nneut,idnode,mxnode,imcon, -+ x rcut,delr) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ newjob=.false. -+ -+ return -+ end subroutine nlist_driver -+ -+ subroutine parlst(newlst,natms,idnode,mxnode,imcon,rcut,delr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on the brode-ahlrichs scheme -+c frozen atoms taken into account -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w.smith march 1992 -+c modified - t.forester october 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst,lfrzi,ldo -+ integer natms,idnode,mxnode,imcon,ibig,last,mpm2 -+ integer npm2,idum,i,m,ii,j -+ real(8) rcut,delr,rclim,rsq -+ -+ -+ if(newlst)then -+ -+ ibig=0 -+ -+c check size of work array -+ -+ if(mxxdf.lt.(natms+1)/2)then -+ if(idnode.eq.0) write(nrite,*) 'mxxdf must be greater than ', -+ x (natms+1)/2 -+ call error(idnode,474) -+ endif -+ -+c set control variables -+ -+ last=natms -+ lchk=.true. -+ mpm2=natms/2 -+ npm2=(natms-1)/2 -+ -+c set cutoff radius -+ -+ rclim=(rcut+delr)**2 -+ -+c construct pair force neighbour list -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ noxatm(i)=1 -+ -+ enddo -+ -+c outer loop over atoms -+ -+ do m=1,mpm2 -+ -+ if(m.gt.npm2)last=mpm2 -+ -+c inner loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ ii=ii+1 -+ xdf(ii)=xxx(i)-xxx(j) -+ ydf(ii)=yyy(i)-yyy(j) -+ zdf(ii)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c apply minimum image convention -+ -+ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) -+ -+c allocate atoms to neighbour list -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+ lfrzi=(lstfrz(i).ne.0) -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ ii=ii+1 -+ -+c reject atoms in excluded pair list -+ -+ if((nexatm(ii).gt.0).and.(lexatm(ii,noxatm(ii)).eq.j)) -+ x then -+ -+ noxatm(ii)=min(noxatm(ii)+1,nexatm(ii)) -+ -+c reject frozen atom pairs -+ -+ else -+ -+ ldo=.true. -+ if(lfrzi)ldo=(lstfrz(j).eq.0) -+ -+ if(ldo)then -+ -+c calculate interatomic distance -+ -+ if(imcon.eq.6)then -+ -+ rsq=xdf(ii)*xdf(ii)+ydf(ii)*ydf(ii) -+ -+ else -+ -+ rsq=xdf(ii)*xdf(ii)+ydf(ii)*ydf(ii)+zdf(ii)*zdf(ii) -+ -+ endif -+ -+c running check of neighbour list array capacity -+ -+ if(rsq.lt.rclim)then -+ -+ lentry(ii)=lentry(ii)+1 -+ -+ if(lentry(ii).gt.mxlist)then -+ -+ lchk=.false. -+ ibig=max(lentry(ii),ibig) -+ -+ endif -+ -+c compile neighbour list array -+ -+ if(lchk)then -+ -+ list(ii,lentry(ii))=j -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ -+ if(.not.lchk)then -+ -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) ' mxlist must be at least ',ibig -+ write(nrite,*) ' mxlist is currently ',mxlist -+ endif -+ call error(idnode,110) -+ -+ endif -+ -+c check all excluded atoms are accounted for -+ -+ do i=1,ii -+ -+ if(nexatm(i).gt.0.and.noxatm(i).ne.nexatm(i))lchk=.false. -+ -+ enddo -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ -+ if(.not.lchk) call error(idnode,160) -+ -+ endif -+ -+ return -+ end subroutine parlst -+ -+ subroutine parlink(newlst,natms,idnode,mxnode,imcon,rcut,delr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on link-cell method. -+c frozen atoms taken into account -+c -+c to be used with the link version of exclude :exclude_link -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester september 1993. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst,linc,newjob,lfrzi,ldo -+ integer natms,idnode,mxnode,imcon,idum,nix,niy,niz,fail -+ integer i,ibig,irat,nsbcll,ilx,ily,ilz,ncells,ix,iy,iz,j,icell -+ integer ic,ii,kc,ik,jx,jy,jz,jc,ixl -+ real(8) rcut,delr,rcsq,xm,ym,zm,det,xdc,ydc,zdc,tx,ty,tz -+ real(8) cx,cy,cz,sxd,syd,szd,xd,yd,zd,rsq -+ -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ -+ dimension nix(508),niy(508),niz(508) -+ -+ save newjob -+ data newjob/.true./ -+ -+ data nix/0,1,0,0,-1,1,0,-1,1,0,-1,1,-1,1,2,0,0,-2,2,-1,1,0,-2,2,0, -+ x 0,-1,1,0,-1,1,-2,2,-2,2,-1,1,-1,1,-1,1,-2,2,0,-2,2,0,-2,2,-2,2, -+ x -1,1,-2,2,-2,2,-1,1,-2,2,-2,2,3,0,0,-3,3,-1,1,0,-3,3,0,0,-1,1,0, -+ x -1,1,-3,3,-3,3,-1,1,-1,1,-1,1,-3,3,-2,2,0,-3,3,0,0,-2,2,0,-2,2, -+ x -3,3,-3,3,-2,2,-1,1,-3,3,-3,3,-1,1,-1,1,-2,2,-2,2,-1,1,-2,2,-3,3, -+ x -3,3,-2,2,-2,2,-2,2,-3,3,0,-3,3,0,-3,3,-3,3,-1,1,-3,3,-3,3,-1,1, -+ x -3,3,-3,3,-2,2,-3,3,-3,3,-2,2,-3,3,-3,3,4,0,0,-4,4,-1,1,0,-4,4,0, -+ x 0,-1,1,0,-1,1,-4,4,-4,4,-1,1,-1,1,-1,1,-4,4,-2,2,0,-4,4,0,0,-2,2, -+ x 0,-2,2,-4,4,-4,4,-2,2,-1,1,-4,4,-4,4,-1,1,-1,1,-2,2,-2,2,-1,1,-2, -+ x 2,-4,4,-4,4,-2,2,-2,2,-2,2,-4,4,-3,3,0,-4,4,0,0,-3,3,0,-3,3,-4,4, -+ x -4,4,-3,3,-1,1,-4,4,-4,4,-1,1,-1,1,-3,3,-3,3,-1,1,-3,3,-4,4,-4,4, -+ x -3,3,-2,2,-4,4,-4,4,-2,2,-2,2,-3,3,-3,3,-2,2,-3,3,-4,4,-4,4,-3,3, -+ x -3,3,-3,3,-4,4,0,-4,4,0,-4,4,-4,4,-1,1,-4,4,-4,4,-1,1,-4,4,-4,4, -+ x -2,2,-4,4,-4,4,-2,2,-4,4,-4,4,-3,3,-4,4,-4,4,-3,3,5,0,0,-5,5,-1, -+ x 1,0,-5,5,0,0,-1,1,0,-1,1,-5,5,-5,5,-1,1,-1,1,-1,1,-5,5,-2,2,0,-5, -+ x 5,0,0,-2,2,0,-2,2,-5,5,-5,5,-2,2,-1,1,-5,5,-5,5,-1,1,-1,1,-2,2, -+ x -2,2,-1,1,-2,2,-5,5,-5,5,-2,2,-2,2,-2,2,-5,5,-3,3,0,-5,5,0,0,-3, -+ x 3,0,-3,3,-5,5,-5,5,-3,3,-1,1,-5,5,-5,5,-1,1,-1,1,-3,3,-3,3,-1,1, -+ x -3,3,-5,5,-5,5,-3,3,-2,2,-5,5,-5,5,-2,2,-2,2,-3,3,-3,3,-2,2,-3,3, -+ x -5,5,-5,5,-3,3,-3,3,-3,3/ -+ data niy/ 0,0,1,0,1,1,-1,0,0,1,-1,-1,1,1,0,2,0,1,1,2,2,-2,0,0,2, -+ x -1,0,0,1,-2,-2,-1,-1,1,1,2,2,-1,-1,1,1,2,2,-2,0,0,2,-2,-2,2,2,-2, -+ x -2,-1,-1,1,1,2,2,-2,-2,2,2,0,3,0,1,1,3,3,-3,0,0,3,-1,0,0,1,-3,-3, -+ x -1,-1,1,1,3,3,-1,-1,1,1,2,2,3,3,-3,0,0,3,-2,0,0,2,-3,-3,-2,-2,2, -+ x 2,3,3,-3,-3,-1,-1,1,1,3,3,-2,-2,-1,-1,1,1,2,2,-3,-3,-2,-2,2,2,3, -+ x 3,-2,-2,2,2,3,3,-3,0,0,3,-3,-3,3,3,-3,-3,-1,-1,1,1,3,3,-3,-3,3,3, -+ x -3,-3,-2,-2,2,2,3,3,-3,-3,3,3,0,4,0,1,1,4,4,-4,0,0,4,-1,0,0,1,-4, -+ x -4,-1,-1,1,1,4,4,-1,-1,1,1,2,2,4,4,-4,0,0,4,-2,0,0,2,-4,-4,-2,-2, -+ x 2,2,4,4,-4,-4,-1,-1,1,1,4,4,-2,-2,-1,-1,1,1,2,2,-4,-4,-2,-2,2,2, -+ x 4,4,-2,-2,2,2,3,3,4,4,-4,0,0,4,-3,0,0,3,-4,-4,-3,-3,3,3,4,4,-4, -+ x -4,-1,-1,1,1,4,4,-3,-3,-1,-1,1,1,3,3,-4,-4,-3,-3,3,3,4,4,-4,-4, -+ x -2,-2,2,2,4,4,-3,-3,-2,-2,2,2,3,3,-4,-4,-3,-3,3,3,4,4,-3,-3,3,3, -+ x 4,4,-4,0,0,4,-4,-4,4,4,-4,-4,-1,-1,1,1,4,4,-4,-4,4,4,-4,-4,-2,-2, -+ x 2,2,4,4,-4,-4,4,4,-4,-4,-3,-3,3,3,4,4,0,5,0,1,1,5,5,-5,0,0,5,-1, -+ x 0,0,1,-5,-5,-1,-1,1,1,5,5,-1,-1,1,1,2,2,5,5,-5,0,0,5,-2,0,0,2,-5, -+ x -5,-2,-2,2,2,5,5,-5,-5,-1,-1,1,1,5,5,-2,-2,-1,-1,1,1,2,2,-5,-5, -+ x -2,-2,2,2,5,5,-2,-2,2,2,3,3,5,5,-5,0,0,5,-3,0,0,3,-5,-5,-3,-3,3, -+ x 3,5,5,-5,-5,-1,-1,1,1,5,5,-3,-3,-1,-1,1,1,3,3,-5,-5,-3,-3,3,3,5, -+ x 5,-5,-5,-2,-2,2,2,5,5,-3,-3,-2,-2,2,2,3,3,-5,-5,-3,-3,3,3,5,5,-3, -+ x -3,3,3/ -+ data niz/0,0,0,1,0,0,1,1,1,1,1,1,1,1,0,0,2,0,0,0,0,1,1,1,1,2,2,2, -+ x 2,1,1,1,1,1,1,1,1,2,2,2,2,0,0,2,2,2,2,1,1,1,1,2,2,2,2,2,2,2,2,2, -+ x 2,2,2,0,0,3,0,0,0,0,1,1,1,1,3,3,3,3,1,1,1,1,1,1,1,1,3,3,3,3,0,0, -+ x 0,0,2,2,2,2,3,3,3,3,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3, -+ x 3,3,2,2,2,2,2,2,2,2,3,3,3,3,0,0,3,3,3,3,1,1,1,1,3,3,3,3,3,3,3,3, -+ x 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,0,0,4,0,0,0,0,1,1,1,1,4,4,4,4,1, -+ x 1,1,1,1,1,1,1,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,1,1,1,1,1,1,1,1,2, -+ x 2,2,2,2,2,2,2,4,4,4,4,4,4,4,4,2,2,2,2,2,2,2,2,4,4,4,4,0,0,0,0,3, -+ x 3,3,3,4,4,4,4,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,2, -+ x 2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,4, -+ x 4,4,4,0,0,4,4,4,4,1,1,1,1,4,4,4,4,4,4,4,4,2,2,2,2,4,4,4,4,4,4,4, -+ x 4,3,3,3,3,4,4,4,4,4,4,4,4,0,0,5,0,0,0,0,1,1,1,1,5,5,5,5,1,1,1,1, -+ x 1,1,1,1,5,5,5,5,0,0,0,0,2,2,2,2,5,5,5,5,1,1,1,1,1,1,1,1,2,2,2,2, -+ x 2,2,2,2,5,5,5,5,5,5,5,5,2,2,2,2,2,2,2,2,5,5,5,5,0,0,0,0,3,3,3,3, -+ x 5,5,5,5,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,2,2,2,2, -+ x 2,2,2,2,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,5,5,5,5/ -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1890) -+ -+ if(newlst)then -+ -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x call error(idnode,300) -+ lchk=.true. -+ ibig=0 -+ -+c zero link arrays -+ -+ do i=1,natms -+ link(i)=0 -+ enddo -+ -+c construct pair force neighbour list -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ -+ enddo -+ -+c real space cut off -+ -+ rcsq=(rcut+delr)**2 -+ -+c create mock cell vector for non-periodic system -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+c find maximum x,y,z postions -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ -+ do i=1,natms -+ -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ -+ enddo -+ -+ if(imcon.eq.0)then -+ -+ cell(1)=max(2.d0*xm+rcut+delr,3.d0*(rcut+delr)) -+ cell(5)=max(2.d0*ym+rcut+delr,3.d0*(rcut+delr)) -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ -+ endif -+ -+ cell(9)=max(2.d0*zm+rcut+delr,3.d0*(rcut+delr),cell(9)) -+ -+ endif -+ -+ call dcell(cell,celprp) -+ call invert(cell,rcell,det) -+ -+c ratio of link cell length to cut off diameter - max value is 5 -+ -+c irat=nint((rcut+delr)/rlink) -+c irat=min(max(irat,1),5) -+ -+ irat=1 -+ -+ -+c number of subcells -+ -+ if (irat.eq.1)then -+ -+ nsbcll=14 -+ -+ elseif(irat.eq.2)then -+ -+ nsbcll=63 -+ -+ elseif(irat.eq.3)then -+ -+ nsbcll=156 -+ -+ elseif(irat.eq.4)then -+ -+ nsbcll=307 -+ -+ elseif(irat.eq.5)then -+ -+ nsbcll=508 -+ -+ endif -+ -+ ilx=int(celprp(7)*dble(irat)/(rcut+delr)) -+ ily=int(celprp(8)*dble(irat)/(rcut+delr)) -+ ilz=int(celprp(9)*dble(irat)/(rcut+delr)) -+ -+c check there are enough link cells -+ -+ linc=.true. -+ if(ilx.lt.2*irat+1)linc=.false. -+ if(ily.lt.2*irat+1)linc=.false. -+ if(ilz.lt.2*irat+1)linc=.false. -+ if(.not.linc) call error(idnode,305) -+ ncells=ilx*ily*ilz -+ if(ncells.gt.mxcell) call error(idnode,392) -+ -+c calculate link cell indices -+ -+ do i=1,ncells -+ -+ lct(i)=0 -+ -+ enddo -+ -+c link-cell cutoff for reduced space -+ -+ xdc=dble(ilx) -+ ydc=dble(ily) -+ zdc=dble(ilz) -+ -+c reduced space coordinates -+ if(newjob)then -+ -+ newjob=.false. -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+ if(mxnode.gt.1) call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ do i=1,natms -+ -+ tx=xxx(i) -+ ty=yyy(i) -+ tz=zzz(i) -+ -+ uxx(i)=(rcell(1)*tx+rcell(4)*ty+rcell(7)*tz)+0.5d0 -+ uyy(i)=(rcell(2)*tx+rcell(5)*ty+rcell(8)*tz)+0.5d0 -+ uzz(i)=(rcell(3)*tx+rcell(6)*ty+rcell(9)*tz)+0.5d0 -+ -+ enddo -+ -+c link neighbours -+ -+ do i=1,natms -+ -+ ix=min(int(xdc*uxx(i)),ilx-1) -+ iy=min(int(ydc*uyy(i)),ily-1) -+ iz=min(int(zdc*uzz(i)),ilz-1) -+ -+ icell=1+ix+ilx*(iy+ily*iz) -+ -+ j=lct(icell) -+ lct(icell)=i -+ link(i)=j -+ -+ enddo -+ -+c set control variables for loop over subcells -+ -+ ix=1 -+ iy=1 -+ iz=1 -+ -+c primary loop over subcells -+ -+ do ic=1,ncells -+ -+ ii=lct(ic) -+ if(ii.gt.0)then -+ -+c secondary loop over subcells -+ -+ ik=0 -+ -+ do kc=1,nsbcll -+ -+ i=ii -+ -+ cx=0.d0 -+ cy=0.d0 -+ cz=0.d0 -+ jx=ix+nix(kc) -+ jy=iy+niy(kc) -+ jz=iz+niz(kc) -+ -+c minimum image convention -+ -+ if(jx.gt.ilx)then -+ -+ jx=jx-ilx -+ cx=1.d0 -+ -+ elseif(jx.lt.1)then -+ -+ jx=jx+ilx -+ cx=-1.d0 -+ -+ endif -+ -+ if(jy.gt.ily)then -+ -+ jy=jy-ily -+ cy=1.d0 -+ -+ elseif(jy.lt.1)then -+ -+ jy=jy+ily -+ cy=-1.d0 -+ -+ endif -+ -+ if(jz.gt.ilz)then -+ -+ jz=jz-ilz -+ cz=1.d0 -+ -+ elseif(jz.lt.1)then -+ -+ jz=jz+ilz -+ cz=-1.d0 -+ -+ endif -+ -+c index of neighbouring cell -+ -+ jc=jx+ilx*((jy-1)+ily*(jz-1)) -+ j=lct(jc) -+ -+c ignore if empty -+ -+ if(j.gt.0)then -+ -+ do while(i.ne.0) -+ -+c test if site is of interest to this node -+ -+ if(mod(i-1,mxnode).eq.idnode)then -+ -+ -+c i's index for this processor -+ ik=((i-1)/mxnode)+1 -+ -+c test if i is a frozen atom -+ -+ lfrzi=(lstfrz(i).ne.0) -+ -+ if(ic.eq.jc) j=link(i) -+ if(j.gt.0)then -+ -+ do while(j.ne.0) -+ -+c test of frozen atom pairs -+ -+ ldo=.true. -+ if(lfrzi)ldo=(lstfrz(j).eq.0) -+ -+ if(ldo)then -+ -+c distance in real space : minimum image applied -+ -+ sxd=uxx(j)-uxx(i)+cx -+ syd=uyy(j)-uyy(i)+cy -+ szd=uzz(j)-uzz(i)+cz -+ -+ xd=cell(1)*sxd+cell(4)*syd+cell(7)*szd -+ yd=cell(2)*sxd+cell(5)*syd+cell(8)*szd -+ zd=cell(3)*sxd+cell(6)*syd+cell(9)*szd -+ -+ if(imcon.eq.6)then -+ -+ rsq=xd**2+yd**2 -+ -+ else -+ -+ rsq=xd**2+yd**2+zd**2 -+ -+ endif -+ -+c test of distance -+ if(rcsq.gt.rsq)then -+ -+c test for excluded atom -+ -+ linc=.true. -+ do ixl=1,nexatm(ik) -+ -+ if(lexatm(ik,ixl).eq.j) linc=.false. -+ -+ enddo -+ -+ if(linc)then -+ -+ lentry(ik)=lentry(ik)+1 -+ -+ if(lentry(ik).gt.mxlist)then -+ -+ ibig=max(ibig,lentry(ik)) -+ lchk=.false. -+ -+ else -+ -+ list(ik,lentry(ik))=j -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ j=link(j) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ j=lct(jc) -+ i=link(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ ix=ix+1 -+ if(ix.gt.ilx)then -+ -+ ix=1 -+ iy=iy+1 -+ -+ if(iy.gt.ily)then -+ -+ iy=1 -+ iz=iz+1 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ -+ if(.not.lchk)then -+ -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) ' mxlist must be >= ',ibig -+ write(nrite,*) ' mxlist is currenty ',mxlist -+ endif -+ call error(idnode,106) -+ -+ endif -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (uxx,uyy,uzz,stat=fail) -+ -+ return -+ end subroutine parlink -+ -+ subroutine parneulst(newlst,lneut,nneut,idnode,mxnode,imcon, -+ x rcut,delr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on the brode-ahlrichs scheme -+c frozen atoms taken into account -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - t.forester april 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst,lneut,safe,lfrzi -+ integer nneut,idnode,mxnode,imcon,idum,fail,mpm2,npm2,ibig -+ integer i,ill,ia,im,jmlast,jmwrap,nuei1,nuei2,ii,jm1,jm,jj0,jj2 -+ integer j,ii1 -+ real(8) rcut,delr,rclim,fi,rrr,rcl1 -+ -+ logical, allocatable :: lms(:) -+ dimension fi(3) -+ -+ data fail/0/ -+ -+C DIR$ CACHE_ALIGN fi -+ -+c allocate work arrays -+ -+ allocate (lms(mxneut),stat=fail) -+ if(fail.ne.0)call error(idnode,1910) -+ -+ if(newlst.and.lneut)then -+ -+c set control variables -+ -+ safe=.true. -+ lchk= .true. -+ mpm2=(nneut+2)/2 -+ npm2=(nneut+1)/2 -+ -+c set cutoff radius -+ -+ rcl1=(rcut+delr) -+ rclim=(rcut+delr)**2 -+ ibig=0 -+ ill=0 -+ -+c construct pair force neighbour list: neutral groups -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ -+ enddo -+ -+ -+c outer loop over groups -+ -+ ia=0 -+ -+ do im=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ if(im.ge.mpm2) mpm2=npm2 -+ -+ lms(1)=.false. -+ do j=2,mpm2 -+ lms(j)=.true. -+ enddo -+ -+ jmlast=min(nneut,im+mpm2-1) -+ jmwrap=max(0,im+mpm2-1-nneut) -+ -+c loop over atomic pairs -+ -+ nuei1=neulst(im) -+ nuei2=neulst(im+1)-1 -+ -+ do i=nuei1,nuei2 -+ -+ fi(1)=xxx(i) -+ fi(2)=yyy(i) -+ fi(3)=zzz(i) -+ lfrzi=(lstfrz(i).eq.0) -+ -+ ii=0 -+ jm1=1 -+ do jm=im+1,jmlast -+ -+ jm1=jm1+1 -+ if(lms(jm1))then -+ -+ jj0=neulst(jm) -+ jj2=neulst(jm+1)-1 -+ -+ do j=jj0,jj2 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ -+ xdf(ii)=fi(1)-xxx(j) -+ ydf(ii)=fi(2)-yyy(j) -+ zdf(ii)=fi(3)-zzz(j) -+ -+ else -+ -+ ibig=max(ibig,ii) -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ do jm=1,jmwrap -+ -+ jm1=jm1+1 -+ if(lms(jm1))then -+ -+ jj0=neulst(jm) -+ jj2=neulst(jm+1)-1 -+ -+ do j=jj0,jj2 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ -+ xdf(ii)=fi(1)-xxx(j) -+ ydf(ii)=fi(2)-yyy(j) -+ zdf(ii)=fi(3)-zzz(j) -+ -+ else -+ -+ safe=.false. -+ ibig=max(ibig,ii) -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c apply minimum image convention -+ -+ ii1=min(ii,mxxdf) -+ call images(imcon,0,1,ii1,cell,xdf,ydf,zdf) -+ -+c search for those in cutoff -+ -+ ii=0 -+ jm1=1 -+ do jm=im+1,jmlast -+ -+ jm1=jm1+1 -+ if(lms(jm1))then -+ -+ jj0=neulst(jm) -+ jj2=neulst(jm+1)-1 -+ -+ do j=jj0,jj2 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ -+ if(lms(jm1))then -+ -+ if(lfrzi)then -+ if(abs(zdf(ii)).lt.rcl1)then -+ if(abs(ydf(ii)).lt.rcl1)then -+ if(abs(xdf(ii)).lt.rcl1)then -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ if(rrr.lt.rclim) lms(jm1)=.false. -+ endif -+ endif -+ endif -+ -+ elseif(lstfrz(j).eq.0)then -+ if(abs(zdf(ii)).lt.rcl1)then -+ if(abs(ydf(ii)).lt.rcl1)then -+ if(abs(xdf(ii)).lt.rcl1)then -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ if(rrr.lt.rclim) lms(jm1)=.false. -+ endif -+ endif -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ do jm=1,jmwrap -+ -+ jm1=jm1+1 -+ if(lms(jm1))then -+ -+ jj0=neulst(jm) -+ jj2=neulst(jm+1)-1 -+ -+ do j=jj0,jj2 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ -+ if(lms(jm1))then -+ -+ if(lfrzi)then -+ -+ if(abs(zdf(ii)).lt.rcl1)then -+ if(abs(ydf(ii)).lt.rcl1)then -+ if(abs(xdf(ii)).lt.rcl1)then -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ if(rrr.lt.rclim) lms(jm1)=.false. -+ endif -+ endif -+ endif -+ -+ elseif(lstfrz(j).eq.0)then -+ -+ if(abs(zdf(ii)).lt.rcl1)then -+ if(abs(ydf(ii)).lt.rcl1)then -+ if(abs(xdf(ii)).lt.rcl1)then -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ if(rrr.lt.rclim) lms(jm1)=.false. -+ endif -+ endif -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c compile neighbour list for ia -+c with running check of neighbour list array capacity -+ -+ jm1=0 -+ do jm=im,jmlast -+ -+ jm1=jm1+1 -+ if(.not.lms(jm1))then -+ -+ lentry(ia)=lentry(ia)+1 -+ if(lentry(ia).le.mxlist)then -+ -+ list(ia,lentry(ia))=jm -+ -+ else -+ -+ ill=max(ill,lentry(ia)) -+ lchk=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ do jm=1,jmwrap -+ -+ jm1=jm1+1 -+ if(.not.lms(jm1))then -+ -+ lentry(ia)=lentry(ia)+1 -+ if(lentry(ia).le.mxlist)then -+ -+ list(ia,lentry(ia))=jm -+ -+ else -+ -+ ill=max(ill,lentry(ia)) -+ lchk=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ if(.not.lchk)then -+ -+ call gimax(ill,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) ' mxlist must be at least ',ill -+ write(nrite,*) ' mxlist is currently ',mxlist -+ endif -+ call error(idnode,108) -+ -+ endif -+ -+c terminate job if work arrays exceeded -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*)'mxxdf must be at least ',ibig -+ write(nrite,*)'mxxdf is currently ',mxxdf -+ endif -+ call error(idnode,476) -+ endif -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(lms,stat=fail) -+ -+ return -+ end subroutine parneulst -+ -+ subroutine parlinkneu -+ x (newlst,natms,nneut,idnode,mxnode,imcon,rcut,delr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on link-cell method with neutral groups -+c frozen atoms taken into account -+c -+c to be used with the link version of exclude :excludeneu_link -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1996 -+c author - t. forester january 1996. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst,linc,newjob,lfrzi,ldo,swop -+ integer natms,nneut,idnode,mxnode,imcon,idum,fail,ibig -+ integer nix,niy,niz,i,irat,nsbcll,ilx,ily,ilz,ncells,ix,iy,iz -+ integer icell,j,ic,ii,kc,jx,jy,jz,jc,ineu,ik,jneu,ineua,jneua -+ integer ika,jneua1,i1,j1 -+ real(8) rcut,delr,rcsq,xm,ym,zm,det,xdc,ydc,zdc,tx,ty,tz -+ real(8) cx,cy,cz,sxd,syd,szd,rsq,xd,yd,zd -+ -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ -+ dimension nix(14),niy(14),niz(14) -+ -+ save newjob -+ -+ data newjob/.true./ -+ data nix/0,1,0,0,-1,1,0,-1,1,0,-1,1,-1,1/ -+ data niy/ 0,0,1,0,1,1,-1,0,0,1,-1,-1,1,1/ -+ data niz/0,0,0,1,0,0,1,1,1,1,1,1,1,1/ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1900) -+ -+ lchk=.true. -+ ibig=0 -+ if(newlst)then -+ -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x call error(idnode,300) -+ -+c zero link arrays -+ -+ do i=1,natms -+ -+ link(i)=0 -+ -+ enddo -+ -+c construct pair force neighbour list -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ -+ enddo -+ -+c real space cut off -+ -+ rcsq=(rcut+delr)**2 -+c -+c create mock cell vector for non-periodic system -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+c find maximum x,y,z postions -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ -+ do i=1,natms -+ -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ -+ enddo -+ -+ if(imcon.eq.0)then -+ -+ cell(1)=max(2.d0*xm+rcut+delr,3.d0*(rcut+delr)) -+ cell(5)=max(2.d0*ym+rcut+delr,3.d0*(rcut+delr)) -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ -+ endif -+ -+ cell(9)=max(2.d0*zm+rcut+delr,3.d0*(rcut+delr),cell(9)) -+ -+ endif -+ -+ call dcell(cell,celprp) -+ call invert(cell,rcell,det) -+ -+c ratio of link cell length to cut off diameter -+ -+ irat=1 -+ -+c number of subcells -+ -+ nsbcll=14 -+ -+ ilx=int(celprp(7)*dble(irat)/(rcut+delr)) -+ ily=int(celprp(8)*dble(irat)/(rcut+delr)) -+ ilz=int(celprp(9)*dble(irat)/(rcut+delr)) -+c -+c check there are enough link cells -+ -+ linc=.false. -+ if(ilx.lt.2*irat+1) linc=.true. -+ if(ily.lt.2*irat+1) linc=.true. -+ if(ilz.lt.2*irat+1) linc=.true. -+ if(linc) call error(idnode,305) -+ -+ ncells=ilx*ily*ilz -+ if(ncells.gt.mxcell)then -+ -+ if(idnode.eq.0) write(nrite,*) 'mxcell must be >= ',ncells -+ call error(idnode,392) -+ -+ endif -+ -+c calculate link cell indices -+ -+ do i=1,ncells -+ -+ lct(i)=0 -+ -+ enddo -+ -+c link-cell cutoff for reduced space -+ -+ xdc=dble(ilx) -+ ydc=dble(ily) -+ zdc=dble(ilz) -+ -+c reduced space coordinates -+ if(newjob)then -+ -+ newjob=.false. -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+ if(mxnode.gt.1) call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ do i=1,natms -+ -+ tx=xxx(i) -+ ty=yyy(i) -+ tz=zzz(i) -+ -+ uxx(i)=(rcell(1)*tx+rcell(4)*ty+rcell(7)*tz)+0.5d0 -+ uyy(i)=(rcell(2)*tx+rcell(5)*ty+rcell(8)*tz)+0.5d0 -+ uzz(i)=(rcell(3)*tx+rcell(6)*ty+rcell(9)*tz)+0.5d0 -+ -+ enddo -+ -+c link neighbours -+ -+ do i=1,natms -+ -+ ix=min(int(xdc*uxx(i)),ilx-1) -+ iy=min(int(ydc*uyy(i)),ily-1) -+ iz=min(int(zdc*uzz(i)),ilz-1) -+ -+ icell=1+ix+ilx*(iy+ily*iz) -+ -+ j=lct(icell) -+ lct(icell)=i -+ link(i)=j -+ -+ enddo -+ -+c set control variables for loop over subcells -+ -+ ix=1 -+ iy=1 -+ iz=1 -+ -+c primary loop over subcells -+ -+ do ic=1,ncells -+ -+ ii=lct(ic) -+ if(ii.gt.0)then -+ -+c secondary loop over subcells -+ -+ do kc=1,nsbcll -+ -+ i=ii -+ -+ cx=0.d0 -+ cy=0.d0 -+ cz=0.d0 -+ jx=ix+nix(kc) -+ jy=iy+niy(kc) -+ jz=iz+niz(kc) -+ -+c minimum image convention -+ -+ if(jx.gt.ilx)then -+ -+ jx=jx-ilx -+ cx=1.d0 -+ -+ elseif(jx.lt.1)then -+ -+ jx=jx+ilx -+ cx=-1.d0 -+ -+ endif -+ -+ if(jy.gt.ily)then -+ -+ jy=jy-ily -+ cy=1.d0 -+ -+ elseif(jy.lt.1)then -+ -+ jy=jy+ily -+ cy=-1.d0 -+ -+ endif -+ -+ if(jz.gt.ilz)then -+ -+ jz=jz-ilz -+ cz=1.d0 -+ -+ elseif(jz.lt.1)then -+ -+ jz=jz+ilz -+ cz=-1.d0 -+ -+ endif -+ -+c index of neighbouring cell -+ -+ jc=jx+ilx*((jy-1)+ily*(jz-1)) -+ j=lct(jc) -+ -+c ignore if empty -+ -+ if(j.gt.0)then -+ -+ do while(i.ne.0) -+ -+c test if site is of interest to this node -+ -+ ineu=lstneu(i) -+ ik=0 -+ -+c i's group index for this processor -+ -+ if(mod(ineu-1,mxnode).eq.idnode) -+ x ik=((ineu-1)/mxnode)+1 -+ -+c test if i is a frozen atom -+ -+ lfrzi=(lstfrz(i).ne.0) -+ -+ if(ic.eq.jc) j=link(i) -+ if(j.gt.0)then -+ -+ do while(j.ne.0) -+ -+ jneu=lstneu(j) -+ -+c swop tests for switching of group indices, -+c ldo for 'doing' interaction -+ -+ swop=.false. -+ ldo=(ik.gt.0) -+ jneua=jneu -+ ineua=ineu -+ ika=ik -+ -+c keep only Brode-Ahlrichs pairs -+ -+ if(jneua.ge.ineua)then -+ -+ if(jneua-ineua.gt.nneut/2)then -+ -+ swop=(mod(jneu-1,mxnode).eq.idnode) -+ if(swop)then -+ ldo=((nneut+ineua-jneua).le.(nneut-1)/2) -+ else -+ ldo=.false. -+ endif -+ -+ endif -+ -+ elseif(nneut+jneua-ineua.gt.(nneut-1)/2)then -+ -+ swop=(mod(jneu-1,mxnode).eq.idnode) -+ if(swop)then -+ ldo=((ineua-jneua).le.nneut/2) -+ else -+ ldo=.false. -+ endif -+ -+ endif -+ -+ if(swop.and.ldo)then -+ jneua=ineu -+ ineua=jneu -+ ika=((jneu-1)/mxnode)+1 -+ endif -+ -+c test of frozen atom pairs -+ -+ if(lfrzi.and.ldo)ldo=(lstfrz(j).eq.0) -+ -+c check we haven't already included this group in the list ... -+ -+ jneua1=0 -+ do while -+ x (ldo.and.jneua1.lt.min(lentry(ika),mxlist)) -+ -+ jneua1=jneua1+1 -+ if(list(ika,jneua1).eq.jneua) ldo=.false. -+ -+ enddo -+ -+ if(ldo)then -+ -+c distance in real space : minimum image applied -+ -+ sxd=uxx(j)-uxx(i)+cx -+ syd=uyy(j)-uyy(i)+cy -+ szd=uzz(j)-uzz(i)+cz -+ -+ xd=cell(1)*sxd+cell(4)*syd+cell(7)*szd -+ yd=cell(2)*sxd+cell(5)*syd+cell(8)*szd -+ zd=cell(3)*sxd+cell(6)*syd+cell(9)*szd -+ -+ rsq=xd*xd+yd*yd+zd*zd -+ -+c test of distance -+ -+ if(rsq.lt.rcsq)then -+ -+ lentry(ika)=lentry(ika)+1 -+ if(lentry(ika).gt.mxlist)then -+ -+ ibig=max(ibig,lentry(ika)) -+ lchk=.false. -+ -+ else -+ -+ list(ika,lentry(ika))=jneua -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ j=link(j) -+ -+ enddo -+ -+ endif -+ -+ j=lct(jc) -+ i=link(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ ix=ix+1 -+ if(ix.gt.ilx)then -+ -+ ix=1 -+ iy=iy+1 -+ -+ if(iy.gt.ily)then -+ -+ iy=1 -+ iz=iz+1 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ -+ if(.not.lchk)then -+ -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*)'mxlist must be at least ',ibig -+ write(nrite,*)'mxlist is currently ',mxlist -+ endif -+ call error(idnode,107) -+ -+ endif -+ -+c sort list into order .. -+c use link as a work array -+ -+ ik=0 -+ do i=1+idnode,nneut,mxnode -+ -+ ik=ik+1 -+ do j=1,lentry(ik) -+ -+ link(j)=list(ik,j) -+ -+ enddo -+ call shellsort(lentry(ik),link) -+ -+c ensure Brode-Ahlrichs ordering -+ -+ i1=lentry(ik)+1 -+ j1=0 -+ do j=1,lentry(ik) -+ -+ if(link(j).ge.i)then -+ -+ j1=j1+1 -+ list(ik,j1)=link(j) -+ i1=min(i1,j) -+ -+ endif -+ -+ enddo -+ -+ do j=1,i1-1 -+ -+ j1=j1+1 -+ list(ik,j1)=link(j) -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (uxx,uyy,uzz,stat=fail) -+ -+ return -+ end subroutine parlinkneu -+ -+ subroutine parlst_nsq -+ x (newlst,natms,idnode,mxnode,imcon,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on the brode-ahlrichs scheme -+c frozen atom option included -+c -+c to be used with multiple_nsq -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c adapted - w.smith aug 2008 - solvation, excitation etc -+c -+c stress tensor : t.forester may 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst -+ integer natms,idnode,mxnode,imcon,ibig,i,last,mpm2 -+ integer npm2,m,ii,j,idum -+ real(8) rcut,rclim,rsq,rrr -+ -+ if(newlst)then -+ -+ ibig=0 -+ -+c check size of work array -+ -+ if(mxxdf.lt.(natms+1)/2)then -+ if(idnode.eq.0) write(nrite,*) 'mxxdf must be greater than ', -+ x (natms+1)/2 -+ call error(idnode,475) -+ endif -+ -+c set control variables -+ -+ last=natms -+ lchk=.true. -+ mpm2=natms/2 -+ npm2=(natms-1)/2 -+ -+c set cutoff radius - ignore border width -+ -+ rclim=(rcut)**2 -+ -+c construct pair force neighbour list -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ noxatm(i)=1 -+ -+ enddo -+ -+c outer loop over atoms -+ -+ do m=1,mpm2 -+ -+ if(m.gt.npm2)last=mpm2 -+ -+c inner loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+c calculate interatomic displacements -+ -+ ii=ii+1 -+ xdf(ii)=xxx(i)-xxx(j) -+ ydf(ii)=yyy(i)-yyy(j) -+ zdf(ii)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c apply minimum image convention -+ -+ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) -+ -+c allocate atoms to neighbour list -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ ii=ii+1 -+ if((nexatm(ii).gt.0).and.(lexatm(ii,noxatm(ii)).eq.j)) -+ x then -+ -+ noxatm(ii)=min(noxatm(ii)+1,nexatm(ii)) -+ -+ elseif(lstfrz(i).eq.0.or.lstfrz(j).eq.0)then -+ -+c reject frozen atoms and calculate interatomic distance -+ -+ rsq=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ -+c running check of neighbour list array capacity -+ -+ if(rsq.lt.rclim)then -+ -+ lentry(ii)=lentry(ii)+1 -+ -+ if(lentry(ii).gt.mxlist)then -+ -+ ibig=max(ibig,lentry(ii)) -+ lchk=.false. -+ -+ endif -+ -+c compile neighbour list array -+ -+ if(lchk)then -+ -+ list(ii,lentry(ii))=j -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ -+ if(.not.lchk)then -+ -+ call gisum(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) ' mxlist must be >= ',ibig -+ write(nrite,*) ' mxlist is currenty ',mxlist -+ endif -+ call error(idnode,109) -+ -+ endif -+ -+c check all excluded atoms are accounted for -+ -+ do i=1,ii -+ -+ if(nexatm(i).gt.0.and.noxatm(i).ne.nexatm(i))lchk=.false. -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ -+ if(.not.lchk) call error(idnode,160) -+ -+ endif -+ -+ return -+ end subroutine parlst_nsq -+ -+ subroutine primlst(idnode,mxnode,natms,imcon,rprim) -+ -+c********************************************************************* -+c -+c dlpoly routine to split interaction list into primary and -+c secondary neighbours for use with multiple timestep method -+c -+c copyright daresbury laboratory -+c author - t. forester february 1993 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,imcon,ii,k,j,i -+ real(8) rprim,rprim2,rsq -+ -+ rprim2=rprim*rprim -+ ii=0 -+ -+ do i=1+idnode,natms,mxnode -+ -+ ii=ii+1 -+ -+ do j=1,lentry(ii) -+ -+ k=iabs(list(ii,j)) -+ xdf(j)=xxx(i)-xxx(k) -+ ydf(j)=yyy(i)-yyy(k) -+ zdf(j)=zzz(i)-zzz(k) -+ -+ enddo -+ -+c apply minimum image convention -+ -+ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) -+ -+c assign atoms as primary or secondary -+ -+ -+ do j=1,lentry(ii) -+ -+c calculate interatomic distance -+ -+ rsq=xdf(j)**2+ydf(j)**2+zdf(j)**2 -+ -+ if(rsq.lt.rprim2)then -+ -+c compile primary neighbour list array : -ve indices -+ -+ list(ii,j)=-iabs(list(ii,j)) -+ -+ else -+ -+c compile secondary neighbour list array : +ve indices -+ -+ list(ii,j)=iabs(list(ii,j)) -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine primlst -+ -+ subroutine prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) -+ -+c*********************************************************************** -+c -+c dlpoly routine to partition neutral group list into -+c primary and secondary groups -+c loops over group ineu -+c -+c replicated data version -+c -+c copyright daresbury laboratory 1994 -+c author t.forester april 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newlst,lchk,ldo -+ integer imcon,idnode,mxnode,nneut,ineu,ia,jj,ibig,ii -+ integer jj0,jneu,j,i,idum -+ real(8) rprim,rclim,xi,yi,zi,rrr -+ -+ lchk=.true. -+ -+ if(newlst)then -+ -+c set primary cutoff limit -+ -+ rclim=rprim*rprim -+ -+c set list to negative - signal for seconary shell -+ -+ ia=0 -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+ do jj=1,lentry(ia) -+ -+ list(ia,jj)=-abs(list(ia,jj)) -+ -+ enddo -+ -+ enddo -+ -+c loop over neutral group ineu sites -+ -+ lchk=.true. -+ ibig=0 -+ -+ ia=0 -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+ ii=0 -+ do i=neulst(ineu),neulst(ineu+1)-1 -+ -+ xi=xxx(i) -+ yi=yyy(i) -+ zi=zzz(i) -+ -+ do jj=1,lentry(ia) -+ -+ jneu=-list(ia,jj) -+ jj0=neulst(jneu) -+ -+ if(ineu.eq.jneu) jj0=i+1 -+ -+c loop over jneu sites -+ -+ do j=jj0,neulst(jneu+1)-1 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ xdf(ii)=xi-xxx(j) -+ ydf(ii)=yi-yyy(j) -+ zdf(ii)=zi-zzz(j) -+ else -+ lchk=.false. -+ ibig=ii -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c apply minimum image convention -+ -+ ii=min(ii,mxxdf) -+ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) -+ -+c allocate groups to primary or secondary shell -+c on basis of closest atom-atom interactions -+ -+ ii=0 -+ do i=neulst(ineu),neulst(ineu+1)-1 -+ -+ do jj=1,lentry(ia) -+ -+ jneu=list(ia,jj) -+ ldo=(jneu.lt.0) -+ if(ldo)then -+ jneu=-jneu -+ jj0=neulst(jneu) -+ if(ineu.eq.jneu) jj0=i+1 -+ -+c loop over jneu sites -+ -+ do j=jj0,neulst(jneu+1)-1 -+ -+ if(ldo)then -+ -+ ii=min(ii+1,mxxdf) -+ -+ if(abs(xdf(ii)).lt.rprim)then -+ if(abs(ydf(ii)).lt.rprim)then -+ if(abs(zdf(ii)).lt.rprim)then -+ -+c calculate interatomic distance -+ -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ -+c put in primary list if found any interaction close enough -+ -+ if(rrr.le.rclim)then -+ ldo=.false. -+ list(ia,jj)=jneu -+ endif -+ -+ endif -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ if(.not.lchk)then -+ -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) 'mxxdf must be at least ',ibig -+ write(nrite,*) 'mxxdf is currently ',mxxdf -+ endif -+ call error(idnode,477) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine prneulst -+ -+ subroutine vertest(newlst,idnode,mxnode,natms,delr,tstep) -+ -+c********************************************************************* -+c -+c DL_POLY subroutime to test for updating of Verlet list -+c replicated data version -+c -+c copyright daresbury laboratory 1993 -+c author - t. forester may 1993 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,newjob -+ integer idnode,mxnode,natms,i,j,k,moved,ibuff,fail -+ real(8) rmax,dr,delr,tstep -+ -+ real(8), allocatable :: xold(:),yold(:),zold(:) -+ -+ save newjob,xold,yold,zold -+ -+ data newjob/.true./,fail/0/ -+ -+ if((natms+mxnode-1)/mxnode.gt.msatms) call error(idnode,112) -+ -+ if(newjob)then -+ -+c set up initial arrays -+ -+ allocate (xold(msatms),yold(msatms),zold(msatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1930) -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xold(j)=0.d0 -+ yold(j)=0.d0 -+ zold(j)=0.d0 -+ -+ enddo -+ -+ newjob=.false. -+ newlst=.true. -+ -+ else -+ -+c integrate velocities -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xold(j)=xold(j)+vxx(i) -+ yold(j)=yold(j)+vyy(i) -+ zold(j)=zold(j)+vzz(i) -+ -+ enddo -+ -+c maximum displacement -+ -+ rmax=(delr/2.d0)**2 -+ -+c test atomic displacements -+ -+ moved=0 -+ -+ do k=1,j -+ -+ dr=tstep**2*(xold(k)**2+yold(k)**2+zold(k)**2) -+ if(dr.gt.rmax) moved=moved+1 -+ -+ enddo -+ -+c global sum of moved atoms -+ -+ if(mxnode.gt.1) call gisum(moved,1,ibuff) -+ -+c test for new verlet list -+ -+ newlst=(moved.ge.2) -+ -+c update stored positions -+ -+ if(newlst)then -+ -+ do k=1,j -+ -+ xold(k)=0.d0 -+ yold(k)=0.d0 -+ zold(k)=0.d0 -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine vertest -+ -+ subroutine vertest2(newlst,idnode,mxnode,natms,imcon,delr,tstep) -+ -+c********************************************************************* -+c -+c DL_POLY subroutime to test for updating of Verlet list -+c replicated data version (version 2) -+c -+c copyright daresbury laboratory -+c author - w.smith 2007 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,newjob -+ integer idnode,mxnode,natms,imcon,i,j,k,moved,ibuff,fail -+ real(8) rmax,dr,delr,tstep -+ -+ real(8), allocatable :: xold(:),yold(:),zold(:) -+ real(8), allocatable :: xdif(:),ydif(:),zdif(:) -+ -+ save newjob,xold,yold,zold -+ -+ data newjob/.true./,fail/0/ -+ -+ if((natms+mxnode-1)/mxnode.gt.msatms) call error(idnode,112) -+ -+c set up initial arrays -+ -+ allocate (xdif(msatms),ydif(msatms),zdif(msatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1930) -+ -+ if(newjob)then -+ -+ allocate (xold(msatms),yold(msatms),zold(msatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1930) -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xold(j)=xxx(i) -+ yold(j)=yyy(i) -+ zold(j)=zzz(i) -+ -+ enddo -+ -+ newjob=.false. -+ newlst=.true. -+ -+ else -+ -+c calculate atomic shifts -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xdif(j)=xxx(i)-xold(j) -+ ydif(j)=yyy(i)-yold(j) -+ zdif(j)=zzz(i)-zold(j) -+ -+ enddo -+ -+c minimum image calculation -+ -+ call images(imcon,0,1,j,cell,xdif,ydif,zdif) -+ -+c maximum displacement -+ -+ rmax=(delr/2.d0)**2 -+ -+c test atomic displacements -+ -+ moved=0 -+ -+ do k=1,j -+ -+ dr=(xdif(k)**2+ydif(k)**2+zdif(k)**2) -+ if(dr.gt.rmax)moved=moved+1 -+ -+ enddo -+ -+c global sum of moved atoms -+ -+ if(mxnode.gt.1) call gisum(moved,1,ibuff) -+ -+c test for new verlet list -+ -+ newlst=(moved.ge.2) -+ -+c update stored positions -+ -+ if(newlst)then -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xold(j)=xxx(i) -+ yold(j)=yyy(i) -+ zold(j)=zzz(i) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c deallocate arrays -+ -+ deallocate(xdif,ydif,zdif,stat=fail) -+ -+ return -+ end subroutine vertest2 -+ -+ end module nlist_builders_module -diff -urN dl_class_1.9.orig/srcmod/optimiser_module.f dl_class_1.9/srcmod/optimiser_module.f ---- dl_class_1.9.orig/srcmod/optimiser_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/optimiser_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1144 @@ -+ module optimiser_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining structural optimiser routines -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: ggx(:),ggy(:),ggz(:) -+ real(8), allocatable :: hhx(:),hhy(:),hhz(:) -+ real(8), allocatable :: oxx(:),oyy(:),ozz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ -+ save hhx,hhy,hhz -+ -+ contains -+ -+ subroutine optimisation_selector -+ x (loptim,stropt,lzero,idnode,mxnode,natms,imcon,ntcons, -+ x nscons,ngrp,ntfree,keystr,keytol,engcfg,tstep,opttol) -+ -+c*********************************************************************** -+c -+c dl_poly routine for selecting and running a nominated -+c structure optimisation algorithm using energy minimisation -+c -+c copyright - daresbury laboratory -+c author - w. smith june 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical loptim,stropt,lzero -+ integer idnode,mxnode,natms,imcon,nscons,ngrp,ntfree,keystr -+ integer keytol,ntcons -+ real(8) engcfg,tstep,opttol,hnorm,grad0,grad1,ff1,sgn -+ -+ save grad0,grad1,ff1,sgn,hnorm -+ -+ stropt=.false. -+ -+ if(loptim)then -+ -+c conjugate gradient structure optimisation -+ -+ call strucopt -+ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+ else if(lzero)then -+ -+c zero kelvin structure optimisation -+ -+ call zero_kelvin -+ x (stropt,idnode,mxnode,imcon,natms,ngrp,ntfree,opttol) -+ -+ endif -+ -+ return -+ end subroutine optimisation_selector -+ -+ subroutine zero_kelvin -+ x (stropt,idnode,mxnode,imcon,natms,ngrp,ntfree,opttol) -+ -+c*********************************************************************** -+c -+c dl_poly routine for zero Kelvin temperature optimization -+c if velocity.Force < 0 then velocity is set to zero in -+c preparation for integration of equations of motion -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1994 -+c author t.forester march 1994 -+c amended t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical stropt -+ integer idnode,mxnode,imcon,natms,ngrp,ntfree,fail,i -+ integer iatm0,iatm1,igrp1,igrp2,ifre1,ifre2,jr,ig,j,id -+ real(8) dot,fsq,fcomx,fcomy,fcomz,trx,try,trz,tax,tay,taz -+ real(8) rot,ggg,opttol -+ -+ dimension rot(9) -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1920) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c check for convergence of forces -+ -+ ggg=0.d0 -+ do i=iatm0,iatm1 -+ ggg=ggg+fxx(i)**2+fyy(i)**2+fzz(i)**2 -+ enddo -+ -+ if(mxnode.gt.1)then -+ buffer(1)=ggg -+ call gdsum(buffer(1),1,buffer(2)) -+ ggg=buffer(1) -+ endif -+ -+c check convergence condition for forces -+ -+ if(opttol.ge.abs(ggg)/dble(natms))then -+ -+ stropt=.true. -+ return -+ -+ endif -+ -+ if(ngrp.eq.0) then -+ -+c take component of velocity in direction of force -+ -+ do i=iatm0,iatm1 -+ -+ dot=vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ if(dot.lt.0.d0) then -+ -+ vxx(i)=0.d0 -+ vyy(i)=0.d0 -+ vzz(i)=0.d0 -+ -+ else -+ -+c take component of velocity in direction of force -+ -+ fsq=(fxx(i)**2+fyy(i)**2+fzz(i)**2) -+ fsq=dot/max(1.d-10,fsq) -+ vxx(i)=fxx(i)*fsq -+ vyy(i)=fyy(i)*fsq -+ vzz(i)=fzz(i)*fsq -+ -+ endif -+ -+ enddo -+ -+ else -+ -+c block indices for groups and free atoms -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+ do j=ifre1,ifre2 -+ -+c reset atomic velocities -+ -+ i=lstfre(j) -+ -+ dot=vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ if(dot.lt.0.d0) then -+ -+ vxx(i)=0.d0 -+ vyy(i)=0.d0 -+ vzz(i)=0.d0 -+ -+ else -+ -+c take component of velocity in direction of force -+ -+ fsq=(fxx(i)**2+fyy(i)**2+fzz(i)**2) -+ fsq=dot/max(1.d-10,fsq) -+ vxx(i)=fxx(i)*fsq -+ vyy(i)=fyy(i)*fsq -+ vzz(i)=fzz(i)*fsq -+ -+ endif -+ -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c reset rigid body velocites (linear and angular) -+ -+ fcomx=0.d0 -+ fcomy=0.d0 -+ fcomz=0.d0 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c forces on com -+ -+ fcomx=fcomx+fxx(i) -+ fcomy=fcomy+fyy(i) -+ fcomz=fcomz+fzz(i) -+ -+ enddo -+ -+ dot=gvxx(ig)*fcomx+gvyy(ig)*fcomy+gvzz(ig)*fcomz -+ if(dot.lt.0.d0) then -+ -+ gvxx(ig)=0.d0 -+ gvyy(ig)=0.d0 -+ gvzz(ig)=0.d0 -+ -+ else -+ -+c take component of velocity in direction of force -+ -+ fsq=(fcomx**2+fcomy**2+fcomz**2) -+ fsq=dot/max(1.d-10,fsq) -+ gvxx(ig)=fcomx*fsq -+ gvyy(ig)=fcomy*fsq -+ gvzz(ig)=fcomz*fsq -+ -+ endif -+ -+ enddo -+ -+c site to com distances -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ do j=1,numgsit(lstgtp(ig)) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxt(jr)=xxx(i)-gcmx(ig) -+ yyt(jr)=yyy(i)-gcmy(ig) -+ zzt(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) -+ -+c calculate torques in lab frame -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ trx=0.d0 -+ try=0.d0 -+ trz=0.d0 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ trx=trx+yyt(jr)*fzz(i)-zzt(jr)*fyy(i) -+ try=try+zzt(jr)*fxx(i)-xxt(jr)*fzz(i) -+ trz=trz+xxt(jr)*fyy(i)-yyt(jr)*fxx(i) -+ -+ enddo -+ -+ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 -+ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) -+ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) -+ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) -+ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 -+ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) -+ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) -+ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) -+ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 -+ -+c transform to body fixed frame -+ -+ tax=(trx*rot(1)+try*rot(4)+trz*rot(7))*rotinx(id,2) -+ tay=(trx*rot(2)+try*rot(5)+trz*rot(8))*rotiny(id,2) -+ taz=(trx*rot(3)+try*rot(6)+trz*rot(9))*rotinz(id,2) -+ -+ dot=omx(ig)*tax+omy(ig)*tay+omz(ig)*taz -+ if(dot.le.0.d0) then -+ -+ omx(ig)=0.d0 -+ omy(ig)=0.d0 -+ omz(ig)=0.d0 -+ -+ else -+ -+c take component of velocity in direction of torque -+ -+ fsq=(tax**2+tay**2+taz**2) -+ fsq=dot/max(1.d-10,fsq) -+ omx(ig)=tax*fsq -+ omy(ig)=tay*fsq -+ omz(ig)=taz*fsq -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail) -+ -+ return -+ end subroutine zero_kelvin -+ -+ subroutine strucopt -+ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,fnew,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for optimising molecular structures -+c based on conjugate gradient method -+c -+c copyright - daresbury laboratory -+c author - w. smith dec 2005 -+c -+c note. basis of minimisation criterion : -+c keytol=0 : absolute force -+c keytol=1 : absolute energy -+c keytol=2 : absolute displacement -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ -+ logical stropt,newjob,engchk -+ integer keystr,keytol,idnode,mxnode,natms,i,j,k -+ integer iatm0,iatm1,fail,ngrp,ntcons,nscons,jr -+ integer imcon,ig,jf,id,ntfree,igrp1,igrp2,ifre1,ifre2 -+ real(8) hnorm,grad0,grad1,grad2,ff1,stride,tstep,step -+ real(8) ggg,fnew,fff,gam2,sgn,opttol,dischk -+ -+ dimension fail(nnn) -+ -+ save iatm0,iatm1,igrp1,igrp2,engchk,ifre1,ifre2,newjob -+ -+ data newjob/.true./,engchk/.false./ -+ -+c define initial data -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ if(newjob)then -+ allocate(hhx(mxatms),hhy(mxatms),hhz(mxatms),stat=fail(1)) -+ endif -+ allocate(ggx(mxatms),ggy(mxatms),ggz(mxatms),stat=fail(2)) -+ allocate(oxx(mxatms),oyy(mxatms),ozz(mxatms),stat=fail(3)) -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(4)) -+ if(ngrp.gt.0)then -+ -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(6)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ if(ngrp.eq.0) -+ x allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(dxx(mxatms),dyy(mxatms),dzz(mxatms),stat=fail(7)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) -+ -+ endif -+ -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1925) -+ enddo -+ -+ if(newjob)then -+ -+c define atoms for this node -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+ newjob=.false. -+ -+ endif -+ -+c step length for relaxation -+ -+ if(ntcons.gt.0)then -+ step=tstep**2 -+ else -+ step=10.d0*tstep**2 -+ endif -+ -+c current system configuration energy -+ -+ fff=fnew -+ -+c initialise conjugate gradient position arrays -+ -+ do i=1,natms -+ -+ oxx(i)=xxx(i) -+ oyy(i)=yyy(i) -+ ozz(i)=zzz(i) -+ ggx(i)=0.d0 -+ ggy(i)=0.d0 -+ ggz(i)=0.d0 -+ -+ enddo -+ -+c define constraint bonds -+ -+ if(ntcons.gt.0)then -+ -+c calculate constraint bond vector -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c calculate pseudo forces for constraint bonds -+ -+ call pseudo_shake(nscons,natms,mxnode,fff) -+ -+ do i=1,natms -+ -+ ggx(i)=fxx(i)+ggx(i) -+ ggy(i)=fyy(i)+ggy(i) -+ ggz(i)=fzz(i)+ggz(i) -+ -+ enddo -+ -+ else -+ -+ do i=1,natms -+ -+ ggx(i)=fxx(i) -+ ggy(i)=fyy(i) -+ ggz(i)=fzz(i) -+ -+ enddo -+ -+ endif -+ -+c calculate pseudo forces for rigid bodies -+ -+ if(ngrp.gt.0)call torque_split -+ x (ngrp,idnode,mxnode,imcon,ggx,ggy,ggz,txx,tyy,tzz, -+ x uxx,uyy,uzz,dtx,dty,dtz) -+ -+c determine magnitude of 3N force vector -+ -+ ggg=0.d0 -+ -+ if(ngrp.eq.0)then -+ -+ do i=iatm0,iatm1 -+ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 -+ enddo -+ -+ else -+ -+ do jf=ifre1,ifre2 -+ -+ i=lstfre(jf) -+ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 -+ -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ buffer(1)=ggg -+ call gdsum(buffer(1),1,buffer(2)) -+ ggg=buffer(1) -+ endif -+ ggg=sqrt(ggg) -+ -+c check convergence condition for forces -+ -+ if(keytol.eq.0.and.opttol.ge.abs(ggg)/dble(natms))stropt=.true. -+ -+ if(keystr.eq.0) then -+ -+c set original search direction -+ -+ ff1=fff -+ hnorm=ggg -+ grad0=ggg -+ grad1=ggg -+ -+ if(ngrp.eq.0)then -+ -+ do i=iatm0,iatm1 -+ -+ hhx(i)=ggx(i) -+ hhy(i)=ggy(i) -+ hhz(i)=ggz(i) -+ oxx(i)=oxx(i)+step*hhx(i) -+ oyy(i)=oyy(i)+step*hhy(i) -+ ozz(i)=ozz(i)+step*hhz(i) -+ -+ enddo -+ -+ else -+ -+ do jf=ifre1,ifre2 -+ -+ i=lstfre(jf) -+ hhx(i)=ggx(i) -+ hhy(i)=ggy(i) -+ hhz(i)=ggz(i) -+ -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ hhx(i)=ggx(i) -+ hhy(i)=ggy(i) -+ hhz(i)=ggz(i) -+ -+ enddo -+ -+ enddo -+ -+ call turn_rigid_body -+ x (igrp1,igrp2,ifre1,ifre2,step,hhx,hhy,hhz, -+ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) -+ -+ endif -+ -+ keystr=1 -+ sgn=1.d0 -+ -+ elseif(keystr.eq.1)then -+ -+c check convergence condition for energy -+ -+ if(engchk.and.keytol.eq.1.and. -+ x opttol.ge.abs(fff-ff1))stropt=.true. -+ engchk=.false. -+ -+c line search along chosen direction -+ -+ ff1=fff -+ grad2=grad1 -+ grad1=0.d0 -+ do i=iatm0,iatm1 -+ grad1=grad1+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) -+ enddo -+ if(mxnode.gt.1)then -+ buffer(1)=grad1 -+ call gdsum(buffer(1),1,buffer(2)) -+ grad1=buffer(1) -+ endif -+ grad1=sgn*grad1/hnorm -+ -+c linear extrapolation to minimum -+ -+ stride=sgn*step -+ if(grad1.lt.0.d0)then -+ -+ keystr=2 -+ stride=sgn*step*grad1/(grad2-grad1) -+ -+ endif -+ -+ if(ngrp.eq.0)then -+ -+ do i=iatm0,iatm1 -+ -+ oxx(i)=oxx(i)+stride*hhx(i) -+ oyy(i)=oyy(i)+stride*hhy(i) -+ ozz(i)=ozz(i)+stride*hhz(i) -+ -+ enddo -+ -+ else -+ -+ call turn_rigid_body -+ x (igrp1,igrp2,ifre1,ifre2,stride,hhx,hhy,hhz, -+ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) -+ -+ endif -+ -+ elseif(keystr.eq.2)then -+ -+c construct conjugate search vector -+ -+ ff1=fff -+ gam2=(ggg/grad0)**2 -+ hnorm=0.d0 -+ grad0=ggg -+ grad1=0.d0 -+ do i=iatm0,iatm1 -+ -+ hhx(i)=ggx(i)+gam2*hhx(i) -+ hhy(i)=ggy(i)+gam2*hhy(i) -+ hhz(i)=ggz(i)+gam2*hhz(i) -+ hnorm=hnorm+hhx(i)**2+hhy(i)**2+hhz(i)**2 -+ grad1=grad1+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) -+ -+ enddo -+ if(mxnode.gt.1)then -+ -+ buffer(1)=hnorm -+ buffer(2)=grad1 -+ call gdsum(buffer(1),2,buffer(3)) -+ hnorm=buffer(1) -+ grad1=buffer(2) -+ -+ endif -+ hnorm=sqrt(hnorm) -+ grad1=grad1/hnorm -+ sgn=sign(1.d0,grad1) -+ grad1=sgn*grad1 -+ stride=sgn*step -+ -+ if(ngrp.eq.0)then -+ -+ do i=iatm0,iatm1 -+ -+ oxx(i)=oxx(i)+stride*hhx(i) -+ oyy(i)=oyy(i)+stride*hhy(i) -+ ozz(i)=ozz(i)+stride*hhz(i) -+ -+ enddo -+ -+ else -+ -+ call turn_rigid_body -+ x (igrp1,igrp2,ifre1,ifre2,stride,hhx,hhy,hhz, -+ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) -+ -+ endif -+ -+ engchk=.true. -+ keystr=1 -+ -+ endif -+ -+c merge coordinate arrays -+ -+ if(mxnode.gt.1)then -+ -+ if(ngrp.eq.0)then -+ -+ call merge -+ x (idnode,mxnode,natms,mxbuff,oxx,oyy,ozz,buffer) -+ -+ else -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,oxx,oyy,ozz,buffer) -+ -+ endif -+ -+ endif -+ -+c reassign atomic positions and calculate max displacement -+ -+ dischk=0.d0 -+ do i=1,natms -+ -+ dischk=max(dischk,(xxx(i)-oxx(i))**2+ -+ x (yyy(i)-oyy(i))**2+(zzz(i)-ozz(i))**2) -+ -+ xxx(i)=oxx(i) -+ yyy(i)=oyy(i) -+ zzz(i)=ozz(i) -+ -+ enddo -+ -+c check convergence condition for position -+ -+ if(keytol.eq.2.and.keystr.gt.0.and. -+ x opttol.ge.sqrt(dischk))stropt=.true. -+ -+c deallocate working arrays -+ -+ deallocate(ggx,ggy,ggz,dtx,dty,dtz,oxx,oyy,ozz,stat=fail(1)) -+ if(ngrp.gt.0)then -+ deallocate(txx,tyy,tzz,uxx,uyy,uzz,stat=fail(2)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(3)) -+ if(ngrp.eq.0)deallocate(txx,tyy,tzz,stat=fail(4)) -+ -+ endif -+ -+ return -+ end subroutine strucopt -+ -+ subroutine pseudo_shake(nscons,natms,mxnode,fff) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine treating rigid bonds as stiff harmonic bonds -+c suitable for conjugate gradient minimisation -+c -+c copyright - daresbury laboratory -+c author - w. smith may 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ real(8), parameter :: harm=1.d6 -+ -+ integer i,j,k,natms,nscons,mxnode -+ real(8) fff,engbnd,dis,rrr,gamma -+ -+c calculate energy and force -+ -+ engbnd=0.d0 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dis=prmcon(listcon(k,1)) -+ rrr=sqrt(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ engbnd=engbnd+0.5d0*harm*(rrr-dis)**2 -+ gamma=harm*(rrr-dis)/rrr -+ ggx(i)=ggx(i)-dxx(k)*gamma -+ ggy(i)=ggy(i)-dyy(k)*gamma -+ ggz(i)=ggz(i)-dzz(k)*gamma -+ -+ ggx(j)=ggx(j)+dxx(k)*gamma -+ ggy(j)=ggy(j)+dyy(k)*gamma -+ ggz(j)=ggz(j)+dzz(k)*gamma -+ -+ enddo -+ -+c global sum of pseudo forces -+ -+ call global_sum_forces(natms,mxnode,ggx,ggy,ggz) -+ if(mxnode.gt.1)then -+ buffer(1)=engbnd -+ call gdsum(buffer(1),1,buffer(2)) -+ engbnd=buffer(1) -+ endif -+ fff=fff+engbnd -+ -+ return -+ end subroutine pseudo_shake -+ -+ subroutine torque_split -+ x (ngrp,idnode,mxnode,imcon,ggx,ggy,ggz,txx,tyy,tzz, -+ x uxx,uyy,uzz,dtx,dty,dtz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for resolving torques into equivalent atomic -+c forces suitable for conjugate gradient minimisation -+c -+c copyright - daresbury laboratory -+c author - w. smith may 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,j,ig,id,jr,jrs,ngrp,igrp1,igrp2,idnode,imcon,mxnode -+ -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,trq,txx,tyy,tzz -+ real(8) ggx,ggy,ggz,tmp,taq,scale -+ real(8) uxx,uyy,uzz,dtx,dty,dtz -+ -+ dimension ggx(mxatms),ggy(mxatms),ggz(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) -+ dimension dtx(mxatms),dty(mxatms),dtz(mxatms) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c calculate centres of mass of rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c working com is first site in group -+ -+ i=lstrgd(jr+1) -+ txx(ig)=xxx(i) -+ tyy(ig)=yyy(i) -+ tzz(ig)=zzz(i) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ uxx(jr)=xxx(i)-txx(ig) -+ uyy(jr)=yyy(i)-tyy(ig) -+ uzz(jr)=zzz(i)-tzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c minimum image from working com -+ -+ call images(imcon,0,1,jr,cell,uxx,uyy,uzz) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=0.d0 -+ gcmy(ig)=0.d0 -+ gcmz(ig)=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ gcmx(ig)=gcmx(ig)+weight(i)*uxx(jr) -+ gcmy(ig)=gcmy(ig)+weight(i)*uyy(jr) -+ gcmz(ig)=gcmz(ig)+weight(i)*uzz(jr) -+ -+ enddo -+ -+c final centre of mass -+ -+ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) -+ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) -+ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) -+ -+ enddo -+ -+c calculate atom displacements from rigid body com -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c resolve rigid body forces and torques to orthogonal atomic basis -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+ggx(i) -+ fmy=fmy+ggy(i) -+ fmz=fmz+ggz(i) -+ -+ enddo -+ fmx=fmx/dble(numgsit(id)) -+ fmy=fmy/dble(numgsit(id)) -+ fmz=fmz/dble(numgsit(id)) -+ -+c calculate torque on rigid body -+ -+ jr=jrs -+ tqx=0.d0 -+ tqy=0.d0 -+ tqz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx=tqx+dty(jr)*ggz(i)-dtz(jr)*ggy(i) -+ tqy=tqy+dtz(jr)*ggx(i)-dtx(jr)*ggz(i) -+ tqz=tqz+dtx(jr)*ggy(i)-dty(jr)*ggx(i) -+ -+ enddo -+ -+c magnitude of torque -+ -+ trq=sqrt(tqx**2+tqy**2+tqz**2) -+ -+c construct unit vectors for new site forces -+ -+ jr=jrs -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ txx(i)=dty(jr)*tqz-tqy*dtz(jr) -+ tyy(i)=dtz(jr)*tqx-tqz*dtx(jr) -+ tzz(i)=dtx(jr)*tqy-tqx*dty(jr) -+ tmp=sqrt(txx(i)**2+tyy(i)**2+tzz(i)**2) -+ if(tmp.gt.1.d-10)then -+ -+ txx(i)=txx(i)/tmp -+ tyy(i)=tyy(i)/tmp -+ tzz(i)=tzz(i)/tmp -+ -+ else -+ -+ txx(i)=0.d0 -+ tyy(i)=0.d0 -+ tzz(i)=0.d0 -+ -+ endif -+ -+ enddo -+ -+c construct unit vectors for site location -+ -+ jr=jrs -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ uxx(i)=(tyy(i)*tqz-tqy*tzz(i))/trq -+ uyy(i)=(tzz(i)*tqx-tqz*txx(i))/trq -+ uzz(i)=(txx(i)*tqy-tqx*tyy(i))/trq -+ -+ enddo -+ -+c scale unit vectors to working lengths -+ -+ jr=jrs -+ taq=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ tmp=dtx(jr)*uxx(i)+dty(jr)*uyy(i)+dtz(jr)*uzz(i) -+ taq=taq+tmp**2 -+ txx(i)=tmp*txx(i) -+ tyy(i)=tmp*tyy(i) -+ tzz(i)=tmp*tzz(i) -+ uxx(i)=tmp*uxx(i) -+ uyy(i)=tmp*uyy(i) -+ uzz(i)=tmp*uzz(i) -+ -+ enddo -+ -+c calculate force scale factor -+ -+ scale=trq/taq -+ -+c final site forces -+ -+ jr=jrs -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ txx(i)=scale*txx(i) -+ tyy(i)=scale*tyy(i) -+ tzz(i)=scale*tzz(i) -+ ggx(i)=fmx -+ ggy(i)=fmy -+ ggz(i)=fmz -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine torque_split -+ -+ subroutine turn_rigid_body -+ x (igrp1,igrp2,ifre1,ifre2,step,hhx,hhy,hhz, -+ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) -+ -+c*********************************************************************** -+c -+c dl_poly routine for updating positions of atoms in a rigid body -+c during a conjugate gradient minimisation -+c -+c copyright daresbury laboratory -+c author w.smith may 2006 -+c -+c note: coz=cos(theta)-1 -+c zin=sin(theta)/theta -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,j,jr,jf,ig,id,igrp1,igrp2,ifre1,ifre2 -+ real(8) step,hhx,hhy,hhz,uxx,uyy,uzz,txx,tyy,tzz -+ real(8) oxx,oyy,ozz,uuu,ttt,the2,coz,zin -+ -+ dimension hhx(mxatms),hhy(mxatms),hhz(mxatms) -+ dimension oxx(mxatms),oyy(mxatms),ozz(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) -+ -+c update free atom positions -+ -+ do jf=ifre1,ifre2 -+ -+ i=lstfre(jf) -+ oxx(i)=oxx(i)+step*hhx(i) -+ oyy(i)=oyy(i)+step*hhy(i) -+ ozz(i)=ozz(i)+step*hhz(i) -+ -+ enddo -+ -+c update rigid body atoms -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ uuu=uxx(i)**2+uyy(i)**2+uzz(i)**2 -+ if(uuu.gt.1.d-10)then -+ -+ ttt=txx(i)**2+tyy(i)**2+tzz(i)**2 -+ the2=(ttt/uuu)*step**2 -+ -+ coz=-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0- -+ x the2/132.d0)/90.d0)/56.d0)/30.d0)/12.d0)/2.d0 -+ zin=-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0- -+ x the2/156.d0)/110.d0)/72.d0)/42.d0)/20.d0)/6.d0+1.d0 -+ -+ oxx(i)=oxx(i)+coz*uxx(i)+step*(hhx(i)+zin*txx(i)) -+ oyy(i)=oyy(i)+coz*uyy(i)+step*(hhy(i)+zin*tyy(i)) -+ ozz(i)=ozz(i)+coz*uzz(i)+step*(hhz(i)+zin*tzz(i)) -+ -+ else -+ -+ oxx(i)=oxx(i)+step*hhx(i) -+ oyy(i)=oyy(i)+step*hhy(i) -+ ozz(i)=ozz(i)+step*hhz(i) -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine turn_rigid_body -+ -+ end module optimiser_module -diff -urN dl_class_1.9.orig/srcmod/pair_module.f dl_class_1.9/srcmod/pair_module.f ---- dl_class_1.9.orig/srcmod/pair_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/pair_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,46 @@ -+ module pair_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining atom pair data -+c copyright - daresbury laboratory -+c author - w. smith mar 2004 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ integer, allocatable :: ilist(:),jlist(:) -+ real(8), allocatable :: xdf(:),ydf(:),zdf(:) -+ real(8), allocatable :: rsqdf(:) -+ -+ save ilist,jlist,xdf,ydf,zdf,rsqdf -+ -+ contains -+ -+ subroutine alloc_pair_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=6 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ allocate (ilist(mxxdf),stat=fail(1)) -+ allocate (jlist(mxxdf),stat=fail(2)) -+ allocate (xdf(mxxdf),stat=fail(3)) -+ allocate (ydf(mxxdf),stat=fail(4)) -+ allocate (zdf(mxxdf),stat=fail(5)) -+ allocate (rsqdf(mxxdf),stat=fail(6)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1940) -+ enddo -+ -+ end subroutine alloc_pair_arrays -+ -+ end module pair_module -diff -urN dl_class_1.9.orig/srcmod/parse_module.f dl_class_1.9/srcmod/parse_module.f ---- dl_class_1.9.orig/srcmod/parse_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/parse_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,585 @@ -+ module parse_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining parsing arrays -+c copyright - daresbury laboratory -+c author - w. smith jan 2004 -+c -+c*********************************************************************** -+ -+ integer, parameter :: lenrec=150 -+ character*1 record(lenrec) -+ save record -+ -+ contains -+ -+ subroutine getrec(safe,idnode,ifile) -+ -+c********************************************************************* -+c -+c dl_poly subroutine to read a character string on one node -+c and broadcast it to all other nodes -+c -+c copyright daresbury laboratory 1994 -+c author w.smith december 1994 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical safe -+ -+ character*150 line -+ integer export,import,idnode,ifile,i -+ dimension export(lenrec),import(lenrec) -+ -+ safe=.true. -+ -+ call gsync() -+ -+ if(idnode.eq.0)then -+ -+ read(ifile,'(a150)',end=100)line -+ -+ do i=1,lenrec -+ -+ record(i)=line(i:i) -+ export(i)=ichar(line(i:i)) -+ -+ enddo -+ -+ call gstate(safe) -+ call gisum(export,lenrec,import) -+ -+ return -+ -+ 100 safe=.false. -+ -+ call gstate(safe) -+ -+ else -+ -+ call gstate(safe) -+ if(.not.safe)return -+ -+ do i=1,lenrec -+ -+ export(i)=0 -+ -+ enddo -+ -+ call gisum(export,lenrec,import) -+ -+ do i=1,lenrec -+ -+ record(i)=char(export(i)) -+ -+ enddo -+ -+ return -+ -+ endif -+ -+ end subroutine getrec -+ -+ integer function intstr(word,len,lst) -+ -+c*********************************************************************** -+c -+c dl_poly function for extracting integers from a -+c character string -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith may 1994. -+c -+c parameters: -+c word - input character string -+c len - working length of character string -+c lst - location of space character at end of -+c integer string -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical flag,count,final -+ character*1 n,word,ksn -+ integer lst,len,j,isn -+ -+ dimension n(0:9),word(len) -+ data n/'0','1','2','3','4','5','6','7','8','9'/ -+ -+ isn=1 -+ lst=0 -+ ksn='+' -+ intstr=0 -+ flag=.false. -+ final=.false. -+ count=.false. -+ -+ do while(lst.lt.len.and.(.not.final)) -+ -+ lst=lst+1 -+ flag=.false. -+ -+ do j=0,9 -+ -+ if(n(j).eq.word(lst))then -+ -+ intstr=10*intstr+j -+ count=.true. -+ flag=.true. -+ -+ endif -+ -+ enddo -+ -+ if(count.and.(.not.flag))final=.true. -+ if(flag.and.ksn.eq.'-')isn=-1 -+ ksn=word(lst) -+ -+ enddo -+ -+ intstr=isn*intstr -+ -+ do j=lst,len -+ word(j-lst+1)=word(j) -+ enddo -+ do j=len-lst+2,len -+ word(j)=' ' -+ enddo -+ -+ return -+ end function intstr -+ -+ real(8) function dblstr(word,len,lst) -+ -+c*********************************************************************** -+c -+c dl_poly function for extracting double precisions from a -+c character string. -+c modified from dl_poly function intstr -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith may 1994. -+c modified - t. forester april 1994 -+c -+c parameters: -+c word - input character string -+c len - working length of character string -+c lst - location of space character at end of -+c double precision string -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 n,word,ksn,dot,d,e -+ logical flag,ldot,start,final -+ integer len,lst,iexp,idum,i,j,fail -+ real(8) sn,ten,one -+ dimension n(0:9),word(len) -+ character*1, allocatable :: work(:) -+ -+ data n/'0','1','2','3','4','5','6','7','8','9'/ -+ data dot/'.'/ -+ data d/'d'/ -+ data e/'e'/ -+ -+ allocate(work(len),stat=fail) -+ -+ lst=0 -+ sn=1.d0 -+ ksn='+' -+ ten=10.d0 -+ one=1.d0 -+ -+ dblstr=0.d0 -+ iexp=0 -+ idum=0 -+ start=.false. -+ ldot=.false. -+ final=.false. -+ -+ do while(lst.lt.len.and.(.not.final)) -+ -+ lst=lst+1 -+ flag=.false. -+ -+ do j=0,9 -+ -+ if(n(j).eq.word(lst))then -+ -+ dblstr=ten*dblstr+one*dble(j) -+ flag=.true. -+ start=.true. -+ -+ endif -+ -+ enddo -+ -+ if(dot.eq.word(lst))then -+ -+ flag=.true. -+ ten=1.d0 -+ ldot=.true. -+ start=.true. -+ -+ endif -+ -+ if(flag.and.ksn.eq.'-') sn=-1.d0 -+ if(ldot) one=one/10.d0 -+ ksn=word(lst) -+ if(ksn.eq."D")ksn="d" -+ if(ksn.eq."E")ksn="e" -+ -+ if(start)then -+ -+ if(d.eq.ksn.or.e.eq.ksn)then -+ -+ do i=1,len-lst -+ work(i)=word(i+lst) -+ enddo -+ iexp=intstr(work,len-lst,idum) -+ final=.true. -+ -+ endif -+ -+ if(.not.flag)final=.true. -+ -+ endif -+ -+ enddo -+ -+ dblstr=sn*dblstr*(10.d0**iexp) -+ lst=lst+idum -+ -+ do j=lst,len -+ word(j-lst+1)=word(j) -+ enddo -+ do j=len-lst+2,len -+ word(j)=' ' -+ enddo -+ -+ deallocate(work,stat=idum) -+ -+ return -+ end function dblstr -+ -+ subroutine strip(string,imax) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to strip blanks from start of a string -+c maximum length is 255 characters -+c -+c copyright daresbury laboratory 1993 -+c author t.forester july 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,imax,j -+ character*1 string(imax) -+ -+ do i=1,imax -+ -+ if(string(1).eq.' ')then -+ -+ do j=1,imax-1 -+ -+ string(j)=string(j+1) -+ -+ enddo -+ -+ string(imax)=' ' -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine strip -+ -+ subroutine lowcase(string,length) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to lowercase a string of up to 255 characters. -+c Transportable to non-ASCII machines -+c -+c copyright daresbury laboratory 1993 -+c author t. forester july 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 string(*) -+ character*1 letter -+ integer i,length -+ -+ do i=1,min(255,length) -+ -+ letter=string(i) -+ -+ if(letter.eq.'A')then -+ letter='a' -+ else if(letter.eq.'B')then -+ letter='b' -+ else if(letter.eq.'C')then -+ letter='c' -+ else if(letter.eq.'D')then -+ letter='d' -+ else if(letter.eq.'E')then -+ letter='e' -+ else if(letter.eq.'F')then -+ letter='f' -+ else if(letter.eq.'G')then -+ letter='g' -+ else if(letter.eq.'H')then -+ letter='h' -+ else if(letter.eq.'I')then -+ letter='i' -+ else if(letter.eq.'J')then -+ letter='j' -+ else if(letter.eq.'K')then -+ letter='k' -+ else if(letter.eq.'L')then -+ letter='l' -+ else if(letter.eq.'M')then -+ letter='m' -+ else if(letter.eq.'N')then -+ letter='n' -+ else if(letter.eq.'O')then -+ letter='o' -+ else if(letter.eq.'P')then -+ letter='p' -+ else if(letter.eq.'Q')then -+ letter='q' -+ else if(letter.eq.'R')then -+ letter='r' -+ else if(letter.eq.'S')then -+ letter='s' -+ else if(letter.eq.'T')then -+ letter='t' -+ else if(letter.eq.'U')then -+ letter='u' -+ else if(letter.eq.'V')then -+ letter='v' -+ else if(letter.eq.'W')then -+ letter='w' -+ else if(letter.eq.'X')then -+ letter='x' -+ else if(letter.eq.'Y')then -+ letter='y' -+ else if(letter.eq.'Z')then -+ letter='z' -+ endif -+ -+ string(i)=letter -+ -+ enddo -+ -+ return -+ end subroutine lowcase -+ -+ subroutine copystring(oldstr,newstr,length) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to copy one string into another -+c -+c copyright daresbury laboratory -+c author w. smith jan 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 newstr(*),oldstr(*) -+ integer i,length -+ -+ do i=1,length -+ -+ newstr(i)=oldstr(i) -+ -+ enddo -+ -+ return -+ end subroutine copystring -+ -+ logical function findstring(seek,string,here) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to find an explicit string in an input record -+c note: variable `seek' is a character string while variable -+c `string' is a character*1 array i.e. code is application specific -+c -+c copyright daresbury laboratory -+c author w.smith jan 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,n,m,here -+ character*(*) seek -+ character*1 string(lenrec) -+ -+ m=lenrec -+ n=len(seek) -+ findstring=.false. -+ -+ here=0 -+ do while(here.le.m-n.and.(.not.findstring)) -+ -+ findstring=.true. -+ -+ do i=1,n -+ if(seek(i:i).ne.string(here+i))findstring=.false. -+ enddo -+ -+ here=here+1 -+ -+ enddo -+ -+ return -+ end function findstring -+ -+ subroutine striptext(string,length,nwords) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to strip leading text from a data record -+c -+c copyright daresbury laboratory -+c author w.smith jan 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical final -+ integer length,nwords,i,j,k -+ character*1 string(length) -+ -+ do k=1,nwords -+ -+ i=0 -+ final=.false. -+ -+ do while(.not.final.and.i.lt.length) -+ -+ i=i+1 -+ -+ if(string(1).eq.' ')then -+ -+ final=.true. -+ -+ else -+ -+ do j=1,length-1 -+ -+ string(j)=string(j+1) -+ -+ enddo -+ -+ string(length)=' ' -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine striptext -+ -+ subroutine getword(word,string,len1,len2) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to fetch an 8 character word from a string -+c while ignoring leading blanks -+c -+c copyright daresbury laboratory -+c author w.smith jan 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical final -+ character*8 word -+ integer len1,len2,i,j,k -+ character*1 wrdseq(len1),string(len2) -+ -+ do i=1,len1 -+ wrdseq(i)=' ' -+ enddo -+ -+ i=0 -+ k=0 -+ final=.false. -+ -+ do while(.not.final.and.i.lt.len2) -+ -+ i=i+1 -+ -+ if(string(1).eq.' ')then -+ -+ if(k.gt.0)final=.true. -+ -+ else -+ -+ k=k+1 -+ wrdseq(k)=string(1) -+ if(k.eq.len1)final=.true. -+ -+ endif -+ -+ do j=1,len2-1 -+ -+ string(j)=string(j+1) -+ -+ enddo -+ -+ string(len2)=' ' -+ -+ enddo -+ -+ word=mkwd8(wrdseq) -+ -+ return -+ end subroutine getword -+ -+ character*8 function mkwd8(string) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to make an 8 character word from a string -+c -+c copyright daresbury laboratory -+c author w.smith nov 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i -+ character*1 string(*) -+ -+ do i=1,8 -+ mkwd8(i:i)=string(i) -+ enddo -+ -+ return -+ end function mkwd8 -+ -+ end module parse_module -+ -+ -diff -urN dl_class_1.9.orig/srcmod/pass_tools.f dl_class_1.9/srcmod/pass_tools.f ---- dl_class_1.9.orig/srcmod/pass_tools.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/pass_tools.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,318 @@ -+ subroutine passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for passing information about bond -+c constraints between nodes -+c -+c parallel replicated data version assuming direct node-node -+c connection (i.e. this version may be intel specific) -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith august 1992. -+c MPI version t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ logical safe,lshmov -+ integer idnode,mxnode,natms,nscons,lashap,lishap,listme,ierr -+ integer listin,listot,listcon,lstfrz,i,j,k,jdnode,idum -+ -+ dimension listme(mxatms),listin(mxatms),listot(mxatms) -+ dimension lishap(mxlshp),lashap(mxproc),listcon(mxcons,3) -+ dimension lstfrz(mxatms) -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+ if(mxproc.lt.mxnode)call error(idnode,102) -+ -+ safe=.true. -+ -+ do i=1,natms -+ -+ listme(i)=0 -+ -+ enddo -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ listme(i)=listme(i)+1 -+ listme(j)=listme(j)+1 -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ j=0 -+ call gsync() -+ do k=1,mxnode-1 -+ -+ jdnode=mod(idnode+mxnode-k,mxnode) -+ -+ call MPI_IRECV(listin,natms,MPI_INTEGER, -+ x MPI_ANY_SOURCE,Passcon_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(listme,natms,MPI_INTEGER,jdnode, -+ x Passcon_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+ do i=1,natms -+ -+ if((listme(i).gt.0).and.(listin(i).gt.0.and. -+ x lstfrz(i).eq.0))then -+ -+ j=j+1 -+ if(j.gt.mxlshp)then -+ -+ safe=.false. -+ -+ else -+ -+ lishap(j)=i -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ lashap(k)=j -+ -+ enddo -+ -+ endif -+ -+c check for global error condition -+ -+ if(mxnode.gt.1) call gstate(safe) -+ -+ if(.not.safe)call error(idnode,103) -+ -+ if(mxnode.gt.1) then -+ call gisum(j,1,idum) -+ if(idnode.eq.0) write(nrite,'(/,a,14x,i10)') -+ x ' shared atoms from passcon',j/2 -+ lshmov = (j.gt.0) -+ endif -+ -+c keep record of all atoms subject to constraints -+ -+ do i=1,natms -+ -+ if(listme(i).gt.0)then -+ -+ listot(i)=1 -+ -+ else -+ -+ listot(i)=0 -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gisum(listot,natms,listin) -+ -+ return -+ end -+ -+ subroutine passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for passing information about PMF -+c constraints between nodes -+c -+c parallel replicated data version assuming direct node-node -+c connection (i.e. this version may be intel specific) -+c -+c copyright - daresbury laboratory 1995 -+c author - t.forester august 1995. -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf -+ integer npmf,i,j,k -+ -+ dimension listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) -+ dimension lstpmf(mxspmf,mspmf),npmf(2) -+ -+ if(mxproc.lt.mxnode)call error(idnode,102) -+ if(mxpmf.lt.natms) call error(idnode,490) -+ -+ do i=1,natms -+ -+ listpm(i)=0 -+ -+ enddo -+ -+ do k=1,nspmf -+ -+ do j = 1,npmf(1)+npmf(2) -+ -+ i=lstpmf(j,k) -+ listpm(i)= 1 -+ -+ enddo -+ -+ enddo -+c -+c keep record of all atoms subject to pmf constraints -+ -+ do i=1,natms -+ -+ if(listpm(i).gt.0)then -+ -+ lstpmt(i)=1 -+ -+ else -+ -+ lstpmt(i)=0 -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gisum(lstpmt,natms,listin) -+ -+ return -+ end -+ -+ subroutine passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for passing information about rigid body -+c atoms involved in bond constraints between nodes -+c -+c parallel replicated data version assuming direct node-node -+c connection -+c -+c copyright - daresbury laboratory 1995 -+c author - t. forester december 1995. -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ logical lcnb,safe -+ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,listin -+ integer listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp -+ integer numgsit,igrp1,igrp2,i,jr,igrp,itmols,imols,lgrp,id -+ integer jj,ik,j,k -+ -+ dimension listin(mxatms) -+ dimension listcon(mxcons,3),lstcsit(2*mxcons) -+ dimension lstout(mxatms),lstrgd(mxgatm) -+ dimension nummols(mxtmls),numgrp(mxtmls),numgsit(mxungp) -+ dimension lstgtp(mxgrp) -+ -+ integer status(MPI_STATUS_SIZE) -+ -+ if(mxproc.lt.mxnode)call error(idnode,102) -+ -+c block indices for groups -+ -+ igrp1 = (idnode*ngrp)/mxnode + 1 -+ igrp2 = ((idnode+1)*ngrp)/mxnode -+ -+c locate site indices of atoms in constraints -+ -+ do i = 1,natms -+ listin(i) = 0 -+ enddo -+ -+c loop over molecule types -+ -+ jr = 0 -+ igrp = 0 -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then -+ -+ id = lstgtp(igrp) -+ do jj = 1,numgsit(id) -+ -+ jr = jr +1 -+ i = lstrgd(jr) -+ listin(i) = jj -+ -+ enddo -+ endif -+ enddo -+ enddo -+ enddo -+ -+ if(mxnode.gt.1) call gisum(listin,natms,lstout) -+ -+ safe = .true. -+ ik = 0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ if(listin(i).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(i) -+ safe = .false. -+ endif -+ -+ if(listin(j).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(j) -+ safe = .false. -+ endif -+ -+ enddo -+ -+c lcnb flags bodies connected by constraints -+ -+ if(mxnode.gt.1) call gstate(safe) -+ lcnb = (.not.safe) -+ -+ return -+ end -+ -+ -+ -diff -urN dl_class_1.9.orig/srcmod/pmf_module.f dl_class_1.9/srcmod/pmf_module.f ---- dl_class_1.9.orig/srcmod/pmf_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/pmf_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1911 @@ -+ module pmf_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining potential of mean force arrays -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use ensemble_tools_module -+ use lf_motion_module -+ use lf_rotation1_module -+ use parse_module -+ use property_module -+ use setup_module -+ use shake_module -+ use vv_motion_module -+ use utility_module -+ -+ implicit none -+ -+ integer npmf -+ real(8) prmpmf,pmfnrm -+ real(8), allocatable :: pmfwght(:) -+ integer, allocatable :: numpmf(:) -+ integer, allocatable :: indpmf(:) -+ integer, allocatable :: listpm(:) -+ integer, allocatable :: lstpmt(:) -+ integer, allocatable :: lstpmf(:,:) -+ -+ dimension npmf(2),pmfnrm(2) -+ -+ save npmf,prmpmf,pmfnrm,pmfwght,numpmf,indpmf,listpm -+ save lstpmt,lstpmf -+ -+ contains -+ -+ subroutine alloc_pmf_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for allocating pmf arrays -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=6 -+ -+ integer i,idnode,fail -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (pmfwght(mxspmf),stat=fail(1)) -+ allocate (indpmf(mxspmf),stat=fail(2)) -+ allocate (numpmf(mxtmls),stat=fail(3)) -+ allocate (listpm(mxpmf),stat=fail(4)) -+ allocate (lstpmt(mxpmf),stat=fail(5)) -+ allocate (lstpmf(mxspmf,mspmf),stat=fail(6)) -+ -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1210) -+ enddo -+ -+ do i=1,mxtmls -+ numpmf(i)=0 -+ enddo -+ -+ end subroutine alloc_pmf_arrays -+ -+ subroutine define_pmf(safe,idnode,itmols,nspmf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining pmf units -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer idnode,itmols,nspmf,ipmf,jpmf,iatm1,idum -+ real(8) wght -+ -+ numpmf(itmols)=1 -+ prmpmf=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) then -+ write(nrite,"(/,1x,' PMF bondlength :', -+ x 5x,f20.10)") prmpmf -+ write(nrite, -+ x "(/,/,12x,'unit, site and weight details:' -+ x ,/,/,16x,'unit',6x,'index',5x,'weight')") -+ endif -+ -+ do ipmf=1,2 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ call strip(record,lenrec) -+ call lowcase(record,lenrec) -+ if(.not.findstring('pmf unit',record,idum)) -+ x call error(idnode,462) -+ npmf(ipmf)=intstr(record,lenrec,idum) -+ -+ do jpmf=1,npmf(ipmf) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ iatm1=intstr(record,lenrec,idum) -+ wght=dblstr(record,lenrec,idum) -+ if(wght.le.1.d-10) wght=1.d0 -+ -+ nspmf=nspmf+1 -+ -+ if(nspmf.gt.mxspmf) call error(idnode,460) -+ -+ indpmf(nspmf)=iatm1 -+ pmfwght(nspmf)=wght -+ -+ if(idnode.eq.0) then -+ -+ if(jpmf.eq.1) then -+ write(nrite,"(16x,i5,i10,f12.6)") -+ x ipmf,indpmf(nspmf),pmfwght(nspmf) -+ else -+ write(nrite,"(21x,i10,f12.6)") -+ x indpmf(nspmf),pmfwght(nspmf) -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine define_pmf -+ -+ subroutine pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, -+ x dxp,dyp,dzp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing vectors for PMF calculations -+c -+c copyright - daresbury laboratory -+c adapted by w.smith october 2005 -+c original by t.forester aug 1995 -+c -+c set variable img true for PBC shifted vectors -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical img -+ integer nspmf,imcon,k,jj,kk,ipmf,i,i1,i2 -+ -+ real(8) xxx(mxatms),yyy(mxatms),zzz(mxatms) -+ real(8) xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ real(8) xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) -+ real(8) dxp(mspmf),dyp(mspmf),dzp(mspmf),cell(9) -+ -+ do k=1,nspmf -+ -+ jj=0 -+ kk=0 -+ -+c calculate difference vectors -+ -+ do ipmf=1,2 -+ -+ i1=lstpmf(jj+1,k) -+ -+c position difference vectors -+ -+ do i=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i2=lstpmf(jj,k) -+ xxt(i)=xxx(i2)-xxx(i1) -+ yyt(i)=yyy(i2)-yyy(i1) -+ zzt(i)=zzz(i2)-zzz(i1) -+ -+ enddo -+ -+c correct for periodic images - assume less than half box length -+ -+ if(img)call images(imcon,0,1,npmf(ipmf),cell,xxt,yyt,zzt) -+ -+c create weighted coordinate -+ -+ xxa(ipmf,k)=0.d0 -+ yya(ipmf,k)=0.d0 -+ zza(ipmf,k)=0.d0 -+ -+ do i=1,npmf(ipmf) -+ -+ kk=kk+1 -+ xxa(ipmf,k)=xxa(ipmf,k)+pmfwght(kk)*xxt(i) -+ yya(ipmf,k)=yya(ipmf,k)+pmfwght(kk)*yyt(i) -+ zza(ipmf,k)=zza(ipmf,k)+pmfwght(kk)*zzt(i) -+ -+ enddo -+ -+ xxa(ipmf,k)=xxa(ipmf,k)/pmfnrm(ipmf)+xxx(i1) -+ yya(ipmf,k)=yya(ipmf,k)/pmfnrm(ipmf)+yyy(i1) -+ zza(ipmf,k)=zza(ipmf,k)/pmfnrm(ipmf)+zzz(i1) -+ -+ enddo -+ -+ dxp(k)=xxa(2,k)-xxa(1,k) -+ dyp(k)=yya(2,k)-yya(1,k) -+ dzp(k)=zza(2,k)-zza(1,k) -+ -+ enddo -+ -+c periodic boundary condition for pmf vectors -+ -+ if(img)call images(imcon,0,1,nspmf,cell,dxp,dyp,dzp) -+ -+ return -+ end subroutine pmf_vectors -+ -+ subroutine pmflf -+ x (safe,safep,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics. Verlet leapfrog With RD-SHAKE -+c and PMF_SHAKE - for potential of mean force calculations. -+c -+c parallel replicated data version : block data -+c adapted from dl_poly routine nve_1.f -+c -+c copyright - daresbury laboratory 1995 -+c author - t.forester aug 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ -+ logical safe,lshmov,safep,unsafe,img -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,nspmf,ntpmf -+ integer fail,iatm0,iatm1,i,j,k,jj,ii,ipmf,icyc -+ real(8) engke,tolnce,tstep,vircon,virpmf,strpmf,summas -+ real(8) rstep,viracc,strkin,strcon -+ -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) -+ real(8), allocatable :: dxp(:),dyp(:),dzp(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ dimension strpmf(9),strcon(9),strkin(9),summas(2),fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(1)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(2)) -+ allocate(xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(3)) -+ allocate(uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(4)) -+ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(5)) -+ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(8)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1220) -+ enddo -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c constraint virials -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ -+c temporary stress tensor accumulators -+ -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ strpmf(i)=0.d0 -+ -+ enddo -+ -+c store initial values of position -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c calculate mass terms for PMF units -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ summas(ipmf)=0.d0 -+ pmfnrm(ipmf)=0.d0 -+ -+ do i=1,npmf(ipmf) -+ -+ jj=jj+1 -+ ii=lstpmf(jj,1) -+ summas(ipmf)=summas(ipmf)+weight(ii) -+ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) -+ -+ enddo -+ -+ enddo -+ -+c calculate PMF bond constraints and store initial positions -+ -+ img=.true. -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, -+ x xxa,yya,zza,dxp,dyp,dzp) -+ -+c move atoms by leapfrog algorithm -+ -+ safe=(ntcons.eq.0) -+ safep=(ntpmf.eq.0) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c update velocities -+ -+ uxx(i)=vxx(i)+tstep*rmass(i)*fxx(i) -+ uyy(i)=vyy(i)+tstep*rmass(i)*fyy(i) -+ uzz(i)=vzz(i)+tstep*rmass(i)*fzz(i) -+ -+c update positions -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+c RDSHAKE procedure -+ -+ if(ntcons.gt.0.or.ntpmf.gt.0) then -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint corrections - iteratively -+ -+ icyc=0 -+ unsafe=.true. -+ -+ do while(unsafe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c apply bond constraints -+ -+ viracc=0.d0 -+ if(ntcons.gt.0)call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c apply pmf constraints -+ -+ viracc=0.d0 -+ if(ntpmf.gt.0)call pmf_shake -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x viracc,xxt,yyt,zzt,strcon,summas,dxp,dyp,dzp, -+ x xxa,yya,zza) -+ -+ virpmf=virpmf+viracc -+ do i=1,9 -+ strpmf(i)=strpmf(i)+strcon(i) -+ enddo -+ -+ unsafe=(.not.(safe.and.safep.and.abs(viracc).lt.1.d-10)) -+ -+ enddo -+ -+ safep=.not.unsafe -+ -+c calculate velocity correction -+ -+ j=0 -+ rstep=1.d0/tstep -+ do i=iatm0,iatm1 -+ -+c update corrected velocity -+ -+ j=j+1 -+ uxx(i)=(xxx(i)-xxo(j))*rstep -+ uyy(i)=(yyy(i)-yyo(j))*rstep -+ uzz(i)=(zzz(i)-zzo(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=(uxx(i)-vxx(i))*weight(i)*rstep -+ fyy(i)=(uyy(i)-vyy(i))*weight(i)*rstep -+ fzz(i)=(uzz(i)-vzz(i))*weight(i)*rstep -+ -+ enddo -+ -+ endif -+ -+c calculate velocity at full time step -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=0.5d0*(vxx(i)+uxx(i)) -+ vyy(i)=0.5d0*(vyy(i)+uyy(i)) -+ vzz(i)=0.5d0*(vzz(i)+uzz(i)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c total contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strpmf(i)+strcns(i)+strkin(i) -+ enddo -+ -+c add pmf and constraint virials -+ -+ vircon=vircon+virpmf -+ -+c restore half step velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(1)) -+ deallocate(uxx,uyy,uzz,dxp,dyp,dzp,stat=fail(2)) -+ deallocate(txx,tyy,tzz,xxo,yyo,zzo,stat=fail(3)) -+ deallocate(dxt,dyt,dzt,xxa,yya,zza,stat=fail(4)) -+ -+ return -+ end subroutine pmflf -+ -+ subroutine pmflfq_1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon,safep,nspmf,ntpmf,virpmf) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame -+c omx,omy,omz = angular velocity in body fixed frame (principal axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=14 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newjob,safep,unsafe,img -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer fail,i,igrp,igrp1,igrp2,idum,ifre1,ifre2,j,ifre -+ integer jg,ig,k,id,jr,nspmf,ntpmf,jj,ii,ipmf,icyc -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) strkin,rot,rstep,rtsq,engtrn,vaa,vbb,vcc,virpmf -+ real(8) trx,try,trz,delx,dely,delz,engfke,viracc -+ real(8) strgrp,tqx,tqy,tqz,fmx,fmy,fmz -+ real(8) strpmf,strcon,summas -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ -+ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) -+ real(8), allocatable :: dxp(:),dyp(:),dzp(:) -+ -+ dimension strkin(9),strgrp(9),rot(9),fail(nnn) -+ -+ dimension strpmf(9),strcon(9),summas(2) -+ -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(12)) -+ -+ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(13)) -+ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(14)) -+ -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1500) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c constraint virials -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ -+c temporary stress tensor accumulators -+ -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ strpmf(i)=0.d0 -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c calculate mass terms for PMF units -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ summas(ipmf)=0.d0 -+ pmfnrm(ipmf)=0.d0 -+ -+ do i=1,npmf(ipmf) -+ -+ jj=jj+1 -+ ii=lstpmf(jj,1) -+ summas(ipmf)=summas(ipmf)+weight(ii) -+ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) -+ -+ enddo -+ -+ enddo -+ -+c calculate PMF bond constraints and store initial positions -+ -+ img=.true. -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, -+ x xxa,yya,zza,dxp,dyp,dzp) -+ -+c move atoms by leapfrog algorithm -+ -+ safe=(ntcons.eq.0) -+ safep=(ntpmf.eq.0) -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(i)=vxo(j)+tstep*rmass(i)*fxx(i) -+ uyy(i)=vyo(j)+tstep*rmass(i)*fyy(i) -+ uzz(i)=vzo(j)+tstep*rmass(i)*fzz(i) -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0.or.ntpmf.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint corrections - iteratively -+ -+ icyc=0 -+ unsafe=.true. -+ -+ do while(unsafe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c apply bond constraints -+ -+ viracc=0.d0 -+ if(ntcons.gt.0)call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c apply pmf constraints -+ -+ viracc=0.d0 -+ if(ntpmf.gt.0)call pmf_shake -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x viracc,xxt,yyt,zzt,strcon,summas,dxp,dyp,dzp, -+ x xxa,yya,zza) -+ -+ virpmf=virpmf+viracc -+ do i=1,9 -+ strpmf(i)=strpmf(i)+strcon(i) -+ enddo -+ -+ unsafe=(.not.(safe.and.safep.and.abs(viracc).lt.1.d-10)) -+ -+ enddo -+ -+ safep=.not.unsafe -+ -+c calculate force and velocity corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational rigid body motion -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) -+ uyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) -+ uzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcmx(ig)+tstep*uxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*uyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*uzz(ig) -+ -+c estimate velocity at full time step -+ -+ gvxx(ig)=0.5d0*(gvxx(ig)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyy(ig)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzz(ig)+uzz(ig)) -+ -+ enddo -+ -+c calculate rigid body translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c total translational kinetic energy -+ -+ engke=engtrn+engfke -+ -+c calculate ridid body kinetic stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore rigid body half timestep velocity -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx=0.d0 -+ tqy=0.d0 -+ tqz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx=tqx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy=tqy+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz=tqz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c store current angular velocity -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx*rot(1)+tqy*rot(4)+tqz*rot(7))*rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) -+ try=(tqx*rot(2)+tqy*rot(5)+tqz*rot(8))*rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) -+ trz=(tqx*rot(3)+tqy*rot(6)+tqz*rot(9))*rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+delx*pt5 -+ opy(jg)=omy(ig)+dely*pt5 -+ opz(jg)=omz(ig)+delz*pt5 -+ -+ enddo -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omx(ig)+delx -+ uyy(ig)=omy(ig)+dely -+ uzz(ig)=omz(ig)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omx(ig)+delx*1.5d0 -+ oqy(jg)=omy(ig)+dely*1.5d0 -+ oqz(jg)=omz(ig)+delz*1.5d0 -+ -+c angular velocity at timestep n -+ -+ omx(ig)=omx(ig)+pt5*delx -+ omy(ig)=omy(ig)+pt5*dely -+ omz(ig)=omz(ig)+pt5*delz -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i)+ -+ x strpmf(i) -+ enddo -+ -+c add pmf and constraint virials -+ -+ vircon=vircon+virpmf -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies - relative to c.o.m -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate(opx,opy,opz,xxt,yyt,zzt,stat=fail(1)) -+ deallocate(oqx,oqy,oqz,dtx,dty,dtz,stat=fail(2)) -+ deallocate(dxx,dyy,dzz,uxx,uyy,uzz,stat=fail(3)) -+ deallocate(txx,tyy,tzz,dxt,dyt,dzt,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,xx1,yy1,zz1,stat=fail(5)) -+ deallocate(vxo,vyo,vzo,gcxo,gcyo,gczo,stat=fail(6)) -+ deallocate(dxp,dyp,dzp,xxa,yya,zza,stat=fail(7)) -+ -+ return -+ end subroutine pmflfq_1 -+ -+ subroutine pmf_shake -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x virpmf,xxt,yyt,zzt,strpmf,summas,dxp,dyp,dzp, -+ x xxa,yya,zza) -+ -+c*********************************************************************** -+c -+c dlpoly constraint subroutine for potential of mean force calc. -+c accummulates constraint force to maintain reaction coordinate -+c -+c assume bond vectors dxp,dyp,dzp are input -+c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc -+c -+c copyright daresbury laboratory 1995 -+c author t.forester august 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safep,img -+ integer idnode,mxnode,imcon,natms,nspmf,fail,icyc,k,jj -+ integer ii,i,ipmf -+ real(8) tstep,tolnce,virpmf,xxt,yyt,zzt,strpmf,summas -+ real(8) dxp,dyp,dzp,xxa,yya,zza,amt,strs1,strs2,strs3,strs5 -+ real(8) strs6,strs9,tstep2,dis,omega2,eps,gamma,gammi -+ -+ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) -+ dimension amt(2),strpmf(9),summas(2) -+ -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:),dsq(:) -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),dsq(mspmf), -+ x stat=fail) -+ if(fail.ne.0)call error(idnode,1230) -+ -+ if(mxcons.lt.nspmf) call error(idnode,492) -+ if(mspmf .lt.nspmf) call error(idnode,458) -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c accumulators for strpmf tensor -+ -+ virpmf=0.d0 -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ safep=.false. -+ -+ do while(.not.safep.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c calculate bond constraint length -+ -+ img=.true. -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, -+ x xxa,yya,zza,dxt,dyt,dzt) -+ -+ amt(1)= tstep2/summas(1) -+ amt(2)=-tstep2/summas(2) -+ -+ eps=0.d0 -+ dis=prmpmf -+ omega2=dis*dis -+ -+ do k=1,nspmf -+ -+ dsq(k)=dxt(k)**2+dyt(k)**2+dzt(k)**2 -+ eps=max(eps,abs((omega2-dsq(k))/(2.0d0*dis))) -+ -+ enddo -+ -+c check convergence condition -+ -+ safep=(eps.le.tolnce) -+ -+c bypass calculations if converged -+ -+ if(.not.safep)then -+ -+ do k=1,nspmf -+ -+ gamma=(omega2-dsq(k))/(-2.d0*(amt(2)-amt(1))* -+ x (dxp(k)*dxt(k)+dyp(k)*dyt(k)+dzp(k)*dzt(k))) -+ -+c accumulate pmf virial -+ -+ virpmf=virpmf+gamma*(dxp(k)**2+dyp(k)**2+dzp(k)**2) -+ -+ strs1=strs1-gamma*dxp(k)*dxp(k) -+ strs2=strs2-gamma*dxp(k)*dyp(k) -+ strs3=strs3-gamma*dxp(k)*dzp(k) -+ strs5=strs5-gamma*dyp(k)*dyp(k) -+ strs6=strs6-gamma*dyp(k)*dzp(k) -+ strs9=strs9-gamma*dzp(k)*dzp(k) -+ -+c improve approximate atomic positions -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ gammi=-gamma*amt(ipmf) -+ -+ do ii=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i=lstpmf(jj,k) -+ -+ xxx(i)=xxx(i)+dxp(k)*gammi -+ yyy(i)=yyy(i)+dyp(k)*gammi -+ zzz(i)=zzz(i)+dzp(k)*gammi -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c complete strpmf tensor -+ -+ strpmf(1)=strs1 -+ strpmf(2)=strs2 -+ strpmf(3)=strs3 -+ strpmf(4)=strs2 -+ strpmf(5)=strs5 -+ strpmf(6)=strs6 -+ strpmf(7)=strs3 -+ strpmf(8)=strs6 -+ strpmf(9)=strs9 -+ -+c splice coordinate arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=virpmf -+ call gdsum(buffer(1),1,buffer(2)) -+ virpmf=buffer(1) -+ call gdsum(strpmf,9,buffer) -+ call splice -+ x (idnode,natms,listpm,lstpmt,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(dxt,dyt,dzt,dsq,stat=fail) -+ -+ return -+ end subroutine pmf_shake -+ -+ subroutine pmfvv -+ x (safe,safep,lshmov,isw,idnode,mxnode,imcon,natms,nscons, -+ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics. Velocity Verlet With PMF_RATTLE -+c for potential of mean force calculations. -+c -+c copyright - daresbury laboratory -+c adapted by w.smith october 2005 -+c original by t.forester aug 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical safe,lshmov,safep,unsafe,newjob,img -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,nspmf,ntpmf -+ integer isw,mxtop -+ integer fail,iatm0,iatm1,i,j,k,jj,i1,ipmf,icyc -+ real(8) engke,tolnce,tstep,vircon,virpmf,strcon,summas -+ real(8) viracc,strpmf,strkin -+ -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxp(:),dyp(:),dzp(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) -+ -+ dimension strcon(9),strpmf(9),strkin(9),summas(2),fail(nnn) -+ save summas,newjob,strpmf -+ data newjob/.true./ -+ -+c set default safety flags -+ -+ safe=(ntcons.eq.0) -+ safep=(ntpmf.eq.0) -+ if(safe.and.safep)return -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ mxtop=max(mxcons,mspmf) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(1)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(2)) -+ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(3)) -+ allocate(dxt(mxtop),dyt(mxtop),dzt(mxtop),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(6)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1220) -+ enddo -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate mass terms for PMF units -+ -+ if(newjob)then -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ summas(ipmf)=0.d0 -+ pmfnrm(ipmf)=0.d0 -+ -+ do i=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i1=lstpmf(jj,1) -+ summas(ipmf)=summas(ipmf)+weight(i1) -+ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) -+ -+ enddo -+ -+ enddo -+ -+ newjob=.false. -+ -+ endif -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c calculate PMF bond constraints and store initial positions -+ -+ img=.true. -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, -+ x dxp,dyp,dzp) -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ if(isw.eq.1)then -+ -+c constraint virials -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ -+c temporary stress tensor accumulators -+ -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ strpmf(i)=0.d0 -+ -+ enddo -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c apply constraint corrections - iteratively -+ -+ icyc=0 -+ unsafe=.true. -+ -+ do while(unsafe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ if(isw.eq.1)then -+ -+c apply bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+ endif -+ -+c apply pmf constraints -+ -+ if(ntpmf.gt.0)then -+ -+ safep=.false. -+ call pmf_rattle_r -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x viracc,summas,xxt,yyt,zzt,xxa,yya,zza,dxp,dyp,dzp, -+ x dxt,dyt,dzt,strcon) -+ -+ virpmf=virpmf+viracc -+ do i=1,9 -+ strpmf(i)=strpmf(i)+strcon(i) -+ enddo -+ -+ endif -+ -+ unsafe=(.not.(safe.and.safep.and.abs(viracc).le.1.d-10)) -+ -+ endif -+ -+ if(isw.eq.2)then -+ -+c apply rattle velocity constraints -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ -+ endif -+ -+c apply pmf velocity constraints -+ -+ if(ntpmf.gt.0)then -+ -+ safep=.false. -+ call pmf_rattle_v -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x summas,dxp,dyp,dzp,xxt,yyt,zzt,xxa,yya,zza,dxt,dyt,dzt) -+ -+ endif -+ -+ unsafe=(.not.(safe.and.safep)) -+ -+ endif -+ -+ enddo -+ -+ safep=(.not.unsafe) -+ -+c periodic boundary condition -+ -+ if(isw.eq.1)call images -+ x (imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+ if(isw.eq.2)then -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c total contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strpmf(i)+strcns(i)+strkin(i) -+ enddo -+ -+c add pmf and constraint virials -+ -+ vircon=vircon+virpmf -+ -+ endif -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(isw.eq.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(1)) -+ deallocate(dxp,dyp,dzp,dxt,dyt,dzt,stat=fail(2)) -+ deallocate(txx,tyy,tzz,xxa,yya,zza,stat=fail(3)) -+ -+ return -+ end subroutine pmfvv -+ -+ subroutine pmf_rattle_r -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x virpmf,summas,xxt,yyt,zzt,xxa,yya,zza,dxp,dyp,dzp, -+ x dxt,dyt,dzt,strpmf) -+ -+c*********************************************************************** -+c -+c dlpoly constraint subroutine for potential of mean force calc. -+c accumulates constraint force to maintain reaction coordinate. -+c velocity verlet adaptation -+c -+c assume bond vectors dxp,dyp,dzp are input -+c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc -+c -+c copyright daresbury laboratory -+c adapted by w.smith october 2005 -+c original t.forester august 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safep,img -+ integer idnode,mxnode,imcon,natms,nspmf,icyc,k,jj -+ integer i1,i,ipmf -+ real(8) tstep,tolnce,virpmf,xxt,yyt,zzt,strpmf,summas,gamma -+ real(8) dxp,dyp,dzp,xxa,yya,zza,amt,tstep2,dis,omega2,eps,gammi -+ real(8) strs1,strs2,strs3,strs5,strs6,strs9,dxt,dyt,dzt,dsq -+ -+ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) -+ dimension amt(2),strpmf(9),summas(2) -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c pmf virial -+ -+ virpmf=0.d0 -+ -+c accumulators for stress tensor -+ -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c array bound check -+ -+ if(mxcons.lt.nspmf) call error(idnode,492) -+ if(mspmf .lt.nspmf) call error(idnode,458) -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ img=.true. -+ safep=.false. -+ dis=prmpmf -+ omega2=dis*dis -+ amt(1)= tstep2/summas(1) -+ amt(2)=-tstep2/summas(2) -+ -+ do while(.not.safep.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, -+ x dxt,dyt,dzt) -+ -+c check convergence -+ -+ eps=0.d0 -+ -+ do k=1,nspmf -+ -+ dsq=dxt(k)**2+dyt(k)**2+dzt(k)**2 -+ eps=max(eps,abs((omega2-dsq)/dis)) -+ -+ enddo -+ -+ eps=eps*0.5d0 -+ -+c verification of convergence -+ -+ safep=(eps.lt.tolnce) -+ -+c bypass calculations if converged -+ -+ if(.not.safep)then -+ -+ do k=1,nspmf -+ -+ dsq=dxt(k)**2+dyt(k)**2+dzt(k)**2 -+ gamma=(omega2-dsq)/(-(amt(2)-amt(1))* -+ x (dxp(k)*dxt(k)+dyp(k)*dyt(k)+dzp(k)*dzt(k))) -+ -+c accumulate pmf virial -+ -+ virpmf=virpmf+gamma*(dxp(k)**2+dyp(k)**2+dzp(k)**2) -+ -+ strs1=strs1-gamma*dxp(k)*dxp(k) -+ strs2=strs2-gamma*dxp(k)*dyp(k) -+ strs3=strs3-gamma*dxp(k)*dzp(k) -+ strs5=strs5-gamma*dyp(k)*dyp(k) -+ strs6=strs6-gamma*dyp(k)*dzp(k) -+ strs9=strs9-gamma*dzp(k)*dzp(k) -+ -+c improve approximate atomic positions and velocities -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ gammi=-0.5d0*gamma*amt(ipmf) -+ -+ do i1=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i=lstpmf(jj,k) -+ -+ xxx(i)=xxx(i)+dxp(k)*gammi -+ yyy(i)=yyy(i)+dyp(k)*gammi -+ zzz(i)=zzz(i)+dzp(k)*gammi -+ vxx(i)=vxx(i)+dxp(k)*gammi/tstep -+ vyy(i)=vyy(i)+dyp(k)*gammi/tstep -+ vzz(i)=vzz(i)+dzp(k)*gammi/tstep -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ strpmf(1)=strs1 -+ strpmf(2)=strs2 -+ strpmf(3)=strs3 -+ strpmf(4)=strs2 -+ strpmf(5)=strs5 -+ strpmf(6)=strs6 -+ strpmf(7)=strs3 -+ strpmf(8)=strs6 -+ strpmf(9)=strs9 -+ -+c splice coordinate and velocity arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=virpmf -+ call gdsum(buffer(1),1,buffer(2)) -+ virpmf=buffer(1) -+ call gdsum(strpmf,9,buffer) -+ call splice -+ x (idnode,natms,listpm,lstpmt,xxx,yyy,zzz,buffer) -+ call splice -+ x (idnode,natms,listpm,lstpmt,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+ return -+ end subroutine pmf_rattle_r -+ -+ subroutine pmf_rattle_v -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce,summas, -+ x dxp,dyp,dzp,vxt,vyt,vzt,vxa,vya,vza,vxp,vyp,vzp) -+ -+c*********************************************************************** -+c -+c dlpoly constraint subroutine for potential of mean force calc. -+c accumulates velocity correction for second constraint condition -+c velocity verlet adaptation -+c -+c assume bond vectors dxp,dyp,dzp are input -+c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc -+c -+c copyright daresbury laboratory -+c author w.smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safep,img -+ integer idnode,mxnode,imcon,natms,nspmf,icyc,k,jj -+ integer i1,i,ipmf -+ real(8) tstep,tolnce,summas,gamma,vxt,vyt,vzt,vxa,vya,vza -+ real(8) vxp,vyp,vzp,dxp,dyp,dzp,amt,omega,eps,gammi,tolvel -+ -+ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) -+ dimension vxp(mspmf),vyp(mspmf),vzp(mspmf) -+ dimension vxt(mxatms),vyt(mxatms),vzt(mxatms) -+ dimension vxa(2,mspmf),vya(2,mspmf),vza(2,mspmf) -+ dimension amt(2),summas(2) -+ -+c constraint convergence tolerance -+ -+ tolvel=tolnce/tstep -+ -+c array bound check -+ -+ if(mxcons.lt.nspmf) call error(idnode,492) -+ if(mspmf .lt.nspmf) call error(idnode,458) -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ img=.false. -+ safep=.false. -+ amt(1)= 0.5d0*tstep/summas(1) -+ amt(2)=-0.5d0*tstep/summas(2) -+ -+ do while(.not.safep.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,vxx,vyy,vzz,vxt,vyt,vzt,vxa,vya,vza, -+ x vxp,vyp,vzp) -+ -+c check convergence -+ -+ eps=0.d0 -+ do k=1,nspmf -+ -+ omega=dxp(k)*vxp(k)+dyp(k)*vyp(k)+dzp(k)*vzp(k) -+ eps=max(eps,abs(omega)/prmpmf) -+ -+ enddo -+ -+c verification of convergence -+ -+ safep=(eps.lt.tolvel) -+ -+c bypass calculations if converged -+ -+ if(.not.safep)then -+ -+ do k=1,nspmf -+ -+ omega=dxp(k)*vxp(k)+dyp(k)*vyp(k)+dzp(k)*vzp(k) -+ gamma=omega/((amt(2)-amt(1))* -+ x (dxp(k)**2+dyp(k)**2+dzp(k)**2)) -+ -+c improve approximate atomic velocities -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ gammi=-gamma*amt(ipmf) -+ -+ do i1=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i=lstpmf(jj,k) -+ -+ vxx(i)=vxx(i)+dxp(k)*gammi -+ vyy(i)=vyy(i)+dyp(k)*gammi -+ vzz(i)=vzz(i)+dzp(k)*gammi -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c splice velocity arrays across nodes -+ -+ if(mxnode.gt.1)call splice -+ x (idnode,natms,listpm,lstpmt,vxx,vyy,vzz,buffer) -+ -+ return -+ end subroutine pmf_rattle_v -+ -+ end module pmf_module -diff -urN dl_class_1.9.orig/srcmod/property_module.f dl_class_1.9/srcmod/property_module.f ---- dl_class_1.9.orig/srcmod/property_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/property_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1318 @@ -+ module property_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining simulation property data -+c copyright - daresbury laboratory -+c author - w. smith nov 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use pair_module -+ use setup_module -+ use site_module -+ use tether_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ real(8), allocatable :: rdf(:,:),zdens(:,:) -+ real(8), allocatable :: stpval(:),sumval(:) -+ real(8), allocatable :: ssqval(:),zumval(:) -+ real(8), allocatable :: ravval(:),stkval(:,:) -+ real(8), allocatable :: xx0(:),yy0(:),zz0(:) -+ real(8), allocatable :: amsd(:) -+ -+ save rdf,zdens,stpval,sumval,ssqval,xx0,yy0,zz0 -+ save zumval,ravval,stkval -+ -+ contains -+ -+ subroutine alloc_prp_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=6 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (zdens(mxzdn,mxatyp),stat=fail(1)) -+ allocate (rdf(mxrdf,mxxtyp),amsd(mxatyp),stat=fail(2)) -+ allocate (stpval(mxnstk),sumval(mxnstk),stat=fail(3)) -+ allocate (ssqval(mxnstk),zumval(mxnstk),stat=fail(4)) -+ allocate (ravval(mxnstk),stkval(mxstak,mxnstk),stat=fail(5)) -+ allocate (xx0(mxatms),yy0(mxatms),zz0(mxatms),stat=fail(6)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1740) -+ enddo -+ -+ end subroutine alloc_prp_arrays -+ -+ subroutine result -+ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, -+ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit,conint, -+ x rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost,chit_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing simulation summary and -+c saving the restart data -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith dec 1992. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 hms,dec -+ logical lgofr,lpgr,lzden,check,ltad,lbpd,goprint -+ -+ integer idnode,imcon,keyens,mxnode,natms,nzden,nstep,ntpatm -+ integer levcfg,numacc,numrdf,keybpd,i,iadd,io,j -+ real(8) chip,chit,conint,rcut,tstep,volm,timelp,avvol,zlen,dc -+ real(8) engcfg,virtot,vircom,prntim,simtim,tboost,chit_shl -+ -+c save restart data -+ -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+c for TAD and BPD system averages not generally meaningful -+c useful only for BPD in configurational sampling mode -+ -+ goprint=.not.(ltad.or.(lbpd.and.keybpd.gt.1)) -+ -+ if(goprint)then -+ -+c calculate final fluctuations -+ -+ do i=1,mxnstk -+ ssqval(i)=sqrt(max(0.d0,ssqval(i))) -+ enddo -+ -+c final averages and fluctuations -+ -+ call timchk(0,timelp) -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'run terminated after',i8,' steps.', -+ x ' final averages calculated over',i8,' steps.',/,/)") -+ x nstep,numacc -+ write(nrite,"(1x,120('-'), -+ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x,'eng_cfg', -+ x 5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd',5x,'eng_ang',5x, -+ x 'eng_dih',5x,'eng_tet',/,1x,'time ',5x,' eng_pv',4x, -+ x 'temp_rot',5x,'vir_cfg',5x,'vir_vdw',5x,'vir_cou',5x, -+ x 'vir_bnd',5x,'vir_ang',5x,'vir_con',5x,'vir_tet',/, -+ x 1x,'cpu time',6x,'volume',4x,'temp_shl',5x,'eng_shl', -+ x 5x,'vir_shl',7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', -+ x 7x,'press',/,/, -+ x 1x,120('-'))") -+ -+ call get_prntime(hms,timelp,prntim) -+ call get_simtime(dec,nstep,tstep,simtim) -+ write(nrite,'(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, -+ x /,1x,0p,f7.3,a1,1p,9e12.4)') -+ x nstep,(sumval(i),i=1,9), -+ x simtim,dec,(sumval(i),i=10,18), -+ x prntim,hms,(sumval(i),i=19,27) -+ write(nrite,"(/,1x,' r.m.s. ',1p,9e12.4,/,1x,'fluctn. ', -+ x 1p,9e12.4,/,9x,9e12.4)") (ssqval(i),i=1,27) -+ write(nrite,"(1x,120('-'))") -+ -+c write out bias potential boost factor -+ -+ if(lbpd)write(nrite,"(/,/,1x, -+ x 'calculated bias potential boost factor',1p,e16.8)")tboost -+ -+ if(numacc.gt.0)then -+ iadd=27 -+ -+c write out estimated diffusion coefficients -+ -+ if(numacc.gt.0)then -+ -+ write(nrite,"(/,/,12x,'Approximate 3D Diffusion', -+ x ' coefficients (10^-9 m^2 / s)',/,/,12x,'atom',7x, -+ x ' D ')") -+ -+ do i=1,ntpatm -+ -+ iadd=iadd+1 -+ dc=(ravval(iadd)-sumval(iadd))/ -+ x (3.d0*dble(numacc-min(mxnstk,numacc-1))*tstep)*10.d0 -+ if(dc.lt.1d-10) dc=0.d0 -+ if(lbpd)dc=dc/tboost -+ write(nrite,'(12x,a8,1p,e13.4)') unqatm(i),dc -+ -+ enddo -+ -+ endif -+ -+c print out average pressure tensor -+ -+ write(nrite,"(/,/,16x,'Average pressure tensor', -+ x 39x,'r.m.s. fluctuations ',/)") -+ -+ do i=iadd,iadd+6,3 -+ write(nrite,'(9x,1p,3e12.4,24x,3e12.4)') -+ x (sumval(i+j),j=1,3),(ssqval(i+j),j=1,3) -+ enddo -+ iadd=iadd+9 -+ -+ write(nrite,'(/,12x,a,1p,e12.4)') 'trace/3. ', -+ x (sumval(iadd)+sumval(iadd-4)+sumval(iadd-8))/3.d0 -+ -+c write out mean cell vectors for npt -+ -+ if(keyens.gt.3.and.(keyens.le.7))then -+ -+ write(nrite,"(/,/,17x,'Average cell vectors', -+ x 41x,'r.m.s. fluctuations ',/)") -+ -+ do i=iadd,iadd+6,3 -+ write(nrite,'(3f20.10,9x,1p,3e12.4)') -+ x (sumval(i+j),j=1,3),(ssqval(i+j),j=1,3) -+ enddo -+ iadd=iadd+9 -+ -+ endif -+ -+c write out remaining registers -+ -+ check=.false. -+ do i=iadd+1,mxnstk -+ -+ if((abs(sumval(i)).gt.1.d-10).or. -+ x (abs(ssqval(i)).gt.1.d-10)) check=.true. -+ -+ enddo -+ -+ if(check)then -+ -+ write(nrite,"(/,/,12x, -+ x 'Remaining non-zero statistics registers ',/,/,12x, -+ x 'Register',7x,'Average value',8x,'r.m.s. fluc.')") -+ -+ do i=iadd+1,mxnstk -+ -+ if((abs(sumval(i)).gt.1.d-10).or. -+ x (abs(ssqval(i)).gt.1.d-10)) -+ x write(nrite,'(10x,i10,2f20.10)') i,sumval(i),ssqval(i) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c print out sample of final configuration -+ -+ write(nrite,"(/,/,1x,'sample of final configuration',/)") -+ write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',7x,'fx(i)',7x, -+ x 'fy(i)',7x,'fz(i)',/,/)") -+ io=(natms+19)/20 -+ -+ do i=1,natms,io -+ -+ write(nrite,"(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i), -+ x fxx(i),fyy(i),fzz(i) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c bypass printing averages for certain tad and bpd options -+ -+ if(goprint)then -+ -+c average volume -+ -+ avvol=sumval(19) -+ if(imcon.eq.0.or.imcon.eq.6)then -+ avvol=4.d0*pi/3.d0*rcut**3 -+ volm=avvol -+ endif -+ -+c calculate and print radial distribution functions -+ -+ if(lgofr.and.lpgr.and.(numrdf.gt.0))then -+ -+c scale densities for average volume -+ -+ do i=1,ntpatm -+ dens(i)=dens(i)*(volm/avvol) -+ enddo -+ -+ call rdf1 -+ x (lpgr,idnode,mxnode,ntpatm,numrdf,avvol,rcut) -+ -+ endif -+ -+ if(lzden.and.lpgr.and.(nzden.gt.0))then -+ call zden1(lpgr,idnode,mxnode,ntpatm,nzden,avvol,zlen) -+ endif -+ -+ if(imcon.eq.0)volm=0.d0 -+ -+ endif -+ -+c print final time check -+ -+ call timchk(1,timelp) -+ -+ return -+ end subroutine result -+ -+ subroutine diffsn0(idnode,natms,mxnode,tstep) -+ -+c*********************************************************************** -+c -+c DL_POLY routine for calculating displacements of sites from -+c t=0 positions -+c -+c use diffsn1 for mean squared displacements -+c -+c parallel version - replicated data. -+c -+c copyright daresbury laboratory 1993 -+c -+c author - t. forester june 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,natms,mxnode,iatm1,iatm2,i -+ real(8) tstep -+ -+ save newjob,iatm1,iatm2 -+ data newjob/.true./ -+ -+ if(newjob)then -+ -+ newjob=.false. -+ iatm1=(idnode*natms)/mxnode+1 -+ iatm2=((idnode+1)*natms)/mxnode -+ -+ endif -+ -+ do i=iatm1,iatm2 -+ -+ xx0(i)=xx0(i)+vxx(i)*tstep -+ yy0(i)=yy0(i)+vyy(i)*tstep -+ zz0(i)=zz0(i)+vzz(i)*tstep -+ -+ enddo -+ -+ return -+ end subroutine diffsn0 -+ -+ subroutine diffsn1(idnode,natms,ntpatm,mxnode) -+ -+c*********************************************************************** -+c -+c DL_POLY routine for calculating mean squared displacements -+c -+c displacements calculated in diffsn0 -+c -+c parallel version - replicated data. -+c -+c copyright daresbury laboratory 1993 -+c -+c author - t. forester june 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,natms,ntpatm,mxnode,iatm1,iatm2,k,i -+ -+ save newjob,iatm1,iatm2 -+ -+ data newjob/.true./ -+ -+ if(newjob)then -+ -+ newjob=.false. -+ iatm1=(idnode*natms)/mxnode+1 -+ iatm2=((idnode+1)*natms)/mxnode -+ -+ endif -+ -+c running sum of squared displacements -+ -+ do k=1,ntpatm -+ -+ amsd(k)=0.d0 -+ -+ enddo -+ -+c calculate square of displacements for each atom type -+ -+ do i=iatm1,iatm2 -+ -+ k=ltype(i) -+ amsd(k)=amsd(k)+xx0(i)**2+yy0(i)**2+zz0(i)**2 -+ -+ enddo -+ -+c global sum - replicated data strategy -+ -+ if(mxnode.gt.1)then -+ -+ do k=1,ntpatm -+ -+ buffer(k+ntpatm)=amsd(k) -+ -+ enddo -+ -+ call gdsum(buffer(1+ntpatm),ntpatm,buffer(1)) -+ -+ do k=1,ntpatm -+ -+ amsd(k)=buffer(k+ntpatm) -+ -+ enddo -+ -+ endif -+ -+c mean squared displacement -+ -+ do k=1,ntpatm -+ -+ amsd(k)=amsd(k)/dble(max(numtyp(k),1)) -+ -+ enddo -+ -+ return -+ end subroutine diffsn1 -+ -+ subroutine rdf0(iatm,ik,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for accumulating statistic for radial -+c distribution functions. -+c double precision accumulators -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer iatm,ik,m,jatm,ll,k -+ real(8) rcut,rcsq,rdelr,ai,aj,rsq,rrr -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut*rcut -+ -+c grid interval for rdf tables -+ -+ rdelr=dble(mxrdf)/rcut -+ -+c set up atom iatm type -+ -+ ai=ltype(iatm) -+ -+c start of primary loop for rdf accumulation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ jatm=ilist(m) -+ -+ aj=ltype(jatm) -+ if(ai.gt.aj)then -+ k=int(ai*(ai-1.d0)*0.5d0+aj+0.5d0) -+ else -+ k=int(aj*(aj-1.d0)*0.5d0+ai+0.5d0) -+ endif -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ ll=int(rrr*rdelr+0.999999d0) -+ -+c accumulate statistics -+ -+ if(ll.le.mxrdf)rdf(ll,k)=rdf(ll,k)+1.d0 -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine rdf0 -+ -+ subroutine rdf1 -+ x (lpgr,idnode,mxnode,ntpatm,numrdf,volm,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating radial distribution functions -+c from accumulated data. -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,ntpatm,numrdf,ia,ib,k,j -+ real(8) volm,factor,sum,rrr,dvol,gofr,rcut,delrdf -+ -+ logical lpgr,zero -+ -+ if(idnode.eq.0) write(nrite, -+ x "(/,/,12X,'RADIAL DISTRIBUTION FUNCTIONS',/,/, -+ x 'calculated using ',i10,' configurations')") numrdf -+ -+ if(lpgr)then -+ -+c open RDF file and write headers -+ -+ if(idnode.eq.0)then -+ -+ open(nrdfdt,file='RDFDAT') -+ -+ write(nrdfdt,'(80a1)')cfgname -+ write(nrdfdt,'(2i10)')mxxtyp,mxrdf -+ -+ endif -+ -+c default bin width -+ -+ delrdf=rcut/dble(mxrdf) -+ -+c construct rdf tables -+ -+ do ia=1,ntpatm -+ -+ do ib=ia,ntpatm -+ -+ k=(ib*(ib-1))/2+ia -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,'g(r) :',2a8,/,/,8x,'r',6x,'g(r)',9x,'n(r)',/)") -+ x unqatm(ia),unqatm(ib) -+ write(nrdfdt,'(2a8)')unqatm(ia),unqatm(ib) -+ -+ endif -+ -+c global sum of data on all nodes -+ -+ if(mxnode.gt.1) call gdsum(rdf(1,k),mxrdf,buffer) -+ -+c normalisation factor -+ -+ factor=volm*dens(ia)*dens(ib)*dble(numrdf) -+ if((ia.eq.ib).and.(volm*dens(ia).gt.1.d0)) -+ x factor=factor*0.5d0 -+ -+c running integration of rdf -+ -+ sum=0.d0 -+ -+c loop over distances -+ -+ zero=.true. -+ -+ do j=1,mxrdf -+ -+ if(zero.and.(j.lt.mxrdf-3)) -+ x zero=(rdf(j+2,k).le.0.d0) -+ -+ rrr=(dble(j)-0.5d0)*delrdf -+ dvol=4.d0*pi*(delrdf*rrr*rrr+(delrdf**3)/12.d0) -+ -+ gofr=rdf(j,k)/(factor*dvol) -+ sum=sum+gofr*dvol*dens(ib) -+ -+c print out information -+ -+ if(idnode.eq.0)then -+ -+ write(nrdfdt,"(1p,2e14.6)")rrr,gofr -+ if(.not.zero) -+ x write(nrite,"(f10.4,1p,2e14.6)")rrr,gofr,sum -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ if(idnode.eq.0)close (nrdfdt) -+ -+ endif -+ -+ return -+ end subroutine rdf1 -+ -+ subroutine static -+ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, -+ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, -+ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, -+ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, -+ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, -+ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, -+ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, -+ x virmet,engter,virter,boost,tboost) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for accumulating periodic data during the -+c molecular dynamics simulation and computing the rolling averages -+c -+c copyright daresbury laboratory 1992 -+c -+c author - w. smith august 1992 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lbpd,lzeql,newjob -+ integer idnode,intsta,imcon,keyens,natms,nstack,nstep,j -+ integer nsteql,ntpatm,numacc,mxnode,i,iadd,k,kstak -+ integer nblock,keybpd,numbpd -+ real(8) consv,degfre,degrot,engang,engbnd,engcpe,engdih -+ real(8) enginv,engke,engrot,engsrp,engunit,engcfg,stpeng -+ real(8) stpeth,stpprs,stptmp,stpvir,stpvol,tstep,virbnd -+ real(8) engfbp,vircom,vircon,vircpe,virsrp,engfld,virfld -+ real(8) engtbp,virtbp,virpmf,virshl,engshl,engtet,virtet -+ real(8) degshl,shlke,virang,width,sclnv1,sclnv2,stprot -+ real(8) stpcns,stpshl,zistk,engmet,virmet,engter,virter -+ real(8) tbold,aterm,bterm,cterm,boost,tboost -+ -+ save newjob -+ -+ data newjob/.true./ -+ -+c open statistics file for append -+ -+ if(newjob.and.idnode.eq.0.and.intsta.gt.0)then -+ -+ open(nstats,file='STATIS',position='append') -+ newjob=.false. -+ -+ endif -+ -+ if(idnode.eq.0.and.nstep.eq.intsta.and.intsta.gt.0)then -+ -+ write(nstats,'(80a1)') cfgname -+ if(abs(engunit-9648.530821d0).le.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=electron Volts ')") -+ if(abs(engunit-9648530.821d0).le.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=kilo electron Volts ')") -+ if(abs(engunit-418.4d0).le.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=kcal/mol ')") -+ if(abs(engunit-1.d2).le.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=kjoule/mol ')") -+ if(abs(engunit-boltz).lt.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=kelvin ')") -+ if(abs(engunit-1.d0).lt.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=DL_POLY Internal Units ')") -+ -+ endif -+ -+c calculate cell volume and minimum cell half-width -+ -+ if(imcon.eq.0)then -+ -+ width=0.d0 -+ -+ stpvol=0.d0 -+ do i=1,10 -+ celprp(i)=0.d0 -+ enddo -+ -+ else -+ -+ call dcell(cell,celprp) -+ stpvol=celprp(10) -+ width=min(celprp(7),celprp(8),celprp(9))/2.d0 -+ -+ if(imcon.eq.4)then -+ -+ stpvol=0.5d0*celprp(10) -+ width=sqrt(3.d0)*cell(1)/4.d0 -+ -+ elseif(imcon.eq.5)then -+ -+ stpvol=0.5d0*celprp(10) -+ width=cell(1)/2.d0 -+ -+ elseif(imcon.eq.6)then -+ -+ width=min(celprp(7),celprp(8))/2.d0 -+ -+ elseif(imcon.eq.7)then -+ -+ stpvol=0.5d0*celprp(10) -+ -+ endif -+ -+ endif -+ -+c energetic properties of system -+ -+ stpvir=virsrp+vircpe+virbnd+vircon+vircom+virtbp+virang -+ x +virshl+virtet+virter+virmet+virfld -+ stpeng=engcfg+engke+engrot -+ stprot=2.d0*engrot/(boltz*max(1.d0,degrot)) -+ stpshl=2.d0*shlke/(boltz*max(1.d0,degshl)) -+ stptmp=2.d0*(engke+engrot)/(boltz*degfre) -+ stpprs=0.d0 -+ if(imcon.gt.0)stpprs=(2.d0*engke-stpvir)/(3.d0*stpvol) -+ stpeth=stpeng+stpprs*stpvol -+ stpcns=stpeng+consv -+ -+c convert pressure to units of katm -+ -+ stpprs=stpprs*prsunt -+ -+c calculate mean squared displacements -+c atomic displacements from origin of production run -+ -+ if((.not.lzeql).or.(nstep.gt.nsteql))then -+ -+ call diffsn0(idnode,natms,mxnode,tstep) -+ call diffsn1(idnode,natms,ntpatm,mxnode) -+ -+ endif -+ -+c zero statistics arrays -+ -+ if((nstep.le.0).or.(numacc.eq.0))then -+ -+ numacc=0 -+ -+ do i=1,mxnstk -+ -+ stpval(i)=0.d0 -+ sumval(i)=0.d0 -+ ssqval(i)=0.d0 -+ -+ enddo -+ -+ do i=1,mxatms -+ -+ xx0(i)=0.d0 -+ yy0(i)=0.d0 -+ zz0(i)=0.d0 -+ -+ enddo -+ -+ endif -+ -+c store current values in statistics array -+ -+ stpval(1) =stpcns/engunit -+ stpval(2) =stptmp -+ stpval(3) =engcfg/engunit -+ stpval(4) =(engsrp+engmet+engter)/engunit -+ stpval(5) =engcpe/engunit -+ stpval(6) =engbnd/engunit -+ stpval(7) =(engang+engtbp)/engunit -+ stpval(8) =(engdih+enginv+engfbp)/engunit -+ stpval(9) =engtet/engunit -+ stpval(10)=stpeth/engunit -+ stpval(11)=stprot -+ stpval(12)=stpvir/engunit -+ stpval(13)=(virsrp+virmet+virter)/engunit -+ stpval(14)=vircpe/engunit -+ stpval(15)=virbnd/engunit -+ stpval(16)=(virtbp+virang)/engunit -+ stpval(17)=vircon/engunit -+ stpval(18)=virtet/engunit -+ stpval(19)=stpvol -+ stpval(20)=stpshl -+ stpval(21)=engshl/engunit -+ stpval(22)=virshl/engunit -+ stpval(23)=acos(celprp(6))*180.d0/pi -+ stpval(24)=acos(celprp(5))*180.d0/pi -+ stpval(25)=acos(celprp(4))*180.d0/pi -+ stpval(26)=virpmf/engunit -+ stpval(27)=stpprs -+ -+ iadd=27 -+ -+c mean squared displacements -+ -+ if((.not.lzeql).or.(nstep.gt.nsteql))then -+ -+ do k=1,ntpatm -+ -+ stpval(iadd+k)=amsd(k) -+ -+ enddo -+ -+ endif -+ -+ iadd=iadd+ntpatm -+ -+c stress tensor -+ -+ if(abs(stpvol).le.1.d-10) stpvol=1.d0 -+ do i=1,9 -+ stpval(iadd+i)=stress(i)*prsunt/(stpvol) -+ enddo -+ iadd=iadd+9 -+ -+c cell vectors -+ -+ if(keyens.gt.3.and.(keyens.le.7))then -+ do i=1,9 -+ stpval(iadd+i)=cell(i) -+ enddo -+ iadd=iadd+9 -+ endif -+ -+c check on number of variables for stack - -+ -+ if(iadd.gt.mxnstk) call error(idnode,170) -+ -+c accumulate totals over steps -+ -+ numacc=numacc+1 -+ sclnv2=1.d0/dble(numacc) -+ sclnv1=dble(numacc-1)/dble(numacc) -+ -+ if(lbpd.and.keybpd.eq.1)then -+ -+c calculate true thermodynamic averages in bias potential system -+c note integers numacc and numbpd should be equal in this case -+ -+ tbold=tboost*dble(numbpd)/dble(numbpd-1)-boost/dble(numbpd-1) -+ cterm=0.d0 -+ do i=1,mxnstk -+ -+ aterm=sumval(i)*tbold -+ bterm=ssqval(i)*tbold**2 -+ if(tbold.gt.0.d0)cterm=(bterm+aterm**2)/tbold -+ ssqval(i)=(sclnv1*(sclnv1*bterm+boost*sclnv2*(cterm+ -+ x (tbold*stpval(i)-2.d0*aterm)*stpval(i))))/tboost**2 -+ sumval(i)=(sclnv1*aterm+boost*sclnv2*stpval(i))/tboost -+ -+ enddo -+ -+ else -+ -+c calculate true thermodynamic averages in normal system -+ -+ do i=1,mxnstk -+ -+ ssqval(i)=sclnv1*(ssqval(i)+sclnv2*(stpval(i)-sumval(i))**2) -+ sumval(i)=sclnv1*sumval(i)+sclnv2*stpval(i) -+ -+ enddo -+ -+ endif -+ -+c write statistics file -+ -+ if(idnode.eq.0.and.intsta.gt.0)then -+ -+ if(mod(nstep,intsta).eq.0)then -+ -+ write(nstats,'(i10,1p,e14.6,0p,i10,/,(1p,5e14.6))') -+ x nstep,nstep*tstep,iadd,(stpval(k),k=1,iadd) -+ call flush(nstats) -+c$$$c write option for Excel spreadsheet -+c$$$ write(nstats,'(i10,1p,e14.6,0p,i10,300(1p,5e14.6))') -+c$$$ x nstep,nstep*tstep,iadd,(stpval(k),k=1,iadd) -+ -+ endif -+ -+ endif -+ -+c zero rolling average accumulators -+ -+ if(nstep.le.0)then -+ -+ numacc=0 -+ -+ do i=1,mxnstk -+ -+ zumval(i)=0.d0 -+ -+ do j=1,mxstak -+ -+ stkval(j,i)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c store quantities in stack -+ -+ kstak=mod(nstep-1,nstack)+1 -+ -+ if(nstep.gt.nstack)then -+ -+ do i=1,mxnstk -+ -+ zumval(i)=zumval(i)-stkval(kstak,i) -+ -+ enddo -+ -+ endif -+ -+ do i=1,mxnstk -+ -+ stkval(kstak,i)=stpval(i) -+ zumval(i)=zumval(i)+stpval(i) -+ -+ enddo -+ -+c calculate rolling averages -+ -+ zistk=min(nstack,nstep) -+ -+ do i=1,mxnstk -+ -+ ravval(i)=zumval(i)/zistk -+ -+ enddo -+ -+c zero accumulators during equilibration period -+ -+ if(lzeql.and.nstep.le.nsteql)then -+ -+ numacc=0 -+ do i=1,mxnstk -+ -+ sumval(i)=0.d0 -+ ssqval(i)=0.d0 -+ -+ enddo -+ -+ endif -+ -+c close statistics file at regular intervals -+ -+ if(.not.newjob.and.mod(nstep,ndump).eq.0)then -+ -+ if(idnode.eq.0)close (nstats) -+ newjob=.true. -+ -+ endif -+ -+ return -+ end subroutine static -+ -+ subroutine revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing restart files at job termination -+c or at selected intervals in simulation -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith dec 1992. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzden -+ integer idnode,imcon,mxnode,natms,nstep,nzden,numacc,numrdf -+ integer levcfg,nsum,nbuff,i,j -+ real(8) chip,chit,conint,tstep,engcfg,rmxnode,virtot,vircom -+ real(8) tboost,chit_shl -+ -+ if(mxnode.gt.1)then -+ -+c merge displacement data -+ -+ call merge(idnode,mxnode,natms,mxbuff,xx0,yy0,zz0,buffer) -+ -+c globally sum rdf information before saving -+ -+ if(lgofr)then -+ -+c maximum rdfs that can be summed in each step -+ -+ nsum=mxbuff/mxrdf -+ if(nsum.eq.0) call error(idnode,200) -+ -+ nbuff=nsum*mxrdf -+ -+ do i=1,mxxtyp,nsum -+ -+ if((mxxtyp+1-i).lt.nsum) nbuff=(mxxtyp+1-i)*mxrdf -+ call gdsum(rdf(1,i),nbuff,buffer) -+ -+ enddo -+ -+ endif -+ -+c globally sum zden information before saving -+ -+ if(lzden)then -+ -+c maximum zdfs that can be summed in each step -+ -+ nsum=mxbuff/mxzdn -+ if(nsum.eq.0) call error(idnode,200) -+ -+ nbuff=nsum*mxzdn -+ -+ do i =1,mxatyp,nsum -+ -+ if((mxatyp+1-i).lt.nsum) nbuff=(mxatyp+1-i)*mxzdn -+ call gdsum(zdens(1,i),nbuff,buffer) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c node 0 handles i/o -+ -+ if(idnode.eq.0)then -+ -+c write configuration data to new configuration file -+ -+ call config_write('REVCON',levcfg,imcon,natms,engcfg) -+ -+c write accumulator data to dump file -+ -+ open(nrest,file='REVIVE',form='unformatted') -+ -+ write(nrest) dble(nstep),dble(numacc),dble(numrdf),chit, -+ x chip,conint,dble(nzden),tboost,chit_shl -+ write(nrest) virtot,vircom,eta,strcns,strbod -+ write(nrest) stpval -+ write(nrest) sumval -+ write(nrest) ssqval -+ write(nrest) zumval -+ write(nrest) ravval -+ write(nrest) stkval -+ write(nrest) xx0,yy0,zz0 -+ write(nrest) xxs,yys,zzs -+ if(lgofr) write(nrest) rdf -+ if(lzden) write(nrest) zdens -+ -+ close (nrest) -+ -+ endif -+ -+c divide rdf data between nodes -+ -+ rmxnode=1.d0/dble(mxnode) -+ -+ if(lgofr)then -+ -+ do i=1,mxxtyp -+ -+ do j=1,mxrdf -+ -+ rdf(j,i)=rdf(j,i)*rmxnode -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c divide zdensity data between nodes -+ -+ if(lzden)then -+ -+ do i=1,mxatyp -+ -+ do j=1,mxzdn -+ -+ zdens(j,i)=zdens(j,i)*rmxnode -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine revive -+ -+ subroutine zden0(idnode,natms,mxnode,nzden,zlen) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for accumulating statistic for density profile -+c zlen=length of cell in z direction -+c -+c double precision accumulators -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nzden,iatm,ll,k -+ real(8) zlen,zleno2,rzdn -+ -+c accumulator -+ -+ nzden=nzden+1 -+ -+c half of z length -+ -+ zleno2=zlen*0.5d0 -+ -+c grid interval for density profiles -+ -+ rzdn=dble(mxzdn)/zlen -+ -+c set up atom iatm type -+ -+ do iatm=idnode+1,natms,mxnode -+ -+ k =ltype(iatm) -+ -+ ll=int((zzz(iatm)+zleno2)*rzdn+1.0d0) -+ -+c accumulate statistic -+ -+ if(ll.gt.0.and.ll.le.mxzdn)zdens(ll,k)=zdens(ll,k)+1.d0 -+ -+ enddo -+ -+ return -+ end subroutine zden0 -+ -+ subroutine zden1 -+ x (lpgr,idnode,mxnode,ntpatm,nzden,volm,zlen) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating Z density profile -+c from accumulated data. -+c double precision version -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lpgr -+ integer idnode,mxnode,ntpatm,nzden,k,j -+ real(8) volm,zlen,delzdn,dvolz,factor,sum,rrr,rho -+ -+ if(idnode.eq.0) write(nrite, -+ x "(/,/,12X,'Z DENSITY PROFILES',/,/, -+ x 'calculated using ',i10,' configurations')") nzden -+ -+ if(lpgr)then -+ -+c open Z density file and write headers -+ -+ if(idnode.eq.0)then -+ -+ open(nzdndt,file='ZDNDAT') -+ -+ write(nzdndt,'(80a1)')cfgname -+ write(nzdndt,'(2i10)')ntpatm,mxzdn -+ -+ endif -+ -+c volume of z strip (arbitrary) -+ -+ delzdn=zlen/dble(mxzdn) -+ dvolz=(volm/zlen)*delzdn -+ -+c normalisation factor -+ -+ nzden=max(nzden,1) -+ factor=1.d0/(dble(nzden)*dvolz) -+ -+ do k=1,ntpatm -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,'rho(r) :',a8,/,/,8x,'r',6x,'rho',9x,'n(r)',/)") -+ x unqatm(k) -+ write(nzdndt,'(a8)')unqatm(k) -+ -+ endif -+ -+c global sum of data on all nodes -+ -+ if(mxnode.gt.1)call gdsum(zdens(1,k),mxzdn,buffer) -+ -+c running integration of z-density -+ -+ sum=0.d0 -+ -+c loop over distances -+ -+ do j=1,mxzdn -+ -+ rrr=(dble(j)-0.5d0)*delzdn-zlen*0.5d0 -+ rho=zdens(j,k)*factor -+ sum=sum+rho*dvolz -+ -+c print out information -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(f10.4,1p,2e14.6)") rrr,rho,sum -+ write(nzdndt,"(1p,2e14.6)") rrr,rho -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ if(idnode.eq.0)close (nzdndt) -+ -+ endif -+ -+ return -+ end subroutine zden1 -+ -+ subroutine rdf0neu(ik,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for accumulating statistic for radial -+c distribution functions. -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c amended t. forester april 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer ik,m,iatm,jatm,ll,k -+ real(8) rcut,a0,a1,a2,a3,a4,a5,rcsq,rrcsq,sqlim,rdelr -+ real(8) ai,aj,rsq,rrr,sss -+ -+ data a0,a1,a2,a3,a4,a5/.0837557783d0,2.9399054d0,-7.8475201d0, -+ x 14.1328992d0,-12.6228528d0,4.32084948d0/ -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ rrcsq=1.d0/rcsq -+ sqlim=0.01d0*rcsq -+ -+c grid interval for rdf tables -+ -+ rdelr=dble(mxrdf)/rcut -+ -+c start of primary loop for rdf accumulation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ iatm=ilist(m) -+ ai=ltype(iatm) -+ -+ jatm=jlist(m) -+ aj=ltype(jatm) -+ -+ if(ai.gt.aj)then -+ ll=int(ai*(ai-1.d0)*0.5d0+aj+0.5d0) -+ k=lstvdw(ll) -+ else -+ ll=int(aj*(aj-1.d0)*0.5d0+ai+0.5d0) -+ k=lstvdw(ll) -+ endif -+ -+ rsq=rsqdf(m) -+ -+ if(rcsq.gt.rsq)then -+ -+c determine interpolation panel for rdf table -+ -+ if(rsq.lt.sqlim)then -+ -+ rrr=sqrt(rsq) -+ -+ else -+ -+c interpolate square-root by polynomial plus newton-raphson -+ -+ sss=rsq*rrcsq -+ rrr=1.d0/ -+ x (a0 +sss*(a1+sss*(a2+sss*(a3+sss*(a4+sss*a5))))) -+ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr) -+ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr) -+ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr)*sss*rcut -+ -+ endif -+ -+ ll=int(rrr*rdelr+0.999999d0) -+ -+c accumulate statistics -+ -+ rdf(ll,k)=rdf(ll,k)+1.d0 -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine rdf0neu -+ -+ end module property_module -diff -urN dl_class_1.9.orig/srcmod/rigid_body_module.f dl_class_1.9/srcmod/rigid_body_module.f ---- dl_class_1.9.orig/srcmod/rigid_body_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/rigid_body_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,243 @@ -+ module rigid_body_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining rigid body arrays -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use parse_module -+ use setup_module -+ use site_module -+ use solvation_module -+ -+ implicit none -+ -+ real(8), allocatable :: omx(:),omy(:),omz(:) -+ real(8), allocatable :: gcmx(:),gcmy(:),gcmz(:) -+ real(8), allocatable :: gvxx(:),gvyy(:),gvzz(:),gmass(:) -+ real(8), allocatable :: q0(:),q1(:),q2(:),q3(:) -+ real(8), allocatable :: gxx(:,:),gyy(:,:),gzz(:,:) -+ real(8), allocatable :: rotinx(:,:),rotiny(:,:),rotinz(:,:) -+ integer, allocatable :: lstrgd(:),numgsit(:),lstgtp(:) -+ integer, allocatable :: listyp(:),lstgst(:,:),lstfre(:) -+ integer, allocatable :: lstme(:),lstbod(:),lstcsit(:) -+ -+ save omx,omy,omz,gcmx,gcmy,gcmz,gvxx,gvyy,gvzz,gmass -+ save q0,q1,q2,q3,gxx,gyy,gzz,rotinx,rotiny,rotinz -+ save lstrgd,numgsit,lstgtp,listyp,lstgst,lstfre,lstme -+ save lstbod,lstcsit -+ -+ contains -+ -+ subroutine alloc_rgbdy_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (omx(mxgrp),omy(mxgrp),omz(mxgrp),stat=fail(1)) -+ allocate (gcmx(mxgrp),gcmy(mxgrp),gcmz(mxgrp),stat=fail(2)) -+ allocate (gvxx(mxgrp),gvyy(mxgrp),gvzz(mxgrp),stat=fail(3)) -+ allocate (q0(mxgrp),q1(mxgrp),q2(mxgrp),q3(mxgrp),stat=fail(4)) -+ allocate (gxx(mxungp,mxngp),gyy(mxungp,mxngp),stat=fail(5)) -+ allocate (gzz(mxungp,mxngp),gmass(mxungp),stat=fail(6)) -+ allocate (rotinx(mxungp,2),rotiny(mxungp,2),stat=fail(7)) -+ allocate (rotinz(mxungp,2),lstgtp(mxgrp),stat=fail(8)) -+ allocate (lstrgd(mxgatm),numgsit(mxungp),stat=fail(9)) -+ allocate (listyp(mxungp),lstgst(mxungp,mxngp),stat=fail(10)) -+ allocate (lstfre(mxatms),lstme(mxatms),stat=fail(11)) -+ allocate (lstbod(mxatms),lstcsit(2*mxcons),stat=fail(12)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1013) -+ enddo -+ -+ end subroutine alloc_rgbdy_arrays -+ -+ subroutine define_rigid_body -+ x (safe,lghost,idnode,itmols,ngrp,natmsr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining rigid bodies -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c adapted - p-a cazade oct 2007, solvation, excitation etc. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lghost,site_test -+ integer idnode,itmols,ngrp,ntmp,idum,igrp -+ integer j,site,natmsr -+ -+ ngrp_ghost=0 -+ ntmp=intstr(record,lenrec,idum) -+ numgrp(itmols)=numgrp(itmols)+ntmp -+ if(idnode.eq.0) then -+ write(nrite,"(/,1x,'number of rigid units ', -+ x 6x,i10)") ntmp -+ write(nrite,"(/,' rigid body details:',/,/,21x, -+ x 6x,'unit',3x,'indices',/) ") -+ endif -+ -+ do igrp=1,numgrp(itmols) -+ -+ ngrp=ngrp+1 -+ site_test=.true. -+ -+ if(ngrp.gt.mxungp) call error(idnode,301) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ numgsit(ngrp)=intstr(record,lenrec,idum) -+ if(numgsit(ngrp).gt.mxngp) -+ x call error (idnode,302) -+ -+ listyp(ngrp)=ngrp -+ -+ do j=1,numgsit(ngrp) -+ -+ site=intstr(record,lenrec,idum) -+ -+ if(site.eq.0)then -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ site=intstr(record,lenrec,idum) -+ -+ endif -+ -+ lstgst(ngrp,j)=site -+ -+ if(lghost)then -+ -+ if(site_test)then -+ -+ if(site+natmsr.ge.ind_fre(3))then -+ -+ site_test=.false. -+ ngrp_ghost=ngrp_ghost+1 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0) -+ x write(nrite,"(21x,10i10,100(/,21x,10i10))") -+ x listyp(ngrp),(lstgst(ngrp,j),j=1, -+ x numgsit(ngrp)) -+ -+ enddo -+ -+ numgrp(itmols)=numgrp(itmols)-ngrp_ghost -+ ngrp=ngrp-ngrp_ghost -+ -+ return -+ end subroutine define_rigid_body -+ -+ subroutine bodystress -+ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c*********************************************************************** -+c -+c dlpoly routine to calculate rigid body contributions to the -+c stress tensor -+c -+c copyright daresbury laboratory -+c author w.smith aug 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i,j,ig,id,jr,igrp1,igrp2,idnode,mxnode,ngrp -+ real(8) vircom,strbod,dtx,dty,dtz -+ -+ dimension dtx(mxatms),dty(mxatms),dtz(mxatms),strbod(9) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c zero stress tensor accumulators -+ -+ vircom=0.d0 -+ do i=1,9 -+ strbod(i)=0.d0 -+ enddo -+ -+c convert atomic virial to molecular -+c note convention: virial(atom-atom)=-sum(Ri.Fi) -+c : virial(com-com)=-sum(Rcom.Fcom) so -+c virial(com-com)=virial(atom-atom)+sum((Ri-Rcom).Fi) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ vircom=vircom+ -+ x (dtx(jr)*fxx(i)+dty(jr)*fyy(i)+dtz(jr)*fzz(i)) -+ -+c stress tensor : rigid body contributions -+ -+ strbod(1)=strbod(1)-dtx(jr)*fxx(i) -+ strbod(2)=strbod(2)-dtx(jr)*fyy(i) -+ strbod(3)=strbod(3)-dtx(jr)*fzz(i) -+ strbod(4)=strbod(4)-dty(jr)*fxx(i) -+ strbod(5)=strbod(5)-dty(jr)*fyy(i) -+ strbod(6)=strbod(6)-dty(jr)*fzz(i) -+ strbod(7)=strbod(7)-dtz(jr)*fxx(i) -+ strbod(8)=strbod(8)-dtz(jr)*fyy(i) -+ strbod(9)=strbod(9)-dtz(jr)*fzz(i) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ call gdsum(strbod,9,buffer) -+ buffer(1)=vircom -+ call gdsum(buffer(1),1,buffer(2)) -+ vircom=buffer(1) -+ -+ endif -+ -+c symmetrise stress tensor -+ -+ strbod(2)=0.5d0*(strbod(2)+strbod(4)) -+ strbod(4)=strbod(2) -+ strbod(3)=0.5d0*(strbod(3)+strbod(7)) -+ strbod(7)=strbod(3) -+ strbod(6)=0.5d0*(strbod(6)+strbod(8)) -+ strbod(8)=strbod(6) -+ -+ return -+ end subroutine bodystress -+ -+ end module rigid_body_module -diff -urN dl_class_1.9.orig/srcmod/serial.f dl_class_1.9/srcmod/serial.f ---- dl_class_1.9.orig/srcmod/serial.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/serial.f 2015-11-16 17:18:13.452475827 +0100 -@@ -0,0 +1,543 @@ -+ subroutine initcomms() -+ -+c********************************************************************* -+c -+c dummy initcomms routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ return -+ end -+ -+ integer*8 function get_comms() -+c********************************************************************* -+c -+c dummy machine routine for serial DL_POLY with PLUMED -+c -+c******************************************************************** -+ -+ implicit none -+ -+ get_comms=0 -+ -+ return -+ end -+ -+ subroutine machine(idnode,mxnode) -+ -+c********************************************************************* -+c -+c dummy machine routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode -+ -+ idnode=0 -+ mxnode=1 -+ -+ return -+ end -+ -+ integer function mynode() -+ -+c********************************************************************* -+c -+c dummy mynode routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ mynode=0 -+ -+ return -+ end -+ -+ integer function nodedim() -+ -+c********************************************************************* -+c -+c dummy nodedim routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ nodedim=0 -+ -+ return -+ end -+ -+ integer function numnodes() -+ -+c********************************************************************* -+c -+c dummy numnodes routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ numnodes=1 -+ -+ return -+ end -+ -+ subroutine csend(msgtag,buf,length,pe,idum) -+ -+c********************************************************************* -+c -+c dummy csend routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ integer msgtag,length,pe,idum -+ -+ real(8) buf(*) -+ -+ return -+ end -+ -+ subroutine crecv(msgtag,buf,length) -+ -+c********************************************************************* -+c -+c dummy crecv routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer msgtag,length -+ real(8) buf(*) -+ -+ return -+ end -+ -+ subroutine gisum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy isum for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ integer aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gdsum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ real(8) aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gimax(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ integer aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gstate(check) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical check -+ -+ return -+ end -+ -+ subroutine gsync() -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ return -+ end -+ -+ subroutine exitcomms() -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ stop -+ end -+ -+ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ implicit none -+ -+ integer idnode,mxnode,natms,nbuff -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms -+ integer lstme(*) -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ngrp,nbuff -+ real(8) q0(*),q1(*),q2(*),q3(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine shlmerge(idnode,mxnode,ntshl) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl -+ -+ return -+ end -+ -+ subroutine shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode, mxnode, natms -+ integer lishap(*),lashap(*) -+ real(8) xxt(*),yyt(*),zzt(*),txx(*),tyy(*),tzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,natms -+ integer listme(*),listot(*) -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ logical lshmov -+ integer idnode,mxnode,natms,nscons,i,j,k -+ integer lashap(mxproc),lishap(mxlshp),listme(mxatms) -+ integer listin(mxatms),listot(mxatms),listcon(mxcons,3) -+ integer lstfrz(mxatms) -+ -+ do i=1,natms -+ listme(i)=0 -+ enddo -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ listme(i)=listme(i)+1 -+ listme(j)=listme(j)+1 -+ -+ enddo -+ -+c keep record of all atoms subject to constraints -+ -+ do i=1,natms -+ -+ if(listme(i).gt.0)then -+ listot(i)=1 -+ else -+ listot(i)=0 -+ endif -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use error_module -+ use setup_module -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nspmf,i,j,k -+ integer listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) -+ integer lstpmf(mxspmf,mspmf),npmf(2) -+ -+ if(mxpmf.lt.natms) call error(idnode,490) -+ -+ do i=1,natms -+ listpm(i)=0 -+ enddo -+ -+ do k=1,nspmf -+ -+ do j = 1,npmf(1)+npmf(2) -+ -+ i=lstpmf(j,k) -+ listpm(i)= 1 -+ -+ enddo -+ -+ enddo -+ -+c keep record of all atoms subject to pmf constraints -+ -+ do i=1,natms -+ -+ if(listpm(i).gt.0)then -+ lstpmt(i)=1 -+ else -+ lstpmt(i)=0 -+ endif -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ logical lcnb -+ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,jj,id,igrp1,igrp2 -+ integer i,j,k,jr,igrp,itmols,imols,ik,lgrp -+ integer listin(mxatms),listcon(mxcons,3),lstrgd(mxgatm) -+ integer lstout(mxatms),lstcsit(2*mxcons),numgsit(mxungp) -+ integer lstgtp(mxgrp),nummols(mxtmls),numgrp(mxtmls) -+ -+c block indices for groups -+ -+ igrp1 = (idnode*ngrp)/mxnode + 1 -+ igrp2 = ((idnode+1)*ngrp)/mxnode -+ -+c locate site indices of atoms in constraints -+ -+ do i = 1,natms -+ listin(i) = 0 -+ enddo -+ -+c loop over molecule types -+ -+ jr = 0 -+ igrp = 0 -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then -+ -+ id = lstgtp(igrp) -+ do jj = 1,numgsit(id) -+ -+ jr = jr +1 -+ i = lstrgd(jr) -+ listin(i) = jj -+ -+ enddo -+ endif -+ enddo -+ enddo -+ enddo -+ -+ lcnb = .true. -+ ik = 0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ if(listin(i).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(i) -+ lcnb = .false. -+ endif -+ -+ if(listin(j).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(j) -+ lcnb = .false. -+ endif -+ -+ enddo -+ -+c lcnb flags bodies connected by constraints -+ -+ lcnb = (.not.lcnb) -+ -+ return -+ end -+ -diff -urN dl_class_1.9.orig/srcmod/serial.f.preplumed dl_class_1.9/srcmod/serial.f.preplumed ---- dl_class_1.9.orig/srcmod/serial.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/serial.f.preplumed 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,529 @@ -+ subroutine initcomms() -+ -+c********************************************************************* -+c -+c dummy initcomms routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ return -+ end -+ -+ subroutine machine(idnode,mxnode) -+ -+c********************************************************************* -+c -+c dummy machine routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode -+ -+ idnode=0 -+ mxnode=1 -+ -+ return -+ end -+ -+ integer function mynode() -+ -+c********************************************************************* -+c -+c dummy mynode routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ mynode=0 -+ -+ return -+ end -+ -+ integer function nodedim() -+ -+c********************************************************************* -+c -+c dummy nodedim routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ nodedim=0 -+ -+ return -+ end -+ -+ integer function numnodes() -+ -+c********************************************************************* -+c -+c dummy numnodes routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ numnodes=1 -+ -+ return -+ end -+ -+ subroutine csend(msgtag,buf,length,pe,idum) -+ -+c********************************************************************* -+c -+c dummy csend routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ integer msgtag,length,pe,idum -+ -+ real(8) buf(*) -+ -+ return -+ end -+ -+ subroutine crecv(msgtag,buf,length) -+ -+c********************************************************************* -+c -+c dummy crecv routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer msgtag,length -+ real(8) buf(*) -+ -+ return -+ end -+ -+ subroutine gisum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy isum for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ integer aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gdsum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ real(8) aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gimax(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ integer aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gstate(check) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical check -+ -+ return -+ end -+ -+ subroutine gsync() -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ return -+ end -+ -+ subroutine exitcomms() -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ stop -+ end -+ -+ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ implicit none -+ -+ integer idnode,mxnode,natms,nbuff -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms -+ integer lstme(*) -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ngrp,nbuff -+ real(8) q0(*),q1(*),q2(*),q3(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine shlmerge(idnode,mxnode,ntshl) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl -+ -+ return -+ end -+ -+ subroutine shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode, mxnode, natms -+ integer lishap(*),lashap(*) -+ real(8) xxt(*),yyt(*),zzt(*),txx(*),tyy(*),tzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,natms -+ integer listme(*),listot(*) -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ logical lshmov -+ integer idnode,mxnode,natms,nscons,i,j,k -+ integer lashap(mxproc),lishap(mxlshp),listme(mxatms) -+ integer listin(mxatms),listot(mxatms),listcon(mxcons,3) -+ integer lstfrz(mxatms) -+ -+ do i=1,natms -+ listme(i)=0 -+ enddo -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ listme(i)=listme(i)+1 -+ listme(j)=listme(j)+1 -+ -+ enddo -+ -+c keep record of all atoms subject to constraints -+ -+ do i=1,natms -+ -+ if(listme(i).gt.0)then -+ listot(i)=1 -+ else -+ listot(i)=0 -+ endif -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use error_module -+ use setup_module -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nspmf,i,j,k -+ integer listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) -+ integer lstpmf(mxspmf,mspmf),npmf(2) -+ -+ if(mxpmf.lt.natms) call error(idnode,490) -+ -+ do i=1,natms -+ listpm(i)=0 -+ enddo -+ -+ do k=1,nspmf -+ -+ do j = 1,npmf(1)+npmf(2) -+ -+ i=lstpmf(j,k) -+ listpm(i)= 1 -+ -+ enddo -+ -+ enddo -+ -+c keep record of all atoms subject to pmf constraints -+ -+ do i=1,natms -+ -+ if(listpm(i).gt.0)then -+ lstpmt(i)=1 -+ else -+ lstpmt(i)=0 -+ endif -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ logical lcnb -+ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,jj,id,igrp1,igrp2 -+ integer i,j,k,jr,igrp,itmols,imols,ik,lgrp -+ integer listin(mxatms),listcon(mxcons,3),lstrgd(mxgatm) -+ integer lstout(mxatms),lstcsit(2*mxcons),numgsit(mxungp) -+ integer lstgtp(mxgrp),nummols(mxtmls),numgrp(mxtmls) -+ -+c block indices for groups -+ -+ igrp1 = (idnode*ngrp)/mxnode + 1 -+ igrp2 = ((idnode+1)*ngrp)/mxnode -+ -+c locate site indices of atoms in constraints -+ -+ do i = 1,natms -+ listin(i) = 0 -+ enddo -+ -+c loop over molecule types -+ -+ jr = 0 -+ igrp = 0 -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then -+ -+ id = lstgtp(igrp) -+ do jj = 1,numgsit(id) -+ -+ jr = jr +1 -+ i = lstrgd(jr) -+ listin(i) = jj -+ -+ enddo -+ endif -+ enddo -+ enddo -+ enddo -+ -+ lcnb = .true. -+ ik = 0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ if(listin(i).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(i) -+ lcnb = .false. -+ endif -+ -+ if(listin(j).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(j) -+ lcnb = .false. -+ endif -+ -+ enddo -+ -+c lcnb flags bodies connected by constraints -+ -+ lcnb = (.not.lcnb) -+ -+ return -+ end -+ -diff -urN dl_class_1.9.orig/srcmod/setup_module.f dl_class_1.9/srcmod/setup_module.f ---- dl_class_1.9.orig/srcmod/setup_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/setup_module.f 2011-07-11 17:09:10.000000000 +0200 -@@ -0,0 +1,1664 @@ -+ module setup_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining default array sizes -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c note the following internal units apply everywhere -+c -+c unit of time (to) = 1 x 10**(-12) seconds -+c unit of length (lo) = 1 x 10**(-10) metres -+c unit of mass (mo) = 1.6605402 x 10**(-27) kilograms -+c unit of charge (qo) = 1.60217733 x 10**(-19) coulombs -+c unit of energy (eo) = 1.6605402 x 10**(-23) joules -+c unit of pressure (po) = 1.6605402 x 10**( 7) pascals -+c -+c********************************************************************* -+ -+ use parse_module -+ -+ implicit none -+ -+c FIXED PARAMETERS -+ -+c standard pi values -+ -+ real(8), parameter :: pi=3.141592653589793d0 -+ real(8), parameter :: sqrpi=1.7724538509055159d0 -+ -+c conversion factor for coulombic terms in internal units -+c i.e. (unit(charge)**2/(4 pi eps0 unit(length))/unit(energy) -+ -+ real(8), parameter :: r4pie0=138935.4835d0 -+ -+c boltzmann constant in internal units -+ -+ real(8), parameter :: boltz=8.31451115d-1 -+ -+c planck's constant in internal units -+ -+ real(8), parameter :: hbar=6.350780719d0 -+ -+c conversion factor for pressure from internal units to katm -+ -+ real(8), parameter :: prsunt=0.163882576d0 -+ -+c main input channel -+ -+ integer, parameter :: nread=5 -+ -+c main output channel -+ -+ integer, parameter :: nrite=6 -+ -+c force field input channel -+ -+ integer, parameter :: nfield=9 -+ -+c configuration file input channel -+ -+ integer, parameter :: nconf=10 -+ -+c statistical data file output channel -+ -+ integer, parameter :: nstats=20 -+ -+c trajectory history file channel -+ -+ integer, parameter :: nhist=21 -+ -+c acummulators restart dump file -+ -+ integer, parameter :: nrest=22 -+ -+c tabulated potential file channel -+ -+ integer, parameter :: ntable=23 -+ -+c rdf file channel number -+ -+ integer, parameter :: nrdfdt=24 -+ -+c z density file channel number -+ -+ integer, parameter :: nzdndt=25 -+ -+c hyperdynamics reference basin file -+ -+ integer, parameter :: nbsn=30 -+ -+c neb reaction path profile file -+ -+ integer, parameter :: npro=31 -+ -+c hyperdynamics events journal file -+ -+ integer, parameter :: nevnt=33 -+ -+c hyperdynamics tracking file -+ -+ integer, parameter :: ntrk=32 -+ -+c hyperdynamics restart file -+ -+ integer, parameter :: nhrs=35 -+ -+c free energy data file -+ -+ integer, parameter :: nfrnwr=41 -+ -+c solvation data file -+ -+ integer, parameter :: nsolwr=43 -+ -+c data dumping interval in event of system crash -+ -+ integer, parameter :: ndump=1000 -+ -+c maximum number of neb calculations -+ -+ integer, parameter :: maxneb=10 -+ -+c array allocation parameters (set by subroutine parset) -+ -+ integer kmaxa,kmaxb,kmaxc,minnode,msatms,msbad,msgrp -+ integer mspmf,msteth,mxangl,mxatms,mxbond,mxbuff,mxcell -+ integer mxcons,mxdihd,mxewld,mxexcl,mxfbp,mxfld,mxgatm,mxgrid -+ integer mxgrp,mxinv,mxlist,mxlshp,mxneut,mxngp,mxnstk,mxpang -+ integer mxpbnd,mxpdih,mxpfbp,mxpinv,mxpmf,mxproc,mxptbp,mxpvdw -+ integer mxrdf,mxzdn,mxshl,mxsite,mxspmf,mxstak,mxtang,mxtbnd -+ integer mxtbp,mxtcon,mxtdih,mxteth,mxtinv,mxtmls,mxtshl,mxungp -+ integer mxvdw,mxxdf,mx2tbp,mx3fbp,mxebuf,mxquat,mxshak,mxspl -+ integer kmaxd,kmaxe,kmaxf,mxspme,mxftab,mxhko,mxegrd,mxhke -+ integer mxmet,mxsmet,mxpmet,mxter,mxpter,mxatyp,mxxtyp -+ integer mxtmls_fre,mxewld_fre,mxebuf_fre,mxatms_fre,mxatyp_exc -+ integer mxtmls_exc,mxtmls_sol,mxebuf_sol,mxatms_sol -+ -+ save kmaxa,kmaxb,kmaxc,minnode,msatms,msbad,msgrp -+ save mspmf,msteth,mxangl,mxatms,mxbond,mxbuff,mxcell -+ save mxcons,mxdihd,mxewld,mxexcl,mxfbp,mxfld,mxgatm,mxgrid -+ save mxgrp,mxinv,mxlist,mxlshp,mxneut,mxngp,mxnstk,mxpang -+ save mxpbnd,mxpdih,mxpfbp,mxpinv,mxpmf,mxproc,mxptbp,mxpvdw -+ save mxrdf,mxzdn,mxshl,mxsite,mxspmf,mxstak,mxtang,mxtbnd -+ save mxtbp,mxtcon,mxtdih,mxteth,mxtinv,mxtmls,mxtshl,mxungp -+ save mxvdw,mxxdf,mx2tbp,mx3fbp,mxebuf,mxquat,mxshak,mxspl -+ save kmaxd,kmaxe,kmaxf,mxspme,mxftab,mxhko,mxegrd,mxhke -+ save mxmet,mxsmet,mxpmet,mxter,mxpter,mxatyp,mxxtyp -+ save mxtmls_fre,mxewld_fre,mxebuf_fre,mxatms_fre,mxatyp_exc -+ save mxtmls_exc,mxtmls_sol,mxebuf_sol,mxatms_sol -+ -+ contains -+ -+ subroutine parset(redirect,idnode,mxnode,buffer) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to determine required array sizes for -+c allocation of memory manager -+c -+c copyright daresbury laboratory 1997 -+c author - w.smith june 1997 -+c -+c*********************************************************************** -+ -+ logical loglnk,lewald,lspme,lhke,nolink,lcshft -+ logical lsolva,lfree,lfrmas,lghost,redirect -+ real(8) cell,celprp,rctbp,rcfbp,volm,xhi,yhi,zhi,rcut,rvdw -+ real(8) densvar,delr,cut,dens,ratio,drdf,dzdn,rcter,buffer -+ real(8) zlen -+ integer imcon,nhko,ilx,ily,ilz,ncells -+ integer idnode,mxnode,mxn1 -+ -+ dimension cell(9),celprp(10),buffer(10) -+ -+ lhke=.false. -+ lspme=.false. -+ lewald=.false. -+ lcshft=.false. -+ nolink=.false. -+ redirect=.false. -+ mxtmls_sol=1 -+ mxebuf_sol=1 -+ mxatms_sol=1 -+ mxtmls_fre=1 -+ mxewld_fre=1 -+ mxebuf_fre=1 -+ mxatms_fre=1 -+ mxatyp_exc=1 -+ mxtmls_exc=1 -+ -+c specify maximum and minimum nodes -+ -+ mxproc=mxnode -+ minnode=mxnode -+ -+c scan the FIELD file data -+ -+ call fldscan(idnode,mxn1,rctbp,rcfbp,rcter) -+ -+c scan CONFIG file data -+ -+ call cfgscan -+ x (idnode,nconf,imcon,volm,xhi,yhi,zhi,cell,buffer) -+ -+c scan CONTROL file data -+ -+ call conscan -+ x (redirect,lewald,lspme,lhke,nolink,lcshft,lsolva,lfree,lfrmas, -+ x lghost,idnode,imcon,nhko,rcut,rvdw,delr,densvar,drdf,dzdn, -+ x zlen,cell) -+ -+c set dimension of working coordinate arrays -+ -+ msatms=max(1,(mxatms+minnode-1)/minnode) -+ if(lsolva)mxatms_sol=mxatms -+ if(lfree.or.lghost)mxatms_fre=mxatms -+ -+c maximum number of molecule types -+ -+ mxtmls=max(mxtmls,1) -+ if(lsolva)mxtmls_sol=mxtmls -+ if(lfree)mxtmls_fre=mxtmls -+ if(lghost)then -+ -+ mxtmls_exc=mxtmls -+ mxtmls_fre=mxtmls -+ -+ endif -+ -+c maximum number of specified bondlength constraints -+ -+ mxtcon=max(mxtcon,1) -+ -+c maximum number of chemical bond potentials -+ -+ mxtbnd=max(mxtbnd,1) -+ -+c maximum number of different bond angle potentials -+ -+ mxtang=max(mxtang,1) -+ -+c maximum number of different torsional potentials -+ -+ mxtdih=max(mxtdih,1) -+ -+c maximum number of different inversion potentials -+ -+ mxtinv=max(mxtinv,1) -+ -+c maximum number of unique rigid body units -+ -+ mxungp=max(mxungp,1) -+ -+c maximum number of tethered atom potentials -+ -+ mxteth=max(mxteth,1) -+ -+c maximum number of core-shell units -+ -+ mxshl=max(mxshl,1) -+ -+c set maximum number of unique atom types -+ -+ mxatyp=max(1,mxatyp) -+ mxxtyp=(mxatyp*(mxatyp+1))/2 -+ if(lghost)mxatyp_exc=mxatyp -+ -+c maximum number of vdw potentials -+ -+ mxvdw=max(mxvdw,1)+1 -+ -+c maximum number of metal potentials -+ -+ mxmet=max(mxmet,1)+1 -+ mxsmet=mxatyp -+ -+c maximum number of tersoff potentials -+ -+ if(mxter.gt.0)then -+ -+ mxter=mxatyp -+ -+ endif -+ -+c maximum number of three body potentials -+ -+ if(mxtbp.eq.0)then -+ -+ mx2tbp=0 -+ -+ else -+ -+ mx2tbp=(mxatyp*(mxatyp+1))/2 -+ mxtbp=mx2tbp*mxatyp -+ -+ endif -+ -+c maximum number of four body potentials -+ -+ if(mxfbp.eq.0)then -+ -+ mx3fbp=0 -+ -+ else -+ -+ mx3fbp=(mxatyp*(mxatyp+1)*(mxatyp+2))/6 -+ mxfbp=mxatyp*mx3fbp -+ -+ endif -+ -+c maximum number of angular potential parameters -+ -+ mxpang=6 -+ -+c maximum number of three body potential parameters -+ -+ mxptbp=mxpang+1 -+ -+c maximum number of four body potential parameters -+ -+ mxpfbp=3 -+ -+c maximum number of parameters for dihedrals -+ -+ mxpdih=5 -+ -+c maximum number of parameters for inversion potentials -+ -+ mxpinv=2 -+ -+c maximum number of parameters for bond potentials -+ -+ mxpbnd=4 -+ -+c maximum number of parameters for vdw potentials -+ -+ mxpvdw=6 -+ -+c maximum number of parameters for metal potentials -+ -+ mxpmet=7 -+ -+c maximum number of parameters for tersoff potential -+ -+ mxpter=11 -+ -+c maximum number of external field parameters -+ -+ mxfld=10 -+ -+c maximum number of excluded atoms per atom -+ -+ mxexcl=max(mxexcl,1) -+ -+c maximum number of different sites in system -+ -+ mxsite=max(mxsite,1) -+ -+c maximum number of chemical bonds per node -+ -+ mxbond=max(1,(mxbond+minnode-1)/minnode) -+ -+c maximum number of bond angles per node -+ -+ mxangl=max(1,(mxangl+minnode-1)/minnode) -+ -+c maximum number of torsion angles per node -+ -+ mxdihd=max(1,(mxdihd+minnode-1)/minnode) -+ -+c maximum number of inversion potentials per node -+ -+ mxinv=max(1,(mxinv+minnode-1)/minnode) -+ -+c maximum number of constraints per node -+ -+ mxcons=max(1,2*((mxcons+minnode-1)/minnode)) -+ -+c maximum number of tethered atoms per node -+ -+ msteth=max(1,(msteth+minnode-1)/minnode) -+ -+c maximum size for working arrays for bonds, angles, dihedrals -+c inversion potentials, tethers and core-shell units -+ -+ msbad=max(mxbond,mxangl,mxdihd,mxinv,msteth,mxshl) -+ -+c maximum number of grid points in potentials arrays -+ -+ if(mxgrid.eq.0)then -+ -+ mxgrid=max(1000,int(rvdw/0.01d0+0.5d0)+4) -+ -+ endif -+ -+ mxegrd=0 -+ if(lewald.or.lspme.or.lhke.or.lcshft)mxegrd=mxgrid -+ -+c maximum dimension of rdf arrays -+ -+ mxrdf=max(128,int(rcut/drdf)) -+ -+c maximum dimension of zdensity arrays -+ -+ mxzdn=max(128,int(zlen/dzdn)) -+ -+c maximum number of rigid groups in system -+ -+ mxgrp=max(mxgrp,1) -+ -+c maximum number of rigid groups per node -+ -+ msgrp=max(1,(mxgrp+minnode-1)/minnode) -+ -+c maximum number of sites per rigid unit -+ -+ mxngp=max(mxngp,3) -+ -+c maximum number of sites in rigid units -+ -+ mxgatm=max(1,mxgatm) -+ -+c maximum number of timesteps in stack arrays -+ -+ mxstak=max(100,mxstak) -+ -+c maximum number of variables in stack arrays -+ -+ mxnstk=45+mxatyp -+ -+c dimension of shake shared atoms array -+ -+ mxlshp=max(mxcons*2,1) -+ -+c set dimension of working arrays in ewald sum -+ -+ mxewld=1 -+ mxebuf=1 -+ if(lewald)then -+ -+ mxftab=1 -+ mxewld=msatms -+ mxebuf=(2*kmaxa+1)*(2*kmaxb+1)*(2*kmaxc+1)-1 -+ if(lfree.or.lghost)mxebuf=3*mxebuf -+ if(mxnode.le.16.and.mxebuf.le.5000)mxebuf=1 -+ -+ endif -+ -+c set dimension of working arrays in spme -+ -+ mxspme=1 -+ if(lspme)then -+ -+ mxspme=mxatms -+ mxftab=2*(kmaxd+kmaxe+kmaxf) -+ -+ endif -+ -+c set dimension of working arrays for HK ewald -+ -+ mxhko=1 -+ mxhke=1 -+ if(lhke)then -+ -+ mxhko=2 -+ mxewld=msatms -+ mxhke=msatms -+ if(nhko.gt.0)mxhko=max(2,nhko) -+ mxebuf=(2*kmaxa+1)*(2*kmaxb+1)-1 -+ if(mxnode.le.16.and.mxebuf.le.5000)mxebuf=1 -+ -+ endif -+ -+ if(lsolva)mxebuf_sol=mxebuf -+ if(lfree.or.lghost)then -+ -+ mxebuf_fre=mxebuf -+ mxewld_fre=mxewld -+ -+ endif -+ -+c maximum dimension of principal transfer buffer -+ -+ mxbuff=max(6*mxatms,8*(mxcons+1),8*(mxgrp+1),mxnstk*mxstak, -+ x mxebuf,mxgrid,2*kmaxa*kmaxb*kmaxc,2*kmaxd*kmaxe*kmaxf, -+ x 10000) -+ -+c maximum size of verlet neighbour/link cell list for each atom -+c decide if link-cells in use or not -+ -+ cut=rcut+delr -+ dens=dble(mxatms)/volm -+ ratio=1.5d0*dens*(4.d0*pi/3.d0)*cut**3 -+ mxlist=min(nint(ratio),(mxatms+1)/2) -+ if(imcon.eq.0) then -+ -+ cell(1)=max(xhi+2.d0*cut,3.d0*cut) -+ cell(5)=max(yhi+2.d0*cut,3.d0*cut) -+ cell(9)=max(zhi+2.d0*cut,3.d0*cut) -+ -+ endif -+ if(imcon.eq.6)then -+ -+ cell(9)=max(zhi+2.d0*cut,3.d0*cut,cell(9)) -+ -+ endif -+ -+ if(nolink)then -+ -+ loglnk=.false. -+ -+ else -+ -+ loglnk=.true. -+ call dcell(cell,celprp) -+ ilx=int(celprp(7)/cut) -+ ily=int(celprp(8)/cut) -+ ilz=int(celprp(9)/cut) -+ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. -+ ncells=ilx*ily*ilz -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. -+ if(mxneut.gt.0.and.ncells.le.36) loglnk=.false. -+ -+ endif -+ -+ mxcell=1 -+ if(loglnk)then -+ -+ mxlist=14*nint(1.5d0*dens*celprp(10)/dble(ncells)) -+ mxcell=(ilx+2)*(ily+2)*(ilz+2) -+ -+ endif -+ -+ if(mxneut.gt.0)mxlist=(mxneut+1)/2 -+ mxlist=2*mxlist -+ if(mxtbp.gt.0.or.mxfbp.gt.0.or.mxter.gt.0)then -+ -+ if(mxtbp.gt.0)cut=min(cut,rctbp) -+ if(mxfbp.gt.0)cut=min(cut,rcfbp) -+ if(mxter.gt.0)cut=min(cut,rcter) -+ ilx=max(3,int(celprp(7)/cut)) -+ ily=max(3,int(celprp(8)/cut)) -+ ilz=max(3,int(celprp(9)/cut)) -+ mxcell=max(mxcell,(ilx+2)*(ily+2)*(ilz+2)) -+ -+ endif -+ mxcell=int(dble(mxcell)*densvar/100.d0) -+ mxlist=int(dble(mxlist)*densvar/100.d0) -+ mxlist=max(500,mxlist) -+ -+c maximum size for coordinate difference arrays -+ -+ mxxdf=max(mxlist,mxatms,mxcons,mxn1*mxn1*(mxneut+1)/2) -+ -+c maximum number of core-shell unit types -+ -+ mxtshl=max(mxtshl,1) -+ -+c potential of mean force array parameter -+ -+ mxpmf=max(mxpmf,1) -+ -+c number of pmf constraints on a processor -+ -+ mspmf=max(1,(mxpmf+minnode-1)/minnode) -+ -+c maximum number of sites to define pmf units -+ -+ mxspmf=max(mxspmf,1) -+ -+c maximum iterations in quaternion integration -+ -+ mxquat=100 -+ -+c maximum number of shake cycles -+ -+ mxshak=100 -+ -+c maximum b-spline interpolation order -+ -+ mxspl=12 -+ -+c increment mxneut -+ -+ if(mxneut.gt.0)mxneut=mxneut+1 -+ -+ return -+ -+ end subroutine parset -+ -+ subroutine fldscan(idnode,mxn1,rctbp,rcfbp,rcter) -+ -+c*********************************************************************** -+c -+c dl_poly routine for scanning the field file to determine the -+c required parameters -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith november 1994 -+c -+c*********************************************************************** -+ -+ integer, parameter :: mmk=1000 -+ -+ character*8 name,keyword,chr(mmk) -+ logical check,ltable,lmetab,safe,lneut,loop1,loop2 -+ real(8) rctbp,rcter,rcfbp,rct,ppp -+ integer mxn1,nxn1,idnode,nold -+ integer itmols,ksite,numsit,isite,nrept,ifrz,i,j -+ integer ishls,ibonds,numcon,numang,icon,iang,idih,numdih -+ integer numinv,iinv,numgrp,kgrp,numgsit,numteth,iteth -+ integer ipmf,jpmf,npmf,itpvdw,itptbp,itpfbp -+ integer itpter,k,nfld,nummols,idum,numshl,nneu -+ integer numbonds,itpmet,iii,ngrid -+ -+ mxtmls=0 -+ mxatms=0 -+ mxgrp=0 -+ mxtcon=0 -+ mxtbnd=0 -+ mxtang=0 -+ mxtdih=0 -+ mxtinv=0 -+ mxpmf=0 -+ mxspmf=0 -+ mxungp=0 -+ mxngp=0 -+ mxneut=0 -+ mxmet=0 -+ mxatyp=0 -+ mxn1=0 -+ nxn1=0 -+ nold=-1 -+ mxgatm=0 -+ mxteth=0 -+ msteth=0 -+ mxvdw=0 -+ mxtbp=0 -+ mxter=0 -+ mxexcl=0 -+ mxsite=0 -+ mxbond=0 -+ mxcons=0 -+ mxangl=0 -+ mxdihd=0 -+ mxinv=0 -+ mxshl=0 -+ mxtshl=0 -+ mxfbp=0 -+ mxgrid=0 -+ rctbp=0.d0 -+ rcter=0.d0 -+ rcfbp=0.d0 -+ safe=.true. -+ loop1=.true. -+ loop2=.true. -+ lneut=.false. -+ ltable=.false. -+ lmetab=.false. -+ -+c open force field data file -+ -+ if(idnode.eq.0)open (nfield,file='FIELD') -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+c read and process directives from field file -+ -+ do while(loop1) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ -+ if(findstring('neut',record,idum))then -+ -+ lneut=.true. -+ -+ elseif(findstring('molecu',record,idum))then -+ -+ mxtmls=intstr(record,lenrec,idum) -+ -+ do itmols=1,mxtmls -+ -+ loop2=.true. -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ do while(loop2) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ -+ ksite=0 -+ -+ if(findstring('nummol',record,idum))then -+ -+ nummols=intstr(record,lenrec,idum) -+ -+ elseif(findstring('atoms',record,idum))then -+ -+ numsit=intstr(record,lenrec,idum) -+ mxatms=mxatms+numsit*nummols -+ mxsite=mxsite+numsit -+ ksite=0 -+ do isite=1,numsit -+ -+ if(ksite.lt.numsit)then -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ call getword(name,record,8,lenrec) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ nrept=intstr(record,lenrec,idum) -+ ifrz=intstr(record,lenrec,idum) -+ nneu=intstr(record,lenrec,idum) -+ if(nrept.eq.0)nrept=1 -+ if(lneut)then -+ if(nneu.ne.nold) nxn1=0 -+ nxn1=nxn1+nrept -+ mxn1=max(mxn1,nxn1) -+ nold=nneu -+ endif -+ -+ if(mxatyp.eq.0)then -+ -+ mxatyp=1 -+ chr(1)=name -+ -+ else -+ -+ check=.true. -+ do j=1,mxatyp -+ -+ if(name.eq.chr(j))check=.false. -+ -+ enddo -+ if(check)then -+ -+ mxatyp=mxatyp+1 -+ if(mxatyp.le.mmk)chr(mxatyp)=name -+ -+ endif -+ -+ endif -+ if(nrept.eq.0)nrept=1 -+ ksite=ksite+nrept -+ -+ endif -+ -+ enddo -+ -+ if(mmk.lt.mxatyp)call abortscan(34,idnode) -+ -+ if(lneut)mxneut=mxneut+nneu*nummols -+ -+ elseif(findstring('shell',record,idum))then -+ -+ numshl=intstr(record,40,idum) -+ mxtshl=mxtshl+numshl -+ mxshl=mxshl+nummols*numshl -+ -+ do ishls=1,numshl -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('bonds',record,idum))then -+ -+ numbonds=intstr(record,lenrec,idum) -+ mxtbnd=mxtbnd+numbonds -+ mxbond=mxbond+nummols*numbonds -+ -+ do ibonds=1,numbonds -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('constr',record,idum))then -+ -+ numcon=intstr(record,lenrec,idum) -+ mxtcon=mxtcon+numcon -+ mxcons=mxcons+nummols*numcon -+ -+ do icon=1,numcon -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('angles',record,idum))then -+ -+ numang=intstr(record,lenrec,idum) -+ mxtang=mxtang+numang -+ mxangl=mxangl+nummols*numang -+ -+ do iang=1,numang -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('dihedr',record,idum))then -+ -+ numdih=intstr(record,lenrec,idum) -+ mxtdih=mxtdih+numdih -+ mxdihd=mxdihd+nummols*numdih -+ -+ do idih=1,numdih -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('invers',record,idum))then -+ -+ numinv=intstr(record,lenrec,idum) -+ mxtinv=mxtinv+numinv -+ mxinv=mxinv+nummols*numinv -+ -+ do iinv=1,numinv -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('rigid',record,idum))then -+ -+ numgrp=intstr(record,lenrec,idum) -+ mxungp=mxungp+numgrp -+ mxgrp=mxgrp+numgrp*nummols -+ -+ do kgrp=1,numgrp -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ numgsit=intstr(record,lenrec,idum) -+ mxgatm=mxgatm+numgsit*nummols -+ mxngp=max(mxngp,numgsit) -+ do j=1,numgsit -+ -+ iii=intstr(record,lenrec,idum) -+ if(iii.eq.0)then -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ iii=intstr(record,lenrec,idum) -+ endif -+ -+ enddo -+ -+ enddo -+ -+ elseif(findstring('teth',record,idum))then -+ -+ numteth=intstr(record,lenrec,idum) -+ mxteth=mxteth+numteth -+ msteth=msteth+numteth*nummols -+ -+ do iteth=1,numteth -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('pmf',record,idum))then -+ -+ do ipmf=1,2 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ npmf=intstr(record,lenrec,idum) -+ mxspmf=mxspmf+npmf -+ -+ do jpmf=1,npmf -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ enddo -+ -+ mxpmf=mxpmf+nummols -+ -+ elseif(findstring('finish',record,idum))then -+ -+ loop2=.false. -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ elseif(findstring('vdw',record,idum))then -+ -+ if(findstring('tab',record,idum))ltable=.true. -+ mxvdw=intstr(record,lenrec,idum) -+ do itpvdw=1,mxvdw -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ if(findstring('tab',record,idum))ltable=.true. -+ -+ enddo -+ mxvdw=max(mxvdw,(mxatyp*(mxatyp+1))/2) -+ -+ if(ltable)then -+ -+ if(idnode.eq.0)open(ntable,file='TABLE') -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ mxgrid=max(mxgrid,intstr(record,lenrec,idum)) -+ -+ close (ntable) -+ -+ endif -+ -+ elseif(findstring('metal',record,idum))then -+ -+ if(findstring('eam',record,idum))lmetab=.true. -+ mxmet=intstr(record,lenrec,idum) -+ do itpmet=1,mxmet -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ if(findstring('eam',record,idum))lmetab=.true. -+ -+ enddo -+ mxmet=max(mxmet,(mxatyp*(mxatyp+1))/2) -+ -+ if(lmetab)then -+ -+ if(idnode.eq.0)open(ntable,file='TABEAM') -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ do i=1,intstr(record,lenrec,idum) -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ ngrid=intstr(record,lenrec,idum) -+ mxgrid=max(mxgrid,ngrid+4) -+ do j=1,(ngrid+3)/4 -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ -+ enddo -+ -+ enddo -+ -+ close (ntable) -+ -+ endif -+ -+ elseif(findstring('tbp',record,idum))then -+ -+ mxtbp=intstr(record,lenrec,idum) -+ -+ do itptbp=1,mxtbp -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(keyword,record,4,lenrec) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ rct=dblstr(record,lenrec,idum) -+ rctbp=max(rctbp,rct) -+ -+ enddo -+ -+ elseif(findstring('fbp',record,idum))then -+ -+ mxfbp=intstr(record,lenrec,idum) -+ do itpfbp=1,mxfbp -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(keyword,record,4,lenrec) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ rct=dblstr(record,lenrec,idum) -+ rcfbp=max(rcfbp,rct) -+ -+ enddo -+ -+ elseif(findstring('tersof',record,idum))then -+ -+ mxter=intstr(record,lenrec,idum) -+ -+ do itpter=1,mxter -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ rct=dblstr(record,lenrec,idum) -+ rcter=max(rcter,rct) -+ -+ enddo -+ -+ elseif(findstring('extern',record,idum))then -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ nfld=intstr(record,lenrec,idum) -+ if(nfld.eq.0)nfld=5 -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ do k=1,nfld -+ -+ ppp=dblstr(record,lenrec,idum) -+ if(idum.gt.lenrec.and.k.lt.nfld)then -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ endif -+ -+ enddo -+ -+ elseif(findstring('close',record,idum))then -+ -+ loop1=.false. -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)close (nfield) -+ -+ if(mxpmf.gt.0)mxpmf=mxatms -+ if(mxtcon.gt.0)mxexcl=max(mxexcl,6) -+ if(mxtbnd.gt.0)mxexcl=max(mxexcl,6) -+ if(mxtang.gt.0)mxexcl=max(mxexcl,16) -+ if(mxtdih.gt.0)mxexcl=max(mxexcl,50) -+ if(mxtinv.gt.0)mxexcl=max(mxexcl,50) -+ if(mxneut.gt.0)mxexcl=max(mxexcl,10*mxn1*mxn1) -+ if(mxgrp.gt.0)mxexcl=max(mxexcl,mxngp) -+ -+ return -+ -+ end subroutine fldscan -+ -+ subroutine cfgscan -+ x (idnode,nconf,imcon,volm,xhi,yhi,zhi,cell,buffer) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for scanning the initial configuration -+c file to determine the number of atoms present -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith june 1997 -+c -+c note: volm is volume containing all particles, not system volume -+c -+c*********************************************************************** -+ -+ character*80 header -+ character*8 name -+ logical lvolm -+ real(8) cell,celprp,buffer,extra,volm,xhi,yhi,zhi -+ real(8) xxx,yyy,zzz,uuu,vvv,www,coz -+ integer idnode,nconf,imcon,i,levcfg -+ dimension cell(9),celprp(10),buffer(10),extra(5) -+ -+ imcon=0 -+ xhi=0.d0 -+ yhi=0.d0 -+ zhi=0.d0 -+ volm=0.d0 -+ do i=1,9 -+ -+ cell(i)=0.d0 -+ -+ enddo -+ if(idnode.eq.0)then -+ -+ open (nconf,file='CONFIG') -+ -+c read the CONFIG file header -+ -+ read(nconf,'(a80)',end=100)header -+ read(nconf,'(2i10)',end=100)levcfg,imcon -+ lvolm=(imcon.eq.0.or.imcon.eq.6) -+ -+c specify molecular dynamics simulation cell -+ -+ if(imcon.gt.0)then -+ -+ read(nconf,'(3f20.0)',end=100)cell(1),cell(2),cell(3) -+ read(nconf,'(3f20.0)',end=100)cell(4),cell(5),cell(6) -+ read(nconf,'(3f20.0)',end=100)cell(7),cell(8),cell(9) -+ call dcell(cell,celprp) -+ -+ endif -+ -+ if(.not.lvolm)then -+ -+ volm=celprp(10) -+ -+ if(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ endif -+ -+ endif -+ -+ i=0 -+ do while(.true.) -+ -+ i=i+1 -+ if(levcfg.eq.0)then -+ -+ read(nconf,'(a8)',end=100) name -+ read(nconf,'(3f20.0)')xxx,yyy,zzz -+ -+ else if(levcfg.eq.1)then -+ -+ read(nconf,'(a8)',end=100) name -+ read(nconf,'(3f20.0)')xxx,yyy,zzz -+ read(nconf,'(3f20.0)')uuu,vvv,www -+ -+ else -+ -+ read(nconf,'(a8)',end=100) name -+ read(nconf,'(3f20.0)')xxx,yyy,zzz -+ read(nconf,'(3f20.0)')uuu,vvv,www -+ read(nconf,'(3f20.0)')uuu,vvv,www -+ -+ endif -+ -+ if(lvolm)then -+ -+ if(i.eq.1)then -+ -+ xhi=abs(xxx) -+ yhi=abs(yyy) -+ zhi=abs(zzz) -+ -+ else -+ -+ xhi=max(xhi,abs(xxx)) -+ yhi=max(yhi,abs(yyy)) -+ zhi=max(zhi,abs(zzz)) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ 100 continue -+ -+ if(imcon.eq.0)then -+ -+ volm=8.d0*xhi*yhi*zhi -+ -+ else if(imcon.eq.6)then -+ -+ coz=(cell(1)*cell(4)+cell(2)*cell(5)+cell(3)*cell(6))/ -+ x (celprp(1)*celprp(2)) -+ volm=2.d0*zhi*celprp(1)*celprp(2)*sqrt(1.d0-coz**2) -+ -+ endif -+ -+ close (nconf) -+ -+ endif -+ -+ extra(1)=dble(imcon) -+ extra(2)=xhi -+ extra(3)=yhi -+ extra(4)=zhi -+ extra(5)=volm -+ call gdsum(extra,5,buffer) -+ call gdsum(cell,9,buffer) -+ imcon=nint(extra(1)) -+ xhi=extra(2) -+ yhi=extra(3) -+ zhi=extra(4) -+ volm=extra(5) -+ -+ return -+ -+ end subroutine cfgscan -+ -+ subroutine conscan -+ x (redirect,lewald,lspme,lhke,nolink,lcshft,lsolva,lfree,lfrmas, -+ x lghost,idnode,imcon,nhko,rcut,rvdw,delr,densvar,drdf,dzdn, -+ x zlen,cell) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for scanning the contents of the control file -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith june 1997 -+c -+c*********************************************************************** -+ -+ logical safe,lewald,lspme,lhke,peek,nolink,lcshft,lmetad -+ logical lsolva,lfree,lfrmas,lghost,redirect -+ real(8) cell,celprp,rcut,rvdw,delr,eps,alpha,fac,tol,tol1 -+ real(8) densvar,drdf,dzdn,zlen -+ integer nhko,idnode,imcon,idum,jmp -+ integer nlatt,kmax1,kmax2,kmax3,kmaxpow2 -+ dimension celprp(10),cell(9) -+ -+ nhko=0 -+ mxstak=0 -+ kmaxa=0 -+ kmaxb=1 -+ kmaxc=1 -+ kmaxd=1 -+ kmaxe=1 -+ kmaxf=1 -+ rcut=0.d0 -+ rvdw=0.d0 -+ delr=0.d0 -+ drdf=0.05d0 -+ dzdn=0.05d0 -+ zlen=0.d0 -+ densvar=1.d2 -+ peek=.true. -+ lhke=.false. -+ lspme=.false. -+ lewald=.false. -+ lcshft=.false. -+ nolink=.false. -+ lghost=.false. -+ lfree=.false. -+ lfrmas=.false. -+ lsolva=.false. -+ lmetad=.false. -+ redirect=.false. -+ -+c open the simulation input file -+ -+ if(idnode.eq.0)open (nread,file='CONTROL') -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abortscan(17,idnode) -+ -+ do while(peek) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abortscan(17,idnode) -+ call lowcase(record,lenrec) -+ if(record(1).ne.'#')then -+ -+ if(findstring('stack',record,idum))then -+ -+ mxstak=intstr(record,lenrec,idum) -+ -+ elseif(findstring('no link',record,idum))then -+ -+ nolink=.true. -+ -+ elseif(findstring('metafreeze',record,idum))then -+ -+ lmetad=.true. -+ do while(lmetad) -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abortscan(17,idnode) -+ call lowcase(record,lenrec) -+ lmetad=.not.findstring('endmet',record,idum) -+ enddo -+ -+ elseif(findstring('redirect',record,idum))then -+ -+ redirect=.true. -+ -+ elseif(findstring('densvar',record,idum))then -+ -+ densvar=dblstr(record,lenrec,idum) -+ -+ elseif(findstring('shift',record,idum).or. -+ x findstring('reaction',record,idum))then -+ -+ lcshft=.true. -+ -+ elseif(findstring('ewald',record,idum).or. -+ x findstring('spme',record,idum).or. -+ x findstring('hke',record,idum))then -+ -+c read Ewald or HK-Ewald or SPM-Ewald sum parameters -+ -+ lhke=findstring('hke',record,idum) -+ lspme=findstring('spme',record,idum) -+ lewald=findstring('ewald',record,idum) -+ -+ if(findstring('precision',record,idum))then -+ -+ eps=dblstr(record,lenrec,idum) -+ if(lhke) then -+ -+ nhko=intstr(record,lenrec,idum) -+ nlatt=intstr(record,lenrec,idum) -+ nlatt=min(nlatt,2) -+ -+ endif -+ -+ if(rcut.lt.1.d-6)rcut=10.d0 -+ -+c compute alpha and the kmax -+ -+ if(lewald.or.lspme)then -+ -+ call dcell(cell,celprp) -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) -+ fac=1.d0 -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x fac=2.d0**(1.d0/3.d0) -+ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) -+ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) -+ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) -+ -+ elseif(lhke)then -+ -+ if(nhko.eq.0)then -+ if(eps.le.1.d-6)then -+ alpha=3.46d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=3.14d0/rcut -+ else -+ alpha=2.76d0/rcut -+ endif -+ elseif(nhko.eq.1)then -+ if(eps.le.1.d-6)then -+ alpha=4.37d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.08d0/rcut -+ else -+ alpha=3.75d0/rcut -+ endif -+ elseif(nhko.eq.2)then -+ if(eps.le.1.d-6)then -+ alpha=5.01d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.74d0/rcut -+ else -+ alpha=4.44d0/rcut -+ endif -+ elseif(nhko.eq.3)then -+ if(eps.le.1.d-6)then -+ alpha=5.55d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=5.28d0/rcut -+ else -+ alpha=5.00d0/rcut -+ endif -+ endif -+ alpha=alpha/dble(2*nlatt+1) -+ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 -+ call dcell(cell,celprp) -+ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) -+ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) -+ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) -+ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) -+ kmax3=1 -+ -+ endif -+ -+ else -+ -+ alpha=dblstr(record,lenrec,idum) -+ kmax1=intstr(record,lenrec,idum) -+ kmax2=intstr(record,lenrec,idum) -+ -+ if(lhke)then -+ -+ kmax3=1 -+ nhko=intstr(record,lenrec,idum) -+ -+ else -+ -+ kmax3=intstr(record,lenrec,idum) -+ -+ endif -+ -+ endif -+ -+c for spme double kmax and set to next power of 2, with current -+c upper limit of 512 -+ -+ if(lspme)then -+ -+ kmaxpow2=1 -+ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ end do -+ kmaxd=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ end do -+ kmaxe=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ end do -+ kmaxf=2 * kmaxpow2 -+ -+ elseif(lhke) then -+ -+ kmaxa=kmax1 -+ kmaxb=kmax2 -+ kmaxc=1 -+ -+ else -+ -+ kmaxa=kmax1 -+ kmaxb=kmax2 -+ kmaxc=kmax3 -+ -+ endif -+ -+ elseif(findstring('cut',record,idum))then -+ -+ rcut=dblstr(record,lenrec,idum) -+ -+ elseif(findstring('rvdw',record,idum))then -+ -+ rvdw=dblstr(record,lenrec,idum) -+ -+ elseif(findstring('delr',record,idum))then -+ -+ delr=dblstr(record,100,idum) -+ -+ else if(findstring('rdf',record,idum))then -+ -+ if(.not.findstring('print',record,idum))then -+ -+ jmp=intstr(record,lenrec,idum) -+ drdf=dblstr(record,lenrec,idum) -+ -+ endif -+ -+ else if(findstring('zden',record,idum))then -+ -+ jmp=intstr(record,lenrec,idum) -+ dzdn=dblstr(record,lenrec,idum) -+ zlen=dblstr(record,lenrec,idum) -+ if(dzdn.lt.1.d-8)then -+ -+ dzdn=0.1d0 -+ zlen=0.1d0*dble(128) -+ -+ elseif(zlen.lt.1.d-8)then -+ -+ zlen=dzdn*dble(128) -+ -+ endif -+ -+ elseif(findstring('solva',record,idum))then -+ -+ lsolva=.true. -+ -+ elseif(findstring('decomp',record,idum))then -+ -+ lsolva=.true. -+ -+ elseif(findstring('free',record,idum))then -+ -+ lfree=.true. -+ -+ elseif(findstring('excit',record,idum))then -+ -+ lghost=.true. -+ lsolva=.true. -+ -+ elseif(findstring('reset_mass',record,idum))then -+ -+ lfrmas=.true. -+ -+ elseif(findstring('switch',record,idum))then -+ -+ lghost=.true. -+ lsolva=.true. -+ -+ elseif(findstring('finish',record,idum))then -+ -+ peek=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)close (nread) -+ if(abs(rvdw).le.1.d-10)rvdw=rcut -+ if(drdf.lt.1.d-8)drdf=0.05d0 -+ if(dzdn.lt.1.d-8)dzdn=0.05d0 -+ -+ return -+ -+ end subroutine conscan -+ -+ subroutine abortscan(key,idnode) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for controlled exit of file scan -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c********************************************************************* -+ -+ integer key,idnode -+ -+ write(nrite,'(/,/,1x,a,i5)') -+ x 'DL_POLY terminated due to error ', key -+ -+ if(key.eq.17)then -+ -+ write(nrite,'(/,/,1x,a)') -+ x 'error - strange exit from CONTROL file processing' -+ -+ else if(key.eq.52)then -+ -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of FIELD file encountered' -+ -+ else if(key.eq.24)then -+ -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of file encountered in TABLE file' -+ -+ else if(key.eq.34)then -+ -+ write(nrite,'(/,/,1x,a)') -+ x 'error - character array memory allocation failure' -+ -+ endif -+ -+ if(idnode.eq.0) then -+ close (nrite) -+ close (nhist) -+ close (nread) -+ close (nconf) -+ close (nstats) -+ close (nrest) -+ close (nfield) -+ close (ntable) -+ endif -+ -+ call gsync() -+ call exitcomms() -+ -+ return -+ end subroutine abortscan -+ -+ subroutine dcell(aaa,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to calculate the dimensional properties of -+c a simulation cell specified by the input matrix aaa. -+c the results are returned in the array bbb, with : -+c -+c bbb(1 to 3) - lengths of cell vectors -+c bbb(4 to 6) - cosines of cell angles -+c bbb(7 to 9) - perpendicular cell widths -+c bbb(10) - cell volume -+c -+c copyright daresbury laboratory 1992 -+c author - w. smith july 1992 -+c -+c*********************************************************************** -+ -+ real(8) aaa,bbb,axb1,axb2,axb3,bxc1,bxc2,bxc3,cxa1,cxa2,cxa3 -+ -+ dimension aaa(9),bbb(10) -+ -+c calculate lengths of cell vectors -+ -+ bbb(1)=sqrt(aaa(1)*aaa(1)+aaa(2)*aaa(2)+aaa(3)*aaa(3)) -+ bbb(2)=sqrt(aaa(4)*aaa(4)+aaa(5)*aaa(5)+aaa(6)*aaa(6)) -+ bbb(3)=sqrt(aaa(7)*aaa(7)+aaa(8)*aaa(8)+aaa(9)*aaa(9)) -+ -+c calculate cosines of cell angles -+ -+ bbb(4)=(aaa(1)*aaa(4)+aaa(2)*aaa(5)+aaa(3)*aaa(6))/(bbb(1)*bbb(2)) -+ bbb(5)=(aaa(1)*aaa(7)+aaa(2)*aaa(8)+aaa(3)*aaa(9))/(bbb(1)*bbb(3)) -+ bbb(6)=(aaa(4)*aaa(7)+aaa(5)*aaa(8)+aaa(6)*aaa(9))/(bbb(2)*bbb(3)) -+ -+c calculate vector products of cell vectors -+ -+ axb1=aaa(2)*aaa(6)-aaa(3)*aaa(5) -+ axb2=aaa(3)*aaa(4)-aaa(1)*aaa(6) -+ axb3=aaa(1)*aaa(5)-aaa(2)*aaa(4) -+ bxc1=aaa(5)*aaa(9)-aaa(6)*aaa(8) -+ bxc2=aaa(6)*aaa(7)-aaa(4)*aaa(9) -+ bxc3=aaa(4)*aaa(8)-aaa(5)*aaa(7) -+ cxa1=aaa(8)*aaa(3)-aaa(2)*aaa(9) -+ cxa2=aaa(1)*aaa(9)-aaa(3)*aaa(7) -+ cxa3=aaa(2)*aaa(7)-aaa(1)*aaa(8) -+ -+c calculate volume of cell -+ -+ bbb(10)=abs(aaa(1)*bxc1+aaa(2)*bxc2+aaa(3)*bxc3) -+ -+c calculate cell perpendicular widths -+ -+ bbb(7)=bbb(10)/sqrt(bxc1*bxc1+bxc2*bxc2+bxc3*bxc3) -+ bbb(8)=bbb(10)/sqrt(cxa1*cxa1+cxa2*cxa2+cxa3*cxa3) -+ bbb(9)=bbb(10)/sqrt(axb1*axb1+axb2*axb2+axb3*axb3) -+ -+ return -+ end subroutine dcell -+ -+ end module setup_module -diff -urN dl_class_1.9.orig/srcmod/shake_module.f dl_class_1.9/srcmod/shake_module.f ---- dl_class_1.9.orig/srcmod/shake_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/shake_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,152 @@ -+ module shake_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining bond shake arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use error_module -+ use parse_module -+ use setup_module -+ use site_module -+ use solvation_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmcon(:) -+ integer, allocatable :: listcon(:,:),listot(:) -+ integer, allocatable :: numcon(:),lstcon(:,:) -+ integer, allocatable :: listme(:),lishap(:),lashap(:) -+ -+ save prmcon,listcon,listot,numcon,lstcon,listme,lishap,lashap -+ -+ contains -+ -+ subroutine alloc_shake_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (prmcon(mxtcon),stat=fail(1)) -+ allocate (numcon(mxtmls),stat=fail(2)) -+ allocate (lstcon(mxtcon,2),stat=fail(3)) -+ allocate (listcon(mxcons,3),stat=fail(4)) -+ allocate (listme(mxatms),stat=fail(5)) -+ allocate (lishap(mxlshp),stat=fail(6)) -+ allocate (lashap(mxproc),stat=fail(7)) -+ allocate (listot(mxatms),stat=fail(8)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1070) -+ enddo -+ -+ do i=1,mxtmls -+ numcon(i)=0 -+ enddo -+ -+ end subroutine alloc_shake_arrays -+ -+ subroutine define_constraints -+ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining constraints -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c adapted - p-a cazade oct 2007, solvation, excitation etc. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lghost -+ character*1 message(80) -+ integer idnode,itmols,nconst,nsite,ntmp,icnst -+ integer icnst1,iatm1,iatm2,isite1,isite2,idum,i -+ integer isol1,isol2,natmsr -+ -+ ntmp=intstr(record,lenrec,idum) -+ numcon(itmols)=numcon(itmols)+ntmp -+ if(idnode.eq.0) then -+ write(nrite,"(/,1x,'number of bond constraints', -+ x 5x,i10)") ntmp -+ write(nrite,"(/,/,1x,'constraint bond details:', -+ x /,/,21x,5x,'index',5x,'index',2x,'bondlength',/) -+ x ") -+ endif -+ -+ icnst1 = numcon(itmols) -+ do icnst=1,icnst1 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ iatm1 = intstr(record,lenrec,idum) -+ iatm2 = intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs(:) -+ -+ isite1 = nsite - numsit(itmols) + iatm1 -+ isite2 = nsite - numsit(itmols) + iatm2 -+ if(lghost)then -+ -+ isol1=natmsr+iatm1 -+ isol2=natmsr+iatm2 -+ -+ endif -+ -+ if(lfzsit(isite1)*lfzsit(isite2).ne.0) then -+ -+ numcon(itmols) = numcon(itmols) -1 -+ if(idnode.eq.0) write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ nconst=nconst+1 -+ -+ if(nconst.gt.mxtcon) call error(idnode,40) -+ -+ lstcon(nconst,1)= iatm1 -+ lstcon(nconst,2)= iatm2 -+ prmcon(nconst)=dblstr(record,lenrec,idum) -+ -+ if(lghost)then -+ -+ if((isol1.ge.ind_fre(3)).or.(isol2.ge.ind_fre(3)))then -+ -+ numcon(itmols)=numcon(itmols)-1 -+ ntcons_ghost=ntcons_ghost+1 -+ -+ endif -+ -+ endif -+ -+ if(idnode.eq.0) -+ x write(nrite,"(21x,2i10,f12.6)") -+ x lstcon(nconst,1),lstcon(nconst,2), -+ x prmcon(nconst) -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_constraints -+ -+ end module shake_module -diff -urN dl_class_1.9.orig/srcmod/site_module.f dl_class_1.9/srcmod/site_module.f ---- dl_class_1.9.orig/srcmod/site_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/site_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,233 @@ -+ module site_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining atomic/site arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use error_module -+ use parse_module -+ use setup_module -+ -+ implicit none -+ -+ character*1, allocatable :: molnam(:,:) -+ character*8, allocatable :: sitnam(:),unqatm(:) -+ real(8), allocatable :: dens(:),chgsit(:),wgtsit(:) -+ integer, allocatable :: nexsit(:),lfzsit(:),numsit(:),ltpsit(:) -+ integer, allocatable :: nugrp(:),lexsit(:,:),numgrp(:) -+ integer, allocatable :: numtyp(:),numfrz(:),nummols(:) -+ -+ save numtyp,numfrz,dens,chgsit,wgtsit,sitnam,unqatm,nexsit -+ save lfzsit,numsit,ltpsit,nugrp,lexsit,numgrp,molnam,nummols -+ -+ contains -+ -+ subroutine alloc_site_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (chgsit(mxsite),stat=fail(1)) -+ allocate (wgtsit(mxsite),stat=fail(2)) -+ allocate (nexsit(mxsite),stat=fail(3)) -+ allocate (lfzsit(mxsite),stat=fail(4)) -+ allocate (nugrp(mxsite) ,stat=fail(5)) -+ allocate (ltpsit(mxsite),stat=fail(6)) -+ allocate (numsit(mxtmls),stat=fail(7)) -+ allocate (lexsit(mxsite,mxexcl),stat=fail(8)) -+ allocate (sitnam(mxsite),stat=fail(9)) -+ allocate (unqatm(mxsite),stat=fail(10)) -+ allocate (numgrp(mxtmls),stat=fail(11)) -+ allocate (numtyp(mxatyp),stat=fail(12)) -+ allocate (numfrz(mxatyp),stat=fail(13)) -+ allocate (dens(mxatyp),stat=fail(14)) -+ allocate (nummols(mxtmls),stat=fail(15)) -+ allocate (molnam(40,mxtmls),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1090) -+ enddo -+ -+ do i=1,mxtmls -+ numsit(i)=0 -+ enddo -+ -+ end subroutine alloc_site_arrays -+ -+ subroutine define_atoms -+ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining atom types in system -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 atom1 -+ character*1 message(80) -+ logical lneut,safe,atmchk -+ integer idnode,itmols,nsite,ksite,ntpatm,isite,nrept -+ integer ifrz,neugp,irept,jsite,idum -+ real(8) weight,charge -+ -+ numsit(itmols)=intstr(record,lenrec,idum) -+ if(idnode.eq.0) then -+ write(nrite,"(/,1x,'number of atoms/sites', -+ x 10x,i10)") numsit(itmols) -+ if(.not.lneut) -+ x write(nrite,"(/,/,1x,'atomic characteristics:', -+ x /,/,21x,' site',5x,'name',10x,'mass',8x, -+ x 'charge',4x,'repeat',4x,'freeze'/)") -+ if(lneut) -+ x write(nrite,"(/,/,1x,'atomic characteristics:',/ -+ x /,21x,' site',5x,'name',10x,'mass',8x,'charge', -+ x 4x,'repeat',4x,'freeze',3x,'chg grp')") -+ -+ endif -+ -+ do isite=1,numsit(itmols) -+ -+ if(ksite.lt.numsit(itmols))then -+ -+c read atom name, site number, mass, charge, freeze option -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call getword(atom1,record,8,lenrec) -+ weight=dblstr(record,lenrec,idum) -+ charge=dblstr(record,lenrec,idum) -+ nrept=intstr(record,lenrec,idum) -+ ifrz =intstr(record,lenrec,idum) -+ neugp=intstr(record,lenrec,idum) -+ if(nrept.eq.0)nrept=1 -+ ksite=ksite+nrept -+ -+ if(idnode.eq.0) then -+ -+ if(.not.lneut) then -+ -+ write(nrite, -+ x "(21x,i5,5x,a8,2f12.5,2i10)") -+ x nsite+1,atom1,weight,charge,nrept, -+ x ifrz -+ -+ else -+ -+ write(nrite, -+ x "(21x,i5,5x,a8,2f12.5,3i10)") -+ x nsite+1,atom1,weight,charge,nrept, -+ x ifrz,neugp -+ -+ endif -+ -+ endif -+ -+ do irept=1,nrept -+ -+ nsite=nsite+1 -+ if(nsite.gt.mxsite) call error(idnode,20) -+ -+ sitnam(nsite)=atom1 -+ wgtsit(nsite)=weight -+ chgsit(nsite)=charge -+ lfzsit(nsite)=ifrz -+ nugrp(nsite)=neugp -+ -+ enddo -+ -+c establish list of unique atom types -+ -+ atmchk=.true. -+ -+ do jsite=1,ntpatm -+ -+ if(atom1.eq.unqatm(jsite)) then -+ -+ atmchk=.false. -+ do irept=nsite,nsite-nrept+1,-1 -+ -+ ltpsit(irept)=jsite -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ if(atmchk)then -+ -+ ntpatm=ntpatm+1 -+ if(ntpatm.gt.mxatyp)call error(idnode,14) -+ unqatm(ntpatm)=atom1 -+ -+ do irept=nsite,nsite-nrept+1,-1 -+ -+ ltpsit(irept)=ntpatm -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_atoms -+ -+ subroutine check_syschg(idnode,ntpmls,sumchg) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for checking the system charge -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,ntpmls,jsite,itmols,lsite -+ real(8) sumchg -+ -+ jsite=0 -+ do itmols=1,ntpmls -+ -+ do lsite=1,numsit(itmols) -+ -+ jsite=jsite+1 -+ sumchg=sumchg+dble(nummols(itmols))*chgsit(jsite) -+ -+ enddo -+ -+ enddo -+ -+ if(abs(sumchg).gt.1.0d-6) then -+ -+ call warning(idnode,60,sumchg,0.d0,0.d0) -+ -+ endif -+ -+ return -+ end subroutine check_syschg -+ -+ end module site_module -diff -urN dl_class_1.9.orig/srcmod/solvation_module.f dl_class_1.9/srcmod/solvation_module.f ---- dl_class_1.9.orig/srcmod/solvation_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/solvation_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,996 @@ -+ module solvation_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining decomposition of energy arrays -+c to calculate solvation energies -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ use config_module -+ -+ implicit none -+ -+ logical lcomp(9) -+ -+ integer mxtmls_sol2,mxtmls_sol3,mxtmls_sol4 -+ integer ntcons_ghost,ngrp_ghost,nswitch,niswitch -+ integer mxtmls_exc2,mxtmls_exc3,mxtmls_exc4 -+ integer nfrn,ifrn,mfree,kfree,ind_fre(4) -+ -+ real(8) pfree,lambda1,lambda2,dlambda,eng_kin_fre -+ real(8) elrc2,virlrc2,engsic0,engsic2,elrc_sav,qfix_fre -+ real(8) virlrc_sav,volm_sav,elrc_fre,elrc_fre_sav,vlrc_fre -+ real(8) qchg0,qchg1,qchg2,ang_fre,bnd_fre,dih_fre -+ real(8) inv_fre,tbp_fre,fbp_fre,cou_fre,elrc2_sav -+ real(8) vdw_fre,eng_cfg_fre,shl_fre,virlrc2_sav,vlrc_fre_sav -+ real(8) qchg_sav,vir_cfg_fre,ang_vir,bnd_vir,dih_vir -+ real(8) inv_vir,tbp_vir,fbp_vir,cou_vir,vdw_vir,shl_vir -+ -+ integer, allocatable :: atm_fre(:) -+ integer, allocatable :: atmolt(:),rigid_sol(:),const_sol(:) -+ integer, allocatable :: lstgot_sol(:),natm_sol(:) -+ -+ real(8), allocatable :: elrc_sol(:),elrc_sol_sav(:),shl_sol(:) -+ real(8), allocatable :: cou_sol(:),vdw_sol(:),bnd_sol(:) -+ real(8), allocatable :: ckc_sol_sum(:),cks_sol_sum(:) -+ real(8), allocatable :: cou_sol_sic(:),ebuf_sol1(:),inv_sol(:) -+ real(8), allocatable :: ang_sol(:),dih_sol(:),en3_sol(:) -+ real(8), allocatable :: qfix_sol(:),ebuf_sol2(:),en4_sol(:) -+ real(8), allocatable :: vdw_sol_lng(:),cou_sol_lng(:) -+ real(8), allocatable :: degfre_sol(:),degrot_sol(:),temp_sol(:) -+ real(8), allocatable :: vxo_sol(:),vyo_sol(:),vzo_sol(:) -+ real(8), allocatable :: ckc1(:),cks1(:),ckc2(:),cks2(:) -+ real(8), allocatable :: ckc_fre_sum(:),cks_fre_sum(:) -+ real(8), allocatable :: ebuf_exc1(:),ebuf_exc2(:) -+ real(8), allocatable :: vxo_fre(:),vyo_fre(:),vzo_fre(:) -+ real(8), allocatable :: elrc_exc(:),elrc_exc_sav(:) -+ real(8), allocatable :: cou_exc(:),vdw_exc(:),bnd_exc(:) -+ real(8), allocatable :: ang_exc(:),dih_exc(:),en4_exc(:) -+ real(8), allocatable :: vdw_exc_lng(:),cou_exc_lng(:) -+ real(8), allocatable :: shl_exc(:),en3_exc(:),inv_exc(:) -+ real(8), allocatable :: qfix_exc(:),cou_exc_sic(:),weight_sav(:) -+ -+ save atmolt,rigid_sol,const_sol,lstgot_sol,natm_sol,elrc_sol -+ save elrc_sol_sav,cou_sol,vdw_sol,bnd_sol,ckc_sol_sum,cks_sol_sum -+ save cou_sol_sic,ebuf_sol1,en4_sol,ang_sol,dih_sol,en3_sol -+ save qfix_sol,ebuf_sol2,shl_sol,vdw_sol_lng,cou_sol_lng,degfre_sol -+ save degrot_sol,inv_sol,temp_sol,vxo_sol,vyo_sol,vzo_sol -+ save mxtmls_sol2,mxtmls_sol3,mxtmls_sol4,lcomp -+ -+ save nfrn,ifrn,mfree,kfree,pfree,lambda1,lambda2,dlambda -+ save eng_kin_fre,elrc2,virlrc2,engsic0,engsic2,cks_fre_sum -+ save virlrc_sav,volm_sav,elrc_fre,elrc_fre_sav,qchg1,qchg2 -+ save ang_fre,bnd_fre,dih_fre,inv_fre,tbp_fre,fbp_fre,qchg0 -+ save cou_fre,vdw_fre,eng_cfg_fre,elrc2_sav,elrc_sav,vlrc_fre -+ save ang_vir,bnd_vir,dih_vir,inv_vir,tbp_vir,fbp_vir,cou_vir -+ save vdw_vir,shl_vir,vir_cfg_fre,qfix_fre,virlrc2_sav -+ save ind_fre,atm_fre,ckc1,cks1,ckc2,cks2,ckc_fre_sum -+ save ebuf_exc1,ebuf_exc2,vxo_fre,vyo_fre,vzo_fre,vlrc_fre_sav -+ save weight_sav -+ -+ save ntcons_ghost,ngrp_ghost,qchg_sav,nswitch,niswitch -+ save mxtmls_exc2,mxtmls_exc3,mxtmls_exc4 -+ save cou_exc,vdw_exc,bnd_exc,ang_exc,dih_exc,en4_exc,vdw_exc_lng -+ save cou_exc_lng,shl_exc,en3_exc,inv_exc,elrc_exc,elrc_exc_sav -+ save qfix_exc,cou_exc_sic -+ -+ contains -+ -+ subroutine alloc_sol_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine for allocating solvation module arrays -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=37 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ mxtmls_sol2=((mxtmls_sol+1)*mxtmls_sol)/2 -+ mxtmls_sol3=(((mxtmls_sol+3)*mxtmls_sol+2)*mxtmls_sol)/6 -+ mxtmls_sol4=((((mxtmls_sol+6)*mxtmls_sol+11)*mxtmls_sol+6)* -+ x mxtmls_sol)/24 -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (cou_sol(mxtmls_sol2),stat=fail(1)) -+ allocate (vdw_sol(mxtmls_sol2),stat=fail(2)) -+ allocate (shl_sol(mxtmls_sol),stat=fail(3)) -+ allocate (ebuf_sol1(mxebuf_sol),stat=fail(4)) -+ allocate (cou_sol_sic(mxtmls_sol2),stat=fail(5)) -+ allocate (cks_sol_sum(mxtmls_sol),stat=fail(6)) -+ allocate (ckc_sol_sum(mxtmls_sol),stat=fail(7)) -+ allocate (bnd_sol(mxtmls_sol),stat=fail(8)) -+ allocate (ang_sol(mxtmls_sol),stat=fail(9)) -+ allocate (dih_sol(mxtmls_sol),stat=fail(10)) -+ allocate (atmolt(mxatms_sol),stat=fail(11)) -+ allocate (en3_sol(mxtmls_sol3),stat=fail(12)) -+ allocate (en4_sol(mxtmls_sol4),stat=fail(13)) -+ allocate (qfix_sol(mxtmls_sol),stat=fail(14)) -+ allocate (elrc_sol(mxtmls_sol2),stat=fail(15)) -+ allocate (elrc_sol_sav(mxtmls_sol2),stat=fail(16)) -+ allocate (ebuf_sol2(mxebuf_sol),stat=fail(23)) -+ allocate (rigid_sol(mxtmls_sol),stat=fail(24)) -+ allocate (const_sol(mxtmls_sol),stat=fail(25)) -+ allocate (degfre_sol(mxtmls_sol),stat=fail(26)) -+ allocate (degrot_sol(mxtmls_sol),stat=fail(27)) -+ allocate (natm_sol(mxtmls_sol),stat=fail(28)) -+ allocate (lstgot_sol(mxatms_sol),stat=fail(29)) -+ allocate (temp_sol(mxtmls_sol),stat=fail(30)) -+ allocate (vxo_sol(mxatms_sol),stat=fail(31)) -+ allocate (vyo_sol(mxatms_sol),stat=fail(32)) -+ allocate (vzo_sol(mxatms_sol),stat=fail(33)) -+ allocate (vdw_sol_lng(mxtmls_sol2),stat=fail(34)) -+ allocate (cou_sol_lng(mxtmls_sol2),stat=fail(35)) -+ allocate (inv_sol(mxtmls_sol),stat=fail(36)) -+ allocate (weight_sav(mxatms_fre),stat=fail(37)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1030) -+ enddo -+ -+c initialise accumulators -+ -+ lcomp(:)=.false. -+ elrc_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ en3_sol(:)=0.d0 -+ en4_sol(:)=0.d0 -+ bnd_sol(:)=0.d0 -+ ang_sol(:)=0.d0 -+ dih_sol(:)=0.d0 -+ inv_sol(:)=0.d0 -+ -+ return -+ end subroutine alloc_sol_arrays -+ -+ subroutine solva_temp(idnode,mxnode,natms,keyver) -+ -+c*********************************************************************** -+c -+c dl_poly routine for solvation module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,ii,idnode,mxnode,natms,keyver -+ real(8) vvx,vvy,vvz -+ -+ temp_sol(:)=0.d0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ if(keyver.eq.0)then -+ -+ vvx=0.5d0*(vxx(i)+vxo_sol(i)) -+ vvy=0.5d0*(vyy(i)+vyo_sol(i)) -+ vvz=0.5d0*(vzz(i)+vzo_sol(i)) -+ -+ else -+ -+ vvx=vxx(i) -+ vvy=vyy(i) -+ vvz=vzz(i) -+ -+ endif -+ -+ temp_sol(atmolt(i))=temp_sol(atmolt(i))+weight(i)* -+ x (vvx*vvx+vvy*vvy+vvz*vvz)/(boltz*degfre_sol(atmolt(i))) -+ -+ enddo -+ -+c global sum -+ -+ if(mxnode.gt.1)call gdsum(temp_sol,mxtmls_sol,buffer) -+ -+ return -+ end subroutine solva_temp -+ -+ subroutine alloc_free_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine to allocate free energy arrays -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w.smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (ebuf_exc1(mxebuf_fre),stat=fail(1)) -+ allocate (ckc1(mxewld_fre),stat=fail(2)) -+ allocate (cks1(mxewld_fre),stat=fail(3)) -+ allocate (ckc2(mxewld_fre),stat=fail(4)) -+ allocate (cks2(mxewld_fre),stat=fail(5)) -+ allocate (cks_fre_sum(mxtmls_fre),stat=fail(6)) -+ allocate (ckc_fre_sum(mxtmls_fre),stat=fail(7)) -+ allocate (atm_fre(mxatms_fre),stat=fail(8)) -+ allocate (ebuf_exc2(mxebuf_fre),stat=fail(9)) -+ allocate (vxo_fre(mxatms_fre),stat=fail(10)) -+ allocate (vyo_fre(mxatms_fre),stat=fail(11)) -+ allocate (vzo_fre(mxatms_fre),stat=fail(12)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1030) -+ enddo -+ -+ return -+ -+ end subroutine alloc_free_arrays -+ -+ subroutine lrcorrect_fre(lfree,volm,elrc,virlrc) -+ -+c*********************************************************************** -+c -+c dl_poly routine for free energy module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w.smith aug 2008 -+c -+c*********************************************************************** -+ -+ logical lfree -+ real(8) volm,elrc,virlrc -+ -+ elrc=elrc_sav*(volm_sav/volm) -+ elrc2=elrc2_sav*(volm_sav/volm) -+ virlrc=virlrc_sav*(volm_sav/volm) -+ virlrc2=virlrc2_sav*(volm_sav/volm) -+ if(lfree)then -+ elrc_fre=elrc_fre_sav*(volm_sav/volm) -+ vlrc_fre=vlrc_fre_sav*(volm_sav/volm) -+ endif -+ -+ end subroutine lrcorrect_fre -+ -+ subroutine free_kinetic(lfrmas,idnode,mxnode,keyver) -+ -+c*********************************************************************** -+c -+c dl_poly routine for free energy module -+c calculate kinetic energy difference between states -+c -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008: parallel version -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lfrmas -+ integer i,idnode,mxnode,keyver -+ real(8) fac -+ -+ fac=dlambda -+ eng_kin_fre=0.d0 -+ -+ if(keyver.eq.0)then -+ -+ if(lfrmas)fac=dlambda/lambda1 -+ do i=ind_fre(1)+idnode,ind_fre(2),mxnode -+ -+ eng_kin_fre=eng_kin_fre- -+ x fac*weight(i)*((vxx(i)+vxo_fre(i))**2+ -+ x (vyy(i)+vyo_fre(i))**2+(vzz(i)+vzo_fre(i))**2) -+ -+ enddo -+ -+ if(lfrmas)fac=dlambda/lambda2 -+ do i=ind_fre(3)+idnode,ind_fre(4),mxnode -+ -+ eng_kin_fre=eng_kin_fre+ -+ x fac*weight(i)*((vxx(i)+vxo_fre(i))**2+ -+ x (vyy(i)+vyo_fre(i))**2+(vzz(i)+vzo_fre(i))**2) -+ -+ enddo -+ -+ eng_kin_fre=eng_kin_fre/8.d0 -+ -+ else -+ -+ if(lfrmas)fac=dlambda/lambda1 -+ do i=ind_fre(1)+idnode,ind_fre(2),mxnode -+ -+ eng_kin_fre=eng_kin_fre-fac*weight(i)*(vxx(i)**2+ -+ x vyy(i)**2+vzz(i)**2) -+ -+ enddo -+ -+ if(lfrmas)fac=dlambda/lambda2 -+ do i=ind_fre(3)+idnode,ind_fre(4),mxnode -+ -+ eng_kin_fre=eng_kin_fre+fac*weight(i)*(vxx(i)**2+ -+ x vyy(i)**2+vzz(i)**2) -+ -+ enddo -+ -+ eng_kin_fre=eng_kin_fre/2.d0 -+ -+ endif -+ -+c global sum -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=eng_kin_fre -+ call gdsum(buffer(1),1,buffer(2)) -+ eng_kin_fre=buffer(1) -+ -+ endif -+ -+ return -+ end subroutine free_kinetic -+ -+ subroutine freegen() -+ -+c*********************************************************************** -+c -+c dl_poly routine for free energy module: select mixing scheme -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w.smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,j,fac1,fac2 -+ real(8) sigma1,sigma2,acc,arg,gss,tt,pp,a1,a2,a3,a4,a5,err -+ -+ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ -+ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ -+ -+ if(mfree.eq.1)then -+ -+c linear mixing -+ -+ lambda1=(1.d0-pfree) -+ lambda2=pfree -+ dlambda=1.d0 -+ -+ elseif(mfree.eq.2)then -+ -+c nonlinear mixing -+ -+ lambda1=(1.d0-pfree)**kfree -+ lambda2=(1.d0-(1.d0-pfree)**kfree) -+ dlambda=dble(kfree)*(1.d0-pfree)**(kfree-1) -+ -+ elseif(mfree.eq.3)then -+ -+c trigonmetric mixing -+ -+ lambda2=0.5d0*(1.d0+sin(pi*(pfree-0.5d0))) -+ lambda1=1.d0-lambda2 -+ dlambda=0.5d0*pi*cos(pi*(pfree-0.5d0)) -+ -+ elseif(mfree.eq.4)then -+ -+c error function mixing -+ -+ acc=12.d0 -+ arg=2.d0*sqrt(2.302585093*acc) -+ gss=exp(-(arg*(pfree-0.5d0))**2) -+ tt=1.d0/(1.d0+pp*arg*abs(pfree-0.5d0)) -+ err=1.d0-tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*gss -+ lambda2=0.5d0*(1.d0+sign(err,(pfree-0.5d0))) -+ lambda1=1.d0-lambda2 -+ dlambda=gss*arg/sqrpi -+ -+ elseif(mfree.eq.5)then -+ -+c polynomial mixing -+ -+ sigma1=0.d0 -+ -+ do i=0,kfree-1 -+ -+ fac1=1 -+ fac2=1 -+ -+ do j=0,i-1 -+ -+ fac1=fac1*(kfree-1+i-j) -+ fac2=fac2*(i-j) -+ -+ enddo -+ -+ sigma1=sigma1+(dble(fac1/fac2))*pfree**i -+ -+ enddo -+ -+ lambda1=sigma1*(1.d0-pfree)**kfree -+ lambda2=1.d0-lambda1 -+ dlambda=sigma1*kfree*(1.d0-pfree)**(kfree-1) -+ -+ sigma2=0.d0 -+ -+ do i=1,kfree-1 -+ -+ fac1=1 -+ fac2=1 -+ -+ do j=0,i-1 -+ -+ fac1=fac1*(kfree-1+i-j) -+ fac2=fac2*(i-j) -+ -+ enddo -+ -+ sigma2=sigma2+(dble(fac1*i/fac2))*pfree**(i-1) -+ -+ enddo -+ -+ dlambda=dlambda-sigma2*(1.d0-pfree)**kfree -+ -+ else -+ -+c spline kernel mixing -+ -+ arg=pfree-0.5d0 -+ lambda2=2.d0*pfree-8.d0*arg**3*(1.d0-abs(arg))-0.5d0 -+ lambda1=1.d0-lambda2 -+ dlambda=2.d0+arg**2*(32.d0*abs(arg)-24.d0) -+ -+ endif -+ -+ return -+ end subroutine freegen -+ -+ subroutine free_energy_write(idnode,nstep,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing free energy file at selected -+c intervals in simulation -+c -+c copyright - daresbury laboratory -+c author - p.-a. cazade dec 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,natms,nstep -+ real(8) engunit -+ -+ save newjob -+ data newjob/.true./ -+ -+ if(idnode.eq.0)then -+ -+c open the FREENG file if new job or file closed -+ -+ if(newjob)then -+ -+ newjob = .false. -+ open(nfrnwr,file='FREENG',position='append') -+ -+ endif -+ -+ if(nstep.eq.nfrn.or.nstep.eq.ifrn)then -+ -+ write(nfrnwr,'(80a1)')cfgname -+ -+ if(abs(engunit-9648.530821d0).le.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=electron Volts ')") -+ if(abs(engunit-418.4d0).le.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=kcal/mol ')") -+ if(abs(engunit-1.d2).le.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=kjoule/mol ')") -+ if(abs(engunit-boltz).lt.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=kelvin ')") -+ if(abs(engunit-1.d0).lt.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=DL_POLY Internal UNITS ')") -+ -+ write(nfrnwr,'(1p,4e16.8)')pfree,lambda1,lambda2,dlambda -+ -+ endif -+ -+ if(mod(nstep-nfrn,ifrn).eq.0)then -+ -+ write(nfrnwr,"(i10,1p,2e16.8)") -+ x nstep,eng_cfg_fre/engunit,vir_cfg_fre/engunit -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine free_energy_write -+ -+ subroutine alloc_exi_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine to allocate excited state arrays -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ integer, parameter :: nnn=15 -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ mxtmls_exc2=((mxtmls_exc+1)*mxtmls_exc)/2 -+ mxtmls_exc3=(((mxtmls_exc+3)*mxtmls_exc+2)*mxtmls_exc)/6 -+ mxtmls_exc4=((((mxtmls_exc+6)*mxtmls_exc+11)*mxtmls_exc+6)* -+ x mxtmls_exc)/24 -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (cou_exc(mxtmls_exc2),stat=fail(1)) -+ allocate (vdw_exc(mxtmls_exc2),stat=fail(2)) -+ allocate (bnd_exc(mxtmls_exc),stat=fail(3)) -+ allocate (ang_exc(mxtmls_exc),stat=fail(4)) -+ allocate (dih_exc(mxtmls_exc),stat=fail(5)) -+ allocate (en3_exc(mxtmls_exc3),stat=fail(6)) -+ allocate (en4_exc(mxtmls_exc4),stat=fail(7)) -+ allocate (shl_exc(mxtmls_exc),stat=fail(8)) -+ allocate (vdw_exc_lng(mxtmls_exc2),stat=fail(9)) -+ allocate (cou_exc_lng(mxtmls_exc2),stat=fail(10)) -+ allocate (inv_exc(mxtmls_exc),stat=fail(11)) -+ allocate (elrc_exc(mxtmls_exc2),stat=fail(12)) -+ allocate (elrc_exc_sav(mxtmls_exc2),stat=fail(13)) -+ allocate (qfix_exc(mxtmls_exc),stat=fail(14)) -+ allocate (cou_exc_sic(mxtmls_exc2),stat=fail(15)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1030) -+ enddo -+ -+c initialise accumulators -+ -+ bnd_exc(:)=0.d0 -+ ang_exc(:)=0.d0 -+ dih_exc(:)=0.d0 -+ inv_exc(:)=0.d0 -+ en3_exc(:)=0.d0 -+ en4_exc(:)=0.d0 -+ elrc_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ return -+ end subroutine alloc_exi_arrays -+ -+ subroutine update_ghost(idnode,mxnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine for excited state module -+c update the positions of ghost atoms -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,ii,idnode,mxnode -+ -+ if(ind_fre(1).lt.ind_fre(3))then -+ -+ ii=ind_fre(3) -+ -+ do i=ind_fre(1),ind_fre(2) -+ -+ xxx(ii)=xxx(i) -+ yyy(ii)=yyy(i) -+ zzz(ii)=zzz(i) -+ -+ ii=ii+1 -+ -+ enddo -+ -+ else -+ -+ ii=ind_fre(1) -+ -+ do i=ind_fre(3),ind_fre(4) -+ -+ xxx(ii)=xxx(i) -+ yyy(ii)=yyy(i) -+ zzz(ii)=zzz(i) -+ -+ ii=ii+1 -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine update_ghost -+ -+ subroutine copy_force(idnode,mxnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine for excited state module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,ii,idnode,mxnode -+ -+ ii=ind_fre(3) -+ -+ do i=ind_fre(1),ind_fre(2) -+ -+ fxx(ii)=fxx(i) -+ fyy(ii)=fyy(i) -+ fzz(ii)=fzz(i) -+ -+ ii=ii+1 -+ -+ enddo -+ -+ return -+ end subroutine copy_force -+ -+ subroutine switch(elrc,virlrc) -+c*********************************************************************** -+c -+c dl_poly routine for switching system in excitation simulation -+c copyright - daresbury laboratory -+c author - w. smith sep 2008 -+c adapted from p.-a. cazade oct 2007 -+c -+c*********************************************************************** -+ -+ real(8) :: swap,elrc,virlrc -+ real(8), allocatable :: cou_sic_swp(:),qfix_swp(:) -+ real(8), allocatable :: elrc_swp(:) -+ -+ allocate(cou_sic_swp(mxtmls_exc2),qfix_swp(mxtmls_exc)) -+ allocate(elrc_swp(mxtmls_exc2)) -+ -+ swap=elrc -+ elrc=elrc2 -+ elrc2=swap -+ -+ swap=engsic0 -+ engsic0=engsic2 -+ engsic2=swap -+ -+ swap=virlrc -+ virlrc=virlrc2 -+ virlrc2=swap -+ -+ swap=elrc_sav -+ elrc_sav=elrc2_sav -+ elrc2_sav=swap -+ -+ swap=virlrc_sav -+ virlrc_sav=virlrc2_sav -+ virlrc2_sav=swap -+ -+ swap=qchg0 -+ qchg0=qchg2 -+ qchg2=swap -+ -+ cou_sic_swp(:)=cou_sol_sic(:) -+ cou_sol_sic(:)=cou_exc_sic(:) -+ cou_exc_sic(:)=cou_sic_swp(:) -+ -+ qfix_swp(:)=qfix_sol(:) -+ qfix_sol(:)=qfix_exc(:) -+ qfix_exc(:)=qfix_swp(:) -+ -+ elrc_swp(:)=elrc_sol(:) -+ elrc_sol(:)=elrc_exc(:) -+ elrc_exc(:)=elrc_swp(:) -+ -+ elrc_swp(:)=elrc_sol_sav(:) -+ elrc_sol_sav(:)=elrc_exc_sav(:) -+ elrc_exc_sav(:)=elrc_swp(:) -+ -+ deallocate(elrc_swp,cou_sic_swp,qfix_swp) -+ -+ return -+ -+ end subroutine switch -+ -+ subroutine lrcorrect_sol(lghost,volm) -+ -+c*********************************************************************** -+c -+c dl_poly routine for excited state module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ logical :: lghost -+ real(8) :: volm -+ -+ elrc_sol(:)=elrc_sol_sav(:)*(volm_sav/volm) -+ if(lghost)elrc_exc(:)=elrc_exc_sav(:)*(volm_sav/volm) -+ -+ return -+ end subroutine lrcorrect_sol -+ -+ subroutine switch_atm(lfrmas) -+ -+c*********************************************************************** -+c -+c dl_poly routine for excitation module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w.smith aug 2008 -+c -+c*********************************************************************** -+ -+ logical lfrmas -+ integer i,at1_swap,at2_swap -+ -+ at1_swap=ind_fre(1) -+ at2_swap=ind_fre(2) -+ ind_fre(1)=ind_fre(3) -+ ind_fre(2)=ind_fre(4) -+ ind_fre(3)=at1_swap -+ ind_fre(4)=at2_swap -+ -+ if(lfrmas)then -+ -+ do i=ind_fre(1),ind_fre(2) -+ -+ atm_fre(i)=1 -+ weight(i)=lambda1*weight_sav(i) -+ -+ enddo -+ -+ do i=ind_fre(3),ind_fre(4) -+ -+ atm_fre(i)=2 -+ weight(i)=lambda2*weight_sav(i) -+ -+ enddo -+ -+ else -+ -+ do i=ind_fre(1),ind_fre(2) -+ atm_fre(i)=1 -+ enddo -+ -+ do i=ind_fre(3),ind_fre(4) -+ atm_fre(i)=2 -+ enddo -+ -+ endif -+ -+ return -+ end subroutine switch_atm -+ -+ subroutine solvation_write -+ x (lexcite,lswitch,idnode,natms,nstep,nsolva,isolva, -+ x tstep,engunit,elrc) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing solva file at selected -+c intervals in simulation -+c -+c copyright - daresbury laboratory -+c author - p.-a. cazade jun 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob,lexcite,lswitch -+ integer idnode,natms,nstep,nsolva,isolva,i,j,k -+ integer mxtmls2,mxtmls3,mxtmls4 -+ real(8) tstep,engunit,elrc -+ character*80 aa,bb,cc,dd -+ -+ save newjob -+ data newjob/.true./ -+ -+ mxtmls2=((mxtmls+1)*mxtmls)/2 -+ mxtmls3=(((mxtmls+3)*mxtmls+2)*mxtmls)/6 -+ mxtmls4=((((mxtmls+6)*mxtmls+11)*mxtmls+6)*mxtmls)/24 -+ -+ if(idnode.eq.0)then -+ -+c open the SOLVAT file if new job or file closed -+ -+ if(newjob)then -+ -+ newjob=.false. -+ open(nsolwr,file='SOLVAT',position='append') -+ -+ endif -+ -+c write file header block -+ -+ if(nstep.eq.nsolva.or.nstep.eq.isolva)then -+ -+ write(nsolwr,'(80a1)')cfgname -+ -+ if(abs(engunit-9648.530821d0).le.1.d-10)write(nsolwr, -+ x "('ENERGY UNITS=electron Volts ')") -+ if(abs(engunit-418.4d0).le.1.d-10) write(nsolwr, -+ x "('ENERGY UNITS=kcal/mol ')") -+ if(abs(engunit-1.d2).le.1.d-10) write(nsolwr, -+ x "('ENERGY UNITS=kjoule/mol ')") -+ if(abs(engunit-boltz).lt.1.d-10) write(nsolwr, -+ x "('ENERGY UNITS=kelvin ')") -+ if(abs(engunit-1.d0).lt.1.d-10) write(nsolwr, -+ x "('ENERGY UNITS=DL_POLY Internal UNITS ')") -+ -+ write(nsolwr,'(2i10)')natms,mxtmls -+ write(nsolwr,'(1x,11a4)')' lex','lsw',' bnd',' ang', -+ x ' dih',' inv',' shl',' cou',' vdw',' 3bd',' 4bd' -+ write(nsolwr,'(11l4)')lexcite,lswitch,lcomp -+ -+ endif -+ -+c write out periodic data -+ -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+c mark start of time step data -+ -+ if(lexcite)then -+ write(nsolwr,'("timestep",i10,f12.5,1p,2e14.6)') -+ x nstep,tstep,elrc/engunit,elrc2/engunit -+ else -+ write(nsolwr,'("timestep",i10,f12.5,1p,e14.6)') -+ x nstep,tstep,elrc/engunit -+ endif -+ -+c write intramolecular data -+ -+ write(nsolwr,'(1p,5e14.6)')temp_sol -+ if(lcomp(1))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')bnd_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')bnd_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')bnd_sol(:)/engunit -+ endif -+ endif -+ if(lcomp(2))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')ang_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')ang_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')ang_sol(:)/engunit -+ endif -+ endif -+ if(lcomp(3))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')dih_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')dih_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')dih_sol(:)/engunit -+ endif -+ endif -+ if(lcomp(4))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')inv_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')inv_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')inv_sol(:)/engunit -+ endif -+ endif -+ -+c write core-shell data -+ -+ if(lcomp(5))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')shl_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')shl_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')shl_sol(:)/engunit -+ endif -+ endif -+ -+c write coulombic data -+ -+ if(lcomp(6))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')cou_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')cou_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')cou_sol(:)/engunit -+ endif -+ endif -+ -+c write vdw data -+ -+ if(lcomp(7))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')vdw_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')vdw_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')vdw_sol(:)/engunit -+ endif -+ endif -+ -+c write 3-body data -+ -+ if(lcomp(8))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')en3_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')en3_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')en3_sol(:)/engunit -+ endif -+ endif -+ -+c write 4-body data -+ -+ if(lcomp(9))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')en4_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')en4_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')en4_sol(:)/engunit -+ endif -+ endif -+ -+ endif -+ -+c close SOLVAT file at regular intervals -+ -+ if(.not.newjob.and.mod(nstep,ndump).eq.0)then -+ -+ close(nsolwr) -+ newjob=.true. -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine solvation_write -+ -+ end module solvation_module -diff -urN dl_class_1.9.orig/srcmod/spme_module.f dl_class_1.9/srcmod/spme_module.f ---- dl_class_1.9.orig/srcmod/spme_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/spme_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1175 @@ -+ module spme_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining spme arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use setup_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: csp(:),qqc(:,:,:),ffttable(:) -+ real(8), allocatable :: bspx(:,:), bspy(:,:), bspz(:,:) -+ real(8), allocatable :: bsdx(:,:), bsdy(:,:), bsdz(:,:) -+ integer, allocatable :: key1(:),key2(:),key3(:) -+ complex(8), allocatable :: ww1(:), ww2(:), ww3(:) -+ complex(8), allocatable :: qqq(:,:,:) -+ complex(8), allocatable :: bscx(:), bscy(:),bscz(:) -+CFFTW pointer, save :: fplan, bplan -+ -+ save csp,qqc,qqq,ww1,ww2,ww3,bscx,bscy,bscz,ffttable -+ save bspx,bspy,bspz,bsdx,bsdy,bsdz,key1,key2,key3 -+ -+ contains -+ -+ subroutine alloc_spme_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=9 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (csp(mxspl),ffttable(mxftab),stat=fail(1)) -+ allocate (bspx(mxspme,mxspl),bspy(mxspme,mxspl),stat=fail(2)) -+ allocate (bspz(mxspme,mxspl),bsdx(mxspme,mxspl),stat=fail(3)) -+ allocate (bsdy(mxspme,mxspl),bsdz(mxspme,mxspl),stat=fail(4)) -+ allocate (bscx(kmaxd),bscy(kmaxe),bscz(kmaxf),stat=fail(5)) -+ allocate (key1(kmaxd),key2(kmaxe),key3(kmaxf),stat=fail(6)) -+ allocate (ww1(kmaxd),ww2(kmaxe),ww3(kmaxf),stat=fail(7)) -+ allocate (qqc(kmaxd,kmaxe,kmaxf),stat=fail(8)) -+ allocate (qqq(kmaxd,kmaxe,kmaxf),stat=fail(9)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1750) -+ enddo -+ -+ end subroutine alloc_spme_arrays -+ -+ subroutine bspcoe(nospl,kmax1,kmax2,kmax3) -+ -+c********************************************************************** -+c -+c dl_poly subroutine to calculate B-spline coefficients for -+c Euler exponential splines. -+c -+c copyright - daresbury laboratory 1998 -+c author - w. smith july 1998 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nospl,kmax1,kmax2,kmax3,k,i,j -+ complex(8) ccc -+ -+c calculate B-splines at knots -+ -+ csp(1)=0.d0 -+ csp(2)=1.d0 -+ -+ do k=3,nospl -+ -+ csp(k)=0.d0 -+ -+ do j=k,2,-1 -+ -+ csp(j)=(dble(j-1)*csp(j)+dble(k-j+1)*csp(j-1))/dble(k-1) -+ -+ enddo -+ -+ enddo -+ -+c calculate B-spline coefficients -+ -+ do i=0,kmax1-1 -+ -+ ccc=(0.d0,0.d0) -+ -+ do k=0,nospl-2 -+ -+ ccc=ccc+csp(k+2)*ww1(mod(i*k,kmax1)+1) -+ -+ enddo -+ -+ bscx(i+1)=ww1(mod(i*(nospl-1),kmax1)+1)/ccc -+ -+ enddo -+ -+ do i=0,kmax2-1 -+ -+ ccc=(0.d0,0.d0) -+ -+ do k=0,nospl-2 -+ -+ ccc=ccc+csp(k+2)*ww2(mod(i*k,kmax2)+1) -+ -+ enddo -+ -+ bscy(i+1)=ww2(mod(i*(nospl-1),kmax2)+1)/ccc -+ -+ enddo -+ -+ do i=0,kmax3-1 -+ -+ ccc=(0.d0,0.d0) -+ -+ do k=0,nospl-2 -+ -+ ccc=ccc+csp(k+2)*ww3(mod(i*k,kmax3)+1) -+ -+ enddo -+ -+ bscz(i+1)=ww3(mod(i*(nospl-1),kmax3)+1)/ccc -+ -+ enddo -+ -+ return -+ end subroutine bspcoe -+ -+ subroutine bspgen(idnode,mxnode,natms,nospl,txx,tyy,tzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to calculate B-splines for SPME method -+c -+c copyright - daresbury laboratory 1998 -+c author - w. smith july 1998 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nospl,natms,idnode,mxnode,iatm0,iatm1,i,j,k -+ real(8) aaa,bbb,ccc,txx,tyy,tzz -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ -+c set up atoms numbers for nodes -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c construct B-splines -+ -+ do i=iatm0,iatm1 -+ -+ bsdx(i,1)=1.d0 -+ bsdy(i,1)=1.d0 -+ bsdz(i,1)=1.d0 -+ bsdx(i,2)=-1.d0 -+ bsdy(i,2)=-1.d0 -+ bsdz(i,2)=-1.d0 -+ bspx(i,1)=txx(i)-int(txx(i)) -+ bspy(i,1)=tyy(i)-int(tyy(i)) -+ bspz(i,1)=tzz(i)-int(tzz(i)) -+ bspx(i,2)=1.d0-txx(i)+int(txx(i)) -+ bspy(i,2)=1.d0-tyy(i)+int(tyy(i)) -+ bspz(i,2)=1.d0-tzz(i)+int(tzz(i)) -+ -+ enddo -+ -+ do k=3,nospl -+ -+ do i=iatm0,iatm1 -+ -+ bspx(i,k)=0.d0 -+ bspy(i,k)=0.d0 -+ bspz(i,k)=0.d0 -+ -+ enddo -+ -+ do j=k,2,-1 -+ -+ if(k.eq.nospl)then -+ -+ do i=iatm0,iatm1 -+ -+ bsdx(i,j)=bspx(i,j)-bspx(i,j-1) -+ bsdy(i,j)=bspy(i,j)-bspy(i,j-1) -+ bsdz(i,j)=bspz(i,j)-bspz(i,j-1) -+ -+ enddo -+ -+ endif -+ -+ do i=iatm0,iatm1 -+ -+ aaa=txx(i)+dble(j-1)-int(txx(i)) -+ bbb=tyy(i)+dble(j-1)-int(tyy(i)) -+ ccc=tzz(i)+dble(j-1)-int(tzz(i)) -+ bspx(i,j)=(aaa*bspx(i,j)+(dble(k)-aaa)*bspx(i,j-1))/ -+ x dble(k-1) -+ bspy(i,j)=(bbb*bspy(i,j)+(dble(k)-bbb)*bspy(i,j-1))/ -+ x dble(k-1) -+ bspz(i,j)=(ccc*bspz(i,j)+(dble(k)-ccc)*bspz(i,j-1))/ -+ x dble(k-1) -+ -+ enddo -+ -+ enddo -+ -+ if(k.eq.nospl)then -+ -+ do i=iatm0,iatm1 -+ -+ bsdx(i,1)=bspx(i,1) -+ bsdy(i,1)=bspy(i,1) -+ bsdz(i,1)=bspz(i,1) -+ -+ enddo -+ -+ endif -+ -+ do i=iatm0,iatm1 -+ -+ bspx(i,1)=(txx(i)-int(txx(i)))*bspx(i,1)/dble(k-1) -+ bspy(i,1)=(tyy(i)-int(tyy(i)))*bspy(i,1)/dble(k-1) -+ bspz(i,1)=(tzz(i)-int(tzz(i)))*bspz(i,1)/dble(k-1) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine bspgen -+ -+ subroutine ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engcpe,vircpe,alpha,volm,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces in a -+c periodic system using the smoothed particle mesh ewald method -+c due to Essmann et al J. Chem. Phys. 103 (1995) 8577. -+c -+c parallel replicated data version (part 1) -+c -+c copyright - daresbury laboratory 1998 -+c author - w. smith july 1998 -+c additional FFT code - j. geronowicz sept 1999 -+c -+c part 1 - reciprocal space terms (fourier part) -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob,lconsw -+ -+ integer idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl -+ integer npass,i,nnn,ipass,l,ll,k,kk,j,jj,fail,iatm0,iatm1 -+ real(8) engcpe,vircpe,alpha,volm,epsq,omg,bb1,bb2,bb3,qchg -+ real(8) twopi,engsic,rvolm,ralph,shiftx,shifty,shiftz,det,qfix -+ real(8) tx,ty,tz,rcpcut,rcpct2,rkx1,rky1,rkz1,rkx2,rky2,rkz2 -+ real(8) rkx3,rky3,rkz3,rksq,akv,eng1,den,scal1,tmp,rclprp -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+CESSL integer inc2,inc3 -+CSGIC real(8) nauxfft(4) -+ -+ dimension omg(9),rclprp(10) -+ complex(8) cpetot,vterm -+ save newjob,engsic,qchg,iatm0,iatm1 -+ -+ data newjob/.true./,fail/0/ -+CSGIC data nauxfft/3,0,0,0/ -+ -+c allocate temporary arrays -+ -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1760) -+ -+ npass=1 -+ lconsw=.true. -+ twopi=2.d0*pi -+ -+ if(newjob)then -+ -+ newjob=.false. -+ -+c set up atoms numbers for nodes -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate self interaction correction and net system charge -+ -+ qchg=0.d0 -+ engsic=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ qchg=qchg+chge(i) -+ engsic=engsic+chge(i)**2 -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=qchg -+ buffer(2)=engsic -+ call gdsum(buffer(1),2,buffer(3)) -+ qchg =buffer(1) -+ engsic=buffer(2) -+ -+ endif -+ -+ engsic=-r4pie0/epsq*alpha*engsic/sqrpi -+ -+c initialise the complex exponential arrays -+ -+CCRAY call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) -+CESSL call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) -+CFFTW call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) -+CSGIC call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) -+ -+c initialise the default fft routine -+ -+ call dlpfft3(1,1,kmax1,kmax2,kmax3,key1,key2,key3, -+ x ww1,ww2,ww3,qqq) -+ -+c calculate B-spline coefficients -+ -+ call bspcoe(nospl,kmax1,kmax2,kmax3) -+ -+ endif -+ -+c initialise coulombic potential energy -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c initalize stress tensor working arrays -+ -+ do i = 1,9 -+ omg(i) = 0.d0 -+ enddo -+ -+c set working parameters -+ -+ rvolm=twopi/volm -+ ralph=-0.25d0/alpha**2 -+ -+c set switch for TO, RD and HP boundary conditions -+ -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) then -+ -+ npass=2 -+ lconsw=.false. -+ rvolm=0.5d0*rvolm -+ shiftx=0.5d0*dble(kmax1) -+ shifty=0.5d0*dble(kmax2) -+ shiftz=0.5d0*dble(kmax3) -+ if(imcon.eq.7)shiftz=0.d0 -+ -+ endif -+ -+c convert cell coordinates to fractional coordinates -+ -+ call invert(cell,rcell,det) -+ if(abs(det).lt.1.d-6)call error(idnode,120) -+ -+ do i=iatm0,iatm1 -+ -+ txx(i)=dble(kmax1)*(rcell(1)*xxx(i)+rcell(4)*yyy(i)+ -+ x rcell(7)*zzz(i)+0.5d0) -+ tyy(i)=dble(kmax2)*(rcell(2)*xxx(i)+rcell(5)*yyy(i)+ -+ x rcell(8)*zzz(i)+0.5d0) -+ tzz(i)=dble(kmax3)*(rcell(3)*xxx(i)+rcell(6)*yyy(i)+ -+ x rcell(9)*zzz(i)+0.5d0) -+ -+ enddo -+ -+c construct B-splines for atoms -+ -+ call bspgen(idnode,mxnode,natms,nospl,txx,tyy,tzz) -+ -+c zero 3D charge array -+ -+ nnn=kmaxd*kmaxe*kmaxf -+ call set_block(nnn,0.d0,qqc) -+ -+c construct 3D charge array -+ -+ do ipass=1,npass -+ -+ do i=iatm0,iatm1 -+ -+ do l=1,nospl -+ -+ ll=int(tzz(i))-l+2 -+ if(ll.gt.kmax3)ll=1 -+ if(ll.lt.1)ll=ll+kmax3 -+ do k=1,nospl -+ -+ kk=int(tyy(i))-k+2 -+ if(kk.gt.kmax2)kk=1 -+ if(kk.lt.1)kk=kk+kmax2 -+ -+ do j=1,nospl -+ -+ jj=int(txx(i))-j+2 -+ if(jj.gt.kmax1)jj=1 -+ if(jj.lt.1)jj=jj+kmax1 -+ -+ qqc(jj,kk,ll)=qqc(jj,kk,ll)+ -+ x chge(i)*bspx(i,j)*bspy(i,k)*bspz(i,l) -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ if(.not.lconsw)then -+ -+ do i=iatm0,iatm1 -+ -+ tx=txx(i)-shiftx -+ ty=tyy(i)-shifty -+ tz=tzz(i)-shiftz -+ txx(i)=txx(i)-sign(shiftx,tx) -+ tyy(i)=tyy(i)-sign(shifty,ty) -+ tzz(i)=tzz(i)-sign(shiftz,tz) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c global sum of charge array -+ -+ if(mxnode.gt.1) call gdsum(qqc,nnn,buffer) -+ -+c load charge array into complex array for FFT -+ -+ call cpy_rtc(nnn,qqc,qqq) -+ -+c calculate inverse 3D FFT of charge array (in place). -+ -+CFFTW call fftwnd_f77_one(fplan,qqq,0) -+ -+CESSL inc2=kmaxd -+CESSL inc3=kmaxd*kmaxe -+CESSL call dcft3(qqq,inc2,inc3,qqq,inc2,inc3,kmax1,kmax2,kmax3, -+CESSL x -1,1.d0,buffer,mxbuff) -+ -+CSGIC call zzfft3d( -1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, -+CSGIC x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) -+ -+CCRAY call ccfft3d( -1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, -+CCRAY x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) -+ -+ call dlpfft3(0,1,kmax1,kmax2,kmax3,key1,key2,key3, -+ x ww1,ww2,ww3,qqq) -+ -+c set reciprocal space cutoff -+ -+ call dcell(rcell,rclprp) -+ -+ rcpcut=0.5d0*min(dble(kmax1)*rclprp(7),dble(kmax2)*rclprp(8), -+ x dble(kmax3)*rclprp(9)) -+ rcpcut=rcpcut*1.05d0*twopi -+ rcpct2=rcpcut**2 -+ -+c calculate convolution of charge array with gaussian function -+ -+ do l=1,kmax3 -+ -+ ll=l-1 -+ if(l.gt.kmax3/2)ll=l-kmax3-1 -+ tmp=twopi*dble(ll) -+ rkx1=tmp*rcell(3) -+ rky1=tmp*rcell(6) -+ rkz1=tmp*rcell(9) -+ bb3=real(bscz(l)*conjg(bscz(l))) -+ -+ do k=1,kmax2 -+ -+ kk=k-1 -+ if(k.gt.kmax2/2)kk=k-kmax2-1 -+ tmp=twopi*dble(kk) -+ rkx2=rkx1+tmp*rcell(2) -+ rky2=rky1+tmp*rcell(5) -+ rkz2=rkz1+tmp*rcell(8) -+ bb2=bb3*real(bscy(k)*conjg(bscy(k))) -+ -+ do j=1,kmax1 -+ -+ jj=j-1 -+ if(j.gt.kmax1/2)jj=j-kmax1-1 -+ tmp=twopi*dble(jj) -+ rkx3=rkx2+tmp*rcell(1) -+ rky3=rky2+tmp*rcell(4) -+ rkz3=rkz2+tmp*rcell(7) -+ bb1=bb2*real(bscx(j)*conjg(bscx(j))) -+ -+ rksq=rkx3*rkx3+rky3*rky3+rkz3*rkz3 -+ -+ if(rksq.gt.1.d-6.and.rksq.le.rcpct2)then -+ -+ vterm=bb1*exp(ralph*rksq)/rksq*qqq(j,k,l) -+ akv=2.d0*(1.d0/rksq-ralph)*real(vterm*conjg(qqq(j,k,l))) -+ omg(1)=omg(1)-rkx3*rkx3*akv -+ omg(5)=omg(5)-rky3*rky3*akv -+ omg(9)=omg(9)-rkz3*rkz3*akv -+ omg(2)=omg(2)-rkx3*rky3*akv -+ omg(3)=omg(3)-rkx3*rkz3*akv -+ omg(6)=omg(6)-rky3*rkz3*akv -+ qqq(j,k,l)=vterm -+ -+ else -+ -+ qqq(j,k,l)=(0.d0,0.d0) -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+CFFTW call fftwnd_f77_one(bplan,qqq,0) -+CESSL call dcft3(qqq,inc2,inc3,qqq,inc2,inc3,kmax1,kmax2,kmax3, -+CESSL x 1,1.d0,buffer,mxbuff) -+ -+CSGIC call zzfft3d( 1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, -+CSGIC x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) -+ -+CCRAY call ccfft3d( 1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, -+CCRAY x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) -+ -+ call dlpfft3(0,-1,kmax1,kmax2,kmax3,key1,key2,key3, -+ x ww1,ww2,ww3,qqq) -+ -+c calculate atomic forces -+ -+ call spme_for -+ x (idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,rvolm, -+ x epsq,txx,tyy,tzz) -+ -+c complete product of charge array and its gaussian convolution -+ -+ call ele_prd(nnn,qqq,qqc,qqq) -+ -+c correction for charged systems -+ -+ qfix=-(0.5d0*pi*r4pie0/epsq)*((qchg/alpha)**2/volm)/ -+ x dble(mxnode) -+ -+c calculate total energy -+ -+ call scl_csum(nnn,cpetot,qqq) -+ -+ eng1=real(cpetot) -+ den=1.d0/dble(npass) -+ engcpe=engcpe+(den*rvolm*r4pie0*eng1/epsq+engsic)/ -+ x dble(mxnode)+qfix -+ -+c calculate stress tensor (symmetrical) -+ -+ scal1=den*rvolm*r4pie0/(epsq*dble(mxnode)) -+ stress(1) = stress(1)+scal1*(omg(1)+eng1)+qfix -+ stress(2) = stress(2)+scal1*omg(2) -+ stress(3) = stress(3)+scal1*omg(3) -+ stress(4) = stress(4)+scal1*omg(2) -+ stress(5) = stress(5)+scal1*(omg(5)+eng1)+qfix -+ stress(6) = stress(6)+scal1*omg(6) -+ stress(7) = stress(7)+scal1*omg(3) -+ stress(8) = stress(8)+scal1*omg(6) -+ stress(9) = stress(9)+scal1*(omg(9)+eng1)+qfix -+ -+c virial term -+ -+ vircpe=vircpe-scal1*(omg(1)+omg(5)+omg(9)+3.d0*eng1)-3.d0*qfix -+ -+c deallocate temporary arrays -+ -+ deallocate (txx,tyy,tzz,stat=fail) -+ -+ return -+ end subroutine ewald_spme -+ -+ subroutine spme_for -+ x (idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,rvolm, -+ x epsq,txx,tyy,tzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces in a -+c periodic system using smoothed particle mesh ewald method -+c -+c parallel replicated data version (part 1) -+c -+c copyright - daresbury laboratory 1998 -+c author - w. smith oct 1998 -+c -+c part 1 - reciprocal space terms (fourier part) -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,i,ll -+ integer iatm0,iatm1,kk,k,j,jj,l -+ real(8) rvolm,epsq,txx,tyy,tzz,fff,fac,bdx,bdy,bdz -+ real(8) det,qsum -+ -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension fff(3) -+ -+ fac=-2.d0*rvolm*r4pie0/epsq -+ call invert(cell,rcell,det) -+ -+c set up atom numbers for nodes -+ -+ iatm0 = (idnode*natms)/mxnode + 1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+c calculate forces -+ -+ do i=iatm0,iatm1 -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ do l=1,nospl -+ -+ ll=int(tzz(i))-l+2 -+ if(ll.gt.kmax3)ll=1 -+ if(ll.lt.1)ll=ll+kmax3 -+ -+ do k=1,nospl -+ -+ kk=int(tyy(i))-k+2 -+ if(kk.gt.kmax2)kk=1 -+ if(kk.lt.1)kk=kk+kmax2 -+ -+ do j=1,nospl -+ -+ jj=int(txx(i))-j+2 -+ if(jj.gt.kmax1)jj=1 -+ if(jj.lt.1)jj=jj+kmax1 -+ -+ qsum=real(qqq(jj,kk,ll)) -+ bdx=qsum*bsdx(i,j)*bspy(i,k)*bspz(i,l)*dble(kmax1) -+ bdy=qsum*bspx(i,j)*bsdy(i,k)*bspz(i,l)*dble(kmax2) -+ bdz=qsum*bspx(i,j)*bspy(i,k)*bsdz(i,l)*dble(kmax3) -+ -+ fxx(i)=fxx(i)+fac*chge(i)*(bdx*rcell(1)+bdy*rcell(2)+ -+ x bdz*rcell(3)) -+ fyy(i)=fyy(i)+fac*chge(i)*(bdx*rcell(4)+bdy*rcell(5)+ -+ x bdz*rcell(6)) -+ fzz(i)=fzz(i)+fac*chge(i)*(bdx*rcell(7)+bdy*rcell(8)+ -+ x bdz*rcell(9)) -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c remove COM drift arising from SPME approximations -+ -+ fff(1)=0.d0 -+ fff(2)=0.d0 -+ fff(3)=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ fff(1)=fff(1)+fxx(i) -+ fff(2)=fff(2)+fyy(i) -+ fff(3)=fff(3)+fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)call gdsum(fff,3,buffer) -+ -+ fff(1)=fff(1)/dble(natms) -+ fff(2)=fff(2)/dble(natms) -+ fff(3)=fff(3)/dble(natms) -+ -+ do i=iatm0,iatm1 -+ -+ fxx(i)=fxx(i)-fff(1) -+ fyy(i)=fyy(i)-fff(2) -+ fzz(i)=fzz(i)-fff(3) -+ -+ enddo -+ -+ return -+ end subroutine spme_for -+ -+ subroutine dlpfft3 -+ x (ind,isw,ndiv1,ndiv2,ndiv3,key1,key2,key3,ww1,ww2,ww3,aaa) -+ -+c*********************************************************************** -+c -+c dl-poly 3D fast fourier transform routine (in place) -+c -+c copyright daresbury laboratory 1998 -+c author w smith july 1998 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lkx,lky,lkz -+ integer ind,isw,ndiv1,ndiv2,ndiv3,key1,key2,key3,i,idm,kkk -+ integer nu1,nu2,nu3,iii,jjj,j,jj2,num,l,kk1,k12,k -+ real(8) tpi,arg -+ -+ dimension key1(ndiv1),key2(ndiv2),key3(ndiv3) -+ complex(8) ww1(ndiv1),ww2(ndiv2),ww3(ndiv3) -+ complex(8) ttt,aaa(ndiv1,ndiv2,ndiv3) -+ save nu1,nu2,nu3 -+ -+ data tpi/6.283185307179586d0/ -+ -+ if(ind.gt.0)then -+ -+c check FFT array dimensions -+ -+ idm=1 -+ lkx=.true. -+ lky=.true. -+ lkz=.true. -+ -+ do i=1,30 -+ -+ idm=2*idm -+ -+ if(idm.eq.ndiv1)then -+ -+ lkx=.false. -+ nu1=i -+ -+ endif -+ if(idm.eq.ndiv2)then -+ -+ lky=.false. -+ nu2=i -+ -+ endif -+ if(idm.eq.ndiv3)then -+ -+ lkz=.false. -+ nu3=i -+ -+ endif -+ -+ enddo -+ -+ if(lkx.or.lky.or.lkz)then -+ -+ write(*,*)'error - FFT array not 2**N' -+ stop -+ -+ endif -+ -+c set reverse bit address arrays -+ -+ do kkk=1,ndiv1 -+ -+ iii=0 -+ jjj=kkk-1 -+ -+ do j=1,nu1 -+ -+ jj2=jjj/2 -+ iii=2*(iii-jj2)+jjj -+ jjj=jj2 -+ -+ enddo -+ -+ key1(kkk)=iii+1 -+ -+ enddo -+ -+ do kkk=1,ndiv2 -+ -+ iii=0 -+ jjj=kkk-1 -+ -+ do j=1,nu2 -+ -+ jj2=jjj/2 -+ iii=2*(iii-jj2)+jjj -+ jjj=jj2 -+ -+ enddo -+ -+ key2(kkk)=iii+1 -+ -+ enddo -+ -+ do kkk=1,ndiv3 -+ -+ iii=0 -+ jjj=kkk-1 -+ -+ do j=1,nu3 -+ -+ jj2=jjj/2 -+ iii=2*(iii-jj2)+jjj -+ jjj=jj2 -+ -+ enddo -+ -+ key3(kkk)=iii+1 -+ -+ enddo -+ -+c initialise complex exponential factors -+ -+ ww1(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv1/2 -+ -+ arg=(tpi/dble(ndiv1))*dble(i) -+ ww1(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww1(ndiv1+1-i)=conjg(ww1(i+1)) -+ -+ enddo -+ -+ ww2(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv2/2 -+ -+ arg=(tpi/dble(ndiv2))*dble(i) -+ ww2(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww2(ndiv2+1-i)=conjg(ww2(i+1)) -+ -+ enddo -+ -+ ww3(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv3/2 -+ -+ arg=(tpi/dble(ndiv3))*dble(i) -+ ww3(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww3(ndiv3+1-i)=conjg(ww3(i+1)) -+ -+ enddo -+ -+ return -+ -+ endif -+ -+c take conjugate of exponentials if required -+ -+ if(isw.lt.0)then -+ -+ do i=1,ndiv1 -+ -+ ww1(i)=conjg(ww1(i)) -+ -+ enddo -+ -+ do i=1,ndiv2 -+ -+ ww2(i)=conjg(ww2(i)) -+ -+ enddo -+ -+ do i=1,ndiv3 -+ -+ ww3(i)=conjg(ww3(i)) -+ -+ enddo -+ -+ endif -+ -+c perform fourier transform in X direction -+ -+ kkk=0 -+ num=ndiv1/2 -+ -+ do l=1,nu1 -+ -+ do while(kkk.lt.ndiv1) -+ -+ do i=1,num -+ -+ iii=key1(kkk/num+1) -+ kk1=kkk+1 -+ k12=kk1+num -+ -+ do j=1,ndiv2 -+ -+ do k=1,ndiv3 -+ -+ ttt=aaa(k12,j,k)*ww1(iii) -+ aaa(k12,j,k)=aaa(kk1,j,k)-ttt -+ aaa(kk1,j,k)=aaa(kk1,j,k)+ttt -+ -+ enddo -+ -+ enddo -+ -+ kkk=kkk+1 -+ -+ enddo -+ -+ kkk=kkk+num -+ -+ enddo -+ -+ kkk=0 -+ num=num/2 -+ -+ enddo -+ -+c unscramble the fft using bit address array -+ -+ do kkk=1,ndiv1 -+ -+ iii=key1(kkk) -+ -+ if(iii.gt.kkk)then -+ -+ do j=1,ndiv2 -+ -+ do k=1,ndiv3 -+ -+ ttt=aaa(kkk,j,k) -+ aaa(kkk,j,k)=aaa(iii,j,k) -+ aaa(iii,j,k)=ttt -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c perform fourier transform in Y direction -+ -+ kkk=0 -+ num=ndiv2/2 -+ -+ do l=1,nu2 -+ -+ do while(kkk.lt.ndiv2) -+ -+ do i=1,num -+ -+ iii=key2(kkk/num+1) -+ kk1=kkk+1 -+ k12=kk1+num -+ -+ do j=1,ndiv1 -+ -+ do k=1,ndiv3 -+ -+ ttt=aaa(j,k12,k)*ww2(iii) -+ aaa(j,k12,k)=aaa(j,kk1,k)-ttt -+ aaa(j,kk1,k)=aaa(j,kk1,k)+ttt -+ -+ enddo -+ -+ enddo -+ -+ kkk=kkk+1 -+ -+ enddo -+ -+ kkk=kkk+num -+ -+ enddo -+ -+ kkk=0 -+ num=num/2 -+ -+ enddo -+ -+c unscramble the fft using bit address array -+ -+ do kkk=1,ndiv2 -+ -+ iii=key2(kkk) -+ -+ if(iii.gt.kkk)then -+ -+ do j=1,ndiv1 -+ -+ do k=1,ndiv3 -+ -+ ttt=aaa(j,kkk,k) -+ aaa(j,kkk,k)=aaa(j,iii,k) -+ aaa(j,iii,k)=ttt -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c perform fourier transform in Z direction -+ -+ kkk=0 -+ num=ndiv3/2 -+ -+ do l=1,nu3 -+ -+ do while(kkk.lt.ndiv3) -+ -+ do i=1,num -+ -+ iii=key3(kkk/num+1) -+ kk1=kkk+1 -+ k12=kk1+num -+ -+ do j=1,ndiv1 -+ -+ do k=1,ndiv2 -+ -+ ttt=aaa(j,k,k12)*ww3(iii) -+ aaa(j,k,k12)=aaa(j,k,kk1)-ttt -+ aaa(j,k,kk1)=aaa(j,k,kk1)+ttt -+ -+ enddo -+ -+ enddo -+ -+ kkk=kkk+1 -+ -+ enddo -+ -+ kkk=kkk+num -+ -+ enddo -+ -+ kkk=0 -+ num=num/2 -+ -+ enddo -+ -+c unscramble the fft using bit address array -+ -+ do kkk=1,ndiv3 -+ -+ iii=key3(kkk) -+ -+ if(iii.gt.kkk)then -+ -+ do j=1,ndiv1 -+ -+ do k=1,ndiv2 -+ -+ ttt=aaa(j,k,kkk) -+ aaa(j,k,kkk)=aaa(j,k,iii) -+ aaa(j,k,iii)=ttt -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c restore exponentials to unconjugated values if necessary -+ -+ if(isw.lt.0)then -+ -+ do i=1,ndiv1 -+ -+ ww1(i)=conjg(ww1(i)) -+ -+ enddo -+ -+ do i=1,ndiv2 -+ -+ ww2(i)=conjg(ww2(i)) -+ -+ enddo -+ -+ do i=1,ndiv3 -+ -+ ww3(i)=conjg(ww3(i)) -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine dlpfft3 -+ -+ subroutine spl_cexp(ndiv1,ndiv2,ndiv3,ww1,ww2,ww3) -+ -+c*********************************************************************** -+c -+c dl-poly routine to create complex exponential arrays for -+c b-splines -+c -+c copyright daresbury laboratory 1998 -+c author w smith oct 1998 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer ndiv1,ndiv2,ndiv3,i -+ real(8) tpi,arg -+ complex(8) ww1(ndiv1),ww2(ndiv2),ww3(ndiv3) -+ -+ data tpi/6.283185307179586d0/ -+ -+c initialise complex exponential factors -+ -+ ww1(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv1/2 -+ -+ arg=(tpi/dble(ndiv1))*dble(i) -+ ww1(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww1(ndiv1+1-i)=conjg(ww1(i+1)) -+ -+ enddo -+ -+ ww2(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv2/2 -+ -+ arg=(tpi/dble(ndiv2))*dble(i) -+ ww2(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww2(ndiv2+1-i)=conjg(ww2(i+1)) -+ -+ enddo -+ -+ ww3(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv3/2 -+ -+ arg=(tpi/dble(ndiv3))*dble(i) -+ ww3(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww3(ndiv3+1-i)=conjg(ww3(i+1)) -+ -+ enddo -+ -+ return -+ end subroutine spl_cexp -+ -+ end module spme_module -diff -urN dl_class_1.9.orig/srcmod/temp_scalers_module.f dl_class_1.9/srcmod/temp_scalers_module.f ---- dl_class_1.9.orig/srcmod/temp_scalers_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/temp_scalers_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,768 @@ -+ module temp_scalers_module -+ -+c*********************************************************************** -+c -+c dl_poly module for temperature scaling routines -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use core_shell_module -+ use error_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use utility_module -+ -+ contains -+ -+ subroutine quench(imcon,idnode,mxnode,natms,nscons,tolnce) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for quenching the bond energies in the -+c initial structure of a molecule defined by constraints -+c -+c copyright - daresbury laboratory 1992 -+c author w.smith november 1992 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical safe -+ integer imcon,idnode,mxnode,natms,nscons,i,j,k,icyc -+ integer fail -+ real(8) tolnce,ddd,esig,vvv,ww1,ww2 -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+ dimension fail(3) -+ -+ data fail/0,0,0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(3)) -+ -+ do i=1,3 -+ if(fail(i).ne.0)call error(idnode,1770) -+ enddo -+ -+c calculate bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c normalise bond vectors -+ -+ do k=1,nscons -+ -+ ddd=sqrt(dxt(k)**2+dyt(k)**2+dzt(k)**2) -+ -+ dxt(k)=dxt(k)/ddd -+ dyt(k)=dyt(k)/ddd -+ dzt(k)=dzt(k)/ddd -+ -+ enddo -+ -+c start of quenching cycle -+ -+ icyc=0 -+ safe=.false. -+ do while(.not.safe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c initialise velocity correction arrays -+ -+ do i=1,natms -+ -+ uxx(i)=0.d0 -+ uyy(i)=0.d0 -+ uzz(i)=0.d0 -+ -+ enddo -+ -+c calculate velocity corrections and error -+ -+ esig=0.d0 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ vvv=dxt(k)*(vxx(i)-vxx(j))+dyt(k)*(vyy(i)-vyy(j))+ -+ x dzt(k)*(vzz(i)-vzz(j)) -+ -+ esig=max(esig,abs(vvv)) -+ -+ ww1=weight(j)*vvv/(weight(i)+weight(j)) -+ ww2=weight(i)*vvv/(weight(i)+weight(j)) -+ uxx(i)=uxx(i)-ww1*dxt(k) -+ uyy(i)=uyy(i)-ww1*dyt(k) -+ uzz(i)=uzz(i)-ww1*dzt(k) -+ uxx(j)=uxx(j)+ww2*dxt(k) -+ uyy(j)=uyy(j)+ww2*dyt(k) -+ uzz(j)=uzz(j)+ww2*dzt(k) -+ -+ enddo -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+ if(.not.safe)then -+ -+c transport velocity adjustments to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ call shmove -+ x (idnode,mxnode,natms,lashap,lishap,uxx,uyy,uzz, -+ x xxt,yyt,zzt,buffer) -+ -+ endif -+ -+c update velocities -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ vxx(i)=vxx(i)+uxx(i)/dble(listme(i)) -+ vyy(i)=vyy(i)+uyy(i)/dble(listme(i)) -+ vzz(i)=vzz(i)+uzz(i)/dble(listme(i)) -+ vxx(j)=vxx(j)+uxx(j)/dble(listme(j)) -+ vyy(j)=vyy(j)+uyy(j)/dble(listme(j)) -+ vzz(j)=vzz(j)+uzz(j)/dble(listme(j)) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c error exit if quenching fails -+ -+ if(.not.safe)call error(idnode,70) -+ -+c splice velocity arrays across nodes -+ -+ if(mxnode.gt.1) call splice -+ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,stat=fail(3)) -+ -+ return -+ end subroutine quench -+ -+ subroutine quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to convert atomic velocities to rigid body -+c c.o.m. and angular velocity -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1993. -+c author - t.forester nov 1993. -+c amended - t.forester dec 1994 : block data. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,mxnode,natms,ngrp,fail,ig,jr,id -+ integer igrp1,igrp2,i,j -+ real(8) rot,wxx,wyy,wzz -+ -+ dimension rot(9) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1780) -+ -+c block indices for groups -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c translate atomic velocites to com velocity & angular velocity -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=0.d0 -+ gvyy(ig)=0.d0 -+ gvzz(ig)=0.d0 -+ omx(ig)=0.d0 -+ omy(ig)=0.d0 -+ omz(ig)=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr =jr+1 -+ i =lstrgd(jr) -+ -+c centre of mass momentum -+ -+ gvxx(ig)=gvxx(ig)+weight(i)*vxx(i) -+ gvyy(ig)=gvyy(ig)+weight(i)*vyy(i) -+ gvzz(ig)=gvzz(ig)+weight(i)*vzz(i) -+ -+c distance to c.o.m of molecule -+ -+ xxt(jr)=xxx(i)-gcmx(ig) -+ yyt(jr)=yyy(i)-gcmy(ig) -+ zzt(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+c centre of mass velocity -+ -+ gvxx(ig)=gvxx(ig)/gmass(id) -+ gvyy(ig)=gvyy(ig)/gmass(id) -+ gvzz(ig)=gvzz(ig)/gmass(id) -+ -+ enddo -+ -+ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c rotational matrix -+ -+ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 -+ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) -+ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) -+ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) -+ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 -+ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) -+ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) -+ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) -+ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 -+ -+c angular momentum accumulators -+ -+ wxx=0.d0 -+ wyy=0.d0 -+ wzz=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr =jr+1 -+ i =lstrgd(jr) -+ -+ wxx=wxx+weight(i)*(yyt(jr)*vzz(i)-zzt(jr)*vyy(i)) -+ wyy=wyy+weight(i)*(zzt(jr)*vxx(i)-xxt(jr)*vzz(i)) -+ wzz=wzz+weight(i)*(xxt(jr)*vyy(i)-yyt(jr)*vxx(i)) -+ -+ enddo -+ -+c angular velocity in body fixed frame -+ -+ omx(ig)=(rot(1)*wxx+rot(4)*wyy+rot(7)*wzz)*rotinx(id,2) -+ omy(ig)=(rot(2)*wxx+rot(5)*wyy+rot(8)*wzz)*rotiny(id,2) -+ omz(ig)=(rot(3)*wxx+rot(6)*wyy+rot(9)*wzz)*rotinz(id,2) -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr +1 -+ i=lstrgd(jr) -+ -+c site velocity in body frame -+ -+ wxx=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ wyy=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ wzz=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*wxx+rot(2)*wyy+rot(3)*wzz+gvxx(ig) -+ vyy(i)=rot(4)*wxx+rot(5)*wyy+rot(6)*wzz+gvyy(ig) -+ vzz(i)=rot(7)*wxx+rot(8)*wyy+rot(9)*wzz+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,omx,omy,omz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail) -+ -+ return -+ end subroutine quatqnch -+ -+ subroutine vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for scaling the velocity arrays to the -+c desired temperature -+c -+c zeroes angular momentum in non-periodic system. -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1992. -+c author - w.smith july 1992 -+c amended - t.forester oct 1993 -+c amended - t.forester dec 1994 : block data -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,imcon,natms,ngrp,iatm1,iatm2,i -+ real(8) sigma,roti,rotinv,cmx,cmy,cmz,cmvx,cmvy,cmvz,sysmas -+ real(8) amx,amy,amz,det,scale,rsq,wxx,wyy,wzz,sumke -+ -+ dimension roti(9),rotinv(9) -+ -+c block indices -+ -+ iatm1=(idnode*natms)/mxnode+1 -+ iatm2=((idnode+1)*natms)/mxnode -+ -+c calculate centre of mass position and motion of the system -+ -+ cmx=0.d0 -+ cmy=0.d0 -+ cmz=0.d0 -+ cmvx=0.d0 -+ cmvy=0.d0 -+ cmvz=0.d0 -+ sysmas=0.d0 -+ -+ do i=iatm1,iatm2 -+ -+ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then -+ -+ cmx=cmx+weight(i)*xxx(i) -+ cmy=cmy+weight(i)*yyy(i) -+ cmz=cmz+weight(i)*zzz(i) -+ sysmas=sysmas+weight(i) -+ cmvx=cmvx+vxx(i)*weight(i) -+ cmvy=cmvy+vyy(i)*weight(i) -+ cmvz=cmvz+vzz(i)*weight(i) -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ buffer(8)=sysmas -+ buffer(9)=cmx -+ buffer(10)=cmy -+ buffer(11)=cmz -+ buffer(12)=cmvx -+ buffer(13)=cmvy -+ buffer(14)=cmvz -+ call gdsum(buffer(8),7,buffer(1)) -+ sysmas= buffer(8) -+ cmx=buffer(9) -+ cmy=buffer(10) -+ cmz=buffer(11) -+ cmvx=buffer(12) -+ cmvy=buffer(13) -+ cmvz=buffer(14) -+ endif -+ -+ cmx=cmx/sysmas -+ cmy=cmy/sysmas -+ cmz=cmz/sysmas -+ -+ cmvx=cmvx/sysmas -+ cmvy=cmvy/sysmas -+ cmvz=cmvz/sysmas -+ -+c remove centre of mass motion -+ -+ do i=1,natms -+ -+ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then -+ -+ vxx(i)=vxx(i)-cmvx -+ vyy(i)=vyy(i)-cmvy -+ vzz(i)=vzz(i)-cmvz -+ -+ else -+ -+ vxx(i)=0.d0 -+ vyy(i)=0.d0 -+ vzz(i)=0.d0 -+ -+ endif -+ -+ enddo -+ -+c zero angular momentum about centre of mass - non-periodic system -+ -+ if(imcon.eq.0)then -+ -+c move to centre of mass origin -+ -+ do i=1,natms -+ -+ xxx(i)=xxx(i)-cmx -+ yyy(i)=yyy(i)-cmy -+ zzz(i)=zzz(i)-cmz -+ -+ enddo -+ -+c angular momentum accumulators -+ -+ amx=0.d0 -+ amy=0.d0 -+ amz=0.d0 -+ -+c rotational inertia accumulators -+ -+ do i=1,9 -+ roti(i)=0.d0 -+ enddo -+ -+ do i=iatm1,iatm2 -+ -+ amx=amx+weight(i)*(yyy(i)*vzz(i)-zzz(i)*vyy(i)) -+ amy=amy+weight(i)*(zzz(i)*vxx(i)-xxx(i)*vzz(i)) -+ amz=amz+weight(i)*(xxx(i)*vyy(i)-yyy(i)*vxx(i)) -+ -+ rsq=xxx(i)**2+yyy(i)**2+zzz(i)**2 -+ roti(1)=roti(1)+weight(i)*(xxx(i)*xxx(i)-rsq) -+ roti(2)=roti(2)+weight(i)* xxx(i)*yyy(i) -+ roti(3)=roti(3)+weight(i)* xxx(i)*zzz(i) -+ roti(5)=roti(5)+weight(i)*(yyy(i)*yyy(i)-rsq) -+ roti(6)=roti(6)+weight(i)* yyy(i)*zzz(i) -+ roti(9)=roti(9)+weight(i)*(zzz(i)*zzz(i)-rsq) -+ -+ enddo -+ -+c complete rotational inertia matrix -+ -+ roti(4)=roti(2) -+ roti(7)=roti(3) -+ roti(8)=roti(6) -+ -+c global sum -+ -+ if(mxnode.gt.1)then -+ buffer(13)=amx -+ buffer(14)=amy -+ buffer(15)=amz -+ do i=1,9 -+ buffer(15+i)=roti(i) -+ enddo -+ call gdsum(buffer(13),12,buffer(1)) -+ amx=buffer(13) -+ amy=buffer(14) -+ amz=buffer(15) -+ do i=1,9 -+ roti(i)=buffer(15+i) -+ enddo -+ endif -+ -+c invert rotational inertia matrix -+ -+ call invert (roti,rotinv,det) -+ -+c correction to angular velocity -+ -+ wxx=rotinv(1)*amx+rotinv(2)*amy+rotinv(3)*amz -+ wyy=rotinv(4)*amx+rotinv(5)*amy+rotinv(6)*amz -+ wzz=rotinv(7)*amx+rotinv(8)*amy+rotinv(9)*amz -+ -+c correction to linear velocity -+ -+ do i=1,natms -+ -+ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then -+ -+ vxx(i)=vxx(i)+(wyy*zzz(i)-wzz*yyy(i)) -+ vyy(i)=vyy(i)+(wzz*xxx(i)-wxx*zzz(i)) -+ vzz(i)=vzz(i)+(wxx*yyy(i)-wyy*xxx(i)) -+ -+ endif -+ -+ enddo -+ -+c reset positions to original reference frame -+ -+ do i=1,natms -+ -+ xxx(i)=xxx(i)+cmx -+ yyy(i)=yyy(i)+cmy -+ zzz(i)=zzz(i)+cmz -+ -+ enddo -+ -+ endif -+ -+c calculate temperature -+ -+ sumke=0.d0 -+ -+ do i=iatm1,iatm2 -+ -+ sumke=sumke+weight(i)* -+ x (vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ -+ enddo -+ -+ sumke=0.5d0*sumke -+ if(mxnode.gt.1)then -+ buffer(1)=sumke -+ call gdsum(buffer(1),1,buffer(2)) -+ sumke=buffer(1) -+ endif -+ -+c apply temperature scaling -+ -+ scale=1.d0 -+ if(sumke.gt.1.d-6)scale=sqrt(sigma/sumke) -+ -+ do i=1,natms -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+ if(ngrp.gt.0)then -+ call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ endif -+ -+ return -+ end subroutine vscaleg -+ -+ subroutine shlqnch(idnode,mxnode,ntshl,temp) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for quenching the internal bond energies -+c in ions defined by shell model -+c -+c copyright - daresbury laboratory 1994 -+c author w.smith july 1994 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m -+ real(8) temp,pke,rmu,dvx,dvy,dvz,tmx,tmy,tmz,scl -+ -+c permitted core-shell internal kinetic energy -+ -+ pke=boltz*temp*1.d-4 -+ -+c block indices -+ -+ ishl1 = (idnode*ntshl)/mxnode+1 -+ ishl2 = ((idnode+1)*ntshl)/mxnode -+ -+c calculate core and shell velocities from total momentum -+ -+ m=0 -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+ rmu=(weight(i)*weight(j))/(weight(i)+weight(j)) -+ -+ if(rmu.gt.0.d0)then -+ -+ dvx=vxx(j)-vxx(i) -+ dvy=vyy(j)-vyy(i) -+ dvz=vzz(j)-vzz(i) -+ -+ scl=sqrt(pke/(rmu*(dvx*dvx+dvy*dvy+dvz*dvz))) -+ -+ tmx=weight(i)*vxx(i)+weight(j)*vxx(j) -+ tmy=weight(i)*vyy(i)+weight(j)*vyy(j) -+ tmz=weight(i)*vzz(i)+weight(j)*vzz(j) -+ -+ vxx(i)=tmx/(weight(i)+weight(j))-scl*rmu*dvx/weight(i) -+ vxx(j)=tmx/(weight(i)+weight(j))+scl*rmu*dvx/weight(j) -+ vyy(i)=tmy/(weight(i)+weight(j))-scl*rmu*dvy/weight(i) -+ vyy(j)=tmy/(weight(i)+weight(j))+scl*rmu*dvy/weight(j) -+ vzz(i)=tmz/(weight(i)+weight(j))-scl*rmu*dvz/weight(i) -+ vzz(j)=tmz/(weight(i)+weight(j))+scl*rmu*dvz/weight(j) -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1) call shlmerge(idnode,mxnode,ntshl) -+ -+ return -+ end subroutine shlqnch -+ -+ subroutine regauss -+ x (idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for resetting the system velocities -+c -+c copyright - daresbury laboratory -+c author - w. smith may 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,mxnode,natms,ngrp,nscons -+ integer ntcons,ntshl,i,k,keyshl -+ real(8) temp,tolnce,sigma,rsq -+ -+c set atomic velocities from gaussian distribution -+ -+ call gauss(natms,vxx,vyy,vzz) -+ -+ do i=1,natms -+ -+ rsq=sqrt(rmass(i)) -+ vxx(i)=vxx(i)*rsq -+ vyy(i)=vyy(i)*rsq -+ vzz(i)=vzz(i)*rsq -+ -+ enddo -+ -+ if(ntcons.gt.0)call quench -+ x (imcon,idnode,mxnode,natms,nscons,tolnce) -+ -+ if(ngrp.gt.0)call quatqnch -+ x (idnode,imcon,mxnode,natms,ngrp) -+ -+ if(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ return -+ end subroutine regauss -+ -+ subroutine impact(khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) -+ -+c********************************************************************* -+c -+c DLPOLY routinue for impacting a selected atom with a specified -+c recoil energy -+c -+c copyright daresbury laboratory -+c author w.smith september 2007 -+c -+c********************************************************************* -+ -+ use config_module -+ use ensemble_tools_module -+ -+ implicit none -+ -+ integer i,khit,natms,idnode,mxnode,iatm0,iatm1 -+ real(8) ehit,vxo,vyo,vzo,xhit,yhit,zhit,fac,smass,vel -+ -+c store original particle velocity -+ -+ vxo=vxx(khit) -+ vyo=vyy(khit) -+ vzo=vzz(khit) -+ -+c determine recoil velocity -+ -+ vel=sqrt(2.d0*ehit/(weight(khit)*(xhit**2+yhit**2+zhit**2))) -+ -+c reassign particle velocity -+ -+ vxx(khit)=vel*xhit -+ vyy(khit)=vel*yhit -+ vzz(khit)=vel*zhit -+ -+c determine system mass -+ -+ smass=getmass(natms,idnode,mxnode) -+ -+c calculate net system velocity -+ -+ vxo=(vxx(khit)-vxo)*weight(khit)/smass -+ vyo=(vyy(khit)-vyo)*weight(khit)/smass -+ vzo=(vzz(khit)-vzo)*weight(khit)/smass -+ -+c reset system net velocity to zero -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vxo -+ vyy(i)=vyy(i)-vyo -+ vzz(i)=vzz(i)-vzo -+ -+ enddo -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ return -+ end subroutine impact -+ -+ end module temp_scalers_module -diff -urN dl_class_1.9.orig/srcmod/tersoff_module.f dl_class_1.9/srcmod/tersoff_module.f ---- dl_class_1.9.orig/srcmod/tersoff_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/tersoff_module.f 2011-04-16 16:13:06.000000000 +0200 -@@ -0,0 +1,1011 @@ -+ module tersoff_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining tersoff potential arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith dec 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use parse_module -+ use setup_module -+ use site_module -+ use utility_module -+ -+ implicit none -+ -+ logical, allocatable :: filter(:) -+ integer, allocatable :: lstter(:),ltpter(:),lattsf(:) -+ real(8), allocatable :: prmter(:,:),prmter2(:,:) -+ real(8), allocatable :: vmbp(:,:,:),gmbp(:,:,:) -+ real(8), allocatable :: xtf(:),ytf(:),ztf(:),rtf(:) -+ real(8), allocatable :: ert(:),eat(:),grt(:),gat(:) -+ real(8), allocatable :: scr(:),gcr(:),gam(:),gvr(:) -+ -+ save xtf,ytf,ztf,rtf,ert,eat,grt,gat,scr,gcr,gam,filter -+ save prmter,prmter2,lstter,ltpter,lattsf,vmbp,gmbp -+ -+ contains -+ -+ subroutine alloc_ter_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=20 -+ -+ integer i,fail,idnode,npairs -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ npairs=(mxter*(mxter+1))/2 -+ allocate (prmter(mxter,mxpter),stat=fail(1)) -+ allocate (prmter2(2,npairs),stat=fail(2)) -+ allocate (lstter(mxter),stat=fail(3)) -+ allocate (ltpter(mxter),stat=fail(4)) -+ allocate (lattsf(mxatms),stat=fail(5)) -+ allocate (xtf(mxatms),stat=fail(6)) -+ allocate (ytf(mxatms),stat=fail(7)) -+ allocate (ztf(mxatms),stat=fail(8)) -+ allocate (rtf(mxatms),stat=fail(9)) -+ allocate (ert(mxatms),stat=fail(10)) -+ allocate (eat(mxatms),stat=fail(11)) -+ allocate (grt(mxatms),stat=fail(12)) -+ allocate (gat(mxatms),stat=fail(13)) -+ allocate (scr(mxatms),stat=fail(14)) -+ allocate (gcr(mxatms),stat=fail(15)) -+ allocate (gam(mxatms),stat=fail(16)) -+ allocate (gvr(mxatms),stat=fail(17)) -+ allocate (vmbp(mxgrid,npairs,3),stat=fail(18)) -+ allocate (gmbp(mxgrid,npairs,3),stat=fail(19)) -+ allocate (filter(mxsite),stat=fail(20)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1945) -+ enddo -+ -+ end subroutine alloc_ter_arrays -+ -+ subroutine define_tersoff -+ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining tersoff potentials -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits,lmols -+ character*8 keyword -+ character*8 atom0,atom1 -+ character*1 message(80) -+ integer fail,idnode,ntpter,ntpatm,i,idum,j,itpter -+ integer keypot,jtpatm,k,katm0,katm1,icross,npairs,ktyp -+ real(8) rctter,engunit -+ real(8), allocatable :: parpot(:) -+ data fail/0/ -+ -+ allocate (parpot(mxpter),stat=fail) -+ if(fail.ne.0)call error(idnode,1955) -+ -+ ntpter=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'number of specified tersoff ', -+ x 'atom potentials',i10)") ntpter -+ write(nrite,"(/,/,16x,'atom ',3x,' key',30x, -+ x 'parameters'/,/)") -+ -+ endif -+ if(ntpter.gt.mxter) call error(idnode,88) -+ if(.not.lunits) call error(idnode,6) -+ if(.not.lmols) call error(idnode,13) -+ -+ rctter=0.d0 -+ -+ do i=1,mxter -+ lstter(i)=-1 -+ enddo -+ -+ do i=1,mxsite -+ filter(i)=.false. -+ enddo -+ -+ k=0 -+ do i=1,mxter -+ do j=1,i -+ -+ k=k+1 -+ prmter2(1,k)=0.d0 -+ prmter2(2,k)=0.d0 -+ -+ enddo -+ enddo -+ -+ do itpter=1,ntpter -+ -+ do i=1,mxpter -+ parpot(i)=0.d0 -+ enddo -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call getword(atom0,record,8,lenrec) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'ters') then -+ -+ keypot=1 -+ -+ else -+ -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,1972) -+ -+ endif -+ -+ parpot(1)=dblstr(record,lenrec,idum) ! A_i -+ parpot(2)=dblstr(record,lenrec,idum) ! a_i -+ parpot(3)=dblstr(record,lenrec,idum) ! B_i -+ parpot(4)=dblstr(record,lenrec,idum) ! b_i -+ parpot(5)=dblstr(record,lenrec,idum) ! R_i -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ parpot(6)=dblstr(record,lenrec,idum) ! S_i -+ parpot(7)=dblstr(record,lenrec,idum) ! beta_i -+ parpot(8)=dblstr(record,lenrec,idum) ! eta_i -+ parpot(9)=dblstr(record,lenrec,idum) ! c_i -+ parpot(10)=dblstr(record,lenrec,idum) ! d_i -+ parpot(11)=dblstr(record,lenrec,idum) ! h_i -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(16x,a8,2x,a4,2x,1p,5e13.5)") -+ x atom0,keyword(1:4),(parpot(j),j=1,5) -+ write(nrite,"(32x,1p,5e13.5)")(parpot(j),j=6,mxpter) -+ -+ endif -+ -+ katm0=0 -+ -+ do jtpatm=1,ntpatm -+ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm -+ enddo -+ -+ if(katm0.eq.0)call error(idnode,92) -+ -+ filter(katm0)=.true. -+ -+c convert parameters to internal units -+ -+ if(keypot.eq.1)then -+ -+ parpot(1)=parpot(1)*engunit -+ parpot(3)=parpot(3)*engunit -+ -+ endif -+ if(lstter(katm0).gt.-1) call error(idnode,21) -+ lstter(katm0)=itpter -+ ltpter(itpter)=keypot -+ -+c calculate max tersoff cutoff -+ -+ rctter=max(rctter,parpot(6)) -+ -+c store tersoff single atom potential parameters -+ -+ do i=1,mxpter -+ prmter(itpter,i)=parpot(i) -+ enddo -+ -+ enddo -+ -+ if(rctter.lt.1.d-6)call error(idnode,1953) -+ -+c start processing double atom potential parameters -+ -+ npairs=(ntpter*(ntpter+1))/2 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,/,1x,'number of tersoff ', -+ x 'cross terms',i10)") npairs -+ write(nrite,"(/,/,16x,'atom ','atom ',10x, -+ x 'parameters'/,/)") -+ -+ endif -+ -+ do icross=1,npairs -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call getword(atom0,record,8,lenrec) -+ call getword(atom1,record,8,lenrec) -+ -+ parpot(1)=dblstr(record,lenrec,idum) ! chi_ij -+ parpot(2)=dblstr(record,lenrec,idum) ! omega_ij -+ -+ katm0=0 -+ katm1=0 -+ -+ do jtpatm=1,ntpatm -+ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ enddo -+ -+ if(katm0.eq.0.or.katm1.eq.0)call error(idnode,92) -+ -+ filter(katm0)=.true. -+ filter(katm1)=.true. -+ -+ ktyp=loc2(lstter(katm0),lstter(katm1)) -+ prmter2(1,ktyp)=parpot(1) -+ prmter2(2,ktyp)=parpot(2) -+ -+ if(idnode.eq.0)write(nrite,"(16x,a8,a8,1p,2e13.5)") -+ x atom0,atom1,(parpot(j),j=1,2) -+ -+ enddo -+ -+c generate tersoff interpolation arrays -+ -+ call tergen(ntpatm,rctter) -+ -+ return -+ end subroutine define_tersoff -+ -+ subroutine tergen(ntpatm,rctter) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for generating potential energy and -+c force arrays for tersoff forces only -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w. smith dec 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer ntpatm,katm0,katm1,ipt,jpt,kpt,i -+ real(8) dlrpot,rctter,baij,saij,bbij,sbij,rij,sij,att,arg -+ real(8) rrr,rep -+ -+c define grid resolution for potential arrays -+ -+ dlrpot=rctter/dble(mxgrid-4) -+ -+c construct arrays for all types of short ranged potential -+ -+ do katm0=1,ntpatm -+ -+ if(filter(katm0))then -+ -+ ipt=lstter(katm0) -+ -+ do katm1=1,katm0 -+ -+ if(filter(katm1))then -+ -+ jpt=lstter(katm1) -+ -+ if((ltpter(ipt).eq.1).and.(ltpter(jpt).eq.1))then -+ -+ kpt=loc2(ipt,jpt) -+ -+c define tersoff parameters -+ -+ baij=sqrt(prmter(ipt,1)*prmter(jpt,1)) -+ saij=0.5d0*(prmter(ipt,2)+prmter(jpt,2)) -+ bbij=sqrt(prmter(ipt,3)*prmter(jpt,3)) -+ sbij=0.5d0*(prmter(ipt,4)+prmter(jpt,4)) -+ rij=sqrt(prmter(ipt,5)*prmter(jpt,5)) -+ sij=sqrt(prmter(ipt,6)*prmter(jpt,6)) -+ -+c store potential cutoff -+ -+ vmbp(1,kpt,1)=sij -+ -+c calculate screening function -+ -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ -+ if(rrr.le.rij)then -+ -+ vmbp(i,kpt,1)=1.d0 -+ gmbp(i,kpt,1)=0.d0 -+ -+ else -+ -+ arg=pi*(rrr-rij)/(sij-rij) -+ vmbp(i,kpt,1)=0.5d0*(1.d0+cos(arg)) -+ gmbp(i,kpt,1)=0.5d0*pi*rrr*sin(arg)/(sij-rij) -+ -+ endif -+ -+ enddo -+ -+c calculate screened repulsion function -+ -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ -+ rep=baij*exp(-saij*rrr) -+ vmbp(i,kpt,2)=rep*vmbp(i,kpt,1) -+ gmbp(i,kpt,2)=rep*(gmbp(i,kpt,1)+ -+ x saij*rrr*vmbp(i,kpt,1)) -+ -+ enddo -+ -+c calculate screened attraction function -+ -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ -+ att=bbij*exp(-sbij*rrr) -+ vmbp(i,kpt,3)=att*vmbp(i,kpt,1) -+ gmbp(i,kpt,3)=att*(gmbp(i,kpt,1)+ -+ x sbij*rrr*vmbp(i,kpt,1)) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine tergen -+ -+ subroutine tersoff -+ x (idnode,mxnode,natms,imcon,rctter,engter,virter) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating potential and forces -+c due to a tersoff potential -+c -+c Note: the subroutine converts coordinates to reduced units -+c to avoid a call to images.f. The link cell algorithm used -+c here necessitates a parallelepiped, cubic or orthorhombic -+c cell geometry -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w.smith dec 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer idnode,mxnode,natms,imcon,nix,niy,niz,i,j,nbx -+ integer nby,nbz,ncells,l,ix,iy,iz,k,icell,kk,jx,jy,jz,jcell,iter -+ integer limit,ii,iatm -+ real(8) rctter,engter,virter,xm,ym,zm,det,cprp -+ real(8) xdc,ydc,zdc,sxx,syy,szz,strs -+ -+ dimension nix(27),niy(27),niz(27),cprp(10),strs(6) -+ -+ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, -+ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ -+ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, -+ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ -+ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ -+ -+c flag for undefined potentials -+ -+ safe=.true. -+ -+c initialise potential energy and virial -+ -+ engter=0.d0 -+ virter=0.d0 -+ -+c create mock cell vectors for non-periodic system -+ -+ if(imcon.eq.0) then -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ -+ do i=1,natms -+ -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ -+ enddo -+ -+ cell(1)=2.d0*xm+rctter -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(5)=2.d0*ym+rctter -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ cell(9)=2.d0*zm+rctter -+ -+ endif -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ -+c check for appropriate boundary conditions -+ -+ if(imcon.gt.3)call error(idnode,1974) -+ call invert(cell,rcell,det) -+ call dcell(cell,cprp) -+ -+c calculate link cell numbers -+ -+ nbx=int(cprp(7)/(rctter+1.d-6)) -+ nby=int(cprp(8)/(rctter+1.d-6)) -+ nbz=int(cprp(9)/(rctter+1.d-6)) -+ if(nbx.lt.3.or.nby.lt.3.or.nbz.lt.3)then -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,'(a,3i5)') -+ x 'tersoff link cell decomposition is',nbx,nby,nbz -+ -+ endif -+ -+ call error(idnode,1977) -+ -+ endif -+ ncells=nbx*nby*nbz -+ -+ if(ncells.gt.mxcell) then -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,'(a,i6)') -+ x 'number of required link cells in tersoff.f is ',ncells -+ write(nrite,'(a,i6)') -+ x 'number of default link cells in tersoff.f is ',mxcell -+ call error(idnode,1976) -+ -+ endif -+ -+ endif -+ -+c transform atomic coordinates and construct link cells -+ -+ do l=1,ncells -+ -+ lct(l)=0 -+ lst(l)=0 -+ -+ enddo -+ -+ xdc=dble(nbx) -+ ydc=dble(nby) -+ zdc=dble(nbz) -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ xxx(i)=sxx -+ yyy(i)=syy -+ zzz(i)=szz -+ -+ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) -+ iy=min(int(ydc*(syy+0.5d0)),nby-1) -+ iz=min(int(zdc*(szz+0.5d0)),nbz-1) -+ k=1+ix+nbx*(iy+nby*iz) -+ lst(k)=lst(k)+1 -+ link(i)=lct(k) -+ lct(k)=i -+ -+ endif -+ -+ enddo -+ -+c loop over central atoms of angles -+ -+ ix=0 -+ iy=1 -+ iz=1 -+ do icell=1,ncells -+ -+ ix=ix+1 -+ if(ix.gt.nbx)then -+ ix=1 -+ iy=iy+1 -+ if(iy.gt.nby)then -+ iy=1 -+ iz=iz+1 -+ endif -+ endif -+ -+c construct mini-list of neighbour cell contents -+ -+ k=0 -+ do kk=1,27 -+ -+ jx=ix+nix(kk) -+ jy=iy+niy(kk) -+ jz=iz+niz(kk) -+ -+ if(jx.gt.nbx)jx=1 -+ if(jy.gt.nby)jy=1 -+ if(jz.gt.nbz)jz=1 -+ if(jx.lt.1)jx=jx+nbx -+ if(jy.lt.1)jy=jy+nby -+ if(jz.lt.1)jz=jz+nbz -+ -+ jcell=jx+nbx*(jy-1+nby*(jz-1)) -+ j=lct(jcell) -+ -+ do ii=1,lst(jcell) -+ -+ k=k+1 -+ lattsf(k)=j -+ j=link(j) -+ -+ enddo -+ -+ enddo -+ -+ limit=k -+ -+ do ii=1,lst(icell) -+ -+ iatm=lattsf(ii) -+ iter=lstter(ltype(iatm)) -+ -+ if(mod(iatm,mxnode).eq.idnode.and.iter.ge.0)then -+ -+c construct working arrays by interpolation -+ -+ call terint(iatm,limit,rctter) -+ -+c calculate three body (attractive) terms -+ -+ call tersoff3(ii,limit,engter,virter,strs) -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c calculate stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,1978) -+ -+c global sum of three body potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engter -+ buffer(2)=virter -+ call gdsum(buffer(1),2,buffer(3)) -+ engter=buffer(1) -+ virter=buffer(2) -+ -+ endif -+ -+c remove effect of double counting -+ -+ engter=0.5d0*engter -+ virter=0.5d0*virter -+ -+c restore coordinate array to original representation -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=xxx(i) -+ syy=yyy(i) -+ szz=zzz(i) -+ -+ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz -+ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz -+ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz -+ -+ endif -+ -+ enddo -+ -+c restore cell vector -+ -+ if(imcon.eq.0) then -+ cell(1)=0.d0 -+ cell(5)=0.d0 -+ cell(9)=0.d0 -+ endif -+ -+ return -+ end subroutine tersoff -+ -+ subroutine terint(iatm,limit,rctter) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing working arrays for -+c a tersoff potential using interpolation -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w.smith dec 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer iatm,jatm,jj,limit,iter,jter,jjter,ll -+ real(8) rctter,sxij,syij,szij,ppp,t1,t2,rdr -+ real(8) vk0,vk1,vk2,gk0,gk1,gk2 -+ -+ rdr=dble(mxgrid-4)/rctter -+ iter=lstter(ltype(iatm)) -+ -+c initialise working arrays -+ -+ do jj=1,limit -+ -+ xtf(jj)=0.d0 -+ ytf(jj)=0.d0 -+ ztf(jj)=0.d0 -+ rtf(jj)=0.d0 -+ ert(jj)=0.d0 -+ eat(jj)=0.d0 -+ grt(jj)=0.d0 -+ gat(jj)=0.d0 -+ scr(jj)=0.d0 -+ gcr(jj)=0.d0 -+ -+ enddo -+ -+c construct working arrays -+ -+ do jj=1,limit -+ -+ jatm=lattsf(jj) -+ jter=lstter(ltype(jatm)) -+ -+ if(jatm.ne.iatm.and.jter.ge.0)then -+ -+ sxij=xxx(jatm)-xxx(iatm) -+ sxij=sxij-nint(sxij) -+ syij=yyy(jatm)-yyy(iatm) -+ syij=syij-nint(syij) -+ szij=zzz(jatm)-zzz(iatm) -+ szij=szij-nint(szij) -+ -+ xtf(jj)=cell(1)*sxij+cell(4)*syij+cell(7)*szij -+ ytf(jj)=cell(2)*sxij+cell(5)*syij+cell(8)*szij -+ ztf(jj)=cell(3)*sxij+cell(6)*syij+cell(9)*szij -+ rtf(jj)=sqrt(xtf(jj)**2+ytf(jj)**2+ztf(jj)**2) -+ xtf(jj)=xtf(jj)/rtf(jj) -+ ytf(jj)=ytf(jj)/rtf(jj) -+ ztf(jj)=ztf(jj)/rtf(jj) -+ -+ jjter=loc2(iter,jter) -+ if(rtf(jj).le.vmbp(1,jjter,1))then -+ -+ ll=int(rdr*rtf(jj)) -+ ppp=rtf(jj)*rdr-dble(ll) -+ -+c interpolate screening function -+ -+ vk0=vmbp(ll,jjter,1) -+ vk1=vmbp(ll+1,jjter,1) -+ vk2=vmbp(ll+2,jjter,1) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ scr(jj)=t1+(t2-t1)*ppp*0.5d0 -+ -+c interpolate derivative of screening function -+ -+ gk0=gmbp(ll,jjter,1) -+ gk1=gmbp(ll+1,jjter,1) -+ gk2=gmbp(ll+2,jjter,1) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ gcr(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) -+ -+c interpolate repulsive component of energy -+ -+ vk0=vmbp(ll,jjter,2) -+ vk1=vmbp(ll+1,jjter,2) -+ vk2=vmbp(ll+2,jjter,2) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ ert(jj)=t1+(t2-t1)*ppp*0.5d0 -+ -+c interpolate derivative of repulsive function -+ -+ gk0=gmbp(ll,jjter,2) -+ gk1=gmbp(ll+1,jjter,2) -+ gk2=gmbp(ll+2,jjter,2) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ grt(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) -+ -+c interpolate attractive component of energy -+ -+ vk0=vmbp(ll,jjter,3) -+ vk1=vmbp(ll+1,jjter,3) -+ vk2=vmbp(ll+2,jjter,3) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ eat(jj)=t1+(t2-t1)*ppp*0.5d0 -+ -+c interpolate derivative of attractive function -+ -+ gk0=gmbp(ll,jjter,3) -+ gk1=gmbp(ll+1,jjter,3) -+ gk2=gmbp(ll+2,jjter,3) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ gat(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine terint -+ -+ subroutine tersoff3(ii,limit,engter,virter,strs) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating three body contributions -+c to a tersoff potential and tersoff potential, virial and -+c atomic forces -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w.smith dec 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical flag -+ integer iatm,jatm,katm,limit,ii,jj,kk -+ integer iter,jter,kter,jjter,kkter -+ real(8) cost,gtheta,ci,di,hi,gamma,gam_j,gam_k,eterm,gterm,strs -+ real(8) fxa,fya,fza,fxc,fyc,fzc,engter,virter,vterm,gam_ij,bi,ei -+ -+ dimension strs(6) -+ -+ iatm=lattsf(ii) -+ iter=lstter(ltype(iatm)) -+ -+ bi=prmter(iter,7) -+ ei=prmter(iter,8) -+ ci=prmter(iter,9) -+ di=prmter(iter,10) -+ hi=prmter(iter,11) -+ -+ do jj=1,limit -+ -+ jatm=lattsf(jj) -+ jter=lstter(ltype(jatm)) -+ if(jter.ge.0.and.iatm.ne.jatm)then -+ -+ jjter=loc2(iter,jter) -+ if(rtf(jj).le.vmbp(1,jjter,1))then -+ -+ flag=.false. -+ -+c potential energy and virial terms -+ -+ vterm=0.d0 -+ eterm=0.d0 -+ -+c initialise work arrays -+ -+ do kk=1,limit -+ -+ gam(kk)=0.d0 -+ gvr(kk)=0.d0 -+ -+ enddo -+ -+c calculate bond factor -+ -+ do kk=1,limit -+ -+ katm=lattsf(kk) -+ kter=lstter(ltype(katm)) -+ if(kter.ge.0.and.iatm.ne.katm.and.jatm.ne.katm)then -+ -+ kkter=loc2(iter,kter) -+ -+ if(rtf(kk).le.vmbp(1,kkter,1))then -+ -+ cost=(xtf(jj)*xtf(kk)+ytf(jj)*ytf(kk)+ztf(jj)*ztf(kk)) -+ gtheta=1.d0+(ci/di)**2-ci**2/(di**2+(hi-cost)**2) -+ eterm=eterm+gtheta*prmter2(2,kkter)*scr(kk) -+ vterm=vterm+gtheta*prmter2(2,kkter)*gcr(kk)*rtf(kk) -+ gvr(kk)=2.d0*ci**2*(hi-cost)/(di**2+(hi-cost)**2)**2 -+ gam(kk)=gtheta -+ flag=.true. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(flag)then -+ -+c tersoff energy and virial -+ -+ gam_ij=prmter2(1,jjter)*(1.d0+(bi*eterm)**ei)**(-0.5d0/ei) -+ gamma=0.5d0*prmter2(1,jjter)*bi*(bi*eterm)**(ei-1.d0)* -+ x eat(jj)*(1.d0+(bi*eterm)**ei)**(-0.5d0/ei-1.d0) -+ engter=engter+ert(jj)-gam_ij*eat(jj) -+ virter=virter+gamma*vterm+(grt(jj)-gam_ij*gat(jj))*rtf(jj) -+ -+c calculate 3-body forces -+ -+ do kk=1,limit -+ -+ katm=lattsf(kk) -+ kter=lstter(ltype(katm)) -+ if(kter.ge.0.and.iatm.ne.katm.and.jatm.ne.katm)then -+ -+ kkter=loc2(iter,kter) -+ if(rtf(kk).le.vmbp(1,kkter,1))then -+ -+ gam_j=0.5d0*gamma*prmter2(2,kkter)*scr(kk)*gvr(kk) -+ gam_k=0.5d0*gamma*prmter2(2,kkter)*gcr(kk)*gam(kk) -+ -+c calculate contribution to atomic forces -+ -+ cost=(xtf(jj)*xtf(kk)+ytf(jj)*ytf(kk)+ -+ x ztf(jj)*ztf(kk)) -+ -+ fxa=gam_j*(xtf(kk)-xtf(jj)*cost)/rtf(jj) -+ fya=gam_j*(ytf(kk)-ytf(jj)*cost)/rtf(jj) -+ fza=gam_j*(ztf(kk)-ztf(jj)*cost)/rtf(jj) -+ -+ fxc=gam_j*(xtf(jj)-xtf(kk)*cost)/rtf(kk)- -+ x gam_k*xtf(kk) -+ fyc=gam_j*(ytf(jj)-ytf(kk)*cost)/rtf(kk)- -+ x gam_k*ytf(kk) -+ fzc=gam_j*(ztf(jj)-ztf(kk)*cost)/rtf(kk)- -+ x gam_k*ztf(kk) -+ -+ fxx(jatm)=fxx(jatm)+fxa -+ fyy(jatm)=fyy(jatm)+fya -+ fzz(jatm)=fzz(jatm)+fza -+ -+ fxx(iatm)=fxx(iatm)-(fxa+fxc) -+ fyy(iatm)=fyy(iatm)-(fya+fyc) -+ fzz(iatm)=fzz(iatm)-(fza+fzc) -+ -+ fxx(katm)=fxx(katm)+fxc -+ fyy(katm)=fyy(katm)+fyc -+ fzz(katm)=fzz(katm)+fzc -+ -+c calculate contributions to stress tensor -+ -+ strs(1)=strs(1)+(fxa*xtf(jj)*rtf(jj)+ -+ x fxc*xtf(kk)*rtf(kk)) -+ strs(2)=strs(2)+(fxa*ytf(jj)*rtf(jj)+ -+ x fxc*ytf(kk)*rtf(kk)) -+ strs(3)=strs(3)+(fxa*ztf(jj)*rtf(jj)+ -+ x fxc*ztf(kk)*rtf(kk)) -+ strs(4)=strs(4)+(fya*ytf(jj)*rtf(jj)+ -+ x fyc*ytf(kk)*rtf(kk)) -+ strs(5)=strs(5)+(fya*ztf(jj)*rtf(jj)+ -+ x fyc*ztf(kk)*rtf(kk)) -+ strs(6)=strs(6)+(fza*ztf(jj)*rtf(jj)+ -+ x fzc*ztf(kk)*rtf(kk)) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ else -+ -+ gam_ij=prmter2(1,jjter) -+ engter=engter+ert(jj)-gam_ij*eat(jj) -+ virter=virter+(grt(jj)-gam_ij*gat(jj))*rtf(jj) -+ -+ endif -+ -+c calculate two body force terms -+ -+ gterm=0.5d0*(grt(jj)-gam_ij*gat(jj)) -+ fxx(iatm)=fxx(iatm)+xtf(jj)*gterm -+ fyy(iatm)=fyy(iatm)+ytf(jj)*gterm -+ fzz(iatm)=fzz(iatm)+ztf(jj)*gterm -+ fxx(jatm)=fxx(jatm)-xtf(jj)*gterm -+ fyy(jatm)=fyy(jatm)-ytf(jj)*gterm -+ fzz(jatm)=fzz(jatm)-ztf(jj)*gterm -+ -+c calculate contributions to stress tensor -+ -+ strs(1)=strs(1)-gterm*rtf(jj)*xtf(jj)*xtf(jj) -+ strs(2)=strs(2)-gterm*rtf(jj)*xtf(jj)*ytf(jj) -+ strs(3)=strs(3)-gterm*rtf(jj)*xtf(jj)*ztf(jj) -+ strs(4)=strs(4)-gterm*rtf(jj)*ytf(jj)*ytf(jj) -+ strs(5)=strs(5)-gterm*rtf(jj)*ytf(jj)*ztf(jj) -+ strs(6)=strs(6)-gterm*rtf(jj)*ztf(jj)*ztf(jj) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine tersoff3 -+ -+ end module tersoff_module -diff -urN dl_class_1.9.orig/srcmod/tether_module.f dl_class_1.9/srcmod/tether_module.f ---- dl_class_1.9.orig/srcmod/tether_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/tether_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,447 @@ -+ module tether_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining tether potential arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use parse_module -+ use setup_module -+ use site_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmtet(:,:) -+ integer, allocatable :: listtet(:,:) -+ integer, allocatable :: numteth(:),keytet(:),lsttet(:) -+ real(8), allocatable :: xxs(:),yys(:),zzs(:) -+ -+ save prmtet,lsttet,listtet,numteth,keytet,xxs,yys,zzs -+ -+ contains -+ -+ subroutine alloc_tet_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (prmtet(mxteth,mxpbnd),stat=fail(1)) -+ allocate (numteth(mxtmls),stat=fail(2)) -+ allocate (keytet(mxteth),stat=fail(3)) -+ allocate (lsttet(mxteth),stat=fail(4)) -+ allocate (listtet(msteth,2),stat=fail(5)) -+ allocate (xxs(mxatms),stat=fail(6)) -+ allocate (yys(mxatms),stat=fail(7)) -+ allocate (zzs(mxatms),stat=fail(8)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1260) -+ enddo -+ -+ do i=1,mxtmls -+ numteth(i)=0 -+ enddo -+ -+ end subroutine alloc_tet_arrays -+ -+ subroutine define_tethers -+ x (safe,idnode,itmols,nteth,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining tether bonds -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ real(8) engunit -+ integer idnode,itmols,nteth,nsite,ntmp,iteth,iteth1,idum -+ integer iatm1,isite1,j,i -+ -+ ntmp=intstr(record,lenrec,idum) -+ numteth(itmols)=numteth(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of tethered atoms ', -+ x 6x,i10)")ntmp -+ write(nrite,"(/,' tethered atom details:',/,/, -+ x 21x,7x,'key',6x,'atom',19x,'parameters',/) ") -+ endif -+ -+ iteth1=numteth(itmols) -+ do iteth=1,iteth1 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ call strip(record,lenrec) -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ -+ iatm1=intstr(record,lenrec,idum) -+ -+c test for frozen atom -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ -+ if(lfzsit(isite1).ne.0)then -+ -+ numteth(itmols)=numteth(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ nteth=nteth+1 -+ if(nteth.gt.mxteth)call error(idnode,62) -+ -+ if(keyword(1:4).eq.'harm')then -+ keytet(nteth)=1 -+ elseif(keyword(1:4).eq.'rhrm')then -+ keytet(nteth)=2 -+ elseif(keyword(1:4).eq.'quar')then -+ keytet(nteth)=3 -+ else -+ if(idnode.eq.0)write(nrite,*)message -+ call error(idnode,450) -+ endif -+ -+ lsttet(nteth)=iatm1 -+ prmtet(nteth,1)=dblstr(record,lenrec,idum) -+ prmtet(nteth,2)=dblstr(record,lenrec,idum) -+ prmtet(nteth,3)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,i10,1p,9e12.4)") -+ x keyword(1:4),lsttet(nteth), -+ x (prmtet(nteth,j),j=1,mxpbnd) -+ -+c convert energy units to internal units -+ -+ if(abs(keytet(nteth)).eq.1)then -+ prmtet(nteth,1)=prmtet(nteth,1)*engunit -+ elseif(abs(keytet(nteth)).eq.2)then -+ prmtet(nteth,1)=prmtet(nteth,1)*engunit -+ elseif(abs(keytet(nteth)).eq.3)then -+ prmtet(nteth,1)=prmtet(nteth,1)*engunit -+ prmtet(nteth,2)=prmtet(nteth,2)*engunit -+ prmtet(nteth,3)=prmtet(nteth,3)*engunit -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_tethers -+ -+ subroutine tethfrc -+ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) -+ -+c*********************************************************************** -+c -+c dl_poly routine to tether atoms to initial positions -+c includes stress tensor -+c -+c replicated data version : block data -+c -+c copyright daresbury laboratory 1994 -+c author t.forester feb 1994 -+c amended t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer idnode,mxnode,imcon,natms,nstep,ntteth,i,ii,ia,kk -+ integer itet1,itet2,fail -+ -+ real(8) engtet,virtet,rab -+ real(8) rrab,omega,gamma -+ -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ -+ data safe/.true./ -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail) -+ if(fail.ne.0)call error(idnode,1270) -+ -+c set up reference positions at start of job -+ -+ if(nstep.le.1)then -+ -+ do i=1,natms -+ -+ xxs(i)=xxx(i) -+ yys(i)=yyy(i) -+ zzs(i)=zzz(i) -+ -+ enddo -+ -+ endif -+ -+c check size of work arrays -+ -+ if((ntteth-mxnode+1)/mxnode.gt.msbad) call error(idnode,420) -+ -+c block indices -+ -+ itet1=(idnode*ntteth)/mxnode+1 -+ itet2=((idnode+1)*ntteth)/mxnode -+ -+ ii=0 -+ do i=itet1,itet2 -+ -+ ii=ii+1 -+ -+c atomic index -+ -+ ia= listtet(ii,2) -+ -+c tether vector -+ -+ xdab(ii)=xxx(ia)-xxs(ia) -+ ydab(ii)=yyy(ia)-yys(ia) -+ zdab(ii)=zzz(ia)-zzs(ia) -+ -+ enddo -+ -+c ignore periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ -+c zero tether energy and virial accumulators -+ -+ engtet=0.d0 -+ virtet=0.d0 -+ -+c loop over all specified tethered atoms -+ -+ ii=0 -+ do i=itet1,itet2 -+ -+ ii=ii+1 -+ -+c define components of bond vector -+ -+ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) -+ -+c check for possible zero length vector -+ -+ if(rab.lt.1.d-10)then -+ -+ rrab =0.d0 -+ -+ else -+ -+ rrab=1.d0/rab -+ -+ endif -+ -+c index of potential function parameters -+ -+ kk=listtet(ii,1) -+ -+c calculate scalar constant terms -+ -+ if(keytet(kk).eq.1)then -+ -+c harmonic function -+ -+ omega=0.5d0*prmtet(kk,1)*rab**2 -+ gamma=prmtet(kk,1) -+ -+ elseif(keytet(kk).eq.2)then -+ -+c restrained harmonic: -+ -+ omega=0.5d0*prmtet(kk,1)*(min(rab,prmtet(kk,2)))**2 -+ x +prmtet(kk,1)*prmtet(kk,2)* -+ x (sign(max(rab-prmtet(kk,2),0.d0),rab)) -+ gamma=prmtet(kk,1)*(sign(min(rab,prmtet(kk,2)),rab))*rrab -+ -+ elseif(keytet(kk).eq.3)then -+ -+c quartic potential -+ -+ omega=0.5d0*prmtet(kk,1)*rab**2 + -+ x 1.d0/3.d0*prmtet(kk,2)*rab**3+ -+ x 0.25d0*prmtet(kk,3)*rab**4 -+ gamma=(prmtet(kk,1)*rab + -+ x prmtet(kk,2)*rab**2 + -+ x prmtet(kk,3)*rab**3)*rrab -+ -+ else -+ safe=.false. -+ omega=0.d0 -+ gamma=0.d0 -+ endif -+ -+ gamma=-gamma -+ -+c calculate tether energy and virial -+ -+ engtet=engtet+omega -+ virtet=virtet-gamma*rab*rab -+ -+c index of atom -+ -+ ia=listtet(ii,2) -+ -+c calculate atomic forces -+ -+ fxx(ia)=fxx(ia)+gamma*xdab(ii) -+ fyy(ia)=fyy(ia)+gamma*ydab(ii) -+ fzz(ia)=fzz(ia)+gamma*zdab(ii) -+ -+c stress tensor -+ -+ stress(1)=stress(1)+xdab(ii)*gamma*xdab(ii) -+ stress(2)=stress(2)+xdab(ii)*gamma*ydab(ii) -+ stress(3)=stress(3)+xdab(ii)*gamma*zdab(ii) -+ stress(4)=stress(4)+ydab(ii)*gamma*xdab(ii) -+ stress(5)=stress(5)+ydab(ii)*gamma*ydab(ii) -+ stress(6)=stress(6)+ydab(ii)*gamma*zdab(ii) -+ stress(7)=stress(7)+zdab(ii)*gamma*xdab(ii) -+ stress(8)=stress(8)+zdab(ii)*gamma*ydab(ii) -+ stress(9)=stress(9)+zdab(ii)*gamma*zdab(ii) -+ -+ enddo -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,450) -+ -+c sum contributions to potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(3)=engtet -+ buffer(4)=virtet -+ -+ call gdsum(buffer(3),2,buffer(1)) -+ -+ engtet=buffer(3) -+ virtet=buffer(4) -+ -+ endif -+ -+ deallocate (xdab,ydab,zdab,stat=fail) -+ -+ return -+ end subroutine tethfrc -+ -+ subroutine xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+c*********************************************************************** -+c -+c dl_poly routine to scale positions with change in box shape -+c -+c parallel replicated data version -+c -+c copyright daresbury laboratory 1995 -+c author t.forester october 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,keyens,imcon,iatm0,iatm1,i -+ real(8) tstep,xa,ya,za,totmas,xcmo,ycmo,zcmo -+ -+c assign block of atoms to processor -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ if((keyens.eq.4).or.(keyens.eq.6))then -+ -+c berendsen npt/nst -+ -+ do i=iatm0,iatm1 -+ -+ xa=eta(1)*xxs(i)+eta(2)*yys(i)+eta(3)*zzs(i) -+ ya=eta(4)*xxs(i)+eta(5)*yys(i)+eta(6)*zzs(i) -+ za=eta(7)*xxs(i)+eta(8)*yys(i)+eta(9)*zzs(i) -+ -+ xxs(i)=xa -+ yys(i)=ya -+ zzs(i)=za -+ -+ enddo -+ -+ elseif(keyens.eq.5.or.keyens.eq.7)then -+ -+c hoover npt/nst -+ -+ totmas=0.d0 -+ do i=1,natms -+ if(rmass(i).gt.0.d0)totmas=totmas+weight(i) -+ enddo -+ -+ xcmo=0.d0 -+ ycmo=0.d0 -+ zcmo=0.d0 -+ -+ do i=1,natms -+ -+ if(rmass(i).gt.0.d0)then -+ -+ xcmo=xcmo+weight(i)*xxs(i) -+ ycmo=ycmo+weight(i)*yys(i) -+ zcmo=zcmo+weight(i)*zzs(i) -+ -+ endif -+ -+ enddo -+ xcmo=xcmo/totmas -+ ycmo=ycmo/totmas -+ zcmo=zcmo/totmas -+ -+ do i=iatm0,iatm1 -+ -+ xa=xxs(i)-xcmo -+ ya=yys(i)-ycmo -+ za=zzs(i)-zcmo -+ -+ xxs(i)=xxs(i)+tstep*(eta(1)*xa+eta(2)*ya+eta(3)*za) -+ yys(i)=yys(i)+tstep*(eta(2)*xa+eta(5)*ya+eta(6)*za) -+ zzs(i)=zzs(i)+tstep*(eta(3)*xa+eta(6)*ya+eta(9)*za) -+ -+ enddo -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxs,yys,zzs) -+ -+ endif -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxs,yys,zzs,buffer) -+ -+ return -+ end subroutine xscale -+ -+ end module tether_module -+ -diff -urN dl_class_1.9.orig/srcmod/three_body_module.f dl_class_1.9/srcmod/three_body_module.f ---- dl_class_1.9.orig/srcmod/three_body_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/three_body_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,882 @@ -+ module three_body_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining three-body potential arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - w. smith aug 2008 : solvation, free energy excitation -+c adapted - w. smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ -+ implicit none -+ -+ logical, allocatable :: filter(:) -+ real(8), allocatable :: prmtbp(:,:),rcut3b(:) -+ integer, allocatable :: lsttbp(:),ltptbp(:),lattbp(:) -+ -+ save prmtbp,rcut3b,lsttbp,ltptbp,lattbp,filter -+ -+ contains -+ -+ subroutine alloc_tbp_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(6) -+ -+ do i=1,6 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmtbp(mxtbp,mxptbp),stat=fail(1)) -+ allocate (rcut3b(mxtbp),stat=fail(2)) -+ allocate (lsttbp(mxtbp),stat=fail(3)) -+ allocate (ltptbp(mxtbp),stat=fail(4)) -+ allocate (lattbp(mxatms),stat=fail(5)) -+ allocate (filter(mxsite),stat=fail(6)) -+ -+ do i=1,6 -+ if(fail(i).gt.0)call error(idnode,1170) -+ enddo -+ -+ end subroutine alloc_tbp_arrays -+ -+ subroutine define_three_body -+ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining three body potentials -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits,lmols -+ character*8 keyword -+ character*8 atom0,atom1,atom2 -+ character*1 message(80) -+ integer idnode,ntptbp,ntpatm,fail,i,itbp,itptbp,keypot -+ integer idum,katm1,katm2,katm0,j,keytbp,ktbp,jtpatm -+ real(8) rcuttb,engunit -+ real(8), allocatable :: parpot(:) -+ -+ data fail/0/ -+ -+ allocate (parpot(mxptbp),stat=fail) -+ if(fail.ne.0)call error(idnode,1180) -+ -+ ntptbp=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'number of specified three ', -+ x 'body potentials',i10)") ntptbp -+ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ','atom 3 ', -+ x 3x,' key',30x,'parameters'/,/)") -+ -+ endif -+ if(ntptbp.gt.mxtbp) call error(idnode,83) -+ if(.not.lunits) call error(idnode,6) -+ if(.not.lmols) call error(idnode,13) -+ -+ do i=1,mxsite -+ filter(i)=.false. -+ enddo -+ -+ do itbp=1,mxtbp -+ lsttbp(itbp)=0 -+ enddo -+ -+ do itbp=1,mxtbp,mx2tbp -+ lsttbp(itbp)=-1 -+ enddo -+ -+ rcuttb=0.d0 -+ -+ do itptbp=1,ntptbp -+ -+ do i=1,mxptbp -+ parpot(i)=0.d0 -+ enddo -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+c Note the order!! atom0 is central -+ -+ call copystring(record,message,80) -+ call getword(atom1,record,8,lenrec) -+ call getword(atom0,record,8,lenrec) -+ call getword(atom2,record,8,lenrec) -+ call lowcase(record,lenrec) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'harm') then -+ keypot=0 -+ elseif(keyword(1:4).eq.'thrm') then -+ keypot=1 -+ elseif(keyword(1:4).eq.'shrm') then -+ keypot=2 -+ elseif(keyword(1:4).eq.'bvs1') then -+ keypot=3 -+ elseif(keyword(1:4).eq.'bvs2') then -+ keypot=4 -+ elseif(keyword(1:4).eq.'hbnd') then -+ keypot=5 -+ else -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,442) -+ endif -+ -+ parpot(1)=dblstr(record,lenrec,idum) -+ parpot(2)=dblstr(record,lenrec,idum) -+ parpot(3)=dblstr(record,lenrec,idum) -+ parpot(4)=dblstr(record,lenrec,idum) -+ parpot(5)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(16x,3a8,4x,a4,1x,1p,9e13.5)") -+ x atom1,atom0,atom2,keyword(1:4),(parpot(j),j=1,mxptbp) -+ -+ katm0=0 -+ katm1=0 -+ katm2=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm -+ -+ enddo -+ -+ if(katm0.eq.0.or.katm1.eq.0.or.katm2.eq.0) -+ x call error(idnode,84) -+ -+ filter(katm0)=.true. -+ filter(katm1)=.true. -+ filter(katm2)=.true. -+ -+ keytbp=(max(katm1,katm2)*(max(katm1,katm2)-1))/2+ -+ x min(katm1,katm2)+(katm0-1)*mx2tbp -+ -+ if(keytbp.gt.mxtbp) call error(idnode,86) -+ -+c convert parameters to internal units -+ -+ parpot(1)=parpot(1)*engunit -+ if(keypot.ne.5)parpot(2)=parpot(2)*(pi/180.d0) -+ -+ if(lsttbp(keytbp).gt.0) call error(idnode,18) -+ lsttbp(keytbp)=itptbp -+ ltptbp(itptbp)=keypot -+ ktbp=mx2tbp*((keytbp-1)/mx2tbp)+1 -+ if(lsttbp(ktbp).lt.0)lsttbp(ktbp)=0 -+ -+c calculate max three body cutoff -+ -+ rcuttb=max(rcuttb,parpot(5)) -+ rcut3b(itptbp)=parpot(5) -+ -+c store three body potential parameters -+ -+ do i=1,4 -+ prmtbp(itptbp,i)=parpot(i) -+ enddo -+ if(mxptbp.ge.6) then -+ do i=6,mxptbp -+ prmtbp(itptbp,i-1)=parpot(i-1) -+ enddo -+ endif -+ enddo -+ -+ if(rcuttb.lt.1.d-6)call error(idnode,451) -+ -+ deallocate (parpot,stat=fail) -+ -+ return -+ end subroutine define_three_body -+ -+ subroutine thbfrc -+ x (lsolva,lfree,lexcite,idnode,mxnode,natms,imcon,rcuttb, -+ x engtbp,virtbp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating three body forces arising -+c from the included angle between three atoms -+c -+c Note: the subroutine converts coordinates to reduced units -+c to avoid a call to images.f. The link cell algorithm used -+c here necessitates a parallelepiped cell geometry -+c -+c copyright - daresbury laboratory 1994 -+c author - w.smith mar 1994 -+c adapted - w.smith aug 2008 solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect,lskip -+ logical idrive,jdrive,kdrive -+ integer idnode,mxnode,natms,imcon,nix,niy,niz -+ integer i,nbx,nby,nbz,ncells,l,ix,iy,iz,k,icell,kk,jx,jy,jz -+ integer j,jcell,ii,itbp,limit,last,ktbp,jtbp,jktbp,kktbp -+ integer ia,ib,ic,ktyp,jj,jk,kkk -+ real(8) rcuttb,engtbp,virtbp,tterm,uterm,xm,ym,zm,cprp,det -+ real(8) xdc,ydc,zdc,sxx,syy,szz,sxab,syab,szab,xab,yab,zab -+ real(8) rab,sxbc,sybc,szbc,xbc,ybc,zbc,rbc,xac,yac,zac,rac -+ real(8) rrab,rrbc,rrac,cost,sint,theta,pterm,gamma,vterm -+ real(8) gamsa,gamsb,gamsc,scrn,fxa,fya,fza,fxc,fyc,fzc,strs -+ real(8) strs_loc -+ -+ dimension nix(27),niy(27),niz(27),cprp(10),strs(6),strs_loc(9) -+ -+ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, -+ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ -+ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, -+ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ -+ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ -+ -+ lskip=(lfree.or.lexcite) -+ -+c flag for undefined potentials -+ -+ safe=.true. -+ -+c initialise accumulators -+ -+ engtbp=0.d0 -+ virtbp=0.d0 -+ tbp_fre=0.d0 -+ tbp_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(8)=.true. -+ en3_sol(:)=0.d0 -+ if(lexcite)en3_exc(:)=0.d0 -+ -+ endif -+ -+c create mock cell vectors for non-periodic system -+ -+ if(imcon.eq.0) then -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ do i=1,natms -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ enddo -+ -+ cell(1)=2.d0*xm+rcuttb -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(5)=2.d0*ym+rcuttb -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ cell(9)=2.d0*zm+rcuttb -+ -+ endif -+ -+c check for appropriate boundary conditions -+ -+ if(imcon.gt.3)call error(idnode,67) -+ call invert(cell,rcell,det) -+ call dcell(cell,cprp) -+ -+c calculate link cell numbers -+ -+ nbx=int(cprp(7)/(rcuttb+1.d-6)) -+ nby=int(cprp(8)/(rcuttb+1.d-6)) -+ nbz=int(cprp(9)/(rcuttb+1.d-6)) -+ ncells=nbx*nby*nbz -+ if(ncells.gt.mxcell) then -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,'(a,i6)') -+ x 'number of required link cells in routine thbfrc is ',ncells -+ write(nrite,'(a,i6)') -+ x 'number of default link cells in routine thbfrc is ',mxcell -+ call error(idnode,69) -+ -+ endif -+ -+ endif -+ -+c transform atomic coordinates and construct link cells -+ -+ do l=1,ncells -+ -+ lct(l)=0 -+ lst(l)=0 -+ -+ enddo -+ -+ xdc=dble(nbx) -+ ydc=dble(nby) -+ zdc=dble(nbz) -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ xxx(i)=sxx -+ yyy(i)=syy -+ zzz(i)=szz -+ -+ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) -+ iy=min(int(ydc*(syy+0.5d0)),nby-1) -+ iz=min(int(zdc*(szz+0.5d0)),nbz-1) -+ k=1+ix+nbx*(iy+nby*iz) -+ lst(k)=lst(k)+1 -+ link(i)=lct(k) -+ lct(k)=i -+ -+ endif -+ -+ enddo -+ -+c loop over central atoms of angles -+ -+ ix=0 -+ iy=1 -+ iz=1 -+ do icell=1,ncells -+ -+ ix=ix+1 -+ if(ix.gt.nbx)then -+ ix=1 -+ iy=iy+1 -+ if(iy.gt.nby)then -+ iy=1 -+ iz=iz+1 -+ endif -+ endif -+ -+c construct mini-list of neighbour cell contents -+ -+ k=0 -+ do kk=1,27 -+ -+ jx=ix+nix(kk) -+ jy=iy+niy(kk) -+ jz=iz+niz(kk) -+ -+ if(jx.gt.nbx)jx=1 -+ if(jy.gt.nby)jy=1 -+ if(jz.gt.nbz)jz=1 -+ if(jx.lt.1)jx=jx+nbx -+ if(jy.lt.1)jy=jy+nby -+ if(jz.lt.1)jz=jz+nbz -+ -+ jcell=jx+nbx*(jy-1+nby*(jz-1)) -+ j=lct(jcell) -+ -+ do ii=1,lst(jcell) -+ -+ k=k+1 -+ lattbp(k)=j -+ j=link(j) -+ -+ enddo -+ -+ enddo -+ -+ limit=k -+ -+ do ii=1,lst(icell) -+ -+ i=lattbp(ii) -+ itbp=mx2tbp*(ltype(i)-1) -+ if(mod(i,mxnode).eq.idnode.and.lsttbp(itbp+1).ge.0)then -+ -+ last=limit -+ -+ do kk=1,limit/2 -+ -+ if(kk.gt.(limit-1)/2)last=limit/2 -+ -+ do jj=1,last -+ -+ j=lattbp(jj) -+ jk=jj+kk -+ if(jk.gt.limit)jk=jk-limit -+ k=lattbp(jk) -+ if(i.ne.j.and.i.ne.k)then -+ -+ jtbp=max(ltype(j),ltype(k)) -+ ktbp=min(ltype(j),ltype(k)) -+ jktbp=itbp+(jtbp*(jtbp-1))/2+ktbp -+ kktbp=lsttbp(jktbp) -+ if(kktbp.gt.0)then -+ -+c make labels etc consistent with angfrc.f -+ -+ ia=j -+ ib=i -+ ic=k -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ kdrive=driven(ltype(ic)) -+ -+ endif -+ -+ if(lskip)then -+ -+ if((atm_fre(ia).eq.1.or.atm_fre(ib).eq.1.or. -+ x atm_fre(ic).eq.1).and.(atm_fre(ia).eq.2.or. -+ x atm_fre(ib).eq.2.or.atm_fre(ic).eq.2))cycle -+ -+ endif -+ -+ sxab=xxx(ia)-xxx(ib) -+ sxab=sxab-nint(sxab) -+ syab=yyy(ia)-yyy(ib) -+ syab=syab-nint(syab) -+ szab=zzz(ia)-zzz(ib) -+ szab=szab-nint(szab) -+ -+ xab=cell(1)*sxab+cell(4)*syab+cell(7)*szab -+ if(abs(xab).lt.rcuttb)then -+ -+ yab=cell(2)*sxab+cell(5)*syab+cell(8)*szab -+ if(abs(yab).lt.rcuttb)then -+ -+ zab=cell(3)*sxab+cell(6)*syab+cell(9)*szab -+ if(abs(zab).lt.rcuttb)then -+ -+ sxbc=xxx(ic)-xxx(ib) -+ sxbc=sxbc-nint(sxbc) -+ sybc=yyy(ic)-yyy(ib) -+ sybc=sybc-nint(sybc) -+ szbc=zzz(ic)-zzz(ib) -+ szbc=szbc-nint(szbc) -+ -+ xbc=cell(1)*sxbc+cell(4)*sybc+cell(7)*szbc -+ if(abs(xbc).lt.rcuttb)then -+ -+ ybc=cell(2)*sxbc+cell(5)*sybc+cell(8)*szbc -+ if(abs(ybc).lt.rcuttb)then -+ -+ zbc=cell(3)*sxbc+cell(6)*sybc+cell(9)*szbc -+ if(abs(zbc).lt.rcuttb)then -+ -+ ktyp=ltptbp(kktbp) -+ rab=sqrt(xab*xab+yab*yab+zab*zab) -+ rbc=sqrt(xbc*xbc+ybc*ybc+zbc*zbc) -+ -+ if(rcut3b(kktbp).ge.max(rab,rbc))then -+ -+ xac=xab-xbc -+ yac=yab-ybc -+ zac=zab-zbc -+ rac=sqrt(xac*xac+yac*yac+zac*zac) -+ -+ rrab=1.d0/rab -+ rrbc=1.d0/rbc -+ rrac=1.d0/rac -+ -+c normalise direction vectors -+ -+ xab=xab*rrab -+ yab=yab*rrab -+ zab=zab*rrab -+ -+ xbc=xbc*rrbc -+ ybc=ybc*rrbc -+ zbc=zbc*rrbc -+ -+ xac=xac*rrac -+ yac=yac*rrac -+ zac=zac*rrac -+ -+ cost=(xab*xbc+yab*ybc+zab*zbc) -+ if(abs(cost).gt.1.d0)cost=sign(1.d0,cost) -+ if(ktyp.ne.5)then -+ -+ sint=max(1.d-8,sqrt(1.d0-cost*cost)) -+ theta=acos(cost) -+ -+ endif -+ -+ if(ktyp.eq.0)then -+ -+c harmonic angle potential -+ -+ pterm=0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 -+ gamma=prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint -+ -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.1)then -+ -+c truncated harmonic valence angle potential -+ -+ scrn=exp(-(rab**8+rbc**8)/prmtbp(kktbp,3)**8) -+ pterm=scrn*0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 -+ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmtbp(kktbp,3)**8 -+ gamma=scrn*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint -+ gamsa=(8.d0*pterm/prmtbp(kktbp,3)**8)*rab**7 -+ gamsc=(8.d0*pterm/prmtbp(kktbp,3)**8)*rbc**7 -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.2)then -+ -+c screened harmonic valence angle potential -+ -+ scrn=exp(-(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4))) -+ pterm=scrn*0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 -+ vterm=-pterm*(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4)) -+ gamma=scrn*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint -+ gamsa=(pterm/prmtbp(kktbp,3)) -+ gamsc=(pterm/prmtbp(kktbp,4)) -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.3)then -+ -+c screened vessal potential type 1 -+ -+ scrn=exp(-(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4))) -+ pterm=scrn*prmtbp(kktbp,1)/ -+ x (8.d0*(prmtbp(kktbp,2)-pi)**2)* -+ x ((prmtbp(kktbp,2)-pi)**2-(theta-pi)**2)**2 -+ vterm=-pterm*(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4)) -+ gamma=scrn*prmtbp(kktbp,1)/ -+ x (2.d0*(prmtbp(kktbp,2)-pi)**2)* -+ x ((prmtbp(kktbp,2)-pi)**2-(theta-pi)**2)*(theta-pi)/sint -+ gamsa=(pterm/prmtbp(kktbp,3)) -+ gamsc=(pterm/prmtbp(kktbp,4)) -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.4)then -+ -+c truncated vessal potential type 2 - use with sw1 -+ -+ scrn=exp(-(rab**8+rbc**8)/prmtbp(kktbp,4)**8) -+ pterm=scrn*prmtbp(kktbp,1)*(theta**prmtbp(kktbp,3)* -+ x (theta-prmtbp(kktbp,2))**2*(theta+prmtbp(kktbp,2)- -+ x 2.d0*pi)**2-0.5d0*prmtbp(kktbp,3)*pi**(prmtbp(kktbp,3) -+ x -1.d0)*(theta-prmtbp(kktbp,2))**2*(pi- -+ x prmtbp(kktbp,2))**3) -+ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmtbp(kktbp,4)**8 -+ gamma=scrn*prmtbp(kktbp,1)*(theta**(prmtbp(kktbp,3)-1.d0)* -+ x (theta-prmtbp(kktbp,2))*(theta+prmtbp(kktbp,2)- -+ x 2.d0*pi)*((prmtbp(kktbp,3)+4.d0)*theta**2-2.d0*pi* -+ x (prmtbp(kktbp,3)+2.d0)*theta+prmtbp(kktbp,3)* -+ x prmtbp(kktbp,2)*(2.d0*pi-prmtbp(kktbp,2)))- -+ x prmtbp(kktbp,3)*pi**(prmtbp(kktbp,3)-1.d0)* -+ x (theta-prmtbp(kktbp,2))*(pi-prmtbp(kktbp,2))**3)/sint -+ gamsa=(8.d0*pterm/prmtbp(kktbp,4)**8)*rab**7 -+ gamsc=(8.d0*pterm/prmtbp(kktbp,4)**8)*rbc**7 -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.5)then -+ -+ if(min(rab,rbc).lt.1.5d0)then -+ -+ scrn=(5.d0*(prmtbp(kktbp,2)/rac)**2-6.d0)* -+ x (prmtbp(kktbp,2)/rac)**10 -+ tterm=prmtbp(kktbp,1)*cost**4 -+ pterm=scrn*tterm -+ uterm=60.d0*((prmtbp(kktbp,2)/rac)**2-1.d0)* -+ x (prmtbp(kktbp,2)/rac)**10 -+ vterm=tterm*uterm -+ gamma=scrn*4.d0*prmtbp(kktbp,1)*cost**3 -+ gamsb=tterm*uterm/rac -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ endif -+ -+ else -+ -+ safe=.false. -+ pterm=0.d0 -+ vterm=0.d0 -+ gamma=0.d0 -+ gamsa=0.d0 -+ gamsb=0.d0 -+ gamsc=0.d0 -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set triple index -+ -+ if(lsolva)kkk=loc3(atmolt(ia),atmolt(ib),atmolt(ic)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1) -+ x .and.(atm_fre(ic).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic).eq.0) -+ -+ if(lsolva)en3_exc(kkk)=en3_exc(kkk)+pterm -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1) -+ x .or.(atm_fre(ic).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ tbp_fre=tbp_fre-pterm -+ tbp_vir=tbp_vir-vterm -+ pterm=lambda1*pterm -+ vterm=lambda1*vterm -+ gamma=lambda1*gamma -+ gamsa=lambda1*gamsa -+ gamsb=lambda1*gamsb -+ gamsc=lambda1*gamsc -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2) -+ x .or.(atm_fre(ic).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ tbp_fre=tbp_fre+pterm -+ tbp_vir=tbp_vir+vterm -+ pterm=lambda2*pterm -+ vterm=lambda2*vterm -+ gamma=lambda2*gamma -+ gamsa=lambda2*gamsa -+ gamsb=lambda2*gamsb -+ gamsc=lambda2*gamsc -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential and virial -+ -+ engtbp=engtbp+pterm -+ virtbp=virtbp+vterm -+ -+ if(lsolva)en3_sol(kkk)=en3_sol(kkk)+pterm -+ -+c calculate atomic forces -+ -+ fxa=gamma*(xbc-xab*cost)*rrab+gamsa*xab+gamsb*xac -+ fya=gamma*(ybc-yab*cost)*rrab+gamsa*yab+gamsb*yac -+ fza=gamma*(zbc-zab*cost)*rrab+gamsa*zab+gamsb*zac -+ -+ fxc=gamma*(xab-xbc*cost)*rrbc+gamsc*xbc-gamsb*xac -+ fyc=gamma*(yab-ybc*cost)*rrbc+gamsc*ybc-gamsb*yac -+ fzc=gamma*(zab-zbc*cost)*rrbc+gamsc*zbc-gamsb*zac -+ -+ fxx(ia)=fxx(ia)+fxa -+ fyy(ia)=fyy(ia)+fya -+ fzz(ia)=fzz(ia)+fza -+ -+ fxx(ib)=fxx(ib)-fxa-fxc -+ fyy(ib)=fyy(ib)-fya-fyc -+ fzz(ib)=fzz(ib)-fza-fzc -+ -+ fxx(ic)=fxx(ic)+fxc -+ fyy(ic)=fyy(ic)+fyc -+ fzz(ic)=fzz(ic)+fzc -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+rab*xab*fxa+rbc*xbc*fxc -+ strs(2)=strs(2)+rab*xab*fya+rbc*xbc*fyc -+ strs(3)=strs(3)+rab*xab*fza+rbc*xbc*fzc -+ strs(4)=strs(4)+rab*yab*fya+rbc*ybc*fyc -+ strs(5)=strs(5)+rab*yab*fza+rbc*ybc*fzc -+ strs(6)=strs(6)+rab*zab*fza+rbc*zbc*fzc -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn)then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+pterm -+ vir_loc=vir_loc+vterm -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fxa -+ fyy_loc(ia)=fyy_loc(ia)+fya -+ fzz_loc(ia)=fzz_loc(ia)+fza -+ -+ fxx_loc(ib)=fxx_loc(ib)-fxa-fxc -+ fyy_loc(ib)=fyy_loc(ib)-fya-fyc -+ fzz_loc(ib)=fzz_loc(ib)-fza-fzc -+ -+ fxx_loc(ic)=fxx_loc(ic)+fxc -+ fyy_loc(ic)=fyy_loc(ic)+fyc -+ fzz_loc(ic)=fzz_loc(ic)+fzc -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+rab*xab*fxa+rbc*xbc*fxc -+ strs_loc(2)=strs_loc(2)+rab*xab*fya+rbc*xbc*fyc -+ strs_loc(3)=strs_loc(3)+rab*xab*fza+rbc*xbc*fzc -+ strs_loc(4)=strs_loc(4)+rab*yab*fya+rbc*ybc*fyc -+ strs_loc(5)=strs_loc(5)+rab*yab*fza+rbc*ybc*fzc -+ strs_loc(6)=strs_loc(6)+rab*zab*fza+rbc*zbc*fzc -+ -+ endif -+ -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,442) -+ -+c global sum of three body potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engtbp -+ buffer(2)=virtbp -+ buffer(3)=tbp_fre -+ buffer(4)=tbp_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engtbp=buffer(1) -+ virtbp=buffer(2) -+ tbp_fre=buffer(3) -+ tbp_vir=buffer(4) -+ -+c sum up solvation energies -+ -+ if(lsolva)then -+ -+ call gdsum(en3_sol,mxtmls_sol3,buffer(1)) -+ if(lexcite)call gdsum(en3_exc,mxtmls_exc3,buffer(1)) -+ -+ endif -+ -+ endif -+ -+c restore coordinate array to original representation -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=xxx(i) -+ syy=yyy(i) -+ szz=zzz(i) -+ -+ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz -+ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz -+ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz -+ -+ endif -+ -+ enddo -+ -+c restore cell vector -+ -+ if(imcon.eq.0) then -+ cell(1)=0.d0 -+ cell(5)=0.d0 -+ cell(9)=0.d0 -+ endif -+ -+ return -+ -+ end subroutine thbfrc -+ -+ end module three_body_module -diff -urN dl_class_1.9.orig/srcmod/utility_module.f dl_class_1.9/srcmod/utility_module.f ---- dl_class_1.9.orig/srcmod/utility_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/utility_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1612 @@ -+ module utility_module -+ -+c*********************************************************************** -+c -+c dl_poly module for utility subroutines and functions -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ contains -+ -+ subroutine global_sum_forces(natms,mxnode,gxx,gyy,gzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to perform global sum of atomic forces as -+c requred by replicated data strategy -+c -+c copyright - daresbury laboratory -+c author - w.smith december 2005 -+c -+c*********************************************************************** -+ -+ use config_module -+ -+ implicit none -+ -+ integer natms,mxnode,i,j -+ real(8) gxx(*),gyy(*),gzz(*) -+ -+ if(mxnode.gt.1) then -+ -+ j=0 -+ do i=1,natms -+ -+ buffer(j+1)=gxx(i) -+ buffer(j+2)=gyy(i) -+ buffer(j+3)=gzz(i) -+ j=j+3 -+ -+ enddo -+ call gdsum(buffer(1),3*natms,buffer(3*natms+1)) -+ j=0 -+ do i=1,natms -+ -+ gxx(i)=buffer(j+1) -+ gyy(i)=buffer(j+2) -+ gzz(i)=buffer(j+3) -+ j=j+3 -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine global_sum_forces -+ -+ subroutine images -+ x (imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating the minimum image -+c of atom pairs within a specified MD cell -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c T3D optimised version. t.forester july 1994 -+c -+c for -+c imcon=0 no boundary conditions apply -+c imcon=1 standard cubic boundaries apply -+c imcon=2 orthorhombic boundaries apply -+c imcon=3 parallelepiped boundaries apply -+c imcon=4 truncated octahedron boundaries apply -+c imcon=5 rhombic dodecahedron boundaries apply -+c imcon=6 x-y parallelogram boundary conditions : no periodicity in z -+c imcon=7 hexagonal prism boundaries apply -+c -+c note: in all cases the centre of the cell is at (0,0,0) -+c warning - replicated data version: does not re-merge -+c coordinate arrays -+c -+c*********************************************************************** -+ -+ use error_module -+ -+ implicit none -+ -+ integer imcon,idnode,mxnode,natms,iatm1,iatm2,i -+ real(8) cell,xxx,yyy,zzz,aaa,bbb,ccc,det,rt2,rt3,ssx -+ real(8) ssy,ssz,ddd,xss,yss,zss,rcell -+ -+ dimension xxx(*),yyy(*),zzz(*) -+ dimension cell(9),rcell(9) -+ -+ data rt2/1.41421356623d0/,rt3/1.7320508075d0/ -+ -+ if(imcon.gt.0) then -+ -+c block indices -+ -+ iatm1 = (idnode*natms)/mxnode+1 -+ iatm2 = ((idnode+1)*natms)/mxnode -+ -+ endif -+ -+ if(imcon.eq.1)then -+ -+c standard cubic boundary conditions -+ -+ -+ aaa=1.d0/cell(1) -+ -+ do i=iatm1,iatm2 -+ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) -+ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) -+ zzz(i)=zzz(i)-cell(1)*nint(aaa*zzz(i)) -+ enddo -+ -+ else if(imcon.eq.2)then -+ -+c rectangular (slab) boundary conditions -+ -+ aaa=1.d0/cell(1) -+ bbb=1.d0/cell(5) -+ ccc=1.d0/cell(9) -+ -+ do i=iatm1,iatm2 -+ -+ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) -+ yyy(i)=yyy(i)-cell(5)*nint(bbb*yyy(i)) -+ zzz(i)=zzz(i)-cell(9)*nint(ccc*zzz(i)) -+ -+ enddo -+ -+ else if(imcon.eq.3)then -+ -+c parallelepiped boundary conditions -+ -+ call invert(cell,rcell,det) -+ -+ do i=iatm1,iatm2 -+ -+ ssx=(rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i)) -+ ssy=(rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i)) -+ ssz=(rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i)) -+ -+ xss=ssx-nint(ssx) -+ yss=ssy-nint(ssy) -+ zss=ssz-nint(ssz) -+ -+ xxx(i)=(cell(1)*xss+cell(4)*yss+cell(7)*zss) -+ yyy(i)=(cell(2)*xss+cell(5)*yss+cell(8)*zss) -+ zzz(i)=(cell(3)*xss+cell(6)*yss+cell(9)*zss) -+ -+ enddo -+ -+ else if(imcon.eq.4)then -+ -+c truncated octahedral boundary conditions -+ -+ if(.not.(abs(cell(1)-cell(5)).lt.1.d-6.and. -+ x abs(cell(5)-cell(9)).lt.1.d-6)) call error(idnode,130) -+ -+ aaa=1.d0/cell(1) -+ -+ do i=iatm1,iatm2 -+ -+ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) -+ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) -+ zzz(i)=zzz(i)-cell(1)*nint(aaa*zzz(i)) -+ -+ if((abs(xxx(i))+abs(yyy(i))+abs(zzz(i))).ge. -+ x (0.75d0*cell(1)))then -+ -+ xxx(i)=xxx(i)-0.5d0*sign(cell(1),xxx(i)) -+ yyy(i)=yyy(i)-0.5d0*sign(cell(1),yyy(i)) -+ zzz(i)=zzz(i)-0.5d0*sign(cell(1),zzz(i)) -+ -+ endif -+ -+ enddo -+ -+ else if(imcon.eq.5)then -+ -+c rhombic dodecahedral boundary conditions -+ -+ if(.not.(abs(cell(1)-cell(5)).lt.1.d-6.and. -+ x abs(cell(9)-cell(1)*rt2).lt.1.d-6)) -+ x call error(idnode,140) -+ -+ aaa=1.d0/cell(1) -+ bbb=1.d0/cell(9) -+ -+ do i=iatm1,iatm2 -+ -+ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) -+ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) -+ zzz(i)=zzz(i)-cell(9)*nint(bbb*zzz(i)) -+ -+ if((abs(xxx(i))+abs(yyy(i))+abs(rt2*zzz(i))).ge. -+ x cell(1))then -+ -+ xxx(i)=xxx(i)-0.5d0*sign(cell(1),xxx(i)) -+ yyy(i)=yyy(i)-0.5d0*sign(cell(1),yyy(i)) -+ zzz(i)=zzz(i)-0.5d0*sign(cell(9),zzz(i)) -+ -+ endif -+ -+ enddo -+ -+ else if(imcon.eq.6) then -+ -+c x-y boundary conditions -+ -+ det = cell(1)*cell(5) - cell(2)*cell(4) -+ -+ if(abs(det).lt.1.d-6)call error(idnode,120) -+ -+ det = 1.d0/det -+ -+ rcell(1) = det*cell(5) -+ rcell(2) = -det*cell(2) -+ rcell(4) = -det*cell(4) -+ rcell(5) = det*cell(1) -+ -+ do i=iatm1,iatm2 -+ -+ ssx = rcell(1)*xxx(i) + rcell(4)*yyy(i) -+ ssy = rcell(2)*xxx(i) + rcell(5)*yyy(i) -+ -+ xss = ssx - nint(ssx) -+ yss = ssy - nint(ssy) -+ -+ xxx(i)=cell(1)*xss + cell(4)*yss -+ yyy(i)=cell(2)*xss + cell(5)*yss -+ -+ enddo -+ -+ else if(imcon.eq.7) then -+ -+c hexagonal prism boundary conditions -+ -+ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) -+ x call error(idnode,135) -+ -+ aaa=cell(1)/(rt3*2.d0) -+ bbb=cell(1)/rt3 -+ ccc=rt3/cell(1) -+ ddd=1.d0/cell(9) -+ -+ do i=iatm1,iatm2 -+ -+ yyy(i)=yyy(i)-bbb*nint(ccc*yyy(i)) -+ zzz(i)=zzz(i)-cell(9)*nint(ddd*zzz(i)) -+ -+ if((abs(yyy(i))+abs(rt3*xxx(i))).ge.bbb)then -+ -+ xxx(i)=xxx(i)-rt3*sign(aaa,xxx(i)) -+ yyy(i)=yyy(i)-sign(aaa,yyy(i)) -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine images -+ -+ subroutine config_write(fname,levcfg,imcon,natms,engcfg) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing CONFIG files -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2007 -+c -+c*********************************************************************** -+ -+ use config_module -+ use setup_module -+ -+ implicit none -+ -+ character*6 fname -+ -+ integer i,natms,levcfg,imcon,nstep -+ real(8) engcfg -+ -+ open(nconf,file=fname,form='formatted') -+ -+ write(nconf,'(80a1)') cfgname -+ write(nconf,'(3i10,1p,g20.12)') levcfg,imcon,natms,engcfg -+ if(imcon.gt.0) write(nconf,'(3f20.12)') cell -+ -+ do i=1,natms -+ -+ write(nconf,'(a8,i10)') atmnam(i),i -+ write(nconf,'(3g20.10)') xxx(i),yyy(i),zzz(i) -+ if(levcfg.gt.0)write(nconf,'(3g20.12)') -+ x vxx(i),vyy(i),vzz(i) -+ if(levcfg.gt.1)write(nconf,'(3g20.12)') -+ x fxx(i),fyy(i),fzz(i) -+ -+ enddo -+ -+ close (nconf) -+ -+ return -+ end subroutine config_write -+ -+ subroutine bomb(idnode,nyr,nmn,ndy) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to set an expiry date in a compiled program -+c -+c copyright - daresbury laboratory -+c author - w. smith oct 2002 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ logical safe -+ integer info(8) -+ character*12 dat,tim,zon -+ integer idnode,nyr,nmn,ndy -+ -+ safe=.true. -+ -+ call date_and_time(dat,tim,zon,info) -+ -+ if(info(1).gt.nyr)then -+ -+ safe=.false. -+ -+ else if(info(1).eq.nyr)then -+ -+ if(info(2).gt.nmn)then -+ -+ safe=.false. -+ -+ else if(info(2).eq.nmn)then -+ -+ if(info(3).ge.ndy)safe=.false. -+ -+ endif -+ -+ endif -+ -+ if(.not.safe)then -+ -+ if(idnode.eq.0)write(nrite,'(a,/,a)') -+ x 'THE EXPIRY DATE OF THIS EXECUTABLE HAS PASSED.', -+ X 'PLEASE CONTACT W.SMITH@DL.AC.UK FOR A NEW LICENCE' -+ -+ call exitcomms() -+ -+ endif -+ -+ return -+ end subroutine bomb -+ -+ subroutine cpy_rtc(nnn,aaa,bbb) -+ -+c********************************************************************** -+c -+c dl_poly subroutine for copying a real array into a complex array -+c of the same dimension -+c -+c copyright daresbury laboratory 1998 -+c author w.smith oct 1998 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i,nnn -+ real(8) aaa(*) -+ complex(8) bbb(*) -+ -+ do i=1,nnn -+ -+ bbb(i)=cmplx(aaa(i),0.d0,kind=8) -+ -+ enddo -+ -+ return -+ end subroutine cpy_rtc -+ -+ function duni() -+ -+c********************************************************************* -+c -+c dl_poly random number generator based on the universal -+c random number generator of marsaglia, zaman and tsang -+c (stats and prob. lett. 8 (1990) 35-39.) it must be -+c called once to initialise parameters u,c,cd,cm -+c -+c copyright daresbury laboratory 1992 -+c author - w.smith july 1992 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical new -+ integer ir,jr,i,j,k,l,m,ii,jj -+ real(4) s,t,u,c,cd,cm,uni -+ real(8) duni -+ dimension u(97) -+ save u,c,cd,cm,uni,ir,jr,new -+ data new/.true./ -+ -+ if(new)then -+ -+c initial values of i,j,k must be in range 1 to 178 (not all 1) -+c initial value of l must be in range 0 to 168. -+ -+ i=12 -+ j=34 -+ k=56 -+ l=78 -+c -+ ir=97 -+ jr=33 -+ new=.false. -+ -+ do 200 ii=1,97 -+ s=0.0 -+ t=0.5 -+ do 100 jj=1,24 -+ m=mod(mod(i*j,179)*k,179) -+ i=j -+ j=k -+ k=m -+ l=mod(53*l+1,169) -+ if(mod(l*m,64).ge.32)s=s+t -+ t=0.5*t -+ 100 continue -+ u(ii)=s -+ 200 continue -+ c = 362436.0/16777216.0 -+ cd= 7654321.0/16777216.0 -+ cm=16777213.0/16777216.0 -+ else -+ -+c calculate random number -+ uni=u(ir)-u(jr) -+ if(uni.lt.0.0)uni=uni+1.0 -+ u(ir)=uni -+ ir=ir-1 -+ if(ir.eq.0)ir=97 -+ jr=jr-1 -+ if(jr.eq.0)jr=97 -+ c=c-cd -+ if(c.lt.0.0)c=c+cm -+ uni=uni-c -+ if(uni.lt.0.0)uni=uni+1.0 -+ duni=dble(uni) -+ endif -+ -+ return -+ end function duni -+ -+ subroutine ele_prd(nnn,aaa,bbb,ccc) -+ -+c********************************************************************** -+c -+c dl_poly subroutine for element by element product of -+c a real array (bbb) and a complex array (ccc) -+c -+c copyright daresbury laboratory 1998 -+c author w.smith july 1998 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i,nnn -+ real(8) bbb(*) -+ complex(8) aaa(*),ccc(*) -+ -+ do i=1,nnn -+ -+ aaa(i)=bbb(i)*ccc(i) -+ -+ enddo -+ -+ return -+ end subroutine ele_prd -+ -+ subroutine gauss(natms,vxx,vyy,vzz) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for constructing velocity arrays -+c with a gaussian distribution of unit variance. -+c -+c based on the Box-Muller method -+c -+c note - this version uses a universal random number -+c generator, which generates pseudo-random numbers between -+c 0 and 1. it is based on the algorithm of marsaglia, zaman -+c and tsang in: stats and prob. lett. 8 (1990) 35-39. -+c -+c copyright daresbury laboratory 2007 -+c author - w. smith nov 2007 -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ integer natms,i -+ real(8) vxx,vyy,vzz,rrr,rr1,rr2 -+ -+ dimension vxx(natms),vyy(natms),vzz(natms) -+ -+c initialise random number generator -+ -+ rrr=duni() -+ -+c calculate gaussian random numbers -+ -+ do i=1,2*(natms/2),2 -+ -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vxx(i)=rr1*cos(rr2) -+ vxx(i+1)=rr1*sin(rr2) -+ -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vyy(i)=rr1*cos(rr2) -+ vyy(i+1)=rr1*sin(rr2) -+ -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vzz(i)=rr1*cos(rr2) -+ vzz(i+1)=rr1*sin(rr2) -+ -+ enddo -+ if(mod(natms,2).ne.0)then -+ -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vxx(natms)=rr1*cos(rr2) -+ vyy(natms)=rr1*sin(rr2) -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vzz(natms)=rr1*cos(rr2) -+ -+ endif -+ -+ return -+ end subroutine gauss -+ -+ subroutine invert(a,b,d) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to invert a 3 * 3 matrix using cofactors -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith april 1992 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ real(8) a,b,d,r -+ -+ dimension a(9),b(9) -+ -+c calculate adjoint matrix -+ b(1)=a(5)*a(9)-a(6)*a(8) -+ b(2)=a(3)*a(8)-a(2)*a(9) -+ b(3)=a(2)*a(6)-a(3)*a(5) -+ b(4)=a(6)*a(7)-a(4)*a(9) -+ b(5)=a(1)*a(9)-a(3)*a(7) -+ b(6)=a(3)*a(4)-a(1)*a(6) -+ b(7)=a(4)*a(8)-a(5)*a(7) -+ b(8)=a(2)*a(7)-a(1)*a(8) -+ b(9)=a(1)*a(5)-a(2)*a(4) -+ -+c calculate determinant -+ d=a(1)*b(1)+a(4)*b(2)+a(7)*b(3) -+ r=0.d0 -+ if(abs(d).gt.0.d0)r=1.d0/d -+ -+c complete inverse matrix -+ b(1)=r*b(1) -+ b(2)=r*b(2) -+ b(3)=r*b(3) -+ b(4)=r*b(4) -+ b(5)=r*b(5) -+ b(6)=r*b(6) -+ b(7)=r*b(7) -+ b(8)=r*b(8) -+ b(9)=r*b(9) -+ -+ return -+ end subroutine invert -+ -+ subroutine jacobi(a,v,n) -+ -+c*********************************************************************** -+c -+c diagonalisation of real symmetric matices by jacobi method -+c -+c input parameters: -+c -+c a(n,n) is the matrix to be diagonalised -+c v(n,n) is the eigenvector matrix -+c n is the dimension of the matrices -+c -+c jacobi processes lower triangle only (upper triangle unchanged) -+c -+c variable rho sets absolute tolerance on convergence -+c variable tes is a moving tolerance that diminishes -+c on each pass until at true convergence tesdlrpot) .or. (ngrid-4 /= nint(cutpot/delpot))) then -+ -+ if (idnode == 0) write(nrite,"( -+ x 'expected radial increment : ',1p,e15.7,/, -+ x 'TABLE radial increment : ',1p,e15.7,/,/, -+ x 'expected number of grid points : ',0p,i10,/, -+ x 'grid points in TABLE : ',i10)") -+ x dlrpot, delpot, mxgrid, ngrid -+ -+ call error(idnode,22) -+ -+ endif -+ -+ if(cutpot.lt.rcut) call error(idnode,504) -+ if(abs(1.d0-(delpot/dlrpot)).gt.1.0d-8) then -+ if(idnode.eq.0) write(nrite, -+ x "(/,' TABLE arrays resized for mxgrid=',i10)") mxgrid -+ endif -+ -+c read potential arrays for all pairs -+ -+ do ivdw=1,ntpvdw -+ -+c read potential arrays if potential not already defined -+ -+ if(ltpvdw(ivdw).eq.0)then -+ -+c read pair potential labels and long range corrections -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_table_read(idnode,ntable) -+ -+ call getword(atom1,record,8,lenrec) -+ call getword(atom2,record,8,lenrec) -+ prmvdw(ivdw,1)=dblstr(record,lenrec,idum) -+ prmvdw(ivdw,2)=dblstr(record,lenrec,idum) -+ -+ katom1=0 -+ katom2=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom1.eq.unqatm(jtpatm))katom1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katom2=jtpatm -+ -+ enddo -+ -+ if(katom1.eq.0.or.katom2.eq.0)then -+ if(idnode.eq.0) -+ x write(nrite,'(a)') '****',atom1,'***',atom2,'****' -+ call error(idnode,81) -+ endif -+ -+ keyvdw=loc2(katom1,katom2) -+ -+ if(lstvdw(keyvdw).ne.ivdw) call error(idnode,23) -+ -+c read potential arrays -+ -+ if(mxbuff.lt.ngrid) then -+ -+ if(idnode.eq.0) -+ x write(nrite,*) 'mxbuff must be >=',ngrid,' in fortab' -+ call error(idnode,48) -+ -+ endif -+ -+c read in potential arrays -+ -+ do i=1,(ngrid+3)/4 -+ -+ l=min(4,ngrid-(i-1)*4) -+ if (idnode == 0) then -+ read(unit=ntable, fmt=*, end=100) -+ x (buffer((i-1)*4+j),j=1,l) -+ else -+ buffer((i-1)*4+1:(i-1)*4+l)=0.0d0 -+ endif -+ -+ enddo -+ call gdsum(buffer(1:ngrid),ngrid,buffer(ngrid+1:2*ngrid)) -+ -+c reconstruct arrays using 3pt interpolation -+ -+ rdr=1.d0/delpot -+ vvv(1,ivdw)=1.d0 -+ ggg(1,ivdw)=0.d0 -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ vk0=buffer(l) -+ vk1=buffer(l+1) -+ vk2=buffer(l+2) -+ -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ vvv(i,ivdw)=t1+(t2-t1)*ppp*0.5d0 -+ -+ enddo -+ -+c read in force arrays -+ -+ do i=1,(ngrid+3)/4 -+ -+ l=min(4,ngrid-(i-1)*4) -+ if (idnode == 0) then -+ read(unit=ntable, fmt=*, end=100) -+ x (buffer((i-1)*4+j),j=1,l) -+ else -+ buffer((i-1)*4+1:(i-1)*4+l)=0.0d0 -+ endif -+ -+ enddo -+ call gdsum(buffer(1:ngrid),ngrid,buffer(ngrid+1:2*ngrid)) -+ -+c reconstruct ggg arrays using 3pt interpolation -+ -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ vk0=buffer(l) -+ vk1=buffer(l+1) -+ vk2=buffer(l+2) -+ -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ -+ ggg(i,ivdw)=t1+(t2-t1)*ppp*0.5d0 -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c convert to internal units -+ -+ do k=1,ntpvdw -+ -+ if(ltpvdw(k).eq.0)then -+ -+ do i=1,mxgrid -+ -+ vvv(i,k)=vvv(i,k)*engunit -+ ggg(i,k)=ggg(i,k)*engunit -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)close (ntable) -+ -+ if(idnode.eq.0)write(nrite,'(/,/,1x,a)') -+ x 'potential tables read from TABLE file' -+ -+ return -+ -+c end of file error exit -+ -+ 100 call abort_table_read(idnode,ntable) -+ -+ end subroutine fortab -+ -+ subroutine abort_table_read(idnode,ntable) -+ -+c*********************************************************************** -+c -+c dl_poly error exit subroutine for reading TABLE file -+c -+c copyright - daresbury laboratory -+c author - w. smith sept 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ integer idnode,ntable -+ -+ if(idnode.eq.0)close (ntable) -+ -+ call error(idnode,24) -+ -+ end subroutine abort_table_read -+ -+ subroutine srfrce -+ x (lsolva,lfree,lghost,iatm,ik,engsrp,virsrp,rcut,dlrpot) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating short range force and -+c potential energy terms using verlet neighbour list -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992 -+c -+c version 3 -+c author - t. forester june 1993 -+c stress tensor added t.forester may 1994 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,k,l,kkk -+ real(8) engsrp,virsrp,rcut,dlrpot -+ real(8) ab,rrr,rsq,ppp,t1,t2,vk0,vk1,vk2,gk0,gk1,gk2,gamma -+ real(8) fi,rcsq,rdr,ai,aj,fx,fy,fz,omega -+ real(8) strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c interpolation spacing -+ -+ rdr=1.d0/dlrpot -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engsrp=0.d0 -+ virsrp=0.d0 -+ -+c store forces for iatm -+ -+ ai=dble(ltype(iatm)) -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ aj=dble(ltype(jatm)) -+ -+ if(ai.gt.aj) then -+ ab=ai*(ai-1.d0)*0.5d0+aj+0.5d0 -+ else -+ ab=aj*(aj-1.d0)*0.5d0+ai+0.5d0 -+ endif -+ -+ k=lstvdw(int(ab)) -+ -+ if((ltpvdw(k).lt.100).and.(abs(vvv(1,k)).gt.1.d-10))then -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ -+ if(l.eq.0)then -+ -+ omega=vvv(1,k) -+ gamma=ggg(1,k) -+ -+ else -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0=vvv(l,k) -+ vk1=vvv(l+1,k) -+ vk2=vvv(l+2,k) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ omega=t1+(t2-t1)*ppp*0.5d0 -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=ggg(l,k) -+ gk1=ggg(l+1,k) -+ gk2=ggg(l+2,k) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ gamma=(t1+(t2-t1)*ppp*0.5d0)/rsq -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+omega -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ vdw_fre=vdw_fre-omega -+ vdw_vir=vdw_vir+gamma*rsq -+ omega=lambda1*omega -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ vdw_fre=vdw_fre+omega -+ vdw_vir=vdw_vir-gamma*rsq -+ omega=lambda2*omega -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential and virial -+ -+ engsrp=engsrp+omega -+ virsrp=virsrp-gamma*rsq -+ -+ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+omega -+ -+c calculate forces -+ -+ fx=gamma*xdf(m) -+ fy=gamma*ydf(m) -+ fz=gamma*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc-gamma*rsq -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine srfrce -+ -+ subroutine lrcorrect -+ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, -+ x ntpatm,ntpvdw,elrc,engunit,virlrc,rcut,volm) -+ -+c************************************************************************* -+c -+c DL_POLY subroutine to evaluate long-range corrections to -+c pressure and energy in a periodic system. -+c -+c copyright daresbury laboratory 1993 -+c author - t. forester may 1993 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=10 -+ logical lsolva,lfree,lghost -+ integer idnode,imcon,keyfce,natms,ntpatm,i,ka,ntpvdw -+ integer ivdw,j,k,it,jt,kt,fail -+ real(8) natyp,nbtyp,nctyp,ndtyp,nafrz,nbfrz,ncfrz,ndfrz -+ real(8) elrc,engunit,virlrc,rcut,volm,twopi,eadd,padd -+ real(8) denprd,aaa,bbb,ccc,ddd,eee,eps,sig,rr0,ann,amm -+ real(8) denprd1,denprd2,denprd3,denprdf -+ integer, allocatable :: numtyp_sol0(:,:),numfrz_sol0(:,:) -+ integer, allocatable :: numtyp_sol1(:,:),numfrz_sol1(:,:) -+ integer, allocatable :: numtyp_sol2(:,:),numfrz_sol2(:,:) -+ integer, allocatable :: numtyp_fre(:,:),numfrz_fre(:,:) -+ real(8), allocatable :: elrc_sol0(:),elrc_exc0(:) -+ -+ dimension fail(nnn) -+ -+ twopi=2.0d0*pi -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ if(lfree.or.lghost)then -+ -+ allocate (numtyp_fre(mxatyp,0:2),stat=fail(1)) -+ allocate (numfrz_fre(mxatyp,0:2),stat=fail(2)) -+ allocate (elrc_exc0(mxtmls_exc2),stat=fail(3)) -+ -+ endif -+ -+ if(lsolva)then -+ -+ allocate (elrc_sol0(mxtmls_sol2),stat=fail(4)) -+ allocate (numtyp_sol0(mxatyp,mxtmls),stat=fail(5)) -+ allocate (numfrz_sol0(mxatyp,mxtmls),stat=fail(6)) -+ -+ if(lghost)then -+ -+ allocate (numtyp_sol1(mxatyp,mxtmls),stat=fail(7)) -+ allocate (numfrz_sol1(mxatyp,mxtmls),stat=fail(8)) -+ allocate (numtyp_sol2(mxatyp,mxtmls),stat=fail(9)) -+ allocate (numfrz_sol2(mxatyp,mxtmls),stat=fail(10)) -+ -+ endif -+ -+ endif -+ -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1015) -+ enddo -+ -+c initalise counter arrays -+ -+ do i=1,ntpatm -+ -+ numtyp(i)=0 -+ numfrz(i)=0 -+ -+ enddo -+ -+ if(lfree.or.lghost)then -+ -+ numtyp_fre(:,:)=0 -+ numfrz_fre(:,:)=0 -+ -+ endif -+ -+ if(lsolva)then -+ -+ numtyp_sol0(:,:)=0 -+ numfrz_sol0(:,:)=0 -+ -+ if(lghost)then -+ -+ numtyp_sol1(:,:)=0 -+ numfrz_sol1(:,:)=0 -+ numtyp_sol2(:,:)=0 -+ numfrz_sol2(:,:)=0 -+ -+ endif -+ -+ endif -+ -+c evaluate number density in system -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ numtyp(ka)=numtyp(ka)+1 -+ if(lstfrz(i).ne.0)numfrz(ka)=numfrz(ka)+1 -+ -+ enddo -+ -+ if(lfree.or.lghost)then -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ numtyp_fre(ka,atm_fre(i))=numtyp_fre(ka,atm_fre(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_fre(ka,atm_fre(i))=numfrz_fre(ka,atm_fre(i))+1 -+ -+ enddo -+ -+ endif -+ -+ if(lsolva)then -+ -+ if(lghost)then -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ -+ if(atm_fre(i).eq.0)then -+ -+ numtyp_sol0(ka,atmolt(i))=numtyp_sol0(ka,atmolt(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_sol0(ka,atmolt(i))=numfrz_sol0(ka,atmolt(i))+1 -+ -+ elseif(atm_fre(i).eq.1)then -+ -+ numtyp_sol1(ka,atmolt(i))=numtyp_sol1(ka,atmolt(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_sol1(ka,atmolt(i))=numfrz_sol1(ka,atmolt(i))+1 -+ -+ elseif(atm_fre(i).eq.2)then -+ -+ numtyp_sol2(ka,atmolt(i))=numtyp_sol2(ka,atmolt(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_sol2(ka,atmolt(i))=numfrz_sol2(ka,atmolt(i))+1 -+ -+ endif -+ -+ enddo -+ -+ else -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ numtyp_sol0(ka,atmolt(i))=numtyp_sol0(ka,atmolt(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_sol0(ka,atmolt(i))=numfrz_sol0(ka,atmolt(i))+1 -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c number densities -+ -+ do i=1,ntpatm -+ dens(i)=dble(numtyp(i))/volm -+ enddo -+ -+c long range corrections to energy and pressure -+ -+ elrc=0.d0 -+ elrc2=0.d0 -+ virlrc=0.d0 -+ virlrc2=0.d0 -+ denprdf=0.d0 -+ volm_sav=0.d0 -+ elrc_fre=0.d0 -+ vlrc_fre=0.d0 -+ -+ if(imcon.ne.0.and.imcon.ne.6.and.ntpvdw.gt.0) then -+ -+ if(mod(keyfce,2).eq.1) then -+ -+ ivdw=0 -+ -+ do i=1,ntpatm -+ -+ do j=1,i -+ -+ eadd=0.d0 -+ padd=0.d0 -+ -+ ivdw=ivdw+1 -+ k=lstvdw(ivdw) -+ -+ if(ltpvdw(k).eq.0) then -+ -+c tabulated potential -+ -+ eadd=prmvdw(k,1) -+ padd=-prmvdw(k,2) -+ -+ else if(ltpvdw(k).eq.1) then -+ -+c 12-6 potential -+ -+ aaa=prmvdw(k,1) -+ bbb=prmvdw(k,2) -+ -+ eadd=aaa/(9.d0*rcut**9)-bbb/(3.d0*rcut**3) -+ padd=12.d0*aaa/(9.d0*rcut**9)-6.d0*bbb/(3.d0*rcut**3) -+ -+ else if(ltpvdw(k).eq.2) then -+ -+c Lennard Jones potential -+ -+ eps=prmvdw(k,1) -+ sig=prmvdw(k,2) -+ -+ eadd=4.d0*eps*(sig**12/(9.d0*rcut**9)- -+ x sig**6/(3.d0*rcut**3)) -+ padd=4.d0*eps*(12.d0*sig**12/(9.d0*rcut**9)- -+ x 2.d0*sig**6/(rcut**3)) -+ -+ else if(ltpvdw(k).eq.3) then -+ -+c n - m potential -+ -+ eps=prmvdw(k,1) -+ ann=prmvdw(k,2) -+ amm=prmvdw(k,3) -+ rr0=prmvdw(k,4) -+ -+ eadd=eps/(ann-amm)*(amm*rr0**ann/((ann-3.d0)* -+ x rcut**(ann-3.d0))-ann*rr0**amm/((amm-3.0d0)* -+ x rcut**(amm-3.d0))) -+ padd=eps/(ann-amm)*ann*amm*(rr0**ann/((ann-3.d0)* -+ x rcut**(ann-3.d0))-rr0**amm/((amm-3.0d0)* -+ x rcut**(amm-3.d0))) -+ -+ else if(ltpvdw(k).eq.4) then -+ -+c buckingham exp - 6 potential -+ -+ ccc=prmvdw(k,3) -+ -+ eadd=-ccc/(3.d0*rcut**3) -+ padd=-2.d0*ccc/(rcut**3) -+ -+ else if(ltpvdw(k).eq.5) then -+ -+c born huggins meyer exp -6 - 8 potential -+ -+ ddd=prmvdw(k,4) -+ eee=prmvdw(k,5) -+ -+ eadd=-ddd/(3.d0*rcut**3)-eee/(5.d0*rcut**5) -+ padd=-2.d0*ddd/(rcut**3)-8.d0*eee/(5.d0*rcut**5) -+ -+ else if(ltpvdw(k).eq.6) then -+ -+c hydrogen bond 12 - 10 potential -+ -+ aaa=prmvdw(k,1) -+ bbb=prmvdw(k,2) -+ -+ eadd=aaa/(9.d0*rcut**9)-bbb/(7.d0*rcut**7) -+ padd=12.d0*aaa/(9.d0*rcut**9)-1.d1*bbb/(7.d0*rcut**7) -+ -+ endif -+ -+ if(i.ne.j) then -+ -+ eadd=eadd*2.d0 -+ padd=padd*2.d0 -+ -+ endif -+ -+ if(.not.(lfree.or.lghost))then -+ -+ denprd=twopi*(dble(numtyp(i))*dble(numtyp(j))- -+ x dble(numfrz(i))*dble(numfrz(j)))/volm**2 -+ -+ else -+ -+ nafrz=dble(numfrz_fre(i,0)+numfrz_fre(i,1)) -+ natyp=dble(numtyp_fre(i,0)+numtyp_fre(i,1)) -+ nbfrz=dble(numfrz_fre(j,0)+numfrz_fre(j,1)) -+ nbtyp=dble(numtyp_fre(j,0)+numtyp_fre(j,1)) -+ ncfrz=dble(numfrz_fre(i,0)+numfrz_fre(i,2)) -+ nctyp=dble(numtyp_fre(i,0)+numtyp_fre(i,2)) -+ ndfrz=dble(numfrz_fre(j,0)+numfrz_fre(j,2)) -+ ndtyp=dble(numtyp_fre(j,0)+numtyp_fre(j,2)) -+ -+ if(lghost)then -+ -+ denprd=twopi*(natyp*nbtyp-nafrz*nbfrz)/volm**2 -+ denprd3=twopi*(nctyp*ndtyp-ncfrz*ndfrz)/volm**2 -+ -+ elseif(lfree)then -+ -+ denprd1=twopi*(natyp*nbtyp-nafrz*nbfrz)/volm**2 -+ denprd2=twopi*(nctyp*ndtyp-ncfrz*ndfrz)/volm**2 -+ denprd=lambda1*denprd1+lambda2*denprd2 -+ denprd3=lambda2*denprd1+lambda1*denprd2 -+ denprdf=denprd2-denprd1 -+ -+ endif -+ -+ endif -+ -+ elrc=elrc+volm*denprd*eadd -+ virlrc=virlrc-denprd*padd*volm -+ -+ if(lfree.or.lghost)then -+ -+ elrc2=elrc2+volm*denprd3*eadd -+ virlrc2=virlrc2-denprd3*padd*volm -+ if(lfree)then -+ elrc_fre=elrc_fre+volm*denprdf*eadd -+ vlrc_fre=vlrc_fre-denprdf*padd*volm -+ endif -+ -+ endif -+ -+ if(lsolva)then -+ -+ elrc_sol0(:)=0.d0 -+ if(lghost)elrc_exc0(:)=0.d0 -+ -+ do it=1,mxtmls -+ -+ do jt=1,mxtmls -+ -+ kt=loc2(it,jt) -+ -+ if(lghost)then -+ -+ natyp=dble(numtyp_sol0(i,it)+numtyp_sol1(i,it)) -+ nbtyp=dble(numtyp_sol0(j,jt)+numtyp_sol1(j,jt)) -+ nafrz=dble(numfrz_sol0(i,it)+numfrz_sol1(i,it)) -+ nbfrz=dble(numfrz_sol0(j,jt)+numfrz_sol1(j,jt)) -+ -+ elrc_sol0(kt)=elrc_sol0(kt)+twopi*(natyp* -+ x nbtyp-nafrz*nbfrz)/volm**2 -+ -+ nctyp=dble(numtyp_sol0(i,it)+numtyp_sol2(i,it)) -+ ndtyp=dble(numtyp_sol0(j,jt)+numtyp_sol2(j,jt)) -+ ncfrz=dble(numfrz_sol0(i,it)+numfrz_sol2(i,it)) -+ ndfrz=dble(numfrz_sol0(j,jt)+numfrz_sol2(j,jt)) -+ -+ elrc_exc0(kt)=elrc_exc0(kt)+twopi*(nctyp* -+ x ndtyp-ncfrz*ndfrz)/volm**2 -+ -+ else -+ -+ natyp=dble(numtyp_sol0(i,it)) -+ nbtyp=dble(numtyp_sol0(j,jt)) -+ nafrz=dble(numfrz_sol0(i,it)) -+ nbfrz=dble(numfrz_sol0(j,jt)) -+ -+ elrc_sol0(kt)=elrc_sol0(kt)+twopi*(natyp* -+ x nbtyp-nafrz*nbfrz)/volm**2 -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ if(lghost)then -+ -+ elrc_sol(:)=elrc_sol(:)+volm*eadd*elrc_sol0(:) -+ elrc_exc(:)=elrc_exc(:)+volm*eadd*elrc_exc0(:) -+ -+ else -+ -+ elrc_sol(:)=elrc_sol(:)+volm*eadd*elrc_sol0(:) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ if(lfree.or.lghost)then -+ -+ elrc_sav=elrc -+ elrc2_sav=elrc2 -+ virlrc_sav=virlrc -+ virlrc2_sav=virlrc2 -+ elrc_fre_sav=elrc_fre -+ vlrc_fre_sav=vlrc_fre -+ -+ endif -+ -+ volm_sav=volm -+ -+ if(lghost)then -+ -+ elrc_sol_sav(:)=elrc_sol(:) -+ elrc_exc_sav(:)=elrc_exc(:) -+ -+ elseif(lsolva)then -+ -+ elrc_sol_sav(:)=elrc_sol(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,'long range correction for: vdw energy ',e15.6,/, -+ x 25x,': vdw pressure',e15.6)")elrc/engunit, -+ x prsunt*virlrc/(-3.d0*volm) -+ -+ if(lghost) -+ x write(nrite, -+ x "(/,/,'long range correction for: vdw energy ',e15.6,/, -+ x 25x,': vdw pressure',e15.6)")elrc2/engunit, -+ x prsunt*virlrc2/(-3.d0*volm) -+ -+ endif -+ -+c deallocate work arrays -+ -+ if(lfree.or.lghost) -+ x deallocate (elrc_exc0,numtyp_fre,numfrz_fre,stat=fail(1)) -+ -+ if(lsolva)then -+ -+ deallocate (elrc_sol0,numtyp_sol0,numfrz_sol0,stat=fail(2)) -+ -+ if(lghost)then -+ -+ deallocate (numtyp_sol1,numfrz_sol1,stat=fail(3)) -+ deallocate (numtyp_sol2,numfrz_sol2,stat=fail(4)) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine lrcorrect -+ -+ -+ subroutine srfrceneu -+ x (lsolva,lfree,lghost,ik,engsrp,virsrp,dlrpot,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating short range force and -+c potential energy terms using verlet neighbour list -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992 -+c -+c neutral groups -+c author - t. forester march 1994 -+c -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer ik,m,iatm,jatm,l,k,kkk -+ real(8) engsrp,virsrp,dlrpot,rcut,rcsq,fx,fy,fz,omega,omega_exc -+ real(8) rrr,ppp,vk0,vk1,vk2,t1,t2,gk0,gk1,gk2,rdlpot,gamma -+ real(8) ai,aj,ak,rsq,strs(6),strs_loc(6) -+ -+ lskip=(lfree.or.lghost) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c reciprocal of interpolation spacing -+ -+ rdlpot=1.d0/dlrpot -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engsrp=0.d0 -+ virsrp=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ iatm=ilist(m) -+ jatm=jlist(m) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(iatm)) -+ jdrive=driven(ltype(jatm)) -+ -+ endif -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ aj=ltype(jatm) -+ ai=ltype(iatm) -+ -+ if(ai.gt.aj) then -+ ak=(ai*(ai-1.d0)*0.5d0+aj+0.5d0) -+ else -+ ak=(aj*(aj-1.d0)*0.5d0+ai+0.5d0) -+ endif -+ k=lstvdw(int(ak)) -+ -+ if(abs(vvv(1,k)).gt.1.d-10)then -+ -+ rsq=rsqdf(m) -+ -+ if(rsq.lt.rcsq) then -+ -+ rrr=sqrt(rsq) -+ -+c determine interpolation panel for force arrays -+ -+ l=int(rrr*rdlpot) -+ ppp=rrr*rdlpot-dble(l) -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0=vvv(l,k) -+ vk1=vvv(l+1,k) -+ vk2=vvv(l+2,k) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ omega=t1+(t2-t1)*ppp*0.5d0 -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=ggg(l,k) -+ gk1=ggg(l+1,k) -+ gk2=ggg(l+2,k) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ gamma=(t1+(t2-t1)*ppp*0.5d0)/rsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+omega -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ omega=lambda1*omega -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ omega=lambda2*omega -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engsrp=omega+engsrp -+ virsrp=virsrp-gamma*rsq -+ -+ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+omega -+ -+ fx=gamma*xdf(m) -+ fy=gamma*ydf(m) -+ fz=gamma*zdf(m) -+ -+ fxx(iatm)=fxx(iatm)+fx -+ fyy(iatm)=fyy(iatm)+fy -+ fzz(iatm)=fzz(iatm)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc-gamma*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine srfrceneu -+ -+ end module vdw_module -diff -urN dl_class_1.9.orig/srcmod/vv_motion_module.f dl_class_1.9/srcmod/vv_motion_module.f ---- dl_class_1.9.orig/srcmod/vv_motion_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/vv_motion_module.f 2011-02-22 12:46:30.000000000 +0100 -@@ -0,0 +1,3031 @@ -+ module vv_motion_module -+ -+c*********************************************************************** -+c -+c dl_poly module for velocity verlet integration schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use metafreeze_module,only : lmetadyn -+ use property_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ contains -+ -+ subroutine rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,stresh) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for applying bond constraint corrections after -+c atomic integration. rattle algorithm -+c must be used in conjunction with integration algorithms -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical check,safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,icyc,i,j,k -+ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,esig -+ real(8) txx,tyy,tzz,xxt,yyt,zzt,stresh,dx,dy,dz,dis,omega2 -+ real(8) strs1,strs2,strs3,strs5,strs6,strs9,amti,amtj,gamma -+ real(8) gammi,gammj,dli,dlj -+ -+ dimension stresh(9) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ -+c constraint virial -+ -+ vircon=0.d0 -+ -+c accumulators for stress tensor -+ -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c test size of work arrays -+ -+ check=.true. -+ if(mxxdf.lt.nscons)check=.false. -+ if(mxnode.gt.1)call gstate(check) -+ if(.not.check)call error(idnode,412) -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ safe=.false. -+ -+ do while(.not.safe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate temporary bond vector -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c calculate maximum error in bondlength -+ -+ esig=0.d0 -+ -+ do k=1,nscons -+ -+c set bond parameter -+ -+ dx=dxt(k) -+ dy=dyt(k) -+ dz=dzt(k) -+ dis=prmcon(listcon(k,1)) -+ esig=max(esig,abs(dx*dx+dy*dy+dz*dz-dis*dis)/dis) -+ -+ enddo -+ -+ esig=esig*0.5d0 -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+c bypass calculations if all tolerances satisfied -+ -+ if(.not.safe)then -+ -+c initialise increment arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint forces -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c set constraint parameters -+ -+ dis=prmcon(listcon(k,1)) -+ omega2= dis*dis -+ amti= tstep*rmass(i) -+ amtj=-tstep*rmass(j) -+ -+c constraint force parameter -+ -+ dx=dxt(k) -+ dy=dyt(k) -+ dz=dzt(k) -+ -+ gamma=(omega2-(dx*dx+dy*dy+dz*dz))/ -+ x (-tstep*(amti-amtj)*(dxx(k)*dx+dyy(k)*dy+dzz(k)*dz)) -+ -+c accumulate bond virial -+ -+ vircon=vircon+gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ -+ strs1=strs1-gamma*dxx(k)*dxx(k) -+ strs2=strs2-gamma*dxx(k)*dyy(k) -+ strs3=strs3-gamma*dxx(k)*dzz(k) -+ strs5=strs5-gamma*dyy(k)*dyy(k) -+ strs6=strs6-gamma*dyy(k)*dzz(k) -+ strs9=strs9-gamma*dzz(k)*dzz(k) -+ -+c improve approximate constraint force -+ -+ gammi=-0.5d0*gamma*amti -+ xxt(i)=xxt(i)+dxx(k)*gammi -+ yyt(i)=yyt(i)+dyy(k)*gammi -+ zzt(i)=zzt(i)+dzz(k)*gammi -+ -+ gammj=-0.5d0*gamma*amtj -+ xxt(j)=xxt(j)+dxx(k)*gammj -+ yyt(j)=yyt(j)+dyy(k)*gammj -+ zzt(j)=zzt(j)+dzz(k)*gammj -+ -+ enddo -+ -+c sum up constraint forces across nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov)call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.0d0/dble(listme(i)) -+ dlj=1.0d0/dble(listme(j)) -+ -+ xxx(i)=xxx(i)+tstep*dli*xxt(i) -+ yyy(i)=yyy(i)+tstep*dli*yyt(i) -+ zzz(i)=zzz(i)+tstep*dli*zzt(i) -+ xxx(j)=xxx(j)+tstep*dlj*xxt(j) -+ yyy(j)=yyy(j)+tstep*dlj*yyt(j) -+ zzz(j)=zzz(j)+tstep*dlj*zzt(j) -+ -+ vxx(i)=vxx(i)+dli*xxt(i) -+ vzz(i)=vzz(i)+dli*zzt(i) -+ vyy(i)=vyy(i)+dli*yyt(i) -+ vxx(j)=vxx(j)+dlj*xxt(j) -+ vyy(j)=vyy(j)+dlj*yyt(j) -+ vzz(j)=vzz(j)+dlj*zzt(j) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c error exit for non-convergence -+ -+ if(.not.safe)return -+ -+c complete stress tensor -+ -+ stresh(1)=strs1 -+ stresh(2)=strs2 -+ stresh(3)=strs3 -+ stresh(4)=strs2 -+ stresh(5)=strs5 -+ stresh(6)=strs6 -+ stresh(7)=strs3 -+ stresh(8)=strs6 -+ stresh(9)=strs9 -+ -+c splice coordinate arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(stresh,9,buffer) -+ call splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ call splice -+ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+ return -+ end subroutine rdrattle_r -+ -+ subroutine rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for applying a bond constraints to -+c the velocities of the constrained atoms using the rattle -+c procedure (replicated data version) -+c -+c copyright - daresbury laboratory -+c author w.smith october 2002 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical safe -+ integer idnode,mxnode,natms,nscons,icyc -+ integer i,j,k -+ real(8) tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt -+ real(8) esig,amti,amtj,gamma,gammi,gammj,dli,dlj,tolvel -+ -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ -+c constraint convergence tolerance -+ -+ tolvel=tolnce/tstep -+ -+c start of rattle cycle -+ -+ icyc=0 -+ safe=.false. -+ -+ do while(.not.safe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c initialise velocity correction arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate velocity constraint corrections -+ -+ esig=0.d0 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ amti= 0.5d0*tstep*rmass(i) -+ amtj=-0.5d0*tstep*rmass(j) -+ -+c calculate constraint force parameter -+ -+ gamma=(dxx(k)*(vxx(i)-vxx(j))+dyy(k)*(vyy(i)-vyy(j))+ -+ x dzz(k)*(vzz(i)-vzz(j)))/((amti-amtj)* -+ x (dxx(k)**2+dyy(k)**2+dzz(k)**2)) -+ esig=max(esig,abs(gamma)) -+ -+c improve approximate constraint force -+ -+ gammi=-gamma*amti -+ xxt(i)=xxt(i)+gammi*dxx(k) -+ yyt(i)=yyt(i)+gammi*dyy(k) -+ zzt(i)=zzt(i)+gammi*dzz(k) -+ gammj=-gamma*amtj -+ xxt(j)=xxt(j)+gammj*dxx(k) -+ yyt(j)=yyt(j)+gammj*dyy(k) -+ zzt(j)=zzt(j)+gammj*dzz(k) -+ -+ enddo -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolvel) -+ if(mxnode.gt.1)then -+ -+ call gstate(safe) -+ -+ endif -+ -+c terminate iteration if constraints satisfied -+ -+ if(.not.safe)then -+ -+c transport velocity adjustments to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+c update velocities -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ vxx(i)=vxx(i)+dli*xxt(i) -+ vyy(i)=vyy(i)+dli*yyt(i) -+ vzz(i)=vzz(i)+dli*zzt(i) -+ dlj=1.d0/dble(listme(j)) -+ vxx(j)=vxx(j)+dlj*xxt(j) -+ vyy(j)=vyy(j)+dlj*yyt(j) -+ vzz(j)=vzz(j)+dlj*zzt(j) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c error exit if rattle fails -+ -+ if(.not.safe)return -+ -+c splice velocity arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ call splice -+ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+ return -+ end subroutine rdrattle_v -+ -+ subroutine nvevv_1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x tstep,engke,tolnce,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c nve ensemble -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=4 -+ -+ logical safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,i,j,k -+ integer iatm0,iatm1 -+ real(8) tstep,engke,tolnce,vircon -+ integer fail(nnn) -+ real(8) strkin(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+ safe=.true. -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1980) -+ enddo -+ -+ endif -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ if(ntcons.gt.0) -+ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c update velocities for first and second stages -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) -+ -+ endif -+ -+ return -+ end subroutine nvevv_1 -+ -+ subroutine nvtvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x tstep,taut,sigma,engke,tolnce,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c nvt ensemble - Berendsen thermostat (n.b. not symplectic) -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=4 -+ -+ logical safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons -+ integer i,j,k,iatm0,iatm1 -+ real(8) tstep,taut,sigma,engke,tolnce,vircon,chit -+ integer fail(nnn) -+ real(8) strkin(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+ safe=.true. -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1990) -+ enddo -+ -+ endif -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ if(ntcons.gt.0) -+ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c first pass of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c second pass of velocity verlet algorithm -+ -+ else -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ enddo -+ -+ engke=engke*chit**2 -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz, -+ x buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) -+ -+ endif -+ -+ return -+ end subroutine nvtvv_b1 -+ -+ subroutine nvtvv_e1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x tstep,engke,tolnce,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c nvt ensemble - evans thermostat -+c Comp. Phys. reports 1, 299, (1984) -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=4 -+ -+ logical safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons -+ integer i,j,k,iatm0,iatm1 -+ real(8) tstep,engke,tolnce,vircon,vdotf,scale,chit -+ integer fail(nnn) -+ real(8) strkin(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+ safe=.true. -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2000) -+ enddo -+ -+ endif -+ -+ if(ntcons.eq.0)safe=.true. -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ if(ntcons.gt.0) -+ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy and evans thermostat parameter -+ -+ engke=0.d0 -+ vdotf=0.d0 -+ do i=iatm0,iatm1 -+ -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ buffer(2)=vdotf -+ call gdsum(buffer(1),2,buffer(3)) -+ engke=buffer(1) -+ vdotf=buffer(2) -+ -+ endif -+ engke=0.5d0*engke -+ chit=0.5d0*vdotf/engke -+ -+c thermostat the velocities -+ -+ scale=(1.d0-0.5d0*tstep*chit) -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate kinetic energy and evans thermostat parameter -+ -+ engke=0.d0 -+ vdotf=0.d0 -+ do i=iatm0,iatm1 -+ -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ buffer(2)=vdotf -+ call gdsum(buffer(1),2,buffer(3)) -+ engke=buffer(1) -+ vdotf=buffer(2) -+ -+ endif -+ engke=0.5d0*engke -+ chit=0.5d0*vdotf/engke -+ scale=(1.d0-0.5d0*tstep*chit) -+ -+c scale velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+ engke=engke*scale**2 -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) -+ -+ endif -+ -+ return -+ end subroutine nvtvv_e1 -+ -+ subroutine nvtvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x ntshl,keyshl,tstep,taut,sigma,chit,consv,conint,engke, -+ x tolnce,vircon,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c nvt ensemble - nose-hoover thermostat -+c Molecular Physics 87 (1996) 1117 -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=4 -+ -+ logical safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons -+ integer i,j,k,iatm0,iatm1 -+ real(8) tstep,taut,sigma,chit,consv,conint,engke,tolnce,vircon -+ real(8) hstep,qmass -+ integer fail(nnn) -+ real(8) strkin(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ safe=.true. -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2010) -+ enddo -+ -+ endif -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ hstep=0.5d0*tstep -+ qmass=2.d0*sigma*taut**2 -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ if(ntcons.gt.0) -+ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c integrate and apply nvt thermostat -+ -+ call nvtscale -+ x (idnode,mxnode,natms,engke,sigma,hstep,qmass,taut, -+ x chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c integrate and apply nvt thermostat -+ -+ call nvtscale -+ x (idnode,mxnode,natms,engke,sigma,hstep,qmass,taut, -+ x chit,conint) -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ consv=conint+0.5d0*qmass*chit**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) -+ -+ endif -+ -+ return -+ end subroutine nvtvv_h1 -+ -+ subroutine nptvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,tstep,taut,taup,sigma,engke,press,elrc, -+ x virlrc,tolnce,virtot,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c npt ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith december 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical newjob,safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm -+ integer i,j,k,iatm0,iatm1,mxiter,iter,kk -+ real(8) tstep,taut,taup,sigma,engke,press,elrc,virlrc,tolnce -+ real(8) virtot,vircon,volm,volm0,elrc0,virlrc0,psyst -+ real(8) chit,chip,scale,beta -+ -+ integer fail(nnn) -+ real(8) strkin(9),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./,beta/7.3728d-3/ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2020) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(4)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(5)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(6)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(7)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2030) -+ enddo -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ do i=iatm0,iatm1 -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+ endif -+ -+c iteration required if ntcons > 0 and isw = 1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+ scale=1.d0 -+ -+ if(iter.eq.mxiter)then -+ -+c calculate system pressure -+ -+ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) -+ -+c apply Berendsen barostat taup is relaxation time -+ -+ chip=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip**(1.d0/3.d0) -+ volm=chip*volm -+ -+c reset cell parameters for new volume -+ -+ do i=1,9 -+ cell(i)=scale*cell(i) -+ enddo -+ -+ endif -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=scale*xxx(i)+tstep*vxx(i) -+ yyy(i)=scale*yyy(i)+tstep*vyy(i) -+ zzz(i)=scale*zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+ if(iter.lt.mxiter)then -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor for tethered bonds -+ -+ do i=1,9 -+ eta(i)=scale*uni(i) -+ enddo -+ -+c second pass of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c apply Berendsen thermostat taut is relaxation time -+ -+ engke=getkin(natms,idnode,mxnode) -+ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nptvv_b1 -+ -+ subroutine nptvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x ntpatm,ntshl,keyshl,tstep,taut,taup,sigma,temp,chip,chit, -+ x consv,conint,engke,elrc,tolnce,vircon,virtot,virlrc,volm, -+ x press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c npt ensemble - Melchionna, Ciccotti and Holian -+c Molecular Physics 78 (1993) 533 -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith november 2002 -+c amended - w. smith january 2005: f90 conversion -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ integer, parameter :: ncyc=5 -+ -+ logical safe,lshmov,newjob -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm -+ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,icyc -+ real(8) tstep,taup,taut,sigma,temp,chip,chit,consv,conint -+ real(8) engke,elrc,tolnce,vircon,virtot,virlrc,volm,press -+ real(8) volm0,elrc0,virlrc0,hstep,qstep,totmas,qmass,pmass -+ real(8) vzero,chit0,chip0,cons0,scale,fstep -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ integer fail(nnn) -+ real(8) cell0(9),com(3),vom(3),strkin(9),uni(9) -+ -+ save newjob,totmas,volm0,elrc0,virlrc0,dens0 -+ save cell0,iatm0,iatm1,hstep,qstep,fstep,pmass,qmass -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2040) -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c inertia parameter for Nose-Hoover thermostat and barostat -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2050) -+ enddo -+ -+ endif -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metdynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c store current integration variables if ntcons > 0 -+ -+ if(ntcons.gt.0)then -+ -+ vzero=volm -+ chit0=chit -+ chip0=chip -+ cons0=conint -+ do i=iatm0,iatm1 -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+ endif -+ -+c iteration necessary if ntcons > 0 and isw = 1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+c volume integration parameter -+ -+ do icyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, -+ x taut,chip,chit,conint) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptscale_p -+ x (idnode,mxnode,natms,engke,fstep,pmass,chip,chit, -+ x volm,press,vircon,virtot) -+ -+c integrate and apply npt thermostat -+ -+ call nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, -+ x taut,chip,chit,conint) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c update positions -+ -+ scale=exp(tstep*chip) -+ do i=iatm0,iatm1 -+ -+ xxx(i)=scale*(xxx(i)-com(1))+tstep*vxx(i)+com(1) -+ yyy(i)=scale*(yyy(i)-com(2))+tstep*vyy(i)+com(2) -+ zzz(i)=scale*(zzz(i)-com(3))+tstep*vzz(i)+com(3) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c restore original integration parameters if iter < mxiter -+ -+ if(iter.lt.mxiter)then -+ -+ volm=vzero -+ chit=chit0 -+ chip=chip0 -+ conint=cons0 -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+ do icyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, -+ x taut,chip,chit,conint) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptscale_p -+ x (idnode,mxnode,natms,engke,fstep,pmass,chip,chit, -+ x volm,press,vircon,virtot) -+ -+c integrate and apply npt thermostat -+ -+ call nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, -+ x taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ consv=conint+0.5d0*qmass*chit**2+ -+ x 0.5d0*pmass*chip**2+press*volm -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor (for tethered atoms) -+ -+ do i=1,9 -+ eta(i)=chip*uni(i) -+ enddo -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nptvv_h1 -+ -+ subroutine nstvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,mode,tstep,taut,taup,sigma,engke,press,elrc, -+ x virlrc,tolnce,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c anisotropic npt ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith december 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical newjob,safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm -+ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,mode -+ real(8) tstep,taut,taup,sigma,engke,press,elrc,virlrc,tolnce,beta -+ real(8) vircon,volm,volm0,elrc0,virlrc0,chit -+ real(8) xtmp,ytmp,ztmp -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ integer fail(nnn) -+ real(8) uni(9),strkin(9),celp(10) -+ -+ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./,beta/7.3728d-3/ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2060) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(4)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(5)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(6)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(7)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2070) -+ enddo -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c extract previous constraint terms from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ do i=iatm0,iatm1 -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+ endif -+ -+c iteration required if ntcons > 0 and isw = 1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+c zero scaling matrix -+ -+ do i=1,9 -+ eta(i)=uni(i) -+ enddo -+ -+ if(iter.eq.mxiter)then -+ -+c calculate Berendsen barostat - taup is relaxation time -+ -+ do i=1,9 -+ eta(i)=tstep*beta*(stress(i)+strcns(i)- -+ x press*volm*uni(i))/(taup*volm)+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c reset cell parameters for new volume -+ -+ call mat_mul(eta,cell,cell) -+ -+c calculate new volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+ endif -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xtmp=eta(1)*xxx(i)+eta(4)*yyy(i)+eta(7)*zzz(i) -+ ytmp=eta(2)*xxx(i)+eta(5)*yyy(i)+eta(8)*zzz(i) -+ ztmp=eta(3)*xxx(i)+eta(6)*yyy(i)+eta(9)*zzz(i) -+ xxx(i)=tstep*vxx(i)+xtmp -+ yyy(i)=tstep*vyy(i)+ytmp -+ zzz(i)=tstep*vzz(i)+ztmp -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+ if(iter.lt.mxiter)then -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c second pass of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c apply Berendsen thermostat taut is relaxation time -+ -+ engke=getkin(natms,idnode,mxnode) -+ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxo,yyo,zzo,stat=fail(1)) -+ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nstvv_b1 -+ -+ subroutine nstvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x ntpatm,mode,ntshl,keyshl,tstep,taut,taup,sigma,temp,chit, -+ x consv,conint,engke,elrc,tolnce,vircon,virlrc,volm,press, -+ x chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c anisotropic npt ensemble - Melchionna, Ciccotti and Holian -+c Molecular Physics 78 (1993) 533 -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith november 2002 -+c amended - w. smith january 2005 : f90 conversion -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ integer, parameter :: ncyc=5 -+ -+ logical safe,lshmov,newjob -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm -+ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,icyc,mode -+ real(8) tstep,taup,taut,sigma,temp,chit,consv,conint,chit0 -+ real(8) engke,elrc,tolnce,vircon,virlrc,volm,press,volm0 -+ real(8) elrc0,virlrc0,hstep,qstep,totmas,qmass,pmass -+ real(8) cons0,cxx,cyy,czz,chip2,fstep -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ integer fail(nnn) -+ real(8) com(3),vom(3),czero(9),strkin(9),eta0(9),celp(10) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metdynamics shell thermostat variables -+ -+ data newjob/.true./ -+ -+ save newjob,totmas,volm0,elrc0,virlrc0,dens0 -+ save iatm0,iatm1,hstep,qstep,pmass,qmass,fstep -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2080) -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c system total mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c inertia parameter for Nose-Hoover thermostat and barostat -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2090) -+ enddo -+ -+ endif -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metdynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ chit0=chit -+ cons0=conint -+ do i=1,9 -+ -+ czero(i)=cell(i) -+ eta0(i)=eta(i) -+ -+ enddo -+ do i=iatm0,iatm1 -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+ endif -+ -+c subtract kinetic terms from stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ do i=1,9 -+ stress(i)=stress(i)-strkin(i) -+ enddo -+ -+c iteration necessary if ntcons > 0 and isw = 1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+c calculate current volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+ do icyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstscale_p -+ x (idnode,mxnode,natms,mode,fstep,pmass,chit,press,volm) -+ -+c integrate and apply nst thermostat -+ -+ call nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ cxx=xxx(i)-com(1) -+ cyy=yyy(i)-com(2) -+ czz=zzz(i)-com(3) -+ -+ xxx(i)=xxx(i)+ -+ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ yyy(i)=yyy(i)+ -+ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ zzz(i)=zzz(i)+ -+ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c subtract old constraint terms from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+c correct constraint bonds using rattle -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+c add new constraint terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c restore original integration parameters if iter < mxiter -+ -+ if(iter.lt.mxiter)then -+ -+ chit=chit0 -+ conint=cons0 -+ do i=1,9 -+ -+ cell(i)=czero(i) -+ eta(i)=eta0(i) -+ -+ enddo -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c add constraint terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i) -+ enddo -+ -+c correct constraint bond velocities using rattle -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+ do icyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstscale_p -+ x (idnode,mxnode,natms,mode,fstep,pmass,chit,press,volm) -+ -+c integrate and apply nst thermostat -+ -+ call nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nstvv_h1 -+ -+ end module vv_motion_module -+ -diff -urN dl_class_1.9.orig/srcmod/vv_rotation1_module.f dl_class_1.9/srcmod/vv_rotation1_module.f ---- dl_class_1.9.orig/srcmod/vv_rotation1_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/vv_rotation1_module.f 2011-02-22 12:46:30.000000000 +0100 -@@ -0,0 +1,4701 @@ -+ module vv_rotation1_module -+ -+c*********************************************************************** -+c -+c dl_poly module 1 for velocity verlet rotational integration -+c schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use metafreeze_module, only : lmetadyn -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use vv_motion_module -+ use utility_module -+ -+ contains -+ -+ subroutine rotate_omega -+ x (idnode,mxnode,ngrp,tstep,p0,p1,p2,p3,dtx,dty,dtz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for updating the angular velocity and momentum -+c for rigid bodies -+c -+c copyright - daresbury laboratory -+c author - w. smith sept 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,ngrp,i,j,jr,jrs,ig,igrp1,igrp2,id -+ real(8) ftx,fty,ftz,fmx,fmy,fmz,tstep,tqx,tqy,tqz,tq0,tq1,tq2,tq3 -+ -+ real(8) p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp) -+ real(8) dtx(mxatms),dty(mxatms),dtz(mxatms),rot(9) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ tq1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ tq2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ tq3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=p0(ig)+tq0*tstep -+ p1(ig)=p1(ig)+tq1*tstep -+ p2(ig)=p2(ig)+tq2*tstep -+ p3(ig)=p3(ig)+tq3*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) -+ -+ enddo -+ -+ return -+ end subroutine rotate_omega -+ -+ subroutine nosquish(ig,tstep,qq0,qq1,qq2,qq3,pp0,pp1,pp2,pp3) -+ -+c*********************************************************************** -+c -+c dlpoly routine to implement the symplectic no_squish quaternion -+c algorithm of miller et al j.chem.phys 116 (2002) 8649 -+c -+c copyright daresbury laboratory -+c author m. leslie jan 2004 -+c amended w.smith mar 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer m,ig,id -+ real(8) zetax,zetay,zetaz,tstep,cs,sn,trstep -+ -+ integer, parameter :: mrot=10 -+ real(8), parameter :: ov4=0.25d0 -+ real(8), parameter :: ov8=0.125d0 -+ -+ real(8) qq0(*),qq1(*),qq2(*),qq3(*) -+ real(8) pp0(*),pp1(*),pp2(*),pp3(*) -+ -+ real(8) qn1(0:3),pq2(0:3),qn2(0:3),pq3(0:3) -+ real(8) qn3(0:3),pq4(0:3) -+ -+c rotational time step -+ -+ trstep=tstep/dble(mrot) -+ -+c rotation: iterate over mrot rotational time steps -+ -+ id=lstgtp(ig) -+ -+ do m=1,mrot -+ -+ zetaz=ov8*rotinz(id,2)*trstep* -+ x (-pp0(ig)*qq3(ig)+pp1(ig)*qq2(ig)- -+ x pp2(ig)*qq1(ig)+pp3(ig)*qq0(ig)) -+ cs=cos(zetaz) -+ sn=sin(zetaz) -+ qn1(0)=cs*qq0(ig)-sn*qq3(ig) -+ qn1(1)=cs*qq1(ig)+sn*qq2(ig) -+ qn1(2)=cs*qq2(ig)-sn*qq1(ig) -+ qn1(3)=cs*qq3(ig)+sn*qq0(ig) -+ pq2(0)=cs*pp0(ig)-sn*pp3(ig) -+ pq2(1)=cs*pp1(ig)+sn*pp2(ig) -+ pq2(2)=cs*pp2(ig)-sn*pp1(ig) -+ pq2(3)=cs*pp3(ig)+sn*pp0(ig) -+ -+ zetay=ov8*rotiny(id,2)*trstep* -+ x (-pq2(0)*qn1(2)-pq2(1)*qn1(3)+ -+ x pq2(2)*qn1(0)+pq2(3)*qn1(1)) -+ cs=cos(zetay) -+ sn=sin(zetay) -+ qn2(0)=cs*qn1(0)-sn*qn1(2) -+ qn2(1)=cs*qn1(1)-sn*qn1(3) -+ qn2(2)=cs*qn1(2)+sn*qn1(0) -+ qn2(3)=cs*qn1(3)+sn*qn1(1) -+ pq3(0)=cs*pq2(0)-sn*pq2(2) -+ pq3(1)=cs*pq2(1)-sn*pq2(3) -+ pq3(2)=cs*pq2(2)+sn*pq2(0) -+ pq3(3)=cs*pq2(3)+sn*pq2(1) -+ -+ zetax=ov4*rotinx(id,2)*trstep* -+ x (-pq3(0)*qn2(1)+pq3(1)*qn2(0)+ -+ x pq3(2)*qn2(3)-pq3(3)*qn2(2)) -+ cs=cos(zetax) -+ sn=sin(zetax) -+ qn3(0)=cs*qn2(0)-sn*qn2(1) -+ qn3(1)=cs*qn2(1)+sn*qn2(0) -+ qn3(2)=cs*qn2(2)+sn*qn2(3) -+ qn3(3)=cs*qn2(3)-sn*qn2(2) -+ pq4(0)=cs*pq3(0)-sn*pq3(1) -+ pq4(1)=cs*pq3(1)+sn*pq3(0) -+ pq4(2)=cs*pq3(2)+sn*pq3(3) -+ pq4(3)=cs*pq3(3)-sn*pq3(2) -+ -+ zetay=ov8*rotiny(id,2)*trstep* -+ x (-pq4(0)*qn3(2)-pq4(1)*qn3(3)+ -+ x pq4(2)*qn3(0)+pq4(3)*qn3(1)) -+ cs=cos(zetay) -+ sn=sin(zetay) -+ qn2(0)=cs*qn3(0)-sn*qn3(2) -+ qn2(1)=cs*qn3(1)-sn*qn3(3) -+ qn2(2)=cs*qn3(2)+sn*qn3(0) -+ qn2(3)=cs*qn3(3)+sn*qn3(1) -+ pq3(0)=cs*pq4(0)-sn*pq4(2) -+ pq3(1)=cs*pq4(1)-sn*pq4(3) -+ pq3(2)=cs*pq4(2)+sn*pq4(0) -+ pq3(3)=cs*pq4(3)+sn*pq4(1) -+ -+ zetaz=ov8*rotinz(id,2)*trstep* -+ x (-pq3(0)*qn2(3)+pq3(1)*qn2(2)- -+ x pq3(2)*qn2(1)+pq3(3)*qn2(0)) -+ cs=cos(zetaz) -+ sn=sin(zetaz) -+ qq0(ig)=cs*qn2(0)-sn*qn2(3) -+ qq1(ig)=cs*qn2(1)+sn*qn2(2) -+ qq2(ig)=cs*qn2(2)-sn*qn2(1) -+ qq3(ig)=cs*qn2(3)+sn*qn2(0) -+ pp0(ig)=cs*pq3(0)-sn*pq3(3) -+ pp1(ig)=cs*pq3(1)+sn*pq3(2) -+ pp2(ig)=cs*pq3(2)-sn*pq3(1) -+ pp3(ig)=cs*pq3(3)+sn*pq3(0) -+ -+ enddo -+ -+ return -+ end subroutine nosquish -+ -+ subroutine nveqvv_1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author m. leslie jan 2004 -+c amended w.smith jan 2005: f90 conversion -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr -+ integer id,ifre,jrs,idum,ig -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) tqx,tqy,tqz,ftx,fty,ftz -+ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz -+ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,engfke -+ -+ integer, parameter :: nnn=6 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ -+ save newjob,p0,p1,p2,p3 -+ -+ data newjob/.true./ -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2100) -+ enddo -+ -+ newjob=.false. -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+c operations common to first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*pt5*tstep -+ p1(ig)=p1(ig)+qt1*pt5*tstep -+ p2(ig)=p2(ig)+qt2*pt5*tstep -+ p3(ig)=p3(ig)+qt3*pt5*tstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c merge centre of mass velocities from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) -+ -+ enddo -+ -+c merge centre of mass position from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nveqvv_1 -+ -+ subroutine nvtqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, -+ x vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c nvt ensemble - Berendsen thermostat (n.b. not symplectic) -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith mar 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr -+ integer id,ifre,jrs,idum,ig,iatm0,iatm1 -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) tqx,tqy,tqz,ftx,fty,ftz -+ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz -+ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke -+ real(8) chit,engfke -+ -+ integer, parameter :: nnn=6 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ -+ save newjob,p0,p1,p2,p3 -+ -+ data newjob/.true./ -+ -+c atom block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2120) -+ enddo -+ -+ newjob=.false. -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+c operations common to first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*pt5*tstep -+ p1(ig)=p1(ig)+qt1*pt5*tstep -+ p2(ig)=p2(ig)+qt2*pt5*tstep -+ p3(ig)=p3(ig)+qt3*pt5*tstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algoritm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities -+ -+ do i=iatm0,iatm1 -+ -+ if(lstfrz(i).eq.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c exchange position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c merge group velocities from all processors -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nvtqvv_b1 -+ -+ subroutine nvtqvv_h1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke,engrot, -+ x taut,sigma,tolnce,tstep,vircom,vircon,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c nvt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith april 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=6 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr -+ integer id,ig,ifre,jrs,idum -+ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep -+ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn -+ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc -+ real(8) engfke -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newjob,p0,p1,p2,p3 -+ -+ data newjob/.true./ -+ -+c timestep parameters -+ -+ hstep=pt5*tstep -+ -+c nose-hoover inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2140) -+ enddo -+ -+ newjob=.false. -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c apply thermostat for first stage -+ -+ if(isw.eq.1)then -+ -+ call nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x hstep,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ endif -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+c operations common to first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*hstep -+ p1(ig)=p1(ig)+qt1*hstep -+ p2(ig)=p2(ig)+qt2*hstep -+ p3(ig)=p3(ig)+qt3*hstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algoritm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c apply thermostat for second stage and calculate kinetic energy -+ -+ call nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x hstep,qmass,taut,chit,conint) -+ -+ engke=engfke+engtrn -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ consv=conint+0.5d0*qmass*chit**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c merge group velocities from all processors -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nvtqvv_h1 -+ -+ subroutine nptqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c npt ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith april 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr,kk -+ integer id,ifre,jrs,idum,ig,iatm0,iatm1,ntpatm,iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) tqx,tqy,tqz,ftx,fty,ftz -+ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz -+ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke -+ real(8) chit,chip,beta,volm,volm0,elrc,elrc0,virlrc,virlrc0 -+ real(8) virtot,psyst,press,taup,scale,engfke -+ -+ integer, parameter :: nnn=11 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ -+ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./,beta/7.3728d-3/ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2160) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c atom block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ if(isw.eq.1)then -+ -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(6)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(7)) -+ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp),stat=fail(8)) -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(10)) -+ -+ endif -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(11)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2170) -+ enddo -+ -+ newjob=.false. -+ if(ntcons.gt.0)safe=.false. -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn -+ -+c calculate quaternion momenta at start of time step -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c rigid body motion for first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*pt5*tstep -+ p1(ig)=p1(ig)+qt1*pt5*tstep -+ p2(ig)=p2(ig)+qt2*pt5*tstep -+ p3(ig)=p3(ig)+qt3*pt5*tstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ c0(ig)=p0(ig) -+ c1(ig)=p1(ig) -+ c2(ig)=p2(ig) -+ c3(ig)=p3(ig) -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ -+ enddo -+ -+ endif -+ -+c iteration required if ntcons > 0 -+ -+ mxiter=1 -+ if(ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+ scale=1.d0 -+ -+ if(iter.eq.mxiter)then -+ -+c calculate system pressure -+ -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ -+c apply Berendsen barostat -+ -+ chip=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip**(1.d0/3.d0) -+ volm=chip*volm -+ -+c reset cell parameters for new volume -+ -+ do i=1,9 -+ cell(i)=scale*cell(i) -+ enddo -+ -+ endif -+ -+c update centre of mass position -+ -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=scale*gcmx(ig)+tstep*gvxx(ig) -+ gcmy(ig)=scale*gcmy(ig)+tstep*gvyy(ig) -+ gcmz(ig)=scale*gcmz(ig)+tstep*gvzz(ig) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=gcmx(ig)+ -+ x rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ yyy(i)=gcmy(ig)+ -+ x rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ zzz(i)=gcmz(ig)+ -+ x rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=scale*xxx(i)+tstep*vxx(i) -+ yyy(i)=scale*yyy(i)+tstep*vyy(i) -+ zzz(i)=scale*zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+ if(iter.lt.mxiter)then -+ -+ do i=1,natms -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ p0(ig)=c0(ig) -+ p1(ig)=c1(ig) -+ p2(ig)=c2(ig) -+ p3(ig)=c3(ig) -+ gcmx(ig)=gxo(ig) -+ gcmy(ig)=gyo(ig) -+ gcmz(ig)=gzo(ig) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor for tethered bonds -+ -+ do i=1,9 -+ eta(i)=scale*uni(i) -+ enddo -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities -+ -+ do i=iatm0,iatm1 -+ -+ if(lstfrz(i).eq.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c merge group velocities from all processors -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ if(isw.eq.1)then -+ -+ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,c0,c1,c2,c3,stat=fail(5)) -+ deallocate(gxo,gyo,gzo,stat=fail(6)) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine nptqvv_b1 -+ -+ subroutine nptqvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircon,virtot,virlrc,vircom,volm,press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c npt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith may 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ integer, parameter :: ncyc=5 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr -+ integer id,ig,ifre,jrs,idum,mxiter,iter,ntpatm,kk,icyc -+ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep -+ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn -+ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc -+ real(8) taup,temp,press,virtot,vzero,chit0,chip0,cons0 -+ real(8) chip,volm,elrc,elrc0,virlrc,virlrc0,qstep,pmass,totmas -+ real(8) volm0,scale,cxx,cyy,czz,engfke,fstep -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),cell0(9),com(3),vom(3),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: oxo(:),oyo(:),ozo(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newjob,hstep,qstep,fstep,pmass,qmass -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,volm0,elrc0,virlrc0 -+ save totmas,dens0,cell0 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2200) -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c nose-hoover thermostat and barostat inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ -+ if(ntcons.gt.0)then -+ -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(2)) -+ allocate(oxo(mxgrp),oyo(mxgrp),ozo(mxgrp),stat=fail(3)) -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(4)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(5)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(9)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(10)) -+ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(11)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(12)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2210) -+ enddo -+ -+ newjob=.false. -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=1,natms -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=1,ngrp -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store current integration variables if ntcons > 0 -+ -+ if(ntcons.gt.0)then -+ -+ vzero=volm -+ chit0=chit -+ chip0=chip -+ cons0=conint -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ oxo(ig)=omx(ig) -+ oyo(ig)=omy(ig) -+ ozo(ig)=omz(ig) -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ gvxo(ig)=gvxx(ig) -+ gvyo(ig)=gvyy(ig) -+ gvzo(ig)=gvzz(ig) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c iteration necessary if ntcons > 0 and isw=1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+ if(isw.eq.1)then -+ -+ do icyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+ engke=engfke+engtrn -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c calculate quaternion momenta -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*hstep -+ p1(ig)=p1(ig)+qt1*hstep -+ p2(ig)=p2(ig)+qt2*hstep -+ p3(ig)=p3(ig)+qt3*hstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ cxx=gcmx(ig)-com(1) -+ cyy=gcmy(ig)-com(2) -+ czz=gcmz(ig)-com(3) -+ gcmx(ig)=gcmx(ig)+tstep*(gvxx(ig)+chip*cxx) -+ gcmy(ig)=gcmy(ig)+tstep*(gvyy(ig)+chip*cyy) -+ gcmz(ig)=gcmz(ig)+tstep*(gvzz(ig)+chip*czz) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ cxx=xxx(i)-com(1) -+ cyy=yyy(i)-com(2) -+ czz=zzz(i)-com(3) -+ xxx(i)=xxx(i)+tstep*(vxx(i)+chip*cxx) -+ yyy(i)=yyy(i)+tstep*(vyy(i)+chip*cyy) -+ zzz(i)=zzz(i)+tstep*(vzz(i)+chip*czz) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c restore original integration parameters if iter < mxiter -+ -+ if(iter.lt.mxiter)then -+ -+ volm=vzero -+ chit=chit0 -+ chip=chip0 -+ conint=cons0 -+ do i=1,natms -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ omx(ig)=oxo(ig) -+ omy(ig)=oyo(ig) -+ omz(ig)=ozo(ig) -+ gcmx(ig)=gxo(ig) -+ gcmy(ig)=gyo(ig) -+ gcmz(ig)=gzo(ig) -+ gvxx(ig)=gvxo(ig) -+ gvyy(ig)=gvyo(ig) -+ gvzz(ig)=gvzo(ig) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c operations for second stage only -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ do icyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+ engke=engfke+engtrn -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c calculate conserved variable -+ -+ consv=conint+0.5d0*qmass*chit**2+press*volm -+ x +0.5d0*pmass*chip**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c end of iteration cycle -+ -+ enddo -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor (for tethered atoms) -+ -+ do i=1,9 -+ eta(i)=chip*uni(i) -+ enddo -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,oxo,oyo,ozo,stat=fail(5)) -+ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(6)) -+ deallocate(gxo,gyo,gzo,gvxo,gvyo,gvzo,stat=fail(7)) -+ -+ endif -+ -+ return -+ end subroutine nptqvv_h1 -+ -+ subroutine nstqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c nst ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith may 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr,kk,mode -+ integer id,ifre,jrs,idum,ig,iatm0,iatm1,ntpatm,iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engfke -+ real(8) tqx,tqy,tqz,ftx,fty,ftz -+ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz -+ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke -+ real(8) chit,beta,volm,volm0,elrc,elrc0,virlrc,virlrc0 -+ real(8) press,taup,xtmp,ytmp,ztmp -+ -+ integer, parameter :: nnn=11 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ real(8) celp(10),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ -+ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data newjob/.true./,beta/7.3728d-3/ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2240) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c atom block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ if(isw.eq.1)then -+ -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(6)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(7)) -+ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp),stat=fail(8)) -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(10)) -+ -+ endif -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(11)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2250) -+ enddo -+ -+ newjob=.false. -+ if(ntcons.gt.0)safe=.false. -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn -+ -+c calculate quaternion momenta at start of time step -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c rigid body motion for first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*pt5*tstep -+ p1(ig)=p1(ig)+qt1*pt5*tstep -+ p2(ig)=p2(ig)+qt2*pt5*tstep -+ p3(ig)=p3(ig)+qt3*pt5*tstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ c0(ig)=p0(ig) -+ c1(ig)=p1(ig) -+ c2(ig)=p2(ig) -+ c3(ig)=p3(ig) -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ -+ enddo -+ -+ endif -+ -+c extract previous constraint terms from stress tensor -+ -+ if(isw.eq.1)then -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+ endif -+ -+c iteration required if ntcons > 0 -+ -+ mxiter=1 -+ if(ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+c zero scaling matrix -+ -+ do i=1,9 -+ eta(i)=uni(i) -+ enddo -+ -+ if(iter.eq.mxiter)then -+ -+c calculate Berendsen barostat -+ -+ do i=1,9 -+ eta(i)=tstep*beta*(stress(i)+strcns(i)- -+ x press*volm*uni(i))/(taup*volm)+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c reset cell parameters for new volume -+ -+ call mat_mul(eta,cell,cell) -+ -+c calculate new volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+ endif -+ -+c update centre of mass position -+ -+ do ig=igrp1,igrp2 -+ -+ xtmp=eta(1)*gcmx(ig)+eta(4)*gcmy(ig)+eta(7)*gcmz(ig) -+ ytmp=eta(2)*gcmx(ig)+eta(5)*gcmy(ig)+eta(8)*gcmz(ig) -+ ztmp=eta(3)*gcmx(ig)+eta(6)*gcmy(ig)+eta(9)*gcmz(ig) -+ gcmx(ig)=tstep*gvxx(ig)+xtmp -+ gcmy(ig)=tstep*gvyy(ig)+ytmp -+ gcmz(ig)=tstep*gvzz(ig)+ztmp -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=gcmx(ig)+ -+ x rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ yyy(i)=gcmy(ig)+ -+ x rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ zzz(i)=gcmz(ig)+ -+ x rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=tstep*vxx(i)+ -+ x eta(1)*xxx(i)+eta(4)*yyy(i)+eta(7)*zzz(i) -+ yyy(i)=tstep*vyy(i)+ -+ x eta(2)*xxx(i)+eta(5)*yyy(i)+eta(8)*zzz(i) -+ zzz(i)=tstep*vzz(i)+ -+ x eta(3)*xxx(i)+eta(6)*yyy(i)+eta(9)*zzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+ if(iter.lt.mxiter)then -+ -+ do i=1,natms -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ p0(ig)=c0(ig) -+ p1(ig)=c1(ig) -+ p2(ig)=c2(ig) -+ p3(ig)=c3(ig) -+ gcmx(ig)=gxo(ig) -+ gcmy(ig)=gyo(ig) -+ gcmz(ig)=gzo(ig) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities -+ -+ do i=iatm0,iatm1 -+ -+ if(lstfrz(i).eq.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c merge group velocities from all processors -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ if(isw.eq.1)then -+ -+ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,c0,c1,c2,c3,stat=fail(5)) -+ deallocate(gxo,gyo,gzo,stat=fail(6)) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine nstqvv_b1 -+ -+ subroutine nstqvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, -+ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircon,virlrc,vircom,volm,press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c nst ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith may 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ integer, parameter :: ncyc=5 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr,mode -+ integer id,ig,ifre,jrs,idum,mxiter,iter,ntpatm,kk,icyc -+ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep -+ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn -+ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc -+ real(8) taup,temp,press,vzero,chit0,cons0 -+ real(8) chip2,volm,elrc,elrc0,virlrc,virlrc0,qstep,pmass,totmas -+ real(8) volm0,cxx,cyy,czz,engfke,fstep -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),com(3),vom(3) -+ real(8) czero(9),eta0(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: oxo(:),oyo(:),ozo(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newjob,hstep,qstep,fstep,pmass,qmass -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,volm0,elrc0,virlrc0 -+ save totmas,dens0 -+ -+ data newjob/.true./ -+ -+ safe=.true. -+ if(newjob)then -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2280) -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c nose-hoover thermostat and barostat inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(2)) -+ allocate(oxo(mxgrp),oyo(mxgrp),ozo(mxgrp),stat=fail(3)) -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(4)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(5)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(9)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(10)) -+ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(11)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(12)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2290) -+ enddo -+ -+ newjob=.false. -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=1,natms -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=1,ngrp -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store current integration variables if ntcons > 0 -+ -+ if(ntcons.gt.0)then -+ -+ vzero=volm -+ chit0=chit -+ cons0=conint -+ do i=1,9 -+ -+ eta0(i)=eta(i) -+ czero(i)=cell(i) -+ -+ enddo -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ oxo(ig)=omx(ig) -+ oyo(ig)=omy(ig) -+ ozo(ig)=omz(ig) -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ gvxo(ig)=gvxx(ig) -+ gvyo(ig)=gvyy(ig) -+ gvzo(ig)=gvzz(ig) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c iteration necessary if ntcons > 0 and isw=1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+ if(isw.eq.1)then -+ -+ do icyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, -+ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstqscl_p -+ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit, -+ x press,volm) -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, -+ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+ engke=engfke+engtrn -+ -+c calculate quaternion momenta -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*hstep -+ p1(ig)=p1(ig)+qt1*hstep -+ p2(ig)=p2(ig)+qt2*hstep -+ p3(ig)=p3(ig)+qt3*hstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ cxx=gcmx(ig)-com(1) -+ cyy=gcmy(ig)-com(2) -+ czz=gcmz(ig)-com(3) -+ gcmx(ig)=gcmx(ig)+ -+ x tstep*(gvxx(ig)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ gcmy(ig)=gcmy(ig)+ -+ x tstep*(gvyy(ig)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ gcmz(ig)=gcmz(ig)+ -+ x tstep*(gvzz(ig)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ k=k+1 -+ i=lstfre(ifre) -+ cxx=xxx(i)-com(1) -+ cyy=yyy(i)-com(2) -+ czz=zzz(i)-com(3) -+ xxx(i)=xxx(i)+ -+ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ yyy(i)=yyy(i)+ -+ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ zzz(i)=zzz(i)+ -+ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c subtract old constraint terms from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+c correct constraint bonds using rattle -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+c add new constraint terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c restore original integration parameters if iter < mxiter -+ -+ if(iter.lt.mxiter)then -+ -+ volm=vzero -+ chit=chit0 -+ conint=cons0 -+ do i=1,9 -+ -+ eta(i)=eta0(i) -+ cell(i)=czero(i) -+ -+ enddo -+ do i=1,natms -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ omx(ig)=oxo(ig) -+ omy(ig)=oyo(ig) -+ omz(ig)=ozo(ig) -+ gcmx(ig)=gxo(ig) -+ gcmy(ig)=gyo(ig) -+ gcmz(ig)=gzo(ig) -+ gvxx(ig)=gvxo(ig) -+ gvyy(ig)=gvyo(ig) -+ gvzz(ig)=gvzo(ig) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c operations for second stage only -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+c add constraint terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c kinetic terms for stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+ do icyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, -+ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstqscl_p -+ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit, -+ x press,volm) -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, -+ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+ engke=engfke+engtrn -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c end of iteration cycle -+ -+ enddo -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,oxo,oyo,ozo,stat=fail(5)) -+ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(6)) -+ deallocate(gxo,gyo,gzo,gvxo,gvyo,gvzo,stat=fail(7)) -+ -+ endif -+ -+ return -+ end subroutine nstqvv_h1 -+ -+ end module vv_rotation1_module -+ -diff -urN dl_class_1.9.orig/srcmod/vv_rotation2_module.f dl_class_1.9/srcmod/vv_rotation2_module.f ---- dl_class_1.9.orig/srcmod/vv_rotation2_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/vv_rotation2_module.f 2011-02-22 12:46:30.000000000 +0100 -@@ -0,0 +1,5924 @@ -+ module vv_rotation2_module -+ -+c*********************************************************************** -+c -+c dl_poly module 2 for velocity verlet rotational integration -+c schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use metafreeze_module, only : lmetadyn -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use vv_rotation1_module -+ use utility_module -+ -+ contains -+ -+ subroutine qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,stresh) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for applying bond constraint corrections after -+c atomic integration in the velocity verlet scheme. assumes rigid -+c bodies connected by constraints. must be used in conjunction with -+c velocity verlet integration algorithm. note the iteration is -+c handled by the calling routine. -+c -+c copyright - daresbury laboratory -+c author - w. smith february 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newstep,newjob -+ integer fail,idnode,imcon,mxnode,natms,nscons,i,j,k,ik -+ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,txx,tyy -+ real(8) tzz,xxt,yyt,zzt,stresh,strs1,strs2,strs3,strs5,strs6 -+ real(8) strs9,tstep2,esig,dis2,tqa,tqb,gamma,dli,dlj -+ -+ real(8), allocatable :: esig1(:),ggx(:),ggy(:),ggz(:) -+ -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ dimension stresh(9),tqa(3),tqb(3) -+ -+ save newjob,esig1,ggx,ggy,ggz -+ -+ data newjob/.true./,fail/0/ -+ -+ if(newjob)then -+ -+ allocate (esig1(mxcons),ggx(mxcons),ggy(mxcons),ggz(mxcons), -+ x stat=fail) -+ if(fail.ne.0)call error(idnode,1615) -+ newjob=.false. -+ -+ endif -+ -+c accumulators for stress tensor -+ -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c constraint bond vectors are dxx,dyy,dzz (input) -+ -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate temporary bond vector -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c calculate maximum error in bondlength -+ -+ esig=0.d0 -+ do k=1,nscons -+ -+ dis2=prmcon(listcon(k,1))**2 -+ esig1(k)=(dis2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/dis2 -+ esig=max(esig,abs(esig1(k))) -+ -+ enddo -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+c continue if any tolerances unsatisfied -+ -+ if(.not.safe)then -+ -+c initialise force increment arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint forces -+ -+ ik=0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dis2=prmcon(listcon(k,1))**2 -+ -+ if(newstep)then -+ -+ call pivot(1,i,k,ik,tqa,dxx,dyy,dzz) -+ call pivot(1,j,k,ik,tqb,dxx,dyy,dzz) -+ -+ ggx(k)=tstep2*(tqa(1)+tqb(1))/dis2 -+ ggy(k)=tstep2*(tqa(2)+tqb(2))/dis2 -+ ggz(k)=tstep2*(tqa(3)+tqb(3))/dis2 -+ -+ endif -+ -+c constraint force parameter -+ -+ gamma=esig1(k)/(dxt(k)*ggx(k)+dyt(k)*ggy(k)+dzt(k)*ggz(k)) -+ -+c accumulate bond virial -+ -+ vircon=vircon-gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ -+ strs1=strs1+gamma*dxx(k)*dxx(k) -+ strs2=strs2+gamma*dxx(k)*dyy(k) -+ strs3=strs3+gamma*dxx(k)*dzz(k) -+ strs5=strs5+gamma*dyy(k)*dyy(k) -+ strs6=strs6+gamma*dyy(k)*dzz(k) -+ strs9=strs9+gamma*dzz(k)*dzz(k) -+ -+c improved atomic force -+ -+ xxt(i)=xxt(i)+dxx(k)*gamma -+ yyt(i)=yyt(i)+dyy(k)*gamma -+ zzt(i)=zzt(i)+dzz(k)*gamma -+ xxt(j)=xxt(j)-dxx(k)*gamma -+ yyt(j)=yyt(j)-dyy(k)*gamma -+ zzt(j)=zzt(j)-dzz(k)*gamma -+ -+ enddo -+ -+c transport temporary positions to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov) call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ dlj=1.d0/dble(listme(j)) -+ -+ fxx(i)=fxx(i)+xxt(i)*dli -+ fyy(i)=fyy(i)+yyt(i)*dli -+ fzz(i)=fzz(i)+zzt(i)*dli -+ fxx(j)=fxx(j)+xxt(j)*dlj -+ fyy(j)=fyy(j)+yyt(j)*dlj -+ fzz(j)=fzz(j)+zzt(j)*dlj -+ -+ enddo -+ -+c complete stress tensor -+ -+ stresh(1)=stresh(1)+strs1 -+ stresh(2)=stresh(2)+strs2 -+ stresh(3)=stresh(3)+strs3 -+ stresh(4)=stresh(4)+strs2 -+ stresh(5)=stresh(5)+strs5 -+ stresh(6)=stresh(6)+strs6 -+ stresh(7)=stresh(7)+strs3 -+ stresh(8)=stresh(8)+strs6 -+ stresh(9)=stresh(9)+strs9 -+ -+c splice force arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ call splice -+ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+ -+ endif -+ -+ return -+ end subroutine qrattle_r -+ -+ subroutine qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for applying bond constraint corrections after -+c atomic integration in the velocity verlet scheme. assumes rigid -+c bodies connected by constraints. must be used in conjunction with -+c velocity verlet integration algorithm. note the iteration is -+c handled by the calling routine. -+c -+c copyright - daresbury laboratory -+c author - w. smith february 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newstep,newjob -+ integer fail,idnode,mxnode,natms,nscons,i,j,k,ik -+ real(8) tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz,tqa,tqb -+ real(8) xxt,yyt,zzt,tstep2,esig,gamma,dli,dlj -+ real(8) tolvel -+ -+ real(8), allocatable :: esig2(:),hhx(:),hhy(:),hhz(:) -+ -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension tqa(3),tqb(3) -+ -+ save newjob,esig2,hhx,hhy,hhz -+ -+ data newjob/.true./,fail/0/ -+ -+ if(newjob)then -+ -+ allocate (esig2(mxcons),hhx(mxcons),hhy(mxcons),hhz(mxcons), -+ x stat=fail) -+ if(fail.ne.0)call error(idnode,1625) -+ newjob=.false. -+ -+ endif -+ -+c constraint bond vectors are dxx,dyy,dzz (input) -+ -+c half timestep -+ -+ tstep2=tstep/2.d0 -+ -+c tolerance for velocity convergence -+ -+ tolvel=tolnce/tstep -+ -+c calculate maximum error in constraint -+ -+ esig=0.d0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ esig2(k)=(dxx(k)*(vxx(i)-vxx(j))+dyy(k)*(vyy(i)-vyy(j))+ -+ x dzz(k)*(vzz(i)-vzz(j))) -+ esig=max(esig,abs(esig2(k))) -+ -+ enddo -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolvel) -+ -+ if(mxnode.gt.1)then -+ call gstate(safe) -+ endif -+ -+c continue if all tolerances satisfied else return to calling routine -+ -+ if(.not.safe)then -+ -+c initialise velocity correction arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint correction -+ -+ ik=0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ if(newstep)then -+ -+ call pivot(2,i,k,ik,tqa,dxx,dyy,dzz) -+ call pivot(2,j,k,ik,tqb,dxx,dyy,dzz) -+ -+ hhx(k)=tstep2*(tqa(1)+tqb(1)) -+ hhy(k)=tstep2*(tqa(2)+tqb(2)) -+ hhz(k)=tstep2*(tqa(3)+tqb(3)) -+ -+ endif -+ -+c constraint force parameter -+ -+ gamma=esig2(k)/(dxx(k)*hhx(k)+dyy(k)*hhy(k)+dzz(k)*hhz(k)) -+ -+c improved atomic force -+ -+ xxt(i)=xxt(i)-dxx(k)*gamma -+ yyt(i)=yyt(i)-dyy(k)*gamma -+ zzt(i)=zzt(i)-dzz(k)*gamma -+ xxt(j)=xxt(j)+dxx(k)*gamma -+ yyt(j)=yyt(j)+dyy(k)*gamma -+ zzt(j)=zzt(j)+dzz(k)*gamma -+ -+ enddo -+ -+c transport temporary positions to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov) call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ dlj=1.d0/dble(listme(j)) -+ -+ fxx(i)=fxx(i)+dli*xxt(i) -+ fyy(i)=fyy(i)+dli*yyt(i) -+ fzz(i)=fzz(i)+dli*zzt(i) -+ fxx(j)=fxx(j)+dlj*xxt(j) -+ fyy(j)=fyy(j)+dlj*yyt(j) -+ fzz(j)=fzz(j)+dlj*zzt(j) -+ -+ enddo -+ -+c splice force arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ call splice -+ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine qrattle_v -+ -+ subroutine pivot(k,i,kk,ik,tqq,dxx,dyy,dzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for computing pivot vector for velocity -+c corrections to bonds between rigid bodies -+c must be used in conjunction with qrattle routines: -+c if k=1 - use with qrattle_r -+c if k=2 - use with qrattle_v -+c -+c copyright - daresbury laboratory -+c author - w. smith february 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer k,i,kk,ik,ig,id,jj -+ real(8) xxa,yya,zza,tax,tay,taz,trx,try,trz,vix,viy,viz -+ real(8) rot(9),tqq(3),dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ -+ ig=lstbod(i) -+ -+ if(ig.eq.0)then -+ -+c atoms in constraint bonds -+ -+ tqq(1)=dxx(kk)*rmass(i) -+ tqq(2)=dyy(kk)*rmass(i) -+ tqq(3)=dzz(kk)*rmass(i) -+ -+ else -+ -+c terms for rigid body atoms -+ -+ ik=ik+1 -+ id=lstgtp(ig) -+ -+ tqq(1)=dxx(kk)/gmass(id) -+ tqq(2)=dyy(kk)/gmass(id) -+ tqq(3)=dzz(kk)/gmass(id) -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ jj=lstcsit(ik) -+ -+c com-site vector in lab frame -+ -+ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+gzz(id,jj)*rot(3)) -+ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+gzz(id,jj)*rot(6)) -+ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+gzz(id,jj)*rot(9)) -+ -+c cross product of com-site vector and interatomic vector -+ -+ tax=yya*dzz(kk)-zza*dyy(kk) -+ tay=zza*dxx(kk)-xxa*dzz(kk) -+ taz=xxa*dyy(kk)-yya*dxx(kk) -+ -+c transform to body fixed frame -+ -+ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) -+ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) -+ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) -+ -+ if(k.eq.1)then -+ -+c direction of induced velocites in body frame -+ -+ vix=try*gzz(id,jj)-trz*gyy(id,jj) -+ viy=trz*gxx(id,jj)-trx*gzz(id,jj) -+ viz=trx*gyy(id,jj)-try*gxx(id,jj) -+ -+c transform to lab frame -+ -+ tqq(1)=tqq(1)+vix*rot(1)+viy*rot(2)+viz*rot(3) -+ tqq(2)=tqq(2)+vix*rot(4)+viy*rot(5)+viz*rot(6) -+ tqq(3)=tqq(3)+vix*rot(7)+viy*rot(8)+viz*rot(9) -+ -+ elseif(k.eq.2)then -+ -+c transform to lab frame -+ -+ tqq(1)=tqq(1)+trx*rot(1)+try*rot(2)+trz*rot(3) -+ tqq(2)=tqq(2)+trx*rot(4)+try*rot(5)+trz*rot(6) -+ tqq(3)=tqq(3)+trx*rot(7)+try*rot(8)+trz*rot(9) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine pivot -+ -+ subroutine nveqvv_2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith jan 2005 -+c amended w.smith feb 2005: qrattle added -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,jrs,icyc,mxshk,idum,ig -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) engtrn -+ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3 -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ -+ save newstep,newjob,p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data newjob/.true./ -+ -+c set array allocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) -+ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(3)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(4)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(5)) -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) -+ if(isw.eq.2)then -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) -+ endif -+ -+c check array allocation error flags -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2110) -+ enddo -+ -+c initialise constraint virial -+ -+ if(isw.eq.1)then -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) -+ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) -+ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*pt5*tstep -+ p1(ig)=c1(jg)+tq1*pt5*tstep -+ p2(ig)=c2(jg)+tq2*pt5*tstep -+ p3(ig)=c3(jg)+tq3*pt5*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxo(i)+tstep*vxx(i) -+ yyy(i)=yyo(i)+tstep*vyy(i) -+ zzz(i)=zzo(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge free atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+ if(isw.eq.2)then -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ -+ engke=engke+engtrn -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c restore forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ if(isw.eq.2)then -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ endif -+ -+ return -+ end subroutine nveqvv_2 -+ -+ subroutine nvtqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, -+ x vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c nvt ensemble - Berendsen thermostat (n.b. not symplectic) -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith mar 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,jrs,icyc,mxshk,idum,ig -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke -+ real(8) engtrn -+ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,taut,sigma,chit -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ -+ save newstep,newjob,p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data newjob/.true./ -+ -+c set array alocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) -+ allocate(vxo(msatms),vyo(msatms),vzo(mxatms),stat=fail(3)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(4)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(5)) -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) -+ if(isw.eq.2)then -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) -+ endif -+ -+c check array allocation error flags -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2130) -+ enddo -+ -+c initialise constraint virial -+ -+ if(isw.eq.1)then -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) -+ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) -+ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*pt5*tstep -+ p1(ig)=c1(jg)+tq1*pt5*tstep -+ p2(ig)=c2(jg)+tq2*pt5*tstep -+ p3(ig)=c3(jg)+tq3*pt5*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxo(i)+tstep*vxx(i) -+ yyy(i)=yyo(i)+tstep*vyy(i) -+ zzz(i)=zzo(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engke+engtrn+engrot -+ engke=engke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ if(lstfrz(i).ne.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c restore forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ if(isw.eq.2)then -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ endif -+ -+ return -+ end subroutine nvtqvv_b2 -+ -+ subroutine nvtqvv_h2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke,engrot, -+ x taut,sigma,tolnce,tstep,vircom,vircon,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c nvt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith april 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,jrs,icyc,mxshk,idum,ig -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) engtrn,vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,engfke -+ real(8) taut,sigma,chit,hstep,qmass,conint,consv -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newstep,newjob,p0,p1,p2,p3,hstep,qmass,ifre1,ifre2 -+ save igrp1,igrp2 -+ -+ data newjob/.true./ -+ -+c set array allocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c timestep parameters -+ -+ hstep=pt5*tstep -+ -+c nose-hoover inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) -+ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(3)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(4)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(5)) -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) -+ if(isw.eq.2)then -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) -+ endif -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2150) -+ enddo -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c initialise constraint virial -+ -+ if(isw.eq.1)then -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c apply thermostat for first stage -+ -+ if(isw.eq.1)then -+ -+ call nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x hstep,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) -+ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) -+ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*pt5*tstep -+ p1(ig)=c1(jg)+tq1*pt5*tstep -+ p2(ig)=c2(jg)+tq2*pt5*tstep -+ p3(ig)=c3(jg)+tq3*pt5*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxo(i)+tstep*vxx(i) -+ yyy(i)=yyo(i)+tstep*vyy(i) -+ zzz(i)=zzo(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c apply thermostat for second stage and calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+c rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c apply thermostat for second stage and calculate kinetic energy -+ -+ call nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x hstep,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ engke=engfke+engtrn -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ consv=conint+0.5d0*qmass*chit**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c restore forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ if(isw.eq.2)then -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ endif -+ -+ return -+ end subroutine nvtqvv_h2 -+ -+ subroutine nptqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c npt ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith sep 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,jrs,icyc,mxshk,idum,ig,ntpatm -+ integer iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke,engtrn -+ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz,volm0 -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,taut,sigma,chit -+ real(8) volm,elrc0,elrc,virlrc0,virlrc,scale,psyst,virtot,chip -+ real(8) beta,press,taup,engfke,vzero -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),cell0(9),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+ save newstep,newjob,volm0,elrc0,virlrc0,dens0 -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./,beta/7.3728d-3/ -+ -+c set array alocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2180) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(3)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ endif -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(8)) -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(9)) -+ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(11)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(12)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(13)) -+ -+c check array allocation error flags -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2190) -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c cell parameters -+ -+ vzero=volm -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn -+ -+ endif -+ -+c -------------- start of barostat iteration cycle ----------------- -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+ if(isw.eq.1)then -+ -+c restore cell parameters -+ -+ volm=vzero -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c calculate system pressure -+ -+ vircon=-(strcns(1)+strcns(5)+strcns(9)) -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ -+c apply Berendsen barostat -+ -+ chip=1.d0+beta*tstep*(psyst-press)/taup -+ chip=1.d0 -+ scale=chip**(1.d0/3.d0) -+ volm=chip*volm -+ -+c reset cell parameters for new volume -+ -+ do i=1,9 -+ cell(i)=scale*cell(i) -+ enddo -+ -+c reset constraint virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) -+ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) -+ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*pt5*tstep -+ p1(ig)=c1(jg)+tq1*pt5*tstep -+ p2(ig)=c2(jg)+tq2*pt5*tstep -+ p3(ig)=c3(jg)+tq3*pt5*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=scale*gxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=scale*gyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=scale*gzo(jg)+tstep*gvzz(ig) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=scale*xxo(i)+tstep*vxx(i) -+ yyy(i)=scale*yyo(i)+tstep*vyy(i) -+ zzz(i)=scale*zzo(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c rigid body contribution to stress tensor -+ -+ if(isw.eq.2)call bodystress -+ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c restore forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+c -------------- end of barostat iteration cycle ---------------- -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor for tethered bonds -+ -+ do i=1,9 -+ eta(i)=uni(i)*scale -+ enddo -+ -+ endif -+ -+ if(isw.eq.2)then -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ if(lstfrz(i).ne.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,fxo,fyo,fzo,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ -+ return -+ end subroutine nptqvv_b2 -+ -+ subroutine nptqvv_h2 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircom,vircon,virtot,virlrc,volm,press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c npt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith april 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr -+ integer id,ifre,icyc,mxshk,idum,ig,ntpatm -+ integer jcyc,iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) engtrn,vaa,vbb,vcc,opx,opy,opz,engfke -+ real(8) taut,taup,sigma,chit,hstep,qmass,conint,consv -+ real(8) cxx,cyy,czz,scale,virtot,press,chip,temp -+ real(8) volm,pmass,totmas,qstep,fstep,volm0,elrc -+ real(8) virlrc,elrc0,virlrc0,chit0,chip0,vzero,cons0 -+ -+ integer, parameter :: nnn=16 -+ integer, parameter :: ncyc=5 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),cell0(9),com(3),vom(3),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: vx1(:),vy1(:),vz1(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: oxo(:),oyo(:),ozo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gvx1(:),gvy1(:),gvz1(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newstep,newjob,p0,p1,p2,p3,hstep,fstep,qmass,ifre1,ifre2 -+ save igrp1,igrp2,volm0,elrc0,virlrc0,qstep,dens0,totmas -+ save pmass -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+c set array allocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2220) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c nose-hoover thermostat and barostat inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(3)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(8)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(9)) -+ allocate(vx1(mxatms),vy1(mxatms),vz1(mxatms),stat=fail(10)) -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(11)) -+ allocate(oxo(mxatms),oyo(mxatms),ozo(mxatms),stat=fail(12)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp), -+ x stat=fail(13)) -+ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp), -+ x stat=fail(14)) -+ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(15)) -+ allocate(gvx1(mxgrp),gvy1(mxgrp),gvz1(mxgrp),stat=fail(16)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2230) -+ enddo -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c store key config data at start of timestep -+ -+ vzero=volm -+ chit0=chit -+ chip0=chip -+ cons0=conint -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+ if(isw.eq.1)then -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=1,natms -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=1,ngrp -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c store rigid body positions -+ -+ do ig=1,ngrp -+ -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ do i=1,natms -+ -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+c store forces -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, angular and cartesian velocities -+ -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ oxo(ig)=omx(ig) -+ oyo(ig)=omy(ig) -+ ozo(ig)=omz(ig) -+ gvxo(ig)=gvxx(ig) -+ gvyo(ig)=gvyy(ig) -+ gvzo(ig)=gvzz(ig) -+ -+ enddo -+ -+c iteration necessary if ntcons > 0 and isw=1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+c integration of barostat and thermostat (part 1) -+ -+ if(isw.eq.1)then -+ -+c restore cell parameters -+ -+ volm=vzero -+ chit=chit0 -+ chip=chip0 -+ conint=cons0 -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c restore free atom velocities -+ -+ do i=1,natms -+ -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+c restore rigid body quaternions angular and cartesian velocities -+ -+ do ig=1,ngrp -+ -+ omx(ig)=oxo(ig) -+ omy(ig)=oyo(ig) -+ omz(ig)=ozo(ig) -+ gvxx(ig)=gvxo(ig) -+ gvyy(ig)=gvyo(ig) -+ gvzz(ig)=gvzo(ig) -+ -+ enddo -+ -+c current constraint virial -+ -+ vircon=-(strcns(1)+strcns(5)+strcns(9)) -+ -+ do jcyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engke=engfke+engtrn -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/vzero)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c reset constraint virial and stress -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c calculate quaternion momenta -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-b1(ig)*opx-b2(ig)*opy-b3(ig)*opz) -+ p1(ig)=2.0d0*( b0(ig)*opx-b3(ig)*opy+b2(ig)*opz) -+ p2(ig)=2.0d0*( b3(ig)*opx+b0(ig)*opy-b1(ig)*opz) -+ p3(ig)=2.0d0*(-b2(ig)*opx+b1(ig)*opy+b0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store intermediate velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vx1(i)=vxx(i) -+ vy1(i)=vyy(i) -+ vz1(i)=vzz(i) -+ -+ enddo -+ do ig=igrp1,igrp2 -+ -+ c0(ig)=p0(ig) -+ c1(ig)=p1(ig) -+ c2(ig)=p2(ig) -+ c3(ig)=p3(ig) -+ gvx1(ig)=gvxx(ig) -+ gvy1(ig)=gvyy(ig) -+ gvz1(ig)=gvzz(ig) -+ -+ enddo -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vx1(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vy1(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vz1(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c restore rigid body quaternions, angular momenta and velocities -+ -+ do ig=igrp1,igrp2 -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ p0(ig)=c0(ig) -+ p1(ig)=c1(ig) -+ p2(ig)=c2(ig) -+ p3(ig)=c3(ig) -+ gvxx(ig)=gvx1(ig) -+ gvyy(ig)=gvy1(ig) -+ gvzz(ig)=gvz1(ig) -+ -+ enddo -+ -+c calculate new rigid body velocities -+ -+ call rotate_omega -+ x (idnode,mxnode,ngrp,hstep,p0,p1,p2,p3,dtx,dty,dtz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c update centre of mass position by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ cxx=gxo(ig)-com(1) -+ cyy=gyo(ig)-com(2) -+ czz=gzo(ig)-com(3) -+ gcmx(ig)=gxo(ig)+tstep*(gvxx(ig)+chip*cxx) -+ gcmy(ig)=gyo(ig)+tstep*(gvyy(ig)+chip*cyy) -+ gcmz(ig)=gzo(ig)+tstep*(gvzz(ig)+chip*czz) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ cxx=xxo(i)-com(1) -+ cyy=yyo(i)-com(2) -+ czz=zzo(i)-com(3) -+ xxx(i)=xxo(i)+tstep*(vxx(i)+chip*cxx) -+ yyy(i)=yyo(i)+tstep*(vyy(i)+chip*cyy) -+ zzz(i)=zzo(i)+tstep*(vzz(i)+chip*czz) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c integration of barostat and thermostat (part 2) -+ -+ if(isw.eq.2)then -+ -+c current constraint virial -+ -+ vircon=-(strcns(1)+strcns(5)+strcns(9)) -+ -+ do jcyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engke=engfke+engtrn -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/vzero)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+ endif -+ -+c restore forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+c -------------- end of barostat iteration cycle ---------------- -+ -+ enddo -+ -+ if(isw.eq.2)then -+ -+c calculate conserved variable -+ -+ consv=conint+0.5d0*qmass*chit**2+press*volm -+ x +0.5d0*pmass*chip**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c merge velocity arrays -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor (for tethered atoms) -+ -+ do i=1,9 -+ eta(i)=chip*uni(i) -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c exchange position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(oxo,oyo,ozo,dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ -+ return -+ end subroutine nptqvv_h2 -+ -+ subroutine nstqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,volm) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c nst ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith sep 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,icyc,mxshk,idum,ig,ntpatm,mode -+ integer iter,mxiter,jrs -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke -+ real(8) engtrn,taut,sigma,chit -+ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz,volm0 -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3 -+ real(8) volm,elrc0,elrc,virlrc0,virlrc -+ real(8) beta,press,taup,engfke,hstep,vzero -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),uni(9),celp(10) -+ real(8) cell0(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+ save newstep,newjob,volm0,elrc0,virlrc0,dens0 -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,hstep -+ -+ data newjob/.true./,beta/7.3728d-3/ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c set array alocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c timestep parameters -+ -+ hstep=pt5*tstep -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2260) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(3)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ endif -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(8)) -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(9)) -+ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(11)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(12)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(13)) -+ -+c check array allocation error flags -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2270) -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c cell parameters -+ -+ vzero=volm -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+c extract previous constraint terms from stress tensor -+ -+ if(isw.eq.1)then -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+ endif -+ -+c -------------- start of barostat iteration cycle ----------------- -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+ do i=1,9 -+ eta(i)=uni(i) -+ enddo -+ -+ if(isw.eq.1)then -+ -+c restore cell parameters -+ -+ volm=vzero -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c calculate Berendsen barostat -+ -+ do i=1,9 -+ eta(i)=tstep*beta*((stress(i)+strcns(i))/volm- -+ x press*uni(i))/taup+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c reset cell parameters for new volume -+ -+ call mat_mul(eta,cell,cell) -+ -+c calculate new volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+c reset constraint virial -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*hstep -+ p1(ig)=c1(jg)+tq1*hstep -+ p2(ig)=c2(jg)+tq2*hstep -+ p3(ig)=c3(jg)+tq3*hstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*hstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*hstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*hstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=tstep*gvxx(ig)+ -+ x eta(1)*gxo(jg)+eta(4)*gyo(jg)+eta(7)*gzo(jg) -+ gcmy(ig)=tstep*gvyy(ig)+ -+ x eta(2)*gxo(jg)+eta(5)*gyo(jg)+eta(8)*gzo(jg) -+ gcmz(ig)=tstep*gvzz(ig)+ -+ x eta(3)*gxo(jg)+eta(6)*gyo(jg)+eta(9)*gzo(jg) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=tstep*vxx(i)+ -+ x eta(1)*xxo(i)+eta(4)*yyo(i)+eta(7)*zzo(i) -+ yyy(i)=tstep*vyy(i)+ -+ x eta(2)*xxo(i)+eta(5)*yyo(i)+eta(8)*zzo(i) -+ zzz(i)=tstep*vzz(i)+ -+ x eta(3)*xxo(i)+eta(6)*yyo(i)+eta(9)*zzo(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c rigid body contribution to stress tensor -+ -+ if(isw.eq.2)call bodystress -+ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c restore forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+c -------------- end of barostat iteration cycle ---------------- -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+ endif -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ if(lstfrz(i).ne.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,fxo,fyo,fzo,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ -+ return -+ end subroutine nstqvv_b2 -+ -+ subroutine nstqvv_h2 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, -+ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircom,vircon,virlrc,volm,press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c nst ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith sept 2005 -+c adapted d. quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr -+ integer id,ifre,icyc,mxshk,idum,ig,ntpatm,mode -+ integer jcyc,iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) engtrn,engfke -+ real(8) vaa,vbb,vcc,opx,opy,opz -+ real(8) taut,taup,sigma,chit,hstep,qmass,conint,consv -+ real(8) cxx,cyy,czz,press,chip2,temp -+ real(8) volm,pmass,totmas,qstep,fstep,volm0,elrc -+ real(8) virlrc,elrc0,virlrc0,chit0,vzero,cons0 -+ -+ integer, parameter :: nnn=16 -+ integer, parameter :: ncyc=5 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),com(3),vom(3) -+ real(8) cell0(9),eta0(9),stres0(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: vx1(:),vy1(:),vz1(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: oxo(:),oyo(:),ozo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gvx1(:),gvy1(:),gvz1(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newstep,newjob,p0,p1,p2,p3,hstep,fstep,qmass,ifre1,ifre2 -+ save igrp1,igrp2,volm0,elrc0,virlrc0,qstep,dens0,totmas -+ save pmass -+ -+ data newjob/.true./ -+ -+c set array allocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2220) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c nose-hoover thermostat and barostat inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(3)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(8)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(9)) -+ allocate(vx1(mxatms),vy1(mxatms),vz1(mxatms),stat=fail(10)) -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(11)) -+ allocate(oxo(mxatms),oyo(mxatms),ozo(mxatms),stat=fail(12)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp), -+ x stat=fail(13)) -+ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp), -+ x stat=fail(14)) -+ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(15)) -+ allocate(gvx1(mxgrp),gvy1(mxgrp),gvz1(mxgrp),stat=fail(16)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2230) -+ enddo -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c store key config data at start of timestep -+ -+ vzero=volm -+ chit0=chit -+ cons0=conint -+ do i=1,9 -+ -+ cell0(i)=cell(i) -+ eta0(i)=eta(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=1,natms -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=1,ngrp -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c store rigid body positions -+ -+ do ig=1,ngrp -+ -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ do i=1,natms -+ -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+c store forces -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, angular and cartesian velocities -+ -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ oxo(ig)=omx(ig) -+ oyo(ig)=omy(ig) -+ ozo(ig)=omz(ig) -+ gvxo(ig)=gvxx(ig) -+ gvyo(ig)=gvyy(ig) -+ gvzo(ig)=gvzz(ig) -+ -+ enddo -+ -+c iteration necessary if ntcons > 0 and isw=1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+c integration of barostat and thermostat (part 1) -+ -+ if(isw.eq.1)then -+ -+c restore cell parameters -+ -+ volm=vzero -+ chit=chit0 -+ conint=cons0 -+ do i=1,9 -+ -+ cell(i)=cell0(i) -+ eta(i)=eta0(i) -+ -+ enddo -+ -+c restore free atom velocities -+ -+ do i=1,natms -+ -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+c restore rigid body quaternions angular and cartesian velocities -+ -+ do ig=1,ngrp -+ -+ omx(ig)=oxo(ig) -+ omy(ig)=oyo(ig) -+ omz(ig)=ozo(ig) -+ gvxx(ig)=gvxo(ig) -+ gvyy(ig)=gvyo(ig) -+ gvzz(ig)=gvzo(ig) -+ -+ enddo -+ -+c kinetic contributions to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ do jcyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstqscl_p2 -+ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit,press, -+ x volm,strkin,strgrp) -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engke=engfke+engtrn -+ -+c reset constraint virial and stress -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ stress(i)=stress(i)-strcns(i)-strbod(i) -+ strcns(i)=0.d0 -+ -+ enddo -+ -+c calculate quaternion momenta -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-b1(ig)*opx-b2(ig)*opy-b3(ig)*opz) -+ p1(ig)=2.0d0*( b0(ig)*opx-b3(ig)*opy+b2(ig)*opz) -+ p2(ig)=2.0d0*( b3(ig)*opx+b0(ig)*opy-b1(ig)*opz) -+ p3(ig)=2.0d0*(-b2(ig)*opx+b1(ig)*opy+b0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store intermediate velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vx1(i)=vxx(i) -+ vy1(i)=vyy(i) -+ vz1(i)=vzz(i) -+ -+ enddo -+ do ig=igrp1,igrp2 -+ -+ c0(ig)=p0(ig) -+ c1(ig)=p1(ig) -+ c2(ig)=p2(ig) -+ c3(ig)=p3(ig) -+ gvx1(ig)=gvxx(ig) -+ gvy1(ig)=gvyy(ig) -+ gvz1(ig)=gvzz(ig) -+ -+ enddo -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vx1(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vy1(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vz1(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c restore rigid body quaternions, angular momenta and velocities -+ -+ do ig=igrp1,igrp2 -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ p0(ig)=c0(ig) -+ p1(ig)=c1(ig) -+ p2(ig)=c2(ig) -+ p3(ig)=c3(ig) -+ gvxx(ig)=gvx1(ig) -+ gvyy(ig)=gvy1(ig) -+ gvzz(ig)=gvz1(ig) -+ -+ enddo -+ -+c calculate new rigid body velocities -+ -+ call rotate_omega -+ x (idnode,mxnode,ngrp,hstep,p0,p1,p2,p3,dtx,dty,dtz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c update centre of mass position by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ cxx=gxo(ig)-com(1) -+ cyy=gyo(ig)-com(2) -+ czz=gzo(ig)-com(3) -+ gcmx(ig)=gxo(ig)+ -+ x tstep*(gvxx(ig)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ gcmy(ig)=gyo(ig)+ -+ x tstep*(gvyy(ig)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ gcmz(ig)=gzo(ig)+ -+ x tstep*(gvzz(ig)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ cxx=xxo(i)-com(1) -+ cyy=yyo(i)-com(2) -+ czz=zzo(i)-com(3) -+ xxx(i)=xxo(i)+ -+ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ yyy(i)=yyo(i)+ -+ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ zzz(i)=zzo(i)+ -+ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add new constraint terms to stress tensor -+ -+ if(isw.eq.1)then -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strbod(i) -+ enddo -+ -+ endif -+ -+c integration of barostat and thermostat (part 2) -+ -+ if(isw.eq.2)then -+ -+c kinetic contributions to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add kinetic and body contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) -+ enddo -+ -+ do jcyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstqscl_p2 -+ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit,press, -+ x volm,strkin,strgrp) -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engke=engfke+engtrn -+ -+c sum up all contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c restore forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+c -------------- end of barostat iteration cycle ---------------- -+ -+ enddo -+ -+ if(isw.eq.2)then -+ -+c calculate conserved variable -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c merge velocity arrays -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ if(isw.eq.2)then -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ endif -+ -+ return -+ end subroutine nstqvv_h2 -+ -+ end module vv_rotation2_module diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch b/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch deleted file mode 100644 index b6219c6207..0000000000 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/PLUMED-2.2.0.patch +++ /dev/null @@ -1,93945 +0,0 @@ -# This patch allows to use Plumed 2.2 with DL_POLY. It is autogenerated with the help -# of Plumed and https://groups.google.com/forum/#!topic/plumed-users/cWaIDU5F6Bw -# Follow the instructions on that forum and you can generate the patch below -# The makefile is also adjust to use the EB set values for building -# Ward Poelmans -diff -urN dl_class_1.9.orig/Plumed.cmake dl_class_1.9/Plumed.cmake ---- dl_class_1.9.orig/Plumed.cmake 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/Plumed.cmake 2015-11-09 14:26:25.657769545 +0100 -@@ -0,0 +1,3 @@ -+# PLUMED: runtime installation -+set(PLUMED_LOAD -L$ENV{EBROOTPLUMED}/lib -lplumed -ldl ) -+set(PLUMED_DEPENDENCIES ) -diff -urN dl_class_1.9.orig/Plumed.h dl_class_1.9/Plumed.h ---- dl_class_1.9.orig/Plumed.h 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/Plumed.h 2015-11-09 14:26:31.797805893 +0100 -@@ -0,0 +1,500 @@ -+/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -+ Copyright (c) 2011-2015 The plumed team -+ (see the PEOPLE file at the root of the distribution for a list of names) -+ -+ See http://www.plumed-code.org for more information. -+ -+ This file is part of plumed, version 2. -+ -+ plumed is free software: you can redistribute it and/or modify -+ it under the terms of the GNU Lesser General Public License as published by -+ the Free Software Foundation, either version 3 of the License, or -+ (at your option) any later version. -+ -+ plumed is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with plumed. If not, see . -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -+#ifndef __PLUMED_wrapper_Plumed_h -+#define __PLUMED_wrapper_Plumed_h -+ -+/** -+\page ReferencePlumedH Reference for interfacing MD codes with PLUMED -+ -+ Plumed.h and Plumed.c contain the external plumed interface, which is used to -+ integrate it with MD engines. This interface is very general, and is expected -+ not to change across plumed versions. Plumed.c also implements a dummy version -+ of the interface, so as to allow a code to be fully linked even if the plumed -+ library is not available yet. These files could be directly included in the official -+ host MD distribution. In this manner, it will be sufficient to link the plumed -+ library at link time (on all systems) or directly at runtime (on system where -+ dynamic loading is enabled) to include plumed features. -+ -+ Why is Plumed.c written in C and not C++? The reason is that the resulting Plumed.o -+ needs to be linked with the host MD code immediately (whereas the rest of plumed -+ could be linked a posteriori). Imagine the MD code is written in FORTRAN: when we -+ link the Plumed.o file we would like not to need any C++ library linked. In this -+ manner, we do not need to know which C++ compiler will be used to compile plumed. -+ The C++ library is only linked to the "rest" of plumed, which actually use it. -+ Anyway, Plumed.c is written in such a manner to allow its compilation also in C++ -+ (C++ is a bit stricter than C; compatibility is checked when PlumedStatic.cpp, -+ which basically includes Plumed.c, is compiled with the C++ compiler). This will -+ allow e.g. MD codes written in C++ to just incorporate Plumed.c (maybe renamed into -+ Plumed.cpp), without the need of configuring a plain C compiler. -+ -+ Plumed interface can be used from C, C++ and FORTRAN. Everything concerning plumed -+ is hidden inside a single object type, which is described in C by a structure -+ (struct \ref plumed), in C++ by a class (PLMD::Plumed) and in FORTRAN by a -+ fixed-length string (CHARACTER(LEN=32)). Obviously C++ can use both struct -+ and class interfaces, but the first should be preferred. The reference interface -+ is the C one, whereas FORTRAN and C++ interfaces are implemented as wrappers -+ around it. -+ -+ In the C++ interface, all the routines are implemented as methods of PLMD::Plumed. -+ In the C and FORTRAN interfaces, all the routines are named plumed_*, to -+ avoid potential name clashes. Notice that the entire plumed library -+ is implemented in C++, and it is hidden inside the PLMD namespace. -+ -+ Handlers to the plumed object can be converted among different representations, -+ to allow inter-operability among languages. In C, there are tools to convert -+ to/from FORTRAN, whereas in C++ there are tools to convert to/from FORTRAN and C. -+ -+ These handlers only contain a pointer to the real structure, so that -+ when a plumed object is brought from one language to another, -+ it brings a reference to the same environment. -+ -+ Moreover, to simplify life in all cases where a single Plumed object is -+ required for the entire simulation (which covers most of the practical -+ applications with conventional MD codes) it is possible to take advantage -+ of a global interface, which is implicitly referring to a unique global instance. -+ The global object should still be initialized and finalized properly. -+ -+ The basic method to send a message to plumed is -+\verbatim -+ (C) plumed_cmd -+ (C++) PLMD::Plumed::cmd -+ (FORTRAN) PLUMED_F_CMD -+\endverbatim -+ -+ To initialize a plumed object, use: -+\verbatim -+ (C) plumed_create -+ (C++) (constructor of PLMD::Plumed) -+ (FORTRAN) PLUMED_F_CREATE -+\endverbatim -+ -+ To finalize it, use -+\verbatim -+ (C) plumed_finalize -+ (C++) (destructor of PLMD::Plumed) -+ (FORTRAN) PLUMED_F_FINALIZE -+\endverbatim -+ -+ To access to the global-object, use -+\verbatim -+ (C) plumed_gcreate, plumed_gfinalize, plumed_gcmd -+ (C++) PLMD::Plumed::gcreate, PLMD::Plumed::gfinalize, PLMD::Plumed::gcmd -+ (FORTRAN) PLUMED_F_GCREATE, PLUMED_F_GFINALIZE, PLUMED_F_GCMD -+\endverbatim -+ -+ To check if the global object has been initialized, use -+\verbatim -+ (C) plumed_ginitialized -+ (C++) PLMD::Plumed::ginitialized -+ (FORTRAN) PLUMED_F_GINITIALIZED -+\endverbatim -+ -+ To check if plumed library is available (this is useful for runtime linking), use -+\verbatim -+ (C) plumed_installed -+ (C++) PLMD::Plumed::installed -+ (FORTRAN) PLUMED_F_INSTALLED -+\endverbatim -+ -+ To convert handlers use -+\verbatim -+ (C) plumed_c2f (C to FORTRAN) -+ (C) plumed_f2c (FORTRAN to C) -+ (C++) Plumed(plumed) constructor (C to C++) -+ (C++) operator plumed() cast (C++ to C) -+ (C++) Plumed(char*) constructor (FORTRAN to C++) -+ (C++) toFortran(char*) (C++ to FORTRAN) -+\endverbatim -+ -+\verbatim -+ FORTRAN interface -+ SUBROUTINE PLUMED_F_INSTALLED(i) -+ INTEGER, INTENT(OUT) :: i -+ SUBROUTINE PLUMED_F_GINITIALIZED(i) -+ INTEGER, INTENT(OUT) :: i -+ SUBROUTINE PLUMED_F_GCREATE() -+ SUBROUTINE PLUMED_F_GCMD(key,val) -+ CHARACTER(LEN=*), INTENT(IN) :: key -+ UNSPECIFIED_TYPE, INTENT(INOUT) :: val(*) -+ SUBROUTINE PLUMED_F_GFINALIZE() -+ SUBROUTINE PLUMED_F_GLOBAL(p) -+ CHARACTER(LEN=32), INTENT(OUT) :: p -+ SUBROUTINE PLUMED_F_CREATE(p) -+ CHARACTER(LEN=32), INTENT(OUT) :: p -+ SUBROUTINE PLUMED_F_CMD(p,key,val) -+ CHARACTER(LEN=32), INTENT(IN) :: p -+ CHARACTER(LEN=*), INTENT(IN) :: key -+ UNSPECIFIED_TYPE, INTENT(INOUT) :: val(*) -+ SUBROUTINE PLUMED_F_FINALIZE(p) -+ CHARACTER(LEN=32), INTENT(IN) :: p -+\endverbatim -+ -+ The main routine is "cmd", which accepts two arguments: -+ key is a string containing the name of the command -+ val is the argument. it is declared const so as to use allow passing const objects, but in practice plumed -+ is going to modify val in several cases (using a const_cast). -+ In some cases val can be omitted: just pass a NULL pointer (in C++, val is optional and can be omitted). -+ The set of possible keys is the real API of the plumed library, and will be expanded with time. -+ New commands will be added, but backward compatibility will be retained as long as possible. -+ -+ To pass plumed a callback function use the following syntax (not available in FORTRAN yet) -+\verbatim -+ plumed_function_holder ff; -+ ff.p=your_function; -+ plumed_cmd(plumed,"xxxx",&ff); -+\endverbatim -+ (this is passing the your_function() function to the "xxxx" command) -+*/ -+ -+#ifdef __cplusplus -+ extern "C" { -+#endif -+ -+/* Generic function pointer */ -+typedef void (*plumed_function_pointer)(void); -+ -+/** -+ \brief Holder for function pointer. -+ -+ To pass plumed a callback function use the following syntax: -+\verbatim -+ plumed_function_holder ff; -+ ff.p=your_function; -+ plumed_cmd(plumed,"xxxx",&ff); -+\endverbatim -+ (this is going to pass the your_function() function to the "xxxx" command) -+*/ -+ -+typedef struct { -+ plumed_function_pointer p; -+} plumed_function_holder; -+ -+/** -+ \brief Main plumed object -+ -+ This is an object containing a Plumed instance, which should be used in -+ the MD engine. It should first be initialized with plumed_create(), -+ then it communicates with the MD engine using plumed_cmd(). Finally, -+ before the termination, it should be deallocated with plumed_finalize(). -+ Its interface is very simple and general, and is expected -+ not to change across plumed versions. See \ref ReferencePlumedH. -+*/ -+typedef struct { -+/** -+ \private -+ \brief Void pointer holding the real PlumedMain structure -+*/ -+ void*p; -+} plumed; -+ -+/** \relates plumed -+ \brief Constructor -+ -+ \return The constructed plumed object -+*/ -+plumed plumed_create(void); -+ -+/** \relates plumed -+ \brief Tells p to execute a command -+ -+ \param p The plumed object on which command is acting -+ \param key The name of the command to be executed -+ \param val The argument. It is declared as const to allow calls like plumed_cmd(p,"A","B"), -+ but for some choice of key it can change the content -+*/ -+void plumed_cmd(plumed p,const char*key,const void*val); -+ -+/** \relates plumed -+ \brief Destructor -+ -+ \param p The plumed object to be deallocated -+*/ -+void plumed_finalize(plumed p); -+ -+/** \relates plumed -+ \brief Check if plumed is installed (for runtime binding) -+ -+ \return 1 if plumed is installed, to 0 otherwise -+*/ -+int plumed_installed(void); -+ -+/** \relates plumed -+ \brief Retrieves an handler to the global structure. -+*/ -+plumed plumed_global(void); -+ -+/** \relates plumed -+ \brief Check if the global interface has been initialized -+ -+ \return 1 if plumed has been initialized, 0 otherwise -+*/ -+int plumed_ginitialized(void); -+ -+/* global C interface, working on a global object */ -+ -+/** \relates plumed -+ \brief Constructor for the global interface. -+ -+ \note Equivalent to plumed_create(), but initialize a static global plumed object -+*/ -+void plumed_gcreate(void); -+ -+/** \relates plumed -+ \brief Tells to the global interface to execute a command. -+ -+ \param key The name of the command to be executed -+ \param val The argument. It is declared as const to allow calls like plumed_gcmd("A","B"), -+ but for some choice of key it can change the content -+ -+ \note Equivalent to plumed_cmd(), but skipping the plumed argument -+*/ -+void plumed_gcmd(const char* key,const void* val); -+ -+/** \relates plumed -+ \brief Destructor for the global interface. -+ -+ \note Equivalent to plumed_finalize(), but skipping the plumed argument -+*/ -+void plumed_gfinalize(void); -+ -+/* routines to convert char handler from/to plumed objects */ -+ -+/** \related plumed -+ \brief Converts a C handler to a FORTRAN handler -+ -+ \param p The C handler -+ \param c The FORTRAN handler (a char[32]) -+*/ -+void plumed_c2f(plumed p,char* c); -+ -+/** \related plumed -+ \brief Converts a FORTRAN handler to a C handler -+ \param c The FORTRAN handler (a char[32]) -+ \return The C handler -+*/ -+plumed plumed_f2c(const char* c); -+ -+#ifdef __cplusplus -+ } -+#endif -+ -+#ifdef __cplusplus -+ -+/* this is to include the NULL pointer */ -+#include -+ -+/* C++ interface is hidden in PLMD namespace (same as plumed library) */ -+namespace PLMD { -+ -+/** -+ C++ wrapper for \ref plumed. -+ -+ This class provides a C++ interface to PLUMED. -+*/ -+ -+class Plumed{ -+ plumed main; -+/** -+ keeps track if the object was created from scratch using -+ the defaults destructor (reference=false) or if it was imported -+ from C or FORTRAN (reference=true). In the latter case, the -+ plumed_finalize() method is not called when destructing the object, -+ since it is expected to be finalized in the C/FORTRAN code -+*/ -+ bool reference; -+public: -+/** -+ Check if plumed is installed (for runtime binding) -+ \return true if plumed is installed, false otherwise -+*/ -+ static bool installed(); -+/** -+ Check if global-plumed has been initialized -+ \return true if global plumed object (see global()) is initialized (i.e. if gcreate() has been -+ called), false otherwise. -+*/ -+ static bool ginitialized(); -+/** -+ Initialize global-plumed -+*/ -+ static void gcreate(); -+/** -+ Send a command to global-plumed -+ \param key The name of the command to be executed -+ \param val The argument. It is declared as const to allow calls like gcmd("A","B"), -+ but for some choice of key it can change the content -+*/ -+ static void gcmd(const char* key,const void* val); -+/** -+ Finalize global-plumed -+*/ -+ static void gfinalize(); -+/** -+ Returns the Plumed global object -+ \return The Plumed global object -+*/ -+ static Plumed global(); -+/** -+ Constructor -+*/ -+ Plumed(); -+/** -+ Clone a Plumed object from a FORTRAN char* handler -+ \param c The FORTRAN handler (a char[32]). -+ -+ \attention The Plumed object created in this manner -+ will not finalize the corresponding plumed structure. -+ It is expected that the FORTRAN code calls plumed_c_finalize for it -+*/ -+// to have maximum portability of this file I do not use the explicit keyword here -+// I thus add a suppress command for cppcheck -+// cppcheck-suppress noExplicitConstructor -+ Plumed(const char*c); -+/** -+ Clone a Plumed object from a C plumed structure -+ \param p The C plumed structure. -+ -+ \attention The Plumed object created in this manner -+ will not finalize the corresponding plumed structure. -+ It is expected that the C code calls plumed_finalize for it -+*/ -+// to have maximum portability of this file I do not use the explicit keyword here -+// I thus add a suppress command for cppcheck -+// cppcheck-suppress noExplicitConstructor -+ Plumed(plumed p); -+private: -+/** Copy constructor is disabled (private and unimplemented) -+ The problem here is that after copying it will not be clear who is -+ going to finalize the corresponding plumed structure. -+*/ -+ Plumed(const Plumed&); -+/** Assignment operator is disabled (private and unimplemented) -+ The problem here is that after copying it will not be clear who is -+ going to finalize the corresponding plumed structure. -+*/ -+ Plumed&operator=(const Plumed&); -+public: -+/** -+ Retrieve the C plumed structure for this object -+*/ -+ operator plumed()const; -+/** -+ Retrieve a FORTRAN handler for this object -+ \param c The FORTRAN handler (a char[32]). -+*/ -+ void toFortran(char*c)const; -+/** -+ Send a command to this plumed object -+ \param key The name of the command to be executed -+ \param val The argument. It is declared as const to allow calls like p.cmd("A","B"), -+ but for some choice of key it can change the content -+*/ -+ void cmd(const char*key,const void*val=NULL); -+/** -+ Destructor -+ -+ Destructor is virtual so as to allow correct inheritance from Plumed object. -+ To avoid linking problems with g++, I specify "inline" also here (in principle -+ it should be enough to specify it down in the definition of the function, but -+ for some reason that I do not understand g++ does not inline it properly in that -+ case and complains when Plumed.h is included but Plumed.o is not linked. Anyway, the -+ way it is done here seems to work properly). -+*/ -+ inline virtual ~Plumed(); -+}; -+ -+/* All methods are inlined so as to avoid the compilation of an extra c++ file */ -+ -+inline -+bool Plumed::installed(){ -+ return plumed_installed(); -+} -+ -+inline -+Plumed::Plumed(): -+ main(plumed_create()), -+ reference(false) -+{} -+ -+inline -+Plumed::Plumed(const char*c): -+ main(plumed_f2c(c)), -+ reference(true) -+{} -+ -+inline -+Plumed::Plumed(plumed p): -+ main(p), -+ reference(true) -+{} -+ -+inline -+Plumed::operator plumed()const{ -+ return main; -+} -+ -+inline -+void Plumed::toFortran(char*c)const{ -+ plumed_c2f(main,c); -+} -+ -+inline -+void Plumed::cmd(const char*key,const void*val){ -+ plumed_cmd(main,key,val); -+} -+ -+inline -+Plumed::~Plumed(){ -+ if(!reference)plumed_finalize(main); -+} -+ -+inline -+bool Plumed::ginitialized(){ -+ return plumed_ginitialized(); -+} -+ -+inline -+void Plumed::gcreate(){ -+ plumed_gcreate(); -+} -+ -+inline -+void Plumed::gcmd(const char* key,const void* val){ -+ plumed_gcmd(key,val); -+} -+ -+inline -+void Plumed::gfinalize(){ -+ plumed_gfinalize(); -+} -+ -+inline -+Plumed Plumed::global(){ -+ return plumed_global(); -+} -+ -+} -+ -+#endif -+ -+ -+#endif -diff -urN dl_class_1.9.orig/Plumed.inc dl_class_1.9/Plumed.inc ---- dl_class_1.9.orig/Plumed.inc 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/Plumed.inc 2015-11-09 14:26:16.827714651 +0100 -@@ -0,0 +1,3 @@ -+# PLUMED: runtime installation -+PLUMED_LOAD= -L$(EBROOTPLUMED)/lib -lplumed -ldl -+PLUMED_DEPENDENCIES= -diff -urN dl_class_1.9.orig/srcmod/angles_module.f dl_class_1.9/srcmod/angles_module.f ---- dl_class_1.9.orig/srcmod/angles_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/angles_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,741 @@ -+ module angles_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining valence angle potentials -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c modified - p.-a.cazade oct 2007 : solvation etc. -+c modified - d. quigley 2010 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmang(:,:) -+ integer, allocatable :: listang(:,:) -+ integer, allocatable :: numang(:),keyang(:),lstang(:,:) -+ -+ save prmang,listang,numang,keyang,lstang -+ -+ contains -+ -+ subroutine alloc_ang_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining valence angle potential arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(5) -+ -+ do i=1,5 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmang(mxtang,mxpang),stat=fail(1)) -+ allocate (numang(mxtmls),stat=fail(2)) -+ allocate (keyang(mxtang),stat=fail(3)) -+ allocate (lstang(mxtang,3),stat=fail(4)) -+ allocate (listang(mxangl,4),stat=fail(5)) -+ -+ do i=1,5 -+ if(fail(i).gt.0)call error(idnode,1010) -+ enddo -+ -+ do i=1,mxtmls -+ numang(i)=0 -+ enddo -+ -+ end subroutine alloc_ang_arrays -+ -+ subroutine define_angles -+ x (safe,idnode,itmols,nangle,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining bond angles -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,itmols,nangle,nsite,ntmp,i,iang,iang1 -+ integer idum,iatm1,iatm2,iatm3,isite1,isite2,isite3,ia,ja -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numang(itmols)=numang(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of bond angles', -+ x 10x,i10)")ntmp -+ write(nrite,"(/,/,1x,'bond angle details:', -+ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, -+ x 'index',5x,'f-const',7x,'angle',/)") -+ endif -+ -+ iang1=numang(itmols) -+ do iang=1,iang1 -+ -+c read bond angle potential parameters -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ iatm3=intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ isite3=nsite-numsit(itmols)+iatm3 -+ -+ if(lfzsit(isite1)*lfzsit(isite2)* -+ x lfzsit(isite3).ne.0)then -+ -+ numang(itmols)=numang(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ nangle=nangle+1 -+ -+ if(nangle.gt.mxtang)call error(idnode,50) -+ -+ if(keyword(1:4).eq.'harm')then -+ keyang(nangle)=1 -+ elseif(keyword(1:4).eq.'-hrm')then -+ keyang(nangle)=-1 -+ elseif(keyword(1:4).eq.'quar')then -+ keyang(nangle)=2 -+ elseif(keyword(1:4).eq.'-qur')then -+ keyang(nangle)=-2 -+ elseif(keyword(1:4).eq.'thrm')then -+ keyang(nangle)=3 -+ elseif(keyword(1:4).eq.'-thm')then -+ keyang(nangle)=-3 -+ elseif(keyword(1:4).eq.'shrm')then -+ keyang(nangle)=4 -+ elseif(keyword(1:4).eq.'-shm')then -+ keyang(nangle)=-4 -+ elseif(keyword(1:4).eq.'bvs1')then -+ keyang(nangle)=5 -+ elseif(keyword(1:4).eq.'-bv1')then -+ keyang(nangle)=-5 -+ elseif(keyword(1:4).eq.'bvs2')then -+ keyang(nangle)=6 -+ elseif(keyword(1:4).eq.'-bv2')then -+ keyang(nangle)=-6 -+ elseif(keyword(1:4).eq.'hcos')then -+ keyang(nangle)=7 -+ elseif(keyword(1:4).eq.'-hcs')then -+ keyang(nangle)=-7 -+ elseif(keyword(1:4).eq.'cos ')then -+ keyang(nangle)=8 -+ elseif(keyword(1:4).eq.'-cos')then -+ keyang(nangle)=-8 -+ elseif(keyword(1:4).eq.'mmsb')then -+ keyang(nangle)=9 -+ elseif(keyword(1:4).eq.'-msb')then -+ keyang(nangle)=-9 -+ elseif(keyword(1:4).eq.'stst') then -+ keyang(nangle)=10 -+ elseif(keyword(1:4).eq.'-sts') then -+ keyang(nangle)=-10 -+ elseif(keyword(1:4).eq.'stbe') then -+ keyang(nangle)=11 -+ elseif(keyword(1:4).eq.'-stb') then -+ keyang(nangle)=-11 -+ elseif(keyword(1:4).eq.'cmps') then -+ keyang(nangle)=12 -+ elseif(keyword(1:4).eq.'-cmp') then -+ keyang(nangle)=-12 -+ else -+ if(idnode.eq.0)write(nrite,*)message -+ call error(idnode,440) -+ endif -+ -+ lstang(nangle,1)=iatm1 -+ lstang(nangle,2)=iatm2 -+ lstang(nangle,3)=iatm3 -+ prmang(nangle,1)=dblstr(record,lenrec,idum) -+ prmang(nangle,2)=dblstr(record,lenrec,idum) -+ prmang(nangle,3)=dblstr(record,lenrec,idum) -+ prmang(nangle,4)=dblstr(record,lenrec,idum) -+ prmang(nangle,5)=dblstr(record,lenrec,idum) -+ prmang(nangle,6)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,3i10,1p,e12.4,0p,9f12.6)") -+ x keyword(1:4),(lstang(nangle,ia),ia=1,3), -+ x (prmang(nangle,ja),ja=1,mxpang) -+ -+c convert energies to internal units -+ -+ prmang(nangle,1)=prmang(nangle,1)*engunit -+ if(abs(keyang(nangle)).eq.2)then -+ prmang(nangle,3)=prmang(nangle,3)*engunit -+ prmang(nangle,4)=prmang(nangle,4)*engunit -+ elseif(abs(keyang(nangle)).eq.12)then -+ prmang(nangle,2)=prmang(nangle,2)*engunit -+ prmang(nangle,3)=prmang(nangle,3)*engunit -+ endif -+ -+c convert angles to radians -+ -+ if(abs(keyang(nangle)).eq.12)then -+ prmang(nangle,4)=prmang(nangle,4)*(pi/180.d0) -+ elseif(abs(keyang(nangle)).ne.10)then -+ prmang(nangle,2)=prmang(nangle,2)*(pi/180.d0) -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_angles -+ -+ subroutine angfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntangl,engang,virang) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating bond angle energy and -+c force terms in molecular dynamics. -+c -+c replicated data - blocked version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith may 1992 -+c modified - t. forester feb 1993 -+c modified - t. forester nov 1994 : block data -+c modified - t. forester may 1995 : stress tensor -+c modified - p.-a.cazade oct 2007 : solvation etc. -+c modified - d. quigley nov 2010 : metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect -+ logical idrive,jdrive,kdrive -+ integer idnode,mxnode,imcon,ntangl,fail1,fail2 -+ integer ii,iang1,iang2,i,ia,ib,ic,kk,keya -+ real(8) engang,virang,theta,fxc,fyc,fzc,rab,xab -+ real(8) yab,zab,rbc,xbc,ybc,zbc,sint,cost,pterm,vterm -+ real(8) gamma,gamsa,gamsc,rrbc,rrab,fxa,fya,fza -+ real(8) strs(6),strs_loc(6) -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ real(8), allocatable :: xdbc(:),ydbc(:),zdbc(:) -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) -+ allocate (xdbc(msbad),ydbc(msbad),zdbc(msbad),stat=fail2) -+ if(fail1.ne.fail2)call error(idnode,1020) -+ -+c flag for undefined potentials -+ -+ safe=.true. -+ -+c check size of work arrays -+ -+ if((ntangl-mxnode+1)/mxnode.gt.msbad)call error(idnode,419) -+ -+c block indices -+ -+ iang1=(idnode*ntangl)/mxnode+1 -+ iang2=((idnode+1)*ntangl)/mxnode -+ -+c zero accumulators -+ -+ engang=0.d0 -+ virang=0.d0 -+ ang_fre=0.d0 -+ ang_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(2)=.true. -+ ang_sol(:)=0.d0 -+ if(lexcite)ang_exc(:)=0.d0 -+ -+ endif -+ -+c calculate atom separation vectors -+ -+ ii=0 -+ do i=iang1,iang2 -+ -+ ii=ii+1 -+ -+c indices of bonded atoms -+ -+ ia=listang(ii,2) -+ ib=listang(ii,3) -+ ic=listang(ii,4) -+ -+c components of first bond vector -+ -+ xdab(ii)=xxx(ia)-xxx(ib) -+ ydab(ii)=yyy(ia)-yyy(ib) -+ zdab(ii)=zzz(ia)-zzz(ib) -+ -+c components of second bond vector -+ -+ xdbc(ii)=xxx(ic)-xxx(ib) -+ ydbc(ii)=yyy(ic)-yyy(ib) -+ zdbc(ii)=zzz(ic)-zzz(ib) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ call images(imcon,0,1,ii,cell,xdbc,ydbc,zdbc) -+ -+c loop over all specified angle potentials -+ -+ ii=0 -+ do i=iang1,iang2 -+ -+ ii=ii+1 -+ -+c define components of first bond vector -+ -+ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) -+ rrab=1.d0/rab -+ -+ xab=xdab(ii)*rrab -+ yab=ydab(ii)*rrab -+ zab=zdab(ii)*rrab -+ -+c define components of second bond vector -+ -+ rbc=sqrt(xdbc(ii)**2+ydbc(ii)**2+zdbc(ii)**2) -+ rrbc=1.d0/rbc -+ -+ xbc=xdbc(ii)*rrbc -+ ybc=ydbc(ii)*rrbc -+ zbc=zdbc(ii)*rrbc -+ -+c index of potential function parameters -+ -+ kk=listang(ii,1) -+ -+c determine bond angle and calculate potential energy -+ -+ cost=(xab*xbc+yab*ybc+zab*zbc) -+ theta=acos(cost) -+ sint=max(1.d-8,sqrt(1.d0-cost**2)) -+ -+ keya=abs(keyang(kk)) -+ -+ if(keya.eq.1)then -+ -+c harmonic potential -+ -+ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2 -+ gamma=prmang(kk,1)*(theta-prmang(kk,2))/sint -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ elseif(keya.eq.2)then -+ -+c quartic potential -+ -+ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2+ -+ x 1.d0/3.d0*prmang(kk,3)*(theta-prmang(kk,2))**3+ -+ x 0.25d0*prmang(kk,4)*(theta-prmang(kk,2))**4 -+ gamma=(prmang(kk,1)*(theta-prmang(kk,2))+ -+ x prmang(kk,3)*(theta-prmang(kk,2))**2+ -+ x prmang(kk,4)*(theta-prmang(kk,2))**3)/sint -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ elseif(keya.eq.3)then -+ -+c truncated harmonic potential -+ -+ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2* -+ x exp(-(rab**8+rbc**8)/prmang(kk,3)**8) -+ gamma=prmang(kk,1)*(theta-prmang(kk,2))* -+ x exp(-(rab**8+rbc**8)/prmang(kk,3)**8)/sint -+ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmang(kk,3)**8 -+ gamsa=(8.d0*pterm/prmang(kk,3)**8)*rab**7 -+ gamsc=(8.d0*pterm/prmang(kk,3)**8)*rbc**7 -+ -+ elseif(keya.eq.4)then -+ -+c screened harmonic potential -+ -+ pterm=0.5d0*prmang(kk,1)*(theta-prmang(kk,2))**2* -+ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4))) -+ gamma=prmang(kk,1)*(theta-prmang(kk,2))* -+ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4)))/sint -+ vterm=-pterm*(rab/prmang(kk,3)+rbc/prmang(kk,4)) -+ gamsa=(pterm/prmang(kk,3)) -+ gamsc=(pterm/prmang(kk,4)) -+ -+ elseif(keya.eq.5)then -+ -+c screened vessal potential (type 1) -+ -+ pterm=(prmang(kk,1)/(8.d0*(prmang(kk,2)-pi)**2)* -+ x (((prmang(kk,2)-pi)**2-(theta-pi)**2)**2))* -+ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4))) -+ gamma=(prmang(kk,1)/(2.d0*(prmang(kk,2)-pi)**2)* -+ x ((prmang(kk,2)-pi)**2-(theta-pi)**2)*(theta-pi))* -+ x exp(-(rab/prmang(kk,3)+rbc/prmang(kk,4)))/sint -+ vterm=-pterm*(rab/prmang(kk,3)+rbc/prmang(kk,4)) -+ gamsa=(pterm/prmang(kk,3)) -+ gamsc=(pterm/prmang(kk,4)) -+ -+ elseif(keya.eq.6)then -+ -+c truncated vessal potential (type 2) -+ -+ pterm=prmang(kk,1)*(theta**prmang(kk,3)*(theta-prmang(kk,2)) -+ x **2*(theta+prmang(kk,2)-2.d0*pi)**2-0.5d0*prmang(kk,3)*pi -+ x **(prmang(kk,3)-1.d0)*(theta-prmang(kk,2))**2*(pi-prmang(kk, -+ x 2))**3)*exp(-(rab**8+rbc**8)/prmang(kk,4)**8) -+ gamma=prmang(kk,1)*(theta**(prmang(kk,3)-1.d0)*(theta-prmang -+ x (kk,2))*(theta+prmang(kk,2)-2.d0*pi)*((prmang(kk,3)+4.d0)* -+ x theta**2-2.d0*pi*(prmang(kk,3)+2.d0)*theta+prmang(kk,3)* -+ x prmang(kk,2)*(2.d0*pi-prmang(kk,2)))-prmang(kk,3)*pi** -+ x (prmang(kk,3)-1.d0)*(theta-prmang(kk,2))*(pi-prmang(kk,2)) -+ x **3)*exp(-(rab**8+rbc**8)/prmang(kk,4)**8)/sint -+ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmang(kk,4)**8 -+ gamsa=(8.d0*pterm/prmang(kk,4)**8)*rab**7 -+ gamsc=(8.d0*pterm/prmang(kk,4)**8)*rbc**7 -+ -+ elseif(keya.eq.7)then -+ -+c harmonic cosine potential -+ -+ pterm=0.5d0*prmang(kk,1)*(cos(theta)-cos(prmang(kk,2)))**2 -+ gamma=-prmang(kk,1)*(cos(theta)-cos(prmang(kk,2))) -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ elseif(keya.eq.8)then -+ -+c ordinary cosine potential -+ -+ pterm=prmang(kk,1)*(1+cos(prmang(kk,3)*theta-prmang(kk,2))) -+ gamma=-prmang(kk,1)*prmang(kk,3)*sin(prmang(kk,3)*theta- -+ x prmang(kk,2))/sint -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ elseif(keya.eq.9)then -+ -+c mm3 stretch-bend potential -+ -+ pterm=prmang(kk,1)*(theta-prmang(kk,2))* -+ x (rab-prmang(kk,3))*(rbc-prmang(kk,4)) -+ gamma=prmang(kk,1)*(rab-prmang(kk,3))*(rbc- -+ x prmang(kk,4))/sint -+ gamsa=-prmang(kk,1)*(theta-prmang(kk,2))*(rbc-prmang(kk,4)) -+ gamsc=-prmang(kk,1)*(theta-prmang(kk,2))*(rab-prmang(kk,3)) -+ vterm=-(gamsa*rab+gamsc*rbc) -+ -+ elseif(keya.eq.10)then -+ -+c compass stretch-stretch potential -+ -+ pterm=prmang(kk,1)*(rab-prmang(kk,2))*(rbc-prmang(kk,3)) -+ gamma=0.d0 -+ gamsa=-prmang(kk,1)*(rbc-prmang(kk,3)) -+ gamsc=-prmang(kk,1)*(rab-prmang(kk,2)) -+ vterm=-(gamsa*rab+gamsc*rbc) -+ -+ elseif(keya.eq.11)then -+ -+c compass stretch-bend potential -+ -+ pterm=prmang(kk,1)*(theta-prmang(kk,2))*(rab-prmang(kk,3)) -+ gamma=prmang(kk,1)*(rab-prmang(kk,3))/sint -+ gamsa=-prmang(kk,1)*(theta-prmang(kk,2)) -+ gamsc=0.d0 -+ vterm=-gamsa*rab -+ -+ elseif(keya.eq.12)then -+ -+c combined compass angle potential with 3 coupling terms -+ -+ pterm=prmang(kk,1)*(rab-prmang(kk,5))*(rbc-prmang(kk,6))+ -+ x (theta-prmang(kk,4))*(prmang(kk,2)*(rab-prmang(kk,5))+ -+ x prmang(kk,3)*(rbc-prmang(kk,6))) -+ gamma=(prmang(kk,2)*(rab-prmang(kk,5))+ -+ x prmang(kk,3)*(rbc-prmang(kk,6)))/sint -+ gamsa=-prmang(kk,2)*(theta-prmang(kk,4))- -+ x prmang(kk,1)*(rbc-prmang(kk,6)) -+ gamsc=-prmang(kk,3)*(theta-prmang(kk,4))- -+ x prmang(kk,1)*(rab-prmang(kk,5)) -+ vterm=-(gamsa*rab+gamsc*rbc) -+ -+ else -+ -+c undefined potential -+ -+ safe=.false. -+ pterm=0.d0 -+ vterm=0.d0 -+ gamma=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ endif -+ -+c indices of bonded atoms -+ -+ ia=listang(ii,2) -+ ib=listang(ii,3) -+ ic=listang(ii,4) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ kdrive=driven(ltype(ic)) -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. -+ x (atm_fre(ic).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic).eq.0) -+ -+ if(lsolva)then -+ ang_exc(atmolt(ia))=ang_exc(atmolt(ia))+pterm -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. -+ x (atm_fre(ic).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ ang_fre=ang_fre-pterm -+ ang_vir=ang_vir-vterm -+ pterm=lambda1*pterm -+ vterm=lambda1*vterm -+ gamma=lambda1*gamma -+ gamsa=lambda1*gamsa -+ gamsc=lambda1*gamsc -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. -+ x (atm_fre(ic).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ ang_fre=ang_fre+pterm -+ ang_vir=ang_vir+vterm -+ pterm=lambda2*pterm -+ vterm=lambda2*vterm -+ gamma=lambda2*gamma -+ gamsa=lambda2*gamsa -+ gamsc=lambda2*gamsc -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c sum potential energy and virial -+ -+ engang=engang+pterm -+ virang=virang+vterm -+ -+c calculate solvation energy -+ -+ if(lsolva)then -+ ang_sol(atmolt(ia))=ang_sol(atmolt(ia))+pterm -+ endif -+ -+c calculate atomic forces -+ -+ fxa=gamma*(xbc-xab*cost)*rrab+gamsa*xab -+ fya=gamma*(ybc-yab*cost)*rrab+gamsa*yab -+ fza=gamma*(zbc-zab*cost)*rrab+gamsa*zab -+ -+ fxc=gamma*(xab-xbc*cost)*rrbc+gamsc*xbc -+ fyc=gamma*(yab-ybc*cost)*rrbc+gamsc*ybc -+ fzc=gamma*(zab-zbc*cost)*rrbc+gamsc*zbc -+ -+c sum atomic forces -+ -+ fxx(ia)=fxx(ia)+fxa -+ fyy(ia)=fyy(ia)+fya -+ fzz(ia)=fzz(ia)+fza -+ -+ fxx(ib)=fxx(ib)-fxa-fxc -+ fyy(ib)=fyy(ib)-fya-fyc -+ fzz(ib)=fzz(ib)-fza-fzc -+ -+ fxx(ic)=fxx(ic)+fxc -+ fyy(ic)=fyy(ic)+fyc -+ fzz(ic)=fzz(ic)+fzc -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+rab*xab*fxa+rbc*xbc*fxc -+ strs(2)=strs(2)+rab*xab*fya+rbc*xbc*fyc -+ strs(3)=strs(3)+rab*xab*fza+rbc*xbc*fzc -+ strs(4)=strs(4)+rab*yab*fya+rbc*ybc*fyc -+ strs(5)=strs(5)+rab*yab*fza+rbc*ybc*fzc -+ strs(6)=strs(6)+rab*zab*fza+rbc*zbc*fzc -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+pterm -+ vir_loc=vir_loc+vterm -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fxa -+ fyy_loc(ia)=fyy_loc(ia)+fya -+ fzz_loc(ia)=fzz_loc(ia)+fza -+ -+ fxx_loc(ib)=fxx_loc(ib)-fxa-fxc -+ fyy_loc(ib)=fyy_loc(ib)-fya-fyc -+ fzz_loc(ib)=fzz_loc(ib)-fza-fzc -+ -+ fxx_loc(ic)=fxx_loc(ic)+fxc -+ fyy_loc(ic)=fyy_loc(ic)+fyc -+ fzz_loc(ic)=fzz_loc(ic)+fzc -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+rab*xab*fxa+rbc*xbc*fxc -+ strs_loc(2)=strs_loc(2)+rab*xab*fya+rbc*xbc*fyc -+ strs_loc(3)=strs_loc(3)+rab*xab*fza+rbc*xbc*fzc -+ strs_loc(4)=strs_loc(4)+rab*yab*fya+rbc*ybc*fyc -+ strs_loc(5)=strs_loc(5)+rab*yab*fza+rbc*ybc*fzc -+ strs_loc(6)=strs_loc(6)+rab*zab*fza+rbc*zbc*fzc -+ -+ endif -+ -+ enddo -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,440) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c sum up contributions to potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engang -+ buffer(2)=virang -+ buffer(3)=ang_fre -+ buffer(4)=ang_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engang=buffer(1) -+ virang=buffer(2) -+ ang_fre=buffer(3) -+ ang_vir=buffer(4) -+ -+c sum up solvation energies -+ -+ if(lsolva)then -+ -+ call gdsum(ang_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(ang_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ deallocate (xdab,ydab,zdab,stat=fail1) -+ deallocate (xdbc,ydbc,zdbc,stat=fail2) -+ -+ return -+ end subroutine angfrc -+ -+ end module angles_module -diff -urN dl_class_1.9.orig/srcmod/basic_comms.f dl_class_1.9/srcmod/basic_comms.f ---- dl_class_1.9.orig/srcmod/basic_comms.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/basic_comms.f 2015-11-09 14:52:08.086294333 +0100 -@@ -0,0 +1,389 @@ -+ subroutine initcomms() -+ -+c********************************************************************* -+c -+c communication harness initialisation -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_init MPI_init_ -+ -+ call MPI_init(ierr) -+ -+ return -+ end -+ -+c PLUMED -+ integer*8 function get_comms() -+ -+c********************************************************************* -+c -+c dl_poly subroutine for obtaining the communicator -+c this is used by plumed -+c -+c author - G. Tribello -+c -+c********************************************************************* -+ -+ get_comms=MPI_COMM_WORLD -+ end -+ -+ subroutine machine(idnode,mxnode) -+c PLUMED -+ -+c********************************************************************* -+c -+c dl_poly subroutine for obtaining charcteristics of -+c the computer on which the program is being run -+c -+c copyright daresbury laboratory 1992 -+c author - w.smith july 1992 -+c -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,mynode,numnodes -+ -+ idnode=mynode() -+ mxnode=numnodes() -+ -+ return -+ end -+ -+ integer function mynode() -+ -+c********************************************************************* -+c -+c routine to determine identity of processing node -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_COMM_RANK MPI_COMM_RANK_ -+ -+ call MPI_COMM_RANK(MPI_COMM_WORLD, mynode ,ierr) -+ -+ return -+ end -+ -+ integer function nodedim() -+ -+c********************************************************************* -+c -+c calculate dimension of hypercube -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer i,n,ierr,mxnode -+ -+CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ -+ -+ call MPI_COMM_SIZE(MPI_COMM_WORLD, mxnode ,ierr) -+ n=1 -+ nodedim = -1 -+ do i=0,16 -+ -+ if(n.eq.mxnode)nodedim=i -+ n=2*n -+ -+ enddo -+ -+ return -+ end -+ -+ integer function numnodes() -+ -+c********************************************************************* -+c -+c calculate number of nodes -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ -+ -+ call MPI_COMM_SIZE(MPI_COMM_WORLD, numnodes, ierr) -+ -+ return -+ end -+ -+ subroutine csend(tagmsg,buf,length,pe,idum) -+ -+c********************************************************************* -+c -+c Intel-like csend (double precision) -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer tagmsg,length,pe,idum -+ -+ integer ierr -+ real(8) buf(*) -+ -+CMPIU define MPI_send MPI_send_ -+ -+ call MPI_send(buf,length,MPI_DOUBLE_PRECISION,pe,tagmsg, -+ x MPI_COMM_WORLD,ierr) -+ -+ return -+ end -+ -+ subroutine crecv(tagmsg,buf,length) -+ -+c********************************************************************* -+c -+c Intel-like crecv (double precision) -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer tagmsg,length -+ -+ integer ierr -+ integer status(MPI_STATUS_SIZE) -+ real(8) buf(*) -+ -+CMPIU define MPI_RECV MPI_RECV_ -+ -+ call MPI_RECV(buf,length,MPI_DOUBLE_PRECISION,MPI_ANY_SOURCE, -+ x tagmsg,MPI_COMM_WORLD,status,ierr) -+ -+ return -+ end -+ -+ subroutine gisum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global summation subroutine for hypercube - MPI version -+c integer version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ integer nnn,i,ierror,iii,kk,k,k0,k1,k2,msg1,msg2 -+ integer aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+ -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, -+ x MPI_SUM,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gdsum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global summation subroutine for MPI - hypercube assumed -+c double precision version -+c -+c copyright - daresbury laboratory 1995 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn,i,iii,kk,k1,k2,ierror -+ real(8) aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+ -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_DOUBLE_PRECISION, -+ x MPI_SUM,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gimax(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global maximum subroutine for hypercube - MPI version -+c integer version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ integer nnn,i,iii,kk,k1,k2,k,k0msg1,msg2,ierror -+ integer aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, -+ x MPI_MAX,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gstate(check) -+ -+c*********************************************************************** -+c -+c dl_poly global status subroutine : gisum version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992 -+c MPI version - t. forester may 1995 -+c -+c*********************************************************************** -+ -+ -+ implicit none -+ -+ logical check -+ integer i,idum -+ -+ i = 0 -+ if(.not.check) i = 1 -+ -+ call gisum(i,1,idum) -+ -+ check = (i.eq.0) -+ -+ return -+ end -+ -+ subroutine gsync() -+ -+c********************************************************************* -+c -+c barrier / synchronization routine -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ierr -+ -+ include "comms.inc" -+ -+CMPIU define MPI_BARRIER MPI_BARRIER_ -+ -+ call MPI_BARRIER(MPI_COMM_WORLD,ierr) -+ -+ return -+ end -+ -+ subroutine exitcomms() -+ -+c********************************************************************* -+c -+c exitcomms: exit from communication harness -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+CMPIU define MPI_FINALIZE MPI_FINALIZE_ -+ -+ call MPI_FINALIZE(ierr) -+ call exit(0) -+ -+ return -+ end -diff -urN dl_class_1.9.orig/srcmod/basic_comms.f.preplumed dl_class_1.9/srcmod/basic_comms.f.preplumed ---- dl_class_1.9.orig/srcmod/basic_comms.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/basic_comms.f.preplumed 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,373 @@ -+ subroutine initcomms() -+ -+c********************************************************************* -+c -+c communication harness initialisation -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_init MPI_init_ -+ -+ call MPI_init(ierr) -+ -+ return -+ end -+ -+ subroutine machine(idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for obtaining charcteristics of -+c the computer on which the program is being run -+c -+c copyright daresbury laboratory 1992 -+c author - w.smith july 1992 -+c -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,mynode,numnodes -+ -+ idnode=mynode() -+ mxnode=numnodes() -+ -+ return -+ end -+ -+ integer function mynode() -+ -+c********************************************************************* -+c -+c routine to determine identity of processing node -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_COMM_RANK MPI_COMM_RANK_ -+ -+ call MPI_COMM_RANK(MPI_COMM_WORLD, mynode ,ierr) -+ -+ return -+ end -+ -+ integer function nodedim() -+ -+c********************************************************************* -+c -+c calculate dimension of hypercube -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer i,n,ierr,mxnode -+ -+CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ -+ -+ call MPI_COMM_SIZE(MPI_COMM_WORLD, mxnode ,ierr) -+ n=1 -+ nodedim = -1 -+ do i=0,16 -+ -+ if(n.eq.mxnode)nodedim=i -+ n=2*n -+ -+ enddo -+ -+ return -+ end -+ -+ integer function numnodes() -+ -+c********************************************************************* -+c -+c calculate number of nodes -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+ -+CMPIU define MPI_COMM_SIZE MPI_COMM_SIZE_ -+ -+ call MPI_COMM_SIZE(MPI_COMM_WORLD, numnodes, ierr) -+ -+ return -+ end -+ -+ subroutine csend(tagmsg,buf,length,pe,idum) -+ -+c********************************************************************* -+c -+c Intel-like csend (double precision) -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer tagmsg,length,pe,idum -+ -+ integer ierr -+ real(8) buf(*) -+ -+CMPIU define MPI_send MPI_send_ -+ -+ call MPI_send(buf,length,MPI_DOUBLE_PRECISION,pe,tagmsg, -+ x MPI_COMM_WORLD,ierr) -+ -+ return -+ end -+ -+ subroutine crecv(tagmsg,buf,length) -+ -+c********************************************************************* -+c -+c Intel-like crecv (double precision) -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer tagmsg,length -+ -+ integer ierr -+ integer status(MPI_STATUS_SIZE) -+ real(8) buf(*) -+ -+CMPIU define MPI_RECV MPI_RECV_ -+ -+ call MPI_RECV(buf,length,MPI_DOUBLE_PRECISION,MPI_ANY_SOURCE, -+ x tagmsg,MPI_COMM_WORLD,status,ierr) -+ -+ return -+ end -+ -+ subroutine gisum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global summation subroutine for hypercube - MPI version -+c integer version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ integer nnn,i,ierror,iii,kk,k,k0,k1,k2,msg1,msg2 -+ integer aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+ -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, -+ x MPI_SUM,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gdsum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global summation subroutine for MPI - hypercube assumed -+c double precision version -+c -+c copyright - daresbury laboratory 1995 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn,i,iii,kk,k1,k2,ierror -+ real(8) aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+ -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_DOUBLE_PRECISION, -+ x MPI_SUM,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gimax(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly global maximum subroutine for hypercube - MPI version -+c integer version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ integer nnn,i,iii,kk,k1,k2,k,k0msg1,msg2,ierror -+ integer aaa(nnn),bbb(nnn) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE) -+CMPIU define MPI_allreduce MPI_allreduce_ -+ -+ call MPI_allreduce(aaa,bbb,nnn,MPI_INTEGER, -+ x MPI_MAX,MPI_COMM_WORLD,ierror) -+ -+ do i = 1,nnn -+ aaa(i) = bbb(i) -+ enddo -+ -+ return -+ end -+ -+ subroutine gstate(check) -+ -+c*********************************************************************** -+c -+c dl_poly global status subroutine : gisum version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992 -+c MPI version - t. forester may 1995 -+c -+c*********************************************************************** -+ -+ -+ implicit none -+ -+ logical check -+ integer i,idum -+ -+ i = 0 -+ if(.not.check) i = 1 -+ -+ call gisum(i,1,idum) -+ -+ check = (i.eq.0) -+ -+ return -+ end -+ -+ subroutine gsync() -+ -+c********************************************************************* -+c -+c barrier / synchronization routine -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ierr -+ -+ include "comms.inc" -+ -+CMPIU define MPI_BARRIER MPI_BARRIER_ -+ -+ call MPI_BARRIER(MPI_COMM_WORLD,ierr) -+ -+ return -+ end -+ -+ subroutine exitcomms() -+ -+c********************************************************************* -+c -+c exitcomms: exit from communication harness -+c -+c copyright - daresbury laboratory -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer ierr -+CMPIU define MPI_FINALIZE MPI_FINALIZE_ -+ -+ call MPI_FINALIZE(ierr) -+ call exit(0) -+ -+ return -+ end -diff -urN dl_class_1.9.orig/srcmod/bonds_module.f dl_class_1.9/srcmod/bonds_module.f ---- dl_class_1.9.orig/srcmod/bonds_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/bonds_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,579 @@ -+ module bonds_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining bond potential arrays -+c copyright - daresbury laboratory -+c -+c author - w. smith sep 2003 -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c adapted for metadynamics -+c - d. quigley 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmbnd(:,:) -+ integer, allocatable :: listbnd(:,:) -+ integer, allocatable :: numbonds(:),keybnd(:),lstbnd(:,:) -+ -+ save prmbnd,listbnd,numbonds,keybnd,lstbnd -+ -+ contains -+ -+ subroutine alloc_bnd_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(5) -+ -+ do i=1,5 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmbnd(mxtbnd,mxpbnd),stat=fail(1)) -+ allocate (numbonds(mxtmls),stat=fail(2)) -+ allocate (keybnd(mxtbnd),stat=fail(3)) -+ allocate (lstbnd(mxtbnd,3),stat=fail(4)) -+ allocate (listbnd(mxbond,4),stat=fail(5)) -+ -+ do i=1,5 -+ if(fail(i).gt.0)call error(idnode,1030) -+ enddo -+ -+ do i=1,mxtmls -+ numbonds(i)=0 -+ enddo -+ -+ end subroutine alloc_bnd_arrays -+ -+ subroutine define_bonds -+ x (safe,idnode,itmols,nbonds,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining bonds -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,itmols,nbonds,nsite,ntmp,ibond,ibond1 -+ integer iatm1,iatm2,isite1,isite2,idum,i,j -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numbonds(itmols)=numbonds(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of chemical bonds', -+ x 7x,i10)")ntmp -+ write(nrite,"(/,/,1x,'chemical bond details:', -+ x /,/,21x,7x,'key',5x,'index',5x,'index',28x, -+ x 'parameters', /)") -+ endif -+ -+ ibond1=numbonds(itmols) -+ do ibond=1,ibond1 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ -+ if(lfzsit(isite1)*lfzsit(isite2).ne.0)then -+ -+ numbonds(itmols)=numbonds(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(12x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ nbonds=nbonds+1 -+ if(nbonds.gt.mxtbnd)call error(idnode,30) -+ -+ if(keyword(1:4).eq.'harm')then -+ keybnd(nbonds)=1 -+ elseif(keyword(1:4).eq.'-hrm')then -+ keybnd(nbonds)=-1 -+ elseif(keyword(1:4).eq.'mors')then -+ keybnd(nbonds)=2 -+ elseif(keyword(1:4).eq.'-mrs')then -+ keybnd(nbonds)=-2 -+ elseif(keyword(1:4).eq.'12-6')then -+ keybnd(nbonds)=3 -+ elseif(keyword(1:4).eq.'-126')then -+ keybnd(nbonds)=-3 -+ elseif(keyword(1:4).eq.'rhrm')then -+ keybnd(nbonds)=4 -+ elseif(keyword(1:4).eq.'-rhm')then -+ keybnd(nbonds)=-4 -+ elseif(keyword(1:4).eq.'quar')then -+ keybnd(nbonds)=5 -+ elseif(keyword(1:4).eq.'-qur')then -+ keybnd(nbonds)=-5 -+ elseif(keyword(1:4).eq.'buck')then -+ keybnd(nbonds)=6 -+ elseif(keyword(1:4).eq.'-bck')then -+ keybnd(nbonds)=-6 -+ elseif(keyword(1:4).eq.'fene')then -+ keybnd(nbonds)=7 -+ elseif(keyword(1:4).eq.'-fen')then -+ keybnd(nbonds)=-7 -+ elseif(keyword(1:4).eq.'coul')then -+ keybnd(nbonds)=8 -+ elseif(keyword(1:4).eq.'-cou')then -+ keybnd(nbonds)=-8 -+ else -+ if(idnode.eq.0)write(nrite,*)message -+ call error(idnode,444) -+ endif -+ -+ lstbnd(nbonds,1)=iatm1 -+ lstbnd(nbonds,2)=iatm2 -+ prmbnd(nbonds,1)=dblstr(record,lenrec,idum) -+ prmbnd(nbonds,2)=dblstr(record,lenrec,idum) -+ prmbnd(nbonds,3)=dblstr(record,lenrec,idum) -+ prmbnd(nbonds,4)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,2i10,2x,1p,10e15.6)") -+ x keyword(1:4),lstbnd(nbonds,1), -+ x lstbnd(nbonds,2),(prmbnd(nbonds,j),j=1,mxpbnd) -+c -+c convert energy units to internal units -+ -+ if(abs(keybnd(nbonds)).eq.3)then -+ prmbnd(nbonds,2)=prmbnd(nbonds,2)*engunit -+ endif -+ if(abs(keybnd(nbonds)).eq.5)then -+ prmbnd(nbonds,3)=prmbnd(nbonds,3)*engunit -+ prmbnd(nbonds,4)=prmbnd(nbonds,4)*engunit -+ endif -+ if(abs(keybnd(nbonds)).eq.6)then -+ prmbnd(nbonds,3)=prmbnd(nbonds,3)*engunit -+ endif -+ -+ if(abs(keybnd(nbonds)).ne.8) -+ x prmbnd(nbonds,1)=prmbnd(nbonds,1)*engunit -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_bonds -+ -+ subroutine bndfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntbond,epsq, -+ x engbnd,virbnd) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating chemical bond energy and -+c force terms in molecular dynamics. -+c -+c replicated data - blocked data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992 -+c modified - t. forester march 1993 -+c modified - t. forester march 1994 -+c modified - t. forester may 1994 -+c modified - t. forester nov 1994 -+c modified - w. smith nov 2006 -+c modified - p.-a. cazade oct 2007, solvation etc. -+c modified - d. quigley 2007, metdynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect -+ logical idrive,jdrive -+ integer i,fail,ibnd1,ibnd2,idnode,mxnode,ii,ia,ib,imcon -+ integer keyb,kk,ntbond -+ real(8) strs(6),strs_loc(6) -+ real(8) rab,rrab,omega,gamma,fx,fy,fz,engbnd,virbnd,epsq -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail) -+ if(fail.ne.0)call error(idnode,1040) -+ -+c flag for undefined potential -+ -+ safe=.true. -+ -+c check size of work arrays -+ -+ if((ntbond-mxnode+1)/mxnode.gt.msbad)call error(idnode,418) -+ -+c block indices -+ -+ ibnd1=(idnode*ntbond)/mxnode+1 -+ ibnd2=((idnode+1)*ntbond)/mxnode -+ -+c initialise accumulators -+ -+ engbnd=0.d0 -+ virbnd=0.d0 -+ bnd_fre=0.d0 -+ bnd_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(1)=.true. -+ bnd_sol(:)=0.d0 -+ if(lexcite)bnd_exc(:)=0.d0 -+ -+ endif -+ -+c calculate atom separation vectors -+ -+ ii=0 -+ do i=ibnd1,ibnd2 -+ -+ ii=ii+1 -+ -+c indices of bonded atoms -+ -+ ia=listbnd(ii,2) -+ ib=listbnd(ii,3) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ -+ endif -+ -+c components of bond vector -+ -+ xdab(ii)=xxx(ia)-xxx(ib) -+ ydab(ii)=yyy(ia)-yyy(ib) -+ zdab(ii)=zzz(ia)-zzz(ib) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ -+c loop over all specified chemical bond potentials -+ -+ ii=0 -+ do i=ibnd1,ibnd2 -+ -+ ii=ii+1 -+ -+c define components of bond vector -+ -+ rrab=0.d0 -+ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) -+ if(rab.gt.1.d-6)rrab=1.d0/rab -+ -+c index of potential function parameters -+ -+ kk=listbnd(ii,1) -+ keyb=abs(keybnd(kk)) -+ -+c calculate scalar constant terms -+ -+ if(keyb.eq.0)then -+ -+c null interaction -+ -+ omega=0.d0 -+ gamma=0.d0 -+ -+ elseif(keyb.eq.1)then -+ -+c harmonic potential -+ -+ omega=0.5d0*prmbnd(kk,1)*(rab-prmbnd(kk,2))**2 -+ gamma=prmbnd(kk,1)*(rab-prmbnd(kk,2))*rrab -+ -+ else if(keyb.eq.2)then -+ -+c morse potential -+ -+ omega=prmbnd(kk,1)*((1.d0-exp(-prmbnd(kk,3)* -+ x (rab-prmbnd(kk,2))))**2-1.d0) -+ gamma=2.d0*prmbnd(kk,1)*prmbnd(kk,3)*(1.d0- -+ x exp(-prmbnd(kk,3)*(rab-prmbnd(kk,2))))* -+ x exp(-prmbnd(kk,3)*(rab-prmbnd(kk,2)))*rrab -+ -+ else if(keyb.eq.3)then -+ -+c 12-6 potential -+ -+ omega=(prmbnd(kk,1)*rrab**6-prmbnd(kk,2))*rrab**6 -+ gamma=(6.d0*prmbnd(kk,2)-12.d0*prmbnd(kk,1)*rrab**6)* -+ x rrab**8 -+ -+ elseif(keyb.eq.4)then -+ -+c restrained harmonic -+ -+ rab=rab-prmbnd(kk,2) -+ omega=0.5d0*prmbnd(kk,1)*(min(abs(rab),prmbnd(kk,3)))**2 -+ x +prmbnd(kk,1)*prmbnd(kk,3)*max(abs(rab)-prmbnd(kk,3),0.d0) -+ gamma=rrab*prmbnd(kk,1)*(sign(min(abs(rab),prmbnd(kk,3)),rab)) -+ -+ elseif(keyb.eq.5)then -+ -+c quartic potential -+ -+ omega=0.5d0*prmbnd(kk,1)*(rab-prmbnd(kk,2))**2+ -+ x 1.d0/3.d0*prmbnd(kk,3)*(rab-prmbnd(kk,2))**3+ -+ x 0.25d0*prmbnd(kk,4)*(rab-prmbnd(kk,2))**4 -+ gamma=rrab*(prmbnd(kk,1)*(rab-prmbnd(kk,2))+ -+ x prmbnd(kk,3)*(rab-prmbnd(kk,2))**2+ -+ x prmbnd(kk,4)*(rab-prmbnd(kk,2))**3) -+ -+ else if(keyb.eq.6)then -+ -+c buckingham exp-6 potential -+ -+ omega=prmbnd(kk,1)*exp(-rab/prmbnd(kk,2))-prmbnd(kk,3)* -+ x rrab**6 -+ gamma=-rrab*prmbnd(kk,1)*exp(-rab/prmbnd(kk,2))/prmbnd(kk,2)+ -+ x 6.d0*prmbnd(kk,3)*rrab**8 -+ -+ else if(keyb.eq.7)then -+ -+c FENE bond potential -+ -+ omega=-0.5d0*prmbnd(kk,1)*prmbnd(kk,2)**2*log(1.d0- -+ x ((rab-prmbnd(kk,3))/prmbnd(kk,2))**2) -+ gamma=rrab*prmbnd(kk,1)*(rab-prmbnd(kk,3))/ -+ x (1.d0-((rab-prmbnd(kk,3))/prmbnd(kk,2))**2) -+ -+ else if(keyb.eq.8)then -+ -+c coulomb bond potential -+ -+ omega=prmbnd(kk,1)*prmbnd(kk,2)*rrab*r4pie0/epsq -+ gamma=-omega*rrab*rrab -+ -+ else -+ -+c undefined potential -+ -+ omega=0.d0 -+ gamma=0.d0 -+ safe=.false. -+ -+ endif -+ -+c indices of bonded atoms -+ -+ ia=listbnd(ii,2) -+ ib=listbnd(ii,3) -+ -+c set selection control -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib).eq.0) -+ -+ if(lsolva)then -+ bnd_exc(atmolt(ia))=bnd_exc(atmolt(ia))+omega -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ bnd_fre=bnd_fre-omega -+ bnd_vir=bnd_vir-gamma*rab*rab -+ omega=lambda1*omega -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ bnd_fre=bnd_fre+omega -+ bnd_vir=bnd_vir+gamma*rab*rab -+ omega=lambda2*omega -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate bond energy and virial -+ -+ engbnd=engbnd+omega -+ virbnd=virbnd+gamma*rab*rab -+ -+c calculate solvation energy -+ -+ if(lsolva)then -+ bnd_sol(atmolt(ia))=bnd_sol(atmolt(ia))+omega -+ endif -+ -+c calculate forces -+ -+ fx=-gamma*xdab(ii) -+ fy=-gamma*ydab(ii) -+ fz=-gamma*zdab(ii) -+ -+ fxx(ia)=fxx(ia)+fx -+ fyy(ia)=fyy(ia)+fy -+ fzz(ia)=fzz(ia)+fz -+ -+ fxx(ib)=fxx(ib)-fx -+ fyy(ib)=fyy(ib)-fy -+ fzz(ib)=fzz(ib)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdab(ii)*fx -+ strs(2)=strs(2)+xdab(ii)*fy -+ strs(3)=strs(3)+xdab(ii)*fz -+ strs(4)=strs(4)+ydab(ii)*fy -+ strs(5)=strs(5)+ydab(ii)*fz -+ strs(6)=strs(6)+zdab(ii)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc+gamma*rab*rab -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fx -+ fyy_loc(ia)=fyy_loc(ia)+fy -+ fzz_loc(ia)=fzz_loc(ia)+fz -+ -+ fxx_loc(ib)=fxx_loc(ib)-fx -+ fyy_loc(ib)=fyy_loc(ib)-fy -+ fzz_loc(ib)=fzz_loc(ib)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdab(ii)*fx -+ strs_loc(2)=strs_loc(2)+xdab(ii)*fy -+ strs_loc(3)=strs_loc(3)+xdab(ii)*fz -+ strs_loc(4)=strs_loc(4)+ydab(ii)*fy -+ strs_loc(5)=strs_loc(5)+ydab(ii)*fz -+ strs_loc(6)=strs_loc(6)+zdab(ii)*fz -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,444) -+ -+c sum contributions to potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engbnd -+ buffer(2)=virbnd -+ buffer(3)=bnd_fre -+ buffer(4)=bnd_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engbnd=buffer(1) -+ virbnd=buffer(2) -+ bnd_fre=buffer(3) -+ bnd_vir=buffer(4) -+ -+ if(lsolva)then -+ -+ call gdsum(bnd_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(bnd_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ deallocate (xdab,ydab,zdab,stat=fail) -+ -+ return -+ end subroutine bndfrc -+ -+ end module bonds_module -diff -urN dl_class_1.9.orig/srcmod/comms.inc dl_class_1.9/srcmod/comms.inc ---- dl_class_1.9.orig/srcmod/comms.inc 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/comms.inc 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,42 @@ -+c********************************************************************* -+c -+c dl_poly include file for MPI, PVM and SHMEM -+c copyright - daresbury laboratory -+c -+c********************************************************************* -+ -+CMPIU define mpipriv mpipriv_ -+ -+ include "mpif.h" -+ -+c parameters for message tags -+ -+ integer Xgcopy_tag, Merge1_tag -+ integer Dgsum_tag1, Dgsum_tag2 -+ integer Igmax_tag1, Igmax_tag2 -+ integer Igsum_tag1, Igsum_tag2 -+ integer Shmove_tag, Merge_tag -+ integer Merge4_tag, Shell_tag -+ integer Gstate_tag1, Gstate_tag2 -+ integer Passcon_tag, Msgtag -+ -+c MPI tagsizes -+ -+ parameter( -+ $ Xgcopy_tag = 105, -+ $ Dgsum_tag1 = 6001, -+ $ Dgsum_tag2 = 9001, -+ $ Igsum_tag1 = 12001, -+ $ Igsum_tag2 = 15001, -+ $ Shmove_tag = 18001, -+ $ Merge_tag = 6001, -+ $ Merge1_tag = 9001, -+ $ Merge4_tag = 12001, -+ $ Gstate_tag1 = 15001, -+ $ Gstate_tag2 = 18001, -+ $ Shell_tag = 21001, -+ $ Passcon_tag = 3001, -+ $ Igmax_tag1 = 24001, -+ $ Igmax_tag2 = 27001, -+ $ Msgtag = 30000) -+ -diff -urN dl_class_1.9.orig/srcmod/config_module.f dl_class_1.9/srcmod/config_module.f ---- dl_class_1.9.orig/srcmod/config_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/config_module.f 2015-11-09 14:15:45.054258793 +0100 -@@ -0,0 +1,103 @@ -+ module config_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining simulation configuration data -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ character*1 cfgname(80) -+ character*1 sysname(80) -+ real(8) cell(9),rcell(9),celprp(10) -+ real(8) eta(9),stress(9),stresl(9),strcns(9),strbod(9) -+ -+ character*8, allocatable :: atmnam(:) -+ real(8), allocatable :: xxx(:),yyy(:),zzz(:) -+ real(8), allocatable :: vxx(:),vyy(:),vzz(:) -+ real(8), allocatable :: fxx(:),fyy(:),fzz(:) -+ real(8), allocatable :: flx(:),fly(:),flz(:) -+ real(8), allocatable :: chge(:),weight(:),rmass(:) -+ integer, allocatable :: ltype(:),lstfrz(:) -+ integer, allocatable :: neulst(:),lstneu(:) -+ integer, allocatable :: lentry(:),list(:,:) -+ integer, allocatable :: lstout(:),link(:) -+ integer, allocatable :: lct(:),lst(:) -+ -+ real(8), allocatable :: buffer(:) -+ -+c PLUMED variables -+ logical, save :: lplumed -+c PLUMED variables -+ -+ save atmnam,neulst,lstneu,cfgname,sysname -+ save cell,xxx,yyy,zzz,vxx,vyy,vzz,fxx,fyy,fzz -+ save buffer,weight,chge,ltype,lstfrz,flx,fly,flz -+ save lentry,list,lstout,link,lct,lst,celprp,rmass -+ save eta,stress,stresl,strcns,rcell -+ -+ contains -+ -+ subroutine alloc_config_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining simulation configuration arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ integer, parameter :: nnn=27 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (xxx(mxatms),stat=fail(1)) -+ allocate (yyy(mxatms),stat=fail(2)) -+ allocate (zzz(mxatms),stat=fail(3)) -+ allocate (vxx(mxatms),stat=fail(4)) -+ allocate (vyy(mxatms),stat=fail(5)) -+ allocate (vzz(mxatms),stat=fail(6)) -+ allocate (fxx(mxatms),stat=fail(7)) -+ allocate (fyy(mxatms),stat=fail(8)) -+ allocate (fzz(mxatms),stat=fail(9)) -+ allocate (weight(mxatms),stat=fail(11)) -+ allocate (chge(mxatms),stat=fail(12)) -+ allocate (ltype(mxatms),stat=fail(13)) -+ allocate (lstfrz(mxatms),stat=fail(14)) -+ allocate (flx(mxatms),stat=fail(15)) -+ allocate (fly(mxatms),stat=fail(16)) -+ allocate (flz(mxatms),stat=fail(17)) -+ allocate (atmnam(mxatms),stat=fail(18)) -+ allocate (neulst(mxneut),stat=fail(19)) -+ allocate (lstneu(mxatms),stat=fail(20)) -+ allocate (lstout(mxatms),stat=fail(21)) -+ allocate (lentry(msatms),stat=fail(22)) -+ allocate (list(msatms,mxlist),stat=fail(23)) -+ allocate (link(mxatms),stat=fail(24)) -+ allocate (lct(mxcell),stat=fail(25)) -+ allocate (lst(mxcell),stat=fail(26)) -+ allocate (rmass(mxatms),stat=fail(27)) -+ allocate (buffer(mxbuff),stat=fail(10)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)then -+ if(idnode.eq.0)write(nrite,'(10i5)')fail -+ call error(idnode,1000) -+ endif -+ enddo -+ -+ end subroutine alloc_config_arrays -+ -+ end module config_module -diff -urN dl_class_1.9.orig/srcmod/config_module.f.preplumed dl_class_1.9/srcmod/config_module.f.preplumed ---- dl_class_1.9.orig/srcmod/config_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/config_module.f.preplumed 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,99 @@ -+ module config_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining simulation configuration data -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ character*1 cfgname(80) -+ character*1 sysname(80) -+ real(8) cell(9),rcell(9),celprp(10) -+ real(8) eta(9),stress(9),stresl(9),strcns(9),strbod(9) -+ -+ character*8, allocatable :: atmnam(:) -+ real(8), allocatable :: xxx(:),yyy(:),zzz(:) -+ real(8), allocatable :: vxx(:),vyy(:),vzz(:) -+ real(8), allocatable :: fxx(:),fyy(:),fzz(:) -+ real(8), allocatable :: flx(:),fly(:),flz(:) -+ real(8), allocatable :: chge(:),weight(:),rmass(:) -+ integer, allocatable :: ltype(:),lstfrz(:) -+ integer, allocatable :: neulst(:),lstneu(:) -+ integer, allocatable :: lentry(:),list(:,:) -+ integer, allocatable :: lstout(:),link(:) -+ integer, allocatable :: lct(:),lst(:) -+ -+ real(8), allocatable :: buffer(:) -+ -+ save atmnam,neulst,lstneu,cfgname,sysname -+ save cell,xxx,yyy,zzz,vxx,vyy,vzz,fxx,fyy,fzz -+ save buffer,weight,chge,ltype,lstfrz,flx,fly,flz -+ save lentry,list,lstout,link,lct,lst,celprp,rmass -+ save eta,stress,stresl,strcns,rcell -+ -+ contains -+ -+ subroutine alloc_config_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining simulation configuration arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ integer, parameter :: nnn=27 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (xxx(mxatms),stat=fail(1)) -+ allocate (yyy(mxatms),stat=fail(2)) -+ allocate (zzz(mxatms),stat=fail(3)) -+ allocate (vxx(mxatms),stat=fail(4)) -+ allocate (vyy(mxatms),stat=fail(5)) -+ allocate (vzz(mxatms),stat=fail(6)) -+ allocate (fxx(mxatms),stat=fail(7)) -+ allocate (fyy(mxatms),stat=fail(8)) -+ allocate (fzz(mxatms),stat=fail(9)) -+ allocate (weight(mxatms),stat=fail(11)) -+ allocate (chge(mxatms),stat=fail(12)) -+ allocate (ltype(mxatms),stat=fail(13)) -+ allocate (lstfrz(mxatms),stat=fail(14)) -+ allocate (flx(mxatms),stat=fail(15)) -+ allocate (fly(mxatms),stat=fail(16)) -+ allocate (flz(mxatms),stat=fail(17)) -+ allocate (atmnam(mxatms),stat=fail(18)) -+ allocate (neulst(mxneut),stat=fail(19)) -+ allocate (lstneu(mxatms),stat=fail(20)) -+ allocate (lstout(mxatms),stat=fail(21)) -+ allocate (lentry(msatms),stat=fail(22)) -+ allocate (list(msatms,mxlist),stat=fail(23)) -+ allocate (link(mxatms),stat=fail(24)) -+ allocate (lct(mxcell),stat=fail(25)) -+ allocate (lst(mxcell),stat=fail(26)) -+ allocate (rmass(mxatms),stat=fail(27)) -+ allocate (buffer(mxbuff),stat=fail(10)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)then -+ if(idnode.eq.0)write(nrite,'(10i5)')fail -+ call error(idnode,1000) -+ endif -+ enddo -+ -+ end subroutine alloc_config_arrays -+ -+ end module config_module -diff -urN dl_class_1.9.orig/srcmod/core_shell_module.f dl_class_1.9/srcmod/core_shell_module.f ---- dl_class_1.9.orig/srcmod/core_shell_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/core_shell_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,826 @@ -+ module core_shell_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining core_shell arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use pair_module -+ use parse_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use site_module -+ use solvation_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmshl(:,:) -+ integer, allocatable :: listshl(:,:) -+ integer, allocatable :: numshl(:),lstshl(:,:) -+ -+ save prmshl,listshl,numshl,lstshl -+ -+ contains -+ -+ subroutine alloc_csh_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining core_shell arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(4) -+ -+ do i=1,4 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmshl(mxtshl,2),stat=fail(1)) -+ allocate (numshl(mxtmls),stat=fail(2)) -+ allocate (lstshl(mxtshl,2),stat=fail(3)) -+ allocate (listshl(mxshl,3),stat=fail(4)) -+ -+ do i=1,4 -+ if(fail(i).gt.0)call error(idnode,1100) -+ enddo -+ -+ do i=1,mxtmls -+ numshl(i)=0 -+ enddo -+ -+ end subroutine alloc_csh_arrays -+ -+ subroutine define_core_shell -+ x (safe,idnode,itmols,nshels,nsite,keyshl,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining core-shell units -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ logical safe -+ integer idnode,itmols,nshels,nsite,ntmp,ishls -+ integer iatm1,iatm2,isite1,isite2,keyshl,kshl,idum -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numshl(itmols)=numshl(itmols)+ntmp -+ kshl=intstr(record,lenrec,idum) -+ if(keyshl.eq.0)then -+ keyshl=kshl -+ elseif(kshl.ne.keyshl)then -+ call error(idnode,1960) -+ endif -+ if(idnode.eq.0) then -+ -+ write(nrite, -+ x "(/,1x,'number of core-shell units',5x,i10)") -+ x ntmp -+ if(keyshl.eq.1)then -+ -+ write(nrite, -+ x "(/,/,1x,'core-shell details:',/,/,21x, -+ x 5x,'index',5x,'index',6x,'parameter')") -+ -+ else -+ -+ write(nrite, -+ x "(/,/,1x,'core-shell details:',/,/,21x, -+ x 6x,'core',5x,'shell',6x,'parameter')") -+ -+ endif -+ -+ endif -+ -+ do ishls=1,numshl(itmols) -+ -+ nshels=nshels+1 -+ if(nshels.gt.mxtshl) call error(idnode,57) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ lstshl(nshels,1)=iatm1 -+ lstshl(nshels,2)=iatm2 -+ prmshl(nshels,1)=dblstr(record,lenrec,idum) -+ prmshl(nshels,2)=dblstr(record,lenrec,idum) -+ if(idnode.eq.0) write(nrite, -+ x "(21x,2i10,2f15.4)") -+ x lstshl(nshels,1),lstshl(nshels,2), -+ x prmshl(nshels,1),prmshl(nshels,2) -+ -+c test for frozen cores or shells -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ if(lfzsit(isite1)*lfzsit(isite2).ne.0) -+ x call error(idnode,49) -+ -+c convert energy units to internal units -+ -+ prmshl(nshels,1)=prmshl(nshels,1)*engunit -+ prmshl(nshels,2)=prmshl(nshels,2)*engunit -+ -+ enddo -+ -+ return -+ end subroutine define_core_shell -+ -+ subroutine corshl(idnode,mxnode,ntshl,shlke) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating the internal kinetic -+c energy of core-shell units in the shell polarisation model -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith july 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m -+ real(8) shlke,ppp,ccc,sss -+ -+ shlke=0.d0 -+ -+c block indices -+ -+ ishl1=(idnode*ntshl)/mxnode+1 -+ ishl2=((idnode+1)*ntshl)/mxnode -+ -+c loop over all specified core-shell pairs -+ -+ m=0 -+ -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c indices of atoms involved -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+c calculate atom translational kinetic energy -+ -+ ppp=((weight(i)*vxx(i)+weight(j)*vxx(j))**2 -+ x +(weight(i)*vyy(i)+weight(j)*vyy(j))**2 -+ x +(weight(i)*vzz(i)+weight(j)*vzz(j))**2) -+ x /(weight(i)+weight(j)) -+ -+c calculate individual core and shell kinetic energies -+ -+ ccc=weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ sss=weight(j)*(vxx(j)**2+vyy(j)**2+vzz(j)**2) -+ -+c calculate core-shell internal kinetic energy -+ -+ shlke=shlke+0.5d0*(ccc+sss-ppp) -+ -+ enddo -+ -+c global average of core-shell internal kinetic energy -+ -+ if(mxnode.gt.1)then -+ buffer(1)=shlke -+ call gdsum(buffer(1),1,buffer(2)) -+ shlke=buffer(1) -+ endif -+ -+ return -+ end subroutine corshl -+ -+ subroutine put_shells_on_cores(idnode,mxnode,ntshl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for placing shells on top of cores in the -+c shell model at the start of a simulation -+c -+c copyright - daresbury laboratory -+c author - w. smith feb 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, allocatable :: ltop(:) -+ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m,fail -+ -+c allocate ltop array -+ -+ allocate(ltop(ntshl),stat=fail) -+ -+c block indices -+ -+ ishl1=(idnode*ntshl)/mxnode+1 -+ ishl2=((idnode+1)*ntshl)/mxnode -+ -+c zero ltop array -+ -+ do i=1,ntshl -+ ltop(i)=0 -+ enddo -+ -+c loop over all specified core-shell pairs -+ -+ m=0 -+ -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c indices of atoms involved -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+c set shell and core positions equal -+ -+ ltop(m)=j -+ xxx(j)=xxx(i) -+ yyy(j)=yyy(i) -+ zzz(j)=zzz(i) -+ -+ enddo -+ -+c merge data on different processors -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,ntshl,ltop,xxx,yyy,zzz,buffer) -+ -+c deallocate ltop array -+ -+ deallocate(ltop,stat=fail) -+ -+ return -+ end subroutine put_shells_on_cores -+ -+ subroutine shlfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntshl,engshl,virshl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating shell model spring energy and -+c force terms in molecular dynamics. -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith july 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lexcite,lselect -+ integer idnode,imcon,mxnode,ntshl,ishl1,ishl2,i,j,k,m,kk -+ real(8) engshl,virshl,rij2,omega,gamma,ffx,ffy,ffz,strs -+ -+ dimension strs(6) -+ -+c check adequate workspace is available -+ -+ if(mxxdf.lt.mxshl)call error(idnode,423) -+ -+c block indices -+ -+ ishl1=(idnode*ntshl)/mxnode+1 -+ ishl2=((idnode+1)*ntshl)/mxnode -+ -+c initialise accumulators -+ -+ engshl=0.d0 -+ virshl=0.d0 -+ shl_fre=0.d0 -+ shl_vir=0.d0 -+ -+ do i=1,6 -+ strs(i)=0.d0 -+ enddo -+ -+ if(lsolva)then -+ -+ lcomp(5)=.true. -+ shl_sol(:)=0.d0 -+ if(lexcite)shl_exc(:)=0.d0 -+ -+ endif -+ -+c calculate core-shell separation vectors -+ -+ m=0 -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c indices of core and shell -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+c components of bond vector -+ -+ xdf(m)=xxx(i)-xxx(j) -+ ydf(m)=yyy(i)-yyy(j) -+ zdf(m)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,m,cell,xdf,ydf,zdf) -+ -+c loop over all specified core-shell units -+ -+ m=0 -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c index of potential parameters -+ -+ kk=listshl(m,1) -+ -+c core-shell separation -+ -+ rij2=xdf(m)**2+ydf(m)**2+zdf(m)**2 -+ -+c calculate scalar constant terms -+ -+ omega=(0.5d0*prmshl(kk,1)+0.25d0*prmshl(kk,2)*rij2)*rij2 -+ gamma=prmshl(kk,1)+prmshl(kk,2)*rij2 -+ -+c indices of core and shell -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+c set selection control -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(i).ne.1).and.(atm_fre(j).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(i)+atm_fre(i).eq.0) -+ -+ if(lsolva)then -+ shl_exc(atmolt(i))=shl_exc(atmolt(i))+omega -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(i).eq.1).or.(atm_fre(j).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ shl_fre=shl_fre-omega -+ shl_vir=shl_vir-gamma*rij2 -+ omega=lambda1*omega -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(i).eq.2).or.(atm_fre(j).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ shl_fre=shl_fre+omega -+ shl_vir=shl_vir+gamma*rij2 -+ omega=lambda2*omega -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate spring energy and virial -+ -+ engshl=engshl+omega -+ virshl=virshl+gamma*rij2 -+ -+ if(lsolva)then -+ shl_sol(atmolt(i))=shl_sol(atmolt(i))+omega -+ endif -+ -+c calculate spring forces -+ -+ ffx=-gamma*xdf(m) -+ ffy=-gamma*ydf(m) -+ ffz=-gamma*zdf(m) -+ -+ fxx(i)=fxx(i)+ffx -+ fyy(i)=fyy(i)+ffy -+ fzz(i)=fzz(i)+ffz -+ -+ fxx(j)=fxx(j)-ffx -+ fyy(j)=fyy(j)-ffy -+ fzz(j)=fzz(j)-ffz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*ffx -+ strs(2)=strs(2)+xdf(m)*ffy -+ strs(3)=strs(3)+xdf(m)*ffz -+ strs(4)=strs(4)+ydf(m)*ffy -+ strs(5)=strs(5)+ydf(m)*ffz -+ strs(6)=strs(6)+zdf(m)*ffz -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+c sum contributions to potential and virial -+ -+ if(mxnode.gt.1) then -+ -+ buffer(1)=engshl -+ buffer(2)=virshl -+ buffer(3)=shl_fre -+ buffer(4)=shl_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engshl=buffer(1) -+ virshl=buffer(2) -+ shl_fre=buffer(3) -+ shl_vir=buffer(4) -+ -+c sum up solvation energies -+ -+ if(lsolva)then -+ -+ call gdsum(shl_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(shl_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine shlfrc -+ -+ subroutine check_shells(idnode,itmols,nshels,ngrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to check no core-shell units are in -+c rigid bodies -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,itmols,nshels,ngrp,k1,ia,ib,kk -+ integer id,jj,ia1,jk,ib1 -+ -+ nshels=nshels-numshl(itmols) -+ do k1=1,numshl(itmols) -+ -+ nshels=nshels+1 -+ ia=lstshl(nshels,1) -+ ib=lstshl(nshels,2) -+ -+ ngrp=ngrp-numgrp(itmols) -+ -+ do kk=1,numgrp(itmols) -+ -+ ngrp=ngrp+1 -+ id=listyp(ngrp) -+ -+ do jj=1,numgsit(id)-1 -+ -+ ia1=lstgst(ngrp,jj) -+ if(ia1.eq.ia) then -+ -+ do jk=jj,numgsit(id) -+ -+ ib1=lstgst(ngrp,jk) -+ if(ib1.eq.ib) then -+ -+ if(idnode.eq.0)write(nrite,'(/,13x,a,2i10)') -+ x 'error: sites ',ia,ib -+ call error(idnode,456) -+ -+ endif -+ -+ enddo -+ -+ elseif(ia1.eq.ib) then -+ -+ do jk=jj,numgsit(id) -+ -+ ib1=lstgst(ngrp,jk) -+ if(ib1.eq.ia) then -+ -+ if(idnode.eq.0)write(nrite,'(/,13x,a,2i10)') -+ x 'error: sites ',ia,ib -+ call error(idnode,456) -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ enddo -+ enddo -+ -+ return -+ end subroutine check_shells -+ -+ subroutine relax_shells -+ x (relaxed,keyrlx,idnode,mxnode,natms,ntpmls,tstep,rlxtol) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for relaxing shells to zero force -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical relaxed,newjob -+ integer keyrlx,idnode,mxnode,natms,i,j,itmols,imols -+ integer iatm1,iatm2,fail,numopt,isite,ishls,jshls,lshls,ntpmls -+ integer nbuff -+ real(8) hnorm,grad0,grad1,grad2,stride,tstep,step -+ real(8) ggg,gam2,sgn,rlxtol -+ -+ dimension fail(4) -+ -+ integer, allocatable :: lstopt(:) -+ real(8), allocatable :: ggx(:),ggy(:),ggz(:) -+ real(8), allocatable :: hhx(:),hhy(:),hhz(:) -+ real(8), allocatable :: oxx(:),oyy(:),ozz(:) -+ -+ save hnorm,grad0,grad1,grad2,stride,lstopt -+ save ggx,ggy,ggz,hhx,hhy,hhz,oxx,oyy,ozz,numopt,nbuff,sgn -+ -+ data newjob/.true./,fail/0,0,0,0/ -+ -+c define initial data -+ -+ if(newjob)then -+ -+ newjob=.false. -+ allocate(lstopt(mxatms),stat=fail(1)) -+ allocate(ggx(mxatms),ggy(mxatms),ggz(mxatms),stat=fail(2)) -+ allocate(hhx(mxatms),hhy(mxatms),hhz(mxatms),stat=fail(3)) -+ allocate(oxx(mxatms),oyy(mxatms),ozz(mxatms),stat=fail(4)) -+ do i=1,4 -+ if(fail(i).ne.0)call error(idnode,1970) -+ enddo -+ -+c identify the shells -+ -+ isite=0 -+ ishls=0 -+ jshls=0 -+ do i=1,natms -+ -+ lstopt(i)=0 -+ -+ enddo -+ do itmols=1,ntpmls -+ -+ do imols=1,nummols(itmols) -+ -+ do lshls=1,numshl(itmols) -+ -+ ishls=ishls+1 -+ lstopt(lstshl(lshls+jshls,2)+isite)=1 -+ -+ enddo -+ -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ jshls=jshls+numshl(itmols) -+ -+ enddo -+ -+ numopt=ishls -+ -+ endif -+ -+c load coordinates of shells -+ -+ j=0 -+ do i=1,natms -+ -+ if(lstopt(i).gt.0)then -+ -+ j=j+1 -+ oxx(j)=xxx(i) -+ oyy(j)=yyy(i) -+ ozz(j)=zzz(i) -+ ggx(j)=fxx(i) -+ ggy(j)=fyy(i) -+ ggz(j)=fzz(i) -+ -+ endif -+ -+ enddo -+ -+c step length for relaxation -+ -+ step=tstep**2 -+ -+c define atoms for this nodes -+ -+ iatm1=(idnode*numopt)/mxnode+1 -+ iatm2=((idnode+1)*numopt)/mxnode -+ -+ ggg=0.d0 -+ do i=iatm1,iatm2 -+ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 -+ enddo -+ if(mxnode.gt.1)then -+ buffer(1)=ggg -+ call gdsum(buffer(1),1,buffer(2)) -+ ggg=buffer(1) -+ endif -+ ggg=sqrt(ggg) -+ -+c check convergence -+ -+ if(abs(ggg)/dble(numopt).lt.rlxtol)then -+ -+ relaxed=.true. -+ return -+ -+ endif -+ -+ if(keyrlx.eq.0) then -+ -+c set original search direction -+ -+ hnorm=ggg -+ grad0=ggg -+ grad2=ggg -+ do i=iatm1,iatm2 -+ -+ hhx(i)=ggx(i) -+ hhy(i)=ggy(i) -+ hhz(i)=ggz(i) -+ oxx(i)=oxx(i)+step*hhx(i) -+ oyy(i)=oyy(i)+step*hhy(i) -+ ozz(i)=ozz(i)+step*hhz(i) -+ -+ enddo -+ keyrlx=1 -+ sgn=1.d0 -+ -+ elseif(keyrlx.eq.1)then -+ -+c line search along chosen direction -+ -+ grad1=grad2 -+ grad2=0.d0 -+ do i=iatm1,iatm2 -+ grad2=grad2+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) -+ enddo -+ if(mxnode.gt.1)then -+ buffer(1)=grad2 -+ call gdsum(buffer(1),1,buffer(2)) -+ grad2=buffer(1) -+ endif -+ grad2=sgn*grad2/hnorm -+ -+c linear extrapolation to minimum -+ -+ stride=sgn*step -+ if(grad2.lt.0.d0)then -+ -+ keyrlx=2 -+ stride=sgn*step*grad2/(grad1-grad2) -+ -+ endif -+ -+ do i=iatm1,iatm2 -+ -+ oxx(i)=oxx(i)+stride*hhx(i) -+ oyy(i)=oyy(i)+stride*hhy(i) -+ ozz(i)=ozz(i)+stride*hhz(i) -+ -+ enddo -+ -+ elseif(keyrlx.eq.2)then -+ -+c construct conjugate search vector -+ -+ gam2=(ggg/grad0)**2 -+ hnorm=0.d0 -+ grad0=ggg -+ grad2=0.d0 -+ do i=iatm1,iatm2 -+ -+ hhx(i)=ggx(i)+gam2*hhx(i) -+ hhy(i)=ggy(i)+gam2*hhy(i) -+ hhz(i)=ggz(i)+gam2*hhz(i) -+ hnorm=hnorm+hhx(i)**2+hhy(i)**2+hhz(i)**2 -+ grad2=grad2+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) -+ -+ enddo -+ if(mxnode.gt.1)then -+ -+ buffer(1)=hnorm -+ buffer(2)=grad2 -+ call gdsum(buffer(1),2,buffer(3)) -+ hnorm=buffer(1) -+ grad2=buffer(2) -+ -+ endif -+ hnorm=sqrt(hnorm) -+ grad2=grad2/hnorm -+ sgn=sign(1.d0,grad2) -+ grad2=sgn*grad2 -+ -+ do i=iatm1,iatm2 -+ -+ oxx(i)=oxx(i)+sgn*step*hhx(i) -+ oyy(i)=oyy(i)+sgn*step*hhy(i) -+ ozz(i)=ozz(i)+sgn*step*hhz(i) -+ -+ enddo -+ -+ keyrlx=1 -+ -+ endif -+ -+c merge coordinate arrays -+ -+ if(mxnode.gt.1)then -+ -+ nbuff=6*(numopt+mxnode-1)/mxnode -+ call merge(idnode,mxnode,numopt,nbuff,oxx,oyy,ozz,buffer) -+ -+ endif -+ -+c unload coordinates of shells -+ -+ j=0 -+ do i=1,natms -+ -+ if(lstopt(i).gt.0)then -+ -+ j=j+1 -+ xxx(i)=oxx(j) -+ yyy(i)=oyy(j) -+ zzz(i)=ozz(j) -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine relax_shells -+ -+ end module core_shell_module -diff -urN dl_class_1.9.orig/srcmod/coulomb_module.f dl_class_1.9/srcmod/coulomb_module.f ---- dl_class_1.9.orig/srcmod/coulomb_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/coulomb_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1542 @@ -+ module coulomb_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining coulomb terms -+c copyright - daresbury laboratory -+c -+c author - w. smith sep 2003 -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ewald_module -+ use metafreeze_module -+ use pair_module -+ use property_module -+ use setup_module -+ use solvation_module -+ -+ implicit none -+ -+ contains -+ -+ subroutine coul0 -+ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic force. -+c 1/r potential, no truncation or damping -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester february 1993 -+c stress tensor - t.forester may 1994 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,kkk -+ real(8) rcsq,chgea,rsq,chgprd,rrr,coul,fcoul,fi,fx,fy,fz -+ real(8) engcpe,vircpe,rcut,epsq,strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ chgea=chge(iatm)/epsq*r4pie0 -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ -+c coulomb potential and force -+ -+ coul=chgprd/rrr -+ fcoul=coul/rsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+coul -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-coul -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate forces -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-coul -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul0 -+ -+ subroutine coul1 -+ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces -+c assuming a standard coulomb potential truncated at rcut -+c and shifted to zero at rcut. -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith december 1992. -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c stress tensor t.forester may 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,kkk -+ real(8) engcpe,vircpe,rcut,epsq,rcsq,chgea,rsq -+ real(8) fi,chgprd,omega,egamma,fx,fy,fz,rrr -+ real(8) strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+ chgea=chge(iatm)*r4pie0/epsq -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+c start of primary loop for forces evaluation -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10) then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ -+c calculate potential energy and virial -+ -+ omega=chgprd*(rcut-rrr)/(rrr*rcut) -+ egamma=chgprd/(rrr*rsq) -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+omega -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-omega -+ cou_vir=cou_vir+egamma*rsq -+ omega=lambda1*omega -+ egamma=lambda1*egamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+omega -+ cou_vir=cou_vir-egamma*rsq -+ omega=lambda2*omega -+ egamma=lambda2*egamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engcpe=engcpe+omega -+ vircpe=vircpe-egamma*rsq -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+omega -+ -+c calculate forces -+ -+ fx=egamma*xdf(m) -+ fy=egamma*ydf(m) -+ fz=egamma*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc-egamma*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul1 -+ -+ subroutine coul2 -+ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces -+c assuming a distance dependant dielectric `constant'. -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester april 1993 -+c stress tensor added - t.forester may 1994 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,kkk -+ real(8) engcpe,vircpe,rcut,epsq -+ real(8) fi,rcsq,chgea,chgprd,rsq,rrsq,coul,egamma,fx,fy,fz -+ real(8) strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+ chgea=chge(iatm)/epsq*r4pie0 -+ if(abs(chgea).gt.1.d-10)then -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+c calculate potential energy and Virial -+ -+ rrsq=1.d0/rsq -+ coul=chgprd*rrsq -+ egamma=2.d0*coul*rrsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+2.d0*coul -+ coul=lambda1*coul -+ egamma=lambda1*egamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-2.d0*coul -+ coul=lambda2*coul -+ egamma=lambda2*egamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and Virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-2.d0*coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate forces -+ -+ fx=egamma*xdf(m) -+ fy=egamma*ydf(m) -+ fz=egamma*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-2.d0*coul -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul2 -+ -+ subroutine coul3 -+ x (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic force. -+c reaction field potential -+c Ref: M Neumann, J Chem Phys, 82, 5633, (1985) -+c adapted for fennell-gezelter coulombic model -+c by w.smith june 2007 -+c Ref: CJ Fennell and JD Gezelter, J Chem Phys, -+c 124, 234104, (2006) -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1995 -+c author - t. forester february 1995 -+c stress tensor - t.forester feb 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,l,kkk -+ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,fi,rcsq -+ real(8) b0,rfld0,rfld1,rfld2,chgea,chgprd,rsq,coul,omega -+ real(8) fx,fy,fz,fcoul,rrr,vk0,vk1,vk2,gk0,gk1,gk2,t1,t2 -+ real(8) strs(6),strs_loc(6) -+ dimension fi(3) -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c reaction field terms -+ -+ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) -+ rfld0=b0/rcut**3 -+ rfld1=(1.d0+b0*0.5d0)/rcut -+ rfld2=rfld0*0.5d0 -+ -+c screened coulomb terms -+ -+ vcon=erc(mxegrd-4)+rfld2*rcut**2-rfld1 -+ fcon=rcut*fer(mxegrd-4)-rfld0*rcut -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ rdr=dble(mxegrd-4)/rcut -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ chgea=chge(iatm)*r4pie0 -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ -+c calculate potential energy using 3-point interpolation -+ -+ vk0=erc(l) -+ vk1=erc(l+1) -+ vk2=erc(l+2) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ omega=t1+(t2-t1)*ppp*0.5d0-vcon+fcon*(rrr-rcut) -+ coul=chgprd*(omega+rfld2*rsq-rfld1) -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=fer(l) -+ gk1=fer(l+1) -+ gk2=fer(l+2) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ fcoul=chgprd*((t1+(t2-t1)*ppp*0.5d0)-fcon/rrr-rfld0) -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+fcoul*rsq -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-fcoul*rsq -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate coulombic energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-fcoul*rsq -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate coulombic force -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-fcoul*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul3 -+ -+ subroutine coul4 -+ X (lsolva,lfree,lghost,iatm,ik,engcpe,vircpe,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces -+c assuming a force shifted coulomb potential. -+c adapted for fennell-gezelter coulombic model -+c by w.smith may 2007 -+c Ref: CJ Fennell and JD Gezelter, J Chem Phys, -+c 124, 234104, (2006) -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1995 -+c author - t.forester october 1995 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,l,kkk -+ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,fi,rcsq,coul -+ real(8) strs9,chgea,chgprd,rsq,rrr,omega,fcoul,fx,fy,fz -+ real(8) vk0,vk1,vk2,gk0,gk1,gk2,t1,t2 -+ real(8) strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c screened coulomb terms -+ -+ vcon=erc(mxegrd-4) -+ fcon=rcut*fer(mxegrd-4) -+ rdr=dble(mxegrd-4)/rcut -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+ chgea=chge(iatm)*r4pie0/epsq -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+c start of primary loop for forces evaluation -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chgea*chge(jatm) -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+c apply truncation of potential -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ -+c calculate potential energy using 3-point interpolation -+ -+ vk0=erc(l) -+ vk1=erc(l+1) -+ vk2=erc(l+2) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ omega=t1+(t2-t1)*ppp*0.5d0 -+ coul=chgprd*(omega-vcon+fcon*(rrr-rcut)) -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=fer(l) -+ gk1=fer(l+1) -+ gk2=fer(l+2) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ fcoul=chgprd*((t1+(t2-t1)*ppp*0.5d0)-fcon/rrr) -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+fcoul*rsq -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-fcoul*rsq -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate the coulombic energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-fcoul*rsq -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate coulombic forces -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-fcoul*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine coul4 -+ -+ subroutine coul_nsq -+ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, -+ x engcpe,vircpe) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic potential and forces -+c for the all-pairs algorithm beyond the range of the normal cutoff -+c i.e. the 'tertiary' forces. frozen atom option included -+c -+c to be used with multiple_nsq -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w.smith august 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip -+ integer natms,idnode,mxnode,imcon,ibig,i,last,mpm2 -+ integer npm2,m,ii,j,idum,kkk -+ real(8) engcpe,epsq,rcut,vircpe,rsq,rrr,chgprd,fcoul,coul,rct2 -+ -+ lskip=(lfree.or.lghost) -+ -+c zero energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c zero force arrays -+ -+ do i=1,natms -+ -+ flx(i)=0.d0 -+ fly(i)=0.d0 -+ flz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stresl(i)=0.d0 -+ enddo -+ -+c zero solvation and excitation accumulators -+ -+ if(lsolva)then -+ -+ cou_sol_lng(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc_lng(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c set control variables -+ -+ last=natms -+ mpm2=natms/2 -+ npm2=(natms-1)/2 -+ -+c set cutoff radius -+ -+ rct2=rcut**2 -+ -+c outer loop over atoms -+ -+ do m=1,mpm2 -+ -+ if(m.gt.npm2)last=mpm2 -+ -+c inner loop over atoms -+ -+ ii=0 -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ if(lskip)then -+ if(atm_fre(i)*atm_fre(j).eq.2)cycle -+ endif -+ -+c calculate interatomic displacements -+ -+ ii=ii+1 -+ xdf(ii)=xxx(i)-xxx(j) -+ ydf(ii)=yyy(i)-yyy(j) -+ zdf(ii)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c apply minimum image convention -+ -+ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) -+ -+c calculate coulomb terms -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ if(lskip)then -+ if(atm_fre(i)*atm_fre(j).eq.2)cycle -+ endif -+ -+ ii=ii+1 -+ if(lstfrz(i).eq.0.or.lstfrz(j).eq.0)then -+ -+c reject frozen atoms and calculate interatomic distance -+ -+ rsq=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ -+c running check of neighbour list array capacity -+ -+ if(rsq.ge.rct2)then -+ -+ chgprd=chge(i)*chge(j)*r4pie0/epsq -+ rrr=sqrt(rsq) -+ -+c calculate potential energy and force -+ -+ coul=chgprd/rrr -+ fcoul=coul/rsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(i),atmolt(j)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(i).ne.1).and.(atm_fre(j).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(i)+atm_fre(j).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc_lng(kkk)=cou_exc_lng(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(i).eq.1).or.(atm_fre(j).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+coul -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(i).eq.2).or.(atm_fre(j).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-coul -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol_lng(kkk)=cou_sol_lng(kkk)+coul -+ -+c calculate forces -+ -+ flx(i)=flx(i)+fcoul*xdf(ii) -+ fly(i)=fly(i)+fcoul*ydf(ii) -+ flz(i)=flz(i)+fcoul*zdf(ii) -+ -+ flx(j)=flx(j)-fcoul*xdf(ii) -+ fly(j)=fly(j)-fcoul*ydf(ii) -+ flz(j)=flz(j)-fcoul*zdf(ii) -+ -+c stress tensor -+ -+ stresl(1)=stresl(1)+xdf(ii)*fcoul*xdf(ii) -+ stresl(2)=stresl(2)+xdf(ii)*fcoul*ydf(ii) -+ stresl(3)=stresl(3)+xdf(ii)*fcoul*zdf(ii) -+ stresl(5)=stresl(5)+ydf(ii)*fcoul*ydf(ii) -+ stresl(6)=stresl(6)+ydf(ii)*fcoul*zdf(ii) -+ stresl(9)=stresl(9)+zdf(ii)*fcoul*zdf(ii) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c complete stress tensor -+ -+ stresl(4)=stresl(2) -+ stresl(7)=stresl(3) -+ stresl(8)=stresl(6) -+ -+ return -+ end subroutine coul_nsq -+ -+ end module coulomb_module -diff -urN dl_class_1.9.orig/srcmod/define_system_module.f dl_class_1.9/srcmod/define_system_module.f ---- dl_class_1.9.orig/srcmod/define_system_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/define_system_module.f 2015-11-09 14:15:45.054258793 +0100 -@@ -0,0 +1,6004 @@ -+ module define_system_module -+ -+c*********************************************************************** -+c -+c dl_poly module for utility subroutines and functions -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - p.-a. cazade oct 2007, solvation, free energy -+c and excitation -+c adapted - d. quigley nov 2010, metadynamics -+c -+c*********************************************************************** -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use dihedral_module -+ use ensemble_tools_module -+ use error_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use inversion_module -+ use metafreeze_module -+ use metal_module -+ use parse_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use vdw_module -+ -+ contains -+ -+ subroutine simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading in the simulation control -+c parameters -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992. -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c modified -+c author - t.forester may 1993 -+c amended - t.forester sept 1994 - dl_poly_1.1 -+c amended - t.forester nov 1994 - macro version -+c amended - w.smith dec 1994 - t3d adaptation -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit,seek -+ character*1 hms -+ character*1 directive(lenrec) -+ logical lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,lpsoc -+ logical ltscal,lzeql,loptim,ltraj,lfcap,lgofr,lpgr,lpres,safe -+ logical lstep,ltemp,lcut,ldelr,lprim,lforc,lens,lvdw,lrvdw,kill -+ logical lnsq,lzden,lewald,lspme,lhke,loop,lzero,nolink,newgau -+ logical lminim,lminopt,ltad,lneb,lhit,lbpd,prechk,tadall,nebgo -+ integer idnode,intsta,istraj,keyens,keyfce,keyres,nstbpo,nsbzdn -+ integer keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,khit,nhit -+ integer nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,ntrack -+ integer idum,imcon,keyver,keytol,nblock,blkout,numgau -+ integer minstp,numneb,i,keybpd,mode,nsolva,isolva,nofic -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,rlxtol,opttol -+ real(8) eps,tol,fm,densvar,delrdf,delzdn,zlen,ehit,hyp_units -+ real(8) catchrad,sprneb,deltad,tlow,xhit,yhit,zhit,ebias,vmin -+ real(8) prntim -+ -+CSGIC real(8) dummy -+CCRAY real(8) dummy -+CFFTWc FFTW instruction codes -+CFFTW -+CFFTW integer FFTW_FORWARD,FFTW_BACKWARD -+CFFTW parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) -+CFFTW -+CFFTW integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL -+CFFTW parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) -+CFFTW -+CFFTW integer FFTW_ESTIMATE,FFTW_MEASURE -+CFFTW parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) -+CFFTW -+CFFTW integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM -+CFFTW parameter (FFTW_OUT_OF_PLACE=0) -+CFFTW parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) -+CFFTW -+CFFTW integer FFTW_THREADSAFE -+CFFTW parameter (FFTW_THREADSAFE=128) -+CFFTW -+ -+c intitialize system variables: temperature,pressure,ensemble key -+c force key, cutoff, primary cutoff, verlet shell width, relative -+c dielectric constant,timestep,temperature scaling flag, -+c temp scaling interval -+ -+ mode=0 -+ nhko=0 -+ nlatt=0 -+ nsteql=0 -+ nstrun=0 -+ minstp=0 -+ keybpd=0 -+ keyres=0 -+ keyens=0 -+ keyver=0 -+ taut=0.d0 -+ nstbts=0 -+ nstbgr=0 -+ nsbzdn=0 -+ nstbpo=100 -+ nstack=mxstak -+ intsta=0 -+ nstraj=0 -+ istraj=1 -+ keytrj=0 -+ numgau=1 -+ alpha=0.d0 -+ kmax1=0 -+ kmax2=0 -+ kmax3=0 -+ nospl=min(8,mxspl) -+ isolva=1 -+ nsolva=0 -+ niswitch=0 -+ nswitch=0 -+ nofic=1000 -+ -+ fmax=1000.d0 -+ keyfce=0 -+ multt=1 -+ keytol=0 -+ tstep=0.d0 -+ temp=0.d0 -+ press=0.d0 -+ rcut=0.d0 -+ rprim=0.d0 -+ rvdw=0.d0 -+ delr=0.d0 -+ epsq=1.d0 -+ rlxtol=1.d0 -+ opttol=1.d0 -+ tolnce=1.d-8 -+ quattol=1.d-8 -+ timjob=0.d0 -+ timcls=0.d0 -+ delrdf=0.d0 -+ delzdn=0.d0 -+ zlen=0.d0 -+ ehit=0.d0 -+ xhit=0.d0 -+ yhit=0.d0 -+ zhit=0.d0 -+ vmin=0.d0 -+ ebias=0.d0 -+ catchrad=0.d0 -+ pfree=0.d0 -+ -+ lhit=.false. -+ lbpd=.false. -+ ltad=.false. -+ lneb=.false. -+ loop=.true. -+ lnfic=.false. -+ lpsoc=.false. -+ lzero=.false. -+ ltscal=.false. -+ lewald=.false. -+ lspme=.false. -+ lhke=.false. -+ lgofr=.false. -+ lpgr=.false. -+ lzeql=.true. -+ loptim=.false. -+ lminim=.false. -+ lminopt=.false. -+ ltraj=.false. -+ lfcap=.false. -+ ltemp=.false. -+ lstep=.false. -+ lcut=.false. -+ ldelr=.false. -+ lprim=.false. -+ lforc=.false. -+ lens=.false. -+ lvdw=.false. -+ lrvdw=.false. -+ lpres=.false. -+ kill=.false. -+ lnsq=.false. -+ lzden=.false. -+ nolink=.false. -+ newgau=.false. -+ prechk=.false. -+ tadall=.false. -+ lsolva=.false. -+ lfree=.false. -+ lfrmas=.false. -+ lexcite=.false. -+ lswitch=.false. -+ lghost=.false. -+ nebgo=.true. -+ seek='all ' -+ -+c open the simulation input file -+ -+ if(idnode.eq.0)open(nread,file='CONTROL',status='old') -+ -+ -+c PlUMED defaults -+ lplumed=.false. -+c PLUMED defaults -+c read job title -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ -+ call copystring(record,sysname,80) -+ if(idnode.eq.0)then -+ -+ write(nrite,"(3(1x,120('*'),/),1x,15('*'),5x,80a1,5x,15('*'),/, -+ x 3(1x,120('*'),/),/,/,1x,'SIMULATION CONTROL PARAMETERS',/)") -+ x sysname -+ -+ endif -+ -+c read and process directives from CONTROL file -+ -+ do while(loop) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ -+c convert to lowercase and strip out leading blanks -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.' ')then -+ -+c record is commented out -+ cycle -+ -+ elseif(findstring('redirect',directive,idum))then -+ -+c ignore this option in this context -+ -+c PLUMED modifications -+ elseif(findstring('plumed',directive,idum))then -+ if(findstring('on',directive,idum)) lplumed=.true. -+ if(findstring('off',directive,idum)) lplumed=.false. -+c PLUMED modifications -+ cycle -+ -+ elseif(findstring('steps',directive,idum))then -+ -+c number of timesteps -+ -+ nstrun=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'selected number of timesteps',3x,i10)")nstrun -+ -+ elseif(findstring('integ',directive,idum))then -+ -+c choice of integration algorithm -+ -+ if(findstring('leapfrog',directive,idum))then -+ -+ keyver=0 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'leapfrog verlet integration selected')") -+ -+ elseif(findstring('velocity',directive,idum))then -+ -+ keyver=1 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'velocity verlet integration selected')") -+ -+ endif -+ -+ elseif(findstring('no fic',directive,idum))then -+ -+c cancel possible "flying ice cube" in Berendsen thermostats -+ -+ lnfic=.true. -+ nofic=intstr(directive,lenrec,idum) -+ -+ elseif(findstring('shells',directive,idum).and. -+ x findstring('on',directive,idum).and. -+ x findstring('cores',directive,idum))then -+ -+c put shells on cores at start - shell model only (else null) -+ -+ lpsoc=.true. -+ -+ elseif(findstring('densvar',directive,idum))then -+ -+c specify allowed density variation -+ -+ densvar=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'allowed density variation ',3x,1p,e12.4)") -+ x densvar -+ -+ elseif(findstring('no link',directive,idum))then -+ -+c switch off link cell option -+ -+ nolink=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'link cells option deactivated')") -+ -+ elseif(findstring('equil',directive,idum))then -+ -+c number of equilibration timesteps -+ -+ nsteql=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'equilibration period ',3x,i10)")nsteql -+ -+ elseif(findstring('restart',directive,idum))then -+ -+c restart control -+ -+ if(findstring('noscale',directive,idum))then -+ -+ keyres=3 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'noscale restart requested')") -+ -+ elseif(findstring('scale',directive,idum))then -+ -+ keyres=2 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'scaled restart requested')") -+ -+ else -+ -+ keyres=1 -+ if(idnode.eq.0)write(nrite,"(/,1x,'restart requested')") -+ -+ endif -+ -+ elseif(findstring('ensemble',directive,idum))then -+ -+c ensemble selection -+ -+ call ensemble_selection(directive,lens,kill,idnode,keyens, -+ x mode,taut,taup) -+ -+ elseif(findstring('regauss',directive,idum))then -+ -+c re-initialise velocities option (regaussing) -+ -+ newgau=.true. -+ numgau=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'regaussing option activated', -+ x /,1x,'regaussing interval set to ',3x,i10)") -+ x numgau -+ -+ elseif(findstring('scale',directive,idum))then -+ -+ nstbts=intstr(directive,lenrec,idum) -+ if(nstbts.gt.0)then -+ ltscal=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'temperature scaling on' -+ x /,1x,'temperature scaling interval',3x,i10)") -+ x nstbts -+ -+ endif -+ -+ elseif(findstring('rdf',directive,idum))then -+ -+ if(findstring('print',directive,idum))then -+ -+ lpgr=.true. -+ lpgr=(lgofr.and.lpgr) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'g(r) printing option on ')") -+ -+ else -+ -+ lgofr=.true. -+ nstbgr=intstr(directive,lenrec,idum) -+ delrdf=dblstr(directive,lenrec,idum) -+ if(nstbgr.eq.0)nstbgr=10 -+ if(delrdf.lt.1.d-8)delrdf=0.05d0 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'radial distribution functions on ', -+ x /,1x,'g(r) collection interval ',3x,i10)")nstbgr -+ write(nrite, -+ x "(1x,'g(r) bin width ',3x,1p,e12.4)") -+ x delrdf -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('zden',directive,idum))then -+ -+ lzden=.true. -+ nsbzdn=intstr(directive,lenrec,idum) -+ delzdn=dblstr(directive,lenrec,idum) -+ zlen=dblstr(directive,lenrec,idum) -+ if(nsbzdn.eq.0)nsbzdn=10 -+ if(delzdn.lt.1.d-8)then -+ zlen=0.1d0*dble(mxzdn) -+ delzdn=0.1d0 -+ elseif(zlen.lt.1.d-8)then -+ zlen=delzdn*dble(mxzdn) -+ endif -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'Z density profile requested', -+ x /,1x,'zdensity collection interval',3x,i10)")nsbzdn -+ write(nrite, -+ x "(1x,'zdensity bin width ',3x,1p,e12.4)") -+ x delzdn -+ write(nrite, -+ x "(1x,'zdensity range ',3x,1p,e12.4)") -+ x zlen -+ -+ endif -+ -+ elseif(findstring('collect',directive,idum))then -+ -+ lzeql=.false. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'equilibration included in overall averages')") -+ -+ elseif(findstring('neb',directive,idum))then -+ -+c activate nudged elastic band option -+ -+ call neb_option(directive,lneb,lminopt,idnode, -+ x numneb,keytol,sprneb,opttol,hyp_units) -+ -+ elseif(findstring('impact',directive,idum))then -+ -+c activate the impact option -+ -+ if(lhit)call error(idnode,516) -+ lhit=.true. -+ khit=intstr(directive,lenrec,idum) -+ nhit=intstr(directive,lenrec,idum) -+ ehit=dblstr(directive,lenrec,idum) -+ xhit=dblstr(directive,lenrec,idum) -+ yhit=dblstr(directive,lenrec,idum) -+ zhit=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,1x,'impact option selected')") -+ write(nrite,"( -+ x /,1x,'identity of impact atom ',i10, -+ x /,1x,'time step of impact ',i10, -+ x /,1x,'impact recoil energy (keV) ',1p,e12.4, -+ x /,1x,'impact direction (x component) ',1p,e12.4, -+ x /,1x,'impact direction (y component) ',1p,e12.4, -+ x /,1x,'impact direction (z component) ',1p,e12.4)") -+ x khit,nhit,ehit,xhit,yhit,zhit -+ -+ endif -+ -+c convert impact energy from keV to internal units -+ -+ ehit=ehit*9648530.821d0 -+ -+ elseif(findstring('bpd',directive,idum))then -+ -+c activate the BPD option -+ -+ call bpd_option(directive,seek,lbpd,ltad,lminopt,prechk, -+ x nebgo,keybpd,idnode,nblock,ntrack,keytol,ebias,vmin, -+ x catchrad,sprneb,opttol,hyp_units) -+ -+ elseif(findstring('tad',directive,idum))then -+ -+c activate temperature accelerated dynamics option -+ -+ call tad_option(directive,ltad,lbpd,lminopt,prechk,tadall, -+ x idnode,nblock,ntrack,blkout,keytol,catchrad,sprneb,tlow, -+ x deltad,opttol,hyp_units) -+ -+ elseif(findstring('minim',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ if(findstring('forc',directive,idum))keytol=0 -+ if(findstring('ener',directive,idum))keytol=1 -+ if(findstring('posi',directive,idum))keytol=2 -+ hyp_units=energy_unit() -+ minstp=intstr(directive,lenrec,idum) -+ opttol=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ lminim=.true. -+ loptim=.false. -+ lzero=.false. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'minimisation programme requested')") -+ write(nrite, -+ x "(1x,'structure minimisation interval ', -+ x 3x,i10)")minstp -+ call print_optim(keytol) -+ write(nrite, -+ x "(1x,'structure minimisation tolerance', -+ x 3x,1p,e12.4,1x,a8)")opttol,cunit -+ -+ endif -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ elseif(findstring('optim',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ if(findstring('forc',directive,idum))keytol=0 -+ if(findstring('ener',directive,idum))keytol=1 -+ if(findstring('posi',directive,idum))keytol=2 -+ hyp_units=energy_unit() -+ opttol=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ loptim=.true. -+ lminim=.false. -+ lzero=.false. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'structure optimisation requested')") -+ call print_optim(keytol) -+ write(nrite, -+ x "(1x,'tolerance for structure optimisation ', -+ x 3x,1p,e12.4,1x,a8)")opttol,cunit -+ -+ endif -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ elseif(findstring('zero',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ temp=1.d0 -+ lzero=.true. -+ loptim=.false. -+ lminim=.false. -+ ltemp=.true. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'zero K optimisation requested')") -+ write(nrite, -+ x "(' temperature reset to',1p,e12.4)")1.d0 -+ -+ endif -+ -+ else if(findstring('solva',directive,idum))then -+ -+ call solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+ else if(findstring('decomp',directive,idum))then -+ -+ call solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+ elseif(findstring('metafreeze',directive,idum).or. -+ x findstring('metadyn',directive,idum))then -+ -+c activate metadynamics option - d. quigley -+ -+ call metadyn_option -+ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, -+ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, -+ x locpe_scale,ref_W_aug,h_aug,wt_Dt) -+ -+ else if(findstring('free',directive,idum))then -+ -+ call free_energy_option(directive,lfree,lfrmas,idnode) -+ -+ else if(findstring('excite',directive,idum))then -+ -+ call excitation_option -+ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) -+ -+ else if(findstring('switch',directive,idum))then -+ -+ call switching_option -+ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) -+ -+ elseif(findstring('print',directive,idum))then -+ -+ nstbpo=intstr(directive,lenrec,idum) -+ nstbpo=max(nstbpo,1) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'data printing interval ',3x,i10)")nstbpo -+ -+ elseif(findstring('stack',directive,idum))then -+ -+ nstack=intstr(directive,lenrec,idum) -+ -+c reset stack limit if too large -+ -+ nstack=min(nstack,mxstak) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'data stacking interval ',3x,i10)")nstack -+ -+ elseif(findstring('stats',directive,idum))then -+ -+ intsta=intstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'statistics file interval ',3x,i10)")intsta -+ -+ elseif(findstring('traj',directive,idum))then -+ -+ ltraj=.true. -+ nstraj=intstr(directive,lenrec,idum) -+ istraj=max(intstr(directive,lenrec,idum),1) -+ keytrj=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'trajectory file option on ', -+ x /,1x,'trajectory file start ',3x,i10, -+ x /,1x,'trajectory file interval ',3x,i10 -+ x /,1x,'trajectory file info key ',3x,i10)") -+ x nstraj,istraj,keytrj -+ -+ elseif(findstring('ewald',directive,idum).or. -+ x findstring('spme',directive,idum).or. -+ x findstring('hke',directive,idum))then -+ -+c read Ewald or HK-Ewald or SPM-Ewald sum parameters -+ -+ call ewald_selection(directive,lhke,lspme,lewald,lcut, -+ x lforc,kill,idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2, -+ x kmax3,alpha,rcut) -+ -+ elseif(findstring('distan',directive,idum))then -+ -+ keyfce=4 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Distance dependent dielectric')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('coul',directive,idum))then -+ -+ keyfce=6 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Coulombic potential')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('shift',directive,idum))then -+ -+ keyfce=8 -+ alpha=0.d0 -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Shifted Coulombic potential')") -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(.not.lcut)then -+ call error(idnode,-435) -+ kill=.true. -+ else -+ -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(1x,'Specified precision parameter : ',1p, -+ x e12.4)")eps -+ write(nrite, -+ x "(1x,'Calculated damping parameter: ',1p, -+ x e12.4)")alpha -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('damp',directive,idum))then -+ -+ alpha=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(1x,'Specified damping parameter : ',1p,e12.4)") -+ x alpha -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('reaction',directive,idum))then -+ -+ keyfce=10 -+ alpha=0.d0 -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : reaction field')") -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(.not.lcut)then -+ call error(idnode,-435) -+ kill=.true. -+ else -+ -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(1x,'Specified precision parameter : ',1p, -+ x e12.4)")eps -+ write(nrite, -+ x "(1x,'Calculated damping parameter: ',1p, -+ x e12.4)")alpha -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('damp',directive,idum))then -+ -+ alpha=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(1x,'Specified damping parameter : ',1p,e12.4)") -+ x alpha -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('cap',directive,idum))then -+ -+ lfcap=.true. -+ fm=dblstr(directive,lenrec,idum) -+ if(fm.gt.0.d0)fmax=fm -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'force capping :',16x,1p,e12.4,' kT/A')")fmax -+ -+ elseif(findstring('no vdw',directive,idum))then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'short-range potential terms off')") -+ lvdw=.true. -+ -+ elseif(findstring('no elec',directive,idum))then -+ -+ keyfce=0 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'electrostatic potential terms off')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('mult',directive,idum))then -+ -+ multt=max(intstr(directive,lenrec,idum),1) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'multiple timestep interval ',3x,i10)")multt -+ -+ elseif(findstring('timestep',directive,idum))then -+ -+ lstep=.true. -+ tstep=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation timestep ',3x,1p,e12.4)")tstep -+ -+ elseif(findstring('temp',directive,idum))then -+ -+ ltemp=.true. -+ temp=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation temperature ',3x,1p,e12.4)")temp -+ -+ elseif(findstring('pres',directive,idum))then -+ -+ press=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation pressure (katm) ',3x,1p,e12.4)")press -+ -+c convert from katm to internal units of pressure -+ -+ press=press/prsunt -+ lpres=.true. -+ -+ elseif(findstring('prim',directive,idum))then -+ -+c primary cutoff -+ -+ lprim=.true. -+ rprim=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'primary neighbour cut off ',3x,1p,e12.4)")rprim -+ -+ elseif(findstring('rvdw',directive,idum))then -+ -+c cutoff for short range potentials -+ -+ rvdw=dblstr(directive,lenrec,idum) -+ lrvdw=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'real space cut off (vdw) ',3x,1p,e12.4)")rvdw -+ -+ elseif(findstring('delr',directive,idum))then -+ -+c Verlet shell width -+ -+ ldelr=.true. -+ delr=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'border width of Verlet shell',3x,1p,e12.4)")delr -+ -+ elseif(findstring('cut',directive,idum))then -+ -+c cutoff -+ -+ lcut=.true. -+ rcut=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'real space cut off ',3x,1p,e12.4)")rcut -+ -+ elseif(findstring('eps',directive,idum))then -+ -+c relative dielectric constant -+ -+ epsq=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'relative dielectric constant',3x,1p,e12.4)")epsq -+ -+ elseif(findstring('rlxtol',directive,idum))then -+ -+c force tolerance for shell relaxation -+ -+ rlxtol=max(rlxtol,dblstr(directive,lenrec,idum)) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for shell relaxn. ',3x,1p,e12.4)")rlxtol -+ -+ elseif(findstring('shake',directive,idum))then -+ -+c tolerance for shake -+ -+ tolnce=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for SHAKE ',3x,1p,e12.4)")tolnce -+ -+ elseif(findstring('quaternion',directive,idum))then -+ -+c tolerance for quaternion integration -+ -+ quattol=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for Quaternions ',3x,1p,e12.4)")quattol -+ -+ elseif(findstring('job time',directive,idum))then -+ -+c time for simulation (in seconds/minutes/hours/days or indefinite) -+ -+ if(findstring('indef',directive,idum))then -+ timjob=1.0d6*365.25d0*24.d0*60.d0*60.d0 -+ else -+ timjob=dblstr(directive,lenrec,idum) -+ if(findstring('m',directive,idum))then -+ timjob=6.0d1*timjob -+ elseif(findstring('h',directive,idum))then -+ timjob=3.6d3*timjob -+ elseif(findstring('d',directive,idum))then -+ timjob=8.64d4*timjob -+ endif -+ endif -+ -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'user allocated job time (',a1,') ',3x,f8.4)") -+ x hms,prntim -+ -+ elseif(findstring('close time',directive,idum))then -+ -+c time for winding up a job (in seconds) -+ -+ timcls=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'job closure time (s) ',3x,f8.3)")timcls -+ -+ elseif(findstring('all pairs',directive,idum))then -+ -+c full minimum image - N^2 interactions each timestep -+ -+ lnsq=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'All-pairs requested for electrostatics')") -+ -+ elseif(findstring('nospl',directive,idum))then -+ -+c set ewald_spme interpolation order -+ -+ nospl=intstr(directive,lenrec,idum) -+ -+ elseif(findstring('finish',directive,idum))then -+ -+c safe termination of reading CONTROL file -+ -+ loop=.false. -+ -+ else -+ -+c unrecognised directive in control file -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ enddo -+ -+c check on steps before temperature scaling -+ -+ if(nstbts.eq.0)nstbts=nstrun+1 -+ -+c conduct consistency checks on directives -+ -+ if(lminim)then -+ -+c ensure final configuration follows minimisation -+ -+ if(minstp.eq.0)minstp=nstrun -+ nstrun=minstp*(nstrun/minstp) -+ -+ endif -+ -+c check force activation options -+ -+ if(.not.lforc)then -+ -+c check if any forces are in operation -+ -+ if(.not.lvdw)then -+ -+ kill=.true. -+ call error(idnode,-383) -+ -+ endif -+ -+ else -+ -+c turn on short range forces -+ -+ if(lvdw)then -+ -+ if(keyfce.eq.0)then -+ -+ lcut=.true. -+ ldelr=.true. -+ -+ endif -+ -+ else -+ -+ keyfce=keyfce+1 -+ -+ endif -+ -+ endif -+ -+c if tad selected use only leap frog -+ -+ if(ltad.and.keyver.eq.1)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'switching to leapfrog for TAD dynamics')") -+ keyver=0 -+ -+ endif -+ -+c error checking -+ -+ if(lmetadyn.and.keyens.ne.3.and.keyens.ne.5.and.keyens.ne.7)then -+ -+ kill=.true. -+ call error(idnode,-2360) -+ -+ endif -+ -+ if(lsolva.or.lfree.or.lexcite.or.lswitch)then -+ -+ if(lspme)then -+ -+ kill=.true. -+ call error(idnode,-601) -+ -+ endif -+ -+ if(lhke)then -+ -+ kill=.true. -+ call error(idnode,-602) -+ -+ endif -+ -+ endif -+ -+ if(lghost.and.nstbgr.ne.isolva)then -+ -+ call warning(idnode,130,dble(isolva),0.d0,0.d0) -+ nstbgr=isolva -+ -+ endif -+ if(lfree.and.lgofr)then -+ -+ call warning(idnode,140,0.d0,0.d0,0.d0) -+ lgofr=.false. -+ lpgr=.false. -+ -+ endif -+ if(loptim)then -+ -+ temp=0.d0 -+ -+ elseif(.not.ltemp)then -+ -+ kill=.true. -+ call error(idnode,-380) -+ -+ endif -+ -+ if(.not.lstep)then -+ -+ kill=.true. -+ call error(idnode,-381) -+ -+ endif -+ -+ if(.not.lcut)then -+ -+ kill=.true. -+ call error(idnode,-382) -+ -+ endif -+ -+c check if van der Waals cutoff set -+ -+ if(.not.lrvdw.and.mod(keyfce,2).eq.1)then -+ -+ if(rcut.gt.0.d0)then -+ -+ rvdw=rcut -+ -+ else -+ -+ kill=.true. -+ call error(idnode,-402) -+ -+ endif -+ -+ endif -+ -+ if(.not.ldelr)then -+ -+ kill=.true. -+ call error(idnode,-384) -+ -+ endif -+ -+ if(multt.gt.1)then -+ -+ if(.not.lprim)then -+ -+ kill=.true. -+ call error(idnode,-385) -+ -+ elseif(rprim.gt.rcut)then -+ -+ kill=.true. -+ call error(idnode,-386) -+ -+ endif -+ -+ endif -+ -+c check settings in nvt ensemble -+ -+ if(keyens.ge.2.and.keyens.le.3)then -+ -+ if(taut.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-464) -+ -+ endif -+ -+ endif -+ -+c check settings in npt ensemble -+ -+ if(keyens.ge.4.and.keyens.le.7)then -+ -+ if(.not.lpres)then -+ -+ kill=.true. -+ call error(idnode,-387) -+ -+ endif -+ -+c check barostat and thermostat rates non zero -+ -+ if(taut.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-464) -+ -+ endif -+ if(taup.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-466) -+ -+ endif -+ -+ endif -+ -+c check multiple timestep cutoffs are sensible -+ -+ if(multt.gt.1)then -+ if(rcut-rprim.lt.delr)then -+ -+ kill=.true. -+ call error(idnode,-398) -+ -+ endif -+ endif -+ -+c check rcut > rvdw (for verlet list constructor) -+ -+ if(rcut.lt.rvdw)then -+ -+ kill=.true. -+ call error(idnode,-400) -+ -+ endif -+ -+c check spme is not being used with incorrect pbc -+ -+ if(lspme)then -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+ kill=.true. -+ call error(idnode,-513) -+ -+ endif -+ -+ endif -+ -+c check on all-pairs calculation request -+ -+ if(lnsq)then -+ -+ if(multt.eq.1)then -+ -+ kill=.true. -+ call error(idnode,-422) -+ -+ endif -+ -+ if(keyfce/2.lt.2.or.keyfce/2.gt.3)then -+ -+ kill=.true. -+ call error(idnode,-424) -+ -+ endif -+ -+ endif -+ -+c cancel rdf option if no vdw or coulombic forces -+ -+ if(lgofr.and.keyfce.eq.0)then -+ -+ lgofr=.false. -+ call warning(idnode,120,0.d0,0.d0,0.d0) -+ -+ endif -+ -+ if(kill)call abort_control_read(2,idnode,nread) -+ -+c close CONTROL file -+ -+ if(idnode.eq.0)close(nread) -+ -+ return -+ end subroutine simdef -+ -+ subroutine sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading in the molecular specifications -+c of the system to be simulated -+c version for rigid unit data and neutral groups -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith may 1992. -+c amended - w.smith march 1994 -+c amended - t.forester april 1994 -+c amended - w.smith dec 1994 - getrec etc -+c amended - a.smondyrev may 2000 - keydih=5 for -+c ryckaert-bellemans potential in dihedrals -+c amended - a.smondyrev may 2000 - keydih=6 for -+c fluorinated ryckaert-bellemans potential in dihedrals -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lunits,lmols,lneut,ltable,lnsq,lshl,safe,lpmf -+ logical loop1,loop2,lsolva,lfree,lexcite,lswitch,lghost -+ -+ integer idnode,keyfce,keyfld,natms,ngrp,ntpatm,ntpmls -+ integer ntpvdw,ntptbp,ntpmet,ntpfbp,nshels,ksite -+ integer nsite,nconst,nangle,ndihed,ninver,nbonds -+ integer nteth,nspmf,itmols,i,idum,keyver -+ integer ntpter,keyshl,iatm,natmsr,ntghost -+ -+ real(8) dlrpot,engunit,rvdw,rcuttb,rctter,rcutfb -+ real(8) sumchg -+ -+ data loop1/.true./,loop2/.true./ -+ -+c initialise system counters: atomic site index, number of -+c constraints, bond angles, dihedrals, inversions, chemical bonds, -+c unique atom types, total number of atoms, -+c total number of rigid groups, number of tethered atoms, -+c number of three body potentials -+ -+ nsite=0 -+ nconst=0 -+ nangle=0 -+ ndihed=0 -+ ninver=0 -+ nbonds=0 -+ ntpatm=0 -+ natms=0 -+ ngrp=0 -+ nteth=0 -+ ntptbp=0 -+ ntpter=0 -+ ntpmet=0 -+ ntpvdw=0 -+ ntpfbp=0 -+ nshels=0 -+ nspmf=0 -+ keyfld=0 -+ keyshl=0 -+ ntghost=0 -+ natmsr=0 -+ ntcons_ghost=0 -+ -+ lunits=.false. -+ lmols=.false. -+ lneut=.false. -+ ltable=.false. -+ lmetab=.false. -+ lshl=.false. -+ lpmf=.false. -+ engunit=1.d0 -+ -+ numbonds(:)=0 -+ numpmf(:)=0 -+ numcon(:)=0 -+ numdih(:)=0 -+ numinv(:)=0 -+ numgrp(:)=0 -+ numsit(:)=0 -+ numteth(:)=0 -+ numshl(:)=0 -+ npmf(:)=0 -+ indpmf(:)=0 -+ -+c open force field data file -+ -+ if(idnode.eq.0)open (nfield,file='FIELD',status='old') -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,'SYSTEM SPECIFICATION')") -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read and process directives from field file -+ -+ do while(loop1) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c convert to lowercase and remove leading blanks -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.' ')then -+ -+c record is commented out -+ cycle -+ -+ elseif(findstring('units',record,idum))then -+ -+c identify energy unit for input/output -+ -+ lunits=.true. -+ call define_units(idnode,engunit) -+ -+c neutral group control option -+ -+ elseif(findstring('neut',record,idum))then -+ -+ lneut=.true. -+ if(idnode.eq.0) -+ x write(nrite,"(/,' neutral group implementation in use')") -+ -+c can't have neutral groups with all-pairs -+ -+ if(lnsq)call error(idnode,426) -+ -+c specify molecular species -+ -+ elseif(findstring('molecu',record,idum))then -+ -+c number of molecular types -+ -+ if(lmols)call error(idnode,11) -+ lmols=.true. -+ ntpmls=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,1x,'number of molecular types',6x,i10)") -+ x ntpmls -+ -+ if(ntpmls.gt.mxtmls)call error(idnode,10) -+ -+c initialise total system charge -+ -+ sumchg=0.d0 -+ -+c read in molecular characteristics -+ -+ do itmols=1,ntpmls -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'molecular species type',9x,i10)") -+ x itmols -+ -+c name of molecular species -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+ call copystring(record,molnam(1,itmols),40) -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,1x,'name of species:',13x,40a1)") -+ x (molnam(i,itmols),i=1,40) -+ -+c stop processing if energy unit has not been specified -+ -+ if(.not.lunits)call error(idnode,6) -+ -+c read molecular data -+ -+ loop2=.true. -+ -+ do while(loop2) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ -+ ksite=0 -+ -+ if(findstring('nummol',record,idum))then -+ -+ nummols(itmols)=intstr(record,lenrec,idum) -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'number of molecules ', -+ x 10x,i10)")nummols(itmols) -+ -+ elseif(findstring('atoms',record,idum))then -+ -+c read in atomic details -+ -+ call define_atoms -+ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read core - shell spring parameters -+ -+ elseif(findstring('shell',record,idum))then -+ -+ lshl=.true. -+ call define_core_shell -+ x (safe,idnode,itmols,nshels,nsite,keyshl, -+ x engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read chemical bond force constant and bondlength -+ -+ elseif(findstring('bonds',record,idum))then -+ -+ call define_bonds -+ x (safe,idnode,itmols,nbonds,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read bond atom indices and constraint bondlength -+ -+ elseif(findstring('constr',record,idum))then -+ -+ call define_constraints -+ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read pmf bond atom indices, weights and constraint bondlength -+ -+ elseif(findstring('pmf',record,idum))then -+ -+ if(lpmf)call error(idnode,484) -+ lpmf=.true. -+ call define_pmf(safe,idnode,itmols,nspmf) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular angular potential parameters -+ -+ elseif(findstring('angles',record,idum))then -+ -+ call define_angles -+ x (safe,idnode,itmols,nangle,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular dihedral potential parameters -+ -+ elseif(findstring('dihedr',record,idum))then -+ -+ call define_dihedrals -+ x (safe,idnode,itmols,ndihed,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular inversion potential parameters -+ -+ elseif(findstring('invers',record,idum))then -+ -+ call define_inversions -+ x (safe,idnode,itmols,ninver,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read rigid body data -+ -+ elseif(findstring('rigid',record,idum))then -+ -+ call define_rigid_body -+ x (safe,lghost,idnode,itmols,ngrp,natmsr) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read tethered atom indices and tethering parameters -+ -+ elseif(findstring('teth',record,idum))then -+ -+ call define_tethers -+ x (safe,idnode,itmols,nteth,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c finish of data for one molecular type -+ -+ elseif(findstring('finish',record,idum))then -+ -+c running total of number of atoms in system -+ -+ natms=natms+nummols(itmols)*numsit(itmols) -+ if(natms.gt.mxatms)call error(idnode,75) -+ -+c check core-shell units are not both in same rigid body unit -+ -+ call check_shells(idnode,itmols,nshels,ngrp) -+ -+ loop2=.false. -+ -+ else -+ -+c error exit for unidentified directive in molecular data -+ -+ if(idnode.eq.0)write(nrite,'(12x,a)')record -+ call error(idnode,12) -+ -+ endif -+ -+ enddo -+ -+c construction of atmolt table for solvation calculation -+ -+ if(lsolva)then -+ -+ do iatm=natmsr+1,natms -+ atmolt(iatm)=itmols -+ enddo -+ natmsr=natms -+ -+ endif -+ -+ enddo -+ -+c construction of atm_fre table for free energy or excitation -+ -+ if(lfree.or.lexcite.or.lswitch)then -+ -+ atm_fre(:)=0 -+ if((ind_fre(1).ne.0).and.(ind_fre(2).ne.0))then -+ -+ do iatm=ind_fre(1),ind_fre(2) -+ atm_fre(iatm)=1 -+ enddo -+ -+ endif -+ -+ if((ind_fre(3).ne.0).and.(ind_fre(4).ne.0))then -+ -+ do iatm=ind_fre(3),ind_fre(4) -+ -+ atm_fre(iatm)=2 -+ if(lghost)ntghost=ntghost+1 -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c calculate system charge -+ -+ call check_syschg(idnode,ntpmls,sumchg) -+ -+c read in the nonbonded potential energy parameters -+ -+ elseif(findstring('vdw',record,idum))then -+ -+ call define_van_der_waals -+ x (safe,ltable,lunits,lmols,idnode,ntpvdw, -+ x ntpatm,keyfce,dlrpot,rvdw,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read in the metal potential energy parameters -+ -+ elseif(findstring('met',record,idum))then -+ -+ call define_metals -+ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rvdw,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read the three body potential energy parameters -+ -+ elseif(findstring('tbp',record,idum))then -+ -+ call define_three_body -+ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read the tersoff potential energy parameters -+ -+ elseif(findstring('tersoff',record,idum))then -+ -+ call define_tersoff -+ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read in the four body potential energy parameters -+ -+ elseif(findstring('fbp',record,idum))then -+ -+ call define_four_body -+ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, -+ x rcutfb,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read external field data -+ -+ elseif(findstring('extern',record,idum))then -+ -+ call define_external_field -+ x (safe,lunits,idnode,keyfld,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c normal end of FIELD file -+ -+ elseif(findstring('close',record,idum))then -+ -+ loop1=.false. -+ if(ntpvdw.eq.0.and.ntpmet.eq.0.and. -+ x mod(keyfce,2).eq.1)call error(idnode,145) -+ -+c error exit for unidentified directive -+ -+ else -+ -+ if(idnode.eq.0)write(nrite,'(100a)')record -+ call abort_field_read(2,idnode,nfield) -+ -+ endif -+ -+ enddo -+ -+c close force field file -+ -+ if(idnode.eq.0)close (nfield) -+ -+ -+ if(lshl.and.idnode.eq.0)then -+ -+ if(keyshl.eq.1)write(nrite, -+ x "(/,/,'adiabatic shell model in operation')") -+ -+ if(keyshl.eq.2)write(nrite, -+ x "(/,/,'relaxed shell model in operation')") -+ -+ endif -+ -+ if(lshl.and.keyshl.eq.0)call error(idnode,1951) -+ -+c if metadynamics and shell selected use only velocity verlet -+ -+ if(lshl.and.lmetadyn.and.keyver.eq.0)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'switching to velocity verlet for metadynamics')") -+ keyver=1 -+ -+ endif -+ -+ return -+ end subroutine sysdef -+ -+ subroutine sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading the configuration data file -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 atname(8) -+ -+ logical loglnk,safe,lneut,nolink,lfree,lfrmas -+ integer idnode,imcon,keyens,keyfce,keyres,levcfg,multt -+ integer ntpmls,i,indatm,indnam,indneu,k,ilx,ily,ilz -+ integer m,l,ncells,idum,mxnode -+ real(8) delr,rcut,volm,xcoord,ycoord,zcoord,totmas,xveloc -+ real(8) yveloc,zveloc,xforce,yforce,zforce,axx,rt3,xhi,yhi,zhi -+ real(8) width,dum1,dum2,test,com(3) -+ -+c open the system input file -+ -+ if(idnode.eq.0)open (nconf,file='CONFIG') -+ -+c read the CONFIG file header -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ -+ call copystring(record,cfgname,80) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'configuration file name: ',/,/,10x,80a1)")cfgname -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ -+ levcfg=intstr(record,lenrec,idum) -+ imcon=intstr(record,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'selected image convention',6x,i10)")imcon -+ -+c check config file contents for consistent data -+ -+ if((imcon.eq.0.or.imcon.eq.6).and. -+ x (keyfce/2.eq.1.or.keyfce/2.eq.6)) -+ x call error(idnode,180) -+ -+ if(imcon.eq.0.and.(.not.lneut).and.(keyfce.gt.1) -+ x .and.(multt.eq.1))call warning(idnode,30,0.d0,0.d0,0.d0) -+ -+ if(imcon.eq.0.and.(keyens.ge.4.and.keyens.le.7)) -+ x call error(idnode,390) -+ if(imcon.le.2.and.(keyens.eq.6.or.keyens.eq.7))imcon=3 -+ if(keyres.gt.0.and.levcfg.lt.1)call error(idnode,85) -+ -+c specify molecular dynamics simulation cell -+ -+ if(imcon.eq.0)then -+ -+c if no periodic boundaries - set zero values for cell -+c vectors and cell volume -+ -+ cell(:)=0.d0 -+ volm=0.d0 -+ -+ else -+ -+c read cell vectors -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(1)=dblstr(record,lenrec,idum) -+ cell(2)=dblstr(record,lenrec,idum) -+ cell(3)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(4)=dblstr(record,lenrec,idum) -+ cell(5)=dblstr(record,lenrec,idum) -+ cell(6)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(7)=dblstr(record,lenrec,idum) -+ cell(8)=dblstr(record,lenrec,idum) -+ cell(9)=dblstr(record,lenrec,idum) -+ -+ endif -+ -+c read the atomic coordinates -+ -+ indatm=0 -+ indnam=0 -+ indneu=0 -+ safe=.true. -+ -+ do k=1,ntpmls -+ -+ do l=1,nummols(k) -+ -+ do m=1,numsit(k) -+ -+ indatm=indatm+1 -+ -+ if(indatm.gt.mxatms)call error(idnode,45) -+ -+ xxx(indatm)=0.d0 -+ yyy(indatm)=0.d0 -+ zzz(indatm)=0.d0 -+ vxx(indatm)=0.d0 -+ vyy(indatm)=0.d0 -+ vzz(indatm)=0.d0 -+ fxx(indatm)=0.d0 -+ fyy(indatm)=0.d0 -+ fzz(indatm)=0.d0 -+ -+ if(idnode.eq.0)then -+ -+ if(levcfg.eq.0)then -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ -+ elseif(levcfg.eq.1)then -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc -+ -+ else -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc -+ read(nconf,'(3f20.0)',end=100)xforce,yforce,zforce -+ -+ endif -+ -+c strip blanks off atom name -+ -+ call strip(atname,8) -+ -+ if(sitnam(indnam+m).eq.mkwd8(atname))then -+ -+ xxx(indatm)=xcoord -+ yyy(indatm)=ycoord -+ zzz(indatm)=zcoord -+ -+ if(levcfg.gt.0)then -+ -+ vxx(indatm)=xveloc -+ vyy(indatm)=yveloc -+ vzz(indatm)=zveloc -+ -+ endif -+ -+ if(levcfg.gt.1)then -+ -+ fxx(indatm)=xforce -+ fyy(indatm)=yforce -+ fzz(indatm)=zforce -+ -+ endif -+ -+ else -+ -+ write(nrite,"(/,/,'unidentified atom label :',8a1, -+ x ': atom number ',i5)")atname,indatm -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ call gstate(safe) -+ if(.not.safe)call error(idnode,25) -+ -+ ltype(indatm)=ltpsit(indnam+m) -+ weight(indatm)=wgtsit(indnam+m) -+ chge(indatm)=chgsit(indnam+m) -+ atmnam(indatm)=sitnam(indnam+m) -+ lstfrz(indatm)=lfzsit(indnam+m) -+ if(lneut)lstneu(indatm)=nugrp(indnam+m)+indneu -+ -+c reset atomic masses according to free energy definitions -+ -+ if(lfree)then -+ -+ weight_sav(indatm)=weight(indatm) -+ -+ if(lfrmas)then -+ -+ if(indatm.ge.ind_fre(1).and.indatm.le.ind_fre(2))then -+ weight(indatm)=lambda1*weight(indatm) -+ elseif(indatm.ge.ind_fre(3).and.indatm.le.ind_fre(4)) -+ x then -+ weight(indatm)=lambda2*weight(indatm) -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ indneu=indneu+nugrp(indnam+numsit(k)) -+ -+ enddo -+ -+ indnam=indnam+numsit(k) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ call gdsum(xxx,indatm,buffer) -+ call gdsum(yyy,indatm,buffer) -+ call gdsum(zzz,indatm,buffer) -+ -+ if(levcfg.gt.0)then -+ -+ call gdsum(vxx,indatm,buffer) -+ call gdsum(vyy,indatm,buffer) -+ call gdsum(vzz,indatm,buffer) -+ -+ endif -+ -+ if(levcfg.gt.1)then -+ -+ call gdsum(fxx,indatm,buffer) -+ call gdsum(fyy,indatm,buffer) -+ call gdsum(fzz,indatm,buffer) -+ -+ endif -+ -+ endif -+ -+c check integrity of cell vectors : for cubic, TO and RD cases -+c ie. cell(1)=cell(5)=cell(9) (or cell(9)/sqrt(2) for RD) -+ -+ if((imcon.eq.1).or.(imcon.eq.4).or.(imcon.eq.5))then -+ -+ axx=(abs(cell(1))+abs(cell(5)))/2.d0 -+ test=1.d-8*axx -+ if(abs(cell(1)-axx).gt.test)call error(idnode,410) -+ if(abs(cell(5)-axx).gt.test)call error(idnode,410) -+ if(imcon.eq.5)then -+ if(abs(cell(9)-axx*sqrt(2.d0)).gt.test) -+ x call error(idnode,410) -+ else -+ if(abs(cell(9)-axx).gt.test)call error(idnode,410) -+ endif -+ -+ endif -+ -+c check integrity of hexagonal prism cell vectors -+ -+ if(imcon.eq.7)then -+ -+ rt3=sqrt(3.d0) -+ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) -+ x call error(idnode,410) -+ -+ endif -+ -+c check 2D PBC for imcon=6 -+ -+ if(imcon.eq.6)then -+ -+ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) -+ -+ endif -+ -+c check for diagonal cell matrix if appropriate -+ -+ if((imcon.eq.1).or.(imcon.eq.2).or.(imcon.eq.4).or. -+ x (imcon.eq.5).or.(imcon.eq.7))then -+ -+ if(abs(cell(2)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(4)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) -+ -+ endif -+ -+c put centre of mass at centre of coordinates if imcon=0 -+ -+ if(imcon.eq.0)then -+ -+ totmas=getmass(indatm,idnode,mxnode) -+ call getcom(indatm,idnode,mxnode,totmas,com) -+ -+ do i=1,indatm -+ -+ xxx(i)=xxx(i)-com(1) -+ yyy(i)=yyy(i)-com(2) -+ zzz(i)=zzz(i)-com(3) -+ -+ enddo -+ -+ endif -+ -+c set widths if unset - needed for check on link cells below -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+ xhi=abs(xxx(1)) -+ yhi=abs(yyy(1)) -+ zhi=abs(zzz(1)) -+ do i=2,indatm -+ -+ xhi=max(xhi,abs(xxx(i))) -+ yhi=max(yhi,abs(yyy(i))) -+ zhi=max(zhi,abs(zzz(i))) -+ -+ enddo -+ if(imcon.eq.0)then -+ -+ cell(1)=max(2.d0*xhi+rcut+delr,3.d0*(rcut+delr)) -+ cell(5)=max(2.d0*yhi+rcut+delr,3.d0*(rcut+delr)) -+ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) -+ -+ endif -+ -+ if(imcon.eq.6.and.cell(9).lt.1.d-6)then -+ -+ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) -+ -+ endif -+ -+ endif -+ -+c calculate dimensional properties of simulation cell -+ -+ call dcell(cell,celprp) -+ -+ if(imcon.eq.0)then -+ -+ volm=0.d0 -+ -+ elseif(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ else -+ -+ volm=celprp(10) -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,/,1x,'simulation cell vectors'/,/)") -+ write(nrite,"(21x,3f12.6)")cell -+ -+ write(nrite, -+ x "(/,/,1x,'system volume ',2x,1p,g22.12)")volm -+ -+ endif -+ -+c check value of cutoff and reset if necessary -+ -+ if(imcon.gt.0)then -+ -+ width=min(celprp(7),celprp(8),celprp(9))/2.d0 -+ if(imcon.eq.4)width=sqrt(3.d0)*cell(1)/4.d0 -+ if(imcon.eq.5)width=cell(1)/2.d0 -+ if(imcon.eq.6)width=min(celprp(7),celprp(8))/2.d0 -+ -+c halt program if potential cutoff exceeds cell width -+ -+ if(rcut.gt.width)call error(idnode,95) -+ -+ endif -+ -+c decide on whether to use link cells for verlet list constructor -+ -+ if(nolink)then -+ -+ loglnk=.false. -+ -+ else -+ -+ loglnk=.true. -+ -+ ilx=int(celprp(7)/(rcut+delr)) -+ ily=int(celprp(8)/(rcut+delr)) -+ ilz=int(celprp(9)/(rcut+delr)) -+ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. -+ ncells=ilx*ily*ilz -+ if(lneut.and.ncells.le.36)loglnk=.false. -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. -+ if(loglnk.and.ncells.gt.mxcell)then -+ -+ dum1=dble(ncells) -+ dum2=dble(mxcell) -+ call warning(idnode,90,dum1,dum2,dum2) -+ loglnk=.false. -+ -+ endif -+ -+ endif -+ -+ if(loglnk.and.idnode.eq.0) -+ x write(nrite,"(/,/,' link cell algorithm in use')") -+ -+ if(idnode.eq.0)close (nconf) -+ -+c ensure PBC compliance of starting structure -+ -+ if(keyres.eq.0.and.imcon.gt.0)then -+ -+ call images(imcon,idnode,mxnode,indatm,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,indatm,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ return -+ -+c error exit for config file read -+ -+ 100 call abort_config_read(2,idnode,nconf) -+ -+ end subroutine sysgen -+ -+ subroutine sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading the REVIVE file data and -+c defining the initial thermodynamic and structural accumulators. -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c adapted - d. quigley nov 2010, metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzden,lfree,lsolva,lghost,lpsoc -+ integer idnode,imcon,keyfce,keyres,mxnode,natms,nstep,numacc -+ integer numrdf,ntpatm,nzden,i,j,k,ntpmet,ntshl,ntpvdw -+ real(8) chip,chit,conint,elrc,engunit,virlrc,rvdw,volm -+ real(8) dnumrd,dnstep,dnumac,dnzden,virtot,vircom,tboost -+ real(8) chit_shl -+ -+c read or initialise accumulator arrays -+ -+ if(keyres.eq.1.and.idnode.eq.0)then -+ -+c read accumulator data from dump file -+ -+ open(nrest,file='REVOLD',form='unformatted') -+ -+ read(nrest) dnstep,dnumac,dnumrd,chit,chip,conint,dnzden, -+ x tboost,chit_shl -+ read(nrest) virtot,vircom,eta,strcns,strbod -+ read(nrest) stpval -+ read(nrest) sumval -+ read(nrest) ssqval -+ read(nrest) zumval -+ read(nrest) ravval -+ read(nrest) stkval -+ read(nrest) xx0,yy0,zz0 -+ read(nrest) xxs,yys,zzs -+ -+ if(lgofr) read(nrest)rdf -+ if(lzden) read(nrest)zdens -+ -+ nstep=nint(dnstep) -+ numacc=nint(dnumac) -+ numrdf=nint(dnumrd) -+ nzden=nint(dnzden) -+ close (nrest) -+ -+ else -+ -+c initialise step counters -+ -+ nstep=0 -+ numacc=0 -+ numrdf=0 -+ nzden=0 -+ -+c initialise temperature and pressure coupling parameters -+c and integral for conserved quantity -+ -+ chit=0.d0 -+ chip=0.d0 -+ conint=0.d0 -+ virtot=0.d0 -+ vircom=0.d0 -+ chit_shl=0.d0 -+ do i=1,9 -+ -+ eta(i)=0.d0 -+ strcns(i)=0.d0 -+ strbod(i)=0.d0 -+ -+ enddo -+ -+c initialise accumulator arrays -+ -+ do i=1,mxnstk -+ -+ stpval(i)=0.d0 -+ sumval(i)=0.d0 -+ ssqval(i)=0.d0 -+ zumval(i)=0.d0 -+ ravval(i)=0.d0 -+ -+ enddo -+ -+ do i=1,mxatms -+ -+ xx0(i)=0.d0 -+ yy0(i)=0.d0 -+ zz0(i)=0.d0 -+ xxs(i)=0.d0 -+ yys(i)=0.d0 -+ zzs(i)=0.d0 -+ -+ enddo -+ -+ do j=1,mxnstk -+ -+ do i=1,mxstak -+ -+ stkval(i,j)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ if(lgofr)then -+ -+ do i=1,mxxtyp -+ -+ do j=1,mxrdf -+ -+ rdf(j,i)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(lzden)then -+ -+ do i=1,mxatyp -+ -+ do j=1,mxzdn -+ zdens(j,i)=0.d0 -+ enddo -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c put shells on cores at start -+ -+ if(lpsoc.and.keyres.ne.1.and.ntshl.gt.0) -+ x call put_shells_on_cores(idnode,mxnode,ntshl) -+ -+c if restart then broadcast stored variables via a global sum -+ -+ if(keyres.eq.1.and.mxnode.gt.1)then -+ -+ if(mxbuff.lt.natms.or.mxbuff.lt.mxnstk*mxstak) -+ x call error(idnode,186) -+ -+ buffer(1)=chit -+ buffer(2)=chip -+ buffer(3)=conint -+ buffer(4)=dble(nstep) -+ buffer(5)=dble(numacc) -+ buffer(6)=dble(numrdf) -+ buffer(7)=dble(nzden) -+ buffer(8)=tboost -+ buffer(9)=virtot -+ buffer(10)=vircom -+ buffer(11)=chit_shl -+ call gdsum(buffer(1),11,buffer(12)) -+ chit=buffer(1) -+ chip=buffer(2) -+ conint=buffer(3) -+ nstep=nint(buffer(4)) -+ numacc=nint(buffer(5)) -+ numrdf=nint(buffer(6)) -+ nzden=nint(buffer(7)) -+ tboost=buffer(8) -+ virtot=buffer(9) -+ vircom=buffer(10) -+ chit_shl=buffer(11) -+ -+ call gdsum(eta,9,buffer) -+ call gdsum(strcns,9,buffer) -+ call gdsum(strbod,9,buffer) -+ call gdsum(stpval,mxnstk,buffer) -+ call gdsum(sumval,mxnstk,buffer) -+ call gdsum(ssqval,mxnstk,buffer) -+ call gdsum(zumval,mxnstk,buffer) -+ call gdsum(ravval,mxnstk,buffer) -+ call gdsum(stkval,mxnstk*mxstak,buffer) -+ call gdsum(xx0,natms,buffer) -+ call gdsum(yy0,natms,buffer) -+ call gdsum(zz0,natms,buffer) -+ call gdsum(xxs,natms,buffer) -+ call gdsum(yys,natms,buffer) -+ call gdsum(zzs,natms,buffer) -+ -+c for rdf table - broadcast and normalise -+ -+ if(lgofr)then -+ -+ do k=1,mxxtyp -+ -+ call gdsum(rdf(1,k),mxrdf,buffer) -+ -+ do j=1,mxrdf -+ rdf(j,k)=rdf(j,k)/dble(mxnode) -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(lzden)then -+ -+ do k=1,mxatyp -+ -+ call gdsum(zdens(1,k),mxzdn,buffer) -+ -+ do j=1,mxzdn -+ zdens(j,k)=zdens(j,k)/dble(mxnode) -+ enddo -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c number densities and long-range corrections -+ -+ elrc=0.d0 -+ virlrc=0.d0 -+ -+ if(imcon.eq.0.or.imcon.eq.6)volm=4.d0*pi/3.d0*rvdw**3 -+ -+ call lrcorrect -+ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, -+ x ntpatm,ntpvdw,elrc,engunit,virlrc,rvdw,volm) -+ -+ if(lmetab.or.ntpmet.eq.0)then -+ -+ elrcm(0)=0.d0 -+ vlrcm(0)=0.d0 -+ -+ else -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+ if(imcon.eq.0.or.imcon.eq.6)volm=0.d0 -+ -+ return -+ end subroutine sysinit -+ -+ subroutine systemp -+ x (idnode,imcon,keyres,mxnode,natms,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for setting the initial system temperature -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,keyres,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,ntshl,levcfg,i,io,k,keyshl -+ real(8) degfre,degshl,degrot,temp,tolnce,sigma,rsq -+ -+c number of degrees of freedom -+c 3 for com translation -+c 3 for angular momentum about origin (non-periodic systems only) -+ -+ degfre=dble(3*(ntfree-ntshl)-3-ntcons)+degfre -+ if(imcon.eq.0.or.imcon.eq.6)degfre=degfre-3.0d0 -+ if(imcon.eq.0.or.imcon.eq.6)degrot=max(0.d0,degrot-3.0d0) -+ degshl=dble(3*ntshl) -+ -+c lose one degree of freedom if temperature constrained -+c gaussian constraints -+ -+c if(keyens.eq.1)degfre=degfre-1.d0 -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,' total degrees of freedom ',f20.0,/, -+ x ' rotational degrees of freedom ',f20.0,/, -+ x ' shell pseudo degrees of freedom',f20.0)") -+ x degfre,degrot,degshl -+ if(degfre.lt.1.d0)call error(idnode,350) -+ -+c define reciprocal masses of atoms -+ -+ do i=1,natms -+ -+ if(lstfrz(i).ne.0.or.weight(i).lt.1.d-6)then -+ -+ rmass(i)=0.d0 -+ weight(i)=0.d0 -+ -+ else -+ -+ rmass(i)=1.d0/weight(i) -+ -+ endif -+ -+ enddo -+ -+c generate starting velocities -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+ if(keyres.eq.0)then -+ -+ call gauss(natms,vxx,vyy,vzz) -+ -+ do i=1,natms -+ -+ rsq=sqrt(rmass(i)) -+ vxx(i)=vxx(i)*rsq -+ vyy(i)=vyy(i)*rsq -+ vzz(i)=vzz(i)*rsq -+ -+ enddo -+ -+ if(ntcons.gt.0)call quench -+ x (imcon,idnode,mxnode,natms,nscons,tolnce) -+ -+ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ if(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ elseif(keyres.eq.1.or.keyres.eq.3)then -+ -+ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ elseif(keyres.eq.2)then -+ -+ if(ngrp.gt.0)then -+ -+ call vscaleg -+ x (idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ elseif(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c print out sample of initial configuration -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'sample of starting configuration',/)") -+ -+ io=(natms+19)/20 -+ if((levcfg.le.1).and.(idnode.eq.0)) -+ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',/,/)") -+ if((levcfg.eq.2).and.(idnode.eq.0)) -+ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)', -+ x 7x,'fx(i)',7x,'fy(i)',7x,'fz(i)',/,/)") -+ -+ do i=1,natms,io -+ -+ if(levcfg.le.1)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i) -+ -+ elseif(levcfg.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i), -+ x vxx(i),vyy(i),vzz(i),fxx(i),fyy(i),fzz(i) -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine systemp -+ -+ subroutine sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine defining global bookkeeping -+c arrays -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical loglnk,lneut,lshmov,lcnb,lsolva,lghost -+ integer idnode,imcon,mxnode,natms,nneut,ngrp,nscons,ntangl,i -+ integer ntbond,ntcons,ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,ii,isol,itmols,igsol,iggsol,natmsf,natmsl -+ integer ntghost,natms2 -+ real(8) degfre,degrot -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c neutral group bookkeeping -+ -+ call neutbook(lneut,idnode,natms,nneut) -+ -+c rigid body bookkeeping -+ -+ call quatbook -+ x (lsolva,idnode,imcon,mxnode,natms2,ngrp,ntpmls, -+ x ntfree,degfre,degrot) -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ -+ numcon(mxtmls)=numcon(mxtmls)+ntcons_ghost -+ numgrp(mxtmls)=numgrp(mxtmls)+ngrp_ghost -+ -+ endif -+ -+c construct list of excluded pair interactions -+ -+ if(lneut)then -+ -+ call exclude(idnode,mxnode,natms,ntpmls) -+ call excludeneu(idnode,mxnode,nneut) -+ -+ elseif(.not.lneut)then -+ -+ call exclude(idnode,mxnode,natms,ntpmls) -+ -+ if(loglnk)then -+ -+ call exclude_link(idnode,mxnode,ntpmls) -+ -+ else -+ -+ call exclude_atom(idnode,mxnode,natms,ntpmls) -+ -+ endif -+ -+ endif -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ -+ numcon(mxtmls)=numcon(mxtmls)-ntcons_ghost -+ numgrp(mxtmls)=numgrp(mxtmls)-ngrp_ghost -+ -+ endif -+ -+c construct interaction lists for bonded forces -+ -+ call intlist -+ x (lshmov,lcnb,idnode,mxnode,natms2,nscons,ntangl,ntbond, -+ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) -+ -+c adaptations for solvation and excitation simulations -+ -+ if(lsolva.or.lghost)then -+ -+ natmsf=0 -+ natmsl=0 -+ natm_sol(:)=0 -+ const_sol(:)=numcon(:)*nummols(:) -+ rigid_sol(:)=numgrp(:)*nummols(:) -+ -+ if(ngrp.eq.0)then -+ -+ do itmols=1,mxtmls -+ -+ natmsl=natmsl+numsit(itmols)*nummols(itmols) -+ -+ do isol=natmsf+1,natmsl -+ -+ if(lstfrz(isol).eq.0)then -+ natm_sol(itmols)=natm_sol(itmols)+1 -+ endif -+ -+ enddo -+ -+ natmsf=natmsl -+ -+ enddo -+ -+ else -+ -+ ii=1 -+ -+ do itmols=1,mxtmls -+ -+ natmsl=natmsl+numsit(itmols)*nummols(itmols) -+ -+ do isol=natmsf+1,natmsl -+ -+ if(lstgot_sol(ii).eq.isol)then -+ ii=ii+1 -+ else -+ -+ if(lstfrz(isol).eq.0)then -+ natm_sol(itmols)=natm_sol(itmols)+1 -+ endif -+ -+ endif -+ -+ enddo -+ -+ natmsf=natmsl -+ -+ enddo -+ -+ degrot_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 -+ degfre_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 -+ -+ endif -+ -+ if(lghost)natm_sol(mxtmls)=natm_sol(mxtmls)-ntghost -+ degfre_sol(:)=dble(3*(natm_sol(:))-const_sol(:))+degfre_sol(:) -+ -+ endif -+ -+ return -+ end subroutine sysbook -+ -+ subroutine define_units(idnode,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting energy units -+c -+c copyright - daresbury laboratory -+c author - w. smith august 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,idum,i -+ real(8) engunit -+ logical blank -+ -+ blank=.true. -+ -+ do i=6,lenrec -+ if(record(i).ne.' ')blank=.false. -+ enddo -+ -+ if(blank)then -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=dl_poly internal ', -+ x 'units ')") -+ -+ elseif(findstring('ev',record,idum))then -+ -+ engunit=9648.530821d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=electron volts ')") -+ -+ elseif(findstring('kev',record,idum))then -+ -+ engunit=9648530.821d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kilo electron volts ')") -+ -+ elseif(findstring('kcal',record,idum))then -+ -+ engunit=418.4d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kcal/ mol ')") -+ -+ elseif(findstring('kj',record,idum))then -+ -+ engunit=1.d2 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kjoule/mol ')") -+ -+ elseif(findstring('k',record,idum))then -+ -+ engunit=boltz -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kelvin ')") -+ -+ elseif(findstring('internal',record,idum))then -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=dl_poly internal', -+ x ' units ')") -+ -+ else -+ -+ if(idnode.eq.0)write(nrite,'(a)')record -+ call error(idnode,5) -+ -+ endif -+ -+ return -+ end subroutine define_units -+ -+ subroutine quatbook -+ x (lsolva,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree, -+ x degfre,degrot) -+ -+c************************************************************************** -+c -+c dl_poly subroutine for setting up bookkeeping for rigid bodies -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c************************************************************************* -+ -+ implicit none -+ -+ logical safe,pass1,pass2,linear,lsolva -+ integer fail,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree -+ integer i,igrp,jgrp,kgrp,jr,jt,igrp1,igrp2,itmols,imols,lgrp,id -+ integer ii,jj,isite,k,kk,ill,i1,i2,i3,j,ngp,ifre1,ifre2,ig,ij -+ integer fngrp,lngrp -+ real(8) degfre,degrot,dnorm,a1,rtall,rotall,rot,aa,rotinr,bb,rot1 -+ real(8) rsq,det,dettest,aq,bq,cq,dq,eq,fq,gq,hq,rnorm,tol,rotxyz -+ real(8) rotlim,rrr -+ -+ integer, allocatable :: ind(:,:),lstgot(:) -+ real(8), allocatable :: gaxs(:,:),rotmin(:),accum(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ dimension rot(9),aa(9),rotinr(3,3),bb(9),rot1(3,3),fail(5) -+ -+ data fail/0,0,0,0,0/ -+ -+c allocate working arrays -+ -+ allocate (ind(mxgrp,3),lstgot(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) -+ allocate (gaxs(mxungp,9),rotmin(mxungp),stat=fail(4)) -+ allocate (accum(mxungp),stat=fail(5)) -+ do i=1,5 -+ if(fail(i).ne.0)call error(idnode,1790) -+ enddo -+ -+c initialise bookkeeping indices -+ -+ igrp=0 -+ jgrp=0 -+ kgrp=0 -+ isite=0 -+ jr=0 -+ jt=0 -+ safe=.true. -+ degfre=0.d0 -+ degrot=0.d0 -+ -+c rigid body identifier -+ -+ do i=1,natms -+ lstbod(i)=0 -+ enddo -+ -+c number of rigid groups in system -+ -+ ngrp=0 -+ do itmols=1,ntpmls -+ ngrp=ngrp+nummols(itmols)*numgrp(itmols) -+ enddo -+ -+c block indices for groups -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c loop over molecule types -+ -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if(igrp.le.mxgrp)then -+ -+ lstgtp(igrp)=listyp(lgrp+kgrp) -+ id=listyp(lgrp+kgrp) -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2))then -+ -+ jgrp=jgrp+1 -+ -+ do jj=1,numgsit(id) -+ -+ jr=jr+1 -+ jt=jt+1 -+ -+ if(jr.le.mxatms.and.jt.le.mxatms)then -+ -+ lstrgd(jr)=lstgst(id,jj)+isite -+ lstgot(jt)=lstgst(id,jj)+isite -+ lstbod(lstgst(id,jj)+isite)=igrp -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ else -+ -+ do jj=1,numgsit(id) -+ -+ jt=jt+1 -+ if(jt.le.mxatms)then -+ -+ lstgot(jt)=lstgst(id,jj)+isite -+ lstbod(lstgst(id,jj)+isite)=igrp -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,304) -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ kgrp=kgrp+numgrp(itmols) -+ -+ enddo -+ -+ if(ngrp.eq.0)then -+ -+ j=0 -+ do i=1,natms -+ -+ if(lstfrz(i).eq.0)then -+ -+ j=j+1 -+ lstfre(j)=i -+ -+ endif -+ -+ enddo -+ ntfree=j -+ -+ else -+ -+c centre of mass of groups -+c assumes group dimensions are smaller than half box width -+ -+ do i=1,natms -+ lstme(i)=0 -+ enddo -+ -+ do id=1,mxungp -+ gmass(id)=0.d0 -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c working com is first site in group -+ -+ i=lstrgd(jr+1) -+ txx(ig)=xxx(i) -+ tyy(ig)=yyy(i) -+ tzz(ig)=zzz(i) -+ -+ id=lstgtp(ig) -+ safe=.false. -+ if(abs(gmass(id)).lt.1.d-10)safe=.true. -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ xxt(jr)=xxx(i)-txx(ig) -+ yyt(jr)=yyy(i)-tyy(ig) -+ zzt(jr)=zzz(i)-tzz(ig) -+ if(safe)gmass(id)=gmass(id)+weight(i) -+ -+ enddo -+ -+ enddo -+ -+c minimum image from working com -+ -+ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=0.d0 -+ gcmy(ig)=0.d0 -+ gcmz(ig)=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ gcmx(ig)=gcmx(ig)+weight(i)*xxt(jr) -+ gcmy(ig)=gcmy(ig)+weight(i)*yyt(jr) -+ gcmz(ig)=gcmz(ig)+weight(i)*zzt(jr) -+ -+ enddo -+ -+ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) -+ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) -+ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) -+ -+ enddo -+ -+c global communications -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+c make sure all nodes have same copy of gmass -+ -+ if(mxnode.gt.1)then -+ -+ do id=1,mxungp -+ -+ accum(id)=0.d0 -+ if(gmass(id).gt.0.d0)accum(id)=1.d0 -+ -+ enddo -+ -+ call gdsum(gmass(1),mxungp,buffer(1)) -+ call gdsum(accum(1),mxungp,buffer(1)) -+ -+ do id=1,mxungp -+ -+ dnorm=max(1.d0,accum(id)) -+ gmass(id)=gmass(id)/dnorm -+ -+ enddo -+ -+ endif -+ -+c find a group of each type on this node to -+c find principal axis system of the group type -+ -+ do id=1,mxungp -+ -+ jr=0 -+ ij=0 -+ safe=.false. -+ -+ do while(.not.safe.and.ij.lt.ngrp) -+ -+ ij=ij+1 -+ jr=jr+numgsit(lstgtp(ij)) -+ if(lstgtp(ij).eq.id)safe=.true. -+ -+ enddo -+ -+ if(safe)then -+ -+c rotational inertia accumulator -+ -+ do k=1,3 -+ -+ do kk=1,3 -+ -+ rotinr(k,kk)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstgot(jr) -+ -+ xxt(jr)=xxx(i)-gcmx(ij) -+ yyt(jr)=yyy(i)-gcmy(ij) -+ zzt(jr)=zzz(i)-gcmz(ij) -+ -+ call images(imcon,0,1,1,cell,xxt(jr),yyt(jr),zzt(jr)) -+ -+ rotinr(1,1)=rotinr(1,1)+weight(i)*(xxt(jr)**2) -+ rotinr(1,2)=rotinr(1,2)+weight(i)*xxt(jr)*yyt(jr) -+ rotinr(1,3)=rotinr(1,3)+weight(i)*xxt(jr)*zzt(jr) -+ rotinr(2,2)=rotinr(2,2)+weight(i)*(yyt(jr)**2) -+ rotinr(2,3)=rotinr(2,3)+weight(i)*yyt(jr)*zzt(jr) -+ rotinr(3,3)=rotinr(3,3)+weight(i)*(zzt(jr)**2) -+ -+ enddo -+ -+ rotinr(2,1)=rotinr(1,2) -+ rotinr(3,1)=rotinr(1,3) -+ rotinr(3,2)=rotinr(2,3) -+ -+ call jacobi(rotinr,rot1,3) -+ -+ rot(1)=rot1(1,1) -+ rot(4)=rot1(2,1) -+ rot(7)=rot1(3,1) -+ rot(2)=rot1(1,2) -+ rot(5)=rot1(2,2) -+ rot(8)=rot1(3,2) -+ rot(3)=rot1(1,3) -+ rot(6)=rot1(2,3) -+ rot(9)=rot1(3,3) -+ -+c rotational inertia accumulators -+ -+ rotinx(id,1)=0.d0 -+ rotiny(id,1)=0.d0 -+ rotinz(id,1)=0.d0 -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstgot(jr) -+ -+c site positions in principal axis system -+ -+ gxx(id,j)=rot(1)*xxt(jr)+rot(4)*yyt(jr)+rot(7)*zzt(jr) -+ gyy(id,j)=rot(2)*xxt(jr)+rot(5)*yyt(jr)+rot(8)*zzt(jr) -+ gzz(id,j)=rot(3)*xxt(jr)+rot(6)*yyt(jr)+rot(9)*zzt(jr) -+ -+c impose rounding -+ -+ if(abs(gxx(id,j)).lt.1.d-8)gxx(id,j)=0.d0 -+ if(abs(gyy(id,j)).lt.1.d-8)gyy(id,j)=0.d0 -+ if(abs(gzz(id,j)).lt.1.d-8)gzz(id,j)=0.d0 -+ -+c rotational inertia tensor of group type -+ -+ rotinx(id,1)=rotinx(id,1)+ -+ x weight(i)*(gyy(id,j)**2+gzz(id,j)**2) -+ rotiny(id,1)=rotiny(id,1)+ -+ x weight(i)*(gzz(id,j)**2+gxx(id,j)**2) -+ rotinz(id,1)=rotinz(id,1)+ -+ x weight(i)*(gxx(id,j)**2+gyy(id,j)**2) -+ -+ enddo -+ -+c set axis system such that: Ixx >=Iyy >=Izz -+ -+ rotxyz=max(rotinx(id,1),rotiny(id,1),rotinz(id,1)) -+ -+ if(rotxyz.ge.rotinx(id,1))then -+ -+ if(rotiny(id,1).ge.rotxyz)then -+ -+ do j=1,numgsit(id) -+ -+ a1=gxx(id,j) -+ gxx(id,j)=gyy(id,j) -+ gyy(id,j)=-a1 -+ -+ enddo -+ -+ rotiny(id,1)=rotinx(id,1) -+ rotinx(id,1)=rotxyz -+ -+ elseif(rotinz(id,1).ge.rotxyz)then -+ -+ do j=1,numgsit(id) -+ -+ a1=gxx(id,j) -+ gxx(id,j)=gzz(id,j) -+ gzz(id,j)=-a1 -+ -+ enddo -+ -+ rotinz(id,1)=rotinx(id,1) -+ rotinx(id,1)=rotxyz -+ -+ endif -+ -+ endif -+ -+ if(rotinz(id,1).gt.rotiny(id,1))then -+ -+ do j=1,numgsit(id) -+ -+ a1=gyy(id,j) -+ gyy(id,j)=gzz(id,j) -+ gzz(id,j)=-a1 -+ -+ enddo -+ -+ a1=rotinz(id,1) -+ rotinz(id,1)=rotiny(id,1) -+ rotiny(id,1)=a1 -+ -+ endif -+ -+c set up principal axis system in terms of site positions -+ -+c test for (near) linear unit -+ -+ ill=0 -+ rtall=(rotinx(id,1)+rotiny(id,1)+rotinz(id,1)) -+ -+ if(rtall.gt.1.d-5)then -+ rotall=rtall -+ else -+ rotall=1.d0 -+ endif -+ -+ rotmin(id)=min(rotinx(id,1),rotiny(id,1)) -+ rotmin(id)=min(rotmin(id),rotinz(id,1))/rotall -+ -+ if((rotinx(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ if((rotiny(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ if((rotinz(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ -+ if(ill.ge.2)then -+ -+c point particle only -+ -+ ind(id,1)=1 -+ ind(id,2)=1 -+ ind(id,3)=1 -+ -+ do jj=1,9 -+ gaxs(id,jj)=0.d0 -+ enddo -+ -+ elseif(ill.eq.1)then -+ -+c linear molecule -+ -+ ind(id,1)=1 -+ ind(id,2)=2 -+ ind(id,3)=1 -+ -+ aa(1)=gxx(id,1)-gxx(id,2) -+ aa(4)=gyy(id,1)-gyy(id,2) -+ aa(7)=gzz(id,1)-gzz(id,2) -+ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) -+ -+ if(abs(aa(7)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(7)**2) -+ aa(2)=0.d0 -+ aa(5)=aa(7)/rsq -+ aa(8)=-aa(4)/rsq -+ -+ elseif(abs(aa(4)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(1)**2) -+ aa(2)=-aa(4)/rsq -+ aa(5)=aa(1)/rsq -+ aa(8)=0.d0 -+ -+ elseif(abs(aa(1)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(1)**2+aa(7)**2) -+ aa(2)=-aa(7)/rsq -+ aa(5)=0.d0 -+ aa(8)=aa(1)/rsq -+ -+ endif -+ -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+ call invert(aa,bb,det) -+ -+ if(abs(det).lt.1.d-5)call error(idnode,306) -+ -+ do j=1,9 -+ gaxs(id,j)=bb(j) -+ enddo -+ -+ elseif(ill.eq.0)then -+ -+c non-linear molecule -+ -+ i1=1 -+ i2=1 -+ i3=1 -+ pass1=.true. -+ dettest=1.d-1 -+ -+ do while(pass1.and.i2.lt.numgsit(id)-1) -+ -+ i2=i2+1 -+ i3=i2 -+ pass2=.true. -+ -+ do while(pass2.and.i3.lt.numgsit(id)) -+ -+ i3=i3+1 -+ -+ aa(1)=gxx(id,i1)-gxx(id,i2) -+ aa(4)=gyy(id,i1)-gyy(id,i2) -+ aa(7)=gzz(id,i1)-gzz(id,i2) -+ aa(2)=gxx(id,i1)-gxx(id,i3) -+ aa(5)=gyy(id,i1)-gyy(id,i3) -+ aa(8)=gzz(id,i1)-gzz(id,i3) -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+c invert matrix -+ -+ call invert(aa,bb,det) -+ -+c check on size of determinant - to see if the 3 sites are -+c too close to being linear for safety. -+ -+ pass2=abs(det).lt.dettest -+ -+ enddo -+ -+ pass1=abs(det).lt.dettest -+ -+ enddo -+ -+ if(abs(det).lt.dettest)call error(idnode,306) -+ -+c store indices used -+ -+ ind(id,1)=i1 -+ ind(id,2)=i2 -+ ind(id,3)=i3 -+ -+c store coefficients -+ -+ do j=1,9 -+ -+ gaxs(id,j)=bb(j) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c check that rigid unit does not contain frozen atoms -+ -+ safe=.true. -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ if(lstfrz(i).ne.0)safe=.false. -+ -+ enddo -+ -+ enddo -+ -+c global check on error condition -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,360) -+ -+c quaternions for all rigid groups in system -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ i1=lstrgd(jr+ind(id,1)) -+ i2=lstrgd(jr+ind(id,2)) -+ i3=lstrgd(jr+ind(id,3)) -+ -+ jr=jr+numgsit(id) -+ -+c group basis vectors -+ -+ aa(1)=xxx(i1)-xxx(i2) -+ aa(4)=yyy(i1)-yyy(i2) -+ aa(7)=zzz(i1)-zzz(i2) -+ -+ call images(imcon,0,1,1,cell,aa(1),aa(4),aa(7)) -+ -+ if(rotmin(id).gt.1.d-5)then -+ -+ aa(2)=xxx(i1)-xxx(i3) -+ aa(5)=yyy(i1)-yyy(i3) -+ aa(8)=zzz(i1)-zzz(i3) -+ -+ else -+ -+ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) -+ -+ if(abs(aa(7)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(7)**2) -+ aa(2)=0.d0 -+ aa(5)=aa(7)/rsq -+ aa(8)=-aa(4)/rsq -+ -+ elseif(abs(aa(4)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(1)**2) -+ aa(2)=-aa(4)/rsq -+ aa(5)=aa(1)/rsq -+ aa(8)=0.d0 -+ -+ elseif(abs(aa(1)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(1)**2+aa(7)**2) -+ aa(2)=-aa(7)/rsq -+ aa(5)=0.d0 -+ aa(8)=aa(1)/rsq -+ -+ endif -+ -+ endif -+ -+ call images(imcon,0,1,1,cell,aa(2),aa(5),aa(8)) -+ -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+c group rotational matrix -+ -+ rot(1)=gaxs(id,1)*aa(1)+gaxs(id,4)*aa(2)+gaxs(id,7)*aa(3) -+ rot(2)=gaxs(id,2)*aa(1)+gaxs(id,5)*aa(2)+gaxs(id,8)*aa(3) -+ rot(3)=gaxs(id,3)*aa(1)+gaxs(id,6)*aa(2)+gaxs(id,9)*aa(3) -+ rot(4)=gaxs(id,1)*aa(4)+gaxs(id,4)*aa(5)+gaxs(id,7)*aa(6) -+ rot(5)=gaxs(id,2)*aa(4)+gaxs(id,5)*aa(5)+gaxs(id,8)*aa(6) -+ rot(6)=gaxs(id,3)*aa(4)+gaxs(id,6)*aa(5)+gaxs(id,9)*aa(6) -+ rot(7)=gaxs(id,1)*aa(7)+gaxs(id,4)*aa(8)+gaxs(id,7)*aa(9) -+ rot(8)=gaxs(id,2)*aa(7)+gaxs(id,5)*aa(8)+gaxs(id,8)*aa(9) -+ rot(9)=gaxs(id,3)*aa(7)+gaxs(id,6)*aa(8)+gaxs(id,9)*aa(9) -+ -+c determine quaternions from rotational matrix -+ -+ aq=rot(1)+rot(5) -+ bq=rot(2)-rot(4) -+ cq=rot(6)-rot(8) -+ dq=rot(2)+rot(4) -+ eq=rot(3)+rot(7) -+ fq=rot(6)+rot(8) -+ gq=rot(3)-rot(7) -+ hq=rot(1)-rot(5) -+ -+ q0(ig)=0.5d0*sqrt(aq+sqrt(aq*aq+bq*bq)) -+ -+ if(q0(ig).gt.1.d-4)then -+ -+ q1(ig)=-0.25d0*cq/q0(ig) -+ q2(ig)=0.25d0*gq/q0(ig) -+ q3(ig)=-0.25d0*bq/q0(ig) -+ -+ else -+ -+ q1(ig)=0.5d0*sqrt(hq+sqrt(hq*hq+dq*dq)) -+ -+ if(q1(ig).gt.1.d-4)then -+ -+ q2(ig)=0.25d0*dq/q1(ig) -+ q3(ig)=0.25d0*eq/q1(ig) -+ -+ else -+ -+ q2(ig)=0.5d0*sqrt(-hq+sqrt(hq*hq+dq*dq)) -+ -+ if(q2(ig).gt.1.d-4)then -+ -+ q3(ig)=0.25d0*fq/q2(ig) -+ -+ else -+ -+ q3(ig)=1.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c normalise quaternions -+ -+ rnorm=1.d0/sqrt(q0(ig)**2+q1(ig)**2+q2(ig)**2+q3(ig)**2) -+ q0(ig)=rnorm*q0(ig) -+ q1(ig)=rnorm*q1(ig) -+ q2(ig)=rnorm*q2(ig) -+ q3(ig)=rnorm*q3(ig) -+ -+ enddo -+ -+c test for redundant degrees of freedom -+c and ensure rotational inertias are non-zero -+ -+ degrot=0.d0 -+ -+ if(lsolva)then -+ degrot_sol(:)=0.d0 -+ endif -+ -+ do ig=1,ngrp -+ -+ id=lstgtp(ig) -+ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1)) -+ -+ if(rotall*rotinx(id,1).lt.1.d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ if(rotall*rotiny(id,1).lt.1.d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ if(rotall*rotinz(id,1).lt.1d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ enddo -+ -+c rotational degrees of freedom and rigid body contribution -+c to total degrees of freedom -+ -+ degrot=degrot+dble(ngrp)*3.d0 -+ degfre=degrot+dble(ngrp)*3.d0 -+ -+ if(lsolva)then -+ -+ fngrp=1 -+ lngrp=0 -+ -+ do itmols=1,mxtmls -+ -+ lngrp=lngrp+nummols(itmols)*numgrp(itmols) -+ -+ do ig=fngrp,lngrp -+ -+ id=lstgtp(ig) -+ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1)) -+ -+ if(rotall*rotinx(id,1).lt.1.d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ if(rotall*rotiny(id,1).lt.1.d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ if(rotall*rotinz(id,1).lt.1d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ enddo -+ -+ fngrp=lngrp+1 -+ -+ enddo -+ -+ endif -+ -+c summarise results -+ -+ if(idnode.eq.0)then -+ -+ if(gmass(1).gt.0.d0)then -+ -+ write(nrite,'(/,/,12x,a)')' summary of rigid body set up' -+ -+ do id=1,mxungp -+ -+ if(gmass(id).gt.0.d0)then -+ -+ write(nrite,'(/,a,i10)')' group of type ',id -+ write(nrite,'(12x,a,f20.10)')' total mass ', -+ x gmass(id) -+ write(nrite,'(12x,a,3f20.10)')' rot. inertia ', -+ x rotinx(id,1),rotiny(id,1),rotinz(id,1) -+ write(nrite,'(/,12x,a,3(8x,a7))')' site','a coord', -+ x 'b coord','c coord' -+ do j=1,numgsit(id) -+ write(nrite,'(12x,i5,1p,3e15.5)')j,gxx(id,j), -+ x gyy(id,j),gzz(id,j) -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c find number of unique groups -+ -+ ngp=0 -+ do ig=1,ngrp -+ ngp=max(ngp,lstgtp(ig)) -+ enddo -+ -+c calculate reciprocal of rotational inertias -+ -+ do id=1,ngp -+ -+ rotlim=max(1.d-2,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1))*1.d-5 -+ -+ if(rotinx(id,1).lt.rotlim)then -+ rotinx(id,2)=0.d0 -+ else -+ rotinx(id,2)=1.d0/rotinx(id,1) -+ endif -+ -+ if(rotiny(id,1).lt.rotlim)then -+ rotiny(id,2)=0.d0 -+ else -+ rotiny(id,2)=1.d0/rotiny(id,1) -+ endif -+ -+ if(rotinz(id,1).lt.rotlim)then -+ rotinz(id,2)=0.d0 -+ else -+ rotinz(id,2)=1.d0/rotinz(id,1) -+ endif -+ -+ enddo -+ -+c Check of quaternion set up with atomic positions -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c group type -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 -+ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) -+ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) -+ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) -+ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 -+ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) -+ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) -+ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) -+ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxt(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyt(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzt(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ -+ txx(jr)=xxx(i)-xxt(i) -+ tyy(jr)=yyy(i)-yyt(i) -+ tzz(jr)=zzz(i)-zzt(i) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,jr,cell,txx,tyy,tzz) -+ -+c set tolerance for testing quaternion setup. -+ -+ rsq=0.d0 -+ tol=1.d-2 -+ -+ do i=1,jr -+ -+ rrr=txx(i)**2+tyy(i)**2+tzz(i)**2 -+ if(rrr.gt.tol)then -+ -+ rsq=rrr -+ -+ endif -+ -+ enddo -+ -+c exit if error in set up -+ -+ safe=.true. -+ if(rsq.gt.tol)safe=.false. -+ if(mxnode.gt.1)call gstate(safe) -+ -+ if(.not.safe)call error(idnode,310) -+ -+c sort lstgot into ascending order -+ -+ call shellsort(jt,lstgot) -+ -+c check that no site is in more than 1 rigid group -+ -+ i=1 -+ safe=.true. -+ do while(i.lt.jt) -+ -+ i=i+1 -+ linear=.true. -+ do while(linear) -+ -+ linear=.false. -+ -+ if(lstgot(i).eq.lstgot(i-1))then -+ -+ linear=.true. -+ safe=.false. -+ jt=jt-1 -+ -+ do j=i,jt -+ lstgot(j)=lstgot(j+1) -+ enddo -+ -+ endif -+ -+ if(i.ge.jt)linear=.false. -+ -+ enddo -+ -+ enddo -+ -+ if(.not.safe)call error(idnode,320) -+ -+c list of 'free' sites -+ -+ ii=1 -+ jj=0 -+ do i=1,natms -+ -+ if(lstgot(ii).eq.i)then -+ -+ ii=ii+1 -+ -+ else -+ -+ if(lstfrz(i).eq.0)then -+ jj=jj+1 -+ lstfre(jj)=i -+ endif -+ -+ endif -+ -+ enddo -+ -+c number of free sites -+ -+ ntfree=jj -+ -+c list of atoms integrated on this node -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ jr=jr+numgsit(id) -+ -+ enddo -+ -+ do i=1,jr -+ lstme(i)=lstrgd(i) -+ enddo -+ -+c block parameters for free atoms -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+ do i=ifre1,ifre2 -+ -+ jr=jr+1 -+ lstme(jr)=lstfre(i) -+ -+ enddo -+ -+c exchange quaternion data with other nodes -+ -+ if(mxnode.gt.1)call merge4 -+ x (idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+ if(lsolva)lstgot_sol(:)=lstgot(:) -+ -+c deallocate work arrays -+ -+ deallocate (ind,lstgot,stat=fail(1)) -+ deallocate (txx,tyy,tzz,stat=fail(2)) -+ deallocate (xxt,yyt,zzt,stat=fail(3)) -+ deallocate (gaxs,rotmin,stat=fail(4)) -+ deallocate (accum,stat=fail(5)) -+ -+ return -+ end subroutine quatbook -+ -+ subroutine abort_field_read(kode,idnode,nfield) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting FIELD file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nfield -+ -+ if(idnode.eq.0)close (nfield) -+ -+ if(kode.eq.1)then -+ -+c end of field file error exit -+ -+ call error(idnode,52) -+ -+ elseif(kode.eq.2)then -+ -+c unrecognised directive in field file -+ -+ call error(idnode,4) -+ -+ endif -+ -+ return -+ end subroutine abort_field_read -+ -+ subroutine abort_control_read(kode,idnode,nread) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting CONTROL file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nread -+ -+ if(idnode.eq.0)close (nread) -+ -+ if(kode.eq.1)then -+ -+c end of control file error exit -+ -+ call error(idnode,53) -+ -+ elseif(kode.eq.2)then -+ -+c general error exit from field file processing -+ -+ call error(idnode,0) -+ -+ endif -+ -+ return -+ end subroutine abort_control_read -+ -+ subroutine abort_config_read(kode,idnode,nconf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting CONTROL file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nconf -+ -+ if(idnode.eq.0)close (nconf) -+ -+ if(kode.eq.1)then -+ -+c general error exit from field file processing -+ -+ call error(idnode,54) -+ -+ elseif(kode.eq.2)then -+ -+c end of config file error exit -+ -+ call error(idnode,55) -+ -+ endif -+ -+ return -+ end subroutine abort_config_read -+ -+ subroutine neutbook(lneut,idnode,natms,nneut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for neutral group bookkeeping -+c -+c copyright - daresbury laboratory -+c author - w. smith nov 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lneut,safe -+ integer idnode,natms,nneut,i -+ -+ safe=.true. -+ -+c neutral group bookkeeping: sites must be listed consecutively -+ -+ if(lneut)then -+ -+ if(lstneu(1).ne.1)call error(idnode,230) -+ -+ neulst(1)=1 -+ nneut=1 -+ -+ do i=2,natms -+ -+ safe=.false. -+ if(lstneu(i).eq.lstneu(i-1))safe=.true. -+ if(lstneu(i).eq.lstneu(i-1)+1)then -+ -+ safe=.true. -+ nneut=nneut+1 -+ if(nneut.gt.mxneut)call error(idnode,220) -+ neulst(nneut)=i -+ -+ endif -+ -+ if(.not.safe)call error(idnode,230) -+ -+ enddo -+ -+ neulst(nneut+1)=natms+1 -+ -+ endif -+ -+ return -+ -+ end subroutine neutbook -+ -+ subroutine intlist -+ x (lshmov,lcnb,idnode,mxnode,natms,nscons,ntangl,ntbond, -+ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the interaction lists -+c for the entire simulated system -+c -+c parallel replicated dat version : block data -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992 -+c amended - t.forester oct 1993 -+c amended - t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,safe1,lcnb,lchk,lfail -+ integer idnode,mxnode,natms,nscons,ntangl,ntbond,ntcons -+ integer ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf -+ integer ibonds,jbonds,kbonds,ipmf,jpmf,iangle,jangle,kangle -+ integer idihed,jdihed,kdihed,iinver,jinver,kinver,iteths -+ integer jteths,kteths,ishels,jshels,kshels,ntbon0,ntpmf0 -+ integer ntang0,ntdih0,ntinv0,nttet0,ntshl0,ntcon0,idum -+ integer itmols,isite,iconst,jconst,kconst,ibnd1,ibnd2,ipmf1 -+ integer ipmf2,iang1,iang2,idih1,idih2,iinv1,iinv2,itet1 -+ integer itet2,ishl1,ishl2,imols,lbonds,lpmf,jj,nnn,langle -+ integer ldihed,linver,lteths,lshels,i,ii,ntmp,klo,khi,ngrp -+ integer klo0,ifail,iloop,nnode,nscons0,nscons1,icon,fail -+ integer kcons,id,jdnode,lconst,itry,iatom,jatom,j,nfail -+ real(8) tol -+ -+ integer, allocatable :: itest(:),index(:),kscons(:) -+ integer, allocatable :: msite(:),mconst(:),listin(:) -+ -+ dimension fail(4) -+ -+ data fail/0,0,0,0/ -+ -+c allocate work arrays -+ -+ allocate (itest(mxtmls),index(mxtmls),stat=fail(1)) -+ allocate (msite(mxtmls),mconst(mxtmls),stat=fail(2)) -+ allocate (listin(mxatms),stat=fail(3)) -+ allocate (kscons(0:mxproc-1),stat=fail(4)) -+ do i=1,4 -+ if(fail(i).ne.0)call error(idnode,1800) -+ enddo -+ -+c initialise bookkeeping indices -+ -+ ibonds=0 -+ jbonds=0 -+ kbonds=0 -+ ipmf=0 -+ jpmf=0 -+ iangle=0 -+ jangle=0 -+ kangle=0 -+ idihed=0 -+ jdihed=0 -+ kdihed=0 -+ iinver=0 -+ jinver=0 -+ kinver=0 -+ iteths=0 -+ jteths=0 -+ kteths=0 -+ ishels=0 -+ jshels=0 -+ kshels=0 -+ safe=.true. -+ safe1=.true. -+ -+c find total number of bonds,pmf constraints,bond constraints, -+c angles,dihedrals,inversions, tethers,core-shells, in system -+c - ignoring frozen atoms -+ -+ ntbon0=0 -+ ntpmf0=0 -+ ntcon0=0 -+ ntang0=0 -+ ntdih0=0 -+ ntinv0=0 -+ nttet0=0 -+ ntshl0=0 -+ nscons=0 -+ ntcons=0 -+ -+ do itmols=1,ntpmls -+ -+ ntbon0=ntbon0+nummols(itmols)*numbonds(itmols) -+ ntpmf0=ntpmf0+nummols(itmols)*numpmf(itmols) -+ ntcon0=ntcon0+nummols(itmols)*numcon(itmols) -+ ntang0=ntang0+nummols(itmols)*numang(itmols) -+ ntdih0=ntdih0+nummols(itmols)*numdih(itmols) -+ ntinv0=ntinv0+nummols(itmols)*numinv(itmols) -+ nttet0=nttet0+nummols(itmols)*numteth(itmols) -+ ntshl0=ntshl0+nummols(itmols)*numshl(itmols) -+ -+ enddo -+ -+ isite=0 -+ iconst=0 -+ jconst=0 -+ kconst=0 -+ -+c first and last index of bonds, angles etc for this node -+ -+ ibnd1=(idnode*ntbon0)/mxnode+1 -+ ibnd2=((idnode+1)*ntbon0)/mxnode -+ -+ ipmf1=(idnode*ntpmf0)/mxnode+1 -+ ipmf2=((idnode+1)*ntpmf0)/mxnode -+ ntpmf=ntpmf0 -+ nspmf=ipmf2+1-ipmf1 -+ -+ iang1=(idnode*ntang0)/mxnode+1 -+ iang2=((idnode+1)*ntang0)/mxnode -+ -+ idih1=(idnode*ntdih0)/mxnode+1 -+ idih2=((idnode+1)*ntdih0)/mxnode -+ -+ iinv1=(idnode*ntinv0)/mxnode+1 -+ iinv2=((idnode+1)*ntinv0)/mxnode -+ -+ itet1=(idnode*nttet0)/mxnode+1 -+ itet2=((idnode+1)*nttet0)/mxnode -+ -+ ishl1=(idnode*ntshl0)/mxnode+1 -+ ishl2=((idnode+1)*ntshl0)/mxnode -+ -+c loop over molecule types -+ -+ do itmols=1,ntpmls -+ -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct bond constraint list later -+c construct chemical bond interaction list -+ -+ do lbonds=1,numbonds(itmols) -+ -+ ibonds=ibonds+1 -+ -+ if(ibonds.ge.ibnd1.and.ibonds.le.ibnd2)then -+ -+ jbonds=jbonds+1 -+ if(jbonds.le.mxbond)then -+ -+ listbnd(jbonds,1)=lbonds+kbonds -+ listbnd(jbonds,2)=lstbnd(lbonds+kbonds,1) -+ x +isite -+ listbnd(jbonds,3)=lstbnd(lbonds+kbonds,2) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,31) -+ -+c construct pmf site lists - no exclusions -+ -+ do lpmf=1,numpmf(itmols) -+ -+ ipmf=ipmf+1 -+ -+ if(ipmf.ge.ipmf1.and.ipmf.le.ipmf2)then -+ -+ jpmf=jpmf+1 -+ if(jpmf.le.mspmf)then -+ -+ nnn=npmf(1)+npmf(2) -+ if(nnn.le.mxspmf)then -+ -+ do jj=1,npmf(1)+npmf(2) -+ lstpmf(jj,jpmf)=indpmf(jj)+isite -+ enddo -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ else -+ -+ safe1=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe1) -+ if(.not.safe1)call error(idnode,458) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,460) -+ -+c construct valence angle interaction list -+ -+ do langle=1,numang(itmols) -+ -+ iangle=iangle+1 -+ -+ if(iangle.ge.iang1.and.iangle.le.iang2)then -+ -+ jangle=jangle+1 -+ if(jangle.le.mxangl)then -+ -+ listang(jangle,1)=langle+kangle -+ listang(jangle,2)=lstang(langle+kangle,1) -+ x +isite -+ listang(jangle,3)=lstang(langle+kangle,2) -+ x +isite -+ listang(jangle,4)=lstang(langle+kangle,3) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,51) -+ -+c construct dihedral angle interaction list -+ -+ do ldihed=1,numdih(itmols) -+ -+ idihed=idihed+1 -+ -+ if(idihed.ge.idih1.and.idihed.le.idih2)then -+ -+ jdihed=jdihed+1 -+ if(jdihed.le.mxdihd)then -+ -+ listdih(jdihed,1)=ldihed+kdihed -+ listdih(jdihed,2)=lstdih(ldihed+kdihed,1) -+ x +isite -+ listdih(jdihed,3)=lstdih(ldihed+kdihed,2) -+ x +isite -+ listdih(jdihed,4)=lstdih(ldihed+kdihed,3) -+ x +isite -+ listdih(jdihed,5)=lstdih(ldihed+kdihed,4) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,61) -+ -+c construct inversion potential list -+ -+ do linver=1,numinv(itmols) -+ -+ iinver=iinver+1 -+ -+ if(iinver.ge.iinv1.and.iinver.le.iinv2)then -+ -+ jinver=jinver+1 -+ if(jinver.le.mxinv)then -+ -+ listinv(jinver,1)=linver+kinver -+ listinv(jinver,2)=lstinv(linver+kinver,1) -+ x +isite -+ listinv(jinver,3)=lstinv(linver+kinver,2) -+ x +isite -+ listinv(jinver,4)=lstinv(linver+kinver,3) -+ x +isite -+ listinv(jinver,5)=lstinv(linver+kinver,4) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,77) -+ -+c construct tethered atoms interaction list -+ -+ do lteths=1,numteth(itmols) -+ -+ iteths=iteths+1 -+ -+ if(iteths.ge.itet1.and.iteths.le.itet2)then -+ -+ jteths=jteths+1 -+ if(jteths.le.msteth)then -+ -+ listtet(jteths,1)=lteths+kteths -+ listtet(jteths,2)=lsttet(lteths+kteths)+isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,63) -+ -+c construct core-shell list -+ -+ do lshels=1,numshl(itmols) -+ -+ ishels=ishels+1 -+ -+ if(ishels.ge.ishl1.and.ishels.le.ishl2)then -+ -+ jshels=jshels+1 -+ if(jshels.le.mxshl)then -+ -+ listshl(jshels,1)=lshels+kshels -+ listshl(jshels,2)=lstshl(lshels+kshels,1) -+ x +isite -+ listshl(jshels,3)=lstshl(lshels+kshels,2) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,59) -+ -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ kbonds=kbonds+numbonds(itmols) -+ kangle=kangle+numang(itmols) -+ kdihed=kdihed+numdih(itmols) -+ kinver=kinver+numinv(itmols) -+ kteths=kteths+numteth(itmols) -+ kshels=kshels+numshl(itmols) -+ -+ enddo -+ -+c store array counters for bookkeeping -+ -+ ntbond=ibonds -+ ntangl=iangle -+ ntdihd=idihed -+ ntinv=iinver -+ ntteth=iteths -+ ntshl=ishels -+ -+c pass bond constraint information to other nodes -+ -+ if(ntcon0.gt.0)then -+ -+ ntcons=ntcon0 -+ -+c find starting site no. and constraint no. for each molec. type -+ -+ msite(1)=0 -+ mconst(1)=0 -+ -+ do itmols=2,ntpmls -+ -+ msite(itmols)=msite(itmols-1)+numsit(itmols-1)* -+ x nummols(itmols-1) -+ mconst(itmols)=mconst(itmols-1)+numcon(itmols-1) -+ -+ enddo -+ -+c sort molecules into ascending order of number of constraints -+ -+ do i=1,ntpmls -+ -+ itest(i)=numcon(i) -+ index(i)=0 -+ -+ enddo -+ -+ call shellsort(ntpmls,itest) -+ -+ do i=1,ntpmls -+ -+ lchk=.true. -+ do j=1,ntpmls -+ -+ if(itest(i).eq.numcon(j))then -+ -+ if(lchk)then -+ index(i)=j -+ lchk=.false. -+ -+ endif -+ -+ do ii=1,i-1 -+ if(index(ii).eq.j)lchk=.true. -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c load balance to within 10% -+ -+ tol=1.0d0+(0.10d0)/2.d0 -+ kcons=(ntcons)/mxnode -+ ntmp=0 -+ -+c find smallest constrained molecule to allocate to a node -+ -+ do i=1,ntpmls -+ -+ if(ntmp.le.mxnode)then -+ -+ if(numcon(index(i)).gt.0)then -+ ntmp=ntmp+nummols(index(i)) -+ klo=max(0,kcons-numcon(index(i))/2) -+ khi=klo+numcon(index(i))+1 -+ endif -+ -+ endif -+ -+ enddo -+ -+c reset hi/lo limits if molecules contain too many constraints -+ -+ if(dble(khi)/dble(max(1,klo)).gt.tol)then -+ klo=nint(dble(kcons)/tol) -+ khi=nint(dble(kcons)*tol)+1 -+ endif -+ -+c store lo value for later -+ -+ klo0=klo -+ -+c begin assignment of constraints ---------------------------------- -+ -+ ifail=-1 -+ lfail=.true. -+ do while(lfail) -+ -+ ifail=ifail+1 -+ -+ if(ifail.gt.ntpmls)then -+ call error(idnode,432) -+ endif -+ -+ iconst=0 -+ jconst=0 -+ kconst=0 -+ lconst=0 -+ -+c zero running totals of constraints on each processor -+ -+ do id=0,mxnode-1 -+ kscons(id)=0 -+ enddo -+ -+ iloop=0 -+ lfail=.false. -+ iconst=0 -+ jconst=0 -+ nnode=0 -+ -+c assign difficult molecules in blocks -+ -+ if(ifail.gt.0)then -+ -+ nfail=0 -+ do i=1,ifail -+ -+ ii=ntpmls+1-i -+ nfail=nfail+nummols(index(ii))*numcon(index(ii)) -+ -+ enddo -+ -+c decide on number of processors to split over -+ -+ nnode=int(dble(nfail)/dble(max(kcons,1))+1.d0/tol) -+ nnode=max(2,nnode) -+ nnode=min(nnode,mxnode) -+ -+c assign to processors 0..nnode-1 -+ -+ do id=0,nnode-1 -+ -+ nscons0=(id*nfail)/nnode+1 -+ nscons1=((id+1)*nfail)/nnode -+ -+ kscons(id)=nscons1+1-nscons0 -+ -+ enddo -+ -+c this processors block -+ -+ nscons0=(idnode*nfail)/nnode+1 -+ nscons1=((idnode+1)*nfail)/nnode -+ -+c assign in blocks -+ -+ do itmols=ntpmls,ntpmls-ifail+1,-1 -+ -+ ii=index(itmols) -+ icon=numcon(ii) -+ kconst=mconst(ii) -+ -+ do imols=1,nummols(ii) -+ -+ isite=msite(ii)+(imols-1)*numsit(ii) -+ -+c construct bond constraint list -+ -+ do lconst=1,numcon(ii) -+ -+ iconst=iconst+1 -+ -+ if(iconst.ge.nscons0.and.iconst.le.nscons1)then -+ -+ jconst=jconst+1 -+ -+ if(jconst.le.mxcons)then -+ -+ listcon(jconst,1)=lconst+kconst -+ iatom=lstcon(lconst+kconst,1)+isite -+ jatom=lstcon(lconst+kconst,2)+isite -+ -+ listcon(jconst,2)=iatom -+ listcon(jconst,3)=jatom -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c assign non-problematic molecules -+ -+ jdnode=mod(nnode+1,mxnode) -+ -+ do itmols=ntpmls-ifail,1,-1 -+ -+ ii=index(itmols) -+ icon=numcon(ii) -+ kconst=mconst(ii) -+ -+ do imols=1,nummols(ii) -+ -+ itry=0 -+ lchk=.true. -+ do while(lchk) -+ -+ if(kscons(jdnode)+icon.le.klo)then -+ -+ if(jdnode.ne.idnode)then -+ kscons(jdnode)=kscons(jdnode)+icon -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.false. -+ else -+ -+c construct bond constraint list -+ -+ isite=msite(ii)+(imols-1)*numsit(ii) -+ do lconst=1,numcon(ii) -+ -+ jconst=jconst+1 -+ -+ if(jconst.le.mxcons)then -+ -+ listcon(jconst,1)=lconst+kconst -+ iatom=lstcon(lconst+kconst,1)+isite -+ jatom=lstcon(lconst+kconst,2)+isite -+ listcon(jconst,2)=iatom -+ listcon(jconst,3)=jatom -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ kscons(jdnode)=kscons(jdnode)+icon -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.false. -+ -+ endif -+ -+ else -+ -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.true. -+ itry=itry+1 -+ -+ endif -+ -+ if(lchk.and.itry.gt.mxnode)then -+ -+ klo=kcons -+ kcons=khi -+ itry=0 -+ iloop=iloop+1 -+ -+ endif -+ -+c split molecule across nodes if have to -+ -+ if(iloop.gt.3)then -+ lfail=.true. -+ kcons=ntcons/mxnode -+ klo=klo0 -+ lchk=.false. -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c check no node has less than minimum number -+ -+ do id=0,mxnode-1 -+ if(kscons(id).lt.klo0)then -+ lfail=.true. -+ endif -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)then -+ -+ if(mxnode.gt.1)call gimax(jconst,1,idum) -+ if(idnode.eq.0)write(nrite,'(a,i10,a,i10)') -+ x 'Number of constraints found ',jconst,'Max allowed ',mxcons -+ -+ call error(idnode,41) -+ -+ endif -+ -+ nscons=kscons(idnode) -+ -+ call passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+ endif -+ -+ if(npmf(1).gt.0)then -+ -+ call passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+ endif -+ -+c pass rigid body data -+ -+ lcnb=.false. -+ if(ntcons.gt.0.and.ngrp.gt.0)then -+ -+ call passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp, -+ x numgsit) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(itest,index,msite,stat=fail(1)) -+ deallocate(mconst,kscons,listin,stat=fail(2)) -+ -+ return -+ end subroutine intlist -+ -+ subroutine ensemble_selection -+ x (directive,lens,kill,idnode,keyens,mode,taut,taup) -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the ensemble and reading -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical kill,lens -+ integer keyens,idnode,idum,mode -+ real(8) taut,taup -+ -+ if(findstring('nve',directive,idum))then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'microcanonical ensemble')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('nvt',directive,idum))then -+ -+ if(findstring('evans',directive,idum))then -+ -+ keyens=1 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Evans Gaussian temperature constraints', -+ x ' in use')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('ber',directive,idum))then -+ -+ keyens=2 -+ taut=dblstr(directive,69,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen thermostat', -+ x /,1x,'thermostat relaxation time ',1p,e12.4)") -+ x taut -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=3 -+ taut=dblstr(directive,69,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4)") -+ x taut -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ elseif(findstring('npt',directive,idum))then -+ -+ if(findstring('ber',directive,idum))then -+ -+ keyens=4 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen isotropic N-P-T', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=5 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover (Melchionna) isotropic N-P-T ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ elseif(findstring('nst',directive,idum))then -+ -+ mode=0 -+ if(findstring('block',directive,idum))mode=1 -+ if(findstring('surf',directive,idum))mode=2 -+ if(findstring('slab',directive,idum))mode=3 -+ -+ if(findstring('ber',directive,idum))then -+ -+ keyens=6 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen anisotropic N-P-T', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=7 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover (Melchionna) anisotropic N-P-T ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ if(mode.eq.0)then -+ write(nrite,"(/,1x,'NST mode 0 X<>Y<>Z')") -+ elseif(mode.eq.1)then -+ write(nrite, -+ x "(/,1x,'NST mode 1 X<>Y<>Z (rectangular block)')") -+ elseif(mode.eq.2)then -+ write(nrite, -+ x "(/,1x,'NST mode 2 X=Y<>Z (liquid surface)')") -+ elseif(mode.eq.3)then -+ write(nrite, -+ x "(/,1x,'NST mode 3 X<>Y<>Z (solid slab)')") -+ endif -+ -+ endif -+ -+ elseif(findstring('pmf',directive,idum))then -+ -+ keyens=8 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'potential of mean force calculation (NVE)')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ call error(idnode,-436) -+ kill=.true. -+ -+ endif -+ -+ return -+ end subroutine ensemble_selection -+ -+ subroutine neb_option -+ x (directive,lneb,lminopt,idnode,numneb,keytol,sprneb, -+ x opttol,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for NEB option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit -+ character*1 directive(lenrec) -+ logical lneb,lminopt,endneb,safe -+ integer numneb,idnode,keytol,i,idum -+ real(8) sprneb,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ lminopt=.true. -+ lneb=.true. -+ endneb=.false. -+ numneb=intstr(directive,lenrec,idum) -+ if(numneb.eq.0)numneb=1 -+ numneb=min(maxneb,numneb) -+ -+ hyp_units=1.d0 -+ do while(.not.endneb) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endneb',directive,idum))then -+ endneb=.true. -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('basin_1',directive,idum))then -+ call striptext(directive,lenrec,1) -+ do i=1,numneb -+ bsn_1(i)=intstr(directive,lenrec,idum) -+ enddo -+ elseif(findstring('basin_2',directive,idum))then -+ call striptext(directive,lenrec,1) -+ do i=1,numneb -+ bsn_2(i)=intstr(directive,lenrec,idum) -+ enddo -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,1x,'NEB calculation controls')") -+ write(nrite,"(/,1x,'identity of basin 1 ', -+ x 10i10)")(bsn_1(i),i=1,numneb) -+ write(nrite,"(1x,'identity of basin 2 ', -+ x 10i10)")(bsn_2(i),i=1,numneb) -+ write(nrite, -+ x "(1x,'NEB spring constant ',e12.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'energy units ',2x,a8)") -+ x sprneb,opttol,cunit -+ -+ call print_optim(keytol) -+ -+ endif -+ -+c units conversion -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ return -+ end subroutine neb_option -+ -+ subroutine bpd_option -+ x (directive,seek,lbpd,ltad,lminopt,prechk,nebgo,keybpd,idnode, -+ x nblock,ntrack,keytol,ebias,vmin,catchrad,sprneb,opttol, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for bias potential -+c dynamics option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit,seek -+ character*1 directive(lenrec) -+ logical lbpd,ltad,lminopt,prechk,endbpd,safe,nebgo -+ integer keybpd,idnode,nblock,ntrack,keytol,idum -+ real(8) ebias,vmin,catchrad,sprneb,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ if(ltad)call error(idnode,2355) -+ lminopt=.true. -+ lbpd=.true. -+ endbpd=.false. -+ cunit=" dl_poly" -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'bias potential dynamics controls')") -+ -+ if(findstring('dyn',directive,idum))then -+ -+ keybpd=1 -+ hyp_units=energy_unit() -+ ebias=dblstr(directive,lenrec,idum) -+ vmin=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ if(idnode.eq.0)write(nrite,"( -+ x 1x,'dynamics option selected ', -+ x /,1x,'bias potential E_bias (kelvin)',f10.4, -+ x /,1x,'bias potential V_min (kelvin)',f10.4 -+ x /,1x,'energy units ',2x,a8)") -+ x ebias,vmin,cunit -+ -+ elseif(findstring('path',directive,idum))then -+ -+ keybpd=2 -+ nebgo=.true. -+ hyp_units=1.d0 -+ do while(.not.endbpd) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endbpd',directive,idum))then -+ endbpd=.true. -+ elseif(findstring('pre',directive,idum))then -+ prechk=.true. -+ if(findstring('false',directive,idum))prechk=.false. -+ elseif(findstring('noneb',directive,idum))then -+ nebgo=.false. -+ elseif(findstring('target',directive,idum))then -+ call getword(seek,directive,8,lenrec) -+ call getword(seek,directive,8,lenrec) -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('ebias',directive,idum))then -+ ebias=dblstr(directive,lenrec,idum) -+ elseif(findstring('vmin',directive,idum))then -+ vmin=dblstr(directive,lenrec,idum) -+ elseif(findstring('num_block',directive,idum))then -+ nblock=intstr(directive,lenrec,idum) -+ elseif(findstring('num_track',directive,idum))then -+ ntrack=intstr(directive,lenrec,idum) -+ elseif(findstring('catch_radius',directive,idum))then -+ catchrad=dblstr(directive,lenrec,idum) -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"( -+ x 1x,'dynamics with path analysis selected', -+ x /,1x,'bias potential E_bias (kelvin)',f10.4, -+ x /,1x,'bias potential V_min (kelvin)',f10.4, -+ x /,1x,'steps per time block ',i10, -+ x /,1x,'steps per tracking block ',i10, -+ x /,1x,'configuration catch radius (A)',f10.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'atom type to be tracked ',2x,a8, -+ x /,1x,'energy units ',2x,a8)") -+ x ebias,vmin,nblock,ntrack,catchrad,opttol,seek,cunit -+ if(nebgo)write(nrite, -+ x "(1x,'NEB spring constant ',e12.4)")sprneb -+ if(prechk)write(nrite, -+ x "(1x,'transition prechecking option selected')") -+ call print_optim(keytol) -+ -+ endif -+ -+c energy unit conversions -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ endif -+ -+ return -+ end subroutine bpd_option -+ -+ subroutine tad_option -+ x (directive,ltad,lbpd,lminopt,prechk,tadall,idnode,nblock, -+ x ntrack,blkout,keytol,catchrad,sprneb,tlow,deltad,opttol, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for TAD option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit -+ character*1 directive(lenrec) -+ logical ltad,lbpd,lminopt,prechk,tadall,endtad,safe -+ integer idnode,nblock,ntrack,blkout,keytol,idum -+ real(8) catchrad,sprneb,deltad,tlow,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ if(lbpd)call error(idnode,2355) -+ lminopt=.true. -+ ltad=.true. -+ endtad=.false. -+ hyp_units=1.d0 -+ -+ do while(.not.endtad) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endtad',directive,idum))then -+ endtad=.true. -+ elseif(findstring('pre',directive,idum))then -+ prechk=.true. -+ if(findstring('false',directive,idum))prechk=.false. -+ elseif(findstring('all',directive,idum))then -+ tadall=.true. -+ if(findstring('false',directive,idum))tadall=.false. -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('num_block',directive,idum))then -+ nblock=intstr(directive,lenrec,idum) -+ elseif(findstring('num_track',directive,idum))then -+ ntrack=intstr(directive,lenrec,idum) -+ elseif(findstring('blackout',directive,idum))then -+ blkout=intstr(directive,lenrec,idum) -+ elseif(findstring('catch_radius',directive,idum))then -+ catchrad=dblstr(directive,lenrec,idum) -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('deltad',directive,idum))then -+ deltad=dblstr(directive,lenrec,idum) -+ elseif(findstring('low_temp',directive,idum))then -+ tlow=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'TAD dynamics controls' -+ x /,1x,'steps per time block ',i10, -+ x /,1x,'steps per tracking block ',i10, -+ x /,1x,'steps in blackout periods ',i10, -+ x /,1x,'configuration catch radius ',1p,e12.4, -+ x /,1x,'NEB spring constant ',e12.4, -+ x /,1x,'stopping parameter ',e12.4, -+ x /,1x,'target low temperature ',e12.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'energy units ',2x,a8)") -+ x nblock,ntrack,blkout,catchrad,sprneb,deltad, -+ x tlow,opttol,cunit -+ if(prechk)write(nrite, -+ x "(1x,'transition prechecking option selected')") -+ if(tadall)write(nrite, -+ x "(1x,'option for all basins analysis selected')") -+ call print_optim(keytol) -+ -+ endif -+ -+c energy unit conversions -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ return -+ end subroutine tad_option -+ -+ subroutine metadyn_option -+ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, -+ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, -+ x locpe_scale,ref_W_aug,h_aug,wt_Dt) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for metadynamics option -+c copyright - daresbury laboratory -+c author - w. smith jan 2011 -+c -+c note: default values are set in metafreeze_module -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lmetadyn,endmet,lstein,ltet,lglobpe,llocpe,safe -+ integer idnode,idum,ncolvar,nq4,nq6,ntet,hkey,meta_step_int -+ real(8) globpe_scale,locpe_scale,ref_W_aug,h_aug,wt_Dt -+ -+ lmetadyn=.true. -+ endmet=.false. -+ -+ do while(.not.endmet) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endmet',directive,idum))then -+ endmet=.true. -+ elseif(findstring('ncolvar',directive,idum))then -+ ncolvar=intstr(directive,lenrec,idum) -+ elseif(findstring('lstein',directive,idum))then -+ lstein=.true. -+ if(findstring('false',directive,idum))lstein=.false. -+ elseif(findstring('ltet',directive,idum))then -+ ltet=.true. -+ if(findstring('false',directive,idum))ltet=.false. -+ elseif(findstring('lglobpe',directive,idum))then -+ lglobpe=.true. -+ if(findstring('false',directive,idum))lglobpe=.false. -+ elseif(findstring('llocpe',directive,idum))then -+ llocpe=.true. -+ if(findstring('false',directive,idum))llocpe=.false. -+ elseif(findstring('globpe_scale',directive,idum))then -+ globpe_scale=dblstr(directive,lenrec,idum) -+ elseif(findstring('locpe_scale',directive,idum))then -+ locpe_scale=dblstr(directive,lenrec,idum) -+ elseif(findstring('nq4',directive,idum))then -+ nq4=intstr(directive,lenrec,idum) -+ nq4=intstr(directive,lenrec,idum) ! do twice - number in name! -+ elseif(findstring('nq6',directive,idum))then -+ nq6=intstr(directive,lenrec,idum) -+ nq6=intstr(directive,lenrec,idum) ! do twice - number in name! -+ elseif(findstring('ntet',directive,idum))then -+ ntet=intstr(directive,lenrec,idum) -+ elseif(findstring('meta_step_int',directive,idum))then -+ meta_step_int=intstr(directive,lenrec,idum) -+ elseif(findstring('ref_w_aug',directive,idum))then -+ ref_W_aug=dblstr(directive,lenrec,idum) -+ elseif(findstring('h_aug',directive,idum))then -+ h_aug=dblstr(directive,lenrec,idum) -+ elseif(findstring('hkey',directive,idum))then -+ hkey=intstr(directive,lenrec,idum) -+ elseif(findstring('wt_dt',directive,idum))then -+ wt_dt=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'metadynamics controls' -+ x /,1x,'total number of collective variables',i10, -+ x /,1x,'steinhardt parameters option (Q4/Q6)',l10, -+ x /,1x,'tetrahedral parameters option (zeta)',l10, -+ x /,1x,'global potential parameter option ',l10, -+ x /,1x,'local potential parameter option ',l10, -+ x /,1x,'global potential param. scale factor',e12.4, -+ x /,1x,'local potential param. scale factor ',e12.4)") -+ x ncolvar,lstein,ltet,lglobpe,llocpe,globpe_scale,locpe_scale -+ -+ write(nrite, -+ x "( 1x,'number of Q4 atom pair types ',i10, -+ x /,1x,'number of Q6 atom pair types ',i10, -+ x /,1x,'number of zeta atom triplet types ',i10)") -+ x nq4,nq6,ntet -+ -+ write(nrite, -+ x "( 1x,'gaussian deposition interval ',i10, -+ x /,1x,'reference gaussian height ',e12.4, -+ x /,1x,'gaussian width parameter ',e12.4, -+ x /,1x,'height control key ',i10, -+ x /,1x,'well-tempered control parameter ',e12.4)") -+ x meta_step_int,ref_W_aug,h_aug,hkey,wt_Dt -+ -+ endif -+ -+ return -+ end subroutine metadyn_option -+ -+ subroutine ewald_selection -+ x (directive,lhke,lspme,lewald,lcut,lforc,kill,idnode,keyfce, -+ x imcon,nhko,nlatt,kmax1,kmax2,kmax3,alpha,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the ewald method and reading -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lhke,lspme,lewald,lcut,lforc,kill,safe -+ integer idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2,kmax3,idum -+ integer kmaxpow2 -+ real(8) alpha,rcut,eps,tol,fac,tol1 -+ -+ lhke=findstring('hke',directive,idum) -+ lspme=findstring('spme',directive,idum) -+ lewald=findstring('ewald',directive,idum) -+ if(lewald)keyfce=2 -+ if(lspme)keyfce=12 -+ if(lhke)keyfce=14 -+ if(idnode.eq.0)open(nconf,file='CONFIG') -+ call getrec(safe,idnode,nconf) -+ call getrec(safe,idnode,nconf) -+ imcon=intstr(record,lenrec,idum) -+ imcon=intstr(record,lenrec,idum) -+ if(.not.lhke.and.(imcon.eq.0.or.imcon.eq.6))then -+ -+ call error(idnode,-180) -+ kill=.true. -+ -+ endif -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Ewald sum precision ',7x,1p,e12.4)")eps -+ -+ if(lhke)then -+ -+ nhko=min(intstr(directive,lenrec,idum),3) -+ nlatt=min(intstr(directive,lenrec,idum),2) -+ if(nlatt.eq.0)nlatt=1 -+ if(nhko.eq.0)nhko=1 -+ -+ endif -+ -+ if(.not.lcut)then -+ call error(idnode,-433) -+ kill=.true. -+ else -+ -+c retreive cell vectors -+ -+ call getrec(safe,idnode,nconf) -+ cell(1)=dblstr(record,lenrec,idum) -+ cell(2)=dblstr(record,lenrec,idum) -+ cell(3)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ cell(4)=dblstr(record,lenrec,idum) -+ cell(5)=dblstr(record,lenrec,idum) -+ cell(6)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ cell(7)=dblstr(record,lenrec,idum) -+ cell(8)=dblstr(record,lenrec,idum) -+ cell(9)=dblstr(record,lenrec,idum) -+ -+c compute alpha and the kmax -+ -+ if(lewald.or.lspme)then -+ -+ call dcell(cell,celprp) -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) -+ fac=1.d0 -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x fac=2.d0**(1.d0/3.d0) -+ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) -+ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) -+ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) -+ -+ elseif(lhke)then -+ -+ if(nhko.eq.0)then -+ if(eps.le.1.d-6)then -+ alpha=3.46d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=3.14d0/rcut -+ else -+ alpha=2.76d0/rcut -+ endif -+ elseif(nhko.eq.1)then -+ if(eps.le.1.d-6)then -+ alpha=4.37d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.08d0/rcut -+ else -+ alpha=3.75d0/rcut -+ endif -+ elseif(nhko.eq.2)then -+ if(eps.le.1.d-6)then -+ alpha=5.01d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.74d0/rcut -+ else -+ alpha=4.44d0/rcut -+ endif -+ elseif(nhko.eq.3)then -+ if(eps.le.1.d-6)then -+ alpha=5.55d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=5.28d0/rcut -+ else -+ alpha=5.00d0/rcut -+ endif -+ endif -+ alpha=alpha/dble(2*nlatt+1) -+ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 -+ call dcell(cell,celprp) -+ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) -+ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) -+ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) -+ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) -+ kmax3=1 -+ -+ endif -+ -+ endif -+ -+ else -+ -+ alpha=dblstr(directive,lenrec,idum) -+ kmax1=intstr(directive,lenrec,idum) -+ kmax2=intstr(directive,lenrec,idum) -+ -+ if(lhke)then -+ -+ kmax3=1 -+ nhko=min(intstr(directive,lenrec,idum),3) -+ nlatt=min(intstr(directive,lenrec,idum),2) -+ -+ else -+ -+ kmax3=intstr(directive,lenrec,idum) -+ -+ endif -+ -+ endif -+ -+c if spme double kmax and set to next power of 2, with current upper -+c limit of 512. -+ -+ if(lspme)then -+ -+ kmaxpow2=1 -+ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax1=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax2=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax3=2 * kmaxpow2 -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ close(nconf) -+ -+ if(lspme)then -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : SPME ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") -+ x alpha,kmax1/2,kmax2/2,kmax3/2 -+ -+ elseif(lhke)then -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : Hautman-Klein-Ewald sum ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 ',2i5)") -+ x alpha,kmax1,kmax2 -+ -+ write(nrite, -+ x "(1x,'HKE expansion order ',7x,i10, -+ x /,1x,'HKE lattice control ',7x,i10)")nhko,nlatt -+ -+ else -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : Ewald sum ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") -+ x alpha,kmax1,kmax2,kmax3 -+ -+ endif -+ -+ endif -+ -+ if(lspme)then -+ -+c Initialize fft tables -+ -+CFFTW call fftw3d_f77_create_plan -+CFFTW x (fplan,kmaxd,kmaxe,kmaxf, -+CFFTW x FFTW_FORWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) -+CFFTW -+CFFTW call fftw3d_f77_create_plan -+CFFTW x (bplan,kmaxd,kmaxe,kmaxf, -+CFFTW x FFTW_BACKWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) -+ -+CSGIC call zzfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, -+CSGIC x dummy,1,1,ffttable,dummy,dummy ) -+ -+CCRAY call ccfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, -+CCRAY x dummy,1,1,ffttable,dummy,dummy ) -+ -+ endif -+ -+ if(lspme)then -+ -+ if(kmax1.gt.kmaxd.or.kmax2.gt.kmaxe.or.kmax3.gt.kmaxf)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ elseif(lhke)then -+ -+ if(kmax2.gt.kmaxb)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ else -+ -+ if(kmax2.gt.kmaxb.or.kmax3.gt.kmaxc)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ lforc=.true. -+ -+ return -+ end subroutine ewald_selection -+ -+ subroutine print_optim(keytol) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for printing the optimisation option -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer keytol -+ -+ if(keytol.eq.0)then -+ write(nrite, -+ x "(1x,'convergence to minimum force selected')") -+ elseif(keytol.eq.1)then -+ write(nrite, -+ x "(1x,'convergence to minimum energy selected')") -+ else -+ write(nrite, -+ x "(1x,'convergence to minimum position selected')") -+ endif -+ -+ return -+ end subroutine print_optim -+ -+ function energy_unit() -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for assigning energy conversion factors -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idum -+ real(8) energy_unit -+ -+ energy_unit=1.d0 -+ if(findstring('ev',record,idum))then -+ energy_unit=9648.530821d0 -+ elseif(findstring('kev',record,idum))then -+ energy_unit=9648530.821d0 -+ elseif(findstring('kcal',record,idum))then -+ energy_unit=418.4d0 -+ elseif(findstring('kj',record,idum))then -+ energy_unit=1.d2 -+ elseif(findstring('k',record,idum))then -+ energy_unit=boltz -+ endif -+ -+ return -+ end function energy_unit -+ -+ subroutine solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for solvation option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,endsol,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ endsol=.false. -+ -+ nsolva=intstr(directive,lenrec,idum) -+ isolva=intstr(directive,lenrec,idum) -+ -+ if(nsolva.eq.0.and.isolva.eq.0)then -+ -+ do while(.not.endsol) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endsol',directive,idum))then -+ endsol=.true. -+ elseif(findstring('enddec',directive,idum))then -+ endsol=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=max(intstr(directive,lenrec,idum),1) -+ endif -+ -+ enddo -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'solvation calculation selected', -+ x /,1x,'start of solvation calculation ',i10, -+ x /,1x,'solvation calculation interval ',i10)") -+ x nsolva,isolva -+ -+ endif -+ -+ return -+ end subroutine solvation_option -+ -+ subroutine free_energy_option(directive,lfree,lfrmas,idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for free energy option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lfree,lfrmas,endfre,safe -+ integer idnode,idum -+ -+ mfree=1 -+ kfree=1 -+ lfree=.true. -+ lfrmas=.false. -+ endfre=.false. -+ -+ do while(.not.endfre) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endfre',directive,idum))then -+ endfre=.true. -+ elseif(findstring('start',directive,idum))then -+ nfrn=intstr(directive,lenrec,idum) -+ elseif(findstring('interval',directive,idum))then -+ ifrn=intstr(directive,lenrec,idum) -+ elseif(findstring('lambda',directive,idum))then -+ pfree=dblstr(directive,lenrec,idum) -+ elseif(findstring('mix',directive,idum))then -+ mfree=intstr(directive,lenrec,idum) -+ elseif(findstring('expo',directive,idum))then -+ kfree=intstr(directive,lenrec,idum) -+ elseif(findstring('reset_mass',directive,idum))then -+ lfrmas=.true. -+ if(findstring('false',directive,idum))lfrmas=.false. -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(mfree.eq.1)kfree=1 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'free energy option selected', -+ x /,1x,'start of free energy calculation ',i10, -+ x /,1x,'sampling interval ',i10, -+ x /,1x,'free energy parameter (lambda) ',f10.3, -+ x /,1x,'mixing rule selected ',i10, -+ x /,1x,'mixing rule exponent ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10, -+ x /,1x,'mass scaling option ',l10)") -+ x nfrn,ifrn,pfree,mfree,kfree,ind_fre,lfrmas -+ -+ endif -+ -+c define free energy scaling parameters -+ -+ call freegen() -+ -+ return -+ end subroutine free_energy_option -+ -+ subroutine excitation_option -+ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for excitation option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,lexcite,lghost,endexc,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ lghost=.true. -+ lexcite=.true. -+ endexc=.false. -+ -+ do while(.not.endexc) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endexc',directive,idum))then -+ endexc=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=intstr(directive,lenrec,idum) -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'excitation option selected', -+ x /,1x,'energy decomposition start ',i10, -+ x /,1x,'energy decomposition interval ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10)") -+ x nsolva,isolva,ind_fre -+ -+ endif -+ -+ return -+ end subroutine excitation_option -+ -+ subroutine switching_option -+ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for switching option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,lswitch,lghost,endswi,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ lghost=.true. -+ lswitch=.true. -+ endswi=.false. -+ niswitch=0 -+ -+ do while(.not.endswi) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endswi',directive,idum))then -+ endswi=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=intstr(directive,lenrec,idum) -+ elseif(findstring('period',directive,idum))then -+ niswitch=max(intstr(directive,lenrec,idum),2) -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(niswitch.eq.0)niswitch=nsolva -+ nswitch=nsolva -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'switching option selected', -+ x /,1x,'energy decomposition start ',i10, -+ x /,1x,'energy decomposition interval ',i10, -+ x /,1x,'switching period ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10)") -+ x nsolva,isolva,niswitch,ind_fre -+ -+ endif -+ -+ return -+ end subroutine switching_option -+ -+ end module define_system_module -+ -diff -urN dl_class_1.9.orig/srcmod/define_system_module.f.preplumed dl_class_1.9/srcmod/define_system_module.f.preplumed ---- dl_class_1.9.orig/srcmod/define_system_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/define_system_module.f.preplumed 2011-10-17 17:32:15.000000000 +0200 -@@ -0,0 +1,5994 @@ -+ module define_system_module -+ -+c*********************************************************************** -+c -+c dl_poly module for utility subroutines and functions -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - p.-a. cazade oct 2007, solvation, free energy -+c and excitation -+c adapted - d. quigley nov 2010, metadynamics -+c -+c*********************************************************************** -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use dihedral_module -+ use ensemble_tools_module -+ use error_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use inversion_module -+ use metafreeze_module -+ use metal_module -+ use parse_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use vdw_module -+ -+ contains -+ -+ subroutine simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading in the simulation control -+c parameters -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992. -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c modified -+c author - t.forester may 1993 -+c amended - t.forester sept 1994 - dl_poly_1.1 -+c amended - t.forester nov 1994 - macro version -+c amended - w.smith dec 1994 - t3d adaptation -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit,seek -+ character*1 hms -+ character*1 directive(lenrec) -+ logical lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,lpsoc -+ logical ltscal,lzeql,loptim,ltraj,lfcap,lgofr,lpgr,lpres,safe -+ logical lstep,ltemp,lcut,ldelr,lprim,lforc,lens,lvdw,lrvdw,kill -+ logical lnsq,lzden,lewald,lspme,lhke,loop,lzero,nolink,newgau -+ logical lminim,lminopt,ltad,lneb,lhit,lbpd,prechk,tadall,nebgo -+ integer idnode,intsta,istraj,keyens,keyfce,keyres,nstbpo,nsbzdn -+ integer keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,khit,nhit -+ integer nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,ntrack -+ integer idum,imcon,keyver,keytol,nblock,blkout,numgau -+ integer minstp,numneb,i,keybpd,mode,nsolva,isolva,nofic -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,rlxtol,opttol -+ real(8) eps,tol,fm,densvar,delrdf,delzdn,zlen,ehit,hyp_units -+ real(8) catchrad,sprneb,deltad,tlow,xhit,yhit,zhit,ebias,vmin -+ real(8) prntim -+ -+CSGIC real(8) dummy -+CCRAY real(8) dummy -+CFFTWc FFTW instruction codes -+CFFTW -+CFFTW integer FFTW_FORWARD,FFTW_BACKWARD -+CFFTW parameter (FFTW_FORWARD=-1,FFTW_BACKWARD=1) -+CFFTW -+CFFTW integer FFTW_REAL_TO_COMPLEX,FFTW_COMPLEX_TO_REAL -+CFFTW parameter (FFTW_REAL_TO_COMPLEX=-1,FFTW_COMPLEX_TO_REAL=1) -+CFFTW -+CFFTW integer FFTW_ESTIMATE,FFTW_MEASURE -+CFFTW parameter (FFTW_ESTIMATE=0,FFTW_MEASURE=1) -+CFFTW -+CFFTW integer FFTW_OUT_OF_PLACE,FFTW_IN_PLACE,FFTW_USE_WISDOM -+CFFTW parameter (FFTW_OUT_OF_PLACE=0) -+CFFTW parameter (FFTW_IN_PLACE=8,FFTW_USE_WISDOM=16) -+CFFTW -+CFFTW integer FFTW_THREADSAFE -+CFFTW parameter (FFTW_THREADSAFE=128) -+CFFTW -+ -+c intitialize system variables: temperature,pressure,ensemble key -+c force key, cutoff, primary cutoff, verlet shell width, relative -+c dielectric constant,timestep,temperature scaling flag, -+c temp scaling interval -+ -+ mode=0 -+ nhko=0 -+ nlatt=0 -+ nsteql=0 -+ nstrun=0 -+ minstp=0 -+ keybpd=0 -+ keyres=0 -+ keyens=0 -+ keyver=0 -+ taut=0.d0 -+ nstbts=0 -+ nstbgr=0 -+ nsbzdn=0 -+ nstbpo=100 -+ nstack=mxstak -+ intsta=0 -+ nstraj=0 -+ istraj=1 -+ keytrj=0 -+ numgau=1 -+ alpha=0.d0 -+ kmax1=0 -+ kmax2=0 -+ kmax3=0 -+ nospl=min(8,mxspl) -+ isolva=1 -+ nsolva=0 -+ niswitch=0 -+ nswitch=0 -+ nofic=1000 -+ -+ fmax=1000.d0 -+ keyfce=0 -+ multt=1 -+ keytol=0 -+ tstep=0.d0 -+ temp=0.d0 -+ press=0.d0 -+ rcut=0.d0 -+ rprim=0.d0 -+ rvdw=0.d0 -+ delr=0.d0 -+ epsq=1.d0 -+ rlxtol=1.d0 -+ opttol=1.d0 -+ tolnce=1.d-8 -+ quattol=1.d-8 -+ timjob=0.d0 -+ timcls=0.d0 -+ delrdf=0.d0 -+ delzdn=0.d0 -+ zlen=0.d0 -+ ehit=0.d0 -+ xhit=0.d0 -+ yhit=0.d0 -+ zhit=0.d0 -+ vmin=0.d0 -+ ebias=0.d0 -+ catchrad=0.d0 -+ pfree=0.d0 -+ -+ lhit=.false. -+ lbpd=.false. -+ ltad=.false. -+ lneb=.false. -+ loop=.true. -+ lnfic=.false. -+ lpsoc=.false. -+ lzero=.false. -+ ltscal=.false. -+ lewald=.false. -+ lspme=.false. -+ lhke=.false. -+ lgofr=.false. -+ lpgr=.false. -+ lzeql=.true. -+ loptim=.false. -+ lminim=.false. -+ lminopt=.false. -+ ltraj=.false. -+ lfcap=.false. -+ ltemp=.false. -+ lstep=.false. -+ lcut=.false. -+ ldelr=.false. -+ lprim=.false. -+ lforc=.false. -+ lens=.false. -+ lvdw=.false. -+ lrvdw=.false. -+ lpres=.false. -+ kill=.false. -+ lnsq=.false. -+ lzden=.false. -+ nolink=.false. -+ newgau=.false. -+ prechk=.false. -+ tadall=.false. -+ lsolva=.false. -+ lfree=.false. -+ lfrmas=.false. -+ lexcite=.false. -+ lswitch=.false. -+ lghost=.false. -+ nebgo=.true. -+ seek='all ' -+ -+c open the simulation input file -+ -+ if(idnode.eq.0)open(nread,file='CONTROL',status='old') -+ -+c read job title -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ -+ call copystring(record,sysname,80) -+ if(idnode.eq.0)then -+ -+ write(nrite,"(3(1x,120('*'),/),1x,15('*'),5x,80a1,5x,15('*'),/, -+ x 3(1x,120('*'),/),/,/,1x,'SIMULATION CONTROL PARAMETERS',/)") -+ x sysname -+ -+ endif -+ -+c read and process directives from CONTROL file -+ -+ do while(loop) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ -+c convert to lowercase and strip out leading blanks -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.' ')then -+ -+c record is commented out -+ cycle -+ -+ elseif(findstring('redirect',directive,idum))then -+ -+c ignore this option in this context -+ cycle -+ -+ elseif(findstring('steps',directive,idum))then -+ -+c number of timesteps -+ -+ nstrun=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'selected number of timesteps',3x,i10)")nstrun -+ -+ elseif(findstring('integ',directive,idum))then -+ -+c choice of integration algorithm -+ -+ if(findstring('leapfrog',directive,idum))then -+ -+ keyver=0 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'leapfrog verlet integration selected')") -+ -+ elseif(findstring('velocity',directive,idum))then -+ -+ keyver=1 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'velocity verlet integration selected')") -+ -+ endif -+ -+ elseif(findstring('no fic',directive,idum))then -+ -+c cancel possible "flying ice cube" in Berendsen thermostats -+ -+ lnfic=.true. -+ nofic=intstr(directive,lenrec,idum) -+ -+ elseif(findstring('shells',directive,idum).and. -+ x findstring('on',directive,idum).and. -+ x findstring('cores',directive,idum))then -+ -+c put shells on cores at start - shell model only (else null) -+ -+ lpsoc=.true. -+ -+ elseif(findstring('densvar',directive,idum))then -+ -+c specify allowed density variation -+ -+ densvar=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'allowed density variation ',3x,1p,e12.4)") -+ x densvar -+ -+ elseif(findstring('no link',directive,idum))then -+ -+c switch off link cell option -+ -+ nolink=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'link cells option deactivated')") -+ -+ elseif(findstring('equil',directive,idum))then -+ -+c number of equilibration timesteps -+ -+ nsteql=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'equilibration period ',3x,i10)")nsteql -+ -+ elseif(findstring('restart',directive,idum))then -+ -+c restart control -+ -+ if(findstring('noscale',directive,idum))then -+ -+ keyres=3 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'noscale restart requested')") -+ -+ elseif(findstring('scale',directive,idum))then -+ -+ keyres=2 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'scaled restart requested')") -+ -+ else -+ -+ keyres=1 -+ if(idnode.eq.0)write(nrite,"(/,1x,'restart requested')") -+ -+ endif -+ -+ elseif(findstring('ensemble',directive,idum))then -+ -+c ensemble selection -+ -+ call ensemble_selection(directive,lens,kill,idnode,keyens, -+ x mode,taut,taup) -+ -+ elseif(findstring('regauss',directive,idum))then -+ -+c re-initialise velocities option (regaussing) -+ -+ newgau=.true. -+ numgau=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'regaussing option activated', -+ x /,1x,'regaussing interval set to ',3x,i10)") -+ x numgau -+ -+ elseif(findstring('scale',directive,idum))then -+ -+ nstbts=intstr(directive,lenrec,idum) -+ if(nstbts.gt.0)then -+ ltscal=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'temperature scaling on' -+ x /,1x,'temperature scaling interval',3x,i10)") -+ x nstbts -+ -+ endif -+ -+ elseif(findstring('rdf',directive,idum))then -+ -+ if(findstring('print',directive,idum))then -+ -+ lpgr=.true. -+ lpgr=(lgofr.and.lpgr) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'g(r) printing option on ')") -+ -+ else -+ -+ lgofr=.true. -+ nstbgr=intstr(directive,lenrec,idum) -+ delrdf=dblstr(directive,lenrec,idum) -+ if(nstbgr.eq.0)nstbgr=10 -+ if(delrdf.lt.1.d-8)delrdf=0.05d0 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'radial distribution functions on ', -+ x /,1x,'g(r) collection interval ',3x,i10)")nstbgr -+ write(nrite, -+ x "(1x,'g(r) bin width ',3x,1p,e12.4)") -+ x delrdf -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('zden',directive,idum))then -+ -+ lzden=.true. -+ nsbzdn=intstr(directive,lenrec,idum) -+ delzdn=dblstr(directive,lenrec,idum) -+ zlen=dblstr(directive,lenrec,idum) -+ if(nsbzdn.eq.0)nsbzdn=10 -+ if(delzdn.lt.1.d-8)then -+ zlen=0.1d0*dble(mxzdn) -+ delzdn=0.1d0 -+ elseif(zlen.lt.1.d-8)then -+ zlen=delzdn*dble(mxzdn) -+ endif -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'Z density profile requested', -+ x /,1x,'zdensity collection interval',3x,i10)")nsbzdn -+ write(nrite, -+ x "(1x,'zdensity bin width ',3x,1p,e12.4)") -+ x delzdn -+ write(nrite, -+ x "(1x,'zdensity range ',3x,1p,e12.4)") -+ x zlen -+ -+ endif -+ -+ elseif(findstring('collect',directive,idum))then -+ -+ lzeql=.false. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'equilibration included in overall averages')") -+ -+ elseif(findstring('neb',directive,idum))then -+ -+c activate nudged elastic band option -+ -+ call neb_option(directive,lneb,lminopt,idnode, -+ x numneb,keytol,sprneb,opttol,hyp_units) -+ -+ elseif(findstring('impact',directive,idum))then -+ -+c activate the impact option -+ -+ if(lhit)call error(idnode,516) -+ lhit=.true. -+ khit=intstr(directive,lenrec,idum) -+ nhit=intstr(directive,lenrec,idum) -+ ehit=dblstr(directive,lenrec,idum) -+ xhit=dblstr(directive,lenrec,idum) -+ yhit=dblstr(directive,lenrec,idum) -+ zhit=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,1x,'impact option selected')") -+ write(nrite,"( -+ x /,1x,'identity of impact atom ',i10, -+ x /,1x,'time step of impact ',i10, -+ x /,1x,'impact recoil energy (keV) ',1p,e12.4, -+ x /,1x,'impact direction (x component) ',1p,e12.4, -+ x /,1x,'impact direction (y component) ',1p,e12.4, -+ x /,1x,'impact direction (z component) ',1p,e12.4)") -+ x khit,nhit,ehit,xhit,yhit,zhit -+ -+ endif -+ -+c convert impact energy from keV to internal units -+ -+ ehit=ehit*9648530.821d0 -+ -+ elseif(findstring('bpd',directive,idum))then -+ -+c activate the BPD option -+ -+ call bpd_option(directive,seek,lbpd,ltad,lminopt,prechk, -+ x nebgo,keybpd,idnode,nblock,ntrack,keytol,ebias,vmin, -+ x catchrad,sprneb,opttol,hyp_units) -+ -+ elseif(findstring('tad',directive,idum))then -+ -+c activate temperature accelerated dynamics option -+ -+ call tad_option(directive,ltad,lbpd,lminopt,prechk,tadall, -+ x idnode,nblock,ntrack,blkout,keytol,catchrad,sprneb,tlow, -+ x deltad,opttol,hyp_units) -+ -+ elseif(findstring('minim',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ if(findstring('forc',directive,idum))keytol=0 -+ if(findstring('ener',directive,idum))keytol=1 -+ if(findstring('posi',directive,idum))keytol=2 -+ hyp_units=energy_unit() -+ minstp=intstr(directive,lenrec,idum) -+ opttol=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ lminim=.true. -+ loptim=.false. -+ lzero=.false. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'minimisation programme requested')") -+ write(nrite, -+ x "(1x,'structure minimisation interval ', -+ x 3x,i10)")minstp -+ call print_optim(keytol) -+ write(nrite, -+ x "(1x,'structure minimisation tolerance', -+ x 3x,1p,e12.4,1x,a8)")opttol,cunit -+ -+ endif -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ elseif(findstring('optim',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ if(findstring('forc',directive,idum))keytol=0 -+ if(findstring('ener',directive,idum))keytol=1 -+ if(findstring('posi',directive,idum))keytol=2 -+ hyp_units=energy_unit() -+ opttol=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ loptim=.true. -+ lminim=.false. -+ lzero=.false. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'structure optimisation requested')") -+ call print_optim(keytol) -+ write(nrite, -+ x "(1x,'tolerance for structure optimisation ', -+ x 3x,1p,e12.4,1x,a8)")opttol,cunit -+ -+ endif -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ elseif(findstring('zero',directive,idum))then -+ -+ if(lminopt)call error(idnode,225) -+ temp=1.d0 -+ lzero=.true. -+ loptim=.false. -+ lminim=.false. -+ ltemp=.true. -+ ltscal=.false. -+ lminopt=.true. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'zero K optimisation requested')") -+ write(nrite, -+ x "(' temperature reset to',1p,e12.4)")1.d0 -+ -+ endif -+ -+ else if(findstring('solva',directive,idum))then -+ -+ call solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+ else if(findstring('decomp',directive,idum))then -+ -+ call solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+ elseif(findstring('metafreeze',directive,idum).or. -+ x findstring('metadyn',directive,idum))then -+ -+c activate metadynamics option - d. quigley -+ -+ call metadyn_option -+ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, -+ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, -+ x locpe_scale,ref_W_aug,h_aug,wt_Dt) -+ -+ else if(findstring('free',directive,idum))then -+ -+ call free_energy_option(directive,lfree,lfrmas,idnode) -+ -+ else if(findstring('excite',directive,idum))then -+ -+ call excitation_option -+ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) -+ -+ else if(findstring('switch',directive,idum))then -+ -+ call switching_option -+ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) -+ -+ elseif(findstring('print',directive,idum))then -+ -+ nstbpo=intstr(directive,lenrec,idum) -+ nstbpo=max(nstbpo,1) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'data printing interval ',3x,i10)")nstbpo -+ -+ elseif(findstring('stack',directive,idum))then -+ -+ nstack=intstr(directive,lenrec,idum) -+ -+c reset stack limit if too large -+ -+ nstack=min(nstack,mxstak) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'data stacking interval ',3x,i10)")nstack -+ -+ elseif(findstring('stats',directive,idum))then -+ -+ intsta=intstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'statistics file interval ',3x,i10)")intsta -+ -+ elseif(findstring('traj',directive,idum))then -+ -+ ltraj=.true. -+ nstraj=intstr(directive,lenrec,idum) -+ istraj=max(intstr(directive,lenrec,idum),1) -+ keytrj=intstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'trajectory file option on ', -+ x /,1x,'trajectory file start ',3x,i10, -+ x /,1x,'trajectory file interval ',3x,i10 -+ x /,1x,'trajectory file info key ',3x,i10)") -+ x nstraj,istraj,keytrj -+ -+ elseif(findstring('ewald',directive,idum).or. -+ x findstring('spme',directive,idum).or. -+ x findstring('hke',directive,idum))then -+ -+c read Ewald or HK-Ewald or SPM-Ewald sum parameters -+ -+ call ewald_selection(directive,lhke,lspme,lewald,lcut, -+ x lforc,kill,idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2, -+ x kmax3,alpha,rcut) -+ -+ elseif(findstring('distan',directive,idum))then -+ -+ keyfce=4 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Distance dependent dielectric')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('coul',directive,idum))then -+ -+ keyfce=6 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Coulombic potential')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('shift',directive,idum))then -+ -+ keyfce=8 -+ alpha=0.d0 -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : Shifted Coulombic potential')") -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(.not.lcut)then -+ call error(idnode,-435) -+ kill=.true. -+ else -+ -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(1x,'Specified precision parameter : ',1p, -+ x e12.4)")eps -+ write(nrite, -+ x "(1x,'Calculated damping parameter: ',1p, -+ x e12.4)")alpha -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('damp',directive,idum))then -+ -+ alpha=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(1x,'Specified damping parameter : ',1p,e12.4)") -+ x alpha -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('reaction',directive,idum))then -+ -+ keyfce=10 -+ alpha=0.d0 -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'Electrostatics : reaction field')") -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(.not.lcut)then -+ call error(idnode,-435) -+ kill=.true. -+ else -+ -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(1x,'Specified precision parameter : ',1p, -+ x e12.4)")eps -+ write(nrite, -+ x "(1x,'Calculated damping parameter: ',1p, -+ x e12.4)")alpha -+ -+ endif -+ -+ endif -+ -+ elseif(findstring('damp',directive,idum))then -+ -+ alpha=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(1x,'Specified damping parameter : ',1p,e12.4)") -+ x alpha -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('cap',directive,idum))then -+ -+ lfcap=.true. -+ fm=dblstr(directive,lenrec,idum) -+ if(fm.gt.0.d0)fmax=fm -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'force capping :',16x,1p,e12.4,' kT/A')")fmax -+ -+ elseif(findstring('no vdw',directive,idum))then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'short-range potential terms off')") -+ lvdw=.true. -+ -+ elseif(findstring('no elec',directive,idum))then -+ -+ keyfce=0 -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'electrostatic potential terms off')") -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ -+ lforc=.true. -+ -+ elseif(findstring('mult',directive,idum))then -+ -+ multt=max(intstr(directive,lenrec,idum),1) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'multiple timestep interval ',3x,i10)")multt -+ -+ elseif(findstring('timestep',directive,idum))then -+ -+ lstep=.true. -+ tstep=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation timestep ',3x,1p,e12.4)")tstep -+ -+ elseif(findstring('temp',directive,idum))then -+ -+ ltemp=.true. -+ temp=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation temperature ',3x,1p,e12.4)")temp -+ -+ elseif(findstring('pres',directive,idum))then -+ -+ press=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'simulation pressure (katm) ',3x,1p,e12.4)")press -+ -+c convert from katm to internal units of pressure -+ -+ press=press/prsunt -+ lpres=.true. -+ -+ elseif(findstring('prim',directive,idum))then -+ -+c primary cutoff -+ -+ lprim=.true. -+ rprim=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'primary neighbour cut off ',3x,1p,e12.4)")rprim -+ -+ elseif(findstring('rvdw',directive,idum))then -+ -+c cutoff for short range potentials -+ -+ rvdw=dblstr(directive,lenrec,idum) -+ lrvdw=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'real space cut off (vdw) ',3x,1p,e12.4)")rvdw -+ -+ elseif(findstring('delr',directive,idum))then -+ -+c Verlet shell width -+ -+ ldelr=.true. -+ delr=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'border width of Verlet shell',3x,1p,e12.4)")delr -+ -+ elseif(findstring('cut',directive,idum))then -+ -+c cutoff -+ -+ lcut=.true. -+ rcut=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'real space cut off ',3x,1p,e12.4)")rcut -+ -+ elseif(findstring('eps',directive,idum))then -+ -+c relative dielectric constant -+ -+ epsq=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'relative dielectric constant',3x,1p,e12.4)")epsq -+ -+ elseif(findstring('rlxtol',directive,idum))then -+ -+c force tolerance for shell relaxation -+ -+ rlxtol=max(rlxtol,dblstr(directive,lenrec,idum)) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for shell relaxn. ',3x,1p,e12.4)")rlxtol -+ -+ elseif(findstring('shake',directive,idum))then -+ -+c tolerance for shake -+ -+ tolnce=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for SHAKE ',3x,1p,e12.4)")tolnce -+ -+ elseif(findstring('quaternion',directive,idum))then -+ -+c tolerance for quaternion integration -+ -+ quattol=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'tolerance for Quaternions ',3x,1p,e12.4)")quattol -+ -+ elseif(findstring('job time',directive,idum))then -+ -+c time for simulation (in seconds/minutes/hours/days or indefinite) -+ -+ if(findstring('indef',directive,idum))then -+ timjob=1.0d6*365.25d0*24.d0*60.d0*60.d0 -+ else -+ timjob=dblstr(directive,lenrec,idum) -+ if(findstring('m',directive,idum))then -+ timjob=6.0d1*timjob -+ elseif(findstring('h',directive,idum))then -+ timjob=3.6d3*timjob -+ elseif(findstring('d',directive,idum))then -+ timjob=8.64d4*timjob -+ endif -+ endif -+ -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'user allocated job time (',a1,') ',3x,f8.4)") -+ x hms,prntim -+ -+ elseif(findstring('close time',directive,idum))then -+ -+c time for winding up a job (in seconds) -+ -+ timcls=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'job closure time (s) ',3x,f8.3)")timcls -+ -+ elseif(findstring('all pairs',directive,idum))then -+ -+c full minimum image - N^2 interactions each timestep -+ -+ lnsq=.true. -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'All-pairs requested for electrostatics')") -+ -+ elseif(findstring('nospl',directive,idum))then -+ -+c set ewald_spme interpolation order -+ -+ nospl=intstr(directive,lenrec,idum) -+ -+ elseif(findstring('finish',directive,idum))then -+ -+c safe termination of reading CONTROL file -+ -+ loop=.false. -+ -+ else -+ -+c unrecognised directive in control file -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ enddo -+ -+c check on steps before temperature scaling -+ -+ if(nstbts.eq.0)nstbts=nstrun+1 -+ -+c conduct consistency checks on directives -+ -+ if(lminim)then -+ -+c ensure final configuration follows minimisation -+ -+ if(minstp.eq.0)minstp=nstrun -+ nstrun=minstp*(nstrun/minstp) -+ -+ endif -+ -+c check force activation options -+ -+ if(.not.lforc)then -+ -+c check if any forces are in operation -+ -+ if(.not.lvdw)then -+ -+ kill=.true. -+ call error(idnode,-383) -+ -+ endif -+ -+ else -+ -+c turn on short range forces -+ -+ if(lvdw)then -+ -+ if(keyfce.eq.0)then -+ -+ lcut=.true. -+ ldelr=.true. -+ -+ endif -+ -+ else -+ -+ keyfce=keyfce+1 -+ -+ endif -+ -+ endif -+ -+c if tad selected use only leap frog -+ -+ if(ltad.and.keyver.eq.1)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'switching to leapfrog for TAD dynamics')") -+ keyver=0 -+ -+ endif -+ -+c error checking -+ -+ if(lmetadyn.and.keyens.ne.3.and.keyens.ne.5.and.keyens.ne.7)then -+ -+ kill=.true. -+ call error(idnode,-2360) -+ -+ endif -+ -+ if(lsolva.or.lfree.or.lexcite.or.lswitch)then -+ -+ if(lspme)then -+ -+ kill=.true. -+ call error(idnode,-601) -+ -+ endif -+ -+ if(lhke)then -+ -+ kill=.true. -+ call error(idnode,-602) -+ -+ endif -+ -+ endif -+ -+ if(lghost.and.nstbgr.ne.isolva)then -+ -+ call warning(idnode,130,dble(isolva),0.d0,0.d0) -+ nstbgr=isolva -+ -+ endif -+ if(lfree.and.lgofr)then -+ -+ call warning(idnode,140,0.d0,0.d0,0.d0) -+ lgofr=.false. -+ lpgr=.false. -+ -+ endif -+ if(loptim)then -+ -+ temp=0.d0 -+ -+ elseif(.not.ltemp)then -+ -+ kill=.true. -+ call error(idnode,-380) -+ -+ endif -+ -+ if(.not.lstep)then -+ -+ kill=.true. -+ call error(idnode,-381) -+ -+ endif -+ -+ if(.not.lcut)then -+ -+ kill=.true. -+ call error(idnode,-382) -+ -+ endif -+ -+c check if van der Waals cutoff set -+ -+ if(.not.lrvdw.and.mod(keyfce,2).eq.1)then -+ -+ if(rcut.gt.0.d0)then -+ -+ rvdw=rcut -+ -+ else -+ -+ kill=.true. -+ call error(idnode,-402) -+ -+ endif -+ -+ endif -+ -+ if(.not.ldelr)then -+ -+ kill=.true. -+ call error(idnode,-384) -+ -+ endif -+ -+ if(multt.gt.1)then -+ -+ if(.not.lprim)then -+ -+ kill=.true. -+ call error(idnode,-385) -+ -+ elseif(rprim.gt.rcut)then -+ -+ kill=.true. -+ call error(idnode,-386) -+ -+ endif -+ -+ endif -+ -+c check settings in nvt ensemble -+ -+ if(keyens.ge.2.and.keyens.le.3)then -+ -+ if(taut.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-464) -+ -+ endif -+ -+ endif -+ -+c check settings in npt ensemble -+ -+ if(keyens.ge.4.and.keyens.le.7)then -+ -+ if(.not.lpres)then -+ -+ kill=.true. -+ call error(idnode,-387) -+ -+ endif -+ -+c check barostat and thermostat rates non zero -+ -+ if(taut.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-464) -+ -+ endif -+ if(taup.le.0.d0)then -+ -+ kill=.true. -+ call error(idnode,-466) -+ -+ endif -+ -+ endif -+ -+c check multiple timestep cutoffs are sensible -+ -+ if(multt.gt.1)then -+ if(rcut-rprim.lt.delr)then -+ -+ kill=.true. -+ call error(idnode,-398) -+ -+ endif -+ endif -+ -+c check rcut > rvdw (for verlet list constructor) -+ -+ if(rcut.lt.rvdw)then -+ -+ kill=.true. -+ call error(idnode,-400) -+ -+ endif -+ -+c check spme is not being used with incorrect pbc -+ -+ if(lspme)then -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+ kill=.true. -+ call error(idnode,-513) -+ -+ endif -+ -+ endif -+ -+c check on all-pairs calculation request -+ -+ if(lnsq)then -+ -+ if(multt.eq.1)then -+ -+ kill=.true. -+ call error(idnode,-422) -+ -+ endif -+ -+ if(keyfce/2.lt.2.or.keyfce/2.gt.3)then -+ -+ kill=.true. -+ call error(idnode,-424) -+ -+ endif -+ -+ endif -+ -+c cancel rdf option if no vdw or coulombic forces -+ -+ if(lgofr.and.keyfce.eq.0)then -+ -+ lgofr=.false. -+ call warning(idnode,120,0.d0,0.d0,0.d0) -+ -+ endif -+ -+ if(kill)call abort_control_read(2,idnode,nread) -+ -+c close CONTROL file -+ -+ if(idnode.eq.0)close(nread) -+ -+ return -+ end subroutine simdef -+ -+ subroutine sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading in the molecular specifications -+c of the system to be simulated -+c version for rigid unit data and neutral groups -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith may 1992. -+c amended - w.smith march 1994 -+c amended - t.forester april 1994 -+c amended - w.smith dec 1994 - getrec etc -+c amended - a.smondyrev may 2000 - keydih=5 for -+c ryckaert-bellemans potential in dihedrals -+c amended - a.smondyrev may 2000 - keydih=6 for -+c fluorinated ryckaert-bellemans potential in dihedrals -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lunits,lmols,lneut,ltable,lnsq,lshl,safe,lpmf -+ logical loop1,loop2,lsolva,lfree,lexcite,lswitch,lghost -+ -+ integer idnode,keyfce,keyfld,natms,ngrp,ntpatm,ntpmls -+ integer ntpvdw,ntptbp,ntpmet,ntpfbp,nshels,ksite -+ integer nsite,nconst,nangle,ndihed,ninver,nbonds -+ integer nteth,nspmf,itmols,i,idum,keyver -+ integer ntpter,keyshl,iatm,natmsr,ntghost -+ -+ real(8) dlrpot,engunit,rvdw,rcuttb,rctter,rcutfb -+ real(8) sumchg -+ -+ data loop1/.true./,loop2/.true./ -+ -+c initialise system counters: atomic site index, number of -+c constraints, bond angles, dihedrals, inversions, chemical bonds, -+c unique atom types, total number of atoms, -+c total number of rigid groups, number of tethered atoms, -+c number of three body potentials -+ -+ nsite=0 -+ nconst=0 -+ nangle=0 -+ ndihed=0 -+ ninver=0 -+ nbonds=0 -+ ntpatm=0 -+ natms=0 -+ ngrp=0 -+ nteth=0 -+ ntptbp=0 -+ ntpter=0 -+ ntpmet=0 -+ ntpvdw=0 -+ ntpfbp=0 -+ nshels=0 -+ nspmf=0 -+ keyfld=0 -+ keyshl=0 -+ ntghost=0 -+ natmsr=0 -+ ntcons_ghost=0 -+ -+ lunits=.false. -+ lmols=.false. -+ lneut=.false. -+ ltable=.false. -+ lmetab=.false. -+ lshl=.false. -+ lpmf=.false. -+ engunit=1.d0 -+ -+ numbonds(:)=0 -+ numpmf(:)=0 -+ numcon(:)=0 -+ numdih(:)=0 -+ numinv(:)=0 -+ numgrp(:)=0 -+ numsit(:)=0 -+ numteth(:)=0 -+ numshl(:)=0 -+ npmf(:)=0 -+ indpmf(:)=0 -+ -+c open force field data file -+ -+ if(idnode.eq.0)open (nfield,file='FIELD',status='old') -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,'SYSTEM SPECIFICATION')") -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read and process directives from field file -+ -+ do while(loop1) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c convert to lowercase and remove leading blanks -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.' ')then -+ -+c record is commented out -+ cycle -+ -+ elseif(findstring('units',record,idum))then -+ -+c identify energy unit for input/output -+ -+ lunits=.true. -+ call define_units(idnode,engunit) -+ -+c neutral group control option -+ -+ elseif(findstring('neut',record,idum))then -+ -+ lneut=.true. -+ if(idnode.eq.0) -+ x write(nrite,"(/,' neutral group implementation in use')") -+ -+c can't have neutral groups with all-pairs -+ -+ if(lnsq)call error(idnode,426) -+ -+c specify molecular species -+ -+ elseif(findstring('molecu',record,idum))then -+ -+c number of molecular types -+ -+ if(lmols)call error(idnode,11) -+ lmols=.true. -+ ntpmls=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,1x,'number of molecular types',6x,i10)") -+ x ntpmls -+ -+ if(ntpmls.gt.mxtmls)call error(idnode,10) -+ -+c initialise total system charge -+ -+ sumchg=0.d0 -+ -+c read in molecular characteristics -+ -+ do itmols=1,ntpmls -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'molecular species type',9x,i10)") -+ x itmols -+ -+c name of molecular species -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+ call copystring(record,molnam(1,itmols),40) -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,1x,'name of species:',13x,40a1)") -+ x (molnam(i,itmols),i=1,40) -+ -+c stop processing if energy unit has not been specified -+ -+ if(.not.lunits)call error(idnode,6) -+ -+c read molecular data -+ -+ loop2=.true. -+ -+ do while(loop2) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ -+ ksite=0 -+ -+ if(findstring('nummol',record,idum))then -+ -+ nummols(itmols)=intstr(record,lenrec,idum) -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'number of molecules ', -+ x 10x,i10)")nummols(itmols) -+ -+ elseif(findstring('atoms',record,idum))then -+ -+c read in atomic details -+ -+ call define_atoms -+ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read core - shell spring parameters -+ -+ elseif(findstring('shell',record,idum))then -+ -+ lshl=.true. -+ call define_core_shell -+ x (safe,idnode,itmols,nshels,nsite,keyshl, -+ x engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read chemical bond force constant and bondlength -+ -+ elseif(findstring('bonds',record,idum))then -+ -+ call define_bonds -+ x (safe,idnode,itmols,nbonds,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read bond atom indices and constraint bondlength -+ -+ elseif(findstring('constr',record,idum))then -+ -+ call define_constraints -+ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read pmf bond atom indices, weights and constraint bondlength -+ -+ elseif(findstring('pmf',record,idum))then -+ -+ if(lpmf)call error(idnode,484) -+ lpmf=.true. -+ call define_pmf(safe,idnode,itmols,nspmf) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular angular potential parameters -+ -+ elseif(findstring('angles',record,idum))then -+ -+ call define_angles -+ x (safe,idnode,itmols,nangle,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular dihedral potential parameters -+ -+ elseif(findstring('dihedr',record,idum))then -+ -+ call define_dihedrals -+ x (safe,idnode,itmols,ndihed,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read intramolecular inversion potential parameters -+ -+ elseif(findstring('invers',record,idum))then -+ -+ call define_inversions -+ x (safe,idnode,itmols,ninver,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read rigid body data -+ -+ elseif(findstring('rigid',record,idum))then -+ -+ call define_rigid_body -+ x (safe,lghost,idnode,itmols,ngrp,natmsr) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read tethered atom indices and tethering parameters -+ -+ elseif(findstring('teth',record,idum))then -+ -+ call define_tethers -+ x (safe,idnode,itmols,nteth,nsite,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c finish of data for one molecular type -+ -+ elseif(findstring('finish',record,idum))then -+ -+c running total of number of atoms in system -+ -+ natms=natms+nummols(itmols)*numsit(itmols) -+ if(natms.gt.mxatms)call error(idnode,75) -+ -+c check core-shell units are not both in same rigid body unit -+ -+ call check_shells(idnode,itmols,nshels,ngrp) -+ -+ loop2=.false. -+ -+ else -+ -+c error exit for unidentified directive in molecular data -+ -+ if(idnode.eq.0)write(nrite,'(12x,a)')record -+ call error(idnode,12) -+ -+ endif -+ -+ enddo -+ -+c construction of atmolt table for solvation calculation -+ -+ if(lsolva)then -+ -+ do iatm=natmsr+1,natms -+ atmolt(iatm)=itmols -+ enddo -+ natmsr=natms -+ -+ endif -+ -+ enddo -+ -+c construction of atm_fre table for free energy or excitation -+ -+ if(lfree.or.lexcite.or.lswitch)then -+ -+ atm_fre(:)=0 -+ if((ind_fre(1).ne.0).and.(ind_fre(2).ne.0))then -+ -+ do iatm=ind_fre(1),ind_fre(2) -+ atm_fre(iatm)=1 -+ enddo -+ -+ endif -+ -+ if((ind_fre(3).ne.0).and.(ind_fre(4).ne.0))then -+ -+ do iatm=ind_fre(3),ind_fre(4) -+ -+ atm_fre(iatm)=2 -+ if(lghost)ntghost=ntghost+1 -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c calculate system charge -+ -+ call check_syschg(idnode,ntpmls,sumchg) -+ -+c read in the nonbonded potential energy parameters -+ -+ elseif(findstring('vdw',record,idum))then -+ -+ call define_van_der_waals -+ x (safe,ltable,lunits,lmols,idnode,ntpvdw, -+ x ntpatm,keyfce,dlrpot,rvdw,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read in the metal potential energy parameters -+ -+ elseif(findstring('met',record,idum))then -+ -+ call define_metals -+ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rvdw,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read the three body potential energy parameters -+ -+ elseif(findstring('tbp',record,idum))then -+ -+ call define_three_body -+ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read the tersoff potential energy parameters -+ -+ elseif(findstring('tersoff',record,idum))then -+ -+ call define_tersoff -+ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read in the four body potential energy parameters -+ -+ elseif(findstring('fbp',record,idum))then -+ -+ call define_four_body -+ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, -+ x rcutfb,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c read external field data -+ -+ elseif(findstring('extern',record,idum))then -+ -+ call define_external_field -+ x (safe,lunits,idnode,keyfld,engunit) -+ if(.not.safe)call abort_field_read(1,idnode,nfield) -+ -+c normal end of FIELD file -+ -+ elseif(findstring('close',record,idum))then -+ -+ loop1=.false. -+ if(ntpvdw.eq.0.and.ntpmet.eq.0.and. -+ x mod(keyfce,2).eq.1)call error(idnode,145) -+ -+c error exit for unidentified directive -+ -+ else -+ -+ if(idnode.eq.0)write(nrite,'(100a)')record -+ call abort_field_read(2,idnode,nfield) -+ -+ endif -+ -+ enddo -+ -+c close force field file -+ -+ if(idnode.eq.0)close (nfield) -+ -+ -+ if(lshl.and.idnode.eq.0)then -+ -+ if(keyshl.eq.1)write(nrite, -+ x "(/,/,'adiabatic shell model in operation')") -+ -+ if(keyshl.eq.2)write(nrite, -+ x "(/,/,'relaxed shell model in operation')") -+ -+ endif -+ -+ if(lshl.and.keyshl.eq.0)call error(idnode,1951) -+ -+c if metadynamics and shell selected use only velocity verlet -+ -+ if(lshl.and.lmetadyn.and.keyver.eq.0)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'switching to velocity verlet for metadynamics')") -+ keyver=1 -+ -+ endif -+ -+ return -+ end subroutine sysdef -+ -+ subroutine sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading the configuration data file -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 atname(8) -+ -+ logical loglnk,safe,lneut,nolink,lfree,lfrmas -+ integer idnode,imcon,keyens,keyfce,keyres,levcfg,multt -+ integer ntpmls,i,indatm,indnam,indneu,k,ilx,ily,ilz -+ integer m,l,ncells,idum,mxnode -+ real(8) delr,rcut,volm,xcoord,ycoord,zcoord,totmas,xveloc -+ real(8) yveloc,zveloc,xforce,yforce,zforce,axx,rt3,xhi,yhi,zhi -+ real(8) width,dum1,dum2,test,com(3) -+ -+c open the system input file -+ -+ if(idnode.eq.0)open (nconf,file='CONFIG') -+ -+c read the CONFIG file header -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ -+ call copystring(record,cfgname,80) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'configuration file name: ',/,/,10x,80a1)")cfgname -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ -+ levcfg=intstr(record,lenrec,idum) -+ imcon=intstr(record,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'selected image convention',6x,i10)")imcon -+ -+c check config file contents for consistent data -+ -+ if((imcon.eq.0.or.imcon.eq.6).and. -+ x (keyfce/2.eq.1.or.keyfce/2.eq.6)) -+ x call error(idnode,180) -+ -+ if(imcon.eq.0.and.(.not.lneut).and.(keyfce.gt.1) -+ x .and.(multt.eq.1))call warning(idnode,30,0.d0,0.d0,0.d0) -+ -+ if(imcon.eq.0.and.(keyens.ge.4.and.keyens.le.7)) -+ x call error(idnode,390) -+ if(imcon.le.2.and.(keyens.eq.6.or.keyens.eq.7))imcon=3 -+ if(keyres.gt.0.and.levcfg.lt.1)call error(idnode,85) -+ -+c specify molecular dynamics simulation cell -+ -+ if(imcon.eq.0)then -+ -+c if no periodic boundaries - set zero values for cell -+c vectors and cell volume -+ -+ cell(:)=0.d0 -+ volm=0.d0 -+ -+ else -+ -+c read cell vectors -+ -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(1)=dblstr(record,lenrec,idum) -+ cell(2)=dblstr(record,lenrec,idum) -+ cell(3)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(4)=dblstr(record,lenrec,idum) -+ cell(5)=dblstr(record,lenrec,idum) -+ cell(6)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ if(.not.safe)call abort_config_read(1,idnode,nconf) -+ cell(7)=dblstr(record,lenrec,idum) -+ cell(8)=dblstr(record,lenrec,idum) -+ cell(9)=dblstr(record,lenrec,idum) -+ -+ endif -+ -+c read the atomic coordinates -+ -+ indatm=0 -+ indnam=0 -+ indneu=0 -+ safe=.true. -+ -+ do k=1,ntpmls -+ -+ do l=1,nummols(k) -+ -+ do m=1,numsit(k) -+ -+ indatm=indatm+1 -+ -+ if(indatm.gt.mxatms)call error(idnode,45) -+ -+ xxx(indatm)=0.d0 -+ yyy(indatm)=0.d0 -+ zzz(indatm)=0.d0 -+ vxx(indatm)=0.d0 -+ vyy(indatm)=0.d0 -+ vzz(indatm)=0.d0 -+ fxx(indatm)=0.d0 -+ fyy(indatm)=0.d0 -+ fzz(indatm)=0.d0 -+ -+ if(idnode.eq.0)then -+ -+ if(levcfg.eq.0)then -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ -+ elseif(levcfg.eq.1)then -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc -+ -+ else -+ -+ read(nconf,'(8a1)',end=100)atname -+ read(nconf,'(3f20.0)',end=100)xcoord,ycoord,zcoord -+ read(nconf,'(3f20.0)',end=100)xveloc,yveloc,zveloc -+ read(nconf,'(3f20.0)',end=100)xforce,yforce,zforce -+ -+ endif -+ -+c strip blanks off atom name -+ -+ call strip(atname,8) -+ -+ if(sitnam(indnam+m).eq.mkwd8(atname))then -+ -+ xxx(indatm)=xcoord -+ yyy(indatm)=ycoord -+ zzz(indatm)=zcoord -+ -+ if(levcfg.gt.0)then -+ -+ vxx(indatm)=xveloc -+ vyy(indatm)=yveloc -+ vzz(indatm)=zveloc -+ -+ endif -+ -+ if(levcfg.gt.1)then -+ -+ fxx(indatm)=xforce -+ fyy(indatm)=yforce -+ fzz(indatm)=zforce -+ -+ endif -+ -+ else -+ -+ write(nrite,"(/,/,'unidentified atom label :',8a1, -+ x ': atom number ',i5)")atname,indatm -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ call gstate(safe) -+ if(.not.safe)call error(idnode,25) -+ -+ ltype(indatm)=ltpsit(indnam+m) -+ weight(indatm)=wgtsit(indnam+m) -+ chge(indatm)=chgsit(indnam+m) -+ atmnam(indatm)=sitnam(indnam+m) -+ lstfrz(indatm)=lfzsit(indnam+m) -+ if(lneut)lstneu(indatm)=nugrp(indnam+m)+indneu -+ -+c reset atomic masses according to free energy definitions -+ -+ if(lfree)then -+ -+ weight_sav(indatm)=weight(indatm) -+ -+ if(lfrmas)then -+ -+ if(indatm.ge.ind_fre(1).and.indatm.le.ind_fre(2))then -+ weight(indatm)=lambda1*weight(indatm) -+ elseif(indatm.ge.ind_fre(3).and.indatm.le.ind_fre(4)) -+ x then -+ weight(indatm)=lambda2*weight(indatm) -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ indneu=indneu+nugrp(indnam+numsit(k)) -+ -+ enddo -+ -+ indnam=indnam+numsit(k) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ call gdsum(xxx,indatm,buffer) -+ call gdsum(yyy,indatm,buffer) -+ call gdsum(zzz,indatm,buffer) -+ -+ if(levcfg.gt.0)then -+ -+ call gdsum(vxx,indatm,buffer) -+ call gdsum(vyy,indatm,buffer) -+ call gdsum(vzz,indatm,buffer) -+ -+ endif -+ -+ if(levcfg.gt.1)then -+ -+ call gdsum(fxx,indatm,buffer) -+ call gdsum(fyy,indatm,buffer) -+ call gdsum(fzz,indatm,buffer) -+ -+ endif -+ -+ endif -+ -+c check integrity of cell vectors : for cubic, TO and RD cases -+c ie. cell(1)=cell(5)=cell(9) (or cell(9)/sqrt(2) for RD) -+ -+ if((imcon.eq.1).or.(imcon.eq.4).or.(imcon.eq.5))then -+ -+ axx=(abs(cell(1))+abs(cell(5)))/2.d0 -+ test=1.d-8*axx -+ if(abs(cell(1)-axx).gt.test)call error(idnode,410) -+ if(abs(cell(5)-axx).gt.test)call error(idnode,410) -+ if(imcon.eq.5)then -+ if(abs(cell(9)-axx*sqrt(2.d0)).gt.test) -+ x call error(idnode,410) -+ else -+ if(abs(cell(9)-axx).gt.test)call error(idnode,410) -+ endif -+ -+ endif -+ -+c check integrity of hexagonal prism cell vectors -+ -+ if(imcon.eq.7)then -+ -+ rt3=sqrt(3.d0) -+ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) -+ x call error(idnode,410) -+ -+ endif -+ -+c check 2D PBC for imcon=6 -+ -+ if(imcon.eq.6)then -+ -+ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) -+ -+ endif -+ -+c check for diagonal cell matrix if appropriate -+ -+ if((imcon.eq.1).or.(imcon.eq.2).or.(imcon.eq.4).or. -+ x (imcon.eq.5).or.(imcon.eq.7))then -+ -+ if(abs(cell(2)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(3)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(4)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(6)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(7)).gt.1.d-10)call error(idnode,410) -+ if(abs(cell(8)).gt.1.d-10)call error(idnode,410) -+ -+ endif -+ -+c put centre of mass at centre of coordinates if imcon=0 -+ -+ if(imcon.eq.0)then -+ -+ totmas=getmass(indatm,idnode,mxnode) -+ call getcom(indatm,idnode,mxnode,totmas,com) -+ -+ do i=1,indatm -+ -+ xxx(i)=xxx(i)-com(1) -+ yyy(i)=yyy(i)-com(2) -+ zzz(i)=zzz(i)-com(3) -+ -+ enddo -+ -+ endif -+ -+c set widths if unset - needed for check on link cells below -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+ xhi=abs(xxx(1)) -+ yhi=abs(yyy(1)) -+ zhi=abs(zzz(1)) -+ do i=2,indatm -+ -+ xhi=max(xhi,abs(xxx(i))) -+ yhi=max(yhi,abs(yyy(i))) -+ zhi=max(zhi,abs(zzz(i))) -+ -+ enddo -+ if(imcon.eq.0)then -+ -+ cell(1)=max(2.d0*xhi+rcut+delr,3.d0*(rcut+delr)) -+ cell(5)=max(2.d0*yhi+rcut+delr,3.d0*(rcut+delr)) -+ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) -+ -+ endif -+ -+ if(imcon.eq.6.and.cell(9).lt.1.d-6)then -+ -+ cell(9)=max(2.d0*zhi+rcut+delr,3.d0*(rcut+delr)) -+ -+ endif -+ -+ endif -+ -+c calculate dimensional properties of simulation cell -+ -+ call dcell(cell,celprp) -+ -+ if(imcon.eq.0)then -+ -+ volm=0.d0 -+ -+ elseif(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ else -+ -+ volm=celprp(10) -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,/,1x,'simulation cell vectors'/,/)") -+ write(nrite,"(21x,3f12.6)")cell -+ -+ write(nrite, -+ x "(/,/,1x,'system volume ',2x,1p,g22.12)")volm -+ -+ endif -+ -+c check value of cutoff and reset if necessary -+ -+ if(imcon.gt.0)then -+ -+ width=min(celprp(7),celprp(8),celprp(9))/2.d0 -+ if(imcon.eq.4)width=sqrt(3.d0)*cell(1)/4.d0 -+ if(imcon.eq.5)width=cell(1)/2.d0 -+ if(imcon.eq.6)width=min(celprp(7),celprp(8))/2.d0 -+ -+c halt program if potential cutoff exceeds cell width -+ -+ if(rcut.gt.width)call error(idnode,95) -+ -+ endif -+ -+c decide on whether to use link cells for verlet list constructor -+ -+ if(nolink)then -+ -+ loglnk=.false. -+ -+ else -+ -+ loglnk=.true. -+ -+ ilx=int(celprp(7)/(rcut+delr)) -+ ily=int(celprp(8)/(rcut+delr)) -+ ilz=int(celprp(9)/(rcut+delr)) -+ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. -+ ncells=ilx*ily*ilz -+ if(lneut.and.ncells.le.36)loglnk=.false. -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. -+ if(loglnk.and.ncells.gt.mxcell)then -+ -+ dum1=dble(ncells) -+ dum2=dble(mxcell) -+ call warning(idnode,90,dum1,dum2,dum2) -+ loglnk=.false. -+ -+ endif -+ -+ endif -+ -+ if(loglnk.and.idnode.eq.0) -+ x write(nrite,"(/,/,' link cell algorithm in use')") -+ -+ if(idnode.eq.0)close (nconf) -+ -+c ensure PBC compliance of starting structure -+ -+ if(keyres.eq.0.and.imcon.gt.0)then -+ -+ call images(imcon,idnode,mxnode,indatm,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,indatm,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ return -+ -+c error exit for config file read -+ -+ 100 call abort_config_read(2,idnode,nconf) -+ -+ end subroutine sysgen -+ -+ subroutine sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading the REVIVE file data and -+c defining the initial thermodynamic and structural accumulators. -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c adapted - d. quigley nov 2010, metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzden,lfree,lsolva,lghost,lpsoc -+ integer idnode,imcon,keyfce,keyres,mxnode,natms,nstep,numacc -+ integer numrdf,ntpatm,nzden,i,j,k,ntpmet,ntshl,ntpvdw -+ real(8) chip,chit,conint,elrc,engunit,virlrc,rvdw,volm -+ real(8) dnumrd,dnstep,dnumac,dnzden,virtot,vircom,tboost -+ real(8) chit_shl -+ -+c read or initialise accumulator arrays -+ -+ if(keyres.eq.1.and.idnode.eq.0)then -+ -+c read accumulator data from dump file -+ -+ open(nrest,file='REVOLD',form='unformatted') -+ -+ read(nrest) dnstep,dnumac,dnumrd,chit,chip,conint,dnzden, -+ x tboost,chit_shl -+ read(nrest) virtot,vircom,eta,strcns,strbod -+ read(nrest) stpval -+ read(nrest) sumval -+ read(nrest) ssqval -+ read(nrest) zumval -+ read(nrest) ravval -+ read(nrest) stkval -+ read(nrest) xx0,yy0,zz0 -+ read(nrest) xxs,yys,zzs -+ -+ if(lgofr) read(nrest)rdf -+ if(lzden) read(nrest)zdens -+ -+ nstep=nint(dnstep) -+ numacc=nint(dnumac) -+ numrdf=nint(dnumrd) -+ nzden=nint(dnzden) -+ close (nrest) -+ -+ else -+ -+c initialise step counters -+ -+ nstep=0 -+ numacc=0 -+ numrdf=0 -+ nzden=0 -+ -+c initialise temperature and pressure coupling parameters -+c and integral for conserved quantity -+ -+ chit=0.d0 -+ chip=0.d0 -+ conint=0.d0 -+ virtot=0.d0 -+ vircom=0.d0 -+ chit_shl=0.d0 -+ do i=1,9 -+ -+ eta(i)=0.d0 -+ strcns(i)=0.d0 -+ strbod(i)=0.d0 -+ -+ enddo -+ -+c initialise accumulator arrays -+ -+ do i=1,mxnstk -+ -+ stpval(i)=0.d0 -+ sumval(i)=0.d0 -+ ssqval(i)=0.d0 -+ zumval(i)=0.d0 -+ ravval(i)=0.d0 -+ -+ enddo -+ -+ do i=1,mxatms -+ -+ xx0(i)=0.d0 -+ yy0(i)=0.d0 -+ zz0(i)=0.d0 -+ xxs(i)=0.d0 -+ yys(i)=0.d0 -+ zzs(i)=0.d0 -+ -+ enddo -+ -+ do j=1,mxnstk -+ -+ do i=1,mxstak -+ -+ stkval(i,j)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ if(lgofr)then -+ -+ do i=1,mxxtyp -+ -+ do j=1,mxrdf -+ -+ rdf(j,i)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(lzden)then -+ -+ do i=1,mxatyp -+ -+ do j=1,mxzdn -+ zdens(j,i)=0.d0 -+ enddo -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c put shells on cores at start -+ -+ if(lpsoc.and.keyres.ne.1.and.ntshl.gt.0) -+ x call put_shells_on_cores(idnode,mxnode,ntshl) -+ -+c if restart then broadcast stored variables via a global sum -+ -+ if(keyres.eq.1.and.mxnode.gt.1)then -+ -+ if(mxbuff.lt.natms.or.mxbuff.lt.mxnstk*mxstak) -+ x call error(idnode,186) -+ -+ buffer(1)=chit -+ buffer(2)=chip -+ buffer(3)=conint -+ buffer(4)=dble(nstep) -+ buffer(5)=dble(numacc) -+ buffer(6)=dble(numrdf) -+ buffer(7)=dble(nzden) -+ buffer(8)=tboost -+ buffer(9)=virtot -+ buffer(10)=vircom -+ buffer(11)=chit_shl -+ call gdsum(buffer(1),11,buffer(12)) -+ chit=buffer(1) -+ chip=buffer(2) -+ conint=buffer(3) -+ nstep=nint(buffer(4)) -+ numacc=nint(buffer(5)) -+ numrdf=nint(buffer(6)) -+ nzden=nint(buffer(7)) -+ tboost=buffer(8) -+ virtot=buffer(9) -+ vircom=buffer(10) -+ chit_shl=buffer(11) -+ -+ call gdsum(eta,9,buffer) -+ call gdsum(strcns,9,buffer) -+ call gdsum(strbod,9,buffer) -+ call gdsum(stpval,mxnstk,buffer) -+ call gdsum(sumval,mxnstk,buffer) -+ call gdsum(ssqval,mxnstk,buffer) -+ call gdsum(zumval,mxnstk,buffer) -+ call gdsum(ravval,mxnstk,buffer) -+ call gdsum(stkval,mxnstk*mxstak,buffer) -+ call gdsum(xx0,natms,buffer) -+ call gdsum(yy0,natms,buffer) -+ call gdsum(zz0,natms,buffer) -+ call gdsum(xxs,natms,buffer) -+ call gdsum(yys,natms,buffer) -+ call gdsum(zzs,natms,buffer) -+ -+c for rdf table - broadcast and normalise -+ -+ if(lgofr)then -+ -+ do k=1,mxxtyp -+ -+ call gdsum(rdf(1,k),mxrdf,buffer) -+ -+ do j=1,mxrdf -+ rdf(j,k)=rdf(j,k)/dble(mxnode) -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(lzden)then -+ -+ do k=1,mxatyp -+ -+ call gdsum(zdens(1,k),mxzdn,buffer) -+ -+ do j=1,mxzdn -+ zdens(j,k)=zdens(j,k)/dble(mxnode) -+ enddo -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c number densities and long-range corrections -+ -+ elrc=0.d0 -+ virlrc=0.d0 -+ -+ if(imcon.eq.0.or.imcon.eq.6)volm=4.d0*pi/3.d0*rvdw**3 -+ -+ call lrcorrect -+ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, -+ x ntpatm,ntpvdw,elrc,engunit,virlrc,rvdw,volm) -+ -+ if(lmetab.or.ntpmet.eq.0)then -+ -+ elrcm(0)=0.d0 -+ vlrcm(0)=0.d0 -+ -+ else -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+ if(imcon.eq.0.or.imcon.eq.6)volm=0.d0 -+ -+ return -+ end subroutine sysinit -+ -+ subroutine systemp -+ x (idnode,imcon,keyres,mxnode,natms,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for setting the initial system temperature -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,keyres,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,ntshl,levcfg,i,io,k,keyshl -+ real(8) degfre,degshl,degrot,temp,tolnce,sigma,rsq -+ -+c number of degrees of freedom -+c 3 for com translation -+c 3 for angular momentum about origin (non-periodic systems only) -+ -+ degfre=dble(3*(ntfree-ntshl)-3-ntcons)+degfre -+ if(imcon.eq.0.or.imcon.eq.6)degfre=degfre-3.0d0 -+ if(imcon.eq.0.or.imcon.eq.6)degrot=max(0.d0,degrot-3.0d0) -+ degshl=dble(3*ntshl) -+ -+c lose one degree of freedom if temperature constrained -+c gaussian constraints -+ -+c if(keyens.eq.1)degfre=degfre-1.d0 -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,/,' total degrees of freedom ',f20.0,/, -+ x ' rotational degrees of freedom ',f20.0,/, -+ x ' shell pseudo degrees of freedom',f20.0)") -+ x degfre,degrot,degshl -+ if(degfre.lt.1.d0)call error(idnode,350) -+ -+c define reciprocal masses of atoms -+ -+ do i=1,natms -+ -+ if(lstfrz(i).ne.0.or.weight(i).lt.1.d-6)then -+ -+ rmass(i)=0.d0 -+ weight(i)=0.d0 -+ -+ else -+ -+ rmass(i)=1.d0/weight(i) -+ -+ endif -+ -+ enddo -+ -+c generate starting velocities -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+ if(keyres.eq.0)then -+ -+ call gauss(natms,vxx,vyy,vzz) -+ -+ do i=1,natms -+ -+ rsq=sqrt(rmass(i)) -+ vxx(i)=vxx(i)*rsq -+ vyy(i)=vyy(i)*rsq -+ vzz(i)=vzz(i)*rsq -+ -+ enddo -+ -+ if(ntcons.gt.0)call quench -+ x (imcon,idnode,mxnode,natms,nscons,tolnce) -+ -+ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ if(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ elseif(keyres.eq.1.or.keyres.eq.3)then -+ -+ if(ngrp.gt.0)call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ elseif(keyres.eq.2)then -+ -+ if(ngrp.gt.0)then -+ -+ call vscaleg -+ x (idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ elseif(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c print out sample of initial configuration -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'sample of starting configuration',/)") -+ -+ io=(natms+19)/20 -+ if((levcfg.le.1).and.(idnode.eq.0)) -+ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',/,/)") -+ if((levcfg.eq.2).and.(idnode.eq.0)) -+ x write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)', -+ x 7x,'fx(i)',7x,'fy(i)',7x,'fz(i)',/,/)") -+ -+ do i=1,natms,io -+ -+ if(levcfg.le.1)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i) -+ -+ elseif(levcfg.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i), -+ x vxx(i),vyy(i),vzz(i),fxx(i),fyy(i),fzz(i) -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine systemp -+ -+ subroutine sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine defining global bookkeeping -+c arrays -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith july 1997 -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical loglnk,lneut,lshmov,lcnb,lsolva,lghost -+ integer idnode,imcon,mxnode,natms,nneut,ngrp,nscons,ntangl,i -+ integer ntbond,ntcons,ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,ii,isol,itmols,igsol,iggsol,natmsf,natmsl -+ integer ntghost,natms2 -+ real(8) degfre,degrot -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c neutral group bookkeeping -+ -+ call neutbook(lneut,idnode,natms,nneut) -+ -+c rigid body bookkeeping -+ -+ call quatbook -+ x (lsolva,idnode,imcon,mxnode,natms2,ngrp,ntpmls, -+ x ntfree,degfre,degrot) -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ -+ numcon(mxtmls)=numcon(mxtmls)+ntcons_ghost -+ numgrp(mxtmls)=numgrp(mxtmls)+ngrp_ghost -+ -+ endif -+ -+c construct list of excluded pair interactions -+ -+ if(lneut)then -+ -+ call exclude(idnode,mxnode,natms,ntpmls) -+ call excludeneu(idnode,mxnode,nneut) -+ -+ elseif(.not.lneut)then -+ -+ call exclude(idnode,mxnode,natms,ntpmls) -+ -+ if(loglnk)then -+ -+ call exclude_link(idnode,mxnode,ntpmls) -+ -+ else -+ -+ call exclude_atom(idnode,mxnode,natms,ntpmls) -+ -+ endif -+ -+ endif -+ -+c if excitation calculation, allow for ghost species -+ -+ if(lghost)then -+ -+ numcon(mxtmls)=numcon(mxtmls)-ntcons_ghost -+ numgrp(mxtmls)=numgrp(mxtmls)-ngrp_ghost -+ -+ endif -+ -+c construct interaction lists for bonded forces -+ -+ call intlist -+ x (lshmov,lcnb,idnode,mxnode,natms2,nscons,ntangl,ntbond, -+ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) -+ -+c adaptations for solvation and excitation simulations -+ -+ if(lsolva.or.lghost)then -+ -+ natmsf=0 -+ natmsl=0 -+ natm_sol(:)=0 -+ const_sol(:)=numcon(:)*nummols(:) -+ rigid_sol(:)=numgrp(:)*nummols(:) -+ -+ if(ngrp.eq.0)then -+ -+ do itmols=1,mxtmls -+ -+ natmsl=natmsl+numsit(itmols)*nummols(itmols) -+ -+ do isol=natmsf+1,natmsl -+ -+ if(lstfrz(isol).eq.0)then -+ natm_sol(itmols)=natm_sol(itmols)+1 -+ endif -+ -+ enddo -+ -+ natmsf=natmsl -+ -+ enddo -+ -+ else -+ -+ ii=1 -+ -+ do itmols=1,mxtmls -+ -+ natmsl=natmsl+numsit(itmols)*nummols(itmols) -+ -+ do isol=natmsf+1,natmsl -+ -+ if(lstgot_sol(ii).eq.isol)then -+ ii=ii+1 -+ else -+ -+ if(lstfrz(isol).eq.0)then -+ natm_sol(itmols)=natm_sol(itmols)+1 -+ endif -+ -+ endif -+ -+ enddo -+ -+ natmsf=natmsl -+ -+ enddo -+ -+ degrot_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 -+ degfre_sol(:)=degrot_sol(:)+dble(rigid_sol(:))*3.d0 -+ -+ endif -+ -+ if(lghost)natm_sol(mxtmls)=natm_sol(mxtmls)-ntghost -+ degfre_sol(:)=dble(3*(natm_sol(:))-const_sol(:))+degfre_sol(:) -+ -+ endif -+ -+ return -+ end subroutine sysbook -+ -+ subroutine define_units(idnode,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting energy units -+c -+c copyright - daresbury laboratory -+c author - w. smith august 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,idum,i -+ real(8) engunit -+ logical blank -+ -+ blank=.true. -+ -+ do i=6,lenrec -+ if(record(i).ne.' ')blank=.false. -+ enddo -+ -+ if(blank)then -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=dl_poly internal ', -+ x 'units ')") -+ -+ elseif(findstring('ev',record,idum))then -+ -+ engunit=9648.530821d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=electron volts ')") -+ -+ elseif(findstring('kev',record,idum))then -+ -+ engunit=9648530.821d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kilo electron volts ')") -+ -+ elseif(findstring('kcal',record,idum))then -+ -+ engunit=418.4d0 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kcal/ mol ')") -+ -+ elseif(findstring('kj',record,idum))then -+ -+ engunit=1.d2 -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kjoule/mol ')") -+ -+ elseif(findstring('k',record,idum))then -+ -+ engunit=boltz -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=kelvin ')") -+ -+ elseif(findstring('internal',record,idum))then -+ -+ if(idnode.eq.0) -+ x write(nrite,"(/,' energy units=dl_poly internal', -+ x ' units ')") -+ -+ else -+ -+ if(idnode.eq.0)write(nrite,'(a)')record -+ call error(idnode,5) -+ -+ endif -+ -+ return -+ end subroutine define_units -+ -+ subroutine quatbook -+ x (lsolva,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree, -+ x degfre,degrot) -+ -+c************************************************************************** -+c -+c dl_poly subroutine for setting up bookkeeping for rigid bodies -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c adapted - p.-a. cazade oct 2007, solvation etc -+c -+c************************************************************************* -+ -+ implicit none -+ -+ logical safe,pass1,pass2,linear,lsolva -+ integer fail,idnode,imcon,mxnode,natms,ngrp,ntpmls,ntfree -+ integer i,igrp,jgrp,kgrp,jr,jt,igrp1,igrp2,itmols,imols,lgrp,id -+ integer ii,jj,isite,k,kk,ill,i1,i2,i3,j,ngp,ifre1,ifre2,ig,ij -+ integer fngrp,lngrp -+ real(8) degfre,degrot,dnorm,a1,rtall,rotall,rot,aa,rotinr,bb,rot1 -+ real(8) rsq,det,dettest,aq,bq,cq,dq,eq,fq,gq,hq,rnorm,tol,rotxyz -+ real(8) rotlim,rrr -+ -+ integer, allocatable :: ind(:,:),lstgot(:) -+ real(8), allocatable :: gaxs(:,:),rotmin(:),accum(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ dimension rot(9),aa(9),rotinr(3,3),bb(9),rot1(3,3),fail(5) -+ -+ data fail/0,0,0,0,0/ -+ -+c allocate working arrays -+ -+ allocate (ind(mxgrp,3),lstgot(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) -+ allocate (gaxs(mxungp,9),rotmin(mxungp),stat=fail(4)) -+ allocate (accum(mxungp),stat=fail(5)) -+ do i=1,5 -+ if(fail(i).ne.0)call error(idnode,1790) -+ enddo -+ -+c initialise bookkeeping indices -+ -+ igrp=0 -+ jgrp=0 -+ kgrp=0 -+ isite=0 -+ jr=0 -+ jt=0 -+ safe=.true. -+ degfre=0.d0 -+ degrot=0.d0 -+ -+c rigid body identifier -+ -+ do i=1,natms -+ lstbod(i)=0 -+ enddo -+ -+c number of rigid groups in system -+ -+ ngrp=0 -+ do itmols=1,ntpmls -+ ngrp=ngrp+nummols(itmols)*numgrp(itmols) -+ enddo -+ -+c block indices for groups -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c loop over molecule types -+ -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if(igrp.le.mxgrp)then -+ -+ lstgtp(igrp)=listyp(lgrp+kgrp) -+ id=listyp(lgrp+kgrp) -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2))then -+ -+ jgrp=jgrp+1 -+ -+ do jj=1,numgsit(id) -+ -+ jr=jr+1 -+ jt=jt+1 -+ -+ if(jr.le.mxatms.and.jt.le.mxatms)then -+ -+ lstrgd(jr)=lstgst(id,jj)+isite -+ lstgot(jt)=lstgst(id,jj)+isite -+ lstbod(lstgst(id,jj)+isite)=igrp -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ else -+ -+ do jj=1,numgsit(id) -+ -+ jt=jt+1 -+ if(jt.le.mxatms)then -+ -+ lstgot(jt)=lstgst(id,jj)+isite -+ lstbod(lstgst(id,jj)+isite)=igrp -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,304) -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ kgrp=kgrp+numgrp(itmols) -+ -+ enddo -+ -+ if(ngrp.eq.0)then -+ -+ j=0 -+ do i=1,natms -+ -+ if(lstfrz(i).eq.0)then -+ -+ j=j+1 -+ lstfre(j)=i -+ -+ endif -+ -+ enddo -+ ntfree=j -+ -+ else -+ -+c centre of mass of groups -+c assumes group dimensions are smaller than half box width -+ -+ do i=1,natms -+ lstme(i)=0 -+ enddo -+ -+ do id=1,mxungp -+ gmass(id)=0.d0 -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c working com is first site in group -+ -+ i=lstrgd(jr+1) -+ txx(ig)=xxx(i) -+ tyy(ig)=yyy(i) -+ tzz(ig)=zzz(i) -+ -+ id=lstgtp(ig) -+ safe=.false. -+ if(abs(gmass(id)).lt.1.d-10)safe=.true. -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ xxt(jr)=xxx(i)-txx(ig) -+ yyt(jr)=yyy(i)-tyy(ig) -+ zzt(jr)=zzz(i)-tzz(ig) -+ if(safe)gmass(id)=gmass(id)+weight(i) -+ -+ enddo -+ -+ enddo -+ -+c minimum image from working com -+ -+ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=0.d0 -+ gcmy(ig)=0.d0 -+ gcmz(ig)=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ gcmx(ig)=gcmx(ig)+weight(i)*xxt(jr) -+ gcmy(ig)=gcmy(ig)+weight(i)*yyt(jr) -+ gcmz(ig)=gcmz(ig)+weight(i)*zzt(jr) -+ -+ enddo -+ -+ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) -+ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) -+ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) -+ -+ enddo -+ -+c global communications -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+c make sure all nodes have same copy of gmass -+ -+ if(mxnode.gt.1)then -+ -+ do id=1,mxungp -+ -+ accum(id)=0.d0 -+ if(gmass(id).gt.0.d0)accum(id)=1.d0 -+ -+ enddo -+ -+ call gdsum(gmass(1),mxungp,buffer(1)) -+ call gdsum(accum(1),mxungp,buffer(1)) -+ -+ do id=1,mxungp -+ -+ dnorm=max(1.d0,accum(id)) -+ gmass(id)=gmass(id)/dnorm -+ -+ enddo -+ -+ endif -+ -+c find a group of each type on this node to -+c find principal axis system of the group type -+ -+ do id=1,mxungp -+ -+ jr=0 -+ ij=0 -+ safe=.false. -+ -+ do while(.not.safe.and.ij.lt.ngrp) -+ -+ ij=ij+1 -+ jr=jr+numgsit(lstgtp(ij)) -+ if(lstgtp(ij).eq.id)safe=.true. -+ -+ enddo -+ -+ if(safe)then -+ -+c rotational inertia accumulator -+ -+ do k=1,3 -+ -+ do kk=1,3 -+ -+ rotinr(k,kk)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstgot(jr) -+ -+ xxt(jr)=xxx(i)-gcmx(ij) -+ yyt(jr)=yyy(i)-gcmy(ij) -+ zzt(jr)=zzz(i)-gcmz(ij) -+ -+ call images(imcon,0,1,1,cell,xxt(jr),yyt(jr),zzt(jr)) -+ -+ rotinr(1,1)=rotinr(1,1)+weight(i)*(xxt(jr)**2) -+ rotinr(1,2)=rotinr(1,2)+weight(i)*xxt(jr)*yyt(jr) -+ rotinr(1,3)=rotinr(1,3)+weight(i)*xxt(jr)*zzt(jr) -+ rotinr(2,2)=rotinr(2,2)+weight(i)*(yyt(jr)**2) -+ rotinr(2,3)=rotinr(2,3)+weight(i)*yyt(jr)*zzt(jr) -+ rotinr(3,3)=rotinr(3,3)+weight(i)*(zzt(jr)**2) -+ -+ enddo -+ -+ rotinr(2,1)=rotinr(1,2) -+ rotinr(3,1)=rotinr(1,3) -+ rotinr(3,2)=rotinr(2,3) -+ -+ call jacobi(rotinr,rot1,3) -+ -+ rot(1)=rot1(1,1) -+ rot(4)=rot1(2,1) -+ rot(7)=rot1(3,1) -+ rot(2)=rot1(1,2) -+ rot(5)=rot1(2,2) -+ rot(8)=rot1(3,2) -+ rot(3)=rot1(1,3) -+ rot(6)=rot1(2,3) -+ rot(9)=rot1(3,3) -+ -+c rotational inertia accumulators -+ -+ rotinx(id,1)=0.d0 -+ rotiny(id,1)=0.d0 -+ rotinz(id,1)=0.d0 -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstgot(jr) -+ -+c site positions in principal axis system -+ -+ gxx(id,j)=rot(1)*xxt(jr)+rot(4)*yyt(jr)+rot(7)*zzt(jr) -+ gyy(id,j)=rot(2)*xxt(jr)+rot(5)*yyt(jr)+rot(8)*zzt(jr) -+ gzz(id,j)=rot(3)*xxt(jr)+rot(6)*yyt(jr)+rot(9)*zzt(jr) -+ -+c impose rounding -+ -+ if(abs(gxx(id,j)).lt.1.d-8)gxx(id,j)=0.d0 -+ if(abs(gyy(id,j)).lt.1.d-8)gyy(id,j)=0.d0 -+ if(abs(gzz(id,j)).lt.1.d-8)gzz(id,j)=0.d0 -+ -+c rotational inertia tensor of group type -+ -+ rotinx(id,1)=rotinx(id,1)+ -+ x weight(i)*(gyy(id,j)**2+gzz(id,j)**2) -+ rotiny(id,1)=rotiny(id,1)+ -+ x weight(i)*(gzz(id,j)**2+gxx(id,j)**2) -+ rotinz(id,1)=rotinz(id,1)+ -+ x weight(i)*(gxx(id,j)**2+gyy(id,j)**2) -+ -+ enddo -+ -+c set axis system such that: Ixx >=Iyy >=Izz -+ -+ rotxyz=max(rotinx(id,1),rotiny(id,1),rotinz(id,1)) -+ -+ if(rotxyz.ge.rotinx(id,1))then -+ -+ if(rotiny(id,1).ge.rotxyz)then -+ -+ do j=1,numgsit(id) -+ -+ a1=gxx(id,j) -+ gxx(id,j)=gyy(id,j) -+ gyy(id,j)=-a1 -+ -+ enddo -+ -+ rotiny(id,1)=rotinx(id,1) -+ rotinx(id,1)=rotxyz -+ -+ elseif(rotinz(id,1).ge.rotxyz)then -+ -+ do j=1,numgsit(id) -+ -+ a1=gxx(id,j) -+ gxx(id,j)=gzz(id,j) -+ gzz(id,j)=-a1 -+ -+ enddo -+ -+ rotinz(id,1)=rotinx(id,1) -+ rotinx(id,1)=rotxyz -+ -+ endif -+ -+ endif -+ -+ if(rotinz(id,1).gt.rotiny(id,1))then -+ -+ do j=1,numgsit(id) -+ -+ a1=gyy(id,j) -+ gyy(id,j)=gzz(id,j) -+ gzz(id,j)=-a1 -+ -+ enddo -+ -+ a1=rotinz(id,1) -+ rotinz(id,1)=rotiny(id,1) -+ rotiny(id,1)=a1 -+ -+ endif -+ -+c set up principal axis system in terms of site positions -+ -+c test for (near) linear unit -+ -+ ill=0 -+ rtall=(rotinx(id,1)+rotiny(id,1)+rotinz(id,1)) -+ -+ if(rtall.gt.1.d-5)then -+ rotall=rtall -+ else -+ rotall=1.d0 -+ endif -+ -+ rotmin(id)=min(rotinx(id,1),rotiny(id,1)) -+ rotmin(id)=min(rotmin(id),rotinz(id,1))/rotall -+ -+ if((rotinx(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ if((rotiny(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ if((rotinz(id,1)/rotall).lt.1.d-5)ill=ill+1 -+ -+ if(ill.ge.2)then -+ -+c point particle only -+ -+ ind(id,1)=1 -+ ind(id,2)=1 -+ ind(id,3)=1 -+ -+ do jj=1,9 -+ gaxs(id,jj)=0.d0 -+ enddo -+ -+ elseif(ill.eq.1)then -+ -+c linear molecule -+ -+ ind(id,1)=1 -+ ind(id,2)=2 -+ ind(id,3)=1 -+ -+ aa(1)=gxx(id,1)-gxx(id,2) -+ aa(4)=gyy(id,1)-gyy(id,2) -+ aa(7)=gzz(id,1)-gzz(id,2) -+ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) -+ -+ if(abs(aa(7)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(7)**2) -+ aa(2)=0.d0 -+ aa(5)=aa(7)/rsq -+ aa(8)=-aa(4)/rsq -+ -+ elseif(abs(aa(4)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(1)**2) -+ aa(2)=-aa(4)/rsq -+ aa(5)=aa(1)/rsq -+ aa(8)=0.d0 -+ -+ elseif(abs(aa(1)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(1)**2+aa(7)**2) -+ aa(2)=-aa(7)/rsq -+ aa(5)=0.d0 -+ aa(8)=aa(1)/rsq -+ -+ endif -+ -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+ call invert(aa,bb,det) -+ -+ if(abs(det).lt.1.d-5)call error(idnode,306) -+ -+ do j=1,9 -+ gaxs(id,j)=bb(j) -+ enddo -+ -+ elseif(ill.eq.0)then -+ -+c non-linear molecule -+ -+ i1=1 -+ i2=1 -+ i3=1 -+ pass1=.true. -+ dettest=1.d-1 -+ -+ do while(pass1.and.i2.lt.numgsit(id)-1) -+ -+ i2=i2+1 -+ i3=i2 -+ pass2=.true. -+ -+ do while(pass2.and.i3.lt.numgsit(id)) -+ -+ i3=i3+1 -+ -+ aa(1)=gxx(id,i1)-gxx(id,i2) -+ aa(4)=gyy(id,i1)-gyy(id,i2) -+ aa(7)=gzz(id,i1)-gzz(id,i2) -+ aa(2)=gxx(id,i1)-gxx(id,i3) -+ aa(5)=gyy(id,i1)-gyy(id,i3) -+ aa(8)=gzz(id,i1)-gzz(id,i3) -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+c invert matrix -+ -+ call invert(aa,bb,det) -+ -+c check on size of determinant - to see if the 3 sites are -+c too close to being linear for safety. -+ -+ pass2=abs(det).lt.dettest -+ -+ enddo -+ -+ pass1=abs(det).lt.dettest -+ -+ enddo -+ -+ if(abs(det).lt.dettest)call error(idnode,306) -+ -+c store indices used -+ -+ ind(id,1)=i1 -+ ind(id,2)=i2 -+ ind(id,3)=i3 -+ -+c store coefficients -+ -+ do j=1,9 -+ -+ gaxs(id,j)=bb(j) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c check that rigid unit does not contain frozen atoms -+ -+ safe=.true. -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ if(lstfrz(i).ne.0)safe=.false. -+ -+ enddo -+ -+ enddo -+ -+c global check on error condition -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,360) -+ -+c quaternions for all rigid groups in system -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ i1=lstrgd(jr+ind(id,1)) -+ i2=lstrgd(jr+ind(id,2)) -+ i3=lstrgd(jr+ind(id,3)) -+ -+ jr=jr+numgsit(id) -+ -+c group basis vectors -+ -+ aa(1)=xxx(i1)-xxx(i2) -+ aa(4)=yyy(i1)-yyy(i2) -+ aa(7)=zzz(i1)-zzz(i2) -+ -+ call images(imcon,0,1,1,cell,aa(1),aa(4),aa(7)) -+ -+ if(rotmin(id).gt.1.d-5)then -+ -+ aa(2)=xxx(i1)-xxx(i3) -+ aa(5)=yyy(i1)-yyy(i3) -+ aa(8)=zzz(i1)-zzz(i3) -+ -+ else -+ -+ rsq=sqrt(aa(1)**2+aa(4)**2+aa(7)**2) -+ -+ if(abs(aa(7)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(7)**2) -+ aa(2)=0.d0 -+ aa(5)=aa(7)/rsq -+ aa(8)=-aa(4)/rsq -+ -+ elseif(abs(aa(4)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(4)**2+aa(1)**2) -+ aa(2)=-aa(4)/rsq -+ aa(5)=aa(1)/rsq -+ aa(8)=0.d0 -+ -+ elseif(abs(aa(1)/rsq).gt.0.5d0)then -+ -+ rsq=sqrt(aa(1)**2+aa(7)**2) -+ aa(2)=-aa(7)/rsq -+ aa(5)=0.d0 -+ aa(8)=aa(1)/rsq -+ -+ endif -+ -+ endif -+ -+ call images(imcon,0,1,1,cell,aa(2),aa(5),aa(8)) -+ -+ aa(3)=aa(4)*aa(8)-aa(7)*aa(5) -+ aa(6)=aa(7)*aa(2)-aa(1)*aa(8) -+ aa(9)=aa(1)*aa(5)-aa(4)*aa(2) -+ -+c group rotational matrix -+ -+ rot(1)=gaxs(id,1)*aa(1)+gaxs(id,4)*aa(2)+gaxs(id,7)*aa(3) -+ rot(2)=gaxs(id,2)*aa(1)+gaxs(id,5)*aa(2)+gaxs(id,8)*aa(3) -+ rot(3)=gaxs(id,3)*aa(1)+gaxs(id,6)*aa(2)+gaxs(id,9)*aa(3) -+ rot(4)=gaxs(id,1)*aa(4)+gaxs(id,4)*aa(5)+gaxs(id,7)*aa(6) -+ rot(5)=gaxs(id,2)*aa(4)+gaxs(id,5)*aa(5)+gaxs(id,8)*aa(6) -+ rot(6)=gaxs(id,3)*aa(4)+gaxs(id,6)*aa(5)+gaxs(id,9)*aa(6) -+ rot(7)=gaxs(id,1)*aa(7)+gaxs(id,4)*aa(8)+gaxs(id,7)*aa(9) -+ rot(8)=gaxs(id,2)*aa(7)+gaxs(id,5)*aa(8)+gaxs(id,8)*aa(9) -+ rot(9)=gaxs(id,3)*aa(7)+gaxs(id,6)*aa(8)+gaxs(id,9)*aa(9) -+ -+c determine quaternions from rotational matrix -+ -+ aq=rot(1)+rot(5) -+ bq=rot(2)-rot(4) -+ cq=rot(6)-rot(8) -+ dq=rot(2)+rot(4) -+ eq=rot(3)+rot(7) -+ fq=rot(6)+rot(8) -+ gq=rot(3)-rot(7) -+ hq=rot(1)-rot(5) -+ -+ q0(ig)=0.5d0*sqrt(aq+sqrt(aq*aq+bq*bq)) -+ -+ if(q0(ig).gt.1.d-4)then -+ -+ q1(ig)=-0.25d0*cq/q0(ig) -+ q2(ig)=0.25d0*gq/q0(ig) -+ q3(ig)=-0.25d0*bq/q0(ig) -+ -+ else -+ -+ q1(ig)=0.5d0*sqrt(hq+sqrt(hq*hq+dq*dq)) -+ -+ if(q1(ig).gt.1.d-4)then -+ -+ q2(ig)=0.25d0*dq/q1(ig) -+ q3(ig)=0.25d0*eq/q1(ig) -+ -+ else -+ -+ q2(ig)=0.5d0*sqrt(-hq+sqrt(hq*hq+dq*dq)) -+ -+ if(q2(ig).gt.1.d-4)then -+ -+ q3(ig)=0.25d0*fq/q2(ig) -+ -+ else -+ -+ q3(ig)=1.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c normalise quaternions -+ -+ rnorm=1.d0/sqrt(q0(ig)**2+q1(ig)**2+q2(ig)**2+q3(ig)**2) -+ q0(ig)=rnorm*q0(ig) -+ q1(ig)=rnorm*q1(ig) -+ q2(ig)=rnorm*q2(ig) -+ q3(ig)=rnorm*q3(ig) -+ -+ enddo -+ -+c test for redundant degrees of freedom -+c and ensure rotational inertias are non-zero -+ -+ degrot=0.d0 -+ -+ if(lsolva)then -+ degrot_sol(:)=0.d0 -+ endif -+ -+ do ig=1,ngrp -+ -+ id=lstgtp(ig) -+ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1)) -+ -+ if(rotall*rotinx(id,1).lt.1.d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ if(rotall*rotiny(id,1).lt.1.d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ if(rotall*rotinz(id,1).lt.1d-5)then -+ degrot=degrot-1.d0 -+ endif -+ -+ enddo -+ -+c rotational degrees of freedom and rigid body contribution -+c to total degrees of freedom -+ -+ degrot=degrot+dble(ngrp)*3.d0 -+ degfre=degrot+dble(ngrp)*3.d0 -+ -+ if(lsolva)then -+ -+ fngrp=1 -+ lngrp=0 -+ -+ do itmols=1,mxtmls -+ -+ lngrp=lngrp+nummols(itmols)*numgrp(itmols) -+ -+ do ig=fngrp,lngrp -+ -+ id=lstgtp(ig) -+ rotall=1.d0/max(1.d-5,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1)) -+ -+ if(rotall*rotinx(id,1).lt.1.d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ if(rotall*rotiny(id,1).lt.1.d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ if(rotall*rotinz(id,1).lt.1d-5)then -+ degrot_sol(itmols)=degrot_sol(itmols)-1.d0 -+ endif -+ -+ enddo -+ -+ fngrp=lngrp+1 -+ -+ enddo -+ -+ endif -+ -+c summarise results -+ -+ if(idnode.eq.0)then -+ -+ if(gmass(1).gt.0.d0)then -+ -+ write(nrite,'(/,/,12x,a)')' summary of rigid body set up' -+ -+ do id=1,mxungp -+ -+ if(gmass(id).gt.0.d0)then -+ -+ write(nrite,'(/,a,i10)')' group of type ',id -+ write(nrite,'(12x,a,f20.10)')' total mass ', -+ x gmass(id) -+ write(nrite,'(12x,a,3f20.10)')' rot. inertia ', -+ x rotinx(id,1),rotiny(id,1),rotinz(id,1) -+ write(nrite,'(/,12x,a,3(8x,a7))')' site','a coord', -+ x 'b coord','c coord' -+ do j=1,numgsit(id) -+ write(nrite,'(12x,i5,1p,3e15.5)')j,gxx(id,j), -+ x gyy(id,j),gzz(id,j) -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c find number of unique groups -+ -+ ngp=0 -+ do ig=1,ngrp -+ ngp=max(ngp,lstgtp(ig)) -+ enddo -+ -+c calculate reciprocal of rotational inertias -+ -+ do id=1,ngp -+ -+ rotlim=max(1.d-2,rotinx(id,1)+rotiny(id,1)+ -+ x rotinz(id,1))*1.d-5 -+ -+ if(rotinx(id,1).lt.rotlim)then -+ rotinx(id,2)=0.d0 -+ else -+ rotinx(id,2)=1.d0/rotinx(id,1) -+ endif -+ -+ if(rotiny(id,1).lt.rotlim)then -+ rotiny(id,2)=0.d0 -+ else -+ rotiny(id,2)=1.d0/rotiny(id,1) -+ endif -+ -+ if(rotinz(id,1).lt.rotlim)then -+ rotinz(id,2)=0.d0 -+ else -+ rotinz(id,2)=1.d0/rotinz(id,1) -+ endif -+ -+ enddo -+ -+c Check of quaternion set up with atomic positions -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c group type -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 -+ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) -+ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) -+ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) -+ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 -+ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) -+ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) -+ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) -+ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxt(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyt(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzt(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ -+ txx(jr)=xxx(i)-xxt(i) -+ tyy(jr)=yyy(i)-yyt(i) -+ tzz(jr)=zzz(i)-zzt(i) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,jr,cell,txx,tyy,tzz) -+ -+c set tolerance for testing quaternion setup. -+ -+ rsq=0.d0 -+ tol=1.d-2 -+ -+ do i=1,jr -+ -+ rrr=txx(i)**2+tyy(i)**2+tzz(i)**2 -+ if(rrr.gt.tol)then -+ -+ rsq=rrr -+ -+ endif -+ -+ enddo -+ -+c exit if error in set up -+ -+ safe=.true. -+ if(rsq.gt.tol)safe=.false. -+ if(mxnode.gt.1)call gstate(safe) -+ -+ if(.not.safe)call error(idnode,310) -+ -+c sort lstgot into ascending order -+ -+ call shellsort(jt,lstgot) -+ -+c check that no site is in more than 1 rigid group -+ -+ i=1 -+ safe=.true. -+ do while(i.lt.jt) -+ -+ i=i+1 -+ linear=.true. -+ do while(linear) -+ -+ linear=.false. -+ -+ if(lstgot(i).eq.lstgot(i-1))then -+ -+ linear=.true. -+ safe=.false. -+ jt=jt-1 -+ -+ do j=i,jt -+ lstgot(j)=lstgot(j+1) -+ enddo -+ -+ endif -+ -+ if(i.ge.jt)linear=.false. -+ -+ enddo -+ -+ enddo -+ -+ if(.not.safe)call error(idnode,320) -+ -+c list of 'free' sites -+ -+ ii=1 -+ jj=0 -+ do i=1,natms -+ -+ if(lstgot(ii).eq.i)then -+ -+ ii=ii+1 -+ -+ else -+ -+ if(lstfrz(i).eq.0)then -+ jj=jj+1 -+ lstfre(jj)=i -+ endif -+ -+ endif -+ -+ enddo -+ -+c number of free sites -+ -+ ntfree=jj -+ -+c list of atoms integrated on this node -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ jr=jr+numgsit(id) -+ -+ enddo -+ -+ do i=1,jr -+ lstme(i)=lstrgd(i) -+ enddo -+ -+c block parameters for free atoms -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+ do i=ifre1,ifre2 -+ -+ jr=jr+1 -+ lstme(jr)=lstfre(i) -+ -+ enddo -+ -+c exchange quaternion data with other nodes -+ -+ if(mxnode.gt.1)call merge4 -+ x (idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+ if(lsolva)lstgot_sol(:)=lstgot(:) -+ -+c deallocate work arrays -+ -+ deallocate (ind,lstgot,stat=fail(1)) -+ deallocate (txx,tyy,tzz,stat=fail(2)) -+ deallocate (xxt,yyt,zzt,stat=fail(3)) -+ deallocate (gaxs,rotmin,stat=fail(4)) -+ deallocate (accum,stat=fail(5)) -+ -+ return -+ end subroutine quatbook -+ -+ subroutine abort_field_read(kode,idnode,nfield) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting FIELD file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nfield -+ -+ if(idnode.eq.0)close (nfield) -+ -+ if(kode.eq.1)then -+ -+c end of field file error exit -+ -+ call error(idnode,52) -+ -+ elseif(kode.eq.2)then -+ -+c unrecognised directive in field file -+ -+ call error(idnode,4) -+ -+ endif -+ -+ return -+ end subroutine abort_field_read -+ -+ subroutine abort_control_read(kode,idnode,nread) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting CONTROL file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nread -+ -+ if(idnode.eq.0)close (nread) -+ -+ if(kode.eq.1)then -+ -+c end of control file error exit -+ -+ call error(idnode,53) -+ -+ elseif(kode.eq.2)then -+ -+c general error exit from field file processing -+ -+ call error(idnode,0) -+ -+ endif -+ -+ return -+ end subroutine abort_control_read -+ -+ subroutine abort_config_read(kode,idnode,nconf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for aborting CONTROL file read -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer kode,idnode,nconf -+ -+ if(idnode.eq.0)close (nconf) -+ -+ if(kode.eq.1)then -+ -+c general error exit from field file processing -+ -+ call error(idnode,54) -+ -+ elseif(kode.eq.2)then -+ -+c end of config file error exit -+ -+ call error(idnode,55) -+ -+ endif -+ -+ return -+ end subroutine abort_config_read -+ -+ subroutine neutbook(lneut,idnode,natms,nneut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for neutral group bookkeeping -+c -+c copyright - daresbury laboratory -+c author - w. smith nov 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lneut,safe -+ integer idnode,natms,nneut,i -+ -+ safe=.true. -+ -+c neutral group bookkeeping: sites must be listed consecutively -+ -+ if(lneut)then -+ -+ if(lstneu(1).ne.1)call error(idnode,230) -+ -+ neulst(1)=1 -+ nneut=1 -+ -+ do i=2,natms -+ -+ safe=.false. -+ if(lstneu(i).eq.lstneu(i-1))safe=.true. -+ if(lstneu(i).eq.lstneu(i-1)+1)then -+ -+ safe=.true. -+ nneut=nneut+1 -+ if(nneut.gt.mxneut)call error(idnode,220) -+ neulst(nneut)=i -+ -+ endif -+ -+ if(.not.safe)call error(idnode,230) -+ -+ enddo -+ -+ neulst(nneut+1)=natms+1 -+ -+ endif -+ -+ return -+ -+ end subroutine neutbook -+ -+ subroutine intlist -+ x (lshmov,lcnb,idnode,mxnode,natms,nscons,ntangl,ntbond, -+ x ntcons,ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf,ngrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the interaction lists -+c for the entire simulated system -+c -+c parallel replicated dat version : block data -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith july 1992 -+c amended - t.forester oct 1993 -+c amended - t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,safe1,lcnb,lchk,lfail -+ integer idnode,mxnode,natms,nscons,ntangl,ntbond,ntcons -+ integer ntdihd,ntinv,ntpmls,ntteth,ntshl,ntpmf,nspmf -+ integer ibonds,jbonds,kbonds,ipmf,jpmf,iangle,jangle,kangle -+ integer idihed,jdihed,kdihed,iinver,jinver,kinver,iteths -+ integer jteths,kteths,ishels,jshels,kshels,ntbon0,ntpmf0 -+ integer ntang0,ntdih0,ntinv0,nttet0,ntshl0,ntcon0,idum -+ integer itmols,isite,iconst,jconst,kconst,ibnd1,ibnd2,ipmf1 -+ integer ipmf2,iang1,iang2,idih1,idih2,iinv1,iinv2,itet1 -+ integer itet2,ishl1,ishl2,imols,lbonds,lpmf,jj,nnn,langle -+ integer ldihed,linver,lteths,lshels,i,ii,ntmp,klo,khi,ngrp -+ integer klo0,ifail,iloop,nnode,nscons0,nscons1,icon,fail -+ integer kcons,id,jdnode,lconst,itry,iatom,jatom,j,nfail -+ real(8) tol -+ -+ integer, allocatable :: itest(:),index(:),kscons(:) -+ integer, allocatable :: msite(:),mconst(:),listin(:) -+ -+ dimension fail(4) -+ -+ data fail/0,0,0,0/ -+ -+c allocate work arrays -+ -+ allocate (itest(mxtmls),index(mxtmls),stat=fail(1)) -+ allocate (msite(mxtmls),mconst(mxtmls),stat=fail(2)) -+ allocate (listin(mxatms),stat=fail(3)) -+ allocate (kscons(0:mxproc-1),stat=fail(4)) -+ do i=1,4 -+ if(fail(i).ne.0)call error(idnode,1800) -+ enddo -+ -+c initialise bookkeeping indices -+ -+ ibonds=0 -+ jbonds=0 -+ kbonds=0 -+ ipmf=0 -+ jpmf=0 -+ iangle=0 -+ jangle=0 -+ kangle=0 -+ idihed=0 -+ jdihed=0 -+ kdihed=0 -+ iinver=0 -+ jinver=0 -+ kinver=0 -+ iteths=0 -+ jteths=0 -+ kteths=0 -+ ishels=0 -+ jshels=0 -+ kshels=0 -+ safe=.true. -+ safe1=.true. -+ -+c find total number of bonds,pmf constraints,bond constraints, -+c angles,dihedrals,inversions, tethers,core-shells, in system -+c - ignoring frozen atoms -+ -+ ntbon0=0 -+ ntpmf0=0 -+ ntcon0=0 -+ ntang0=0 -+ ntdih0=0 -+ ntinv0=0 -+ nttet0=0 -+ ntshl0=0 -+ nscons=0 -+ ntcons=0 -+ -+ do itmols=1,ntpmls -+ -+ ntbon0=ntbon0+nummols(itmols)*numbonds(itmols) -+ ntpmf0=ntpmf0+nummols(itmols)*numpmf(itmols) -+ ntcon0=ntcon0+nummols(itmols)*numcon(itmols) -+ ntang0=ntang0+nummols(itmols)*numang(itmols) -+ ntdih0=ntdih0+nummols(itmols)*numdih(itmols) -+ ntinv0=ntinv0+nummols(itmols)*numinv(itmols) -+ nttet0=nttet0+nummols(itmols)*numteth(itmols) -+ ntshl0=ntshl0+nummols(itmols)*numshl(itmols) -+ -+ enddo -+ -+ isite=0 -+ iconst=0 -+ jconst=0 -+ kconst=0 -+ -+c first and last index of bonds, angles etc for this node -+ -+ ibnd1=(idnode*ntbon0)/mxnode+1 -+ ibnd2=((idnode+1)*ntbon0)/mxnode -+ -+ ipmf1=(idnode*ntpmf0)/mxnode+1 -+ ipmf2=((idnode+1)*ntpmf0)/mxnode -+ ntpmf=ntpmf0 -+ nspmf=ipmf2+1-ipmf1 -+ -+ iang1=(idnode*ntang0)/mxnode+1 -+ iang2=((idnode+1)*ntang0)/mxnode -+ -+ idih1=(idnode*ntdih0)/mxnode+1 -+ idih2=((idnode+1)*ntdih0)/mxnode -+ -+ iinv1=(idnode*ntinv0)/mxnode+1 -+ iinv2=((idnode+1)*ntinv0)/mxnode -+ -+ itet1=(idnode*nttet0)/mxnode+1 -+ itet2=((idnode+1)*nttet0)/mxnode -+ -+ ishl1=(idnode*ntshl0)/mxnode+1 -+ ishl2=((idnode+1)*ntshl0)/mxnode -+ -+c loop over molecule types -+ -+ do itmols=1,ntpmls -+ -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct bond constraint list later -+c construct chemical bond interaction list -+ -+ do lbonds=1,numbonds(itmols) -+ -+ ibonds=ibonds+1 -+ -+ if(ibonds.ge.ibnd1.and.ibonds.le.ibnd2)then -+ -+ jbonds=jbonds+1 -+ if(jbonds.le.mxbond)then -+ -+ listbnd(jbonds,1)=lbonds+kbonds -+ listbnd(jbonds,2)=lstbnd(lbonds+kbonds,1) -+ x +isite -+ listbnd(jbonds,3)=lstbnd(lbonds+kbonds,2) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,31) -+ -+c construct pmf site lists - no exclusions -+ -+ do lpmf=1,numpmf(itmols) -+ -+ ipmf=ipmf+1 -+ -+ if(ipmf.ge.ipmf1.and.ipmf.le.ipmf2)then -+ -+ jpmf=jpmf+1 -+ if(jpmf.le.mspmf)then -+ -+ nnn=npmf(1)+npmf(2) -+ if(nnn.le.mxspmf)then -+ -+ do jj=1,npmf(1)+npmf(2) -+ lstpmf(jj,jpmf)=indpmf(jj)+isite -+ enddo -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ else -+ -+ safe1=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe1) -+ if(.not.safe1)call error(idnode,458) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,460) -+ -+c construct valence angle interaction list -+ -+ do langle=1,numang(itmols) -+ -+ iangle=iangle+1 -+ -+ if(iangle.ge.iang1.and.iangle.le.iang2)then -+ -+ jangle=jangle+1 -+ if(jangle.le.mxangl)then -+ -+ listang(jangle,1)=langle+kangle -+ listang(jangle,2)=lstang(langle+kangle,1) -+ x +isite -+ listang(jangle,3)=lstang(langle+kangle,2) -+ x +isite -+ listang(jangle,4)=lstang(langle+kangle,3) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,51) -+ -+c construct dihedral angle interaction list -+ -+ do ldihed=1,numdih(itmols) -+ -+ idihed=idihed+1 -+ -+ if(idihed.ge.idih1.and.idihed.le.idih2)then -+ -+ jdihed=jdihed+1 -+ if(jdihed.le.mxdihd)then -+ -+ listdih(jdihed,1)=ldihed+kdihed -+ listdih(jdihed,2)=lstdih(ldihed+kdihed,1) -+ x +isite -+ listdih(jdihed,3)=lstdih(ldihed+kdihed,2) -+ x +isite -+ listdih(jdihed,4)=lstdih(ldihed+kdihed,3) -+ x +isite -+ listdih(jdihed,5)=lstdih(ldihed+kdihed,4) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,61) -+ -+c construct inversion potential list -+ -+ do linver=1,numinv(itmols) -+ -+ iinver=iinver+1 -+ -+ if(iinver.ge.iinv1.and.iinver.le.iinv2)then -+ -+ jinver=jinver+1 -+ if(jinver.le.mxinv)then -+ -+ listinv(jinver,1)=linver+kinver -+ listinv(jinver,2)=lstinv(linver+kinver,1) -+ x +isite -+ listinv(jinver,3)=lstinv(linver+kinver,2) -+ x +isite -+ listinv(jinver,4)=lstinv(linver+kinver,3) -+ x +isite -+ listinv(jinver,5)=lstinv(linver+kinver,4) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,77) -+ -+c construct tethered atoms interaction list -+ -+ do lteths=1,numteth(itmols) -+ -+ iteths=iteths+1 -+ -+ if(iteths.ge.itet1.and.iteths.le.itet2)then -+ -+ jteths=jteths+1 -+ if(jteths.le.msteth)then -+ -+ listtet(jteths,1)=lteths+kteths -+ listtet(jteths,2)=lsttet(lteths+kteths)+isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,63) -+ -+c construct core-shell list -+ -+ do lshels=1,numshl(itmols) -+ -+ ishels=ishels+1 -+ -+ if(ishels.ge.ishl1.and.ishels.le.ishl2)then -+ -+ jshels=jshels+1 -+ if(jshels.le.mxshl)then -+ -+ listshl(jshels,1)=lshels+kshels -+ listshl(jshels,2)=lstshl(lshels+kshels,1) -+ x +isite -+ listshl(jshels,3)=lstshl(lshels+kshels,2) -+ x +isite -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,59) -+ -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ kbonds=kbonds+numbonds(itmols) -+ kangle=kangle+numang(itmols) -+ kdihed=kdihed+numdih(itmols) -+ kinver=kinver+numinv(itmols) -+ kteths=kteths+numteth(itmols) -+ kshels=kshels+numshl(itmols) -+ -+ enddo -+ -+c store array counters for bookkeeping -+ -+ ntbond=ibonds -+ ntangl=iangle -+ ntdihd=idihed -+ ntinv=iinver -+ ntteth=iteths -+ ntshl=ishels -+ -+c pass bond constraint information to other nodes -+ -+ if(ntcon0.gt.0)then -+ -+ ntcons=ntcon0 -+ -+c find starting site no. and constraint no. for each molec. type -+ -+ msite(1)=0 -+ mconst(1)=0 -+ -+ do itmols=2,ntpmls -+ -+ msite(itmols)=msite(itmols-1)+numsit(itmols-1)* -+ x nummols(itmols-1) -+ mconst(itmols)=mconst(itmols-1)+numcon(itmols-1) -+ -+ enddo -+ -+c sort molecules into ascending order of number of constraints -+ -+ do i=1,ntpmls -+ -+ itest(i)=numcon(i) -+ index(i)=0 -+ -+ enddo -+ -+ call shellsort(ntpmls,itest) -+ -+ do i=1,ntpmls -+ -+ lchk=.true. -+ do j=1,ntpmls -+ -+ if(itest(i).eq.numcon(j))then -+ -+ if(lchk)then -+ index(i)=j -+ lchk=.false. -+ -+ endif -+ -+ do ii=1,i-1 -+ if(index(ii).eq.j)lchk=.true. -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c load balance to within 10% -+ -+ tol=1.0d0+(0.10d0)/2.d0 -+ kcons=(ntcons)/mxnode -+ ntmp=0 -+ -+c find smallest constrained molecule to allocate to a node -+ -+ do i=1,ntpmls -+ -+ if(ntmp.le.mxnode)then -+ -+ if(numcon(index(i)).gt.0)then -+ ntmp=ntmp+nummols(index(i)) -+ klo=max(0,kcons-numcon(index(i))/2) -+ khi=klo+numcon(index(i))+1 -+ endif -+ -+ endif -+ -+ enddo -+ -+c reset hi/lo limits if molecules contain too many constraints -+ -+ if(dble(khi)/dble(max(1,klo)).gt.tol)then -+ klo=nint(dble(kcons)/tol) -+ khi=nint(dble(kcons)*tol)+1 -+ endif -+ -+c store lo value for later -+ -+ klo0=klo -+ -+c begin assignment of constraints ---------------------------------- -+ -+ ifail=-1 -+ lfail=.true. -+ do while(lfail) -+ -+ ifail=ifail+1 -+ -+ if(ifail.gt.ntpmls)then -+ call error(idnode,432) -+ endif -+ -+ iconst=0 -+ jconst=0 -+ kconst=0 -+ lconst=0 -+ -+c zero running totals of constraints on each processor -+ -+ do id=0,mxnode-1 -+ kscons(id)=0 -+ enddo -+ -+ iloop=0 -+ lfail=.false. -+ iconst=0 -+ jconst=0 -+ nnode=0 -+ -+c assign difficult molecules in blocks -+ -+ if(ifail.gt.0)then -+ -+ nfail=0 -+ do i=1,ifail -+ -+ ii=ntpmls+1-i -+ nfail=nfail+nummols(index(ii))*numcon(index(ii)) -+ -+ enddo -+ -+c decide on number of processors to split over -+ -+ nnode=int(dble(nfail)/dble(max(kcons,1))+1.d0/tol) -+ nnode=max(2,nnode) -+ nnode=min(nnode,mxnode) -+ -+c assign to processors 0..nnode-1 -+ -+ do id=0,nnode-1 -+ -+ nscons0=(id*nfail)/nnode+1 -+ nscons1=((id+1)*nfail)/nnode -+ -+ kscons(id)=nscons1+1-nscons0 -+ -+ enddo -+ -+c this processors block -+ -+ nscons0=(idnode*nfail)/nnode+1 -+ nscons1=((idnode+1)*nfail)/nnode -+ -+c assign in blocks -+ -+ do itmols=ntpmls,ntpmls-ifail+1,-1 -+ -+ ii=index(itmols) -+ icon=numcon(ii) -+ kconst=mconst(ii) -+ -+ do imols=1,nummols(ii) -+ -+ isite=msite(ii)+(imols-1)*numsit(ii) -+ -+c construct bond constraint list -+ -+ do lconst=1,numcon(ii) -+ -+ iconst=iconst+1 -+ -+ if(iconst.ge.nscons0.and.iconst.le.nscons1)then -+ -+ jconst=jconst+1 -+ -+ if(jconst.le.mxcons)then -+ -+ listcon(jconst,1)=lconst+kconst -+ iatom=lstcon(lconst+kconst,1)+isite -+ jatom=lstcon(lconst+kconst,2)+isite -+ -+ listcon(jconst,2)=iatom -+ listcon(jconst,3)=jatom -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c assign non-problematic molecules -+ -+ jdnode=mod(nnode+1,mxnode) -+ -+ do itmols=ntpmls-ifail,1,-1 -+ -+ ii=index(itmols) -+ icon=numcon(ii) -+ kconst=mconst(ii) -+ -+ do imols=1,nummols(ii) -+ -+ itry=0 -+ lchk=.true. -+ do while(lchk) -+ -+ if(kscons(jdnode)+icon.le.klo)then -+ -+ if(jdnode.ne.idnode)then -+ kscons(jdnode)=kscons(jdnode)+icon -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.false. -+ else -+ -+c construct bond constraint list -+ -+ isite=msite(ii)+(imols-1)*numsit(ii) -+ do lconst=1,numcon(ii) -+ -+ jconst=jconst+1 -+ -+ if(jconst.le.mxcons)then -+ -+ listcon(jconst,1)=lconst+kconst -+ iatom=lstcon(lconst+kconst,1)+isite -+ jatom=lstcon(lconst+kconst,2)+isite -+ listcon(jconst,2)=iatom -+ listcon(jconst,3)=jatom -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ kscons(jdnode)=kscons(jdnode)+icon -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.false. -+ -+ endif -+ -+ else -+ -+ jdnode=mod(jdnode+1,mxnode) -+ lchk=.true. -+ itry=itry+1 -+ -+ endif -+ -+ if(lchk.and.itry.gt.mxnode)then -+ -+ klo=kcons -+ kcons=khi -+ itry=0 -+ iloop=iloop+1 -+ -+ endif -+ -+c split molecule across nodes if have to -+ -+ if(iloop.gt.3)then -+ lfail=.true. -+ kcons=ntcons/mxnode -+ klo=klo0 -+ lchk=.false. -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c check no node has less than minimum number -+ -+ do id=0,mxnode-1 -+ if(kscons(id).lt.klo0)then -+ lfail=.true. -+ endif -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)then -+ -+ if(mxnode.gt.1)call gimax(jconst,1,idum) -+ if(idnode.eq.0)write(nrite,'(a,i10,a,i10)') -+ x 'Number of constraints found ',jconst,'Max allowed ',mxcons -+ -+ call error(idnode,41) -+ -+ endif -+ -+ nscons=kscons(idnode) -+ -+ call passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+ endif -+ -+ if(npmf(1).gt.0)then -+ -+ call passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+ endif -+ -+c pass rigid body data -+ -+ lcnb=.false. -+ if(ntcons.gt.0.and.ngrp.gt.0)then -+ -+ call passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp, -+ x numgsit) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(itest,index,msite,stat=fail(1)) -+ deallocate(mconst,kscons,listin,stat=fail(2)) -+ -+ return -+ end subroutine intlist -+ -+ subroutine ensemble_selection -+ x (directive,lens,kill,idnode,keyens,mode,taut,taup) -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the ensemble and reading -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical kill,lens -+ integer keyens,idnode,idum,mode -+ real(8) taut,taup -+ -+ if(findstring('nve',directive,idum))then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'microcanonical ensemble')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('nvt',directive,idum))then -+ -+ if(findstring('evans',directive,idum))then -+ -+ keyens=1 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Evans Gaussian temperature constraints', -+ x ' in use')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('ber',directive,idum))then -+ -+ keyens=2 -+ taut=dblstr(directive,69,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen thermostat', -+ x /,1x,'thermostat relaxation time ',1p,e12.4)") -+ x taut -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=3 -+ taut=dblstr(directive,69,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4)") -+ x taut -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ elseif(findstring('npt',directive,idum))then -+ -+ if(findstring('ber',directive,idum))then -+ -+ keyens=4 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen isotropic N-P-T', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=5 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover (Melchionna) isotropic N-P-T ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ elseif(findstring('nst',directive,idum))then -+ -+ mode=0 -+ if(findstring('block',directive,idum))mode=1 -+ if(findstring('surf',directive,idum))mode=2 -+ if(findstring('slab',directive,idum))mode=3 -+ -+ if(findstring('ber',directive,idum))then -+ -+ keyens=6 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Berendsen anisotropic N-P-T', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ elseif(findstring('hoover',directive,idum))then -+ -+ keyens=7 -+ taut=dblstr(directive,lenrec,idum) -+ taup=dblstr(directive,lenrec,idum) -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Nose-Hoover (Melchionna) anisotropic N-P-T ', -+ x /,1x,'thermostat relaxation time ',1p,e12.4, -+ x /,1x,'barostat relaxation time ',1p,e12.4)") -+ x taut,taup -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ kill=.true. -+ if(idnode.eq.0)write(nrite,"(/,/,100a1)")record -+ call error(idnode,-3) -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ if(mode.eq.0)then -+ write(nrite,"(/,1x,'NST mode 0 X<>Y<>Z')") -+ elseif(mode.eq.1)then -+ write(nrite, -+ x "(/,1x,'NST mode 1 X<>Y<>Z (rectangular block)')") -+ elseif(mode.eq.2)then -+ write(nrite, -+ x "(/,1x,'NST mode 2 X=Y<>Z (liquid surface)')") -+ elseif(mode.eq.3)then -+ write(nrite, -+ x "(/,1x,'NST mode 3 X<>Y<>Z (solid slab)')") -+ endif -+ -+ endif -+ -+ elseif(findstring('pmf',directive,idum))then -+ -+ keyens=8 -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'potential of mean force calculation (NVE)')") -+ if(lens)then -+ call error(idnode,-414) -+ kill=.true. -+ endif -+ lens=.true. -+ -+ else -+ -+ call error(idnode,-436) -+ kill=.true. -+ -+ endif -+ -+ return -+ end subroutine ensemble_selection -+ -+ subroutine neb_option -+ x (directive,lneb,lminopt,idnode,numneb,keytol,sprneb, -+ x opttol,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for NEB option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit -+ character*1 directive(lenrec) -+ logical lneb,lminopt,endneb,safe -+ integer numneb,idnode,keytol,i,idum -+ real(8) sprneb,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ lminopt=.true. -+ lneb=.true. -+ endneb=.false. -+ numneb=intstr(directive,lenrec,idum) -+ if(numneb.eq.0)numneb=1 -+ numneb=min(maxneb,numneb) -+ -+ hyp_units=1.d0 -+ do while(.not.endneb) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endneb',directive,idum))then -+ endneb=.true. -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('basin_1',directive,idum))then -+ call striptext(directive,lenrec,1) -+ do i=1,numneb -+ bsn_1(i)=intstr(directive,lenrec,idum) -+ enddo -+ elseif(findstring('basin_2',directive,idum))then -+ call striptext(directive,lenrec,1) -+ do i=1,numneb -+ bsn_2(i)=intstr(directive,lenrec,idum) -+ enddo -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,1x,'NEB calculation controls')") -+ write(nrite,"(/,1x,'identity of basin 1 ', -+ x 10i10)")(bsn_1(i),i=1,numneb) -+ write(nrite,"(1x,'identity of basin 2 ', -+ x 10i10)")(bsn_2(i),i=1,numneb) -+ write(nrite, -+ x "(1x,'NEB spring constant ',e12.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'energy units ',2x,a8)") -+ x sprneb,opttol,cunit -+ -+ call print_optim(keytol) -+ -+ endif -+ -+c units conversion -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ return -+ end subroutine neb_option -+ -+ subroutine bpd_option -+ x (directive,seek,lbpd,ltad,lminopt,prechk,nebgo,keybpd,idnode, -+ x nblock,ntrack,keytol,ebias,vmin,catchrad,sprneb,opttol, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for bias potential -+c dynamics option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit,seek -+ character*1 directive(lenrec) -+ logical lbpd,ltad,lminopt,prechk,endbpd,safe,nebgo -+ integer keybpd,idnode,nblock,ntrack,keytol,idum -+ real(8) ebias,vmin,catchrad,sprneb,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ if(ltad)call error(idnode,2355) -+ lminopt=.true. -+ lbpd=.true. -+ endbpd=.false. -+ cunit=" dl_poly" -+ if(idnode.eq.0) -+ x write(nrite,"(/,1x,'bias potential dynamics controls')") -+ -+ if(findstring('dyn',directive,idum))then -+ -+ keybpd=1 -+ hyp_units=energy_unit() -+ ebias=dblstr(directive,lenrec,idum) -+ vmin=dblstr(directive,lenrec,idum) -+ call getword(cunit,directive,8,lenrec) -+ if(idnode.eq.0)write(nrite,"( -+ x 1x,'dynamics option selected ', -+ x /,1x,'bias potential E_bias (kelvin)',f10.4, -+ x /,1x,'bias potential V_min (kelvin)',f10.4 -+ x /,1x,'energy units ',2x,a8)") -+ x ebias,vmin,cunit -+ -+ elseif(findstring('path',directive,idum))then -+ -+ keybpd=2 -+ nebgo=.true. -+ hyp_units=1.d0 -+ do while(.not.endbpd) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endbpd',directive,idum))then -+ endbpd=.true. -+ elseif(findstring('pre',directive,idum))then -+ prechk=.true. -+ if(findstring('false',directive,idum))prechk=.false. -+ elseif(findstring('noneb',directive,idum))then -+ nebgo=.false. -+ elseif(findstring('target',directive,idum))then -+ call getword(seek,directive,8,lenrec) -+ call getword(seek,directive,8,lenrec) -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('ebias',directive,idum))then -+ ebias=dblstr(directive,lenrec,idum) -+ elseif(findstring('vmin',directive,idum))then -+ vmin=dblstr(directive,lenrec,idum) -+ elseif(findstring('num_block',directive,idum))then -+ nblock=intstr(directive,lenrec,idum) -+ elseif(findstring('num_track',directive,idum))then -+ ntrack=intstr(directive,lenrec,idum) -+ elseif(findstring('catch_radius',directive,idum))then -+ catchrad=dblstr(directive,lenrec,idum) -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"( -+ x 1x,'dynamics with path analysis selected', -+ x /,1x,'bias potential E_bias (kelvin)',f10.4, -+ x /,1x,'bias potential V_min (kelvin)',f10.4, -+ x /,1x,'steps per time block ',i10, -+ x /,1x,'steps per tracking block ',i10, -+ x /,1x,'configuration catch radius (A)',f10.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'atom type to be tracked ',2x,a8, -+ x /,1x,'energy units ',2x,a8)") -+ x ebias,vmin,nblock,ntrack,catchrad,opttol,seek,cunit -+ if(nebgo)write(nrite, -+ x "(1x,'NEB spring constant ',e12.4)")sprneb -+ if(prechk)write(nrite, -+ x "(1x,'transition prechecking option selected')") -+ call print_optim(keytol) -+ -+ endif -+ -+c energy unit conversions -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ endif -+ -+ return -+ end subroutine bpd_option -+ -+ subroutine tad_option -+ x (directive,ltad,lbpd,lminopt,prechk,tadall,idnode,nblock, -+ x ntrack,blkout,keytol,catchrad,sprneb,tlow,deltad,opttol, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for TAD option -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 cunit -+ character*1 directive(lenrec) -+ logical ltad,lbpd,lminopt,prechk,tadall,endtad,safe -+ integer idnode,nblock,ntrack,blkout,keytol,idum -+ real(8) catchrad,sprneb,deltad,tlow,opttol,hyp_units -+ -+ if(lminopt)call error(idnode,225) -+ if(lbpd)call error(idnode,2355) -+ lminopt=.true. -+ ltad=.true. -+ endtad=.false. -+ hyp_units=1.d0 -+ -+ do while(.not.endtad) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endtad',directive,idum))then -+ endtad=.true. -+ elseif(findstring('pre',directive,idum))then -+ prechk=.true. -+ if(findstring('false',directive,idum))prechk=.false. -+ elseif(findstring('all',directive,idum))then -+ tadall=.true. -+ if(findstring('false',directive,idum))tadall=.false. -+ elseif(findstring('units',directive,idum))then -+ hyp_units=energy_unit() -+ call getword(cunit,directive,8,lenrec) -+ call getword(cunit,directive,8,lenrec) -+ elseif(findstring('num_block',directive,idum))then -+ nblock=intstr(directive,lenrec,idum) -+ elseif(findstring('num_track',directive,idum))then -+ ntrack=intstr(directive,lenrec,idum) -+ elseif(findstring('blackout',directive,idum))then -+ blkout=intstr(directive,lenrec,idum) -+ elseif(findstring('catch_radius',directive,idum))then -+ catchrad=dblstr(directive,lenrec,idum) -+ elseif(findstring('neb_spring',directive,idum))then -+ sprneb=dblstr(directive,lenrec,idum) -+ elseif(findstring('deltad',directive,idum))then -+ deltad=dblstr(directive,lenrec,idum) -+ elseif(findstring('low_temp',directive,idum))then -+ tlow=dblstr(directive,lenrec,idum) -+ elseif(findstring('forc',directive,idum))then -+ keytol=0 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('ener',directive,idum))then -+ keytol=1 -+ opttol=dblstr(directive,lenrec,idum) -+ elseif(findstring('posi',directive,idum))then -+ keytol=2 -+ opttol=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'TAD dynamics controls' -+ x /,1x,'steps per time block ',i10, -+ x /,1x,'steps per tracking block ',i10, -+ x /,1x,'steps in blackout periods ',i10, -+ x /,1x,'configuration catch radius ',1p,e12.4, -+ x /,1x,'NEB spring constant ',e12.4, -+ x /,1x,'stopping parameter ',e12.4, -+ x /,1x,'target low temperature ',e12.4, -+ x /,1x,'minimisation tolerance ',e12.4, -+ x /,1x,'energy units ',2x,a8)") -+ x nblock,ntrack,blkout,catchrad,sprneb,deltad, -+ x tlow,opttol,cunit -+ if(prechk)write(nrite, -+ x "(1x,'transition prechecking option selected')") -+ if(tadall)write(nrite, -+ x "(1x,'option for all basins analysis selected')") -+ call print_optim(keytol) -+ -+ endif -+ -+c energy unit conversions -+ -+ sprneb=sprneb*hyp_units -+ if(keytol.lt.2)opttol=opttol*hyp_units -+ -+ return -+ end subroutine tad_option -+ -+ subroutine metadyn_option -+ x (directive,lmetadyn,lstein,ltet,lglobpe,llocpe,idnode, -+ x ncolvar,nq4,nq6,ntet,hkey,meta_step_int,globpe_scale, -+ x locpe_scale,ref_W_aug,h_aug,wt_Dt) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for metadynamics option -+c copyright - daresbury laboratory -+c author - w. smith jan 2011 -+c -+c note: default values are set in metafreeze_module -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lmetadyn,endmet,lstein,ltet,lglobpe,llocpe,safe -+ integer idnode,idum,ncolvar,nq4,nq6,ntet,hkey,meta_step_int -+ real(8) globpe_scale,locpe_scale,ref_W_aug,h_aug,wt_Dt -+ -+ lmetadyn=.true. -+ endmet=.false. -+ -+ do while(.not.endmet) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(record(1).eq.'#'.or.record(1).eq.'&')then -+c information only - skip record -+ cycle -+ elseif(findstring('endmet',directive,idum))then -+ endmet=.true. -+ elseif(findstring('ncolvar',directive,idum))then -+ ncolvar=intstr(directive,lenrec,idum) -+ elseif(findstring('lstein',directive,idum))then -+ lstein=.true. -+ if(findstring('false',directive,idum))lstein=.false. -+ elseif(findstring('ltet',directive,idum))then -+ ltet=.true. -+ if(findstring('false',directive,idum))ltet=.false. -+ elseif(findstring('lglobpe',directive,idum))then -+ lglobpe=.true. -+ if(findstring('false',directive,idum))lglobpe=.false. -+ elseif(findstring('llocpe',directive,idum))then -+ llocpe=.true. -+ if(findstring('false',directive,idum))llocpe=.false. -+ elseif(findstring('globpe_scale',directive,idum))then -+ globpe_scale=dblstr(directive,lenrec,idum) -+ elseif(findstring('locpe_scale',directive,idum))then -+ locpe_scale=dblstr(directive,lenrec,idum) -+ elseif(findstring('nq4',directive,idum))then -+ nq4=intstr(directive,lenrec,idum) -+ nq4=intstr(directive,lenrec,idum) ! do twice - number in name! -+ elseif(findstring('nq6',directive,idum))then -+ nq6=intstr(directive,lenrec,idum) -+ nq6=intstr(directive,lenrec,idum) ! do twice - number in name! -+ elseif(findstring('ntet',directive,idum))then -+ ntet=intstr(directive,lenrec,idum) -+ elseif(findstring('meta_step_int',directive,idum))then -+ meta_step_int=intstr(directive,lenrec,idum) -+ elseif(findstring('ref_w_aug',directive,idum))then -+ ref_W_aug=dblstr(directive,lenrec,idum) -+ elseif(findstring('h_aug',directive,idum))then -+ h_aug=dblstr(directive,lenrec,idum) -+ elseif(findstring('hkey',directive,idum))then -+ hkey=intstr(directive,lenrec,idum) -+ elseif(findstring('wt_dt',directive,idum))then -+ wt_dt=dblstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'metadynamics controls' -+ x /,1x,'total number of collective variables',i10, -+ x /,1x,'steinhardt parameters option (Q4/Q6)',l10, -+ x /,1x,'tetrahedral parameters option (zeta)',l10, -+ x /,1x,'global potential parameter option ',l10, -+ x /,1x,'local potential parameter option ',l10, -+ x /,1x,'global potential param. scale factor',e12.4, -+ x /,1x,'local potential param. scale factor ',e12.4)") -+ x ncolvar,lstein,ltet,lglobpe,llocpe,globpe_scale,locpe_scale -+ -+ write(nrite, -+ x "( 1x,'number of Q4 atom pair types ',i10, -+ x /,1x,'number of Q6 atom pair types ',i10, -+ x /,1x,'number of zeta atom triplet types ',i10)") -+ x nq4,nq6,ntet -+ -+ write(nrite, -+ x "( 1x,'gaussian deposition interval ',i10, -+ x /,1x,'reference gaussian height ',e12.4, -+ x /,1x,'gaussian width parameter ',e12.4, -+ x /,1x,'height control key ',i10, -+ x /,1x,'well-tempered control parameter ',e12.4)") -+ x meta_step_int,ref_W_aug,h_aug,hkey,wt_Dt -+ -+ endif -+ -+ return -+ end subroutine metadyn_option -+ -+ subroutine ewald_selection -+ x (directive,lhke,lspme,lewald,lcut,lforc,kill,idnode,keyfce, -+ x imcon,nhko,nlatt,kmax1,kmax2,kmax3,alpha,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the ewald method and reading -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lhke,lspme,lewald,lcut,lforc,kill,safe -+ integer idnode,keyfce,imcon,nhko,nlatt,kmax1,kmax2,kmax3,idum -+ integer kmaxpow2 -+ real(8) alpha,rcut,eps,tol,fac,tol1 -+ -+ lhke=findstring('hke',directive,idum) -+ lspme=findstring('spme',directive,idum) -+ lewald=findstring('ewald',directive,idum) -+ if(lewald)keyfce=2 -+ if(lspme)keyfce=12 -+ if(lhke)keyfce=14 -+ if(idnode.eq.0)open(nconf,file='CONFIG') -+ call getrec(safe,idnode,nconf) -+ call getrec(safe,idnode,nconf) -+ imcon=intstr(record,lenrec,idum) -+ imcon=intstr(record,lenrec,idum) -+ if(.not.lhke.and.(imcon.eq.0.or.imcon.eq.6))then -+ -+ call error(idnode,-180) -+ kill=.true. -+ -+ endif -+ -+ if(findstring('precision',directive,idum))then -+ -+ eps=dblstr(directive,lenrec,idum) -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'Ewald sum precision ',7x,1p,e12.4)")eps -+ -+ if(lhke)then -+ -+ nhko=min(intstr(directive,lenrec,idum),3) -+ nlatt=min(intstr(directive,lenrec,idum),2) -+ if(nlatt.eq.0)nlatt=1 -+ if(nhko.eq.0)nhko=1 -+ -+ endif -+ -+ if(.not.lcut)then -+ call error(idnode,-433) -+ kill=.true. -+ else -+ -+c retreive cell vectors -+ -+ call getrec(safe,idnode,nconf) -+ cell(1)=dblstr(record,lenrec,idum) -+ cell(2)=dblstr(record,lenrec,idum) -+ cell(3)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ cell(4)=dblstr(record,lenrec,idum) -+ cell(5)=dblstr(record,lenrec,idum) -+ cell(6)=dblstr(record,lenrec,idum) -+ call getrec(safe,idnode,nconf) -+ cell(7)=dblstr(record,lenrec,idum) -+ cell(8)=dblstr(record,lenrec,idum) -+ cell(9)=dblstr(record,lenrec,idum) -+ -+c compute alpha and the kmax -+ -+ if(lewald.or.lspme)then -+ -+ call dcell(cell,celprp) -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) -+ fac=1.d0 -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x fac=2.d0**(1.d0/3.d0) -+ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) -+ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) -+ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) -+ -+ elseif(lhke)then -+ -+ if(nhko.eq.0)then -+ if(eps.le.1.d-6)then -+ alpha=3.46d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=3.14d0/rcut -+ else -+ alpha=2.76d0/rcut -+ endif -+ elseif(nhko.eq.1)then -+ if(eps.le.1.d-6)then -+ alpha=4.37d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.08d0/rcut -+ else -+ alpha=3.75d0/rcut -+ endif -+ elseif(nhko.eq.2)then -+ if(eps.le.1.d-6)then -+ alpha=5.01d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.74d0/rcut -+ else -+ alpha=4.44d0/rcut -+ endif -+ elseif(nhko.eq.3)then -+ if(eps.le.1.d-6)then -+ alpha=5.55d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=5.28d0/rcut -+ else -+ alpha=5.00d0/rcut -+ endif -+ endif -+ alpha=alpha/dble(2*nlatt+1) -+ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 -+ call dcell(cell,celprp) -+ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) -+ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) -+ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) -+ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) -+ kmax3=1 -+ -+ endif -+ -+ endif -+ -+ else -+ -+ alpha=dblstr(directive,lenrec,idum) -+ kmax1=intstr(directive,lenrec,idum) -+ kmax2=intstr(directive,lenrec,idum) -+ -+ if(lhke)then -+ -+ kmax3=1 -+ nhko=min(intstr(directive,lenrec,idum),3) -+ nlatt=min(intstr(directive,lenrec,idum),2) -+ -+ else -+ -+ kmax3=intstr(directive,lenrec,idum) -+ -+ endif -+ -+ endif -+ -+c if spme double kmax and set to next power of 2, with current upper -+c limit of 512. -+ -+ if(lspme)then -+ -+ kmaxpow2=1 -+ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax1=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax2=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ enddo -+ kmax3=2 * kmaxpow2 -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ close(nconf) -+ -+ if(lspme)then -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : SPME ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") -+ x alpha,kmax1/2,kmax2/2,kmax3/2 -+ -+ elseif(lhke)then -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : Hautman-Klein-Ewald sum ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 ',2i5)") -+ x alpha,kmax1,kmax2 -+ -+ write(nrite, -+ x "(1x,'HKE expansion order ',7x,i10, -+ x /,1x,'HKE lattice control ',7x,i10)")nhko,nlatt -+ -+ else -+ -+ write(nrite, -+ x "(/,1x,'Electrostatics : Ewald sum ')") -+ -+ write(nrite, -+ x "(/,1x,'Ewald convergence parameter ',1p,e12.4, -+ x /,1x,'Ewald kmax1 kmax2 kmax3 ',3i5)") -+ x alpha,kmax1,kmax2,kmax3 -+ -+ endif -+ -+ endif -+ -+ if(lspme)then -+ -+c Initialize fft tables -+ -+CFFTW call fftw3d_f77_create_plan -+CFFTW x (fplan,kmaxd,kmaxe,kmaxf, -+CFFTW x FFTW_FORWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) -+CFFTW -+CFFTW call fftw3d_f77_create_plan -+CFFTW x (bplan,kmaxd,kmaxe,kmaxf, -+CFFTW x FFTW_BACKWARD,FFTW_ESTIMATE+FFTW_IN_PLACE) -+ -+CSGIC call zzfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, -+CSGIC x dummy,1,1,ffttable,dummy,dummy ) -+ -+CCRAY call ccfft3d( 0,kmaxd,kmaxe,kmaxf,1.d0,dummy,1,1, -+CCRAY x dummy,1,1,ffttable,dummy,dummy ) -+ -+ endif -+ -+ if(lspme)then -+ -+ if(kmax1.gt.kmaxd.or.kmax2.gt.kmaxe.or.kmax3.gt.kmaxf)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ elseif(lhke)then -+ -+ if(kmax2.gt.kmaxb)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ else -+ -+ if(kmax2.gt.kmaxb.or.kmax3.gt.kmaxc)then -+ -+ kill=.true. -+ call error(idnode,-185) -+ -+ endif -+ -+ endif -+ -+ if(lforc)then -+ call error(idnode,-416) -+ kill=.true. -+ endif -+ lforc=.true. -+ -+ return -+ end subroutine ewald_selection -+ -+ subroutine print_optim(keytol) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for printing the optimisation option -+c the required parameters -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer keytol -+ -+ if(keytol.eq.0)then -+ write(nrite, -+ x "(1x,'convergence to minimum force selected')") -+ elseif(keytol.eq.1)then -+ write(nrite, -+ x "(1x,'convergence to minimum energy selected')") -+ else -+ write(nrite, -+ x "(1x,'convergence to minimum position selected')") -+ endif -+ -+ return -+ end subroutine print_optim -+ -+ function energy_unit() -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for assigning energy conversion factors -+c copyright - daresbury laboratory -+c author - w. smith feb 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idum -+ real(8) energy_unit -+ -+ energy_unit=1.d0 -+ if(findstring('ev',record,idum))then -+ energy_unit=9648.530821d0 -+ elseif(findstring('kev',record,idum))then -+ energy_unit=9648530.821d0 -+ elseif(findstring('kcal',record,idum))then -+ energy_unit=418.4d0 -+ elseif(findstring('kj',record,idum))then -+ energy_unit=1.d2 -+ elseif(findstring('k',record,idum))then -+ energy_unit=boltz -+ endif -+ -+ return -+ end function energy_unit -+ -+ subroutine solvation_option -+ x (directive,lsolva,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for solvation option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,endsol,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ endsol=.false. -+ -+ nsolva=intstr(directive,lenrec,idum) -+ isolva=intstr(directive,lenrec,idum) -+ -+ if(nsolva.eq.0.and.isolva.eq.0)then -+ -+ do while(.not.endsol) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endsol',directive,idum))then -+ endsol=.true. -+ elseif(findstring('enddec',directive,idum))then -+ endsol=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=max(intstr(directive,lenrec,idum),1) -+ endif -+ -+ enddo -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'solvation calculation selected', -+ x /,1x,'start of solvation calculation ',i10, -+ x /,1x,'solvation calculation interval ',i10)") -+ x nsolva,isolva -+ -+ endif -+ -+ return -+ end subroutine solvation_option -+ -+ subroutine free_energy_option(directive,lfree,lfrmas,idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for free energy option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lfree,lfrmas,endfre,safe -+ integer idnode,idum -+ -+ mfree=1 -+ kfree=1 -+ lfree=.true. -+ lfrmas=.false. -+ endfre=.false. -+ -+ do while(.not.endfre) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endfre',directive,idum))then -+ endfre=.true. -+ elseif(findstring('start',directive,idum))then -+ nfrn=intstr(directive,lenrec,idum) -+ elseif(findstring('interval',directive,idum))then -+ ifrn=intstr(directive,lenrec,idum) -+ elseif(findstring('lambda',directive,idum))then -+ pfree=dblstr(directive,lenrec,idum) -+ elseif(findstring('mix',directive,idum))then -+ mfree=intstr(directive,lenrec,idum) -+ elseif(findstring('expo',directive,idum))then -+ kfree=intstr(directive,lenrec,idum) -+ elseif(findstring('reset_mass',directive,idum))then -+ lfrmas=.true. -+ if(findstring('false',directive,idum))lfrmas=.false. -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(mfree.eq.1)kfree=1 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'free energy option selected', -+ x /,1x,'start of free energy calculation ',i10, -+ x /,1x,'sampling interval ',i10, -+ x /,1x,'free energy parameter (lambda) ',f10.3, -+ x /,1x,'mixing rule selected ',i10, -+ x /,1x,'mixing rule exponent ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10, -+ x /,1x,'mass scaling option ',l10)") -+ x nfrn,ifrn,pfree,mfree,kfree,ind_fre,lfrmas -+ -+ endif -+ -+c define free energy scaling parameters -+ -+ call freegen() -+ -+ return -+ end subroutine free_energy_option -+ -+ subroutine excitation_option -+ x (directive,lsolva,lexcite,lghost,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for excitation option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,lexcite,lghost,endexc,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ lghost=.true. -+ lexcite=.true. -+ endexc=.false. -+ -+ do while(.not.endexc) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endexc',directive,idum))then -+ endexc=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=intstr(directive,lenrec,idum) -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'excitation option selected', -+ x /,1x,'energy decomposition start ',i10, -+ x /,1x,'energy decomposition interval ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10)") -+ x nsolva,isolva,ind_fre -+ -+ endif -+ -+ return -+ end subroutine excitation_option -+ -+ subroutine switching_option -+ x (directive,lsolva,lswitch,lghost,idnode,nsolva,isolva) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading parameters for switching option -+c copyright - daresbury laboratory -+c authors - w. smith and p.-a. cazade jul 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 directive(lenrec) -+ logical lsolva,lswitch,lghost,endswi,safe -+ integer idnode,nsolva,isolva,idum -+ -+ lsolva=.true. -+ lghost=.true. -+ lswitch=.true. -+ endswi=.false. -+ niswitch=0 -+ -+ do while(.not.endswi) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abort_control_read(1,idnode,nread) -+ call lowcase(record,lenrec) -+ call strip(record,lenrec) -+ call copystring(record,directive,lenrec) -+ -+ if(findstring('endswi',directive,idum))then -+ endswi=.true. -+ elseif(findstring('start',directive,idum))then -+ nsolva=intstr(directive,lenrec,idum) -+ elseif(findstring('inter',directive,idum))then -+ isolva=intstr(directive,lenrec,idum) -+ elseif(findstring('period',directive,idum))then -+ niswitch=max(intstr(directive,lenrec,idum),2) -+ elseif(findstring('system_a',directive,idum))then -+ ind_fre(1)=intstr(directive,lenrec,idum) -+ ind_fre(2)=intstr(directive,lenrec,idum) -+ elseif(findstring('system_b',directive,idum))then -+ ind_fre(3)=intstr(directive,lenrec,idum) -+ ind_fre(4)=intstr(directive,lenrec,idum) -+ endif -+ -+ enddo -+ -+ if(niswitch.eq.0)niswitch=nsolva -+ nswitch=nsolva -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,1x,'switching option selected', -+ x /,1x,'energy decomposition start ',i10, -+ x /,1x,'energy decomposition interval ',i10, -+ x /,1x,'switching period ',i10, -+ x /,1x,'system A first atom ',i10, -+ x /,1x,'system A last atom ',i10, -+ x /,1x,'system B first atom ',i10, -+ x /,1x,'system B last atom ',i10)") -+ x nsolva,isolva,niswitch,ind_fre -+ -+ endif -+ -+ return -+ end subroutine switching_option -+ -+ end module define_system_module -+ -diff -urN dl_class_1.9.orig/srcmod/dihedral_module.f dl_class_1.9/srcmod/dihedral_module.f ---- dl_class_1.9.orig/srcmod/dihedral_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/dihedral_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1121 @@ -+ module dihedral_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining dihedral potential arrays -+c copyright - daresbury laboratory -+c -+c author - w. smith sep 2003 -+c adapted - p.-a. cazade oct 2007 : solvation, free energy, etc. -+c adapted - w.smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmdih(:,:) -+ integer, allocatable :: listdih(:,:) -+ integer, allocatable :: numdih(:),keydih(:),lstdih(:,:) -+ -+ save prmdih,listdih,numdih,keydih,lstdih -+ -+ contains -+ -+ subroutine alloc_dih_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(5) -+ -+ do i=1,5 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmdih(mxtdih,mxpdih),stat=fail(1)) -+ allocate (numdih(mxtmls),stat=fail(2)) -+ allocate (keydih(mxtdih),stat=fail(3)) -+ allocate (lstdih(mxtdih,4),stat=fail(4)) -+ allocate (listdih(mxdihd,5),stat=fail(5)) -+ -+ do i=1,5 -+ if(fail(i).gt.0)call error(idnode,1011) -+ enddo -+ -+ do i=1,mxtmls -+ numdih(i)=0 -+ enddo -+ -+ end subroutine alloc_dih_arrays -+ -+ subroutine define_dihedrals -+ x (safe,idnode,itmols,ndihed,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining dihedral angles -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,itmols,ndihed,nsite,ntmp,idih,idih1,i -+ integer iatm1,iatm2,iatm3,iatm4,idum,isite1,isite2,isite3 -+ integer isite4,ia,ja -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numdih(itmols)=numdih(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of dihedral angles', -+ x 6x,i10)")ntmp -+ write(nrite,"(/,/,1x,'dihedral angle details:', -+ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, -+ x 'index',5x,'index',5x,'f-const',7x,'angle', -+ x 8x,'trig',4x,'1-4 elec',5x,'1-4 vdw',/)") -+ endif -+ -+ idih1=numdih(itmols) -+ do idih=1,idih1 -+ -+c read dihedral bond angle potential parameters -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ iatm3=intstr(record,lenrec,idum) -+ iatm4=intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ isite3=nsite-numsit(itmols)+iatm3 -+ isite4=nsite-numsit(itmols)+iatm4 -+ -+ if(lfzsit(isite1)*lfzsit(isite2)* -+ x lfzsit(isite3)*lfzsit(isite4).ne.0)then -+ -+ numdih(itmols)=numdih(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ ndihed=ndihed+1 -+ -+ if(ndihed.gt.mxtdih)call error(idnode,60) -+ -+ if(keyword(1:4).eq.'cos ')then -+ keydih(ndihed)=1 -+ elseif(keyword(1:4).eq.'harm')then -+ keydih(ndihed)=2 -+ elseif(keyword(1:4).eq.'hcos')then -+ keydih(ndihed)=3 -+ elseif(keyword(1:4).eq.'cos3')then -+ keydih(ndihed)=4 -+ elseif(keyword(1:4).eq.'ryck')then -+ keydih(ndihed)=5 -+ elseif(keyword(1:4).eq.'rbf')then -+ keydih(ndihed)=6 -+ elseif(keyword(1:4).eq.'opls')then -+ keydih(ndihed)=7 -+ else -+ if(idnode.eq.0)write(nrite,*)message -+ call error(idnode,448) -+ endif -+ -+ lstdih(ndihed,1)=iatm1 -+ lstdih(ndihed,2)=iatm2 -+ lstdih(ndihed,3)=iatm3 -+ lstdih(ndihed,4)=iatm4 -+ prmdih(ndihed,1)=dblstr(record,lenrec,idum) -+ prmdih(ndihed,2)=dblstr(record,lenrec,idum) -+ prmdih(ndihed,3)=dblstr(record,lenrec,idum) -+ prmdih(ndihed,4)=dblstr(record,lenrec,idum) -+ prmdih(ndihed,5)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,4i10,1p,e12.4,0p,9f12.6)") -+ x keyword(1:4),(lstdih(ndihed,ia),ia=1,4), -+ x (prmdih(ndihed,ja),ja=1,mxpdih) -+ -+c convert energies to internal units and angles to radians -+ -+ prmdih(ndihed,1)=prmdih(ndihed,1)*engunit -+ -+ if(keydih(ndihed).eq.4)then -+ -+ prmdih(ndihed,2)=prmdih(ndihed,2)*engunit -+ prmdih(ndihed,3)=prmdih(ndihed,3)*engunit -+ -+ elseif(keydih(ndihed).eq.7)then -+ -+ prmdih(ndihed,2)=prmdih(ndihed,2)*engunit -+ prmdih(ndihed,3)=prmdih(ndihed,3)*engunit -+ prmdih(ndihed,4)=prmdih(ndihed,4)*engunit -+ prmdih(ndihed,5)=prmdih(ndihed,5)*(pi/180.d0) -+ -+ else -+ -+ prmdih(ndihed,2)=prmdih(ndihed,2)*(pi/180.d0) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_dihedrals -+ -+ subroutine dihfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntdihd,keyfce, -+ x dlrpot,epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe, -+ x virdih,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating dihedral energy and force -+c terms in molecular dynamics. -+c -+c version 3: scale factors for reduces electrostatic and vdw -+c 1-4 interactions. -+c -+c NOTE: assumes 1-4 interactions are in the exclude list -+c -+c block as opposed to stride version -+c -+c copyright - daresbury laboratory -+c author - w. smith mar 1992 -+c modified - t. forester dec 1993 -+c modified - t. forester jun 1995 - stress tensor added -+c modified - a. smondyrev may 2000 - ryckaert-bellemans potentials -+c modified - p.-a. cazade oct 2007 - solvation etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect -+ logical idrive,jdrive,kdrive,ldrive -+ integer i,k,ii,kk,ntdihd,idnode,mxnode,idih1,idih2,ia,ib -+ integer ic,id,imcon,ka,kb,l,keyfce,fail1,fail2,fail3,kkk -+ real(8) phi,twopi,rtwopi,dterm,srpot -+ real(8) engdih,virdih,engc14,engs14,virs14,rrbc,xab,yab,erc,fer -+ real(8) zab,xbc,ybc,zbc,xcd,ycd,zcd,pbx,pby,pbz,pb2,rpb1,rpb2 -+ real(8) pcx,pcy,pcz,pc2,rpc1,rpc2,pbpc,cosp,sinp,rsinp,exp1 -+ real(8) gamma,fax,fay,faz,fcx,fcy,fcz,fb1x,fb1y,fb1z,fd1x,fd1y -+ real(8) fd1z,scale,xad,yad,zad,rad,chgprd,coul,fcoul,fx,fy,fz -+ real(8) ppp,dlrpot,t1,t2,vk0,vk1,vk2,gk0,gk1,gk2,epsq,engcpe -+ real(8) vircpe,rcut,rvdw,engsrp,virsrp,xac,yac,zac,vcon,fcon -+ real(8) virc14,b0,rfld0,rfld1,rfld2,alpha,a1,a2,a3,a4,a5,pp,tt -+ real(8) cou14_vir,vdw14_vir,strs(6),strs_loc(6) -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ real(8), allocatable :: xdbc(:),ydbc(:),zdbc(:) -+ real(8), allocatable :: xdcd(:),ydcd(:),zdcd(:) -+ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ -+ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ -+ data fail1,fail2,fail3/0,0,0/ -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) -+ allocate (xdbc(msbad),ydbc(msbad),zdbc(msbad),stat=fail2) -+ allocate (xdcd(msbad),ydcd(msbad),zdcd(msbad),stat=fail3) -+ if(fail1.ne.0.or.fail2.ne.0.or.fail3.ne.0) -+ x call error(idnode,1060) -+ -+ twopi=2.d0*pi -+ rtwopi=1.d0/twopi -+ safe=.true. -+ -+c check size of work arrays -+ -+ if((ntdihd-mxnode+1)/mxnode.gt.msbad) call error(idnode,421) -+ -+c block indices -+ -+ idih1=(idnode*ntdihd)/mxnode+1 -+ idih2=((idnode+1)*ntdihd)/mxnode -+ -+c initialise accumulators -+ -+ engdih=0.d0 -+ virdih=0.d0 -+ dih_fre=0.d0 -+ dih_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(3)=.true. -+ dih_sol(:)=0.d0 -+ if(lexcite)dih_exc(:)=0.d0 -+ -+ endif -+ -+ if(keyfce/2.eq.4)then -+ -+c constant terms for shifted coulombic potential -+ -+ tt=1.d0/(1.d0+pp*alpha*rcut) -+ exp1=exp(-(alpha*rcut)**2) -+ vcon=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut -+ fcon=(vcon+2.d0*(alpha/sqrpi)*exp1)/rcut -+ -+ elseif(keyfce/2.eq.5)then -+ -+c constant terms for reaction field potential -+ -+ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) -+ rfld0=b0/rcut**3 -+ rfld1=(1.d0+b0*0.5d0)/rcut -+ rfld2=rfld0*0.5d0 -+ tt=1.d0/(1.d0+pp*alpha*rcut) -+ exp1=exp(-(alpha*rcut)**2) -+ vcon=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut -+ fcon=(vcon+2.d0*(alpha/sqrpi)*exp1)/rcut-rfld0*rcut -+ vcon=vcon+rfld2*rcut**2-rfld1 -+ -+ endif -+ -+c calculate bond vectors -+ -+ ii=0 -+ do i=idih1,idih2 -+ -+ ii=ii+1 -+ -+c indices of bonded atoms -+ -+ ia=listdih(ii,2) -+ ib=listdih(ii,3) -+ ic=listdih(ii,4) -+ id=listdih(ii,5) -+ -+c define components of bond vectors -+ -+ xdab(ii)=xxx(ia)-xxx(ib) -+ ydab(ii)=yyy(ia)-yyy(ib) -+ zdab(ii)=zzz(ia)-zzz(ib) -+ -+ xdbc(ii)=xxx(ib)-xxx(ic) -+ ydbc(ii)=yyy(ib)-yyy(ic) -+ zdbc(ii)=zzz(ib)-zzz(ic) -+ -+ xdcd(ii)=xxx(ic)-xxx(id) -+ ydcd(ii)=yyy(ic)-yyy(id) -+ zdcd(ii)=zzz(ic)-zzz(id) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ call images(imcon,0,1,ii,cell,xdbc,ydbc,zdbc) -+ call images(imcon,0,1,ii,cell,xdcd,ydcd,zdcd) -+ -+c zero dihedral energy accumulator -+ -+ engdih=0.d0 -+ virdih=0.d0 -+ -+c zero scaled 1-4 electrostatic and short range potential accumulators -+ -+ engc14=0.d0 -+ virc14=0.d0 -+ engs14=0.d0 -+ virs14=0.d0 -+ vdw14_vir=0.d0 -+ cou14_vir=0.d0 -+ -+c loop over all specified dihedrals -+ -+ ii=0 -+ do i=idih1,idih2 -+ -+c define components of bond vectors -+ -+ ii=ii+1 -+ -+ xab=xdab(ii) -+ yab=ydab(ii) -+ zab=zdab(ii) -+ -+ xbc=xdbc(ii) -+ ybc=ydbc(ii) -+ zbc=zdbc(ii) -+ rrbc=1.d0/sqrt(xbc*xbc+ybc*ybc+zbc*zbc) -+ -+ xcd=xdcd(ii) -+ ycd=ydcd(ii) -+ zcd=zdcd(ii) -+ -+ xac=xab+xbc -+ yac=yab+ybc -+ zac=zab+zbc -+ -+c construct first dihedral vector -+ -+ pbx=yab*zbc-zab*ybc -+ pby=zab*xbc-xab*zbc -+ pbz=xab*ybc-yab*xbc -+ pb2=pbx*pbx+pby*pby+pbz*pbz -+ rpb1=1.d0/sqrt(pb2) -+ rpb2=rpb1*rpb1 -+ -+c construct second dihedral vector -+ -+ pcx=ybc*zcd-zbc*ycd -+ pcy=zbc*xcd-xbc*zcd -+ pcz=xbc*ycd-ybc*xcd -+ pc2=pcx*pcx+pcy*pcy+pcz*pcz -+ rpc1=1.d0/sqrt(pc2) -+ rpc2=rpc1*rpc1 -+ -+c determine dihedral angle -+ -+ pbpc=pbx*pcx+pby*pcy+pbz*pcz -+ cosp=pbpc*rpb1*rpc1 -+ sinp=(xbc*(pcy*pbz-pcz*pby)+ybc*(pbx*pcz-pbz*pcx)+ -+ x zbc*(pcx*pby-pcy*pbx))*(rpb1*rpc1*rrbc) -+ -+ phi=atan2(sinp,cosp) -+ -+c avoid singularity in sinp -+ -+ sinp=sign(max(1.d-8,abs(sinp)),sinp) -+ rsinp=1.d0/sinp -+ -+c selection of potential energy function type -+ -+ kk=listdih(ii,1) -+ -+c calculate potential energy and scalar force term -+ -+ if(keydih(kk).eq.1)then -+ -+c key=1 for torsion dihedral potential -+ -+ dterm=prmdih(kk,1)*(1.d0+cos(prmdih(kk,3)*phi- -+ x prmdih(kk,2))) -+ gamma=-rpb1*rpc1*rsinp*prmdih(kk,1)*prmdih(kk,3)* -+ x sin(prmdih(kk,3)*phi-prmdih(kk,2)) -+ -+ else if(keydih(kk).eq.2)then -+ -+c key=2 for harmonic improper dihedral -+ -+ phi=phi-prmdih(kk,2) -+ phi=phi-nint(phi*rtwopi)*twopi -+ dterm=0.5d0*prmdih(kk,1)*(phi*phi) -+ gamma=rpb1*rpc1*rsinp*prmdih(kk,1)*phi -+ -+ else if(keydih(kk).eq.3)then -+ -+c key=3 for harmonic cosine dihedral -+ -+ dterm=0.5d0*prmdih(kk,1)*(cos(phi)- -+ x cos(prmdih(kk,2)))**2 -+ gamma=-rpb1*rpc1*prmdih(kk,1)*(cos(phi)-cos(prmdih(kk,2))) -+ -+ else if(keydih(kk).eq.4)then -+ -+c key=4 for 3-term cosine dihedral -+ -+ dterm=0.5d0*(prmdih(kk,1)*(1.d0+cos(phi))+ -+ x prmdih(kk,2)*(1.d0-cos(2.d0*phi))+prmdih(kk,3)* -+ x (1.d0+cos(3.d0*phi))) -+ gamma=-rpb1*rpc1*rsinp*0.5d0*(prmdih(kk,1)*sin(phi)- -+ x 2.d0*prmdih(kk,2)*sin(2.d0*phi)+3.d0*prmdih(kk,3)* -+ x sin(3.d0*phi)) -+ -+ else if(keydih(kk).eq.5)then -+ -+c key=5 for ryckaert-bellemans potential -+c chem.phys.lett., vol.30, p.123, 1975. -+c ATTENTION !!! Modified to have trans configuration -+c correspond to phi=180 rather than -+c phi=0 as in original form. -+ -+ dterm=prmdih(kk,1)*(1.116d0-1.462d0*cos(phi)- -+ x 1.578d0*(cos(phi))**2+0.368d0*(cos(phi))**3+ -+ x 3.156d0*(cos(phi))**4+3.788d0*(cos(phi))**5) -+ gamma=prmdih(kk,1)*(1.462d0+3.156d0*cos(phi)- -+ x 1.104d0*(cos(phi))**2-12.624d0*(cos(phi))**3- -+ x 18.94d0*(cos(phi))**4)*rpb1*rpc1 -+ -+ else if(keydih(kk).eq.6)then -+ -+c key=6 for fluorinated ryckaert-bellemans potential -+c Rice at al., JCP 104, 2101, (1996). -+ -+ dterm=prmdih(kk,1)*(3.55d0-2.78d0*cos(phi)- -+ x 3.56d0*(cos(phi))**2-1.64d0*(cos(phi))**3+ -+ x 7.13d0*(cos(phi))**4+12.84d0*(cos(phi))**5+ -+ x 9.67d0*exp(-56.d0*(phi-pi)**2)) -+ gamma=(prmdih(kk,1)*(2.78d0+7.12d0*cos(phi)+ -+ x 4.92d0*(cos(phi))**2-28.52d0*(cos(phi))**3- -+ x 64.2d0*(cos(phi))**4)-1083.04d0*(phi-pi)* -+ x exp(-56.0*(phi-pi)**2))*rpb1*rpc1 -+ -+ else if(keydih(kk).eq.7)then -+ -+c key=7 for opls cosine dihedral -+ -+ phi=phi-prmdih(kk,5) -+ dterm=prmdih(kk,1)+0.5d0*(prmdih(kk,2)* -+ x (1.d0+cos(phi))+prmdih(kk,3)*(1.d0-cos(2.d0*phi))+ -+ x prmdih(kk,4)*(1.d0+cos(3.d0*phi))) -+ gamma=-0.5d0*(prmdih(kk,2)*sin(phi)-2.d0*prmdih(kk,3)* -+ x sin(2.d0*phi)+3.d0*prmdih(kk,4)*sin(3.d0*phi))*rpb1* -+ x rpc1*rsinp -+ -+ else -+ -+c undefined potential -+ -+ safe=.false. -+ dterm=0.d0 -+ gamma=0.d0 -+ -+ endif -+ -+c indices of bonded atoms -+ -+ ia=listdih(ii,2) -+ ib=listdih(ii,3) -+ ic=listdih(ii,4) -+ id=listdih(ii,5) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ kdrive=driven(ltype(ic)) -+ ldrive=driven(ltype(id)) -+ -+ endif -+ -+c set selection control for angle potential -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. -+ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ -+ x atm_fre(id).eq.0) -+ -+ if(lsolva)then -+ dih_exc(atmolt(ia))=dih_exc(atmolt(ia))+dterm -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. -+ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ dih_fre=dih_fre-dterm -+ dterm=lambda1*dterm -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. -+ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ dih_fre=dih_fre+dterm -+ dterm=lambda2*dterm -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy -+ -+ engdih=engdih+dterm -+ -+c calculate solvation energy for dihedral term -+ -+ if(lsolva)then -+ dih_sol(atmolt(ia))=dih_sol(atmolt(ia))+dterm -+ endif -+ -+c calculate atomic forces for dihedral term -+ -+ fax=gamma*((-pcy*zbc+pcz*ybc)-pbpc*rpb2*(-pby*zbc+pbz*ybc)) -+ fay=gamma*(( pcx*zbc-pcz*xbc)-pbpc*rpb2*( pbx*zbc-pbz*xbc)) -+ faz=gamma*((-pcx*ybc+pcy*xbc)-pbpc*rpb2*(-pbx*ybc+pby*xbc)) -+ -+ fcx=gamma*((-pcy*zab+pcz*yab)-pbpc*rpb2*(-pby*zab+pbz*yab)) -+ fcy=gamma*(( pcx*zab-pcz*xab)-pbpc*rpb2*( pbx*zab-pbz*xab)) -+ fcz=gamma*((-pcx*yab+pcy*xab)-pbpc*rpb2*(-pbx*yab+pby*xab)) -+ -+ fb1x=gamma*((-pby*zcd+pbz*ycd)-pbpc*rpc2*(-pcy*zcd+pcz*ycd)) -+ fb1y=gamma*(( pbx*zcd-pbz*xcd)-pbpc*rpc2*( pcx*zcd-pcz*xcd)) -+ fb1z=gamma*((-pbx*ycd+pby*xcd)-pbpc*rpc2*(-pcx*ycd+pcy*xcd)) -+ -+ fd1x=gamma*((-pby*zbc+pbz*ybc)-pbpc*rpc2*(-pcy*zbc+pcz*ybc)) -+ fd1y=gamma*(( pbx*zbc-pbz*xbc)-pbpc*rpc2*( pcx*zbc-pcz*xbc)) -+ fd1z=gamma*((-pbx*ybc+pby*xbc)-pbpc*rpc2*(-pcx*ybc+pcy*xbc)) -+ -+ fxx(ia)=fxx(ia)+fax -+ fyy(ia)=fyy(ia)+fay -+ fzz(ia)=fzz(ia)+faz -+ -+ fxx(ib)=fxx(ib)-fax-fcx+fb1x -+ fyy(ib)=fyy(ib)-fay-fcy+fb1y -+ fzz(ib)=fzz(ib)-faz-fcz+fb1z -+ -+ fxx(ic)=fxx(ic)+fcx-fb1x-fd1x -+ fyy(ic)=fyy(ic)+fcy-fb1y-fd1y -+ fzz(ic)=fzz(ic)+fcz-fb1z-fd1z -+ -+ fxx(id)=fxx(id)+fd1x -+ fyy(id)=fyy(id)+fd1y -+ fzz(id)=fzz(id)+fd1z -+ -+c stress tensor for dihedral term -+ -+ strs(1)=strs(1)+xab*fax+xbc*(fb1x-fcx)-xcd*fd1x -+ strs(2)=strs(2)+yab*fax+ybc*(fb1x-fcx)-ycd*fd1x -+ strs(3)=strs(3)+zab*fax+zbc*(fb1x-fcx)-zcd*fd1x -+ strs(4)=strs(4)+yab*fay+ybc*(fb1y-fcy)-ycd*fd1y -+ strs(5)=strs(5)+yab*faz+ybc*(fb1z-fcz)-ycd*fd1z -+ strs(6)=strs(6)+zab*faz+zbc*(fb1z-fcz)-zcd*fd1z -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then -+ -+c local energy (no virial) -+ -+ eng_loc=eng_loc+dterm -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fax -+ fyy_loc(ia)=fyy_loc(ia)+fay -+ fzz_loc(ia)=fzz_loc(ia)+faz -+ -+ fxx_loc(ib)=fxx_loc(ib)-fax-fcx+fb1x -+ fyy_loc(ib)=fyy_loc(ib)-fay-fcy+fb1y -+ fzz_loc(ib)=fzz_loc(ib)-faz-fcz+fb1z -+ -+ fxx_loc(ic)=fxx_loc(ic)+fcx-fb1x-fd1x -+ fyy_loc(ic)=fyy_loc(ic)+fcy-fb1y-fd1y -+ fzz_loc(ic)=fzz_loc(ic)+fcz-fb1z-fd1z -+ -+ fxx_loc(id)=fxx_loc(id)+fd1x -+ fyy_loc(id)=fyy_loc(id)+fd1y -+ fzz_loc(id)=fzz_loc(id)+fd1z -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xab*fax+xbc*(fb1x-fcx)-xcd*fd1x -+ strs_loc(2)=strs_loc(2)+yab*fax+ybc*(fb1x-fcx)-ycd*fd1x -+ strs_loc(3)=strs_loc(3)+zab*fax+zbc*(fb1x-fcx)-zcd*fd1x -+ strs_loc(4)=strs_loc(4)+yab*fay+ybc*(fb1y-fcy)-ycd*fd1y -+ strs_loc(5)=strs_loc(5)+yab*faz+ybc*(fb1z-fcz)-ycd*fd1z -+ strs_loc(6)=strs_loc(6)+zab*faz+zbc*(fb1z-fcz)-zcd*fd1z -+ -+ endif -+ -+c calculate 1-4 dihedral interactions (coulombic and short ranged) -+c assumes 1-4 interactions are in the exclude list -+ -+ kk=listdih(ii,1) -+ -+c bypass OPLS 1-4 terms (not present) -+ -+ if(keydih(kk).ne.7)then -+ -+c 1-4 electrostatics : adjust by weighting factor -+ -+ scale=prmdih(kk,4) -+ -+ xad=xac+xcd -+ yad=yac+ycd -+ zad=zac+zcd -+ -+ rad=sqrt(xad**2+yad**2+zad**2) -+ -+c scaled charge product*dielectric -+ -+ chgprd=scale*chge(ia)*chge(id)*r4pie0 -+ coul=0.d0 -+ fcoul=0.d0 -+ -+c truncation of potential for all schemes except ewald sum -+ -+ if(abs(chgprd).gt.1.d-10.and.keyfce.gt.0)then -+ -+c electrostatics by ewald sum -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6.or.keyfce/2.eq.7)then -+ -+ coul=chgprd/(epsq*rad) -+ fcoul=coul/(rad**2) -+ -+c distance dependent dielectric -+ -+ elseif(rcut.gt.rad)then -+ -+ if(keyfce/2.eq.2)then -+ -+ coul=chgprd/(epsq*rad**2) -+ fcoul=2.0d0*coul/(rad**2) -+ -+c unmodified coulombic -+ -+ else if(keyfce/2.eq.3)then -+ -+ coul=chgprd/(epsq*rad) -+ fcoul=coul/(rad**2) -+ -+c truncated and shifted coulombic -+ -+ else if(keyfce/2.eq.4)then -+ -+ tt=1.d0/(1.d0+pp*alpha*rad) -+ exp1=exp(-(alpha*rad)**2) -+ erc=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rad -+ fer=(erc+2.d0*(alpha/sqrpi)*exp1)/rad**2 -+ -+c calculate potential energy and forces -+ -+ coul=chgprd*(erc-vcon+fcon*(rad-rcut))/epsq -+ fcoul=chgprd*(fer-fcon/rad)/epsq -+ -+c reaction field -+ -+ else if(keyfce/2.eq.5)then -+ -+ tt=1.d0/(1.d0+pp*alpha*rad) -+ exp1=exp(-(alpha*rad)**2) -+ erc=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rad -+ fer=(erc+2.d0*(alpha/sqrpi)*exp1)/rad**2 -+ coul=chgprd*(erc-vcon+fcon*(rad-rcut)+ -+ x rfld2*rad*rad-rfld1) -+ fcoul=chgprd*(fer-fcon/rad-rfld0) -+ -+ elseif(keyfce/2.eq.0)then -+ -+ coul=0.d0 -+ fcoul=0.d0 -+ -+ else -+ -+ call error(idnode,446) -+ -+ endif -+ -+ endif -+ -+c set selection control for coulombic 1-4 terms -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(ia),atmolt(id)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(id).ne.1))then -+ -+c set selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(id).eq.0) -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou14_vir=cou14_vir+fcoul*rad**2 -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou14_vir=cou14_vir-fcoul*rad**2 -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c electrostatic energy and virial for 1-4 term -+ -+ engc14=engc14+coul -+ virc14=virc14-fcoul*rad**2 -+ -+c solvation energy for coulombic 1-4 term -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c coulombic force for 1-4 term -+ -+ fx=fcoul*xad -+ fy=fcoul*yad -+ fz=fcoul*zad -+ -+ fxx(ia)=fxx(ia)+fx -+ fyy(ia)=fyy(ia)+fy -+ fzz(ia)=fzz(ia)+fz -+ -+ fxx(id)=fxx(id)-fx -+ fyy(id)=fyy(id)-fy -+ fzz(id)=fzz(id)-fz -+ -+c stress tensor for coulombic 1-4 term -+ -+ strs(1)=strs(1)+xad*fx -+ strs(2)=strs(2)+xad*fy -+ strs(3)=strs(3)+xad*fz -+ strs(4)=strs(4)+yad*fy -+ strs(5)=strs(5)+yad*fz -+ strs(6)=strs(6)+zad*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.ldrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-fcoul*rad**2 -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fx -+ fyy_loc(ia)=fyy_loc(ia)+fy -+ fzz_loc(ia)=fzz_loc(ia)+fz -+ -+ fxx_loc(id)=fxx_loc(id)-fx -+ fyy_loc(id)=fyy_loc(id)-fy -+ fzz_loc(id)=fzz_loc(id)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xad*fx -+ strs_loc(2)=strs_loc(2)+xad*fy -+ strs_loc(3)=strs_loc(3)+xad*fz -+ strs_loc(4)=strs_loc(4)+yad*fy -+ strs_loc(5)=strs_loc(5)+yad*fz -+ strs_loc(6)=strs_loc(6)+zad*fz -+ -+ endif -+ -+ endif -+ -+c 1-4 short ranged : adjust by weighting factor -+ -+ scale=prmdih(kk,5) -+ gamma=0.d0 -+ -+ if(mod(keyfce,2).eq.1)then -+ -+c atomic and potential function indices -+ -+ ka=max(ltype(ia),ltype(id)) -+ kb=min(ltype(ia),ltype(id)) -+ k=lstvdw((ka*(ka-1))/2+kb) -+ -+ if(abs(scale*vvv(1,k)).gt.1.d-10)then -+ -+c apply truncation of potential -+ -+ if(rvdw.gt.rad)then -+ -+c determine interpolation panel for force arrays -+ -+ l=int(rad/dlrpot) -+ ppp=rad/dlrpot-dble(l) -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0=vvv(l,k) -+ vk1=vvv(l+1,k) -+ vk2=vvv(l+2,k) -+ -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ -+ srpot=scale*(t1+(t2-t1)*ppp*0.5d0) -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=ggg(l,k) -+ gk1=ggg(l+1,k) -+ gk2=ggg(l+2,k) -+ -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ -+ gamma=scale*(t1+(t2-t1)*ppp*0.5d0)/(rad**2) -+ -+c set selection control for short ranged 1-4 terms -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(ia),atmolt(id)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(id).ne.1))then -+ -+c set selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(id).eq.0) -+ -+ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+srpot -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ vdw_fre=vdw_fre-srpot -+ vdw14_vir=vdw14_vir+gamma*rad**2 -+ srpot=lambda1*srpot -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ vdw_fre=vdw_fre+srpot -+ vdw14_vir=vdw14_vir-gamma*rad**2 -+ srpot=lambda2*srpot -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c short ranged energy and virial for 1-4 term -+ -+ engs14=engs14+srpot -+ virs14=virs14-gamma*rad**2 -+ -+c solvation energy for short ranged 1-4 term -+ -+ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+srpot -+ -+c short ranged forces for 1-4 term -+ -+ fx=gamma*xad -+ fy=gamma*yad -+ fz=gamma*zad -+ -+ fxx(ia)=fxx(ia)+fx -+ fyy(ia)=fyy(ia)+fy -+ fzz(ia)=fzz(ia)+fz -+ -+ fxx(id)=fxx(id)-fx -+ fyy(id)=fyy(id)-fy -+ fzz(id)=fzz(id)-fz -+ -+c stress tensor for short ranged 1-4 term -+ -+ strs(1)=strs(1)+xad*fx -+ strs(2)=strs(2)+xad*fy -+ strs(3)=strs(3)+xad*fz -+ strs(4)=strs(4)+yad*fy -+ strs(5)=strs(5)+yad*fz -+ strs(6)=strs(6)+zad*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.ldrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+srpot -+ vir_loc=vir_loc-gamma*rad**2 -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fx -+ fyy_loc(ia)=fyy_loc(ia)+fy -+ fzz_loc(ia)=fzz_loc(ia)+fz -+ -+ fxx_loc(id)=fxx_loc(id)-fx -+ fyy_loc(id)=fyy_loc(id)-fy -+ fzz_loc(id)=fzz_loc(id)-fz -+ -+c stress tensor for short ranged 1-4 term -+ -+ strs_loc(1)=strs_loc(1)+xad*fx -+ strs_loc(2)=strs_loc(2)+xad*fy -+ strs_loc(3)=strs_loc(3)+xad*fz -+ strs_loc(4)=strs_loc(4)+yad*fy -+ strs_loc(5)=strs_loc(5)+yad*fz -+ strs_loc(6)=strs_loc(6)+zad*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c sum contributions to potentials -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engdih -+ buffer(2)=engc14 -+ buffer(3)=virc14 -+ buffer(4)=engs14 -+ buffer(5)=virs14 -+ buffer(6)=dih_fre -+ buffer(7)=dih_vir -+ buffer(8)=vdw14_vir -+ buffer(9)=cou14_vir -+ call gdsum(buffer(1),9,buffer(10)) -+ engdih=buffer(1) -+ engc14=buffer(2) -+ virc14=buffer(3) -+ engs14=buffer(4) -+ virs14=buffer(5) -+ dih_fre=buffer(6) -+ dih_vir=buffer(7) -+ vdw14_vir=buffer(8) -+ cou14_vir=buffer(9) -+ -+ if(lsolva)then -+ -+ call gdsum(dih_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(dih_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ engcpe=engcpe+engc14 -+ vircpe=vircpe+virc14 -+ engsrp=engsrp+engs14 -+ virsrp=virsrp+virs14 -+ vdw_vir=vdw_vir+vdw14_vir -+ cou_vir=cou_vir+cou14_vir -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,448) -+ -+ deallocate (xdab,ydab,zdab,stat=fail1) -+ deallocate (xdbc,ydbc,zdbc,stat=fail2) -+ deallocate (xdcd,ydcd,zdcd,stat=fail3) -+ -+ return -+ end subroutine dihfrc -+ -+ end module dihedral_module -diff -urN dl_class_1.9.orig/srcmod/dlpoly.f dl_class_1.9/srcmod/dlpoly.f ---- dl_class_1.9.orig/srcmod/dlpoly.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/dlpoly.f 2015-11-09 15:05:00.200575192 +0100 -@@ -0,0 +1,975 @@ -+ program dlpoly_classic -+ -+c*********************************************************************** -+c -+c dl_poly classic is an stfc/ccp5 program package for the -+c dynamical simulation of molecular systems. -+c -+c dl_poly is the copyright of the stfc daresbury laboratory, -+c daresbury, warrington wa4 4ad. -+c -+c neither the stfc, daresbury laboratory, ccp5 nor the authors -+c of this package claim that it is free from errors and do not -+c accept liability for any loss or damage that may arise from -+c its use. it is the users responsibility to verify that the -+c package dl_poly is fit for the purpose the user intends for -+c it. -+c -+c users of this package are recommended to consult the dl_poly -+c user manual for the full description of its use and purpose. -+c -+c authors: w.smith and t.r.forester 1995 -+c copyright daresbury laboratory 1995 -+c -+c DL_POLY CLASSIC VERSION 1.9 -+c -+c*********************************************************************** -+ -+c declare required modules -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use define_system_module -+ use dihedral_module -+ use driver_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use forces_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use integrator_module -+ use inversion_module -+ use metal_module -+ use metafreeze_module -+ use nlist_builders_module -+ use pair_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ character*1 hms,dec -+ character*8 seek -+ -+ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle -+ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb -+ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd -+ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch -+ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect -+ -+ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn -+ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt -+ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj -+ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw -+ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp -+ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k -+ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit -+ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode -+ integer natms2,ntghost,nsolva,isolva,nofic -+ -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd -+ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint -+ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter -+ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom -+ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf -+ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim -+ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen -+ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol -+ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit -+ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl -+ real(8) engord,virord -+c PLUMED modifications -+ real(8) energyUnits,lengthUnits,timeUnits -+ integer(8) get_comms -+c PLUMED modifications -+ -+ real(8), allocatable :: tbuffer(:) -+ integer :: plumedavaiable -+ -+ data timelp/0.d0/,lminnow/.false./,ntrack/10/ -+ data npage,lines/8,0/,recycle/.true./ -+ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ -+ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ -+ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ -+ -+c set up the communications -+ -+ call initcomms() -+ call gsync() -+ -+c determine processor identities -+ -+ call machine(idnode,mxnode) -+ -+c activate for limited-life executable -+ -+CBOMB call bomb(idnode,2008,6,30) -+ -+ allocate (tbuffer(10),stat=memr) -+ -+ call parset(redirect,idnode,mxnode,tbuffer) -+ -+c open main printing file -+ -+ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') -+ if(idnode.eq.0) write (nrite, -+ x "(/,20x,'DL_POLY Classic 1.9', -+ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode -+ -+c allocate arrays for each function -+ -+ call alloc_ang_arrays(idnode) -+ call alloc_bnd_arrays(idnode) -+ call alloc_config_arrays(idnode) -+ call alloc_csh_arrays(idnode) -+ call alloc_dih_arrays(idnode) -+ call alloc_ewald_arrays(idnode) -+ call alloc_exc_arrays(idnode) -+ call alloc_exi_arrays(idnode) -+ call alloc_fbp_arrays(idnode) -+ call alloc_fld_arrays(idnode) -+ call alloc_free_arrays(idnode) -+ call alloc_hke_arrays(idnode) -+ call alloc_hyper_arrays(idnode) -+ call alloc_inv_arrays(idnode) -+ call alloc_met_arrays(idnode) -+ call alloc_pair_arrays(idnode) -+ call alloc_pmf_arrays(idnode) -+ call alloc_prp_arrays(idnode) -+ call alloc_rgbdy_arrays(idnode) -+ call alloc_shake_arrays(idnode) -+ call alloc_site_arrays(idnode) -+ call alloc_sol_arrays(idnode) -+ call alloc_spme_arrays(idnode) -+ call alloc_tbp_arrays(idnode) -+ call alloc_ter_arrays(idnode) -+ call alloc_tet_arrays(idnode) -+ call alloc_vdw_arrays(idnode) -+ -+c start clock -+ -+ call timchk(0,tzero) -+ -+c input the control parameters defining the simulation -+ -+ call simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c input the system force field -+ -+ call sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) -+ -+c construct initial configuration of system -+ -+ call sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c construct initial bookkeeping arrays -+ -+ call sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c reset atom numbers for excitation simulation -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c set initial system temperature -+ -+ call systemp -+ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c read thermodynamic and structural data from restart file -+ -+ call sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c metadynamics by d. quigley -+ -+ if(lmetadyn) then -+ -+c make copy of excluded atom list for use by metadynamics -+ call exclude_copy_mtd(idnode) -+ -+c initialise metadynamics, read order parameter definitions etc. -+ call define_metadynamics(idnode,mxnode,natms,ntpatm,temp) -+ -+ end if -+ -+c synchronise LRC, SIC and system charge terms for switching -+ -+ llswitch=.false. -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod((nstep-nswitch)/niswitch,2).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.true. -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c PLUMED modifications -+ if(lplumed)then -+ -+ call plumed_f_installed(plumedavaiable) -+ -+ if (plumedavaiable<=0) then -+ if(idnode.eq.0) write(nrite,*)"PLUMED NOT AVAILABLE" -+ stop -+ else -+ call plumed_f_gcreate() -+ call plumed_f_gcmd("setMPIFComm"//char(0),get_comms()) -+ call plumed_f_gcmd("setRealPrecision"//char(0),8) -+ energyUnits=0.01 -+ lengthUnits=0.1 -+ timeUnits=1 -+ call plumed_f_gcmd("setMDEnergyUnits"//char(0),energyUnits) -+ call plumed_f_gcmd("setMDLengthUnits"//char(0),lengthUnits) -+ call plumed_f_gcmd("setMDTimeUnits"//char(0),timeUnits) -+ call plumed_f_gcmd("setPlumedDat"//char(0),"plumed.dat"//char(0)) -+ call plumed_f_gcmd("setLogFile"//char(0),"PLUMED.OUT"//char(0)) -+ call plumed_f_gcmd("setNatoms"//char(0),natms) -+ call plumed_f_gcmd("setMDEngine"//char(0),"dlpoly2.20"//char(0)) -+ call plumed_f_gcmd("setTimestep"//char(0),tstep) -+ call plumed_f_gcmd("init"//char(0),0) -+ end if -+ endif -+ -+c PLUMED modifications -+ -+c zero long range component of stress -+ -+ do i=1,9 -+ stresl(i)=0.d0 -+ enddo -+ -+c zero contraint terms -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ if(lminim.or.loptim.or.ntcons.eq.0)then -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c define target kinetic energy -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+c metadynamics by d. quigley -+ -+ sigma_shl=boltz*degshl*0.5d0 -+ -+c convert BPD parameters to internal units -+ -+ if(lbpd)then -+ -+ ebias=0.5d0*boltz*degfre*ebias -+ vmin=0.5d0*boltz*degfre*vmin -+ -+ endif -+ -+c time check -+ -+ call timchk(1,tzero) -+ -+c control variable for structure optimizer -+ -+ keystr=0 -+ stropt=.false. -+ -+ if(lminim)then -+ -+c first step of minimisation programme -+ -+ if(idnode.eq.0)write(nrite,"(1x,120('-'))") -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+c calculate initial conditions for velocity verlet -+ -+ elseif(keyver.eq.1.and.nstep.eq.0)then -+ -+c kinetic stress tensor at start -+ -+ call dcell(cell,celprp) -+ width=min(celprp(7),celprp(8),celprp(9)) -+ call kinstress(natms,idnode,mxnode,stress) -+ engke=0.5d0*(stress(1)+stress(5)+stress(9)) -+ do i=1,9 -+ stress(i)=stress(i)/dble(mxnode) -+ enddo -+ -+c calculate initial forces -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+ endif -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+c construct the first reference state -+ -+ call hyper_start -+ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, -+ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, -+ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, -+ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, -+ x hyp_units) -+ -+ endif -+ -+c perform selected NEB calculation -+ -+ if(lneb)then -+ -+ do i=1,numneb -+ -+ call neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), -+ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+ call scan_profile(nturn,estar) -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(1x,120('-'))") -+ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') -+ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ enddo -+ -+c bypass the MD cycle for this option -+ -+ recycle=.false. -+ -+ endif -+ -+c*********************************************************************** -+c start of molecular dynamics calculations -+c*********************************************************************** -+ -+ do while(recycle) -+ -+c increase step counter -+ -+ nstep=nstep+1 -+ recycle=(nstep.lt.nstrun) -+ -+c store velocities for free energy or solvation simulation -+ -+ if(keyver.eq.0)then -+ -+ if(lsolva)then -+ -+ vxo_sol(:)=vxx(:) -+ vyo_sol(:)=vyy(:) -+ vzo_sol(:)=vzz(:) -+ -+ elseif(lfree)then -+ -+ vxo_fre(:)=vxx(:) -+ vyo_fre(:)=vyy(:) -+ vzo_fre(:)=vzz(:) -+ -+ endif -+ -+ endif -+ -+c molecular switching option for excitation -+ -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod(nstep-nswitch,niswitch).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.not.llswitch -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c switch on the minimiser -+ -+ if(lminim)then -+ -+ lminnow=(mod(nstep,minstp).eq.0) -+ -+ endif -+ -+c conserved quantity (other than K + U) -+ -+ consv=0.d0 -+ -+c energy accumulators -+ -+ if(.not.lminnow)then -+ -+ engke=0.d0 -+ engrot=0.d0 -+ -+ endif -+ -+c calculate volume of simulation cell -+ -+ if(imcon.ne.0.and.imcon.ne.6)then -+ -+ call dcell(cell,celprp) -+ volm=celprp(10) -+ if(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ endif -+ -+ else -+ -+ volm=0.d0 -+ -+ endif -+ -+c reset sutton chen long range corrections (constant pressure only) -+ -+ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+c activate the impact option at designated time step -+ -+ if(lhit.and.nstep.eq.nhit)call impact -+ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) -+ -+c integrate equations of motion stage 1 of velocity verlet -+ -+ if(keyver.gt.0)then -+ -+ isw=1 -+ if(.not.loptim)then -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+ call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+ endif -+ -+ if(lminnow)then -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+ elseif(loptim.or.keyshl.ne.2)then -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+ else -+ -+ call shell_relaxation -+ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, -+ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, -+ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, -+ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, -+ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, -+ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, -+ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, -+ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, -+ x pass1,pass2,engord,virord) -+ -+ endif -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+c switching option for excitation simulation -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+c integrate equations of motion -+ -+ if(keyver.eq.0)then -+ -+c integrate equations of motion by leapfrog verlet -+ -+ if(.not.(loptim.or.lminnow))call lf_integrate -+ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, -+ x elrc,virlrc,virpmf) -+ -+ else if(keyver.gt.0)then -+ -+c integrate equations of motion by velocity verlet (stage 2) -+ -+ isw=2 -+ if(.not.loptim)call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ endif -+ -+c update the atomic positions for the ghost molecule -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+c long range correction adjustment for free energy and solvation -+ -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+c application of transition analysis procedures -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+ engtke=engke+engrot -+ call hyper_driver -+ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, -+ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, -+ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, -+ x tolnce,hyp_units,ebias,vmin) -+ -+ endif -+ -+c reset average boost factor in BPD during equilibration -+ -+ if(lbpd.and.keybpd.eq.1)then -+ -+ if(lzeql.and.nstep.le.nsteql)then -+ -+ numbpd=0 -+ tboost=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate shell kinetic energy -+ -+ if(keyshl.eq.1)then -+ -+ call corshl(idnode,mxnode,ntshl,shlke) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+c apply temperature scaling -+ -+ if((ltscal.and.nstep.le.nsteql).and. -+ x mod(nstep-nsteql,nstbts).eq.0)then -+ -+ chit=0.d0 -+ chit_shl=0.d0 -+ chip=0.d0 -+ do i=1,9 -+ eta(i)=0.d0 -+ enddo -+ -+ if(keyshl.eq.1) then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c reset atom velocities at intervals if required -+ -+ if(newgau)then -+ -+ if(mod(nstep,numgau).eq.0)call regauss -+ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+ endif -+ -+c calculate physical quantities -+ -+ if(nstep.gt.0)call static -+ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, -+ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, -+ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, -+ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, -+ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, -+ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, -+ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, -+ x virmet,engter,virter,boost,tboost) -+ -+c z density calculation -+ -+ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then -+ -+ call zden0(idnode,natms,mxnode,nzden,zlen) -+ -+ endif -+ -+c terminate program if boundary conditions violated -+ -+ if(imcon.gt.0.and.rcut.gt.width)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ call error(idnode,95) -+ -+ endif -+ -+c line-printer output every nstbpo steps -+ -+ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then -+ -+ call timchk(0,timelp) -+ if(idnode.eq.0)then -+ -+ call get_prntime(hms,timelp,prntim) -+ call get_simtime(dec,nstep,tstep,simtim) -+ if(mod(lines,npage).eq.0) -+ x write(nrite,"(1x,120('-'), -+ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, -+ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', -+ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, -+ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', -+ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', -+ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, -+ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', -+ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', -+ x 7x,'press',/,/, -+ x 1x,120('-'))") -+ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, -+ x /,1x,0p,f7.3,a1,1p,9e12.4)") -+ x nstep,(stpval(i),i=1,9), -+ x simtim,dec,(stpval(i),i=10,18), -+ x prntim,hms,(stpval(i),i=19,27) -+ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', -+ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ lines=lines+1 -+ -+ endif -+ -+c report end of equilibration period -+ -+ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then -+ -+ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) -+ x write(nrite,"(/,/,1x,'switching off temperature ', -+ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep -+ ltscal=.false. -+ -+ endif -+ -+c write trajectory data -+ -+ if(ltraj.and.nstep.ge.nstraj) then -+ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then -+ -+ call traject -+ x (ltraj,idnode,imcon,istraj,keytrj,natms, -+ x nstraj,nstep,tstep) -+ -+ endif -+ -+ endif -+ -+c write solvation energy file -+ -+ if(lsolva.and.nstep.ge.nsolva)then -+ -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ call solva_temp(idnode,mxnode,natms2,keyver) -+ call solvation_write(lexcite,lswitch,idnode,natms, -+ x nstep,nsolva,isolva,tstep,engunit,elrc) -+ -+ endif -+ -+ endif -+ -+c write free energy file -+ -+ if(lfree.and.nstep.ge.nfrn)then -+ -+ if(mod(nstep-nfrn,ifrn).eq.0)then -+ -+ call free_kinetic(lfrmas,idnode,mxnode,keyver) -+ call free_energy_write(idnode,nstep,engunit) -+ -+ endif -+ -+ endif -+ -+c save restart data in event of system crash -+ -+ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+ endif -+ -+c cycle time check -+ -+ call timchk(0,timelp) -+ recycle=(recycle.and.timjob-timelp.gt.timcls) -+ -+ enddo -+ -+c*********************************************************************** -+c end of molecular dynamics calculations -+c*********************************************************************** -+ -+c last time check -+ -+ call timchk(0,timelp) -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, -+ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") -+ x timelp,prntim,hms,timcls -+ -+c shell relaxation convergence statistics -+ -+ if(.not.loptim.and.keyshl.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'shell relaxation statistics : average cycles = ', -+ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 -+ -+ endif -+ -+c produce summary of simulation -+ -+ levcfg=2 -+ if(loptim)levcfg=0 -+ if(.not.lneb)call result -+ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, -+ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, -+ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, -+ x chit_shl) -+ -+c PLUMED -+ if(lplumed) call plumed_f_gcmd() -+c PLUMED -+ -+c write hyperdynamics restart file -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+c close output channels -+ -+ if(idnode.eq.0) then -+ -+ close (nrite) -+ close (nstats) -+ close (nhist) -+ close (nevnt) -+ -+ endif -+ -+c terminate job -+ -+ call exitcomms() -+ -+ end -diff -urN dl_class_1.9.orig/srcmod/dlpoly.f.preplumed dl_class_1.9/srcmod/dlpoly.f.preplumed ---- dl_class_1.9.orig/srcmod/dlpoly.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/dlpoly.f.preplumed 2012-04-24 18:30:31.000000000 +0200 -@@ -0,0 +1,936 @@ -+ program dlpoly_classic -+ -+c*********************************************************************** -+c -+c dl_poly classic is an stfc/ccp5 program package for the -+c dynamical simulation of molecular systems. -+c -+c dl_poly is the copyright of the stfc daresbury laboratory, -+c daresbury, warrington wa4 4ad. -+c -+c neither the stfc, daresbury laboratory, ccp5 nor the authors -+c of this package claim that it is free from errors and do not -+c accept liability for any loss or damage that may arise from -+c its use. it is the users responsibility to verify that the -+c package dl_poly is fit for the purpose the user intends for -+c it. -+c -+c users of this package are recommended to consult the dl_poly -+c user manual for the full description of its use and purpose. -+c -+c authors: w.smith and t.r.forester 1995 -+c copyright daresbury laboratory 1995 -+c -+c DL_POLY CLASSIC VERSION 1.9 -+c -+c*********************************************************************** -+ -+c declare required modules -+ -+ use angles_module -+ use bonds_module -+ use config_module -+ use core_shell_module -+ use define_system_module -+ use dihedral_module -+ use driver_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use forces_module -+ use four_body_module -+ use hkewald_module -+ use hyper_dynamics_module -+ use integrator_module -+ use inversion_module -+ use metal_module -+ use metafreeze_module -+ use nlist_builders_module -+ use pair_module -+ use pmf_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use solvation_module -+ use spme_module -+ use temp_scalers_module -+ use tersoff_module -+ use tether_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ character*1 hms,dec -+ character*8 seek -+ -+ logical ltscal,lzeql,loptim,ltraj,lgofr,lpgr,lfcap,recycle -+ logical newlst,lneut,loglnk,lnsq,lzden,lshmov,lcnb,ltad,lneb -+ logical stropt,lzero,nolink,newgau,lminim,lminnow,lhit,lbpd -+ logical prechk,tadall,lexcite,lsolva,lfree,lfrmas,lswitch -+ logical lghost,llswitch,lnfic,nebgo,lpsoc,redirect -+ -+ integer npage,lines,idnode,mxnode,memr,intsta,istraj,nsbzdn -+ integer keyens,keyfce,keyres,keytrj,kmax1,kmax2,kmax3,multt -+ integer nstack,nstbgr,nstbpo,nhko,nlatt,nstbts,nsteql,nstraj -+ integer nstrun,nospl,keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw -+ integer ntptbp,ntpmet,ntpfbp,nshels,imcon,levcfg,nneut,minstp -+ integer ntangl,ntbond,ntcons,ntdihd,ntinv,ntpmf,nspmf,ntfree -+ integer ntteth,ntshl,nstep,numacc,numrdf,nzden,nscons,i,k -+ integer ntpter,keyshl,isw,keyver,keystr,keytol,numgau,khit -+ integer nhit,keybpd,ntrack,nblock,blkout,numneb,nturn,mode -+ integer natms2,ntghost,nsolva,isolva,nofic -+ -+ real(8) alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup -+ real(8) taut,temp,timcls,timjob,tolnce,tstep,tzero,dlrpot,drewd -+ real(8) engunit,rcuttb,rctter,rcutfb,degfre,degrot,chit,conint -+ real(8) elrc,virlrc,engbnd,volm,degshl,chip,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtbp,virtbp,engter,virter -+ real(8) engfbp,virfbp,engsrp,virsrp,engcpe,vircpe,vircon,vircom -+ real(8) engfld,virfld,engshl,virshl,shlke,engtet,virtet,virpmf -+ real(8) consv,engke,engrot,sigma,virtot,engcfg,prntim,simtim -+ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen -+ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol -+ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit -+ real(8) ebias,vmin,hyp_units,estar,chit_shl,sigma_shl -+ real(8) engord,virord -+ real(8), allocatable :: tbuffer(:) -+ -+ data timelp/0.d0/,lminnow/.false./,ntrack/10/ -+ data npage,lines/8,0/,recycle/.true./ -+ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ -+ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ -+ data temp,timcls,timjob,tolnce,rlxtol/5*0.d0/ -+ -+c set up the communications -+ -+ call initcomms() -+ call gsync() -+ -+c determine processor identities -+ -+ call machine(idnode,mxnode) -+ -+c activate for limited-life executable -+ -+CBOMB call bomb(idnode,2008,6,30) -+ -+ allocate (tbuffer(10),stat=memr) -+ -+ call parset(redirect,idnode,mxnode,tbuffer) -+ -+c open main printing file -+ -+ if(.not.redirect.and.idnode.eq.0)open(nrite,file='OUTPUT') -+ if(idnode.eq.0) write (nrite, -+ x "(/,20x,'DL_POLY Classic 1.9', -+ x /,/,30x,'Running on ',i4,' nodes',/,/)") mxnode -+ -+c allocate arrays for each function -+ -+ call alloc_ang_arrays(idnode) -+ call alloc_bnd_arrays(idnode) -+ call alloc_config_arrays(idnode) -+ call alloc_csh_arrays(idnode) -+ call alloc_dih_arrays(idnode) -+ call alloc_ewald_arrays(idnode) -+ call alloc_exc_arrays(idnode) -+ call alloc_exi_arrays(idnode) -+ call alloc_fbp_arrays(idnode) -+ call alloc_fld_arrays(idnode) -+ call alloc_free_arrays(idnode) -+ call alloc_hke_arrays(idnode) -+ call alloc_hyper_arrays(idnode) -+ call alloc_inv_arrays(idnode) -+ call alloc_met_arrays(idnode) -+ call alloc_pair_arrays(idnode) -+ call alloc_pmf_arrays(idnode) -+ call alloc_prp_arrays(idnode) -+ call alloc_rgbdy_arrays(idnode) -+ call alloc_shake_arrays(idnode) -+ call alloc_site_arrays(idnode) -+ call alloc_sol_arrays(idnode) -+ call alloc_spme_arrays(idnode) -+ call alloc_tbp_arrays(idnode) -+ call alloc_ter_arrays(idnode) -+ call alloc_tet_arrays(idnode) -+ call alloc_vdw_arrays(idnode) -+ -+c start clock -+ -+ call timchk(0,tzero) -+ -+c input the control parameters defining the simulation -+ -+ call simdef -+ x (seek,lfcap,lgofr,lnsq,loptim,lzero,lminim,lpgr,ltraj,ltscal, -+ x lzeql,lzden,nolink,newgau,lhit,lbpd,ltad,lneb,prechk,tadall, -+ x lsolva,lfree,lfrmas,lexcite,lswitch,lghost,lnfic,nebgo,lpsoc, -+ x idnode,minstp,intsta,istraj,keybpd,keyens,keyfce,keyres,keyver, -+ x keytrj,kmax1,kmax2,kmax3,multt,nstack,nstbgr,nsbzdn,nstbpo, -+ x nhko,nlatt,nstbts,nsteql,nstraj,nstrun,nospl,keytol,numgau, -+ x khit,nhit,nblock,ntrack,blkout,numneb,mode,nsolva,isolva,nofic, -+ x alpha,delr,epsq,fmax,press,quattol,rcut,rprim,rvdw,taup,taut, -+ x temp,timcls,timjob,tolnce,tstep,rlxtol,opttol,zlen,ehit,xhit, -+ x yhit,zhit,ebias,vmin,catchrad,sprneb,deltad,tlow,hyp_units) -+ -+c input the system force field -+ -+ call sysdef -+ x (lneut,lnsq,lsolva,lfree,lexcite,lswitch,lghost,idnode,keyfce, -+ x keyfld,natms,ngrp,ntpatm,ntpmls,ntpvdw,ntptbp,ntpmet,ntpfbp, -+ x ntpter,nshels,keyshl,ntghost,keyver,dlrpot,engunit,rvdw,rcuttb, -+ x rctter,rcutfb) -+ -+ if(ntpmet.gt.0.and.multt.gt.1)call error(idnode,153) -+ -+c construct initial configuration of system -+ -+ call sysgen -+ x (loglnk,lneut,nolink,lfree,lfrmas,idnode,imcon,keyens, -+ x keyfce,keyres,levcfg,multt,mxnode,ntpmls,delr,rcut,volm) -+ -+c construct initial bookkeeping arrays -+ -+ call sysbook -+ x (loglnk,lneut,lshmov,lcnb,lsolva,lghost,idnode,imcon, -+ x mxnode,natms,nneut,ngrp,nscons,ntangl,ntbond,ntcons, -+ x ntdihd,ntinv,ntpmls,ntpmf,nspmf,ntfree,ntteth,ntshl, -+ x ntghost,degfre,degrot) -+ -+c reset atom numbers for excitation simulation -+ -+ if(lghost)then -+ natms2=natms-ntghost -+ else -+ natms2=natms -+ endif -+ -+c set initial system temperature -+ -+ call systemp -+ x (idnode,imcon,keyres,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntfree,ntshl,levcfg,keyshl,degfre,degshl,degrot,temp, -+ x tolnce) -+ -+c read thermodynamic and structural data from restart file -+ -+ call sysinit -+ x (lgofr,lzden,lsolva,lfree,lghost,lpsoc,idnode,imcon,keyfce, -+ x keyres,mxnode,natms,ntshl,nstep,numacc,numrdf,ntpatm, -+ x ntpmet,ntpvdw,nzden,chip,chit,conint,elrc,engunit,virlrc, -+ x rvdw,volm,virtot,vircom,tboost,chit_shl) -+ -+c metadynamics by d. quigley -+ -+ if(lmetadyn) then -+ -+c make copy of excluded atom list for use by metadynamics -+ call exclude_copy_mtd(idnode) -+ -+c initialise metadynamics, read order parameter definitions etc. -+ call define_metadynamics(idnode,mxnode,natms,ntpatm,temp) -+ -+ end if -+ -+c synchronise LRC, SIC and system charge terms for switching -+ -+ llswitch=.false. -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod((nstep-nswitch)/niswitch,2).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.true. -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c zero long range component of stress -+ -+ do i=1,9 -+ stresl(i)=0.d0 -+ enddo -+ -+c zero contraint terms -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ if(lminim.or.loptim.or.ntcons.eq.0)then -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c define target kinetic energy -+ -+ sigma=temp*boltz*degfre*0.5d0 -+ -+c metadynamics by d. quigley -+ -+ sigma_shl=boltz*degshl*0.5d0 -+ -+c convert BPD parameters to internal units -+ -+ if(lbpd)then -+ -+ ebias=0.5d0*boltz*degfre*ebias -+ vmin=0.5d0*boltz*degfre*vmin -+ -+ endif -+ -+c time check -+ -+ call timchk(1,tzero) -+ -+c control variable for structure optimizer -+ -+ keystr=0 -+ stropt=.false. -+ -+ if(lminim)then -+ -+c first step of minimisation programme -+ -+ if(idnode.eq.0)write(nrite,"(1x,120('-'))") -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+c calculate initial conditions for velocity verlet -+ -+ elseif(keyver.eq.1.and.nstep.eq.0)then -+ -+c kinetic stress tensor at start -+ -+ call dcell(cell,celprp) -+ width=min(celprp(7),celprp(8),celprp(9)) -+ call kinstress(natms,idnode,mxnode,stress) -+ engke=0.5d0*(stress(1)+stress(5)+stress(9)) -+ do i=1,9 -+ stress(i)=stress(i)/dble(mxnode) -+ enddo -+ -+c calculate initial forces -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+ endif -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+c construct the first reference state -+ -+ call hyper_start -+ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, -+ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, -+ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, -+ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, -+ x hyp_units) -+ -+ endif -+ -+c perform selected NEB calculation -+ -+ if(lneb)then -+ -+ do i=1,numneb -+ -+ call neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn_1(i), -+ x bsn_2(i),idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+ call scan_profile(nturn,estar) -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(1x,120('-'))") -+ write(nrite,'(1x,"TRA",3i6,1p,4e14.5)') -+ x bsn_1(i),bsn_2(i),nturn,estar/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ enddo -+ -+c bypass the MD cycle for this option -+ -+ recycle=.false. -+ -+ endif -+ -+c*********************************************************************** -+c start of molecular dynamics calculations -+c*********************************************************************** -+ -+ do while(recycle) -+ -+c increase step counter -+ -+ nstep=nstep+1 -+ recycle=(nstep.lt.nstrun) -+ -+c store velocities for free energy or solvation simulation -+ -+ if(keyver.eq.0)then -+ -+ if(lsolva)then -+ -+ vxo_sol(:)=vxx(:) -+ vyo_sol(:)=vyy(:) -+ vzo_sol(:)=vzz(:) -+ -+ elseif(lfree)then -+ -+ vxo_fre(:)=vxx(:) -+ vyo_fre(:)=vyy(:) -+ vzo_fre(:)=vzz(:) -+ -+ endif -+ -+ endif -+ -+c molecular switching option for excitation -+ -+ if(lswitch)then -+ -+ if(nstep.ge.nswitch)then -+ -+ if(mod(nstep-nswitch,niswitch).eq.0)then -+ -+ call switch_atm(lfrmas) -+ call switch(elrc,virlrc) -+ llswitch=.not.llswitch -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c switch on the minimiser -+ -+ if(lminim)then -+ -+ lminnow=(mod(nstep,minstp).eq.0) -+ -+ endif -+ -+c conserved quantity (other than K + U) -+ -+ consv=0.d0 -+ -+c energy accumulators -+ -+ if(.not.lminnow)then -+ -+ engke=0.d0 -+ engrot=0.d0 -+ -+ endif -+ -+c calculate volume of simulation cell -+ -+ if(imcon.ne.0.and.imcon.ne.6)then -+ -+ call dcell(cell,celprp) -+ volm=celprp(10) -+ if(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ endif -+ -+ else -+ -+ volm=0.d0 -+ -+ endif -+ -+c reset sutton chen long range corrections (constant pressure only) -+ -+ if(ntpmet.gt.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rvdw,volm) -+ -+ endif -+ -+c activate the impact option at designated time step -+ -+ if(lhit.and.nstep.eq.nhit)call impact -+ x (khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) -+ -+c integrate equations of motion stage 1 of velocity verlet -+ -+ if(keyver.gt.0)then -+ -+ isw=1 -+ if(.not.loptim)then -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+ call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+ endif -+ -+ if(lminnow)then -+ -+ call minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+ elseif(loptim.or.keyshl.ne.2)then -+ -+ call molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero, -+ x newlst,stropt,recycle,ltad,lsolva,lfree,lghost, -+ x idnode,imcon,keyfce,keyfld,keyshl,keystr,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut, -+ x nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd, -+ x ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl, -+ x ntteth,ntcons,numrdf,nsolva,isolva,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld, -+ x enginv,engshl,engsrp,engtbp,engter,engtet,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih, -+ x virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,engord,virord) -+ -+ else -+ -+ call shell_relaxation -+ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, -+ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, -+ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, -+ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, -+ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, -+ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, -+ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, -+ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, -+ x pass1,pass2,engord,virord) -+ -+ endif -+ -+c bias potential dynamics option - reset forces -+ -+ if(lbpd)call bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+c switching option for excitation simulation -+ -+ if(llswitch)call copy_force(idnode,mxnode) -+ -+c integrate equations of motion -+ -+ if(keyver.eq.0)then -+ -+c integrate equations of motion by leapfrog verlet -+ -+ if(.not.(loptim.or.lminnow))call lf_integrate -+ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms2,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, -+ x elrc,virlrc,virpmf) -+ -+ else if(keyver.gt.0)then -+ -+c integrate equations of motion by velocity verlet (stage 2) -+ -+ isw=2 -+ if(.not.loptim)call vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms2,nstep, -+ x ngrp,keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode, -+ x nofic,ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom, -+ x virtot,temp,press,volm,sigma,taut,taup,chit,chip,consv, -+ x conint,elrc,virlrc,virpmf,chit_shl,sigma_shl) -+ -+ endif -+ -+c update the atomic positions for the ghost molecule -+ -+ if(lghost)call update_ghost(idnode,mxnode) -+ -+c long range correction adjustment for free energy and solvation -+ -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+ if(lfree.or.lghost) -+ x call lrcorrect_fre(lfree,volm,elrc,virlrc) -+ if(lsolva)call lrcorrect_sol(lghost,volm) -+ -+c application of transition analysis procedures -+ -+ if(ltad.or.(lbpd.and.keybpd.eq.2))then -+ -+ engtke=engke+engrot -+ call hyper_driver -+ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, -+ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, -+ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, -+ x tolnce,hyp_units,ebias,vmin) -+ -+ endif -+ -+c reset average boost factor in BPD during equilibration -+ -+ if(lbpd.and.keybpd.eq.1)then -+ -+ if(lzeql.and.nstep.le.nsteql)then -+ -+ numbpd=0 -+ tboost=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate shell kinetic energy -+ -+ if(keyshl.eq.1)then -+ -+ call corshl(idnode,mxnode,ntshl,shlke) -+ -+ endif -+ -+c scale t=0 tether reference positions (constant pressure only) -+ -+ if(keyver.eq.0.and.keyens.ge.4.and.keyens.le.7) then -+ -+ call xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+ endif -+ -+c apply temperature scaling -+ -+ if((ltscal.and.nstep.le.nsteql).and. -+ x mod(nstep-nsteql,nstbts).eq.0)then -+ -+ chit=0.d0 -+ chit_shl=0.d0 -+ chip=0.d0 -+ do i=1,9 -+ eta(i)=0.d0 -+ enddo -+ -+ if(keyshl.eq.1) then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms2,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+c reset atom velocities at intervals if required -+ -+ if(newgau)then -+ -+ if(mod(nstep,numgau).eq.0)call regauss -+ x (idnode,imcon,mxnode,natms2,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+ endif -+ -+c calculate physical quantities -+ -+ if(nstep.gt.0)call static -+ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, -+ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, -+ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, -+ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, -+ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, -+ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, -+ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, -+ x virmet,engter,virter,boost,tboost) -+ -+c z density calculation -+ -+ if(lzden.and.((.not.lzeql).or.(nstep.gt.nsteql))) then -+ -+ call zden0(idnode,natms,mxnode,nzden,zlen) -+ -+ endif -+ -+c terminate program if boundary conditions violated -+ -+ if(imcon.gt.0.and.rcut.gt.width)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ call error(idnode,95) -+ -+ endif -+ -+c line-printer output every nstbpo steps -+ -+ if(nstep.eq.1.or.(nstep.gt.1.and.mod(nstep,nstbpo).eq.0))then -+ -+ call timchk(0,timelp) -+ if(idnode.eq.0)then -+ -+ call get_prntime(hms,timelp,prntim) -+ call get_simtime(dec,nstep,tstep,simtim) -+ if(mod(lines,npage).eq.0) -+ x write(nrite,"(1x,120('-'), -+ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x, -+ x 'eng_cfg',5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd', -+ x 5x,'eng_ang',5x,'eng_dih',5x,'eng_tet',/,1x, -+ x 'time ',5x,' eng_pv',4x,'temp_rot',5x,'vir_cfg', -+ x 5x,'vir_vdw',5x,'vir_cou',5x,'vir_bnd',5x,'vir_ang', -+ x 5x,'vir_con',5x,'vir_tet',/,1x,'cpu time',6x, -+ x 'volume',4x,'temp_shl',5x,'eng_shl',5x,'vir_shl', -+ x 7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', -+ x 7x,'press',/,/, -+ x 1x,120('-'))") -+ write(nrite,"(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, -+ x /,1x,0p,f7.3,a1,1p,9e12.4)") -+ x nstep,(stpval(i),i=1,9), -+ x simtim,dec,(stpval(i),i=10,18), -+ x prntim,hms,(stpval(i),i=19,27) -+ write(nrite,"(/,1x,' rolling',1p,9e12.4,/,1x,'averages', -+ x 1p,9e12.4,/,9x,1p,9e12.4)") (ravval(i),i=1,27) -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ lines=lines+1 -+ -+ endif -+ -+c report end of equilibration period -+ -+ if((.not.loptim).and.(.not.lzero).and.(nstep.ge.nsteql))then -+ -+ if((ltscal.and.idnode.eq.0).and.(nstep.eq.nsteql)) -+ x write(nrite,"(/,/,1x,'switching off temperature ', -+ x 'scaling at step ',i6,/,/,/,1x,120('-'))") nstep -+ ltscal=.false. -+ -+ endif -+ -+c write trajectory data -+ -+ if(ltraj.and.nstep.ge.nstraj) then -+ if(idnode.eq.0.and.mod(nstep-nstraj,istraj).eq.0)then -+ -+ call traject -+ x (ltraj,idnode,imcon,istraj,keytrj,natms, -+ x nstraj,nstep,tstep) -+ -+ endif -+ -+ endif -+ -+c write solvation energy file -+ -+ if(lsolva.and.nstep.ge.nsolva)then -+ -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ call solva_temp(idnode,mxnode,natms2,keyver) -+ call solvation_write(lexcite,lswitch,idnode,natms, -+ x nstep,nsolva,isolva,tstep,engunit,elrc) -+ -+ endif -+ -+ endif -+ -+c write free energy file -+ -+ if(lfree.and.nstep.ge.nfrn)then -+ -+ if(mod(nstep-nfrn,ifrn).eq.0)then -+ -+ call free_kinetic(lfrmas,idnode,mxnode,keyver) -+ call free_energy_write(idnode,nstep,engunit) -+ -+ endif -+ -+ endif -+ -+c save restart data in event of system crash -+ -+ if(mod(nstep,ndump).eq.0.and.nstep.ne.nstrun)then -+ -+ levcfg=2 -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+ endif -+ -+c cycle time check -+ -+ call timchk(0,timelp) -+ recycle=(recycle.and.timjob-timelp.gt.timcls) -+ -+ enddo -+ -+c*********************************************************************** -+c end of molecular dynamics calculations -+c*********************************************************************** -+ -+c last time check -+ -+ call timchk(0,timelp) -+ call get_prntime(hms,timjob,prntim) -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'run terminating. elapsed cpu time = ',1p,e13.5, -+ x ', job time = ',0p,f7.3,a1,', close time = ',f7.2,'s',/)") -+ x timelp,prntim,hms,timcls -+ -+c shell relaxation convergence statistics -+ -+ if(.not.loptim.and.keyshl.eq.2)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,/,1x,'shell relaxation statistics : average cycles = ', -+ x f8.3,' maximum cycles = ',f8.3)")pass1,pass2 -+ -+ endif -+ -+c produce summary of simulation -+ -+ levcfg=2 -+ if(loptim)levcfg=0 -+ if(.not.lneb)call result -+ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, -+ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit, -+ x conint,rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost, -+ x chit_shl) -+ -+c write hyperdynamics restart file -+ -+ if(ltad.or.lbpd) -+ x call hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+c close output channels -+ -+ if(idnode.eq.0) then -+ -+ close (nrite) -+ close (nstats) -+ close (nhist) -+ close (nevnt) -+ -+ endif -+ -+c terminate job -+ -+ call exitcomms() -+ -+ end -diff -urN dl_class_1.9.orig/srcmod/dlpoly.f.rej dl_class_1.9/srcmod/dlpoly.f.rej ---- dl_class_1.9.orig/srcmod/dlpoly.f.rej 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/dlpoly.f.rej 2015-11-09 14:15:45.054258793 +0100 -@@ -0,0 +1,20 @@ -+--- dlpoly.f.preplumed -++++ dlpoly.f -+@@ -103,12 +103,17 @@ -+ real(8) consv,engke,engrot,sigma,virtot,engcfg -+ real(8) stpeng,stpeth,stpprs,stptmp,stpvir,stpvol,width,zlen -+ real(8) timelp,engmet,virmet,pass0,pass1,pass2,rlxtol,opttol -+ real(8) catchrad,sprneb,deltad,tlow,engtke,ehit,xhit,yhit,zhit -+ real(8) ebias,vmin,boost,heinc,tboost,hyp_units,estar -++c PLUMED modifications -++ real(8) energyUnits,lengthUnits,timeUnits -++ integer(8) get_comms -++c PLUMED modifications -+ -+ real(8), allocatable :: tbuffer(:) -++ integer :: plumedavaiable -+ -+ data timelp/0.d0/,lminnow/.false./,ntrack/10/ -+ data npage,lines/8,0/,recycle/.true./,boost/1.d0/ -+ data pass0/0.d0/,pass1/0.d0/,pass2/0.d0/ -+ data delr,epsq,press,quattol,rprim,rvdw/6*0.d0/ -diff -urN dl_class_1.9.orig/srcmod/driver_module.f dl_class_1.9/srcmod/driver_module.f ---- dl_class_1.9.orig/srcmod/driver_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/driver_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,498 @@ -+ module driver_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining simulation driver routines -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - d.quigley nov 2010 metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use forces_module -+ use nlist_builders_module -+ use optimiser_module -+ use temp_scalers_module -+ -+ implicit none -+ -+ integer, parameter :: mxpass=250 -+ -+ contains -+ -+ subroutine molecular_dynamics -+ x (lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero,newlst, -+ x stropt,cycle,ltad,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,keyfld,keyshl,keystr,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp, -+ x ntpter,ntpvdw,ntshl,ntteth,ntcons,numrdf,nsolva,isolva, -+ x alpha,delr,dlrpot,drewd,elrc,engang,engbnd,engcpe,engdih, -+ x engfbp,engfld,enginv,engshl,engsrp,engtbp,engter,engtet, -+ x epsq,fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,shlke, -+ x engcfg,temp,tstep,virang,virbnd,vircpe,virdih,virfbp,virfld, -+ x virinv,virlrc,virmet,virshl,virsrp,virtbp,virter,virtet,volm, -+ x engmet,virtot,engord,virord) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling subroutine calls in a standard -+c molecular dynamics simulation -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d.quigley nov 2010 metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lfcap,lgofr,lneut,lnsq,loglnk,loptim,lzeql,lzero -+ logical newlst,stropt,cycle,ltad,lsolva,lfree,lghost -+ -+ integer idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons -+ integer keystr,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp -+ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql -+ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet -+ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,nsolva -+ integer isolva -+ -+ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd -+ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp -+ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp -+ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp -+ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp -+ real(8) virtbp,virter,virtet,volm,engmet,virtot -+ real(8) engord,virord -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces -+ -+ call force_manager -+ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c structure optimisation -+ -+ if(loptim.or.lzero)then -+ -+ call optimisation_selector -+ x (loptim,stropt,lzero,idnode,mxnode,natms,imcon,ntcons, -+ x nscons,ngrp,ntfree,keystr,keytol,engcfg,tstep,opttol) -+ -+ if(stropt.and.idnode.eq.0) -+ x write(nrite,"(/,/,1x,'structure optimisation converged ', -+ x 'at step ',i6,/,/,/,1x,120('-'))") nstep -+ -+ cycle=(cycle.and.(.not.stropt)) -+ -+ endif -+ -+c total virial (excluding constraint virial and c.o.m virial) -+c for npt routines note: virsrp already includes virlrc -+ -+ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet+virord -+ -+ return -+ end subroutine molecular_dynamics -+ -+ subroutine shell_relaxation -+ x (lfcap,lgofr,lneut,lnsq,loglnk,lzeql,newlst,ltad,lsolva, -+ x lfree,lghost,idnode,imcon,keyfce,keyfld,keyshl, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,nhko,nlatt,nneut, -+ x nospl,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf, -+ x ntpmls,nsolva,isolva,alpha,delr,dlrpot,drewd,elrc,engang, -+ x engbnd,engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp, -+ x engtbp,engter,engtet,epsq,fmax,rctter,rcut,rcutfb,rcuttb, -+ x rprim,rvdw,shlke,engcfg,temp,tstep,virang,virbnd,vircpe, -+ x virdih,virfbp,virfld,virinv,virlrc,virmet,virshl,virsrp, -+ x virtbp,virter,virtet,volm,engmet,virtot,rlxtol,pass0, -+ x pass1,pass2,engord,virord) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling subroutine calls in a -+c relaxed shell molecular dynamics simulation -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d.quigley nov 2010 metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical,save :: lfirst = .true. -+ logical lfcap,lgofr,lneut,lnsq,loglnk,lzeql,ltad -+ logical newlst,relaxed,shgofr,lsolva,lfree,lghost -+ -+ integer idnode,imcon,keyfce,keyfld,keyshl -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms -+ integer nhko,nlatt,nneut,nospl,nstbgr,nstep,nsteql -+ integer ntangl,ntbond,ntdihd,ntinv,ntpfbp,ntpmet -+ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf -+ integer keyrlx,ntpmls,pass,nsolva,isolva,ia,ib,ishl -+ -+ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd -+ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp -+ real(8) engtbp,engter,engtet,epsq,fmax,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp -+ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp -+ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp -+ real(8) virtbp,virter,virtet,volm,engmet,virtot,rlxtol -+ real(8) pass0,pass1,pass2,engord,virord -+ -+ real(8),allocatable,dimension(:),save :: xdcs,ydcs,zdcs -+ -+ pass=0 -+ keyrlx=0 -+ shgofr=lgofr -+ relaxed=.false. -+ -+ if(lfirst)then -+ -+ allocate(xdcs(1:ntshl)) -+ allocate(ydcs(1:ntshl)) -+ allocate(zdcs(1:ntshl)) -+ lfirst = .false. -+ -+ else -+ -+ do ishl=1,ntshl -+ -+ ia=listshl(ishl,2) -+ ib=listshl(ishl,3) -+ xxx(ib)=xxx(ia)+xdcs(ishl) -+ yyy(ib)=yyy(ia)+ydcs(ishl) -+ zzz(ib)=zzz(ia)+zdcs(ishl) -+ -+ enddo -+ -+ endif -+ -+ do while(.not.relaxed.and.pass.le.mxpass) -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces -+ -+ call force_manager -+ x (newlst,lneut,lnsq,shgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c total virial (excluding constraint virial and c.o.m virial) -+c for npt routines note: virsrp already includes virlrc -+ -+ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet+virord -+ -+c relaxed shell option -+ -+ call relax_shells -+ x (relaxed,keyrlx,idnode,mxnode,natms,ntpmls,tstep, -+ x rlxtol) -+ -+ if(relaxed)then -+ -+ pass1=pass0*pass1 -+ pass0=pass0+1.d0 -+ pass1=pass1/pass0+pass/pass0 -+ pass2=max(dble(pass),pass2) -+c$$$ write(104,'("Relaxed shells before step: ",I5)')pass+1 -+ -+ endif -+ -+ pass=pass+1 -+ if(pass.gt.mxpass)call error(idnode,1950) -+ shgofr=.false. -+ -+c end of shell relaxation -+ -+ enddo -+ -+c store vector connecting the cores to the shells -+ -+ do ishl=1,ntshl -+ -+ ia=listshl(ishl,2) -+ ib=listshl(ishl,3) -+ xdcs(ishl)=xxx(ib)-xxx(ia) -+ ydcs(ishl)=yyy(ib)-yyy(ia) -+ zdcs(ishl)=zzz(ib)-zzz(ia) -+ -+ enddo -+ -+ call images(imcon,0,1,ntshl,cell,xdcs,ydcs,zdcs) -+ -+ return -+ end subroutine shell_relaxation -+ -+ subroutine minimiser -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,imcon,keyfce, -+ x keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt,mxnode,natms, -+ x ngrp,nhko,nlatt,nneut,nospl,nscons,ntcons,nstbgr,nstep, -+ x nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet, -+ x ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,alpha,delr,dlrpot, -+ x drewd,elrc,engang,engbnd,engcpe,engdih,engfbp,engfld,enginv, -+ x engshl,engsrp,engtbp,engter,engtet,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp,tstep, -+ x virang,virbnd,vircpe,virdih,virfbp,virfld,virinv,virlrc, -+ x virmet,virshl,virsrp,virtbp,virter,virtet,volm,engmet, -+ x virtot,sigma,tolnce,engunit,engord,virord) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling subroutine calls in a -+c minimisation simulation -+c -+c copyright - daresbury laboratory -+c author - w. smith may 2007 -+c adapted - d.quigley nov 2010 metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lfcap,lneut,lnsq,loglnk,lzeql,newlst,stropt,shgofr -+ logical conopt,newjob,ltad,lsolva,lfree,lghost -+ -+ integer idnode,imcon,keyfce,keyfld,keyshl,keystr,pass,i -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,keytol -+ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql -+ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet -+ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf,ntcons -+ integer fail,nsolva,isolva -+ -+ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd -+ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp -+ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter,sigma -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp -+ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp -+ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp,tolnce -+ real(8) virtbp,virter,virtet,volm,engmet,virtot,engcon -+ real(8) cfgmin,engunit,hnorm,grad0,grad1,ff1,sgn -+ real(8) engord,virord -+ -+ real(8), allocatable :: sxx(:),syy(:),szz(:) -+ -+ save cfgmin,newjob -+ -+ data newjob/.true./ -+ -+ pass=0 -+ keystr=0 -+ shgofr=.false. -+ stropt=.false. -+ -+c dummy variables -+ -+ ltad=.false. -+ lsolva=.false. -+ lfree=.false. -+ lghost=.false. -+ nsolva=0 -+ isolva=1 -+ -+c$$$c diagnostic printing (not usually active) -+c$$$ -+c$$$ if(idnode.eq.0)then -+c$$$ -+c$$$ write(nrite,"(1x,120('-'), -+c$$$ x /,/,1x,' pass',5x,'eng_cfg',5x,'eng_vdw',5x,'eng_cou', -+c$$$ x 5x,'eng_bnd',5x,'eng_ang',5x,'eng_dih',5x,'eng_tet', -+c$$$ x 5x,'eng_met',/,1x,120('-'))") -+c$$$ -+c$$$ endif -+ -+ do while(.not.stropt.and.pass.lt.mxpass) -+ -+ pass=pass+1 -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces -+ -+ call force_manager -+ x (newlst,lneut,lnsq,shgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c total virial (excluding constraint virial and c.o.m virial) -+c for npt routines note: virsrp already includes virlrc -+ -+ virtot=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet+virord -+ -+c conjugate gradient structure optimisation -+ -+ call strucopt -+ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+c$$$c diagnostic printing (not usually active) -+c$$$ -+c$$$ if(idnode.eq.0)then -+c$$$ -+c$$$ write(nrite,"(1x,i8,1p,8e12.4)") -+c$$$ x pass,engcfg/engunit,engsrp/engunit,engcpe/engunit, -+c$$$ x engbnd/engunit,engang/engunit,engdih/engunit,engtet/ -+c$$$ x engunit,engmet/engunit -+c$$$ write(nrite,"(1x,120('-'))") -+c$$$ -+c$$$ endif -+ -+c end of structure minimisation -+ -+ enddo -+ -+c ensure constraints are satisfied -+ -+ if(stropt.and.ntcons.gt.0)then -+ -+ allocate(sxx(mxatms),syy(mxatms),szz(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,9999) -+ -+c store current forces -+ -+ do i=1,natms -+ -+ sxx(i)=fxx(i) -+ syy(i)=fyy(i) -+ szz(i)=fzz(i) -+ -+ enddo -+ -+ keystr=0 -+ conopt=.false. -+ -+ do while(.not.conopt.and.pass.lt.mxpass) -+ -+ pass=pass+1 -+ engcon=0.d0 -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c conjugate gradient structure optimisation of constraint bonds -+ -+ call strucopt -+ x (conopt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,engcon,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+ enddo -+ -+c restore current forces -+ -+ do i=1,natms -+ -+ fxx(i)=sxx(i) -+ fyy(i)=syy(i) -+ fzz(i)=szz(i) -+ -+ enddo -+ -+ deallocate(sxx,syy,szz,stat=fail) -+ -+ endif -+ -+c write data summary -+ -+ if(idnode.eq.0)then -+ -+ if(stropt)then -+ -+ write(nrite,'(1x,"minimisation converged after ",i6," cycles" -+ x ," energy minimum: ",1pe12.4)')pass,engcfg/engunit -+ -+ else -+ -+ write(nrite,'(1x,"minimisation NOT converged after ",i6, -+ x " cycles")')pass -+ -+ endif -+ -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+c reset velocities after structure optimisation -+ -+ call regauss(idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+c write out minimised structure if lowest obtained so far -+ -+ if(newjob.or.cfgmin.gt.engcfg)then -+ -+ if(idnode.eq.0)call config_write('CFGMIN',0,imcon,natms,engcfg) -+ cfgmin=engcfg -+ newjob=.false. -+ -+ endif -+ -+ return -+ end subroutine minimiser -+ -+ end module driver_module -diff -urN dl_class_1.9.orig/srcmod/ensemble_tools_module.f dl_class_1.9/srcmod/ensemble_tools_module.f ---- dl_class_1.9.orig/srcmod/ensemble_tools_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/ensemble_tools_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1934 @@ -+ module ensemble_tools_module -+ -+c*********************************************************************** -+c -+c dl_poly module defining tools for ensemble simulations -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use core_shell_module -+ use property_module -+ use rigid_body_module -+ use utility_module -+ -+ contains -+ -+ function getmass(natms,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate total system mass -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,i,iatm0,iatm1 -+ real(8) getmass -+ -+ iatm0 = (idnode*natms)/mxnode+1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+ getmass=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ getmass=getmass+weight(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=getmass -+ call gdsum(buffer(1),1,buffer(2)) -+ getmass=buffer(1) -+ -+ endif -+ -+ return -+ end function getmass -+ -+ subroutine getcom(natms,idnode,mxnode,totmas,com) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system centre of mass -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,i,iatm0,iatm1 -+ real(8) totmas -+ -+ real(8) com(3) -+ -+ iatm0 = (idnode*natms)/mxnode+1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+ com(1)=0.d0 -+ com(2)=0.d0 -+ com(3)=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ com(1)=com(1)+weight(i)*xxx(i) -+ com(2)=com(2)+weight(i)*yyy(i) -+ com(3)=com(3)+weight(i)*zzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1) call gdsum(com,3,buffer) -+ -+ com(1)=com(1)/totmas -+ com(2)=com(2)/totmas -+ com(3)=com(3)/totmas -+ -+ return -+ end subroutine getcom -+ -+ subroutine getvom(natms,idnode,mxnode,totmas,vom) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system centre of mass -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,i,iatm0,iatm1 -+ real(8) totmas -+ -+ real(8) vom(3) -+ -+ iatm0 = (idnode*natms)/mxnode+1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+ vom(1)=0.d0 -+ vom(2)=0.d0 -+ vom(3)=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ vom(1)=vom(1)+weight(i)*vxx(i) -+ vom(2)=vom(2)+weight(i)*vyy(i) -+ vom(3)=vom(3)+weight(i)*vzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1) call gdsum(vom,3,buffer) -+ -+ vom(1)=vom(1)/totmas -+ vom(2)=vom(2)/totmas -+ vom(3)=vom(3)/totmas -+ -+ return -+ end subroutine getvom -+ -+ subroutine nvtscale -+ x (idnode,mxnode,natms,engke,sigma,tstep,qmass,taut,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NVT thermostat -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,i,iatm0,iatm1 -+ real(8) engke,sigma,tstep,qmass,chit,conint,scale,taut -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c update chit to 1/2 step -+ -+ chit=chit+tstep*(engke-sigma)/qmass -+ -+c thermostat the velocities -+ -+ scale=exp(-tstep*chit) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ engke=engke*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*qmass/taut**2 -+ -+c update chit to full step -+ -+ chit=chit+tstep*(engke-sigma)/qmass -+ -+ return -+ end subroutine nvtscale -+ -+ subroutine nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,tstep,pmass,qmass,taut, -+ x chip,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT thermostat -+c -+c copyright daresbury laboratory -+c author - w.smith july 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,i,iatm0,iatm1 -+ real(8) engke,temp,sigma,tstep,pmass,qmass,chip,chit,conint,scale -+ real(8) taut -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c update chit to 1/2 step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip**2-boltz*temp)/qmass -+ -+c thermostat the velocities -+ -+ scale=exp(-tstep*chit) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ engke=engke*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp) -+ -+c update chit to full step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip**2-boltz*temp)/qmass -+ -+ return -+ end subroutine nptscale_t -+ -+ subroutine nptscale_p -+ x (idnode,mxnode,natms,engke,tstep,pmass,chip,chit, -+ x volm,press,vircon,virtot) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT barostat -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,i,iatm0,iatm1 -+ real(8) engke,tstep,pmass,chip,press,vircon,virtot -+ real(8) volm,scale,chit -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c propagate chip to 1/2 step -+ -+ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon)- -+ x 3.d0*press*volm)/pmass-chip*chit) -+ -+c barostat the velocities -+ -+ scale=exp(-tstep*chip) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ engke=engke*scale**2 -+ -+c update volume parameter to full step -+ -+ volm=volm*exp(3.d0*tstep*chip) -+ -+c update chip to full step -+ -+ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon)- -+ x 3.d0*press*volm)/pmass-chip*chit) -+ -+ return -+ end subroutine nptscale_p -+ -+ subroutine nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x tstep,qmass,taut,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NVT thermostat -+c to atomic, group and quaternion momenta -+c -+c copyright daresbury laboratory -+c author - w.smith april 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 -+ integer ig -+ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut -+ real(8) conint,scale -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn+engrot -+ -+c update chit to 1/2 step -+ -+ chit=chit+tstep*(engke-sigma)/qmass -+ -+c thermostat scale parameter -+ -+ scale=exp(-tstep*chit) -+ -+c thermostat free atoms -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=scale*omx(ig) -+ omy(ig)=scale*omy(ig) -+ omz(ig)=scale*omz(ig) -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ engrot=engrot*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*qmass/taut**2 -+ -+c update chit to full step -+ -+ engke=engfke+engtrn+engrot -+ chit=chit+tstep*(engke-sigma)/qmass -+ -+ return -+ end subroutine nvtqscl -+ -+ subroutine nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp,sigma, -+ x tstep,pmass,qmass,taut,chip,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT thermostat -+c to atomic, group and quaternion momenta -+c -+c copyright daresbury laboratory -+c author - w.smith april 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 -+ integer ig -+ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut -+ real(8) conint,scale,chip,pmass,temp -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn+engrot -+ -+c update chit to 1/2 tstep -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip**2-boltz*temp)/qmass -+ -+c thermostat scale parameter -+ -+ scale=exp(-tstep*chit) -+ -+c thermostat free atoms -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=scale*omx(ig) -+ omy(ig)=scale*omy(ig) -+ omz(ig)=scale*omz(ig) -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ engrot=engrot*scale**2 -+ -+c update chi to full tstep -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp) -+ -+c update chit to full tstep -+ -+ engke=engfke+engtrn+engrot -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip**2-boltz*temp)/qmass -+ -+ return -+ end subroutine nptqscl_t -+ -+ subroutine nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,tstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT barostat -+c for system with atomic sites and rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,i,ngrp,ntfree,igrp1,igrp2,ifre1,ifre2 -+ integer j,ig -+ real(8) engke,tstep,pmass,chip,press,vircon,virtot -+ real(8) vircom,volm,scale,engtrn,engfke,chit -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c propagate chip to 1/2 tstep -+ -+ engke=engfke+engtrn -+ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon-vircom)- -+ x 3.d0*press*volm)/pmass-chip*chit) -+ -+c barostat the free atom velocities -+ -+ scale=exp(-tstep*chip) -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c barostat the group translational velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ -+c update volume parameter to full tstep -+ -+ volm=volm*exp(3.d0*tstep*chip) -+ -+c update chip to full tstep -+ -+ engke=engfke+engtrn -+ chip=chip+0.5d0*tstep*(((2.d0*engke-virtot-vircon-vircom)- -+ x 3.d0*press*volm)/pmass-chip*chit) -+ -+ return -+ end subroutine nptqscl_p -+ -+ subroutine nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,tstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NST thermostat -+c -+c copyright daresbury laboratory -+c author - w.smith july 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,mode,i,iatm0,iatm1 -+ real(8) engke,temp,sigma,tstep,pmass,qmass,chip2,chit,conint,scale -+ real(8) taut,fac(0:3) -+ data fac/9.d0,3.d0,2.d0,5.d0/ -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate kinetic energy -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ engke=getkin(natms,idnode,mxnode) -+ -+c update chit to 1/2 step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+c thermostat the velocities -+ -+ scale=exp(-tstep*chit) -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ engke=engke*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) -+ -+c update chit to full step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+ return -+ end subroutine nstscale_t -+ -+ subroutine nstscale_p -+ x (idnode,mxnode,natms,mode,tstep,pmass,chit,press,volm) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT anisotropic barostat -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,mode,i,iatm0,iatm1 -+ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit -+ real(8) strkin(9),uni(9),celp(10) -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c propagate barostat momentum to 1/2 step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c barostat the velocities -+ -+ do i=iatm0,iatm1 -+ -+ txx=vxx(i) -+ tyy=vyy(i) -+ tzz=vzz(i) -+ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c new cell vectors -+ -+ call cell_update(tstep,cell,eta) -+ -+c update volume to full time step -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+c calculate kinetic energy and contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c propagate barostat momentum to full step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ return -+ end subroutine nstscale_p -+ -+ subroutine nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,tstep,pmass,qmass,taut,chit,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT thermostat -+c to atomic, group and quaternion momenta -+c -+c copyright daresbury laboratory -+c author - w.smith april 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 -+ integer ig,mode -+ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut -+ real(8) conint,scale,chip2,pmass,temp,fac(0:3) -+ data fac/9.d0,3.d0,2.d0,5.d0/ -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c calculate kinetic energy -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn+engrot -+ -+c update chit to 1/2 step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+c thermostat scale parameter -+ -+ scale=exp(-tstep*chit) -+ -+c thermostat free atoms -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=scale*omx(ig) -+ omy(ig)=scale*omy(ig) -+ omz(ig)=scale*omz(ig) -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ engrot=engrot*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) -+ -+c update chit to full step -+ -+ engke=engfke+engtrn+engrot -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+ return -+ end subroutine nstqscl_t -+ -+ subroutine nstqscl_p -+ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT anisotropic barostat -+c for system with atomic sites and rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith may 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j -+ integer mode -+ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit -+ real(8) strkin(9),strgrp(9),uni(9),celp(10) -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c propagate barostat momentum to 1/2 step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c subtract kinetic contribution from stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ do i=1,9 -+ stress(i)=stress(i)-strkin(i)-strgrp(i) -+ enddo -+ -+c barostat the free atom velocities -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ txx=vxx(i) -+ tyy=vyy(i) -+ tzz=vzz(i) -+ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c barostat the group translational velocities -+ -+ do ig=igrp1,igrp2 -+ -+ txx=gvxx(ig) -+ tyy=gvyy(ig) -+ tzz=gvzz(ig) -+ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c new cell vectors -+ -+ call cell_update(tstep,cell,eta) -+ -+c new system volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+c add new kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i) -+ enddo -+ -+c propagate barostat momentum to full step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ return -+ end subroutine nstqscl_p -+ -+ subroutine nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,tstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT thermostat -+c to atomic, group and quaternion momenta -+c -+c copyright daresbury laboratory -+c author - w.smith april 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,j,igrp1,igrp2,ifre1,ifre2 -+ integer ig,mode -+ real(8) engke,engtrn,engrot,engfke,sigma,tstep,qmass,chit,taut -+ real(8) conint,scale,chip2,pmass,temp,fac(0:3) -+ real(8) strkin(9),strgrp(9) -+ data fac/9.d0,3.d0,2.d0,5.d0/ -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c remove old kinetic term from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strkin(i)-strgrp(i) -+ enddo -+ -+c calculate kinetic energy -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn+engrot -+ -+c update chit to 1/2 step -+ -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+c thermostat scale parameter -+ -+ scale=exp(-tstep*chit) -+ -+c thermostat free atoms -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=scale*omx(ig) -+ omy(ig)=scale*omy(ig) -+ omz(ig)=scale*omz(ig) -+ gvxx(ig)=scale*gvxx(ig) -+ gvyy(ig)=scale*gvyy(ig) -+ gvzz(ig)=scale*gvzz(ig) -+ -+ enddo -+ -+c scale kinetic energy -+ -+ engfke=engfke*scale**2 -+ engtrn=engtrn*scale**2 -+ engrot=engrot*scale**2 -+ -+c scale kinetic energy tensors -+ -+ do i=1,9 -+ -+ strkin(i)=strkin(i)*scale**2 -+ strgrp(i)=strgrp(i)*scale**2 -+ -+ enddo -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit*(qmass/taut**2+boltz*temp*fac(mode)) -+ -+c update chit to full step -+ -+ engke=engfke+engtrn+engrot -+ chit=chit+0.5d0*tstep*(2.d0*(engke-sigma)+ -+ x pmass*chip2-boltz*temp*fac(mode))/qmass -+ -+c add new kinetic terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ return -+ end subroutine nstqscl_t2 -+ -+ subroutine nstqscl_p2 -+ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm, -+ x strkin,strgrp) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT anisotropic barostat -+c for system with atomic sites and rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith may 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j -+ integer mode -+ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit -+ real(8) strkin(9),strgrp(9),uni(9),celp(10) -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c propagate barostat momentum to 1/2 step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c subtract kinetic contribution from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strkin(i)-strgrp(i) -+ enddo -+ -+c barostat the free atom velocities -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ txx=vxx(i) -+ tyy=vyy(i) -+ tzz=vzz(i) -+ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c barostat the group translational velocities -+ -+ do ig=igrp1,igrp2 -+ -+ txx=gvxx(ig) -+ tyy=gvyy(ig) -+ tzz=gvzz(ig) -+ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz) -+ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz) -+ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz) -+ -+ enddo -+ -+c new cell vectors -+ -+ call cell_update(tstep,cell,eta) -+ -+c new system volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+c add new kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i) -+ enddo -+ -+c propagate barostat momentum to full step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)- -+ x press*volm*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ return -+ end subroutine nstqscl_p2 -+ -+ subroutine cell_update(tstep,cell,eta) -+ -+c*********************************************************************** -+c -+c dlpoly utility to update the cell vectors in the hoover -+c nst algorithms (velocity verlet version) -+c -+c copyright daresbury laboratory -+c author w.smith july 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i -+ real(8) tstep,cell(9),eta(9),ctmp(9),uni(9) -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ do i=1,9 -+ ctmp(i)=uni(i)+tstep*eta(i) -+ enddo -+ -+ call mat_mul(ctmp,cell,cell) -+ -+ return -+ end subroutine cell_update -+ -+ subroutine cell_propagate(tstep,cell,eta) -+ -+c*********************************************************************** -+c -+c dlpoly utility to update the cell vectors in the hoover -+c nst algorithms (leapfrog version) -+c -+c copyright daresbury laboratory -+c author w.smith july 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i -+ real(8) tstep -+ real(8) cell(9),eta(9),aaa(9),bbb(9),uni(9) -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ do i=1,9 -+ aaa(i)=tstep*eta(i) -+ enddo -+ -+ call mat_mul(aaa,aaa,bbb) -+ -+ do i=1,9 -+ bbb(i)=uni(i)+aaa(i)+0.5d0*bbb(i) -+ enddo -+ -+ call mat_mul(bbb,cell,cell) -+ -+ return -+ end subroutine cell_propagate -+ -+ subroutine nstqmtk_p -+ x (idnode,mxnode,ntfree,ngrp,mode,tstep,pmass,chit,press,volm, -+ x engfke,engtrn,engrot,temp,sigma) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NPT anisotropic barostat -+c of martyna tobias and klein to atomic, group and quaternion -+c system with atomic sites and rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith may 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntfree,ngrp,i,igrp1,igrp2,ifre1,ifre2,ig,j -+ integer mode -+ real(8) tstep,pmass,press,volm,txx,tyy,tzz,chit,temp,sigma,degfre -+ real(8) engtke,engfke,engtrn,engrot,trace -+ real(8) strkin(9),strgrp(9),uni(9),ctmp(9) -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ degfre=2.d0*sigma/(temp*boltz) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c calculate kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c propagate barostat momentum to 1/2 step -+ -+ call invert(cell,ctmp,volm) -+ volm=abs(volm) -+ engtke=2.d0*(engfke+engtrn+engrot)/degfre -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)+strgrp(i)+ -+ x (engtke-press*volm)*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c barostat the free atom velocities -+ -+ trace=(eta(1)+eta(5)+eta(9))/degfre -+ -+ do j=ifre1,ifre2 -+ -+ i=lstfre(j) -+ txx=vxx(i) -+ tyy=vyy(i) -+ tzz=vzz(i) -+ vxx(i)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz+trace) -+ vyy(i)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz+trace) -+ vzz(i)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz+trace) -+ -+ enddo -+ -+c barostat the group translational velocities -+ -+ do ig=igrp1,igrp2 -+ -+ txx=gvxx(ig) -+ tyy=gvyy(ig) -+ tzz=gvzz(ig) -+ gvxx(ig)=txx-tstep*(eta(1)*txx+eta(4)*tyy+eta(7)*tzz+trace) -+ gvyy(ig)=tyy-tstep*(eta(2)*txx+eta(5)*tyy+eta(8)*tzz+trace) -+ gvzz(ig)=tzz-tstep*(eta(3)*txx+eta(6)*tyy+eta(9)*tzz+trace) -+ -+ enddo -+ -+c update volume to full time step -+ -+ volm=volm*exp(tstep*(eta(1)+eta(5)+eta(9))) -+ -+c calculate kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate new kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=2.d0*(engfke+engtrn+engrot)/degfre -+ -+c propagate barostat momentum to full step -+ -+ do i=1,9 -+ eta(i)=eta(i)+0.5d0*tstep*((stress(i)+strkin(i)+strgrp(i)+ -+ x (engtke-press*volm)*uni(i))/pmass-chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ return -+ end subroutine nstqmtk_p -+ -+ subroutine kinstr(idnode,mxnode,natms,tstep) -+ -+c*********************************************************************** -+c -+c dlpoly routine to calculate the kinetic energy contribution to -+c the stress tensor -+c -+c assumes velocities are half-timestep behind forces -+c -+c replicated data version / block data -+c -+c copyright daresbury laboratory 1994 -+c author t.forester may 1994 -+c amended t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,i,iatm1,iatm2 -+ real(8) tstep,vxt,vyt,vzt -+ -+c block indices -+ -+ iatm1 = (idnode*natms)/mxnode + 1 -+ iatm2 = ((idnode+1)*natms)/mxnode -+ -+ do i = iatm1,iatm2 -+ -+ if(rmass(i).gt.0.d0) then -+ -+ vxt = vxx(i)+fxx(i)*rmass(i)*tstep*0.5d0 -+ vyt = vyy(i)+fyy(i)*rmass(i)*tstep*0.5d0 -+ vzt = vzz(i)+fzz(i)*rmass(i)*tstep*0.5d0 -+ -+ stress(1)=stress(1)-weight(i)*vxt*vxt -+ stress(2)=stress(2)-weight(i)*vxt*vyt -+ stress(3)=stress(3)-weight(i)*vxt*vzt -+ stress(4)=stress(4)-weight(i)*vyt*vxt -+ stress(5)=stress(5)-weight(i)*vyt*vyt -+ stress(6)=stress(6)-weight(i)*vyt*vzt -+ stress(7)=stress(7)-weight(i)*vzt*vxt -+ stress(8)=stress(8)-weight(i)*vzt*vyt -+ stress(9)=stress(9)-weight(i)*vzt*vzt -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine kinstr -+ -+ function getkin(natms,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system kinetic energy -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,i,iatm0,iatm1 -+ real(8) getkin,engke -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ engke=0.d0 -+ -+ do i=iatm0,iatm1 -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ call gdsum(buffer(1),1,buffer(2)) -+ engke=buffer(1) -+ -+ endif -+ -+ getkin=0.5d0*engke -+ -+ return -+ end function getkin -+ -+ function getkinf(ntfree,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate kinetic energy of atoms not in -+c rigid bodies -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ntfree,idnode,mxnode,i,j,ifre0,ifre1 -+ real(8) getkinf,engke -+ -+ ifre0=(idnode*ntfree)/mxnode+1 -+ ifre1=((idnode+1)*ntfree)/mxnode -+ -+ engke=0.d0 -+ -+ do j=ifre0,ifre1 -+ -+ i=lstfre(j) -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ call gdsum(buffer(1),1,buffer(2)) -+ engke=buffer(1) -+ -+ endif -+ -+ getkinf=0.5d0*engke -+ -+ return -+ end function getkinf -+ -+ subroutine getking(ngrp,idnode,mxnode,engtrn,engrot) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system kinetic energy -+c for rigid groups only -+c -+c copyright daresbury laboratory -+c author - m.leslie february 2003 -+c amended - w.smith january 2005 : f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id -+ real(8) engtrn,engrot -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ engtrn=0.d0 -+ engrot=0.d0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c group kinetic energy -+ -+ engtrn=engtrn+ -+ x gmass(id)*(gvxx(ig)**2+gvyy(ig)**2+gvzz(ig)**2) -+ -+c rotational kinetic energy -+ -+ engrot=engrot+(rotinx(id,1)*omx(ig)**2 -+ x +rotiny(id,1)*omy(ig)**2 -+ x +rotinz(id,1)*omz(ig)**2) -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+ buffer(5)=engtrn -+ buffer(6)=engrot -+ call gdsum(buffer(5),2,buffer(1)) -+ engtrn=buffer(5) -+ engrot=buffer(6) -+ -+ endif -+ -+ engtrn=0.5d0*engtrn -+ engrot=0.5d0*engrot -+ -+ return -+ end subroutine getking -+ -+ function getkint(ngrp,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate translational kinetic energy -+c for rigid groups only -+c -+c copyright daresbury laboratory -+c author - w.smith october 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id -+ real(8) engtrn,getkint -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ engtrn=0.d0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c group kinetic energy -+ -+ engtrn=engtrn+ -+ x gmass(id)*(gvxx(ig)**2+gvyy(ig)**2+gvzz(ig)**2) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engtrn -+ call gdsum(buffer(1),1,buffer(2)) -+ engtrn=buffer(1) -+ -+ endif -+ -+ getkint=0.5d0*engtrn -+ -+ return -+ end function getkint -+ -+ function getkinr(ngrp,idnode,mxnode) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate rotational kinetic energy -+c for rigid groups only -+c -+c copyright daresbury laboratory -+c author - w.smith october 2005 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id -+ real(8) engrot,getkinr -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ engrot=0.d0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c rotational kinetic energy -+ -+ engrot=engrot+(rotinx(id,1)*omx(ig)**2 -+ x +rotiny(id,1)*omy(ig)**2 -+ x +rotinz(id,1)*omz(ig)**2) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engrot -+ call gdsum(buffer(1),1,buffer(2)) -+ engrot=buffer(1) -+ -+ endif -+ -+ getkinr=0.5d0*engrot -+ -+ return -+ end function getkinr -+ -+ subroutine kinstress(natms,idnode,mxnode,stresh) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate kinetic contribution to the -+c stress tensor -+c -+c copyright daresbury laboratory -+c author - w.smith november 2002 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,iatm0,iatm1,i -+ real(8) stresh(9) -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise stress tensor -+ -+ do i=1,9 -+ stresh(i)=0.d0 -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ do i=iatm0,iatm1 -+ -+ stresh(1)=stresh(1)+weight(i)*vxx(i)*vxx(i) -+ stresh(2)=stresh(2)+weight(i)*vxx(i)*vyy(i) -+ stresh(3)=stresh(3)+weight(i)*vxx(i)*vzz(i) -+ stresh(5)=stresh(5)+weight(i)*vyy(i)*vyy(i) -+ stresh(6)=stresh(6)+weight(i)*vyy(i)*vzz(i) -+ stresh(9)=stresh(9)+weight(i)*vzz(i)*vzz(i) -+ -+ enddo -+ -+ stresh(4)=stresh(2) -+ stresh(7)=stresh(3) -+ stresh(8)=stresh(6) -+ -+c global sum of stress tensor -+ -+ if(mxnode.gt.1) call gdsum(stresh,9,buffer) -+ -+ return -+ end subroutine kinstress -+ -+ subroutine kinstressg(ngrp,idnode,mxnode,stresh) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate kinetic contribution to the -+c stress tensor -+c -+c copyright daresbury laboratory -+c author - m.leslie february 2003 -+c -+c********************************************************************* -+ -+ integer ngrp,idnode,mxnode,igrp1,igrp2,ig,id -+ real(8) stresh(9) -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c initialise stress tensor -+ -+ do i=1,9 -+ stresh(i)=0.d0 -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ stresh(1)=stresh(1)+gmass(id)*gvxx(ig)*gvxx(ig) -+ stresh(2)=stresh(2)+gmass(id)*gvxx(ig)*gvyy(ig) -+ stresh(3)=stresh(3)+gmass(id)*gvxx(ig)*gvzz(ig) -+ stresh(5)=stresh(5)+gmass(id)*gvyy(ig)*gvyy(ig) -+ stresh(6)=stresh(6)+gmass(id)*gvyy(ig)*gvzz(ig) -+ stresh(9)=stresh(9)+gmass(id)*gvzz(ig)*gvzz(ig) -+ -+ enddo -+ -+ stresh(4)=stresh(2) -+ stresh(7)=stresh(3) -+ stresh(8)=stresh(6) -+ -+c global sum of stress tensor -+ -+ if(mxnode.gt.1) call gdsum(stresh,9,buffer) -+ -+ return -+ end subroutine kinstressg -+ -+ subroutine getkins(natms,idnode,mxnode,getkin) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate system kinetic energy -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005: f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer natms,idnode,mxnode,iatm0,iatm1,i -+ real(8) getkin,engke -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ engke=0.d0 -+ -+ do i=iatm0,iatm1 -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ call gdsum(buffer(1),1,buffer(2)) -+ engke=buffer(1) -+ -+ endif -+ -+ getkin=0.5d0*engke -+ -+ return -+ end subroutine getkins -+ -+ subroutine kinstressf(ntfree,idnode,mxnode,stresh) -+ -+c********************************************************************* -+c -+c dl_poly routine to calculate kinetic contribution to the -+c stress tensor for unconstrained atoms -+c -+c copyright daresbury laboratory -+c author - m.leslie february 2003 -+c amended - w.smith january 2005: f90 conversion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer ntfree,idnode,mxnode,i,ifre1,ifre2,ifre -+ real(8) stresh(9) -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c initialise stress tensor -+ -+ do i=1,9 -+ stresh(i)=0.d0 -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ stresh(1)=stresh(1)+weight(i)*vxx(i)*vxx(i) -+ stresh(2)=stresh(2)+weight(i)*vxx(i)*vyy(i) -+ stresh(3)=stresh(3)+weight(i)*vxx(i)*vzz(i) -+ stresh(5)=stresh(5)+weight(i)*vyy(i)*vyy(i) -+ stresh(6)=stresh(6)+weight(i)*vyy(i)*vzz(i) -+ stresh(9)=stresh(9)+weight(i)*vzz(i)*vzz(i) -+ -+ enddo -+ -+ stresh(4)=stresh(2) -+ stresh(7)=stresh(3) -+ stresh(8)=stresh(6) -+ -+c global sum of stress tensor -+ -+ if(mxnode.gt.1) call gdsum(stresh,9,buffer) -+ -+ return -+ end subroutine kinstressf -+ -+ subroutine nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,tstep,qmass_shl, -+ x taut,chit_shl,conint) -+ -+c********************************************************************* -+c -+c dl_poly routine to integrate and apply NVT thermostat -+c thermostats the core-shell relative motion -+c -+c copyright daresbury laboratory -+c author - w.smith october 2002 -+c amended - w.smith january 2005 : f90 conversion -+c adapted - d. quigley 2006 : core-shell motion -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl,i,ishl1,ishl2,j,k,m -+ real(8) shlke,sigma_shl,tstep,qmass_shl,chit_shl,conint -+ real(8) dvx,dvy,dvz,tmx,tmy,tmz,rmu,scale,taut -+ -+ ishl1=(idnode*ntshl)/mxnode+1 -+ ishl2=((idnode+1)*ntshl)/mxnode -+ -+c calculate kinetic energy -+ -+ call corshl(idnode,mxnode,ntshl,shlke) -+ -+c update chit to 1/2 step -+ -+ chit_shl=chit_shl+tstep*(shlke-sigma_shl)/qmass_shl -+ -+c thermostat the velocities -+ -+ scale=exp(-tstep*chit_shl) -+ -+ m=0 -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+ rmu=(weight(i)*weight(j))/(weight(i)+weight(j)) -+ -+ if(rmu.gt.0.d0)then -+ -+ dvx=vxx(j)-vxx(i) -+ dvy=vyy(j)-vyy(i) -+ dvz=vzz(j)-vzz(i) -+ -+ tmx=weight(i)*vxx(i)+weight(j)*vxx(j) -+ tmy=weight(i)*vyy(i)+weight(j)*vyy(j) -+ tmz=weight(i)*vzz(i)+weight(j)*vzz(j) -+ -+ vxx(i)=tmx/(weight(i)+weight(j))-scale*rmu*dvx/weight(i) -+ vxx(j)=tmx/(weight(i)+weight(j))+scale*rmu*dvx/weight(j) -+ vyy(i)=tmy/(weight(i)+weight(j))-scale*rmu*dvy/weight(i) -+ vyy(j)=tmy/(weight(i)+weight(j))+scale*rmu*dvy/weight(j) -+ vzz(i)=tmz/(weight(i)+weight(j))-scale*rmu*dvz/weight(i) -+ vzz(j)=tmz/(weight(i)+weight(j))+scale*rmu*dvz/weight(j) -+ -+ endif -+ -+ enddo -+ -+ shlke=shlke*scale**2 -+ -+c update chi to full step -+ -+ conint=conint+tstep*chit_shl*qmass_shl/taut**2 -+ -+c update chit to full step -+ -+ chit_shl=chit_shl+tstep*(shlke-sigma_shl)/qmass_shl -+ -+ if(mxnode.gt.1) call shlmerge(idnode,mxnode,ntshl) -+ -+ return -+ end subroutine nvtscale_shl -+ -+ end module ensemble_tools_module -+ -diff -urN dl_class_1.9.orig/srcmod/error_module.f dl_class_1.9/srcmod/error_module.f ---- dl_class_1.9.orig/srcmod/error_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/error_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1513 @@ -+ module error_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining bond potentials -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ contains -+ -+ subroutine error(idnode,iode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for printing error messages and bringing -+c about a controlled termination of the program -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c -+c warning - this routine terminates the job. user must ensure -+c that all nodes are informed of error condition before this -+c subroutine is called. e.g. using subroutine gstate(). -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ logical kill -+ integer idnode,iode,kode -+ -+ kill=(iode.ge.0) -+ kode = abs(iode) -+ -+ if(idnode.eq.0)then -+ -+ if(kill)then -+ write(nrite,'(/,/,1x,a,i5)') -+ x 'DL_POLY terminated due to error ', kode -+ -+ else -+ -+ write(nrite,'(/,/,1x,a,i5)') -+ x 'DL_POLY will terminate due to error ', kode -+ -+ endif -+ -+ if(kode.lt.50)then -+ -+ if(kode.eq. 0)then -+ -+c dummy entry -+ -+ elseif(kode.eq. 3)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown directive found in CONTROL file' -+ elseif(kode.eq. 4)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown directive found in FIELD file' -+ elseif(kode.eq. 5)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown energy unit requested' -+ elseif(kode.eq. 6)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - energy unit not specified' -+ elseif(kode.eq. 7)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - energy unit respecified' -+ elseif(kode.eq. 8)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - time step not specified' -+ elseif(kode.eq.10)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many molecule types specified' -+ elseif(kode.eq.11)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate molecule directive in FIELD file' -+ elseif(kode.eq.12)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown molecule directive in FIELD file' -+ elseif(kode.eq.13)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - molecular species not yet specified' -+ elseif(kode.eq.14)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many unique atom types specified' -+ elseif(kode.eq.15)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate pair potential specified' -+ elseif(kode.eq.16)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - strange exit from FIELD file processing' -+ elseif(kode.eq.17)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - strange exit from CONTROL file processing' -+ elseif(kode.eq.18)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate 3-body potential specified' -+ elseif(kode.eq.19)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate 4-body potential specified' -+ elseif(kode.eq.20)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many molecule sites specified' -+ elseif(kode.eq.21)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate tersoff potential specified' -+ elseif(kode.eq.22)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unsuitable radial increment in TABLE file' -+ elseif(kode.eq.23)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incompatible FIELD and TABLE file potentials' -+ elseif(kode.eq.24)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of file encountered in TABLE file' -+ elseif(kode.eq.25)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - wrong atom type found in CONFIG file' -+ elseif(kode.eq.26)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cutoff smaller than EAM potential range' -+ elseif(kode.eq.27)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incompatible FIELD and TABEAM file potentials' -+ elseif(kode.eq.28)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer too small in mettab' -+ elseif(kode.eq.29)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of file encountered in TABEAM file' -+ elseif(kode.eq.30)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many chemical bonds specified' -+ elseif(kode.eq.31)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many chemical bonds in system' -+ elseif(kode.eq.32)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - integer array memory allocation failure' -+ elseif(kode.eq.33)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - real array memory allocation failure' -+ elseif(kode.eq.34)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - character array memory allocation failure' -+ elseif(kode.eq.35)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - logical array memory allocation failure' -+ elseif(kode.eq.36)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - failed fmet array allocation in mettab' -+ elseif(kode.eq.40)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many bond constraints specified' -+ elseif(kode.eq.41)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many bond constraints in system' -+ elseif(kode.eq.42)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer too small in merge1' -+ elseif(kode.eq.45)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many atoms in CONFIG file' -+ elseif(kode.eq.46)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - ewlbuf array too small in ewald1' -+ elseif(kode.eq.47)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer too small in merge' -+ elseif(kode.eq.48)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer too small in fortab' -+ elseif(kode.eq.49)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - frozen core-shell unit specified' -+ endif -+ -+ elseif(kode.lt.100)then -+ -+ if(kode.eq.50)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many bond angles specified' -+ elseif(kode.eq.51)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many bond angles in system' -+ elseif(kode.eq.52)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of FIELD file encountered' -+ elseif(kode.eq.53)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of CONTROL file encountered' -+ elseif(kode.eq.54)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - problem reading CONFIG file' -+ elseif(kode.eq.55)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of CONFIG file encountered' -+ elseif(kode.eq.57)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many core-shell units specified' -+ elseif(kode.eq.59)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many core-shell units in system' -+ elseif(kode.eq.60)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many dihedral angles specified' -+ elseif(kode.eq.61)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many dihedral angles in system' -+ elseif(kode.eq.62)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many tethered atoms specified' -+ elseif(kode.eq.63)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many tethered atoms in system' -+ elseif(kode.eq.65)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many excluded pairs specified' -+ elseif(kode.eq.66)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect boundary condition for HK ewald' -+ elseif(kode.eq.67)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect boundary condition in thbfrc' -+ elseif(kode.eq.69)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many link cells required in thbfrc' -+ elseif(kode.eq.70)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - constraint bond quench failure' -+ elseif(kode.eq.71)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many metal potentials specified' -+ elseif(kode.eq.72)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - different metal potential types specified' -+ elseif(kode.eq.73)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many inversion potentials specified' -+ elseif(kode.eq.75)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many atoms in specified system' -+ elseif(kode.eq.77)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many inversion potentials in system' -+ elseif(kode.eq.79)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect boundary condition in fbpfrc' -+ elseif(kode.eq.80)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many pair potentials specified' -+ elseif(kode.eq.81)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in pair potential list' -+ elseif(kode.eq.82)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - calculated pair potential index too large' -+ elseif(kode.eq.83)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many three body potentials specified' -+ elseif(kode.eq.84)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in 3-body potential list' -+ elseif(kode.eq.85)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - required velocities not in CONFIG file' -+ elseif(kode.eq.86)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - calculated 3-body potential index too large' -+ elseif(kode.eq.87)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many link cells required in fbpfrc' -+ elseif(kode.eq.88)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many tersoff potentials specified' -+ elseif(kode.eq.89)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many four body potentials specified' -+ elseif(kode.eq.90)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - system total electric charge nonzero' -+ elseif(kode.eq.91)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in 4-body potential list' -+ elseif(kode.eq.92)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in tersoff potential list' -+ elseif(kode.eq.93)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cannot use shell model with rigid molecules' -+ elseif(kode.eq.95)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - potential cutoff exceeds half-cell width' -+ elseif(kode.eq.97)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cannot use shell model with neutral groups' -+ elseif(kode.eq.99)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cannot use shell model with constraints' -+ endif -+ -+ elseif(kode.lt.150)then -+ -+ if(kode.eq.100)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - forces working arrays too small' -+ elseif(kode.eq.101)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - calculated 4-body potential index too large' -+ elseif(kode.eq.102)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - parameter mxproc exceeded in shake arrays' -+ elseif(kode.eq.103)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - parameter mxlshp exceeded in shake arrays' -+ elseif(kode.eq.105)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - shake algorithm failed to converge' -+ elseif(kode.eq.106)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parlink ' -+ x //'subroutine' -+ elseif(kode.eq.107)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parlinkneu ' -+ x //'subroutine' -+ elseif(kode.eq.108)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parneulst ' -+ x //'subroutine' -+ elseif(kode.eq.109)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parlst_nsq ' -+ x //'subroutine' -+ elseif(kode.eq.110)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neighbour list array too small in parlst ' -+ x //'subroutine' -+ elseif(kode.eq.112)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - vertest array too small' -+ elseif(kode.eq.120)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - invalid determinant in matrix inversion' -+ elseif(kode.eq.130)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect octahedral boundary condition' -+ elseif(kode.eq.135)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect hexagonal prism boundary condition' -+ elseif(kode.eq.140)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect dodecahedral boundary condition' -+ elseif(kode.eq.141)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - duplicate metal potential specified' -+ elseif(kode.eq.142)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - interpolation outside range of metal '// -+ x 'potential attempted' -+ elseif(kode.eq.145)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - no van der waals potentials defined' -+ endif -+ -+ elseif(kode.lt.200)then -+ -+ if(kode.eq.150)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown van der waals potential selected' -+ elseif(kode.eq.151)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unknown metal potential selected' -+ elseif(kode.eq.153)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - metals not permitted with multiple timestep' -+ elseif(kode.eq.160)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unaccounted for atoms in exclude list ' -+ elseif(kode.eq.170)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many variables for statistic array ' -+ elseif(kode.eq.180)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - Ewald sum requested in non-periodic system' -+ elseif(kode.eq.185)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many reciprocal space vectors' -+ elseif(kode.eq.186)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer array too small in sysgen' -+ elseif(kode.eq.190)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - buffer array too small in splice' -+ endif -+ -+ elseif(kode.lt.250)then -+ -+ if(kode.eq.200)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - rdf buffer array too small in revive' -+ elseif(kode.eq.220)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many neutral groups in system' -+ elseif(kode.eq.225)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - multiple selection of optimisation options' -+ elseif(kode.eq.230)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neutral groups improperly arranged' -+ endif -+ -+ elseif(kode.lt.300)then -+ -+ if(kode.eq.250)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - Ewald sum requested with neutral groups' -+ elseif(kode.eq.260)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - parameter mxexcl exceeded in excludeneu routine' -+ endif -+ -+ elseif(kode.lt.350)then -+ -+ if(kode.eq.300)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect boundary condition in parlink' -+ elseif(kode.eq.301)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many rigid body types ' -+ elseif(kode.eq.302)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many sites in rigid body ' -+ elseif(kode.eq.303)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many rigid bodies specified' -+ elseif(kode.eq.304)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many rigid body sites in system ' -+ elseif(kode.eq.305)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - box size too small for link cells' -+ elseif(kode.eq.306)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - failed to find principal axis system' -+ elseif(kode.eq.310)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - quaternion setup failed ' -+ elseif(kode.eq.320)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - site in multiple rigid bodies' -+ elseif(kode.eq.321)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - quaternion integrator failed' -+ elseif(kode.eq.330)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - mxewld parameter incorrect' -+ elseif(kode.eq.331)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - mxhke parameter incorrect' -+ elseif(kode.eq.332)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - mxhko parameter too small' -+ elseif(kode.eq.340)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - invalid integration option requested' -+ endif -+ -+ elseif(kode.lt.400)then -+ -+ if(kode.eq.350)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too few degrees of freedom' -+ elseif(kode.eq.360)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - frozen atom found in rigid body' -+ elseif(kode.eq.380)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - simulation temperature not specified' -+ elseif(kode.eq.381)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - simulation timestep not specified' -+ elseif(kode.eq.382)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - simulation cutoff not specified' -+ elseif(kode.eq.383)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - simulation forces option not specified' -+ elseif(kode.eq.384)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - verlet strip width not specified' -+ elseif(kode.eq.385)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - primary cutoff not specified' -+ elseif(kode.eq.386)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - primary cutoff larger than rcut' -+ elseif(kode.eq.387)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - system pressure not specified' -+ elseif(kode.eq.388)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - npt incompatible with multiple timestep' -+ elseif(kode.eq.389)then -+ write(nrite,'(/,/,1x,a)') -+ x 'number of pimd beads not specified in field file' -+ elseif(kode.eq.390)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - npt ensemble requested in non-periodic system' -+ elseif(kode.eq.391)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - incorrect number of pimd beads in config file' -+ elseif(kode.eq.392)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many link cells requested' -+ elseif(kode.eq.394)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - minimum image arrays exceeded' -+ elseif(kode.eq.396)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - interpolation array exceeded' -+ elseif(kode.eq.398)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cutoff too small for rprim and delr' -+ endif -+ -+ elseif(kode.lt.450)then -+ -+ if(kode.eq.400)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - rvdw greater than cutoff' -+ elseif(kode.eq.402)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - van der waals cutoff unset' -+ elseif(kode.eq.410)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - cell not consistent with image convention' -+ elseif(kode.eq.412)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - mxxdf parameter too small for shake routine' -+ elseif(kode.eq.414)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - conflicting ensemble options in CONTROL file' -+ elseif(kode.eq.416)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - conflicting force options in CONTROL file' -+ elseif(kode.eq.418)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in bndfrc' -+ elseif(kode.eq.419)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in angfrc' -+ elseif(kode.eq.420)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in tethfrc' -+ elseif(kode.eq.421)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in dihfrc' -+ elseif(kode.eq.422)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - all-pairs must use multiple timestep' -+ elseif(kode.eq.423)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in shlfrc' -+ elseif(kode.eq.424)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - electrostatics incorrect for all-pairs' -+ elseif(kode.eq.425)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - transfer buffer array too small in shlmerge' -+ elseif(kode.eq.426)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - neutral groups not permitted with all-pairs' -+ elseif(kode.eq.427)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - bond vector work arrays too small in invfrc' -+ elseif(kode.eq.430)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - integration routine not available' -+ elseif(kode.eq.432)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - intlist failed to assign constraints ' -+ elseif(kode.eq.433)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - specify rcut before the Ewald sum precision' -+ elseif(kode.eq.434)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - illegal entry into STRESS related routine' -+ elseif(kode.eq.435)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - specify rcut before the coulomb precision' -+ elseif(kode.eq.436)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unrecognised ensemble ' -+ elseif(kode.eq.438)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - PMF constraints failed to converge' -+ elseif(kode.eq.440)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined angular potential' -+ elseif(kode.eq.442)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined three body potential' -+ elseif(kode.eq.443)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined four body potential' -+ elseif(kode.eq.444)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined bond potential' -+ elseif(kode.eq.445)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined many body potential' -+ elseif(kode.eq.446)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined electrostatic key in dihfrc' -+ elseif(kode.eq.447)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - 1-4 separation exceeds cutoff range' -+ elseif(kode.eq.448)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined dihedral potential' -+ elseif(kode.eq.449)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined inversion potential' -+ endif -+ -+ elseif(kode.lt.500)then -+ -+ if(kode.eq.450)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined tethering potential' -+ elseif(kode.eq.451)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - three body potential cutoff undefined' -+ elseif(kode.eq.452)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined pair potential' -+ elseif(kode.eq.453)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - four body potential cutoff undefined' -+ elseif(kode.eq.454)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined external field' -+ elseif(kode.eq.456)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - core and shell in same rigid unit' -+ elseif(kode.eq.458)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many PMF constraints - param. mspmf too ' -+ x //'small' -+ elseif(kode.eq.460)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - too many PMF sites - parameter mxspmf too small' -+ elseif(kode.eq.461)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - undefined metal potential' -+ elseif(kode.eq.462)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - PMF UNIT record expected' -+ elseif(kode.eq.463)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - unidentified atom in metal potential list' -+ elseif(kode.eq.464)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - thermostat time constant must be > 0.d0' -+ elseif(kode.eq.465)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - calculated pair potential index too large' -+ elseif(kode.eq.466)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - barostat time constant must be > 0.d0' -+ elseif(kode.eq.468)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - r0 too large for snm potential with current ' -+ x //'cutoff' -+ elseif(kode.eq.470)then -+ write(nrite,'(/,/,1x,a)') -+ x 'error - n= ',nsatms -+ call error(idnode,100) -+ -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+c variables for array bound checking -+ -+ ibig=0 -+ safe=.true. -+ -+c initialise excluded atom arrays -+ -+ do i=1,mxsite -+ -+ nexsit(i)=0 -+ -+ enddo -+ -+ do i=1,msatms -+ -+ nexatm(i)=0 -+ -+ enddo -+ -+ do j=1,mxexcl -+ -+ do i=1,mxsite -+ -+ lexsit(i,j)=0 -+ -+ enddo -+ -+ do i=1,msatms -+ -+ lexatm(i,j)=0 -+ -+ enddo -+ -+ enddo -+ -+ -+c loop over molecules in system -+ -+ ibonds=0 -+ iangle=0 -+ iconst=0 -+ idihdr=0 -+ invers=0 -+ igrp =0 -+ isite =0 -+ ishels=0 -+ -+ do itmols=1,ntpmls -+ -+c exclude sites on basis of chemical bonds -+ -+ do i=1,numbonds(itmols) -+ -+ ibonds=ibonds+1 -+ -+ if(keybnd(ibonds).gt.0)then -+ -+ ia=lstbnd(ibonds,1)+isite -+ ib=lstbnd(ibonds,2)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of bond constraints -+ -+ do i=1,numcon(itmols) -+ -+ iconst=iconst+1 -+ ia=lstcon(iconst,1)+isite -+ ib=lstcon(iconst,2)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+ enddo -+ -+c exclude sites on basis of bond angles -+ -+ do i=1,numang(itmols) -+ -+ iangle=iangle+1 -+ if(keyang(iangle).gt.0)then -+ ia=lstang(iangle,1)+isite -+ ib=lstang(iangle,2)+isite -+ ic=lstang(iangle,3)+isite -+ -+c check if already added to lists .. -+c ia - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+c ib - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib),mxexcl) -+ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib)=nexsit(ib)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ib,nexsit(ib))=ic-isite -+ lexsit(ic,nexsit(ic))=ib-isite -+ endif -+ endif -+ -+c ia - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ic-isite -+ lexsit(ic,nexsit(ic))=ia-isite -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude on basis of rigid groups -+ -+ do i=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ id=listyp(igrp) -+ -+ do jj=1,numgsit(id)-1 -+ -+ ia=lstgst(igrp,jj)+isite -+ -+ do jk=jj+1,numgsit(id) -+ -+ ib=lstgst(igrp,jk)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c exclude sites on basis of 1-4 dihedral angles -+ -+ do i=1,numdih(itmols) -+ -+ idihdr=idihdr+1 -+ ia=lstdih(idihdr,1)+isite -+ ib=lstdih(idihdr,2)+isite -+ ic=lstdih(idihdr,3)+isite -+ id=lstdih(idihdr,4)+isite -+ -+c check if already added to lists .. -+c ia - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+c ib - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib),mxexcl) -+ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib)=nexsit(ib)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ib,nexsit(ib))=ic-isite -+ lexsit(ic,nexsit(ic))=ib-isite -+ endif -+ endif -+ -+c ia - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ic-isite -+ lexsit(ic,nexsit(ic))=ia-isite -+ endif -+ endif -+ -+c id - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(id),mxexcl) -+ if(lexsit(id,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(id)=nexsit(id)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(id),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(id),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(id,nexsit(id))=ib-isite -+ lexsit(ib,nexsit(ib))=id-isite -+ endif -+ endif -+ -+c id - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(id),mxexcl) -+ if(lexsit(id,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(id)=nexsit(id)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(id),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(id),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(id,nexsit(id))=ic-isite -+ lexsit(ic,nexsit(ic))=id-isite -+ endif -+ endif -+ -+c ia - id interaction: may need to reset vdw and elec scale factors -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.id-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(id)=nexsit(id)+1 -+ if(max(nexsit(ia),nexsit(id)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(id)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=id-isite -+ lexsit(id,nexsit(id))=ia-isite -+ endif -+ -+ elseif(keydih(idihdr).ne.7)then -+ -+c if already excluded reset 1..4 vdw and coulombic scale factors -+ -+ check=((abs(prmdih(idihdr,4)).gt.1.d-10).or. -+ x (abs(prmdih(idihdr,5)).gt.1.d-10)) -+ -+ if(check)then -+ -+ a1=dble(itmols) -+ a2=dble(ia) -+ a3=dble(id) -+ call warning(idnode,20,a1,a2,a3) -+ -+ prmdih(idihdr,4)=0.d0 -+ prmdih(idihdr,5)=0.d0 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of inversion potentials -+ -+ do i=1,numinv(itmols) -+ -+ invers=invers+1 -+ ia=lstinv(invers,1)+isite -+ ib=lstinv(invers,2)+isite -+ ic=lstinv(invers,3)+isite -+ id=lstinv(invers,4)+isite -+ -+c check if already added to lists .. -+c ia - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+c ib - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib),mxexcl) -+ if(lexsit(ib,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib)=nexsit(ib)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ib),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ib,nexsit(ib))=ic-isite -+ lexsit(ic,nexsit(ic))=ib-isite -+ endif -+ endif -+ -+c ia - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(ia),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ic-isite -+ lexsit(ic,nexsit(ic))=ia-isite -+ endif -+ endif -+ -+c id - ib interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(id),mxexcl) -+ if(lexsit(id,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(id)=nexsit(id)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(id),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(id),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(id,nexsit(id))=ib-isite -+ lexsit(ib,nexsit(ib))=id-isite -+ endif -+ endif -+ -+c id - ic interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(id),mxexcl) -+ if(lexsit(id,jz).eq.ic-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(id)=nexsit(id)+1 -+ nexsit(ic)=nexsit(ic)+1 -+ if(max(nexsit(id),nexsit(ic)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(id),nexsit(ic)) -+ safe=.false. -+ else -+ lexsit(id,nexsit(id))=ic-isite -+ lexsit(ic,nexsit(ic))=id-isite -+ endif -+ endif -+ -+c ia - id interaction -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.id-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(id)=nexsit(id)+1 -+ if(max(nexsit(ia),nexsit(id)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(id)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=id-isite -+ lexsit(id,nexsit(id))=ia-isite -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of core-shell units -+ -+ do i=1,numshl(itmols) -+ -+ ishels=ishels+1 -+ -+ ia=lstshl(ishels,1)+isite -+ ib=lstshl(ishels,2)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib-isite -+ lexsit(ib,nexsit(ib))=ia-isite -+ endif -+ endif -+ -+c exclude sites on basis of bonds to core-shell units -+ -+ ibonds=ibonds-numbonds(itmols) -+ do kk=1,numbonds(itmols) -+ -+ ibonds=ibonds+1 -+ -+ if(keybnd(ibonds).gt.0)then -+ -+ ia1=lstbnd(ibonds,1)+isite -+ ib1=lstbnd(ibonds,2)+isite -+ -+ if(ia.eq.ia1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib1),mxexcl) -+ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib1)=nexsit(ib1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ib1,nexsit(ib1))=ib-isite -+ lexsit(ib,nexsit(ib))=ib1-isite -+ endif -+ endif -+ -+ endif -+ -+ if(ia.eq.ib1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia1),mxexcl) -+ if(lexsit(ia1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia1)=nexsit(ia1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia1,nexsit(ia1))=ib-isite -+ lexsit(ib,nexsit(ib))=ia1-isite -+ endif -+ endif -+ -+ endif -+ -+ if(ib.eq.ia1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib1)=nexsit(ib1)+1 -+ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib1-isite -+ lexsit(ib1,nexsit(ib1))=ia-isite -+ endif -+ endif -+ -+ endif -+ if(ib.eq.ib1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ia1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ia1)=nexsit(ia1)+1 -+ if(max(nexsit(ia),nexsit(ia1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ia1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ia1-isite -+ lexsit(ia1,nexsit(ia1))=ia-isite -+ endif -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of constraint bonds to core-shell units -+ -+ iconst=iconst-numcon(itmols) -+ do kk=1,numcon(itmols) -+ -+ iconst=iconst+1 -+ -+ ia1=lstcon(iconst,1)+isite -+ ib1=lstcon(iconst,2)+isite -+ -+ if(ia.eq.ia1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib1),mxexcl) -+ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib1)=nexsit(ib1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ib1,nexsit(ib1))=ib-isite -+ lexsit(ib,nexsit(ib))=ib1-isite -+ endif -+ endif -+ -+ endif -+ -+ if(ia.eq.ib1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia1),mxexcl) -+ if(lexsit(ia1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia1)=nexsit(ia1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ia1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ia1,nexsit(ia1))=ib-isite -+ lexsit(ib,nexsit(ib))=ia1-isite -+ endif -+ endif -+ -+ endif -+ -+ if(ib.eq.ia1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib1)=nexsit(ib1)+1 -+ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib1-isite -+ lexsit(ib1,nexsit(ib1))=ia-isite -+ endif -+ endif -+ -+ endif -+ if(ib.eq.ib1)then -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ia1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ia1)=nexsit(ia1)+1 -+ if(max(nexsit(ia),nexsit(ia1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ia1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ia1-isite -+ lexsit(ia1,nexsit(ia1))=ia-isite -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+c exclude sites on basis of rigid units involving core or shell -+ -+ igrp=igrp-numgrp(itmols) -+ do kk=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ id=listyp(igrp) -+ -+ do jj=1,numgsit(id) -+ -+ ia1=lstgst(igrp,jj)+isite -+ if(ia1.eq.ia)then -+ -+ do jk=1,numgsit(id) -+ -+ if(jk.ne.jj)then -+ ib1=lstgst(igrp,jk)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ib1),mxexcl) -+ if(lexsit(ib1,jz).eq.ib-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ib1)=nexsit(ib1)+1 -+ nexsit(ib)=nexsit(ib)+1 -+ if(max(nexsit(ib1),nexsit(ib)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ib1),nexsit(ib)) -+ safe=.false. -+ else -+ lexsit(ib1,nexsit(ib1))=ib-isite -+ lexsit(ib,nexsit(ib))=ib1-isite -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ if(ia1.eq.ib)then -+ -+ do jk=1,numgsit(id) -+ -+ if(jk.ne.jj)then -+ ib1=lstgst(igrp,jk)+isite -+ -+c check interaction not already included -+ -+ lchk=.true. -+ do jz=1,min(nexsit(ia),mxexcl) -+ if(lexsit(ia,jz).eq.ib1-isite)lchk=.false. -+ enddo -+ if(lchk)then -+ nexsit(ia)=nexsit(ia)+1 -+ nexsit(ib1)=nexsit(ib1)+1 -+ if(max(nexsit(ia),nexsit(ib1)).gt.mxexcl)then -+ ibig=max(ibig,nexsit(ia),nexsit(ib1)) -+ safe=.false. -+ else -+ lexsit(ia,nexsit(ia))=ib1-isite -+ lexsit(ib1,nexsit(ib1))=ia-isite -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ isite=isite+numsit(itmols) -+ -+ enddo -+ -+ ntpsit=isite -+ -+c check for exceeded array bounds -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)then -+ if(mxnode.gt.1)call gimax(ibig,1,jj) -+ if(idnode.eq.0)write(nrite,*)'mxexcl must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxexcl is currently ',mxexcl -+ call error(idnode,65) -+ endif -+ -+c remove redundant entries from exclusion list -+c (there shouldn't be any!) -+ -+ do i=1,ntpsit -+ -+ nlast=nexsit(i) -+ do j=1,nexsit(i)-1 -+ -+ if(j.lt.nlast)then -+ -+ kk=j -+ do k=j+1,nexsit(i) -+ -+ if(lexsit(i,j).eq.lexsit(i,k))then -+ -+ nlast=nlast-1 -+ lexsit(i,k)=0 -+ -+ else if(lexsit(i,k).gt.0)then -+ -+ kk=kk+1 -+ lexsav=lexsit(i,k) -+ lexsit(i,k)=0 -+ lexsit(i,kk)=lexsav -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ nexsit(i)=nlast -+ -+ enddo -+ -+ -+ return -+ end subroutine exclude -+ -+ subroutine excludeneu(idnode,mxnode,nneut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the excluded pair -+c interaction list of the system to be simulated -+c part 2 - neutral group implementation -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ implicit none -+ -+ logical lchk -+ integer idnode,mxnode,nneut,ibig,iatom,jatom,last,mpm2 -+ integer npm2,m,ii,im,itmols,inoff,isoff,isit,iolsit,jm,jtmols -+ integer jnoff,jsoff,jsit,jolsit,jn1,jno1,jsite,jsite0,in1,ino1 -+ integer jj0,isite,ij,idum,it -+ -+c construct excluded pair list for verlet neighbour correction -+ -+ ibig=0 -+ iatom=0 -+ jatom=0 -+ -+c generate all atomic pairs and check for exclusions -+c with Brode Ahlrichs ordering of groups -+ -+ last=nneut -+ lchk=.true. -+ mpm2=nneut/2+1 -+ npm2=(nneut-1)/2+1 -+ -+c outer loop over groups -+ -+ do m=1,mpm2 -+ -+ if(m.gt.npm2)last=mpm2-1 -+ -+c inner loop over groups - include intragroup interactions -+ -+ ii=0 -+ -+ do im=idnode+1,last,mxnode -+ -+ ii=ii+1 -+ -+c first site in neutral group -+ -+ itmols=1 -+ inoff=0 -+ isoff=0 -+ isit=numsit(itmols)*nummols(itmols) -+ iolsit=numsit(itmols) -+ -+c calculate j group indices -+ -+ jm=im+m-1 -+ if(jm.gt.nneut)jm=jm-nneut -+ -+c inner loop over neutral groups -+ -+ jtmols=1 -+ jnoff=0 -+ jsoff=0 -+ jsit=numsit(jtmols)*nummols(jtmols) -+ jolsit=numsit(jtmols) -+ -+c test first sites in neutral group -+ -+ jatom=neulst(jm) -+ -+c establish pointer to sets -+ -+ do while(jatom.gt.jsit) -+ -+ jtmols=jtmols+1 -+ jnoff=jsit -+ jsoff=jsoff+jolsit -+ jsit=jsit+nummols(jtmols)*numsit(jtmols) -+ jolsit=numsit(jtmols) -+ -+ enddo -+ -+ jn1=jatom-jnoff -+ jno1=(jn1/jolsit)*jolsit -+ jsite=jn1-jno1 -+ if(jsite.eq.0)then -+ jsite=jolsit -+ jno1=jno1-jolsit -+ endif -+ jsite=jsite+jsoff -+ jsite0=jsite-1 -+ -+ do iatom=neulst(im),neulst(im+1)-1 -+ -+c establish pointer to sets -+ -+ do while(iatom.gt.isit) -+ -+ itmols=itmols+1 -+ inoff=isit -+ isoff=isoff+iolsit -+ isit=isit+nummols(itmols)*numsit(itmols) -+ iolsit=numsit(itmols) -+ -+ enddo -+ -+ in1=iatom-inoff -+ ino1=(in1/iolsit)*iolsit -+ isite=in1-ino1 -+ if(isite.eq.0)then -+ isite=iolsit -+ ino1=ino1-iolsit -+ endif -+ isite=isite+isoff -+ -+c test im and jm are neutral groups on same molecule -+ -+ if((jnoff.eq.inoff).and.(ino1.eq.jno1))then -+ if(abs(im-jm).lt.iolsit)then -+ -+ jj0=neulst(jm) -+ jsite=jsite0 -+ -+c special case for im=jm (ie. same group) -+ -+ if(im.eq.jm)then -+ -+ jj0=iatom+1 -+ jsite=isite -+ -+ endif -+ -+c test for excluded interaction -+ -+ do jatom=jj0,neulst(jm+1)-1 -+ -+ jsite=jsite+1 -+ -+ do ij=1,nexsit(isite) -+ -+ if(lexsit(isite,ij).eq.jsite-jsoff)then -+ -+ it=nexatm(ii) -+ -+ if(it+2.gt.mxexcl)then -+ -+ ibig=max(it+2,ibig) -+ nexatm(ii)=it+2 -+ lchk=.false. -+ -+ else -+ -+ lexatm(ii,it+1)=iatom -+ lexatm(ii,it+2)=jatom -+ nexatm(ii)=nexatm(ii)+2 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ endif -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c global check -+ -+ call gstate(lchk) -+ if(.not.lchk)then -+ -+ if(mxnode.gt.1)call gimax(ibig,1,idum) -+ if(idnode.eq.0)write(nrite,*)'mxexcl must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxexcl is currently ',mxexcl -+ call error(idnode,260) -+ -+ endif -+ -+ return -+ end subroutine excludeneu -+ -+ subroutine exclude_link(idnode,mxnode,ntpmls) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the excluded pair -+c interaction list of the system to be simulated -+c -+c part 2 - link cell implementation -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith june 1992 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,ntpmls,iatom,jatom,lsite,ksite -+ integer itmols,imols,isite,kk,newatm,k -+ -+c construct excluded pair list for verlet neighbour correction -+ -+ iatom=0 -+ jatom=0 -+ lsite=0 -+ ksite=0 -+ -+ do itmols=1,ntpmls -+ -+ do imols=1,nummols(itmols) -+ -+ do isite=1,numsit(itmols) -+ -+ iatom=iatom+1 -+ -+ if(mod(iatom-1,mxnode).eq.idnode)then -+ -+ kk=0 -+ jatom=jatom+1 -+ -+ do k=1,nexsit(ksite+isite) -+ -+ newatm=lexsit(ksite+isite,k)+lsite -+ -+ kk=kk+1 -+ lexatm(jatom,kk)=newatm -+ -+ enddo -+ -+ nexatm(jatom)=kk -+ -+ endif -+ -+ enddo -+ -+ lsite=lsite+numsit(itmols) -+ -+ enddo -+ -+ ksite=ksite+numsit(itmols) -+ -+ enddo -+ -+ return -+ end subroutine exclude_link -+ -+ subroutine exclude_atom(idnode,mxnode,natms,ntpmls) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the excluded pair -+c interaction list of the system to be simulated -+c part 2 -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith june 1992 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,ntpmls,iatom,jatom,lsite -+ integer ksite,itmols,isite,imols,k,kk,newatm,j,latom,i,ii -+ -+c construct excluded pair list for verlet neighbour correction -+ -+ iatom=0 -+ jatom=0 -+ lsite=0 -+ ksite=0 -+ -+ do itmols=1,ntpmls -+ -+ do imols=1,nummols(itmols) -+ -+ do isite=1,numsit(itmols) -+ -+ iatom=iatom+1 -+ -+ if(mod(iatom-1,mxnode).eq.idnode)then -+ -+ kk=0 -+ jatom=jatom+1 -+ -+ do k=1,nexsit(ksite+isite) -+ -+ newatm=lexsit(ksite+isite,k)+lsite -+ -+c keep only brode-ahlrichs combinations of indices -+ -+ if(((newatm.gt.iatom).and. -+ x (newatm-iatom.le.natms/2)).or. -+ x ((newatm.lt.iatom).and. -+ x (newatm+natms-iatom.le.(natms-1)/2)))then -+ -+ kk=kk+1 -+ lexatm(jatom,kk)=newatm -+ -+ if(kk.gt.1)then -+ -+c sort the excluded atom list in ascending indices -+ -+ do j=kk,2,-1 -+ -+ if(lexatm(jatom,j).lt.lexatm(jatom,j-1)) -+ x then -+ latom=lexatm(jatom,j) -+ lexatm(jatom,j)=lexatm(jatom,j-1) -+ lexatm(jatom,j-1)=latom -+ endif -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ nexatm(jatom)=kk -+ -+ endif -+ -+ enddo -+ -+ lsite=lsite+numsit(itmols) -+ -+ enddo -+ -+ ksite=ksite+numsit(itmols) -+ -+ enddo -+ -+c final sort into brode-ahlrichs ordering -+ -+ ii=0 -+ do i=1+idnode,natms,mxnode -+ -+ ii=ii+1 -+ do j=1,nexatm(ii) -+ -+ if(lexatm(ii,1).lt.i)then -+ -+ latom=lexatm(ii,1) -+ -+ do k=1,nexatm(ii)-1 -+ -+ lexatm(ii,k)=lexatm(ii,k+1) -+ -+ enddo -+ -+ lexatm(ii,nexatm(ii))=latom -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine exclude_atom -+ -+ subroutine exclude_copy_mtd(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for copying excluded atom arrays into -+c the metadynamics module for use in computing order parameters -+c -+c author - d. quigley April 2012 -+c -+c*********************************************************************** -+ use metafreeze_module, only : mtd_lexatm,mtd_nexatm -+ implicit none -+ integer, parameter :: nnn=2 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c data needed by metadynamics module -+ allocate (mtd_lexatm(msatms,mxexcl),stat=fail(1)) -+ allocate (mtd_nexatm(msatms) ,stat=fail(2)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0) call error(idnode,1012) -+ enddo -+ -+ -+c copy exclude list into metafreeze module -+ mtd_nexatm = nexatm -+ mtd_lexatm = lexatm -+ -+ return -+ end subroutine exclude_copy_mtd -+ -+ end module exclude_module -+ -diff -urN dl_class_1.9.orig/srcmod/external_field_module.f dl_class_1.9/srcmod/external_field_module.f ---- dl_class_1.9.orig/srcmod/external_field_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/external_field_module.f 2014-02-27 13:49:34.000000000 +0100 -@@ -0,0 +1,347 @@ -+ module external_field_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining external field potential arrays -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use parse_module -+ use setup_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmfld(:) -+ -+ save prmfld -+ -+ contains -+ -+ subroutine alloc_fld_arrays(idnode) -+ -+ implicit none -+ -+ integer fail,idnode -+ -+ data fail/0/ -+ -+ allocate (prmfld(mxfld),stat=fail) -+ if(fail.ne.0)call error(idnode,1200) -+ -+ end subroutine alloc_fld_arrays -+ -+ subroutine define_external_field -+ x (safe,lunits,idnode,keyfld,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to define external fields -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c amended - p.-l. chau jun 2009 z-restraint option -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,keyfld,nfld,i,k,idum -+ real(8) engunit -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call strip(record,lenrec) -+ call lowcase(record,lenrec) -+ call copystring(record,message,80) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'elec') then -+ keyfld=1 -+ elseif(keyword(1:4).eq.'oshr') then -+ keyfld=2 -+ elseif(keyword(1:4).eq.'shrx') then -+ keyfld=3 -+ elseif(keyword(1:4).eq.'grav') then -+ keyfld=4 -+ elseif(keyword(1:4).eq.'magn') then -+ keyfld=5 -+ elseif(keyword(1:4).eq.'sphr') then -+ keyfld=6 -+ elseif(keyword(1:4).eq.'zbnd') then -+ keyfld=7 -+ elseif(keyword(1:4).eq.'zres') then -+ keyfld=9 -+ else -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,454) -+ endif -+ -+ do i=1,mxfld -+ prmfld(i)=0.d0 -+ enddo -+ -+ nfld=intstr(record,lenrec,idum) -+ if(nfld.eq.0)nfld=5 -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ do k=1,nfld -+ -+ prmfld(k)=dblstr(record,lenrec,idum) -+ if(idum.gt.lenrec.and.k.lt.nfld)then -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'external field key ',13x,a4, -+ x /,/,30x,'external field parameters')") keyword(1:4) -+ write(nrite,"(2(/,1x,1p,5e15.5))") prmfld -+ -+ endif -+ -+c convert to internal units -+ -+ if(keyfld.eq.1.or.keyfld.eq.4.or.keyfld.eq.5) then -+ -+ if(.not.lunits)call error(idnode,6) -+ -+ do i=1,3 -+ prmfld(i)=prmfld(i)*engunit -+ enddo -+ -+ elseif(keyfld.eq.2.or.keyfld.eq.6.or.keyfld.eq.7) then -+ -+ prmfld(1)=prmfld(1)*engunit -+ -+ elseif(keyfld.eq.9) then -+ -+ prmfld(3)=prmfld(3)*engunit -+ -+ endif -+ -+ return -+ end subroutine define_external_field -+ -+ subroutine extnfld -+ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) -+ -+c*********************************************************************** -+c -+c dl_poly routine for application of an external field -+c -+c replicated data version / block data -+c -+c copyright daresbury laboratory 1993 -+c author - t.forester october 1993 -+c amended - t.forester dec 1994 -+c amended - p.-l. chau jun 2009 z-restraint option -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,keyfld,mxnode,natms,iatm1,iatm2,i,j -+ integer istart,ifinish,numresat -+ real(8) engfld,virfld,rz,rrr,gamma,zdif,totwgt -+ real(8) com(3) -+ -+c energy and virial accumulators -+ -+ engfld=0.d0 -+ virfld=0.d0 -+ -+c block indices -+ -+ iatm1=(idnode*natms)/mxnode+1 -+ iatm2=((idnode+1)*natms)/mxnode -+ -+ if(keyfld.eq.1) then -+ -+c electric field: prmfld(1-3) are field components -+ -+ do i=iatm1,iatm2 -+ -+ fxx(i)=fxx(i)+chge(i)*prmfld(1) -+ fyy(i)=fyy(i)+chge(i)*prmfld(2) -+ fzz(i)=fzz(i)+chge(i)*prmfld(3) -+ -+ enddo -+ -+ elseif(keyfld.eq.2) then -+ -+c oscillating shear: orthorhombic box: Fx=a*cos(b.2.pi.z/L) -+ -+ rz=2.d0*pi/cell(9) -+ -+ do i=iatm1,iatm2 -+ -+ fxx(i)=fxx(i)+prmfld(1)*cos(prmfld(2)*zzz(i)*rz) -+ -+ enddo -+ -+ elseif(keyfld.eq.3.and.imcon.eq.6) then -+ -+c continuous shear of walls : 2D periodic box (imcon=6) -+c shear rate=prmfld(1) angstrom per ps for atoms at -+c abs(z) > prmfld(2) -+ -+ do i=iatm1,iatm2 -+ -+ if(abs(zzz(i)).gt.prmfld(2)) then -+ -+ vxx(i)=0.5d0*sign(prmfld(1),zzz(i)) -+ -+ endif -+ -+ enddo -+ -+ elseif(keyfld.eq.4) then -+ -+c gravitational field: field components given by prmfld(1-3) -+ -+ do i=iatm1,iatm2 -+ -+ fxx(i)=fxx(i)+prmfld(1)*weight(i) -+ fyy(i)=fyy(i)+prmfld(2)*weight(i) -+ fzz(i)=fzz(i)+prmfld(3)*weight(i) -+ -+ enddo -+ -+ elseif(keyfld.eq.5) then -+ -+c magnetic field: field components given by prmfld(1-3) -+ -+ do i=iatm1,iatm2 -+ -+ fxx(i)=fxx(i)+(vyy(i)*prmfld(3)-vzz(i)*prmfld(2)) -+ x *chge(i) -+ fyy(i)=fyy(i)+(vzz(i)*prmfld(1)-vxx(i)*prmfld(3)) -+ x *chge(i) -+ fzz(i)=fzz(i)+(vxx(i)*prmfld(2)-vyy(i)*prmfld(1)) -+ x *chge(i) -+ -+ enddo -+ -+ elseif(keyfld.eq.6) then -+ -+c containing sphere : r^(-n) potential -+ -+ do i=iatm1,iatm2 -+ -+ rrr=sqrt(xxx(i)**2+yyy(i)**2+zzz(i)**2) -+ if(rrr.gt.prmfld(4)) then -+ rrr=prmfld(2)-rrr -+ if(rrr.lt.0.d0) rrr=0.1d0 -+ -+ gamma =prmfld(1)*rrr**(-prmfld(3)) -+ engfld=engfld+gamma -+ -+ gamma=-prmfld(3)*gamma/((prmfld(2)-rrr)*rrr) -+ -+ fxx(i)=fxx(i)+gamma*xxx(i) -+ fyy(i)=fyy(i)+gamma*yyy(i) -+ fzz(i)=fzz(i)+gamma*zzz(i) -+ -+ endif -+ -+ enddo -+ -+ elseif(keyfld.eq.7) then -+ -+c repulsive wall (harmonic) starting at z0 -+ -+ do i=iatm1,iatm2 -+ -+ if(prmfld(3)*zzz(i).gt.prmfld(3)*prmfld(2)) then -+ -+ zdif=zzz(i)-prmfld(2) -+ gamma=-prmfld(1)*zdif -+ -+ fzz(i)=fzz(i)+gamma -+ engfld=engfld-gamma*zdif/2. -+ -+ endif -+ -+ enddo -+ -+ elseif(keyfld.eq.9) then -+ -+c keyfld=9. restrain molecule z-position -+c prmfld(1) is number of first atom of restrained molecule -+c prmfld(2) is number of last atom of restrained molecule -+c prmfld(3) is the restraining constant -+c prmfld(4) is z-min -+c prmfld(5) is z-max -+ -+ istart=nint(prmfld(1)) -+ ifinish=nint(prmfld(2)) -+ numresat=ifinish-istart+1 -+ -+c calculate the centre of mass of the molecule -+ -+ call getcom_mol(istart,ifinish,imcon,idnode,mxnode,totwgt,com) -+ -+c apply restraint force according to location -+ -+ if(com(3).lt.prmfld(4))then -+ -+c if centre of mass is below z-min, activate restraining force -+ -+ do i=istart,ifinish -+ -+ fzz(i)=fzz(i)-prmfld(3)*(weight(i)/totwgt)* -+ x (com(3)-prmfld(4))/mxnode -+ -+ enddo -+ -+ elseif(com(3).gt.prmfld(5))then -+ -+c if centre of mass if above z-max, activate restraining force -+ -+ do i=istart,ifinish -+ -+ fzz(i)=fzz(i)-prmfld(3)*(weight(i)/totwgt)* -+ x (com(3)-prmfld(5))/mxnode -+ -+ enddo -+ -+ endif -+ -+ else -+ -+c unidentified field potential error exit -+ -+ call error(idnode,454) -+ -+ endif -+ -+c global sum of external field potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engfld -+ buffer(2)=virfld -+ call gdsum(buffer(1),2,buffer(3)) -+ engfld=buffer(1) -+ virfld=buffer(2) -+ -+ endif -+ -+ return -+ end subroutine extnfld -+ -+ end module external_field_module -diff -urN dl_class_1.9.orig/srcmod/forces_module.f dl_class_1.9/srcmod/forces_module.f ---- dl_class_1.9.orig/srcmod/forces_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/forces_module.f 2015-11-09 14:15:45.064258843 +0100 -@@ -0,0 +1,2970 @@ -+ module forces_module -+ -+c*********************************************************************** -+c -+c dl_poly module for calculation of atomic forces -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - d. quigley : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use coulomb_module -+ use error_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use four_body_module -+ use hkewald_module -+ use metafreeze_module -+ use metal_module -+ use neu_coul_module -+ use nlist_builders_module -+ use pair_module -+ use property_module -+ use setup_module -+ use solvation_module -+ use spme_module -+ use tersoff_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ contains -+ -+ subroutine force_manager -+ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c********************************************************************* -+c -+c dl_poly subroutine to manage the calculation of the atomic forces -+c from all force field terms. -+c -+c copyright - daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva -+ logical lfree,lghost,llsolva -+ -+ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,numrdf -+ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ntpmet -+ integer i,nospl,multt,nneut,ntbond,ntangl,ntdihd,nsolva,isolva -+ integer ntinv,ntteth,ntshl,ntptbp,ntpfbp,ntpter,keyshl,keyfld -+ -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet -+ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp -+ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang,engdih -+ real(8) virdih,enginv,virinv,engtet,virtet,engshl,virshl,engfld -+ real(8) virfld,fmax,temp,shlke,engcfg,tmpeng,tmpvir,engord,virord -+ -+ llsolva=.false. -+ -+c initialize energy and virial accumulators -+ -+ engbnd=0.d0 -+ virbnd=0.d0 -+ engang=0.d0 -+ virang=0.d0 -+ engdih=0.d0 -+ virdih=0.d0 -+ enginv=0.d0 -+ virinv=0.d0 -+ engtbp=0.d0 -+ virtbp=0.d0 -+ engter=0.d0 -+ virter=0.d0 -+ engfbp=0.d0 -+ virfbp=0.d0 -+ engsrp=0.d0 -+ virsrp=0.d0 -+ engcpe=0.d0 -+ vircpe=0.d0 -+ engfld=0.d0 -+ virfld=0.d0 -+ engshl=0.d0 -+ virshl=0.d0 -+ shlke =0.d0 -+ engtet=0.d0 -+ virtet=0.d0 -+ engmet=0.d0 -+ virmet=0.d0 -+ virord=0.0d0 -+ engord=0.0d0 -+ -+ if(lmetadyn)then -+ -+ eng_loc=0.0d0 -+ vir_loc=0.0d0 -+ fxx_loc(:)=0.0d0 -+ fyy_loc(:)=0.0d0 -+ fzz_loc(:)=0.0d0 -+ stress_loc(:)=0.0d0 -+ -+ endif -+ -+c initialise free energy accumulators -+ -+ if(lfree)then -+ -+ ang_fre=0.d0 -+ bnd_fre=0.d0 -+ dih_fre=0.d0 -+ inv_fre=0.d0 -+ tbp_fre=0.d0 -+ fbp_fre=0.d0 -+ cou_fre=0.d0 -+ vdw_fre=0.d0 -+ shl_fre=0.d0 -+ ang_vir=0.d0 -+ bnd_vir=0.d0 -+ dih_vir=0.d0 -+ inv_vir=0.d0 -+ tbp_vir=0.d0 -+ fbp_vir=0.d0 -+ cou_vir=0.d0 -+ vdw_vir=0.d0 -+ shl_vir=0.d0 -+ eng_cfg_fre=0.d0 -+ vir_cfg_fre=0.d0 -+ -+ endif -+ -+c initialise solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ if(keyfce/2.gt.0)lcomp(6)=.true. -+ if(mod(keyfce,2).eq.1)lcomp(7)=.true. -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ llsolva=.true. -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c initialise the force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ if(nstep.gt.0)then -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+ endif -+ -+ if(keyfce.gt.0)then -+ -+c calculate pair forces, including coulombic forces -+ -+ if(lnsq)then -+ -+c multiple timestep - all-pairs -+ -+ call multiple_nsq -+ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp) -+ -+ elseif(.not.lneut)then -+ -+c single timestep -+ -+ if(multt.eq.1)then -+ -+ call forces -+ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw, -+ x ntpmet,natms,nstbgr,nstep,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw, -+ x vircpe,virsrp,volm,engmet,virmet) -+ -+ else -+ -+ call multiple -+ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, -+ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, -+ x rvdw,vircpe,virsrp,volm) -+ -+ endif -+ -+ elseif(lneut)then -+ -+c neutral groups -+ -+ if(multt.eq.1)then -+ -+ call forces_neu -+ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, -+ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, -+ x vircpe,virsrp) -+ -+ else -+ -+ call multiple_neu -+ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rprim,rcut,rvdw,alpha,vircpe,virsrp) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c add in long range corrections to energy and pressure -+ -+ engsrp=engsrp+elrc -+ virsrp=virsrp+virlrc -+ engmet=engmet+elrcm(0) -+ virmet=virmet+vlrcm(0) -+ if(lfree)then -+ vdw_fre=vdw_fre+elrc_fre -+ vdw_vir=vdw_vir+vlrc_fre -+ endif -+ -+c calculate three body forces -+ -+ if(ntptbp.gt.0)call thbfrc -+ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcuttb, -+ x engtbp,virtbp) -+ -+c calculate four body forces -+ -+ if(ntpfbp.gt.0)call fbpfrc -+ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcutfb, -+ x engfbp,virfbp) -+ -+c calculate tersoff potential forces -+ -+ if(ntpter.gt.0)call tersoff -+ x (idnode,mxnode,natms,imcon,rctter,engter,virter) -+ -+c calculate bond forces -+ -+ if(ntbond.gt.0)call bndfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntbond,epsq, -+ x engbnd,virbnd) -+ -+c calculate valence angle forces -+ -+ if(ntangl.gt.0)call angfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntangl,engang,virang) -+ -+c calculate dihedral forces -+ -+ if(ntdihd.gt.0)call dihfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntdihd,keyfce,dlrpot, -+ x epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe,virdih,virsrp) -+ -+c calculate inversion forces -+ -+ if(ntinv.gt.0)call invfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntinv,enginv,virinv) -+ -+c calculate tethered atom forces -+ -+ if(ntteth.gt.0)call tethfrc -+ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) -+ -+c calculate shell model forces -+ -+ if(keyshl.gt.0)call shlfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntshl,engshl,virshl) -+ -+c external field -+ -+ if(keyfld.gt.0)call extnfld -+ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) -+ -+c metadynamics option : use potential energy as order parameter -+ -+ if(lmetadyn)then -+ -+ tmpeng=engsrp+engcpe+engbnd+engang+engdih+engfld+ -+ x engtbp+engfbp+engshl+enginv+engter+engmet -+ -+ tmpvir=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet -+ -+ call metafreeze_driver -+ x (imcon,natms,temp,nstep,tmpeng,tmpvir,engord,virord) -+ -+ endif -+ -+c global summation of force arrays (basic replicated data strategy) -+ -+ call global_sum_forces(natms,mxnode,fxx,fyy,fzz) -+ -+c global sum of stress arrays -+ -+ if(mxnode.gt.1)call gdsum(stress,9,buffer) -+ -+c add long range correction to diagonal terms of stress tensor -+ -+ stress(1)=stress(1)-(virlrc+vlrcm(0))/3.d0 -+ stress(5)=stress(5)-(virlrc+vlrcm(0))/3.d0 -+ stress(9)=stress(9)-(virlrc+vlrcm(0))/3.d0 -+ -+c cap forces in equilibration mode -+ -+ if(nstep.le.nsteql.and.lfcap) -+ x call fcap(lfcap,natms,fmax,temp) -+ -+c total configuration energy -+ -+ engcfg=engsrp+engcpe+engbnd+engang+engdih+engfld+engtbp+ -+ x engfbp+engshl+enginv+engter+engmet -+ -+c PLUMED modifications -+ if(lplumed)then -+ call plumed_f_gcmd("setStep"//char(0),nstep) -+ call plumed_f_gcmd("setMasses"//char(0),weight) -+ call plumed_f_gcmd("setCharges"//char(0),chge) -+ call plumed_f_gcmd("setPositionsX"//char(0),xxx) -+ call plumed_f_gcmd("setPositionsY"//char(0),yyy) -+ call plumed_f_gcmd("setPositionsZ"//char(0),zzz) -+ call plumed_f_gcmd("setBox"//char(0),cell) -+ call plumed_f_gcmd("setEnergy"//char(0),engcfg) -+ call plumed_f_gcmd("setForcesX"//char(0),fxx) -+ call plumed_f_gcmd("setForcesY"//char(0),fyy) -+ call plumed_f_gcmd("setForcesZ"//char(0),fzz) -+ call plumed_f_gcmd("setVirial"//char(0),stress) -+ call plumed_f_gcmd("calc"//char(0) ) -+ endif -+c PLUMED modifications -+ -+c total derivative of the configurational free energy -+ -+ if(lfree)then -+ -+ eng_cfg_fre=dlambda*(ang_fre+bnd_fre+dih_fre+inv_fre+ -+ x tbp_fre+fbp_fre+cou_fre+vdw_fre+shl_fre) -+ vir_cfg_fre=dlambda*(ang_vir+bnd_vir+dih_vir+inv_vir+ -+ x tbp_vir+fbp_vir+cou_vir+vdw_vir+shl_vir) -+ -+ endif -+ -+c sum solvation and excitation energies for pair forces -+ -+ if(mxnode.gt.1)then -+ -+ if(llsolva)then -+ -+ call gdsum(vdw_sol,mxtmls_sol2,buffer) -+ call gdsum(cou_sol,mxtmls_sol2,buffer) -+ -+ if(lghost)then -+ -+ call gdsum(vdw_exc,mxtmls_exc2,buffer) -+ call gdsum(cou_exc,mxtmls_exc2,buffer) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c add long range corrections to solvation terms -+ -+ if(lsolva)then -+ -+ vdw_sol(:)=vdw_sol(:)+elrc_sol(:) -+ if(lghost)vdw_exc(:)=vdw_exc(:)+elrc_exc(:) -+ -+ endif -+ -+ return -+ end subroutine force_manager -+ -+ subroutine forces -+ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw,ntpmet,natms, -+ x nstbgr,nstep,nsteql,numrdf,nospl,nsolva,isolva,alpha,dlrpot, -+ x drewd,engcpe,engsrp,epsq,rcut,rvdw,vircpe,virsrp,volm,engmet, -+ x virmet) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c amended - t. forester sept 1994 -+c amended - w. smith june 1995 for metal potentials -+c -+c key: -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ Ewald sum : ewald1,2,3 -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ truncated and shifted coulombic : coul4 -+c = 10,11 ----- reaction field : coul3 -+c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3] -+c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzeql,loglnk,lewald,lspme,lhke,newjob,lcshft,safe -+ logical lsolva,lfree,lghost,llsolva -+ -+ integer idnode,imcon,keyfce,kmax1,kmax2,kmax3,nhko,nlatt -+ integer mxnode,ntpvdw,natms,nstbgr,nstep,nsteql,numrdf -+ integer ntpmet,nospl,nsolva,isolva,i,j,k,ii -+ -+ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw,eps -+ real(8) vircpe,virsrp,volm,engacc,engac1,viracc,engmet,virmet -+ -+ save newjob -+ -+ data newjob/.true./ -+ -+ safe=.true. -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ lhke=(keyfce/2.eq.7) -+ lspme=(keyfce/2.eq.6) -+ lewald=(keyfce/2.eq.1) -+ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) -+ -+c create ewald interpolation arrays -+ -+ if(newjob)then -+ -+ if(lhke)then -+ -+ call hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) -+ -+ else if(lewald.or.lspme.or.lcshft)then -+ -+ call erfcgen(alpha,drewd,rcut) -+ -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+c initialise force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c calculate local density in metals -+ -+ if(ntpmet.gt.0)then -+ -+ call metdens -+ x (idnode,imcon,mxnode,natms,engmet,virmet) -+ -+ stress(1)=stress(1)-virmet/3.d0 -+ stress(5)=stress(5)-virmet/3.d0 -+ stress(9)=stress(9)-virmet/3.d0 -+ -+ endif -+ -+c fourier contribution to coulombic forces in Ewald sum -+ -+ if(lewald)then -+ -+ call ewald1 -+ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, -+ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) -+ -+ engcpe=engcpe+engac1 -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c hautman-klein-ewald method -+ -+ if(lhke)then -+ -+c fourier terms of hk-ewald -+ -+ call hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engacc,viracc,alpha,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+c real space terms of hk-ewald -+ -+ call hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engacc,viracc, -+ x drewd,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c smoothed particle mesh ewald -+ -+ if(lspme)then -+ -+ call ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engac1,viracc,alpha,volm,epsq) -+ -+ engcpe=engcpe+engac1 -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c outer loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ ilist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) -+ -+c square of distances -+ -+ do k=1,lentry(ii) -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c calculate metal forces and potential -+ -+ if(ntpmet.gt.0)then -+ -+ call metfrc(safe,i,lentry(ii),engacc,viracc) -+ -+ engmet=engmet+engacc -+ virmet=virmet+viracc -+ -+ endif -+ -+c calculate short range force and potential terms -+ -+ if(ntpvdw.gt.0.and.mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc, -+ x rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme)then -+ -+ call ewald2(llsolva,lfree,lghost,i,lentry(ii),engacc, -+ x viracc,drewd,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions -+ -+ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then -+ -+ if(mod(nstep,nstbgr).eq.0)then -+ -+ call rdf0(i,lentry(ii),rcut) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c check metal interpolation is safe -+ -+ if(ntpmet.gt.0)then -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,142) -+ -+ endif -+ -+c calculate corrections for intramolecular coulomb terms in -+c Ewald sum -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ eps=epsq -+ if(loglnk)eps=eps*2.0d0 -+ -+c outer loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,nexatm(ii) -+ -+ j=lexatm(ii,k) -+ jlist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) -+ -+c calculate correction terms -+ -+ if(lhke)then -+ -+ call hkewald3(i,ii,engacc,viracc,eps) -+ -+ else -+ -+ call ewald3 -+ x (llsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) -+ -+ endif -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ enddo -+ -+ endif -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then -+ -+ if(mod(nstep,nstbgr).eq.0)then -+ -+ numrdf=numrdf+1 -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=engmet -+ buffer(6)=virmet -+ buffer(7)=vdw_fre -+ buffer(8)=cou_fre -+ buffer(9)=vdw_vir -+ buffer(10)=cou_vir -+ call gdsum(buffer(1),10,buffer(11)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ engmet=buffer(5) -+ virmet=buffer(6) -+ vdw_fre=buffer(7) -+ cou_fre=buffer(8) -+ vdw_vir=buffer(9) -+ cou_vir=buffer(10) -+ -+ endif -+ -+ return -+ end subroutine forces -+ -+ subroutine forces_neu -+ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, -+ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, -+ x vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c neutral group implemenation - no Ewald sum option -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c -+c modified - t. forester april 1993 -+c key: -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ invalid -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ invalid -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzeql,newlst,lchk,lsolva,lfree,lghost,llsolva -+ -+ integer idnode,imcon,keyfce,mxnode,natms,nneut,nstbgr -+ integer nstep,nsteql,numrdf,i,fail,jneu,jj0,jj1,j -+ integer ibig,ia,ineu,isn,ik,nsolva,isolva -+ real(8) dlrpot,engcpe,engsrp,epsq,rcut,rvdw,vircpe -+ real(8) virsrp,engacc,viracc,anorm,alpha -+ -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ -+ dimension fail(2) -+ -+ data fail/0,0/ -+ -+c allocate working arrays -+ -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ do i=1,2 -+ if(fail(i).ne.0)call error(idnode,1820) -+ enddo -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c initialise force and stress arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c initialise energy and virial accumulators -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c intra group vectors com -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-xxx(jj0) -+ tyy(j)=yyy(j)-yyy(jj0) -+ tzz(j)=zzz(j)-zzz(jj0) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,natms,cell,txx,tyy,tzz) -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ xxx(j)=txx(j)+xxx(jj0) -+ yyy(j)=tyy(j)+yyy(jj0) -+ zzz(j)=tzz(j)+zzz(jj0) -+ -+ enddo -+ -+c centre of molecule -+ -+ uxx(jneu)=0.d0 -+ uyy(jneu)=0.d0 -+ uzz(jneu)=0.d0 -+ anorm=1.d0/dble(jj1-jj0+1) -+ -+ do j=jj0,jj1 -+ -+ uxx(jneu)=uxx(jneu)+xxx(j)*anorm -+ uyy(jneu)=uyy(jneu)+yyy(j)*anorm -+ uzz(jneu)=uzz(jneu)+zzz(j)*anorm -+ -+ enddo -+ -+c vector from site to geometric centre -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-uxx(jneu) -+ tyy(j)=yyy(j)-uyy(jneu) -+ tzz(j)=zzz(j)-uzz(jneu) -+ -+ enddo -+ -+ enddo -+ -+c outer loop over neutral groups -+ -+ lchk=.true. -+ ibig=0 -+ ia=0 -+ -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ newlst=.true. -+ -+ isn=1 -+ call neutlst -+ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrceneu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions -+ -+ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. -+ x mod(nstep,nstbgr).eq.0)then -+ -+ call rdf0neu(ik,rcut) -+ -+ endif -+ -+ enddo -+ -+c check on validity of call to neutlst -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ if(.not.lchk)then -+ call gimax(ibig,1,i) -+ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf -+ call error(idnode,478) -+ endif -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) -+ -+c counter for rdf statistics outside loop structure -+ -+ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. -+ x mod(nstep,nstbgr).eq.0)numrdf=numrdf+1 -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,stat=fail(2)) -+ -+ return -+ end subroutine forces_neu -+ -+ subroutine multiple -+ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, -+ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, -+ x rvdw,vircpe,virsrp,volm) -+c*************************************************************************** -+c -+c dl_poly subroutine for multiple time step algorithm -+c reciprocal space calculated on long time steps. -+c -+c copyright daresbury laboratory -+c -+c author t. forester, may 1993 -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ Ewald sum : ewald1,2,3,4 -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ truncated and shifted coulombic : coul4 -+c = 10,11 ----- reaction field : coul3 -+c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3,4] -+c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3,4 -+c -+c**************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=5 -+ -+ logical newplst,newlst,lgofr,lzeql,lgr,loglnk,lewald,lspme -+ logical lhke,newjob,lcshft,lsolva,lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt -+ integer mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,fail -+ integer numlsts,i,nstep0,nsolva,isolva,ii,k,j,ik -+ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,volm,stresp,engcpl,engacc,viracc,engac1 -+ real(8) vircpl,eps,ann,engsr1,viracl,engsrl,virsrl,virac2,engcp1 -+ real(8) vircp1,engacl,engac2,virsr1 -+ -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension stresp(9),fail(nnn) -+ -+ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 -+ save engsr1,virsr1,stresp,fpx,fpy,fpz,newjob -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data newjob/.true./ -+ data numlsts/-1/ -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ lhke=(keyfce/2.eq.7) -+ lspme=(keyfce/2.eq.6) -+ lewald=(keyfce/2.eq.1) -+ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) -+ if(newlst)nstep0=nstep -+ newplst=(newlst).or.(mod(nstep-nstep0,multt).eq.0) -+ -+c allocate working arrays -+ -+ if(newjob)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) -+ endif -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1840) -+ enddo -+ -+ endif -+ -+c create ewald interpolation arrays -+ -+ if(newjob)then -+ -+ if(lspme.or.lewald.or.lcshft)then -+ -+ call erfcgen(alpha,drewd,rcut) -+ -+ endif -+ -+ endif -+ -+ newjob=.false. -+ -+c divide neighbour list into primary and secondary neighbours -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call primlst(idnode,mxnode,natms,imcon,rprim) -+ -+ endif -+ -+c flag for accumulating rdfs -+ -+ lgr=.false. -+ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) -+ lgr=(lgr.and.(newplst.and.lgofr)) -+ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) -+ -+c zero force and stress arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c ********************PROCESS SECONDARY NEIGHBOURS****************** -+ -+ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then -+ -+c zero accumulators -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ engsrl=0.d0 -+ virsrl=0.d0 -+ llsolva=lsolva -+ if(lsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate fourier contribution to secondary coulombic forces -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ if(lewald)then -+ -+ call ewald1 -+ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, -+ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) -+ -+c hautman-klein-ewald method -+ -+ elseif(lhke)then -+ -+ call hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engac1,viracc,alpha,epsq) -+ -+c real space terms of hk-ewald -+ -+ call hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engac2, -+ x virac2,drewd,rcut,epsq) -+ -+ engac1=engac1+engac2 -+ viracc=viracc+virac2 -+ -+ elseif(lspme)then -+ -+c smoothed particle mesh ewald -+ -+ call ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engac1,viracc,alpha,volm,epsq) -+ -+ endif -+ -+ engcpl=engcpl+engac1 -+ vircpl=vircpl+viracc -+ -+c calculate corrections for intramolecular coulomb terms in -+c Ewald sum -+c note: if using link cells - have double counted excluded -+c interactions use temporary adjustment to relative dielectric -+c constant -+ -+ eps=epsq -+ if(loglnk)eps=epsq*2.0d0 -+ -+c calculate self interaction corrections for fourier contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,nexatm(ii) -+ -+ j=lexatm(ii,k) -+ jlist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) -+ -+c calculate correction terms -+ -+ if(lhke)then -+ -+ call hkewald3(i,ii,engacc,viracc,eps) -+ -+ else -+ -+ call ewald3 -+ x (lsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) -+ -+ endif -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ enddo -+ -+ endif -+ -+c calculate pair contributions to secondary neighbour forces -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of distance -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrl=engsrl+engacc -+ virsrl=virsrl+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme)then -+ -+ call ewald2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,drewd,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ endif -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ flx(i)=fxx(i) -+ fly(i)=fyy(i) -+ flz(i)=fzz(i) -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stress(i) -+ stress(i)=0.d0 -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol(:) -+ cou_sol_lng(:)=cou_sol(:) -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc(:) -+ cou_exc_lng(:)=cou_exc(:) -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c calculate pair force contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=-list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of distance -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ if(newplst.or. -+ x (mod(nstep-nstep0,multt).le.1))then -+ -+ if(lhke)then -+ -+ call hkewald4(i,ik,engacc,viracc,engacl,viracl,rcut,epsq) -+ -+ else -+ -+ call ewald4 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,engacl,viracl, -+ x drewd,rcut,epsq) -+ -+ endif -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ engcpl=engcpl+engacl -+ vircpl=vircpl+viracl -+ -+ else -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+ enddo -+ -+c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary neighbour contributions to force, energy etc -+ -+ if(newplst)then -+ -+ do i=1,natms -+ -+ fpx(i)=flx(i) -+ fpy(i)=fly(i) -+ fpz(i)=flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stresl(i) -+ enddo -+ -+ engsr1=engsrl -+ virsr1=virsrl -+ engcp1=engcpl -+ vircp1=vircpl -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol_lng(:) -+ cou_sol_put(:)=cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc_lng(:) -+ cou_exc_put(:)=cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c calculate force increments etc -+ -+ if(mod(nstep-nstep0,multt).eq.1)then -+ -+ do i=1,natms -+ -+ flx(i)=flx(i)-fpx(i) -+ fly(i)=fly(i)-fpy(i) -+ flz(i)=flz(i)-fpz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stresl(i)-stresp(i) -+ enddo -+ -+ virsrl=virsrl-virsr1 -+ engsrl=engsrl-engsr1 -+ vircpl=vircpl-vircp1 -+ engcpl=engcpl-engcp1 -+ -+c solvation and excitation increments -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) -+ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) -+ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c extrapolate long range terms -+ -+ ann=dble(mod(nstep-nstep0,multt)) -+ -+ do i=1,natms -+ -+ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) -+ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) -+ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresp(i)+stresl(i)*ann -+ enddo -+ -+ engsrp=engsr1+engsrl*ann+engsrp -+ virsrp=virsr1+virsrl*ann+virsrp -+ engcpe=engcp1+engcpl*ann+engcpe -+ vircpe=vircp1+vircpl*ann+vircpe -+ -+c solvation and excitation extrapolation -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) -+ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) -+ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+ return -+ end subroutine multiple -+ -+ subroutine multiple_neu -+ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rprim,rcut,rvdw,alpha,vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c neutral group implemenation - no Ewald sum option -+c multiple timestep option -+c -+c parallel replicated data version -+c -+c fpx,fpy,fpz : forces from electrostatics fron rprim < r <= rcut -+c fxx,fyy,fzz : total force -+c -+c copyright daresbury laboratory april 1994 -+c author - t. forester april 1993 -+c key: -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ invalid -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ invalid -+c = 10,11 ----- reaction field : coul3 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical lgofr,lzeql,newlst,newplst,lgr,lchk,newjob,lsolva -+ logical lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,multt,mxnode,natms,nneut,nstbgr -+ integer nstep,nsteql,numrdf,fail,i,numlsts,jneu,jj0,j -+ integer jj1,ineu,ia,isn,ibig,ik,nstep0,nsolva,isolva -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rprim,rcut,rvdw,vircpe -+ real(8) virsrp,engcpl,vircpl,engsrl,virsrl,anorm,ann,stresp -+ real(8) engacc,viracc,engsr1,virsr1,engcp1,vircp1,alpha -+ -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension fail(nnn),stresp(9) -+ -+ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 -+ save engsr1,virsr1,stresp,fpx,fpy,fpz -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data newjob/.true./ -+ data numlsts/-1/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ if(newjob)then -+ -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(3)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(4)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(5)) -+ -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(6)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(7)) -+ endif -+ -+ endif -+ newjob=.false. -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1850) -+ enddo -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c error if ewald sum requested -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) -+ -+c create list of primary and secondary neighbours -+ -+ if(newlst)nstep0=nstep -+ newplst=(mod(nstep-nstep0,multt).eq.0) -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) -+ -+ endif -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c zero force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress arrays -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c flag for accumulating rdfs -+ -+ lgr=.false. -+ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) -+ lgr=(lgr.and.(newplst.and.lgofr)) -+ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) -+ -+c intra group vectors com -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-xxx(jj0) -+ tyy(j)=yyy(j)-yyy(jj0) -+ tzz(j)=zzz(j)-zzz(jj0) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,natms,cell,txx,tyy,tzz) -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ xxx(j)=txx(j)+xxx(jj0) -+ yyy(j)=tyy(j)+yyy(jj0) -+ zzz(j)=tzz(j)+zzz(jj0) -+ -+ enddo -+ -+c centre of molecule -+ -+ uxx(jneu)=0.d0 -+ uyy(jneu)=0.d0 -+ uzz(jneu)=0.d0 -+ anorm=1.d0/dble(jj1-jj0+1) -+ -+ do j=jj0,jj1 -+ -+ uxx(jneu)=uxx(jneu)+xxx(j)*anorm -+ uyy(jneu)=uyy(jneu)+yyy(j)*anorm -+ uzz(jneu)=uzz(jneu)+zzz(j)*anorm -+ -+ enddo -+ -+c vector from site to geometric centre -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-uxx(jneu) -+ tyy(j)=yyy(j)-uyy(jneu) -+ tzz(j)=zzz(j)-uzz(jneu) -+ -+ enddo -+ -+ enddo -+ -+c ********************PROCESS SECONDARY NEIGHBOURS******************** -+ -+ lchk=.true. -+ ibig=0 -+ ia=0 -+ -+ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then -+ -+c zero accumulators for secondary neighbour energies and virial -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ engsrl=0.d0 -+ virsrl=0.d0 -+ -+c initialise solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c outer loop over neutral groups -+ -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ isn=-1 -+ call neutlst -+ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1.and.(rvdw.gt.rprim-delr))then -+ -+ call srfrceneu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrl=engsrl+engacc -+ virsrl=virsrl+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ else -+ -+ call error(idnode,250) -+ -+ endif -+ -+c accumulate radial distribution functions out to rcut -+ -+ if(lgr)then -+ call rdf0neu(ik,rcut) -+ endif -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ flx(i)=fxx(i) -+ fly(i)=fyy(i) -+ flz(i)=fzz(i) -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ -+ stresl(i)=stress(i) -+ stress(i)=0.d0 -+ -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol(:) -+ cou_sol_lng(:)=cou_sol(:) -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc(:) -+ cou_exc_lng(:)=cou_exc(:) -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+ ia=0 -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ isn=1 -+ call neutlst -+ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrceneu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions out to rcut -+ -+ if(lgr)then -+ call rdf0neu(ik,rcut) -+ endif -+ -+ enddo -+ -+c ******************END OF PRIMARY NEIGHBOUR PROCESSING************* -+ -+c check on validity of call to neutlst -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ if(.not.lchk)then -+ call gimax(ibig,1,i) -+ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf -+ call error(idnode,479) -+ endif -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary neighbour contributions to force, energy etc -+ -+ if(newplst)then -+ -+ do i=1,natms -+ -+ fpx(i)=flx(i) -+ fpy(i)=fly(i) -+ fpz(i)=flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stresl(i) -+ enddo -+ -+ engsr1=engsrl -+ virsr1=virsrl -+ engcp1=engcpl -+ vircp1=vircpl -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol_lng(:) -+ cou_sol_put(:)=cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc_lng(:) -+ cou_exc_put(:)=cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c calculate force increments etc -+ -+ if(mod(nstep-nstep0,multt).eq.1)then -+ -+ do i=1,natms -+ -+ flx(i)=flx(i)-fpx(i) -+ fly(i)=fly(i)-fpy(i) -+ flz(i)=flz(i)-fpz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stresl(i)-stresp(i) -+ enddo -+ -+ virsrl=virsrl-virsr1 -+ engsrl=engsrl-engsr1 -+ vircpl=vircpl-vircp1 -+ engcpl=engcpl-engcp1 -+ -+c solvation and excitation increments -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) -+ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) -+ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c extrapolate long range terms -+ -+ ann=dble(mod(nstep-nstep0,multt)) -+ -+ do i=1,natms -+ -+ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) -+ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) -+ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresl(i)*ann+stresp(i) -+ enddo -+ -+ engsrp=engsr1+engsrl*ann+engsrp -+ virsrp=virsr1+virsrl*ann+virsrp -+ engcpe=engcp1+engcpl*ann+engcpe -+ vircpe=vircp1+vircpl*ann+vircpe -+ -+c solvation and excitation extrapolation -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) -+ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) -+ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (txx,tyy,tzz,uxx,uyy,uzz,stat=fail(1)) -+ -+ return -+ end subroutine multiple_neu -+ -+ subroutine multiple_nsq -+ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for multiple time step algorithm -+c to be used with all-pairs option -+c -+c flx,fly,flz : forces from electrostatics from r > rcut -+c fpx,fpy,fpz : forces from electrostatics from rprim < r <= rcut -+c fxx,fyy,fzz : total force -+c -+c copyright daresbury laboratory 1993 -+c -+c author t. forester, may 1993 -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c Ewald sum --- not used -+c = 4,5 ------ Distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c truncated and shifted coulombic -- not used -+c reaction field - not used -+c -+c**************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=5 -+ logical newplst,newlst,lgofr,lzeql,lgr,lnsq,newjob,lsolva -+ logical lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,multt,mxnode,natms,nstep,nstbgr -+ integer nsteql,numrdf,fail,nstep0,ii,ik,k,numlsts,nsolva -+ integer isolva,i,j -+ real(8) delr,dlrpot,engcpe,engsrp,engcp3,epsq,rcut -+ real(8) rprim,rvdw,vircpe,virsrp,vircp3,rcut1,engcp2,vircp2 -+ real(8) engsr2,virsr2,stresp,engacc,viracc -+ -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension stresp(9),fail(nnn) -+ -+ save engsr2,virsr2,engcp2,vircp2,nstep0,numlsts,stresp,fpx,fpy,fpz -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data numlsts/-1/ -+ data newjob/.true./ -+ -+c allocate work arrays -+ -+ if(newjob)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) -+ endif -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1860) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+ if(lnsq)then -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c divide neighbour list into primary and secondary neighbours -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call primlst(idnode,mxnode,natms,imcon,rprim) -+ -+ endif -+ -+c flag for accumulating rdfs -+ -+ lgr=(lgofr.and.(.not.lzeql.or.(nstep-nsteql.gt.0))) -+ lgr=(lgr.and.newplst.and.(mod(numlsts,nstbgr).eq.0)) -+ -+c set extended cutoff for electrostatics - secondary shell -+ -+ rcut1=rcut+delr -+ -+ if(newlst)nstep0=nstep -+ newplst=(newlst.or.mod(nstep-nstep0,multt).eq.0) -+ -+c ********************PROCESS TERTIARY NEIGHBOURS********************* -+ -+ if(newplst)then -+ -+ call coul_nsq -+ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, -+ x engcp3,vircp3) -+ -+ endif -+ -+c ****************END OF TERTIARY NEIGHBOUR PROCESSING************** -+ -+c ********************PROCESS SECONDARY NEIGHBOURS******************** -+ -+ if(newplst)then -+ -+c zero accumulators for secondary neighbour energies and virial -+ -+ engcp2=0.d0 -+ vircp2=0.d0 -+ engsr2=0.d0 -+ virsr2=0.d0 -+ -+c zero secondary forces -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+ ii=0 -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic vectors -+ -+ ik=0 -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary condition only for interactions > rprim -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of interatomic distances -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c short range forces for secondary shell -+ -+ if((mod(keyfce,2).eq.1).and.(rvdw.gt.rprim-delr))then -+ -+ call srfrce -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsr2=engsr2+engacc -+ virsr2=virsr2+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then -+ -+ call error(idnode,424) -+ -+ elseif(keyfce/2.eq.2)then -+ -+c distance dependent dielectric -+ -+ call coul2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) -+ -+ engcp2=engcp2+engacc -+ vircp2=vircp2+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+c coulombic potential -+ -+ call coul0 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) -+ -+ engcp2=engcp2+engacc -+ vircp2=vircp2+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+c truncated shifted coulombic potential -+ -+ call error(idnode,424) -+ -+ endif -+ -+c accumulate radial distribution functions : out to rcut -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ fpx(i)=fxx(i) -+ fpy(i)=fyy(i) -+ fpz(i)=fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stress(i) -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol(:) -+ cou_sol_put(:)=cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc(:) -+ cou_exc_put(:)=cou_exc(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c zero primary forces -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c zero solvation and excitation arrays -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate primary pair force contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=-list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of interatomic distances -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions : out to rcut -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then -+ -+ call error(idnode,424) -+ -+ elseif(keyfce/2.eq.2)then -+ -+c distance dependent dielectric -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+c coulombic potential -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,424) -+ -+ endif -+ -+ enddo -+ -+c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary and tertiary neighbour contributions to -+c force, energy etc -+ -+ do i=1,natms -+ -+ fxx(i)=fxx(i)+fpx(i)+flx(i) -+ fyy(i)=fyy(i)+fpy(i)+fly(i) -+ fzz(i)=fzz(i)+fpz(i)+flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresp(i) -+ enddo -+ -+ engsrp=engsrp+engsr2 -+ virsrp=virsrp+virsr2 -+ -+ engcpe=engcpe+engcp2+engcp3 -+ vircpe=vircpe+vircp2+vircp3 -+ -+c calculate solvation and excitation arrays -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol(:)+vdw_sol_put(:)+vdw_sol_lng(:) -+ cou_sol(:)=cou_sol(:)+cou_sol_put(:)+cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc(:)+vdw_exc_put(:)+vdw_exc_lng(:) -+ cou_exc(:)=cou_exc(:)+cou_exc_put(:)+cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine multiple_nsq -+ -+ subroutine neutlst -+ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ll, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c*********************************************************************** -+c -+c dlpoly routine to create pair lists for neutral group -+c implementations. -+c loops over group ineu -+c -+c replicated data version -+c -+c copyright daresbury laboratory 1994 -+c author t.forester march 1994 -+c -+c isn = -1 => secondary neighbours -+c isn = 1 => primary neighbours - must contain excld interactions -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newlst,lchk,lexc -+ integer isn,imcon,idnode,ineu,ia,ll,i,jj,jj0,jj1 -+ integer fail,ibig,keyexc,lenia,j,jneu,in0,in1 -+ real(8) txx,tyy,tzz,uxx,uyy,uzz -+ -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1830) -+ -+ if(newlst)then -+ -+ ibig=0 -+ -+c set cutoff radius -+ -+ ll=0 -+ -+c number of excludes found -+ -+ if(isn.lt.0)then -+ keyexc=nexatm(ia)+2 -+ else -+ keyexc=1 -+ endif -+ -+c do centre - centre distances -+ -+ lenia=lentry(ia) -+ -+ do j=1,lenia -+ -+ jneu=abs(list(ia,j)) -+ xxt(j)=uxx(ineu)-uxx(jneu) -+ yyt(j)=uyy(ineu)-uyy(jneu) -+ zzt(j)=uzz(ineu)-uzz(jneu) -+ -+ enddo -+ -+ call images(imcon,0,1,lenia,cell,xxt,yyt,zzt) -+ -+c working intragroup vectors of central group -+c - for periodic boundaries -+ -+ in0=neulst(ineu) -+ in1=neulst(ineu+1)-1 -+ -+c loop over neutral groups sites of a -+ -+ -+c loop over groups in list -+ -+ do jj=1,lentry(ia) -+ -+ jneu=list(ia,jj)*isn -+ -+ if(jneu.gt.0)then -+ -+ do i=in0,in1 -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+ if(ineu.eq.jneu)jj0=i+1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+c reject atoms in excluded pair list -+ -+ lexc=.false. -+ -+ if(keyexc.lt.nexatm(ia))then -+ -+ if(lexatm(ia,keyexc).eq.i)then -+ if(lexatm(ia,keyexc+1).eq.j)then -+ lexc=.true. -+ keyexc=keyexc+2 -+ endif -+ endif -+ -+ endif -+ -+c reject frozen atom pairs -+ -+ if(lstfrz(i).ne.0)then -+ if(lstfrz(j).ne.0)lexc=.true. -+ endif -+ -+ if(.not.lexc)then -+ -+ ll=ll+1 -+ if(ll.le.mxxdf)then -+ -+ xdf(ll)=txx(i)+xxt(jj)-txx(j) -+ ydf(ll)=tyy(i)+yyt(jj)-tyy(j) -+ zdf(ll)=tzz(i)+zzt(jj)-tzz(j) -+ rsqdf(ll)=xdf(ll)**2+ydf(ll)**2+zdf(ll)**2 -+ ilist(ll)=i -+ jlist(ll)=j -+ -+ else -+ -+ lchk=.false. -+ ibig=max(ibig,ll) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail) -+ -+ return -+ end subroutine neutlst -+ -+ end module forces_module -+ -diff -urN dl_class_1.9.orig/srcmod/forces_module.f.preplumed dl_class_1.9/srcmod/forces_module.f.preplumed ---- dl_class_1.9.orig/srcmod/forces_module.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/forces_module.f.preplumed 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,2952 @@ -+ module forces_module -+ -+c*********************************************************************** -+c -+c dl_poly module for calculation of atomic forces -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - d. quigley : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use coulomb_module -+ use error_module -+ use ewald_module -+ use exclude_module -+ use external_field_module -+ use four_body_module -+ use hkewald_module -+ use metafreeze_module -+ use metal_module -+ use neu_coul_module -+ use nlist_builders_module -+ use pair_module -+ use property_module -+ use setup_module -+ use solvation_module -+ use spme_module -+ use tersoff_module -+ use three_body_module -+ use utility_module -+ use vdw_module -+ -+ contains -+ -+ subroutine force_manager -+ x (newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lghost,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c********************************************************************* -+c -+c dl_poly subroutine to manage the calculation of the atomic forces -+c from all force field terms. -+c -+c copyright - daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,lneut,lnsq,lgofr,lzeql,loglnk,lfcap,lsolva -+ logical lfree,lghost,llsolva -+ -+ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,numrdf -+ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ntpmet -+ integer i,nospl,multt,nneut,ntbond,ntangl,ntdihd,nsolva,isolva -+ integer ntinv,ntteth,ntshl,ntptbp,ntpfbp,ntpter,keyshl,keyfld -+ -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet -+ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp -+ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang,engdih -+ real(8) virdih,enginv,virinv,engtet,virtet,engshl,virshl,engfld -+ real(8) virfld,fmax,temp,shlke,engcfg,tmpeng,tmpvir,engord,virord -+ -+ llsolva=.false. -+ -+c initialize energy and virial accumulators -+ -+ engbnd=0.d0 -+ virbnd=0.d0 -+ engang=0.d0 -+ virang=0.d0 -+ engdih=0.d0 -+ virdih=0.d0 -+ enginv=0.d0 -+ virinv=0.d0 -+ engtbp=0.d0 -+ virtbp=0.d0 -+ engter=0.d0 -+ virter=0.d0 -+ engfbp=0.d0 -+ virfbp=0.d0 -+ engsrp=0.d0 -+ virsrp=0.d0 -+ engcpe=0.d0 -+ vircpe=0.d0 -+ engfld=0.d0 -+ virfld=0.d0 -+ engshl=0.d0 -+ virshl=0.d0 -+ shlke =0.d0 -+ engtet=0.d0 -+ virtet=0.d0 -+ engmet=0.d0 -+ virmet=0.d0 -+ virord=0.0d0 -+ engord=0.0d0 -+ -+ if(lmetadyn)then -+ -+ eng_loc=0.0d0 -+ vir_loc=0.0d0 -+ fxx_loc(:)=0.0d0 -+ fyy_loc(:)=0.0d0 -+ fzz_loc(:)=0.0d0 -+ stress_loc(:)=0.0d0 -+ -+ endif -+ -+c initialise free energy accumulators -+ -+ if(lfree)then -+ -+ ang_fre=0.d0 -+ bnd_fre=0.d0 -+ dih_fre=0.d0 -+ inv_fre=0.d0 -+ tbp_fre=0.d0 -+ fbp_fre=0.d0 -+ cou_fre=0.d0 -+ vdw_fre=0.d0 -+ shl_fre=0.d0 -+ ang_vir=0.d0 -+ bnd_vir=0.d0 -+ dih_vir=0.d0 -+ inv_vir=0.d0 -+ tbp_vir=0.d0 -+ fbp_vir=0.d0 -+ cou_vir=0.d0 -+ vdw_vir=0.d0 -+ shl_vir=0.d0 -+ eng_cfg_fre=0.d0 -+ vir_cfg_fre=0.d0 -+ -+ endif -+ -+c initialise solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ if(keyfce/2.gt.0)lcomp(6)=.true. -+ if(mod(keyfce,2).eq.1)lcomp(7)=.true. -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+ llsolva=.true. -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c initialise the force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ if(nstep.gt.0)then -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+ endif -+ -+ if(keyfce.gt.0)then -+ -+c calculate pair forces, including coulombic forces -+ -+ if(lnsq)then -+ -+c multiple timestep - all-pairs -+ -+ call multiple_nsq -+ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp) -+ -+ elseif(.not.lneut)then -+ -+c single timestep -+ -+ if(multt.eq.1)then -+ -+ call forces -+ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw, -+ x ntpmet,natms,nstbgr,nstep,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw, -+ x vircpe,virsrp,volm,engmet,virmet) -+ -+ else -+ -+ call multiple -+ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, -+ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, -+ x rvdw,vircpe,virsrp,volm) -+ -+ endif -+ -+ elseif(lneut)then -+ -+c neutral groups -+ -+ if(multt.eq.1)then -+ -+ call forces_neu -+ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, -+ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, -+ x vircpe,virsrp) -+ -+ else -+ -+ call multiple_neu -+ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rprim,rcut,rvdw,alpha,vircpe,virsrp) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c add in long range corrections to energy and pressure -+ -+ engsrp=engsrp+elrc -+ virsrp=virsrp+virlrc -+ engmet=engmet+elrcm(0) -+ virmet=virmet+vlrcm(0) -+ if(lfree)then -+ vdw_fre=vdw_fre+elrc_fre -+ vdw_vir=vdw_vir+vlrc_fre -+ endif -+ -+c calculate three body forces -+ -+ if(ntptbp.gt.0)call thbfrc -+ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcuttb, -+ x engtbp,virtbp) -+ -+c calculate four body forces -+ -+ if(ntpfbp.gt.0)call fbpfrc -+ x (llsolva,lfree,lghost,idnode,mxnode,natms,imcon,rcutfb, -+ x engfbp,virfbp) -+ -+c calculate tersoff potential forces -+ -+ if(ntpter.gt.0)call tersoff -+ x (idnode,mxnode,natms,imcon,rctter,engter,virter) -+ -+c calculate bond forces -+ -+ if(ntbond.gt.0)call bndfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntbond,epsq, -+ x engbnd,virbnd) -+ -+c calculate valence angle forces -+ -+ if(ntangl.gt.0)call angfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntangl,engang,virang) -+ -+c calculate dihedral forces -+ -+ if(ntdihd.gt.0)call dihfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntdihd,keyfce,dlrpot, -+ x epsq,engcpe,engdih,engsrp,rcut,rvdw,alpha,vircpe,virdih,virsrp) -+ -+c calculate inversion forces -+ -+ if(ntinv.gt.0)call invfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntinv,enginv,virinv) -+ -+c calculate tethered atom forces -+ -+ if(ntteth.gt.0)call tethfrc -+ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) -+ -+c calculate shell model forces -+ -+ if(keyshl.gt.0)call shlfrc -+ x (llsolva,lfree,lghost,idnode,imcon,mxnode,ntshl,engshl,virshl) -+ -+c external field -+ -+ if(keyfld.gt.0)call extnfld -+ x (idnode,imcon,keyfld,mxnode,natms,engfld,virfld) -+ -+c metadynamics option : use potential energy as order parameter -+ -+ if(lmetadyn)then -+ -+ tmpeng=engsrp+engcpe+engbnd+engang+engdih+engfld+ -+ x engtbp+engfbp+engshl+enginv+engter+engmet -+ -+ tmpvir=vircpe+virsrp+virbnd+virtbp+virter+virfld+ -+ x virang+virshl+virtet+virmet -+ -+ call metafreeze_driver -+ x (imcon,natms,temp,nstep,tmpeng,tmpvir,engord,virord) -+ -+ endif -+ -+c global summation of force arrays (basic replicated data strategy) -+ -+ call global_sum_forces(natms,mxnode,fxx,fyy,fzz) -+ -+c global sum of stress arrays -+ -+ if(mxnode.gt.1)call gdsum(stress,9,buffer) -+ -+c add long range correction to diagonal terms of stress tensor -+ -+ stress(1)=stress(1)-(virlrc+vlrcm(0))/3.d0 -+ stress(5)=stress(5)-(virlrc+vlrcm(0))/3.d0 -+ stress(9)=stress(9)-(virlrc+vlrcm(0))/3.d0 -+ -+c cap forces in equilibration mode -+ -+ if(nstep.le.nsteql.and.lfcap) -+ x call fcap(lfcap,natms,fmax,temp) -+ -+c total configuration energy -+ -+ engcfg=engsrp+engcpe+engbnd+engang+engdih+engfld+engtbp+ -+ x engfbp+engshl+enginv+engter+engmet -+ -+c total derivative of the configurational free energy -+ -+ if(lfree)then -+ -+ eng_cfg_fre=dlambda*(ang_fre+bnd_fre+dih_fre+inv_fre+ -+ x tbp_fre+fbp_fre+cou_fre+vdw_fre+shl_fre) -+ vir_cfg_fre=dlambda*(ang_vir+bnd_vir+dih_vir+inv_vir+ -+ x tbp_vir+fbp_vir+cou_vir+vdw_vir+shl_vir) -+ -+ endif -+ -+c sum solvation and excitation energies for pair forces -+ -+ if(mxnode.gt.1)then -+ -+ if(llsolva)then -+ -+ call gdsum(vdw_sol,mxtmls_sol2,buffer) -+ call gdsum(cou_sol,mxtmls_sol2,buffer) -+ -+ if(lghost)then -+ -+ call gdsum(vdw_exc,mxtmls_exc2,buffer) -+ call gdsum(cou_exc,mxtmls_exc2,buffer) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c add long range corrections to solvation terms -+ -+ if(lsolva)then -+ -+ vdw_sol(:)=vdw_sol(:)+elrc_sol(:) -+ if(lghost)vdw_exc(:)=vdw_exc(:)+elrc_exc(:) -+ -+ endif -+ -+ return -+ end subroutine force_manager -+ -+ subroutine forces -+ x (loglnk,lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x kmax1,kmax2,kmax3,nhko,nlatt,mxnode,ntpvdw,ntpmet,natms, -+ x nstbgr,nstep,nsteql,numrdf,nospl,nsolva,isolva,alpha,dlrpot, -+ x drewd,engcpe,engsrp,epsq,rcut,rvdw,vircpe,virsrp,volm,engmet, -+ x virmet) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c amended - t. forester sept 1994 -+c amended - w. smith june 1995 for metal potentials -+c -+c key: -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ Ewald sum : ewald1,2,3 -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ truncated and shifted coulombic : coul4 -+c = 10,11 ----- reaction field : coul3 -+c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3] -+c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzeql,loglnk,lewald,lspme,lhke,newjob,lcshft,safe -+ logical lsolva,lfree,lghost,llsolva -+ -+ integer idnode,imcon,keyfce,kmax1,kmax2,kmax3,nhko,nlatt -+ integer mxnode,ntpvdw,natms,nstbgr,nstep,nsteql,numrdf -+ integer ntpmet,nospl,nsolva,isolva,i,j,k,ii -+ -+ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rvdw,eps -+ real(8) vircpe,virsrp,volm,engacc,engac1,viracc,engmet,virmet -+ -+ save newjob -+ -+ data newjob/.true./ -+ -+ safe=.true. -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ lhke=(keyfce/2.eq.7) -+ lspme=(keyfce/2.eq.6) -+ lewald=(keyfce/2.eq.1) -+ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) -+ -+c create ewald interpolation arrays -+ -+ if(newjob)then -+ -+ if(lhke)then -+ -+ call hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) -+ -+ else if(lewald.or.lspme.or.lcshft)then -+ -+ call erfcgen(alpha,drewd,rcut) -+ -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+c initialise force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c calculate local density in metals -+ -+ if(ntpmet.gt.0)then -+ -+ call metdens -+ x (idnode,imcon,mxnode,natms,engmet,virmet) -+ -+ stress(1)=stress(1)-virmet/3.d0 -+ stress(5)=stress(5)-virmet/3.d0 -+ stress(9)=stress(9)-virmet/3.d0 -+ -+ endif -+ -+c fourier contribution to coulombic forces in Ewald sum -+ -+ if(lewald)then -+ -+ call ewald1 -+ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, -+ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) -+ -+ engcpe=engcpe+engac1 -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c hautman-klein-ewald method -+ -+ if(lhke)then -+ -+c fourier terms of hk-ewald -+ -+ call hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engacc,viracc,alpha,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+c real space terms of hk-ewald -+ -+ call hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engacc,viracc, -+ x drewd,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c smoothed particle mesh ewald -+ -+ if(lspme)then -+ -+ call ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engac1,viracc,alpha,volm,epsq) -+ -+ engcpe=engcpe+engac1 -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c outer loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ ilist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) -+ -+c square of distances -+ -+ do k=1,lentry(ii) -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c calculate metal forces and potential -+ -+ if(ntpmet.gt.0)then -+ -+ call metfrc(safe,i,lentry(ii),engacc,viracc) -+ -+ engmet=engmet+engacc -+ virmet=virmet+viracc -+ -+ endif -+ -+c calculate short range force and potential terms -+ -+ if(ntpvdw.gt.0.and.mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc, -+ x rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme)then -+ -+ call ewald2(llsolva,lfree,lghost,i,lentry(ii),engacc, -+ x viracc,drewd,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (llsolva,lfree,lghost,i,lentry(ii),engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions -+ -+ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then -+ -+ if(mod(nstep,nstbgr).eq.0)then -+ -+ call rdf0(i,lentry(ii),rcut) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c check metal interpolation is safe -+ -+ if(ntpmet.gt.0)then -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,142) -+ -+ endif -+ -+c calculate corrections for intramolecular coulomb terms in -+c Ewald sum -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ eps=epsq -+ if(loglnk)eps=eps*2.0d0 -+ -+c outer loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,nexatm(ii) -+ -+ j=lexatm(ii,k) -+ jlist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) -+ -+c calculate correction terms -+ -+ if(lhke)then -+ -+ call hkewald3(i,ii,engacc,viracc,eps) -+ -+ else -+ -+ call ewald3 -+ x (llsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) -+ -+ endif -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ enddo -+ -+ endif -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgofr.and.((.not.lzeql).or.(nstep.gt.nsteql)))then -+ -+ if(mod(nstep,nstbgr).eq.0)then -+ -+ numrdf=numrdf+1 -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=engmet -+ buffer(6)=virmet -+ buffer(7)=vdw_fre -+ buffer(8)=cou_fre -+ buffer(9)=vdw_vir -+ buffer(10)=cou_vir -+ call gdsum(buffer(1),10,buffer(11)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ engmet=buffer(5) -+ virmet=buffer(6) -+ vdw_fre=buffer(7) -+ cou_fre=buffer(8) -+ vdw_vir=buffer(9) -+ cou_vir=buffer(10) -+ -+ endif -+ -+ return -+ end subroutine forces -+ -+ subroutine forces_neu -+ x (lgofr,lzeql,lsolva,lfree,lghost,idnode,imcon,keyfce, -+ x mxnode,natms,nneut,nstbgr,nstep,nsteql,numrdf,nsolva, -+ x isolva,dlrpot,engcpe,engsrp,epsq,rcut,rvdw,alpha, -+ x vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c neutral group implemenation - no Ewald sum option -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c -+c modified - t. forester april 1993 -+c key: -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ invalid -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ invalid -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzeql,newlst,lchk,lsolva,lfree,lghost,llsolva -+ -+ integer idnode,imcon,keyfce,mxnode,natms,nneut,nstbgr -+ integer nstep,nsteql,numrdf,i,fail,jneu,jj0,jj1,j -+ integer ibig,ia,ineu,isn,ik,nsolva,isolva -+ real(8) dlrpot,engcpe,engsrp,epsq,rcut,rvdw,vircpe -+ real(8) virsrp,engacc,viracc,anorm,alpha -+ -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ -+ dimension fail(2) -+ -+ data fail/0,0/ -+ -+c allocate working arrays -+ -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ do i=1,2 -+ if(fail(i).ne.0)call error(idnode,1820) -+ enddo -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c initialise force and stress arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c initialise energy and virial accumulators -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c intra group vectors com -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-xxx(jj0) -+ tyy(j)=yyy(j)-yyy(jj0) -+ tzz(j)=zzz(j)-zzz(jj0) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,natms,cell,txx,tyy,tzz) -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ xxx(j)=txx(j)+xxx(jj0) -+ yyy(j)=tyy(j)+yyy(jj0) -+ zzz(j)=tzz(j)+zzz(jj0) -+ -+ enddo -+ -+c centre of molecule -+ -+ uxx(jneu)=0.d0 -+ uyy(jneu)=0.d0 -+ uzz(jneu)=0.d0 -+ anorm=1.d0/dble(jj1-jj0+1) -+ -+ do j=jj0,jj1 -+ -+ uxx(jneu)=uxx(jneu)+xxx(j)*anorm -+ uyy(jneu)=uyy(jneu)+yyy(j)*anorm -+ uzz(jneu)=uzz(jneu)+zzz(j)*anorm -+ -+ enddo -+ -+c vector from site to geometric centre -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-uxx(jneu) -+ tyy(j)=yyy(j)-uyy(jneu) -+ tzz(j)=zzz(j)-uzz(jneu) -+ -+ enddo -+ -+ enddo -+ -+c outer loop over neutral groups -+ -+ lchk=.true. -+ ibig=0 -+ ia=0 -+ -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ newlst=.true. -+ -+ isn=1 -+ call neutlst -+ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrceneu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions -+ -+ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. -+ x mod(nstep,nstbgr).eq.0)then -+ -+ call rdf0neu(ik,rcut) -+ -+ endif -+ -+ enddo -+ -+c check on validity of call to neutlst -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ if(.not.lchk)then -+ call gimax(ibig,1,i) -+ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf -+ call error(idnode,478) -+ endif -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) -+ -+c counter for rdf statistics outside loop structure -+ -+ if( ((.not.lzeql).or.(nstep.gt.nsteql)).and.(lgofr).and. -+ x mod(nstep,nstbgr).eq.0)numrdf=numrdf+1 -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,stat=fail(2)) -+ -+ return -+ end subroutine forces_neu -+ -+ subroutine multiple -+ x (loglnk,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt, -+ x mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,nsolva, -+ x isolva,alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim, -+ x rvdw,vircpe,virsrp,volm) -+c*************************************************************************** -+c -+c dl_poly subroutine for multiple time step algorithm -+c reciprocal space calculated on long time steps. -+c -+c copyright daresbury laboratory -+c -+c author t. forester, may 1993 -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ Ewald sum : ewald1,2,3,4 -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ truncated and shifted coulombic : coul4 -+c = 10,11 ----- reaction field : coul3 -+c = 12,13 ----- Smoothed Particle Mesh Ewald : ewald[_spme,2,3,4] -+c = 14,15 ----- Hautman-Klein-Ewald : hkewald1,2,3,4 -+c -+c**************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=5 -+ -+ logical newplst,newlst,lgofr,lzeql,lgr,loglnk,lewald,lspme -+ logical lhke,newjob,lcshft,lsolva,lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,nlatt,kmax1,kmax2,kmax3,nhko,multt -+ integer mxnode,natms,nstep,nstbgr,nsteql,numrdf,nospl,fail -+ integer numlsts,i,nstep0,nsolva,isolva,ii,k,j,ik -+ real(8) alpha,dlrpot,drewd,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,volm,stresp,engcpl,engacc,viracc,engac1 -+ real(8) vircpl,eps,ann,engsr1,viracl,engsrl,virsrl,virac2,engcp1 -+ real(8) vircp1,engacl,engac2,virsr1 -+ -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension stresp(9),fail(nnn) -+ -+ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 -+ save engsr1,virsr1,stresp,fpx,fpy,fpz,newjob -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data newjob/.true./ -+ data numlsts/-1/ -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ lhke=(keyfce/2.eq.7) -+ lspme=(keyfce/2.eq.6) -+ lewald=(keyfce/2.eq.1) -+ lcshft=(keyfce/2.eq.4.or.keyfce/2.eq.5) -+ if(newlst)nstep0=nstep -+ newplst=(newlst).or.(mod(nstep-nstep0,multt).eq.0) -+ -+c allocate working arrays -+ -+ if(newjob)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) -+ endif -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1840) -+ enddo -+ -+ endif -+ -+c create ewald interpolation arrays -+ -+ if(newjob)then -+ -+ if(lspme.or.lewald.or.lcshft)then -+ -+ call erfcgen(alpha,drewd,rcut) -+ -+ endif -+ -+ endif -+ -+ newjob=.false. -+ -+c divide neighbour list into primary and secondary neighbours -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call primlst(idnode,mxnode,natms,imcon,rprim) -+ -+ endif -+ -+c flag for accumulating rdfs -+ -+ lgr=.false. -+ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) -+ lgr=(lgr.and.(newplst.and.lgofr)) -+ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) -+ -+c zero force and stress arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c ********************PROCESS SECONDARY NEIGHBOURS****************** -+ -+ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then -+ -+c zero accumulators -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ engsrl=0.d0 -+ virsrl=0.d0 -+ llsolva=lsolva -+ if(lsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate fourier contribution to secondary coulombic forces -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ if(lewald)then -+ -+ call ewald1 -+ x (lsolva,llsolva,lfree,lghost,idnode,mxnode,natms,imcon, -+ x kmax1,kmax2,kmax3,engac1,viracc,alpha,volm,epsq) -+ -+c hautman-klein-ewald method -+ -+ elseif(lhke)then -+ -+ call hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engac1,viracc,alpha,epsq) -+ -+c real space terms of hk-ewald -+ -+ call hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engac2, -+ x virac2,drewd,rcut,epsq) -+ -+ engac1=engac1+engac2 -+ viracc=viracc+virac2 -+ -+ elseif(lspme)then -+ -+c smoothed particle mesh ewald -+ -+ call ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engac1,viracc,alpha,volm,epsq) -+ -+ endif -+ -+ engcpl=engcpl+engac1 -+ vircpl=vircpl+viracc -+ -+c calculate corrections for intramolecular coulomb terms in -+c Ewald sum -+c note: if using link cells - have double counted excluded -+c interactions use temporary adjustment to relative dielectric -+c constant -+ -+ eps=epsq -+ if(loglnk)eps=epsq*2.0d0 -+ -+c calculate self interaction corrections for fourier contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,nexatm(ii) -+ -+ j=lexatm(ii,k) -+ jlist(k)=j -+ -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nexatm(ii),cell,xdf,ydf,zdf) -+ -+c calculate correction terms -+ -+ if(lhke)then -+ -+ call hkewald3(i,ii,engacc,viracc,eps) -+ -+ else -+ -+ call ewald3 -+ x (lsolva,lfree,lghost,i,ii,engacc,viracc,alpha,eps) -+ -+ endif -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ enddo -+ -+ endif -+ -+c calculate pair contributions to secondary neighbour forces -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of distance -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrl=engsrl+engacc -+ virsrl=virsrl+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme)then -+ -+ call ewald2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,drewd,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ endif -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ flx(i)=fxx(i) -+ fly(i)=fyy(i) -+ flz(i)=fzz(i) -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stress(i) -+ stress(i)=0.d0 -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol(:) -+ cou_sol_lng(:)=cou_sol(:) -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc(:) -+ cou_exc_lng(:)=cou_exc(:) -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c calculate pair force contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=-list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of distance -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+c (real space contributions to ewald sum) -+ -+ if(lewald.or.lspme.or.lhke)then -+ -+ if(newplst.or. -+ x (mod(nstep-nstep0,multt).le.1))then -+ -+ if(lhke)then -+ -+ call hkewald4(i,ik,engacc,viracc,engacl,viracl,rcut,epsq) -+ -+ else -+ -+ call ewald4 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,engacl,viracl, -+ x drewd,rcut,epsq) -+ -+ endif -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ engcpl=engcpl+engacl -+ vircpl=vircpl+viracl -+ -+ else -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+ elseif(keyfce/2.eq.2)then -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call coul4 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+ enddo -+ -+c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary neighbour contributions to force, energy etc -+ -+ if(newplst)then -+ -+ do i=1,natms -+ -+ fpx(i)=flx(i) -+ fpy(i)=fly(i) -+ fpz(i)=flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stresl(i) -+ enddo -+ -+ engsr1=engsrl -+ virsr1=virsrl -+ engcp1=engcpl -+ vircp1=vircpl -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol_lng(:) -+ cou_sol_put(:)=cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc_lng(:) -+ cou_exc_put(:)=cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c calculate force increments etc -+ -+ if(mod(nstep-nstep0,multt).eq.1)then -+ -+ do i=1,natms -+ -+ flx(i)=flx(i)-fpx(i) -+ fly(i)=fly(i)-fpy(i) -+ flz(i)=flz(i)-fpz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stresl(i)-stresp(i) -+ enddo -+ -+ virsrl=virsrl-virsr1 -+ engsrl=engsrl-engsr1 -+ vircpl=vircpl-vircp1 -+ engcpl=engcpl-engcp1 -+ -+c solvation and excitation increments -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) -+ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) -+ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c extrapolate long range terms -+ -+ ann=dble(mod(nstep-nstep0,multt)) -+ -+ do i=1,natms -+ -+ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) -+ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) -+ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresp(i)+stresl(i)*ann -+ enddo -+ -+ engsrp=engsr1+engsrl*ann+engsrp -+ virsrp=virsr1+virsrl*ann+virsrp -+ engcpe=engcp1+engcpl*ann+engcpe -+ vircpe=vircp1+vircpl*ann+vircpe -+ -+c solvation and excitation extrapolation -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) -+ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) -+ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+ return -+ end subroutine multiple -+ -+ subroutine multiple_neu -+ x (lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode,imcon, -+ x keyfce,multt,mxnode,natms,nneut,nstbgr,nstep,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rprim,rcut,rvdw,alpha,vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating interatomic forces -+c using the verlet neighbour list -+c neutral group implemenation - no Ewald sum option -+c multiple timestep option -+c -+c parallel replicated data version -+c -+c fpx,fpy,fpz : forces from electrostatics fron rprim < r <= rcut -+c fxx,fyy,fzz : total force -+c -+c copyright daresbury laboratory april 1994 -+c author - t. forester april 1993 -+c key: -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c = 2,3 ------ invalid -+c = 4,5 ------ distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c = 8,9 ------ invalid -+c = 10,11 ----- reaction field : coul3 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical lgofr,lzeql,newlst,newplst,lgr,lchk,newjob,lsolva -+ logical lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,multt,mxnode,natms,nneut,nstbgr -+ integer nstep,nsteql,numrdf,fail,i,numlsts,jneu,jj0,j -+ integer jj1,ineu,ia,isn,ibig,ik,nstep0,nsolva,isolva -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rprim,rcut,rvdw,vircpe -+ real(8) virsrp,engcpl,vircpl,engsrl,virsrl,anorm,ann,stresp -+ real(8) engacc,viracc,engsr1,virsr1,engcp1,vircp1,alpha -+ -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension fail(nnn),stresp(9) -+ -+ save engcpl,engsrl,vircpl,virsrl,nstep0,numlsts,engcp1,vircp1 -+ save engsr1,virsr1,stresp,fpx,fpy,fpz -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data newjob/.true./ -+ data numlsts/-1/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ if(newjob)then -+ -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(3)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(4)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(5)) -+ -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(6)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(7)) -+ endif -+ -+ endif -+ newjob=.false. -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1850) -+ enddo -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c error if ewald sum requested -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)call error(idnode,250) -+ -+c create list of primary and secondary neighbours -+ -+ if(newlst)nstep0=nstep -+ newplst=(mod(nstep-nstep0,multt).eq.0) -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) -+ -+ endif -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c zero force arrays -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress arrays -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c flag for accumulating rdfs -+ -+ lgr=.false. -+ if(nstbgr.gt.0)lgr=(mod(numlsts,nstbgr).eq.0) -+ lgr=(lgr.and.(newplst.and.lgofr)) -+ lgr=(lgr.and.((.not.lzeql).or.(nstep-nsteql.gt.0))) -+ -+c intra group vectors com -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-xxx(jj0) -+ tyy(j)=yyy(j)-yyy(jj0) -+ tzz(j)=zzz(j)-zzz(jj0) -+ -+ enddo -+ -+ enddo -+ -+ call images(imcon,0,1,natms,cell,txx,tyy,tzz) -+ -+ do jneu=1,nneut -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+ xxx(j)=txx(j)+xxx(jj0) -+ yyy(j)=tyy(j)+yyy(jj0) -+ zzz(j)=tzz(j)+zzz(jj0) -+ -+ enddo -+ -+c centre of molecule -+ -+ uxx(jneu)=0.d0 -+ uyy(jneu)=0.d0 -+ uzz(jneu)=0.d0 -+ anorm=1.d0/dble(jj1-jj0+1) -+ -+ do j=jj0,jj1 -+ -+ uxx(jneu)=uxx(jneu)+xxx(j)*anorm -+ uyy(jneu)=uyy(jneu)+yyy(j)*anorm -+ uzz(jneu)=uzz(jneu)+zzz(j)*anorm -+ -+ enddo -+ -+c vector from site to geometric centre -+ -+ do j=jj0,jj1 -+ -+ txx(j)=xxx(j)-uxx(jneu) -+ tyy(j)=yyy(j)-uyy(jneu) -+ tzz(j)=zzz(j)-uzz(jneu) -+ -+ enddo -+ -+ enddo -+ -+c ********************PROCESS SECONDARY NEIGHBOURS******************** -+ -+ lchk=.true. -+ ibig=0 -+ ia=0 -+ -+ if(newplst.or.(mod(nstep-nstep0,multt).le.1))then -+ -+c zero accumulators for secondary neighbour energies and virial -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ engsrl=0.d0 -+ virsrl=0.d0 -+ -+c initialise solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c outer loop over neutral groups -+ -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ isn=-1 -+ call neutlst -+ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1.and.(rvdw.gt.rprim-delr))then -+ -+ call srfrceneu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrl=engsrl+engacc -+ virsrl=virsrl+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (lsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpl=engcpl+engacc -+ vircpl=vircpl+viracc -+ -+ else -+ -+ call error(idnode,250) -+ -+ endif -+ -+c accumulate radial distribution functions out to rcut -+ -+ if(lgr)then -+ call rdf0neu(ik,rcut) -+ endif -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ flx(i)=fxx(i) -+ fly(i)=fyy(i) -+ flz(i)=fzz(i) -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+ do i=1,9 -+ -+ stresl(i)=stress(i) -+ stress(i)=0.d0 -+ -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol(:) -+ cou_sol_lng(:)=cou_sol(:) -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc(:) -+ cou_exc_lng(:)=cou_exc(:) -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+ ia=0 -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+c calculate interatomic distances -+ -+ isn=1 -+ call neutlst -+ x (.true.,lchk,isn,imcon,idnode,ineu,ia,ik, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c trap possible array bound exception -+ -+ ibig=max(ibig,ik) -+ if(ik.gt.mxxdf)ik=0 -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrceneu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,dlrpot,rvdw) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.2)then -+ -+ call coul2neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+ call coul0neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,250) -+ -+ elseif(keyfce/2.eq.5)then -+ -+ call coul3neu -+ x (llsolva,lfree,lghost,ik,engacc,viracc,epsq,rcut,alpha) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ endif -+ -+c accumulate radial distribution functions out to rcut -+ -+ if(lgr)then -+ call rdf0neu(ik,rcut) -+ endif -+ -+ enddo -+ -+c ******************END OF PRIMARY NEIGHBOUR PROCESSING************* -+ -+c check on validity of call to neutlst -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ if(.not.lchk)then -+ call gimax(ibig,1,i) -+ if(idnode.eq.0)write(nrite,*)'mxxdf must be at least ',ibig -+ if(idnode.eq.0)write(nrite,*)'mxxdf is currently ',mxxdf -+ call error(idnode,479) -+ endif -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary neighbour contributions to force, energy etc -+ -+ if(newplst)then -+ -+ do i=1,natms -+ -+ fpx(i)=flx(i) -+ fpy(i)=fly(i) -+ fpz(i)=flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stresl(i) -+ enddo -+ -+ engsr1=engsrl -+ virsr1=virsrl -+ engcp1=engcpl -+ vircp1=vircpl -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol_lng(:) -+ cou_sol_put(:)=cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc_lng(:) -+ cou_exc_put(:)=cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c calculate force increments etc -+ -+ if(mod(nstep-nstep0,multt).eq.1)then -+ -+ do i=1,natms -+ -+ flx(i)=flx(i)-fpx(i) -+ fly(i)=fly(i)-fpy(i) -+ flz(i)=flz(i)-fpz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresl(i)=stresl(i)-stresp(i) -+ enddo -+ -+ virsrl=virsrl-virsr1 -+ engsrl=engsrl-engsr1 -+ vircpl=vircpl-vircp1 -+ engcpl=engcpl-engcp1 -+ -+c solvation and excitation increments -+ -+ if(lsolva)then -+ -+ vdw_sol_lng(:)=vdw_sol_lng(:)-vdw_sol_put(:) -+ cou_sol_lng(:)=cou_sol_lng(:)-cou_sol_put(:) -+ -+ if(lghost)then -+ -+ vdw_exc_lng(:)=vdw_exc_lng(:)-vdw_exc_put(:) -+ cou_exc_lng(:)=cou_exc_lng(:)-cou_exc_put(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c extrapolate long range terms -+ -+ ann=dble(mod(nstep-nstep0,multt)) -+ -+ do i=1,natms -+ -+ fxx(i)=fpx(i)+flx(i)*ann+fxx(i) -+ fyy(i)=fpy(i)+fly(i)*ann+fyy(i) -+ fzz(i)=fpz(i)+flz(i)*ann+fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresl(i)*ann+stresp(i) -+ enddo -+ -+ engsrp=engsr1+engsrl*ann+engsrp -+ virsrp=virsr1+virsrl*ann+virsrp -+ engcpe=engcp1+engcpl*ann+engcpe -+ vircpe=vircp1+vircpl*ann+vircpe -+ -+c solvation and excitation extrapolation -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol_put(:)+vdw_sol_lng(:)*ann+vdw_sol(:) -+ cou_sol(:)=cou_sol_put(:)+cou_sol_lng(:)*ann+cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc_put(:)+vdw_exc_lng(:)*ann+vdw_exc(:) -+ cou_exc(:)=cou_exc_put(:)+cou_exc_lng(:)*ann+cou_exc(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (txx,tyy,tzz,uxx,uyy,uzz,stat=fail(1)) -+ -+ return -+ end subroutine multiple_neu -+ -+ subroutine multiple_nsq -+ x (lnsq,lgofr,lzeql,newlst,lsolva,lfree,lghost,idnode, -+ x imcon,keyfce,multt,mxnode,natms,nstep,nstbgr,nsteql, -+ x numrdf,nsolva,isolva,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for multiple time step algorithm -+c to be used with all-pairs option -+c -+c flx,fly,flz : forces from electrostatics from r > rcut -+c fpx,fpy,fpz : forces from electrostatics from rprim < r <= rcut -+c fxx,fyy,fzz : total force -+c -+c copyright daresbury laboratory 1993 -+c -+c author t. forester, may 1993 -+c -+c keyfce = odd ------ short range potentials calculated : srfrce -+c = 0,1 ------ no electrostatics -+c Ewald sum --- not used -+c = 4,5 ------ Distance dependent dielectric : coul2 -+c = 6,7 ------ coulombic : coul0 -+c truncated and shifted coulombic -- not used -+c reaction field - not used -+c -+c**************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=5 -+ logical newplst,newlst,lgofr,lzeql,lgr,lnsq,newjob,lsolva -+ logical lfree,lghost,llsolva -+ integer idnode,imcon,keyfce,multt,mxnode,natms,nstep,nstbgr -+ integer nsteql,numrdf,fail,nstep0,ii,ik,k,numlsts,nsolva -+ integer isolva,i,j -+ real(8) delr,dlrpot,engcpe,engsrp,engcp3,epsq,rcut -+ real(8) rprim,rvdw,vircpe,virsrp,vircp3,rcut1,engcp2,vircp2 -+ real(8) engsr2,virsr2,stresp,engacc,viracc -+ -+ real(8), allocatable :: fpx(:),fpy(:),fpz(:) -+ real(8), allocatable :: vdw_sol_put(:),cou_sol_put(:) -+ real(8), allocatable :: vdw_exc_put(:),cou_exc_put(:) -+ -+ dimension stresp(9),fail(nnn) -+ -+ save engsr2,virsr2,engcp2,vircp2,nstep0,numlsts,stresp,fpx,fpy,fpz -+ save vdw_sol_put,cou_sol_put,vdw_exc_put,cou_exc_put -+ -+ data numlsts/-1/ -+ data newjob/.true./ -+ -+c allocate work arrays -+ -+ if(newjob)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (fpx(mxatms),fpy(mxatms),fpz(mxatms),stat=fail(1)) -+ if(lsolva)then -+ -+ allocate (vdw_sol_put(mxtmls_sol2),stat=fail(2)) -+ allocate (cou_sol_put(mxtmls_sol2),stat=fail(3)) -+ if(lghost)then -+ allocate (vdw_exc_put(mxtmls_exc2),stat=fail(4)) -+ allocate (cou_exc_put(mxtmls_exc2),stat=fail(5)) -+ endif -+ -+ endif -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1860) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+ if(lnsq)then -+ -+ llsolva=.false. -+ if(lsolva)then -+ llsolva=(mod(nstep-nsolva,isolva).eq.0) -+ endif -+ -+c divide neighbour list into primary and secondary neighbours -+ -+ if(newplst)then -+ -+ numlsts=numlsts+1 -+ call primlst(idnode,mxnode,natms,imcon,rprim) -+ -+ endif -+ -+c flag for accumulating rdfs -+ -+ lgr=(lgofr.and.(.not.lzeql.or.(nstep-nsteql.gt.0))) -+ lgr=(lgr.and.newplst.and.(mod(numlsts,nstbgr).eq.0)) -+ -+c set extended cutoff for electrostatics - secondary shell -+ -+ rcut1=rcut+delr -+ -+ if(newlst)nstep0=nstep -+ newplst=(newlst.or.mod(nstep-nstep0,multt).eq.0) -+ -+c ********************PROCESS TERTIARY NEIGHBOURS********************* -+ -+ if(newplst)then -+ -+ call coul_nsq -+ x (lsolva,lfree,lghost,idnode,mxnode,natms,imcon,epsq,rcut, -+ x engcp3,vircp3) -+ -+ endif -+ -+c ****************END OF TERTIARY NEIGHBOUR PROCESSING************** -+ -+c ********************PROCESS SECONDARY NEIGHBOURS******************** -+ -+ if(newplst)then -+ -+c zero accumulators for secondary neighbour energies and virial -+ -+ engcp2=0.d0 -+ vircp2=0.d0 -+ engsr2=0.d0 -+ virsr2=0.d0 -+ -+c zero secondary forces -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+ ii=0 -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic vectors -+ -+ ik=0 -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary condition only for interactions > rprim -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of interatomic distances -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c short range forces for secondary shell -+ -+ if((mod(keyfce,2).eq.1).and.(rvdw.gt.rprim-delr))then -+ -+ call srfrce -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsr2=engsr2+engacc -+ virsr2=virsr2+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then -+ -+ call error(idnode,424) -+ -+ elseif(keyfce/2.eq.2)then -+ -+c distance dependent dielectric -+ -+ call coul2 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) -+ -+ engcp2=engcp2+engacc -+ vircp2=vircp2+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+c coulombic potential -+ -+ call coul0 -+ x (lsolva,lfree,lghost,i,ik,engacc,viracc,rcut1,epsq) -+ -+ engcp2=engcp2+engacc -+ vircp2=vircp2+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+c truncated shifted coulombic potential -+ -+ call error(idnode,424) -+ -+ endif -+ -+c accumulate radial distribution functions : out to rcut -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+ enddo -+ -+c store secondary forces and stress tensor -+ -+ do i=1,natms -+ -+ fpx(i)=fxx(i) -+ fpy(i)=fyy(i) -+ fpz(i)=fzz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stresp(i)=stress(i) -+ enddo -+ -+c store solvation and excitation arrays -+ -+ if(lsolva)then -+ -+ vdw_sol_put(:)=vdw_sol(:) -+ cou_sol_put(:)=cou_sol(:) -+ -+ if(lghost)then -+ -+ vdw_exc_put(:)=vdw_exc(:) -+ cou_exc_put(:)=cou_exc(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c ****************END OF SECONDARY NEIGHBOUR PROCESSING************* -+ -+c ********************PROCESS PRIMARY NEIGHBOURS******************** -+ -+c zero accumulators for total energies and virials -+ -+ engcpe=0.d0 -+ engsrp=0.d0 -+ vircpe=0.d0 -+ virsrp=0.d0 -+ -+c zero primary forces -+ -+ do i=1,natms -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ enddo -+ -+c zero stress tensor -+ -+ do i=1,9 -+ stress(i)=0.d0 -+ enddo -+ -+c zero solvation and excitation arrays -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ -+ if(lghost)then -+ -+ vdw_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ -+ endif -+ -+ endif -+ -+c calculate primary pair force contributions -+ -+ ii=0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ ik=0 -+ -+ do k=1,lentry(ii) -+ -+ j=-list(ii,k) -+ -+ if(j.gt.0)then -+ -+ ik=ik+1 -+ ilist(ik)=j -+ xdf(ik)=xxx(i)-xxx(j) -+ ydf(ik)=yyy(i)-yyy(j) -+ zdf(ik)=zzz(i)-zzz(j) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,ik,cell,xdf,ydf,zdf) -+ -+c square of interatomic distances -+ -+ do k=1,ik -+ -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ -+ enddo -+ -+c accumulate radial distribution functions : out to rcut -+ -+ if(lgr)call rdf0(i,ik,rcut) -+ -+c calculate short range force and potential terms -+ -+ if(mod(keyfce,2).eq.1)then -+ -+ call srfrce -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rvdw,dlrpot) -+ -+ engsrp=engsrp+engacc -+ virsrp=virsrp+viracc -+ -+ endif -+ -+c calculate coulombic force and potential terms -+ -+ if(keyfce/2.eq.1.or.keyfce/2.eq.6)then -+ -+ call error(idnode,424) -+ -+ elseif(keyfce/2.eq.2)then -+ -+c distance dependent dielectric -+ -+ call coul2 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.3)then -+ -+c coulombic potential -+ -+ call coul0 -+ x (llsolva,lfree,lghost,i,ik,engacc,viracc,rcut,epsq) -+ -+ engcpe=engcpe+engacc -+ vircpe=vircpe+viracc -+ -+ elseif(keyfce/2.eq.4)then -+ -+ call error(idnode,424) -+ -+ endif -+ -+ enddo -+ -+c **************END OF PRIMARY NEIGHBOUR PROCESSING***************** -+ -+c counter for rdf statistics outside loop structure -+ -+ if(lgr)numrdf=numrdf+1 -+ -+c add in secondary and tertiary neighbour contributions to -+c force, energy etc -+ -+ do i=1,natms -+ -+ fxx(i)=fxx(i)+fpx(i)+flx(i) -+ fyy(i)=fyy(i)+fpy(i)+fly(i) -+ fzz(i)=fzz(i)+fpz(i)+flz(i) -+ -+ enddo -+ -+ do i=1,9 -+ stress(i)=stress(i)+stresp(i) -+ enddo -+ -+ engsrp=engsrp+engsr2 -+ virsrp=virsrp+virsr2 -+ -+ engcpe=engcpe+engcp2+engcp3 -+ vircpe=vircpe+vircp2+vircp3 -+ -+c calculate solvation and excitation arrays -+ -+ if(llsolva)then -+ -+ vdw_sol(:)=vdw_sol(:)+vdw_sol_put(:)+vdw_sol_lng(:) -+ cou_sol(:)=cou_sol(:)+cou_sol_put(:)+cou_sol_lng(:) -+ -+ if(lghost)then -+ -+ vdw_exc(:)=vdw_exc(:)+vdw_exc_put(:)+vdw_exc_lng(:) -+ cou_exc(:)=cou_exc(:)+cou_exc_put(:)+cou_exc_lng(:) -+ -+ endif -+ -+ endif -+ -+c sum up contributions to short range and coulombic potential -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engsrp -+ buffer(2)=virsrp -+ buffer(3)=engcpe -+ buffer(4)=vircpe -+ buffer(5)=vdw_fre -+ buffer(6)=cou_fre -+ buffer(7)=vdw_vir -+ buffer(8)=cou_vir -+ call gdsum(buffer(1),8,buffer(9)) -+ engsrp=buffer(1) -+ virsrp=buffer(2) -+ engcpe=buffer(3) -+ vircpe=buffer(4) -+ vdw_fre=buffer(5) -+ cou_fre=buffer(6) -+ vdw_vir=buffer(7) -+ cou_vir=buffer(8) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine multiple_nsq -+ -+ subroutine neutlst -+ x (newlst,lchk,isn,imcon,idnode,ineu,ia,ll, -+ x txx,tyy,tzz,uxx,uyy,uzz) -+ -+c*********************************************************************** -+c -+c dlpoly routine to create pair lists for neutral group -+c implementations. -+c loops over group ineu -+c -+c replicated data version -+c -+c copyright daresbury laboratory 1994 -+c author t.forester march 1994 -+c -+c isn = -1 => secondary neighbours -+c isn = 1 => primary neighbours - must contain excld interactions -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newlst,lchk,lexc -+ integer isn,imcon,idnode,ineu,ia,ll,i,jj,jj0,jj1 -+ integer fail,ibig,keyexc,lenia,j,jneu,in0,in1 -+ real(8) txx,tyy,tzz,uxx,uyy,uzz -+ -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1830) -+ -+ if(newlst)then -+ -+ ibig=0 -+ -+c set cutoff radius -+ -+ ll=0 -+ -+c number of excludes found -+ -+ if(isn.lt.0)then -+ keyexc=nexatm(ia)+2 -+ else -+ keyexc=1 -+ endif -+ -+c do centre - centre distances -+ -+ lenia=lentry(ia) -+ -+ do j=1,lenia -+ -+ jneu=abs(list(ia,j)) -+ xxt(j)=uxx(ineu)-uxx(jneu) -+ yyt(j)=uyy(ineu)-uyy(jneu) -+ zzt(j)=uzz(ineu)-uzz(jneu) -+ -+ enddo -+ -+ call images(imcon,0,1,lenia,cell,xxt,yyt,zzt) -+ -+c working intragroup vectors of central group -+c - for periodic boundaries -+ -+ in0=neulst(ineu) -+ in1=neulst(ineu+1)-1 -+ -+c loop over neutral groups sites of a -+ -+ -+c loop over groups in list -+ -+ do jj=1,lentry(ia) -+ -+ jneu=list(ia,jj)*isn -+ -+ if(jneu.gt.0)then -+ -+ do i=in0,in1 -+ -+ jj0=neulst(jneu) -+ jj1=neulst(jneu+1)-1 -+ -+ if(ineu.eq.jneu)jj0=i+1 -+ -+c loop over jneu sites -+ -+ do j=jj0,jj1 -+ -+c reject atoms in excluded pair list -+ -+ lexc=.false. -+ -+ if(keyexc.lt.nexatm(ia))then -+ -+ if(lexatm(ia,keyexc).eq.i)then -+ if(lexatm(ia,keyexc+1).eq.j)then -+ lexc=.true. -+ keyexc=keyexc+2 -+ endif -+ endif -+ -+ endif -+ -+c reject frozen atom pairs -+ -+ if(lstfrz(i).ne.0)then -+ if(lstfrz(j).ne.0)lexc=.true. -+ endif -+ -+ if(.not.lexc)then -+ -+ ll=ll+1 -+ if(ll.le.mxxdf)then -+ -+ xdf(ll)=txx(i)+xxt(jj)-txx(j) -+ ydf(ll)=tyy(i)+yyt(jj)-tyy(j) -+ zdf(ll)=tzz(i)+zzt(jj)-tzz(j) -+ rsqdf(ll)=xdf(ll)**2+ydf(ll)**2+zdf(ll)**2 -+ ilist(ll)=i -+ jlist(ll)=j -+ -+ else -+ -+ lchk=.false. -+ ibig=max(ibig,ll) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail) -+ -+ return -+ end subroutine neutlst -+ -+ end module forces_module -+ -diff -urN dl_class_1.9.orig/srcmod/four_body_module.f dl_class_1.9/srcmod/four_body_module.f ---- dl_class_1.9.orig/srcmod/four_body_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/four_body_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,979 @@ -+ module four_body_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining four-body potential arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - w. smith aug 2008 : solvation, free energy, excitation -+c adapted - w. smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ -+ implicit none -+ -+ logical, allocatable :: filter(:) -+ real(8), allocatable :: prmfbp(:,:),rcut4b(:) -+ integer, allocatable :: lstfbp(:),ltpfbp(:),latfbp(:) -+ -+ save prmfbp,rcut4b,lstfbp,ltpfbp,latfbp,filter -+ -+ contains -+ -+ subroutine alloc_fbp_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(6) -+ -+ do i=1,6 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmfbp(mxfbp,mxpfbp),stat=fail(1)) -+ allocate (rcut4b(mxfbp),stat=fail(2)) -+ allocate (lstfbp(mxfbp),stat=fail(3)) -+ allocate (ltpfbp(mxfbp),stat=fail(4)) -+ allocate (latfbp(mxatms),stat=fail(5)) -+ allocate (filter(mxsite),stat=fail(6)) -+ -+ do i=1,6 -+ if(fail(i).gt.0)call error(idnode,1140) -+ enddo -+ -+ end subroutine alloc_fbp_arrays -+ -+ subroutine define_four_body -+ x (safe,lunits,lmols,idnode,ntpfbp,ntpatm, -+ x rcutfb,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining four body potentials -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits,lmols -+ character*8 keyword -+ character*8 atom0,atom1,atom2,atom3 -+ character*1 message(80) -+ integer idnode,ntpfbp,ntpatm,ifbp,itpfbp,keypot,katm0 -+ integer i,katm1,katm2,katm3,jtpatm,ka1,ka2,ka3,keyfbp,kfbp -+ integer j,fail,idum -+ real(8) rcutfb,engunit -+ real(8), allocatable :: parpot(:) -+ -+ data fail/0/ -+ -+ allocate (parpot(mxpfbp),stat=fail) -+ if(fail.ne.0)call error(idnode,1150) -+ -+ ntpfbp=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'number of specified four ', -+ x 'body potentials',i10)") ntpfbp -+ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ','atom 3 ', -+ x 'atom 4 ',3x,' key',30x,'parameters'/,/)") -+ -+ endif -+ if(ntpfbp.gt.mxfbp) call error(idnode,89) -+ if(.not.lunits) call error(idnode,6) -+ if(.not.lmols) call error(idnode,13) -+ -+ do i=1,mxsite -+ filter(i)=.false. -+ enddo -+ -+ do ifbp=1,mxfbp -+ lstfbp(ifbp)=0 -+ enddo -+ -+ do ifbp=1,mxfbp,mx3fbp -+ lstfbp(ifbp)=-1 -+ enddo -+ -+ rcutfb=0.d0 -+ -+ do itpfbp=1,ntpfbp -+ -+ do i=1,mxpfbp -+ parpot(i)=0.d0 -+ enddo -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+c Note the order!! atom0 is the central atom -+ -+ call copystring(record,message,80) -+ call getword(atom0,record,8,lenrec) -+ call getword(atom1,record,8,lenrec) -+ call getword(atom2,record,8,lenrec) -+ call getword(atom3,record,8,lenrec) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'harm') then -+ keypot=1 -+ elseif(keyword(1:4).eq.'hcos') then -+ keypot=2 -+ elseif(keyword(1:4).eq.'plan') then -+ keypot=3 -+ else -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,443) -+ endif -+ -+ parpot(1)=dblstr(record,lenrec,idum) -+ parpot(2)=dblstr(record,lenrec,idum) -+ parpot(3)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(16x,4a8,4x,a4,1x,1p,9e13.5)") -+ x atom0,atom1,atom2,atom3,keyword(1:4),(parpot(j),j=1,mxpfbp) -+ -+ katm0=0 -+ katm1=0 -+ katm2=0 -+ katm3=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm -+ if(atom3.eq.unqatm(jtpatm))katm3=jtpatm -+ -+ enddo -+ -+ if(katm0.eq.0.or.katm1.eq.0.or.katm2.eq.0.or. -+ x katm3.eq.0) call error(idnode,91) -+ -+ filter(katm0)=.true. -+ filter(katm1)=.true. -+ filter(katm2)=.true. -+ filter(katm3)=.true. -+ -+ ka1=max(katm1,katm2,katm3) -+ ka3=min(katm1,katm2,katm3) -+ ka2=katm1+katm2+katm3-ka1-ka3 -+ keyfbp=ka3+(ka2*(ka2-1))/2+(ka1*(ka1**2-1))/6+ -+ x (katm0-1)*mx3fbp -+ -+ if(keyfbp.gt.mxfbp) call error(idnode,101) -+ -+c convert parameters to internal units -+ -+ parpot(1)=parpot(1)*engunit -+ parpot(2)=parpot(2)*(pi/180.d0) -+ -+ if(keypot.eq.2)then -+ -+ parpot(2)=cos(parpot(2)) -+ -+ endif -+ -+ if(lstfbp(keyfbp).gt.0) call error(idnode,19) -+ lstfbp(keyfbp)=itpfbp -+ ltpfbp(itpfbp)=keypot -+ kfbp=mx3fbp*((keyfbp-1)/mx3fbp)+1 -+ if(lstfbp(kfbp).lt.0)lstfbp(kfbp)=0 -+ -+c calculate max four body cutoff -+ -+ rcutfb=max(rcutfb,parpot(3)) -+ rcut4b(itpfbp)=parpot(3) -+ -+c store four body potential parameters -+ -+ do i=1,mxpfbp -+ prmfbp(itpfbp,i)=parpot(i) -+ enddo -+ -+ enddo -+ -+ if(rcutfb.lt.1.d-6)call error(idnode,453) -+ -+ deallocate (parpot,stat=fail) -+ -+ return -+ end subroutine define_four_body -+ -+ subroutine fbpfrc -+ x (lsolva,lfree,lexcite,idnode,mxnode,natms,imcon,rcutfb, -+ x engfbp,virfbp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating four body inversion forces -+c arising from the inversion angle between three atoms around a -+c nominated central atom -+c -+c Note: the subroutine converts coordinates to reduced units -+c to avoid a call to images.f. The link cell algorithm used -+c here necessitates a parallelepiped cell geometry -+c -+c copyright - daresbury laboratory 1996 -+c author - w.smith july 1996 -+c adapted - w.smith aug 2008 solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect,lskip -+ logical idrive,jdrive,kdrive,ldrive -+ integer idnode,mxnode,natms,imcon,nix,niy,niz -+ integer i,j,k,nbx,nby,nbz,ncells,ix,iy,iz,icell,jx,jy -+ integer jz,jj,kk,ia,ib,ifbp,jfbp,kfbp,jklbd,kkfbp,ktyp,ii -+ integer ic,ll,id,lfbp,l,limit,jcell,kkk -+ real(8) rcutfb,engfbp,virfbp,vbn,vcn,pterm,xm,ym,zm -+ real(8) strs,cprp,det,xdc,ydc,zdc,sxx,syy,szz,sxab,strs_loc -+ real(8) syab,szab,xab,yab,zab,rab2,sxac,syac,szac,xac,yac -+ real(8) zac,rac2,sxad,syad,szad,xad,yad,zad,rad2,rrab,rrac -+ real(8) rrad,rbc,rcd,rdb,ubx,uby,ubz,ubn,rub,vbx,vby,vbz -+ real(8) rvb,wwb,ucx,ucy,ucz,ucn,ruc,vcx,vcy,vcz,rvc,wwc -+ real(8) udx,udy,udz,udn,rud,vdx,vdy,vdz,vdn,rvd,wwd,cosb -+ real(8) cosc,cosd,thb,thc,thd,gamb,gamc,gamd,rubc,rubd -+ real(8) rucd,rucb,rudb,rudc,rvbc,rvbd,rvcd,rvcb,rvdb,rvdc -+ real(8) fax,fay,faz,fbx,fby,fbz,fcx,fcy,fcz,fdx,fdy,fdz -+ dimension cprp(10),strs(6),nix(27),niy(27),niz(27),strs_loc(6) -+ -+ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, -+ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ -+ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, -+ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ -+ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ -+ -+ lskip=(lfree.or.lexcite) -+ -+c flag for undefined potentials -+ -+ safe=.true. -+ -+c initialise accumulators -+ -+ engfbp=0.d0 -+ virfbp=0.d0 -+ fbp_fre=0.d0 -+ fbp_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(9)=.true. -+ en4_sol(:)=0.d0 -+ if(lexcite)en4_exc(:)=0.d0 -+ -+ endif -+ -+c create mock cell vectors for non-periodic system -+ -+ if(imcon.eq.0) then -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ do i=1,natms -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ enddo -+ -+ cell(1)=2.d0*xm+rcutfb -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(5)=2.d0*ym+rcutfb -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ cell(9)=2.d0*zm+rcutfb -+ -+ endif -+ -+c check for appropriate boundary conditions -+ -+ if(imcon.gt.3)call error(idnode,79) -+ call invert(cell,rcell,det) -+ call dcell(cell,cprp) -+ -+c calculate link cell numbers -+ -+ nbx=int(cprp(7)/(rcutfb+1.d-6)) -+ nby=int(cprp(8)/(rcutfb+1.d-6)) -+ nbz=int(cprp(9)/(rcutfb+1.d-6)) -+ ncells=nbx*nby*nbz -+ if(ncells.gt.mxcell) then -+ -+ if(idnode.eq.0) write(nrite,'(a,i6)') -+ x 'number of required link cells in routine fbpfrc is ',ncells -+ write(nrite,'(a,i6)') -+ x 'number of default link cells in routine fbpfrc is ',mxcell -+ call error(idnode,87) -+ -+ endif -+ -+c transform atomic coordinates and construct link cells -+ -+ do l=1,ncells -+ -+ lct(l)=0 -+ lst(l)=0 -+ -+ enddo -+ -+ xdc=dble(nbx) -+ ydc=dble(nby) -+ zdc=dble(nbz) -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ xxx(i)=sxx -+ yyy(i)=syy -+ zzz(i)=szz -+ -+ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) -+ iy=min(int(ydc*(syy+0.5d0)),nby-1) -+ iz=min(int(zdc*(szz+0.5d0)),nbz-1) -+ k=1+ix+nbx*(iy+nby*iz) -+ lst(k)=lst(k)+1 -+ link(i)=lct(k) -+ lct(k)=i -+ -+ endif -+ -+ enddo -+ -+c loop over central atoms of inversion -+ -+ ix=0 -+ iy=1 -+ iz=1 -+ do icell=1,ncells -+ -+ ix=ix+1 -+ if(ix.gt.nbx)then -+ ix=1 -+ iy=iy+1 -+ if(iy.gt.nby)then -+ iy=1 -+ iz=iz+1 -+ endif -+ endif -+ -+ k=0 -+ do kk=1,27 -+ -+ jx=ix+nix(kk) -+ jy=iy+niy(kk) -+ jz=iz+niz(kk) -+ -+ if(jx.gt.nbx)jx=1 -+ if(jy.gt.nby)jy=1 -+ if(jz.gt.nbz)jz=1 -+ if(jx.lt.1)jx=jx+nbx -+ if(jy.lt.1)jy=jy+nby -+ if(jz.lt.1)jz=jz+nbz -+ -+ jcell=jx+nbx*(jy-1+nby*(jz-1)) -+ j=lct(jcell) -+ -+ do ii=1,lst(jcell) -+ -+ k=k+1 -+ latfbp(k)=j -+ j=link(j) -+ -+ enddo -+ -+ enddo -+ -+ limit=k -+ -+ do ii=1,lst(icell) -+ -+ ia=latfbp(ii) -+ if(lmetadyn)idrive=driven(ltype(ia)) -+ ifbp=mx3fbp*(ltype(ia)-1) -+ if(mod(ia,mxnode).eq.idnode.and.lstfbp(ifbp+1).ge.0)then -+ -+ do jj=1,limit-2 -+ -+ ib=latfbp(jj) -+ if(lmetadyn)jdrive=driven(ltype(ib)) -+ -+ do kk=jj+1,limit-1 -+ -+ ic=latfbp(kk) -+ if(lmetadyn)kdrive=driven(ltype(ic)) -+ -+ do ll=kk+1,limit -+ -+ id=latfbp(ll) -+ if(lmetadyn)ldrive=driven(ltype(id)) -+ -+ if(lskip)then -+ -+ if((atm_fre(ia).eq.1.or.atm_fre(ib).eq.1.or. -+ x atm_fre(ic).eq.1.or.atm_fre(id).eq.1).and. -+ x (atm_fre(ia).eq.2.or.atm_fre(ib).eq.2.or. -+ x atm_fre(ic).eq.2.or.atm_fre(id).eq.2))cycle -+ -+ endif -+ -+ jfbp=max(ltype(ib),ltype(ic),ltype(id)) -+ lfbp=min(ltype(ib),ltype(ic),ltype(id)) -+ kfbp=ltype(ib)+ltype(ic)+ltype(id)-jfbp-lfbp -+ jklbd=ifbp+lfbp+(kfbp*(kfbp-1))/2+(jfbp*(jfbp**2-1))/6 -+ kkfbp=lstfbp(jklbd) -+ if(kkfbp.gt.0)then -+ -+ sxab=xxx(ib)-xxx(ia) -+ sxab=sxab-nint(sxab) -+ syab=yyy(ib)-yyy(ia) -+ syab=syab-nint(syab) -+ szab=zzz(ib)-zzz(ia) -+ szab=szab-nint(szab) -+ -+ xab=cell(1)*sxab+cell(4)*syab+cell(7)*szab -+ if(abs(xab).lt.rcutfb)then -+ -+ yab=cell(2)*sxab+cell(5)*syab+cell(8)*szab -+ if(abs(yab).lt.rcutfb)then -+ -+ zab=cell(3)*sxab+cell(6)*syab+cell(9)*szab -+ if(abs(zab).lt.rcutfb)then -+ -+ rab2=xab*xab+yab*yab+zab*zab -+ -+ sxac=xxx(ic)-xxx(ia) -+ sxac=sxac-nint(sxac) -+ syac=yyy(ic)-yyy(ia) -+ syac=syac-nint(syac) -+ szac=zzz(ic)-zzz(ia) -+ szac=szac-nint(szac) -+ -+ xac=cell(1)*sxac+cell(4)*syac+cell(7)*szac -+ if(abs(xac).lt.rcutfb)then -+ -+ yac=cell(2)*sxac+cell(5)*syac+cell(8)*szac -+ if(abs(yac).lt.rcutfb)then -+ -+ zac=cell(3)*sxac+cell(6)*syac+cell(9)*szac -+ if(abs(zac).lt.rcutfb)then -+ -+ rac2=xac*xac+yac*yac+zac*zac -+ -+ sxad=xxx(id)-xxx(ia) -+ sxad=sxad-nint(sxad) -+ syad=yyy(id)-yyy(ia) -+ syad=syad-nint(syad) -+ szad=zzz(id)-zzz(ia) -+ szad=szad-nint(szad) -+ -+ xad=cell(1)*sxad+cell(4)*syad+cell(7)*szad -+ if(abs(xad).lt.rcutfb)then -+ -+ yad=cell(2)*sxad+cell(5)*syad+cell(8)*szad -+ if(abs(yad).lt.rcutfb)then -+ -+ zad=cell(3)*sxad+cell(6)*syad+cell(9)*szad -+ if(abs(zad).lt.rcutfb)then -+ -+ rad2=xad*xad+yad*yad+zad*zad -+ -+ if(rcut4b(kkfbp)**2.ge.max(rab2,rac2,rad2))then -+ -+ rrab=1.d0/sqrt(rab2) -+ rrac=1.d0/sqrt(rac2) -+ rrad=1.d0/sqrt(rad2) -+ -+ rbc=xab*xac+yab*yac+zab*zac -+ rcd=xac*xad+yac*yad+zac*zad -+ rdb=xad*xab+yad*yab+zad*zab -+ -+c calculate bond-angle-plane vectors -+ -+ ubx=xac*rrac+xad*rrad -+ uby=yac*rrac+yad*rrad -+ ubz=zac*rrac+zad*rrad -+ ubn=1.d0/sqrt(ubx**2+uby**2+ubz**2) -+ ubx=ubn*ubx -+ uby=ubn*uby -+ ubz=ubn*ubz -+ rub=xab*ubx+yab*uby+zab*ubz -+ -+ vbx=xac*rrac-xad*rrad -+ vby=yac*rrac-yad*rrad -+ vbz=zac*rrac-zad*rrad -+ vbn=1.d0/sqrt(vbx**2+vby**2+vbz**2) -+ vbx=vbn*vbx -+ vby=vbn*vby -+ vbz=vbn*vbz -+ rvb=xab*vbx+yab*vby+zab*vbz -+ wwb=sqrt(rub**2+rvb**2) -+ -+ ucx=xad*rrad+xab*rrab -+ ucy=yad*rrad+yab*rrab -+ ucz=zad*rrad+zab*rrab -+ ucn=1.d0/sqrt(ucx**2+ucy**2+ucz**2) -+ ucx=ucn*ucx -+ ucy=ucn*ucy -+ ucz=ucn*ucz -+ ruc=xac*ucx+yac*ucy+zac*ucz -+ -+ vcx=xad*rrad-xab*rrab -+ vcy=yad*rrad-yab*rrab -+ vcz=zad*rrad-zab*rrab -+ vcn=1.d0/sqrt(vcx**2+vcy**2+vcz**2) -+ vcx=vcn*vcx -+ vcy=vcn*vcy -+ vcz=vcn*vcz -+ rvc=xac*vcx+yac*vcy+zac*vcz -+ wwc=sqrt(ruc**2+rvc**2) -+ -+ udx=xab*rrab+xac*rrac -+ udy=yab*rrab+yac*rrac -+ udz=zab*rrab+zac*rrac -+ udn=1.d0/sqrt(udx**2+udy**2+udz**2) -+ udx=udn*udx -+ udy=udn*udy -+ udz=udn*udz -+ rud=xad*udx+yad*udy+zad*udz -+ -+ vdx=xab*rrab-xac*rrac -+ vdy=yab*rrab-yac*rrac -+ vdz=zab*rrab-zac*rrac -+ vdn=1.d0/sqrt(vdx**2+vdy**2+vdz**2) -+ vdx=vdn*vdx -+ vdy=vdn*vdy -+ vdz=vdn*vdz -+ rvd=xad*vdx+yad*vdy+zad*vdz -+ wwd=sqrt(rud**2+rvd**2) -+ -+c calculate inversion angle cosines -+ -+ cosb=wwb*rrab -+ cosc=wwc*rrac -+ cosd=wwd*rrad -+ if(abs(cosb).gt.1.d0)cosb=sign(1.d0,cosb) -+ if(abs(cosc).gt.1.d0)cosc=sign(1.d0,cosc) -+ if(abs(cosd).gt.1.d0)cosd=sign(1.d0,cosd) -+ -+c select potential energy function type -+ -+ ktyp=ltpfbp(kkfbp) -+ -+c calculate potential energy and scalar force term -+ -+ if(ktyp.eq.1)then -+ -+c key=1 for harmonic potential -+ -+ thb=acos(cosb) -+ thc=acos(cosc) -+ thd=acos(cosd) -+ -+ pterm=0.5d0*prmfbp(kkfbp,1)* -+ x ((thb-prmfbp(kkfbp,2))**2+ -+ x (thc-prmfbp(kkfbp,2))**2+ -+ x (thd-prmfbp(kkfbp,2))**2)/3.d0 -+ -+ gamb=0.d0 -+ if(abs(thb).gt.1.d-12)gamb=prmfbp(kkfbp,1)* -+ x (thb-prmfbp(kkfbp,2))/(3.d0*sin(thb)) -+ gamc=0.d0 -+ if(abs(thc).gt.1.d-12)gamc=prmfbp(kkfbp,1)* -+ x (thc-prmfbp(kkfbp,2))/(3.d0*sin(thc)) -+ gamd=0.d0 -+ if(abs(thd).gt.1.d-12)gamd=prmfbp(kkfbp,1)* -+ x (thd-prmfbp(kkfbp,2))/(3.d0*sin(thd)) -+ -+ else if(ktyp.eq.2)then -+ -+c key=2 for harmonic cosine inversion potential -+ -+ pterm=0.5d0*prmfbp(kkfbp,1)* -+ x ((cosb-prmfbp(kkfbp,2))**2+ -+ x (cosc-prmfbp(kkfbp,2))**2+ -+ x (cosd-prmfbp(kkfbp,2))**2)/3.d0 -+ -+ gamb=-prmfbp(kkfbp,1)*(cosb-prmfbp(kkfbp,2))/3.d0 -+ gamc=-prmfbp(kkfbp,1)*(cosc-prmfbp(kkfbp,2))/3.d0 -+ gamd=-prmfbp(kkfbp,1)*(cosd-prmfbp(kkfbp,2))/3.d0 -+ -+ else if(ktyp.eq.3)then -+ -+c key=3 for planar inversion potentials -+ -+ pterm=prmfbp(kkfbp,1)* -+ x (3.d0-cosb-cosc-cosd)/3.d0 -+ -+ gamb=-prmfbp(kkfbp,1)/3.d0 -+ gamc=-prmfbp(kkfbp,1)/3.d0 -+ gamd=-prmfbp(kkfbp,1)/3.d0 -+ -+ else -+ -+c undefined potential -+ -+ safe=.false. -+ pterm=0.d0 -+ gamb=0.d0 -+ gamc=0.d0 -+ gamd=0.d0 -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set quadruple index -+ -+ if(lsolva) -+ x kkk=loc4(atmolt(ia),atmolt(ib),atmolt(ic),atmolt(id)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. -+ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ -+ x atm_fre(id).eq.0) -+ -+ if(lsolva)en4_exc(kkk)=en4_exc(kkk)+pterm -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. -+ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ fbp_fre=fbp_fre-pterm -+ pterm=lambda1*pterm -+ gamb=lambda1*gamb -+ gamc=lambda1*gamc -+ gamd=lambda1*gamd -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. -+ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ fbp_fre=fbp_fre+pterm -+ pterm=lambda2*pterm -+ gamb=lambda2*gamb -+ gamc=lambda2*gamc -+ gamd=lambda2*gamd -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential -+ -+ engfbp=engfbp+pterm -+ -+ if(lsolva)en4_sol(kkk)=en4_sol(kkk)+pterm -+ -+c calculate bond and u,v scalar products -+ -+ rubc=xab*ucx+yab*ucy+zab*ucz -+ rubd=xab*udx+yab*udy+zab*udz -+ rucd=xac*udx+yac*udy+zac*udz -+ rucb=xac*ubx+yac*uby+zac*ubz -+ rudb=xad*ubx+yad*uby+zad*ubz -+ rudc=xad*ucx+yad*ucy+zad*ucz -+ -+ rvbc=xab*vcx+yab*vcy+zab*vcz -+ rvbd=xab*vdx+yab*vdy+zab*vdz -+ rvcd=xac*vdx+yac*vdy+zac*vdz -+ rvcb=xac*vbx+yac*vby+zac*vbz -+ rvdb=xad*vbx+yad*vby+zad*vbz -+ rvdc=xad*vcx+yad*vcy+zad*vcz -+ -+c calculate atomic forces -+ -+ fbx=gamb*(-cosb*xab*rrab**2+rrab*(rub*ubx+rvb*vbx)/wwb) -+ x +(ruc*ucn*rrab*(xac-ruc*ucx-(rbc-ruc*rubc)*xab*rrab**2) -+ x - rvc*vcn*rrab*(xac-rvc*vcx-(rbc-rvc*rvbc)*xab*rrab**2)) -+ x * gamc*rrac/wwc -+ x +(rud*udn*rrab*(xad-rud*udx-(rdb-rud*rubd)*xab*rrab**2) -+ x + rvd*vdn*rrab*(xad-rvd*vdx-(rdb-rvd*rvbd)*xab*rrab**2)) -+ x * gamd*rrad/wwd -+ -+ fby=gamb*(-cosb*yab*rrab**2+rrab*(rub*uby+rvb*vby)/wwb) -+ x +(ruc*ucn*rrab*(yac-ruc*ucy-(rbc-ruc*rubc)*yab*rrab**2) -+ x - rvc*vcn*rrab*(yac-rvc*vcy-(rbc-rvc*rvbc)*yab*rrab**2)) -+ x * gamc*rrac/wwc -+ x +(rud*udn*rrab*(yad-rud*udy-(rdb-rud*rubd)*yab*rrab**2) -+ x + rvd*vdn*rrab*(yad-rvd*vdy-(rdb-rvd*rvbd)*yab*rrab**2)) -+ x * gamd*rrad/wwd -+ -+ fbz=gamb*(-cosb*zab*rrab**2+rrab*(rub*ubz+rvb*vbz)/wwb) -+ x +(ruc*ucn*rrab*(zac-ruc*ucz-(rbc-ruc*rubc)*zab*rrab**2) -+ x - rvc*vcn*rrab*(zac-rvc*vcz-(rbc-rvc*rvbc)*zab*rrab**2)) -+ x * gamc*rrac/wwc -+ x +(rud*udn*rrab*(zad-rud*udz-(rdb-rud*rubd)*zab*rrab**2) -+ x + rvd*vdn*rrab*(zad-rvd*vdz-(rdb-rvd*rvbd)*zab*rrab**2)) -+ x * gamd*rrad/wwd -+ -+ fcx=gamc*(-cosc*xac*rrac**2+rrac*(ruc*ucx+rvc*vcx)/wwc) -+ x +(rud*udn*rrac*(xad-rud*udx-(rcd-rud*rucd)*xac*rrac**2) -+ x - rvd*vdn*rrac*(xad-rvd*vdx-(rcd-rvd*rvcd)*xac*rrac**2)) -+ x * gamd*rrad/wwd -+ x +(rub*ubn*rrac*(xab-rub*ubx-(rbc-rub*rucb)*xac*rrac**2) -+ x + rvb*vbn*rrac*(xab-rvb*vbx-(rbc-rvb*rvcb)*xac*rrac**2)) -+ x * gamb*rrab/wwb -+ -+ fcy=gamc*(-cosc*yac*rrac**2+rrac*(ruc*ucy+rvc*vcy)/wwc) -+ x +(rud*udn*rrac*(yad-rud*udy-(rcd-rud*rucd)*yac*rrac**2) -+ x - rvd*vdn*rrac*(yad-rvd*vdy-(rcd-rvd*rvcd)*yac*rrac**2)) -+ x * gamd*rrad/wwd -+ x +(rub*ubn*rrac*(yab-rub*uby-(rbc-rub*rucb)*yac*rrac**2) -+ x + rvb*vbn*rrac*(yab-rvb*vby-(rbc-rvb*rvcb)*yac*rrac**2)) -+ x * gamb*rrab/wwb -+ -+ fcz=gamc*(-cosc*zac*rrac**2+rrac*(ruc*ucz+rvc*vcz)/wwc) -+ x +(rud*udn*rrac*(zad-rud*udz-(rcd-rud*rucd)*zac*rrac**2) -+ x - rvd*vdn*rrac*(zad-rvd*vdz-(rcd-rvd*rvcd)*zac*rrac**2)) -+ x * gamd*rrad/wwd -+ x +(rub*ubn*rrac*(zab-rub*ubz-(rbc-rub*rucb)*zac*rrac**2) -+ x + rvb*vbn*rrac*(zab-rvb*vbz-(rbc-rvb*rvcb)*zac*rrac**2)) -+ x * gamb*rrab/wwb -+ -+ fdx=gamd*(-cosd*xad*rrad**2+rrad*(rud*udx+rvd*vdx)/wwd) -+ x +(rub*ubn*rrad*(xab-rub*ubx-(rdb-rub*rudb)*xad*rrad**2) -+ x - rvb*vbn*rrad*(xab-rvb*vbx-(rdb-rvb*rvdb)*xad*rrad**2)) -+ x * gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(xac-ruc*ucx-(rcd-ruc*rudc)*xad*rrad**2) -+ x + rvc*vcn*rrad*(xac-rvc*vcx-(rcd-rvc*rvdc)*xad*rrad**2)) -+ x * gamc*rrac/wwc -+ -+ fdy=gamd*(-cosd*yad*rrad**2+rrad*(rud*udy+rvd*vdy)/wwd) -+ x +(rub*ubn*rrad*(yab-rub*uby-(rdb-rub*rudb)*yad*rrad**2) -+ x - rvb*vbn*rrad*(yab-rvb*vby-(rdb-rvb*rvdb)*yad*rrad**2)) -+ x * gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(yac-ruc*ucy-(rcd-ruc*rudc)*yad*rrad**2) -+ x + rvc*vcn*rrad*(yac-rvc*vcy-(rcd-rvc*rvdc)*yad*rrad**2)) -+ x * gamc*rrac/wwc -+ -+ fdz=gamd*(-cosd*zad*rrad**2+rrad*(rud*udz+rvd*vdz)/wwd) -+ x +(rub*ubn*rrad*(zab-rub*ubz-(rdb-rub*rudb)*zad*rrad**2) -+ x - rvb*vbn*rrad*(zab-rvb*vbz-(rdb-rvb*rvdb)*zad*rrad**2)) -+ x * gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(zac-ruc*ucz-(rcd-ruc*rudc)*zad*rrad**2) -+ x + rvc*vcn*rrad*(zac-rvc*vcz-(rcd-rvc*rvdc)*zad*rrad**2)) -+ x * gamc*rrac/wwc -+ -+ fax=-(fbx+fcx+fdx) -+ fay=-(fby+fcy+fdy) -+ faz=-(fbz+fcz+fdz) -+ -+ fxx(ia)=fxx(ia)+fax -+ fyy(ia)=fyy(ia)+fay -+ fzz(ia)=fzz(ia)+faz -+ -+ fxx(ib)=fxx(ib)+fbx -+ fyy(ib)=fyy(ib)+fby -+ fzz(ib)=fzz(ib)+fbz -+ -+ fxx(ic)=fxx(ic)+fcx -+ fyy(ic)=fyy(ic)+fcy -+ fzz(ic)=fzz(ic)+fcz -+ -+ fxx(id)=fxx(id)+fdx -+ fyy(id)=fyy(id)+fdy -+ fzz(id)=fzz(id)+fdz -+ -+c stress tensor calculation for inversion terms -+ -+ strs(1)=strs(1)+xab*fbx+xac*fcx+xad*fdx -+ strs(2)=strs(2)+yab*fbx+yac*fcx+yad*fdx -+ strs(3)=strs(3)+zab*fbx+zac*fcx+zad*fdx -+ strs(4)=strs(4)+yab*fby+yac*fcy+yad*fdy -+ strs(5)=strs(5)+yab*fbz+yac*fcz+yad*fdz -+ strs(6)=strs(6)+zab*fbz+zac*fcz+zad*fdz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then -+ -+c local energy (no virial) -+ -+ eng_loc=eng_loc+pterm -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fax -+ fyy_loc(ia)=fyy_loc(ia)+fay -+ fzz_loc(ia)=fzz_loc(ia)+faz -+ -+ fxx_loc(ib)=fxx_loc(ib)+fbx -+ fyy_loc(ib)=fyy_loc(ib)+fby -+ fzz_loc(ib)=fzz_loc(ib)+fbz -+ -+ fxx_loc(ic)=fxx_loc(ic)+fcx -+ fyy_loc(ic)=fyy_loc(ic)+fcy -+ fzz_loc(ic)=fzz_loc(ic)+fcz -+ -+ fxx_loc(id)=fxx_loc(id)+fdx -+ fyy_loc(id)=fyy_loc(id)+fdy -+ fzz_loc(id)=fzz_loc(id)+fdz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xab*fbx+xac*fcx+xad*fdx -+ strs_loc(2)=strs_loc(2)+yab*fbx+yac*fcx+yad*fdx -+ strs_loc(3)=strs_loc(3)+zab*fbx+zac*fcx+zad*fdx -+ strs_loc(4)=strs_loc(4)+yab*fby+yac*fcy+yad*fdy -+ strs_loc(5)=strs_loc(5)+yab*fbz+yac*fcz+yad*fdz -+ strs_loc(6)=strs_loc(6)+zab*fbz+zac*fcz+zad*fdz -+ -+ endif -+ -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ -+ enddo -+ enddo -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,443) -+ -+c global sum of four body potential and virial -+ -+ buffer(1)=engfbp -+ buffer(2)=virfbp -+ buffer(3)=fbp_fre -+ buffer(4)=fbp_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engfbp=buffer(1) -+ virfbp=buffer(2) -+ fbp_fre=buffer(3) -+ fbp_vir=buffer(4) -+ -+c sum up solvation energies -+ -+ if(lsolva)then -+ -+ call gdsum(en4_sol,mxtmls_sol4,buffer(1)) -+ if(lexcite)call gdsum(en4_exc,mxtmls_exc4,buffer(1)) -+ -+ endif -+ -+c restore coordinate array to original representation -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=xxx(i) -+ syy=yyy(i) -+ szz=zzz(i) -+ -+ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz -+ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz -+ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz -+ -+ endif -+ -+ enddo -+ -+c restore cell vector -+ -+ if(imcon.eq.0) then -+ cell(1)=0.d0 -+ cell(5)=0.d0 -+ cell(9)=0.d0 -+ endif -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine fbpfrc -+ -+ end module four_body_module -diff -urN dl_class_1.9.orig/srcmod/hkewald_module.f dl_class_1.9/srcmod/hkewald_module.f ---- dl_class_1.9.orig/srcmod/hkewald_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/hkewald_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1292 @@ -+ module hkewald_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining hautman-klein ewald sum arrays -+c copyright - daresbury laboratory -+c author - w. smith nov 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use exclude_module -+ use error_module -+ use pair_module -+ use property_module -+ use setup_module -+ -+ implicit none -+ -+ real(8), allocatable :: ahk(:),crn(:,:) -+ real(8), allocatable :: elc(:,:),els(:,:) -+ real(8), allocatable :: emc(:,:),ems(:,:) -+ real(8), allocatable :: zzn(:),zzd(:) -+ real(8), allocatable :: hon(:,:),znp(:,:) -+ real(8), allocatable :: dhn(:,:),zgs(:) -+ real(8), allocatable :: fon(:,:),zgc(:) -+ real(8), allocatable :: ckc(:),cks(:) -+ real(8), allocatable :: pp(:),sss(:) -+ -+ save ahk,crn,elc,els,emc,ems,zzn,zzd,hon,znp,dhn,zgs -+ save fon,zgc,ckc,cks,pp,sss -+ -+ contains -+ -+ subroutine alloc_hke_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=9 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (ahk(0:mxhko),crn(0:mxhko,0:mxhko),stat=fail(1)) -+ allocate (elc(mxewld,0:1),els(mxewld,0:1),stat=fail(2)) -+ allocate (emc(mxewld,0:kmaxb),ems(mxewld,0:kmaxb),stat=fail(3)) -+ allocate (zzn(mxxdf),zzd(mxxdf),stat=fail(4)) -+ allocate (hon(mxgrid,0:mxhko),znp(mxhke,0:2*mxhko),stat=fail(5)) -+ allocate (dhn(mxgrid,0:mxhko),zgs(0:2*mxhko),stat=fail(6)) -+ allocate (fon(mxegrd,0:7),zgc(0:2*mxhko),stat=fail(7)) -+ allocate (ckc(mxewld),cks(mxewld),stat=fail(8)) -+ allocate (pp(2*mxhko),sss(mxxdf),stat=fail(9)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1730) -+ enddo -+ -+ end subroutine alloc_hke_arrays -+ -+ subroutine hkgen(idnode,nhko,nlatt,alpha,drewd,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for generating convergence function -+c arrays for hautman klein ewald method (up to order 3 only) -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith february 2000 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,idnode,nhko,nlatt,k -+ real(8) alpha,drewd,rcut,ecut,den,fac,ss1,aaa,ss2 -+ -+ if(nhko.gt.mxhko)call error(idnode,332) -+ -+c define effective cutoff -+ -+ ecut=rcut*dble(2*nlatt+1) -+ -+c define grid resolution for potential arrays -+ -+ drewd=ecut/dble(mxegrd-4) -+ -+c calculate HKE coefficients -+ -+ ahk(0)=1.d0 -+ -+ do i=1,nhko -+ -+ ahk(i)=-0.25d0*ahk(i-1)*dble(2*i*(2*i-1))/dble(i*i) -+ -+ enddo -+ -+c generate convergence function arrays -+ -+ do i=1,mxegrd -+ -+ hon(i,0)=0.d0 -+ hon(i,1)=dble(i-1)*drewd -+ hon(i,2)=(2.d0*alpha/sqrpi)*exp(-(alpha*hon(i,1))**2) -+ -+ enddo -+ -+c generate error function and derivatives by recursion -+ -+ do k=100,1,-1 -+ -+ den=1.d0/dble(2*k-1) -+ fac=(2.d0*alpha**2)**(k-1) -+ -+ do i=1,mxegrd -+ -+ hon(i,0)=den*(hon(i,0)*hon(i,1)**2+fac*hon(i,2)) -+ -+ enddo -+ -+ if(k.le.2*nhko+2)then -+ -+ do i=1,mxegrd -+ -+ fon(i,k-1)=hon(i,0) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c zeroth order function -+c note: hon(1,0)=2.d0*alpha/sqrpi -+ -+ do i=1,mxegrd -+ -+ hon(i,0)= fon(i,0) -+ dhn(i,0)=-fon(i,1) -+ -+ enddo -+ -+ if(nhko.eq.0)then -+ -+ ss1=dble(mxegrd-1)*drewd -+ aaa=abs(1.d0-hon(mxegrd,nhko)*ss1) -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,100,aaa,0.d0,0.d0) -+ -+ endif -+ -+ return -+ -+ endif -+ -+c first order function -+c note: hon(1,1)=8.d0*alpha**3/(3.d0*sqrpi) -+ -+ do i=1,mxegrd -+ -+ ss2=(dble(i-1)*drewd)**2 -+ -+ hon(i,1)=-(2.d0*fon(i,1)-fon(i,2)*ss2) -+ dhn(i,1)= (4.d0*fon(i,2)-fon(i,3)*ss2) -+ -+ enddo -+ -+ if(nhko.eq.1)then -+ -+ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,100,aaa,0.d0,0.d0) -+ -+ endif -+ -+ return -+ -+ endif -+ -+c second order function -+c note: hon(1,2)=64.d0*alpha**5/(45.d0*sqrpi) -+ -+ do i=1,mxegrd -+ -+ ss2=(dble(i-1)*drewd)**2 -+ -+ hon(i,2)=(8.d0*fon(i,2)+ss2*(-8.d0*fon(i,3)+ss2*fon(i,4)))/9.d0 -+ dhn(i,2)=(-24.d0*fon(i,3)+ss2*(12.d0*fon(i,4)-ss2*fon(i,5))) -+ x /9.d0 -+ -+ enddo -+ -+ if(nhko.eq.2)then -+ -+ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,100,aaa,0.d0,0.d0) -+ -+ endif -+ -+ return -+ -+ endif -+ -+c third order function (enough for anyone!) -+c note: hon(1,3)=768.d0*alpha**7/(14175.d0*sqrpi) -+ -+ do i=1,mxegrd -+ -+ ss2=(dble(i-1)*drewd)**2 -+ -+ hon(i,3)=-(48.d0*fon(i,3)+ss2*(-72.d0*fon(i,4)+ss2*( -+ x 18.d0*fon(i,5)-ss2*fon(i,6))))/225.d0 -+ dhn(i,3)= (192.d0*fon(i,4)+ss2*(-144.d0*fon(i,5)+ss2*( -+ x 24.d0*fon(i,6)-ss2*fon(i,7))))/225.d0 -+ -+ enddo -+ -+ if(nhko.eq.3)then -+ -+ aaa=abs(1.d0-hon(mxegrd,nhko)*sqrt(ss2)**(2*nhko+1)) -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,100,aaa,0.d0,0.d0) -+ -+ endif -+ -+ return -+ -+ endif -+ -+ return -+ end subroutine hkgen -+ -+ subroutine hkewald1 -+ x (idnode,mxnode,natms,imcon,nhko,kmax1,kmax2, -+ x engcpe,vircpe,alpha,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces in a -+c periodic system using Hautman Klein Ewald method -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith february 2000 -+c -+c part 1 - reciprocal space terms (fourier part) -+c -+c note - in loop over all k vectors k=2pi(ll/cl,mm/cl) -+c the values of ll and mm are selected so that the symmetry of -+c reciprocal lattice is taken into account i.e. the following -+c rules apply. -+c -+c ll ranges over the values 0 to kmax1 only. -+c -+c mm ranges over 1 to kmax2 when ll=0 and over -+c -kmax2 to kmax2 otherwise. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,mxnode,natms,imcon,nhko,kmax1,kmax2,i -+ integer iatm0,iatm1,j,k,limit,mmin,l,ll,m,mm,n -+ real(8) engcpe,vircpe,alpha,epsq,twopi,ralph,area,rarea -+ real(8) det,rcpcut,rcpct2,aaa,engsic,pm1,pm2,term,ssx,ssy -+ real(8) tmp,rkx1,rky1,rkx2,rky2,rksq,rkk,fac,eterm,fng,fn0,gaus -+ real(8) bkk,force0,forcez,pterm,scale,cprop,omg,cs -+c$$$ real(8) erfc -+ -+ dimension cprop(10),omg(9) -+ -+ save newjob,engsic -+ -+ data newjob/.true./ -+ -+c initialise coulombic potential energy -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ if(alpha.lt.1.d-8)return -+ -+c set working parameters -+ -+ twopi=2.d0*pi -+ ralph=0.5d0/alpha -+ call dcell(cell,cprop) -+ area=cprop(1)*cprop(2)*sqrt(1.d0-cprop(4)**2) -+ rarea=pi/area -+ -+c set up atoms numbers for nodes -+ -+ iatm0 = (idnode*natms)/mxnode + 1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+c initalize stress tensor working arrays -+ -+ do i = 1,9 -+ -+ omg(i) = 0.d0 -+ -+ enddo -+ -+c construct reciprocal lattice vectors and set k vector range -+ -+ call invert(cell,rcell,det) -+ if(abs(det).lt.1.d-6)call error(idnode,120) -+ call dcell(rcell,cprop) -+ rcpcut=min(dble(kmax1)*cprop(7),dble(kmax2)*cprop(8))* -+ x 1.05d0*twopi -+ rcpct2=rcpcut**2 -+ -+c compute quantities for first entry -+ -+ if(newjob)then -+ -+ newjob=.false. -+ -+c pbc check and array bound checks -+ -+ if(imcon.ne.6)call error(idnode,66) -+ if(mxhke.ne.msatms) call error(idnode,331) -+ if(mxewld.ne.msatms) call error(idnode,330) -+ -+c check hk screening function at cutoff -+ -+ aaa=cerfr(ralph,rcpcut) -+c$$$ aaa=erfc(ralph*rcpcut)/rcpcut -+ -+ if(aaa.gt.1.d-4)then -+ -+ call warning(idnode,105,aaa,0.d0,0.d0) -+c call error(idnode,487) -+ -+ endif -+ -+c calculate self interaction correction -+ -+ engsic=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ engsic=engsic+chge(i)**2 -+ -+ enddo -+ -+ engsic=-r4pie0*alpha*engsic/(sqrpi*epsq) -+ -+c binomial coefficients -+ -+ k=0 -+ crn(0,0)=0.5d0 -+ do i=1,2*nhko -+ -+ pp(i)=1.d0 -+ pm1=pp(1) -+ -+ do j=2,i -+ -+ pm2=pp(j) -+ pp(j)=pm2+pm1 -+ pm1=pm2 -+ -+ enddo -+ -+ if(mod(i,2).eq.0)then -+ -+ k=k+1 -+ do j=0,k -+ -+ term=pp(j+1)*(-1.d0)**j -+ crn(j,k)=term -+ crn(k,j)=term -+ -+ enddo -+ -+ crn(k,k)=0.5d0*crn(k,k) -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+c calculate and store powers of z_i -+ -+ i=0 -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ znp(i,0)=1.d0 -+ znp(i,1)=zzz(j) -+ -+ enddo -+ -+ limit=i -+ -+ do k=2,2*nhko -+ -+ do i=1,limit -+ -+ znp(i,k)=znp(i,k-1)*znp(i,1) -+ -+ enddo -+ -+ enddo -+ -+c calculate and store exponential factors -+ -+ i=0 -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ elc(i,0)=1.d0 -+ emc(i,0)=1.d0 -+ els(i,0)=0.d0 -+ ems(i,0)=0.d0 -+ ssx=rcell(1)*xxx(j)+rcell(4)*yyy(j) -+ ssy=rcell(2)*xxx(j)+rcell(5)*yyy(j) -+ elc(i,1)=cos(twopi*ssx) -+ emc(i,1)=cos(twopi*ssy) -+ els(i,1)=sin(twopi*ssx) -+ ems(i,1)=sin(twopi*ssy) -+ -+ enddo -+ -+ do l=2,kmax2 -+ -+ do i=1,limit -+ -+ emc(i,l)=emc(i,l-1)*emc(i,1)-ems(i,l-1)*ems(i,1) -+ ems(i,l)=ems(i,l-1)*emc(i,1)+emc(i,l-1)*ems(i,1) -+ -+ enddo -+ -+ enddo -+ -+c start of main loop over k vectors -+ -+ mmin=1 -+ -+ do ll=0,kmax1 -+ -+ l=ll -+ tmp = twopi*dble(ll) -+ rkx1=tmp*rcell(1) -+ rky1=tmp*rcell(4) -+ -+c put cos(i,L) terms into cos(i,0) array -+ -+ if(l.eq.1) then -+ -+ do i=1,limit -+ -+ elc(i,0)=elc(i,1) -+ els(i,0)=els(i,1) -+ -+ enddo -+ -+ elseif(l.gt.1) then -+ -+ do i=1,limit -+ -+ cs=elc(i,0) -+ elc(i,0)=cs*elc(i,1)-els(i,0)*els(i,1) -+ els(i,0)=els(i,0)*elc(i,1)+cs*els(i,1) -+ -+ enddo -+ -+ endif -+ -+ do mm=mmin,kmax2 -+ -+ m=iabs(mm) -+ tmp = twopi*dble(mm) -+ rkx2=rkx1+tmp*rcell(2) -+ rky2=rky1+tmp*rcell(5) -+ -+c test on magnitude of k vector -+ -+ rksq=rkx2*rkx2+rky2*rky2 -+ -+ if(rksq.le.rcpct2)then -+ -+c calculate exp(ikr) terms and product with charges -+ -+ i=0 -+ -+ if(mm.ge.0)then -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ ckc(i)=chge(j)*(elc(i,0)*emc(i,m)-els(i,0)*ems(i,m)) -+ cks(i)=chge(j)*(els(i,0)*emc(i,m)+ems(i,m)*elc(i,0)) -+ -+ enddo -+ -+ else -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ -+ ckc(i)=chge(j)*(elc(i,0)*emc(i,m)+els(i,0)*ems(i,m)) -+ cks(i)=chge(j)*(els(i,0)*emc(i,m)-ems(i,m)*elc(i,0)) -+ -+ enddo -+ -+ endif -+ -+c calculate sum of products of powers of z_i and q_i exp(ik.s_i) -+ -+ do k=0,2*nhko -+ -+ zgc(k)=0.d0 -+ zgs(k)=0.d0 -+ -+ do i=1,limit -+ -+ zgc(k)=zgc(k)+ckc(i)*znp(i,k) -+ zgs(k)=zgs(k)+cks(i)*znp(i,k) -+ -+ enddo -+ -+ enddo -+ -+c perform global summation of zgc and zgs arrays -+ -+ if(mxnode.gt.1)then -+ -+ call gdsum(zgc(0),2*nhko+1,buffer) -+ call gdsum(zgs(0),2*nhko+1,buffer) -+ -+ endif -+ -+c calculate 0th order screening function -+ -+ rkk=sqrt(rksq) -+ fn0=cerfr(ralph,rkk) -+c$$$ fn0=erfc(ralph*rkk)/rkk -+ gaus=exp(-(ralph*rkk)**2)/(alpha*sqrpi) -+ -+c sum terms for orders of the screening function -+ -+ fac=1.d0 -+ -+ do k=0,nhko -+ -+c sum over z_i binomial contributions -+ -+ eterm=0.d0 -+ fng=fac*fn0 -+ do m=0,k -+ -+ n=2*k-m -+ -+c sum energy terms -+ -+ eterm=eterm+crn(m,k)*(zgc(m)*zgc(n)+zgs(m)*zgs(n)) -+ -+c calculate force contribution to each site -+ -+ i=0 -+ bkk=-fng*crn(m,k) -+ -+ do j=iatm0,iatm1 -+ -+ i=i+1 -+ force0=bkk*(znp(i,n)*(zgs(m)*ckc(i)-zgc(m)*cks(i))+ -+ x znp(i,m)*(zgs(n)*ckc(i)-zgc(n)*cks(i))) -+ fxx(j)=fxx(j)+rkx2*force0 -+ fyy(j)=fyy(j)+rky2*force0 -+ -+ omg(3)=omg(3)+rkx2*force0*zzz(j) -+ omg(6)=omg(6)+rky2*force0*zzz(j) -+ -+ if(k.gt.0)then -+ -+ if(m.eq.0)then -+ -+ forcez=bkk*dble(n)*znp(i,n-1)*(zgc(m)*ckc(i)+ -+ x zgs(m)*cks(i)) -+ -+ else -+ -+ forcez=bkk*(dble(m)*znp(i,m-1)*(zgc(n)*ckc(i)+ -+ x zgs(n)*cks(i))+dble(n)*znp(i,n-1)*(zgc(m)* -+ x ckc(i)+zgs(m)*cks(i))) -+ -+ endif -+ -+ omg(9)=omg(9)+forcez*zzz(j) -+ fzz(j)=fzz(j)+forcez -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c accumulate potential energy and stress tensor -+ -+ engcpe=engcpe+fng*eterm -+ pterm=(dble(2*k-1)*fng-fac*gaus)/rksq -+ omg(1)=omg(1)+eterm*(fng+pterm*rkx2*rkx2) -+ omg(5)=omg(5)+eterm*(fng+pterm*rky2*rky2) -+ omg(2)=omg(2)+eterm*pterm*rky2*rkx2 -+ fac=fac*rksq/(dble(2*(k+1))*dble(2*k+1)) -+ -+c end of loop over orders of screening function -+ -+ enddo -+ -+c end of if-block for rksq < rcpct2 -+ -+ endif -+ -+c end of inner loop over reciprocal lattice vectors -+ -+ enddo -+ -+ mmin=-kmax2 -+ -+c end of outer loop over reciprocal lattice vectors -+ -+ enddo -+ -+ engcpe=engcpe/dble(mxnode) -+ do i = 1,9 -+ -+ omg(i) = omg(i)/dble(mxnode) -+ -+ enddo -+ -+c add self interaction correction to potential -+ -+ scale=4.d0*rarea*r4pie0/epsq -+ engcpe=scale*engcpe+engsic -+ -+c virial term -+ -+ vircpe=vircpe-scale*(omg(1)+omg(5)+omg(9)) -+ -+c calculate final forces -+ -+ do i=iatm0,iatm1 -+ -+ fxx(i)=scale*fxx(i) -+ fyy(i)=scale*fyy(i) -+ fzz(i)=scale*fzz(i) -+ -+ enddo -+ -+c calculate stress tensor (symmetrical) -+ -+ stress(1) = stress(1)+scale*omg(1) -+ stress(2) = stress(2)+scale*omg(2) -+ stress(3) = stress(3)+scale*omg(3) -+ stress(4) = stress(4)+scale*omg(2) -+ stress(5) = stress(5)+scale*omg(5) -+ stress(6) = stress(6)+scale*omg(6) -+ stress(7) = stress(7)+scale*omg(3) -+ stress(8) = stress(8)+scale*omg(6) -+ stress(9) = stress(9)+scale*omg(9) -+ -+ return -+ end subroutine hkewald1 -+ -+ subroutine hkewald2 -+ x (idnode,mxnode,nhko,nlatt,imcon,natms,engcpe, -+ x vircpe,drewd,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating real-space contributions to -+c the hautman-klein-ewald electrostatic method -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith may 2000 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,nhko,nlatt,imcon,natms,nix,niy -+ integer nboxes,i,j,k,n,m,ma,mpm2,npm2,ii,l0,l1,l2,last -+ real(8) engcpe,vircpe,drewd,rcut,epsq -+ real(8) step,rcsq,rdrewd,strs1,strs2,strs3 -+ real(8) strs5,strs6,strs9,dcx,dcy,udx,udy,fac,chgea,chgprd -+ real(8) ddx,ddy,ssx,ssy,ssq,coul,fcoul,rrr,ppp,vk0,vk1,vk2 -+ real(8) eterm,t1,t2,egamma,fx,fy,fz,det -+ -+ dimension nix(25),niy(25) -+ -+ data nix/ 0, 1, 1, 0,-1,-1,-1, 0, 1, 2, 2, -+ x 2, 1, 0,-1,-2,-2,-2,-2,-2,-1, 0, 1, 2, 2/ -+ data niy/ 0, 0, 1, 1, 1, 0,-1,-1,-1, 0, 1, -+ x 2, 2, 2, 2, 2, 1, 0,-1,-2,-2,-2,-2,-2,-1/ -+ -+CDIR$ CACHE_ALIGN fi -+ -+c check boundary condition -+ -+ if(imcon.ne.6)call error(idnode,66) -+ -+c number of neighbouring real space cells -+ -+ if(nlatt.gt.2)call error(idnode,488) -+ step=dble(2*nlatt+1) -+ nboxes=(2*nlatt+1)**2 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c set cutoff condition for pair forces -+ -+ rcsq=(step*rcut)**2 -+ -+c reciprocal of interpolation interval -+ -+ rdrewd = 1.d0/drewd -+ -+c reciprocal cell -+ -+ call invert(cell,rcell,det) -+ do i=1,9 -+ -+ rcell(i)=rcell(i)/step -+ -+ enddo -+ -+c initialise stress tensor accumulators -+ strs3 = 0.d0 -+ strs6 = 0.d0 -+ strs9 = 0.d0 -+ strs1 = 0.d0 -+ strs2 = 0.d0 -+ strs5 = 0.d0 -+ -+c loop over image cells, starting with central cell -+ -+ ma=1 -+ mpm2=natms/2 -+ npm2=(natms-1)/2 -+ -+ do k=1,nboxes -+ -+ last=natms -+ dcx=dble(nix(k)) -+ dcy=dble(niy(k)) -+ udx=cell(1)*dcx+cell(4)*dcy -+ udy=cell(2)*dcx+cell(5)*dcy -+ -+c outer loop over atoms -+ -+ do m=ma,mpm2 -+ -+ fac=r4pie0/epsq -+ if(m.eq.0)fac=fac*0.5d0 -+ if(m.gt.npm2)last=mpm2 -+ -+c set initial array values -+ -+ ii=0 -+ do i=idnode+1,last,mxnode -+ -+ ii=ii+1 -+ chgea=fac*chge(i) -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ chgprd=chgea*chge(j) -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+ zzn(ii)=1.d0 -+ zzd(ii)=0.d0 -+ -+c calculate interatomic separation -+ -+ ddx=xxx(i)-xxx(j)+udx -+ ddy=yyy(i)-yyy(j)+udy -+ ssx=rcell(1)*ddx+rcell(4)*ddy -+ ssy=rcell(2)*ddx+rcell(5)*ddy -+ ssx=ssx-nint(ssx) -+ ssy=ssy-nint(ssy) -+ xdf(ii)=step*(ssx*cell(1)+ssy*cell(4)) -+ ydf(ii)=step*(ssx*cell(2)+ssy*cell(5)) -+ zdf(ii)=zzz(i)-zzz(j) -+ rsqdf(ii)=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c loop over HK orders -+ -+ do n=0,nhko -+ -+c inner loop over atoms -+ -+ ii=0 -+ do i=idnode+1,last,mxnode -+ -+ ii=ii+1 -+ chgea = fac*chge(i) -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ chgprd=chgea*chge(j) -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+c apply truncation of potential -+ -+ ssq=rsqdf(ii)-zdf(ii)*zdf(ii) -+ -+ if(rcsq.gt.ssq)then -+ -+c calculate potential energy and virial -+ -+ coul=0.d0 -+ fcoul=0.d0 -+ rrr = sqrt(rsqdf(ii)) -+ sss(ii)=sqrt(ssq) -+ -+ if(n.eq.0)then -+ -+ coul = chgprd/rrr -+ fcoul = coul/rsqdf(ii) -+ -+ endif -+ -+c interpolation parameters -+ -+ l0=int(sss(ii)*rdrewd) -+ ppp=sss(ii)*rdrewd-dble(l0) -+ l0=l0+1 -+ l1=l0+1 -+ l2=l0+2 -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0 = hon(l0,n) -+ vk1 = hon(l1,n) -+ vk2 = hon(l2,n) -+ t1 = vk0 + (vk1 - vk0)*ppp -+ t2 = vk1 + (vk2 - vk1)*(ppp - 1.0d0) -+ -+ eterm=(t1+(t2-t1)*ppp*0.5d0)*ahk(n)*chgprd -+ engcpe=engcpe+coul-eterm*zzn(ii) -+ -+c calculate forces using 3pt interpolation -+ -+ vk0 = dhn(l0,n) -+ vk1 = dhn(l1,n) -+ vk2 = dhn(l2,n) -+ -+ t1 = vk0 + (vk1 - vk0)*ppp -+ t2 = vk1 + (vk2 - vk1)*(ppp - 1.0d0) -+ -+c calculate in-plane forces -+ -+ egamma=fcoul+ -+ x (t1+(t2-t1)*ppp*0.5d0)*chgprd*zzn(ii)*ahk(n) -+ fx=egamma*xdf(ii) -+ fy=egamma*ydf(ii) -+ -+c calculate perpendicular forces -+ -+ fz=fcoul*zdf(ii)+2.d0*dble(n)*eterm*zzd(ii) -+ -+c add to force accumulators -+ -+ fxx(i)=fxx(i)+fx -+ fyy(i)=fyy(i)+fy -+ fzz(i)=fzz(i)+fz -+ -+ fxx(j)=fxx(j)-fx -+ fyy(j)=fyy(j)-fy -+ fzz(j)=fzz(j)-fz -+ -+c reset zzn array for next order of convergence function -+ -+ zzd(ii)=zzn(ii)*zdf(ii) -+ zzn(ii)=zzd(ii)*zdf(ii) -+ -+c calculate stress tensor -+ -+ strs1 = strs1 + xdf(ii)*fx -+ strs2 = strs2 + xdf(ii)*fy -+ strs3 = strs3 + xdf(ii)*fz -+ strs5 = strs5 + ydf(ii)*fy -+ strs6 = strs6 + ydf(ii)*fz -+ strs9 = strs9 + zdf(ii)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ ma=0 -+ -+ enddo -+ -+c calculate virial -+ -+ vircpe=vircpe-(strs1+strs5+strs9) -+ -+c complete stress tensor -+ -+ stress(1) = stress(1) + strs1 -+ stress(2) = stress(2) + strs2 -+ stress(3) = stress(3) + strs3 -+ stress(4) = stress(4) + strs2 -+ stress(5) = stress(5) + strs5 -+ stress(6) = stress(6) + strs6 -+ stress(7) = stress(7) + strs3 -+ stress(8) = stress(8) + strs6 -+ stress(9) = stress(9) + strs9 -+ -+ return -+ end subroutine hkewald2 -+ -+ subroutine hkewald3(iatm,ik,engcpe,vircpe,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating exclusion corrections to -+c the hautman-klein-ewald electrostatic method -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith may 2000 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer iatm,ik,m,jatm -+ real(8) engcpe,vircpe,epsq,fx,fy,fz,strs1,strs2,strs3 -+ real(8) strs5,strs6,strs9,chgea,chgprd,rrr,rsq,coul,fcoul -+ -+CDIR$ CACHE_ALIGN fi -+ -+c initialise stress tensor accumulators -+ -+ strs1 = 0.d0 -+ strs2 = 0.d0 -+ strs3 = 0.d0 -+ strs5 = 0.d0 -+ strs6 = 0.d0 -+ strs9 = 0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ chgea=chge(iatm)/epsq*r4pie0 -+ -+ if(abs(chgea).gt.1.d-10)then -+ -+ do m=1,nexatm(ik) -+ -+c atomic index and charge product -+ -+ jatm=lexatm(ik,m) -+ chgprd=chgea*chge(jatm) -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=xdf(m)**2+ydf(m)**2+zdf(m)**2 -+ rrr = sqrt(rsq) -+ -+c calculate potential energy and virial -+ -+ coul = chgprd/rrr -+ engcpe = engcpe - coul -+ -+c calculate forces -+ -+ fcoul = coul/rsq -+ fx = fcoul*xdf(m) -+ fy = fcoul*ydf(m) -+ fz = fcoul*zdf(m) -+ -+ fxx(iatm) = fxx(iatm) - fx -+ fyy(iatm) = fyy(iatm) - fy -+ fzz(iatm) = fzz(iatm) - fz -+ -+ fxx(jatm) = fxx(jatm) + fx -+ fyy(jatm) = fyy(jatm) + fy -+ fzz(jatm) = fzz(jatm) + fz -+ -+c calculate stress tensor -+ -+ strs1 = strs1 - xdf(m)*fx -+ strs2 = strs2 - xdf(m)*fy -+ strs3 = strs3 - xdf(m)*fz -+ strs5 = strs5 - ydf(m)*fy -+ strs6 = strs6 - ydf(m)*fz -+ strs9 = strs9 - zdf(m)*fz -+ -+ endif -+ -+ enddo -+ -+c virial -+ -+ vircpe=vircpe-engcpe -+ -+c complete stress tensor -+ -+ stress(1) = stress(1) + strs1 -+ stress(2) = stress(2) + strs2 -+ stress(3) = stress(3) + strs3 -+ stress(4) = stress(4) + strs2 -+ stress(5) = stress(5) + strs5 -+ stress(6) = stress(6) + strs6 -+ stress(7) = stress(7) + strs3 -+ stress(8) = stress(8) + strs6 -+ stress(9) = stress(9) + strs9 -+ -+ endif -+ -+ return -+ end subroutine hkewald3 -+ -+ subroutine hkewald4(iatm,ik,engcpe,vircpe,engcpl,vircpl,rcut,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces in a -+c periodic system using the hautman-klein-ewald method -+c -+c modified to allow direct calculation of primary (short-range) -+c interactions for multiple-time step corrections -+ -+c primary neighbours are taken out of the Ewald sum -+c electrostatics are evaluated directly instead -+c -+c parallel replicated data version - real space terms -+c -+c copyright - daresbury laboratory 2000 -+c author - w. smith july 2000 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer iatm,ik,m,jatm -+ real(8) engcpe,vircpe,engcpl,vircpl,rcut,epsq -+ real(8) fi,fli,rcsq,strs1,strs2,strs3,strs5,strs6 -+ real(8) strs9,strl1,strl2,strl3,strl5,strl6,strl9,chgea,chgprd -+ real(8) rsq,rrr,coul,egamma,fx,fy,fz -+ -+ dimension fi(3),fli(3) -+ -+CDIR$ CACHE_ALIGN fi -+CDIR$ CACHE_ALIGN fli -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+ engcpl=0.d0 -+ vircpl=0.d0 -+ -+c initialise stress tensor accumulators -+ -+ strs1 = 0.d0 -+ strs2 = 0.d0 -+ strs3 = 0.d0 -+ strs5 = 0.d0 -+ strs6 = 0.d0 -+ strs9 = 0.d0 -+ strl1 = 0.d0 -+ strl2 = 0.d0 -+ strl3 = 0.d0 -+ strl5 = 0.d0 -+ strl6 = 0.d0 -+ strl9 = 0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ chgea=chge(iatm)/epsq*r4pie0 -+ if(abs(chgea).gt.1.d-10)then -+ -+c temporary arrays for cache aligning -+ -+ fi(1) = fxx(iatm) -+ fi(2) = fyy(iatm) -+ fi(3) = fzz(iatm) -+ -+ fli(1) = flx(iatm) -+ fli(2) = fly(iatm) -+ fli(3) = flz(iatm) -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ jatm=ilist(m) -+ chgprd=chgea*chge(jatm) -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ -+ if(rcsq.gt.rsq)then -+ -+c coulombic energy -+ -+ rrr = sqrt(rsq) -+ coul = chgprd/rrr -+ -+c sum contributions to the totals -+ -+ engcpe = engcpe + coul -+ engcpl = engcpl - coul -+ vircpe = vircpe - coul -+ vircpl = vircpl + coul -+ -+c calculate coulombic forces -+ -+ egamma = coul/rsq -+ -+ fx = egamma*xdf(m) -+ fy = egamma*ydf(m) -+ fz = egamma*zdf(m) -+ -+c add in contributions to instantaneous force -+ -+ fi(1) = fi(1) + fx -+ fi(2) = fi(2) + fy -+ fi(3) = fi(3) + fz -+ -+ fxx(jatm) = fxx(jatm) - fx -+ fyy(jatm) = fyy(jatm) - fy -+ fzz(jatm) = fzz(jatm) - fz -+ -+c add in contributions to the long-range force -+ -+ fli(1) = fli(1) - fx -+ fli(2) = fli(2) - fy -+ fli(3) = fli(3) - fz -+ -+ flx(jatm) = flx(jatm) + fx -+ fly(jatm) = fly(jatm) + fy -+ flz(jatm) = flz(jatm) + fz -+ -+c calculate long and short range stress tensors -+ -+ strs1 = strs1 + xdf(m)*fx -+ strl1 = strl1 - xdf(m)*fx -+ strs2 = strs2 + xdf(m)*fy -+ strl2 = strl2 - xdf(m)*fy -+ strs3 = strs3 + xdf(m)*fz -+ strl3 = strl3 - xdf(m)*fz -+ strs5 = strs5 + ydf(m)*fy -+ strl5 = strl5 - ydf(m)*fy -+ strs6 = strs6 + ydf(m)*fz -+ strl6 = strl6 - ydf(m)*fz -+ strs9 = strs9 + zdf(m)*fz -+ strl9 = strl9 - zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c copy back temporaries -+ -+ fxx(iatm) = fi(1) -+ fyy(iatm) = fi(2) -+ fzz(iatm) = fi(3) -+ -+ flx(iatm) = fli(1) -+ fly(iatm) = fli(2) -+ flz(iatm) = fli(3) -+ -+c complete stress tensor -+ -+ stresl(1) = stresl(1) + strl1 -+ stresl(2) = stresl(2) + strl2 -+ stresl(3) = stresl(3) + strl3 -+ stresl(4) = stresl(4) + strl2 -+ stresl(5) = stresl(5) + strl5 -+ stresl(6) = stresl(6) + strl6 -+ stresl(7) = stresl(7) + strl3 -+ stresl(8) = stresl(8) + strl6 -+ stresl(9) = stresl(9) + strl9 -+ -+ stress(1) = stress(1) + strs1 -+ stress(2) = stress(2) + strs2 -+ stress(3) = stress(3) + strs3 -+ stress(4) = stress(4) + strs2 -+ stress(5) = stress(5) + strs5 -+ stress(6) = stress(6) + strs6 -+ stress(7) = stress(7) + strs3 -+ stress(8) = stress(8) + strs6 -+ stress(9) = stress(9) + strs9 -+ -+ endif -+ -+ return -+ end subroutine hkewald4 -+ -+ function cerfr(alpha,rrr) -+ -+c*********************************************************************** -+c -+c dl_poly function for generating complementary error function -+c divided by r -+c -+c copyright - daresbury laboratory 2001 -+c author - w. smith february 2001 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer k -+ real(8) cerfr,sqrpi,h0,h1,alpha,rrr,rr2,fac -+ -+ sqrpi=1.7724538509055159d0 -+ -+c starting values -+ -+ h0=0.d0 -+ h1=(2.d0*alpha/sqrpi)*exp(-(alpha*rrr)**2) -+ -+c generate function by recursion -+ -+ rr2=rrr*rrr -+ do k=100,1,-1 -+ -+ fac=(2.d0*alpha**2)**(k-1) -+ h0=(h0*rr2+fac*h1)/dble(2*k-1) -+ -+ enddo -+ -+ cerfr=1.d0/rrr-h0 -+ -+ return -+ end function cerfr -+ -+ end module hkewald_module -+ -diff -urN dl_class_1.9.orig/srcmod/hyper_dynamics_module.f dl_class_1.9/srcmod/hyper_dynamics_module.f ---- dl_class_1.9.orig/srcmod/hyper_dynamics_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/hyper_dynamics_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,2821 @@ -+ module hyper_dynamics_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining hyperdynamics routines -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use forces_module -+ use nlist_builders_module -+ use optimiser_module -+ use property_module -+ use setup_module -+ use shake_module -+ use temp_scalers_module -+ use vv_motion_module -+ -+ implicit none -+ -+ integer, parameter :: mxtrn=10 -+ integer, parameter :: mxbsn=1000 -+ integer, parameter :: mxneb=8 -+ integer, parameter :: mxdiffs=300 -+ integer, parameter :: hyper_tag=35000 -+ -+ integer numbsn,numpro,numtrk,ndiff,maxtrk,numdark,home_bsn,numbpd -+ integer nbsa(mxbsn),nbsb(mxbsn),ktrn(mxtrn) -+ real(8) xtrn(mxtrn),ytrn(mxtrn) -+ real(8) tstop,tkeres,timhyp,timres,tboost,boost,vbase -+ -+ integer, allocatable :: idabsn(:),keymin(:) -+ real(8), allocatable :: xbas(:),ybas(:),zbas(:) -+ real(8), allocatable :: xchk(:),ychk(:),zchk(:) -+ real(8), allocatable :: xres(:),yres(:),zres(:) -+ real(8), allocatable :: vxrs(:),vyrs(:),vzrs(:) -+ real(8), allocatable :: fxrs(:),fyrs(:),fzrs(:) -+ real(8), allocatable :: xhyp(:),yhyp(:),zhyp(:) -+ real(8), allocatable :: vxhp(:),vyhp(:),vzhp(:) -+ real(8), allocatable :: fxhp(:),fyhp(:),fzhp(:) -+ real(8), allocatable :: xdiffs(:),ydiffs(:),zdiffs(:) -+ real(8), allocatable :: celneb(:,:),path(:),optk(:,:) -+ real(8), allocatable :: xneb(:),yneb(:),zneb(:),engneb(:) -+ real(8), allocatable :: fxneb(:),fyneb(:),fzneb(:) -+ real(8), allocatable :: hxneb(:),hyneb(:),hzneb(:) -+ real(8), allocatable :: taux(:),tauy(:),tauz(:) -+ real(8), allocatable :: track(:) -+ -+ integer bsn_1(maxneb),bsn_2(maxneb) -+ real(8) strhyp(9),strres(9),engbsn(2) -+ real(8) celbas(9),celhyp(9),celchk(9),celres(9) -+ -+ save numbsn,numtrk,numpro,ndiff,numdark,timres -+ save xbas,ybas,zbas,xchk,ychk,zchk,timhyp,vbase -+ save xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs -+ save xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp -+ save celbas,celhyp,celres,celchk,strhyp,strres -+ save idabsn,nbsa,nbsb,xdiffs,ydiffs,zdiffs,tkeres -+ save xneb,yneb,zneb,engneb,taux,tauy,tauz,keymin -+ save fxneb,fyneb,fzneb,hxneb,hyneb,hzneb,path -+ save optk,tstop,tboost,boost,numbpd -+ -+ contains -+ -+ subroutine alloc_hyper_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining hyperdynamics arrays and -+c initialising control variables -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ -+ integer i,fail,idnode,nebmax -+ dimension fail(nnn) -+ -+ nebmax=msatms*(mxneb+1) -+ -+c initialise control variables -+ -+ numbpd=0 -+ numtrk=0 -+ numbsn=0 -+ numpro=0 -+ ndiff=0 -+ numdark=0 -+ home_bsn=0 -+ tkeres=0.d0 -+ tstop=1.d30 -+ timhyp=0.d0 -+ timres=0.d0 -+ boost=1.d0 -+ tboost=0.d0 -+ vbase=-huge(1.d0) -+ do i=1,maxneb -+ bsn_1(i)=0 -+ bsn_2(i)=0 -+ enddo -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (xbas(msatms),ybas(msatms),zbas(msatms),stat=fail(1)) -+ allocate (xchk(msatms),ychk(msatms),zchk(msatms),stat=fail(2)) -+ allocate (xres(msatms),yres(msatms),zres(msatms),stat=fail(3)) -+ allocate (vxrs(msatms),vyrs(msatms),vzrs(msatms),stat=fail(4)) -+ allocate (fxrs(msatms),fyrs(msatms),fzrs(msatms),stat=fail(5)) -+ allocate (xhyp(msatms),yhyp(msatms),zhyp(msatms),stat=fail(6)) -+ allocate (vxhp(msatms),vyhp(msatms),vzhp(msatms),stat=fail(7)) -+ allocate (fxhp(msatms),fyhp(msatms),fzhp(msatms),stat=fail(8)) -+ allocate (xdiffs(mxdiffs),ydiffs(mxdiffs),zdiffs(mxdiffs), -+ x stat=fail(9)) -+ allocate (idabsn(mxdiffs),keymin(0:mxneb),stat=fail(10)) -+ allocate (xneb(nebmax),yneb(nebmax),zneb(nebmax),stat=fail(11)) -+ allocate (fxneb(nebmax),fyneb(nebmax),fzneb(nebmax),stat=fail(12)) -+ allocate (taux(msatms),tauy(msatms),tauz(msatms),stat=fail(13)) -+ allocate (engneb(0:mxneb),celneb(9,0:mxneb),path(0:mxneb), -+ x stat=fail(14)) -+ allocate (hxneb(nebmax),hyneb(nebmax),hzneb(nebmax),stat=fail(15)) -+ allocate (optk(5,0:mxneb),stat=fail(16)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)then -+ if(idnode.eq.0)write(nrite,'(10i5)')fail -+ call error(idnode,1115) -+ endif -+ enddo -+ -+ end subroutine alloc_hyper_arrays -+ -+ subroutine hyper_start -+ x (ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons,nstbgr, -+ x nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp, -+ x ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,ntcons,ntrack,alpha, -+ x delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol,rctter, -+ x rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,sigma, -+ x hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for starting a hyperdynamics simulation -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical ltad,lbpd,lfcap,lneut,lnsq,loglnk,lzeql,newlst,savflg -+ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt -+ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond -+ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,i,j -+ integer ntpvdw,ntshl,ntteth,numblock,iatm0,iatm1,ntcons -+ integer ktol,pass,fail,ntrack -+ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,engcfg -+ real(8) virlrc,cvgerr,dum,otol,cgerr,sigma,hyp_units -+ -+c allocate track array for BPD -+ -+ if(lbpd)then -+ allocate (track(0:nblock/ntrack),stat=fail) -+ endif -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c current block number -+ -+ numblock=nstep/nblock -+ -+c open hyperdynamics journal file -+ -+ if(idnode.eq.0) -+ x open(nevnt,file="EVENTS",form='formatted',position='append') -+ -+c set up hyperdynamics for simulation start -+ -+ if(nstep.eq.0)then -+ -+c initialise bias potential boost factor -+ -+ numbpd=0 -+ boost=1.d0 -+ tboost=0.d0 -+ -+c set basin difference markers -+ -+ do i=1,mxbsn -+ -+ nbsa(i)=0 -+ nbsb(i)=0 -+ -+ enddo -+ -+c store the starting configuration -+ -+ savflg=.true. -+ tkeres=sigma -+ call store_config(savflg,idnode,mxnode,natms,strres,celres, -+ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) -+ -+c minimise starting structure -+ -+ call define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,engcfg,cvgerr) -+ -+c define zero energy for BPD dynamics mode -+ -+ vbase=engcfg -+ -+c write events entry for minimisation -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x engcfg/hyp_units,cvgerr/hyp_units -+ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x engcfg/hyp_units,cvgerr/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+c save minimised starting structure as basin file -+ -+ call write_reference_config -+ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode,engcfg) -+ -+c save details of starting home basin -+ -+ engbsn(1)=engcfg -+ -+ do i=1,9 -+ celbas(i)=cell(i) -+ enddo -+ -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ enddo -+ -+c restore the starting configuration -+ -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strres,celres, -+ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) -+ -+ else -+ -+c restore previous data from hyperdynamics backup file -+ -+ call hyper_open(ltad,idnode,mxnode,natms,nsteql) -+ -+c reset home basin for hyperdynamics (home basin is 0 for TAD) -+ -+ if(lbpd)home_bsn=numbsn-1 -+ -+c store the current configuration -+ -+ savflg=.true. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+c read minimised starting structure from home basin file -+ -+ call read_reference_config -+ x ('CFGBSN','BASINS',nbsn,home_bsn,natms,imcon,idnode,engcfg) -+ -+c save details of current home basin -+ -+ engbsn(1)=engcfg -+ -+ do i=1,9 -+ celbas(i)=cell(i) -+ enddo -+ -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ enddo -+ -+c restore the current configuration -+ -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+ endif -+ -+ return -+ end subroutine hyper_start -+ -+ subroutine hyper_driver -+ x (seek,ltad,lbpd,recycle,lfcap,lneut,lnsq,loglnk,lzeql, -+ x newlst,prechk,tadall,nebgo,nblock,ntrack,idnode,imcon, -+ x keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3,multt, -+ x mxnode,natms,ngrp,ntcons,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth,blkout, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,engcfg,catchrad,sprneb,deltad,tlow,engtke, -+ x tolnce,hyp_units,ebias,vmin) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for implementing a hyperdynamics simulation -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 seek -+ logical lbpd,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb -+ logical lrefmin,same,savflg,recycle,scan,prechk,tadall,nebgo -+ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol,ntrack -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt -+ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond -+ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw -+ integer ntshl,ntteth,blkout,numblock,bsn1,bsn2,itrack -+ integer nturn,ntcons,mdiff,newbsn,iatm0,iatm1,pass,i,j,itrk -+ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,catchrad -+ real(8) cvgerr,estar,engcfg,cfgtmp,engcpe,engsrp,catch -+ real(8) vircpe,engmet,virmet,virlrc,engtbp,virtbp,dum -+ real(8) engfbp,virfbp,engter,virter,engbnd,virbnd,engang -+ real(8) virang,engdih,virdih,enginv,virinv,engtet,virtet -+ real(8) engshl,shlke,virshl,engfld,virfld,virsrp,sprneb -+ real(8) deltad,deltal,tlow,timhop,timlow,engtke,tolnce,hyp_units -+ real(8) ebias,vmin -+ -+ data bsn1,bsn2/0,0/ -+ -+c control variables -+ -+ lneb=.false. -+ numblock=nstep/nblock -+ maxtrk=nblock/ntrack -+ if(numdark.eq.0)numdark=nsteql -+ lrefmin=(mod(nstep,nblock).eq.0) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c BPD/TAD simulation time -+ -+ timhyp=timhyp+tstep -+ -+c track the tboost value -+ -+ if(mod(nstep,ntrack).eq.0)track(mod(numtrk,maxtrk))=tboost -+ -+c provisional check for transition - compare current config with -+c the reference state (not in dark period) -+ -+ same=.true. -+ scan=.false. -+ if(prechk.and.(mod(nstep,ntrack).eq.0).and. -+ x (lbpd.or.(ltad.and.(nstep.gt.numdark))))then -+ -+ catch=0.65d0*catchrad -+ call check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catch) -+ -+ if(.not.same.and.idnode.eq.0)then -+ -+ write(nevnt,'("PRE",i10)')nstep -+ write(nrite,'(1x,"PRE",i10)')nstep -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ endif -+ -+ if(.not.same.or.lrefmin)then -+ -+c store the current configuration -+ -+ savflg=.true. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+c minimise current structure -+ -+ call define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) -+ -+c write events entry for minimisation -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x cfgtmp/hyp_units,cvgerr/hyp_units -+ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x cfgtmp/hyp_units,cvgerr/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+c confirm any transition -+ -+ if(ltad)scan=.true. -+ call check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catchrad) -+ -+c transition detected - proceed with transition analysis -+ -+ if(.not.same)then -+ -+c store new basin energy -+ -+ engbsn(2)=cfgtmp -+ -+c save new minimised state (bias potential dynamics only) -+ -+ if(lbpd)then -+ -+ do i=1,9 -+ celres(i)=cell(i) -+ enddo -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xres(j)=xxx(i) -+ yres(j)=yyy(i) -+ zres(j)=zzz(i) -+ -+ enddo -+ -+ endif -+ -+c record transition (for TAD only if outside blackout period) -+ -+ if(lbpd.or.nstep.gt.numdark)then -+ -+c check if transition results in unique new basin (TAD only) -+ -+ if(ltad)call check_basins(newbsn,mdiff,mxnode) -+ -+c analysis of new basin -+ -+ if(lbpd.or.tadall.or.newbsn.eq.numbsn)then -+ -+c set difference counters and pointers (TAD only) -+ -+ if(ltad)then -+ -+ if(numbsn.gt.mxbsn)call error(idnode,2330) -+ -+ ndiff=mdiff -+ -+ if(numbsn.gt.1)then -+ nbsa(numbsn)=nbsb(numbsn-1)+1 -+ else -+ nbsa(numbsn)=1 -+ endif -+ -+ nbsb(numbsn)=mdiff -+ -+ endif -+ -+c save the basin file and store basin energy -+ -+ call write_reference_config -+ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode, -+ x cfgtmp) -+ -+c determine minimum (reaction) path and activation energy -+ -+ if(nebgo)call neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn1, -+ x bsn2,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,cfgtmp,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+c analyse the transition - determine e-star and destination state -+ -+ if(nebgo)call transition_properties -+ x (seek,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,nturn,numbsn,alpha,delr,dlrpot, -+ x drewd,elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr,estar, -+ x catchrad,hyp_units) -+ -+c estimate time of transition from past trajectory -+ -+ call transition_time -+ x (seek,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl, -+ x ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp, -+ x ntpter,ntrack,ntpvdw,ntshl,ntteth,ntcons,itrk, -+ x alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax, -+ x opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,cfgtmp,cvgerr,catchrad,timhop,hyp_units) -+ -+c update TAD control variables -+ -+ if(ltad)then -+ -+c update blackout period -+ -+ numdark=nblock*((nstep+blkout)/nblock+1) -+ -+c calculate stopping time -+ -+ timlow=timhop*exp(-(estar/temp-estar/tlow)/boltz) -+ tstop=min(tstop,deltad*(timlow/deltad)**(tlow/temp)) -+ -+c write transition data for TAD only -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("TRA",i10,3i6,1p,4e14.5)') -+ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, -+ x timhop,timlow,tstop -+ write(nevnt,'("BLK",2i10)')nstep,numdark -+ write(nrite,'(1x,"TRA",i10,3i6,1p,4e14.5)') -+ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, -+ x timhop,timlow,tstop -+ write(nrite,'(1x,"BLK",2i10)')nstep,numdark -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ elseif(nebgo.and.idnode.eq.0)then -+ -+c write transition data for bias potential dynamics with NEB -+ -+ write(nevnt,'("TRA",i10,3i6,1p,3e14.5)') -+ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, -+ x timhop,timhop*tboost -+ write(nrite,'(1x,"TRA",i10,3i6,1p,3e14.5)') -+ x nstep,home_bsn,numbsn-1,nturn,estar/hyp_units, -+ x timhop,timhop*tboost -+ write(nrite,"(1x,120('-'))") -+ -+ numbpd=0 -+ tboost=0.0 -+ -+ elseif(idnode.eq.0)then -+ -+c write transition data for bias potential dynamics without NEB -+ -+ write(nevnt,'("TRA",i10,2i6,1p,3e14.5)') -+ x nstep,home_bsn,numbsn-1,ebias/hyp_units, -+ x timhop,timhop*tboost -+ write(nrite,'(1x,"TRA",i10,2i6,1p,3e14.5)') -+ x nstep,home_bsn,numbsn-1,ebias/hyp_units, -+ x timhop,timhop*tboost -+ write(nrite,"(1x,120('-'))") -+ -+ numbpd=0 -+ tboost=0.0 -+ -+ endif -+ -+ else -+ -+c update blackout period when transition not unique (TAD only) -+ -+ numdark=nblock*((nstep+blkout)/nblock+1) -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("TRR",i10,3i6)')nstep,home_bsn,newbsn -+ write(nevnt,'("BLK",2i10)')nstep,numdark -+ write(nrite,'(1x,"TRR",i10,3i6)')nstep,home_bsn,newbsn -+ write(nrite,'(1x,"BLK",2i10)')nstep,numdark -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ endif -+ -+c actions when new basin has been visited before (TAD only) -+ -+ elseif(ltad)then -+ -+c ignore dark transition and extend blackout period (TAD only) -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("TRI",i10)')nstep -+ write(nrite,'(1x,"TRI",i10)')nstep -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ if(nstep.le.nsteql)then -+ -+ nsteql=nsteql+blkout -+ numdark=nsteql+blkout -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("EQL",2i10)')nstep,nsteql -+ write(nrite,'(1x,"EQL",2i10)')nstep,nsteql -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ else -+ -+ numdark=nblock*((nstep+blkout)/nblock+1) -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("BLK",3i10)')nstep,numdark -+ write(nrite,'(1x,"BLK",3i10)')nstep,numdark -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ if(ltad)then -+ -+c return to the block starting state after transition (TAD only) -+ -+ timhyp=timres -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strres,celres, -+ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) -+ -+c scramble the velocities (and conserve system energy) -+ -+ call regauss(idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, -+ x ntshl,keyshl,tkeres,temp,tolnce) -+ -+ elseif(lbpd)then -+ -+c reset reference state to new basin (bias potential dynamics only) -+ -+ home_bsn=home_bsn+1 -+ engbsn(1)=engbsn(2) -+ -+ do i=1,9 -+ celbas(i)=celres(i) -+ enddo -+ -+ call invert(celbas,rcell,dum) -+ -+ do i=1,iatm1-iatm0+1 -+ -+ xbas(i)=rcell(1)*xres(i)+rcell(4)*yres(i)+rcell(7)*zres(i) -+ ybas(i)=rcell(2)*xres(i)+rcell(5)*yres(i)+rcell(8)*zres(i) -+ zbas(i)=rcell(3)*xres(i)+rcell(6)*yres(i)+rcell(9)*zres(i) -+ -+ enddo -+ -+c restore current hyperdynamics configuration -+ -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+c reset boost factor -+ -+ numbpd=0 -+ tboost=0.d0 -+ -+ endif -+ -+c no transition detected so restore current trajectory -+ -+ else -+ -+c restore the current configuration -+ -+ savflg=.false. -+ call store_config(savflg,idnode,mxnode,natms,strhyp,celhyp, -+ x xhyp,yhyp,zhyp,vxhp,vyhp,vzhp,fxhp,fyhp,fzhp) -+ -+c save the block configuration as reset state (TAD only) -+ -+ if(ltad.and.lrefmin)then -+ -+ savflg=.true. -+ tkeres=engtke -+ timres=timhyp -+ call store_config(savflg,idnode,mxnode,natms,strres,celres, -+ x xres,yres,zres,vxrs,vyrs,vzrs,fxrs,fyrs,fzrs) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c close down if TAD stopping time reached -+ -+ if(ltad.and.tstop.lt.timhyp)recycle=.false. -+ -+c write a tracking file -+ -+ if(mod(nstep,ntrack).eq.0)then -+ -+ itrack=mod(numtrk,maxtrk) -+ call write_reference_config -+ x ('CFGTRK','TRACKS',ntrk,itrack,natms,imcon,idnode,engcfg) -+ -+ numtrk=numtrk+1 -+ -+ endif -+ -+ return -+ end subroutine hyper_driver -+ -+ subroutine define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,engcfg,cvgerr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling subroutine calls for a -+c structural minimisation to define a minimum state for -+c hyperdynamics simulations -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lfcap,nogofr,lneut,lnsq,loglnk,stropt,lzeql -+ logical newlst,ltad,lsolva,lfree,lexcite -+ -+ integer idnode,imcon,keyfce,keyfld,keyshl,keytol -+ integer keystr,kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp -+ integer nhko,nlatt,nneut,nospl,nscons,nstbgr,nstep,nsteql -+ integer ntangl,ntbond,ntdihd,ntfree,ntinv,ntpfbp,ntpmet -+ integer ntptbp,ntpter,ntpvdw,ntshl,ntteth,numrdf -+ integer nblock,pass,mxpass,mstep,ntcons,nsolva,isolva -+ -+ real(8) alpha,delr,dlrpot,drewd,elrc,engang,engbnd -+ real(8) engcpe,engdih,engfbp,engfld,enginv,engshl,engsrp -+ real(8) engtbp,engter,engtet,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,shlke,engcfg,temp -+ real(8) tstep,virang,virbnd,vircpe,virdih,virfbp -+ real(8) virfld,virinv,virlrc,virmet,virshl,virsrp -+ real(8) virtbp,virter,virtet,volm,engmet,cfgold,cvgerr -+ real(8) hnorm,grad0,grad1,ff1,sgn,engord,virord -+ -+ data mxpass/1000/ -+ -+c control variables -+ -+ pass=0 -+ keystr=0 -+ numrdf=0 -+ ltad=.true. -+ engcfg=1.d30 -+ stropt=.false. -+ nogofr=.false. -+ -+c dummy variables -+ -+ lsolva=.false. -+ lfree=.false. -+ lexcite=.false. -+ nsolva=0 -+ isolva=1 -+ engord=0.d0 -+ virord=0.d0 -+ -+c relax the current structure -+ -+ do while(.not.stropt.and.pass.lt.mxpass) -+ -+ pass=pass+1 -+ cfgold=engcfg -+ mstep=nstep+pass -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces -+ -+ call force_manager -+ x (newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lexcite,idnode,mxnode,natms,imcon,mstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c structure optimisation -+ -+ call strucopt -+ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+ cvgerr=abs(engcfg-cfgold) -+ -+ enddo -+ -+ return -+ end subroutine define_minimum_state -+ -+ subroutine write_reference_config -+ x (fnam,direct,nfil,nnn,natms,imcon,idnode,engcfg) -+ -+c*********************************************************************** -+c -+c dlpoly utility to write a minimum structure file in CONFIG -+c format -+c -+c copyright daresbury laboratory -+c author w.smith june 2006 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ character*6 fnam -+ character*4 tail -+ character*6 direct -+ integer nfil,nnn,i,natms,imcon,idnode,levcfg -+ real(8) engcfg -+ -+ levcfg=0 -+ -+c node zero handles i/o -+ -+ if(idnode.eq.0)then -+ -+c write configuration data to new configuration file -+ -+ write(tail,'(i4.4)')nnn -+ open(nfil,file=direct//'/'//fnam//tail,form='formatted') -+ -+ write(nfil,'(a10)')fnam//tail -+ write(nfil,'(3i10,g20.12)') levcfg,imcon,natms,engcfg -+ -+ if(imcon.gt.0) write(nfil,'(3f20.12)') cell -+ -+ do i=1,natms -+ -+ write(nfil,'(a8,i10)') atmnam(i),i -+ write(nfil,'(3g20.10)') xxx(i),yyy(i),zzz(i) -+ -+ enddo -+ -+ close (nfil) -+ -+ endif -+ -+ nnn=nnn+1 -+ -+ return -+ end subroutine write_reference_config -+ -+ subroutine read_reference_config -+ x (fnam,direct,nfil,nnn,natms,imcon,idnode,engcfg) -+ -+c*********************************************************************** -+c -+c dlpoly utility to read a reference structure file in CONFIG -+c format -+c -+c copyright daresbury laboratory -+c author w.smith february 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ character*6 fnam -+ character*4 tail -+ character*6 direct -+ integer nfil,nnn,i,natms,imcon,idnode,levcfg -+ real(8) engcfg -+ -+c node zero handles i/o -+ -+ if(idnode.eq.0)then -+ -+c read configuration data from configuration file on proc 0 -+ -+ write(tail,'(i4.4)')nnn -+ open(nfil,file=direct//'/'//fnam//tail,form='formatted') -+ -+ read(nfil,*) -+ read(nfil,'(3i10,g20.12)')levcfg,imcon,natms,engcfg -+ buffer(1)=dble(levcfg) -+ buffer(2)=dble(imcon) -+ buffer(3)=dble(natms) -+ buffer(4)=engcfg -+ if(imcon.gt.0) read(nfil,'(3f20.12)') cell -+ do i=1,9 -+ buffer(i+4)=cell(i) -+ enddo -+ call gdsum(buffer(1),13,buffer(14)) -+ -+ do i=1,natms -+ -+ read(nfil,'(a8)') atmnam(i) -+ read(nfil,'(3g20.10)') xxx(i),yyy(i),zzz(i) -+ -+ enddo -+ -+ close (nfil) -+ -+ else -+ -+c gather data from configuration file on procs > 0 -+ -+ do i=1,13 -+ buffer(i)=0.d0 -+ enddo -+ call gdsum(buffer(1),13,buffer(14)) -+ -+ levcfg=nint(buffer(1)) -+ imcon=nint(buffer(2)) -+ natms=nint(buffer(3)) -+ engcfg=buffer(4) -+ do i=1,9 -+ cell(i)=buffer(i+4) -+ enddo -+ do i=1,natms -+ xxx(i)=0.d0 -+ yyy(i)=0.d0 -+ zzz(i)=0.d0 -+ enddo -+ -+ endif -+ -+c global gather of atomic coordinates -+ -+ call gdsum(xxx,natms,buffer) -+ call gdsum(yyy,natms,buffer) -+ call gdsum(zzz,natms,buffer) -+ -+ return -+ end subroutine read_reference_config -+ -+ subroutine store_config(lsave,idnode,mxnode,natms,strold,celold, -+ x xold,yold,zold,vxold,vyold,vzold,fxold,fyold,fzold) -+ -+c*********************************************************************** -+c -+c dlpoly hyperdynamics routine for storing the current -+c configuration -+c -+c copyright daresbury laboratory -+c author w.smith sep 2006 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical lsave -+ integer idnode,mxnode,natms,iatm0,iatm1,i,j -+ -+ real(8) strold(9),celold(9) -+ real(8) xold(msatms),yold(msatms),zold(msatms) -+ real(8) vxold(msatms),vyold(msatms),vzold(msatms) -+ real(8) fxold(msatms),fyold(msatms),fzold(msatms) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ if(lsave)then -+ -+c save cell and stress tensors -+ -+ do i=1,9 -+ -+ celold(i)=cell(i) -+ strold(i)=stress(i) -+ -+ enddo -+ -+c save configuration -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xold(j)=xxx(i) -+ yold(j)=yyy(i) -+ zold(j)=zzz(i) -+ vxold(j)=vxx(i) -+ vyold(j)=vyy(i) -+ vzold(j)=vzz(i) -+ fxold(j)=fxx(i) -+ fyold(j)=fyy(i) -+ fzold(j)=fzz(i) -+ -+ enddo -+ -+ else -+ -+c restore cell and stress tensors -+ -+ do i=1,9 -+ -+ cell(i)=celold(i) -+ stress(i)=strold(i) -+ -+ enddo -+ -+c restore configuration -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxx(i)=xold(j) -+ yyy(i)=yold(j) -+ zzz(i)=zold(j) -+ vxx(i)=vxold(j) -+ vyy(i)=vyold(j) -+ vzz(i)=vzold(j) -+ fxx(i)=fxold(j) -+ fyy(i)=fyold(j) -+ fzz(i)=fzold(j) -+ -+ enddo -+ -+c replication of full configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine store_config -+ -+ subroutine check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catchrad) -+ -+c*********************************************************************** -+c -+c dlpoly hyperdynamics routine for checking when a transition -+c has occured in a configuration -+c -+c copyright daresbury laboratory -+c author w.smith sep 2006 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ character*8 seek -+ logical same,safe,scan,all -+ integer idnode,mxnode,natms,imcon,nblock,mdiff -+ integer iatm0,iatm1,i,j -+ real(8) catchrad,catch2,rr2,dum,sxx,syy,szz,txx,tyy,tzz,pp2 -+ -+ all=(seek.eq.'all ') -+ -+c flag for comparing structures -+ -+ same=.true. -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise search parameters -+ -+ catch2=catchrad**2 -+ -+c construct coordinate check arrays -+ -+ do i=1,9 -+ celchk(i)=cell(i) -+ enddo -+ -+c store structure in reduced coordinates (target atoms only) -+ -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ if(all.or.atmnam(i).eq.seek)then -+ -+ xchk(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ychk(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zchk(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ endif -+ -+ enddo -+ -+c compare current structure with reference basin -+ -+ j=0 -+ pp2=0.d0 -+ safe=.true. -+ mdiff=ndiff -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ if(all.or.atmnam(i).eq.seek)then -+ -+c calculate separations in reduced units -+ -+ sxx=xchk(j)-xbas(j) -+ syy=ychk(j)-ybas(j) -+ szz=zchk(j)-zbas(j) -+ -+c calculate minimum image separations -+ -+ sxx=sxx-nint(sxx) -+ syy=syy-nint(syy) -+ szz=szz-nint(szz) -+ -+c set trial structure at minimum displacements from reference -+ -+ xchk(j)=xbas(j)+sxx -+ ychk(j)=ybas(j)+syy -+ zchk(j)=zbas(j)+szz -+ -+c calculate atomic separations in real coordinates -+ -+ txx=(celchk(1)*xchk(j)+celchk(4)*ychk(j)+celchk(7)*zchk(j)) -+ x -(celbas(1)*xbas(j)+celbas(4)*ybas(j)+celbas(7)*zbas(j)) -+ tyy=(celchk(2)*xchk(j)+celchk(5)*ychk(j)+celchk(8)*zchk(j)) -+ x -(celbas(2)*xbas(j)+celbas(5)*ybas(j)+celbas(8)*zbas(j)) -+ tzz=(celchk(3)*xchk(j)+celchk(6)*ychk(j)+celchk(9)*zchk(j)) -+ x -(celbas(3)*xbas(j)+celbas(6)*ybas(j)+celbas(9)*zbas(j)) -+ -+c calculate total structural difference -+ -+ rr2=txx**2+tyy**2+tzz**2 -+ pp2=max(pp2,rr2) -+ -+c identify and store the displaced atoms -+ -+ if(scan.and.rr2.ge.catch2)then -+ -+ mdiff=mdiff+1 -+ -+ if(mdiff.le.mxdiffs)then -+ -+ idabsn(mdiff)=i -+ xdiffs(mdiff)=txx -+ ydiffs(mdiff)=tyy -+ zdiffs(mdiff)=tzz -+ -+ else -+ -+ safe=.false. -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c global check on diffs arrays -+ -+ if(scan)then -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)then -+ -+ if(idnode.eq.0)write(nrite, -+ x "(/,1x,'number of current diffs',i10)")mdiff -+ call error(idnode,2340) -+ -+ endif -+ -+ endif -+ -+c global transition check -+ -+ same=(pp2.lt.catch2) -+ if(mxnode.gt.1)call gstate(same) -+ -+ return -+ end subroutine check_for_transition -+ -+ subroutine check_basins(newbsn,mdiff,mxnode) -+ -+c*********************************************************************** -+c -+c dlpoly hyperdynamics routine for checking that a new basin is not -+c one already known -+c -+c copyright daresbury laboratory -+c author w.smith jan 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical same -+ integer newbsn,ia,ib,ic,id,ibsn,i,j,k,mxnode,mdiff -+ -+ ibsn=1 -+ newbsn=0 -+ ib=mdiff -+ ia=ndiff+1 -+ same=.false. -+ do while(.not.same.and.ibsn.lt.numbsn) -+ -+ ic=nbsa(ibsn) -+ id=nbsb(ibsn) -+ -+ if(ib-ia.eq.id-ic)then -+ -+ same=.true. -+ -+ do k=0,ib-ia -+ -+ i=ia+k -+ j=ic+k -+ -+ if(.not.((idabsn(i).eq.idabsn(j)).and. -+ x (abs(xdiffs(i)-xdiffs(j)).lt.0.1d0).and. -+ x (abs(ydiffs(i)-ydiffs(j)).lt.0.1d0).and. -+ x (abs(zdiffs(i)-zdiffs(j)).lt.0.1d0)))same=.false. -+ -+ enddo -+ -+ endif -+ -+c check if same on all processors -+ -+ if(mxnode.gt.1)call gstate(same) -+ if(same)newbsn=ibsn -+ -+ ibsn=ibsn+1 -+ -+ enddo -+ -+c if not same - must be new basin! -+ -+ if(.not.same)newbsn=numbsn -+ -+ return -+ end subroutine check_basins -+ -+ subroutine neb_driver -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,lneb,bsn1, -+ x bsn2,idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql, -+ x keytol,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw,ngrp, -+ x ntcons,ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter, -+ x keyshl,ntfree,keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth, -+ x ntshl,nscons,delr,dlrpot,engcpe,engsrp,epsq,rcut, -+ x rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep,opttol,sprneb,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for controlling a nudged elastic band -+c calculation -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lneb,newlst,lneut,lnsq,stropt -+ logical lzeql,loglnk,lfcap -+ integer idnode,mxnode,natms,imcon,nstep,nstbgr,nsteql,mstep -+ integer keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw -+ integer ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl -+ integer keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nscons -+ integer ngrp,keytol,ntfree,iatm0,iatm1,iatm2,ntcons -+ integer i,j,k,n,pass,mxpass,nkinks,bsn1,bsn2,itrk -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet -+ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp -+ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtet,virtet,engshl -+ real(8) shlke,virshl,engfld,virfld,engcfg,fmax,temp,tstep -+ real(8) sprneb,opttol,hyp_units,fac,xxn,yyn,zzn,tol,cvg,dum -+ -+ data mxpass/100/ -+ -+c control variables -+ -+ stropt=.false. -+ do n=0,mxneb -+ -+ keymin(n)=0 -+ do i=1,5 -+ optk(i,n)=0.d0 -+ enddo -+ -+ enddo -+ if(lneb)numpro=-(100*bsn1+bsn2) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+c read in the required start and end point configurations -+ -+ if(lneb)then -+ -+c read data for first reference structure -+ -+ call read_reference_config -+ x ('CFGBSN','BASINS',nbsn,bsn1,natms,imcon,idnode,engcfg) -+ -+ engbsn(1)=engcfg -+ -+ do i=1,9 -+ celbas(i)=cell(i) -+ enddo -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xbas(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ybas(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zbas(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ enddo -+ -+c read data for second reference structure -+ -+ call read_reference_config -+ x ('CFGBSN','BASINS',nbsn,bsn2,natms,imcon,idnode,engcfg) -+ -+ engbsn(2)=engcfg -+ -+ do i=1,9 -+ celchk(i)=cell(i) -+ enddo -+ call invert(cell,rcell,dum) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xchk(j)=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ ychk(j)=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ zchk(j)=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ enddo -+ -+ endif -+ -+c construct initial `bead' configurations in chain -+ -+ k=0 -+ do n=0,mxneb -+ -+ j=0 -+ fac=dble(n)/dble(mxneb) -+ -+c construct linear mix of cell vectors -+ -+ do i=1,9 -+ celneb(i,n)=(1.d0-fac)*celbas(i)+fac*celchk(i) -+ enddo -+ -+c construct beads by linear interpolation -+ -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ k=k+1 -+ -+ xxn=xbas(j)+fac*((xchk(j)-xbas(j))-nint(xchk(j)-xbas(j))) -+ yyn=ybas(j)+fac*((ychk(j)-ybas(j))-nint(ychk(j)-ybas(j))) -+ zzn=zbas(j)+fac*((zchk(j)-zbas(j))-nint(zchk(j)-zbas(j))) -+ xneb(k)=celneb(1,n)*xxn+celneb(4,n)*yyn+celneb(7,n)*zzn -+ yneb(k)=celneb(2,n)*xxn+celneb(5,n)*yyn+celneb(8,n)*zzn -+ zneb(k)=celneb(3,n)*xxn+celneb(6,n)*yyn+celneb(9,n)*zzn -+ -+ enddo -+ -+ enddo -+ -+c start of NEB optimisation -+ -+ pass=0 -+ safe=.false. -+ do while(.not.safe.and.pass.lt.mxpass) -+ -+ pass=pass+1 -+ safe=.true. -+ mstep=nstep+pass -+ -+c calculate system forces on all beads -+ -+ call neb_system_forces -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,mxnode, -+ x natms,mstep,imcon,nstbgr,nsteql,keyfce,kmax1,kmax2, -+ x kmax3,nhko,nlatt,ntpvdw,ntpmet,nospl,multt,nneut,ntptbp, -+ x ntpfbp,ntpter,keyshl,keyfld,ntbond,ntangl,ntdihd,ntinv, -+ x ntteth,ntshl,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep) -+ -+c calculate spring forces on all beads -+ -+ call neb_spring_forces(idnode,mxnode,natms,nkinks,sprneb) -+ -+c energy minimisation of each bead -+ -+ do n=0,mxneb -+ -+c construct cell vectors for nth bead -+ -+ do i=1,9 -+ cell(i)=celneb(i,n) -+ enddo -+ -+c construct coordinate and force arrays for nth bead -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ xxx(i)=xneb(k) -+ yyy(i)=yneb(k) -+ zzz(i)=zneb(k) -+ fxx(i)=fxneb(k) -+ fyy(i)=fyneb(k) -+ fzz(i)=fzneb(k) -+ -+ enddo -+ -+c restore search direction vector if keymin > 0 -+ -+ if(keymin(n).gt.0)then -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ hhx(i)=hxneb(k) -+ hhy(i)=hyneb(k) -+ hhz(i)=hzneb(k) -+ -+ enddo -+ -+ endif -+ -+c form complete global arrays -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ if(keymin(n).gt.0) -+ x call merge(idnode,mxnode,natms,mxbuff,hhx,hhy,hhz,buffer) -+ -+ endif -+ -+c structure optimisation -+ -+ call strucopt -+ x (stropt,keymin(n),keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,10.d0*opttol,engneb(n),optk(1,n), -+ x optk(2,n),optk(3,n),optk(4,n),optk(5,n)) -+ safe=safe.and.stropt -+ stropt=.false. -+ -+c update coordinate arrays for nth bead -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ xneb(k)=xxx(i) -+ yneb(k)=yyy(i) -+ zneb(k)=zzz(i) -+ hxneb(k)=hhx(i) -+ hyneb(k)=hhy(i) -+ hzneb(k)=hhz(i) -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c convergence check -+ -+c$$$ if(.not.safe)then -+c$$$ -+c$$$ call error(idnode,2320) -+c$$$ -+c$$$ else -+ -+c save neb profile -+ -+ call write_profile(idnode,mxnode,natms,hyp_units) -+ -+c write neb summary -+ -+ if(idnode.eq.0)then -+ -+ if(lneb)then -+ -+ write(nrite,'(/,1x,"summary of NEB calculation",/)') -+ write(nrite,'(1x,"path and energy for state",i4, -+ x " ---> state",i4," transition")')bsn1,bsn2 -+ write(nrite,'(1x,"convergence status :",l4)')safe -+ write(nrite,'(1x,"obtained after ",i4," iterations",/)')pass -+ -+ do n=0,mxneb -+ write(nrite,'(6x,1p,2e14.6)')path(n),engneb(n)/hyp_units -+ enddo -+ -+ else -+ -+ write(nevnt,'("NEB",i10,3i6,1p,2e14.5)') -+ x nstep,pass,mxpass,mxneb+1,engbsn(1)/hyp_units, -+ x engbsn(2)/hyp_units -+ write(nrite,'(1x,"NEB",i10,3i6,1p,2e14.5)') -+ x nstep,pass,mxpass,mxneb+1,engbsn(1)/hyp_units, -+ x engbsn(2)/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ endif -+ -+c$$$ endif -+ -+c end of NEB optimisation -+ -+ return -+ end subroutine neb_driver -+ -+ subroutine neb_system_forces -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,idnode,mxnode, -+ x natms,mstep,imcon,nstbgr,nsteql,keyfce,kmax1,kmax2, -+ x kmax3,nhko,nlatt,ntpvdw,ntpmet,nospl,multt,nneut,ntptbp, -+ x ntpfbp,ntpter,keyshl,keyfld,ntbond,ntangl,ntdihd,ntinv, -+ x ntteth,ntshl,delr,dlrpot,engcpe,engsrp,epsq, -+ x rcut,rprim,rvdw,vircpe,virsrp,alpha,drewd,volm, -+ x engmet,virmet,elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb, -+ x engfbp,virfbp,rctter,engter,virter,engbnd,virbnd, -+ x engang,virang,engdih,virdih,enginv,virinv,engtet, -+ x virtet,engshl,shlke,virshl,engfld,virfld,engcfg,fmax, -+ x temp,tstep) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating system forces in a nudged -+c elastic band calculation -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,ltad -+ logical lsolva,lfree,lexcite -+ integer idnode,mxnode,natms,imcon,nstbgr,nsteql,mstep -+ integer numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw -+ integer ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl -+ integer keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl -+ integer iatm0,iatm1,iatm2,i,k,n,nsolva,isolva -+ real(8) delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw -+ real(8) vircpe,virsrp,alpha,drewd,volm,engmet,virmet -+ real(8) elrc,virlrc,rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp -+ real(8) rctter,engter,virter,engbnd,virbnd,engang,virang -+ real(8) engdih,virdih,enginv,virinv,engtet,virtet,engshl -+ real(8) shlke,virshl,engfld,virfld,engcfg,fmax,temp,tstep -+ real(8) engord,virord -+ -+ numrdf=0 -+ ltad=.true. -+ nogofr=.false. -+ -+c dummy variables -+ -+ lsolva=.false. -+ lfree=.false. -+ lexcite=.false. -+ nsolva=0 -+ isolva=1 -+ engord=0.d0 -+ virord=0.d0 -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+c calculate system forces for all beads -+ -+ do n=0,mxneb -+ -+c construct cell vectors for one bead -+ -+ do i=1,9 -+ cell(i)=celneb(i,n) -+ enddo -+ -+c construct coordinate array for one bead -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ xxx(i)=xneb(k) -+ yyy(i)=yneb(k) -+ zzz(i)=zneb(k) -+ -+ enddo -+ -+c form complete global arrays -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c construct verlet neighbour list -+ -+ call nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c calculate atomic forces for one bead -+ -+ call force_manager -+ x (newlst,lneut,lnsq,nogofr,lzeql,loglnk,lfcap,lsolva,lfree, -+ x lexcite,idnode,mxnode,natms,imcon,mstep,nstbgr,nsteql, -+ x numrdf,keyfce,kmax1,kmax2,kmax3,nhko,nlatt,ntpvdw, -+ x ntpmet,nospl,multt,nneut,ntptbp,ntpfbp,ntpter,keyshl, -+ x keyfld,ntbond,ntangl,ntdihd,ntinv,ntteth,ntshl,nsolva, -+ x isolva,delr,dlrpot,engcpe,engsrp,epsq,rcut,rprim,rvdw, -+ x vircpe,virsrp,alpha,drewd,volm,engmet,virmet,elrc,virlrc, -+ x rcuttb,engtbp,virtbp,rcutfb,engfbp,virfbp,rctter,engter, -+ x virter,engbnd,virbnd,engang,virang,engdih,virdih,enginv, -+ x virinv,engtet,virtet,engshl,shlke,virshl,engfld,virfld, -+ x engcfg,fmax,temp,engord,virord) -+ -+c store configuration energy of bead -+ -+ engneb(n)=engcfg -+ -+c frozen atoms option -+ -+ call freeze(natms) -+ -+c allocate forces to bead atoms -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ fxneb(k)=fxx(i) -+ fyneb(k)=fyy(i) -+ fzneb(k)=fzz(i) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine neb_system_forces -+ -+ subroutine neb_spring_forces(idnode,mxnode,natms,nkinks,sprneb) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating spring forces in a nudged -+c elastic band calculation -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,j,k,n,kp,km,idnode,mxnode,natms,iatm0,iatm1,iatm2 -+ integer nkinks -+ real(8) rp2,rm2,tau2,fpar,vv0,vp1,vm1,aaa,bbb,txx,tyy,tzz -+ real(8) uxx,uyy,uzz,wxx,wyy,wzz,sxx,syy,szz,rxx,ryy,rzz -+ real(8) sprneb,fac,kink,det -+ real(8) rcella(9),rcellb(9),rcellc(9),cella(9),cellb(9),cellc(9) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+c energies of first and last basins -+ -+ engneb(0)=engbsn(1) -+ engneb(mxneb)=engbsn(2) -+ -+c calculate spring tangents for all beads -+ -+ nkinks=0 -+ do n=1,mxneb-1 -+ -+ rp2=0.d0 -+ rm2=0.d0 -+ tau2=0.d0 -+ fpar=0.d0 -+ kink=0.d0 -+ vv0=engneb(n) -+ vp1=engneb(n+1) -+ vm1=engneb(n-1) -+ -+c calculate tangent vector and scalar product with system force -+ -+ if(vp1.gt.vv0.and.vv0.gt.vm1)then -+ -+ aaa=1.d0 -+ bbb=0.d0 -+ -+ else if(vp1.lt.vv0.and.vv0.lt.vm1)then -+ -+ aaa=0.d0 -+ bbb=1.d0 -+ -+ else if(vp1.gt.vm1)then -+ -+ aaa=max(abs(vp1-vv0),abs(vv0-vm1)) -+ bbb=min(abs(vp1-vv0),abs(vv0-vm1)) -+ -+ else -+ -+ aaa=min(abs(vp1-vv0),abs(vv0-vm1)) -+ bbb=max(abs(vp1-vv0),abs(vv0-vm1)) -+ -+ endif -+ -+c invert cell matrices -+ -+ do i=1,9 -+ cella(i)=celneb(i,n-1) -+ cellb(i)=celneb(i,n) -+ cellc(i)=celneb(i,n+1) -+ enddo -+ call invert(cella,rcella,det) -+ call invert(cellb,rcellb,det) -+ call invert(cellc,rcellc,det) -+ -+ j=0 -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ k=k+1 -+ km=k-iatm2 -+ -+c calculate first spring vector (pbc corrected) -+ -+ sxx=rcellb(1)*xneb(k)+rcellb(4)*yneb(k)+rcellb(7)*zneb(k) -+ syy=rcellb(2)*xneb(k)+rcellb(5)*yneb(k)+rcellb(8)*zneb(k) -+ szz=rcellb(3)*xneb(k)+rcellb(6)*yneb(k)+rcellb(9)*zneb(k) -+ rxx=rcella(1)*xneb(km)+rcella(4)*yneb(km)+rcella(7)*zneb(km) -+ ryy=rcella(2)*xneb(km)+rcella(5)*yneb(km)+rcella(8)*zneb(km) -+ rzz=rcella(3)*xneb(km)+rcella(6)*yneb(km)+rcella(9)*zneb(km) -+ rxx=rxx-nint(rxx-sxx) -+ ryy=ryy-nint(ryy-syy) -+ rzz=rzz-nint(rzz-szz) -+ txx=xneb(k)- -+ x (rxx*celneb(1,n-1)+ryy*celneb(4,n-1)+rzz*celneb(7,n-1)) -+ tyy=yneb(k)- -+ x (rxx*celneb(2,n-1)+ryy*celneb(5,n-1)+rzz*celneb(8,n-1)) -+ tzz=zneb(k)- -+ x (rxx*celneb(3,n-1)+ryy*celneb(6,n-1)+rzz*celneb(9,n-1)) -+ -+c calculate second spring vector (pbc corrected) -+ -+ kp=k+iatm2 -+ rxx=rcellc(1)*xneb(kp)+rcellc(4)*yneb(kp)+rcellc(7)*zneb(kp) -+ ryy=rcellc(2)*xneb(kp)+rcellc(5)*yneb(kp)+rcellc(8)*zneb(kp) -+ rzz=rcellc(3)*xneb(kp)+rcellc(6)*yneb(kp)+rcellc(9)*zneb(kp) -+ rxx=rxx-nint(rxx-sxx) -+ ryy=ryy-nint(ryy-syy) -+ rzz=rzz-nint(rzz-szz) -+ uxx=-xneb(k)+ -+ x rxx*celneb(1,n+1)+ryy*celneb(4,n+1)+rzz*celneb(7,n+1) -+ uyy=-yneb(k)+ -+ x rxx*celneb(2,n+1)+ryy*celneb(5,n+1)+rzz*celneb(8,n+1) -+ uzz=-zneb(k)+ -+ x rxx*celneb(3,n+1)+ryy*celneb(6,n+1)+rzz*celneb(9,n+1) -+ -+ rp2=rp2+uxx*uxx+uyy*uyy+uzz*uzz -+ rm2=rm2+txx*txx+tyy*tyy+tzz*tzz -+ wxx=aaa*uxx+bbb*txx -+ wyy=aaa*uyy+bbb*tyy -+ wzz=aaa*uzz+bbb*tzz -+ taux(j)=wxx -+ tauy(j)=wyy -+ tauz(j)=wzz -+ tau2=tau2+wxx*wxx+wyy*wyy+wzz*wzz -+ fpar=fpar+wxx*fxneb(k)+wyy*fyneb(k)+wzz*fzneb(k) -+ kink=kink+txx*uxx+tyy*uyy+tzz*uzz -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=rp2 -+ buffer(2)=rm2 -+ buffer(3)=tau2 -+ buffer(4)=fpar -+ buffer(5)=kink -+ call gdsum(buffer(1),5,buffer(6)) -+ rp2=buffer(1) -+ rm2=buffer(2) -+ tau2=buffer(3) -+ fpar=buffer(4) -+ kink=buffer(5) -+ -+ endif -+ -+c check for kinking of NEB -+ -+ kink=cos(kink/sqrt(rp2*rm2)) -+ if(kink.lt.0.5d0)nkinks=nkinks+1 -+ -+c calculate final forces -+ -+ j=0 -+ k=n*iatm2 -+ tau2=sqrt(tau2) -+ fac=(sprneb*(sqrt(rp2)-sqrt(rm2))-fpar/tau2)/tau2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ k=k+1 -+ fxneb(k)=fxneb(k)+fac*taux(j) -+ fyneb(k)=fyneb(k)+fac*tauy(j) -+ fzneb(k)=fzneb(k)+fac*tauz(j) -+ -+ enddo -+ -+ enddo -+ -+c abort if kinks detected -+ -+ if(nkinks.gt.0)then -+ -+ if(idnode.eq.0) -+ x write(nrite,'(1x,"number of kinks detected ",i6)')nkinks -+ call error(idnode,2350) -+ -+ endif -+ -+ return -+ end subroutine neb_spring_forces -+ -+ subroutine transition_properties -+ x (seek,ltad,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons,kmax1, -+ x kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt,nneut,nospl, -+ x nscons,nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree, -+ x ntinv,ntpfbp,ntpmet,ntptbp,ntpter,ntpvdw,ntshl,ntteth, -+ x nturn,numbsn,alpha,delr,dlrpot,drewd,elrc,virlrc,epsq, -+ x fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,cfgtmp,cvgerr,estar,catchrad,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for analysing the NEB path and determining -+c the destination state (if not end of chain). -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 seek -+ logical lfcap,lneut,lnsq,loglnk,lzeql,newlst,ltad,scan,same -+ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt -+ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond -+ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter,pass -+ integer ntpvdw,ntshl,ntteth,nturn,i,k,n,iatm0,iatm1,iatm2 -+ integer numblock,numbsn,mdiff -+ real(8) alpha,delr,dlrpot,drewd,elrc,epsq,fmax,opttol,rctter -+ real(8) rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp -+ real(8) virlrc,cvgerr,estar,catchrad,hyp_units -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+c analyse neb profile -+ -+ call scan_profile(nturn,estar) -+ -+c determine true new state from first maximum -+ -+ if(nturn.gt.1)then -+ -+ i=1 -+ do while(ktrn(i).ge.0) -+ i=i+1 -+ enddo -+ n=-ktrn(i) -+ -+c construct cell vectors for nth bead -+ -+ do i=1,9 -+ cell(i)=celneb(i,n) -+ enddo -+ -+c construct coordinate force arrays for nth bead -+ -+ k=n*iatm2 -+ do i=iatm0,iatm1 -+ -+ k=k+1 -+ xxx(i)=xneb(k) -+ yyy(i)=yneb(k) -+ zzz(i)=zneb(k) -+ -+ enddo -+ -+c now minimise structure - this is correct new state -+ -+ call define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) -+ -+c write events entry for minimisation -+ -+ numblock=nstep/nblock -+ -+ if(idnode.eq.0)then -+ -+ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x cfgtmp/hyp_units,cvgerr/hyp_units -+ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') -+ x nstep,pass,numblock,keytol,opttol/hyp_units, -+ x cfgtmp/hyp_units,cvgerr/hyp_units -+ write(nrite,"(1x,120('-'))") -+ -+ endif -+ -+ if(ltad)then -+ -+c determine differences for new state (TAD only) -+ -+ scan=.true. -+ call check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catchrad) -+ -+c set difference counters and pointers -+ -+ if(numbsn.gt.mxbsn)call error(idnode,2330) -+ -+ ndiff=mdiff -+ -+ if(numbsn.gt.1)then -+ nbsa(numbsn)=nbsb(numbsn-1)+1 -+ else -+ nbsa(numbsn)=1 -+ endif -+ -+ nbsb(numbsn)=mdiff -+ -+c save minimised starting structure as basin file -+ -+ call write_reference_config -+ x ('CFGBSN','BASINS',nbsn,numbsn,natms,imcon,idnode,cfgtmp) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine transition_properties -+ -+ subroutine write_profile(idnode,mxnode,natms,hyp_units) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing profile file for NEB path -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2007 -+c -+c*********************************************************************** -+ -+ character*4 tail -+ integer idnode,mxnode,natms,i,j,k,n,iatm0,iatm1,iatm2 -+ real(8) hyp_units -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ iatm2=iatm1-iatm0+1 -+ -+ if(idnode.eq.0)then -+ -+c open profile data file -+ -+ if(numpro.lt.0)then -+ -+ write(tail,'(i4.4)')iabs(numpro) -+ open(npro,file='PROFILES'//'/'//'PRX'//tail//'.XY', -+ x form='formatted') -+ -+ else -+ -+ write(tail,'(i4.4)')numpro -+ open(npro,file='PROFILES'//'/'//'PRO'//tail//'.XY', -+ x form='formatted') -+ -+ endif -+ -+ endif -+ -+c calculate path -+ -+ path(0)=0.d0 -+ if(idnode.eq.0)write(npro,'(1p,2e14.6)')path(0), -+ x engneb(0)/hyp_units -+ -+ do n=1,mxneb -+ -+ path(n)=0.d0 -+ k=n*iatm2 -+ j=(n-1)*iatm2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ k=k+1 -+ path(n)=(xneb(k)-xneb(j))**2+(yneb(k)-yneb(j))**2+ -+ x (zneb(k)-zneb(j))**2+path(n) -+ -+ enddo -+ -+ if(mxnode.gt.1)call gdsum(path(n),1,buffer(1)) -+ -+ path(n)=sqrt(path(n))+path(n-1) -+ if(idnode.eq.0)write(npro,'(1p,2e14.6)')path(n), -+ x engneb(n)/hyp_units -+ -+ enddo -+ -+ numpro=numpro+1 -+ -+ if(idnode.eq.0)close(npro) -+ -+ return -+ end subroutine write_profile -+ -+ subroutine scan_profile(nturn,estar) -+ -+c********************************************************************* -+c -+c dl_poly routine for analysing neb energy profile -+c -+c copyright - daresbury laboratory -+c author - w.smith january 2007 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer, parameter :: nscan=100 -+ -+ integer i,np,n1,n2,npnts,fail,nturn -+ real(8) di,dj,rpd,uu,vv,v0,ss,estar -+ real(8), allocatable :: aa(:),dd(:),gg(:),zz(:) -+ -+c allocate working arrays -+ -+ allocate (aa(0:mxneb),dd(0:mxneb),gg(0:mxneb),zz(0:mxneb), -+ x stat=fail) -+ -+ npnts=mxneb+1 -+ n1=npnts-1 -+ n2=npnts-2 -+ -+c calculate spline coefficients -+ -+ gg(0)=0.d0 -+ dd(0)=path(1)-path(0) -+ -+ do i=1,n1-1 -+ -+ dd(i)=path(i+1)-path(i) -+ gg(i)=2.d0*(path(i+1)-path(i-1)) -+ zz(i)=6.d0*((engneb(i+1)-engneb(i))/dd(i)- -+ x (engneb(i)-engneb(i-1))/dd(i-1)) -+ -+ enddo -+ -+ gg(n1)=0.d0 -+ dd(n1)=0.d0 -+ aa(0)=0.d0 -+ aa(1)=dd(1)/gg(1) -+ -+ do i=2,n2-1 -+ -+ gg(i)=gg(i)-dd(i-1)*aa(i-1) -+ aa(i)=dd(i)/gg(i) -+ -+ enddo -+ -+ gg(n1-1)=gg(n1-1)-dd(n2-1)*aa(n2-1) -+ gg(1)=zz(1)/gg(1) -+ -+ do i=2,n1-1 -+ gg(i)=(zz(i)-dd(i-1)*gg(i-1))/gg(i) -+ enddo -+ -+ do i=1,n2-1 -+ gg(n1-i)=gg(n1-i)-aa(n1-i)*gg(npnts-i) -+ enddo -+ -+c now scan across the profile locating maxima and minima -+ -+ np=1 -+ nturn=0 -+ ss=1.d0 -+ v0=engneb(0) -+ rpd=(path(npnts-1)-path(0))/dble(nscan) -+ -+ do i=2,nscan-1 -+ -+ uu=rpd*dble(i)+path(0) -+ -+ do while(np.lt.npnts.and.uu.gt.path(np)) -+ np=np+1 -+ enddo -+ -+ di=uu-path(np-1) -+ dj=path(np)-uu -+ vv=(di*engneb(np)+dj*engneb(np-1)-di*dj* -+ x ((dd(np-1)+dj)*gg(np-1)+(dd(np-1)+di)*gg(np))/6.d0)/dd(np-1) -+ -+ if(ss.gt.0.d0.and.vv.le.v0)then -+ -+ nturn=nturn+1 -+ xtrn(nturn)=uu -+ ytrn(nturn)=vv -+ ktrn(nturn)=np -+ -+ else if(ss.lt.0.d0.and.vv.gt.v0)then -+ -+ nturn=nturn+1 -+ xtrn(nturn)=uu -+ ytrn(nturn)=vv -+ ktrn(nturn)=-np -+ -+ endif -+ -+ ss=sign(1.d0,vv-v0) -+ v0=vv -+ -+ enddo -+ -+c estimated activation energy -+ -+ i=1 -+ do while(ktrn(i).lt.0) -+ i=i+1 -+ enddo -+ estar=ytrn(i)-engbsn(1) -+ -+c deallocate working arrays -+ -+ deallocate (aa,dd,gg,zz,stat=fail) -+ -+ return -+ end subroutine scan_profile -+ -+ subroutine transition_time -+ x (seek,lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,idnode, -+ x imcon,keyfce,keyfld,keyshl,keytol,kmax1,kmax2,kmax3, -+ x multt,mxnode,natms,ngrp,nhko,nlatt,nneut,nospl,nscons, -+ x nstbgr,nstep,nsteql,ntangl,ntbond,ntdihd,ntfree,ntinv, -+ x ntpfbp,ntpmet,ntptbp,ntpter,ntrack,ntpvdw,ntshl,ntteth, -+ x ntcons,itrk,alpha,delr,dlrpot,drewd,elrc,virlrc,epsq, -+ x fmax,opttol,rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp, -+ x tstep,volm,cfgtmp,cvgerr,catchrad,timhop,hyp_units) -+ -+c********************************************************************* -+c -+c dl_poly routine for estimating the time of a transition -+c from a backlog of previous configurations -+c -+c copyright - daresbury laboratory -+c author - w.smith february 2007 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ character*8 seek -+ logical same,minflg,lfcap,lneut,lnsq,loglnk,scan -+ logical lzeql,newlst -+ integer nblock,idnode,imcon,keyfce,keyfld,keyshl,keytol -+ integer kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt -+ integer nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond -+ integer ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter -+ integer ntpvdw,ntshl,ntteth,ntcons,ntrack,itrk,mdiff,pass -+ integer nback,ntry,numblock -+ real(8) alpha,delr,dlrpot,drewd,elrc,virlrc,epsq,fmax,opttol -+ real(8) rctter,rcut,rcutfb,rcuttb,rprim,rvdw,temp,tstep -+ real(8) volm,cfgtmp,cvgerr,eng,tol,catchrad,timhop,hyp_units -+ -+c determine starting tracking file -+ -+ nback=min(numtrk,maxtrk) -+ -+c search track files for transition -+ -+ itrk=0 -+ same=.false. -+ -+ do while(.not.same.and.itrk.le.nback) -+ -+ itrk=itrk+1 -+ ntry=mod(numtrk-itrk,maxtrk) -+ -+ call read_reference_config -+ x ('CFGTRK','TRACKS',ntrk,ntry,natms,imcon,idnode,eng) -+ -+ call define_minimum_state -+ x (lfcap,lneut,lnsq,loglnk,lzeql,newlst,nblock,pass, -+ x idnode,imcon,keyfce,keyfld,keyshl,keytol,ntcons, -+ x kmax1,kmax2,kmax3,multt,mxnode,natms,ngrp,nhko,nlatt, -+ x nneut,nospl,nscons,nstbgr,nstep,nsteql,ntangl,ntbond, -+ x ntdihd,ntfree,ntinv,ntpfbp,ntpmet,ntptbp,ntpter, -+ x ntpvdw,ntshl,ntteth,alpha,delr,dlrpot,drewd, -+ x elrc,virlrc,epsq,fmax,opttol,rctter,rcut,rcutfb, -+ x rcuttb,rprim,rvdw,temp,tstep,volm,cfgtmp,cvgerr) -+ -+c write events entry for minimisation (normally deactivated) -+ -+c$$$ if(idnode.eq.0)then -+c$$$ -+c$$$ numblock=nstep/nblock -+c$$$ write(nevnt,'("MIN",i10,3i6,1p,3e14.5)') -+c$$$ x nstep,pass,numblock,keytol,opttol/hyp_units, -+c$$$ x cfgtmp/hyp_units,cvgerr/hyp_units -+c$$$ write(nrite,'(1x,"MIN",i10,3i6,1p,3e14.5)') -+c$$$ x nstep,pass,numblock,keytol,opttol/hyp_units, -+c$$$ x cfgtmp/hyp_units,cvgerr/hyp_units -+c$$$ write(nrite,"(1x,120('-'))") -+c$$$ -+c$$$ endif -+ -+c check if still in base state -+ -+ scan=.false. -+ call check_for_transition -+ x (seek,same,scan,idnode,mxnode,natms,imcon,mdiff,nblock, -+ x catchrad) -+ -+ enddo -+ -+ timhop=timhyp-tstep*dble(ntrack)*(dble(itrk)-0.5d0) -+ tboost=track(ntry) -+ -+ return -+ end subroutine transition_time -+ -+ subroutine scramble_velocities(idnode,natms) -+ -+c*********************************************************************** -+c -+c dlpoly hyperdynamics routine for randomising velocities after a -+c transition has occured (use with identical species only) -+c -+c copyright daresbury laboratory -+c author w.smith jan 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer idnode,natms,i,j,k,m,n -+ real(8) vvv -+ -+ do j=1,10 -+ -+ do i=1,natms -+ -+ k=int(natms*duni())+1 -+ vvv=vxx(i) -+ vxx(i)=vxx(k) -+ vxx(k)=vvv -+ m=int(natms*duni())+1 -+ vvv=vyy(i) -+ vyy(i)=vyy(m) -+ vyy(m)=vvv -+ n=int(natms*duni())+1 -+ vvv=vzz(i) -+ vzz(i)=vzz(n) -+ vzz(n)=vvv -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine scramble_velocities -+ -+ subroutine hyper_close(ltad,idnode,mxnode,natms,nsteql) -+ -+c*********************************************************************** -+c -+c dlpoly routine for saving hyperdynamics restart data -+c -+c copyright daresbury laboratory -+c author w.smith dec 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical ltad -+ integer idnode,mxnode,natms,nsteql -+ integer iatm0,iatm1,i,j,k,n,last,ierr,netdif -+ real(8) buff(2) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c total number of atomic differences -+ -+ buff(1)=dble(ndiff) -+ call gdsum(buff(1),1,buff(2)) -+ netdif=nint(buff(1)) -+ -+ if(idnode.eq.0)then -+ -+c open hyperdynamics restart file -+ -+ open(nhrs,file="HYPREV",form="unformatted") -+ -+c write control variables -+ -+ write(nhrs)ltad,dble(numbsn),dble(numtrk),dble(numpro), -+ x dble(netdif),dble(numdark),dble(nsteql),dble(numbpd), -+ x timhyp,timres,tstop,tkeres,tboost,vbase,strres,celres -+ write(nhrs)track -+ endif -+ -+ if(ltad.and.numbsn.gt.1)then -+ -+c load basin difference data -+ -+ n=0 -+ do i=1,numbsn-1 -+ -+ do j=nbsa(i),nbsb(i) -+ -+ buffer(n+1)=dble(idabsn(j)) -+ buffer(n+2)=dble(i) -+ buffer(n+3)=xdiffs(j) -+ buffer(n+4)=ydiffs(j) -+ buffer(n+5)=zdiffs(j) -+ n=n+5 -+ -+ enddo -+ -+ enddo -+ last=n -+ -+c write basin difference data -+ -+ do k=1,mxnode-1 -+ -+ if(idnode.eq.0)then -+ -+ -+ call csend(hyper_tag+k,buff,1,k,ierr) -+ call crecv(2*hyper_tag+k,buff,1) -+ call crecv(3*hyper_tag+k,buffer(last+1),nint(buff(1))) -+ last=nint(buff(1))+last -+ -+ elseif(k.eq.idnode)then -+ -+ call crecv(hyper_tag+k,buff,1) -+ buff(1)=dble(last) -+ call csend(2*hyper_tag+k,buff,1,0,ierr) -+ call csend(3*hyper_tag+k,buffer,last,0,ierr) -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)write(nhrs)(buffer(i),i=1,last) -+ call gsync() -+ -+ endif -+ -+c load reference block configuration data -+ -+ j=0 -+ k=1 -+ do i=iatm0,iatm1 -+ -+ buffer(j+1)=xres(k) -+ buffer(j+2)=yres(k) -+ buffer(j+3)=zres(k) -+ j=j+3 -+ k=k+1 -+ -+ enddo -+ last=j -+ -+c write reference block configuration data -+ -+ do k=1,mxnode-1 -+ -+ if(idnode.eq.0)then -+ -+ call csend(hyper_tag+k,buff,1,k,ierr) -+ call crecv(2*hyper_tag+k,buff,1) -+ call crecv(3*hyper_tag+k,buffer(last+1),nint(buff(1))) -+ last=nint(buff(1))+last -+ -+ elseif(k.eq.idnode)then -+ -+ call crecv(hyper_tag+k,buff,1) -+ buff(1)=dble(last) -+ call csend(2*hyper_tag+k,buff,1,0,ierr) -+ call csend(3*hyper_tag+k,buffer,last,0,ierr) -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)then -+ -+ write(nhrs)(buffer(i),i=1,last) -+ close(nhrs) -+ -+ endif -+ call gsync() -+ -+ return -+ end subroutine hyper_close -+ -+ subroutine hyper_open(ltad,idnode,mxnode,natms,nsteql) -+ -+c*********************************************************************** -+c -+c dlpoly routine for reading hyperdynamics restart data -+c -+c copyright daresbury laboratory -+c author w.smith dec 2007 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical ltad,mtad -+ integer idnode,mxnode,natms,nsteql -+ integer iatm0,iatm1,i,j,k,n,last,netdif,ierr -+ real(8) buff(1) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c restore control variables -+ -+ mtad=.true. -+ if(idnode.eq.0)then -+ -+c open hyperdynamics restart file -+ -+ open(nhrs,file="HYPOLD",form="unformatted") -+ -+ read(nhrs)mtad,(buffer(i),i=1,30) -+ read(nhrs)track -+ -+ else -+ -+ do i=1,30 -+ buffer(i)=0.d0 -+ enddo -+ track(:)=0.d0 -+ -+ endif -+ -+c check restart file is tad compatible -+ -+ call gstate(mtad) -+ if(ltad.and.(.not.mtad))call error(idnode,2341) -+ -+ call gdsum(buffer(1),31,buffer(32)) -+ -+ numbsn=nint(buffer(1)) -+ numtrk=nint(buffer(2)) -+ numpro=nint(buffer(3)) -+ netdif=nint(buffer(4)) -+ numdark=nint(buffer(5)) -+ nsteql=nint(buffer(6)) -+ numbpd=nint(buffer(7)) -+ timhyp=buffer(8) -+ timres=buffer(9) -+ tstop=buffer(10) -+ tkeres=buffer(11) -+ tboost=buffer(12) -+ vbase=buffer(13) -+ do i=1,9 -+ -+ strres(i)=buffer(i+13) -+ celres(i)=buffer(i+22) -+ -+ enddo -+ last=size(track) -+ call gdsum(track,last,buffer) -+ -+ if(ltad.and.numbsn.gt.1)then -+ -+c restore basin difference data -+ -+ last=5*netdif -+ if(idnode.eq.0)read(nhrs)(buffer(i),i=1,last) -+ -+ do k=1,mxnode-1 -+ -+ if(idnode.eq.0)then -+ -+ call csend(hyper_tag+k,buffer,last,k,ierr) -+ -+ elseif(k.eq.idnode)then -+ -+ call crecv(hyper_tag+k,buffer,last) -+ -+ endif -+ -+ enddo -+ -+c reject nonlocal basin difference data -+ -+ j=0 -+ do i=1,last,5 -+ -+ n=nint(buffer(i)) -+ if(n.ge.iatm0.and.n.le.iatm1)then -+ -+ buffer(j+1)=buffer(i) -+ buffer(j+2)=buffer(i+1) -+ buffer(j+3)=buffer(i+2) -+ buffer(j+4)=buffer(i+3) -+ buffer(j+5)=buffer(i+4) -+ j=j+5 -+ -+ endif -+ -+ enddo -+ last=j -+ -+c unload basin difference data -+ -+ n=0 -+ nbsa(1)=1 -+ do i=1,numbsn-1 -+ -+ if(i.gt.1)nbsa(i)=n+1 -+ -+ do j=1,last,5 -+ -+ if(nint(buffer(j+1)).eq.i)then -+ -+ n=n+1 -+ idabsn(n)=nint(buffer(j)) -+ xdiffs(n)=buffer(j+2) -+ ydiffs(n)=buffer(j+3) -+ zdiffs(n)=buffer(j+4) -+ -+ endif -+ -+ enddo -+ -+ nbsb(i)=n -+ -+ enddo -+ ndiff=n -+ call gsync() -+ -+ endif -+ -+c retrieve reference block configuration data -+ -+ last=3*natms -+ if(idnode.eq.0)read(nhrs)(buffer(i),i=1,last) -+ -+ do k=1,mxnode-1 -+ -+c read reference block configuration data -+ -+ if(idnode.eq.0)then -+ -+ call csend(hyper_tag+k,buffer,last,k,ierr) -+ -+ elseif(k.eq.idnode)then -+ -+ call crecv(hyper_tag+k,buffer,last) -+ -+ endif -+ -+ enddo -+ -+c unload reference block configuration data -+ -+ n=1 -+ j=3*(iatm0-1) -+ do i=iatm0,iatm1 -+ -+ xres(n)=buffer(j+1) -+ yres(n)=buffer(j+2) -+ zres(n)=buffer(j+3) -+ j=j+3 -+ n=n+1 -+ -+ enddo -+ -+ if(idnode.eq.0)close(nhrs) -+ call gsync() -+ -+ return -+ end subroutine hyper_open -+ -+ subroutine bpd_forces(natms,keybpd,vmin,ebias,temp,engcfg) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for scaling forces in a bias potential dynamics -+c simulation using hamelberg, mongan and mccammon factor -+c J. Chem. Phys. 120 (2004) 11919 -+c -+c copyright - daresbury laboratory -+c author - w. smith jan 2008 -+c -+c*********************************************************************** -+ -+ integer i,natms,mynode,keybpd -+ real(8) alpha,vmin,ebias,beta,temp,engcfg,eboost,hscale -+ real(8) engtmp -+ -+ boost=1.d0 -+ numbpd=numbpd+1 -+ -+c reset potential energy wrt base level -+ -+ if(keybpd.eq.1)then -+ engtmp=engcfg-vbase -+ else -+ engtmp=engcfg-engbsn(1) -+ endif -+ -+ if(ebias.gt.engtmp)then -+ -+c bias potental boost -+ -+ alpha=ebias*(ebias-vmin)/vmin -+ beta=1.d0/(boltz*temp*dble(natms)) -+ eboost=(ebias-engtmp)**2/(alpha+ebias-engtmp) -+ boost=exp(beta*eboost) -+ -+c bias potential forces scaling factor -+ -+ hscale=(alpha/(alpha+ebias-engtmp))**2 -+ -+c scale forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxx(i)*hscale -+ fyy(i)=fyy(i)*hscale -+ fzz(i)=fzz(i)*hscale -+ -+ enddo -+ -+ endif -+ -+c accumulative average of boost factor -+ -+ tboost=boost/dble(numbpd)+dble(numbpd-1)*tboost/dble(numbpd) -+ -+ return -+ end subroutine bpd_forces -+ -+ end module hyper_dynamics_module -diff -urN dl_class_1.9.orig/srcmod/integrator_module.f dl_class_1.9/srcmod/integrator_module.f ---- dl_class_1.9.orig/srcmod/integrator_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/integrator_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,624 @@ -+ module integrator_module -+ -+c*********************************************************************** -+c -+c dl_poly module for selecting verlet integration schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use error_module -+ use lf_motion_module -+ use lf_rotation1_module -+ use lf_rotation2_module -+ use pmf_module -+ use temp_scalers_module -+ use vv_motion_module -+ use vv_rotation1_module -+ use vv_rotation2_module -+ -+ contains -+ -+ subroutine lf_integrate -+ x (lcnb,lshmov,lnfic,idnode,mxnode,imcon,natms,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x tstep,engke,engrot,tolnce,quattol,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint, -+ x elrc,virlrc,virpmf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the integration algorithm -+c to solve the the equations of motion. based on the leapfrog -+c verlet algorithm -+c -+c copyright - daresbury laboratory -+c author - w. smith december 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,safep,safeq,lcnb,lshmov,lnfic -+ integer idnode,mxnode,imcon,natms,ngrp,keyens,nscons,nofic -+ integer ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nstep -+ real(8) tstep,engke,engrot,tolnce,quattol,vircon,vircom -+ real(8) virtot,temp,press,volm,sigma,taut,taup,chit,chip -+ real(8) consv,conint,elrc,virlrc,virpmf -+ -+ safe=.true. -+ safeq=.true. -+ safep=.true. -+ -+ if(ngrp.eq.0) then -+ -+ if(keyens.eq.0) then -+ -+c verlet leapfrog -+ -+ call nve_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,tolnce,tstep,vircon) -+ -+ else if(keyens.eq.1) then -+ -+c Evans Gaussian Temperature constraints -+ -+ call nvt_e1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,tolnce,tstep,vircon) -+ -+ else if(keyens.eq.2) then -+ -+c Berendsen thermostat -+ -+ call nvt_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,taut,sigma,tolnce,tstep,vircon) -+ -+ else if(keyens.eq.3) then -+ -+c Nose-Hoover thermostat -+ -+ call nvt_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon) -+ -+ elseif(keyens.eq.4) then -+ -+c Berendsen thermostat and isotropic barostat -+ -+ call npt_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, -+ x tstep,virtot,vircon,volm) -+ -+ else if(keyens.eq.5) then -+ -+c Nose-Hoover thermostat and isotropic barostat -+ -+ call npt_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,chip,chit,conint,consv,elrc,engke,virlrc,press, -+ x taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm) -+ -+ else if(keyens.eq.6) then -+ -+c Berendsen thermostat and barostat (cell shape varying) -+ -+ call nst_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,mode,elrc,engke,virlrc,press,taup,taut,sigma, -+ x tolnce,tstep,vircon,volm) -+ -+ else if(keyens.eq.7) then -+ -+c Nose-Hoover thermostat and barostat (cell shape varying) -+ -+ call nst_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,mode,chit,conint,consv,elrc,engke,virlrc,press, -+ x taup,taut,sigma,temp,tolnce,tstep,vircon,volm) -+ -+ elseif(keyens.eq.8) then -+ -+c Potential of mean force in NVE -+ -+ call pmflf -+ x (safe,safep,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) -+ -+ endif -+ -+ elseif(ngrp.gt.0) then -+ -+c apply rigid body equations of motion -+ -+ if(keyens.eq.0) then -+ -+ if(.not.lcnb) then -+ -+ call nveq_1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon) -+ -+ else -+ -+ call nveq_2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon) -+ -+ endif -+ -+ elseif(keyens.eq.1) then -+ -+c invalid option -+ -+ call error(idnode,430) -+ -+ elseif(keyens.eq.2) then -+ -+ if(.not.lcnb) then -+ -+ call nvtq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, -+ x tstep,vircom,vircon) -+ -+ else -+ -+ call nvtq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, -+ x tstep,vircom,vircon) -+ -+ endif -+ -+ elseif(keyens.eq.3) then -+ -+ if(.not.lcnb) then -+ -+ call nvtq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,chit,consv,conint,engke,engrot,quattol, -+ x sigma,taut,tolnce,tstep,vircom,vircon) -+ -+ else -+ -+ call nvtq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,conint,consv,chit,engke,engrot,quattol, -+ x sigma,taut,tolnce,tstep,vircom,vircon) -+ -+ endif -+ -+ elseif(keyens.eq.4) then -+ -+ if(.not.lcnb) then -+ -+ call nptq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,virtot,vircom, -+ x vircon,volm) -+ -+ else -+ -+ call nptq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon, -+ x virtot,volm) -+ -+ endif -+ -+ elseif(keyens.eq.5) then -+ -+ if(.not.lcnb) then -+ -+ call nptq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,virtot,vircom,vircon,volm) -+ -+ else -+ -+ call nptq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,vircom,vircon,virtot,volm) -+ -+ endif -+ -+ elseif(keyens.eq.6) then -+ -+ if(.not.lcnb) then -+ -+ call nstq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) -+ -+ else -+ -+ call nstq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) -+ -+ endif -+ -+ elseif(keyens.eq.7) then -+ -+ if(.not.lcnb) then -+ -+ call nstq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,vircom,vircon,volm) -+ -+ else -+ -+ call nstq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,vircom,vircon,volm) -+ -+ endif -+ -+ else -+ -+c invalid option -+ -+ call error(idnode,430) -+ -+ endif -+ -+ endif -+ -+c check on convergence of pmf-shake -+ -+ if(ntpmf.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safep) -+ if(.not.safep) call error(idnode,438) -+ -+ endif -+ -+c check on convergence of shake -+ -+ if(ntcons.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,105) -+ -+ endif -+ -+c check on convergence of quaternion algorithm -+ -+ if(ngrp.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safeq) -+ if(.not.safeq) call error(idnode,321) -+ -+ endif -+ -+c eliminate "flying ice cube" in long simulations (Berendsen) -+ -+ if(lnfic.and.(keyens.eq.2.or.keyens.eq.4.or.keyens.eq.6))then -+ -+ if(mod(nstep,nofic).eq.0)then -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine lf_integrate -+ -+ subroutine vv_integrate -+ x (lcnb,lshmov,lnfic,isw,idnode,mxnode,imcon,natms,nstep,ngrp, -+ x keyens,nscons,ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nofic, -+ x ntshl,keyshl,tstep,engke,engrot,tolnce,vircon,vircom,virtot, -+ x temp,press,volm,sigma,taut,taup,chit,chip,consv,conint,elrc, -+ x virlrc,virpmf,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for selecting the integration algorithm -+c to solve the the equations of motion. based on the velocity -+c verlet algorithm -+c -+c copyright - daresbury laboratory -+c author - w. smith february 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,safep,lcnb,lshmov,lnfic -+ integer isw,idnode,mxnode,imcon,natms,ngrp,keyens,nscons -+ integer ntcons,ntpatm,ntfree,nspmf,ntpmf,mode,nstep,nofic -+ integer ntshl,keyshl -+ real(8) tstep,engke,engrot,tolnce,vircon,vircom -+ real(8) virtot,temp,press,volm,sigma,taut,taup,chit,chip -+ real(8) consv,conint,elrc,virlrc,virpmf,chit_shl,sigma_shl -+ -+ if(ngrp.eq.0) then -+ -+ if(keyens.eq.0) then -+ -+c verlet leapfrog -+ -+ call nvevv_1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,tstep,engke,tolnce,vircon) -+ -+ else if(keyens.eq.1) then -+ -+c Evans Gaussian Temperature constraints -+ -+ call nvtvv_e1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,tstep,engke,tolnce,vircon) -+ -+ else if(keyens.eq.2) then -+ -+c Berendsen thermostat -+ -+ call nvtvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,tstep,taut,sigma,engke,tolnce,vircon) -+ -+ else if(keyens.eq.3) then -+ -+c Nose-Hoover thermostat -+ -+ call nvtvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntshl,keyshl,tstep,taut,sigma,chit,consv, -+ x conint,engke,tolnce,vircon,chit_shl,sigma_shl) -+ -+ elseif(keyens.eq.4) then -+ -+c Berendsen thermostat and isotropic barostat -+ -+ call nptvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,tstep,taut,taup,sigma,engke,press,elrc, -+ x virlrc,tolnce,virtot,vircon,volm) -+ -+ else if(keyens.eq.5) then -+ -+c Nose-Hoover thermostat and isotropic barostat -+ -+ call nptvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,ntshl,keyshl,tstep,taut,taup,sigma,temp, -+ x chip,chit,consv,conint,engke,elrc,tolnce,vircon, -+ x virtot,virlrc,volm,press,chit_shl,sigma_shl) -+ -+ else if(keyens.eq.6) then -+ -+c Berendsen thermostat and barostat (cell shape varying) -+ -+ call nstvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,mode,tstep,taut,taup,sigma,engke,press, -+ x elrc,virlrc,tolnce,vircon,volm) -+ -+ else if(keyens.eq.7) then -+ -+c Nose-Hoover thermostat and barostat (cell shape varying) -+ -+ call nstvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,mode,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chit,consv,conint,engke,elrc,tolnce,vircon, -+ x virlrc,volm,press,chit_shl,sigma_shl) -+ -+ elseif(keyens.eq.8) then -+ -+c Potential of mean force in NVE -+ -+ call pmfvv -+ x (safe,safep,lshmov,isw,idnode,mxnode,imcon,natms,nscons, -+ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) -+ -+ endif -+ -+ elseif(ngrp.gt.0) then -+ -+c apply rigid body equations of motion -+ -+ if(keyens.eq.0) then -+ -+ if(.not.lcnb) then -+ -+ call nveqvv_1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) -+ -+ else -+ -+ call nveqvv_2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) -+ -+ endif -+ -+ elseif(keyens.eq.1) then -+ -+c invalid option -+ -+ call error(idnode,430) -+ -+ elseif(keyens.eq.2) then -+ -+ if(.not.lcnb) then -+ -+ call nvtqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, -+ x vircom,vircon) -+ -+ else -+ -+ call nvtqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, -+ x vircom,vircon) -+ -+ endif -+ -+ elseif(keyens.eq.3) then -+ -+ if(.not.lcnb) then -+ -+ call nvtqvv_h1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke, -+ x engrot,taut,sigma,tolnce,tstep,vircom,vircon,chit_shl, -+ x sigma_shl) -+ -+ else -+ -+ call nvtqvv_h2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke, -+ x engrot,taut,sigma,tolnce,tstep,vircom,vircon,chit_shl, -+ x sigma_shl) -+ -+ endif -+ -+ elseif(keyens.eq.4) then -+ -+ if(.not.lcnb) then -+ -+ call nptqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) -+ -+ else -+ -+ call nptqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) -+ -+ endif -+ -+ elseif(keyens.eq.5) then -+ -+ if(.not.lcnb) then -+ -+ call nptqvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircon,virtot,virlrc,vircom,volm,press,chit_shl, -+ x sigma_shl) -+ -+ else -+ -+ call nptqvv_h2 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircom,vircon,virtot,virlrc,volm,press,chit_shl, -+ x sigma_shl) -+ -+ endif -+ -+ elseif(keyens.eq.6) then -+ -+ if(.not.lcnb) then -+ -+ call nstqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup, -+ x sigma,tolnce,tstep,vircom,vircon,elrc,virlrc,volm) -+ -+ else -+ -+ call nstqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup, -+ x sigma,tolnce,tstep,vircom,vircon,elrc,virlrc,volm) -+ -+ endif -+ -+ elseif(keyens.eq.7) then -+ -+ if(.not.lcnb) then -+ -+ call nstqvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, -+ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircon,virlrc,vircom,volm,press,chit_shl,sigma_shl) -+ -+ else -+ -+ call nstqvv_h2 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, -+ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircom,vircon,virlrc,volm,press,chit_shl,sigma_shl) -+ -+ endif -+ -+ else -+ -+c invalid option -+ -+ call error(idnode,430) -+ -+ endif -+ -+ endif -+ -+c check on convergence of pmf-shake -+ -+ if(ntpmf.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safep) -+ if(.not.safep) call error(idnode,438) -+ -+ endif -+ -+c check on convergence of shake -+ -+ if(ntcons.gt.0) then -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,105) -+ -+ endif -+ -+c eliminate "flying ice cube" in long simulations (Berendsen) -+ -+ if(lnfic.and.(keyens.eq.2.or.keyens.eq.4.or.keyens.eq.6))then -+ -+ if(mod(nstep,nofic).eq.0)then -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine vv_integrate -+ -+ end module integrator_module -diff -urN dl_class_1.9.orig/srcmod/inversion_module.f dl_class_1.9/srcmod/inversion_module.f ---- dl_class_1.9.orig/srcmod/inversion_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/inversion_module.f 2011-08-16 14:42:52.000000000 +0200 -@@ -0,0 +1,828 @@ -+ module inversion_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining inversion potential arrays -+c copyright - daresbury laboratory -+c -+c author - w. smith sep 2003 -+c adapted - w. smith jun 2008 : solvation, free energy, excitation -+c adapted - w. smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use solvation_module -+ -+ implicit none -+ -+ real(8), allocatable :: prminv(:,:) -+ integer, allocatable :: listinv(:,:) -+ integer, allocatable :: numinv(:),keyinv(:),lstinv(:,:) -+ -+ save prminv,listinv,numinv,keyinv,lstinv -+ -+ contains -+ -+ subroutine alloc_inv_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(5) -+ -+ do i=1,5 -+ fail(i)=0 -+ enddo -+ -+ allocate (prminv(mxtinv,mxpinv),stat=fail(1)) -+ allocate (numinv(mxtmls),stat=fail(2)) -+ allocate (keyinv(mxtinv),stat=fail(3)) -+ allocate (lstinv(mxtinv,4),stat=fail(4)) -+ allocate (listinv(mxinv,5),stat=fail(5)) -+ -+ do i=1,5 -+ if(fail(i).gt.0)call error(idnode,1120) -+ enddo -+ -+ do i=1,mxtmls -+ numinv(i)=0 -+ enddo -+ -+ end subroutine alloc_inv_arrays -+ -+ subroutine define_inversions -+ x (safe,idnode,itmols,ninver,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining inversion angle potentials -+c note: includes calcite planar potential which is not strictly -+c an inversion potential and is different in implementation -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ integer idnode,itmols,ninver,nsite,ntmp,inv,inv1,i -+ integer iatm1,iatm2,iatm3,iatm4,isite1,isite2,isite3,isite4 -+ integer ia,ja,idum -+ real(8) engunit -+ -+ ntmp=intstr(record,lenrec,idum) -+ numinv(itmols)=numinv(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of inversion terms', -+ x 6x,i10)")ntmp -+ write(nrite,"(/,/,1x,'inversion potential details:', -+ x /,/,21x,7x,'key',5x,'index',5x,'index',5x, -+ x 'index',5x,'index',5x,'f-const',7x,'angle',/)") -+ endif -+ -+ inv1=numinv(itmols) -+ do inv=1,inv1 -+ -+c read inversion potential parameters -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ iatm1=intstr(record,lenrec,idum) -+ iatm2=intstr(record,lenrec,idum) -+ iatm3=intstr(record,lenrec,idum) -+ iatm4=intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ isite2=nsite-numsit(itmols)+iatm2 -+ isite3=nsite-numsit(itmols)+iatm3 -+ isite4=nsite-numsit(itmols)+iatm4 -+ -+ if(lfzsit(isite1)*lfzsit(isite2)* -+ x lfzsit(isite3)*lfzsit(isite4).ne.0)then -+ -+ numinv(itmols)=numinv(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ ninver=ninver+1 -+ -+ if(ninver.gt.mxtinv)call error(idnode,73) -+ -+ if(keyword(1:4).eq.'harm')then -+ keyinv(ninver)=1 -+ elseif(keyword(1:4).eq.'hcos')then -+ keyinv(ninver)=2 -+ elseif(keyword(1:4).eq.'plan')then -+ keyinv(ninver)=3 -+ elseif(keyword(1:4).eq.'calc')then -+ keyinv(ninver)=4 -+ else -+ if(idnode.eq.0)write(nrite,*)record -+ call error(idnode,449) -+ endif -+ -+ lstinv(ninver,1)=iatm1 -+ lstinv(ninver,2)=iatm2 -+ lstinv(ninver,3)=iatm3 -+ lstinv(ninver,4)=iatm4 -+ prminv(ninver,1)=dblstr(record,lenrec,idum) -+ prminv(ninver,2)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,4i10,1p,e12.4,0p,9f12.6)") -+ x keyword(1:4),(lstinv(ninver,ia),ia=1,4), -+ x (prminv(ninver,ja),ja=1,mxpinv) -+ -+c convert energies to internal units and angles to radians -+ -+ prminv(ninver,1)=prminv(ninver,1)*engunit -+ -+ if(keyinv(ninver).eq.2)then -+ -+ prminv(ninver,2)=cos(prminv(ninver,2)*(pi/180.d0)) -+ -+ elseif(keyinv(ninver).eq.4)then -+ -+ prminv(ninver,2)=prminv(ninver,2)*engunit -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_inversions -+ -+ subroutine invfrc -+ x (lsolva,lfree,lexcite,idnode,imcon,mxnode,ntinv,enginv,virinv) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating inversion energy and force -+c terms in molecular dynamics. -+c -+c copyright - daresbury laboratory 1996 -+c author - w. smith may 1996 -+c modified - w.smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect,lcalcite -+ logical idrive,jdrive,kdrive,ldrive -+ integer idnode,imcon,mxnode,ntinv,fail1,fail2 -+ integer fail3,inv1,inv2,i,ii,ia,id,kk,ib,ic -+ real(8) strs(6),strs_loc(6) -+ real(8) xab,yab,zab,rab2,rrab,xac,yac,zac,rac2,rrac,xad,yad -+ real(8) zad,rad2,rrad,rbc,rcd,rdb,ubx,uby,ubz,ubn,rub,vbx -+ real(8) vby,vbz,rvb,wwb,ucx,ucy,ucz,ucn,vcx,vcy,vcz,rvc,wwc -+ real(8) udx,udy,udz,udn,vdx,vdy,vdz,vdn,rvd,wwd,cosb,cosc -+ real(8) cosd,thb,thc,thd,gamb,gamc,gamd,rubc,rubd,rucd,rucb -+ real(8) rudb,rudc,rvbc,rvbd,rvcd,rvcb,rvdb,rvdc,fax,fay,faz -+ real(8) fbx,fby,fbz,fcx,fcy,fcz,fdx,fdy,fdz,vbn,vcn,ruc,rud -+ real(8) uuu,uu2,uun,uux,uuy,uuz,enginv,virinv,omega,gamma -+ real(8) gamvir -+ -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ real(8), allocatable :: xdac(:),ydac(:),zdac(:) -+ real(8), allocatable :: xdad(:),ydad(:),zdad(:) -+ -+ data fail1,fail2,fail3/0,0,0/ -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail1) -+ allocate (xdac(msbad),ydac(msbad),zdac(msbad),stat=fail2) -+ allocate (xdad(msbad),ydad(msbad),zdad(msbad),stat=fail3) -+ if(fail1.ne.0.or.fail2.ne.0.or.fail3.ne.0) -+ x call error(idnode,1130) -+ -+c check size of work arrays -+ -+ if((ntinv-mxnode+1)/mxnode.gt.msbad)call error(idnode,427) -+ -+c block indices -+ -+ inv1=(idnode*ntinv)/mxnode+1 -+ inv2=((idnode+1)*ntinv)/mxnode -+ -+ safe=.true. -+ -+c initialise accumulators -+ -+ enginv=0.d0 -+ virinv=0.d0 -+ inv_fre=0.d0 -+ inv_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(4)=.true. -+ inv_sol(:)=0.d0 -+ if(lexcite)inv_exc(:)=0.d0 -+ -+ endif -+ -+c calculate bond vectors -+ -+ ii=0 -+ do i=inv1,inv2 -+ -+ ii=ii+1 -+ -+c potential energy function type -+ -+ kk=listinv(ii,1) -+ -+c indices of bonded atoms -+ -+ ia=listinv(ii,2) -+ ib=listinv(ii,3) -+ ic=listinv(ii,4) -+ id=listinv(ii,5) -+ -+c define components of bond vectors -+ -+ xdab(ii)=xxx(ib)-xxx(ia) -+ ydab(ii)=yyy(ib)-yyy(ia) -+ zdab(ii)=zzz(ib)-zzz(ia) -+ -+ if(keyinv(kk).eq.4)then -+ -+ xdac(ii)=xxx(ic)-xxx(ib) -+ ydac(ii)=yyy(ic)-yyy(ib) -+ zdac(ii)=zzz(ic)-zzz(ib) -+ -+ xdad(ii)=xxx(id)-xxx(ib) -+ ydad(ii)=yyy(id)-yyy(ib) -+ zdad(ii)=zzz(id)-zzz(ib) -+ -+ else -+ -+ xdac(ii)=xxx(ic)-xxx(ia) -+ ydac(ii)=yyy(ic)-yyy(ia) -+ zdac(ii)=zzz(ic)-zzz(ia) -+ -+ xdad(ii)=xxx(id)-xxx(ia) -+ ydad(ii)=yyy(id)-yyy(ia) -+ zdad(ii)=zzz(id)-zzz(ia) -+ -+ endif -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ call images(imcon,0,1,ii,cell,xdac,ydac,zdac) -+ call images(imcon,0,1,ii,cell,xdad,ydad,zdad) -+ -+c loop over all specified inversions -+ -+ ii=0 -+ do i=inv1,inv2 -+ -+ ii=ii+1 -+ -+c select potential energy function type -+ -+ kk=listinv(ii,1) -+ lcalcite=(keyinv(kk).eq.4) -+ -+c define components of bond vectors -+ -+ xab=xdab(ii) -+ yab=ydab(ii) -+ zab=zdab(ii) -+ rab2=xab*xab+yab*yab+zab*zab -+ rrab=1.d0/sqrt(rab2) -+ -+ xac=xdac(ii) -+ yac=ydac(ii) -+ zac=zdac(ii) -+ rac2=xac*xac+yac*yac+zac*zac -+ rrac=1.d0/sqrt(rac2) -+ -+ xad=xdad(ii) -+ yad=ydad(ii) -+ zad=zdad(ii) -+ rad2=xad*xad+yad*yad+zad*zad -+ rrad=1.d0/sqrt(rad2) -+ -+ if(lcalcite)then -+ -+c calculate vector normal to plane -+ -+ uux=yac*zad-zac*yad -+ uuy=zac*xad-xac*zad -+ uuz=xac*yad-yac*xad -+ uun=1.d0/sqrt(uux**2+uuy**2+uuz**2) -+ uux=uun*uux -+ uuy=uun*uuy -+ uuz=uun*uuz -+ uuu=xab*uux+yab*uuy+zab*uuz -+ -+ else -+ -+c scalar products of bond vectors -+ -+ rbc=xab*xac+yab*yac+zab*zac -+ rcd=xac*xad+yac*yad+zac*zad -+ rdb=xad*xab+yad*yab+zad*zab -+ -+c calculate bond-angle-plane vectors -+ -+ ubx=xac*rrac+xad*rrad -+ uby=yac*rrac+yad*rrad -+ ubz=zac*rrac+zad*rrad -+ ubn=1.d0/sqrt(ubx**2+uby**2+ubz**2) -+ ubx=ubn*ubx -+ uby=ubn*uby -+ ubz=ubn*ubz -+ rub=xab*ubx+yab*uby+zab*ubz -+ -+ vbx=xac*rrac-xad*rrad -+ vby=yac*rrac-yad*rrad -+ vbz=zac*rrac-zad*rrad -+ vbn=1.d0/sqrt(vbx**2+vby**2+vbz**2) -+ vbx=vbn*vbx -+ vby=vbn*vby -+ vbz=vbn*vbz -+ rvb=xab*vbx+yab*vby+zab*vbz -+ wwb=sqrt(rub**2+rvb**2) -+ -+ ucx=xad*rrad+xab*rrab -+ ucy=yad*rrad+yab*rrab -+ ucz=zad*rrad+zab*rrab -+ ucn=1.d0/sqrt(ucx**2+ucy**2+ucz**2) -+ ucx=ucn*ucx -+ ucy=ucn*ucy -+ ucz=ucn*ucz -+ ruc=xac*ucx+yac*ucy+zac*ucz -+ -+ vcx=xad*rrad-xab*rrab -+ vcy=yad*rrad-yab*rrab -+ vcz=zad*rrad-zab*rrab -+ vcn=1.d0/sqrt(vcx**2+vcy**2+vcz**2) -+ vcx=vcn*vcx -+ vcy=vcn*vcy -+ vcz=vcn*vcz -+ rvc=xac*vcx+yac*vcy+zac*vcz -+ wwc=sqrt(ruc**2+rvc**2) -+ -+ udx=xab*rrab+xac*rrac -+ udy=yab*rrab+yac*rrac -+ udz=zab*rrab+zac*rrac -+ udn=1.d0/sqrt(udx**2+udy**2+udz**2) -+ udx=udn*udx -+ udy=udn*udy -+ udz=udn*udz -+ rud=xad*udx+yad*udy+zad*udz -+ -+ vdx=xab*rrab-xac*rrac -+ vdy=yab*rrab-yac*rrac -+ vdz=zab*rrab-zac*rrac -+ vdn=1.d0/sqrt(vdx**2+vdy**2+vdz**2) -+ vdx=vdn*vdx -+ vdy=vdn*vdy -+ vdz=vdn*vdz -+ rvd=xad*vdx+yad*vdy+zad*vdz -+ wwd=sqrt(rud**2+rvd**2) -+ -+c calculate inversion angle cosines -+ -+ cosb=wwb*rrab -+ cosc=wwc*rrac -+ cosd=wwd*rrad -+ -+ endif -+ -+c calculate potential energy and scalar force term -+ -+ if(keyinv(kk).eq.1)then -+ -+c key=1 for harmonic inversion potential -+ -+ thb=acos(cosb) -+ thc=acos(cosc) -+ thd=acos(cosd) -+ omega=0.5d0*prminv(kk,1)*((thb-prminv(kk,2))**2+ -+ x (thc-prminv(kk,2))**2+(thd-prminv(kk,2))**2)/3.d0 -+ gamvir=0.d0 -+ -+ gamb=0.d0 -+ if(abs(thb).gt.1.d-12) -+ x gamb=prminv(kk,1)*(thb-prminv(kk,2))/(3.d0*sin(thb)) -+ gamc=0.d0 -+ if(abs(thc).gt.1.d-12) -+ x gamc=prminv(kk,1)*(thc-prminv(kk,2))/(3.d0*sin(thc)) -+ gamd=0.d0 -+ if(abs(thd).gt.1.d-12) -+ x gamd=prminv(kk,1)*(thd-prminv(kk,2))/(3.d0*sin(thd)) -+ -+ else if(keyinv(kk).eq.2)then -+ -+c key=2 for harmonic cosine inversion potential -+ -+ omega=0.5d0*prminv(kk,1)*((cosb-prminv(kk,2))**2+ -+ x (cosc-prminv(kk,2))**2+(cosb-prminv(kk,2))**2)/3.d0 -+ gamvir=0.d0 -+ -+ gamb=-prminv(kk,1)*(cosb-prminv(kk,2))/3.d0 -+ gamc=-prminv(kk,1)*(cosc-prminv(kk,2))/3.d0 -+ gamd=-prminv(kk,1)*(cosd-prminv(kk,2))/3.d0 -+ -+ else if(keyinv(kk).eq.3)then -+ -+c key=3 for planar inversion potentials -+ -+ omega=prminv(kk,1)*((1.d0-cosb)+(1.d0-cosc)+(1.d0-cosd))/3.d0 -+ gamvir=0.d0 -+ -+ gamb=prminv(kk,1)/3.d0 -+ gamc=prminv(kk,1)/3.d0 -+ gamd=prminv(kk,1)/3.d0 -+ -+ else if(keyinv(kk).eq.4)then -+ -+c key=4 for planar calcite potential -+ -+ uu2=uuu*uuu -+ omega=uu2*(prminv(kk,1)+prminv(kk,2)*uu2) -+ gamvir=uu2*(2.d0*prminv(kk,1)+4.d0*prminv(kk,2)*uu2) -+ gamma=-uuu*(2.d0*prminv(kk,1)+4.d0*prminv(kk,2)*uu2) -+ -+ else -+ -+c undefined potential -+ -+ safe=.false. -+ gamvir=0.d0 -+ gamb=0.d0 -+ gamc=0.d0 -+ gamd=0.d0 -+ -+ endif -+ -+c indices of bonded atoms -+ -+ ia=listinv(ii,2) -+ ib=listinv(ii,3) -+ ic=listinv(ii,4) -+ id=listinv(ii,5) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ kdrive=driven(ltype(ic)) -+ ldrive=driven(ltype(id)) -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1).and. -+ x (atm_fre(ic).ne.1).and.(atm_fre(id).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic)+ -+ x atm_fre(id).eq.0) -+ -+ if(lsolva)then -+ inv_exc(atmolt(ia))=inv_exc(atmolt(ia))+omega -+ endif -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1).or. -+ x (atm_fre(ic).eq.1).or.(atm_fre(id).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ inv_fre=inv_fre-omega -+ omega=lambda1*omega -+ gamb=lambda1*gamb -+ gamc=lambda1*gamc -+ gamd=lambda1*gamd -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2).or. -+ x (atm_fre(ic).eq.2).or.(atm_fre(id).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ inv_fre=inv_fre+omega -+ omega=lambda2*omega -+ gamb=lambda2*gamb -+ gamc=lambda2*gamc -+ gamd=lambda2*gamd -+ -+ endif -+ -+ endif -+ -+c calculate bond and u,v scalar products -+ -+ if(.not.lcalcite)then -+ -+ rubc=xab*ucx+yab*ucy+zab*ucz -+ rubd=xab*udx+yab*udy+zab*udz -+ rucd=xac*udx+yac*udy+zac*udz -+ rucb=xac*ubx+yac*uby+zac*ubz -+ rudb=xad*ubx+yad*uby+zad*ubz -+ rudc=xad*ucx+yad*ucy+zad*ucz -+ -+ rvbc=xab*vcx+yab*vcy+zab*vcz -+ rvbd=xab*vdx+yab*vdy+zab*vdz -+ rvcd=xac*vdx+yac*vdy+zac*vdz -+ rvcb=xac*vbx+yac*vby+zac*vbz -+ rvdb=xad*vbx+yad*vby+zad*vbz -+ rvdc=xad*vcx+yad*vcy+zad*vcz -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ enginv=enginv+omega -+ virinv=virinv+gamvir -+ -+c calculate solvation energy -+ -+ if(lsolva)then -+ inv_sol(atmolt(ia))=inv_sol(atmolt(ia))+omega -+ endif -+ -+c calculate atomic forces -+ -+ if(lcalcite)then -+ -+ fax=-gamma*uux -+ fay=-gamma*uuy -+ faz=-gamma*uuz -+ -+ fcx=gamma*uun*((yad*zab-zad*yab)-uuu*(yad*uuz-zad*uuy)) -+ fcy=gamma*uun*((zad*xab-xad*zab)-uuu*(zad*uux-xad*uuz)) -+ fcz=gamma*uun*((xad*yab-yad*xab)-uuu*(xad*uuy-yad*uux)) -+ -+ fdx=gamma*uun*((yab*zac-zab*yac)-uuu*(zac*uuy-yac*uuz)) -+ fdy=gamma*uun*((zab*xac-xab*zac)-uuu*(xac*uuz-zac*uux)) -+ fdz=gamma*uun*((xab*yac-yab*xac)-uuu*(yac*uux-xac*uuy)) -+ -+ fbx=-(fax+fcx+fdx) -+ fby=-(fay+fcy+fdy) -+ fbz=-(faz+fcz+fdz) -+ -+c stress tensor calculation for calcite terms -+ -+ strs(1)=strs(1)+uuu*gamma*uux*uux -+ strs(2)=strs(2)+uuu*gamma*uux*uuy -+ strs(3)=strs(3)+uuu*gamma*uux*uuz -+ strs(4)=strs(4)+uuu*gamma*uuy*uuy -+ strs(5)=strs(5)+uuu*gamma*uuy*uuz -+ strs(6)=strs(6)+uuu*gamma*uuz*uuz -+ -+ else -+ -+ fbx=gamb*(-cosb*xab*rrab**2+rrab*(rub*ubx+rvb*vbx)/wwb) -+ x +(ruc*ucn*rrab*(xac-ruc*ucx-(rbc-ruc*rubc)*xab*rrab**2) -+ x -rvc*vcn*rrab*(xac-rvc*vcx-(rbc-rvc*rvbc)*xab*rrab**2)) -+ x *gamc*rrac/wwc -+ x +(rud*udn*rrab*(xad-rud*udx-(rdb-rud*rubd)*xab*rrab**2) -+ x +rvd*vdn*rrab*(xad-rvd*vdx-(rdb-rvd*rvbd)*xab*rrab**2)) -+ x *gamd*rrad/wwd -+ -+ fby=gamb*(-cosb*yab*rrab**2+rrab*(rub*uby+rvb*vby)/wwb) -+ x +(ruc*ucn*rrab*(yac-ruc*ucy-(rbc-ruc*rubc)*yab*rrab**2) -+ x -rvc*vcn*rrab*(yac-rvc*vcy-(rbc-rvc*rvbc)*yab*rrab**2)) -+ x *gamc*rrac/wwc -+ x +(rud*udn*rrab*(yad-rud*udy-(rdb-rud*rubd)*yab*rrab**2) -+ x +rvd*vdn*rrab*(yad-rvd*vdy-(rdb-rvd*rvbd)*yab*rrab**2)) -+ x *gamd*rrad/wwd -+ -+ fbz=gamb*(-cosb*zab*rrab**2+rrab*(rub*ubz+rvb*vbz)/wwb) -+ x +(ruc*ucn*rrab*(zac-ruc*ucz-(rbc-ruc*rubc)*zab*rrab**2) -+ x -rvc*vcn*rrab*(zac-rvc*vcz-(rbc-rvc*rvbc)*zab*rrab**2)) -+ x *gamc*rrac/wwc -+ x +(rud*udn*rrab*(zad-rud*udz-(rdb-rud*rubd)*zab*rrab**2) -+ x +rvd*vdn*rrab*(zad-rvd*vdz-(rdb-rvd*rvbd)*zab*rrab**2)) -+ x *gamd*rrad/wwd -+ -+ fcx=gamc*(-cosc*xac*rrac**2+rrac*(ruc*ucx+rvc*vcx)/wwc) -+ x +(rud*udn*rrac*(xad-rud*udx-(rcd-rud*rucd)*xac*rrac**2) -+ x -rvd*vdn*rrac*(xad-rvd*vdx-(rcd-rvd*rvcd)*xac*rrac**2)) -+ x *gamd*rrad/wwd -+ x +(rub*ubn*rrac*(xab-rub*ubx-(rbc-rub*rucb)*xac*rrac**2) -+ x +rvb*vbn*rrac*(xab-rvb*vbx-(rbc-rvb*rvcb)*xac*rrac**2)) -+ x *gamb*rrab/wwb -+ -+ fcy=gamc*(-cosc*yac*rrac**2+rrac*(ruc*ucy+rvc*vcy)/wwc) -+ x +(rud*udn*rrac*(yad-rud*udy-(rcd-rud*rucd)*yac*rrac**2) -+ x -rvd*vdn*rrac*(yad-rvd*vdy-(rcd-rvd*rvcd)*yac*rrac**2)) -+ x *gamd*rrad/wwd -+ x +(rub*ubn*rrac*(yab-rub*uby-(rbc-rub*rucb)*yac*rrac**2) -+ x +rvb*vbn*rrac*(yab-rvb*vby-(rbc-rvb*rvcb)*yac*rrac**2)) -+ x *gamb*rrab/wwb -+ -+ fcz=gamc*(-cosc*zac*rrac**2+rrac*(ruc*ucz+rvc*vcz)/wwc) -+ x +(rud*udn*rrac*(zad-rud*udz-(rcd-rud*rucd)*zac*rrac**2) -+ x -rvd*vdn*rrac*(zad-rvd*vdz-(rcd-rvd*rvcd)*zac*rrac**2)) -+ x *gamd*rrad/wwd -+ x +(rub*ubn*rrac*(zab-rub*ubz-(rbc-rub*rucb)*zac*rrac**2) -+ x +rvb*vbn*rrac*(zab-rvb*vbz-(rbc-rvb*rvcb)*zac*rrac**2)) -+ x *gamb*rrab/wwb -+ -+ fdx=gamd*(-cosd*xad*rrad**2+rrad*(rud*udx+rvd*vdx)/wwd) -+ x +(rub*ubn*rrad*(xab-rub*ubx-(rdb-rub*rudb)*xad*rrad**2) -+ x -rvb*vbn*rrad*(xab-rvb*vbx-(rdb-rvb*rvdb)*xad*rrad**2)) -+ x *gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(xac-ruc*ucx-(rcd-ruc*rudc)*xad*rrad**2) -+ x +rvc*vcn*rrad*(xac-rvc*vcx-(rcd-rvc*rvdc)*xad*rrad**2)) -+ x *gamc*rrac/wwc -+ -+ fdy=gamd*(-cosd*yad*rrad**2+rrad*(rud*udy+rvd*vdy)/wwd) -+ x +(rub*ubn*rrad*(yab-rub*uby-(rdb-rub*rudb)*yad*rrad**2) -+ x -rvb*vbn*rrad*(yab-rvb*vby-(rdb-rvb*rvdb)*yad*rrad**2)) -+ x *gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(yac-ruc*ucy-(rcd-ruc*rudc)*yad*rrad**2) -+ x +rvc*vcn*rrad*(yac-rvc*vcy-(rcd-rvc*rvdc)*yad*rrad**2)) -+ x *gamc*rrac/wwc -+ -+ fdz=gamd*(-cosd*zad*rrad**2+rrad*(rud*udz+rvd*vdz)/wwd) -+ x +(rub*ubn*rrad*(zab-rub*ubz-(rdb-rub*rudb)*zad*rrad**2) -+ x -rvb*vbn*rrad*(zab-rvb*vbz-(rdb-rvb*rvdb)*zad*rrad**2)) -+ x *gamb*rrab/wwb -+ x +(ruc*ucn*rrad*(zac-ruc*ucz-(rcd-ruc*rudc)*zad*rrad**2) -+ x +rvc*vcn*rrad*(zac-rvc*vcz-(rcd-rvc*rvdc)*zad*rrad**2)) -+ x *gamc*rrac/wwc -+ -+ fax=-(fbx+fcx+fdx) -+ fay=-(fby+fcy+fdy) -+ faz=-(fbz+fcz+fdz) -+ -+c stress tensor calculation for inversion terms -+ -+ strs(1)=strs(1)+xab*fbx+xac*fcx+xad*fdx -+ strs(2)=strs(2)+yab*fbx+yac*fcx+yad*fdx -+ strs(3)=strs(3)+zab*fbx+zac*fcx+zad*fdx -+ strs(4)=strs(4)+yab*fby+yac*fcy+yad*fdy -+ strs(5)=strs(5)+yab*fbz+yac*fcz+yad*fdz -+ strs(6)=strs(6)+zab*fbz+zac*fcz+zad*fdz -+ -+ endif -+ -+ fxx(ia)=fxx(ia)+fax -+ fyy(ia)=fyy(ia)+fay -+ fzz(ia)=fzz(ia)+faz -+ -+ fxx(ib)=fxx(ib)+fbx -+ fyy(ib)=fyy(ib)+fby -+ fzz(ib)=fzz(ib)+fbz -+ -+ fxx(ic)=fxx(ic)+fcx -+ fyy(ic)=fyy(ic)+fcy -+ fzz(ic)=fzz(ic)+fcz -+ -+ fxx(id)=fxx(id)+fdx -+ fyy(id)=fyy(id)+fdy -+ fzz(id)=fzz(id)+fdz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive.or.kdrive.or.ldrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc+gamvir -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fax -+ fyy_loc(ia)=fyy_loc(ia)+fay -+ fzz_loc(ia)=fzz_loc(ia)+faz -+ -+ fxx_loc(ib)=fxx_loc(ib)+fbx -+ fyy_loc(ib)=fyy_loc(ib)+fby -+ fzz_loc(ib)=fzz_loc(ib)+fbz -+ -+ fxx_loc(ic)=fxx_loc(ic)+fcx -+ fyy_loc(ic)=fyy_loc(ic)+fcy -+ fzz_loc(ic)=fzz_loc(ic)+fcz -+ -+ fxx_loc(id)=fxx_loc(id)+fdx -+ fyy_loc(id)=fyy_loc(id)+fdy -+ fzz_loc(id)=fzz_loc(id)+fdz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xab*fbx+xac*fcx+xad*fdx -+ strs_loc(2)=strs_loc(2)+yab*fbx+yac*fcx+yad*fdx -+ strs_loc(3)=strs_loc(3)+zab*fbx+zac*fcx+zad*fdx -+ strs_loc(4)=strs_loc(4)+yab*fby+yac*fcy+yad*fdy -+ strs_loc(5)=strs_loc(5)+yab*fbz+yac*fcz+yad*fdz -+ strs_loc(6)=strs_loc(6)+zab*fbz+zac*fcz+zad*fdz -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,449) -+ -+c sum contributions over all nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=enginv -+ buffer(2)=virinv -+ buffer(3)=inv_fre -+ buffer(4)=inv_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ enginv=buffer(1) -+ virinv=buffer(2) -+ inv_fre=buffer(3) -+ inv_vir=buffer(4) -+ -+ if(lsolva)then -+ -+ call gdsum(inv_sol(1),mxtmls,buffer(1)) -+ if(lexcite)call gdsum(inv_exc(1),mxtmls,buffer(1)) -+ -+ endif -+ -+ endif -+ -+ deallocate (xdab,ydab,zdab,stat=fail1) -+ deallocate (xdac,ydac,zdac,stat=fail2) -+ deallocate (xdad,ydad,zdad,stat=fail3) -+ -+ return -+ end subroutine invfrc -+ -+ end module inversion_module -diff -urN dl_class_1.9.orig/srcmod/lf_motion_module.f dl_class_1.9/srcmod/lf_motion_module.f ---- dl_class_1.9.orig/srcmod/lf_motion_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/lf_motion_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,2994 @@ -+ module lf_motion_module -+ -+c*********************************************************************** -+c -+c dl_poly module for verlet leap frog integration schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use property_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ contains -+ -+ subroutine rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,stresh) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for applying bond constraint corrections after -+c atomic integration. -+c Must be used in conjunction with integration algorithms -+c -+c assume bond vectors dxx,dyy,dzz are input -+c dxx =xxx(i) - xxx(j) etc -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith august 1992. -+c amended - t. forester march 1994. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,icyc,i,j,k -+ real(8) tolnce,tstep,vircon,stresh,dxx,dyy,dzz,strs1,strs2 -+ real(8) strs3,strs5,strs6,strs9,tstep2,esig,esig1 -+ real(8) dis,amti,amtj,omega2,gamma,gammi,gammj,dli,dlj -+ real(8) dxt,dyt,dzt,txx,tyy,tzz,xxt,yyt,zzt -+ -+ dimension stresh(9) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ -+c test size of work arrays -+ -+ safe=.true. -+ if(mxxdf.lt.nscons)safe=.false. -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,412) -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c accumulators for stress tensor -+ -+ vircon=0.d0 -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ safe=.false. -+ -+ do while(.not.safe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate temporary bond vector -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c calculate maximum error in bondlength -+ -+ esig=0.d0 -+ -+ do k=1,nscons -+ -+c set bond parameter -+ -+ dis=prmcon(listcon(k,1)) -+ esig1=abs(dxt(k)**2+dyt(k)**2+dzt(k)**2-dis**2)/dis -+ esig=max(esig,esig1) -+ -+ enddo -+ -+ esig=esig*0.5d0 -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+c bypass calculations if all tolerances satisfied -+ -+ if(.not.safe)then -+ -+c initialise increment arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint forces -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c set constraint parameters -+ -+ dis=prmcon(listcon(k,1)) -+ omega2=dis*dis -+ amti= tstep2/weight(i) -+ amtj=-tstep2/weight(j) -+ -+ if(lstfrz(i).ne.0) amti=0.d0 -+ if(lstfrz(j).ne.0) amtj=0.d0 -+ -+c constraint force parameter -+ -+ gamma=(omega2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/ -+ x (-2.d0*(amti-amtj)* -+ x (dxx(k)*dxt(k)+dyy(k)*dyt(k)+dzz(k)*dzt(k))) -+ -+c accumulate bond virial -+ -+ vircon=vircon+gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ -+ strs1=strs1-gamma*dxx(k)*dxx(k) -+ strs2=strs2-gamma*dxx(k)*dyy(k) -+ strs3=strs3-gamma*dxx(k)*dzz(k) -+ strs5=strs5-gamma*dyy(k)*dyy(k) -+ strs6=strs6-gamma*dyy(k)*dzz(k) -+ strs9=strs9-gamma*dzz(k)*dzz(k) -+ -+c improve approximate atomic positions -+ -+ gammi=-gamma*amti -+ xxt(i)=xxt(i)+dxx(k)*gammi -+ yyt(i)=yyt(i)+dyy(k)*gammi -+ zzt(i)=zzt(i)+dzz(k)*gammi -+ -+ gammj=-gamma*amtj -+ xxt(j)=xxt(j)+dxx(k)*gammj -+ yyt(j)=yyt(j)+dyy(k)*gammj -+ zzt(j)=zzt(j)+dzz(k)*gammj -+ -+ enddo -+ -+c transport temporary positions to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov) call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ dlj=1.d0/dble(listme(j)) -+ -+ xxx(i)=xxx(i)+xxt(i)*dli -+ yyy(i)=yyy(i)+yyt(i)*dli -+ zzz(i)=zzz(i)+zzt(i)*dli -+ xxx(j)=xxx(j)+xxt(j)*dlj -+ yyy(j)=yyy(j)+yyt(j)*dlj -+ zzz(j)=zzz(j)+zzt(j)*dlj -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c error exit for non-convergence -+ -+ if(.not.safe)return -+ -+c complete stress tensor -+ -+ stresh(1)=strs1 -+ stresh(2)=strs2 -+ stresh(3)=strs3 -+ stresh(4)=strs2 -+ stresh(5)=strs5 -+ stresh(6)=strs6 -+ stresh(7)=strs3 -+ stresh(8)=strs6 -+ stresh(9)=strs9 -+ -+c splice coordinate arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(stresh,9,buffer) -+ call splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ return -+ end subroutine rdshake_1 -+ -+ subroutine nve_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,tolnce,tstep,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics. Verlet leapfrog With RD-SHAKE -+c -+c parallel replicated data version : block data -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith august 1992. -+c amended - t.forester sept 1994 -+c amended - t.forester dec 1994 : block data -+c amended - w.smith oct 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,iatm0 -+ integer iatm1,i,j,k -+ real(8) engke,tolnce,tstep,vircon,strkin,rstep -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),fail(7) -+ -+c allocate working arrays -+ -+ do i=1,7 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(7)) -+ do i=1,7 -+ if(fail(i).ne.0)call error(idnode,1380) -+ enddo -+ -+ safe=.false. -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c move atoms by leapfrog algorithm -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c update velocities -+ -+ uxx(i)=vxx(i)+tstep*rmass(i)*fxx(i) -+ uyy(i)=vyy(i)+tstep*rmass(i)*fyy(i) -+ uzz(i)=vzz(i)+tstep*rmass(i)*fzz(i) -+ -+c update positions -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+c calculate velocity correction -+ -+ j=0 -+ rstep=1.d0/tstep -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=(xxx(i)-xxo(j))*rstep -+ uyy(i)=(yyy(i)-yyo(j))*rstep -+ uzz(i)=(zzz(i)-zzo(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=(uxx(i)-vxo(j))*weight(i)*rstep -+ fyy(i)=(uyy(i)-vyo(j))*weight(i)*rstep -+ fzz(i)=(uzz(i)-vzo(j))*weight(i)*rstep -+ -+ enddo -+ -+ endif -+ -+c calculate full timestep velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=0.5d0*(vxx(i)+uxx(i)) -+ vyy(i)=0.5d0*(vyy(i)+uyy(i)) -+ vzz(i)=0.5d0*(vzz(i)+uzz(i)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nve_1 -+ -+ subroutine nvt_e1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,tolnce,tstep,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Evans -+c thermostat. -+c Comp. Phys. reports 1, 299, (1984) -+c -+c parallel replicated data version : block data -+c -+c for systems using bond CONSTRAINTS. -+c -+c copyright - daresbury laboratory -+c author - t forester july 1993 -+c amended - w.smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,iatm0 -+ integer iatm1,i,j,k,iter,mxiter -+ real(8) engke,tolnce,tstep,vircon,strkin -+ real(8) rstep,chit,viracc,strcon,vdotf -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),strcon(9),fail(7) -+ -+c allocate working arrays -+ -+ do i=1,7 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(7)) -+ do i=1,7 -+ if(fail(i).ne.0)call error(idnode,1390) -+ enddo -+ -+ safe=.false. -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial positions and velocities -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c begin temperature control iteration -+ -+ mxiter=3 -+ if(ntcons.eq.0)mxiter=2 -+ chit=0.d0 -+ -+ do iter=1,mxiter -+ -+c move atoms by leapfrog algorithm -+ -+ j=0 -+ -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c update velocities -+ -+ uxx(i)=vxo(j)+tstep*(rmass(i)*fxx(i)-chit*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(rmass(i)*fyy(i)-chit*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(rmass(i)*fzz(i)-chit*vzz(i)) -+ -+c update positions -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c merge configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=(xxx(i)-xxo(j))*rstep -+ uyy(i)=(yyy(i)-yyo(j))*rstep -+ uzz(i)=(zzz(i)-zzo(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=(uxx(i)-vxo(j))*weight(i)*rstep -+ fyy(i)=(uyy(i)-vyo(j))*weight(i)*rstep -+ fzz(i)=(uzz(i)-vzo(j))*weight(i)*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy and evans thermostat parameter -+ -+ engke=0.d0 -+ vdotf=0.d0 -+ do i=iatm0,iatm1 -+ -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ buffer(2)=vdotf -+ call gdsum(buffer(1),2,buffer(3)) -+ engke=buffer(1) -+ vdotf=buffer(2) -+ -+ endif -+ chit=vdotf/engke -+ engke=0.5d0*engke -+ -+c end of thermal constraint iteration -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nvt_e1 -+ -+ subroutine nvt_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x engke,taut,sigma,tolnce,tstep,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat. -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester may 1993 -+c amended : t.forester sept 1994 -+c amended : t.forester dec 1994 : block data -+c amended - w.smith oct 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail -+ integer iatm0,iatm1,i,j,k,maxit,iter -+ real(8) engke,taut,sigma,tolnce,tstep,vircon,strkin,viracc -+ real(8) rstep,rtsq,chit0,strcon -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),fail(8),strcon(9) -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1400) -+ enddo -+ -+ safe=.false. -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c estimate kinetic energy at full timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=3 -+ if(ntcons.eq.0) maxit=maxit-1 -+ do iter=1,maxit -+ -+c temperature scaling coefficient - taut is the decay constant -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+c unconstrained new positions with thermostat -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+c store uncorrected positions -+ -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0.and.iter.eq.1)then -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c calculate kinetic energy -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c estimate velocity at the full step -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nvt_b1 -+ -+ subroutine nvt_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons,ntcons, -+ x chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat. -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c copyright - daresbury laboratory -+c author - t. forester may 1993 -+c amended - w.smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,fail,i,j,k -+ integer iatm0,iatm1,maxit,iter -+ real(8) chit,consv,conint,engke,taut,sigma,tolnce,tstep,vircon -+ real(8) strkin,rstep,rtsq,qmass,chitp,chit0,viracc -+ real(8) chitnew,strcon -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),fail(8),strcon(9) -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1410) -+ enddo -+ -+ safe=.false. -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c estimate velocities at full time step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy at full time step -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c propagate chit -+ -+ chitp=2.d0*(engke-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=4 -+ if(ntcons.eq.0) maxit=maxit-1 -+ -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-chit0*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-chit0*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-chit0*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+c store uncorrected positions -+ -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0.and.iter.eq.1)then -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c improved prediction of chit -+ -+ chitp=2.d0*(engke-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c update thermostat -+ -+ chit=chitnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*qmass/taut**2 -+ consv=conint+0.5d0*qmass*chit0**2 -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nvt_h1 -+ -+ subroutine npt_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, -+ x tstep,virtot,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat and isotropic pressure control -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version -+c -+c for systems using bond CONSTRAINTS. Frozen atoms feb 1994 -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester dec 1993 -+c amended - w.smith oct 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons -+ integer fail,i,j,k,iatm0,iatm1,maxit,iter -+ real(8) elrc,engke,virlrc,press,taup,taut,sigma,tolnce,tstep -+ real(8) virtot,vircon,volm,strkin,beta,volm0,cell0 -+ real(8) elrc0,virlrc0,rstep,rtsq,psyst,chip0,scale -+ real(8) chit0,viracc,strcon -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),cell0(9),fail(8),strcon(9) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0 -+ -+ data newjob/.true./ -+ data beta/7.3728d-3/ -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1420) -+ enddo -+ -+ safe=.false. -+ -+c store initial values of volume and long range corrections -+ -+ if(newjob)then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1430) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise constraint virial terms -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial cell vectors -+ -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c estimate velocity at full timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy at current timestep -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c pressure control variable - taup is pressure relaxation time -+ -+ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ -+c temperature scaling coefficient - taut is temperature relaxation time -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=5 -+ if(ntcons.eq.0)maxit=maxit-1 -+ -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+scale*xxo(j) -+ yyy(i)=tstep*uyy(i)+scale*yyo(j) -+ zzz(i)=tstep*uzz(i)+scale*zzo(j) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c store integrated positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c estimate new cell tensor -+ -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c improved prediction of chip and chit -+ -+ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c update volume -+ -+ volm=volm*chip0 -+ -+c scale cell vectors - isotropic -+ -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c construct scaling tensor (for use with tethers) -+ -+ do i=2,8 -+ eta(i)=0.d0 -+ enddo -+ eta(1)=scale -+ eta(5)=scale -+ eta(9)=scale -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine npt_b1 -+ -+ subroutine npt_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,chip,chit,conint,consv,elrc,engke,virlrc,press, -+ x taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat+piston. -+c -+c reference: Melchionna, Ciccotti and Holian, -+c Mol Phys 1993, 78, p533 -+c -+c parallel replicated data version -+c -+c for systems using bond constraints (using atomic pressure) -+c -+c copyright daresbury laboratory 1995 -+c author - s. melchionna april 1995 -+c and - t. forester april 1995 -+c amended - w. smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons -+ integer i,j,k,iatm0,iatm1,fail,maxit,iter -+ real(8) chip,chit,conint,consv,elrc,engke,virlrc,press -+ real(8) taup,taut,sigma,temp,tolnce,tstep,virtot,vircon,volm -+ real(8) strcon,volm0,elrc0,virlrc0,rstep,rtsq,qmass -+ real(8) chipnew,chitp,chitnew,chit0,volnew,scale,viracc,vold -+ real(8) cons1,cons2,cons3,strkin,cell0 -+ real(8) pmass,totmas,chipp,chip0,com,vom -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strcon(9),fail(8),strkin(9),com(3),vom(3),cell0(9) -+ -+ save newjob,volm0,elrc0,virlrc0,cell0,dens0 -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1440) -+ enddo -+ -+ safe=.false. -+ -+c store initial values of volume, long range corrections etc -+ -+ if(newjob)then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1450) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c estimate kinetic energy at current timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c estimate velocity at the full step -+ -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c propagate chip -+ -+ chipp=(2.d0*engke-virtot-vircon-3.d0*press*volm)/pmass- -+ x chit*chip -+ chipnew=chip+tstep*chipp -+ chip0=0.5d0*(chip+chipnew) -+ -+c propagate chit -+ -+ chitp=(2.d0*(engke-sigma)+pmass*chip**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=5 -+ if(ntcons.eq.0) maxit=maxit-1 -+ -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*(uxx(i)+ -+ x chipnew*((xxx(i)+xxo(j))*0.5d0-com(1))) -+ yyy(i)=yyo(j)+tstep*(uyy(i)+ -+ x chipnew*((yyy(i)+yyo(j))*0.5d0-com(2))) -+ zzz(i)=zzo(j)+tstep*(uzz(i)+ -+ x chipnew*((zzz(i)+zzo(j))*0.5d0-com(3))) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c store integrated positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c estimate new cell tensor -+ -+ volnew=volm*exp(3.d0*tstep*chipnew) -+ scale=(volnew/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c improved prediction of chip and chit -+ -+ chipp=(2.d0*engke-virtot-vircon-3.d0*press*volm)/pmass- -+ x chit0*chip0 -+ chipnew=chip+tstep*chipp -+ chip0=0.5d0*(chip+chipnew) -+ -+ chitp=(2.d0*(engke-sigma)+pmass*chip0**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+c update volume -+ -+ vold=volm -+ volm=volm*exp(3.d0*tstep*chipnew) -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=2,8 -+ eta(i)=0.d0 -+ enddo -+ eta(1)=chipnew -+ eta(5)=chipnew -+ eta(9)=chipnew -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ chip=chipnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) -+ cons1=0.5d0*qmass*chit0**2 -+ cons2=press*vold -+ cons3=0.5d0*pmass*chip0**2 -+ consv=conint+cons1+cons2+cons3 -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c updated velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine npt_h1 -+ -+ subroutine nst_b1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,mode,elrc,engke,virlrc,press,taup,taut,sigma,tolnce, -+ x tstep,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat and anisotropic pressure control -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version -+c -+c for systems using bond CONSTRAINTS. Frozen atoms feb 1994 -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester december 1993 -+c amended - w. smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons,mode -+ integer fail,i,j,k,iatm0,iatm1,maxit,iter -+ real(8) elrc,engke,virlrc,press,taup,taut,sigma,tolnce,tstep -+ real(8) vircon,volm,beta,volm0,elrc0,virlrc0,rstep,rtsq,chit0 -+ real(8) viracc,strkin,strcon,cell0,stres0,uni -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),strcon(9),cell0(9),fail(8),stres0(9),uni(9) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data beta/7.3728d-3/ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1460) -+ enddo -+ -+ safe=.false. -+ -+c store initial values of volume, long range corrections etc -+ -+ if(newjob)then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1470) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store original cell vectors and stress tensor -+ -+ do i=1,9 -+ -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c estimate kinetic energy at current timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c current estimate of stres tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i) -+ enddo -+ -+c initial estimate of eta matrix and chit -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=5 -+ if(ntcons.eq.0)maxit=maxit-1 -+ -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+ -+ x eta(1)*xxo(j)+eta(4)*yyo(j)+eta(7)*zzo(j) -+ yyy(i)=tstep*uyy(i)+ -+ x eta(2)*xxo(j)+eta(5)*yyo(j)+eta(8)*zzo(j) -+ zzz(i)=tstep*uzz(i)+ -+ x eta(3)*xxo(j)+eta(6)*yyo(j)+eta(9)*zzo(j) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c store integrated positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c estimate new cell parameters -+ -+ call mat_mul(eta,cell0,cell) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c accumulate constraint virial terms -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strcns(i)+strkin(i) -+ enddo -+ -+c improved calculation of eta matrix and chit -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c end of thermostat and barostat iterations -+ -+ enddo -+ -+c update volume -+ -+ volm=volm*eta(1)*eta(5)*eta(9) -+ -+c adjust cell vectors - anisotropic -+ -+ call mat_mul(eta,cell0,cell) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c restore half step velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nst_b1 -+ -+ subroutine nst_h1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,ntpatm,nscons, -+ x ntcons,mode,chit,conint,consv,elrc,engke,virlrc,press, -+ x taup,taut,sigma,temp,tolnce,tstep,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat+piston. -+c -+c Parrinello - Rahman type : changing cell shape. -+c -+c reference: Melchionna, Ciccotti and Holian, -+c Mol Phys 1993, 78, p533 -+c -+c parallel replicated data version -+c -+c for systems using bond constraints (using atomic pressure) -+c -+c copyright daresbury laboratory 1995 -+c author - t. forester june 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ integer idnode,imcon,mxnode,natms,ntpatm,nscons,ntcons -+ integer fail,i,j,k,iatm0,iatm1,maxit,iter,mode -+ real(8) chip,chit,conint,consv,elrc,engke,virlrc,press -+ real(8) taup,taut,sigma,temp,tolnce,tstep,vircon,volm -+ real(8) strcon,strkin,etanew,eta0,cell0,volm0,elrc0,virlrc0 -+ real(8) rstep,rtsq,pmass,qmass,totmas,com,vom,uni,fac -+ real(8) chitp,chitnew,chit0,xxa,yya,zza,etadot -+ real(8) viracc,cons1,cons2,cons3,vold,stres0 -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ dimension strkin(9),strcon(9),fail(8),com(3),vom(3) -+ dimension etanew(9),eta0(9),cell0(9),stres0(9),uni(9) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0 -+ -+ data newjob/.true./,uni/1.d0,3*0.d0,1.d0,3*0.d0,1.d0/ -+ -+c allocate working arrays -+ -+ do i=1,8 -+ fail(i)=0 -+ enddo -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(6)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(7)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(8)) -+ do i=1,8 -+ if(fail(i).ne.0)call error(idnode,1480) -+ enddo -+ -+ safe=.false. -+ -+c store initial values of volume, long range corrections etc -+ -+ if(newjob)then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1490) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ newjob=.false. -+ -+ endif -+ -+c set up block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c initialise constraint virial accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store original cell vectors and stress tensor -+ -+ do i=1,9 -+ -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c estimate kinetic energy at current timestep -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c estimate position at current time step -+ -+ xxx(i)=xxo(j)+tstep*(vxo(j)+tstep*rmass(i)*fxx(i)) -+ yyy(i)=yyo(j)+tstep*(vyo(j)+tstep*rmass(i)*fyy(i)) -+ zzz(i)=zzo(j)+tstep*(vzo(j)+tstep*rmass(i)*fzz(i)) -+ -+c estimate velocity at the full step -+ -+ vxx(i)=vxo(j)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c initial estimate of stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i) -+ enddo -+ -+c propagation of eta -+ -+ fac=9.d0 -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ fac=5.d0 -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ fac=3.d0 -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ fac=2.d0 -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=0.5d0*(etanew(i)+eta(i)) -+ enddo -+ -+c propagate chit -+ -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ chitp=(2.d0*(engke-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ maxit=5 -+ if(ntcons.eq.0) maxit=maxit-1 -+ do iter=1,maxit -+ -+c unconstrained new positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(eta0(1)+chit0)*vxx(i)- -+ x eta0(4)*vyy(i)-eta0(7)*vzz(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(eta0(5)+chit0)*vyy(i)- -+ x eta0(2)*vxx(i)-eta0(8)*vzz(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(eta0(9)+chit0)*vzz(i)- -+ x eta0(3)*vxx(i)-eta0(6)*vyy(i)) -+ -+c advance positions using leapfrog -+ -+ xxa=(xxx(i)+xxo(j))*0.5d0-com(1) -+ yya=(yyy(i)+yyo(j))*0.5d0-com(2) -+ zza=(zzz(i)+zzo(j))*0.5d0-com(3) -+ -+ xxx(i)=xxo(j)+tstep*(uxx(i)+ -+ x etanew(1)*xxa+etanew(4)*yya+etanew(7)*zza) -+ yyy(i)=yyo(j)+tstep*(uyy(i)+ -+ x etanew(2)*xxa+etanew(5)*yya+etanew(8)*zza) -+ zzz(i)=zzo(j)+tstep*(uzz(i)+ -+ x etanew(3)*xxa+etanew(6)*yya+etanew(9)*zza) -+ -+ enddo -+ -+c start of bond constraint procedures -+ -+ if(ntcons.eq.0)safe=.true. -+ if(ntcons.gt.0)then -+ -+c store integrated positions -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c estimate new cell parameters -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ call cell_propagate(tstep,cell,etanew) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strcns(i)+strkin(i) -+ enddo -+ -+c improved prediction of eta -+ -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit0*eta0(i)) -+ enddo -+ if(mode.gt.0)then -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=0.5d0*(etanew(i)+eta(i)) -+ enddo -+ -+c improved prediction of chit -+ -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ chitp=(2.d0*(engke-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ do i=1,9 -+ eta(i)=etanew(i) -+ enddo -+ -+c update volume -+ -+ chip=eta(1)+eta(5)+eta(9) -+ vold=volm -+ volm=volm*exp(tstep*chip) -+ -+c adjust cell vectors - anisotropic -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ call cell_propagate(tstep,cell,eta) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c conserved quantity less kinetic and potential energy -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) -+ cons1=0.5d0*qmass*chit0**2 -+ cons2=press*vold -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ cons3=0.5d0*pmass*etadot -+ consv=conint+cons1+cons2+cons3 -+ -+c restore half step velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(3)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(4)) -+ -+ return -+ end subroutine nst_h1 -+ -+ end module lf_motion_module -diff -urN dl_class_1.9.orig/srcmod/lf_rotation1_module.f dl_class_1.9/srcmod/lf_rotation1_module.f ---- dl_class_1.9.orig/srcmod/lf_rotation1_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/lf_rotation1_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,5315 @@ -+ module lf_rotation1_module -+ -+c*********************************************************************** -+c -+c dl_poly module 1 for verlet leap frog rotational integration -+c schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use lf_motion_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ contains -+ -+ subroutine update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c*********************************************************************** -+c -+c dlpoly routine to update the quaternion arrays as part of -+c the leapfrog algorithm -+c -+c copyright daresbury laboratory -+c author - w.smith october 2005 -+c based on - t.forester oct. 1993 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safeq -+ integer igrp1,igrp2,jg,itq,ig -+ real(8) qn0,qn1,qn2,qn3,qn0a,qn1a,qn2a,qn3a,qn0b,qn1b,qn2b,qn3b -+ real(8) rnorm,tstep,quattol,eps -+ real(8) opx(msgrp),opy(msgrp),opz(msgrp) -+ real(8) oqx(msgrp),oqy(msgrp),oqz(msgrp) -+ -+ jg=0 -+ safeq=.true. -+ -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c first iteration of new quaternions (lab fixed) -+ -+ qn0=q0(ig)+(-q1(ig)*opx(jg)-q2(ig)*opy(jg)-q3(ig)*opz(jg)) -+ x *tstep*pt5 -+ qn1=q1(ig)+( q0(ig)*opx(jg)-q3(ig)*opy(jg)+q2(ig)*opz(jg)) -+ x *tstep*pt5 -+ qn2=q2(ig)+( q3(ig)*opx(jg)+q0(ig)*opy(jg)-q1(ig)*opz(jg)) -+ x *tstep*pt5 -+ qn3=q3(ig)+(-q2(ig)*opx(jg)+q1(ig)*opy(jg)+q0(ig)*opz(jg)) -+ x *tstep*pt5 -+ -+ qn0b=0.d0 -+ qn1b=0.d0 -+ qn2b=0.d0 -+ qn3b=0.d0 -+ -+ itq=0 -+ eps=1.0d9 -+ do while((itq.lt.mxquat).and.(eps.gt.quattol)) -+ -+ itq=itq+1 -+ -+ qn0a=pt5*(-q1(ig)*opx(jg)-q2(ig)*opy(jg)-q3(ig)*opz(jg)) -+ x +pt5*(-qn1*oqx(jg)-qn2*oqy(jg)-qn3*oqz(jg)) -+ qn1a=pt5*( q0(ig)*opx(jg)-q3(ig)*opy(jg)+q2(ig)*opz(jg)) -+ x + pt5*( qn0*oqx(jg)-qn3*oqy(jg)+qn2*oqz(jg)) -+ qn2a=pt5*( q3(ig)*opx(jg)+q0(ig)*opy(jg)-q1(ig)*opz(jg)) -+ x + pt5*( qn3*oqx(jg)+qn0*oqy(jg)-qn1*oqz(jg)) -+ qn3a=pt5*(-q2(ig)*opx(jg)+q1(ig)*opy(jg)+q0(ig)*opz(jg)) -+ x + pt5*(-qn2*oqx(jg)+qn1*oqy(jg)+qn0*oqz(jg)) -+ -+ qn0=q0(ig)+pt5*qn0a*tstep -+ qn1=q1(ig)+pt5*qn1a*tstep -+ qn2=q2(ig)+pt5*qn2a*tstep -+ qn3=q3(ig)+pt5*qn3a*tstep -+ -+ rnorm=1.d0/sqrt(qn0**2+qn1**2+qn2**2+qn3**2) -+ qn0=qn0*rnorm -+ qn1=qn1*rnorm -+ qn2=qn2*rnorm -+ qn3=qn3*rnorm -+ -+c convergence test -+ -+ eps=sqrt(((qn0a-qn0b)**2+(qn1a-qn1b)**2+(qn2a-qn2b)**2 -+ x +(qn3a-qn3b)**2)*tstep**2) -+ -+ qn0b=qn0a -+ qn1b=qn1a -+ qn2b=qn2a -+ qn3b=qn3a -+ -+ enddo -+ -+ if(itq.ge.mxquat) safeq=.false. -+ -+c store new quaternions -+ -+ q0(ig)=qn0 -+ q1(ig)=qn1 -+ q2(ig)=qn2 -+ q3(ig)=qn3 -+ -+ enddo -+ -+ return -+ end subroutine update_quaternions -+ -+ subroutine nveq_1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame -+c omx,omy,omz = angular velocity in body fixed frame (principal axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newjob -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer fail,i,igrp,igrp1,igrp2,idum,ifre1,ifre2,j,ifre -+ integer jg,ig,k,id,jr -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) strkin,rot,rstep,rtsq,engtrn,vaa,vbb,vcc -+ real(8) trx,try,trz,delx,dely,delz,engfke -+ real(8) strgrp,tqx,tqy,tqz,fmx,fmy,fmz -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension strkin(9),strgrp(9),rot(9),fail(nnn) -+ -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(12)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1500) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(i)=vxo(j)+tstep*rmass(i)*fxx(i) -+ uyy(i)=vyo(j)+tstep*rmass(i)*fyy(i) -+ uzz(i)=vzo(j)+tstep*rmass(i)*fzz(i) -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+c calculate force and velocity corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational rigid body motion -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) -+ uyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) -+ uzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcmx(ig)+tstep*uxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*uyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*uzz(ig) -+ -+c estimate velocity at full time step -+ -+ gvxx(ig)=0.5d0*(gvxx(ig)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyy(ig)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzz(ig)+uzz(ig)) -+ -+ enddo -+ -+c calculate rigid body translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c total translational kinetic energy -+ -+ engke=engtrn+engfke -+ -+c calculate rigid body kinetic stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore rigid body half timestep velocity -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx=0.d0 -+ tqy=0.d0 -+ tqz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx=tqx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy=tqy+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz=tqz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c store current angular velocity -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx*rot(1)+tqy*rot(4)+tqz*rot(7))*rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) -+ try=(tqx*rot(2)+tqy*rot(5)+tqz*rot(8))*rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) -+ trz=(tqx*rot(3)+tqy*rot(6)+tqz*rot(9))*rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+delx*pt5 -+ opy(jg)=omy(ig)+dely*pt5 -+ opz(jg)=omz(ig)+delz*pt5 -+ -+ enddo -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omx(ig)+delx -+ uyy(ig)=omy(ig)+dely -+ uzz(ig)=omz(ig)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omx(ig)+delx*1.5d0 -+ oqy(jg)=omy(ig)+dely*1.5d0 -+ oqz(jg)=omz(ig)+delz*1.5d0 -+ -+c angular velocity at timestep n -+ -+ omx(ig)=omx(ig)+pt5*delx -+ omy(ig)=omy(ig)+pt5*dely -+ omz(ig)=omz(ig)+pt5*delz -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies - relative to c.o.m -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate(opx,opy,opz,xxt,yyt,zzt,stat=fail(1)) -+ deallocate(oqx,oqy,oqz,dtx,dty,dtz,stat=fail(2)) -+ deallocate(dxx,dyy,dzz,uxx,uyy,uzz,stat=fail(3)) -+ deallocate(txx,tyy,tzz,dxt,dyt,dzt,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,xx1,yy1,zz1,stat=fail(5)) -+ deallocate(vxo,vyo,vzo,gcxo,gcyo,gczo,stat=fail(6)) -+ -+ return -+ end subroutine nveq_1 -+ -+ subroutine nvtq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, -+ x tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat. -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame -+c omx,omy,omz = angular velocity in body fixed frame (principle axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,safeq,newjob -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer i,fail,igrp,igrp1,igrp2,ifre,ifre1,ifre2,jg,ig -+ integer j,k,jr,id,mxiter,iter,idum -+ real(8) engke,engrot,quattol,sigma,taut,tolnce,tstep,vircom -+ real(8) vircon,strkin,strgrp,rot,rstep,rtsq -+ real(8) engtrn,trx,try,trz,chit0,rgmas,engfke -+ real(8) vaa,vbb,vcc,engtot,viracc,strcon -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+ dimension strkin(9),strgrp(9),strcon(9),rot(9),fail(nnn) -+ -+ save igrp1,igrp2,ifre1,ifre2,newjob -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1510) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c initialise constraint virial terms -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacements -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c estimate velocity and temperature at half-time step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate kinetic energy of rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translation kinetic energy of rigid bodies -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rigid body rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c temperature scaling coefficient - taut is the relaxation time -+ -+ engtot=engfke+engrot+engtrn -+ chit0= sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=2 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+xxo(j) -+ yyy(i)=tstep*vyy(i)+yyo(j) -+ zzz(i)=tstep*uzz(i)+zzo(j) -+ -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0.and.iter.eq.1) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate force and velocity corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ if(iter.eq.mxiter)call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ********: rigid body motion - thermostated :************ -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 -+ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 -+ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 -+ -+c update positions -+ -+ gcmx(ig)=gcxo(jg)+tstep*uxx(ig) -+ gcmy(ig)=gcyo(jg)+tstep*uyy(ig) -+ gcmz(ig)=gczo(jg)+tstep*uzz(ig) -+ -+c calculate full step velocities -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 -+ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 -+ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 -+ uyy(ig)=(omyo(jg)+tstep*try)*chit0 -+ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 -+ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 -+ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 -+ -+ enddo -+ -+c calculate rigid body rotational energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c total translational kinetic energy -+ -+ engke=engtrn+engfke -+ -+c total kinetic energy -+ -+ engtot=engke+engrot -+ -+c improved prediction of chit -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c end of thermostat/barostat iterations -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nvtq_b1 -+ -+ subroutine nvtq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,chit,consv,conint,engke,engrot,quattol, -+ x sigma,taut,tolnce,tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat. -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame -+c omx,omy,omz = angular velocity in body fixed frame (principle axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,safeq,newjob -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer fail,i,idum,igrp,igrp1,igrp2,ifre,ifre1,ifre2 -+ integer j,k,ig,jg,jr,id,iter,mxiter -+ real(8) chit,consv,conint,engke,engrot,quattol,sigma,taut -+ real(8) tolnce,tstep,vircom,vircon,strkin,strgrp,strcon,rot -+ real(8) rstep,rtsq,qmass,engtrn,cons1,engtot,vaa,vbb,vcc -+ real(8) chit0,chitnew,chitp,viracc,rgmas,trx,try,trz,delx -+ real(8) dely,delz,engfke -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension strkin(9),strgrp(9),strcon(9),rot(9),fail(nnn) -+ -+ save igrp1,igrp2,ifre1,ifre2,qmass,newjob -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1520) -+ enddo -+ -+ if(newjob)then -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c initialise constraint virial terms -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacements -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c estimate velocity and temperature at half-time step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate kinetic energy of rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translation kinetic energy of rigid bodies -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rigid body rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c propagate chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chitp=2.d0*(engtot-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=4 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-chit0*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-chit0*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-chit0*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0.and.iter.eq.1) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate force and velocity corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+ if(iter.eq.mxiter)then -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+ endif -+ -+c ********: rigid body motion - thermostated :************ -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas-chit0*gvxx(ig)) -+ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas-chit0*gvyy(ig)) -+ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas-chit0*gvzz(ig)) -+ -+c update positions -+ -+ gcmx(ig)=gcxo(jg)+tstep*uxx(ig) -+ gcmy(ig)=gcyo(jg)+tstep*uyy(ig) -+ gcmz(ig)=gczo(jg)+tstep*uzz(ig) -+ -+c calculate full step velocities -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ if(iter.eq.mxiter)then -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+ endif -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ safeq=.true. -+ engrot=0.d0 -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omxo(jg)+delx -+ uyy(ig)=omyo(jg)+dely -+ uzz(ig)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c calculate rigid body rotational energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c improved prediction of chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chitp=2.d0*(engtot-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update thermostat variable -+ -+ chit=chitnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*qmass/taut**2 -+ cons1=0.5d0*qmass*chit0**2 -+ consv=conint+cons1 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nvtq_h1 -+ -+ subroutine nptq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,virtot,vircom, -+ x vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat and barostat. -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principl axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob,safeq -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ntpatm,i,fail,igrp,igrp1,igrp2,idum,ifre,ifre1 -+ integer ifre2,j,jg,ig,jr,k,id,iter,mxiter -+ real(8) elrc,engke,engrot,virlrc,press,quattol,sigma,taup,taut -+ real(8) tolnce,tstep,virtot,vircom,vircon,volm,rot,engfke,uni -+ real(8) cell0,beta,volm0,elrc0,virlrc0,rstep,rtsq -+ real(8) engtrn,trx,try,trz,chip0,scale,engtot,chit0,viracc,czero -+ real(8) rgmas,vaa,vbb,vcc,strkin,strcon,strgrp,psyst -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension fail(nnn),rot(9),cell0(9),czero(9),uni(9) -+ dimension strcon(9),strgrp(9),strkin(9) -+ -+ save newjob,volm0,elrc0,virlrc0,cell0,dens0,igrp1,igrp2 -+ save ifre1,ifre2 -+ -+ data newjob/.true./,beta/7.3728d-3/ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1530) -+ enddo -+ -+ if(newjob) then -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1540) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c constraint stress tensor accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c current cell vectors -+ -+ do i=1,9 -+ czero(i)=cell(i) -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacements -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c estimate velocity and temperature at half-time step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate kinetic energy of rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translation kinetic energy of rigid bodies -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rigid body rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c pressure control variable - taup is the relaxation time -+ -+ engke=engfke+engtrn -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ -+c temperature scaling coefficient - taut is the relaxation time -+ -+ engtot=engke+engrot -+ chit0= sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=5 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+scale*xxo(j) -+ yyy(i)=tstep*uyy(i)+scale*yyo(j) -+ zzz(i)=tstep*uzz(i)+scale*zzo(j) -+ -+ enddo -+ -+c estimate new cell tensor -+ -+ do i=1,9 -+ cell(i)=scale*czero(i) -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate force correction -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ if(iter.eq.mxiter)call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ********: rigid body motion - thermostated :************ -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 -+ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 -+ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 -+ -+c update positions : -+ -+ gcmx(ig)=scale*gcxo(jg)+tstep*uxx(ig) -+ gcmy(ig)=scale*gcyo(jg)+tstep*uyy(ig) -+ gcmz(ig)=scale*gczo(jg)+tstep*uzz(ig) -+ -+c calculate full step velocities -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 -+ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 -+ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 -+ uyy(ig)=(omyo(jg)+tstep*try)*chit0 -+ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 -+ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 -+ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 -+ -+ enddo -+ -+c calculate rigid body rotational energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c total translational kinetic energy -+ -+ engke=engtrn+engfke -+ -+c total kinetic energy -+ -+ engtot=engke+engrot -+ -+c improved pressure control variable -+ -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ -+c improved temperature scaling coefficient -+ -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c end of thermostat/barostat iterations -+ -+ enddo -+ -+c scale cell vectors -+ -+ scale=((chip0*volm)/volm0)**(1.d0/3.d0) -+ -+ do i=1,9 -+ cell(i)=scale*cell0(i) -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=1,9 -+ eta(i)=scale*uni(i) -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nptq_b1 -+ -+ subroutine nptq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,virtot,vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover -+c thermostat and barostat (Melchionna et al variant) -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principl axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newjob -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ntpatm,fail,i,igrp,igrp1,igrp2,ifre,ifre1,ifre2 -+ integer j,k,ig,jg,jr,id,iter,mxiter,idum -+ real(8) chip,chit,consv,conint,elrc,engke,engrot,virlrc,press -+ real(8) quattol,sigma,taup,taut,temp,tolnce,tstep,virtot,vircom -+ real(8) vircon,volm,cell0,rot,volm0,elrc0,rtsq,uni -+ real(8) virlrc0,strkin,rstep,qmass,pmass,strgrp,strcon -+ real(8) trx,try,trz,chipp,chipnew,chip0,engtot,chitp -+ real(8) chitnew,chit0,volnew,scale,viracc,rgmas -+ real(8) vaa,vbb,vcc,vold,cons1,cons2,cons3,delx,dely,delz -+ real(8) engtrn,totmas,com,vom,engfke -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension fail(nnn),rot(9),cell0(9),uni(9) -+ dimension strkin(9),strcon(9),strgrp(9),com(3),vom(3) -+ -+ save newjob,volm0,elrc0,virlrc0,cell0,dens0,pmass,qmass -+ save igrp1,igrp2,ifre1,ifre2,totmas -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1550) -+ enddo -+ -+ if(newjob) then -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1560) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c temporary stress tensor accumulators -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+c correction to velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacements -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c estimate velocity at full step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate kinetic energy of rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translation kinetic energy of rigid bodies -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rigid body rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c propagate chip -+ -+ engke=engfke+engtrn -+ chipp=(2.d0*engke-virtot-vircon-vircom-3.d0*press*volm)/pmass- -+ x chit*chip -+ chipnew=chip+tstep*chipp -+ chip0=0.5d0*(chip+chipnew) -+ -+c propagate chit -+ -+ engtot=engke+engrot -+ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=5 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)*vxx(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)*vyy(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxx(i)=xxo(j)+tstep*(uxx(i)+ -+ x chipnew*((xxx(i)+xxo(j))*0.5d0-com(1))) -+ yyy(i)=yyo(j)+tstep*(uyy(i)+ -+ x chipnew*((yyy(i)+yyo(j))*0.5d0-com(2))) -+ zzz(i)=zzo(j)+tstep*(uzz(i)+ -+ x chipnew*((zzz(i)+zzo(j))*0.5d0-com(3))) -+ -+ enddo -+ -+c estimate new cell parameters -+ -+ volnew=volm*exp(3.d0*tstep*chipnew) -+ scale=(volnew/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate force correction -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ if(iter.eq.mxiter)then -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+ endif -+ -+c ********: rigid body motion - thermostated :*********** -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas-(chit0+chip0)* -+ x gvxx(ig)) -+ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas-(chit0+chip0)* -+ x gvyy(ig)) -+ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas-(chit0+chip0)* -+ x gvzz(ig)) -+ -+c advance positions using leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*(uxx(ig)+ -+ x chipnew*((gcmx(ig)+gcxo(jg))*0.5d0-com(1))) -+ gcmy(ig)=gcyo(jg)+tstep*(uyy(ig)+ -+ x chipnew*((gcmy(ig)+gcyo(jg))*0.5d0-com(2))) -+ gcmz(ig)=gczo(jg)+tstep*(uzz(ig)+ -+ x chipnew*((gcmz(ig)+gczo(jg))*0.5d0-com(3))) -+ -+c calculate full step velocities -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate kinetic energy and stress tensor -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ if(iter.eq.mxiter)call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omxo(jg)+delx -+ uyy(ig)=omyo(jg)+dely -+ uzz(ig)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c calculate rigid body rotational energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c improved prediction of chip -+ -+ engke=engfke+engtrn -+ chipp=(2.d0*engke-virtot-vircom-vircon-3.d0*press*volm)/pmass- -+ x chit0*chip0 -+ chipnew=chip+tstep*chipp -+ chip0=0.5d0*(chip+chipnew) -+ -+c improved prediction of chit -+ -+ engtot=engke+engrot -+ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat iterations -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update volume -+ -+ vold=volm -+ volm=volm*exp(3.d0*tstep*chipnew) -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=1,9 -+ eta(i)=chipnew*uni(i) -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ chip=chipnew -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) -+ cons1=0.5d0*qmass*chit0**2 -+ cons2=press*vold -+ cons3=0.5d0*pmass*chip0**2 -+ consv=conint+cons1+cons2+cons3 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nptq_h1 -+ -+ subroutine nstq_b1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Berendsen -+c thermostat and barostat. (cell may change shape). -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principl axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob,safeq -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ntpatm,fail,i,idum,igrp,igrp1,igrp2,ifre,ifre1,mode -+ integer ifre2,j,k,ig,jg,jr,id,iter,mxiter -+ real(8) elrc,engke,engrot,virlrc,press,quattol,sigma,taup,taut -+ real(8) tolnce,tstep,vircom,vircon,volm,beta,uni,cell0 -+ real(8) volm0,elrc0,virlrc0,rot,rstep,rtsq,engfke -+ real(8) engtrn,trx,try,trz,engtot,chit0,rgmas -+ real(8) vaa,vbb,vcc,viracc,strkin,strcon,strgrp,stres0 -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension strkin(9),strcon(9),strgrp(9),stres0(9),rot(9) -+ dimension fail(nnn),uni(9),cell0(9) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0 -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./, beta/7.3728d-3/ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxxdf),yyo(mxxdf),zzo(mxxdf),stat=fail(9)) -+ allocate (xx1(mxxdf),yy1(mxxdf),zz1(mxxdf),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1570) -+ enddo -+ -+ if(newjob) then -+ -+c store initial values of volume, long range corrections etc -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1580) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe= (igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c temporary stress tensor accumulators and new cell -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+c construct current bond vectors - required by shake -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from coms -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c estimate velocity at half-time step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c estimate kinetic energy of free atoms -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c stress tensor of free atoms -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c estimate translational kinetic energy of rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c forces on centre of mass -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep*fmx(jg)/gmass(id) -+ gvyy(ig)=gvyo(jg)+pt5*tstep*fmy(jg)/gmass(id) -+ gvzz(ig)=gvzo(jg)+pt5*tstep*fmz(jg)/gmass(id) -+ -+ enddo -+ -+c translational kinetic energy of rigid body -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c stress tensor of rigid body -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velocity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c calculate rotational kinetic energy of rigid bodies -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c find eta - taup is the relaxation time -+ -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c temperature scaling coefficient - taut is the relaxation time -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=5 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(i)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(i)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(i)+eta(1)*xxo(j)+eta(4)*yyo(j)+eta(7)*zzo(j) -+ yyy(i)=tstep*uyy(i)+eta(2)*xxo(j)+eta(5)*yyo(j)+eta(8)*zzo(j) -+ zzz(i)=tstep*uzz(i)+eta(3)*xxo(j)+eta(6)*yyo(j)+eta(9)*zzo(j) -+ -+ enddo -+ -+c estimate new cell tensor -+ -+ call mat_mul(eta,cell0,cell) -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate current stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ if(iter.eq.mxiter)then -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+ endif -+ -+c ********: rigid body motion - thermostated :*********** -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=(gvxo(jg)+tstep*(fmx(jg)*rgmas))*chit0 -+ uyy(ig)=(gvyo(jg)+tstep*(fmy(jg)*rgmas))*chit0 -+ uzz(ig)=(gvzo(jg)+tstep*(fmz(jg)*rgmas))*chit0 -+ -+c update positions : -+ -+ gcmx(ig)=tstep*uxx(ig)+eta(1)*gcxo(jg)+eta(4)*gcyo(jg)+ -+ x eta(7)*gczo(jg) -+ gcmy(ig)=tstep*uyy(ig)+eta(2)*gcxo(jg)+eta(5)*gcyo(jg)+ -+ x eta(8)*gczo(jg) -+ gcmz(ig)=tstep*uzz(ig)+eta(3)*gcxo(jg)+eta(6)*gcyo(jg)+ -+ x eta(9)*gczo(jg) -+ -+c full step com velocity -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate rigid body kinetic energy and stress tensor -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=(omxo(jg)+pt5*tstep*trx)*chit0 -+ omy(ig)=(omyo(jg)+pt5*tstep*try)*chit0 -+ omz(ig)=(omzo(jg)+pt5*tstep*trz)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=(omxo(jg)+tstep*trx)*chit0 -+ uyy(ig)=(omyo(jg)+tstep*try)*chit0 -+ uzz(ig)=(omzo(jg)+tstep*trz)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+1.5d0*tstep*trx)*chit0 -+ oqy(jg)=(omyo(jg)+1.5d0*tstep*try)*chit0 -+ oqz(jg)=(omzo(jg)+1.5d0*tstep*trz)*chit0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c complete stress tensor - add all contributions -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) -+ enddo -+ -+c improved prediction of eta and chit -+ -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+c end of thermostat/barostat iterations -+ -+ enddo -+ -+c update cell vectors -+ -+ call mat_mul(eta,cell0,cell) -+ -+c update volume -+ -+ volm=volm*eta(1)*eta(5)*eta(9) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nstq_b1 -+ -+ subroutine nstq_h1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke,engrot, -+ x virlrc,press,quattol,sigma,taup,taut,temp,tolnce,tstep, -+ x vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - verlet leapfrog with Hoover like -+c thermostat and barostat. (cell may change shape). -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principle axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob,safeq -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ntpatm,fail,i,igrp,igrp1,igrp2,ifre,ifre1,ifre2 -+ integer j,k,ig,jg,jr,id,iter,mxiter,idum,mode -+ real(8) chit,conint,consv,elrc,engke,engrot,virlrc,press,quattol -+ real(8) sigma,taup,taut,temp,tolnce,tstep,vircom,vircon,volm -+ real(8) strkin,strcon,strgrp,eta0,etanew,rot,cell0,volm0,stres0 -+ real(8) elrc0,virlrc0,rstep,rtsq,qmass,pmass,totmas -+ real(8) engtrn,trx,try,trz,engtot,engfke,fac,etadot -+ real(8) chitp,chitnew,chit0,xxa,yya,zza,viracc,rgmas,uni -+ real(8) delx,dely,delz,vold,cons1,cons2,cons3 -+ real(8) vaa,vbb,vcc,chip,com,vom -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ dimension eta0(9),etanew(9),rot(9),cell0(9),fail(nnn),uni(9) -+ dimension strkin(9),strcon(9),strgrp(9),stres0(9),com(3),vom(3) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0,pmass,qmass,totmas -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(12)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(13)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(14)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(15)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1590) -+ enddo -+ -+ if(newjob) then -+ -+c store initial values of volume, long range corrections etc -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1600) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c calculate total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c initialise stress tensor accumulators -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+c correction to velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c estimate velocity at full step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=vxo(j)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c estimate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c estimate stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c estimate rigid body translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=gvxo(jg)+pt5*tstep/gmass(id)*fmx(jg) -+ gvyy(ig)=gvyo(jg)+pt5*tstep/gmass(id)*fmy(jg) -+ gvzz(ig)=gvzo(jg)+pt5*tstep/gmass(id)*fmz(jg) -+ -+ enddo -+ -+c rigid body translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c rigid body stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate rgid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+pt5*tstep*trx -+ opy(jg)=omy(ig)+pt5*tstep*try -+ opz(jg)=omz(ig)+pt5*tstep*trz -+ -+ enddo -+ -+c store angular velcoity at timestep n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c calculate rotational kinetic energy of rigid bodies -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c propagate eta -+ -+ fac=9.d0 -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit*eta(i)) -+ enddo -+ if(mode.gt.0)then -+ fac=5.d0 -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ fac=3.d0 -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ fac=2.d0 -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=0.5d0*(etanew(i)+eta(i)) -+ enddo -+ -+c propagate chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c begin iterations !!----------------------------------------------- -+ -+ mxiter=5 -+ if(ntcons.eq.0) mxiter=mxiter-1 -+ -+ do iter=1,mxiter -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(i)=vxo(j)+tstep*(fxx(i)*rmass(i)- -+ x (chit0+eta0(1))*vxx(i)-eta0(4)*vyy(i)-eta0(7)*vzz(i)) -+ uyy(i)=vyo(j)+tstep*(fyy(i)*rmass(i)- -+ x eta0(2)*vxx(i)-(eta0(5)+chit0)*vyy(i)-eta0(8)*vzz(i)) -+ uzz(i)=vzo(j)+tstep*(fzz(i)*rmass(i)- -+ x eta0(3)*vxx(i)-eta0(6)*vyy(i)-(eta0(9)+chit0)*vzz(i)) -+ -+c advance positions using leapfrog -+ -+ xxa=(xxx(i)+xxo(j))*0.5d0-com(1) -+ yya=(yyy(i)+yyo(j))*0.5d0-com(2) -+ zza=(zzz(i)+zzo(j))*0.5d0-com(3) -+ -+ xxx(i)=xxo(j)+tstep*(uxx(i)+ -+ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) -+ yyy(i)=yyo(j)+tstep*(uyy(i)+ -+ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) -+ zzz(i)=zzo(j)+tstep*(uzz(i)+ -+ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) -+ -+ enddo -+ -+c estimate new cell parameters -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ call cell_propagate(tstep,cell,etanew) -+ -+ if(ntcons.eq.0) safe=.true. -+ if(ntcons.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint correction -+ -+ call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+c contribution to constraint virial -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c calculate other constraint corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate corrected velocity -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate velocity at the full step -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free half step velocity -+ -+ if(iter.eq.mxiter)then -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+ endif -+ -+c ********: rigid body motion - thermostated :*********** -+ -+c ***** step 1 : integrate centre of mass motion ********* -+ -+ jg =0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate thermostated velocities -+ -+ rgmas=1.d0/gmass(id) -+ uxx(ig)=gvxo(jg)+tstep*(fmx(jg)*rgmas- -+ x (chit0+eta0(1))*gvxx(ig)-eta0(4)*gvyy(ig)-eta0(7)*gvzz(ig)) -+ uyy(ig)=gvyo(jg)+tstep*(fmy(jg)*rgmas- -+ x eta0(2)*gvxx(ig)-(eta0(5)+chit0)*gvyy(ig)-eta0(8)*gvzz(ig)) -+ uzz(ig)=gvzo(jg)+tstep*(fmz(jg)*rgmas- -+ x eta0(3)*gvxx(ig)-eta0(6)*gvyy(ig)-(eta0(9)+chit0)*gvzz(ig)) -+ -+c advance positions using leapfrog -+ -+ xxa=(gcmx(ig)+gcxo(jg))*0.5d0-com(1) -+ yya=(gcmy(ig)+gcyo(jg))*0.5d0-com(2) -+ zza=(gcmz(ig)+gczo(jg))*0.5d0-com(3) -+ -+ gcmx(ig)=gcxo(jg)+tstep*(uxx(ig)+ -+ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) -+ gcmy(ig)=gcyo(jg)+tstep*(uyy(ig)+ -+ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) -+ gcmz(ig)=gczo(jg)+tstep*(uzz(ig)+ -+ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) -+ -+c full step com velocity -+ -+ gvxx(ig)=0.5d0*(gvxo(jg)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyo(jg)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzo(jg)+uzz(ig)) -+ -+ enddo -+ -+c calculate rigid body kinetic energy and stress tensor -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ if(iter.eq.mxiter)then -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+ endif -+ -+c ****** step 2 : integrate rotational motion ********** -+ -+ jg=0 -+ safeq=.true. -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omxo(jg)+delx -+ uyy(ig)=omyo(jg)+dely -+ uzz(ig)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c complete stress tensor - add all contributions -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) -+ enddo -+ -+c improved prediction of eta and chit -+ -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit0*eta0(i)) -+ enddo -+ if(mode.gt.0)then -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=0.5d0*(etanew(i)+eta(i)) -+ enddo -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=0.5d0*(chit+chitnew) -+ -+c end of thermostat/barostat iterations -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ do i=1,9 -+ eta(i)=etanew(i) -+ enddo -+ -+c update volume -+ -+ chip=eta(1)+eta(5)+eta(9) -+ vold=volm -+ volm=volm*exp(tstep*chip) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c conserved quantity less kinetic and potential energy -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) -+ cons1=0.5d0*qmass*chit0**2 -+ cons2=press*vold -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ cons3=0.5d0*pmass*etadot -+ consv=conint+cons1+cons2+cons3 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0) -+ x call merge1(idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (xx1,yy1,zz1,vxo,vyo,vzo,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,tqx,tqy,tqz,stat=fail(6)) -+ deallocate (omxo,omyo,omzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,gvxo,gvyo,gvzo,stat=fail(8)) -+ -+ return -+ end subroutine nstq_h1 -+ -+ end module lf_rotation1_module -diff -urN dl_class_1.9.orig/srcmod/lf_rotation2_module.f dl_class_1.9/srcmod/lf_rotation2_module.f ---- dl_class_1.9.orig/srcmod/lf_rotation2_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/lf_rotation2_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,5007 @@ -+ module lf_rotation2_module -+ -+c*********************************************************************** -+c -+c dl_poly module 2 for verlet leap frog rotational integration -+c schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use lf_rotation1_module -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ contains -+ -+ subroutine nveq_2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principal axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) rot,strkin,strcon,strgrp,engfke,engtrn -+ real(8) delx,dely,delz,trx,try,trz,vaa,vbb,vcc,viracc -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ -+ save newjob,igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1620) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c accumulators for constraint and virial stress tensor -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c start of shake cycle -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=1 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(j)=vxo(j)+tstep*rmass(i)*fxx(i) -+ uyy(j)=vyo(j)+tstep*rmass(i)*fyy(i) -+ uzz(j)=vzo(j)+tstep*rmass(i)*fzz(i) -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(i)+tstep*uxx(j) -+ yyy(i)=yyo(i)+tstep*uyy(j) -+ zzz(i)=zzo(i)+tstep*uzz(j) -+ -+c estimate full step velocities -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(jg)=gvxo(jg)+tstep/gmass(id)*fmx(jg) -+ uyy(jg)=gvyo(jg)+tstep/gmass(id)*fmy(jg) -+ uzz(jg)=gvzo(jg)+tstep/gmass(id)*fmz(jg) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*uxx(jg) -+ gcmy(ig)=gcyo(jg)+tstep*uyy(jg) -+ gcmz(ig)=gczo(jg)+tstep*uzz(jg) -+ -+c centre of mass velocities at full step -+ -+ gvxx(ig)=pt5*(uxx(jg)+gvxo(jg)) -+ gvyy(ig)=pt5*(uyy(jg)+gvyo(jg)) -+ gvzz(ig)=pt5*(uzz(jg)+gvzo(jg)) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+ opx(jg)=omxo(jg)+delx*pt5 -+ opy(jg)=omyo(jg)+dely*pt5 -+ opz(jg)=omzo(jg)+delz*pt5 -+ -+ enddo -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=omxo(jg)+delx -+ uyy(jg)=omyo(jg)+dely -+ uzz(jg)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+c angular velocity at time step n -+ -+ omx(ig)=opx(jg) -+ omy(ig)=opy(jg) -+ omz(ig)=opz(jg) -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c total kinetic energy -+ -+ engke=engfke+engtrn -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,fmx,fmy,fmz,stat=fail(5)) -+ deallocate (tqx,tqy,tqz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nveq_2 -+ -+ subroutine nvtq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,sigma,taut,tolnce, -+ x tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Berendsen thermostat. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,engfke -+ real(8) rot,strkin,strgrp,strcon,engtrn,trx,try,trz -+ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,engtot,chit0 -+ real(8) sigma,taut -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ -+ save chit0,igrp1,igrp2,ifre1,ifre2,newjob -+ -+ data chit0/1.d0/,newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1630) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c accumulators for constraint stress and virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c shake and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=2 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(i)+tstep*uxx(j) -+ yyy(i)=yyo(i)+tstep*uyy(j) -+ zzz(i)=zzo(i)+tstep*uzz(j) -+ -+c calculate full time velocity -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c update centre of mass velocities -+ -+ gvxx(ig)=gvxo(jg)+tstep/gmass(id)*fmx(jg) -+ gvyy(ig)=gvyo(jg)+tstep/gmass(id)*fmy(jg) -+ gvzz(ig)=gvzo(jg)+tstep/gmass(id)*fmz(jg) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c advance velocity by leapfrog -+ -+ gvxx(ig)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 -+ gvyy(ig)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 -+ gvzz(ig)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=gcyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=gczo(jg)+tstep*gvzz(ig) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+ opx(jg)=(omxo(jg)+delx*pt5) -+ opy(jg)=(omyo(jg)+dely*pt5) -+ opz(jg)=(omzo(jg)+delz*pt5) -+ -+ enddo -+ -+c scaled angular velocity at timestep n -+ -+ omx(ig)=opx(jg)*chit0 -+ omy(ig)=opy(jg)*chit0 -+ omz(ig)=opz(jg)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 -+ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 -+ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 -+ -+c angular velocity at full time step -+ -+ uxx(jg)=(omxo(jg)+delx)*chit0 -+ uyy(jg)=(omyo(jg)+dely)*chit0 -+ uzz(jg)=(omzo(jg)+delz)*chit0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c new estimate of chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nvtq_b2 -+ -+ subroutine nvtq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,conint,consv,chit,engke,engrot,quattol, -+ x sigma,taut,tolnce,tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Hoover thermostat. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame (input) -+c omx,omy,omz = angular velocity in body fixed frame (principal axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,engtot -+ real(8) rot,strkin,strcon,strgrp,engtrn,engfke,trx,try,trz -+ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,sigma,taut,chit0 -+ real(8) chitnew,chitp,conint,consv,chit,qmass -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ -+ save newjob,igrp1,igrp2,ifre1,ifre2,qmass -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1640) -+ enddo -+ -+ if(newjob)then -+ -+c mass parameters for thermostat -+ -+ qmass=2.d0*sigma*taut**2 -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atoms displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c initial thermostat variable -+ -+ chit0=chit -+ -+c accumulators for constraint stress and virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c shake iterations and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=3 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0)* -+ x pt5*(vxx(i)+vxo(j))) -+ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0)* -+ x pt5*(vyy(i)+vyo(j))) -+ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0)* -+ x pt5*(vzz(i)+vzo(j))) -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(i)+tstep*uxx(j) -+ yyy(i)=yyo(i)+tstep*uyy(j) -+ zzz(i)=zzo(i)+tstep*uzz(j) -+ -+c estimate full step velocities -+ -+ vxx(i)=pt5*(vxo(j)+uxx(j)) -+ vyy(i)=pt5*(vyo(j)+uyy(j)) -+ vzz(i)=pt5*(vzo(j)+uzz(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)-chit0* -+ x pt5*(gvxx(ig)+gvxo(jg))) -+ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)-chit0* -+ x pt5*(gvyy(ig)+gvyo(jg))) -+ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)-chit0* -+ x pt5*(gvzz(ig)+gvzo(jg))) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*uxx(jg) -+ gcmy(ig)=gcyo(jg)+tstep*uyy(jg) -+ gcmz(ig)=gczo(jg)+tstep*uzz(jg) -+ -+c centre of mass velocities at half-step -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omxo(jg)+pt5*tstep*trx -+ opy(jg)=omyo(jg)+pt5*tstep*try -+ opz(jg)=omzo(jg)+pt5*tstep*trz -+ -+ enddo -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=omxo(jg)+delx -+ uyy(jg)=omyo(jg)+dely -+ uzz(jg)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c new estimate of chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chitp=2.d0*(engtot-sigma)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=pt5*(chit+chitnew) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10.and.icyc.gt.3)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c update thermostat variable -+ -+ chit=chitnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*qmass/taut**2 -+ consv=conint+pt5*qmass*chit0**2 -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nvtq_h2 -+ -+ subroutine nptq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon, -+ x virtot,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Berendsen thermostat and barostat. -+c (cell may change volume) -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith sep 1999 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) rot,strkin,strgrp,strcon,engtrn,engfke,trx,try,trz -+ real(8) delx,dely,delz,czero -+ real(8) vaa,vbb,vcc,viracc,beta,elrc,virlrc,press,engtot -+ real(8) sigma,taup,taut,virtot,volm,cell0,elrc0,virlrc0 -+ real(8) chit0,volm0,chip0,psyst,scale -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ dimension cell0(9),czero(9) -+ -+ save newjob,volm0,elrc0,virlrc0,czero,chit0,chip0,dens0 -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./ -+ data beta/7.3728d-3/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1670) -+ enddo -+ -+c store initial values of volume and long range corrections -+ -+ if(newjob) then -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1660) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ do i=1,9 -+ czero(i)=cell(i) -+ enddo -+ newjob=.false. -+ -+ chit0=1.d0 -+ chip0=1.d0 -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c set constraint stress and virial and inital cell vectors -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c length scaling parameter -+ -+ scale=chip0**(1.d0/3.d0) -+ -+c shake iterations and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=3 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore cell vectors -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(i)*scale+tstep*uxx(j) -+ yyy(i)=yyo(i)*scale+tstep*uyy(j) -+ zzz(i)=zzo(i)*scale+tstep*uzz(j) -+ -+c estimate full step velocity -+ -+ vxx(i)=pt5*(vxo(j)+uxx(j)) -+ vyy(i)=pt5*(vyo(j)+uyy(j)) -+ vzz(i)=pt5*(vzo(j)+uzz(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(jg)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 -+ uyy(jg)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 -+ uzz(jg)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)*scale+tstep*uxx(jg) -+ gcmy(ig)=gcyo(jg)*scale+tstep*uyy(jg) -+ gcmz(ig)=gczo(jg)*scale+tstep*uzz(jg) -+ -+c centre of mass velocities at full step -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=(omxo(jg)+pt5*delx) -+ opy(jg)=(omyo(jg)+pt5*dely) -+ opz(jg)=(omzo(jg)+pt5*delz) -+ -+ enddo -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=opx(jg)*chit0 -+ omy(ig)=opy(jg)*chit0 -+ omz(ig)=opz(jg)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 -+ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 -+ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=(omxo(jg)+delx)*chit0 -+ uyy(jg)=(omyo(jg)+dely)*chit0 -+ uzz(jg)=(omzo(jg)+delz)*chit0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c pressure control variable -+ -+ engke=engfke+engtrn -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ chip0=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip0**(1.d0/3.d0) -+ -+c new estimate of chit -+ -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+c new cell parameters -+ -+ do i=1,9 -+ cell(i)=scale*cell0(i) -+ enddo -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c scale cell vectors -+ -+ scale=((chip0*volm)/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=scale*czero(i) -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=2,8 -+ eta(i)=0.d0 -+ enddo -+ eta(1)=scale -+ eta(5)=scale -+ eta(9)=scale -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nptq_b2 -+ -+ subroutine nptq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,chip,chit,consv,conint,elrc,engke, -+ x engrot,virlrc,press,quattol,sigma,taup,taut,temp,tolnce, -+ x tstep,vircom,vircon,virtot,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Hoover thermostat and barostat. -+c (cell may change volume) -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon,com -+ real(8) rot,strkin,strcon,strgrp,vom,engtrn,trx,try,trz -+ real(8) delx,dely,delz,engfke -+ real(8) vaa,vbb,vcc,viracc,pmass,qmass,totmas,czero -+ real(8) chip,chit,consv,conint,elrc,virlrc,press,sigma,taup,taut -+ real(8) temp,virtot,cell0,volm0,elrc0,virlrc0 -+ real(8) chit0,chip0,chipnew,chipp,engtot,chitnew,chitp,volnew -+ real(8) scale,volm,vold,cons1,cons2,cons3 -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ dimension czero(9),cell0(9),com(3),vom(3) -+ -+ save newjob,volm0,elrc0,virlrc0,czero,dens0,pmass,qmass -+ save igrp1,igrp2,ifre1,ifre2,totmas -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1670) -+ enddo -+ -+ if(newjob) then -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1680) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ do i=1,9 -+ czero(i)=cell(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+c calculate system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c initial thermostat and barostat variables -+ -+ chit0=chit -+ chip0=chip -+ chipnew=chip -+ -+c initialise constraint stress and virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ -+ enddo -+ -+c shake iterations and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=4 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore cell vectors -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)-(chit0+chip0)* -+ x pt5*(vxx(i)+vxo(j))) -+ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)-(chit0+chip0)* -+ x pt5*(vyy(i)+vyo(j))) -+ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)-(chit0+chip0)* -+ x pt5*(vzz(i)+vzo(j))) -+ -+c advance position using leapfrog -+ -+ xxx(i)=xxo(i)+tstep*(uxx(j)+ -+ x chipnew*((xxx(i)+xxo(i))*pt5-com(1))) -+ yyy(i)=yyo(i)+tstep*(uyy(j)+ -+ x chipnew*((yyy(i)+yyo(i))*pt5-com(2))) -+ zzz(i)=zzo(i)+tstep*(uzz(j)+ -+ x chipnew*((zzz(i)+zzo(i))*pt5-com(3))) -+ -+c estimate full step velocity -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c calculate kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)-(chit0+chip0)* -+ x pt5*(gvxx(ig)+gvxo(jg))) -+ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)-(chit0+chip0)* -+ x pt5*(gvyy(ig)+gvyo(jg))) -+ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)-(chit0+chip0)* -+ x pt5*(gvzz(ig)+gvzo(jg))) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcxo(jg)+tstep*(uxx(jg)+ -+ x chipnew*((gcxo(jg)+gcmx(ig))*pt5-com(1))) -+ gcmy(ig)=gcyo(jg)+tstep*(uyy(jg)+ -+ x chipnew*((gcyo(jg)+gcmy(ig))*pt5-com(2))) -+ gcmz(ig)=gczo(jg)+tstep*(uzz(jg)+ -+ x chipnew*((gczo(jg)+gcmz(ig))*pt5-com(3))) -+ -+c estimate full step velocities -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omxo(jg)+pt5*tstep*trx -+ opy(jg)=omyo(jg)+pt5*tstep*try -+ opz(jg)=omzo(jg)+pt5*tstep*trz -+ -+ enddo -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=omxo(jg)+delx -+ uyy(jg)=omyo(jg)+dely -+ uzz(jg)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c new estimate of chip and chit -+ -+ engke=engfke+engtrn -+ chipp=(2.d0*engke-virtot-vircom-vircon-3.d0*press*volm)/pmass- -+ x chit0*chip0 -+ chipnew=chip+tstep*chipp -+ chip0=pt5*(chip+chipnew) -+ -+ engtot=engke+engrot -+ chitp=(2.d0*(engtot-sigma)+pmass*chip0**2-boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=pt5*(chit+chitnew) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+c estimate new cell tensor -+ -+ volnew=volm*exp(3.d0*tstep*chipnew) -+ scale=(volnew/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=czero(i)*scale -+ enddo -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c update volume -+ -+ vold=volm -+ volm=volm*exp(3.d0*tstep*chipnew) -+ -+c scale cell vectors-isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=czero(i)*scale -+ enddo -+ -+c construct scaling tensor (for later!) -+ -+ do i=2,8 -+ eta(i)=0.d0 -+ enddo -+ eta(1)=chipnew -+ eta(5)=chipnew -+ eta(9)=chipnew -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ chip=chipnew -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+boltz*temp) -+ cons1=pt5*qmass*chit0**2 -+ cons2=press*vold -+ cons3=pt5*pmass*chip0**2 -+ consv=conint+cons1+cons2+cons3 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nptq_h2 -+ -+ subroutine nstq_b2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,elrc,engke,engrot,virlrc,press, -+ x quattol,sigma,taup,taut,tolnce,tstep,vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints. Rigid body sites and constraint sites may -+c coincide. -+c -+c verlet leapfrog with Berendsen thermostat and barostat. -+c (cell may change shape) -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith nov 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob,safeq,newstep,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons,mode -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) rot,strkin,strcon,strgrp,engtrn,trx,try,trz -+ real(8) delx,dely,delz,engfke -+ real(8) vaa,vbb,vcc,viracc,elrc,virlrc,press,sigma -+ real(8) taup,taut,volm,cell0,volm0,elrc0,chit0,uni -+ real(8) beta,stres0,engtot,virlrc0 -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn) -+ dimension cell0(9),uni(9),stres0(9) -+ -+ save newjob,volm0,elrc0,virlrc0,chit0,dens0 -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ data beta/7.3728d-3/ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1690) -+ enddo -+ -+c store initial values of volume, long range corrections etc -+ -+ if(newjob) then -+ -+ chit0=1.d0 -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1700) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c set virial, strain and stress tensors -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ eta(i)=uni(i) -+ strcns(i)=0.d0 -+ cell0(i)=cell(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c shake iterations and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=4 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ uxx(j)=(vxo(j)+tstep*rmass(i)*fxx(i))*chit0 -+ uyy(j)=(vyo(j)+tstep*rmass(i)*fyy(i))*chit0 -+ uzz(j)=(vzo(j)+tstep*rmass(i)*fzz(i))*chit0 -+ -+c update positions -+ -+ xxx(i)=tstep*uxx(j)+eta(1)*xxo(i)+eta(4)*yyo(i)+eta(7)*zzo(i) -+ yyy(i)=tstep*uyy(j)+eta(2)*xxo(i)+eta(5)*yyo(i)+eta(8)*zzo(i) -+ zzz(i)=tstep*uzz(j)+eta(3)*xxo(i)+eta(6)*yyo(i)+eta(9)*zzo(i) -+ -+c calculate velocity at full time step -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ********: rigid body motion - thermostated :*********** -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c calculate thermostated velocities -+ -+ uxx(jg)=(gvxo(jg)+tstep/gmass(id)*fmx(jg))*chit0 -+ uyy(jg)=(gvyo(jg)+tstep/gmass(id)*fmy(jg))*chit0 -+ uzz(jg)=(gvzo(jg)+tstep/gmass(id)*fmz(jg))*chit0 -+ -+c update positions -+ -+ gcmx(ig)=tstep*uxx(jg)+ -+ x eta(1)*gcxo(jg)+eta(4)*gcyo(jg)+eta(7)*gczo(jg) -+ gcmy(ig)=tstep*uyy(jg)+ -+ x eta(2)*gcxo(jg)+eta(5)*gcyo(jg)+eta(8)*gczo(jg) -+ gcmz(ig)=tstep*uzz(jg)+ -+ x eta(3)*gcxo(jg)+eta(6)*gcyo(jg)+eta(9)*gczo(jg) -+ -+c centre of mass velocities at full step -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=(omxo(jg)+pt5*delx) -+ opy(jg)=(omyo(jg)+pt5*dely) -+ opz(jg)=(omzo(jg)+pt5*delz) -+ -+ enddo -+ -+c scaled angular velocity at time step n -+ -+ omx(ig)=opx(jg)*chit0 -+ omy(ig)=opy(jg)*chit0 -+ omz(ig)=opz(jg)*chit0 -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=(omxo(jg)+delx*1.5d0)*chit0 -+ oqy(jg)=(omyo(jg)+dely*1.5d0)*chit0 -+ oqz(jg)=(omzo(jg)+delz*1.5d0)*chit0 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=(omxo(jg)+delx)*chit0 -+ uyy(jg)=(omyo(jg)+dely)*chit0 -+ uzz(jg)=(omzo(jg)+delz)*chit0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c calculate total stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c calculate new cell tensor -+ -+ call mat_mul(eta,cell0,cell) -+ -+c calculate eta tensor -+ -+ do i=1,9 -+ eta(i)=beta*tstep/taup*(stress(i)/volm-press*uni(i))+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c new estimate of chit -+ -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chit0=sqrt(1.d0+tstep/taut*(sigma/engtot-1.d0)) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c update volume -+ -+ volm=volm*eta(1)*eta(5)*eta(9) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nstq_b2 -+ -+ subroutine nstq_h2 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,chit,conint,consv,elrc,engke,engrot, -+ x virlrc,press,quattol,sigma,taup,taut,temp,tolnce,tstep, -+ x vircom,vircon,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints- rigid body sites and constraint sites -+c may coincide. -+c -+c verlet leapfrog with Hoover like thermostat and barostat. -+c (cell may change shape) -+c -+c parallel replicated data version : block data -+c -+c for systems using bond constraints -+c -+c tqx,tqy,tqz=torque in lab fixed frame (input) -+c omx,omy,omz=angular velocity in body fixed frame (principal axis) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1995 -+c author t.forester june 1995 -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newstep,newjob,cycle -+ integer fail,imcon,idnode,mxnode,natms,ngrp,nscons -+ integer ntcons,ntfree,igrp,igrp1,igrp2,idum,ifre,ifre1,ifre2 -+ integer i,j,k,jg,ig,jr,id,mxshak1,icyc,ntpatm,mode -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) rot,strkin,strcon,strgrp,engtrn,vxt,vyt,vzt,trx,try,trz -+ real(8) delx,dely,delz,vaa,vbb,vcc,viracc,com,fac,etadot -+ real(8) chit,conint,consv,virlrc,elrc,press,sigma,taut,taup -+ real(8) volm,eta0,etanew,cell0,volm0,elrc0,virlrc0,pmass,qmass -+ real(8) totmas,chit0,xxa,yya,zza,chip,chitp,vom,engfke -+ real(8) chitnew,vold,cons1,cons2,cons3,temp,uni -+ real(8) stres0,engtot -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: fmx(:),fmy(:),fmz(:) -+ real(8), allocatable :: tqx(:),tqy(:),tqz(:) -+ real(8), allocatable :: omxo(:),omyo(:),omzo(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ real(8), allocatable :: qn0(:),qn1(:),qn2(:),qn3(:) -+ -+ dimension rot(9),strkin(9),strcon(9),strgrp(9),fail(nnn),vom(3) -+ dimension cell0(9),eta0(9),etanew(9),stres0(9),uni(9),com(3) -+ -+ save newjob,volm0,elrc0,virlrc0,dens0,pmass,qmass -+ save igrp1,igrp2,ifre1,ifre2,totmas -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(6)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate (fmx(msgrp),fmy(msgrp),fmz(msgrp),stat=fail(11)) -+ allocate (tqx(msgrp),tqy(msgrp),tqz(msgrp),stat=fail(12)) -+ allocate (omxo(msgrp),omyo(msgrp),omzo(msgrp),stat=fail(13)) -+ allocate (gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(14)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(15)) -+ allocate (qn0(msgrp),qn1(msgrp),qn2(msgrp),qn3(msgrp), -+ x stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1710) -+ enddo -+ -+ if(newjob) then -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ qmass=2.0d0*sigma*taut**2 -+ pmass=2.0d0*sigma*taup**2 -+ -+c store initial values of volume, long range corrections etc -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ fail(1)=0 -+ allocate (dens0(mxatyp),stat=fail(1)) -+ if(fail(1).ne.0)call error(idnode,1720) -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+c system total mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ cycle=.true. -+ -+c ensure total momentum is zero -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+c correction to velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ omxo(jg)=omx(ig) -+ omyo(jg)=omy(ig) -+ omzo(jg)=omz(ig) -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ gvxo(jg)=gvxx(ig) -+ gvyo(jg)=gvyy(ig) -+ gvzo(jg)=gvzz(ig) -+ qn0(jg)=q0(ig) -+ qn1(jg)=q1(ig) -+ qn2(jg)=q2(ig) -+ qn3(jg)=q3(ig) -+ -+ enddo -+ -+c calculate centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c calculate atom displacement from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxo(i)-gcxo(jg) -+ dty(jr)=yyo(i)-gcyo(jg) -+ dtz(jr)=zzo(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c initial thermostat and barostat variables and new cell -+ -+ chit0=chit -+ do i=1,9 -+ -+ eta0(i)=eta(i) -+ cell0(i)=cell(i) -+ -+ enddo -+ -+c initialise constraint stress and virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ stres0(i)=stress(i) -+ -+ enddo -+ -+c shake and thermostat iterations start here -+ -+ icyc=0 -+ mxshak1=mxshak -+ if(ntcons.eq.0)mxshak1=4 -+ do while(cycle.and.icyc.le.mxshak1) -+ -+ icyc=icyc+1 -+ -+c restore cell vectors -+ -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c restore original quaternions for this step -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ q0(ig)=qn0(jg) -+ q1(ig)=qn1(jg) -+ q2(ig)=qn2(jg) -+ q3(ig)=qn3(jg) -+ -+ enddo -+ -+c integrate unconstrained new positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity using leapfrog -+ -+ vxt=pt5*(vxx(i)+vxo(j)) -+ vyt=pt5*(vyy(i)+vyo(j)) -+ vzt=pt5*(vzz(i)+vzo(j)) -+ -+ uxx(j)=vxo(j)+tstep*(fxx(i)*rmass(i)- -+ x (eta0(1)+chit0)*vxt-eta0(4)*vyt-eta0(7)*vzt) -+ uyy(j)=vyo(j)+tstep*(fyy(i)*rmass(i)- -+ x eta0(2)*vxt-(eta0(5)+chit0)*vyt-eta0(8)*vzt) -+ uzz(j)=vzo(j)+tstep*(fzz(i)*rmass(i)- -+ x eta0(3)*vxt-eta0(6)*vyt-(eta0(9)+chit0)*vzt) -+ -+c advance positions using leapfrog -+ -+ xxa=(xxx(i)+xxo(i))*pt5-com(1) -+ yya=(yyy(i)+yyo(i))*pt5-com(2) -+ zza=(zzz(i)+zzo(i))*pt5-com(3) -+ -+ xxx(i)=xxo(i)+tstep*(uxx(j)+ -+ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) -+ yyy(i)=yyo(i)+tstep*(uyy(j)+ -+ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) -+ zzz(i)=zzo(i)+tstep*(uzz(j)+ -+ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) -+ -+c estimate full step velocities -+ -+ vxx(i)=pt5*(uxx(j)+vxo(j)) -+ vyy(i)=pt5*(uyy(j)+vyo(j)) -+ vzz(i)=pt5*(uzz(j)+vzo(j)) -+ -+ enddo -+ -+c kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore half step velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=uxx(j) -+ vyy(i)=uyy(j) -+ vzz(i)=uzz(j) -+ -+ enddo -+ -+c ********: rigid body motion - thermostated :************ -+ -+c translational kinetic energy -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate centre of mass forces -+ -+ fmx(jg)=0.d0 -+ fmy(jg)=0.d0 -+ fmz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ fmx(jg)=fmx(jg)+fxx(i) -+ fmy(jg)=fmy(jg)+fyy(i) -+ fmz(jg)=fmz(jg)+fzz(i) -+ -+ enddo -+ -+c calculate thermostated velocities -+ -+ vxt=pt5*(gvxx(ig)+gvxo(jg)) -+ vyt=pt5*(gvyy(ig)+gvyo(jg)) -+ vzt=pt5*(gvzz(ig)+gvzo(jg)) -+ -+ uxx(jg)=gvxo(jg)+tstep*(fmx(jg)/gmass(id)- -+ x (chit0+eta0(1))*vxt-eta0(4)*vyt-eta0(7)*vzt) -+ uyy(jg)=gvyo(jg)+tstep*(fmy(jg)/gmass(id)- -+ x eta0(2)*vxt-(eta0(5)+chit0)*vyt-eta0(8)*vzt) -+ uzz(jg)=gvzo(jg)+tstep*(fmz(jg)/gmass(id)- -+ x eta0(3)*vxt-eta0(6)*vyt-(eta0(9)+chit0)*vzt) -+ -+c advance positions using leapfrog -+ -+ xxa=(gcmx(ig)+gcxo(jg))*pt5-com(1) -+ yya=(gcmy(ig)+gcyo(jg))*pt5-com(2) -+ zza=(gcmz(ig)+gczo(jg))*pt5-com(3) -+ -+ gcmx(ig)=gcxo(jg)+tstep*(uxx(jg)+ -+ x eta0(1)*xxa+eta0(4)*yya+eta0(7)*zza) -+ gcmy(ig)=gcyo(jg)+tstep*(uyy(jg)+ -+ x eta0(2)*xxa+eta0(5)*yya+eta0(8)*zza) -+ gcmz(ig)=gczo(jg)+tstep*(uzz(jg)+ -+ x eta0(3)*xxa+eta0(6)*yya+eta0(9)*zza) -+ -+c estimate full step velocities -+ -+ gvxx(ig)=pt5*(gvxo(jg)+uxx(jg)) -+ gvyy(ig)=pt5*(gvyo(jg)+uyy(jg)) -+ gvzz(ig)=pt5*(gvzo(jg)+uzz(jg)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gvxx(ig)=uxx(jg) -+ gvyy(ig)=uyy(jg) -+ gvzz(ig)=uzz(jg) -+ -+ enddo -+ -+c calculate rigid body stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx(jg)=0.d0 -+ tqy(jg)=0.d0 -+ tqz(jg)=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx(jg)=tqx(jg)+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy(jg)=tqy(jg)+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz(jg)=tqz(jg)+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c angular velocity at time step n (first guess) -+ -+ opx(jg)=omxo(jg) -+ opy(jg)=omyo(jg) -+ opz(jg)=omzo(jg) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx(jg)*rot(1)+tqy(jg)*rot(4)+tqz(jg)*rot(7))* -+ x rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)* -+ x rotinx(id,2) -+ try=(tqx(jg)*rot(2)+tqy(jg)*rot(5)+tqz(jg)*rot(8))* -+ x rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)* -+ x rotiny(id,2) -+ trz=(tqx(jg)*rot(3)+tqy(jg)*rot(6)+tqz(jg)*rot(9))* -+ x rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)* -+ x rotinz(id,2) -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omxo(jg)+pt5*tstep*trx -+ opy(jg)=omyo(jg)+pt5*tstep*try -+ opz(jg)=omzo(jg)+pt5*tstep*trz -+ -+ enddo -+ -+c correction due to thermostat -+ -+ delx=tstep*(trx-chit0*pt5*(omx(ig)+omxo(jg))) -+ dely=tstep*(try-chit0*pt5*(omy(ig)+omyo(jg))) -+ delz=tstep*(trz-chit0*pt5*(omz(ig)+omzo(jg))) -+ -+c angular velocity at time step n -+ -+ omx(ig)=omxo(jg)+delx*pt5 -+ omy(ig)=omyo(jg)+dely*pt5 -+ omz(ig)=omzo(jg)+delz*pt5 -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(jg)=omxo(jg)+delx -+ uyy(jg)=omyo(jg)+dely -+ uzz(jg)=omzo(jg)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omxo(jg)+delx*1.5d0 -+ oqy(jg)=omyo(jg)+dely*1.5d0 -+ oqz(jg)=omzo(jg)+delz*1.5d0 -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step velocities -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(jg) -+ omy(ig)=uyy(jg) -+ omz(ig)=uzz(jg) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge new atomic coordinates -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c calculate total stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strcns(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+c propagate eta -+ -+ fac=9.d0 -+ do i=1,9 -+ etanew(i)=eta(i)+tstep*((stress(i)-press*volm*uni(i))/pmass- -+ x chit0*eta0(i)) -+ enddo -+ if(mode.gt.0)then -+ fac=5.d0 -+ etanew(3)=0.d0 -+ etanew(6)=0.d0 -+ etanew(7)=0.d0 -+ etanew(8)=0.d0 -+ if(mode.lt.3)then -+ fac=3.d0 -+ etanew(2)=0.d0 -+ etanew(4)=0.d0 -+ if(mode.eq.2)then -+ fac=2.d0 -+ etanew(1)=0.5d0*(etanew(1)+etanew(5)) -+ etanew(5)=etanew(1) -+ endif -+ endif -+ endif -+ do i=1,9 -+ eta0(i)=pt5*(etanew(i)+eta(i)) -+ enddo -+ -+c propagate chit -+ -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ engke=engfke+engtrn -+ engtot=engke+engrot -+ chitp=(2.d0*(engtot-sigma)+pmass*etadot-fac*boltz*temp)/qmass -+ chitnew=chit+tstep*chitp -+ chit0=pt5*(chit+chitnew) -+ -+c estimate new cell parameters -+ -+ call cell_propagate(tstep,cell,etanew) -+ -+ if(ntcons.gt.0) then -+ -+c apply constraint correction -+ -+ newstep=.false. -+ if(icyc.eq.1)newstep=.true. -+ -+ call qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ if(abs(viracc).le.1.d-10)cycle=.false. -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+ enddo -+ -+c update thermostat and barostat variables -+ -+ chit=chitnew -+ do i=1,9 -+ eta(i)=etanew(i) -+ enddo -+ -+c update volume -+ -+ chip=eta(1)+eta(5)+eta(9) -+ vold=volm -+ volm=volm*exp(tstep*chip) -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c conserved quantity less kinetic and potential energy -+ -+ conint=conint+tstep*chit0*(qmass/taut**2+fac*boltz*temp) -+ cons1=pt5*qmass*chit0**2 -+ cons2=press*vold -+ etadot=sdot0(9,eta0,eta0) -+ if(mode.eq.2)etadot=etadot-eta0(1)**2 -+ cons3=pt5*pmass*etadot -+ consv=conint+cons1+cons2+cons3 -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c merge new quaternions -+ -+ call merge4(idnode,mxnode,ngrp,mxbuff,q0,q1,q2,q3,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate (opx,opy,opz,oqx,oqy,oqz,stat=fail(1)) -+ deallocate (dtx,dty,dtz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate (uxx,uyy,uzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate (dxt,dyt,dzt,xxo,yyo,zzo,stat=fail(4)) -+ deallocate (vxo,vyo,vzo,tqx,tqy,tqz,stat=fail(5)) -+ deallocate (fmx,fmy,fmz,omxo,omyo,omzo,stat=fail(6)) -+ deallocate (gvxo,gvyo,gvzo,gcxo,gcyo,gczo,stat=fail(7)) -+ deallocate (xxt,yyt,zzt,qn0,qn1,qn2,qn3,stat=fail(8)) -+ -+ return -+ end subroutine nstq_h2 -+ -+ subroutine qshake -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,stresh) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for appling bond constraint corrections after -+c atomic integration. Assumes rigid bodies connected by constraints -+c If this is not so use rdshake_1 instead -+c Must be used in conjunction with leapfrog integration algorithms -+c -+c copyright - daresbury laboratory 1995 -+c author - t. forester june 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newstep,newjob -+ integer fail,idnode,imcon,mxnode,natms,nscons,i,j,k -+ integer ik,ig,id,jj -+ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,txx,tyy -+ real(8) tzz,xxt,yyt,zzt,stresh,tstep2,esig,dis,dis2 -+ real(8) xxa,yya,zza,tax,tay,taz,doti,amti,amtj -+ real(8) trx,try,trz,vix,viy,viz,vxi,vyi,vzi -+ real(8) vjx,vjy,vjz,vxj,vyj,vzj,gamma,dli,dlj,rot -+ -+ real(8), allocatable :: redmass(:),esig1(:) -+ -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ dimension stresh(9),rot(9) -+ -+ save newjob,esig1,redmass -+ -+ data newjob/.true./,fail/0/ -+ -+ if(newjob)then -+ -+ allocate (redmass(mxcons),esig1(mxcons),stat=fail) -+ if(fail.ne.0)call error(idnode,1610) -+ newjob=.false. -+ -+ endif -+ -+c constraint virial -+ -+ vircon=0.d0 -+ -+c accumulators for stress tensor -+ -+ do i=1,9 -+ stresh(i)=0.d0 -+ enddo -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c one iteration of constraint (shake) algorithm -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate temporary bond vector -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c calculate maximum error in bondlength -+ -+ esig=0.d0 -+ do k=1,nscons -+ -+c set bond parameter -+ -+ dis=prmcon(listcon(k,1)) -+ dis2=dis*dis -+ esig1(k)=0.5d0*(dis2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/dis2 -+ esig=max(esig,abs(esig1(k))) -+ -+ enddo -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+c terminate iteration if all tolerances satisfied -+ -+ if (.not.safe) then -+ -+c initialise force increment arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint forces -+ -+ ik=0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c assign effective reduced mass -+ -+ if(newstep) then -+ -+ ig=lstbod(i) -+ -+ if(ig.eq.0) then -+ -+ amti=rmass(i) -+ -+ else -+ -+ ik=ik+1 -+ id=lstgtp(ig) -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ jj=lstcsit(ik) -+ -+c site to com in lab frame -+ -+ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+ -+ x gzz(id,jj)*rot(3)) -+ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+ -+ x gzz(id,jj)*rot(6)) -+ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+ -+ x gzz(id,jj)*rot(9)) -+ -+c find cross product between interatomic vector and vector to com -+ -+ tax=yya*dzz(k)-zza*dyy(k) -+ tay=zza*dxx(k)-xxa*dzz(k) -+ taz=xxa*dyy(k)-yya*dxx(k) -+ -+c transform to body fixed frame -+ -+ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) -+ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) -+ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) -+ -+c direction of induced velocites in body frame -+ -+ vix=try*gzz(id,jj)-trz*gyy(id,jj) -+ viy=trz*gxx(id,jj)-trx*gzz(id,jj) -+ viz=trx*gyy(id,jj)-try*gxx(id,jj) -+ -+c transform to lab frame -+ -+ vxi=vix*rot(1)+viy*rot(2)+viz*rot(3) -+ vyi=vix*rot(4)+viy*rot(5)+viz*rot(6) -+ vzi=vix*rot(7)+viy*rot(8)+viz*rot(9) -+ -+c find dot product between induced translational and rotational velocities -+ -+ doti=abs(vxi*dxx(k)+vyi*dyy(k)+vzi*dzz(k)) -+ doti=doti/dis2 -+ -+ amti=(1.d0/gmass(id)+doti) -+ -+ endif -+ -+ ig=lstbod(j) -+ if(ig.eq.0) then -+ -+ amtj=rmass(j) -+ -+ else -+ -+ ik=ik+1 -+ id=lstgtp(ig) -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ jj=lstcsit(ik) -+ -+c site to com in lab frame -+ -+ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+ -+ x gzz(id,jj)*rot(3)) -+ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+ -+ x gzz(id,jj)*rot(6)) -+ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+ -+ x gzz(id,jj)*rot(9)) -+ -+c find cross product between interatomic vector and vector to com -+ -+ tax =yya*dzz(k)-zza*dyy(k) -+ tay =zza*dxx(k)-xxa*dzz(k) -+ taz =xxa*dyy(k)-yya*dxx(k) -+ -+c transform to body fixed frame -+ -+ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) -+ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) -+ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) -+ -+c direction of induced velocites in body frame -+ -+ vjx=try*gzz(id,jj)-trz*gyy(id,jj) -+ vjy=trz*gxx(id,jj)-trx*gzz(id,jj) -+ vjz=trx*gyy(id,jj)-try*gxx(id,jj) -+ -+c transform to lab frame -+ -+ vxj=vjx*rot(1)+vjy*rot(2)+vjz*rot(3) -+ vyj=vjx*rot(4)+vjy*rot(5)+vjz*rot(6) -+ vzj=vjx*rot(7)+vjy*rot(8)+vjz*rot(9) -+ -+c find dot product between induced translational and rotational velocities -+ -+ doti=abs(vxj*dxx(k)+vyj*dyy(k)+vzj*dzz(k)) -+ doti=doti/dis2 -+ -+ amtj=(1.d0/gmass(id)+doti) -+ -+ endif -+ -+ redmass(k)=1.d0/(amti+amtj)/tstep2 -+ -+ endif -+ -+c constraint force parameter -+ -+ gamma=esig1(k)*redmass(k) -+ -+c accumulate bond virial -+ -+ vircon=vircon-gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ -+ stresh(1)=stresh(1)+gamma*dxx(k)*dxx(k) -+ stresh(2)=stresh(2)+gamma*dxx(k)*dyy(k) -+ stresh(3)=stresh(3)+gamma*dxx(k)*dzz(k) -+ stresh(5)=stresh(5)+gamma*dyy(k)*dyy(k) -+ stresh(6)=stresh(6)+gamma*dyy(k)*dzz(k) -+ stresh(9)=stresh(9)+gamma*dzz(k)*dzz(k) -+ -+c improved atomic force -+ -+ xxt(i)=xxt(i)+dxx(k)*gamma -+ yyt(i)=yyt(i)+dyy(k)*gamma -+ zzt(i)=zzt(i)+dzz(k)*gamma -+ -+ xxt(j)=xxt(j)-dxx(k)*gamma -+ yyt(j)=yyt(j)-dyy(k)*gamma -+ zzt(j)=zzt(j)-dzz(k)*gamma -+ -+ enddo -+ -+c transport temporary positions to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov) call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ dlj=1.d0/dble(listme(j)) -+ -+ fxx(i)=fxx(i)+xxt(i)*dli -+ fyy(i)=fyy(i)+yyt(i)*dli -+ fzz(i)=fzz(i)+zzt(i)*dli -+ fxx(j)=fxx(j)+xxt(j)*dlj -+ fyy(j)=fyy(j)+yyt(j)*dlj -+ fzz(j)=fzz(j)+zzt(j)*dlj -+ -+ enddo -+ -+c complete (symmetrical) stress tensor -+ -+ stresh(4)=stresh(2) -+ stresh(7)=stresh(3) -+ stresh(8)=stresh(6) -+ -+c splice force arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(stresh,9,buffer) -+ call splice -+ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine qshake -+ -+ end module lf_rotation2_module -diff -urN dl_class_1.9.orig/srcmod/Makefile dl_class_1.9/srcmod/Makefile ---- dl_class_1.9.orig/srcmod/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/Makefile 2015-11-09 14:32:49.349871999 +0100 -@@ -0,0 +1,101 @@ -+# Master makefile for DL_POLY Classic -+# Author: W. Smith January Dec 2010 -+# -+#======================================================================= -+# Define default settings -+#======================================================================= -+ -+include ../Plumed.inc -+ -+ -+BINROOT = ../execute -+CC := $(CC) -+EX = DLPOLY.X -+EXE = $(BINROOT)/$(EX) -+FC=undefined -+SHELL=/bin/sh -+TYPE=par -+ -+#===================================================================== -+# Define object files -+ -+OBJ_MOD = parse_module.o setup_module.o error_module.o \ -+ site_module.o config_module.o pair_module.o utility_module.o \ -+ metafreeze_module.o solvation_module.o tether_module.o \ -+ vdw_module.o property_module.o rigid_body_module.o \ -+ angles_module.o bonds_module.o shake_module.o \ -+ inversion_module.o dihedral_module.o core_shell_module.o \ -+ exclude_module.o ewald_module.o coulomb_module.o\ -+ external_field_module.o four_body_module.o \ -+ hkewald_module.o metal_module.o ensemble_tools_module.o \ -+ temp_scalers_module.o three_body_module.o spme_module.o \ -+ tersoff_module.o neu_coul_module.o \ -+ nlist_builders_module.o forces_module.o \ -+ lf_motion_module.o lf_rotation1_module.o \ -+ lf_rotation2_module.o vv_motion_module.o \ -+ vv_rotation1_module.o vv_rotation2_module.o \ -+ pmf_module.o integrator_module.o optimiser_module.o \ -+ hyper_dynamics_module.o driver_module.o \ -+ define_system_module.o -+ -+OBJ_SRC = dlpoly.o -+ -+OBJ_PAR = basic_comms.o merge_tools.o pass_tools.o -+ -+#===================================================================== -+# Define targets -+all: -+ @echo "Error - please specify a target machine!" -+ @echo "Permissible targets for this Makefile are:" -+ @echo " " -+ @echo "gfortran (parallel)" -+ @echo "woodcrest (parallel)" -+ @echo " " -+ @echo "Please examine Makefile for details" -+ -+# system specific targets follow : -+ -+#================== GNU Fortran, MPI version ============================== -+gfortran: -+ $(MAKE) FC="$(MPIF90)" LD="$(MPIF90) -o" \ -+ LDFLAGS="$(LDFLAGS)" \ -+ FFLAGS="-c $(FFLAGS)" \ -+ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) -+ -+#================= Woodcrest ========================================= -+woodcrest: -+ $(MAKE) LD="mpif90 -o" LDFLAGS="" \ -+ FC=mpif90 FFLAGS="-c -O3" \ -+ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) -+ -+#===================================================================== -+# Default code for parallel (MPI) execution -+ -+par: check $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) $(PLUMED_DEPENDENCIES) -+ $(LD) $(EX) $(LDFLAGS) $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) $(PLUMED_LOAD) -+ mv $(EX) $(EXE) -+ -+#===================================================================== -+# Check that a machine has been specified -+check: -+ @if test $(FC) = "undefined";\ -+ then echo "You must specify a target machine!"; \ -+ exit 99;\ -+ fi -+ -+#===================================================================== -+# Clean up the source directory -+clean: -+ rm -f $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) *.mod -+ -+#===================================================================== -+# Declare dependencies -+.f.o: -+ $(FC) $(FFLAGS) $*.f -+.c.o: -+ $(CC) -c $*.c -+ -+#===================================================================== -+# Declare dependency on module files -+ -+$(OBJ_SRC): $(OBJ_MOD) -diff -urN dl_class_1.9.orig/srcmod/Makefile.plumedbck dl_class_1.9/srcmod/Makefile.plumedbck ---- dl_class_1.9.orig/srcmod/Makefile.plumedbck 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/Makefile.plumedbck 2011-02-22 12:46:11.000000000 +0100 -@@ -0,0 +1,98 @@ -+# Master makefile for DL_POLY Classic -+# Author: W. Smith January Dec 2010 -+# -+#======================================================================= -+# Define default settings -+#======================================================================= -+ -+BINROOT = ../execute -+CC = gcc -+EX = DLPOLY.X -+EXE = $(BINROOT)/$(EX) -+FC=undefined -+SHELL=/bin/sh -+TYPE=par -+ -+#===================================================================== -+# Define object files -+ -+OBJ_MOD = parse_module.o setup_module.o error_module.o \ -+ site_module.o config_module.o pair_module.o utility_module.o \ -+ metafreeze_module.o solvation_module.o tether_module.o \ -+ vdw_module.o property_module.o rigid_body_module.o \ -+ angles_module.o bonds_module.o shake_module.o \ -+ inversion_module.o dihedral_module.o core_shell_module.o \ -+ exclude_module.o ewald_module.o coulomb_module.o\ -+ external_field_module.o four_body_module.o \ -+ hkewald_module.o metal_module.o ensemble_tools_module.o \ -+ temp_scalers_module.o three_body_module.o spme_module.o \ -+ tersoff_module.o neu_coul_module.o \ -+ nlist_builders_module.o forces_module.o \ -+ lf_motion_module.o lf_rotation1_module.o \ -+ lf_rotation2_module.o vv_motion_module.o \ -+ vv_rotation1_module.o vv_rotation2_module.o \ -+ pmf_module.o integrator_module.o optimiser_module.o \ -+ hyper_dynamics_module.o driver_module.o \ -+ define_system_module.o -+ -+OBJ_SRC = dlpoly.o -+ -+OBJ_PAR = basic_comms.o merge_tools.o pass_tools.o -+ -+#===================================================================== -+# Define targets -+all: -+ @echo "Error - please specify a target machine!" -+ @echo "Permissible targets for this Makefile are:" -+ @echo " " -+ @echo "gfortran (parallel)" -+ @echo "woodcrest (parallel)" -+ @echo " " -+ @echo "Please examine Makefile for details" -+ -+# system specific targets follow : -+ -+#================== GNU Fortran, MPI version ============================== -+gfortran: -+ $(MAKE) FC="mpif90" LD="mpif90 -o" \ -+ LDFLAGS="-O2 -ffast-math" \ -+ FFLAGS="-c -O2 -ffast-math" \ -+ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) -+ -+#================= Woodcrest ========================================= -+woodcrest: -+ $(MAKE) LD="mpif90 -o" LDFLAGS="" \ -+ FC=mpif90 FFLAGS="-c -O3" \ -+ EX=$(EX) BINROOT=$(BINROOT) $(TYPE) -+ -+#===================================================================== -+# Default code for parallel (MPI) execution -+ -+par: check $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) -+ $(LD) $(EX) $(LDFLAGS) $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) -+ mv $(EX) $(EXE) -+ -+#===================================================================== -+# Check that a machine has been specified -+check: -+ @if test $(FC) = "undefined";\ -+ then echo "You must specify a target machine!"; \ -+ exit 99;\ -+ fi -+ -+#===================================================================== -+# Clean up the source directory -+clean: -+ rm -f $(OBJ_MOD) $(OBJ_PAR) $(OBJ_SRC) *.mod -+ -+#===================================================================== -+# Declare dependencies -+.f.o: -+ $(FC) $(FFLAGS) $*.f -+.c.o: -+ $(CC) -c $*.c -+ -+#===================================================================== -+# Declare dependency on module files -+ -+$(OBJ_SRC): $(OBJ_MOD) -diff -urN dl_class_1.9.orig/srcmod/merge_tools.f dl_class_1.9/srcmod/merge_tools.f ---- dl_class_1.9.orig/srcmod/merge_tools.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/merge_tools.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,670 @@ -+ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for merging coordinate arrays across -+c a number of processors -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith november 1992. -+c MPI version - t. forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ use error_module -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nbuff,nsize,ierr,iatm1,iatm2 -+ integer j,i,k,jdnode,kdnode,katm1,katm2,iatm,katm -+ real*8 xxx(natms),yyy(natms),zzz(natms),buffer(nbuff) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+c check that buffer is large enough -+ -+ nsize=(natms+mxnode-1)/mxnode -+ if(nbuff.lt.6*nsize)call error(idnode,47) -+ -+c load initial transfer buffer -+ -+ j=0 -+ -+c set up this nodes atoms -+ -+ iatm1 = (idnode*natms)/mxnode + 1 -+ iatm2 = ((idnode+1)*natms)/mxnode -+ -+ iatm = iatm2-iatm1+1 -+ -+ do i=iatm1,iatm2 -+ -+ buffer(j+1)=xxx(i) -+ buffer(j+2)=yyy(i) -+ buffer(j+3)=zzz(i) -+ j=j+3 -+ -+ enddo -+ -+ -+ call gsync() -+ -+c identity of neighbour node for systolic transfer -+ -+ jdnode=mod(idnode+1,mxnode) -+ -+ do k=1,mxnode-1 -+ -+c identity of node of origin of incoming data -+ -+ kdnode=mod(idnode+mxnode-k,mxnode) -+ -+c identity of incoming atoms -+ -+ katm1 = (kdnode*natms)/mxnode + 1 -+ katm2 = ((kdnode+1)*natms)/mxnode -+ katm = katm2-katm1 + 1 -+ -+c systolic data pulse to transfer data -+ -+ call MPI_IRECV(buffer(3*nsize+1),3*nsize,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Merge_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(buffer(1),3*nsize,MPI_DOUBLE_PRECISION,jdnode, -+ x Merge_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+c merge the incoming data into current arrays -+ -+ j=3*nsize -+ -+ do i=katm1,katm2 -+ -+ xxx(i)=buffer(j+1) -+ yyy(i)=buffer(j+2) -+ zzz(i)=buffer(j+3) -+ j=j+3 -+ -+ enddo -+ -+c shift new data to start of buffer -+ -+ do i=1,3*nsize -+ -+ buffer(i)=buffer(3*nsize+i) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for merging together coordinate arrays -+c across a number of processors during rigid body algorithm -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - t.forester november 1993 -+c systolic pulse version. T3D t.forester sept 1994 -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ logical safe -+ integer idnode,mxnode,natms,ierr,i,j,k,l,mxb,nout,nin -+ integer nin1,jdnode,j1,kdnode -+ integer lstme(natms) -+ real*8 xxx(mxatms),yyy(mxatms),zzz(mxatms),buffer(mxbuff) -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+ -+ safe =.true. -+ -+c load up buffers -+ -+ j=1 -+ l=1 -+ do while(lstme(l).gt.0.and.l.le.natms) -+ -+ i=lstme(l) -+ buffer(j+1)=dble(i) -+ buffer(j+2)=xxx(i) -+ buffer(j+3)=yyy(i) -+ buffer(j+4)=zzz(i) -+ j=j+4 -+ l=l+1 -+ -+ enddo -+ -+c length of message -+ -+ buffer(1) = dble(j) -+ -+c array position for incoming messages -+ -+ mxb = mxbuff/2 -+ -+c load initial transfer buffer -+ -+ call gsync() -+ -+c identity of neighbour node for systolic transfer -+ -+ jdnode=mod(idnode+1,mxnode) -+ -+ do k=1,mxnode-1 -+ -+c identity of node of origin of incoming data -+ -+ kdnode=mod(idnode+mxnode-k,mxnode) -+ -+c out going message size -+ -+ nout = nint(buffer(1)) -+ -+ call MPI_IRECV(nin,1,MPI_INTEGER, -+ x MPI_ANY_SOURCE,Merge1_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(nout,1,MPI_INTEGER,jdnode, -+ x Merge1_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+ call MPI_IRECV(buffer(mxb),nin,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Merge1_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(buffer(1),nout,MPI_DOUBLE_PRECISION,jdnode, -+ x Merge1_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+c check buffer array not exceeded -+ -+ if(nin.gt.mxbuff-mxb) safe =.false. -+ -+c position of first data element in incoming array -+ -+ nin1 = (nin-1)/4 -+ j = mxb+1 -+ -+ do j1=1,nin1 -+ -+ i = nint(buffer(j)) -+ xxx(i)=buffer(j+1) -+ yyy(i)=buffer(j+2) -+ zzz(i)=buffer(j+3) -+ j=j+4 -+ -+ enddo -+ -+c shift new data to start of buffer -+ -+ do i=1,nin -+ -+ buffer(i)=buffer(mxb-1+i) -+ -+ enddo -+ -+ enddo -+ -+c global check -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,47) -+ -+ return -+ end -+ -+ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for merging coordinate arrays across -+c a number of processors -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t.forester february 1994 -+c T3D version - sept 1994 t.forester -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c********************************************************************* -+ -+ use error_module -+ -+ implicit none -+ -+ integer idnode,mxnode,ngrp,nbuff,ierr,nsize,i,j,igrp1,igrp2 -+ integer k,jdnode,kdnode,kgrp1,kgrp2 -+ real*8 q0(ngrp),q1(ngrp),q2(ngrp),q3(ngrp),buffer(nbuff) -+ -+ include "comms.inc" -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+ -+c check that buffer is large enough -+ -+ nsize=(ngrp+mxnode-1)/mxnode -+ if(nbuff.lt.8*nsize)call error(idnode,47) -+ -+c load initial transfer buffer -+ -+ j=0 -+ -+ igrp1 = (idnode*ngrp)/mxnode+1 -+ igrp2 = ((idnode+1)*ngrp)/mxnode -+ -+ do i=igrp1,igrp2 -+ -+ buffer(j+1)=q0(i) -+ buffer(j+2)=q1(i) -+ buffer(j+3)=q2(i) -+ buffer(j+4)=q3(i) -+ j=j+4 -+ -+ enddo -+ -+ call gsync() -+ -+c identity of neighbour node for systolic transfer -+ -+ jdnode=mod(idnode+1,mxnode) -+ -+ do k=1,mxnode-1 -+ -+c identity of node of origin of incoming data -+ -+ kdnode=mod(idnode+mxnode-k,mxnode) -+ -+c identity of incoming groups -+ -+ kgrp1 = (kdnode*ngrp)/mxnode+1 -+ kgrp2 = ((kdnode+1)*ngrp)/mxnode -+ -+ call MPI_IRECV(buffer(4*nsize+1),4*nsize,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Merge4_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(buffer(1),4*nsize,MPI_DOUBLE_PRECISION,jdnode, -+ x Merge4_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+c merge the incoming data into current arrays -+ -+ j=4*nsize -+ -+ do i=kgrp1,kgrp2 -+ -+ q0(i)=buffer(j+1) -+ q1(i)=buffer(j+2) -+ q2(i)=buffer(j+3) -+ q3(i)=buffer(j+4) -+ j=j+4 -+ -+ enddo -+ -+c shift new data to start of buffer -+ -+ do i=1,4*nsize -+ -+ buffer(i)=buffer(4*nsize+i) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine shlmerge(idnode,mxnode,ntshl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for merging core-shell velocity data -+c to restore data replication on all nodes -+c -+c copyright - daresbury laboratory 1993 -+c author - w. smith february 1993 -+c MPI version - w. smith june 1995 -+c CPP version - w. smith june 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use config_module -+ use core_shell_module -+ use error_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer idnode,mxnode,ntshl,ierr,i,j,k,n,m,ishl1,ishl2,nsize -+ integer jdnode,kshl1,kshl2,kdnode -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+c check that buffer is large enough -+ -+ nsize=8*((ntshl+mxnode-1)/mxnode) -+ -+ if(mxbuff.lt.2*nsize)call error(idnode,425) -+ -+c block indices -+ -+ ishl1 = (idnode*ntshl)/mxnode+1 -+ ishl2 = ((idnode+1)*ntshl)/mxnode -+ -+c load initial transfer buffer -+ -+ n=0 -+ m=0 -+ -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+c indices of core and shell -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ buffer(n+1)=dble(i) -+ buffer(n+2)=dble(j) -+ buffer(n+3)=vxx(i) -+ buffer(n+4)=vyy(i) -+ buffer(n+5)=vzz(i) -+ buffer(n+6)=vxx(j) -+ buffer(n+7)=vyy(j) -+ buffer(n+8)=vzz(j) -+ n=n+8 -+ -+ enddo -+ -+ call gsync() -+ -+c identity of neighbour node for systolic transfer -+ -+ jdnode=mod(idnode+1,mxnode) -+ -+ do k=1,mxnode-1 -+ -+c identity of node of origin of incoming data -+ -+ kdnode=mod(idnode+mxnode-k,mxnode) -+ -+c systolic data pulse to transfer data -+ -+ call MPI_IRECV(buffer(nsize+1),nsize,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Shell_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(buffer(1),nsize,MPI_DOUBLE_PRECISION,jdnode, -+ x Shell_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+c merge the incoming data into current arrays -+ -+ n=nsize -+ -+c block indices -+ -+ kshl1 = (kdnode*ntshl)/mxnode+1 -+ kshl2 = ((kdnode+1)*ntshl)/mxnode -+ -+ do m=kshl1,kshl2 -+ -+ i=nint(buffer(n+1)) -+ j=nint(buffer(n+2)) -+ -+ vxx(i)=buffer(n+3) -+ vyy(i)=buffer(n+4) -+ vzz(i)=buffer(n+5) -+ vxx(j)=buffer(n+6) -+ vyy(j)=buffer(n+7) -+ vzz(j)=buffer(n+8) -+ -+ n=n+8 -+ -+ enddo -+ -+c shift new data to start of buffer -+ -+ do i=1,nsize -+ -+ buffer(i)=buffer(nsize+i) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for passing coordinate updates between -+c nodes during the shake iteration cycle -+c -+c parallel replicated data algorithm -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith august 1992. -+c MPI version - t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ integer idnode, mxnode, natms,ierr,i,k,j0,k0,n,jdnode,j -+ integer lishap(mxlshp),lashap(mxproc) -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+ real*8 xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ real*8 txx(mxatms),tyy(mxatms),tzz(mxatms) -+ real*8 buffer(mxbuff) -+ -+c store increments to be transferred -+ -+ do i=1,natms -+ -+ txx(i)=xxt(i) -+ tyy(i)=yyt(i) -+ tzz(i)=zzt(i) -+ -+ enddo -+ -+c transfer coordinate data to all nodes -+ -+ call gsync() -+ -+ do k=1,mxnode-1 -+ -+ i=0 -+ j0=0 -+ if(k.gt.1)j0=lashap(k-1) -+ -+ do j=j0+1,lashap(k) -+ -+ buffer(i+1)=txx(lishap(j)) -+ buffer(i+2)=tyy(lishap(j)) -+ buffer(i+3)=tzz(lishap(j)) -+ i=i+3 -+ -+ enddo -+ -+c inter node communication -+ -+ k0=0 -+ -+ if(k+1.lt.mxnode)k0=lashap(mxnode-k-1) -+ n=3*(lashap(mxnode-k)-k0) -+ jdnode=mod(idnode+k,mxnode) -+ -+c check for zero length messages -+ -+ if(n.gt.0) call MPI_IRECV(buffer(i+1),n,MPI_DOUBLE_PRECISION, -+ x MPI_ANY_SOURCE,Shmove_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ if(i.gt.0) call MPI_SEND(buffer(1),i,MPI_DOUBLE_PRECISION, -+ x jdnode,Shmove_tag+k,MPI_COMM_WORLD,ierr) -+ -+ if(n.gt.0) call MPI_WAIT(request,status,ierr) -+ -+c consolidate transferred data -+ -+ do j=k0+1,lashap(mxnode-k) -+ -+ xxt(lishap(j))=xxt(lishap(j))+buffer(i+1) -+ yyt(lishap(j))=yyt(lishap(j))+buffer(i+2) -+ zzt(lishap(j))=zzt(lishap(j))+buffer(i+3) -+ i=i+3 -+ -+ enddo -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for splicing together coordinate arrays -+c across a number of processors during shake algorithm -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - w. smith march 1993 -+c -+c second version of splice -+c -+c********************************************************************* -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ integer idnode,natms,listme,listot,j,n3,i,lastot -+ real*8 xxx,yyy,zzz,buffer -+ -+ dimension listme(mxatms),listot(mxatms) -+ dimension xxx(natms),yyy(natms),zzz(natms) -+ dimension buffer(mxbuff) -+ -+c check buffer size -+ -+ if(mxbuff.lt.6*natms) call error(idnode,190) -+ -+c load initial transfer buffers -+ -+ j=3*natms -+ n3=3*natms -+ -+ do i=1,natms -+ -+ if(listot(i).gt.0)then -+ -+ if(listme(i).gt.0)then -+ -+ buffer(j+1)=xxx(i) -+ buffer(j+2)=yyy(i) -+ buffer(j+3)=zzz(i) -+ -+ else -+ -+ buffer(j+1)=0.d0 -+ buffer(j+2)=0.d0 -+ buffer(j+3)=0.d0 -+ -+ endif -+ -+ j=j+3 -+ -+ endif -+ -+ enddo -+ -+ lastot=j-n3 -+ -+c splice constraint coordinates -+ -+ if(lastot.gt.0) call gdsum(buffer(n3+1),lastot,buffer(1)) -+ -+c reconstitute coordinate arrays -+ -+ j=n3 -+ -+ do i=1,natms -+ -+ if(listot(i).gt.0)then -+ -+ xxx(i)=buffer(j+1)/dble(listot(i)) -+ yyy(i)=buffer(j+2)/dble(listot(i)) -+ zzz(i)=buffer(j+3)/dble(listot(i)) -+ -+ j=j+3 -+ -+ endif -+ -+ enddo -+ -+ return -+ end -diff -urN dl_class_1.9.orig/srcmod/metafreeze_module.f dl_class_1.9/srcmod/metafreeze_module.f ---- dl_class_1.9.orig/srcmod/metafreeze_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/metafreeze_module.f 2012-04-24 18:30:31.000000000 +0200 -@@ -0,0 +1,3539 @@ -+ module metafreeze_module -+ -+c--------------------------------------------------------------------- -+c -+c Metafreeze module for metadynamics -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c Adapted for dl_poly classic w. smith dec 2010 -+c -+c--------------------------------------------------------------------- -+ -+ implicit none -+ -+c Minimise usage by making everything private -+ -+ private -+ -+c--------------------------------------------------------------------- -+c P u b l i c R o u t i n e s -+c ... unless exposed here. -+c--------------------------------------------------------------------- -+ -+ public :: define_metadynamics ! Called to intitialise this module -+ public :: metafreeze_driver ! Called at every MD time-step -+ -+c--------------------------------------------------------------------- -+c P u b l i c V a r i a b l e s -+c--------------------------------------------------------------------- -+ -+ public :: lmetadyn ! Is this a metadynamics calculation? -+ public :: driven ! Is this atom site involved in metadynamics -+ public :: lstein,ltet,lglobpe,llocpe,ncolvar,nq4,nq6,ntet,hkey -+ public :: meta_step_int,globpe_scale,locpe_scale,ref_W_aug -+ public :: h_aug,wt_Dt -+ -+c Local copies of exluded atom arrays note that these are -+c not indexed by atom number, but by an index which loops -+c over the atoms handles by each MPI rank. -+ public :: mtd_nexatm,mtd_lexatm -+ -+c------------------------------------ -+c Populated from CONTROL file -+c------------------------------------ -+ -+ logical,save :: lmetadyn =.false. ! Master metadynamics flag -+ -+c------------------------------------------------------- -+c Energy, virial, stress and forces from 'local' pe -+c Populated by dlpoly energy routines -+c------------------------------------------------------- -+ -+ -+ public :: eng_loc,vir_loc,stress_loc -+ public :: fxx_loc,fyy_loc,fzz_loc -+ -+c---------------------------------------------------------------------- -+c Data accumulated for local potential energy (computed elsewhere) -+c---------------------------------------------------------------------- -+ -+ real(8),save :: eng_loc,vir_loc -+ real(8),dimension(9),save :: stress_loc -+ real(8),allocatable,dimension(:),save :: fxx_loc,fyy_loc,fzz_loc -+ -+c---------------------------------------------------------------------- -+c Arrays holding information on excluded interactions. Replicated -+c here to avoid a compilation dependency loop which would occur -+c if simply using the arrays already in exclude_module.f -+c---------------------------------------------------------------------- -+ integer,allocatable,dimension(:),save :: mtd_nexatm -+ integer,allocatable,dimension(:,:),save :: mtd_lexatm -+ -+c--------------------------------------------------------------------- -+c P r i v a t e V a r i a b l e s -+c--------------------------------------------------------------------- -+ -+c---------------------------------------------------------------- -+c Collective variables and derivatives of v_aug w.r.t colvars -+c---------------------------------------------------------------- -+ -+ integer,parameter :: maxhis = 150000 ! Size of history arrays -+ real(8),allocatable,dimension(:),save :: colvar,dcolvar -+ real(8),allocatable,dimension(:),save :: colvar_scale -+ -+c---------------------------------------------------------------- -+c Positions and heights of previous Gaussians in colvar space -+c---------------------------------------------------------------- -+ -+ real(8),allocatable,dimension(:,:),save :: colvar_his -+ real(8),allocatable,dimension(:),save :: w_aug -+ -+c------------------------------ -+c Read from CONTROL file -+c------------------------------ -+ -+ integer,save :: ncolvar = 0 ! Total number of collvars -+ logical,save :: lstein =.false. ! Q4/Q6 collective variables -+ logical,save :: ltet =.false. ! Tetrahedral order parameter -+ logical,save :: lglobpe =.false. ! Global potential energy -+ logical,save :: llocpe =.false. ! Local potential energy -+ -+ integer,save :: nq4 = 0 ! Number of Q4 pair types -+ integer,save :: nq6 = 0 ! Number of Q6 pair types -+ integer,save :: ntet = 0 ! Number of zeta triplets -+ -+ real(8),save :: globpe_scale = 1.0d0 ! Scaling factors for local -+ real(8),save :: locpe_scale = 1.0d0 ! and global pe colvars -+ -+ real(8),save :: ref_W_aug=1.0d0 ! Reference Gaussian height -+ real(8),save :: h_aug=1.0d0 ! Gaussian width -+ integer,save :: hkey=0 ! Height control scheme -+ real(8),save :: wt_Dt=100.0d0 ! "Well-tempered" parameter -+ integer,save :: meta_step_int=5 ! interval between depositions -+ -+c---------------------------------------- -+c Read from STEINHARDT or TETRAHEDRAL -+c---------------------------------------- -+ -+c Global Steinhardt order parameters -+ -+ real(8),allocatable,dimension(:),save :: q4_global -+ real(8),allocatable,dimension(:),save :: q6_global -+ -+c Global Tetrahedral order parameters -+ -+ real(8),allocatable,dimension(:),save :: zeta_global -+ -+c Bookkeeping arrays for order parameter computation -+ -+ character(8),allocatable,dimension(:,:),save :: q4label -+ character(8),allocatable,dimension(:,:),save :: q6label -+ character(8),allocatable,dimension(:),save :: zetalabel -+ -+c Inner and outer cutoffs -+ -+ real(8),allocatable,dimension(:,:),save :: q4cutoff -+ real(8),allocatable,dimension(:,:),save :: q6cutoff -+ real(8),allocatable,dimension(:,:),save :: zetacutoff -+ -+c Scaling factors for q4 and q6 -+ -+ real(8),allocatable,dimension(:),save :: q4scale -+ real(8),allocatable,dimension(:),save :: q6scale -+ real(8),allocatable,dimension(:),save :: zetascale -+ -+c Number of nearest neighbours for q4, q6 and zeta -+ -+ integer,allocatable,dimension(:),save :: q4nn,q6nn -+ integer,allocatable,dimension(:),save :: zetann -+ -+c------------------------------------------------------------ -+c Arrays holding data for computation of order parameters -+c------------------------------------------------------------ -+ -+c Steinhardt site-site interaction arrays -+ -+ integer,allocatable,dimension(:,:),save :: q4site -+ integer,allocatable,dimension(:,:),save :: q6site -+ integer,allocatable,dimension(:) ,save :: zetasite -+ -+c Number of included sites -+ -+ integer,allocatable,dimension(:),save :: q4ninc -+ integer,allocatable,dimension(:),save :: q6ninc -+ integer,allocatable,dimension(:),save :: zetaninc -+ -+c Real and imaginary parts of q4bar and q6bar -+ -+ real(8),allocatable,dimension(:,:),save :: ReQ6bar,ImQ6bar -+ real(8),allocatable,dimension(:,:),save :: ReQ4bar,ImQ4bar -+ -+c Max number of entries in co-ordination shell -+ -+ integer,parameter :: mxflist = 50 -+ integer :: mxninc -+ -+c Full neighbour list for Tetrahedral order parameter -+ -+ integer,allocatable,dimension(:) ,save :: nflist -+ integer,allocatable,dimension(:,:),save :: flist -+ -+c------------------------------------- -+c Internal bookkeeping -+c------------------------------------- -+ -+ logical,allocatable,dimension(:),save :: driven ! Metadynamics option -+ integer,save :: meta_step=1 ! Current metadynamics step number -+ real(8),save :: meta_energy ! Value of metadynamics bias potential -+ -+ integer,save :: wl_nbins=30 ! Number of bins for WL recursion -+ integer,save :: wl_cycle=0 ! Current WL cycle -+ real(8),save :: wl_range=0.175 ! range of WL -+ real(8),allocatable,dimension(:),save :: wl_bin ! WL bins -+ -+c-------------------------------------- -+c Miscellaneous internal variables -+c-------------------------------------- -+ -+ integer,allocatable,dimension(:) :: buff ! Comms buffer -+ -+c File units -+ -+ integer,save :: stn = 91 ! STEINHARDT -+ integer,save :: mtd = 92 ! METADYNAMICS -+ integer,save :: zta = 93 ! ZETA -+ integer,save :: wlb = 94 ! WL_BINS.DAT -+ -+c Error flag -+ -+ integer,dimension(100) :: ierr = 0 -+ -+c Local store of comms variables -+c Assuming no task farming, comms will require changing if farmed -+ -+ integer, save :: myrank,commsize -+ logical, save :: onroot -+ real(8),save :: kt -+ -+ contains -+ -+ Subroutine Metafreeze_Driver -+ x (imcon,natms,temp,nstep,engcfg,virtot,engord,virord) -+ -+c--------------------------------------------------------------------- -+c Top level metadynamics routine called after evaluation of all -+c other energetic and force terms within the main molecular -+c dynamics loop. -+c -+c 1. Computes the ncolvar order parameters -+c 2. Deposits a new Gaussian at the current collective variables -+c as the current number of steps reaches meta_step_int -+c 3. Computed the bias potential and its derivative w.r.t. the -+c ncolvar collective variables. -+c 4. Computes the forces stresses and virial resulting from the -+c bias -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ use setup_module, only : boltz -+ use config_module, only : fxx,fyy,fzz,stress -+ -+ implicit none -+ -+ integer,intent(in) :: nstep,imcon,natms -+ real(8),intent(in) :: engcfg,virtot,temp -+ real(8),intent(out) :: engord,virord -+ -+c Local variables -+ -+ integer :: k,iq,itet,ibin,nfail,my_meta_step -+ integer,save :: nlastg = 0 -+ real(8) :: height,buff1,wl_mean -+ logical :: flat,safe -+ -+c------------------------------------------------------ -+c Compute order parameters / collective variables -+c------------------------------------------------------ -+ -+c Steinhardt order parameters -+ -+ if ( nq4>0.or.nq6>0 ) call compute_steinhardt(imcon,natms) -+ -+ k = 1 -+ do iq = 1,nq4 -+ colvar(k) = q4_global(iq) -+ k = k + 1 -+ end do -+ do iq = 1,nq6 -+ colvar(k) = q6_global(iq) -+ k = k + 1 -+ end do -+ -+c Tetrahedral order parameters -+ -+ if ( ntet > 0 ) then -+ call compute_tet_nlist(imcon,natms) -+ call compute_tetrahedral(imcon,natms) -+ end if -+ -+ do itet = 1,ntet -+ colvar(k) = zeta_global(itet) -+ k = k + 1 -+ end do -+ -+c Energy order parameters -+ -+ if (lglobpe) then -+ colvar(k) = engcfg -+ k = k + 1 -+ end if -+ if (llocpe) then -+ -+c Global reduction of local virial and energy -+ -+ if ( commsize > 1 ) call gdsum(eng_loc,1,buff1) -+ if ( commsize > 1 ) call gdsum(vir_loc,1,buff1) -+ colvar(k) = eng_loc -+ k = k + 1 -+ end if -+ -+ if ( k-1/=ncolvar ) call Mfrz_Error(2500,0.d0) -+ -+ if ( hkey==1 ) then -+ k = int(dble(wl_nbins)*colvar(1)/wl_range) + 1 -+ if ( k < wl_nbins) wl_bin(k) = wl_bin(k) + 1.0d0 -+ end if -+ -+c-------------------------------------------------------- -+c Deposit a new Gaussian if now is the correct time -+c-------------------------------------------------------- -+ -+ if ( (mod(nstep,meta_step_int)==0).and.(nstep>nlastg) ) then -+ nlastg = nstep ! Avoid multiple depositions at the -+ ! same timestep (relaxed shell model) -+ -+ select case (hkey) -+ -+ case(0) -+ -+c Always deposit Gaussians of the same height -+ -+ height = ref_W_aug -+ -+ case(1) -+ -+c Wang-Landau style recursion -+ -+ open(unit=wlb,file='WL_BINS.DAT',status='replace') -+ -+ do ibin = 1,wl_nbins -+ write(wlb,*)ibin,wl_bin(ibin) -+ end do -+ -+ close(wlb) -+ -+ if ( ncolvar/=1 ) then -+ call Mfrz_Error(2501,0.d0) -+ else -+ -+ height = ref_W_aug*(0.5d0**dble(wl_cycle)) -+ -+ nfail = 0 -+ wl_mean = 0.d0 -+ do ibin = 6,wl_nbins-5 -+ wl_mean = wl_mean + wl_bin(ibin) -+ nfail = nfail + 1 -+ end do -+ wl_mean = wl_mean/dble(nfail) -+ -+ nfail = 0 -+ flat = .true. -+ do ibin = 6,wl_nbins-5 -+ if ( wl_bin(ibin) < 0.8d0*wl_mean ) then -+ if ( nfail > 2 ) flat = .false. -+ nfail = nfail + 1 -+ end if -+ end do -+ -+ if ( flat.and.(sum(wl_bin)>50.0d0) ) then -+ wl_cycle = wl_cycle + 1 -+ wl_bin = 0.0d0 -+ end if -+ -+ height = ref_W_aug*(0.5d0**dble(wl_cycle)) -+ -+ end if -+ -+ case(2) -+ -+c Well-tempered metadynamics -+ -+ meta_energy = 0.0d0 -+ call compute_bias_potential() -+ -+ height = ref_W_aug*exp(-meta_energy/wt_Dt) -+ -+ case default -+ -+ call Mfrz_Error(2502,0.d0) -+ -+ end select -+ -+ call deposit_gaussian(height,temp) -+ my_meta_step = (meta_step-1)/commsize + 1 -+ safe = ( maxhis >= my_meta_step ) -+ call gstate(safe) -+ if ( .not.safe ) call Mfrz_Error(2503,0.d0) -+ -+ end if -+ -+c----------------------------------------------------------- -+c Compute the bias potential and its derivatives w.r.t. -+c to the ncolvar collective variables. -+c----------------------------------------------------------- -+ -+ call compute_bias_potential() -+ -+c----------------------------------------------------------- -+c Add in the forces, stresses and virial contributions -+c from this derivative. -+c----------------------------------------------------------- -+ -+ virord = 0.0d0 ! Zero the virial -+ -+c Must compute contributions from pe order parameters -+c first before we change any forces. -+ -+ k = nq4+nq6+ntet+1 -+ -+c Energy order parameters -+ -+ if (lglobpe) then -+ -+ fxx(:) = fxx(:)*(1.0d0+dcolvar(k)) -+ fyy(:) = fyy(:)*(1.0d0+dcolvar(k)) -+ fzz(:) = fzz(:)*(1.0d0+dcolvar(k)) -+ -+c correct for later summation: -+ -+ virord = virord+dcolvar(k)*virtot/dble(commsize) -+ stress = stress*(1.0d0+dcolvar(k)) -+ -+ end if -+ if (llocpe) then -+ -+ fxx(:) = fxx(:) + fxx_loc(:)*dcolvar(k) -+ fyy(:) = fyy(:) + fyy_loc(:)*dcolvar(k) -+ fzz(:) = fzz(:) + fzz_loc(:)*dcolvar(k) -+ -+c correct for later summation: -+ -+ virord = virord + dcolvar(k)*vir_loc/dble(commsize) -+ stress = stress + stress_loc*dcolvar(k) -+ -+ end if -+ -+c Steinhardt order parameters -+ -+ if ( nq4>0.or.nq6>0 ) call -+ x compute_steinhardt_forces(imcon,natms,engord,virord) -+ -+c Tetrahedral order parameters -+ -+ if ( ntet > 0 ) call -+ x compute_tetrahedral_forces(imcon,natms,engord,virord) -+ -+c global reduction of virord -+ -+ if ( commsize > 1 ) call gdsum(virord,1,buff1) -+ -+ engord = meta_energy -+ -+c write(0,'("DEBUG : engord = ",F12.6)')engord/(temp*boltz) -+ -+ return -+ -+ end Subroutine Metafreeze_Driver -+ -+ Subroutine Deposit_Gaussian(height,temp) -+ -+c--------------------------------------------------------------------- -+c -+c Deposits a new Gaussian at the current collective variables and -+c appends to the METADYNAMICs file. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ use setup_module, only : boltz -+ -+ implicit none -+ -+ real(8),intent(in) :: height,temp -+ integer :: my_meta_step -+ character(11) :: fmtstring -+ -+c store current order parameters and Gaussian height -+ -+ if ( mod(meta_step-1,commsize) == myrank ) then -+ -+ my_meta_step = (meta_step-1)/commsize + 1 -+ w_aug(my_meta_step) = height -+ colvar_his(:,my_meta_step) = colvar(:) -+ -+ end if -+ -+ if (onroot) then -+ -+c Create format string -+ -+ write(fmtstring,'("(I8,",I1,"E15.6)")')ncolvar+1 -+ -+c write METADYNAMICS file -+ -+ open(unit=mtd,file='METADYNAMICS',status='old',position= -+ x 'append',iostat=ierr(1)) -+ write(unit=mtd,fmt=fmtstring)meta_step,colvar(:), -+ x height/(temp*boltz) -+ close(unit=mtd) -+ -+ end if -+ -+ meta_step = meta_step+1 -+ -+ return -+ -+ end Subroutine Deposit_Gaussian -+ -+ Subroutine Compute_Bias_Potential() -+ -+c--------------------------------------------------------------------- -+c -+c Computes the augmenting bias potential as a function of the -+c collective variables. Also computes the derivative of the bias -+c potential w.r.t. the collective variables required to compute -+c the metadynamics forces. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ implicit none -+ -+ integer :: istep,ic,k,my_meta_step -+ real(8) :: vsq,exp1,dWpsq -+ real(8),allocatable,dimension(:) :: buff1,buff2 -+ -+ allocate(buff1(1:2*(ncolvar+1)),stat=ierr(1)) -+ allocate(buff2(1:2*(ncolvar+1)),stat=ierr(2)) -+ -+ if (any(ierr/=0)) call Mfrz_Error(2504,0.d0) -+ -+c Set squared-width of gaussians -+ -+ dWpsq = 1.0d0/h_aug**2 -+ meta_energy = 0.0d0 -+ -+c Zero accumulators of derivative w.r.t. each order parameter -+ -+ dcolvar(:) = 0.0d0 -+ my_meta_step = (meta_step-1)/commsize + 1 -+ do istep=1,my_meta_step -+ -+ vsq = 0.0d0 -+ do ic = 1,ncolvar -+ vsq = vsq + ( colvar_scale(ic)*(colvar(ic) - -+ x colvar_his(ic,istep)) )**2 -+ end do -+ exp1 = w_aug(istep)*exp(-0.5d0*vsq*dWpsq) -+ do ic = 1,ncolvar -+ dcolvar(ic) = dcolvar(ic) - (colvar_scale(ic)**2)*exp1* -+ x (colvar(ic) - colvar_his(ic,istep))*dWpsq -+ end do -+ -+ meta_energy = meta_energy + exp1 -+ -+ end do -+ -+ buff1(1) = meta_energy -+ k = 2 -+ do ic = 1,ncolvar -+ buff1(k) = dcolvar(ic) -+ k = k + 1 -+ end do -+ -+ if ( commsize > 1 ) then -+ call gdsum(buff1,ncolvar+1,buff2) -+ end if -+ -+ meta_energy = buff1(1) -+ -+ k = 2 -+ do ic=1,ncolvar -+ dcolvar(ic) = buff1(k) -+ k = k + 1 -+ end do -+ -+c write(0,'("DEBUG : CV derivs = ",6F15.6)')dcolvar -+ -+ deallocate(buff1,buff2,stat=ierr(1)) -+ -+ return -+ -+ end Subroutine Compute_Bias_Potential -+ -+ Subroutine Define_Metadynamics(tm,ts,natms,ntpatm,temp) -+ -+c--------------------------------------------------------------------- -+c Processes the metadynamics input file. This is done in several -+c stages. -+c 1. Process the metadynamics control data read from the CONTROL -+c file, which defines the number of collective variables and -+c indicates if we need to read from auxilliary input files -+c (e.g. STEINHARDT or ZETA) which define order parameters. -+c 2. Read and process these auxilliary files. -+c 3. Process the information obtained from the CONTROL file which -+c controls the properties of the Gaussians used to build the -+c bias potential. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c Adapted w. smith - jan 2011 -+c -+c--------------------------------------------------------------------- -+ -+ use site_module -+ use config_module, only : ltype -+ use parse_module -+ -+ implicit none -+ -+ integer,intent(in) :: tm,ts,natms,ntpatm -+ real(8),intent(in) :: temp -+ -+c Local variables -+ -+ integer :: isite,jsite,ilin,i,iq,iatm0,iatm1,istrd,iatm,k,n,idum -+ logical :: lexist,go,safe -+ real(8) :: waug,dummy(1) -+ -+c Allocate the driven list. Modifications elsewhere in DLPOLY always -+c check if sites are driven (for accumulation of local PE) and hence -+c this should be allocated if this is a metadynamics run or not. -+ -+ allocate(driven(1:size(unqatm)),stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2505,0.d0) -+ driven = .false. -+ -+c Do nothing else if the metafreeze flag has not been set in CONTROL -+ -+ if (.not.lmetadyn) then -+ return -+ end if -+ -+ myrank=tm -+ commsize = ts -+ onroot = (myrank==0) -+ -+ -+c$$$ DEBUG -+cc$$$ if (onroot) write(0,'("================================")') -+cc$$$ if (onroot) write(0,'("Available sites from site module")') -+cc$$$ if (onroot) write(0,'("================================")') -+cc$$$ if (onroot) then -+cc$$$ do isite = 1,size(unqatm) -+cc$$$ write(0,'("Site index ",i4,": ",a8)')isite,unqatm(isite) -+cc$$$ end do -+cc$$$ end if -+ -+c Cannot bias the global and local PE in the same run. -+ -+ if ( lglobpe.and.llocpe ) call Mfrz_Error(2509,0.d0) -+ -+c Allocate local force arrays if anything is driven. -+ -+ allocate(fxx_loc(1:mxatms),stat=ierr(1)) -+ allocate(fyy_loc(1:mxatms),stat=ierr(2)) -+ allocate(fzz_loc(1:mxatms),stat=ierr(3)) -+ if (any(ierr/=0)) call Mfrz_Error(2510,0.d0) -+ -+c Allocate arrays to hold collective variables -+ -+ allocate( colvar(1:ncolvar),stat=ierr(1)) -+ allocate(dcolvar(1:ncolvar),stat=ierr(2)) -+ allocate(colvar_his(1:ncolvar,1:maxhis),stat=ierr(3)) -+ allocate(colvar_scale(1:ncolvar),stat=ierr(4)) -+ allocate(w_aug(1:maxhis),stat=ierr(5)) -+ if (any(ierr/=0)) call Mfrz_Error(2511,0.d0) -+ -+c Allocate Wang-Landau bin array -+ -+ allocate(wl_bin(1:wl_nbins),stat=ierr(1)) -+ if (any(ierr/=0)) call Mfrz_Error(2512,0.d0) -+ wl_bin = 0.0d0 -+ -+c------------------------------------------------------------- -+c Process Steinhardt order parameter settings if present -+c------------------------------------------------------------- -+ -+ if ( lstein ) then -+ -+ allocate(q4label(1:2,1:nq4),stat=ierr(1)) -+ allocate(q6label(1:2,1:nq6),stat=ierr(2)) -+ allocate(q4cutoff(1:2,1:nq4),stat=ierr(3)) -+ allocate(q6cutoff(1:2,1:nq6),stat=ierr(4)) -+ allocate(q4scale(1:nq4),stat=ierr(5)) -+ allocate(q6scale(1:nq6),stat=ierr(6)) -+ allocate(q4nn(1:nq4),stat=ierr(7)) -+ allocate(q6nn(1:nq6),stat=ierr(8)) -+ allocate(q4ninc(1:nq4),stat=ierr(9)) -+ allocate(q6ninc(1:nq6),stat=ierr(10)) -+ allocate(buff(1:max(nq4,nq6)),stat=ierr(11)) -+ allocate(q4_global(1:nq4),stat=ierr(12)) -+ allocate(q6_global(1:nq6),stat=ierr(13)) -+ allocate(ReQ4Bar(-4:+4,1:nq4),stat=ierr(14)) -+ allocate(ImQ4Bar(-4:+4,1:nq4),stat=ierr(15)) -+ allocate(ReQ6Bar(-6:+6,1:nq6),stat=ierr(16)) -+ allocate(ImQ6Bar(-6:+6,1:nq6),stat=ierr(17)) -+ if (any(ierr/=0)) call Mfrz_Error(2515,0.d0) -+ -+c Open STEINHARDT file and process -+ -+ if (onroot) then -+ open(unit=stn,file='STEINHARDT',status='old',iostat=ierr(1)) -+ else -+ ierr(1)=0 -+ endif -+ call gisum(ierr(1),1,ierr(2)) -+ if ( ierr(1)/=0 ) call Mfrz_Error(2516,0.d0) -+ -+ ilin = 1 -+ safe=.true. -+ if (nq4>0) then -+ call getrec(safe,myrank,stn) ! Ignore q4 comment line -+ ilin = ilin + 1 -+ do i = 1,nq4 -+ call getrec(safe,myrank,stn) -+ if (safe) then -+ call getword(q4label(1,i),record,8,lenrec) -+ call getword(q4label(2,i),record,8,lenrec) -+ q4cutoff(1,i)=dblstr(record,lenrec,idum) -+ q4cutoff(2,i)=dblstr(record,lenrec,idum) -+ q4scale(i)=dblstr(record,lenrec,idum) -+ q4nn(i)=intstr(record,lenrec,idum) -+ ierr(ilin)=0 -+ else -+ ierr(ilin)=1 -+ endif -+ ilin = ilin + 1 -+ end do -+ end if -+ if (nq6>0) then -+ call getrec(safe,myrank,stn) ! Ignore q6 comment line -+ ilin = ilin + 1 -+ do i = 1,nq6 -+ call getrec(safe,myrank,stn) -+ if (safe) then -+ call getword(q6label(1,i),record,8,lenrec) -+ call getword(q6label(2,i),record,8,lenrec) -+ q6cutoff(1,i)=dblstr(record,lenrec,idum) -+ q6cutoff(2,i)=dblstr(record,lenrec,idum) -+ q6scale(i)=dblstr(record,lenrec,idum) -+ q6nn(i)=intstr(record,lenrec,idum) -+ ierr(ilin)=0 -+ else -+ ierr(ilin)=1 -+ endif -+ ilin = ilin + 1 -+ end do -+ end if -+ if (onroot) close(unit=stn) -+ -+ call gisum(ierr(1),ilin-1,ierr(ilin)) -+ do i = 1,ilin-1 -+ if (ierr(i)/=0) then -+ call Mfrz_Error(2521,dble(i)) -+ end if -+ end do -+ -+c Create array indicating which site-site connections use -+c which set of q4 cut-offs, scaling factors and num neighbours. -+ -+ allocate(q4site(1:size(unqatm),1:size(unqatm)),stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2517,0.d0) -+ q4site(:,:) = 0 -+ -+ do isite = 1,ntpatm -+ do jsite = isite,ntpatm -+ do iq = 1,nq4 -+ if ((q4label(1,iq)==unqatm(isite)).and. -+ x (q4label(2,iq)==unqatm(jsite))) then -+ q4site(jsite,isite) = iq -+ q4site(isite,jsite) = iq -+ driven(jsite) = .true. -+ driven(isite) = .true. -+ end if -+ end do -+ end do -+ end do -+ -+ allocate(q6site(1:size(unqatm),1:size(unqatm)),stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2518,0.d0) -+ q6site(:,:) = 0 -+ do isite = 1,ntpatm -+ do jsite = isite,ntpatm -+ do iq = 1,nq6 -+ if ((q6label(1,iq)==unqatm(isite)).and. -+ x q6label(2,iq)==unqatm(jsite)) then -+ q6site(jsite,isite) = iq -+ q6site(isite,jsite) = iq -+ driven(jsite) = .true. -+ driven(isite) = .true. -+ end if -+ end do -+ end do -+ end do -+ -+c Count number of included sites -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ q4ninc = 0 -+ q6ninc = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ isite = ltype(iatm) -+ -+ do iq = 1,nq4 -+ if (unqatm(isite)==q4label(1,iq)) q4ninc(iq) = q4ninc(iq) + 1 -+ end do -+ do iq = 1,nq6 -+ if (unqatm(isite)==q6label(1,iq)) q6ninc(iq) = q6ninc(iq) + 1 -+ end do -+ -+ end do -+ -+ if ( commsize > 0 ) then -+ if (nq4>0) call gisum(q4ninc,nq4,buff(1:nq4)) -+ if (nq6>0) call gisum(q6ninc,nq6,buff(1:nq6)) -+ end if -+ -+ deallocate(buff,stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2519,0.d0) -+ -+ end if ! end if steinhardt order parameters -+ -+ if ( ltet ) then -+ -+ allocate(zetacutoff(1:2,1:ntet),stat=ierr(1)) -+ allocate(zeta_global(1:ntet),stat=ierr(2)) -+ allocate(zetascale(1:ntet),stat=ierr(3)) -+ allocate(zetalabel(1:ntet),stat=ierr(4)) -+ allocate(zetann(1:ntet),stat=ierr(5)) -+ allocate(zetaninc(1:ntet),stat=ierr(6)) -+ allocate(buff(1:ntet),stat=ierr(7)) -+ if (any(ierr/=0)) call Mfrz_Error(2522,0.d0) -+ -+c Open ZETA file and process -+ -+ if (onroot) then -+ open(unit=zta,file='ZETA',status='old',iostat=ierr(1)) -+ else -+ ierr(1)=0 -+ endif -+ call gisum(ierr(1),1,ierr(2)) -+ if ( ierr(1)/=0 ) call Mfrz_Error(2523,0.d0) -+ -+ ilin = 1 -+ safe=.true. -+ if (ntet>0) then -+ call getrec(safe,myrank,zta) ! Ignore comment line -+ ilin = ilin + 1 -+ do i = 1,ntet -+ call getrec(safe,myrank,zta) -+ if (safe) then -+ call getword(zetalabel(i),record,8,lenrec) -+ zetacutoff(1,i)=dblstr(record,lenrec,idum) -+ zetacutoff(2,i)=dblstr(record,lenrec,idum) -+ zetascale(i)=dblstr(record,lenrec,idum) -+ zetann(i)=intstr(record,lenrec,idum) -+ ierr(ilin)=0 -+ else -+ ierr(ilin)=1 -+ endif -+ ilin = ilin + 1 -+ end do -+ end if -+ if (onroot) close(unit=zta) -+ -+ call gisum(ierr(1),ilin-1,ierr(ilin)) -+ do i = 1,ilin-1 -+ if (ierr(i)/=0) then -+ call Mfrz_Error(2529,dble(i)) -+ end if -+ end do -+ -+c Create array indicating which site-site connections use -+c which set of q4 cut-offs, scaling factors and num neighbours. -+ -+ allocate(zetasite(1:size(unqatm)),stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2524,0.d0) -+ zetasite(:) = 0 -+ -+ do isite = 1,size(unqatm) -+ do iq = 1,ntet -+ if (zetalabel(iq)==unqatm(isite)) then -+ zetasite(isite) = iq -+ driven(isite) = .true. -+ end if -+ end do -+ end do -+ -+c Count number of included sites -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ zetaninc(:) = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ isite = ltype(iatm) -+ -+ do iq = 1,ntet -+ if (unqatm(isite)==zetalabel(iq)) -+ x zetaninc(iq) = zetaninc(iq) + 1 -+ end do -+ end do -+ -+ if (commsize>1) then -+ if (ntet>0) call gisum(zetaninc,ntet,buff) -+ end if -+ -+c$$$ do iq = 1,ntet -+c$$$ write(0,'("Number of sites for zeta type ",I5," : ",I5)') -+c$$$ x iq,zetaninc(iq) -+c$$$ end do -+ -+ mxninc = max(100,4*maxval(zetaninc)/commsize) -+ allocate(nflist(1:mxninc),stat=ierr(1)) -+ allocate(flist(1:mxflist,1:mxninc),stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2525,0.d0) -+ -+ deallocate(buff,stat=ierr(1)) -+ if (ierr(1)/=0) call Mfrz_Error(2519,0.d0) -+ -+ end if ! end if tetrahedral order parameters -+ -+c Check total number of collective variables (ncolvar) matches total -+c number specified by nq4, nq6, ntet and potential energy flags. -+ -+ k = 0 -+ if (llocpe ) k = k + 1 -+ if (lglobpe ) k = k + 1 -+ k = k + ntet + nq4 + nq6 -+ if ( k /= ncolvar ) call Mfrz_Error(2527,0.d0) -+ -+c populate colvar_scale -+ -+ k = 1 -+ do iq = 1,nq4 -+ colvar_scale(k) = q4scale(iq) -+ k = k + 1 -+ end do -+ do iq = 1,nq6 -+ colvar_scale(k) = q6scale(iq) -+ k = k + 1 -+ end do -+ do iq = 1,ntet -+ colvar_scale(k) = zetascale(iq) -+ k = k + 1 -+ end do -+ if (lglobpe) then -+ colvar_scale(k) = globpe_scale -+ k = k + 1 -+ end if -+ if (llocpe) then -+ colvar_scale(k) = locpe_scale -+ k = k + 1 -+ end if -+ -+c write(0,*)lglobpe,llocpe -+c write(0,'("DEBUG : CV Scaling factors : ",6F15.6)')colvar_scale(:) -+ -+ -+c Convert into internal units -+ -+ wt_Dt = wt_Dt*temp*boltz -+ ref_W_aug = ref_W_aug*temp*boltz -+ kt = temp*boltz -+ -+c--------------------------------------------------------------------- -+c Purge the METADYNAMICS file or re-open and read if this is a -+c restart. N.B. we assume a restart if REVOLD if present and -+c ignore keyres. -+c--------------------------------------------------------------------- -+ -+ if (onroot) then -+ inquire(file='REVOLD',exist=lexist) -+ else -+ lexist=.true. -+ endif -+ call gstate(lexist) -+ -+ if (lexist) then -+ -+c read contents of METADYNAMICS file -+ -+ if (onroot) then -+ -+ open(unit=mtd,file='METADYNAMICS',status='old',iostat=ierr(1)) -+ -+ k = 0 -+ do -+ read(unit=mtd,fmt=*,end=10)meta_step,colvar(:),waug -+ waug = waug*temp*boltz -+ if (k == 0) then -+ n = (meta_step-1)/commsize + 1 -+ colvar_his(:,n)=colvar(:) -+ w_aug(n)=waug -+ else -+ dummy(1)=dble(meta_step) -+ call csend(17947,dummy,1,k,idum) -+ call csend(17948,colvar,ncolvar,k,ierr(3)) -+ dummy(1)=waug -+ call csend(17949,dummy,1,k,ierr(4)) -+ end if -+ -+ k = k + 1 -+ if (k == commsize) k = 0 -+ end do -+ -+ 10 close(unit=mtd) -+ -+ do k=1,commsize-1 -+ dummy(1)=-dble(meta_step) -+ call csend(17947,dummy,1,k,ierr(2)) -+ end do -+ -+ else -+ -+ go = .true. -+ do while(go) -+ -+ call crecv(17947,dummy,1) -+ meta_step=nint(dummy(1)) -+ ierr(2)=0 -+ -+ if ( meta_step < 0 ) then -+ meta_step = -meta_step -+ go = .false. -+ else -+ call crecv(17948,colvar,ncolvar) -+ ierr(3)=0 -+ call crecv(17949,dummy,1) -+ waug=dummy(1) -+ ierr(4)=0 -+ n = (meta_step-1)/commsize + 1 -+ colvar_his(:,n)=colvar(:) -+ w_aug(n)=waug -+ end if -+ -+ enddo -+ -+ end if -+ call gisum(ierr(1),4,ierr(5)) -+ do i=1,4 -+ if (ierr(i)/=0) call Mfrz_Error(2531,0.d0) -+ enddo -+ meta_step = meta_step + 1 -+ -+ else -+ -+c purge any existing METADYNAMICS file -+ -+ if (onroot) then -+ -+ open(unit=mtd,file='METADYNAMICS',status='replace', -+ x iostat=ierr(1)) -+ close(unit=mtd) -+ -+ end if -+ -+ end if -+ -+ return -+ -+ end Subroutine Define_Metadynamics -+ -+ Function Fc(r,inner_cut,outer_cut) -+ -+c--------------------------------------------------------------------- -+c -+c Computes the smooth cut-off function used when computing an order -+c parameter as a function of pair separation. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ implicit none -+ -+ real(8),parameter :: Pi=3.141592653589793238462643383279502884d0 -+ real(8),intent(in) :: r,inner_cut,outer_cut -+ real(8) :: fc -+ -+ if ( r > outer_cut ) then -+ fc = 0.0d0 -+ elseif ( r > inner_cut ) then -+ fc = 0.5d0*cos((r-inner_cut)*Pi/(outer_cut-inner_cut))+0.5d0 -+ elseif ( r <= inner_cut ) then -+ fc = 1.0d0 -+ else -+ call Mfrz_Error(2532,r) -+ end if -+ -+ return -+ -+ end Function Fc -+ -+ Function Dfc(r,inner_cut,outer_cut) -+ -+c--------------------------------------------------------------------- -+c Computes the derivative of the smooth cut-off function used when -+c computing an order parameter as a function of pair separation. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley -+c -+c--------------------------------------------------------------------- -+ -+ implicit none -+ -+ real(8),parameter :: Pi=3.141592653589793238462643383279502884d0 -+ real(8),intent(in) :: r,inner_cut,outer_cut -+ real(8) :: dfc -+ -+ if ( r > outer_cut ) then -+ dfc = 0.0d0 -+ elseif ( r > inner_cut ) then -+ dfc = -0.5d0*sin((r-inner_cut)*Pi/(outer_cut-inner_cut)) -+ x *Pi/(outer_cut-inner_cut) -+ else -+ dfc = 0.0d0 -+ end if -+ -+ return -+ -+ end Function Dfc -+ -+ subroutine compute_steinhardt(imcon,natms) -+ -+c--------------------------------------------------------------------- -+c -+c Computes nq4 Q4 and nq6 Q6 global order parameters. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use setup_module, only : mxlist -+ use utility_module, only : images -+ -+ implicit none -+ -+c Arguments -+ -+ integer,intent(in) :: imcon,natms -+ -+c sqrt(pi/13) , sqrt(pi/9) , 1/3 -+ -+ real(8),parameter :: rpibtt = 0.491590249d0 -+ real(8),parameter :: rpibn = 0.590817950d0 -+ real(8),parameter :: third = 1.0d0/3.0d0 -+ -+c Prefactors for spherical harmonics with l = 6 -+ -+ real(8),parameter :: ypre6m6 = 0.48308411358006625446748d0 -+ real(8),parameter :: ypre6m5 = 1.67345245810009801701312d0 -+ real(8),parameter :: ypre6m4 = 0.35678126285399802686271d0 -+ real(8),parameter :: ypre6m3 = 0.65139048586771575166665d0 -+ real(8),parameter :: ypre6m2 = 0.32569524293385787583333d0 -+ real(8),parameter :: ypre6m1 = 0.41197551630114082055201d0 -+ real(8),parameter :: ypre6m0 = 0.06356920226762842462964d0 -+ real(8),parameter :: ypre6p1 = -0.41197551630114082055201d0 -+ real(8),parameter :: ypre6p2 = 0.32569524293385787583333d0 -+ real(8),parameter :: ypre6p3 = -0.65139048586771575166665d0 -+ real(8),parameter :: ypre6p4 = 0.35678126285399802686271d0 -+ real(8),parameter :: ypre6p5 = -1.67345245810009801701312d0 -+ real(8),parameter :: ypre6p6 = 0.48308411358006625446748d0 -+ -+c Prefactors for spherical harmonics with l = 4 -+ -+ real(8),parameter :: ypre4m4 = 0.44253269244498261159038d0 -+ real(8),parameter :: ypre4m3 = 1.25167147089835228968013d0 -+ real(8),parameter :: ypre4m2 = 0.33452327177864460416856d0 -+ real(8),parameter :: ypre4m1 = 0.47308734787878004013351d0 -+ real(8),parameter :: ypre4m0 = 0.10578554691520430930396d0 -+ real(8),parameter :: ypre4p1 = -0.47308734787878004013351d0 -+ real(8),parameter :: ypre4p2 = 0.33452327177864460416856d0 -+ real(8),parameter :: ypre4p3 = -1.25167147089835228968013d0 -+ real(8),parameter :: ypre4p4 = 0.44253269244498261159038d0 -+ -+c Maximum no. of entries in solvation list -+ -+ integer :: maxneigh -+ -+c Solvation shell information - Q4 -+ -+ real(8),allocatable,dimension(:) :: solvx4,solvy4,solvz4 -+ real(8),allocatable,dimension(:) :: solvrmag4,solvimag4,solvrsq4 -+ integer,allocatable,dimension(:) :: solvlist4,solvtype4 -+ integer :: isolvmax4 -+ -+c Solvation shell information - Q6 -+ -+ real(8),allocatable,dimension(:) :: solvx6,solvy6,solvz6 -+ real(8),allocatable,dimension(:) :: solvrmag6,solvimag6,solvrsq6 -+ integer,allocatable,dimension(:) :: solvlist6,solvtype6 -+ integer :: isolvmax6 -+ -+c separation vectors and powers thereof -+ -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ real(8) :: x,y,z -+ real(8) :: x2,y2,z2,x3,y3,z3 -+ real(8) :: x4,y4,z4,x5,y5,z5 -+ real(8) :: x6,y6,z6 -+ real(8) :: invrc,invrs -+ -+c list of separation vectors -+ integer :: numdst -+ integer,allocatable,dimension(:) :: dstlst -+ -+ -+c Comms buffers -+ -+ real(8),allocatable,dimension(:) :: buff1,buff2 -+ -+c Temporaries -+ -+ real(8) :: tmpsq,f_ij,df_ij,ReYlm,ImYlm,tmpvar -+ -+c Loop counters -+ -+ integer :: iatm1,iatm0,iatm,isite,istrd,ii,isolv4,isolv6,isolv -+ integer :: idi,idj,limit,nn,k,jatm,jsite,q4type,q6type -+ integer :: itype,jtype,l,m,iq -+ -+ maxneigh = 100 ! Max number of atoms in coordination shell -+ -+ ierr = 0 ! Error flags -+ -+ -+c DQ - modified 10/12/11, arrays now big enough -+c to hold maximum number of neighbours plus -+c maximum number of excluded atoms. -+ allocate(xdf(1:mxlist+mxexcl),stat=ierr(1)) -+ allocate(ydf(1:mxlist+mxexcl),stat=ierr(2)) -+ allocate(zdf(1:mxlist+mxexcl),stat=ierr(3)) -+ -+c DQ - modified 10/12/11, array to hold a list of -+c all atom entries in the above three arrays -+ allocate(dstlst(1:mxlist+mxexcl),stat=ierr(4)) -+ -+ allocate(solvx4(1:maxneigh),stat=ierr(5)) -+ allocate(solvy4(1:maxneigh),stat=ierr(6)) -+ allocate(solvz4(1:maxneigh),stat=ierr(7)) -+ allocate(solvrmag4(1:maxneigh),stat=ierr(8)) -+ allocate(solvimag4(1:maxneigh),stat=ierr(9)) -+ allocate(solvrsq4 (1:maxneigh),stat=ierr(10)) -+ allocate(solvlist4(1:maxneigh),stat=ierr(11)) -+ allocate(solvtype4(1:maxneigh),stat=ierr(12)) -+ -+ allocate(solvx6(1:maxneigh),stat=ierr(13)) -+ allocate(solvy6(1:maxneigh),stat=ierr(14)) -+ allocate(solvz6(1:maxneigh),stat=ierr(15)) -+ allocate(solvrmag6(1:maxneigh),stat=ierr(16)) -+ allocate(solvimag6(1:maxneigh),stat=ierr(17)) -+ allocate(solvrsq6 (1:maxneigh),stat=ierr(18)) -+ allocate(solvlist6(1:maxneigh),stat=ierr(19)) -+ allocate(solvtype6(1:maxneigh),stat=ierr(20)) -+ if (any(ierr/=0)) call Mfrz_Error(2533,0.d0) -+ -+ allocate(buff1(1:18*nq4+26*nq6),stat=ierr(1)) -+ allocate(buff2(1:18*nq4+26*nq6),stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2534,0.d0) -+ -+c Zero accumulators used in Steinhardt order parameters -+ -+ ReQ6bar = 0.0d0 -+ ImQ6bar = 0.0d0 -+ ReQ4bar = 0.0d0 -+ ImQ4bar = 0.0d0 -+ -+c Set atoms looped over by current rank -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+c -------------------------------------------------------------- -+c Build a list of the required connections to iatm. This -+c differs depending on the version of DLPOLY we are using. -+c First we loop over atoms in the neighbour list of iatm. -+c--------------------------------------------------------------- -+ -+ ii = ii + 1 -+ isite=ltype(iatm) -+ limit=lentry(ii) -+ nn = 0 -+ do k = 1,limit -+ -+ jatm = list(ii,k) -+ jsite = ltype(jatm) -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ dstlst(nn) = jatm -+ -+ xdf(nn)=xxx(jatm)-xxx(iatm) -+ ydf(nn)=yyy(jatm)-yyy(iatm) -+ zdf(nn)=zzz(jatm)-zzz(iatm) -+ -+ end do -+ -+c -------------------------------------------------------------- -+c Next we loop over the excluded atom list of iatm and add -+c and pairs needed for computation of the current OP. -+c--------------------------------------------------------------- -+ -+ccc DEBUG -+ccc write(0,'("atom ",I5," has ",I5," excluded interactions")') -+ccc x iatm,mtd_nexatm(iatm) -+ -+ do k = 1,mtd_nexatm(ii) -+ -+ jatm = mtd_lexatm(ii,k) -+ jsite = ltype(jatm) -+ -+ccc DEBUG -+ccc write(0,'("Interaction with atom ",I5," is excluded. ")')jatm -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ dstlst(nn) = jatm -+ -+ xdf(nn)=xxx(jatm)-xxx(iatm) -+ ydf(nn)=yyy(jatm)-yyy(iatm) -+ zdf(nn)=zzz(jatm)-zzz(iatm) -+ -+ end do -+ -+ccc DEBUG -+ccc write(0,'("Num neighbours to consider for atom ",I5," : ",I5)') -+ccc x iatm,nn -+ -+ numdst = nn -+ -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ nn = 0 -+ isolvmax4 = 0 -+ isolvmax6 = 0 -+ isolv4 = 0 -+ isolv6 = 0 -+ -+ do k = 1,numdst -+ jatm = dstlst(k) -+ jsite = ltype(jatm) -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ q4type = q4site(jsite,isite) -+ q6type = q6site(jsite,isite) -+ -+ tmpsq = xdf(nn)*xdf(nn)+ydf(nn)*ydf(nn)+zdf(nn)*zdf(nn) -+ -+ if (nq4>0) then -+ -+c Add to solvation lists if within cut-off -+ -+ if ( tmpsq < q4cutoff(2,q4type)**2 ) then -+ isolv4 = isolv4 + 1 -+ solvlist4(isolv4) = jatm -+ solvrsq4(isolv4) = tmpsq -+ solvrmag4(isolv4) = sqrt(tmpsq) -+ solvimag4(isolv4) = 1.0d0/solvrmag4(isolv4) -+ solvx4(isolv4) = xdf(nn) -+ solvy4(isolv4) = ydf(nn) -+ solvz4(isolv4) = zdf(nn) -+ solvtype4(isolv4) = q4type -+ end if -+ end if -+ -+ if (nq6>0) then -+ -+c Add to solvation lists if within cut-off -+ -+ if ( tmpsq < q6cutoff(2,q6type)**2 ) then -+ isolv6 = isolv6 + 1 -+ solvlist6(isolv6) = jatm -+ solvrsq6(isolv6) = tmpsq -+ solvrmag6(isolv6) = sqrt(tmpsq) -+ solvimag6(isolv6) = 1.0d0/solvrmag6(isolv6) -+ solvx6(isolv6) = xdf(nn) -+ solvy6(isolv6) = ydf(nn) -+ solvz6(isolv6) = zdf(nn) -+ solvtype6(isolv6) = q6type -+ end if -+ end if -+ isolvmax4 = isolv4 -+ isolvmax6 = isolv6 -+ if ((isolv4>maxneigh) .or. (isolv6>maxneigh)) -+ x call Mfrz_Error(2535,0.d0) -+ -+ end do ! end loop over k -+ -+ccc write(0,'("Num in range for OPs on atom ",I5," : ",I5)') -+ccc x iatm,isolvmax4 -+ -+ -+c--------------------------------------------------------- -+c Compute Q4 Steinhardt order parameters -+c--------------------------------------------------------- -+ -+ if ( (nq4>0).and.isolvmax4>0 ) then -+ -+ do isolv4 = 1,isolvmax4 -+ -+ jatm = solvlist4(isolv4) -+ itype = solvtype4(isolv4) -+ -+ invrc = solvimag4(isolv4)**6 -+ invrs = solvimag4(isolv4)**4 -+ -+ x = solvx4(isolv4) -+ y = solvy4(isolv4) -+ z = solvz4(isolv4) -+ -+ f_ij = fc(solvrmag4(isolv4),q4cutoff(1,itype), -+ x q4cutoff(2,itype)) -+ -+ x2 = x*x -+ y2 = y*y -+ z2 = z*z -+ -+ x3 = x2*x -+ y3 = y2*y -+ z3 = z2*z -+ -+ x4 = x2*x2 -+ y4 = y2*y2 -+ z4 = z2*z2 -+ -+ x5 = x4*x -+ y5 = y4*y -+ z5 = z4*z -+ -+ x6 = x4*x2 -+ y6 = y4*y2 -+ z6 = z4*z2 -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(-4/+4) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre4m4*invrs*(x4-6.d0*x2*y2+y4) -+ ImYlm = ypre4m4*invrs*(-4.d0*x3*y+4.d0*x*y3) -+ -+ ReQ4bar(-4,itype) = ReQ4bar(-4,itype) + f_ij*ReYlm -+ ImQ4bar(-4,itype) = ImQ4bar(-4,itype) + f_ij*ImYlm -+ -+ ReQ4bar(+4,itype) = ReQ4bar(+4,itype) + f_ij*ReYlm -+ ImQ4bar(+4,itype) = ImQ4bar(+4,itype) - f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(-3/+3) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre4m3*invrs*z*(x3-3.d0*x*y2) -+ ImYlm = ypre4m3*invrs*z*(-3.d0*x2*y+y3) -+ -+ ReQ4bar(-3,itype) = ReQ4bar(-3,itype) + f_ij*ReYlm -+ ImQ4bar(-3,itype) = ImQ4bar(-3,itype) + f_ij*ImYlm -+ -+ ReQ4bar(+3,itype) = ReQ4bar(+3,itype) - f_ij*ReYlm -+ ImQ4bar(+3,itype) = ImQ4bar(+3,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(-2/+2) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre4m2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) -+ ImYlm = ypre4m2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y -+ -+ ReQ4bar(-2,itype) = ReQ4bar(-2,itype) + f_ij*ReYlm -+ ImQ4bar(-2,itype) = ImQ4bar(-2,itype) + f_ij*ImYlm -+ -+ ReQ4bar(+2,itype) = ReQ4bar(+2,itype) + f_ij*ReYlm -+ ImQ4bar(+2,itype) = ImQ4bar(+2,itype) - f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(-1/+1) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x -+ ImYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y -+ -+ ReQ4bar(-1,itype) = ReQ4bar(-1,itype) + f_ij*ReYlm -+ ImQ4bar(-1,itype) = ImQ4bar(-1,itype) + f_ij*ImYlm -+ -+ ReQ4bar(+1,itype) = ReQ4bar(+1,itype) - f_ij*ReYlm -+ ImQ4bar(+1,itype) = ImQ4bar(+1,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary contribution to Q4bar(0) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre4m0*invrs*(8.d0*z4-24.d0*z2*x2-24.d0*z2*y2+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+ ReQ4bar(0,itype) = ReQ4bar(0,itype) + f_ij*ReYlm -+ -+ end do ! end loop over connection list for iatm -+ -+ end if ! end if computing Q4 -+ -+c------------------------------------------------ -+c Compute Q6 Steinhardt order parameters -+c------------------------------------------------ -+ -+ if ( (nq6>0).and.isolvmax6>0 ) then -+ -+ do isolv6 = 1,isolvmax6 -+ -+ jatm = solvlist6(isolv6) -+ itype = solvtype6(isolv6) -+ -+ invrc = solvimag6(isolv6)**6 -+ invrs = solvimag6(isolv6)**4 -+ -+ x = solvx6(isolv6) -+ y = solvy6(isolv6) -+ z = solvz6(isolv6) -+ -+ f_ij = fc(solvrmag6(isolv6),q6cutoff(1,itype), -+ x q6cutoff(2,itype)) -+ -+ x2 = x*x -+ y2 = y*y -+ z2 = z*z -+ -+ x3 = x2*x -+ y3 = y2*y -+ z3 = z2*z -+ -+ x4 = x2*x2 -+ y4 = y2*y2 -+ z4 = z2*z2 -+ -+ x5 = x4*x -+ y5 = y4*y -+ z5 = z4*z -+ -+ x6 = x4*x2 -+ y6 = y4*y2 -+ z6 = z4*z2 -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-6/+6) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m6*invrc*(x6-15.0d0*x4*y2+15.0d0*x2*y4-y6) -+ ImYlm = ypre6m6*invrc*(-6.0d0*x5*y+20.0d0*x3*y3-6.0d0*x*y5) -+ -+ ReQ6bar(-6,itype) = ReQ6bar(-6,itype) + f_ij*ReYlm -+ ImQ6bar(-6,itype) = ImQ6bar(-6,itype) + f_ij*ImYlm -+ -+ ReQ6bar(+6,itype) = ReQ6bar(+6,itype) + f_ij*ReYlm -+ ImQ6bar(+6,itype) = ImQ6bar(+6,itype) - f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-5/+5) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre6m5*invrc*z*(-x5+10.0d0*x3*y2-5.0d0*x*y4) -+ ImYlm = -ypre6m5*invrc*z*(5.0d0*x4*y-10.0d0*x2*y3+y5) -+ -+ ReQ6bar(-5,itype) = ReQ6bar(-5,itype) + f_ij*ReYlm -+ ImQ6bar(-5,itype) = ImQ6bar(-5,itype) + f_ij*ImYlm -+ -+ ReQ6bar(+5,itype) = ReQ6bar(+5,itype) - f_ij*ReYlm -+ ImQ6bar(+5,itype) = ImQ6bar(+5,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-4/+4) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(x4-6.0d0*x2*y2+y4) -+ ImYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(-4.0d0*x3*y+ -+ x 4.0d0*x*y3) -+ -+ ReQ6bar(-4,itype) = ReQ6bar(-4,itype) + f_ij*ReYlm -+ ImQ6bar(-4,itype) = ImQ6bar(-4,itype) + f_ij*ImYlm -+ -+ ReQ6bar(+4,itype) = ReQ6bar(+4,itype) + f_ij*ReYlm -+ ImQ6bar(+4,itype) = ImQ6bar(+4,itype) - f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-3/+3) -+c---------------------------------------------------------- -+ -+ ReYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* -+ x (-x3+3.0d0*x*y2) -+ ImYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* -+ x (3.0d0*x2*y-y3) -+ -+ ReQ6bar(-3,itype) = ReQ6bar(-3,itype) + f_ij*ReYlm -+ ImQ6bar(-3,itype) = ImQ6bar(-3,itype) + f_ij*ImYlm -+ -+ ReQ6bar(+3,itype) = ReQ6bar(+3,itype) - f_ij*ReYlm -+ ImQ6bar(+3,itype) = ImQ6bar(+3,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-2/+2) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m2*invrc*(16.0d0*z4-16.0d0*z2*x2-16.0d0*z2*y2+ -+ x x4+2.0d0*x2*y2+y4)*(x2-y2) -+ ImYlm = -ypre6m2*invrc*2.0d0*(16.0d0*z4-16.0d0*z2*x2-16.0d0* -+ x z2*y2+x4+2.0d0*x2*y2+y4)*x*y -+ -+ ReQ6bar(-2,itype) = ReQ6bar(-2,itype) + f_ij*ReYlm -+ ImQ6bar(-2,itype) = ImQ6bar(-2,itype) + f_ij*ImYlm -+ -+ ReQ6bar(+2,itype) = ReQ6bar(+2,itype) + f_ij*ReYlm -+ ImQ6bar(+2,itype) = ImQ6bar(+2,itype) - f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(-1/+1) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ -+ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x -+ ImYlm = -ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2+ -+ x 5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y -+ -+ ReQ6bar(-1,itype) = ReQ6bar(-1,itype) + f_ij*ReYlm -+ ImQ6bar(-1,itype) = ImQ6bar(-1,itype) + f_ij*ImYlm -+ -+ ReQ6bar(+1,itype) = ReQ6bar(+1,itype) - f_ij*ReYlm -+ ImQ6bar(+1,itype) = ImQ6bar(+1,itype) + f_ij*ImYlm -+ -+c---------------------------------------------------------- -+c Real and imaginary conribution to Q6bar(0) -+c---------------------------------------------------------- -+ -+ ReYlm = ypre6m0*invrc*(16.0d0*z6-120.0d0*z4*x2-120.0d0*z4* -+ x y2+90.0d0*z2*x4+180.0d0*z2*x2*y2+90.0d0*z2*y4-5.0d0 -+ x *x6-15.0d0*x4*y2-15.0d0*x2*y4-5.0d0*y6) -+ -+ ReQ6bar(0,itype) = ReQ6bar(0,itype) + f_ij*ReYlm -+ -+ end do ! end loop over connection list for iatm -+ -+ end if ! end if computing Q6 -+ -+ end do ! end loop over iatm -+ -+c----------------------------------------------- -+c Global summation of order parameters -+c----------------------------------------------- -+ -+ l = 1 -+ do itype = 1,nq4 -+ do m = -4,4 -+ buff1(l) = ReQ4bar(m,itype) -+ l = l + 1 -+ end do -+ do m = -4,4 -+ buff1(l) = ImQ4bar(m,itype) -+ l = l + 1 -+ end do -+ end do -+ do itype = 1,nq6 -+ do m = -6,6 -+ buff1(l) = ReQ6bar(m,itype) -+ l = l + 1 -+ end do -+ do m = -6,6 -+ buff1(l) = ImQ6bar(m,itype) -+ l = l + 1 -+ end do -+ end do -+ -+ if (commsize>1) call gdsum(buff1,18*nq4+26*nq6,buff2) -+ -+ l = 1 -+ do itype = 1,nq4 -+ do m = -4,4 -+ ReQ4bar(m,itype) = buff1(l) -+ l = l + 1 -+ end do -+ do m = -4,4 -+ ImQ4bar(m,itype) = buff1(l) -+ l = l + 1 -+ end do -+ end do -+ do itype = 1,nq6 -+ do m = -6,6 -+ ReQ6bar(m,itype) = buff1(l) -+ l = l + 1 -+ end do -+ do m = -6,6 -+ ImQ6bar(m,itype) = buff1(l) -+ l = l + 1 -+ end do -+ end do -+ -+c--------------------------------------------------- -+c Final computation of global order parameters -+c--------------------------------------------------- -+ -+ l = 1 -+ do iq = 1,nq4 -+ tmpvar = 0.0d0 -+ do m = 1,18 -+ tmpvar = tmpvar + buff1(l)**2 -+ l = l + 1 -+ end do -+ q4_global(iq) = 4.0d0*rpibn*sqrt(tmpvar)/ -+ x dble(q4ninc(iq)*q4nn(iq)) -+ end do -+ -+ do iq = 1,nq6 -+ tmpvar = 0.0d0 -+ do m = 1,26 -+ tmpvar = tmpvar + buff1(l)**2 -+ l = l + 1 -+ end do -+ q6_global(iq) = 4.0d0*rpibtt*sqrt(tmpvar)/ -+ x dble(q6ninc(iq)*q6nn(iq)) -+ end do -+ -+c Tidy up -+ -+ deallocate(xdf,stat=ierr(1)) -+ deallocate(ydf,stat=ierr(2)) -+ deallocate(zdf,stat=ierr(3)) -+ -+ deallocate(dstlst,stat=ierr(4)) -+ -+ deallocate(solvx4,stat=ierr(5)) -+ deallocate(solvy4,stat=ierr(6)) -+ deallocate(solvz4,stat=ierr(7)) -+ deallocate(solvrmag4,stat=ierr(8)) -+ deallocate(solvimag4,stat=ierr(9)) -+ deallocate(solvrsq4 ,stat=ierr(10)) -+ deallocate(solvlist4,stat=ierr(11)) -+ deallocate(solvtype4,stat=ierr(12)) -+ -+ deallocate(solvx6,stat=ierr(13)) -+ deallocate(solvy6,stat=ierr(14)) -+ deallocate(solvz6,stat=ierr(15)) -+ deallocate(solvrmag6,stat=ierr(16)) -+ deallocate(solvimag6,stat=ierr(17)) -+ deallocate(solvrsq6 ,stat=ierr(18)) -+ deallocate(solvlist6,stat=ierr(19)) -+ deallocate(solvtype6,stat=ierr(20)) -+ if (any(ierr/=0)) call Mfrz_Error(2536,0.d0) -+ -+ deallocate(buff1,stat=ierr(1)) -+ deallocate(buff2,stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2537,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Steinhardt -+ -+ Subroutine Compute_Steinhardt_Forces(imcon,natms,engord,virord) -+ -+c--------------------------------------------------------------------- -+c -+c Computes forces from nq4 Q4 and nq6 Q6 global order parameters. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use setup_module, only : mxlist -+ use utility_module, only : images -+ implicit none -+ -+c Arguments -+ -+ integer,intent(in) :: imcon,natms -+ -+ real(8),intent(inout) :: engord,virord -+ -+c sqrt(pi/13) , sqrt(pi/9) , 1/3 -+ -+ real(8),parameter :: rpibtt = 0.491590249d0 -+ real(8),parameter :: rpibn = 0.590817950d0 -+ real(8),parameter :: third = 1.0d0/3.0d0 -+ -+c Prefactors for spherical harmonics with l = 6 -+ -+ real(8),parameter :: ypre6m6 = 0.48308411358006625446748d0 -+ real(8),parameter :: ypre6m5 = 1.67345245810009801701312d0 -+ real(8),parameter :: ypre6m4 = 0.35678126285399802686271d0 -+ real(8),parameter :: ypre6m3 = 0.65139048586771575166665d0 -+ real(8),parameter :: ypre6m2 = 0.32569524293385787583333d0 -+ real(8),parameter :: ypre6m1 = 0.41197551630114082055201d0 -+ real(8),parameter :: ypre6m0 = 0.06356920226762842462964d0 -+ real(8),parameter :: ypre6p1 = -0.41197551630114082055201d0 -+ real(8),parameter :: ypre6p2 = 0.32569524293385787583333d0 -+ real(8),parameter :: ypre6p3 = -0.65139048586771575166665d0 -+ real(8),parameter :: ypre6p4 = 0.35678126285399802686271d0 -+ real(8),parameter :: ypre6p5 = -1.67345245810009801701312d0 -+ real(8),parameter :: ypre6p6 = 0.48308411358006625446748d0 -+ -+c Prefactors for speherical harmonics with l = 4 -+ -+ real(8),parameter :: ypre4m4 = 0.44253269244498261159038d0 -+ real(8),parameter :: ypre4m3 = 1.25167147089835228968013d0 -+ real(8),parameter :: ypre4m2 = 0.33452327177864460416856d0 -+ real(8),parameter :: ypre4m1 = 0.47308734787878004013351d0 -+ real(8),parameter :: ypre4m0 = 0.10578554691520430930396d0 -+ real(8),parameter :: ypre4p1 = -0.47308734787878004013351d0 -+ real(8),parameter :: ypre4p2 = 0.33452327177864460416856d0 -+ real(8),parameter :: ypre4p3 = -1.25167147089835228968013d0 -+ real(8),parameter :: ypre4p4 = 0.44253269244498261159038d0 -+ -+c Maximum no. of entries in solvation list -+ -+ integer :: maxneigh -+ -+c Solvation shell information - Q4 -+ -+ real(8),allocatable,dimension(:) :: solvx4,solvy4,solvz4 -+ real(8),allocatable,dimension(:) :: solvrmag4,solvimag4,solvrsq4 -+ integer,allocatable,dimension(:) :: solvlist4,solvtype4 -+ integer :: isolvmax4 -+ -+c Solvation shell information - Q6 -+ -+ real(8),allocatable,dimension(:) :: solvx6,solvy6,solvz6 -+ real(8),allocatable,dimension(:) :: solvrmag6,solvimag6,solvrsq6 -+ integer,allocatable,dimension(:) :: solvlist6,solvtype6 -+ integer :: isolvmax6 -+ -+c Prefactors arising from derivative of bias potential -+ -+ real(8),allocatable,dimension(:) :: q4prefactor,q6prefactor -+ -+c Separation vectors and powers thereof -+ -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ real(8) :: x,y,z -+ real(8) :: x2,y2,z2,x3,y3,z3 -+ real(8) :: x4,y4,z4,x5,y5,z5 -+ real(8) :: x6,y6,z6 -+ real(8) :: invrc,invrs,invrq -+ -+c list of separation vectors -+ integer :: numdst -+ integer,allocatable,dimension(:) :: dstlst -+ -+c Comms buffers -+ -+ real(8),allocatable,dimension(:) :: buff1,buff2 -+ -+c Temporaries -+ -+ real(8) :: tmpsq,f_ij,df_ij,ReYlm,ImYlm,tmpvar,invrN -+ real(8) :: fx,fy,fz,fx2,fy2,fz2,prefactor2,fx1,fy1,fz1 -+ real(8) :: strs1,strs2,strs3,strs4,strs5,strs6,strs7,strs8,strs9 -+ -+ integer :: iatm1,iatm0,iatm,isite,istrd,ii,isolv4,isolv6,isolv -+ integer :: idi,idj,limit,nn,k,jatm,jsite,q4type,q6type -+ integer :: itype,jtype,l,m,iq -+ -+ maxneigh = 500 ! Max number of atoms in coordination shell -+ -+ ierr = 0 ! Error flags -+ -+c DQ - modified 10/12/11, arrays now big enough -+c to hold maximum number of neighbours plus -+c maximum number of excluded atoms. -+ allocate(xdf(1:mxlist+mxexcl),stat=ierr(1)) -+ allocate(ydf(1:mxlist+mxexcl),stat=ierr(2)) -+ allocate(zdf(1:mxlist+mxexcl),stat=ierr(3)) -+ -+c DQ - modified 10/12/11, array to hold a list of -+c all atom entries in the above three arrays -+ allocate(dstlst(1:mxlist+mxexcl),stat=ierr(4)) -+ -+ allocate(solvx4(1:maxneigh),stat=ierr(5)) -+ allocate(solvy4(1:maxneigh),stat=ierr(6)) -+ allocate(solvz4(1:maxneigh),stat=ierr(7)) -+ allocate(solvrmag4(1:maxneigh),stat=ierr(8)) -+ allocate(solvimag4(1:maxneigh),stat=ierr(9)) -+ allocate(solvrsq4 (1:maxneigh),stat=ierr(10)) -+ allocate(solvlist4(1:maxneigh),stat=ierr(11)) -+ allocate(solvtype4(1:maxneigh),stat=ierr(12)) -+ -+ allocate(solvx6(1:maxneigh),stat=ierr(13)) -+ allocate(solvy6(1:maxneigh),stat=ierr(14)) -+ allocate(solvz6(1:maxneigh),stat=ierr(15)) -+ allocate(solvrmag6(1:maxneigh),stat=ierr(16)) -+ allocate(solvimag6(1:maxneigh),stat=ierr(17)) -+ allocate(solvrsq6 (1:maxneigh),stat=ierr(18)) -+ allocate(solvlist6(1:maxneigh),stat=ierr(19)) -+ allocate(solvtype6(1:maxneigh),stat=ierr(20)) -+ if (any(ierr/=0)) call Mfrz_Error(2538,0.d0) -+ -+ allocate(buff1(1:18*nq4+26*nq6),stat=ierr(1)) -+ allocate(buff2(1:18*nq4+26*nq6),stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2534,0.d0) -+ -+ allocate(q4prefactor(1:nq4),stat=ierr(1)) -+ allocate(q6prefactor(1:nq6),stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2540,0.d0) -+ -+c Compute the prefactors associated from dV_aug/d_q4 -+ -+ k = 1 -+ do iq = 1,nq4 -+ invrN = 1.0d0/dble(q4ninc(iq)*q4nn(iq)) -+ q4prefactor(iq) = -16.0d0*(rpibn**2)*(invrN**2)*dcolvar(k)/ -+ x Q4_global(iq) -+ k = k + 1 -+ end do -+ -+c Compute the prefactors associated from dV_aug/d_q6 -+ -+ do iq = 1,nq6 -+ invrN = 1.0d0/dble(q6ninc(iq)*q6nn(iq)) -+ q6prefactor(iq) = -16.0d0*(rpibtt**2)*(invrN**2)*dcolvar(k)/ -+ x Q6_global(iq) -+ k = k + 1 -+ end do -+ -+c write(0,'("DEBUG : q4prefactors = ",5F15.6)')q4prefactor -+ -+c Set atoms looper over by current rank -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ strs1 = 0.0d0 -+ strs2 = 0.0d0 -+ strs3 = 0.0d0 -+ strs4 = 0.0d0 -+ strs5 = 0.0d0 -+ strs6 = 0.0d0 -+ strs7 = 0.0d0 -+ strs8 = 0.0d0 -+ strs9 = 0.0d0 -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+c -------------------------------------------------------------- -+c Build a list of the required connections to iatm. This -+c differs depending on the version of DLPOLY we are using. -+c First we loop over atoms in the neighbour list of iatm. -+c--------------------------------------------------------------- -+ -+ ii = ii + 1 -+ isite=ltype(iatm) -+ limit=lentry(ii) -+ -+ nn = 0 -+ do k = 1,limit -+ -+ jatm = list(ii,k) -+ jsite = ltype(jatm) -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ dstlst(nn) = jatm -+ -+ xdf(nn)=xxx(jatm)-xxx(iatm) -+ ydf(nn)=yyy(jatm)-yyy(iatm) -+ zdf(nn)=zzz(jatm)-zzz(iatm) -+ -+ end do -+ -+c -------------------------------------------------------------- -+c Next we loop over the excluded atom list of iatm and add -+c and pairs needed for computation of the current OP. -+c--------------------------------------------------------------- -+ -+ccc DEBUG -+ccc write(0,'("atom ",I5," has ",I5," excluded interactions")') -+ccc x iatm,mtd_nexatm(iatm) -+ -+ do k = 1,mtd_nexatm(ii) -+ -+ jatm = mtd_lexatm(ii,k) -+ jsite = ltype(jatm) -+ -+ccc DEBUG -+ccc write(0,'("Interaction with atom ",I5," is excluded. ")')jatm -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ dstlst(nn) = jatm -+ -+ xdf(nn)=xxx(jatm)-xxx(iatm) -+ ydf(nn)=yyy(jatm)-yyy(iatm) -+ zdf(nn)=zzz(jatm)-zzz(iatm) -+ -+ end do -+ -+ccc DEBUG -+ccc write(0,*) -+ -+ numdst = nn -+ -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ -+ nn = 0 -+ isolvmax4 = 0 -+ isolvmax6 = 0 -+ isolv4 = 0 -+ isolv6 = 0 -+ do k = 1,numdst -+ jatm = dstlst(k) -+ jsite = ltype(jatm) -+ -+ if ( q4site(jsite,isite)+q6site(jsite,isite)==0 ) cycle -+ -+ nn = nn + 1 -+ -+ q4type = q4site(jsite,isite) -+ q6type = q6site(jsite,isite) -+ -+ tmpsq = xdf(nn)*xdf(nn)+ydf(nn)*ydf(nn)+zdf(nn)*zdf(nn) -+ if (nq4>0) then -+ -+c Add to solvation lists if within cut-off -+ -+ if ( tmpsq < q4cutoff(2,q4type)**2 ) then -+ isolv4 = isolv4 + 1 -+ solvlist4(isolv4) = jatm -+ solvrsq4(isolv4) = tmpsq -+ solvrmag4(isolv4) = sqrt(tmpsq) -+ solvimag4(isolv4) = 1.0d0/solvrmag4(isolv4) -+ solvx4(isolv4) = xdf(nn) -+ solvy4(isolv4) = ydf(nn) -+ solvz4(isolv4) = zdf(nn) -+ solvtype4(isolv4) = q4type -+ end if -+ end if -+ -+ if (nq6>0) then -+ -+c Add to solvation lists if within cut-off -+ -+ if ( tmpsq < q6cutoff(2,q6type)**2 ) then -+ isolv6 = isolv6 + 1 -+ solvlist6(isolv6) = jatm -+ solvrsq6(isolv6) = tmpsq -+ solvrmag6(isolv6) = sqrt(tmpsq) -+ solvimag6(isolv6) = 1.0d0/solvrmag6(isolv6) -+ solvx6(isolv6) = xdf(nn) -+ solvy6(isolv6) = ydf(nn) -+ solvz6(isolv6) = zdf(nn) -+ solvtype6(isolv6) = q6type -+ end if -+ end if -+ isolvmax4 = isolv4 -+ isolvmax6 = isolv6 -+ if ((isolv4>maxneigh) .or. (isolv6>maxneigh)) -+ x call Mfrz_Error(2535,0.d0) -+ -+ end do ! end loop over k -+ -+c--------------------------------------------------------- -+c--------------------------------------------------------- -+c Compute forces arising from Q4 order parameters -+c--------------------------------------------------------- -+c--------------------------------------------------------- -+ -+ if ( (nq4>0).and.isolvmax4>0 ) then -+ -+ do isolv4 = 1,isolvmax4 -+ -+ jatm = solvlist4(isolv4) -+ itype = solvtype4(isolv4) -+ -+ invrc = solvimag4(isolv4)**6 -+ invrq = solvimag4(isolv4)**8 -+ invrs = solvimag4(isolv4)**4 -+ -+ x = solvx4(isolv4) -+ y = solvy4(isolv4) -+ z = solvz4(isolv4) -+ -+ f_ij = fc(solvrmag4(isolv4),q4cutoff(1,itype), -+ x q4cutoff(2,itype)) -+ df_ij = dfc(solvrmag4(isolv4),q4cutoff(1,itype), -+ x q4cutoff(2,itype)) -+ -+ x2 = x*x -+ y2 = y*y -+ z2 = z*z -+ -+ x3 = x2*x -+ y3 = y2*y -+ z3 = z2*z -+ -+ x4 = x2*x2 -+ y4 = y2*y2 -+ z4 = z2*z2 -+ -+ x5 = x4*x -+ y5 = y4*y -+ z5 = z4*z -+ -+ x6 = x4*x2 -+ y6 = y4*y2 -+ z6 = z4*z2 -+ -+ fx = 0.0d0 -+ fy = 0.0d0 -+ fz = 0.0d0 -+ -+c------------------------------------- -+c Gradient of f_ij w.r.t. r_{j} -+c------------------------------------- -+ -+ fx2 = df_ij*x*solvimag4(isolv4) -+ fy2 = df_ij*y*solvimag4(isolv4) -+ fz2 = df_ij*z*solvimag4(isolv4) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -4 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre4m4*invrs*(x4-6.d0*x2*y2+y4) -+ ImYlm = ypre4m4*invrs*(-4.d0*x3*y+4.d0*x*y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = -4 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q4prefactor(itype)*ReQ4bar(-4,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{4,-4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrc*ypre4m4*4.d0*x*(4.d0*x2*y2-4.d0*y4+z2*x2- -+ x 3.d0*z2*y2) -+ fy1 = -invrc*ypre4m4*4.d0*y*(4.d0*x4-4.d0*x2*y2+3.d0* -+ x z2*x2-z2*y2) -+ fz1 = -invrc*ypre4m4*4.d0*z*(x4-6.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -4 (imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q4prefactor(itype)*ImQ4bar(-4,itype) -+ -+c---------------------------------------------- -+c Gradient of Im(Y_{4,-4}) w.r.t r_{j} -+c---------------------------------------------- -+ -+ fx1 = invrc*ypre4m4*4.d0*y*(x4-6.d0*x2*y2-3.d0*z2*x2+ -+ x y4+z2*y2) -+ fy1 = -invrc*ypre4m4*4.d0*x*(-6.d0*x2*y2+y4+x4+z2*x2- -+ x 3.d0*z2*y2) -+ fz1 = invrc*ypre4m4*16.d0*x*y*z*(x2-y2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -3 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre4m3*invrs*z*(x3-3.d0*x*y2) -+ ImYlm = ypre4m3*invrs*z*(-3.d0*x2*y+y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = -3 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q4prefactor(itype)*ReQ4bar(-3,itype) -+ -+c--------------------------------------------- -+c Gradient of Re(Y_{4,-3}) w.r.t r_{j} -+c--------------------------------------------- -+ -+ fx1 = -invrc*ypre4m3*z*(x4-12.d0*x2*y2-3.d0*z2*x2+ -+ x 3.d0*y4+3.d0*z2*y2) -+ fy1 = -invrc*ypre4m3*2.d0*z*x*y*(5.0d0*x2-3.d0*y2+ -+ x 3.d0*z2) -+ fz1 = invrc*ypre4m3*x*(x2-3.d0*y2)*(x2+y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = -3 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q4prefactor(itype)*ImQ4bar(-3,itype) -+ -+c-------------------------------------------------- -+c Gradient of Im(Y_{4,-3}) w.r.t r_{j} -+c-------------------------------------------------- -+ -+ fx1 = invrc*ypre4m3*2.d0*z*x*y*(3.d0*x2-5.d0*y2-3.0d0*z2) -+ fy1 = -invrc*ypre4m3*z*(-12.d0*x2*y2+y4+3.d0*x4+3.d0*z2*x2 -+ x -3.d0*z2*y2) -+ fz1 = -invrc*ypre4m3*y*(3.d0*x2-y2)*(x2+y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -2 -+c-------------------------------------------------------- -+ -+ ReYlm = -ypre4m2*invrs*(x2-y2)*(-6.d0*z2+x2+y2) -+ ImYlm = ypre4m2*invrs*2.d0*(-6.d0*z2+x2+y2)*x*y -+ -+c-------------------------------------------------- -+c Force contributions from m = -2 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q4prefactor(itype)*ReQ4bar(-2,itype) -+ -+c--------------------------------------------- -+c Gradient of Re(Y_{4,-2}) w.r.t r_{j} -+c--------------------------------------------- -+ -+ fx1 = -invrc*ypre4m2*4.d0*x*(4.d0*z2*x2+y4-9.d0*z2*y2- -+ x 3.d0*z4+x2*y2) -+ fy1 = invrc*ypre4m2*4.d0*y*(x4-9.d0*z2*x2+4.d0*z2*y2- -+ x 3.d0*z4+x2*y2) -+ fz1 = invrc*ypre4m2*4.d0*z*(x2-y2)*(4.d0*x2+4.d0*y2- -+ x 3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = -2 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q4prefactor(itype)*ImQ4bar(-2,itype) -+ -+c----------------------------------------- -+c Gradient of Im(Y_{4,-2}) w.r.t r_{j} -+c----------------------------------------- -+ -+ fx1 = -invrc*ypre4m2*2.d0*y*(x4-21.d0*z2*x2+5.d0*z2*y2+ -+ x 6.d0*z4-y4) -+ fy1 = invrc*ypre4m2*2.d0*x*(-y4+21.d0*z2*y2-5.d0*z2*x2 -+ x -6.d0*z4+x4) -+ fz1 = -invrc*ypre4m2*8.d0*z*x*y*(4.d0*x2+4.d0*y2-3.d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -1 -+c-------------------------------------------------------- -+ -+ ReYlm = -ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*x -+ ImYlm = ypre4m1*invrs*z*(-4.d0*z2+3.d0*x2+3.d0*y2)*y -+ -+c-------------------------------------------------- -+c Force contributions from m = -1 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q4prefactor(itype)*ReQ4bar(-1,itype) -+ -+c---------------------------------------- -+c Gradient of Re(Y_{4,-1}) w.r.t r_{j} -+c---------------------------------------- -+ -+ fx1 = invrc*ypre4m1*z*(3.d0*x4-21.d0*z2*x2+z2*y2+4.d0*z4- -+ x 3.d0*y4) -+ fy1 = invrc*ypre4m1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) -+ fz1 = -invrc*ypre4m1*x*(-21.d0*x2*z2-21.d0*z2*y2+4.d0*z4+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c------------------------------------------------------- -+c Force contributions from m = -1 (imaginary part) -+c------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q4prefactor(itype)*ImQ4bar(-1,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{4,-1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -invrc*ypre4m1*2.d0*z*x*y*(3.d0*x2+3.d0*y2-11.d0*z2) -+ fy1 = invrc*ypre4m1*z*(-3.d0*y4+21.d0*z2*y2-z2*x2-4.d0*z4+ -+ x 3.d0*x4) -+ fz1 = invrc*ypre4m1*y*(-21.d0*z2*x2-21.d0*z2*y2+4.d0*z4+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real spherical harmonics for m = 0 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre4m0*invrs*(8.d0*z4-24.d0*z2*x2-24.d0*z2*y2+ -+ x 3.d0*x4+6.d0*x2*y2+3.d0*y4) -+ -+c-------------------------------------------------- -+c Force contributions from m = 0 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q4prefactor(itype)*ReQ4bar(0,itype) -+ -+c------------------------------------------- -+c Gradient of Re(Y_{4,0}) w.r.t r_{j} -+c------------------------------------------- -+ -+ fx1 = 20.d0*ypre4m0*invrc*z2*(-4.d0*z2+3.d0*x2+3.d0*y2)*x -+ fy1 = 20.d0*ypre4m0*invrc*z2*(-4.d0*z2+3.d0*x2+3.d0*y2)*y -+ fz1 = -20.d0*ypre4m0*invrc*z*(-4.d0*z2*x2-4.d0*z2*y2+3.d0* -+ x x4+6.d0*x2*y2+3.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c Add into global force and stress arrays -+ -+ fxx(jatm) = fxx(jatm) + fx -+ fyy(jatm) = fyy(jatm) + fy -+ fzz(jatm) = fzz(jatm) + fz -+ fxx(iatm) = fxx(iatm) - fx -+ fyy(iatm) = fyy(iatm) - fy -+ fzz(iatm) = fzz(iatm) - fz -+ -+c Virial -+ -+ virord = virord - (fx*x + fy*y + fz*z) -+ -+c Stress -+ -+ strs1=strs1+x*fx -+ strs2=strs2+x*fy -+ strs3=strs3+x*fz -+ strs5=strs5+y*fy -+ strs6=strs6+y*fz -+ strs9=strs9+z*fz -+ -+ end do ! end loop over connection list for iatm -+ -+ end if ! end of computing Q4 -+ -+c--------------------------------------------------------- -+c--------------------------------------------------------- -+c Compute forces arising from Q6 order parameters -+c--------------------------------------------------------- -+c--------------------------------------------------------- -+ -+ if ( (nq6>0).and.isolvmax6>0 ) then -+ -+ do isolv6 = 1,isolvmax6 -+ -+ jatm = solvlist6(isolv6) -+ itype = solvtype6(isolv6) -+ -+ invrc = solvimag6(isolv6)**6 -+ invrq = solvimag6(isolv6)**8 -+ invrs = solvimag6(isolv6)**4 -+ -+ x = solvx6(isolv6) -+ y = solvy6(isolv6) -+ z = solvz6(isolv6) -+ -+ f_ij = fc(solvrmag6(isolv6),q6cutoff(1,itype), -+ x q6cutoff(2,itype)) -+ df_ij = dfc(solvrmag6(isolv6),q6cutoff(1,itype), -+ x q6cutoff(2,itype)) -+ -+ x2 = x*x -+ y2 = y*y -+ z2 = z*z -+ -+ x3 = x2*x -+ y3 = y2*y -+ z3 = z2*z -+ -+ x4 = x2*x2 -+ y4 = y2*y2 -+ z4 = z2*z2 -+ -+ x5 = x4*x -+ y5 = y4*y -+ z5 = z4*z -+ -+ x6 = x4*x2 -+ y6 = y4*y2 -+ z6 = z4*z2 -+ -+ fx = 0.0d0 -+ fy = 0.0d0 -+ fz = 0.0d0 -+ -+c---------------------------------------- -+c Gradient of f_ij w.r.t. r_{j} -+c---------------------------------------- -+ -+ fx2 = df_ij*x*solvimag6(isolv6) -+ fy2 = df_ij*y*solvimag6(isolv6) -+ fz2 = df_ij*z*solvimag6(isolv6) -+ -+c----------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -6 -+c----------------------------------------------------------- -+ -+ ReYlm = ypre6m6*invrc*(x6-15.0d0*x4*y2+15.0d0*x2*y4-y6) -+ ImYlm = ypre6m6*invrc*(-6.0d0*x5*y+20.0d0*x3*y3-6.0d0* -+ x x*y5) -+ -+c----------------------------------------------------- -+c Force contributions from m = -6 (real part) -+c----------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-6,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-6}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = invrq*ypre6m6*6.0d0*x*(6.0d0*x4*y2-20.0d0*x2*y4+ -+ x 6.0d0*y6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fy1 = -invrq*ypre6m6*6.0d0*y*(6.0d0*x6-20.0d0*x4*y2+6.0d0 -+ x *x2*y4+5.0d0*z2*x4-10.0d0*z2*x2*y2+z2*y4) -+ fz1 = -invrq*ypre6m6*6.0d0*z*(x6-15.0d0*x4*y2+15.0d0*x2* -+ x y4-y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c---------------------------------------------------------- -+c Force contributions from m = -6 (Imaginary part) -+c---------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-6,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-6}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -invrq*ypre6m6*6.0d0*y*(-x6+15.0d0*x4*y2-15.0d0*x2* -+ x y4+5.0d0*z2*x4-10.0d0*z2*x2*y2+y6+z2*y4) -+ fy1 = -invrq*ypre6m6*6.0d0*x*(-15.0d0*x4*y2+15.0d0*x2*y4- -+ x y6+x6+z2*x4-10.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fz1 = invrq*ypre6m6*12.0d0*x*y*z*(3.0d0*x4-10.0d0*x2*y2+ -+ x 3.0d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c--------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -5 -+c--------------------------------------------------------- -+ -+ ReYlm = -ypre6m5*invrc*z*(-x5+10.0d0*x3*y2-5.0d0*x*y4) -+ ImYlm = -ypre6m5*invrc*z*(5.0d0*x4*y-10.0d0*x2*y3+y5) -+ -+c-------------------------------------------------- -+c Force contributions from m = -5 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-5,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-5}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = ypre6m5*invrq*z*(-x6+35.0d0*x4*y2-55.d0*x2*y4+ -+ x 5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*y6+5.0d0*z2*y4) -+ fy1 = -2.0d0*ypre6m5*invrq*x*y*z*(13.0d0*x4-30.0d0*x2 -+ x *y2+5.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) -+ fz1 = -ypre6m5*invrq*x*(x4-10.0d0*x2*y2+5.0d0*y4)* -+ x (-x2-y2+5.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -5 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-5,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-5}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -2.0d0*ypre6m5*invrq*x*y*z*(-5.0d0*x4+30.0d0*x2*y2 -+ x -13.0d0*y4+10.0d0*z2*x2-10.0d0*z2*y2) -+ fy1 = -ypre6m5*invrq*z*(-55.0d0*x4*y2+35.0d0*x2*y4-y6+ -+ x 5.0d0*x6+5.0d0*z2*x4-30.0d0*z2*x2*y2+5.0d0*z2*y4) -+ fz1 = ypre6m5*invrq*y*(5.0d0*x4-10.0d0*x2*y2+y4)* -+ x (-x2-y2+5.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -4 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(x4-6.0d0*x2*y2+y4) -+ ImYlm = ypre6m4*invrc*(10.0d0*z2-x2-y2)*(-4.0d0*x3*y+4.0d0* -+ x x*y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = -4 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-4,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.0d0*ypre6m4*invrq*x*(-8.0d0*x4*y2-13.0d0*z2*x4+ -+ x 150.0d0*z2*x2*y2+8.0d0*y6-85.0d0*z2*y4+20.0d0*z4* -+ x x2-60.0d0*z4*y2) -+ fy1 =-2.0d0*ypre6m4*invrq*y*(-8.0d0*x6+85.0d0*z2*x4+8.0d0 -+ x *x2*y4-150.0d0*z2*x2*y2+13.0d0*z2*y4+60.0d0*z4*x2- -+ x 20.0d0*z4*y2) -+ fz1 =-2.0d0*ypre6m4*invrq*z*(x4-6.0d0*x2*y2+y4)*(-13.0d0 -+ x *x2-13.0d0*y2+20.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -4 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-4,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-4}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -4.0d0*ypre6m4*invrq*y*(x6-35.0d0*z2*x4-5.0d0*x2*y4 -+ x +80.0d0*z2*x2*y2+30*z4*x2-9.0d0*z2*y4-10*z4*y2-5.0d0 -+ x *x4*y2+y6) -+ fy1 = -4.0d0*ypre6m4*invrq*x*(5.0d0*x4*y2-80.0d0*z2*x2*y2 -+ x -y6+35.0d0*z2*y4+9.0d0*z2*x4+10.0d0*z4*x2-30.0d0*z4 -+ x *y2-x6+5.0d0*x2*y4) -+ fz1 = 8.0d0*ypre6m4*invrq*z*x*y*(x2-y2)*(-13.0d0*x2- -+ x 13.0d0*y2+20.0d0*z2) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -3 -+c-------------------------------------------------------- -+ -+ ReYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* -+ x (-x3+3.0d0*x*y2) -+ ImYlm = -ypre6m3*invrc*z*(8.0d0*z2-3.0d0*x2-3.0d0*y2)* -+ x (3.0d0*x2*y-y3) -+ -+c-------------------------------------------------- -+c Force contributions from m = -3 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-3,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-3}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 3.d0*ypre6m3*invrq*z*(x6-11.d0*x4*y2-13.d0*z2*x4- -+ x 9.d0*x2*y4+54.d0*z2*x2*y2+8.d0*z4*x2-5.d0*z2*y4- -+ x 8.d0*z4*y2+3.d0*y6) -+ fy1 = -6.d0*ypre6m3*invrq*z*x*y*(-5.d0*x4-2.d0*x2*y2+14.d0 -+ x *z2*x2+3.d0*y4-22.d0*z2*y2+8.d0*z4) -+ fz1 = -3.d0*ypre6m3*invrq*x*(x2-3.d0*y2)*(-13.d0*z2*x2- -+ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -3 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-3,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-3}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -6.d0*ypre6m3*invrq*z*x*y*(3.d0*x4-2.d0*x2*y2-22.d0 -+ x *z2*x2-5.d0*y4+14.d0*z2*y2+8.d0*z4) -+ fy1 = -3.d0*ypre6m3*invrq*z*(9.d0*x4*y2+11.d0*x2*y4-54.d0 -+ x *z2*x2*y2-y6+13.d0*z2*y4+5.d0*z2*x4+8.d0*z4*x2-8.d0 -+ x *z4*y2-3.d0*x6) -+ fz1 = 3.d0*ypre6m3*invrq*y*(3.d0*x2-y2)*(-13.d0*z2*x2- -+ x 13.d0*z2*y2+8.d0*z4+x4+2.d0*x2*y2+y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -2 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6m2*invrc*(16.0d0*z4-16.0d0*z2*x2-16.0d0*z2 -+ x *y2+x4+2.0d0*x2*y2+y4)*(x2-y2) -+ ImYlm = -ypre6m2*invrc*2.0d0*(16.0d0*z4-16.0d0*z2*x2- -+ x 16.0d0*z2*y2+x4+2.0d0*x2*y2+y4)*x*y -+ -+c-------------------------------------------------- -+c Force contributions from m = -2 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-2,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-2}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.d0*ypre6m2*invrq*x*( 19.d0*z2*x4-64.d0*z4*x2- -+ x 49.d0*z2*y4+64.d0*z4*y2+2.d0*x4*y2+4.d0*x2*y4+ -+ x 2.d0*y6+16.d0*z6-30.d0*z2*x2*y2) -+ fy1 = -2.d0*ypre6m2*invrq*y*(-49.d0*z2*x4+64.d0*z4*x2+ -+ x 19.d0*z2*y4-64.d0*z4*y2+2.d0*x6+4.d0*x4*y2+2.d0* -+ x x2*y4+16.d0*z6-30.d0*z2*x2*y2) -+ fz1 = -2.d0*ypre6m2*invrq*z*(x2-y2)*(-64.d0*z2*x2-64.d0 -+ x *z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -2 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-2,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-2}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -2.d0*ypre6m2*invrq*y*(53.d0*z2*x4+38.d0*z2*x2* -+ x y2-128.d0*z4*x2-x6-x4*y2+x2*y4+16.d0*z6-15.d0* -+ x z2*y4+y6) -+ fy1 = -2.d0*ypre6m2*invrq*x*(38.d0*z2*x2*y2+53.d0*z2* -+ x y4-128.d0*z4*y2+x4*y2-x2*y4-y6+16.d0*z6-15.d0* -+ x z2*x4+x6) -+ fz1 = 4.d0*ypre6m2*invrq*z*x*y*(-64.d0*z2*x2-64.d0* -+ x z2*y2+16.d0*z4+19.d0*x4+38.d0*x2*y2+19.d0*y4) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real and imaginary spherical harmonics for m = -1 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2 -+ x +5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*x -+ ImYlm = -ypre6m1*z*invrc*(8.0d0*z4-20.0d0*z2*x2-20.0d0*z2*y2 -+ x +5.0d0*x4+10.0d0*x2*y2+5.0d0*y4)*y -+ -+c-------------------------------------------------- -+c Force contributions from m = -1 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ReQ6bar(-1,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,-1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = ypre6m1*invrq*z*(85.d0*z2*x4+70.d0*z2*x2*y2 -+ x -100.d0*z4*x2-5.d0*x6-5.d0*x4*y2+5.d0*x2*y4-12.d0 -+ x *z4*y2+8.d0*z6-15.d0*z2*y4+5.d0*y6) -+ fy1 = -2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0*z2* -+ x y2+44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) -+ fz1 = -ypre6m1*invrq*x*(-100.d0*z4*x2-100.d0*z4*y2+ -+ x 8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0*z2*y4- -+ x 5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+c-------------------------------------------------------- -+c Force contributions from m = -1 (Imaginary part) -+c-------------------------------------------------------- -+ -+ prefactor2 = 2.0d0*q6prefactor(itype)*ImQ6bar(-1,itype) -+ -+c-------------------------------------------- -+c Gradient of Im(Y_{6,-1}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = 2.d0*ypre6m1*invrq*z*x*y*(-50.d0*z2*x2-50.d0* -+ x z2*y2+44.d0*z4+5.d0*x4+10.d0*x2*y2+5.d0*y4) -+ fy1 = -ypre6m1*invrq*z*(70.d0*z2*x2*y2+85.d0*z2 -+ x *y4-100.d0*z4*y2+5.d0*x4*y2-5.d0*x2*y4-5.d0*y6 -+ x -12.d0*z4*x2+8.d0*z6-15.d0*z2*x4+5.d0*x6) -+ fz1 = ypre6m1*invrq*y*(-100.d0*z4*x2-100.d0*z4 -+ x *y2+8.d0*z6+85.d0*z2*x4+170.d0*z2*x2*y2+85.d0* -+ x z2*y4-5.d0*x6-15.d0*x4*y2-15.d0*x2*y4-5.d0*y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ImYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ImYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ImYlm) -+ -+c-------------------------------------------------------- -+c Real spherical harmonics for m = 0 -+c-------------------------------------------------------- -+ -+ ReYlm = ypre6m0*invrc*(16.0d0*z6-120.0d0*z4*x2-120.0d0 -+ x *z4*y2+90.0d0*z2*x4+180.0d0*z2*x2*y2+90.0d0*z2*y4 -+ x -5.0d0*x6-15.0d0*x4*y2-15.0d0*x2*y4-5.0d0*y6) -+ -+c-------------------------------------------------- -+c Force contributions from m = 0 (real part) -+c-------------------------------------------------- -+ -+ prefactor2 = q6prefactor(itype)*ReQ6bar(0,itype) -+ -+c-------------------------------------------- -+c Gradient of Re(Y_{6,0}) w.r.t r_{j} -+c-------------------------------------------- -+ -+ fx1 = -42.d0*ypre6m0*invrq*z2*(8.d0*z4-20.d0*z2*x2-20.d0 -+ x *z2*y2+5.d0*x4+10.d0*x2*y2+5.d0*y4)*x -+ fy1 = -42.d0*ypre6m0*invrq*z2*(8.d0*z4-20.d0*z2*x2-20.d0 -+ x *z2*y2+5.d0*x4+10.d0*x2*y2+5.d0*y4)*y -+ fz1 = 42.d0*ypre6m0*invrq*z*(8.d0*z4*x2+8.d0*z4*y2-20.d0 -+ x *z2*x4-40.d0*z2*x2*y2-20.d0*z2*y4+5.d0*x6+15.d0*x4* -+ x y2+15.d0*x2*y4+5.d0*y6) -+ -+ fx = fx + prefactor2*(f_ij*fx1 + fx2*ReYlm) -+ fy = fy + prefactor2*(f_ij*fy1 + fy2*ReYlm) -+ fz = fz + prefactor2*(f_ij*fz1 + fz2*ReYlm) -+ -+ -+c Add into global force and stress arrays -+ -+ fxx(jatm) = fxx(jatm) + fx -+ fyy(jatm) = fyy(jatm) + fy -+ fzz(jatm) = fzz(jatm) + fz -+ fxx(iatm) = fxx(iatm) - fx -+ fyy(iatm) = fyy(iatm) - fy -+ fzz(iatm) = fzz(iatm) - fz -+ -+c Virial -+ -+ virord = virord - (fx*x + fy*y + fz*z) -+ -+c Stress -+ -+ strs1=strs1+x*fx -+ strs2=strs2+x*fy -+ strs3=strs3+x*fz -+ strs5=strs5+y*fy -+ strs6=strs6+y*fz -+ strs9=strs9+z*fz -+ -+ end do ! end loop over connection list for iatm -+ -+ end if ! end of computing Q6 -+ -+ -+ end do ! end loop over iatm -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs1 -+ stress(2)=stress(2)+strs2 -+ stress(3)=stress(3)+strs3 -+ stress(4)=stress(4)+strs2 -+ stress(5)=stress(5)+strs5 -+ stress(6)=stress(6)+strs6 -+ stress(7)=stress(7)+strs3 -+ stress(8)=stress(8)+strs6 -+ stress(9)=stress(9)+strs9 -+ -+c tidy up -+ -+ ierr = 0 -+ -+ deallocate(xdf,stat=ierr(1)) -+ deallocate(ydf,stat=ierr(2)) -+ deallocate(zdf,stat=ierr(3)) -+ -+ deallocate(dstlst,stat=ierr(4)) -+ -+ deallocate(solvx4,stat=ierr(5)) -+ deallocate(solvy4,stat=ierr(6)) -+ deallocate(solvz4,stat=ierr(7)) -+ deallocate(solvrmag4,stat=ierr(8)) -+ deallocate(solvimag4,stat=ierr(9)) -+ deallocate(solvrsq4 ,stat=ierr(10)) -+ deallocate(solvlist4,stat=ierr(11)) -+ deallocate(solvtype4,stat=ierr(12)) -+ -+ deallocate(solvx6,stat=ierr(13)) -+ deallocate(solvy6,stat=ierr(14)) -+ deallocate(solvz6,stat=ierr(15)) -+ deallocate(solvrmag6,stat=ierr(16)) -+ deallocate(solvimag6,stat=ierr(17)) -+ deallocate(solvrsq6 ,stat=ierr(18)) -+ deallocate(solvlist6,stat=ierr(19)) -+ deallocate(solvtype6,stat=ierr(20)) -+ if (any(ierr/=0)) call Mfrz_Error(2536,0.d0) -+ -+ deallocate(buff1,stat=ierr(1)) -+ deallocate(buff2,stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2537,0.d0) -+ -+ deallocate(q4prefactor,stat=ierr(1)) -+ deallocate(q6prefactor,stat=ierr(2)) -+ if (any(ierr/=0)) call Mfrz_Error(2540,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Steinhardt_Forces -+ -+ Subroutine Compute_Tet_Nlist(imcon,natms) -+ -+c--------------------------------------------------------------------- -+c -+c The existing neighbour list is not known by all nodes and -+c therefore we compute a new one from scratch rather than trying -+c to merge a full neighbour list across all MPI tasks or restore -+c symmetry. -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use utility_module, only : images -+ -+ implicit none -+ integer,intent(in) :: imcon,natms -+ integer :: nlast,megatm -+ -+ integer :: iatm0,iatm1,istrd,iatm,jatm,nn,itype,jtype -+ integer :: ninclude,ifi,ii,ztype,nnn,k -+ real(8) :: rsq,rangesq -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ ninclude = maxval(zetaninc) -+ -+ nlast = natms -+ megatm = natms -+ -+ nnn = int(dble(ninclude*nlast*1.2)/dble(megatm)) -+ -+ allocate(xdf(1:nnn),stat=ierr(1)) -+ allocate(ydf(1:nnn),stat=ierr(2)) -+ allocate(zdf(1:nnn),stat=ierr(3)) -+ if (any(ierr/=0)) call Mfrz_Error(2541,0.d0) -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ itype = ltype(iatm) -+ -+ ztype = zetasite(itype) -+ if ( ztype==0 ) cycle -+ -+ nn = 0 ! Number of images to compute -+ ii = ii + 1 ! index for this list -+ ifi = 0 ! index for entries in this list -+ -+ if (ii>mxninc) call Mfrz_Error(2542,0.d0) -+ -+ do jatm = 1,nlast -+ -+ jtype = ltype(jatm) -+ -+ if ( itype/=jtype ) cycle -+ if ( iatm == jatm ) cycle -+ -+ nn = nn + 1 -+ xdf(nn) = xxx(iatm) - xxx(jatm) ! separation vector -+ ydf(nn) = yyy(iatm) - yyy(jatm) -+ zdf(nn) = zzz(iatm) - zzz(jatm) -+ -+ end do -+ -+ if ( nn > nnn ) call Mfrz_Error(2543,0.d0) -+ -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ -+ nn = 0 -+ do jatm = 1,nlast -+ -+ jtype = ltype(jatm) -+ -+ if ( itype/=jtype ) cycle -+ if ( iatm == jatm ) cycle -+ -+ nn = nn + 1 -+ rsq = xdf(nn)*xdf(nn) + ydf(nn)*ydf(nn) + zdf(nn)*zdf(nn) -+ -+ rangesq = zetacutoff(2,ztype)**2 -+ -+ if ( rsq < rangesq ) then -+ -+ ifi = ifi + 1 -+ flist(ifi,ii) = jatm -+ -+ end if -+ -+ end do -+ if ( ifi > mxflist ) call Mfrz_Error(2544,0.d0) -+ nflist(ii) = ifi -+ -+ end do ! end loop over iatm -+ -+ deallocate(xdf,stat=ierr(1)) -+ deallocate(ydf,stat=ierr(2)) -+ deallocate(zdf,stat=ierr(3)) -+ if (any(ierr/=0))call Mfrz_Error(2545,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Tet_Nlist -+ -+ Subroutine Compute_Tetrahedral(imcon,natms) -+ -+c--------------------------------------------------------------------- -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use utility_module, only : images -+ -+ implicit none -+ integer,intent(in) :: imcon,natms -+ -+ integer :: iatm0,iatm1,istrd,iatm,jatm,nn,itype,jtype -+ integer :: ninclude,ifi,ii,k,ztype,mm,katm,ktype,it -+ real(8) :: f_ij,f_ik,r_ij,r_ik,x,y,z,dot -+ real(8),parameter :: third=1.0d0/3.0d0 -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ real(8),allocatable,dimension(:) :: buff1 -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ allocate(xdf(1:mxflist),stat=ierr(1)) -+ allocate(ydf(1:mxflist),stat=ierr(2)) -+ allocate(zdf(1:mxflist),stat=ierr(3)) -+ allocate(buff1(1:ntet),stat=ierr(4)) -+ if (any(ierr/=0)) call Mfrz_Error(2546,0.d0) -+ -+ zeta_global(:) = 0.0d0 -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ itype = ltype(iatm) -+ -+c no tetrahedral contributions from this atom type? -+ -+ ztype = zetasite(itype) -+ if ( ztype == 0 ) cycle -+ -+ ii = ii + 1 ! index for this list -+ -+ do k = 1,nflist(ii) -+ -+ jatm = flist(k,ii) -+ -+ xdf(k) = xxx(jatm) - xxx(iatm) ! separation vector -+ ydf(k) = yyy(jatm) - yyy(iatm) -+ zdf(k) = zzz(jatm) - zzz(iatm) -+ -+ end do -+ -+ nn = nflist(ii) -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ -+ do k = 1,nflist(ii) -+ -+ jatm = flist(k,ii) -+ -+ r_ij = sqrt(xdf(k)*xdf(k) + ydf(k)*ydf(k) + zdf(k)*zdf(k)) -+ f_ij = fc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ -+ x = xdf(k) ; y = ydf(k) ; z = zdf(k) -+ -+c loop over all other entries katm -+ -+ do mm = k+1,nflist(ii) -+ -+c katm also in solvation shell of iatm -+ -+ katm = flist(mm,ii) -+ -+ r_ik = sqrt(xdf(mm)*xdf(mm) + ydf(mm)*ydf(mm) + -+ x zdf(mm)*zdf(mm)) -+ f_ik = fc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ -+c The node holding the central atom keeps the contrib -+ -+ dot = (x*xdf(mm) + y*ydf(mm) + z*zdf(mm)) / (r_ij*r_ik) + -+ x third -+ zeta_global(ztype) = zeta_global(ztype) + f_ij*f_ik*dot*dot -+ end do -+ end do -+ -+ end do -+ -+ call gdsum(zeta_global(1),ntet,buff1(1:ntet)) -+ -+ do it = 1,ntet -+ zeta_global(it) = 1.0d0 - zeta_global(it)/dble(zetaninc(it)* -+ x zetann(it)) -+ end do -+ -+ deallocate(xdf ,stat=ierr(1)) -+ deallocate(ydf ,stat=ierr(2)) -+ deallocate(zdf ,stat=ierr(3)) -+ deallocate(buff1,stat=ierr(4)) -+ if (any(ierr/=0)) call Mfrz_Error(2547,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Tetrahedral -+ -+ Subroutine Compute_Tetrahedral_Forces(imcon,natms,engord,virord) -+ -+c--------------------------------------------------------------------- -+c -+c Author D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use config_module -+ use site_module -+ use utility_module, only : images -+ -+ implicit none -+ integer,intent(in) :: imcon,natms -+ real(8),intent(inout) :: engord,virord -+ -+ integer :: iatm,jatm,katm,iatm0,iatm1,istrd,nn -+ integer :: ii,k,m,itet,itype,jtype,ztype,it -+ -+ real(8),parameter :: third = 1.0d0/3.0d0 -+ real(8) :: strs1,strs2,strs3,strs5,strs6,strs9 -+ real(8) :: xj,yj,zj,xk,yk,zk,tmpvar,tmpvar2,dot -+ real(8) :: r_ij,r_ik,f_ij,f_ik,df_ij,df_ik -+ real(8) :: invrij,invrik,ctheta -+ real(8) :: fxj,fyj,fzj,fxk,fyk,fzk -+ -+ real(8),dimension(3) :: rij_hat,rik_hat -+ -+ real(8),allocatable,dimension(:) :: xdf,ydf,zdf -+ real(8),allocatable,dimension(:) :: tetprefactor -+ -+ iatm0 = myrank+1 -+ iatm1 = natms -+ istrd = commsize -+ -+ allocate(xdf(1:mxflist),stat=ierr(1)) -+ allocate(ydf(1:mxflist),stat=ierr(2)) -+ allocate(zdf(1:mxflist),stat=ierr(3)) -+ allocate(tetprefactor(1:ntet),stat=ierr(4)) -+ if (any(ierr/=0)) call Mfrz_Error(2548,0.d0) -+ -+c Compute the prefactor -+ -+ k = nq4+nq6+1 -+ do it = 1,ntet -+ tetprefactor = dcolvar(k)/dble(zetaninc(it)*zetann(it)) -+ k = k + 1 -+ end do -+ -+c zero contribution to the stress tensor -+ -+ strs1=0.0d0 -+ strs2=0.0d0 -+ strs3=0.0d0 -+ strs5=0.0d0 -+ strs6=0.0d0 -+ strs9=0.0d0 -+ -+ ii = 0 -+ do iatm = iatm0,iatm1,istrd -+ -+ itype = ltype(iatm) -+ -+c no tetrahedral contributions from this atom type? -+ -+ ztype = zetasite(itype) -+ if ( ztype == 0 ) cycle -+ -+ ii = ii + 1 ! index for this list -+ -+ do k = 1,nflist(ii) -+ -+ jatm = flist(k,ii) -+ -+ xdf(k) = xxx(jatm) - xxx(iatm) ! separation vector -+ ydf(k) = yyy(jatm) - yyy(iatm) -+ zdf(k) = zzz(jatm) - zzz(iatm) -+ -+ end do -+ -+ nn = nflist(ii) -+ call images(imcon,0,1,nn,cell,xdf,ydf,zdf) -+ -+ do k = 1,nflist(ii) -+ -+ jatm = flist(k,ii) -+ -+ r_ij = sqrt(xdf(k)*xdf(k) + ydf(k)*ydf(k) + zdf(k)*zdf(k)) -+ f_ij = fc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ df_ij = dfc(r_ij,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ -+ xj = xdf(k) ; yj = ydf(k) ; zj = zdf(k) -+ -+ invrij = 1.0d0/r_ij -+ -+ rij_hat(1) = xj*invrij -+ rij_hat(2) = yj*invrij -+ rij_hat(3) = zj*invrij -+ -+ do m = k + 1,nflist(ii) -+ -+ r_ik = sqrt(xdf(m)*xdf(m) + ydf(m)*ydf(m) + zdf(m)*zdf(m)) -+ f_ik = fc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ df_ik = dfc(r_ik,zetacutoff(1,ztype),zetacutoff(2,ztype)) -+ -+ xk = xdf(m) ; yk = ydf(m) ; zk = zdf(m) -+ -+ invrik = 1.0d0/r_ik -+ -+ rik_hat(1) = xk*invrik -+ rik_hat(2) = yk*invrik -+ rik_hat(3) = zk*invrik -+ -+ ctheta = dot_product(rij_hat,rik_hat) -+ dot = ctheta + third -+ -+ tmpvar = 2.0d0*dot*f_ij*f_ik*tetprefactor(ztype)*invrij -+ tmpvar2 = tetprefactor(ztype)*dot*dot*df_ij*f_ik -+ -+c force between atom i and atom j due to second term -+c i.e. ( f_ij*f_ik*dot*dot ) -+ -+ fxj = tmpvar*(rik_hat(1) - rij_hat(1)*ctheta) + -+ x tmpvar2*rij_hat(1) -+ fyj = tmpvar*(rik_hat(2) - rij_hat(2)*ctheta) + -+ x tmpvar2*rij_hat(2) -+ fzj = tmpvar*(rik_hat(3) - rij_hat(3)*ctheta) + -+ x tmpvar2*rij_hat(3) -+ -+ tmpvar = 2.0d0*dot*f_ij*f_ik*tetprefactor(ztype)*invrik -+ tmpvar2 = tetprefactor(ztype)*dot*dot*df_ik*f_ij -+ -+c force between atom i and atom k due to second term -+c i.e ( f_ij*f_ik*dot*dot ) -+ -+ fxk = tmpvar*(rij_hat(1) - rik_hat(1)*ctheta) + -+ x tmpvar2*rik_hat(1) -+ fyk = tmpvar*(rij_hat(2) - rik_hat(2)*ctheta) + -+ x tmpvar2*rik_hat(2) -+ fzk = tmpvar*(rij_hat(3) - rik_hat(3)*ctheta) + -+ x tmpvar2*rik_hat(3) -+ -+c Add in to forces, virial and stress tensor -+ -+ katm = flist(m,ii) -+ -+ fxx(iatm) = fxx(iatm) + fxj + fxk -+ fyy(iatm) = fyy(iatm) + fyj + fyk -+ fzz(iatm) = fzz(iatm) + fzj + fzk -+ -+ fxx(jatm) = fxx(jatm) - fxj -+ fyy(jatm) = fyy(jatm) - fyj -+ fzz(jatm) = fzz(jatm) - fzj -+ -+ fxx(katm) = fxx(katm) - fxk -+ fyy(katm) = fyy(katm) - fyk -+ fzz(katm) = fzz(katm) - fzk -+ -+ virord = virord - fxj*xj - fyj*yj - fzj*zj -+ virord = virord - fxk*xk - fyk*yk - fzk*zk -+ -+ strs1 = strs1 + xk*fxk + xj*fxj -+ strs2 = strs2 + xk*fyk + xj*fyj -+ strs3 = strs3 + xk*fzk + xj*fzj -+ strs5 = strs5 + yk*fyk + yj*fyj -+ strs6 = strs6 + yk*fzk + yj*fzj -+ strs9 = strs9 + zk*fzk + zj*fzj -+ -+ end do -+ end do -+ end do -+ -+c Complete stress tensor -+ -+ stress(1)=stress(1)+strs1 -+ stress(2)=stress(2)+strs2 -+ stress(3)=stress(3)+strs3 -+ stress(4)=stress(4)+strs2 -+ stress(5)=stress(5)+strs5 -+ stress(6)=stress(6)+strs6 -+ stress(7)=stress(7)+strs3 -+ stress(8)=stress(8)+strs6 -+ stress(9)=stress(9)+strs9 -+ -+ -+c Tidy up -+ -+ deallocate(xdf,stat=ierr(1)) -+ deallocate(ydf,stat=ierr(2)) -+ deallocate(zdf,stat=ierr(3)) -+ if (any(ierr/=0)) call Mfrz_Error(2547,0.d0) -+ -+ return -+ -+ end Subroutine Compute_Tetrahedral_Forces -+ -+ Subroutine Mfrz_Error(kode,arg) -+ -+c--------------------------------------------------------------------- -+c -+c Author W. Smith Daresbury Laboratory January 2011 -+c Adapted from D. Quigley - University of Warwick -+c Copyright D. Quigley October 2008 -+c -+c--------------------------------------------------------------------- -+ -+ use setup_module, only : nrite,nhist,nread,nconf,nstats, -+ x nrest,nfield,ntable,nevnt -+ -+ implicit none -+ integer,intent(in) :: kode -+ real(8),intent(in) :: arg -+ -+ if(onroot)then -+ -+ if(kode.eq.2500)then -+ -+ write(nrite,"( -+ x 'Error in number of collective variables - '// -+ x 'ncolvar too small?' -+ x )") -+ -+ elseif(kode.eq.2501)then -+ -+ write(nrite,"( -+ x 'Wang-Landau style recursion not yet implemented'// -+ x 'for ncolvar > 1' -+ x )") -+ -+ elseif(kode.eq.2502)then -+ -+ write(nrite,"('Unrecognised Gaussian height scheme')") -+ -+ elseif(kode.eq.2503)then -+ -+ write(nrite,"('Error maxhis exceeded in metadynamics')") -+ -+ elseif(kode.eq.2504)then -+ -+ write(nrite,"( -+ x 'Error allocating comms buffer in compute_bias_potential' -+ x )") -+ -+ elseif(kode.eq.2505)then -+ -+ write(nrite,"('Error allocating driven array')") -+ -+ elseif(kode.eq.2506)then -+ -+ write(nrite,"('Could not open METACONTROL')") -+ -+ elseif(kode.eq.2508)then -+ -+ write(nrite,"('Comms error in metadynamics setup')") -+ -+ elseif(kode.eq.2509)then -+ -+ write(nrite,"( -+ x 'Cannot bias local and global PE in same run' -+ x )") -+ -+ elseif(kode.eq.2510)then -+ -+ write(nrite,"('Error allocating local force arrays')") -+ -+ elseif(kode.eq.2511)then -+ -+ write(nrite,"( -+ x 'Error allocating collective variables arrays' -+ x )") -+ -+ elseif(kode.eq.2512)then -+ -+ write(nrite,"('Error allocating Wang-Landau bins')") -+ -+ elseif(kode.eq.2515)then -+ -+ write(nrite,"( -+ x 'Error allocating Steinhardt parameter arrays' -+ x )") -+ -+ elseif(kode.eq.2516)then -+ -+ write(nrite,"('Could not open STEINHARDT')") -+ -+ elseif(kode.eq.2517)then -+ -+ write(nrite,"('Error allocating q4site')") -+ -+ elseif(kode.eq.2518)then -+ -+ write(nrite,"('Error allocating q6site')") -+ -+ elseif(kode.eq.2519)then -+ -+ write(nrite,"('Error deallocating buff')") -+ -+ elseif(kode.eq.2521)then -+ -+ write(nrite,"('Error reading line ',i5,' of STEINHARDT' -+ x )")nint(arg) -+ -+ elseif(kode.eq.2522)then -+ -+ write(nrite,"( -+ x 'Error allocating Steinhardt parameter arrays' -+ x )") -+ -+ elseif(kode.eq.2523)then -+ -+ write(nrite,"('Could not open ZETA')") -+ -+ elseif(kode.eq.2524)then -+ -+ write(nrite,"('Error allocating zetasite')") -+ -+ elseif(kode.eq.2525)then -+ -+ write(nrite,"('Error allocating full neighbour list')") -+ -+ elseif(kode.eq.2527)then -+ -+ write(nrite,"( -+ x 'Number of collective variables incorrect for specified'// -+ x 'order parameters' -+ x )") -+ -+ elseif(kode.eq.2529)then -+ -+ write(nrite,"('Error reading line ',i5,' of ZETA' -+ x )")nint(arg) -+ -+ elseif(kode.eq.2531)then -+ -+ write(nrite,"('Comms error on reading METADYNAMICS')") -+ -+ elseif(kode.eq.2532)then -+ -+ write(nrite,"('Error in fc function - out of range')") -+ write(nrite,"('Value of r was ',1p,e14.6)")arg -+ -+ elseif(kode.eq.2533)then -+ -+ write(nrite,"( -+ x 'Error allocating solvation arrays for metadynamics' -+ x )") -+ -+ elseif(kode.eq.2534)then -+ -+ write(nrite,"('Error allocating comms buffer arrays')") -+ -+ elseif(kode.eq.2535)then -+ -+ write(nrite,"('Solvation list overrun')") -+ -+ elseif(kode.eq.2536)then -+ -+ write(nrite,"( -+ x 'Error deallocating solvation arrays for metadynamics' -+ x )") -+ -+ elseif(kode.eq.2537)then -+ -+ write(nrite,"('Error deallocating comms buffer arrays')") -+ -+ elseif(kode.eq.2538)then -+ -+ write(nrite,"( -+ x 'Error allocating solvation arrays for metadynamics' -+ x )") -+ -+ elseif(kode.eq.2540)then -+ -+ write(nrite,"('Error allocating force prefactor arrays')") -+ -+ elseif(kode.eq.2541)then -+ -+ write(nrite,"( -+ x 'Memory allocation error in compute_tet_nlist' -+ x )") -+ -+ elseif(kode.eq.2542)then -+ -+ write(nrite,"( -+ x 'Error in metafreeze_module.f90 mxninc too small' -+ x )") -+ -+ elseif(kode.eq.2543)then -+ -+ write(nrite,"('nnn too small in compute_tet_nlist')") -+ -+ elseif(kode.eq.2544)then -+ -+ write(nrite,"('mxflist too small in metafreeze_module')") -+ -+ elseif(kode.eq.2545)then -+ -+ write(nrite,"( -+ x 'Memory deallocation error in compute_tet_nlist' -+ x )") -+ -+ elseif(kode.eq.2546)then -+ -+ write(nrite,"( -+ x 'Memory allocation error in compute_tet_nlist' -+ x )") -+ -+ elseif(kode.eq.2547)then -+ -+ write(nrite,"( -+ x 'Memory deallocation error in compute_tet_nlist' -+ x )") -+ -+ elseif(kode.eq.2548)then -+ -+ write(nrite,"( -+ x 'Memory allocation error in compute_tet_nlist' -+ x )") -+ -+ endif -+ -+c close all i/o channels -+ -+ close (nrite) -+ close (nhist) -+ close (nread) -+ close (nconf) -+ close (nstats) -+ close (nrest) -+ close (nfield) -+ close (ntable) -+ close (nevnt) -+ close (stn) -+ close (zta) -+ close (mtd) -+ -+ endif -+ -+c shut down communications -+ -+ call gsync() -+ call exitcomms() -+ -+ end Subroutine Mfrz_Error -+ -+ end module metafreeze_module -+ -diff -urN dl_class_1.9.orig/srcmod/metal_module.f dl_class_1.9/srcmod/metal_module.f ---- dl_class_1.9.orig/srcmod/metal_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/metal_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,1669 @@ -+ module metal_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining metal potential arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use pair_module -+ use parse_module -+ use property_module -+ use setup_module -+ use site_module -+ use utility_module -+ -+ implicit none -+ -+ logical lmetab -+ integer, allocatable :: ltpmet(:),lstmet(:) -+ real(8), allocatable :: prmmet(:,:),vmet(:,:,:),dmet(:,:,:) -+ real(8), allocatable :: rho(:),elrcm(:),vlrcm(:),fmet(:,:,:) -+ -+ save lmetab,ltpmet,lstmet,prmmet,vmet,dmet,fmet,rho,elrcm,vlrcm -+ -+ contains -+ -+ subroutine alloc_met_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ integer i,fail,idnode -+ -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (ltpmet(mxmet),stat=fail(1)) -+ allocate (lstmet(mxmet),stat=fail(2)) -+ allocate (prmmet(mxmet,mxpmet),stat=fail(3)) -+ allocate (vmet(mxgrid,mxmet,2),stat=fail(4)) -+ allocate (dmet(mxgrid,mxmet,2),stat=fail(5)) -+ allocate (rho(mxatms),stat=fail(6)) -+ allocate (elrcm(0:mxsmet),stat=fail(7)) -+ allocate (vlrcm(0:mxsmet),stat=fail(8)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1280) -+ enddo -+ -+ end subroutine alloc_met_arrays -+ -+ subroutine define_metals -+ x (safe,lunits,lmols,idnode,ntpmet,ntpatm,rmet,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining metal potentials -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits,lmols -+ character*8 keyword -+ character*8 atom1,atom2 -+ character*1 message(80) -+ integer idnode,ntpmet,ntpatm,idum,imet,j -+ integer keypot,numpar,katm1,katm2,keymet,ntab,i,fail,itpmet -+ integer jtpatm -+ real(8) rmet,engunit -+ -+ real(8), allocatable :: parpot(:) -+ allocate (parpot(mxpmet),stat=fail) -+ -+ ntpmet=intstr(record,lenrec,idum) -+ -+ lmetab=.false. -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'number of specified metal ', -+ x 'potentials',i10)") ntpmet -+ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ',3x, -+ x ' key',30x,'parameters'/,/)") -+ -+ endif -+ -+ if(ntpmet.ge.mxmet) call error(idnode,71) -+ if(.not.lunits) call error(idnode,6) -+ if(.not.lmols) call error(idnode,13) -+ -+ do imet=1,mxmet -+ lstmet(imet)=0 -+ ltpmet(imet)=0 -+ enddo -+ -+ do itpmet=1,ntpmet -+ -+ do i=1,mxpmet -+ parpot(i)=0.d0 -+ enddo -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call getword(atom1,record,8,lenrec) -+ call getword(atom2,record,8,lenrec) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'stch') then -+ keypot=1 -+ numpar=5 -+ else if(keyword(1:4).eq.'fnsc') then -+ keypot=2 -+ numpar=7 -+ else if(keyword(1:4).eq.'gupt') then -+ keypot=3 -+ numpar=5 -+ elseif(keyword(1:4).eq.'eam ') then -+ keypot=999 -+ lmetab=.true. -+ numpar=0 -+ else -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,461) -+ endif -+ -+ if(.not.lmetab)then -+ -+ parpot(1)=dblstr(record,lenrec,idum) -+ parpot(2)=dblstr(record,lenrec,idum) -+ parpot(3)=dblstr(record,lenrec,idum) -+ parpot(4)=dblstr(record,lenrec,idum) -+ parpot(5)=dblstr(record,lenrec,idum) -+ parpot(6)=dblstr(record,lenrec,idum) -+ parpot(7)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(16x,2a8,2x,a4,3x,1p,9e13.5)") -+ x atom1,atom2,keyword(1:4),(parpot(j),j=1,numpar) -+ -+ endif -+ -+ katm1=0 -+ katm2=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm -+ -+ enddo -+ -+ if(katm1.eq.0.or.katm2.eq.0) then -+ call error(idnode,463) -+ endif -+ -+ keymet=loc2(katm1,katm2) -+ -+c convert energies to internal unit -+ -+ if(keymet.ge.mxmet) call error(idnode,465) -+ -+ parpot(1)=parpot(1)*engunit -+ -+ if(keypot.eq.2)then -+ -+ parpot(2)=parpot(2)*engunit -+ parpot(3)=parpot(3)*engunit -+ parpot(5)=parpot(5)*engunit -+ -+ endif -+ -+ if(keypot.eq.3)then -+ parpot(4)=parpot(4)*engunit -+ endif -+ -+ if(lstmet(keymet).ne.0) call error(idnode,141) -+ lstmet(keymet)=itpmet -+ ltpmet(itpmet)=keypot -+ if(itpmet.gt.1)then -+ if(keypot.ne.ltpmet(itpmet-1))call error(idnode,72) -+ endif -+ -+ if(.not.lmetab)then -+ -+ do i=1,numpar -+ prmmet(itpmet,i)=parpot(i) -+ enddo -+ -+ endif -+ -+ enddo -+ -+c check for unspecified atom-atom potentials -+ -+ ntab=(ntpatm*(ntpatm+1))/2 -+ -+ if(ntpmet.lt.ntab) then -+ -+ call warning(idnode,110,0.d0,0.d0,0.d0) -+ -+ do i=1,ntab -+ if(lstmet(i).eq.0) lstmet(i)=ntpmet+1 -+ enddo -+ -+c set zero potential for undefined interactions -+ -+ do i=1,mxmet -+ -+ vmet(1,i,1)=0.d0 -+ vmet(1,i,2)=0.d0 -+ dmet(1,i,1)=0.d0 -+ dmet(1,i,2)=0.d0 -+ -+ enddo -+ -+ endif -+ -+c generate metal force arrays -+ -+ call metgen(idnode,ntpatm,rmet) -+ -+ if(lmetab) -+ x call mettab(ntpatm,idnode,rmet,engunit) -+ -+ deallocate (parpot,stat=fail) -+ -+ return -+ end subroutine define_metals -+ -+ subroutine metdens -+ x (idnode,imcon,mxnode,natms,engmet,virden) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating local density in metals -+c using the verlet neighbour list and sutton-chen potentials -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1995 -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer idnode,imcon,mxnode,natms,i,j,k,ii,k0,l -+ real(8) engmet,engtmp,virden,rhosqr,rrr,ppp,fk0,fk1,fk2,t1,t2 -+ -+ safe=.true. -+ -+c initialise energy accumulator -+ -+ engmet=0.d0 -+ virden=0.d0 -+ -+c initialise density array -+ -+ do i=1,natms -+ rho(i)=0.d0 -+ enddo -+ -+c calculate local atomic density -+ -+ ii=0 -+ -+c outer loop over atoms -+ -+ do i=idnode+1,natms,mxnode -+ -+ ii=ii+1 -+ -+c calculate interatomic distances -+ -+ do k=1,lentry(ii) -+ -+ j=list(ii,k) -+ ilist(k)=j -+ xdf(k)=xxx(i)-xxx(j) -+ ydf(k)=yyy(i)-yyy(j) -+ zdf(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary conditions -+ -+ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) -+ -+c square of distances -+ -+ do k=1,lentry(ii) -+ rsqdf(k)=xdf(k)**2+ydf(k)**2+zdf(k)**2 -+ enddo -+ -+ if(lmetab)then -+ -+c calculate EAM density contributions -+ -+ call eamden(safe,i,lentry(ii)) -+ -+ else -+ -+c calculate FS density contributions -+ -+ call fsden(safe,i,lentry(ii)) -+ -+ endif -+ -+ enddo -+ -+c global sum of local atomic densities -+ -+ if(mxnode.gt.1)call gdsum(rho,natms,buffer) -+ -+c calculate embedding energy -+ -+ if(lmetab)then -+ -+c density terms for eam potentials -+ -+ do i=1,natms -+ -+ if(rho(i).gt.0.d0)then -+ -+ k0=ltype(i) -+ rrr=rho(i)-fmet(2,k0,1) -+ l=min(nint(rrr/fmet(4,k0,1)),int(fmet(1,k0,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ -+ else -+ -+ ppp=(rrr/fmet(4,k0,1))-dble(l) -+ -+c calculate embedding energy using 3-point interpolation -+ -+ fk0=fmet(l-1,k0,1) -+ fk1=fmet(l,k0,1) -+ fk2=fmet(l+1,k0,1) -+ -+ t1=fk1+(fk1-fk0)*ppp -+ t2=fk1+(fk2-fk1)*ppp -+ if(ppp.lt.0.d0)then -+ engtmp=-(t1+0.5d0*(t2-t1)*(ppp+1.d0)) -+ else -+ engtmp=-(t2+0.5d0*(t2-t1)*(ppp-1.d0)) -+ endif -+ -+ engmet=engmet+engtmp -+ -+c calculate derivative of embedding function wrt density using 3-point -+c interpolation - store result in rho array -+ -+ fk0=fmet(l-1,k0,2) -+ fk1=fmet(l,k0,2) -+ fk2=fmet(l+1,k0,2) -+ -+ t1=fk1+(fk1-fk0)*ppp -+ t2=fk1+(fk2-fk1)*ppp -+ if(ppp.lt.0.d0)then -+ rho(i)=(t1+0.5d0*(t2-t1)*(ppp+1.d0)) -+ else -+ rho(i)=(t2+0.5d0*(t2-t1)*(ppp-1.d0)) -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ else -+ -+c analytical square root of density dependence -+ -+ do i=1,natms -+ -+ if(rho(i).gt.0.d0)then -+ -+ rhosqr=sqrt(rho(i)+elrcm(ltype(i))) -+ engmet=engmet+rhosqr -+ rho(i)=0.5d0/rhosqr -+ virden=virden+vlrcm(ltype(i))/rhosqr -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ engmet=-engmet/dble(mxnode) -+ virden=virden/dble(mxnode) -+ -+c check interpolation is safe -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,142) -+ -+ return -+ end subroutine metdens -+ -+ subroutine fsden(safe,iatm,ik) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating local atomic density -+c for FS type metal potentials -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer iatm,jatm,ik,m,k0,l -+ real(8) rdr,ai,aj,ab,rsq,rrr,ppp,t1,t2 -+ real(8) vk0,vk1,vk2,density -+ -+c start of primary loop for density -+ -+ ai=dble(ltype(iatm)) -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ jatm=ilist(m) -+ -+ aj=dble(ltype(jatm)) -+ if(ai.gt.aj) then -+ ab=ai*(ai-1.d0)*0.5d0+aj+0.5d0 -+ else -+ ab=aj*(aj-1.d0)*0.5d0+ai+0.5d0 -+ endif -+ -+ k0=lstmet(int(ab)) -+ -+ if((ltpmet(k0).ge.1).and.(abs(dmet(1,k0,1)).gt.0.d0))then -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+c apply cutoff condition -+ -+ if(rsq.le.dmet(3,k0,1)**2)then -+ -+c interpolation parameters -+ -+ rdr=1.d0/dmet(4,k0,1) -+ rrr=sqrt(rsq)-dmet(2,k0,1) -+ l=min(nint(rrr*rdr),int(dmet(1,k0,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ -+ else -+ -+ ppp=rrr*rdr-dble(l) -+ -+c calculate density using 3-point interpolation -+ -+ vk0=dmet(l-1,k0,1) -+ vk1=dmet(l,k0,1) -+ vk2=dmet(l+1,k0,1) -+ -+ t1=vk1+ppp*(vk1-vk0) -+ t2=vk1+ppp*(vk2-vk1) -+ if(ppp.lt.0.d0)then -+ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ if(ai.gt.aj)then -+ -+ rho(iatm)=rho(iatm)+density*dmet(1,k0,2) -+ rho(jatm)=rho(jatm)+density*dmet(2,k0,2) -+ -+ else -+ -+ rho(iatm)=rho(iatm)+density*dmet(2,k0,2) -+ rho(jatm)=rho(jatm)+density*dmet(1,k0,2) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine fsden -+ -+ subroutine eamden(safe,iatm,ik) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating local atomic density -+c for EAM type metal potentials -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ logical safe -+ integer iatm,jatm,ik,m,l,ktyp1,ktyp2 -+ real(8) rdr,rsq,rrr,ppp,t1,t2 -+ real(8) vk0,vk1,vk2,density -+ -+c start of primary loop for density -+ -+ ktyp1=ltype(iatm) -+ -+ do m=1,ik -+ -+c first metal atom density -+ -+ jatm=ilist(m) -+ ktyp2=ltype(jatm) -+ -+ if(abs(dmet(1,ktyp2,1)).gt.0.d0)then -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+ if(rsq.le.dmet(3,ktyp2,1)**2)then -+ -+c interpolation parameters -+ -+ rdr=1.d0/dmet(4,ktyp2,1) -+ rrr=sqrt(rsq)-dmet(2,ktyp2,1) -+ l=min(nint(rrr*rdr),int(dmet(1,ktyp2,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ -+ else -+ -+ ppp=rrr*rdr-dble(l) -+ -+c calculate density using 3-point interpolation -+ -+ vk0=dmet(l-1,ktyp2,1) -+ vk1=dmet(l,ktyp2,1) -+ vk2=dmet(l+1,ktyp2,1) -+ -+ t1=vk1+ppp*(vk1-vk0) -+ t2=vk1+ppp*(vk2-vk1) -+ if(ppp.lt.0.d0)then -+ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ rho(iatm)=rho(iatm)+density -+ if(ktyp1.eq.ktyp2)rho(jatm)=rho(jatm)+density -+ -+ endif -+ -+ endif -+ -+ endif -+ -+c second metal atom density -+ -+ if(ktyp1.ne.ktyp2)then -+ -+ if(abs(dmet(1,ktyp1,1)).gt.0.d0)then -+ -+c apply truncation of potential -+ -+ if(rsq.le.dmet(3,ktyp1,1)**2)then -+ -+c interpolation parameters -+ -+ rdr=1.d0/dmet(4,ktyp1,1) -+ rrr=sqrt(rsq)-dmet(2,ktyp1,1) -+ l=min(nint(rrr*rdr),int(dmet(1,ktyp1,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ -+ else -+ -+ ppp=rrr*rdr-dble(l) -+ -+c calculate density using 3-point interpolation -+ -+ vk0=dmet(l-1,ktyp1,1) -+ vk1=dmet(l,ktyp1,1) -+ vk2=dmet(l+1,ktyp1,1) -+ -+ t1=vk1+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*ppp -+ if(ppp.lt.0.d0)then -+ density=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ density=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ rho(jatm)=rho(jatm)+density -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine eamden -+ -+ subroutine metfrc(safe,iatm,ik,engmet,virmet) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating metal forces -+c for EAM and FS potentials using a verlet neighbour list -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer iatm,jatm,ik,m,k0,l,ld,ktyp1,ktyp2 -+ real(8) engmet,virmet,strs -+ real(8) rdr,rsq,rrr,ppp,vk0,vk1,vk2,t1,t2,gk0,gk1,gk2 -+ real(8) gamma,gamma1,gamma2,gamma3,fx,fy,fz,fi -+ dimension fi(3),strs(6) -+ -+CDIR$ CACHE_ALIGN fi -+ -+c initialise potential energy and virial -+ -+ engmet=0.d0 -+ virmet=0.d0 -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ -+c store forces for iatm -+ -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ ktyp1=ltype(iatm) -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ jatm=ilist(m) -+ ktyp2=ltype(jatm) -+ k0=lstmet(loc2(ktyp1,ktyp2)) -+ -+ if((ltpmet(k0).gt.0).and.(abs(vmet(1,k0,1)).gt.0.d0))then -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+ if(rsq.le.vmet(3,k0,1)**2)then -+ -+c interpolation parameters -+ -+ rdr=1.d0/vmet(4,k0,1) -+ rrr=sqrt(rsq)-vmet(2,k0,1) -+ l=min(nint(rrr*rdr),int(vmet(1,k0,1))-1) -+ if(l.lt.1)then -+ -+ safe=.false. -+ gamma1=0.d0 -+ -+ else -+ -+ ppp=rrr*rdr-dble(l) -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0=vmet(l-1,k0,1) -+ vk1=vmet(l,k0,1) -+ vk2=vmet(l+1,k0,1) -+ -+ t1=vk1+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*ppp -+ if(ppp.lt.0.d0)then -+ engmet=engmet+t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ engmet=engmet+t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+c calculate pair forces using 3-point interpolation -+ -+ gk0=vmet(l-1,k0,2) -+ gk1=vmet(l,k0,2) -+ gk2=vmet(l+1,k0,2) -+ -+ t1=gk1+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*ppp -+ if(ppp.lt.0.d0)then -+ gamma1=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ gamma1=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ endif -+ -+c calculate embedding forces using 3-point interpolation -+ -+ if(lmetab)then -+ -+ if(rsq.le.dmet(3,ktyp2,1)**2)then -+ -+ rdr=1.d0/dmet(4,ktyp2,1) -+ rrr=sqrt(rsq)-dmet(2,ktyp2,1) -+ ld=min(nint(rrr*rdr),int(dmet(1,ktyp2,1))-1) -+ if(ld.lt.1)then -+ -+ safe=.false. -+ gamma2=0.d0 -+ -+ else -+ -+ ppp=rrr*rdr-dble(ld) -+ -+ gk0=dmet(ld-1,ktyp2,2) -+ gk1=dmet(ld,ktyp2,2) -+ gk2=dmet(ld+1,ktyp2,2) -+ -+ t1=gk1+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*ppp -+ if(ppp.lt.0.d0)then -+ gamma2=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ gamma2=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ endif -+ -+ else -+ -+ gamma2=0.d0 -+ -+ endif -+ -+ if(ktyp1.eq.ktyp2)then -+ -+ gamma3=gamma2 -+ -+ elseif(rsq.le.dmet(3,ktyp1,1)**2)then -+ -+ rdr=1.d0/dmet(4,ktyp1,1) -+ rrr=sqrt(rsq)-dmet(2,ktyp1,1) -+ ld=min(nint(rrr*rdr),int(dmet(1,ktyp1,1))-1) -+ if(ld.lt.1)then -+ -+ safe=.false. -+ gamma3=0.d0 -+ -+ else -+ -+ ppp=rrr*rdr-dble(ld) -+ gk0=dmet(ld-1,ktyp1,2) -+ gk1=dmet(ld,ktyp1,2) -+ gk2=dmet(ld+1,ktyp1,2) -+ -+ t1=gk1+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*ppp -+ if(ppp.lt.0.d0)then -+ gamma3=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ gamma3=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ endif -+ -+ else -+ -+ gamma3=0.d0 -+ -+ endif -+ -+ gamma=(gamma1+(gamma2*rho(iatm)+gamma3*rho(jatm)))/rsq -+ -+ else -+ -+ if(safe.and.rsq.le.dmet(3,k0,1)**2)then -+ -+ gk0=dmet(l-1,k0,2) -+ gk1=dmet(l,k0,2) -+ gk2=dmet(l+1,k0,2) -+ -+ t1=gk1+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*ppp -+ if(ppp.lt.0.d0)then -+ gamma2=t1+0.5d0*(t2-t1)*(ppp+1.d0) -+ else -+ gamma2=t2+0.5d0*(t2-t1)*(ppp-1.d0) -+ endif -+ -+ else -+ -+ gamma2=0.d0 -+ -+ endif -+ -+ if(ktyp1.gt.ktyp2)then -+ -+ gamma=(gamma1-gamma2*(rho(iatm)*dmet(1,k0,2)+ -+ x rho(jatm)*dmet(2,k0,2)))/rsq -+ -+ else -+ -+ gamma=(gamma1-gamma2*(rho(iatm)*dmet(2,k0,2)+ -+ x rho(jatm)*dmet(1,k0,2)))/rsq -+ -+ endif -+ -+ endif -+ -+c calculate forces -+ -+ fx=gamma*xdf(m) -+ fy=gamma*ydf(m) -+ fz=gamma*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+c calculate virial -+ -+ virmet=virmet-gamma*rsq -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ return -+ end subroutine metfrc -+ -+ subroutine metgen(idnode,ntpatm,rmet) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for generating potential energy and -+c force arrays for metal potentials -+c -+c copyright - daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,kmet,mmet,katm1,katm2,ntpatm,imet,nmet -+ integer idnode,nnn,mmm -+ real(8) dlrpot,rmet,rrr,eps,sig,cc0,cc1,cc2,ccc -+ real(8) ddd,bet,cut1,cut2,aaa,rr0,ppp,qqq -+ -+c define grid resolution for potential arrays -+ -+ dlrpot=rmet/dble(mxgrid-1) -+ -+c construct arrays for metal potentials -+ -+ kmet=0 -+ do katm1=1,ntpatm -+ -+ do katm2=1,katm1 -+ -+ kmet=kmet+1 -+ imet=lstmet(kmet) -+ -+ if(ltpmet(imet).gt.0)then -+ -+c store array specification parameters -+ -+ vmet(1,imet,1)=dble(mxgrid) -+ vmet(2,imet,1)=0.d0 -+ vmet(3,imet,1)=rmet -+ vmet(4,imet,1)=dlrpot -+ -+ do i=1,4 -+ -+ vmet(i,imet,2)=vmet(i,imet,1) -+ dmet(i,imet,1)=vmet(i,imet,1) -+ dmet(i,imet,2)=0.d0 -+ -+ enddo -+ -+ if(ltpmet(imet).eq.1)then -+ -+c sutton-chen potentials -+ -+ eps=prmmet(imet,1) -+ sig=prmmet(imet,2) -+ nnn=nint(prmmet(imet,3)) -+ mmm=nint(prmmet(imet,4)) -+ -+ do i=5,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ vmet(i,imet,1)=eps*(sig/rrr)**nnn -+ vmet(i,imet,2)=dble(nnn)*eps*(sig/rrr)**nnn -+ dmet(i,imet,1)=(sig/rrr)**mmm -+ dmet(i,imet,2)=dble(mmm)*(sig/rrr)**mmm -+ -+ enddo -+ -+ if(katm1.eq.katm2)then -+ -+ dmet(1,imet,2)=(prmmet(imet,1)*prmmet(imet,5))**2 -+ dmet(2,imet,2)=(prmmet(imet,1)*prmmet(imet,5))**2 -+ -+ else -+ -+ nmet=lstmet((katm1*(katm1+1))/2) -+ mmet=lstmet((katm2*(katm2+1))/2) -+ dmet(1,imet,2)=(prmmet(nmet,1)*prmmet(nmet,5))**2 -+ dmet(2,imet,2)=(prmmet(mmet,1)*prmmet(mmet,5))**2 -+ -+ endif -+ -+ else if(ltpmet(imet).eq.2)then -+ -+c finnis sinclair potentials -+ -+ cc0=prmmet(imet,1) -+ cc1=prmmet(imet,2) -+ cc2=prmmet(imet,3) -+ ccc=prmmet(imet,4) -+ ddd=prmmet(imet,6) -+ bet=prmmet(imet,7) -+ cut1=ccc+4.d0*dlrpot -+ cut2=ddd+4.d0*dlrpot -+ -+ do i=5,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ vmet(i,imet,1)=0.d0 -+ vmet(i,imet,2)=0.d0 -+ dmet(i,imet,1)=0.d0 -+ dmet(i,imet,2)=0.d0 -+ -+ if(rrr.le.cut1)then -+ -+ vmet(i,imet,1)=(cc0+cc1*rrr+cc2*rrr*rrr)*(rrr-ccc)**2 -+ vmet(i,imet,2)=-rrr*(2.d0*(cc0+cc1*rrr+cc2*rrr*rrr)* -+ x (rrr-ccc)+(cc1+2.d0*cc2*rrr)*(rrr-ccc)**2) -+ -+ endif -+ -+ if(rrr.le.cut2)then -+ -+ dmet(i,imet,1)=(rrr-ddd)**2+bet*(rrr-ddd)**3/ddd -+ dmet(i,imet,2)=-rrr*(2.d0*(rrr-ddd)+ -+ x 3.d0*bet*(rrr-ddd)**2/ddd) -+ -+ endif -+ -+ enddo -+ -+ if(katm1.eq.katm2)then -+ -+ dmet(1,imet,2)=prmmet(imet,5)**2 -+ dmet(2,imet,2)=prmmet(imet,5)**2 -+ -+ else -+ -+ nmet=lstmet((katm1*(katm1+1))/2) -+ mmet=lstmet((katm2*(katm2+1))/2) -+ dmet(1,imet,2)=prmmet(nmet,5)**2 -+ dmet(2,imet,2)=prmmet(mmet,5)**2 -+ -+ endif -+ -+ else if(ltpmet(imet).eq.3)then -+ -+c gupta potentials -+ -+ aaa=prmmet(imet,1) -+ rr0=prmmet(imet,2) -+ ppp=prmmet(imet,3) -+ qqq=prmmet(imet,5) -+ -+ do i=5,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ vmet(i,imet,1)=aaa*exp(-ppp*(rrr-rr0)/rr0) -+ vmet(i,imet,2)=vmet(i,imet,1)*rrr*ppp/rr0 -+ dmet(i,imet,1)=exp(-2.d0*qqq*(rrr-rr0)/rr0) -+ dmet(i,imet,2)=2.d0*dmet(i,imet,1)*rrr*qqq/rr0 -+ -+ enddo -+ -+ dmet(1,imet,2)=prmmet(imet,4)**2 -+ dmet(2,imet,2)=prmmet(imet,4)**2 -+ -+ else if(.not.lmetab)then -+ -+ call error(idnode,151) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine metgen -+ -+ subroutine lrcmetal -+ x (idnode,imcon,natms,ntpatm,engunit,rmet,volm) -+ -+c************************************************************************* -+c -+c DL_POLY subroutine to evaluate long-range corrections to -+c pressure and energy in a periodic metal system. -+c -+c copyright daresbury laboratory -+c author - w. smith june 1995 -+c amended - w. smith march 2006 -+c -+c*************************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,imcon,natms,ntpatm,i,ka,j -+ integer kmet,k0,k1,k2 -+ real(8) engunit,rmet,volm,twopi,forpi,eps,sig,nnn,mmm,ccc -+ real(8) elrcm0,elrcm1,elrcm2,vlrcm0,vlrcm1,vlrcm2,aaa,rr0,ppp -+ real(8) zet,qqq,eee -+ -+ save newjob -+ data newjob/.true./ -+ -+ twopi=2.0d0*pi -+ forpi=4.0d0*pi -+ -+c initalise counter arrays -+ -+ do i=1,mxsmet -+ numtyp(i)=0 -+ enddo -+ -+c evaluate species populations in system -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ numtyp(ka)=numtyp(ka)+1 -+ -+ enddo -+ -+c number densities -+ -+ do i=1,ntpatm -+ dens(i)=dble(numtyp(i))/volm -+ enddo -+ -+c long range corrections to density, energy and pressure -+ -+ do i=0,mxsmet -+ -+ elrcm(i)=0.d0 -+ vlrcm(i)=0.d0 -+ -+ enddo -+ -+ if(imcon.ne.0.and.imcon.ne.6) then -+ -+ kmet=0 -+ do i=1,ntpatm -+ -+ do j=1,i -+ -+ elrcm0=0.d0 -+ elrcm1=0.d0 -+ elrcm2=0.d0 -+ vlrcm0=0.d0 -+ vlrcm1=0.d0 -+ vlrcm2=0.d0 -+ -+ kmet=kmet+1 -+ k0=lstmet(kmet) -+ -+ if(ltpmet(k0).eq.1) then -+ -+c sutton-chen potentials -+ -+ eps=prmmet(k0,1) -+ sig=prmmet(k0,2) -+ nnn=prmmet(k0,3) -+ mmm=prmmet(k0,4) -+ ccc=prmmet(k0,5) -+ -+ elrcm0=eps*sig**3*(sig/rmet)**(nnn-3.d0)/(nnn-3.d0) -+ vlrcm0=eps*nnn*sig**3*(sig/rmet)**(nnn-3.d0)/(nnn-3.d0) -+ if(i.ne.j) then -+ elrcm0=elrcm0*2.d0 -+ vlrcm0=vlrcm0*2.d0 -+ endif -+ elrcm(0)=elrcm(0)+twopi*volm*dens(i)*dens(j)*elrcm0 -+ vlrcm(0)=vlrcm(0)-twopi*volm*dens(i)*dens(j)*vlrcm0 -+ -+ if(i.eq.j) then -+ -+ elrcm1=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (eps*ccc)**2 -+ elrcm(i)=elrcm(i)+forpi*dens(i)*elrcm1 -+ -+ vlrcm1=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (eps*ccc)**2 -+ vlrcm(i)=vlrcm(i)+twopi*dens(i)*vlrcm1 -+ -+ else -+ -+ k1=lstmet((i*(i+1))/2) -+ k2=lstmet((j*(j+1))/2) -+ elrcm1=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (prmmet(k1,1)*prmmet(k1,5))**2 -+ elrcm2=sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (prmmet(k2,1)*prmmet(k2,5))**2 -+ elrcm(i)=elrcm(i)+forpi*dens(j)*elrcm1 -+ elrcm(j)=elrcm(j)+forpi*dens(i)*elrcm2 -+ -+ vlrcm1=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (prmmet(k1,1)*prmmet(k1,5))**2 -+ vlrcm2=mmm*sig**3*(sig/rmet)**(mmm-3.d0)/(mmm-3.d0)* -+ x (prmmet(k2,1)*prmmet(k2,5))**2 -+ vlrcm(i)=vlrcm(i)+twopi*dens(j)*vlrcm1 -+ vlrcm(j)=vlrcm(j)+twopi*dens(i)*vlrcm2 -+ -+ endif -+ -+ else if(ltpmet(k0).eq.3) then -+ -+c gupta potentials -+ -+ aaa=prmmet(k0,1) -+ rr0=prmmet(k0,2) -+ ppp=prmmet(k0,3) -+ zet=prmmet(k0,4) -+ qqq=prmmet(k0,5) -+ eee=exp(-ppp*(rmet-rr0)/rr0) -+ -+ elrcm0=aaa*(rr0/ppp)*(rmet**2+2.d0*rmet*(rr0/ppp)+ -+ x 2.d0*(rr0/ppp)**2)*eee -+ vlrcm0=aaa*(rmet**3+3.d0*rmet**2*(rr0/ppp)+ -+ x 6.d0*rmet*(rr0/ppp)**2+6.d0*(rr0/rmet)**3)*eee -+ if(i.ne.j) then -+ elrcm0=elrcm0*2.d0 -+ vlrcm0=vlrcm0*2.d0 -+ endif -+ elrcm(0)=elrcm(0)+twopi*volm*dens(i)*dens(j)*elrcm0 -+ vlrcm(0)=vlrcm(0)-twopi*volm*dens(i)*dens(j)*vlrcm0 -+ -+ eee=exp(-2.d0*qqq*(rmet-rr0)/rr0) -+ -+ if(i.eq.j) then -+ -+ elrcm1=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ -+ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee*zet**2 -+ elrcm(i)=elrcm(i)+forpi*dens(i)*elrcm1 -+ -+ vlrcm1=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ -+ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* -+ x eee*zet**2 -+ vlrcm(i)=vlrcm(i)+twopi*dens(i)*vlrcm1 -+ -+ else -+ -+ elrcm1=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ -+ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee* -+ x zet**2 -+ elrcm2=(rmet**2+2.d0*rmet*(0.5d0*rr0/qqq)+ -+ x 2.d0*(0.5d0*rr0/qqq)**2)*(0.5d0*rr0/qqq)*eee* -+ x zet**2 -+ elrcm(i)=elrcm(i)+forpi*dens(j)*elrcm1 -+ elrcm(j)=elrcm(j)+forpi*dens(i)*elrcm2 -+ -+ vlrcm1=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ -+ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* -+ x eee*zet**2 -+ vlrcm2=(rmet**3+3.d0*rmet**2*(0.5d0*rr0/qqq)+ -+ x 6.d0*rmet*(0.5d0*rr0/qqq)**2+(0.5d0*rr0/qqq)**3)* -+ x eee*zet**2 -+ vlrcm(i)=vlrcm(i)+twopi*dens(j)*vlrcm1 -+ vlrcm(j)=vlrcm(j)+twopi*dens(i)*vlrcm2 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(newjob)then -+ -+ newjob=.false. -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,/, -+ x 'long range corrections for metal potentials',/)") -+ write(nrite, -+ x "('short range energy and virial corrections:', -+ x 1p,2e15.6,/)") -+ x elrcm(0)/engunit,vlrcm(0)/engunit -+ write(nrite, -+ x "('density dependent energy and virial corrections',/)") -+ -+ do i=1,ntpatm -+ -+ kmet=lstmet((i*(i+1))/2) -+ if(lstmet(kmet).gt.0)then -+ -+ write(nrite,"(25x,a8,1p,2e15.6)")unqatm(i), -+ x elrcm(i)/engunit,vlrcm(i)/engunit -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine lrcmetal -+ -+ subroutine mettab(ntpatm,idnode,rmet,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for reading potential energy and -+c force arrays for EAM metal forces only -+c -+c copyright - daresbury laboratory -+c author - w. smith march 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 atom1,atom2,type -+ integer idnode,ntpatm,idum,fail -+ integer imet,katm1,katm2,jtpatm,i,j,k,ktype -+ integer numpot,numpts,ipot -+ real(8) rmet,engunit,start,finish -+ data fail/0/ -+ -+c allocate embedding array -+ -+ allocate(fmet(mxgrid,mxmet,2),stat=fail) -+ if(fail.ne.0)call error(idnode,36) -+ -+c define zero function for undefined interactions -+ -+ do i=1,mxmet -+ -+ fmet(1,i,1)=0.d0 -+ fmet(1,i,2)=0.d0 -+ -+ enddo -+ -+ if(idnode.eq.0)open (ntable,file='TABEAM') -+ -+c skip header record -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_eamtable_read(idnode,ntable) -+ -+c read number of potential functions in file -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_eamtable_read(idnode,ntable) -+ numpot=intstr(record,lenrec,idum) -+ -+ do ipot=1,numpot -+ -+c read data type, atom labels, number of points, start and end -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_eamtable_read(idnode,ntable) -+ -+c indentify data type -+ -+ ktype=1 -+ if(findstring('dens',record,idum).or. -+ x findstring('DENS',record,idum))ktype=2 -+ if(findstring('embe',record,idum).or. -+ x findstring('EMBE',record,idum))ktype=3 -+ call getword(type,record,8,lenrec) -+ -+c identify atom types -+ -+ call getword(atom1,record,8,lenrec) -+ if(ktype.eq.1)then -+ call getword(atom2,record,8,lenrec) -+ else -+ atom2=atom1 -+ endif -+ -+c data specifiers -+ -+ numpts=intstr(record,lenrec,idum) -+ start=dblstr(record,lenrec,idum) -+ finish=dblstr(record,lenrec,idum) -+ -+c check atom indentities -+ -+ katm1=0 -+ katm2=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm -+ -+ enddo -+ -+ if(katm1.eq.0.or.katm2.eq.0) then -+ if(idnode.eq.0) -+ x write(nrite,'(a)') ' **** '//atom1//' *** '//atom2//' ****' -+ call error(idnode,81) -+ endif -+ -+c check array dimensions -+ -+ if(mxbuff.lt.numpts+4)then -+ -+ if(idnode.eq.0) -+ x write(nrite,*) 'mxbuff must be >=',numpts+4,' in mettab' -+ call error(idnode,28) -+ -+ endif -+ -+c store working parameters (start shifted for DL_POLY interpolation) -+ -+ buffer(1)=dble(numpts+4) -+ buffer(4)=(finish-start)/dble(numpts-1) -+ buffer(2)=start-5.d0*buffer(4) -+ buffer(3)=finish -+ if(idnode.eq.0) -+ x write(nrite,"(16x,2a8,2x,a4,3x,1p,4e13.5)") -+ x atom1,atom2,type,dble(numpts),start,finish,buffer(4) -+ -+c read potential arrays -+ -+ k=4 -+ do j=1,(numpts+3)/4 -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_eamtable_read(idnode,ntable) -+ buffer(k+1)=dblstr(record,lenrec,idum) -+ buffer(k+2)=dblstr(record,lenrec,idum) -+ buffer(k+3)=dblstr(record,lenrec,idum) -+ buffer(k+4)=dblstr(record,lenrec,idum) -+ k=k+4 -+ -+ enddo -+ -+c copy data to internal arrays -+ -+ if(ktype.eq.1)then -+ -+c check range against specified cutoff -+ -+ if(rmet.lt.finish)call error(idnode,26) -+ -+c identify potential -+ -+ imet=lstmet(loc2(katm1,katm2)) -+ -+c pair potential terms -+ -+ vmet(1,imet,1)=buffer(1) -+ vmet(2,imet,1)=buffer(2) -+ vmet(3,imet,1)=buffer(3) -+ vmet(4,imet,1)=buffer(4) -+ -+ do i=5,mxgrid -+ -+ if(i-4.gt.numpts)then -+ vmet(i,imet,1)=0.d0 -+ else -+ vmet(i,imet,1)=buffer(i)*engunit -+ buffer(i)=buffer(i)*engunit -+ endif -+ -+ enddo -+ -+c calculate derivative of pair potential function -+ -+ call metal_deriv(imet,vmet,buffer) -+ -+c adapt derivatives for use in interpolation -+ -+ do i=5,numpts+4 -+ vmet(i,imet,2)=-(dble(i)*buffer(4)+buffer(2))* -+ x vmet(i,imet,2) -+ enddo -+ -+ else if(ktype.eq.2)then -+ -+c check range against specified cutoff -+ -+ if(rmet.lt.finish)call error(idnode,26) -+ -+c density terms -+ -+ dmet(1,katm1,1)=buffer(1) -+ dmet(2,katm1,1)=buffer(2) -+ dmet(3,katm1,1)=buffer(3) -+ dmet(4,katm1,1)=buffer(4) -+ -+ do i=5,mxgrid -+ -+ if(i-4.gt.numpts)then -+ dmet(i,katm1,1)=0.d0 -+ else -+ dmet(i,katm1,1)=buffer(i) -+ endif -+ -+ enddo -+ -+c calculate derivative of density function -+ -+ call metal_deriv(katm1,dmet,buffer) -+ -+c adapt derivatives for use in interpolation -+ -+ dmet(1,katm1,2)=0.d0 -+ dmet(2,katm1,2)=0.d0 -+ dmet(3,katm1,2)=0.d0 -+ dmet(4,katm1,2)=0.d0 -+ do i=5,numpts+4 -+ dmet(i,katm1,2)=-(dble(i)*buffer(4)+buffer(2))* -+ x dmet(i,katm1,2) -+ enddo -+ -+ else if(ktype.eq.3)then -+ -+c embedding function arrays -+ -+ fmet(1,katm1,1)=buffer(1) -+ fmet(2,katm1,1)=buffer(2) -+ fmet(3,katm1,1)=buffer(3) -+ fmet(4,katm1,1)=buffer(4) -+ -+ do i=5,mxgrid -+ -+ if(i-4.gt.numpts)then -+ fmet(i,katm1,1)=0.d0 -+ else -+ fmet(i,katm1,1)=buffer(i)*engunit -+ buffer(i)=buffer(i)*engunit -+ endif -+ -+ enddo -+ -+c calculate derivative of embedding function -+ -+ call metal_deriv(katm1,fmet,buffer) -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)close (ntable) -+ -+ if(idnode.eq.0)write(nrite,'(/,/,1x,a)') -+ x 'potential tables read from TABEAM file' -+ -+ return -+ end subroutine mettab -+ -+ subroutine metal_deriv(ityp,vvv,buffer) -+ -+c********************************************************************** -+c -+c calculate numerical derivatives of tabulated EAM metal potentials -+c -+c copyright - daresbury laboratory -+c author - w.smith march 2006 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer ityp,i,npt -+ real(8) vvv,buffer,delmet,aa0,aa1,aa2,aa3,aa4,d1y,d2y,d3y,d4y -+ real(8) f0,f1,f2,f3,f4 -+ -+ dimension vvv(mxgrid,mxmet,2),buffer(mxbuff) -+ -+c interpolation parameters -+ -+ vvv(1,ityp,2)=buffer(1) -+ vvv(2,ityp,2)=buffer(2) -+ vvv(3,ityp,2)=buffer(3) -+ vvv(4,ityp,2)=buffer(4) -+ -+c construct interpolation table -+ -+ delmet=buffer(4) -+ npt=nint(buffer(1))-2 -+ do i=7,npt -+ -+ aa0=buffer(i) -+ f0=buffer(i-2)/aa0 -+ f1=buffer(i-1)/aa0 -+ f2=1.d0 -+ f3=buffer(i+1)/aa0 -+ f4=buffer(i+2)/aa0 -+ -+c calculate numerical differences for 5-point interpolation -+ -+ d1y=(f1-f0) -+ d2y=(f2-f1)-(f1-f0) -+ d3y=(f3-f0)+3.d0*(f1-f2) -+ d4y=(f4-f3)+3.d0*(f2-f3)+3.d0*(f2-f1)+(f0-f1) -+ -+c calculate polynomial coefficients -+ -+ aa0=aa0/delmet -+ aa4=d4y/24.d0 -+ aa3=(d3y+12.d0*aa4)/6.d0 -+ aa2=(d2y+6.d0*aa3-14.d0*aa4)/2.d0 -+ aa1=d1y+3.d0*aa2-7.d0*aa3+15.d0*aa4 -+ -+c calculate derivatives -+ -+ vvv(i,ityp,2)=aa1*aa0 -+ -+c derivatives at extremes of range -+ -+ if(i.eq.7)then -+ -+ vvv(5,ityp,2)=(aa1-4.d0*aa2+12.d0*aa3-32.d0*aa4)*aa0 -+ vvv(6,ityp,2)=(aa1-2.d0*aa2+3.d0*aa3-4.d0*aa4)*aa0 -+ -+ else if(i.eq.npt)then -+ -+ vvv(npt+1,ityp,2)=(aa1+2.d0*aa2+3.d0*aa3+4.d0*aa4)*aa0 -+ vvv(npt+2,ityp,2)=(aa1+4.d0*aa2+12.d0*aa3+32.d0*aa4)*aa0 -+ -+ endif -+ -+ enddo -+ -+c set derivatives to zero beyond end point of function -+ -+ do i=npt+3,mxgrid -+ vvv(i,ityp,2)=0.d0 -+ enddo -+ -+ return -+ end subroutine metal_deriv -+ -+ subroutine abort_eamtable_read(idnode,ntable) -+ -+c*********************************************************************** -+c -+c dl_poly error exit subroutine for reading TABEAM file -+c -+c copyright - daresbury laboratory -+c author - w. smith mar 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ integer idnode,ntable -+ -+ if(idnode.eq.0)close (ntable) -+ -+ call error(idnode,29) -+ -+ end subroutine abort_eamtable_read -+ -+ end module metal_module -diff -urN dl_class_1.9.orig/srcmod/neu_coul_module.f dl_class_1.9/srcmod/neu_coul_module.f ---- dl_class_1.9.orig/srcmod/neu_coul_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/neu_coul_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,731 @@ -+ module neu_coul_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining neutral group coulomb terms -+c copyright - daresbury laboratory -+c -+c author - w. smith aug 2006 -+c adapted - p.-a. cazade oct 2007 : solvation, free energy etc -+c adapted - w. smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use ewald_module -+ use metafreeze_module -+ use pair_module -+ use setup_module -+ use solvation_module -+ -+ contains -+ -+ subroutine coul0neu -+ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic force. -+c 1/r potential, no truncation or damping. -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lexcite,lselect,lskip,idrive,jdrive -+ integer ik,m,iatm,jatm,kkk -+ real(8) engcpe,vircpe,epsq,chgprd,rsq,rrr,coul,reps,fcoul -+ real(8) fx,fy,fz -+ real(8) strs(6),strs_loc(6) -+ -+ lskip=(lfree.or.lexcite) -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ reps=r4pie0/epsq -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ iatm=ilist(m) -+ jatm=jlist(m) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(iatm)) -+ jdrive=driven(ltype(jatm)) -+ -+ endif -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chge(jatm)*chge(iatm)*reps -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+ rsq=rsqdf(m) -+ rrr=sqrt(rsq) -+ -+c calculate coulomb energy and force -+ -+ coul=chgprd/rrr -+ fcoul=coul/rsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+coul -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-coul -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate forces -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fxx(iatm)=fxx(iatm)+fx -+ fyy(iatm)=fyy(iatm)+fy -+ fzz(iatm)=fzz(iatm)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local definitions -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-coul -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine coul0neu -+ -+ subroutine coul2neu -+ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces -+c assuming a distance dependant dielectric `constant'. -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lexcite,lselect,lskip,idrive,jdrive -+ integer ik,m,iatm,jatm,kkk -+ real(8) engcpe,vircpe,epsq,fx,fy,fz,chgprd,rrsq,coul,egamma -+ real(8) strs(6),strs_loc(6) -+ -+ lskip=(lfree.or.lexcite) -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ iatm=ilist(m) -+ jatm=jlist(m) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(iatm)) -+ jdrive=driven(ltype(jatm)) -+ -+ endif -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chge(iatm)*chge(jatm)*r4pie0/epsq -+ -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate potential energy -+ -+ rrsq=1.d0/rsqdf(m) -+ coul=chgprd*rrsq -+ egamma=2.d0*coul*rrsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+2.d0*coul -+ coul=lambda1*coul -+ egamma=lambda1*egamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-2.d0*coul -+ coul=lambda2*coul -+ egamma=lambda2*egamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and Virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-2.d0*coul -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate forces -+ -+ fx=egamma*xdf(m) -+ fy=egamma*ydf(m) -+ fz=egamma*zdf(m) -+ -+ fxx(iatm)=fxx(iatm)+fx -+ fyy(iatm)=fyy(iatm)+fy -+ fzz(iatm)=fzz(iatm)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local definitions -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-2.d0*coul -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine coul2neu -+ -+ subroutine coul3neu -+ x (lsolva,lfree,lexcite,ik,engcpe,vircpe,epsq,rcut,alpha) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic force. -+c reaction field potential -+c Ref: M Neumann, J Chem Phys, 82, 5633, (1985) -+c adapted for fennell-gezelter coulombic model -+c by w.smith june 2007 -+c Ref: CJ Fennell and JD Gezelter, J Chem Phys, -+c 124, 234104, (2006) -+c adapted for solvation, free energy and excitation -+c - p.-a. cazade oct 2007 -+c -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1995 -+c author - t. forester february 1995 -+c stress tensor - t.forester feb 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lexcite,lselect,lskip,newjob,idrive,jdrive -+ integer ik,m,iatm,jatm,kkk -+ real(8) engcpe,vircpe,rcut,epsq,vcon,fcon,rdr,ppp,erc1,fer1 -+ real(8) rcsq,b0,rfld0,rfld1,rfld2,chgprd,rsq,coul,omega,fcoul -+ real(8) fx,fy,fz,rrr,alpha,a1,a2,a3,a4,a5,pp,tt,exp1 -+ real(8) strs(6),strs_loc(6) -+ -+ save newjob,b0,rfld0,rfld1,rfld2,vcon,fcon -+ -+ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ -+ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ -+ data newjob/.true./ -+ -+ if(newjob)then -+ -+c reaction field terms -+ -+ b0=2.d0*(epsq-1.d0)/(2.d0*epsq+1.d0) -+ rfld0=b0/rcut**3 -+ rfld1=(1.d0+b0*0.5d0)/rcut -+ rfld2=rfld0*0.5d0 -+ -+c screened coulomb terms -+ -+ tt=1.d0/(1.d0+pp*alpha*rcut) -+ exp1=exp(-(alpha*rcut)**2) -+ erc1=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rcut -+ fer1=(erc1+2.d0*(alpha/sqrpi)*exp1)/(rcut*rcut) -+ vcon=erc1+rfld2*rcut**2-rfld1 -+ fcon=rcut*fer1-rfld0*rcut -+ -+ endif -+ -+ lskip=(lfree.or.lexcite) -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic index and charge product -+ -+ iatm=ilist(m) -+ jatm=jlist(m) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(iatm)) -+ jdrive=driven(ltype(jatm)) -+ -+ endif -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ chgprd=chge(jatm)*chge(iatm)*r4pie0 -+ if(abs(chgprd).gt.1.d-10)then -+ -+c calculate interatomic distance -+ -+ rsq=rsqdf(m) -+ rrr=sqrt(rsq) -+ -+c error function terms -+ -+ tt=1.d0/(1.d0+pp*alpha*rrr) -+ exp1=exp(-(alpha*rrr)**2) -+ erc1=tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*exp1/rrr -+ fer1=(erc1+2.d0*(alpha/sqrpi)*exp1)/rsq -+ -+c calculate potential energy -+ -+ omega=erc1-vcon+fcon*(rrr-rcut) -+ coul=chgprd*(omega+rfld2*rsq-rfld1) -+ -+c calculate forces -+ -+ fcoul=chgprd*(fer1-fcon/rrr-rfld0) -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_exc(kkk)=cou_exc(kkk)+coul -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre-coul -+ cou_vir=cou_vir+fcoul*rsq -+ coul=lambda1*coul -+ fcoul=lambda1*fcoul -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ cou_fre=cou_fre+coul -+ cou_vir=cou_vir-fcoul*rsq -+ coul=lambda2*coul -+ fcoul=lambda2*fcoul -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate coulombic energy and virial -+ -+ engcpe=engcpe+coul -+ vircpe=vircpe-fcoul*rsq -+ -+c calculate solvation energy -+ -+ if(lsolva)cou_sol(kkk)=cou_sol(kkk)+coul -+ -+c calculate coulombic force -+ -+ fx=fcoul*xdf(m) -+ fy=fcoul*ydf(m) -+ fz=fcoul*zdf(m) -+ -+ fxx(iatm)=fxx(iatm)+fx -+ fyy(iatm)=fyy(iatm)+fy -+ fzz(iatm)=fzz(iatm)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local definitions -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+coul -+ vir_loc=vir_loc-fcoul*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine coul3neu -+ -+ end module neu_coul_module -diff -urN dl_class_1.9.orig/srcmod/nlist_builders_module.f dl_class_1.9/srcmod/nlist_builders_module.f ---- dl_class_1.9.orig/srcmod/nlist_builders_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/nlist_builders_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,2216 @@ -+ module nlist_builders_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining neighbourlist builder routines -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use exclude_module -+ use pair_module -+ use setup_module -+ use utility_module -+ -+ contains -+ -+ subroutine nlist_driver -+ x (newlst,lneut,lnsq,loglnk,ltad,natms,idnode,mxnode,imcon, -+ x nneut,keyfce,rcut,delr,tstep) -+ -+c********************************************************************* -+c -+c dl_poly subroutine to select and implement neighbour list -+c builders for short range force calculations -+c -+c copyright - daresbury laboratory -+c author - w. smith june 2006 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,lneut,lnsq,loglnk,newjob,ltad -+ integer natms,idnode,mxnode,imcon,nneut,keyfce -+ real(8) rcut,delr,tstep -+ -+ save newjob -+ -+ data newjob/.true./ -+ -+c skip if no pair force calculations required -+ -+ if(keyfce.gt.0)then -+ -+c test for updating the Verlet list -+ -+ if(ltad)then -+ -+ call vertest2(newlst,idnode,mxnode,natms,imcon,delr,tstep) -+ -+ else -+ -+ call vertest(newlst,idnode,mxnode,natms,delr,tstep) -+ -+ endif -+ -+c set up nonbonded interaction (verlet) list -+ -+ newlst=(newjob.or.newlst) -+ -+ if(newlst)then -+ -+ if(.not.lneut)then -+ -+ if(lnsq)then -+ -+c calculate distant interactions explicitly -+ -+ call parlst_nsq(newlst,natms,idnode,mxnode,imcon,rcut) -+ -+ elseif(loglnk)then -+ -+c ignore real space distant interactions -+ -+ call parlink -+ x (newlst,natms,idnode,mxnode,imcon,rcut,delr) -+ -+ else -+ -+ call parlst -+ x (newlst,natms,idnode,mxnode,imcon,rcut,delr) -+ -+ endif -+ -+ else -+ -+ if(.not.loglnk)then -+ -+ call parneulst -+ x (newlst,lneut,nneut,idnode,mxnode,imcon,rcut, -+ x delr) -+ -+ else -+ -+ call parlinkneu -+ x (newlst,natms,nneut,idnode,mxnode,imcon, -+ x rcut,delr) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ newjob=.false. -+ -+ return -+ end subroutine nlist_driver -+ -+ subroutine parlst(newlst,natms,idnode,mxnode,imcon,rcut,delr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on the brode-ahlrichs scheme -+c frozen atoms taken into account -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w.smith march 1992 -+c modified - t.forester october 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst,lfrzi,ldo -+ integer natms,idnode,mxnode,imcon,ibig,last,mpm2 -+ integer npm2,idum,i,m,ii,j -+ real(8) rcut,delr,rclim,rsq -+ -+ -+ if(newlst)then -+ -+ ibig=0 -+ -+c check size of work array -+ -+ if(mxxdf.lt.(natms+1)/2)then -+ if(idnode.eq.0) write(nrite,*) 'mxxdf must be greater than ', -+ x (natms+1)/2 -+ call error(idnode,474) -+ endif -+ -+c set control variables -+ -+ last=natms -+ lchk=.true. -+ mpm2=natms/2 -+ npm2=(natms-1)/2 -+ -+c set cutoff radius -+ -+ rclim=(rcut+delr)**2 -+ -+c construct pair force neighbour list -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ noxatm(i)=1 -+ -+ enddo -+ -+c outer loop over atoms -+ -+ do m=1,mpm2 -+ -+ if(m.gt.npm2)last=mpm2 -+ -+c inner loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ ii=ii+1 -+ xdf(ii)=xxx(i)-xxx(j) -+ ydf(ii)=yyy(i)-yyy(j) -+ zdf(ii)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c apply minimum image convention -+ -+ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) -+ -+c allocate atoms to neighbour list -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+ lfrzi=(lstfrz(i).ne.0) -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ ii=ii+1 -+ -+c reject atoms in excluded pair list -+ -+ if((nexatm(ii).gt.0).and.(lexatm(ii,noxatm(ii)).eq.j)) -+ x then -+ -+ noxatm(ii)=min(noxatm(ii)+1,nexatm(ii)) -+ -+c reject frozen atom pairs -+ -+ else -+ -+ ldo=.true. -+ if(lfrzi)ldo=(lstfrz(j).eq.0) -+ -+ if(ldo)then -+ -+c calculate interatomic distance -+ -+ if(imcon.eq.6)then -+ -+ rsq=xdf(ii)*xdf(ii)+ydf(ii)*ydf(ii) -+ -+ else -+ -+ rsq=xdf(ii)*xdf(ii)+ydf(ii)*ydf(ii)+zdf(ii)*zdf(ii) -+ -+ endif -+ -+c running check of neighbour list array capacity -+ -+ if(rsq.lt.rclim)then -+ -+ lentry(ii)=lentry(ii)+1 -+ -+ if(lentry(ii).gt.mxlist)then -+ -+ lchk=.false. -+ ibig=max(lentry(ii),ibig) -+ -+ endif -+ -+c compile neighbour list array -+ -+ if(lchk)then -+ -+ list(ii,lentry(ii))=j -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ -+ if(.not.lchk)then -+ -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) ' mxlist must be at least ',ibig -+ write(nrite,*) ' mxlist is currently ',mxlist -+ endif -+ call error(idnode,110) -+ -+ endif -+ -+c check all excluded atoms are accounted for -+ -+ do i=1,ii -+ -+ if(nexatm(i).gt.0.and.noxatm(i).ne.nexatm(i))lchk=.false. -+ -+ enddo -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ -+ if(.not.lchk) call error(idnode,160) -+ -+ endif -+ -+ return -+ end subroutine parlst -+ -+ subroutine parlink(newlst,natms,idnode,mxnode,imcon,rcut,delr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on link-cell method. -+c frozen atoms taken into account -+c -+c to be used with the link version of exclude :exclude_link -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1993 -+c author - t. forester september 1993. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst,linc,newjob,lfrzi,ldo -+ integer natms,idnode,mxnode,imcon,idum,nix,niy,niz,fail -+ integer i,ibig,irat,nsbcll,ilx,ily,ilz,ncells,ix,iy,iz,j,icell -+ integer ic,ii,kc,ik,jx,jy,jz,jc,ixl -+ real(8) rcut,delr,rcsq,xm,ym,zm,det,xdc,ydc,zdc,tx,ty,tz -+ real(8) cx,cy,cz,sxd,syd,szd,xd,yd,zd,rsq -+ -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ -+ dimension nix(508),niy(508),niz(508) -+ -+ save newjob -+ data newjob/.true./ -+ -+ data nix/0,1,0,0,-1,1,0,-1,1,0,-1,1,-1,1,2,0,0,-2,2,-1,1,0,-2,2,0, -+ x 0,-1,1,0,-1,1,-2,2,-2,2,-1,1,-1,1,-1,1,-2,2,0,-2,2,0,-2,2,-2,2, -+ x -1,1,-2,2,-2,2,-1,1,-2,2,-2,2,3,0,0,-3,3,-1,1,0,-3,3,0,0,-1,1,0, -+ x -1,1,-3,3,-3,3,-1,1,-1,1,-1,1,-3,3,-2,2,0,-3,3,0,0,-2,2,0,-2,2, -+ x -3,3,-3,3,-2,2,-1,1,-3,3,-3,3,-1,1,-1,1,-2,2,-2,2,-1,1,-2,2,-3,3, -+ x -3,3,-2,2,-2,2,-2,2,-3,3,0,-3,3,0,-3,3,-3,3,-1,1,-3,3,-3,3,-1,1, -+ x -3,3,-3,3,-2,2,-3,3,-3,3,-2,2,-3,3,-3,3,4,0,0,-4,4,-1,1,0,-4,4,0, -+ x 0,-1,1,0,-1,1,-4,4,-4,4,-1,1,-1,1,-1,1,-4,4,-2,2,0,-4,4,0,0,-2,2, -+ x 0,-2,2,-4,4,-4,4,-2,2,-1,1,-4,4,-4,4,-1,1,-1,1,-2,2,-2,2,-1,1,-2, -+ x 2,-4,4,-4,4,-2,2,-2,2,-2,2,-4,4,-3,3,0,-4,4,0,0,-3,3,0,-3,3,-4,4, -+ x -4,4,-3,3,-1,1,-4,4,-4,4,-1,1,-1,1,-3,3,-3,3,-1,1,-3,3,-4,4,-4,4, -+ x -3,3,-2,2,-4,4,-4,4,-2,2,-2,2,-3,3,-3,3,-2,2,-3,3,-4,4,-4,4,-3,3, -+ x -3,3,-3,3,-4,4,0,-4,4,0,-4,4,-4,4,-1,1,-4,4,-4,4,-1,1,-4,4,-4,4, -+ x -2,2,-4,4,-4,4,-2,2,-4,4,-4,4,-3,3,-4,4,-4,4,-3,3,5,0,0,-5,5,-1, -+ x 1,0,-5,5,0,0,-1,1,0,-1,1,-5,5,-5,5,-1,1,-1,1,-1,1,-5,5,-2,2,0,-5, -+ x 5,0,0,-2,2,0,-2,2,-5,5,-5,5,-2,2,-1,1,-5,5,-5,5,-1,1,-1,1,-2,2, -+ x -2,2,-1,1,-2,2,-5,5,-5,5,-2,2,-2,2,-2,2,-5,5,-3,3,0,-5,5,0,0,-3, -+ x 3,0,-3,3,-5,5,-5,5,-3,3,-1,1,-5,5,-5,5,-1,1,-1,1,-3,3,-3,3,-1,1, -+ x -3,3,-5,5,-5,5,-3,3,-2,2,-5,5,-5,5,-2,2,-2,2,-3,3,-3,3,-2,2,-3,3, -+ x -5,5,-5,5,-3,3,-3,3,-3,3/ -+ data niy/ 0,0,1,0,1,1,-1,0,0,1,-1,-1,1,1,0,2,0,1,1,2,2,-2,0,0,2, -+ x -1,0,0,1,-2,-2,-1,-1,1,1,2,2,-1,-1,1,1,2,2,-2,0,0,2,-2,-2,2,2,-2, -+ x -2,-1,-1,1,1,2,2,-2,-2,2,2,0,3,0,1,1,3,3,-3,0,0,3,-1,0,0,1,-3,-3, -+ x -1,-1,1,1,3,3,-1,-1,1,1,2,2,3,3,-3,0,0,3,-2,0,0,2,-3,-3,-2,-2,2, -+ x 2,3,3,-3,-3,-1,-1,1,1,3,3,-2,-2,-1,-1,1,1,2,2,-3,-3,-2,-2,2,2,3, -+ x 3,-2,-2,2,2,3,3,-3,0,0,3,-3,-3,3,3,-3,-3,-1,-1,1,1,3,3,-3,-3,3,3, -+ x -3,-3,-2,-2,2,2,3,3,-3,-3,3,3,0,4,0,1,1,4,4,-4,0,0,4,-1,0,0,1,-4, -+ x -4,-1,-1,1,1,4,4,-1,-1,1,1,2,2,4,4,-4,0,0,4,-2,0,0,2,-4,-4,-2,-2, -+ x 2,2,4,4,-4,-4,-1,-1,1,1,4,4,-2,-2,-1,-1,1,1,2,2,-4,-4,-2,-2,2,2, -+ x 4,4,-2,-2,2,2,3,3,4,4,-4,0,0,4,-3,0,0,3,-4,-4,-3,-3,3,3,4,4,-4, -+ x -4,-1,-1,1,1,4,4,-3,-3,-1,-1,1,1,3,3,-4,-4,-3,-3,3,3,4,4,-4,-4, -+ x -2,-2,2,2,4,4,-3,-3,-2,-2,2,2,3,3,-4,-4,-3,-3,3,3,4,4,-3,-3,3,3, -+ x 4,4,-4,0,0,4,-4,-4,4,4,-4,-4,-1,-1,1,1,4,4,-4,-4,4,4,-4,-4,-2,-2, -+ x 2,2,4,4,-4,-4,4,4,-4,-4,-3,-3,3,3,4,4,0,5,0,1,1,5,5,-5,0,0,5,-1, -+ x 0,0,1,-5,-5,-1,-1,1,1,5,5,-1,-1,1,1,2,2,5,5,-5,0,0,5,-2,0,0,2,-5, -+ x -5,-2,-2,2,2,5,5,-5,-5,-1,-1,1,1,5,5,-2,-2,-1,-1,1,1,2,2,-5,-5, -+ x -2,-2,2,2,5,5,-2,-2,2,2,3,3,5,5,-5,0,0,5,-3,0,0,3,-5,-5,-3,-3,3, -+ x 3,5,5,-5,-5,-1,-1,1,1,5,5,-3,-3,-1,-1,1,1,3,3,-5,-5,-3,-3,3,3,5, -+ x 5,-5,-5,-2,-2,2,2,5,5,-3,-3,-2,-2,2,2,3,3,-5,-5,-3,-3,3,3,5,5,-3, -+ x -3,3,3/ -+ data niz/0,0,0,1,0,0,1,1,1,1,1,1,1,1,0,0,2,0,0,0,0,1,1,1,1,2,2,2, -+ x 2,1,1,1,1,1,1,1,1,2,2,2,2,0,0,2,2,2,2,1,1,1,1,2,2,2,2,2,2,2,2,2, -+ x 2,2,2,0,0,3,0,0,0,0,1,1,1,1,3,3,3,3,1,1,1,1,1,1,1,1,3,3,3,3,0,0, -+ x 0,0,2,2,2,2,3,3,3,3,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,3,3,3, -+ x 3,3,2,2,2,2,2,2,2,2,3,3,3,3,0,0,3,3,3,3,1,1,1,1,3,3,3,3,3,3,3,3, -+ x 2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,0,0,4,0,0,0,0,1,1,1,1,4,4,4,4,1, -+ x 1,1,1,1,1,1,1,4,4,4,4,0,0,0,0,2,2,2,2,4,4,4,4,1,1,1,1,1,1,1,1,2, -+ x 2,2,2,2,2,2,2,4,4,4,4,4,4,4,4,2,2,2,2,2,2,2,2,4,4,4,4,0,0,0,0,3, -+ x 3,3,3,4,4,4,4,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,2, -+ x 2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,4, -+ x 4,4,4,0,0,4,4,4,4,1,1,1,1,4,4,4,4,4,4,4,4,2,2,2,2,4,4,4,4,4,4,4, -+ x 4,3,3,3,3,4,4,4,4,4,4,4,4,0,0,5,0,0,0,0,1,1,1,1,5,5,5,5,1,1,1,1, -+ x 1,1,1,1,5,5,5,5,0,0,0,0,2,2,2,2,5,5,5,5,1,1,1,1,1,1,1,1,2,2,2,2, -+ x 2,2,2,2,5,5,5,5,5,5,5,5,2,2,2,2,2,2,2,2,5,5,5,5,0,0,0,0,3,3,3,3, -+ x 5,5,5,5,1,1,1,1,1,1,1,1,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,2,2,2,2, -+ x 2,2,2,2,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,5,5,5,5/ -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1890) -+ -+ if(newlst)then -+ -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x call error(idnode,300) -+ lchk=.true. -+ ibig=0 -+ -+c zero link arrays -+ -+ do i=1,natms -+ link(i)=0 -+ enddo -+ -+c construct pair force neighbour list -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ -+ enddo -+ -+c real space cut off -+ -+ rcsq=(rcut+delr)**2 -+ -+c create mock cell vector for non-periodic system -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+c find maximum x,y,z postions -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ -+ do i=1,natms -+ -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ -+ enddo -+ -+ if(imcon.eq.0)then -+ -+ cell(1)=max(2.d0*xm+rcut+delr,3.d0*(rcut+delr)) -+ cell(5)=max(2.d0*ym+rcut+delr,3.d0*(rcut+delr)) -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ -+ endif -+ -+ cell(9)=max(2.d0*zm+rcut+delr,3.d0*(rcut+delr),cell(9)) -+ -+ endif -+ -+ call dcell(cell,celprp) -+ call invert(cell,rcell,det) -+ -+c ratio of link cell length to cut off diameter - max value is 5 -+ -+c irat=nint((rcut+delr)/rlink) -+c irat=min(max(irat,1),5) -+ -+ irat=1 -+ -+ -+c number of subcells -+ -+ if (irat.eq.1)then -+ -+ nsbcll=14 -+ -+ elseif(irat.eq.2)then -+ -+ nsbcll=63 -+ -+ elseif(irat.eq.3)then -+ -+ nsbcll=156 -+ -+ elseif(irat.eq.4)then -+ -+ nsbcll=307 -+ -+ elseif(irat.eq.5)then -+ -+ nsbcll=508 -+ -+ endif -+ -+ ilx=int(celprp(7)*dble(irat)/(rcut+delr)) -+ ily=int(celprp(8)*dble(irat)/(rcut+delr)) -+ ilz=int(celprp(9)*dble(irat)/(rcut+delr)) -+ -+c check there are enough link cells -+ -+ linc=.true. -+ if(ilx.lt.2*irat+1)linc=.false. -+ if(ily.lt.2*irat+1)linc=.false. -+ if(ilz.lt.2*irat+1)linc=.false. -+ if(.not.linc) call error(idnode,305) -+ ncells=ilx*ily*ilz -+ if(ncells.gt.mxcell) call error(idnode,392) -+ -+c calculate link cell indices -+ -+ do i=1,ncells -+ -+ lct(i)=0 -+ -+ enddo -+ -+c link-cell cutoff for reduced space -+ -+ xdc=dble(ilx) -+ ydc=dble(ily) -+ zdc=dble(ilz) -+ -+c reduced space coordinates -+ if(newjob)then -+ -+ newjob=.false. -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+ if(mxnode.gt.1) call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ do i=1,natms -+ -+ tx=xxx(i) -+ ty=yyy(i) -+ tz=zzz(i) -+ -+ uxx(i)=(rcell(1)*tx+rcell(4)*ty+rcell(7)*tz)+0.5d0 -+ uyy(i)=(rcell(2)*tx+rcell(5)*ty+rcell(8)*tz)+0.5d0 -+ uzz(i)=(rcell(3)*tx+rcell(6)*ty+rcell(9)*tz)+0.5d0 -+ -+ enddo -+ -+c link neighbours -+ -+ do i=1,natms -+ -+ ix=min(int(xdc*uxx(i)),ilx-1) -+ iy=min(int(ydc*uyy(i)),ily-1) -+ iz=min(int(zdc*uzz(i)),ilz-1) -+ -+ icell=1+ix+ilx*(iy+ily*iz) -+ -+ j=lct(icell) -+ lct(icell)=i -+ link(i)=j -+ -+ enddo -+ -+c set control variables for loop over subcells -+ -+ ix=1 -+ iy=1 -+ iz=1 -+ -+c primary loop over subcells -+ -+ do ic=1,ncells -+ -+ ii=lct(ic) -+ if(ii.gt.0)then -+ -+c secondary loop over subcells -+ -+ ik=0 -+ -+ do kc=1,nsbcll -+ -+ i=ii -+ -+ cx=0.d0 -+ cy=0.d0 -+ cz=0.d0 -+ jx=ix+nix(kc) -+ jy=iy+niy(kc) -+ jz=iz+niz(kc) -+ -+c minimum image convention -+ -+ if(jx.gt.ilx)then -+ -+ jx=jx-ilx -+ cx=1.d0 -+ -+ elseif(jx.lt.1)then -+ -+ jx=jx+ilx -+ cx=-1.d0 -+ -+ endif -+ -+ if(jy.gt.ily)then -+ -+ jy=jy-ily -+ cy=1.d0 -+ -+ elseif(jy.lt.1)then -+ -+ jy=jy+ily -+ cy=-1.d0 -+ -+ endif -+ -+ if(jz.gt.ilz)then -+ -+ jz=jz-ilz -+ cz=1.d0 -+ -+ elseif(jz.lt.1)then -+ -+ jz=jz+ilz -+ cz=-1.d0 -+ -+ endif -+ -+c index of neighbouring cell -+ -+ jc=jx+ilx*((jy-1)+ily*(jz-1)) -+ j=lct(jc) -+ -+c ignore if empty -+ -+ if(j.gt.0)then -+ -+ do while(i.ne.0) -+ -+c test if site is of interest to this node -+ -+ if(mod(i-1,mxnode).eq.idnode)then -+ -+ -+c i's index for this processor -+ ik=((i-1)/mxnode)+1 -+ -+c test if i is a frozen atom -+ -+ lfrzi=(lstfrz(i).ne.0) -+ -+ if(ic.eq.jc) j=link(i) -+ if(j.gt.0)then -+ -+ do while(j.ne.0) -+ -+c test of frozen atom pairs -+ -+ ldo=.true. -+ if(lfrzi)ldo=(lstfrz(j).eq.0) -+ -+ if(ldo)then -+ -+c distance in real space : minimum image applied -+ -+ sxd=uxx(j)-uxx(i)+cx -+ syd=uyy(j)-uyy(i)+cy -+ szd=uzz(j)-uzz(i)+cz -+ -+ xd=cell(1)*sxd+cell(4)*syd+cell(7)*szd -+ yd=cell(2)*sxd+cell(5)*syd+cell(8)*szd -+ zd=cell(3)*sxd+cell(6)*syd+cell(9)*szd -+ -+ if(imcon.eq.6)then -+ -+ rsq=xd**2+yd**2 -+ -+ else -+ -+ rsq=xd**2+yd**2+zd**2 -+ -+ endif -+ -+c test of distance -+ if(rcsq.gt.rsq)then -+ -+c test for excluded atom -+ -+ linc=.true. -+ do ixl=1,nexatm(ik) -+ -+ if(lexatm(ik,ixl).eq.j) linc=.false. -+ -+ enddo -+ -+ if(linc)then -+ -+ lentry(ik)=lentry(ik)+1 -+ -+ if(lentry(ik).gt.mxlist)then -+ -+ ibig=max(ibig,lentry(ik)) -+ lchk=.false. -+ -+ else -+ -+ list(ik,lentry(ik))=j -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ j=link(j) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ j=lct(jc) -+ i=link(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ ix=ix+1 -+ if(ix.gt.ilx)then -+ -+ ix=1 -+ iy=iy+1 -+ -+ if(iy.gt.ily)then -+ -+ iy=1 -+ iz=iz+1 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ -+ if(.not.lchk)then -+ -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) ' mxlist must be >= ',ibig -+ write(nrite,*) ' mxlist is currenty ',mxlist -+ endif -+ call error(idnode,106) -+ -+ endif -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (uxx,uyy,uzz,stat=fail) -+ -+ return -+ end subroutine parlink -+ -+ subroutine parneulst(newlst,lneut,nneut,idnode,mxnode,imcon, -+ x rcut,delr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on the brode-ahlrichs scheme -+c frozen atoms taken into account -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - t.forester april 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst,lneut,safe,lfrzi -+ integer nneut,idnode,mxnode,imcon,idum,fail,mpm2,npm2,ibig -+ integer i,ill,ia,im,jmlast,jmwrap,nuei1,nuei2,ii,jm1,jm,jj0,jj2 -+ integer j,ii1 -+ real(8) rcut,delr,rclim,fi,rrr,rcl1 -+ -+ logical, allocatable :: lms(:) -+ dimension fi(3) -+ -+ data fail/0/ -+ -+C DIR$ CACHE_ALIGN fi -+ -+c allocate work arrays -+ -+ allocate (lms(mxneut),stat=fail) -+ if(fail.ne.0)call error(idnode,1910) -+ -+ if(newlst.and.lneut)then -+ -+c set control variables -+ -+ safe=.true. -+ lchk= .true. -+ mpm2=(nneut+2)/2 -+ npm2=(nneut+1)/2 -+ -+c set cutoff radius -+ -+ rcl1=(rcut+delr) -+ rclim=(rcut+delr)**2 -+ ibig=0 -+ ill=0 -+ -+c construct pair force neighbour list: neutral groups -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ -+ enddo -+ -+ -+c outer loop over groups -+ -+ ia=0 -+ -+ do im=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ if(im.ge.mpm2) mpm2=npm2 -+ -+ lms(1)=.false. -+ do j=2,mpm2 -+ lms(j)=.true. -+ enddo -+ -+ jmlast=min(nneut,im+mpm2-1) -+ jmwrap=max(0,im+mpm2-1-nneut) -+ -+c loop over atomic pairs -+ -+ nuei1=neulst(im) -+ nuei2=neulst(im+1)-1 -+ -+ do i=nuei1,nuei2 -+ -+ fi(1)=xxx(i) -+ fi(2)=yyy(i) -+ fi(3)=zzz(i) -+ lfrzi=(lstfrz(i).eq.0) -+ -+ ii=0 -+ jm1=1 -+ do jm=im+1,jmlast -+ -+ jm1=jm1+1 -+ if(lms(jm1))then -+ -+ jj0=neulst(jm) -+ jj2=neulst(jm+1)-1 -+ -+ do j=jj0,jj2 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ -+ xdf(ii)=fi(1)-xxx(j) -+ ydf(ii)=fi(2)-yyy(j) -+ zdf(ii)=fi(3)-zzz(j) -+ -+ else -+ -+ ibig=max(ibig,ii) -+ safe=.false. -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ do jm=1,jmwrap -+ -+ jm1=jm1+1 -+ if(lms(jm1))then -+ -+ jj0=neulst(jm) -+ jj2=neulst(jm+1)-1 -+ -+ do j=jj0,jj2 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ -+ xdf(ii)=fi(1)-xxx(j) -+ ydf(ii)=fi(2)-yyy(j) -+ zdf(ii)=fi(3)-zzz(j) -+ -+ else -+ -+ safe=.false. -+ ibig=max(ibig,ii) -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c apply minimum image convention -+ -+ ii1=min(ii,mxxdf) -+ call images(imcon,0,1,ii1,cell,xdf,ydf,zdf) -+ -+c search for those in cutoff -+ -+ ii=0 -+ jm1=1 -+ do jm=im+1,jmlast -+ -+ jm1=jm1+1 -+ if(lms(jm1))then -+ -+ jj0=neulst(jm) -+ jj2=neulst(jm+1)-1 -+ -+ do j=jj0,jj2 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ -+ if(lms(jm1))then -+ -+ if(lfrzi)then -+ if(abs(zdf(ii)).lt.rcl1)then -+ if(abs(ydf(ii)).lt.rcl1)then -+ if(abs(xdf(ii)).lt.rcl1)then -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ if(rrr.lt.rclim) lms(jm1)=.false. -+ endif -+ endif -+ endif -+ -+ elseif(lstfrz(j).eq.0)then -+ if(abs(zdf(ii)).lt.rcl1)then -+ if(abs(ydf(ii)).lt.rcl1)then -+ if(abs(xdf(ii)).lt.rcl1)then -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ if(rrr.lt.rclim) lms(jm1)=.false. -+ endif -+ endif -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ do jm=1,jmwrap -+ -+ jm1=jm1+1 -+ if(lms(jm1))then -+ -+ jj0=neulst(jm) -+ jj2=neulst(jm+1)-1 -+ -+ do j=jj0,jj2 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ -+ if(lms(jm1))then -+ -+ if(lfrzi)then -+ -+ if(abs(zdf(ii)).lt.rcl1)then -+ if(abs(ydf(ii)).lt.rcl1)then -+ if(abs(xdf(ii)).lt.rcl1)then -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ if(rrr.lt.rclim) lms(jm1)=.false. -+ endif -+ endif -+ endif -+ -+ elseif(lstfrz(j).eq.0)then -+ -+ if(abs(zdf(ii)).lt.rcl1)then -+ if(abs(ydf(ii)).lt.rcl1)then -+ if(abs(xdf(ii)).lt.rcl1)then -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ if(rrr.lt.rclim) lms(jm1)=.false. -+ endif -+ endif -+ endif -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c compile neighbour list for ia -+c with running check of neighbour list array capacity -+ -+ jm1=0 -+ do jm=im,jmlast -+ -+ jm1=jm1+1 -+ if(.not.lms(jm1))then -+ -+ lentry(ia)=lentry(ia)+1 -+ if(lentry(ia).le.mxlist)then -+ -+ list(ia,lentry(ia))=jm -+ -+ else -+ -+ ill=max(ill,lentry(ia)) -+ lchk=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ do jm=1,jmwrap -+ -+ jm1=jm1+1 -+ if(.not.lms(jm1))then -+ -+ lentry(ia)=lentry(ia)+1 -+ if(lentry(ia).le.mxlist)then -+ -+ list(ia,lentry(ia))=jm -+ -+ else -+ -+ ill=max(ill,lentry(ia)) -+ lchk=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ if(.not.lchk)then -+ -+ call gimax(ill,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) ' mxlist must be at least ',ill -+ write(nrite,*) ' mxlist is currently ',mxlist -+ endif -+ call error(idnode,108) -+ -+ endif -+ -+c terminate job if work arrays exceeded -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*)'mxxdf must be at least ',ibig -+ write(nrite,*)'mxxdf is currently ',mxxdf -+ endif -+ call error(idnode,476) -+ endif -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(lms,stat=fail) -+ -+ return -+ end subroutine parneulst -+ -+ subroutine parlinkneu -+ x (newlst,natms,nneut,idnode,mxnode,imcon,rcut,delr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on link-cell method with neutral groups -+c frozen atoms taken into account -+c -+c to be used with the link version of exclude :excludeneu_link -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1996 -+c author - t. forester january 1996. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst,linc,newjob,lfrzi,ldo,swop -+ integer natms,nneut,idnode,mxnode,imcon,idum,fail,ibig -+ integer nix,niy,niz,i,irat,nsbcll,ilx,ily,ilz,ncells,ix,iy,iz -+ integer icell,j,ic,ii,kc,jx,jy,jz,jc,ineu,ik,jneu,ineua,jneua -+ integer ika,jneua1,i1,j1 -+ real(8) rcut,delr,rcsq,xm,ym,zm,det,xdc,ydc,zdc,tx,ty,tz -+ real(8) cx,cy,cz,sxd,syd,szd,rsq,xd,yd,zd -+ -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ -+ dimension nix(14),niy(14),niz(14) -+ -+ save newjob -+ -+ data newjob/.true./ -+ data nix/0,1,0,0,-1,1,0,-1,1,0,-1,1,-1,1/ -+ data niy/ 0,0,1,0,1,1,-1,0,0,1,-1,-1,1,1/ -+ data niz/0,0,0,1,0,0,1,1,1,1,1,1,1,1/ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1900) -+ -+ lchk=.true. -+ ibig=0 -+ if(newlst)then -+ -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x call error(idnode,300) -+ -+c zero link arrays -+ -+ do i=1,natms -+ -+ link(i)=0 -+ -+ enddo -+ -+c construct pair force neighbour list -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ -+ enddo -+ -+c real space cut off -+ -+ rcsq=(rcut+delr)**2 -+c -+c create mock cell vector for non-periodic system -+ -+ if(imcon.eq.0.or.imcon.eq.6)then -+ -+c find maximum x,y,z postions -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ -+ do i=1,natms -+ -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ -+ enddo -+ -+ if(imcon.eq.0)then -+ -+ cell(1)=max(2.d0*xm+rcut+delr,3.d0*(rcut+delr)) -+ cell(5)=max(2.d0*ym+rcut+delr,3.d0*(rcut+delr)) -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ -+ endif -+ -+ cell(9)=max(2.d0*zm+rcut+delr,3.d0*(rcut+delr),cell(9)) -+ -+ endif -+ -+ call dcell(cell,celprp) -+ call invert(cell,rcell,det) -+ -+c ratio of link cell length to cut off diameter -+ -+ irat=1 -+ -+c number of subcells -+ -+ nsbcll=14 -+ -+ ilx=int(celprp(7)*dble(irat)/(rcut+delr)) -+ ily=int(celprp(8)*dble(irat)/(rcut+delr)) -+ ilz=int(celprp(9)*dble(irat)/(rcut+delr)) -+c -+c check there are enough link cells -+ -+ linc=.false. -+ if(ilx.lt.2*irat+1) linc=.true. -+ if(ily.lt.2*irat+1) linc=.true. -+ if(ilz.lt.2*irat+1) linc=.true. -+ if(linc) call error(idnode,305) -+ -+ ncells=ilx*ily*ilz -+ if(ncells.gt.mxcell)then -+ -+ if(idnode.eq.0) write(nrite,*) 'mxcell must be >= ',ncells -+ call error(idnode,392) -+ -+ endif -+ -+c calculate link cell indices -+ -+ do i=1,ncells -+ -+ lct(i)=0 -+ -+ enddo -+ -+c link-cell cutoff for reduced space -+ -+ xdc=dble(ilx) -+ ydc=dble(ily) -+ zdc=dble(ilz) -+ -+c reduced space coordinates -+ if(newjob)then -+ -+ newjob=.false. -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+ if(mxnode.gt.1) call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+ do i=1,natms -+ -+ tx=xxx(i) -+ ty=yyy(i) -+ tz=zzz(i) -+ -+ uxx(i)=(rcell(1)*tx+rcell(4)*ty+rcell(7)*tz)+0.5d0 -+ uyy(i)=(rcell(2)*tx+rcell(5)*ty+rcell(8)*tz)+0.5d0 -+ uzz(i)=(rcell(3)*tx+rcell(6)*ty+rcell(9)*tz)+0.5d0 -+ -+ enddo -+ -+c link neighbours -+ -+ do i=1,natms -+ -+ ix=min(int(xdc*uxx(i)),ilx-1) -+ iy=min(int(ydc*uyy(i)),ily-1) -+ iz=min(int(zdc*uzz(i)),ilz-1) -+ -+ icell=1+ix+ilx*(iy+ily*iz) -+ -+ j=lct(icell) -+ lct(icell)=i -+ link(i)=j -+ -+ enddo -+ -+c set control variables for loop over subcells -+ -+ ix=1 -+ iy=1 -+ iz=1 -+ -+c primary loop over subcells -+ -+ do ic=1,ncells -+ -+ ii=lct(ic) -+ if(ii.gt.0)then -+ -+c secondary loop over subcells -+ -+ do kc=1,nsbcll -+ -+ i=ii -+ -+ cx=0.d0 -+ cy=0.d0 -+ cz=0.d0 -+ jx=ix+nix(kc) -+ jy=iy+niy(kc) -+ jz=iz+niz(kc) -+ -+c minimum image convention -+ -+ if(jx.gt.ilx)then -+ -+ jx=jx-ilx -+ cx=1.d0 -+ -+ elseif(jx.lt.1)then -+ -+ jx=jx+ilx -+ cx=-1.d0 -+ -+ endif -+ -+ if(jy.gt.ily)then -+ -+ jy=jy-ily -+ cy=1.d0 -+ -+ elseif(jy.lt.1)then -+ -+ jy=jy+ily -+ cy=-1.d0 -+ -+ endif -+ -+ if(jz.gt.ilz)then -+ -+ jz=jz-ilz -+ cz=1.d0 -+ -+ elseif(jz.lt.1)then -+ -+ jz=jz+ilz -+ cz=-1.d0 -+ -+ endif -+ -+c index of neighbouring cell -+ -+ jc=jx+ilx*((jy-1)+ily*(jz-1)) -+ j=lct(jc) -+ -+c ignore if empty -+ -+ if(j.gt.0)then -+ -+ do while(i.ne.0) -+ -+c test if site is of interest to this node -+ -+ ineu=lstneu(i) -+ ik=0 -+ -+c i's group index for this processor -+ -+ if(mod(ineu-1,mxnode).eq.idnode) -+ x ik=((ineu-1)/mxnode)+1 -+ -+c test if i is a frozen atom -+ -+ lfrzi=(lstfrz(i).ne.0) -+ -+ if(ic.eq.jc) j=link(i) -+ if(j.gt.0)then -+ -+ do while(j.ne.0) -+ -+ jneu=lstneu(j) -+ -+c swop tests for switching of group indices, -+c ldo for 'doing' interaction -+ -+ swop=.false. -+ ldo=(ik.gt.0) -+ jneua=jneu -+ ineua=ineu -+ ika=ik -+ -+c keep only Brode-Ahlrichs pairs -+ -+ if(jneua.ge.ineua)then -+ -+ if(jneua-ineua.gt.nneut/2)then -+ -+ swop=(mod(jneu-1,mxnode).eq.idnode) -+ if(swop)then -+ ldo=((nneut+ineua-jneua).le.(nneut-1)/2) -+ else -+ ldo=.false. -+ endif -+ -+ endif -+ -+ elseif(nneut+jneua-ineua.gt.(nneut-1)/2)then -+ -+ swop=(mod(jneu-1,mxnode).eq.idnode) -+ if(swop)then -+ ldo=((ineua-jneua).le.nneut/2) -+ else -+ ldo=.false. -+ endif -+ -+ endif -+ -+ if(swop.and.ldo)then -+ jneua=ineu -+ ineua=jneu -+ ika=((jneu-1)/mxnode)+1 -+ endif -+ -+c test of frozen atom pairs -+ -+ if(lfrzi.and.ldo)ldo=(lstfrz(j).eq.0) -+ -+c check we haven't already included this group in the list ... -+ -+ jneua1=0 -+ do while -+ x (ldo.and.jneua1.lt.min(lentry(ika),mxlist)) -+ -+ jneua1=jneua1+1 -+ if(list(ika,jneua1).eq.jneua) ldo=.false. -+ -+ enddo -+ -+ if(ldo)then -+ -+c distance in real space : minimum image applied -+ -+ sxd=uxx(j)-uxx(i)+cx -+ syd=uyy(j)-uyy(i)+cy -+ szd=uzz(j)-uzz(i)+cz -+ -+ xd=cell(1)*sxd+cell(4)*syd+cell(7)*szd -+ yd=cell(2)*sxd+cell(5)*syd+cell(8)*szd -+ zd=cell(3)*sxd+cell(6)*syd+cell(9)*szd -+ -+ rsq=xd*xd+yd*yd+zd*zd -+ -+c test of distance -+ -+ if(rsq.lt.rcsq)then -+ -+ lentry(ika)=lentry(ika)+1 -+ if(lentry(ika).gt.mxlist)then -+ -+ ibig=max(ibig,lentry(ika)) -+ lchk=.false. -+ -+ else -+ -+ list(ika,lentry(ika))=jneua -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ j=link(j) -+ -+ enddo -+ -+ endif -+ -+ j=lct(jc) -+ i=link(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ ix=ix+1 -+ if(ix.gt.ilx)then -+ -+ ix=1 -+ iy=iy+1 -+ -+ if(iy.gt.ily)then -+ -+ iy=1 -+ iz=iz+1 -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ -+ if(.not.lchk)then -+ -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*)'mxlist must be at least ',ibig -+ write(nrite,*)'mxlist is currently ',mxlist -+ endif -+ call error(idnode,107) -+ -+ endif -+ -+c sort list into order .. -+c use link as a work array -+ -+ ik=0 -+ do i=1+idnode,nneut,mxnode -+ -+ ik=ik+1 -+ do j=1,lentry(ik) -+ -+ link(j)=list(ik,j) -+ -+ enddo -+ call shellsort(lentry(ik),link) -+ -+c ensure Brode-Ahlrichs ordering -+ -+ i1=lentry(ik)+1 -+ j1=0 -+ do j=1,lentry(ik) -+ -+ if(link(j).ge.i)then -+ -+ j1=j1+1 -+ list(ik,j1)=link(j) -+ i1=min(i1,j) -+ -+ endif -+ -+ enddo -+ -+ do j=1,i1-1 -+ -+ j1=j1+1 -+ list(ik,j1)=link(j) -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (uxx,uyy,uzz,stat=fail) -+ -+ return -+ end subroutine parlinkneu -+ -+ subroutine parlst_nsq -+ x (newlst,natms,idnode,mxnode,imcon,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing the verlet neighbour -+c list based on the brode-ahlrichs scheme -+c frozen atom option included -+c -+c to be used with multiple_nsq -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c adapted - w.smith aug 2008 - solvation, excitation etc -+c -+c stress tensor : t.forester may 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lchk,newlst -+ integer natms,idnode,mxnode,imcon,ibig,i,last,mpm2 -+ integer npm2,m,ii,j,idum -+ real(8) rcut,rclim,rsq,rrr -+ -+ if(newlst)then -+ -+ ibig=0 -+ -+c check size of work array -+ -+ if(mxxdf.lt.(natms+1)/2)then -+ if(idnode.eq.0) write(nrite,*) 'mxxdf must be greater than ', -+ x (natms+1)/2 -+ call error(idnode,475) -+ endif -+ -+c set control variables -+ -+ last=natms -+ lchk=.true. -+ mpm2=natms/2 -+ npm2=(natms-1)/2 -+ -+c set cutoff radius - ignore border width -+ -+ rclim=(rcut)**2 -+ -+c construct pair force neighbour list -+ -+ do i=1,msatms -+ -+ lentry(i)=0 -+ noxatm(i)=1 -+ -+ enddo -+ -+c outer loop over atoms -+ -+ do m=1,mpm2 -+ -+ if(m.gt.npm2)last=mpm2 -+ -+c inner loop over atoms -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+c calculate interatomic displacements -+ -+ ii=ii+1 -+ xdf(ii)=xxx(i)-xxx(j) -+ ydf(ii)=yyy(i)-yyy(j) -+ zdf(ii)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c apply minimum image convention -+ -+ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) -+ -+c allocate atoms to neighbour list -+ -+ ii=0 -+ -+ do i=idnode+1,last,mxnode -+ -+c calculate atom indices -+ -+ j=i+m -+ if(j.gt.natms)j=j-natms -+ -+ ii=ii+1 -+ if((nexatm(ii).gt.0).and.(lexatm(ii,noxatm(ii)).eq.j)) -+ x then -+ -+ noxatm(ii)=min(noxatm(ii)+1,nexatm(ii)) -+ -+ elseif(lstfrz(i).eq.0.or.lstfrz(j).eq.0)then -+ -+c reject frozen atoms and calculate interatomic distance -+ -+ rsq=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ -+c running check of neighbour list array capacity -+ -+ if(rsq.lt.rclim)then -+ -+ lentry(ii)=lentry(ii)+1 -+ -+ if(lentry(ii).gt.mxlist)then -+ -+ ibig=max(ibig,lentry(ii)) -+ lchk=.false. -+ -+ endif -+ -+c compile neighbour list array -+ -+ if(lchk)then -+ -+ list(ii,lentry(ii))=j -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c terminate job if neighbour list array exceeded -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ -+ if(.not.lchk)then -+ -+ call gisum(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) ' mxlist must be >= ',ibig -+ write(nrite,*) ' mxlist is currenty ',mxlist -+ endif -+ call error(idnode,109) -+ -+ endif -+ -+c check all excluded atoms are accounted for -+ -+ do i=1,ii -+ -+ if(nexatm(i).gt.0.and.noxatm(i).ne.nexatm(i))lchk=.false. -+ -+ enddo -+ -+ if(mxnode.gt.1)call gstate(lchk) -+ -+ if(.not.lchk) call error(idnode,160) -+ -+ endif -+ -+ return -+ end subroutine parlst_nsq -+ -+ subroutine primlst(idnode,mxnode,natms,imcon,rprim) -+ -+c********************************************************************* -+c -+c dlpoly routine to split interaction list into primary and -+c secondary neighbours for use with multiple timestep method -+c -+c copyright daresbury laboratory -+c author - t. forester february 1993 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,imcon,ii,k,j,i -+ real(8) rprim,rprim2,rsq -+ -+ rprim2=rprim*rprim -+ ii=0 -+ -+ do i=1+idnode,natms,mxnode -+ -+ ii=ii+1 -+ -+ do j=1,lentry(ii) -+ -+ k=iabs(list(ii,j)) -+ xdf(j)=xxx(i)-xxx(k) -+ ydf(j)=yyy(i)-yyy(k) -+ zdf(j)=zzz(i)-zzz(k) -+ -+ enddo -+ -+c apply minimum image convention -+ -+ call images(imcon,0,1,lentry(ii),cell,xdf,ydf,zdf) -+ -+c assign atoms as primary or secondary -+ -+ -+ do j=1,lentry(ii) -+ -+c calculate interatomic distance -+ -+ rsq=xdf(j)**2+ydf(j)**2+zdf(j)**2 -+ -+ if(rsq.lt.rprim2)then -+ -+c compile primary neighbour list array : -ve indices -+ -+ list(ii,j)=-iabs(list(ii,j)) -+ -+ else -+ -+c compile secondary neighbour list array : +ve indices -+ -+ list(ii,j)=iabs(list(ii,j)) -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine primlst -+ -+ subroutine prneulst(newlst,imcon,idnode,mxnode,nneut,rprim) -+ -+c*********************************************************************** -+c -+c dlpoly routine to partition neutral group list into -+c primary and secondary groups -+c loops over group ineu -+c -+c replicated data version -+c -+c copyright daresbury laboratory 1994 -+c author t.forester april 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newlst,lchk,ldo -+ integer imcon,idnode,mxnode,nneut,ineu,ia,jj,ibig,ii -+ integer jj0,jneu,j,i,idum -+ real(8) rprim,rclim,xi,yi,zi,rrr -+ -+ lchk=.true. -+ -+ if(newlst)then -+ -+c set primary cutoff limit -+ -+ rclim=rprim*rprim -+ -+c set list to negative - signal for seconary shell -+ -+ ia=0 -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+ do jj=1,lentry(ia) -+ -+ list(ia,jj)=-abs(list(ia,jj)) -+ -+ enddo -+ -+ enddo -+ -+c loop over neutral group ineu sites -+ -+ lchk=.true. -+ ibig=0 -+ -+ ia=0 -+ do ineu=idnode+1,nneut,mxnode -+ -+ ia=ia+1 -+ -+ ii=0 -+ do i=neulst(ineu),neulst(ineu+1)-1 -+ -+ xi=xxx(i) -+ yi=yyy(i) -+ zi=zzz(i) -+ -+ do jj=1,lentry(ia) -+ -+ jneu=-list(ia,jj) -+ jj0=neulst(jneu) -+ -+ if(ineu.eq.jneu) jj0=i+1 -+ -+c loop over jneu sites -+ -+ do j=jj0,neulst(jneu+1)-1 -+ -+ ii=ii+1 -+ if(ii.le.mxxdf)then -+ xdf(ii)=xi-xxx(j) -+ ydf(ii)=yi-yyy(j) -+ zdf(ii)=zi-zzz(j) -+ else -+ lchk=.false. -+ ibig=ii -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c apply minimum image convention -+ -+ ii=min(ii,mxxdf) -+ call images(imcon,0,1,ii,cell,xdf,ydf,zdf) -+ -+c allocate groups to primary or secondary shell -+c on basis of closest atom-atom interactions -+ -+ ii=0 -+ do i=neulst(ineu),neulst(ineu+1)-1 -+ -+ do jj=1,lentry(ia) -+ -+ jneu=list(ia,jj) -+ ldo=(jneu.lt.0) -+ if(ldo)then -+ jneu=-jneu -+ jj0=neulst(jneu) -+ if(ineu.eq.jneu) jj0=i+1 -+ -+c loop over jneu sites -+ -+ do j=jj0,neulst(jneu+1)-1 -+ -+ if(ldo)then -+ -+ ii=min(ii+1,mxxdf) -+ -+ if(abs(xdf(ii)).lt.rprim)then -+ if(abs(ydf(ii)).lt.rprim)then -+ if(abs(zdf(ii)).lt.rprim)then -+ -+c calculate interatomic distance -+ -+ rrr=xdf(ii)**2+ydf(ii)**2+zdf(ii)**2 -+ -+c put in primary list if found any interaction close enough -+ -+ if(rrr.le.rclim)then -+ ldo=.false. -+ list(ia,jj)=jneu -+ endif -+ -+ endif -+ endif -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) call gstate(lchk) -+ if(.not.lchk)then -+ -+ call gimax(ibig,1,idum) -+ if(idnode.eq.0)then -+ write(nrite,*) 'mxxdf must be at least ',ibig -+ write(nrite,*) 'mxxdf is currently ',mxxdf -+ endif -+ call error(idnode,477) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine prneulst -+ -+ subroutine vertest(newlst,idnode,mxnode,natms,delr,tstep) -+ -+c********************************************************************* -+c -+c DL_POLY subroutime to test for updating of Verlet list -+c replicated data version -+c -+c copyright daresbury laboratory 1993 -+c author - t. forester may 1993 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,newjob -+ integer idnode,mxnode,natms,i,j,k,moved,ibuff,fail -+ real(8) rmax,dr,delr,tstep -+ -+ real(8), allocatable :: xold(:),yold(:),zold(:) -+ -+ save newjob,xold,yold,zold -+ -+ data newjob/.true./,fail/0/ -+ -+ if((natms+mxnode-1)/mxnode.gt.msatms) call error(idnode,112) -+ -+ if(newjob)then -+ -+c set up initial arrays -+ -+ allocate (xold(msatms),yold(msatms),zold(msatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1930) -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xold(j)=0.d0 -+ yold(j)=0.d0 -+ zold(j)=0.d0 -+ -+ enddo -+ -+ newjob=.false. -+ newlst=.true. -+ -+ else -+ -+c integrate velocities -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xold(j)=xold(j)+vxx(i) -+ yold(j)=yold(j)+vyy(i) -+ zold(j)=zold(j)+vzz(i) -+ -+ enddo -+ -+c maximum displacement -+ -+ rmax=(delr/2.d0)**2 -+ -+c test atomic displacements -+ -+ moved=0 -+ -+ do k=1,j -+ -+ dr=tstep**2*(xold(k)**2+yold(k)**2+zold(k)**2) -+ if(dr.gt.rmax) moved=moved+1 -+ -+ enddo -+ -+c global sum of moved atoms -+ -+ if(mxnode.gt.1) call gisum(moved,1,ibuff) -+ -+c test for new verlet list -+ -+ newlst=(moved.ge.2) -+ -+c update stored positions -+ -+ if(newlst)then -+ -+ do k=1,j -+ -+ xold(k)=0.d0 -+ yold(k)=0.d0 -+ zold(k)=0.d0 -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine vertest -+ -+ subroutine vertest2(newlst,idnode,mxnode,natms,imcon,delr,tstep) -+ -+c********************************************************************* -+c -+c DL_POLY subroutime to test for updating of Verlet list -+c replicated data version (version 2) -+c -+c copyright daresbury laboratory -+c author - w.smith 2007 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical newlst,newjob -+ integer idnode,mxnode,natms,imcon,i,j,k,moved,ibuff,fail -+ real(8) rmax,dr,delr,tstep -+ -+ real(8), allocatable :: xold(:),yold(:),zold(:) -+ real(8), allocatable :: xdif(:),ydif(:),zdif(:) -+ -+ save newjob,xold,yold,zold -+ -+ data newjob/.true./,fail/0/ -+ -+ if((natms+mxnode-1)/mxnode.gt.msatms) call error(idnode,112) -+ -+c set up initial arrays -+ -+ allocate (xdif(msatms),ydif(msatms),zdif(msatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1930) -+ -+ if(newjob)then -+ -+ allocate (xold(msatms),yold(msatms),zold(msatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1930) -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xold(j)=xxx(i) -+ yold(j)=yyy(i) -+ zold(j)=zzz(i) -+ -+ enddo -+ -+ newjob=.false. -+ newlst=.true. -+ -+ else -+ -+c calculate atomic shifts -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xdif(j)=xxx(i)-xold(j) -+ ydif(j)=yyy(i)-yold(j) -+ zdif(j)=zzz(i)-zold(j) -+ -+ enddo -+ -+c minimum image calculation -+ -+ call images(imcon,0,1,j,cell,xdif,ydif,zdif) -+ -+c maximum displacement -+ -+ rmax=(delr/2.d0)**2 -+ -+c test atomic displacements -+ -+ moved=0 -+ -+ do k=1,j -+ -+ dr=(xdif(k)**2+ydif(k)**2+zdif(k)**2) -+ if(dr.gt.rmax)moved=moved+1 -+ -+ enddo -+ -+c global sum of moved atoms -+ -+ if(mxnode.gt.1) call gisum(moved,1,ibuff) -+ -+c test for new verlet list -+ -+ newlst=(moved.ge.2) -+ -+c update stored positions -+ -+ if(newlst)then -+ -+ j=0 -+ do i=idnode+1,natms,mxnode -+ -+ j=j+1 -+ xold(j)=xxx(i) -+ yold(j)=yyy(i) -+ zold(j)=zzz(i) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c deallocate arrays -+ -+ deallocate(xdif,ydif,zdif,stat=fail) -+ -+ return -+ end subroutine vertest2 -+ -+ end module nlist_builders_module -diff -urN dl_class_1.9.orig/srcmod/optimiser_module.f dl_class_1.9/srcmod/optimiser_module.f ---- dl_class_1.9.orig/srcmod/optimiser_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/optimiser_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1144 @@ -+ module optimiser_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining structural optimiser routines -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: ggx(:),ggy(:),ggz(:) -+ real(8), allocatable :: hhx(:),hhy(:),hhz(:) -+ real(8), allocatable :: oxx(:),oyy(:),ozz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ -+ save hhx,hhy,hhz -+ -+ contains -+ -+ subroutine optimisation_selector -+ x (loptim,stropt,lzero,idnode,mxnode,natms,imcon,ntcons, -+ x nscons,ngrp,ntfree,keystr,keytol,engcfg,tstep,opttol) -+ -+c*********************************************************************** -+c -+c dl_poly routine for selecting and running a nominated -+c structure optimisation algorithm using energy minimisation -+c -+c copyright - daresbury laboratory -+c author - w. smith june 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical loptim,stropt,lzero -+ integer idnode,mxnode,natms,imcon,nscons,ngrp,ntfree,keystr -+ integer keytol,ntcons -+ real(8) engcfg,tstep,opttol,hnorm,grad0,grad1,ff1,sgn -+ -+ save grad0,grad1,ff1,sgn,hnorm -+ -+ stropt=.false. -+ -+ if(loptim)then -+ -+c conjugate gradient structure optimisation -+ -+ call strucopt -+ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,engcfg,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+ else if(lzero)then -+ -+c zero kelvin structure optimisation -+ -+ call zero_kelvin -+ x (stropt,idnode,mxnode,imcon,natms,ngrp,ntfree,opttol) -+ -+ endif -+ -+ return -+ end subroutine optimisation_selector -+ -+ subroutine zero_kelvin -+ x (stropt,idnode,mxnode,imcon,natms,ngrp,ntfree,opttol) -+ -+c*********************************************************************** -+c -+c dl_poly routine for zero Kelvin temperature optimization -+c if velocity.Force < 0 then velocity is set to zero in -+c preparation for integration of equations of motion -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1994 -+c author t.forester march 1994 -+c amended t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical stropt -+ integer idnode,mxnode,imcon,natms,ngrp,ntfree,fail,i -+ integer iatm0,iatm1,igrp1,igrp2,ifre1,ifre2,jr,ig,j,id -+ real(8) dot,fsq,fcomx,fcomy,fcomz,trx,try,trz,tax,tay,taz -+ real(8) rot,ggg,opttol -+ -+ dimension rot(9) -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1920) -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c check for convergence of forces -+ -+ ggg=0.d0 -+ do i=iatm0,iatm1 -+ ggg=ggg+fxx(i)**2+fyy(i)**2+fzz(i)**2 -+ enddo -+ -+ if(mxnode.gt.1)then -+ buffer(1)=ggg -+ call gdsum(buffer(1),1,buffer(2)) -+ ggg=buffer(1) -+ endif -+ -+c check convergence condition for forces -+ -+ if(opttol.ge.abs(ggg)/dble(natms))then -+ -+ stropt=.true. -+ return -+ -+ endif -+ -+ if(ngrp.eq.0) then -+ -+c take component of velocity in direction of force -+ -+ do i=iatm0,iatm1 -+ -+ dot=vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ if(dot.lt.0.d0) then -+ -+ vxx(i)=0.d0 -+ vyy(i)=0.d0 -+ vzz(i)=0.d0 -+ -+ else -+ -+c take component of velocity in direction of force -+ -+ fsq=(fxx(i)**2+fyy(i)**2+fzz(i)**2) -+ fsq=dot/max(1.d-10,fsq) -+ vxx(i)=fxx(i)*fsq -+ vyy(i)=fyy(i)*fsq -+ vzz(i)=fzz(i)*fsq -+ -+ endif -+ -+ enddo -+ -+ else -+ -+c block indices for groups and free atoms -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+ do j=ifre1,ifre2 -+ -+c reset atomic velocities -+ -+ i=lstfre(j) -+ -+ dot=vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ if(dot.lt.0.d0) then -+ -+ vxx(i)=0.d0 -+ vyy(i)=0.d0 -+ vzz(i)=0.d0 -+ -+ else -+ -+c take component of velocity in direction of force -+ -+ fsq=(fxx(i)**2+fyy(i)**2+fzz(i)**2) -+ fsq=dot/max(1.d-10,fsq) -+ vxx(i)=fxx(i)*fsq -+ vyy(i)=fyy(i)*fsq -+ vzz(i)=fzz(i)*fsq -+ -+ endif -+ -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c reset rigid body velocites (linear and angular) -+ -+ fcomx=0.d0 -+ fcomy=0.d0 -+ fcomz=0.d0 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c forces on com -+ -+ fcomx=fcomx+fxx(i) -+ fcomy=fcomy+fyy(i) -+ fcomz=fcomz+fzz(i) -+ -+ enddo -+ -+ dot=gvxx(ig)*fcomx+gvyy(ig)*fcomy+gvzz(ig)*fcomz -+ if(dot.lt.0.d0) then -+ -+ gvxx(ig)=0.d0 -+ gvyy(ig)=0.d0 -+ gvzz(ig)=0.d0 -+ -+ else -+ -+c take component of velocity in direction of force -+ -+ fsq=(fcomx**2+fcomy**2+fcomz**2) -+ fsq=dot/max(1.d-10,fsq) -+ gvxx(ig)=fcomx*fsq -+ gvyy(ig)=fcomy*fsq -+ gvzz(ig)=fcomz*fsq -+ -+ endif -+ -+ enddo -+ -+c site to com distances -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ do j=1,numgsit(lstgtp(ig)) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxt(jr)=xxx(i)-gcmx(ig) -+ yyt(jr)=yyy(i)-gcmy(ig) -+ zzt(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) -+ -+c calculate torques in lab frame -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ trx=0.d0 -+ try=0.d0 -+ trz=0.d0 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ trx=trx+yyt(jr)*fzz(i)-zzt(jr)*fyy(i) -+ try=try+zzt(jr)*fxx(i)-xxt(jr)*fzz(i) -+ trz=trz+xxt(jr)*fyy(i)-yyt(jr)*fxx(i) -+ -+ enddo -+ -+ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 -+ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) -+ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) -+ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) -+ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 -+ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) -+ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) -+ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) -+ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 -+ -+c transform to body fixed frame -+ -+ tax=(trx*rot(1)+try*rot(4)+trz*rot(7))*rotinx(id,2) -+ tay=(trx*rot(2)+try*rot(5)+trz*rot(8))*rotiny(id,2) -+ taz=(trx*rot(3)+try*rot(6)+trz*rot(9))*rotinz(id,2) -+ -+ dot=omx(ig)*tax+omy(ig)*tay+omz(ig)*taz -+ if(dot.le.0.d0) then -+ -+ omx(ig)=0.d0 -+ omy(ig)=0.d0 -+ omz(ig)=0.d0 -+ -+ else -+ -+c take component of velocity in direction of torque -+ -+ fsq=(tax**2+tay**2+taz**2) -+ fsq=dot/max(1.d-10,fsq) -+ omx(ig)=tax*fsq -+ omy(ig)=tay*fsq -+ omz(ig)=taz*fsq -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail) -+ -+ return -+ end subroutine zero_kelvin -+ -+ subroutine strucopt -+ x (stropt,keystr,keytol,idnode,mxnode,natms,ntcons,nscons, -+ x imcon,ngrp,ntfree,tstep,opttol,fnew,hnorm,grad0,grad1, -+ x ff1,sgn) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for optimising molecular structures -+c based on conjugate gradient method -+c -+c copyright - daresbury laboratory -+c author - w. smith dec 2005 -+c -+c note. basis of minimisation criterion : -+c keytol=0 : absolute force -+c keytol=1 : absolute energy -+c keytol=2 : absolute displacement -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ -+ logical stropt,newjob,engchk -+ integer keystr,keytol,idnode,mxnode,natms,i,j,k -+ integer iatm0,iatm1,fail,ngrp,ntcons,nscons,jr -+ integer imcon,ig,jf,id,ntfree,igrp1,igrp2,ifre1,ifre2 -+ real(8) hnorm,grad0,grad1,grad2,ff1,stride,tstep,step -+ real(8) ggg,fnew,fff,gam2,sgn,opttol,dischk -+ -+ dimension fail(nnn) -+ -+ save iatm0,iatm1,igrp1,igrp2,engchk,ifre1,ifre2,newjob -+ -+ data newjob/.true./,engchk/.false./ -+ -+c define initial data -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ if(newjob)then -+ allocate(hhx(mxatms),hhy(mxatms),hhz(mxatms),stat=fail(1)) -+ endif -+ allocate(ggx(mxatms),ggy(mxatms),ggz(mxatms),stat=fail(2)) -+ allocate(oxx(mxatms),oyy(mxatms),ozz(mxatms),stat=fail(3)) -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(4)) -+ if(ngrp.gt.0)then -+ -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(6)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ if(ngrp.eq.0) -+ x allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(dxx(mxatms),dyy(mxatms),dzz(mxatms),stat=fail(7)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) -+ -+ endif -+ -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1925) -+ enddo -+ -+ if(newjob)then -+ -+c define atoms for this node -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+ newjob=.false. -+ -+ endif -+ -+c step length for relaxation -+ -+ if(ntcons.gt.0)then -+ step=tstep**2 -+ else -+ step=10.d0*tstep**2 -+ endif -+ -+c current system configuration energy -+ -+ fff=fnew -+ -+c initialise conjugate gradient position arrays -+ -+ do i=1,natms -+ -+ oxx(i)=xxx(i) -+ oyy(i)=yyy(i) -+ ozz(i)=zzz(i) -+ ggx(i)=0.d0 -+ ggy(i)=0.d0 -+ ggz(i)=0.d0 -+ -+ enddo -+ -+c define constraint bonds -+ -+ if(ntcons.gt.0)then -+ -+c calculate constraint bond vector -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c calculate pseudo forces for constraint bonds -+ -+ call pseudo_shake(nscons,natms,mxnode,fff) -+ -+ do i=1,natms -+ -+ ggx(i)=fxx(i)+ggx(i) -+ ggy(i)=fyy(i)+ggy(i) -+ ggz(i)=fzz(i)+ggz(i) -+ -+ enddo -+ -+ else -+ -+ do i=1,natms -+ -+ ggx(i)=fxx(i) -+ ggy(i)=fyy(i) -+ ggz(i)=fzz(i) -+ -+ enddo -+ -+ endif -+ -+c calculate pseudo forces for rigid bodies -+ -+ if(ngrp.gt.0)call torque_split -+ x (ngrp,idnode,mxnode,imcon,ggx,ggy,ggz,txx,tyy,tzz, -+ x uxx,uyy,uzz,dtx,dty,dtz) -+ -+c determine magnitude of 3N force vector -+ -+ ggg=0.d0 -+ -+ if(ngrp.eq.0)then -+ -+ do i=iatm0,iatm1 -+ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 -+ enddo -+ -+ else -+ -+ do jf=ifre1,ifre2 -+ -+ i=lstfre(jf) -+ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 -+ -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ggg=ggg+ggx(i)**2+ggy(i)**2+ggz(i)**2 -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ buffer(1)=ggg -+ call gdsum(buffer(1),1,buffer(2)) -+ ggg=buffer(1) -+ endif -+ ggg=sqrt(ggg) -+ -+c check convergence condition for forces -+ -+ if(keytol.eq.0.and.opttol.ge.abs(ggg)/dble(natms))stropt=.true. -+ -+ if(keystr.eq.0) then -+ -+c set original search direction -+ -+ ff1=fff -+ hnorm=ggg -+ grad0=ggg -+ grad1=ggg -+ -+ if(ngrp.eq.0)then -+ -+ do i=iatm0,iatm1 -+ -+ hhx(i)=ggx(i) -+ hhy(i)=ggy(i) -+ hhz(i)=ggz(i) -+ oxx(i)=oxx(i)+step*hhx(i) -+ oyy(i)=oyy(i)+step*hhy(i) -+ ozz(i)=ozz(i)+step*hhz(i) -+ -+ enddo -+ -+ else -+ -+ do jf=ifre1,ifre2 -+ -+ i=lstfre(jf) -+ hhx(i)=ggx(i) -+ hhy(i)=ggy(i) -+ hhz(i)=ggz(i) -+ -+ enddo -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ hhx(i)=ggx(i) -+ hhy(i)=ggy(i) -+ hhz(i)=ggz(i) -+ -+ enddo -+ -+ enddo -+ -+ call turn_rigid_body -+ x (igrp1,igrp2,ifre1,ifre2,step,hhx,hhy,hhz, -+ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) -+ -+ endif -+ -+ keystr=1 -+ sgn=1.d0 -+ -+ elseif(keystr.eq.1)then -+ -+c check convergence condition for energy -+ -+ if(engchk.and.keytol.eq.1.and. -+ x opttol.ge.abs(fff-ff1))stropt=.true. -+ engchk=.false. -+ -+c line search along chosen direction -+ -+ ff1=fff -+ grad2=grad1 -+ grad1=0.d0 -+ do i=iatm0,iatm1 -+ grad1=grad1+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) -+ enddo -+ if(mxnode.gt.1)then -+ buffer(1)=grad1 -+ call gdsum(buffer(1),1,buffer(2)) -+ grad1=buffer(1) -+ endif -+ grad1=sgn*grad1/hnorm -+ -+c linear extrapolation to minimum -+ -+ stride=sgn*step -+ if(grad1.lt.0.d0)then -+ -+ keystr=2 -+ stride=sgn*step*grad1/(grad2-grad1) -+ -+ endif -+ -+ if(ngrp.eq.0)then -+ -+ do i=iatm0,iatm1 -+ -+ oxx(i)=oxx(i)+stride*hhx(i) -+ oyy(i)=oyy(i)+stride*hhy(i) -+ ozz(i)=ozz(i)+stride*hhz(i) -+ -+ enddo -+ -+ else -+ -+ call turn_rigid_body -+ x (igrp1,igrp2,ifre1,ifre2,stride,hhx,hhy,hhz, -+ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) -+ -+ endif -+ -+ elseif(keystr.eq.2)then -+ -+c construct conjugate search vector -+ -+ ff1=fff -+ gam2=(ggg/grad0)**2 -+ hnorm=0.d0 -+ grad0=ggg -+ grad1=0.d0 -+ do i=iatm0,iatm1 -+ -+ hhx(i)=ggx(i)+gam2*hhx(i) -+ hhy(i)=ggy(i)+gam2*hhy(i) -+ hhz(i)=ggz(i)+gam2*hhz(i) -+ hnorm=hnorm+hhx(i)**2+hhy(i)**2+hhz(i)**2 -+ grad1=grad1+hhx(i)*ggx(i)+hhy(i)*ggy(i)+hhz(i)*ggz(i) -+ -+ enddo -+ if(mxnode.gt.1)then -+ -+ buffer(1)=hnorm -+ buffer(2)=grad1 -+ call gdsum(buffer(1),2,buffer(3)) -+ hnorm=buffer(1) -+ grad1=buffer(2) -+ -+ endif -+ hnorm=sqrt(hnorm) -+ grad1=grad1/hnorm -+ sgn=sign(1.d0,grad1) -+ grad1=sgn*grad1 -+ stride=sgn*step -+ -+ if(ngrp.eq.0)then -+ -+ do i=iatm0,iatm1 -+ -+ oxx(i)=oxx(i)+stride*hhx(i) -+ oyy(i)=oyy(i)+stride*hhy(i) -+ ozz(i)=ozz(i)+stride*hhz(i) -+ -+ enddo -+ -+ else -+ -+ call turn_rigid_body -+ x (igrp1,igrp2,ifre1,ifre2,stride,hhx,hhy,hhz, -+ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) -+ -+ endif -+ -+ engchk=.true. -+ keystr=1 -+ -+ endif -+ -+c merge coordinate arrays -+ -+ if(mxnode.gt.1)then -+ -+ if(ngrp.eq.0)then -+ -+ call merge -+ x (idnode,mxnode,natms,mxbuff,oxx,oyy,ozz,buffer) -+ -+ else -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,oxx,oyy,ozz,buffer) -+ -+ endif -+ -+ endif -+ -+c reassign atomic positions and calculate max displacement -+ -+ dischk=0.d0 -+ do i=1,natms -+ -+ dischk=max(dischk,(xxx(i)-oxx(i))**2+ -+ x (yyy(i)-oyy(i))**2+(zzz(i)-ozz(i))**2) -+ -+ xxx(i)=oxx(i) -+ yyy(i)=oyy(i) -+ zzz(i)=ozz(i) -+ -+ enddo -+ -+c check convergence condition for position -+ -+ if(keytol.eq.2.and.keystr.gt.0.and. -+ x opttol.ge.sqrt(dischk))stropt=.true. -+ -+c deallocate working arrays -+ -+ deallocate(ggx,ggy,ggz,dtx,dty,dtz,oxx,oyy,ozz,stat=fail(1)) -+ if(ngrp.gt.0)then -+ deallocate(txx,tyy,tzz,uxx,uyy,uzz,stat=fail(2)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(3)) -+ if(ngrp.eq.0)deallocate(txx,tyy,tzz,stat=fail(4)) -+ -+ endif -+ -+ return -+ end subroutine strucopt -+ -+ subroutine pseudo_shake(nscons,natms,mxnode,fff) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine treating rigid bonds as stiff harmonic bonds -+c suitable for conjugate gradient minimisation -+c -+c copyright - daresbury laboratory -+c author - w. smith may 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ real(8), parameter :: harm=1.d6 -+ -+ integer i,j,k,natms,nscons,mxnode -+ real(8) fff,engbnd,dis,rrr,gamma -+ -+c calculate energy and force -+ -+ engbnd=0.d0 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dis=prmcon(listcon(k,1)) -+ rrr=sqrt(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ engbnd=engbnd+0.5d0*harm*(rrr-dis)**2 -+ gamma=harm*(rrr-dis)/rrr -+ ggx(i)=ggx(i)-dxx(k)*gamma -+ ggy(i)=ggy(i)-dyy(k)*gamma -+ ggz(i)=ggz(i)-dzz(k)*gamma -+ -+ ggx(j)=ggx(j)+dxx(k)*gamma -+ ggy(j)=ggy(j)+dyy(k)*gamma -+ ggz(j)=ggz(j)+dzz(k)*gamma -+ -+ enddo -+ -+c global sum of pseudo forces -+ -+ call global_sum_forces(natms,mxnode,ggx,ggy,ggz) -+ if(mxnode.gt.1)then -+ buffer(1)=engbnd -+ call gdsum(buffer(1),1,buffer(2)) -+ engbnd=buffer(1) -+ endif -+ fff=fff+engbnd -+ -+ return -+ end subroutine pseudo_shake -+ -+ subroutine torque_split -+ x (ngrp,idnode,mxnode,imcon,ggx,ggy,ggz,txx,tyy,tzz, -+ x uxx,uyy,uzz,dtx,dty,dtz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for resolving torques into equivalent atomic -+c forces suitable for conjugate gradient minimisation -+c -+c copyright - daresbury laboratory -+c author - w. smith may 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,j,ig,id,jr,jrs,ngrp,igrp1,igrp2,idnode,imcon,mxnode -+ -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,trq,txx,tyy,tzz -+ real(8) ggx,ggy,ggz,tmp,taq,scale -+ real(8) uxx,uyy,uzz,dtx,dty,dtz -+ -+ dimension ggx(mxatms),ggy(mxatms),ggz(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) -+ dimension dtx(mxatms),dty(mxatms),dtz(mxatms) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c calculate centres of mass of rigid bodies -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c working com is first site in group -+ -+ i=lstrgd(jr+1) -+ txx(ig)=xxx(i) -+ tyy(ig)=yyy(i) -+ tzz(ig)=zzz(i) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ uxx(jr)=xxx(i)-txx(ig) -+ uyy(jr)=yyy(i)-tyy(ig) -+ uzz(jr)=zzz(i)-tzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c minimum image from working com -+ -+ call images(imcon,0,1,jr,cell,uxx,uyy,uzz) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=0.d0 -+ gcmy(ig)=0.d0 -+ gcmz(ig)=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ gcmx(ig)=gcmx(ig)+weight(i)*uxx(jr) -+ gcmy(ig)=gcmy(ig)+weight(i)*uyy(jr) -+ gcmz(ig)=gcmz(ig)+weight(i)*uzz(jr) -+ -+ enddo -+ -+c final centre of mass -+ -+ gcmx(ig)=gcmx(ig)/gmass(id)+txx(ig) -+ gcmy(ig)=gcmy(ig)/gmass(id)+tyy(ig) -+ gcmz(ig)=gcmz(ig)/gmass(id)+tzz(ig) -+ -+ enddo -+ -+c calculate atom displacements from rigid body com -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c resolve rigid body forces and torques to orthogonal atomic basis -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+ggx(i) -+ fmy=fmy+ggy(i) -+ fmz=fmz+ggz(i) -+ -+ enddo -+ fmx=fmx/dble(numgsit(id)) -+ fmy=fmy/dble(numgsit(id)) -+ fmz=fmz/dble(numgsit(id)) -+ -+c calculate torque on rigid body -+ -+ jr=jrs -+ tqx=0.d0 -+ tqy=0.d0 -+ tqz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx=tqx+dty(jr)*ggz(i)-dtz(jr)*ggy(i) -+ tqy=tqy+dtz(jr)*ggx(i)-dtx(jr)*ggz(i) -+ tqz=tqz+dtx(jr)*ggy(i)-dty(jr)*ggx(i) -+ -+ enddo -+ -+c magnitude of torque -+ -+ trq=sqrt(tqx**2+tqy**2+tqz**2) -+ -+c construct unit vectors for new site forces -+ -+ jr=jrs -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ txx(i)=dty(jr)*tqz-tqy*dtz(jr) -+ tyy(i)=dtz(jr)*tqx-tqz*dtx(jr) -+ tzz(i)=dtx(jr)*tqy-tqx*dty(jr) -+ tmp=sqrt(txx(i)**2+tyy(i)**2+tzz(i)**2) -+ if(tmp.gt.1.d-10)then -+ -+ txx(i)=txx(i)/tmp -+ tyy(i)=tyy(i)/tmp -+ tzz(i)=tzz(i)/tmp -+ -+ else -+ -+ txx(i)=0.d0 -+ tyy(i)=0.d0 -+ tzz(i)=0.d0 -+ -+ endif -+ -+ enddo -+ -+c construct unit vectors for site location -+ -+ jr=jrs -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ uxx(i)=(tyy(i)*tqz-tqy*tzz(i))/trq -+ uyy(i)=(tzz(i)*tqx-tqz*txx(i))/trq -+ uzz(i)=(txx(i)*tqy-tqx*tyy(i))/trq -+ -+ enddo -+ -+c scale unit vectors to working lengths -+ -+ jr=jrs -+ taq=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ tmp=dtx(jr)*uxx(i)+dty(jr)*uyy(i)+dtz(jr)*uzz(i) -+ taq=taq+tmp**2 -+ txx(i)=tmp*txx(i) -+ tyy(i)=tmp*tyy(i) -+ tzz(i)=tmp*tzz(i) -+ uxx(i)=tmp*uxx(i) -+ uyy(i)=tmp*uyy(i) -+ uzz(i)=tmp*uzz(i) -+ -+ enddo -+ -+c calculate force scale factor -+ -+ scale=trq/taq -+ -+c final site forces -+ -+ jr=jrs -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ txx(i)=scale*txx(i) -+ tyy(i)=scale*tyy(i) -+ tzz(i)=scale*tzz(i) -+ ggx(i)=fmx -+ ggy(i)=fmy -+ ggz(i)=fmz -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine torque_split -+ -+ subroutine turn_rigid_body -+ x (igrp1,igrp2,ifre1,ifre2,step,hhx,hhy,hhz, -+ x uxx,uyy,uzz,txx,tyy,tzz,oxx,oyy,ozz) -+ -+c*********************************************************************** -+c -+c dl_poly routine for updating positions of atoms in a rigid body -+c during a conjugate gradient minimisation -+c -+c copyright daresbury laboratory -+c author w.smith may 2006 -+c -+c note: coz=cos(theta)-1 -+c zin=sin(theta)/theta -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,j,jr,jf,ig,id,igrp1,igrp2,ifre1,ifre2 -+ real(8) step,hhx,hhy,hhz,uxx,uyy,uzz,txx,tyy,tzz -+ real(8) oxx,oyy,ozz,uuu,ttt,the2,coz,zin -+ -+ dimension hhx(mxatms),hhy(mxatms),hhz(mxatms) -+ dimension oxx(mxatms),oyy(mxatms),ozz(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension uxx(mxatms),uyy(mxatms),uzz(mxatms) -+ -+c update free atom positions -+ -+ do jf=ifre1,ifre2 -+ -+ i=lstfre(jf) -+ oxx(i)=oxx(i)+step*hhx(i) -+ oyy(i)=oyy(i)+step*hhy(i) -+ ozz(i)=ozz(i)+step*hhz(i) -+ -+ enddo -+ -+c update rigid body atoms -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ uuu=uxx(i)**2+uyy(i)**2+uzz(i)**2 -+ if(uuu.gt.1.d-10)then -+ -+ ttt=txx(i)**2+tyy(i)**2+tzz(i)**2 -+ the2=(ttt/uuu)*step**2 -+ -+ coz=-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0- -+ x the2/132.d0)/90.d0)/56.d0)/30.d0)/12.d0)/2.d0 -+ zin=-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0-the2*(1.d0- -+ x the2/156.d0)/110.d0)/72.d0)/42.d0)/20.d0)/6.d0+1.d0 -+ -+ oxx(i)=oxx(i)+coz*uxx(i)+step*(hhx(i)+zin*txx(i)) -+ oyy(i)=oyy(i)+coz*uyy(i)+step*(hhy(i)+zin*tyy(i)) -+ ozz(i)=ozz(i)+coz*uzz(i)+step*(hhz(i)+zin*tzz(i)) -+ -+ else -+ -+ oxx(i)=oxx(i)+step*hhx(i) -+ oyy(i)=oyy(i)+step*hhy(i) -+ ozz(i)=ozz(i)+step*hhz(i) -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine turn_rigid_body -+ -+ end module optimiser_module -diff -urN dl_class_1.9.orig/srcmod/pair_module.f dl_class_1.9/srcmod/pair_module.f ---- dl_class_1.9.orig/srcmod/pair_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/pair_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,46 @@ -+ module pair_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining atom pair data -+c copyright - daresbury laboratory -+c author - w. smith mar 2004 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ integer, allocatable :: ilist(:),jlist(:) -+ real(8), allocatable :: xdf(:),ydf(:),zdf(:) -+ real(8), allocatable :: rsqdf(:) -+ -+ save ilist,jlist,xdf,ydf,zdf,rsqdf -+ -+ contains -+ -+ subroutine alloc_pair_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=6 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ allocate (ilist(mxxdf),stat=fail(1)) -+ allocate (jlist(mxxdf),stat=fail(2)) -+ allocate (xdf(mxxdf),stat=fail(3)) -+ allocate (ydf(mxxdf),stat=fail(4)) -+ allocate (zdf(mxxdf),stat=fail(5)) -+ allocate (rsqdf(mxxdf),stat=fail(6)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1940) -+ enddo -+ -+ end subroutine alloc_pair_arrays -+ -+ end module pair_module -diff -urN dl_class_1.9.orig/srcmod/parse_module.f dl_class_1.9/srcmod/parse_module.f ---- dl_class_1.9.orig/srcmod/parse_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/parse_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,585 @@ -+ module parse_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining parsing arrays -+c copyright - daresbury laboratory -+c author - w. smith jan 2004 -+c -+c*********************************************************************** -+ -+ integer, parameter :: lenrec=150 -+ character*1 record(lenrec) -+ save record -+ -+ contains -+ -+ subroutine getrec(safe,idnode,ifile) -+ -+c********************************************************************* -+c -+c dl_poly subroutine to read a character string on one node -+c and broadcast it to all other nodes -+c -+c copyright daresbury laboratory 1994 -+c author w.smith december 1994 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical safe -+ -+ character*150 line -+ integer export,import,idnode,ifile,i -+ dimension export(lenrec),import(lenrec) -+ -+ safe=.true. -+ -+ call gsync() -+ -+ if(idnode.eq.0)then -+ -+ read(ifile,'(a150)',end=100)line -+ -+ do i=1,lenrec -+ -+ record(i)=line(i:i) -+ export(i)=ichar(line(i:i)) -+ -+ enddo -+ -+ call gstate(safe) -+ call gisum(export,lenrec,import) -+ -+ return -+ -+ 100 safe=.false. -+ -+ call gstate(safe) -+ -+ else -+ -+ call gstate(safe) -+ if(.not.safe)return -+ -+ do i=1,lenrec -+ -+ export(i)=0 -+ -+ enddo -+ -+ call gisum(export,lenrec,import) -+ -+ do i=1,lenrec -+ -+ record(i)=char(export(i)) -+ -+ enddo -+ -+ return -+ -+ endif -+ -+ end subroutine getrec -+ -+ integer function intstr(word,len,lst) -+ -+c*********************************************************************** -+c -+c dl_poly function for extracting integers from a -+c character string -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith may 1994. -+c -+c parameters: -+c word - input character string -+c len - working length of character string -+c lst - location of space character at end of -+c integer string -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical flag,count,final -+ character*1 n,word,ksn -+ integer lst,len,j,isn -+ -+ dimension n(0:9),word(len) -+ data n/'0','1','2','3','4','5','6','7','8','9'/ -+ -+ isn=1 -+ lst=0 -+ ksn='+' -+ intstr=0 -+ flag=.false. -+ final=.false. -+ count=.false. -+ -+ do while(lst.lt.len.and.(.not.final)) -+ -+ lst=lst+1 -+ flag=.false. -+ -+ do j=0,9 -+ -+ if(n(j).eq.word(lst))then -+ -+ intstr=10*intstr+j -+ count=.true. -+ flag=.true. -+ -+ endif -+ -+ enddo -+ -+ if(count.and.(.not.flag))final=.true. -+ if(flag.and.ksn.eq.'-')isn=-1 -+ ksn=word(lst) -+ -+ enddo -+ -+ intstr=isn*intstr -+ -+ do j=lst,len -+ word(j-lst+1)=word(j) -+ enddo -+ do j=len-lst+2,len -+ word(j)=' ' -+ enddo -+ -+ return -+ end function intstr -+ -+ real(8) function dblstr(word,len,lst) -+ -+c*********************************************************************** -+c -+c dl_poly function for extracting double precisions from a -+c character string. -+c modified from dl_poly function intstr -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith may 1994. -+c modified - t. forester april 1994 -+c -+c parameters: -+c word - input character string -+c len - working length of character string -+c lst - location of space character at end of -+c double precision string -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 n,word,ksn,dot,d,e -+ logical flag,ldot,start,final -+ integer len,lst,iexp,idum,i,j,fail -+ real(8) sn,ten,one -+ dimension n(0:9),word(len) -+ character*1, allocatable :: work(:) -+ -+ data n/'0','1','2','3','4','5','6','7','8','9'/ -+ data dot/'.'/ -+ data d/'d'/ -+ data e/'e'/ -+ -+ allocate(work(len),stat=fail) -+ -+ lst=0 -+ sn=1.d0 -+ ksn='+' -+ ten=10.d0 -+ one=1.d0 -+ -+ dblstr=0.d0 -+ iexp=0 -+ idum=0 -+ start=.false. -+ ldot=.false. -+ final=.false. -+ -+ do while(lst.lt.len.and.(.not.final)) -+ -+ lst=lst+1 -+ flag=.false. -+ -+ do j=0,9 -+ -+ if(n(j).eq.word(lst))then -+ -+ dblstr=ten*dblstr+one*dble(j) -+ flag=.true. -+ start=.true. -+ -+ endif -+ -+ enddo -+ -+ if(dot.eq.word(lst))then -+ -+ flag=.true. -+ ten=1.d0 -+ ldot=.true. -+ start=.true. -+ -+ endif -+ -+ if(flag.and.ksn.eq.'-') sn=-1.d0 -+ if(ldot) one=one/10.d0 -+ ksn=word(lst) -+ if(ksn.eq."D")ksn="d" -+ if(ksn.eq."E")ksn="e" -+ -+ if(start)then -+ -+ if(d.eq.ksn.or.e.eq.ksn)then -+ -+ do i=1,len-lst -+ work(i)=word(i+lst) -+ enddo -+ iexp=intstr(work,len-lst,idum) -+ final=.true. -+ -+ endif -+ -+ if(.not.flag)final=.true. -+ -+ endif -+ -+ enddo -+ -+ dblstr=sn*dblstr*(10.d0**iexp) -+ lst=lst+idum -+ -+ do j=lst,len -+ word(j-lst+1)=word(j) -+ enddo -+ do j=len-lst+2,len -+ word(j)=' ' -+ enddo -+ -+ deallocate(work,stat=idum) -+ -+ return -+ end function dblstr -+ -+ subroutine strip(string,imax) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to strip blanks from start of a string -+c maximum length is 255 characters -+c -+c copyright daresbury laboratory 1993 -+c author t.forester july 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,imax,j -+ character*1 string(imax) -+ -+ do i=1,imax -+ -+ if(string(1).eq.' ')then -+ -+ do j=1,imax-1 -+ -+ string(j)=string(j+1) -+ -+ enddo -+ -+ string(imax)=' ' -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine strip -+ -+ subroutine lowcase(string,length) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to lowercase a string of up to 255 characters. -+c Transportable to non-ASCII machines -+c -+c copyright daresbury laboratory 1993 -+c author t. forester july 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 string(*) -+ character*1 letter -+ integer i,length -+ -+ do i=1,min(255,length) -+ -+ letter=string(i) -+ -+ if(letter.eq.'A')then -+ letter='a' -+ else if(letter.eq.'B')then -+ letter='b' -+ else if(letter.eq.'C')then -+ letter='c' -+ else if(letter.eq.'D')then -+ letter='d' -+ else if(letter.eq.'E')then -+ letter='e' -+ else if(letter.eq.'F')then -+ letter='f' -+ else if(letter.eq.'G')then -+ letter='g' -+ else if(letter.eq.'H')then -+ letter='h' -+ else if(letter.eq.'I')then -+ letter='i' -+ else if(letter.eq.'J')then -+ letter='j' -+ else if(letter.eq.'K')then -+ letter='k' -+ else if(letter.eq.'L')then -+ letter='l' -+ else if(letter.eq.'M')then -+ letter='m' -+ else if(letter.eq.'N')then -+ letter='n' -+ else if(letter.eq.'O')then -+ letter='o' -+ else if(letter.eq.'P')then -+ letter='p' -+ else if(letter.eq.'Q')then -+ letter='q' -+ else if(letter.eq.'R')then -+ letter='r' -+ else if(letter.eq.'S')then -+ letter='s' -+ else if(letter.eq.'T')then -+ letter='t' -+ else if(letter.eq.'U')then -+ letter='u' -+ else if(letter.eq.'V')then -+ letter='v' -+ else if(letter.eq.'W')then -+ letter='w' -+ else if(letter.eq.'X')then -+ letter='x' -+ else if(letter.eq.'Y')then -+ letter='y' -+ else if(letter.eq.'Z')then -+ letter='z' -+ endif -+ -+ string(i)=letter -+ -+ enddo -+ -+ return -+ end subroutine lowcase -+ -+ subroutine copystring(oldstr,newstr,length) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to copy one string into another -+c -+c copyright daresbury laboratory -+c author w. smith jan 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 newstr(*),oldstr(*) -+ integer i,length -+ -+ do i=1,length -+ -+ newstr(i)=oldstr(i) -+ -+ enddo -+ -+ return -+ end subroutine copystring -+ -+ logical function findstring(seek,string,here) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to find an explicit string in an input record -+c note: variable `seek' is a character string while variable -+c `string' is a character*1 array i.e. code is application specific -+c -+c copyright daresbury laboratory -+c author w.smith jan 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,n,m,here -+ character*(*) seek -+ character*1 string(lenrec) -+ -+ m=lenrec -+ n=len(seek) -+ findstring=.false. -+ -+ here=0 -+ do while(here.le.m-n.and.(.not.findstring)) -+ -+ findstring=.true. -+ -+ do i=1,n -+ if(seek(i:i).ne.string(here+i))findstring=.false. -+ enddo -+ -+ here=here+1 -+ -+ enddo -+ -+ return -+ end function findstring -+ -+ subroutine striptext(string,length,nwords) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to strip leading text from a data record -+c -+c copyright daresbury laboratory -+c author w.smith jan 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical final -+ integer length,nwords,i,j,k -+ character*1 string(length) -+ -+ do k=1,nwords -+ -+ i=0 -+ final=.false. -+ -+ do while(.not.final.and.i.lt.length) -+ -+ i=i+1 -+ -+ if(string(1).eq.' ')then -+ -+ final=.true. -+ -+ else -+ -+ do j=1,length-1 -+ -+ string(j)=string(j+1) -+ -+ enddo -+ -+ string(length)=' ' -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine striptext -+ -+ subroutine getword(word,string,len1,len2) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to fetch an 8 character word from a string -+c while ignoring leading blanks -+c -+c copyright daresbury laboratory -+c author w.smith jan 2004 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical final -+ character*8 word -+ integer len1,len2,i,j,k -+ character*1 wrdseq(len1),string(len2) -+ -+ do i=1,len1 -+ wrdseq(i)=' ' -+ enddo -+ -+ i=0 -+ k=0 -+ final=.false. -+ -+ do while(.not.final.and.i.lt.len2) -+ -+ i=i+1 -+ -+ if(string(1).eq.' ')then -+ -+ if(k.gt.0)final=.true. -+ -+ else -+ -+ k=k+1 -+ wrdseq(k)=string(1) -+ if(k.eq.len1)final=.true. -+ -+ endif -+ -+ do j=1,len2-1 -+ -+ string(j)=string(j+1) -+ -+ enddo -+ -+ string(len2)=' ' -+ -+ enddo -+ -+ word=mkwd8(wrdseq) -+ -+ return -+ end subroutine getword -+ -+ character*8 function mkwd8(string) -+ -+c*********************************************************************** -+c -+c DL_POLY routine to make an 8 character word from a string -+c -+c copyright daresbury laboratory -+c author w.smith nov 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i -+ character*1 string(*) -+ -+ do i=1,8 -+ mkwd8(i:i)=string(i) -+ enddo -+ -+ return -+ end function mkwd8 -+ -+ end module parse_module -+ -+ -diff -urN dl_class_1.9.orig/srcmod/pass_tools.f dl_class_1.9/srcmod/pass_tools.f ---- dl_class_1.9.orig/srcmod/pass_tools.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/pass_tools.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,318 @@ -+ subroutine passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for passing information about bond -+c constraints between nodes -+c -+c parallel replicated data version assuming direct node-node -+c connection (i.e. this version may be intel specific) -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith august 1992. -+c MPI version t.forester may 1995 -+c CPP version - w.smith may 1995 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ logical safe,lshmov -+ integer idnode,mxnode,natms,nscons,lashap,lishap,listme,ierr -+ integer listin,listot,listcon,lstfrz,i,j,k,jdnode,idum -+ -+ dimension listme(mxatms),listin(mxatms),listot(mxatms) -+ dimension lishap(mxlshp),lashap(mxproc),listcon(mxcons,3) -+ dimension lstfrz(mxatms) -+ -+ integer status(MPI_STATUS_SIZE), request -+ -+CMPIU define MPI_SEND MPI_SEND_ -+CMPIU define MPI_IRECV MPI_IRECV_ -+CMPIU define MPI_WAIT MPI_WAIT_ -+ -+ if(mxproc.lt.mxnode)call error(idnode,102) -+ -+ safe=.true. -+ -+ do i=1,natms -+ -+ listme(i)=0 -+ -+ enddo -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ listme(i)=listme(i)+1 -+ listme(j)=listme(j)+1 -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ j=0 -+ call gsync() -+ do k=1,mxnode-1 -+ -+ jdnode=mod(idnode+mxnode-k,mxnode) -+ -+ call MPI_IRECV(listin,natms,MPI_INTEGER, -+ x MPI_ANY_SOURCE,Passcon_tag+k,MPI_COMM_WORLD,request,ierr) -+ -+ call MPI_SEND(listme,natms,MPI_INTEGER,jdnode, -+ x Passcon_tag+k,MPI_COMM_WORLD,ierr) -+ -+ call MPI_WAIT(request,status,ierr) -+ -+ do i=1,natms -+ -+ if((listme(i).gt.0).and.(listin(i).gt.0.and. -+ x lstfrz(i).eq.0))then -+ -+ j=j+1 -+ if(j.gt.mxlshp)then -+ -+ safe=.false. -+ -+ else -+ -+ lishap(j)=i -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ lashap(k)=j -+ -+ enddo -+ -+ endif -+ -+c check for global error condition -+ -+ if(mxnode.gt.1) call gstate(safe) -+ -+ if(.not.safe)call error(idnode,103) -+ -+ if(mxnode.gt.1) then -+ call gisum(j,1,idum) -+ if(idnode.eq.0) write(nrite,'(/,a,14x,i10)') -+ x ' shared atoms from passcon',j/2 -+ lshmov = (j.gt.0) -+ endif -+ -+c keep record of all atoms subject to constraints -+ -+ do i=1,natms -+ -+ if(listme(i).gt.0)then -+ -+ listot(i)=1 -+ -+ else -+ -+ listot(i)=0 -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gisum(listot,natms,listin) -+ -+ return -+ end -+ -+ subroutine passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for passing information about PMF -+c constraints between nodes -+c -+c parallel replicated data version assuming direct node-node -+c connection (i.e. this version may be intel specific) -+c -+c copyright - daresbury laboratory 1995 -+c author - t.forester august 1995. -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf -+ integer npmf,i,j,k -+ -+ dimension listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) -+ dimension lstpmf(mxspmf,mspmf),npmf(2) -+ -+ if(mxproc.lt.mxnode)call error(idnode,102) -+ if(mxpmf.lt.natms) call error(idnode,490) -+ -+ do i=1,natms -+ -+ listpm(i)=0 -+ -+ enddo -+ -+ do k=1,nspmf -+ -+ do j = 1,npmf(1)+npmf(2) -+ -+ i=lstpmf(j,k) -+ listpm(i)= 1 -+ -+ enddo -+ -+ enddo -+c -+c keep record of all atoms subject to pmf constraints -+ -+ do i=1,natms -+ -+ if(listpm(i).gt.0)then -+ -+ lstpmt(i)=1 -+ -+ else -+ -+ lstpmt(i)=0 -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)call gisum(lstpmt,natms,listin) -+ -+ return -+ end -+ -+ subroutine passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for passing information about rigid body -+c atoms involved in bond constraints between nodes -+c -+c parallel replicated data version assuming direct node-node -+c connection -+c -+c copyright - daresbury laboratory 1995 -+c author - t. forester december 1995. -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ -+ implicit none -+ -+ include "comms.inc" -+ -+ logical lcnb,safe -+ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,listin -+ integer listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp -+ integer numgsit,igrp1,igrp2,i,jr,igrp,itmols,imols,lgrp,id -+ integer jj,ik,j,k -+ -+ dimension listin(mxatms) -+ dimension listcon(mxcons,3),lstcsit(2*mxcons) -+ dimension lstout(mxatms),lstrgd(mxgatm) -+ dimension nummols(mxtmls),numgrp(mxtmls),numgsit(mxungp) -+ dimension lstgtp(mxgrp) -+ -+ integer status(MPI_STATUS_SIZE) -+ -+ if(mxproc.lt.mxnode)call error(idnode,102) -+ -+c block indices for groups -+ -+ igrp1 = (idnode*ngrp)/mxnode + 1 -+ igrp2 = ((idnode+1)*ngrp)/mxnode -+ -+c locate site indices of atoms in constraints -+ -+ do i = 1,natms -+ listin(i) = 0 -+ enddo -+ -+c loop over molecule types -+ -+ jr = 0 -+ igrp = 0 -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then -+ -+ id = lstgtp(igrp) -+ do jj = 1,numgsit(id) -+ -+ jr = jr +1 -+ i = lstrgd(jr) -+ listin(i) = jj -+ -+ enddo -+ endif -+ enddo -+ enddo -+ enddo -+ -+ if(mxnode.gt.1) call gisum(listin,natms,lstout) -+ -+ safe = .true. -+ ik = 0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ if(listin(i).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(i) -+ safe = .false. -+ endif -+ -+ if(listin(j).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(j) -+ safe = .false. -+ endif -+ -+ enddo -+ -+c lcnb flags bodies connected by constraints -+ -+ if(mxnode.gt.1) call gstate(safe) -+ lcnb = (.not.safe) -+ -+ return -+ end -+ -+ -+ -diff -urN dl_class_1.9.orig/srcmod/pmf_module.f dl_class_1.9/srcmod/pmf_module.f ---- dl_class_1.9.orig/srcmod/pmf_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/pmf_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1911 @@ -+ module pmf_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining potential of mean force arrays -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use ensemble_tools_module -+ use lf_motion_module -+ use lf_rotation1_module -+ use parse_module -+ use property_module -+ use setup_module -+ use shake_module -+ use vv_motion_module -+ use utility_module -+ -+ implicit none -+ -+ integer npmf -+ real(8) prmpmf,pmfnrm -+ real(8), allocatable :: pmfwght(:) -+ integer, allocatable :: numpmf(:) -+ integer, allocatable :: indpmf(:) -+ integer, allocatable :: listpm(:) -+ integer, allocatable :: lstpmt(:) -+ integer, allocatable :: lstpmf(:,:) -+ -+ dimension npmf(2),pmfnrm(2) -+ -+ save npmf,prmpmf,pmfnrm,pmfwght,numpmf,indpmf,listpm -+ save lstpmt,lstpmf -+ -+ contains -+ -+ subroutine alloc_pmf_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for allocating pmf arrays -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=6 -+ -+ integer i,idnode,fail -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (pmfwght(mxspmf),stat=fail(1)) -+ allocate (indpmf(mxspmf),stat=fail(2)) -+ allocate (numpmf(mxtmls),stat=fail(3)) -+ allocate (listpm(mxpmf),stat=fail(4)) -+ allocate (lstpmt(mxpmf),stat=fail(5)) -+ allocate (lstpmf(mxspmf,mspmf),stat=fail(6)) -+ -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1210) -+ enddo -+ -+ do i=1,mxtmls -+ numpmf(i)=0 -+ enddo -+ -+ end subroutine alloc_pmf_arrays -+ -+ subroutine define_pmf(safe,idnode,itmols,nspmf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining pmf units -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer idnode,itmols,nspmf,ipmf,jpmf,iatm1,idum -+ real(8) wght -+ -+ numpmf(itmols)=1 -+ prmpmf=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) then -+ write(nrite,"(/,1x,' PMF bondlength :', -+ x 5x,f20.10)") prmpmf -+ write(nrite, -+ x "(/,/,12x,'unit, site and weight details:' -+ x ,/,/,16x,'unit',6x,'index',5x,'weight')") -+ endif -+ -+ do ipmf=1,2 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ call strip(record,lenrec) -+ call lowcase(record,lenrec) -+ if(.not.findstring('pmf unit',record,idum)) -+ x call error(idnode,462) -+ npmf(ipmf)=intstr(record,lenrec,idum) -+ -+ do jpmf=1,npmf(ipmf) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ iatm1=intstr(record,lenrec,idum) -+ wght=dblstr(record,lenrec,idum) -+ if(wght.le.1.d-10) wght=1.d0 -+ -+ nspmf=nspmf+1 -+ -+ if(nspmf.gt.mxspmf) call error(idnode,460) -+ -+ indpmf(nspmf)=iatm1 -+ pmfwght(nspmf)=wght -+ -+ if(idnode.eq.0) then -+ -+ if(jpmf.eq.1) then -+ write(nrite,"(16x,i5,i10,f12.6)") -+ x ipmf,indpmf(nspmf),pmfwght(nspmf) -+ else -+ write(nrite,"(21x,i10,f12.6)") -+ x indpmf(nspmf),pmfwght(nspmf) -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine define_pmf -+ -+ subroutine pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, -+ x dxp,dyp,dzp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing vectors for PMF calculations -+c -+c copyright - daresbury laboratory -+c adapted by w.smith october 2005 -+c original by t.forester aug 1995 -+c -+c set variable img true for PBC shifted vectors -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical img -+ integer nspmf,imcon,k,jj,kk,ipmf,i,i1,i2 -+ -+ real(8) xxx(mxatms),yyy(mxatms),zzz(mxatms) -+ real(8) xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ real(8) xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) -+ real(8) dxp(mspmf),dyp(mspmf),dzp(mspmf),cell(9) -+ -+ do k=1,nspmf -+ -+ jj=0 -+ kk=0 -+ -+c calculate difference vectors -+ -+ do ipmf=1,2 -+ -+ i1=lstpmf(jj+1,k) -+ -+c position difference vectors -+ -+ do i=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i2=lstpmf(jj,k) -+ xxt(i)=xxx(i2)-xxx(i1) -+ yyt(i)=yyy(i2)-yyy(i1) -+ zzt(i)=zzz(i2)-zzz(i1) -+ -+ enddo -+ -+c correct for periodic images - assume less than half box length -+ -+ if(img)call images(imcon,0,1,npmf(ipmf),cell,xxt,yyt,zzt) -+ -+c create weighted coordinate -+ -+ xxa(ipmf,k)=0.d0 -+ yya(ipmf,k)=0.d0 -+ zza(ipmf,k)=0.d0 -+ -+ do i=1,npmf(ipmf) -+ -+ kk=kk+1 -+ xxa(ipmf,k)=xxa(ipmf,k)+pmfwght(kk)*xxt(i) -+ yya(ipmf,k)=yya(ipmf,k)+pmfwght(kk)*yyt(i) -+ zza(ipmf,k)=zza(ipmf,k)+pmfwght(kk)*zzt(i) -+ -+ enddo -+ -+ xxa(ipmf,k)=xxa(ipmf,k)/pmfnrm(ipmf)+xxx(i1) -+ yya(ipmf,k)=yya(ipmf,k)/pmfnrm(ipmf)+yyy(i1) -+ zza(ipmf,k)=zza(ipmf,k)/pmfnrm(ipmf)+zzz(i1) -+ -+ enddo -+ -+ dxp(k)=xxa(2,k)-xxa(1,k) -+ dyp(k)=yya(2,k)-yya(1,k) -+ dzp(k)=zza(2,k)-zza(1,k) -+ -+ enddo -+ -+c periodic boundary condition for pmf vectors -+ -+ if(img)call images(imcon,0,1,nspmf,cell,dxp,dyp,dzp) -+ -+ return -+ end subroutine pmf_vectors -+ -+ subroutine pmflf -+ x (safe,safep,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics. Verlet leapfrog With RD-SHAKE -+c and PMF_SHAKE - for potential of mean force calculations. -+c -+c parallel replicated data version : block data -+c adapted from dl_poly routine nve_1.f -+c -+c copyright - daresbury laboratory 1995 -+c author - t.forester aug 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ -+ logical safe,lshmov,safep,unsafe,img -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,nspmf,ntpmf -+ integer fail,iatm0,iatm1,i,j,k,jj,ii,ipmf,icyc -+ real(8) engke,tolnce,tstep,vircon,virpmf,strpmf,summas -+ real(8) rstep,viracc,strkin,strcon -+ -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) -+ real(8), allocatable :: dxp(:),dyp(:),dzp(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ dimension strpmf(9),strcon(9),strkin(9),summas(2),fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(1)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(2)) -+ allocate(xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(3)) -+ allocate(uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(4)) -+ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(5)) -+ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(8)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1220) -+ enddo -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c constraint virials -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ -+c temporary stress tensor accumulators -+ -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ strpmf(i)=0.d0 -+ -+ enddo -+ -+c store initial values of position -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c calculate mass terms for PMF units -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ summas(ipmf)=0.d0 -+ pmfnrm(ipmf)=0.d0 -+ -+ do i=1,npmf(ipmf) -+ -+ jj=jj+1 -+ ii=lstpmf(jj,1) -+ summas(ipmf)=summas(ipmf)+weight(ii) -+ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) -+ -+ enddo -+ -+ enddo -+ -+c calculate PMF bond constraints and store initial positions -+ -+ img=.true. -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, -+ x xxa,yya,zza,dxp,dyp,dzp) -+ -+c move atoms by leapfrog algorithm -+ -+ safe=(ntcons.eq.0) -+ safep=(ntpmf.eq.0) -+ -+ j=0 -+ do i=iatm0,iatm1 -+ -+ j=j+1 -+ -+c update velocities -+ -+ uxx(i)=vxx(i)+tstep*rmass(i)*fxx(i) -+ uyy(i)=vyy(i)+tstep*rmass(i)*fyy(i) -+ uzz(i)=vzz(i)+tstep*rmass(i)*fzz(i) -+ -+c update positions -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+c RDSHAKE procedure -+ -+ if(ntcons.gt.0.or.ntpmf.gt.0) then -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply constraint corrections - iteratively -+ -+ icyc=0 -+ unsafe=.true. -+ -+ do while(unsafe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c apply bond constraints -+ -+ viracc=0.d0 -+ if(ntcons.gt.0)call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c apply pmf constraints -+ -+ viracc=0.d0 -+ if(ntpmf.gt.0)call pmf_shake -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x viracc,xxt,yyt,zzt,strcon,summas,dxp,dyp,dzp, -+ x xxa,yya,zza) -+ -+ virpmf=virpmf+viracc -+ do i=1,9 -+ strpmf(i)=strpmf(i)+strcon(i) -+ enddo -+ -+ unsafe=(.not.(safe.and.safep.and.abs(viracc).lt.1.d-10)) -+ -+ enddo -+ -+ safep=.not.unsafe -+ -+c calculate velocity correction -+ -+ j=0 -+ rstep=1.d0/tstep -+ do i=iatm0,iatm1 -+ -+c update corrected velocity -+ -+ j=j+1 -+ uxx(i)=(xxx(i)-xxo(j))*rstep -+ uyy(i)=(yyy(i)-yyo(j))*rstep -+ uzz(i)=(zzz(i)-zzo(j))*rstep -+ -+c calculate the corrected forces -+ -+ fxx(i)=(uxx(i)-vxx(i))*weight(i)*rstep -+ fyy(i)=(uyy(i)-vyy(i))*weight(i)*rstep -+ fzz(i)=(uzz(i)-vzz(i))*weight(i)*rstep -+ -+ enddo -+ -+ endif -+ -+c calculate velocity at full time step -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=0.5d0*(vxx(i)+uxx(i)) -+ vyy(i)=0.5d0*(vyy(i)+uyy(i)) -+ vzz(i)=0.5d0*(vzz(i)+uzz(i)) -+ -+ enddo -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c total contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strpmf(i)+strcns(i)+strkin(i) -+ enddo -+ -+c add pmf and constraint virials -+ -+ vircon=vircon+virpmf -+ -+c restore half step velocity -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(1)) -+ deallocate(uxx,uyy,uzz,dxp,dyp,dzp,stat=fail(2)) -+ deallocate(txx,tyy,tzz,xxo,yyo,zzo,stat=fail(3)) -+ deallocate(dxt,dyt,dzt,xxa,yya,zza,stat=fail(4)) -+ -+ return -+ end subroutine pmflf -+ -+ subroutine pmflfq_1 -+ x (safe,safeq,lshmov,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,quattol,tolnce,tstep,vircom, -+ x vircon,safep,nspmf,ntpmf,virpmf) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using implicit leapfrog quaternion algorithm -+c plus bond constraints - PROVIDED rigid body sites -+c and constraint sites do not coincide. -+c -+c parallel replicated data version : block data -+c -+c tqx,tqy,tqz = torque in lab fixed frame -+c omx,omy,omz = angular velocity in body fixed frame (principal axis) -+c rotinx,y,z = rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory 1993 -+c author t.forester october 1993 -+c amended t.forester dec 1994 : block data -+c amended w.smith sep 1999 : euler equation -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=14 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,safeq,lshmov,newjob,safep,unsafe,img -+ integer imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer fail,i,igrp,igrp1,igrp2,idum,ifre1,ifre2,j,ifre -+ integer jg,ig,k,id,jr,nspmf,ntpmf,jj,ii,ipmf,icyc -+ real(8) engke,engrot,quattol,tolnce,tstep,vircom,vircon -+ real(8) strkin,rot,rstep,rtsq,engtrn,vaa,vbb,vcc,virpmf -+ real(8) trx,try,trz,delx,dely,delz,engfke,viracc -+ real(8) strgrp,tqx,tqy,tqz,fmx,fmy,fmz -+ real(8) strpmf,strcon,summas -+ -+ real(8), allocatable :: opx(:),opy(:),opz(:) -+ real(8), allocatable :: oqx(:),oqy(:),oqz(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xx1(:),yy1(:),zz1(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gcxo(:),gcyo(:),gczo(:) -+ -+ -+ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) -+ real(8), allocatable :: dxp(:),dyp(:),dzp(:) -+ -+ dimension strkin(9),strgrp(9),rot(9),fail(nnn) -+ -+ dimension strpmf(9),strcon(9),summas(2) -+ -+ save igrp1,igrp2,ifre1,ifre2 -+ -+ data newjob/.true./ -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (opx(msgrp),opy(msgrp),opz(msgrp),stat=fail(1)) -+ allocate (oqx(msgrp),oqy(msgrp),oqz(msgrp),stat=fail(2)) -+ allocate (dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(3)) -+ allocate (dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(5)) -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(8)) -+ allocate (xxo(msatms),yyo(msatms),zzo(msatms),stat=fail(9)) -+ allocate (xx1(msatms),yy1(msatms),zz1(msatms),stat=fail(10)) -+ allocate (vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(11)) -+ allocate (gcxo(msgrp),gcyo(msgrp),gczo(msgrp),stat=fail(12)) -+ -+ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(13)) -+ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(14)) -+ -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1500) -+ enddo -+ -+ if(newjob)then -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ newjob=.false. -+ -+ endif -+ -+ safe=.false. -+ -+c constraint virials -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ -+c temporary stress tensor accumulators -+ -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ strpmf(i)=0.d0 -+ -+ enddo -+ -+c store initial values of position and velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ xxo(j)=xxx(i) -+ yyo(j)=yyy(i) -+ zzo(j)=zzz(i) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ gcxo(jg)=gcmx(ig) -+ gcyo(jg)=gcmy(ig) -+ gczo(jg)=gcmz(ig) -+ -+ enddo -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c calculate mass terms for PMF units -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ summas(ipmf)=0.d0 -+ pmfnrm(ipmf)=0.d0 -+ -+ do i=1,npmf(ipmf) -+ -+ jj=jj+1 -+ ii=lstpmf(jj,1) -+ summas(ipmf)=summas(ipmf)+weight(ii) -+ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) -+ -+ enddo -+ -+ enddo -+ -+c calculate PMF bond constraints and store initial positions -+ -+ img=.true. -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, -+ x xxa,yya,zza,dxp,dyp,dzp) -+ -+c move atoms by leapfrog algorithm -+ -+ safe=(ntcons.eq.0) -+ safep=(ntpmf.eq.0) -+ -+c calculate atom displacements from rigid body com -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcxo(jg) -+ dty(jr)=yyy(i)-gcyo(jg) -+ dtz(jr)=zzz(i)-gczo(jg) -+ -+ enddo -+ -+ enddo -+ -+c minimum images -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c integrate 'free' particles -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c advance velocity by leapfrog -+ -+ uxx(i)=vxo(j)+tstep*rmass(i)*fxx(i) -+ uyy(i)=vyo(j)+tstep*rmass(i)*fyy(i) -+ uzz(i)=vzo(j)+tstep*rmass(i)*fzz(i) -+ -+c advance position by leapfrog -+ -+ xxx(i)=xxo(j)+tstep*uxx(i) -+ yyy(i)=yyo(j)+tstep*uyy(i) -+ zzz(i)=zzo(j)+tstep*uzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0.or.ntpmf.gt.0) then -+ -+c store integrated positions -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ j=j+1 -+ xx1(j)=xxx(i) -+ yy1(j)=yyy(i) -+ zz1(j)=zzz(i) -+ -+ enddo -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply constraint corrections - iteratively -+ -+ icyc=0 -+ unsafe=.true. -+ -+ do while(unsafe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c apply bond constraints -+ -+ viracc=0.d0 -+ if(ntcons.gt.0)call rdshake_1 -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+c apply pmf constraints -+ -+ viracc=0.d0 -+ if(ntpmf.gt.0)call pmf_shake -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x viracc,xxt,yyt,zzt,strcon,summas,dxp,dyp,dzp, -+ x xxa,yya,zza) -+ -+ virpmf=virpmf+viracc -+ do i=1,9 -+ strpmf(i)=strpmf(i)+strcon(i) -+ enddo -+ -+ unsafe=(.not.(safe.and.safep.and.abs(viracc).lt.1.d-10)) -+ -+ enddo -+ -+ safep=.not.unsafe -+ -+c calculate force and velocity corrections -+ -+ j=0 -+ rstep=1.d0/tstep -+ rtsq=1.d0/tstep**2 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+c calculate force correction -+ -+ fxx(i)=fxx(i)+(xxx(i)-xx1(j))*weight(i)*rtsq -+ fyy(i)=fyy(i)+(yyy(i)-yy1(j))*weight(i)*rtsq -+ fzz(i)=fzz(i)+(zzz(i)-zz1(j))*weight(i)*rtsq -+ -+c calculate velocity correction -+ -+ uxx(i)=uxx(i)+(xxx(i)-xx1(j))*rstep -+ uyy(i)=uyy(i)+(yyy(i)-yy1(j))*rstep -+ uzz(i)=uzz(i)+(zzz(i)-zz1(j))*rstep -+ -+ enddo -+ -+c end of shake corrections -+ -+ endif -+ -+c estimate full step velocity -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ -+ vxx(i)=0.5d0*(uxx(i)+vxo(j)) -+ vyy(i)=0.5d0*(uyy(i)+vyo(j)) -+ vzz(i)=0.5d0*(uzz(i)+vzo(j)) -+ -+ enddo -+ -+c calculate new kinetic energy at current timestep -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ -+c restore free atom half step velocity -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=uxx(i) -+ vyy(i)=uyy(i) -+ vzz(i)=uzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+c translational rigid body motion -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+c calculate net force on rigid body -+ -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c advance velocity by leapfrog -+ -+ uxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) -+ uyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) -+ uzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) -+ -+c advance position by leapfrog -+ -+ gcmx(ig)=gcmx(ig)+tstep*uxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*uyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*uzz(ig) -+ -+c estimate velocity at full time step -+ -+ gvxx(ig)=0.5d0*(gvxx(ig)+uxx(ig)) -+ gvyy(ig)=0.5d0*(gvyy(ig)+uyy(ig)) -+ gvzz(ig)=0.5d0*(gvzz(ig)+uzz(ig)) -+ -+ enddo -+ -+c calculate rigid body translational kinetic energy -+ -+ engtrn=getkint(ngrp,idnode,mxnode) -+ -+c total translational kinetic energy -+ -+ engke=engtrn+engfke -+ -+c calculate ridid body kinetic stress tensor -+ -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c restore rigid body half timestep velocity -+ -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=uxx(ig) -+ gvyy(ig)=uyy(ig) -+ gvzz(ig)=uzz(ig) -+ -+ enddo -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate torques in lab frame -+ -+ jr=0 -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ id=lstgtp(ig) -+ -+ tqx=0.d0 -+ tqy=0.d0 -+ tqz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ tqx=tqx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ tqy=tqy+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ tqz=tqz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c store current angular velocity -+ -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ -+c iterate angular velocity for time step n (e. yezdimer) -+ -+ do i=1,5 -+ -+ trx=(tqx*rot(1)+tqy*rot(4)+tqz*rot(7))*rotinx(id,2) -+ x +(rotiny(id,1)-rotinz(id,1))*opy(jg)*opz(jg)*rotinx(id,2) -+ try=(tqx*rot(2)+tqy*rot(5)+tqz*rot(8))*rotiny(id,2) -+ x +(rotinz(id,1)-rotinx(id,1))*opz(jg)*opx(jg)*rotiny(id,2) -+ trz=(tqx*rot(3)+tqy*rot(6)+tqz*rot(9))*rotinz(id,2) -+ x +(rotinx(id,1)-rotiny(id,1))*opx(jg)*opy(jg)*rotinz(id,2) -+ -+ delx=tstep*trx -+ dely=tstep*try -+ delz=tstep*trz -+ -+c improved angular velocity at time step n -+ -+ opx(jg)=omx(ig)+delx*pt5 -+ opy(jg)=omy(ig)+dely*pt5 -+ opz(jg)=omz(ig)+delz*pt5 -+ -+ enddo -+ -+c angular velocity at time step n+1/2 -+ -+ uxx(ig)=omx(ig)+delx -+ uyy(ig)=omy(ig)+dely -+ uzz(ig)=omz(ig)+delz -+ -+c angular velocity at time step n+1 (needed for quat algorithm) -+ -+ oqx(jg)=omx(ig)+delx*1.5d0 -+ oqy(jg)=omy(ig)+dely*1.5d0 -+ oqz(jg)=omz(ig)+delz*1.5d0 -+ -+c angular velocity at timestep n -+ -+ omx(ig)=omx(ig)+pt5*delx -+ omy(ig)=omy(ig)+pt5*dely -+ omz(ig)=omz(ig)+pt5*delz -+ -+ enddo -+ -+c rotational kinetic energy -+ -+ engrot=getkinr(ngrp,idnode,mxnode) -+ -+c restore half step angular velocity -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ opx(jg)=omx(ig) -+ opy(jg)=omy(ig) -+ opz(jg)=omz(ig) -+ omx(ig)=uxx(ig) -+ omy(ig)=uyy(ig) -+ omz(ig)=uzz(ig) -+ -+ enddo -+ -+c assign new quaternions -+ -+ call update_quaternions -+ x (safeq,igrp1,igrp2,tstep,quattol,opx,opy,opz,oqx,oqy,oqz) -+ -+c complete stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strcns(i)+strbod(i)+ -+ x strpmf(i) -+ enddo -+ -+c add pmf and constraint virials -+ -+ vircon=vircon+virpmf -+ -+c minimum images of group positions and particle positions -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c new atomic positions for atoms in rigid bodies - relative to c.o.m -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1) then -+ -+c merge new group coordinates and velocities -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c ensure all atoms are within cell boundaries -+ -+ call images(imcon,0,1,natms,cell,xxx,yyy,zzz) -+ -+c deallocate work arrays -+ -+ deallocate(opx,opy,opz,xxt,yyt,zzt,stat=fail(1)) -+ deallocate(oqx,oqy,oqz,dtx,dty,dtz,stat=fail(2)) -+ deallocate(dxx,dyy,dzz,uxx,uyy,uzz,stat=fail(3)) -+ deallocate(txx,tyy,tzz,dxt,dyt,dzt,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,xx1,yy1,zz1,stat=fail(5)) -+ deallocate(vxo,vyo,vzo,gcxo,gcyo,gczo,stat=fail(6)) -+ deallocate(dxp,dyp,dzp,xxa,yya,zza,stat=fail(7)) -+ -+ return -+ end subroutine pmflfq_1 -+ -+ subroutine pmf_shake -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x virpmf,xxt,yyt,zzt,strpmf,summas,dxp,dyp,dzp, -+ x xxa,yya,zza) -+ -+c*********************************************************************** -+c -+c dlpoly constraint subroutine for potential of mean force calc. -+c accummulates constraint force to maintain reaction coordinate -+c -+c assume bond vectors dxp,dyp,dzp are input -+c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc -+c -+c copyright daresbury laboratory 1995 -+c author t.forester august 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safep,img -+ integer idnode,mxnode,imcon,natms,nspmf,fail,icyc,k,jj -+ integer ii,i,ipmf -+ real(8) tstep,tolnce,virpmf,xxt,yyt,zzt,strpmf,summas -+ real(8) dxp,dyp,dzp,xxa,yya,zza,amt,strs1,strs2,strs3,strs5 -+ real(8) strs6,strs9,tstep2,dis,omega2,eps,gamma,gammi -+ -+ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) -+ dimension amt(2),strpmf(9),summas(2) -+ -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:),dsq(:) -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),dsq(mspmf), -+ x stat=fail) -+ if(fail.ne.0)call error(idnode,1230) -+ -+ if(mxcons.lt.nspmf) call error(idnode,492) -+ if(mspmf .lt.nspmf) call error(idnode,458) -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c accumulators for strpmf tensor -+ -+ virpmf=0.d0 -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ safep=.false. -+ -+ do while(.not.safep.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c calculate bond constraint length -+ -+ img=.true. -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt, -+ x xxa,yya,zza,dxt,dyt,dzt) -+ -+ amt(1)= tstep2/summas(1) -+ amt(2)=-tstep2/summas(2) -+ -+ eps=0.d0 -+ dis=prmpmf -+ omega2=dis*dis -+ -+ do k=1,nspmf -+ -+ dsq(k)=dxt(k)**2+dyt(k)**2+dzt(k)**2 -+ eps=max(eps,abs((omega2-dsq(k))/(2.0d0*dis))) -+ -+ enddo -+ -+c check convergence condition -+ -+ safep=(eps.le.tolnce) -+ -+c bypass calculations if converged -+ -+ if(.not.safep)then -+ -+ do k=1,nspmf -+ -+ gamma=(omega2-dsq(k))/(-2.d0*(amt(2)-amt(1))* -+ x (dxp(k)*dxt(k)+dyp(k)*dyt(k)+dzp(k)*dzt(k))) -+ -+c accumulate pmf virial -+ -+ virpmf=virpmf+gamma*(dxp(k)**2+dyp(k)**2+dzp(k)**2) -+ -+ strs1=strs1-gamma*dxp(k)*dxp(k) -+ strs2=strs2-gamma*dxp(k)*dyp(k) -+ strs3=strs3-gamma*dxp(k)*dzp(k) -+ strs5=strs5-gamma*dyp(k)*dyp(k) -+ strs6=strs6-gamma*dyp(k)*dzp(k) -+ strs9=strs9-gamma*dzp(k)*dzp(k) -+ -+c improve approximate atomic positions -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ gammi=-gamma*amt(ipmf) -+ -+ do ii=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i=lstpmf(jj,k) -+ -+ xxx(i)=xxx(i)+dxp(k)*gammi -+ yyy(i)=yyy(i)+dyp(k)*gammi -+ zzz(i)=zzz(i)+dzp(k)*gammi -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c complete strpmf tensor -+ -+ strpmf(1)=strs1 -+ strpmf(2)=strs2 -+ strpmf(3)=strs3 -+ strpmf(4)=strs2 -+ strpmf(5)=strs5 -+ strpmf(6)=strs6 -+ strpmf(7)=strs3 -+ strpmf(8)=strs6 -+ strpmf(9)=strs9 -+ -+c splice coordinate arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=virpmf -+ call gdsum(buffer(1),1,buffer(2)) -+ virpmf=buffer(1) -+ call gdsum(strpmf,9,buffer) -+ call splice -+ x (idnode,natms,listpm,lstpmt,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(dxt,dyt,dzt,dsq,stat=fail) -+ -+ return -+ end subroutine pmf_shake -+ -+ subroutine pmfvv -+ x (safe,safep,lshmov,isw,idnode,mxnode,imcon,natms,nscons, -+ x ntcons,nspmf,ntpmf,engke,tolnce,tstep,vircon,virpmf) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics. Velocity Verlet With PMF_RATTLE -+c for potential of mean force calculations. -+c -+c copyright - daresbury laboratory -+c adapted by w.smith october 2005 -+c original by t.forester aug 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical safe,lshmov,safep,unsafe,newjob,img -+ integer idnode,imcon,mxnode,natms,nscons,ntcons,nspmf,ntpmf -+ integer isw,mxtop -+ integer fail,iatm0,iatm1,i,j,k,jj,i1,ipmf,icyc -+ real(8) engke,tolnce,tstep,vircon,virpmf,strcon,summas -+ real(8) viracc,strpmf,strkin -+ -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxp(:),dyp(:),dzp(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxa(:,:),yya(:,:),zza(:,:) -+ -+ dimension strcon(9),strpmf(9),strkin(9),summas(2),fail(nnn) -+ save summas,newjob,strpmf -+ data newjob/.true./ -+ -+c set default safety flags -+ -+ safe=(ntcons.eq.0) -+ safep=(ntpmf.eq.0) -+ if(safe.and.safep)return -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ mxtop=max(mxcons,mspmf) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(1)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(2)) -+ allocate(dxp(mspmf),dyp(mspmf),dzp(mspmf),stat=fail(3)) -+ allocate(dxt(mxtop),dyt(mxtop),dzt(mxtop),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf),stat=fail(6)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1220) -+ enddo -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate mass terms for PMF units -+ -+ if(newjob)then -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ summas(ipmf)=0.d0 -+ pmfnrm(ipmf)=0.d0 -+ -+ do i=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i1=lstpmf(jj,1) -+ summas(ipmf)=summas(ipmf)+weight(i1) -+ pmfnrm(ipmf)=pmfnrm(ipmf)+pmfwght(jj) -+ -+ enddo -+ -+ enddo -+ -+ newjob=.false. -+ -+ endif -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c calculate PMF bond constraints and store initial positions -+ -+ img=.true. -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, -+ x dxp,dyp,dzp) -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ if(isw.eq.1)then -+ -+c constraint virials -+ -+ vircon=0.d0 -+ virpmf=0.d0 -+ -+c temporary stress tensor accumulators -+ -+ do i=1,9 -+ -+ strcns(i)=0.d0 -+ strpmf(i)=0.d0 -+ -+ enddo -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c apply constraint corrections - iteratively -+ -+ icyc=0 -+ unsafe=.true. -+ -+ do while(unsafe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ if(isw.eq.1)then -+ -+c apply bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,viracc,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcon) -+ -+ vircon=vircon+viracc -+ do i=1,9 -+ strcns(i)=strcns(i)+strcon(i) -+ enddo -+ -+ endif -+ -+c apply pmf constraints -+ -+ if(ntpmf.gt.0)then -+ -+ safep=.false. -+ call pmf_rattle_r -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x viracc,summas,xxt,yyt,zzt,xxa,yya,zza,dxp,dyp,dzp, -+ x dxt,dyt,dzt,strcon) -+ -+ virpmf=virpmf+viracc -+ do i=1,9 -+ strpmf(i)=strpmf(i)+strcon(i) -+ enddo -+ -+ endif -+ -+ unsafe=(.not.(safe.and.safep.and.abs(viracc).le.1.d-10)) -+ -+ endif -+ -+ if(isw.eq.2)then -+ -+c apply rattle velocity constraints -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ -+ endif -+ -+c apply pmf velocity constraints -+ -+ if(ntpmf.gt.0)then -+ -+ safep=.false. -+ call pmf_rattle_v -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x summas,dxp,dyp,dzp,xxt,yyt,zzt,xxa,yya,zza,dxt,dyt,dzt) -+ -+ endif -+ -+ unsafe=(.not.(safe.and.safep)) -+ -+ endif -+ -+ enddo -+ -+ safep=(.not.unsafe) -+ -+c periodic boundary condition -+ -+ if(isw.eq.1)call images -+ x (imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+ if(isw.eq.2)then -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c total contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strpmf(i)+strcns(i)+strkin(i) -+ enddo -+ -+c add pmf and constraint virials -+ -+ vircon=vircon+virpmf -+ -+ endif -+ -+c global exchange of configuration data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ if(isw.eq.1)call merge -+ x (idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ if(ntcons.gt.0)call merge -+ x (idnode,mxnode,natms,mxbuff,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate(dxx,dyy,dzz,xxt,yyt,zzt,stat=fail(1)) -+ deallocate(dxp,dyp,dzp,dxt,dyt,dzt,stat=fail(2)) -+ deallocate(txx,tyy,tzz,xxa,yya,zza,stat=fail(3)) -+ -+ return -+ end subroutine pmfvv -+ -+ subroutine pmf_rattle_r -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce, -+ x virpmf,summas,xxt,yyt,zzt,xxa,yya,zza,dxp,dyp,dzp, -+ x dxt,dyt,dzt,strpmf) -+ -+c*********************************************************************** -+c -+c dlpoly constraint subroutine for potential of mean force calc. -+c accumulates constraint force to maintain reaction coordinate. -+c velocity verlet adaptation -+c -+c assume bond vectors dxp,dyp,dzp are input -+c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc -+c -+c copyright daresbury laboratory -+c adapted by w.smith october 2005 -+c original t.forester august 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safep,img -+ integer idnode,mxnode,imcon,natms,nspmf,icyc,k,jj -+ integer i1,i,ipmf -+ real(8) tstep,tolnce,virpmf,xxt,yyt,zzt,strpmf,summas,gamma -+ real(8) dxp,dyp,dzp,xxa,yya,zza,amt,tstep2,dis,omega2,eps,gammi -+ real(8) strs1,strs2,strs3,strs5,strs6,strs9,dxt,dyt,dzt,dsq -+ -+ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension xxa(2,mspmf),yya(2,mspmf),zza(2,mspmf) -+ dimension amt(2),strpmf(9),summas(2) -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c pmf virial -+ -+ virpmf=0.d0 -+ -+c accumulators for stress tensor -+ -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c array bound check -+ -+ if(mxcons.lt.nspmf) call error(idnode,492) -+ if(mspmf .lt.nspmf) call error(idnode,458) -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ img=.true. -+ safep=.false. -+ dis=prmpmf -+ omega2=dis*dis -+ amt(1)= tstep2/summas(1) -+ amt(2)=-tstep2/summas(2) -+ -+ do while(.not.safep.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,xxx,yyy,zzz,xxt,yyt,zzt,xxa,yya,zza, -+ x dxt,dyt,dzt) -+ -+c check convergence -+ -+ eps=0.d0 -+ -+ do k=1,nspmf -+ -+ dsq=dxt(k)**2+dyt(k)**2+dzt(k)**2 -+ eps=max(eps,abs((omega2-dsq)/dis)) -+ -+ enddo -+ -+ eps=eps*0.5d0 -+ -+c verification of convergence -+ -+ safep=(eps.lt.tolnce) -+ -+c bypass calculations if converged -+ -+ if(.not.safep)then -+ -+ do k=1,nspmf -+ -+ dsq=dxt(k)**2+dyt(k)**2+dzt(k)**2 -+ gamma=(omega2-dsq)/(-(amt(2)-amt(1))* -+ x (dxp(k)*dxt(k)+dyp(k)*dyt(k)+dzp(k)*dzt(k))) -+ -+c accumulate pmf virial -+ -+ virpmf=virpmf+gamma*(dxp(k)**2+dyp(k)**2+dzp(k)**2) -+ -+ strs1=strs1-gamma*dxp(k)*dxp(k) -+ strs2=strs2-gamma*dxp(k)*dyp(k) -+ strs3=strs3-gamma*dxp(k)*dzp(k) -+ strs5=strs5-gamma*dyp(k)*dyp(k) -+ strs6=strs6-gamma*dyp(k)*dzp(k) -+ strs9=strs9-gamma*dzp(k)*dzp(k) -+ -+c improve approximate atomic positions and velocities -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ gammi=-0.5d0*gamma*amt(ipmf) -+ -+ do i1=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i=lstpmf(jj,k) -+ -+ xxx(i)=xxx(i)+dxp(k)*gammi -+ yyy(i)=yyy(i)+dyp(k)*gammi -+ zzz(i)=zzz(i)+dzp(k)*gammi -+ vxx(i)=vxx(i)+dxp(k)*gammi/tstep -+ vyy(i)=vyy(i)+dyp(k)*gammi/tstep -+ vzz(i)=vzz(i)+dzp(k)*gammi/tstep -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ strpmf(1)=strs1 -+ strpmf(2)=strs2 -+ strpmf(3)=strs3 -+ strpmf(4)=strs2 -+ strpmf(5)=strs5 -+ strpmf(6)=strs6 -+ strpmf(7)=strs3 -+ strpmf(8)=strs6 -+ strpmf(9)=strs9 -+ -+c splice coordinate and velocity arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=virpmf -+ call gdsum(buffer(1),1,buffer(2)) -+ virpmf=buffer(1) -+ call gdsum(strpmf,9,buffer) -+ call splice -+ x (idnode,natms,listpm,lstpmt,xxx,yyy,zzz,buffer) -+ call splice -+ x (idnode,natms,listpm,lstpmt,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+ return -+ end subroutine pmf_rattle_r -+ -+ subroutine pmf_rattle_v -+ x (safep,idnode,mxnode,imcon,natms,nspmf,tstep,tolnce,summas, -+ x dxp,dyp,dzp,vxt,vyt,vzt,vxa,vya,vza,vxp,vyp,vzp) -+ -+c*********************************************************************** -+c -+c dlpoly constraint subroutine for potential of mean force calc. -+c accumulates velocity correction for second constraint condition -+c velocity verlet adaptation -+c -+c assume bond vectors dxp,dyp,dzp are input -+c dxp=(sum) wght*xxx(i,1) - (sum) wght*xxx(j,2) etc -+c -+c copyright daresbury laboratory -+c author w.smith october 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safep,img -+ integer idnode,mxnode,imcon,natms,nspmf,icyc,k,jj -+ integer i1,i,ipmf -+ real(8) tstep,tolnce,summas,gamma,vxt,vyt,vzt,vxa,vya,vza -+ real(8) vxp,vyp,vzp,dxp,dyp,dzp,amt,omega,eps,gammi,tolvel -+ -+ dimension dxp(mspmf),dyp(mspmf),dzp(mspmf) -+ dimension vxp(mspmf),vyp(mspmf),vzp(mspmf) -+ dimension vxt(mxatms),vyt(mxatms),vzt(mxatms) -+ dimension vxa(2,mspmf),vya(2,mspmf),vza(2,mspmf) -+ dimension amt(2),summas(2) -+ -+c constraint convergence tolerance -+ -+ tolvel=tolnce/tstep -+ -+c array bound check -+ -+ if(mxcons.lt.nspmf) call error(idnode,492) -+ if(mspmf .lt.nspmf) call error(idnode,458) -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ img=.false. -+ safep=.false. -+ amt(1)= 0.5d0*tstep/summas(1) -+ amt(2)=-0.5d0*tstep/summas(2) -+ -+ do while(.not.safep.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ call pmf_vectors -+ x (img,nspmf,imcon,cell,vxx,vyy,vzz,vxt,vyt,vzt,vxa,vya,vza, -+ x vxp,vyp,vzp) -+ -+c check convergence -+ -+ eps=0.d0 -+ do k=1,nspmf -+ -+ omega=dxp(k)*vxp(k)+dyp(k)*vyp(k)+dzp(k)*vzp(k) -+ eps=max(eps,abs(omega)/prmpmf) -+ -+ enddo -+ -+c verification of convergence -+ -+ safep=(eps.lt.tolvel) -+ -+c bypass calculations if converged -+ -+ if(.not.safep)then -+ -+ do k=1,nspmf -+ -+ omega=dxp(k)*vxp(k)+dyp(k)*vyp(k)+dzp(k)*vzp(k) -+ gamma=omega/((amt(2)-amt(1))* -+ x (dxp(k)**2+dyp(k)**2+dzp(k)**2)) -+ -+c improve approximate atomic velocities -+ -+ jj=0 -+ do ipmf=1,2 -+ -+ gammi=-gamma*amt(ipmf) -+ -+ do i1=1,npmf(ipmf) -+ -+ jj=jj+1 -+ i=lstpmf(jj,k) -+ -+ vxx(i)=vxx(i)+dxp(k)*gammi -+ vyy(i)=vyy(i)+dyp(k)*gammi -+ vzz(i)=vzz(i)+dzp(k)*gammi -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c splice velocity arrays across nodes -+ -+ if(mxnode.gt.1)call splice -+ x (idnode,natms,listpm,lstpmt,vxx,vyy,vzz,buffer) -+ -+ return -+ end subroutine pmf_rattle_v -+ -+ end module pmf_module -diff -urN dl_class_1.9.orig/srcmod/property_module.f dl_class_1.9/srcmod/property_module.f ---- dl_class_1.9.orig/srcmod/property_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/property_module.f 2014-02-27 13:49:34.000000000 +0100 -@@ -0,0 +1,1318 @@ -+ module property_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining simulation property data -+c copyright - daresbury laboratory -+c author - w. smith nov 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use pair_module -+ use setup_module -+ use site_module -+ use tether_module -+ use utility_module -+ use vdw_module -+ -+ implicit none -+ -+ real(8), allocatable :: rdf(:,:),zdens(:,:) -+ real(8), allocatable :: stpval(:),sumval(:) -+ real(8), allocatable :: ssqval(:),zumval(:) -+ real(8), allocatable :: ravval(:),stkval(:,:) -+ real(8), allocatable :: xx0(:),yy0(:),zz0(:) -+ real(8), allocatable :: amsd(:) -+ -+ save rdf,zdens,stpval,sumval,ssqval,xx0,yy0,zz0 -+ save zumval,ravval,stkval -+ -+ contains -+ -+ subroutine alloc_prp_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=6 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (zdens(mxzdn,mxatyp),stat=fail(1)) -+ allocate (rdf(mxrdf,mxxtyp),amsd(mxatyp),stat=fail(2)) -+ allocate (stpval(mxnstk),sumval(mxnstk),stat=fail(3)) -+ allocate (ssqval(mxnstk),zumval(mxnstk),stat=fail(4)) -+ allocate (ravval(mxnstk),stkval(mxstak,mxnstk),stat=fail(5)) -+ allocate (xx0(mxatms),yy0(mxatms),zz0(mxatms),stat=fail(6)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1740) -+ enddo -+ -+ end subroutine alloc_prp_arrays -+ -+ subroutine result -+ x (ltad,lbpd,lgofr,lpgr,lzden,idnode,imcon,keyens,mxnode,natms, -+ x levcfg,nzden,nstep,ntpatm,numacc,numrdf,keybpd,chip,chit,conint, -+ x rcut,tstep,engcfg,volm,virtot,vircom,zlen,tboost,chit_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing simulation summary and -+c saving the restart data -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith dec 1992. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*1 hms,dec -+ logical lgofr,lpgr,lzden,check,ltad,lbpd,goprint -+ -+ integer idnode,imcon,keyens,mxnode,natms,nzden,nstep,ntpatm -+ integer levcfg,numacc,numrdf,keybpd,i,iadd,io,j -+ real(8) chip,chit,conint,rcut,tstep,volm,timelp,avvol,zlen,dc -+ real(8) engcfg,virtot,vircom,prntim,simtim,tboost,chit_shl -+ -+c save restart data -+ -+ call revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+c for TAD and BPD system averages not generally meaningful -+c useful only for BPD in configurational sampling mode -+ -+ goprint=.not.(ltad.or.(lbpd.and.keybpd.gt.1)) -+ -+ if(goprint)then -+ -+c calculate final fluctuations -+ -+ do i=1,mxnstk -+ ssqval(i)=sqrt(max(0.d0,ssqval(i))) -+ enddo -+ -+c final averages and fluctuations -+ -+ call timchk(0,timelp) -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,1x,'run terminated after',i8,' steps.', -+ x ' final averages calculated over',i8,' steps.',/,/)") -+ x nstep,numacc -+ write(nrite,"(1x,120('-'), -+ x /,/,1x,' step',5x,'eng_tot',4x,'temp_tot',5x,'eng_cfg', -+ x 5x,'eng_vdw',5x,'eng_cou',5x,'eng_bnd',5x,'eng_ang',5x, -+ x 'eng_dih',5x,'eng_tet',/,1x,'time ',5x,' eng_pv',4x, -+ x 'temp_rot',5x,'vir_cfg',5x,'vir_vdw',5x,'vir_cou',5x, -+ x 'vir_bnd',5x,'vir_ang',5x,'vir_con',5x,'vir_tet',/, -+ x 1x,'cpu time',6x,'volume',4x,'temp_shl',5x,'eng_shl', -+ x 5x,'vir_shl',7x,'alpha',8x,'beta',7x,'gamma',5x,'vir_pmf', -+ x 7x,'press',/,/, -+ x 1x,120('-'))") -+ -+ call get_prntime(hms,timelp,prntim) -+ call get_simtime(dec,nstep,tstep,simtim) -+ write(nrite,'(1x,i8,1p,9e12.4,/,1x,0p,f7.3,a1,1p,9e12.4, -+ x /,1x,0p,f7.3,a1,1p,9e12.4)') -+ x nstep,(sumval(i),i=1,9), -+ x simtim,dec,(sumval(i),i=10,18), -+ x prntim,hms,(sumval(i),i=19,27) -+ write(nrite,"(/,1x,' r.m.s. ',1p,9e12.4,/,1x,'fluctn. ', -+ x 1p,9e12.4,/,9x,9e12.4)") (ssqval(i),i=1,27) -+ write(nrite,"(1x,120('-'))") -+ -+c write out bias potential boost factor -+ -+ if(lbpd)write(nrite,"(/,/,1x, -+ x 'calculated bias potential boost factor',1p,e16.8)")tboost -+ -+ if(numacc.gt.0)then -+ iadd=27 -+ -+c write out estimated diffusion coefficients -+ -+ if(numacc.gt.0)then -+ -+ write(nrite,"(/,/,12x,'Approximate 3D Diffusion', -+ x ' coefficients (10^-9 m^2 / s)',/,/,12x,'atom',7x, -+ x ' D ')") -+ -+ do i=1,ntpatm -+ -+ iadd=iadd+1 -+ dc=(ravval(iadd)-sumval(iadd))/ -+ x (3.d0*dble(numacc-min(mxnstk,numacc-1))*tstep)*10.d0 -+ if(dc.lt.1d-10) dc=0.d0 -+ if(lbpd)dc=dc/tboost -+ write(nrite,'(12x,a8,1p,e13.4)') unqatm(i),dc -+ -+ enddo -+ -+ endif -+ -+c print out average pressure tensor -+ -+ write(nrite,"(/,/,16x,'Average pressure tensor', -+ x 39x,'r.m.s. fluctuations ',/)") -+ -+ do i=iadd,iadd+6,3 -+ write(nrite,'(9x,1p,3e12.4,24x,3e12.4)') -+ x (sumval(i+j),j=1,3),(ssqval(i+j),j=1,3) -+ enddo -+ iadd=iadd+9 -+ -+ write(nrite,'(/,12x,a,1p,e12.4)') 'trace/3. ', -+ x (sumval(iadd)+sumval(iadd-4)+sumval(iadd-8))/3.d0 -+ -+c write out mean cell vectors for npt -+ -+ if(keyens.gt.3.and.(keyens.le.7))then -+ -+ write(nrite,"(/,/,17x,'Average cell vectors', -+ x 41x,'r.m.s. fluctuations ',/)") -+ -+ do i=iadd,iadd+6,3 -+ write(nrite,'(3f20.10,9x,1p,3e12.4)') -+ x (sumval(i+j),j=1,3),(ssqval(i+j),j=1,3) -+ enddo -+ iadd=iadd+9 -+ -+ endif -+ -+c write out remaining registers -+ -+ check=.false. -+ do i=iadd+1,mxnstk -+ -+ if((abs(sumval(i)).gt.1.d-10).or. -+ x (abs(ssqval(i)).gt.1.d-10)) check=.true. -+ -+ enddo -+ -+ if(check)then -+ -+ write(nrite,"(/,/,12x, -+ x 'Remaining non-zero statistics registers ',/,/,12x, -+ x 'Register',7x,'Average value',8x,'r.m.s. fluc.')") -+ -+ do i=iadd+1,mxnstk -+ -+ if((abs(sumval(i)).gt.1.d-10).or. -+ x (abs(ssqval(i)).gt.1.d-10)) -+ x write(nrite,'(10x,i10,2f20.10)') i,sumval(i),ssqval(i) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c print out sample of final configuration -+ -+ write(nrite,"(/,/,1x,'sample of final configuration',/)") -+ write(nrite,"(6x,'i',7x,'x(i)',8x,'y(i)',8x,'z(i)', -+ x 7x,'vx(i)',7x,'vy(i)',7x,'vz(i)',7x,'fx(i)',7x, -+ x 'fy(i)',7x,'fz(i)',/,/)") -+ io=(natms+19)/20 -+ -+ do i=1,natms,io -+ -+ write(nrite,"(1x,i6,1p,3e12.4,3e12.4,3e12.4)") -+ x i,xxx(i),yyy(i),zzz(i),vxx(i),vyy(i),vzz(i), -+ x fxx(i),fyy(i),fzz(i) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c bypass printing averages for certain tad and bpd options -+ -+ if(goprint)then -+ -+c average volume -+ -+ avvol=sumval(19) -+ if(imcon.eq.0.or.imcon.eq.6)then -+ avvol=4.d0*pi/3.d0*rcut**3 -+ volm=avvol -+ endif -+ -+c calculate and print radial distribution functions -+ -+ if(lgofr.and.lpgr.and.(numrdf.gt.0))then -+ -+c scale densities for average volume -+ -+ do i=1,ntpatm -+ dens(i)=dens(i)*(volm/avvol) -+ enddo -+ -+ call rdf1 -+ x (lpgr,idnode,mxnode,ntpatm,numrdf,avvol,rcut) -+ -+ endif -+ -+ if(lzden.and.lpgr.and.(nzden.gt.0))then -+ call zden1(lpgr,idnode,mxnode,ntpatm,nzden,avvol,zlen) -+ endif -+ -+ if(imcon.eq.0)volm=0.d0 -+ -+ endif -+ -+c print final time check -+ -+ call timchk(1,timelp) -+ -+ return -+ end subroutine result -+ -+ subroutine diffsn0(idnode,natms,mxnode,tstep) -+ -+c*********************************************************************** -+c -+c DL_POLY routine for calculating displacements of sites from -+c t=0 positions -+c -+c use diffsn1 for mean squared displacements -+c -+c parallel version - replicated data. -+c -+c copyright daresbury laboratory 1993 -+c -+c author - t. forester june 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,natms,mxnode,iatm1,iatm2,i -+ real(8) tstep -+ -+ save newjob,iatm1,iatm2 -+ data newjob/.true./ -+ -+ if(newjob)then -+ -+ newjob=.false. -+ iatm1=(idnode*natms)/mxnode+1 -+ iatm2=((idnode+1)*natms)/mxnode -+ -+ endif -+ -+ do i=iatm1,iatm2 -+ -+ xx0(i)=xx0(i)+vxx(i)*tstep -+ yy0(i)=yy0(i)+vyy(i)*tstep -+ zz0(i)=zz0(i)+vzz(i)*tstep -+ -+ enddo -+ -+ return -+ end subroutine diffsn0 -+ -+ subroutine diffsn1(idnode,natms,ntpatm,mxnode) -+ -+c*********************************************************************** -+c -+c DL_POLY routine for calculating mean squared displacements -+c -+c displacements calculated in diffsn0 -+c -+c parallel version - replicated data. -+c -+c copyright daresbury laboratory 1993 -+c -+c author - t. forester june 1993 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,natms,ntpatm,mxnode,iatm1,iatm2,k,i -+ -+ save newjob,iatm1,iatm2 -+ -+ data newjob/.true./ -+ -+ if(newjob)then -+ -+ newjob=.false. -+ iatm1=(idnode*natms)/mxnode+1 -+ iatm2=((idnode+1)*natms)/mxnode -+ -+ endif -+ -+c running sum of squared displacements -+ -+ do k=1,ntpatm -+ -+ amsd(k)=0.d0 -+ -+ enddo -+ -+c calculate square of displacements for each atom type -+ -+ do i=iatm1,iatm2 -+ -+ k=ltype(i) -+ amsd(k)=amsd(k)+xx0(i)**2+yy0(i)**2+zz0(i)**2 -+ -+ enddo -+ -+c global sum - replicated data strategy -+ -+ if(mxnode.gt.1)then -+ -+ do k=1,ntpatm -+ -+ buffer(k+ntpatm)=amsd(k) -+ -+ enddo -+ -+ call gdsum(buffer(1+ntpatm),ntpatm,buffer(1)) -+ -+ do k=1,ntpatm -+ -+ amsd(k)=buffer(k+ntpatm) -+ -+ enddo -+ -+ endif -+ -+c mean squared displacement -+ -+ do k=1,ntpatm -+ -+ amsd(k)=amsd(k)/dble(max(numtyp(k),1)) -+ -+ enddo -+ -+ return -+ end subroutine diffsn1 -+ -+ subroutine rdf0(iatm,ik,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for accumulating statistic for radial -+c distribution functions. -+c double precision accumulators -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer iatm,ik,m,jatm,ll,k -+ real(8) rcut,rcsq,rdelr,ai,aj,rsq,rrr -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut*rcut -+ -+c grid interval for rdf tables -+ -+ rdelr=dble(mxrdf)/rcut -+ -+c set up atom iatm type -+ -+ ai=ltype(iatm) -+ -+c start of primary loop for rdf accumulation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ jatm=ilist(m) -+ -+ aj=ltype(jatm) -+ if(ai.gt.aj)then -+ k=int(ai*(ai-1.d0)*0.5d0+aj+0.5d0) -+ else -+ k=int(aj*(aj-1.d0)*0.5d0+ai+0.5d0) -+ endif -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ ll=Min(1+Int(rrr*rdelr),mxrdf) -+ -+c accumulate statistics -+ -+ rdf(ll,k)=rdf(ll,k)+1.d0 -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine rdf0 -+ -+ subroutine rdf1 -+ x (lpgr,idnode,mxnode,ntpatm,numrdf,volm,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating radial distribution functions -+c from accumulated data. -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,ntpatm,numrdf,ia,ib,k,j -+ real(8) volm,factor,sum,rrr,dvol,gofr,rcut,delrdf -+ -+ logical lpgr,zero -+ -+ if(idnode.eq.0) write(nrite, -+ x "(/,/,12X,'RADIAL DISTRIBUTION FUNCTIONS',/,/, -+ x 'calculated using ',i10,' configurations')") numrdf -+ -+ if(lpgr)then -+ -+c open RDF file and write headers -+ -+ if(idnode.eq.0)then -+ -+ open(nrdfdt,file='RDFDAT') -+ -+ write(nrdfdt,'(80a1)')cfgname -+ write(nrdfdt,'(2i10)')mxxtyp,mxrdf -+ -+ endif -+ -+c default bin width -+ -+ delrdf=rcut/dble(mxrdf) -+ -+c construct rdf tables -+ -+ do ia=1,ntpatm -+ -+ do ib=ia,ntpatm -+ -+ k=(ib*(ib-1))/2+ia -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,'g(r) :',2a8,/,/,8x,'r',6x,'g(r)',9x,'n(r)',/)") -+ x unqatm(ia),unqatm(ib) -+ write(nrdfdt,'(2a8)')unqatm(ia),unqatm(ib) -+ -+ endif -+ -+c global sum of data on all nodes -+ -+ if(mxnode.gt.1) call gdsum(rdf(1,k),mxrdf,buffer) -+ -+c normalisation factor -+ -+ factor=volm*dens(ia)*dens(ib)*dble(numrdf) -+ if((ia.eq.ib).and.(volm*dens(ia).gt.1.d0)) -+ x factor=factor*0.5d0 -+ -+c running integration of rdf -+ -+ sum=0.d0 -+ -+c loop over distances -+ -+ zero=.true. -+ -+ do j=1,mxrdf -+ -+ if(zero.and.(j.lt.mxrdf-3)) -+ x zero=(rdf(j+2,k).le.0.d0) -+ -+ rrr=(dble(j)-0.5d0)*delrdf -+ dvol=4.d0*pi*(delrdf*rrr*rrr+(delrdf**3)/12.d0) -+ -+ gofr=rdf(j,k)/(factor*dvol) -+ sum=sum+gofr*dvol*dens(ib) -+ -+c print out information -+ -+ if(idnode.eq.0)then -+ -+ write(nrdfdt,"(1p,2e14.6)")rrr,gofr -+ if(.not.zero) -+ x write(nrite,"(f10.4,1p,2e14.6)")rrr,gofr,sum -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ if(idnode.eq.0)close (nrdfdt) -+ -+ endif -+ -+ return -+ end subroutine rdf1 -+ -+ subroutine static -+ x (lbpd,lzeql,idnode,intsta,imcon,keyens,natms,nstack, -+ x nstep,nsteql,ntpatm,numacc,mxnode,nblock,keybpd,numbpd, -+ x consv,degfre,degrot,engang,engbnd,engcpe,engdih,enginv, -+ x engke,engrot,engsrp,engunit,engcfg,stpeng,stpeth,stpprs, -+ x stptmp,stpvir,stpvol,tstep,virbnd,engfbp,vircom,vircon, -+ x vircpe,virsrp,engfld,virfld,engtbp,virtbp,virpmf,virshl, -+ x engshl,engtet,virtet,degshl,shlke,virang,width,engmet, -+ x virmet,engter,virter,boost,tboost) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for accumulating periodic data during the -+c molecular dynamics simulation and computing the rolling averages -+c -+c copyright daresbury laboratory 1992 -+c -+c author - w. smith august 1992 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lbpd,lzeql,newjob -+ integer idnode,intsta,imcon,keyens,natms,nstack,nstep,j -+ integer nsteql,ntpatm,numacc,mxnode,i,iadd,k,kstak -+ integer nblock,keybpd,numbpd -+ real(8) consv,degfre,degrot,engang,engbnd,engcpe,engdih -+ real(8) enginv,engke,engrot,engsrp,engunit,engcfg,stpeng -+ real(8) stpeth,stpprs,stptmp,stpvir,stpvol,tstep,virbnd -+ real(8) engfbp,vircom,vircon,vircpe,virsrp,engfld,virfld -+ real(8) engtbp,virtbp,virpmf,virshl,engshl,engtet,virtet -+ real(8) degshl,shlke,virang,width,sclnv1,sclnv2,stprot -+ real(8) stpcns,stpshl,zistk,engmet,virmet,engter,virter -+ real(8) tbold,aterm,bterm,cterm,boost,tboost -+ -+ save newjob -+ -+ data newjob/.true./ -+ -+c open statistics file for append -+ -+ if(newjob.and.idnode.eq.0.and.intsta.gt.0)then -+ -+ open(nstats,file='STATIS',position='append') -+ newjob=.false. -+ -+ endif -+ -+ if(idnode.eq.0.and.nstep.eq.intsta.and.intsta.gt.0)then -+ -+ write(nstats,'(80a1)') cfgname -+ if(abs(engunit-9648.530821d0).le.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=electron Volts ')") -+ if(abs(engunit-9648530.821d0).le.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=kilo electron Volts ')") -+ if(abs(engunit-418.4d0).le.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=kcal/mol ')") -+ if(abs(engunit-1.d2).le.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=kjoule/mol ')") -+ if(abs(engunit-boltz).lt.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=kelvin ')") -+ if(abs(engunit-1.d0).lt.1.d-10) write(nstats, -+ x "(' ENERGY UNITS=DL_POLY Internal Units ')") -+ -+ endif -+ -+c calculate cell volume and minimum cell half-width -+ -+ if(imcon.eq.0)then -+ -+ width=0.d0 -+ -+ stpvol=0.d0 -+ do i=1,10 -+ celprp(i)=0.d0 -+ enddo -+ -+ else -+ -+ call dcell(cell,celprp) -+ stpvol=celprp(10) -+ width=min(celprp(7),celprp(8),celprp(9))/2.d0 -+ -+ if(imcon.eq.4)then -+ -+ stpvol=0.5d0*celprp(10) -+ width=sqrt(3.d0)*cell(1)/4.d0 -+ -+ elseif(imcon.eq.5)then -+ -+ stpvol=0.5d0*celprp(10) -+ width=cell(1)/2.d0 -+ -+ elseif(imcon.eq.6)then -+ -+ width=min(celprp(7),celprp(8))/2.d0 -+ -+ elseif(imcon.eq.7)then -+ -+ stpvol=0.5d0*celprp(10) -+ -+ endif -+ -+ endif -+ -+c energetic properties of system -+ -+ stpvir=virsrp+vircpe+virbnd+vircon+vircom+virtbp+virang -+ x +virshl+virtet+virter+virmet+virfld -+ stpeng=engcfg+engke+engrot -+ stprot=2.d0*engrot/(boltz*max(1.d0,degrot)) -+ stpshl=2.d0*shlke/(boltz*max(1.d0,degshl)) -+ stptmp=2.d0*(engke+engrot)/(boltz*degfre) -+ stpprs=0.d0 -+ if(imcon.gt.0)stpprs=(2.d0*engke-stpvir)/(3.d0*stpvol) -+ stpeth=stpeng+stpprs*stpvol -+ stpcns=stpeng+consv -+ -+c convert pressure to units of katm -+ -+ stpprs=stpprs*prsunt -+ -+c calculate mean squared displacements -+c atomic displacements from origin of production run -+ -+ if((.not.lzeql).or.(nstep.gt.nsteql))then -+ -+ call diffsn0(idnode,natms,mxnode,tstep) -+ call diffsn1(idnode,natms,ntpatm,mxnode) -+ -+ endif -+ -+c zero statistics arrays -+ -+ if((nstep.le.0).or.(numacc.eq.0))then -+ -+ numacc=0 -+ -+ do i=1,mxnstk -+ -+ stpval(i)=0.d0 -+ sumval(i)=0.d0 -+ ssqval(i)=0.d0 -+ -+ enddo -+ -+ do i=1,mxatms -+ -+ xx0(i)=0.d0 -+ yy0(i)=0.d0 -+ zz0(i)=0.d0 -+ -+ enddo -+ -+ endif -+ -+c store current values in statistics array -+ -+ stpval(1) =stpcns/engunit -+ stpval(2) =stptmp -+ stpval(3) =engcfg/engunit -+ stpval(4) =(engsrp+engmet+engter)/engunit -+ stpval(5) =engcpe/engunit -+ stpval(6) =engbnd/engunit -+ stpval(7) =(engang+engtbp)/engunit -+ stpval(8) =(engdih+enginv+engfbp)/engunit -+ stpval(9) =engtet/engunit -+ stpval(10)=stpeth/engunit -+ stpval(11)=stprot -+ stpval(12)=stpvir/engunit -+ stpval(13)=(virsrp+virmet+virter)/engunit -+ stpval(14)=vircpe/engunit -+ stpval(15)=virbnd/engunit -+ stpval(16)=(virtbp+virang)/engunit -+ stpval(17)=vircon/engunit -+ stpval(18)=virtet/engunit -+ stpval(19)=stpvol -+ stpval(20)=stpshl -+ stpval(21)=engshl/engunit -+ stpval(22)=virshl/engunit -+ stpval(23)=acos(celprp(6))*180.d0/pi -+ stpval(24)=acos(celprp(5))*180.d0/pi -+ stpval(25)=acos(celprp(4))*180.d0/pi -+ stpval(26)=virpmf/engunit -+ stpval(27)=stpprs -+ -+ iadd=27 -+ -+c mean squared displacements -+ -+ if((.not.lzeql).or.(nstep.gt.nsteql))then -+ -+ do k=1,ntpatm -+ -+ stpval(iadd+k)=amsd(k) -+ -+ enddo -+ -+ endif -+ -+ iadd=iadd+ntpatm -+ -+c stress tensor -+ -+ if(abs(stpvol).le.1.d-10) stpvol=1.d0 -+ do i=1,9 -+ stpval(iadd+i)=stress(i)*prsunt/(stpvol) -+ enddo -+ iadd=iadd+9 -+ -+c cell vectors -+ -+ if(keyens.gt.3.and.(keyens.le.7))then -+ do i=1,9 -+ stpval(iadd+i)=cell(i) -+ enddo -+ iadd=iadd+9 -+ endif -+ -+c check on number of variables for stack - -+ -+ if(iadd.gt.mxnstk) call error(idnode,170) -+ -+c accumulate totals over steps -+ -+ numacc=numacc+1 -+ sclnv2=1.d0/dble(numacc) -+ sclnv1=dble(numacc-1)/dble(numacc) -+ -+ if(lbpd.and.keybpd.eq.1)then -+ -+c calculate true thermodynamic averages in bias potential system -+c note integers numacc and numbpd should be equal in this case -+ -+ tbold=tboost*dble(numbpd)/dble(numbpd-1)-boost/dble(numbpd-1) -+ cterm=0.d0 -+ do i=1,mxnstk -+ -+ aterm=sumval(i)*tbold -+ bterm=ssqval(i)*tbold**2 -+ if(tbold.gt.0.d0)cterm=(bterm+aterm**2)/tbold -+ ssqval(i)=(sclnv1*(sclnv1*bterm+boost*sclnv2*(cterm+ -+ x (tbold*stpval(i)-2.d0*aterm)*stpval(i))))/tboost**2 -+ sumval(i)=(sclnv1*aterm+boost*sclnv2*stpval(i))/tboost -+ -+ enddo -+ -+ else -+ -+c calculate true thermodynamic averages in normal system -+ -+ do i=1,mxnstk -+ -+ ssqval(i)=sclnv1*(ssqval(i)+sclnv2*(stpval(i)-sumval(i))**2) -+ sumval(i)=sclnv1*sumval(i)+sclnv2*stpval(i) -+ -+ enddo -+ -+ endif -+ -+c write statistics file -+ -+ if(idnode.eq.0.and.intsta.gt.0)then -+ -+ if(mod(nstep,intsta).eq.0)then -+ -+ write(nstats,'(i10,1p,e14.6,0p,i10,/,(1p,5e14.6))') -+ x nstep,nstep*tstep,iadd,(stpval(k),k=1,iadd) -+ call flush(nstats) -+c$$$c write option for Excel spreadsheet -+c$$$ write(nstats,'(i10,1p,e14.6,0p,i10,300(1p,5e14.6))') -+c$$$ x nstep,nstep*tstep,iadd,(stpval(k),k=1,iadd) -+ -+ endif -+ -+ endif -+ -+c zero rolling average accumulators -+ -+ if(nstep.le.0)then -+ -+ numacc=0 -+ -+ do i=1,mxnstk -+ -+ zumval(i)=0.d0 -+ -+ do j=1,mxstak -+ -+ stkval(j,i)=0.d0 -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c store quantities in stack -+ -+ kstak=mod(nstep-1,nstack)+1 -+ -+ if(nstep.gt.nstack)then -+ -+ do i=1,mxnstk -+ -+ zumval(i)=zumval(i)-stkval(kstak,i) -+ -+ enddo -+ -+ endif -+ -+ do i=1,mxnstk -+ -+ stkval(kstak,i)=stpval(i) -+ zumval(i)=zumval(i)+stpval(i) -+ -+ enddo -+ -+c calculate rolling averages -+ -+ zistk=min(nstack,nstep) -+ -+ do i=1,mxnstk -+ -+ ravval(i)=zumval(i)/zistk -+ -+ enddo -+ -+c zero accumulators during equilibration period -+ -+ if(lzeql.and.nstep.le.nsteql)then -+ -+ numacc=0 -+ do i=1,mxnstk -+ -+ sumval(i)=0.d0 -+ ssqval(i)=0.d0 -+ -+ enddo -+ -+ endif -+ -+c close statistics file at regular intervals -+ -+ if(.not.newjob.and.mod(nstep,ndump).eq.0)then -+ -+ if(idnode.eq.0)close (nstats) -+ newjob=.true. -+ -+ endif -+ -+ return -+ end subroutine static -+ -+ subroutine revive -+ x (lgofr,lzden,idnode,imcon,mxnode,natms,levcfg,nstep,nzden, -+ x numacc,numrdf,chip,chit,conint,tstep,engcfg,virtot,vircom, -+ x tboost,chit_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing restart files at job termination -+c or at selected intervals in simulation -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith dec 1992. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lgofr,lzden -+ integer idnode,imcon,mxnode,natms,nstep,nzden,numacc,numrdf -+ integer levcfg,nsum,nbuff,i,j -+ real(8) chip,chit,conint,tstep,engcfg,rmxnode,virtot,vircom -+ real(8) tboost,chit_shl -+ -+ if(mxnode.gt.1)then -+ -+c merge displacement data -+ -+ call merge(idnode,mxnode,natms,mxbuff,xx0,yy0,zz0,buffer) -+ -+c globally sum rdf information before saving -+ -+ if(lgofr)then -+ -+c maximum rdfs that can be summed in each step -+ -+ nsum=mxbuff/mxrdf -+ if(nsum.eq.0) call error(idnode,200) -+ -+ nbuff=nsum*mxrdf -+ -+ do i=1,mxxtyp,nsum -+ -+ if((mxxtyp+1-i).lt.nsum) nbuff=(mxxtyp+1-i)*mxrdf -+ call gdsum(rdf(1,i),nbuff,buffer) -+ -+ enddo -+ -+ endif -+ -+c globally sum zden information before saving -+ -+ if(lzden)then -+ -+c maximum zdfs that can be summed in each step -+ -+ nsum=mxbuff/mxzdn -+ if(nsum.eq.0) call error(idnode,200) -+ -+ nbuff=nsum*mxzdn -+ -+ do i =1,mxatyp,nsum -+ -+ if((mxatyp+1-i).lt.nsum) nbuff=(mxatyp+1-i)*mxzdn -+ call gdsum(zdens(1,i),nbuff,buffer) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c node 0 handles i/o -+ -+ if(idnode.eq.0)then -+ -+c write configuration data to new configuration file -+ -+ call config_write('REVCON',levcfg,imcon,natms,engcfg) -+ -+c write accumulator data to dump file -+ -+ open(nrest,file='REVIVE',form='unformatted') -+ -+ write(nrest) dble(nstep),dble(numacc),dble(numrdf),chit, -+ x chip,conint,dble(nzden),tboost,chit_shl -+ write(nrest) virtot,vircom,eta,strcns,strbod -+ write(nrest) stpval -+ write(nrest) sumval -+ write(nrest) ssqval -+ write(nrest) zumval -+ write(nrest) ravval -+ write(nrest) stkval -+ write(nrest) xx0,yy0,zz0 -+ write(nrest) xxs,yys,zzs -+ if(lgofr) write(nrest) rdf -+ if(lzden) write(nrest) zdens -+ -+ close (nrest) -+ -+ endif -+ -+c divide rdf data between nodes -+ -+ rmxnode=1.d0/dble(mxnode) -+ -+ if(lgofr)then -+ -+ do i=1,mxxtyp -+ -+ do j=1,mxrdf -+ -+ rdf(j,i)=rdf(j,i)*rmxnode -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+c divide zdensity data between nodes -+ -+ if(lzden)then -+ -+ do i=1,mxatyp -+ -+ do j=1,mxzdn -+ -+ zdens(j,i)=zdens(j,i)*rmxnode -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine revive -+ -+ subroutine zden0(idnode,natms,mxnode,nzden,zlen) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for accumulating statistic for density profile -+c zlen=length of cell in z direction -+c -+c double precision accumulators -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nzden,iatm,ll,k -+ real(8) zlen,zleno2,rzdn -+ -+c accumulator -+ -+ nzden=nzden+1 -+ -+c half of z length -+ -+ zleno2=zlen*0.5d0 -+ -+c grid interval for density profiles -+ -+ rzdn=dble(mxzdn)/zlen -+ -+c set up atom iatm type -+ -+ do iatm=idnode+1,natms,mxnode -+ -+ k =ltype(iatm) -+ -+ ll=int((zzz(iatm)+zleno2)*rzdn+1.0d0) -+ -+c accumulate statistic -+ -+ if(ll.gt.0.and.ll.le.mxzdn)zdens(ll,k)=zdens(ll,k)+1.d0 -+ -+ enddo -+ -+ return -+ end subroutine zden0 -+ -+ subroutine zden1 -+ x (lpgr,idnode,mxnode,ntpatm,nzden,volm,zlen) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating Z density profile -+c from accumulated data. -+c double precision version -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lpgr -+ integer idnode,mxnode,ntpatm,nzden,k,j -+ real(8) volm,zlen,delzdn,dvolz,factor,sum,rrr,rho -+ -+ if(idnode.eq.0) write(nrite, -+ x "(/,/,12X,'Z DENSITY PROFILES',/,/, -+ x 'calculated using ',i10,' configurations')") nzden -+ -+ if(lpgr)then -+ -+c open Z density file and write headers -+ -+ if(idnode.eq.0)then -+ -+ open(nzdndt,file='ZDNDAT') -+ -+ write(nzdndt,'(80a1)')cfgname -+ write(nzdndt,'(2i10)')ntpatm,mxzdn -+ -+ endif -+ -+c volume of z strip (arbitrary) -+ -+ delzdn=zlen/dble(mxzdn) -+ dvolz=(volm/zlen)*delzdn -+ -+c normalisation factor -+ -+ nzden=max(nzden,1) -+ factor=1.d0/(dble(nzden)*dvolz) -+ -+ do k=1,ntpatm -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,'rho(r) :',a8,/,/,8x,'r',6x,'rho',9x,'n(r)',/)") -+ x unqatm(k) -+ write(nzdndt,'(a8)')unqatm(k) -+ -+ endif -+ -+c global sum of data on all nodes -+ -+ if(mxnode.gt.1)call gdsum(zdens(1,k),mxzdn,buffer) -+ -+c running integration of z-density -+ -+ sum=0.d0 -+ -+c loop over distances -+ -+ do j=1,mxzdn -+ -+ rrr=(dble(j)-0.5d0)*delzdn-zlen*0.5d0 -+ rho=zdens(j,k)*factor -+ sum=sum+rho*dvolz -+ -+c print out information -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(f10.4,1p,2e14.6)") rrr,rho,sum -+ write(nzdndt,"(1p,2e14.6)") rrr,rho -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ if(idnode.eq.0)close (nzdndt) -+ -+ endif -+ -+ return -+ end subroutine zden1 -+ -+ subroutine rdf0neu(ik,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for accumulating statistic for radial -+c distribution functions. -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1994 -+c author - t. forester march 1994 -+c amended t. forester april 1994 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer ik,m,iatm,jatm,ll,k -+ real(8) rcut,a0,a1,a2,a3,a4,a5,rcsq,rrcsq,sqlim,rdelr -+ real(8) ai,aj,rsq,rrr,sss -+ -+ data a0,a1,a2,a3,a4,a5/.0837557783d0,2.9399054d0,-7.8475201d0, -+ x 14.1328992d0,-12.6228528d0,4.32084948d0/ -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ rrcsq=1.d0/rcsq -+ sqlim=0.01d0*rcsq -+ -+c grid interval for rdf tables -+ -+ rdelr=dble(mxrdf)/rcut -+ -+c start of primary loop for rdf accumulation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ iatm=ilist(m) -+ ai=ltype(iatm) -+ -+ jatm=jlist(m) -+ aj=ltype(jatm) -+ -+ if(ai.gt.aj)then -+ ll=int(ai*(ai-1.d0)*0.5d0+aj+0.5d0) -+ k=lstvdw(ll) -+ else -+ ll=int(aj*(aj-1.d0)*0.5d0+ai+0.5d0) -+ k=lstvdw(ll) -+ endif -+ -+ rsq=rsqdf(m) -+ -+ if(rcsq.gt.rsq)then -+ -+c determine interpolation panel for rdf table -+ -+ if(rsq.lt.sqlim)then -+ -+ rrr=sqrt(rsq) -+ -+ else -+ -+c interpolate square-root by polynomial plus newton-raphson -+ -+ sss=rsq*rrcsq -+ rrr=1.d0/ -+ x (a0 +sss*(a1+sss*(a2+sss*(a3+sss*(a4+sss*a5))))) -+ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr) -+ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr) -+ rrr=0.5d0*rrr*(3.d0-sss*rrr*rrr)*sss*rcut -+ -+ endif -+ -+ ll=int(rrr*rdelr+0.999999d0) -+ -+c accumulate statistics -+ -+ rdf(ll,k)=rdf(ll,k)+1.d0 -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine rdf0neu -+ -+ end module property_module -diff -urN dl_class_1.9.orig/srcmod/rigid_body_module.f dl_class_1.9/srcmod/rigid_body_module.f ---- dl_class_1.9.orig/srcmod/rigid_body_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/rigid_body_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,243 @@ -+ module rigid_body_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining rigid body arrays -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use parse_module -+ use setup_module -+ use site_module -+ use solvation_module -+ -+ implicit none -+ -+ real(8), allocatable :: omx(:),omy(:),omz(:) -+ real(8), allocatable :: gcmx(:),gcmy(:),gcmz(:) -+ real(8), allocatable :: gvxx(:),gvyy(:),gvzz(:),gmass(:) -+ real(8), allocatable :: q0(:),q1(:),q2(:),q3(:) -+ real(8), allocatable :: gxx(:,:),gyy(:,:),gzz(:,:) -+ real(8), allocatable :: rotinx(:,:),rotiny(:,:),rotinz(:,:) -+ integer, allocatable :: lstrgd(:),numgsit(:),lstgtp(:) -+ integer, allocatable :: listyp(:),lstgst(:,:),lstfre(:) -+ integer, allocatable :: lstme(:),lstbod(:),lstcsit(:) -+ -+ save omx,omy,omz,gcmx,gcmy,gcmz,gvxx,gvyy,gvzz,gmass -+ save q0,q1,q2,q3,gxx,gyy,gzz,rotinx,rotiny,rotinz -+ save lstrgd,numgsit,lstgtp,listyp,lstgst,lstfre,lstme -+ save lstbod,lstcsit -+ -+ contains -+ -+ subroutine alloc_rgbdy_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (omx(mxgrp),omy(mxgrp),omz(mxgrp),stat=fail(1)) -+ allocate (gcmx(mxgrp),gcmy(mxgrp),gcmz(mxgrp),stat=fail(2)) -+ allocate (gvxx(mxgrp),gvyy(mxgrp),gvzz(mxgrp),stat=fail(3)) -+ allocate (q0(mxgrp),q1(mxgrp),q2(mxgrp),q3(mxgrp),stat=fail(4)) -+ allocate (gxx(mxungp,mxngp),gyy(mxungp,mxngp),stat=fail(5)) -+ allocate (gzz(mxungp,mxngp),gmass(mxungp),stat=fail(6)) -+ allocate (rotinx(mxungp,2),rotiny(mxungp,2),stat=fail(7)) -+ allocate (rotinz(mxungp,2),lstgtp(mxgrp),stat=fail(8)) -+ allocate (lstrgd(mxgatm),numgsit(mxungp),stat=fail(9)) -+ allocate (listyp(mxungp),lstgst(mxungp,mxngp),stat=fail(10)) -+ allocate (lstfre(mxatms),lstme(mxatms),stat=fail(11)) -+ allocate (lstbod(mxatms),lstcsit(2*mxcons),stat=fail(12)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1013) -+ enddo -+ -+ end subroutine alloc_rgbdy_arrays -+ -+ subroutine define_rigid_body -+ x (safe,lghost,idnode,itmols,ngrp,natmsr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining rigid bodies -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c adapted - p-a cazade oct 2007, solvation, excitation etc. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lghost,site_test -+ integer idnode,itmols,ngrp,ntmp,idum,igrp -+ integer j,site,natmsr -+ -+ ngrp_ghost=0 -+ ntmp=intstr(record,lenrec,idum) -+ numgrp(itmols)=numgrp(itmols)+ntmp -+ if(idnode.eq.0) then -+ write(nrite,"(/,1x,'number of rigid units ', -+ x 6x,i10)") ntmp -+ write(nrite,"(/,' rigid body details:',/,/,21x, -+ x 6x,'unit',3x,'indices',/) ") -+ endif -+ -+ do igrp=1,numgrp(itmols) -+ -+ ngrp=ngrp+1 -+ site_test=.true. -+ -+ if(ngrp.gt.mxungp) call error(idnode,301) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ numgsit(ngrp)=intstr(record,lenrec,idum) -+ if(numgsit(ngrp).gt.mxngp) -+ x call error (idnode,302) -+ -+ listyp(ngrp)=ngrp -+ -+ do j=1,numgsit(ngrp) -+ -+ site=intstr(record,lenrec,idum) -+ -+ if(site.eq.0)then -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ site=intstr(record,lenrec,idum) -+ -+ endif -+ -+ lstgst(ngrp,j)=site -+ -+ if(lghost)then -+ -+ if(site_test)then -+ -+ if(site+natmsr.ge.ind_fre(3))then -+ -+ site_test=.false. -+ ngrp_ghost=ngrp_ghost+1 -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0) -+ x write(nrite,"(21x,10i10,100(/,21x,10i10))") -+ x listyp(ngrp),(lstgst(ngrp,j),j=1, -+ x numgsit(ngrp)) -+ -+ enddo -+ -+ numgrp(itmols)=numgrp(itmols)-ngrp_ghost -+ ngrp=ngrp-ngrp_ghost -+ -+ return -+ end subroutine define_rigid_body -+ -+ subroutine bodystress -+ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c*********************************************************************** -+c -+c dlpoly routine to calculate rigid body contributions to the -+c stress tensor -+c -+c copyright daresbury laboratory -+c author w.smith aug 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i,j,ig,id,jr,igrp1,igrp2,idnode,mxnode,ngrp -+ real(8) vircom,strbod,dtx,dty,dtz -+ -+ dimension dtx(mxatms),dty(mxatms),dtz(mxatms),strbod(9) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c zero stress tensor accumulators -+ -+ vircom=0.d0 -+ do i=1,9 -+ strbod(i)=0.d0 -+ enddo -+ -+c convert atomic virial to molecular -+c note convention: virial(atom-atom)=-sum(Ri.Fi) -+c : virial(com-com)=-sum(Rcom.Fcom) so -+c virial(com-com)=virial(atom-atom)+sum((Ri-Rcom).Fi) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ vircom=vircom+ -+ x (dtx(jr)*fxx(i)+dty(jr)*fyy(i)+dtz(jr)*fzz(i)) -+ -+c stress tensor : rigid body contributions -+ -+ strbod(1)=strbod(1)-dtx(jr)*fxx(i) -+ strbod(2)=strbod(2)-dtx(jr)*fyy(i) -+ strbod(3)=strbod(3)-dtx(jr)*fzz(i) -+ strbod(4)=strbod(4)-dty(jr)*fxx(i) -+ strbod(5)=strbod(5)-dty(jr)*fyy(i) -+ strbod(6)=strbod(6)-dty(jr)*fzz(i) -+ strbod(7)=strbod(7)-dtz(jr)*fxx(i) -+ strbod(8)=strbod(8)-dtz(jr)*fyy(i) -+ strbod(9)=strbod(9)-dtz(jr)*fzz(i) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ call gdsum(strbod,9,buffer) -+ buffer(1)=vircom -+ call gdsum(buffer(1),1,buffer(2)) -+ vircom=buffer(1) -+ -+ endif -+ -+c symmetrise stress tensor -+ -+ strbod(2)=0.5d0*(strbod(2)+strbod(4)) -+ strbod(4)=strbod(2) -+ strbod(3)=0.5d0*(strbod(3)+strbod(7)) -+ strbod(7)=strbod(3) -+ strbod(6)=0.5d0*(strbod(6)+strbod(8)) -+ strbod(8)=strbod(6) -+ -+ return -+ end subroutine bodystress -+ -+ end module rigid_body_module -diff -urN dl_class_1.9.orig/srcmod/serial.f dl_class_1.9/srcmod/serial.f ---- dl_class_1.9.orig/srcmod/serial.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/serial.f 2015-11-09 14:15:45.064258843 +0100 -@@ -0,0 +1,543 @@ -+ subroutine initcomms() -+ -+c********************************************************************* -+c -+c dummy initcomms routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ return -+ end -+ -+ integer*8 function get_comms() -+c********************************************************************* -+c -+c dummy machine routine for serial DL_POLY with PLUMED -+c -+c******************************************************************** -+ -+ implicit none -+ -+ get_comms=0 -+ -+ return -+ end -+ -+ subroutine machine(idnode,mxnode) -+ -+c********************************************************************* -+c -+c dummy machine routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode -+ -+ idnode=0 -+ mxnode=1 -+ -+ return -+ end -+ -+ integer function mynode() -+ -+c********************************************************************* -+c -+c dummy mynode routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ mynode=0 -+ -+ return -+ end -+ -+ integer function nodedim() -+ -+c********************************************************************* -+c -+c dummy nodedim routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ nodedim=0 -+ -+ return -+ end -+ -+ integer function numnodes() -+ -+c********************************************************************* -+c -+c dummy numnodes routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ numnodes=1 -+ -+ return -+ end -+ -+ subroutine csend(msgtag,buf,length,pe,idum) -+ -+c********************************************************************* -+c -+c dummy csend routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ integer msgtag,length,pe,idum -+ -+ real(8) buf(*) -+ -+ return -+ end -+ -+ subroutine crecv(msgtag,buf,length) -+ -+c********************************************************************* -+c -+c dummy crecv routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer msgtag,length -+ real(8) buf(*) -+ -+ return -+ end -+ -+ subroutine gisum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy isum for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ integer aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gdsum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ real(8) aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gimax(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ integer aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gstate(check) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical check -+ -+ return -+ end -+ -+ subroutine gsync() -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ return -+ end -+ -+ subroutine exitcomms() -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ stop -+ end -+ -+ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ implicit none -+ -+ integer idnode,mxnode,natms,nbuff -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms -+ integer lstme(*) -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ngrp,nbuff -+ real(8) q0(*),q1(*),q2(*),q3(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine shlmerge(idnode,mxnode,ntshl) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl -+ -+ return -+ end -+ -+ subroutine shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode, mxnode, natms -+ integer lishap(*),lashap(*) -+ real(8) xxt(*),yyt(*),zzt(*),txx(*),tyy(*),tzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,natms -+ integer listme(*),listot(*) -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ logical lshmov -+ integer idnode,mxnode,natms,nscons,i,j,k -+ integer lashap(mxproc),lishap(mxlshp),listme(mxatms) -+ integer listin(mxatms),listot(mxatms),listcon(mxcons,3) -+ integer lstfrz(mxatms) -+ -+ do i=1,natms -+ listme(i)=0 -+ enddo -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ listme(i)=listme(i)+1 -+ listme(j)=listme(j)+1 -+ -+ enddo -+ -+c keep record of all atoms subject to constraints -+ -+ do i=1,natms -+ -+ if(listme(i).gt.0)then -+ listot(i)=1 -+ else -+ listot(i)=0 -+ endif -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use error_module -+ use setup_module -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nspmf,i,j,k -+ integer listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) -+ integer lstpmf(mxspmf,mspmf),npmf(2) -+ -+ if(mxpmf.lt.natms) call error(idnode,490) -+ -+ do i=1,natms -+ listpm(i)=0 -+ enddo -+ -+ do k=1,nspmf -+ -+ do j = 1,npmf(1)+npmf(2) -+ -+ i=lstpmf(j,k) -+ listpm(i)= 1 -+ -+ enddo -+ -+ enddo -+ -+c keep record of all atoms subject to pmf constraints -+ -+ do i=1,natms -+ -+ if(listpm(i).gt.0)then -+ lstpmt(i)=1 -+ else -+ lstpmt(i)=0 -+ endif -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ logical lcnb -+ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,jj,id,igrp1,igrp2 -+ integer i,j,k,jr,igrp,itmols,imols,ik,lgrp -+ integer listin(mxatms),listcon(mxcons,3),lstrgd(mxgatm) -+ integer lstout(mxatms),lstcsit(2*mxcons),numgsit(mxungp) -+ integer lstgtp(mxgrp),nummols(mxtmls),numgrp(mxtmls) -+ -+c block indices for groups -+ -+ igrp1 = (idnode*ngrp)/mxnode + 1 -+ igrp2 = ((idnode+1)*ngrp)/mxnode -+ -+c locate site indices of atoms in constraints -+ -+ do i = 1,natms -+ listin(i) = 0 -+ enddo -+ -+c loop over molecule types -+ -+ jr = 0 -+ igrp = 0 -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then -+ -+ id = lstgtp(igrp) -+ do jj = 1,numgsit(id) -+ -+ jr = jr +1 -+ i = lstrgd(jr) -+ listin(i) = jj -+ -+ enddo -+ endif -+ enddo -+ enddo -+ enddo -+ -+ lcnb = .true. -+ ik = 0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ if(listin(i).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(i) -+ lcnb = .false. -+ endif -+ -+ if(listin(j).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(j) -+ lcnb = .false. -+ endif -+ -+ enddo -+ -+c lcnb flags bodies connected by constraints -+ -+ lcnb = (.not.lcnb) -+ -+ return -+ end -+ -diff -urN dl_class_1.9.orig/srcmod/serial.f.preplumed dl_class_1.9/srcmod/serial.f.preplumed ---- dl_class_1.9.orig/srcmod/serial.f.preplumed 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/serial.f.preplumed 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,529 @@ -+ subroutine initcomms() -+ -+c********************************************************************* -+c -+c dummy initcomms routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ return -+ end -+ -+ subroutine machine(idnode,mxnode) -+ -+c********************************************************************* -+c -+c dummy machine routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode -+ -+ idnode=0 -+ mxnode=1 -+ -+ return -+ end -+ -+ integer function mynode() -+ -+c********************************************************************* -+c -+c dummy mynode routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ mynode=0 -+ -+ return -+ end -+ -+ integer function nodedim() -+ -+c********************************************************************* -+c -+c dummy nodedim routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ nodedim=0 -+ -+ return -+ end -+ -+ integer function numnodes() -+ -+c********************************************************************* -+c -+c dummy numnodes routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ numnodes=1 -+ -+ return -+ end -+ -+ subroutine csend(msgtag,buf,length,pe,idum) -+ -+c********************************************************************* -+c -+c dummy csend routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c******************************************************************** -+ -+ implicit none -+ -+ integer msgtag,length,pe,idum -+ -+ real(8) buf(*) -+ -+ return -+ end -+ -+ subroutine crecv(msgtag,buf,length) -+ -+c********************************************************************* -+c -+c dummy crecv routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer msgtag,length -+ real(8) buf(*) -+ -+ return -+ end -+ -+ subroutine gisum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy isum for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ integer aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gdsum(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ real(8) aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gimax(aaa,nnn,bbb) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nnn -+ integer aaa(*),bbb(*) -+ -+ return -+ end -+ -+ subroutine gstate(check) -+ -+c*********************************************************************** -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical check -+ -+ return -+ end -+ -+ subroutine gsync() -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ return -+ end -+ -+ subroutine exitcomms() -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ stop -+ end -+ -+ subroutine merge(idnode,mxnode,natms,nbuff,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ implicit none -+ -+ integer idnode,mxnode,natms,nbuff -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,natms -+ integer lstme(*) -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine merge4(idnode,mxnode,ngrp,nbuff,q0,q1,q2,q3,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ngrp,nbuff -+ real(8) q0(*),q1(*),q2(*),q3(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine shlmerge(idnode,mxnode,ntshl) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl -+ -+ return -+ end -+ -+ subroutine shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode, mxnode, natms -+ integer lishap(*),lashap(*) -+ real(8) xxt(*),yyt(*),zzt(*),txx(*),tyy(*),tzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,natms -+ integer listme(*),listot(*) -+ real(8) xxx(*),yyy(*),zzz(*),buffer(*) -+ -+ return -+ end -+ -+ subroutine passcon -+ x (lshmov,idnode,mxnode,natms,nscons,lashap,lishap,listme, -+ x listin,listot,listcon,lstfrz) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ logical lshmov -+ integer idnode,mxnode,natms,nscons,i,j,k -+ integer lashap(mxproc),lishap(mxlshp),listme(mxatms) -+ integer listin(mxatms),listot(mxatms),listcon(mxcons,3) -+ integer lstfrz(mxatms) -+ -+ do i=1,natms -+ listme(i)=0 -+ enddo -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ listme(i)=listme(i)+1 -+ listme(j)=listme(j)+1 -+ -+ enddo -+ -+c keep record of all atoms subject to constraints -+ -+ do i=1,natms -+ -+ if(listme(i).gt.0)then -+ listot(i)=1 -+ else -+ listot(i)=0 -+ endif -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine passpmf -+ x (idnode,mxnode,natms,nspmf,listpm,listin,lstpmt,lstpmf,npmf) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use error_module -+ use setup_module -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,nspmf,i,j,k -+ integer listpm(mxpmf),listin(mxatms),lstpmt(mxpmf) -+ integer lstpmf(mxspmf,mspmf),npmf(2) -+ -+ if(mxpmf.lt.natms) call error(idnode,490) -+ -+ do i=1,natms -+ listpm(i)=0 -+ enddo -+ -+ do k=1,nspmf -+ -+ do j = 1,npmf(1)+npmf(2) -+ -+ i=lstpmf(j,k) -+ listpm(i)= 1 -+ -+ enddo -+ -+ enddo -+ -+c keep record of all atoms subject to pmf constraints -+ -+ do i=1,natms -+ -+ if(listpm(i).gt.0)then -+ lstpmt(i)=1 -+ else -+ lstpmt(i)=0 -+ endif -+ -+ enddo -+ -+ return -+ end -+ -+ subroutine passquat -+ x (lcnb,idnode,mxnode,natms,ngrp,nscons,ntpmls,listin, -+ x listcon,lstrgd,lstout,lstcsit,lstgtp,nummols,numgrp,numgsit) -+ -+c********************************************************************* -+c -+c dummy routine for serial DL_POLY -+c copyright daresbury laboratory -+c author - w.smith -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ logical lcnb -+ integer idnode,mxnode,natms,ngrp,nscons,ntpmls,jj,id,igrp1,igrp2 -+ integer i,j,k,jr,igrp,itmols,imols,ik,lgrp -+ integer listin(mxatms),listcon(mxcons,3),lstrgd(mxgatm) -+ integer lstout(mxatms),lstcsit(2*mxcons),numgsit(mxungp) -+ integer lstgtp(mxgrp),nummols(mxtmls),numgrp(mxtmls) -+ -+c block indices for groups -+ -+ igrp1 = (idnode*ngrp)/mxnode + 1 -+ igrp2 = ((idnode+1)*ngrp)/mxnode -+ -+c locate site indices of atoms in constraints -+ -+ do i = 1,natms -+ listin(i) = 0 -+ enddo -+ -+c loop over molecule types -+ -+ jr = 0 -+ igrp = 0 -+ do itmols=1,ntpmls -+ -+c loop over molecules in system -+ -+ do imols=1,nummols(itmols) -+ -+c construct rigid body site list: each processor has a different copy -+ -+ do lgrp=1,numgrp(itmols) -+ -+ igrp=igrp+1 -+ -+ if((igrp.ge.igrp1).and.(igrp.le.igrp2)) then -+ -+ id = lstgtp(igrp) -+ do jj = 1,numgsit(id) -+ -+ jr = jr +1 -+ i = lstrgd(jr) -+ listin(i) = jj -+ -+ enddo -+ endif -+ enddo -+ enddo -+ enddo -+ -+ lcnb = .true. -+ ik = 0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ if(listin(i).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(i) -+ lcnb = .false. -+ endif -+ -+ if(listin(j).ne.0) then -+ ik = ik + 1 -+ lstcsit(ik) = listin(j) -+ lcnb = .false. -+ endif -+ -+ enddo -+ -+c lcnb flags bodies connected by constraints -+ -+ lcnb = (.not.lcnb) -+ -+ return -+ end -+ -diff -urN dl_class_1.9.orig/srcmod/setup_module.f dl_class_1.9/srcmod/setup_module.f ---- dl_class_1.9.orig/srcmod/setup_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/setup_module.f 2011-07-11 17:09:10.000000000 +0200 -@@ -0,0 +1,1664 @@ -+ module setup_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining default array sizes -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c note the following internal units apply everywhere -+c -+c unit of time (to) = 1 x 10**(-12) seconds -+c unit of length (lo) = 1 x 10**(-10) metres -+c unit of mass (mo) = 1.6605402 x 10**(-27) kilograms -+c unit of charge (qo) = 1.60217733 x 10**(-19) coulombs -+c unit of energy (eo) = 1.6605402 x 10**(-23) joules -+c unit of pressure (po) = 1.6605402 x 10**( 7) pascals -+c -+c********************************************************************* -+ -+ use parse_module -+ -+ implicit none -+ -+c FIXED PARAMETERS -+ -+c standard pi values -+ -+ real(8), parameter :: pi=3.141592653589793d0 -+ real(8), parameter :: sqrpi=1.7724538509055159d0 -+ -+c conversion factor for coulombic terms in internal units -+c i.e. (unit(charge)**2/(4 pi eps0 unit(length))/unit(energy) -+ -+ real(8), parameter :: r4pie0=138935.4835d0 -+ -+c boltzmann constant in internal units -+ -+ real(8), parameter :: boltz=8.31451115d-1 -+ -+c planck's constant in internal units -+ -+ real(8), parameter :: hbar=6.350780719d0 -+ -+c conversion factor for pressure from internal units to katm -+ -+ real(8), parameter :: prsunt=0.163882576d0 -+ -+c main input channel -+ -+ integer, parameter :: nread=5 -+ -+c main output channel -+ -+ integer, parameter :: nrite=6 -+ -+c force field input channel -+ -+ integer, parameter :: nfield=9 -+ -+c configuration file input channel -+ -+ integer, parameter :: nconf=10 -+ -+c statistical data file output channel -+ -+ integer, parameter :: nstats=20 -+ -+c trajectory history file channel -+ -+ integer, parameter :: nhist=21 -+ -+c acummulators restart dump file -+ -+ integer, parameter :: nrest=22 -+ -+c tabulated potential file channel -+ -+ integer, parameter :: ntable=23 -+ -+c rdf file channel number -+ -+ integer, parameter :: nrdfdt=24 -+ -+c z density file channel number -+ -+ integer, parameter :: nzdndt=25 -+ -+c hyperdynamics reference basin file -+ -+ integer, parameter :: nbsn=30 -+ -+c neb reaction path profile file -+ -+ integer, parameter :: npro=31 -+ -+c hyperdynamics events journal file -+ -+ integer, parameter :: nevnt=33 -+ -+c hyperdynamics tracking file -+ -+ integer, parameter :: ntrk=32 -+ -+c hyperdynamics restart file -+ -+ integer, parameter :: nhrs=35 -+ -+c free energy data file -+ -+ integer, parameter :: nfrnwr=41 -+ -+c solvation data file -+ -+ integer, parameter :: nsolwr=43 -+ -+c data dumping interval in event of system crash -+ -+ integer, parameter :: ndump=1000 -+ -+c maximum number of neb calculations -+ -+ integer, parameter :: maxneb=10 -+ -+c array allocation parameters (set by subroutine parset) -+ -+ integer kmaxa,kmaxb,kmaxc,minnode,msatms,msbad,msgrp -+ integer mspmf,msteth,mxangl,mxatms,mxbond,mxbuff,mxcell -+ integer mxcons,mxdihd,mxewld,mxexcl,mxfbp,mxfld,mxgatm,mxgrid -+ integer mxgrp,mxinv,mxlist,mxlshp,mxneut,mxngp,mxnstk,mxpang -+ integer mxpbnd,mxpdih,mxpfbp,mxpinv,mxpmf,mxproc,mxptbp,mxpvdw -+ integer mxrdf,mxzdn,mxshl,mxsite,mxspmf,mxstak,mxtang,mxtbnd -+ integer mxtbp,mxtcon,mxtdih,mxteth,mxtinv,mxtmls,mxtshl,mxungp -+ integer mxvdw,mxxdf,mx2tbp,mx3fbp,mxebuf,mxquat,mxshak,mxspl -+ integer kmaxd,kmaxe,kmaxf,mxspme,mxftab,mxhko,mxegrd,mxhke -+ integer mxmet,mxsmet,mxpmet,mxter,mxpter,mxatyp,mxxtyp -+ integer mxtmls_fre,mxewld_fre,mxebuf_fre,mxatms_fre,mxatyp_exc -+ integer mxtmls_exc,mxtmls_sol,mxebuf_sol,mxatms_sol -+ -+ save kmaxa,kmaxb,kmaxc,minnode,msatms,msbad,msgrp -+ save mspmf,msteth,mxangl,mxatms,mxbond,mxbuff,mxcell -+ save mxcons,mxdihd,mxewld,mxexcl,mxfbp,mxfld,mxgatm,mxgrid -+ save mxgrp,mxinv,mxlist,mxlshp,mxneut,mxngp,mxnstk,mxpang -+ save mxpbnd,mxpdih,mxpfbp,mxpinv,mxpmf,mxproc,mxptbp,mxpvdw -+ save mxrdf,mxzdn,mxshl,mxsite,mxspmf,mxstak,mxtang,mxtbnd -+ save mxtbp,mxtcon,mxtdih,mxteth,mxtinv,mxtmls,mxtshl,mxungp -+ save mxvdw,mxxdf,mx2tbp,mx3fbp,mxebuf,mxquat,mxshak,mxspl -+ save kmaxd,kmaxe,kmaxf,mxspme,mxftab,mxhko,mxegrd,mxhke -+ save mxmet,mxsmet,mxpmet,mxter,mxpter,mxatyp,mxxtyp -+ save mxtmls_fre,mxewld_fre,mxebuf_fre,mxatms_fre,mxatyp_exc -+ save mxtmls_exc,mxtmls_sol,mxebuf_sol,mxatms_sol -+ -+ contains -+ -+ subroutine parset(redirect,idnode,mxnode,buffer) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to determine required array sizes for -+c allocation of memory manager -+c -+c copyright daresbury laboratory 1997 -+c author - w.smith june 1997 -+c -+c*********************************************************************** -+ -+ logical loglnk,lewald,lspme,lhke,nolink,lcshft -+ logical lsolva,lfree,lfrmas,lghost,redirect -+ real(8) cell,celprp,rctbp,rcfbp,volm,xhi,yhi,zhi,rcut,rvdw -+ real(8) densvar,delr,cut,dens,ratio,drdf,dzdn,rcter,buffer -+ real(8) zlen -+ integer imcon,nhko,ilx,ily,ilz,ncells -+ integer idnode,mxnode,mxn1 -+ -+ dimension cell(9),celprp(10),buffer(10) -+ -+ lhke=.false. -+ lspme=.false. -+ lewald=.false. -+ lcshft=.false. -+ nolink=.false. -+ redirect=.false. -+ mxtmls_sol=1 -+ mxebuf_sol=1 -+ mxatms_sol=1 -+ mxtmls_fre=1 -+ mxewld_fre=1 -+ mxebuf_fre=1 -+ mxatms_fre=1 -+ mxatyp_exc=1 -+ mxtmls_exc=1 -+ -+c specify maximum and minimum nodes -+ -+ mxproc=mxnode -+ minnode=mxnode -+ -+c scan the FIELD file data -+ -+ call fldscan(idnode,mxn1,rctbp,rcfbp,rcter) -+ -+c scan CONFIG file data -+ -+ call cfgscan -+ x (idnode,nconf,imcon,volm,xhi,yhi,zhi,cell,buffer) -+ -+c scan CONTROL file data -+ -+ call conscan -+ x (redirect,lewald,lspme,lhke,nolink,lcshft,lsolva,lfree,lfrmas, -+ x lghost,idnode,imcon,nhko,rcut,rvdw,delr,densvar,drdf,dzdn, -+ x zlen,cell) -+ -+c set dimension of working coordinate arrays -+ -+ msatms=max(1,(mxatms+minnode-1)/minnode) -+ if(lsolva)mxatms_sol=mxatms -+ if(lfree.or.lghost)mxatms_fre=mxatms -+ -+c maximum number of molecule types -+ -+ mxtmls=max(mxtmls,1) -+ if(lsolva)mxtmls_sol=mxtmls -+ if(lfree)mxtmls_fre=mxtmls -+ if(lghost)then -+ -+ mxtmls_exc=mxtmls -+ mxtmls_fre=mxtmls -+ -+ endif -+ -+c maximum number of specified bondlength constraints -+ -+ mxtcon=max(mxtcon,1) -+ -+c maximum number of chemical bond potentials -+ -+ mxtbnd=max(mxtbnd,1) -+ -+c maximum number of different bond angle potentials -+ -+ mxtang=max(mxtang,1) -+ -+c maximum number of different torsional potentials -+ -+ mxtdih=max(mxtdih,1) -+ -+c maximum number of different inversion potentials -+ -+ mxtinv=max(mxtinv,1) -+ -+c maximum number of unique rigid body units -+ -+ mxungp=max(mxungp,1) -+ -+c maximum number of tethered atom potentials -+ -+ mxteth=max(mxteth,1) -+ -+c maximum number of core-shell units -+ -+ mxshl=max(mxshl,1) -+ -+c set maximum number of unique atom types -+ -+ mxatyp=max(1,mxatyp) -+ mxxtyp=(mxatyp*(mxatyp+1))/2 -+ if(lghost)mxatyp_exc=mxatyp -+ -+c maximum number of vdw potentials -+ -+ mxvdw=max(mxvdw,1)+1 -+ -+c maximum number of metal potentials -+ -+ mxmet=max(mxmet,1)+1 -+ mxsmet=mxatyp -+ -+c maximum number of tersoff potentials -+ -+ if(mxter.gt.0)then -+ -+ mxter=mxatyp -+ -+ endif -+ -+c maximum number of three body potentials -+ -+ if(mxtbp.eq.0)then -+ -+ mx2tbp=0 -+ -+ else -+ -+ mx2tbp=(mxatyp*(mxatyp+1))/2 -+ mxtbp=mx2tbp*mxatyp -+ -+ endif -+ -+c maximum number of four body potentials -+ -+ if(mxfbp.eq.0)then -+ -+ mx3fbp=0 -+ -+ else -+ -+ mx3fbp=(mxatyp*(mxatyp+1)*(mxatyp+2))/6 -+ mxfbp=mxatyp*mx3fbp -+ -+ endif -+ -+c maximum number of angular potential parameters -+ -+ mxpang=6 -+ -+c maximum number of three body potential parameters -+ -+ mxptbp=mxpang+1 -+ -+c maximum number of four body potential parameters -+ -+ mxpfbp=3 -+ -+c maximum number of parameters for dihedrals -+ -+ mxpdih=5 -+ -+c maximum number of parameters for inversion potentials -+ -+ mxpinv=2 -+ -+c maximum number of parameters for bond potentials -+ -+ mxpbnd=4 -+ -+c maximum number of parameters for vdw potentials -+ -+ mxpvdw=6 -+ -+c maximum number of parameters for metal potentials -+ -+ mxpmet=7 -+ -+c maximum number of parameters for tersoff potential -+ -+ mxpter=11 -+ -+c maximum number of external field parameters -+ -+ mxfld=10 -+ -+c maximum number of excluded atoms per atom -+ -+ mxexcl=max(mxexcl,1) -+ -+c maximum number of different sites in system -+ -+ mxsite=max(mxsite,1) -+ -+c maximum number of chemical bonds per node -+ -+ mxbond=max(1,(mxbond+minnode-1)/minnode) -+ -+c maximum number of bond angles per node -+ -+ mxangl=max(1,(mxangl+minnode-1)/minnode) -+ -+c maximum number of torsion angles per node -+ -+ mxdihd=max(1,(mxdihd+minnode-1)/minnode) -+ -+c maximum number of inversion potentials per node -+ -+ mxinv=max(1,(mxinv+minnode-1)/minnode) -+ -+c maximum number of constraints per node -+ -+ mxcons=max(1,2*((mxcons+minnode-1)/minnode)) -+ -+c maximum number of tethered atoms per node -+ -+ msteth=max(1,(msteth+minnode-1)/minnode) -+ -+c maximum size for working arrays for bonds, angles, dihedrals -+c inversion potentials, tethers and core-shell units -+ -+ msbad=max(mxbond,mxangl,mxdihd,mxinv,msteth,mxshl) -+ -+c maximum number of grid points in potentials arrays -+ -+ if(mxgrid.eq.0)then -+ -+ mxgrid=max(1000,int(rvdw/0.01d0+0.5d0)+4) -+ -+ endif -+ -+ mxegrd=0 -+ if(lewald.or.lspme.or.lhke.or.lcshft)mxegrd=mxgrid -+ -+c maximum dimension of rdf arrays -+ -+ mxrdf=max(128,int(rcut/drdf)) -+ -+c maximum dimension of zdensity arrays -+ -+ mxzdn=max(128,int(zlen/dzdn)) -+ -+c maximum number of rigid groups in system -+ -+ mxgrp=max(mxgrp,1) -+ -+c maximum number of rigid groups per node -+ -+ msgrp=max(1,(mxgrp+minnode-1)/minnode) -+ -+c maximum number of sites per rigid unit -+ -+ mxngp=max(mxngp,3) -+ -+c maximum number of sites in rigid units -+ -+ mxgatm=max(1,mxgatm) -+ -+c maximum number of timesteps in stack arrays -+ -+ mxstak=max(100,mxstak) -+ -+c maximum number of variables in stack arrays -+ -+ mxnstk=45+mxatyp -+ -+c dimension of shake shared atoms array -+ -+ mxlshp=max(mxcons*2,1) -+ -+c set dimension of working arrays in ewald sum -+ -+ mxewld=1 -+ mxebuf=1 -+ if(lewald)then -+ -+ mxftab=1 -+ mxewld=msatms -+ mxebuf=(2*kmaxa+1)*(2*kmaxb+1)*(2*kmaxc+1)-1 -+ if(lfree.or.lghost)mxebuf=3*mxebuf -+ if(mxnode.le.16.and.mxebuf.le.5000)mxebuf=1 -+ -+ endif -+ -+c set dimension of working arrays in spme -+ -+ mxspme=1 -+ if(lspme)then -+ -+ mxspme=mxatms -+ mxftab=2*(kmaxd+kmaxe+kmaxf) -+ -+ endif -+ -+c set dimension of working arrays for HK ewald -+ -+ mxhko=1 -+ mxhke=1 -+ if(lhke)then -+ -+ mxhko=2 -+ mxewld=msatms -+ mxhke=msatms -+ if(nhko.gt.0)mxhko=max(2,nhko) -+ mxebuf=(2*kmaxa+1)*(2*kmaxb+1)-1 -+ if(mxnode.le.16.and.mxebuf.le.5000)mxebuf=1 -+ -+ endif -+ -+ if(lsolva)mxebuf_sol=mxebuf -+ if(lfree.or.lghost)then -+ -+ mxebuf_fre=mxebuf -+ mxewld_fre=mxewld -+ -+ endif -+ -+c maximum dimension of principal transfer buffer -+ -+ mxbuff=max(6*mxatms,8*(mxcons+1),8*(mxgrp+1),mxnstk*mxstak, -+ x mxebuf,mxgrid,2*kmaxa*kmaxb*kmaxc,2*kmaxd*kmaxe*kmaxf, -+ x 10000) -+ -+c maximum size of verlet neighbour/link cell list for each atom -+c decide if link-cells in use or not -+ -+ cut=rcut+delr -+ dens=dble(mxatms)/volm -+ ratio=1.5d0*dens*(4.d0*pi/3.d0)*cut**3 -+ mxlist=min(nint(ratio),(mxatms+1)/2) -+ if(imcon.eq.0) then -+ -+ cell(1)=max(xhi+2.d0*cut,3.d0*cut) -+ cell(5)=max(yhi+2.d0*cut,3.d0*cut) -+ cell(9)=max(zhi+2.d0*cut,3.d0*cut) -+ -+ endif -+ if(imcon.eq.6)then -+ -+ cell(9)=max(zhi+2.d0*cut,3.d0*cut,cell(9)) -+ -+ endif -+ -+ if(nolink)then -+ -+ loglnk=.false. -+ -+ else -+ -+ loglnk=.true. -+ call dcell(cell,celprp) -+ ilx=int(celprp(7)/cut) -+ ily=int(celprp(8)/cut) -+ ilz=int(celprp(9)/cut) -+ if(ilx.lt.3.or.ily.lt.3.or.ilz.lt.3)loglnk=.false. -+ ncells=ilx*ily*ilz -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7)loglnk=.false. -+ if(mxneut.gt.0.and.ncells.le.36) loglnk=.false. -+ -+ endif -+ -+ mxcell=1 -+ if(loglnk)then -+ -+ mxlist=14*nint(1.5d0*dens*celprp(10)/dble(ncells)) -+ mxcell=(ilx+2)*(ily+2)*(ilz+2) -+ -+ endif -+ -+ if(mxneut.gt.0)mxlist=(mxneut+1)/2 -+ mxlist=2*mxlist -+ if(mxtbp.gt.0.or.mxfbp.gt.0.or.mxter.gt.0)then -+ -+ if(mxtbp.gt.0)cut=min(cut,rctbp) -+ if(mxfbp.gt.0)cut=min(cut,rcfbp) -+ if(mxter.gt.0)cut=min(cut,rcter) -+ ilx=max(3,int(celprp(7)/cut)) -+ ily=max(3,int(celprp(8)/cut)) -+ ilz=max(3,int(celprp(9)/cut)) -+ mxcell=max(mxcell,(ilx+2)*(ily+2)*(ilz+2)) -+ -+ endif -+ mxcell=int(dble(mxcell)*densvar/100.d0) -+ mxlist=int(dble(mxlist)*densvar/100.d0) -+ mxlist=max(500,mxlist) -+ -+c maximum size for coordinate difference arrays -+ -+ mxxdf=max(mxlist,mxatms,mxcons,mxn1*mxn1*(mxneut+1)/2) -+ -+c maximum number of core-shell unit types -+ -+ mxtshl=max(mxtshl,1) -+ -+c potential of mean force array parameter -+ -+ mxpmf=max(mxpmf,1) -+ -+c number of pmf constraints on a processor -+ -+ mspmf=max(1,(mxpmf+minnode-1)/minnode) -+ -+c maximum number of sites to define pmf units -+ -+ mxspmf=max(mxspmf,1) -+ -+c maximum iterations in quaternion integration -+ -+ mxquat=100 -+ -+c maximum number of shake cycles -+ -+ mxshak=100 -+ -+c maximum b-spline interpolation order -+ -+ mxspl=12 -+ -+c increment mxneut -+ -+ if(mxneut.gt.0)mxneut=mxneut+1 -+ -+ return -+ -+ end subroutine parset -+ -+ subroutine fldscan(idnode,mxn1,rctbp,rcfbp,rcter) -+ -+c*********************************************************************** -+c -+c dl_poly routine for scanning the field file to determine the -+c required parameters -+c -+c copyright - daresbury laboratory 1994 -+c author - w. smith november 1994 -+c -+c*********************************************************************** -+ -+ integer, parameter :: mmk=1000 -+ -+ character*8 name,keyword,chr(mmk) -+ logical check,ltable,lmetab,safe,lneut,loop1,loop2 -+ real(8) rctbp,rcter,rcfbp,rct,ppp -+ integer mxn1,nxn1,idnode,nold -+ integer itmols,ksite,numsit,isite,nrept,ifrz,i,j -+ integer ishls,ibonds,numcon,numang,icon,iang,idih,numdih -+ integer numinv,iinv,numgrp,kgrp,numgsit,numteth,iteth -+ integer ipmf,jpmf,npmf,itpvdw,itptbp,itpfbp -+ integer itpter,k,nfld,nummols,idum,numshl,nneu -+ integer numbonds,itpmet,iii,ngrid -+ -+ mxtmls=0 -+ mxatms=0 -+ mxgrp=0 -+ mxtcon=0 -+ mxtbnd=0 -+ mxtang=0 -+ mxtdih=0 -+ mxtinv=0 -+ mxpmf=0 -+ mxspmf=0 -+ mxungp=0 -+ mxngp=0 -+ mxneut=0 -+ mxmet=0 -+ mxatyp=0 -+ mxn1=0 -+ nxn1=0 -+ nold=-1 -+ mxgatm=0 -+ mxteth=0 -+ msteth=0 -+ mxvdw=0 -+ mxtbp=0 -+ mxter=0 -+ mxexcl=0 -+ mxsite=0 -+ mxbond=0 -+ mxcons=0 -+ mxangl=0 -+ mxdihd=0 -+ mxinv=0 -+ mxshl=0 -+ mxtshl=0 -+ mxfbp=0 -+ mxgrid=0 -+ rctbp=0.d0 -+ rcter=0.d0 -+ rcfbp=0.d0 -+ safe=.true. -+ loop1=.true. -+ loop2=.true. -+ lneut=.false. -+ ltable=.false. -+ lmetab=.false. -+ -+c open force field data file -+ -+ if(idnode.eq.0)open (nfield,file='FIELD') -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+c read and process directives from field file -+ -+ do while(loop1) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ -+ if(findstring('neut',record,idum))then -+ -+ lneut=.true. -+ -+ elseif(findstring('molecu',record,idum))then -+ -+ mxtmls=intstr(record,lenrec,idum) -+ -+ do itmols=1,mxtmls -+ -+ loop2=.true. -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ do while(loop2) -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ -+ ksite=0 -+ -+ if(findstring('nummol',record,idum))then -+ -+ nummols=intstr(record,lenrec,idum) -+ -+ elseif(findstring('atoms',record,idum))then -+ -+ numsit=intstr(record,lenrec,idum) -+ mxatms=mxatms+numsit*nummols -+ mxsite=mxsite+numsit -+ ksite=0 -+ do isite=1,numsit -+ -+ if(ksite.lt.numsit)then -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ call getword(name,record,8,lenrec) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ nrept=intstr(record,lenrec,idum) -+ ifrz=intstr(record,lenrec,idum) -+ nneu=intstr(record,lenrec,idum) -+ if(nrept.eq.0)nrept=1 -+ if(lneut)then -+ if(nneu.ne.nold) nxn1=0 -+ nxn1=nxn1+nrept -+ mxn1=max(mxn1,nxn1) -+ nold=nneu -+ endif -+ -+ if(mxatyp.eq.0)then -+ -+ mxatyp=1 -+ chr(1)=name -+ -+ else -+ -+ check=.true. -+ do j=1,mxatyp -+ -+ if(name.eq.chr(j))check=.false. -+ -+ enddo -+ if(check)then -+ -+ mxatyp=mxatyp+1 -+ if(mxatyp.le.mmk)chr(mxatyp)=name -+ -+ endif -+ -+ endif -+ if(nrept.eq.0)nrept=1 -+ ksite=ksite+nrept -+ -+ endif -+ -+ enddo -+ -+ if(mmk.lt.mxatyp)call abortscan(34,idnode) -+ -+ if(lneut)mxneut=mxneut+nneu*nummols -+ -+ elseif(findstring('shell',record,idum))then -+ -+ numshl=intstr(record,40,idum) -+ mxtshl=mxtshl+numshl -+ mxshl=mxshl+nummols*numshl -+ -+ do ishls=1,numshl -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('bonds',record,idum))then -+ -+ numbonds=intstr(record,lenrec,idum) -+ mxtbnd=mxtbnd+numbonds -+ mxbond=mxbond+nummols*numbonds -+ -+ do ibonds=1,numbonds -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('constr',record,idum))then -+ -+ numcon=intstr(record,lenrec,idum) -+ mxtcon=mxtcon+numcon -+ mxcons=mxcons+nummols*numcon -+ -+ do icon=1,numcon -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('angles',record,idum))then -+ -+ numang=intstr(record,lenrec,idum) -+ mxtang=mxtang+numang -+ mxangl=mxangl+nummols*numang -+ -+ do iang=1,numang -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('dihedr',record,idum))then -+ -+ numdih=intstr(record,lenrec,idum) -+ mxtdih=mxtdih+numdih -+ mxdihd=mxdihd+nummols*numdih -+ -+ do idih=1,numdih -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('invers',record,idum))then -+ -+ numinv=intstr(record,lenrec,idum) -+ mxtinv=mxtinv+numinv -+ mxinv=mxinv+nummols*numinv -+ -+ do iinv=1,numinv -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('rigid',record,idum))then -+ -+ numgrp=intstr(record,lenrec,idum) -+ mxungp=mxungp+numgrp -+ mxgrp=mxgrp+numgrp*nummols -+ -+ do kgrp=1,numgrp -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ numgsit=intstr(record,lenrec,idum) -+ mxgatm=mxgatm+numgsit*nummols -+ mxngp=max(mxngp,numgsit) -+ do j=1,numgsit -+ -+ iii=intstr(record,lenrec,idum) -+ if(iii.eq.0)then -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ iii=intstr(record,lenrec,idum) -+ endif -+ -+ enddo -+ -+ enddo -+ -+ elseif(findstring('teth',record,idum))then -+ -+ numteth=intstr(record,lenrec,idum) -+ mxteth=mxteth+numteth -+ msteth=msteth+numteth*nummols -+ -+ do iteth=1,numteth -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ elseif(findstring('pmf',record,idum))then -+ -+ do ipmf=1,2 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ npmf=intstr(record,lenrec,idum) -+ mxspmf=mxspmf+npmf -+ -+ do jpmf=1,npmf -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ enddo -+ -+ enddo -+ -+ mxpmf=mxpmf+nummols -+ -+ elseif(findstring('finish',record,idum))then -+ -+ loop2=.false. -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ elseif(findstring('vdw',record,idum))then -+ -+ if(findstring('tab',record,idum))ltable=.true. -+ mxvdw=intstr(record,lenrec,idum) -+ do itpvdw=1,mxvdw -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ if(findstring('tab',record,idum))ltable=.true. -+ -+ enddo -+ mxvdw=max(mxvdw,(mxatyp*(mxatyp+1))/2) -+ -+ if(ltable)then -+ -+ if(idnode.eq.0)open(ntable,file='TABLE') -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ mxgrid=max(mxgrid,intstr(record,lenrec,idum)) -+ -+ close (ntable) -+ -+ endif -+ -+ elseif(findstring('metal',record,idum))then -+ -+ if(findstring('eam',record,idum))lmetab=.true. -+ mxmet=intstr(record,lenrec,idum) -+ do itpmet=1,mxmet -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call lowcase(record,lenrec) -+ if(findstring('eam',record,idum))lmetab=.true. -+ -+ enddo -+ mxmet=max(mxmet,(mxatyp*(mxatyp+1))/2) -+ -+ if(lmetab)then -+ -+ if(idnode.eq.0)open(ntable,file='TABEAM') -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ do i=1,intstr(record,lenrec,idum) -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ ngrid=intstr(record,lenrec,idum) -+ mxgrid=max(mxgrid,ngrid+4) -+ do j=1,(ngrid+3)/4 -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abortscan(24,idnode) -+ -+ enddo -+ -+ enddo -+ -+ close (ntable) -+ -+ endif -+ -+ elseif(findstring('tbp',record,idum))then -+ -+ mxtbp=intstr(record,lenrec,idum) -+ -+ do itptbp=1,mxtbp -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(keyword,record,4,lenrec) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ rct=dblstr(record,lenrec,idum) -+ rctbp=max(rctbp,rct) -+ -+ enddo -+ -+ elseif(findstring('fbp',record,idum))then -+ -+ mxfbp=intstr(record,lenrec,idum) -+ do itpfbp=1,mxfbp -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(name,record,8,lenrec) -+ call getword(keyword,record,4,lenrec) -+ ppp=dblstr(record,lenrec,idum) -+ ppp=dblstr(record,lenrec,idum) -+ rct=dblstr(record,lenrec,idum) -+ rcfbp=max(rcfbp,rct) -+ -+ enddo -+ -+ elseif(findstring('tersof',record,idum))then -+ -+ mxter=intstr(record,lenrec,idum) -+ -+ do itpter=1,mxter -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ rct=dblstr(record,lenrec,idum) -+ rcter=max(rcter,rct) -+ -+ enddo -+ -+ elseif(findstring('extern',record,idum))then -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ nfld=intstr(record,lenrec,idum) -+ if(nfld.eq.0)nfld=5 -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ -+ do k=1,nfld -+ -+ ppp=dblstr(record,lenrec,idum) -+ if(idum.gt.lenrec.and.k.lt.nfld)then -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)call abortscan(52,idnode) -+ endif -+ -+ enddo -+ -+ elseif(findstring('close',record,idum))then -+ -+ loop1=.false. -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)close (nfield) -+ -+ if(mxpmf.gt.0)mxpmf=mxatms -+ if(mxtcon.gt.0)mxexcl=max(mxexcl,6) -+ if(mxtbnd.gt.0)mxexcl=max(mxexcl,6) -+ if(mxtang.gt.0)mxexcl=max(mxexcl,16) -+ if(mxtdih.gt.0)mxexcl=max(mxexcl,50) -+ if(mxtinv.gt.0)mxexcl=max(mxexcl,50) -+ if(mxneut.gt.0)mxexcl=max(mxexcl,10*mxn1*mxn1) -+ if(mxgrp.gt.0)mxexcl=max(mxexcl,mxngp) -+ -+ return -+ -+ end subroutine fldscan -+ -+ subroutine cfgscan -+ x (idnode,nconf,imcon,volm,xhi,yhi,zhi,cell,buffer) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for scanning the initial configuration -+c file to determine the number of atoms present -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith june 1997 -+c -+c note: volm is volume containing all particles, not system volume -+c -+c*********************************************************************** -+ -+ character*80 header -+ character*8 name -+ logical lvolm -+ real(8) cell,celprp,buffer,extra,volm,xhi,yhi,zhi -+ real(8) xxx,yyy,zzz,uuu,vvv,www,coz -+ integer idnode,nconf,imcon,i,levcfg -+ dimension cell(9),celprp(10),buffer(10),extra(5) -+ -+ imcon=0 -+ xhi=0.d0 -+ yhi=0.d0 -+ zhi=0.d0 -+ volm=0.d0 -+ do i=1,9 -+ -+ cell(i)=0.d0 -+ -+ enddo -+ if(idnode.eq.0)then -+ -+ open (nconf,file='CONFIG') -+ -+c read the CONFIG file header -+ -+ read(nconf,'(a80)',end=100)header -+ read(nconf,'(2i10)',end=100)levcfg,imcon -+ lvolm=(imcon.eq.0.or.imcon.eq.6) -+ -+c specify molecular dynamics simulation cell -+ -+ if(imcon.gt.0)then -+ -+ read(nconf,'(3f20.0)',end=100)cell(1),cell(2),cell(3) -+ read(nconf,'(3f20.0)',end=100)cell(4),cell(5),cell(6) -+ read(nconf,'(3f20.0)',end=100)cell(7),cell(8),cell(9) -+ call dcell(cell,celprp) -+ -+ endif -+ -+ if(.not.lvolm)then -+ -+ volm=celprp(10) -+ -+ if(imcon.eq.4)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.5)then -+ -+ volm=0.5d0*celprp(10) -+ -+ elseif(imcon.eq.7)then -+ -+ volm=0.5d0*celprp(10) -+ -+ endif -+ -+ endif -+ -+ i=0 -+ do while(.true.) -+ -+ i=i+1 -+ if(levcfg.eq.0)then -+ -+ read(nconf,'(a8)',end=100) name -+ read(nconf,'(3f20.0)')xxx,yyy,zzz -+ -+ else if(levcfg.eq.1)then -+ -+ read(nconf,'(a8)',end=100) name -+ read(nconf,'(3f20.0)')xxx,yyy,zzz -+ read(nconf,'(3f20.0)')uuu,vvv,www -+ -+ else -+ -+ read(nconf,'(a8)',end=100) name -+ read(nconf,'(3f20.0)')xxx,yyy,zzz -+ read(nconf,'(3f20.0)')uuu,vvv,www -+ read(nconf,'(3f20.0)')uuu,vvv,www -+ -+ endif -+ -+ if(lvolm)then -+ -+ if(i.eq.1)then -+ -+ xhi=abs(xxx) -+ yhi=abs(yyy) -+ zhi=abs(zzz) -+ -+ else -+ -+ xhi=max(xhi,abs(xxx)) -+ yhi=max(yhi,abs(yyy)) -+ zhi=max(zhi,abs(zzz)) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ 100 continue -+ -+ if(imcon.eq.0)then -+ -+ volm=8.d0*xhi*yhi*zhi -+ -+ else if(imcon.eq.6)then -+ -+ coz=(cell(1)*cell(4)+cell(2)*cell(5)+cell(3)*cell(6))/ -+ x (celprp(1)*celprp(2)) -+ volm=2.d0*zhi*celprp(1)*celprp(2)*sqrt(1.d0-coz**2) -+ -+ endif -+ -+ close (nconf) -+ -+ endif -+ -+ extra(1)=dble(imcon) -+ extra(2)=xhi -+ extra(3)=yhi -+ extra(4)=zhi -+ extra(5)=volm -+ call gdsum(extra,5,buffer) -+ call gdsum(cell,9,buffer) -+ imcon=nint(extra(1)) -+ xhi=extra(2) -+ yhi=extra(3) -+ zhi=extra(4) -+ volm=extra(5) -+ -+ return -+ -+ end subroutine cfgscan -+ -+ subroutine conscan -+ x (redirect,lewald,lspme,lhke,nolink,lcshft,lsolva,lfree,lfrmas, -+ x lghost,idnode,imcon,nhko,rcut,rvdw,delr,densvar,drdf,dzdn, -+ x zlen,cell) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for scanning the contents of the control file -+c -+c copyright - daresbury laboratory 1997 -+c author - w. smith june 1997 -+c -+c*********************************************************************** -+ -+ logical safe,lewald,lspme,lhke,peek,nolink,lcshft,lmetad -+ logical lsolva,lfree,lfrmas,lghost,redirect -+ real(8) cell,celprp,rcut,rvdw,delr,eps,alpha,fac,tol,tol1 -+ real(8) densvar,drdf,dzdn,zlen -+ integer nhko,idnode,imcon,idum,jmp -+ integer nlatt,kmax1,kmax2,kmax3,kmaxpow2 -+ dimension celprp(10),cell(9) -+ -+ nhko=0 -+ mxstak=0 -+ kmaxa=0 -+ kmaxb=1 -+ kmaxc=1 -+ kmaxd=1 -+ kmaxe=1 -+ kmaxf=1 -+ rcut=0.d0 -+ rvdw=0.d0 -+ delr=0.d0 -+ drdf=0.05d0 -+ dzdn=0.05d0 -+ zlen=0.d0 -+ densvar=1.d2 -+ peek=.true. -+ lhke=.false. -+ lspme=.false. -+ lewald=.false. -+ lcshft=.false. -+ nolink=.false. -+ lghost=.false. -+ lfree=.false. -+ lfrmas=.false. -+ lsolva=.false. -+ lmetad=.false. -+ redirect=.false. -+ -+c open the simulation input file -+ -+ if(idnode.eq.0)open (nread,file='CONTROL') -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abortscan(17,idnode) -+ -+ do while(peek) -+ -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abortscan(17,idnode) -+ call lowcase(record,lenrec) -+ if(record(1).ne.'#')then -+ -+ if(findstring('stack',record,idum))then -+ -+ mxstak=intstr(record,lenrec,idum) -+ -+ elseif(findstring('no link',record,idum))then -+ -+ nolink=.true. -+ -+ elseif(findstring('metafreeze',record,idum))then -+ -+ lmetad=.true. -+ do while(lmetad) -+ call getrec(safe,idnode,nread) -+ if(.not.safe)call abortscan(17,idnode) -+ call lowcase(record,lenrec) -+ lmetad=.not.findstring('endmet',record,idum) -+ enddo -+ -+ elseif(findstring('redirect',record,idum))then -+ -+ redirect=.true. -+ -+ elseif(findstring('densvar',record,idum))then -+ -+ densvar=dblstr(record,lenrec,idum) -+ -+ elseif(findstring('shift',record,idum).or. -+ x findstring('reaction',record,idum))then -+ -+ lcshft=.true. -+ -+ elseif(findstring('ewald',record,idum).or. -+ x findstring('spme',record,idum).or. -+ x findstring('hke',record,idum))then -+ -+c read Ewald or HK-Ewald or SPM-Ewald sum parameters -+ -+ lhke=findstring('hke',record,idum) -+ lspme=findstring('spme',record,idum) -+ lewald=findstring('ewald',record,idum) -+ -+ if(findstring('precision',record,idum))then -+ -+ eps=dblstr(record,lenrec,idum) -+ if(lhke) then -+ -+ nhko=intstr(record,lenrec,idum) -+ nlatt=intstr(record,lenrec,idum) -+ nlatt=min(nlatt,2) -+ -+ endif -+ -+ if(rcut.lt.1.d-6)rcut=10.d0 -+ -+c compute alpha and the kmax -+ -+ if(lewald.or.lspme)then -+ -+ call dcell(cell,celprp) -+ eps=min(abs(eps),0.5d0) -+ tol=sqrt(abs(log(eps*rcut))) -+ alpha=sqrt(abs(log(eps*rcut*tol)))/rcut -+ tol1=sqrt(-log(eps*rcut*(2.d0*tol*alpha)**2)) -+ fac=1.d0 -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) -+ x fac=2.d0**(1.d0/3.d0) -+ kmax1=nint(0.25d0+fac*celprp(1)*alpha*tol1/pi) -+ kmax2=nint(0.25d0+fac*celprp(2)*alpha*tol1/pi) -+ kmax3=nint(0.25d0+fac*celprp(3)*alpha*tol1/pi) -+ -+ elseif(lhke)then -+ -+ if(nhko.eq.0)then -+ if(eps.le.1.d-6)then -+ alpha=3.46d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=3.14d0/rcut -+ else -+ alpha=2.76d0/rcut -+ endif -+ elseif(nhko.eq.1)then -+ if(eps.le.1.d-6)then -+ alpha=4.37d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.08d0/rcut -+ else -+ alpha=3.75d0/rcut -+ endif -+ elseif(nhko.eq.2)then -+ if(eps.le.1.d-6)then -+ alpha=5.01d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=4.74d0/rcut -+ else -+ alpha=4.44d0/rcut -+ endif -+ elseif(nhko.eq.3)then -+ if(eps.le.1.d-6)then -+ alpha=5.55d0/rcut -+ elseif(eps.le.1.d-5)then -+ alpha=5.28d0/rcut -+ else -+ alpha=5.00d0/rcut -+ endif -+ endif -+ alpha=alpha/dble(2*nlatt+1) -+ if(abs(cell(9)).lt.1.d-8)cell(9)=1.d0 -+ call dcell(cell,celprp) -+ tol=2.d0*alpha*sqrt(abs(log(eps*alpha))) -+ tol1=2.d0*alpha*sqrt(abs(log(eps*alpha*tol))) -+ kmax1=nint(0.25d0+0.5d0*celprp(1)*tol1/pi) -+ kmax2=nint(0.25d0+0.5d0*celprp(2)*tol1/pi) -+ kmax3=1 -+ -+ endif -+ -+ else -+ -+ alpha=dblstr(record,lenrec,idum) -+ kmax1=intstr(record,lenrec,idum) -+ kmax2=intstr(record,lenrec,idum) -+ -+ if(lhke)then -+ -+ kmax3=1 -+ nhko=intstr(record,lenrec,idum) -+ -+ else -+ -+ kmax3=intstr(record,lenrec,idum) -+ -+ endif -+ -+ endif -+ -+c for spme double kmax and set to next power of 2, with current -+c upper limit of 512 -+ -+ if(lspme)then -+ -+ kmaxpow2=1 -+ do while (kmax1.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ end do -+ kmaxd=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax2.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ end do -+ kmaxe=2 * kmaxpow2 -+ -+ kmaxpow2=1 -+ do while (kmax3.gt.kmaxpow2.and.kmaxpow2.lt.256) -+ kmaxpow2=kmaxpow2 * 2 -+ end do -+ kmaxf=2 * kmaxpow2 -+ -+ elseif(lhke) then -+ -+ kmaxa=kmax1 -+ kmaxb=kmax2 -+ kmaxc=1 -+ -+ else -+ -+ kmaxa=kmax1 -+ kmaxb=kmax2 -+ kmaxc=kmax3 -+ -+ endif -+ -+ elseif(findstring('cut',record,idum))then -+ -+ rcut=dblstr(record,lenrec,idum) -+ -+ elseif(findstring('rvdw',record,idum))then -+ -+ rvdw=dblstr(record,lenrec,idum) -+ -+ elseif(findstring('delr',record,idum))then -+ -+ delr=dblstr(record,100,idum) -+ -+ else if(findstring('rdf',record,idum))then -+ -+ if(.not.findstring('print',record,idum))then -+ -+ jmp=intstr(record,lenrec,idum) -+ drdf=dblstr(record,lenrec,idum) -+ -+ endif -+ -+ else if(findstring('zden',record,idum))then -+ -+ jmp=intstr(record,lenrec,idum) -+ dzdn=dblstr(record,lenrec,idum) -+ zlen=dblstr(record,lenrec,idum) -+ if(dzdn.lt.1.d-8)then -+ -+ dzdn=0.1d0 -+ zlen=0.1d0*dble(128) -+ -+ elseif(zlen.lt.1.d-8)then -+ -+ zlen=dzdn*dble(128) -+ -+ endif -+ -+ elseif(findstring('solva',record,idum))then -+ -+ lsolva=.true. -+ -+ elseif(findstring('decomp',record,idum))then -+ -+ lsolva=.true. -+ -+ elseif(findstring('free',record,idum))then -+ -+ lfree=.true. -+ -+ elseif(findstring('excit',record,idum))then -+ -+ lghost=.true. -+ lsolva=.true. -+ -+ elseif(findstring('reset_mass',record,idum))then -+ -+ lfrmas=.true. -+ -+ elseif(findstring('switch',record,idum))then -+ -+ lghost=.true. -+ lsolva=.true. -+ -+ elseif(findstring('finish',record,idum))then -+ -+ peek=.false. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)close (nread) -+ if(abs(rvdw).le.1.d-10)rvdw=rcut -+ if(drdf.lt.1.d-8)drdf=0.05d0 -+ if(dzdn.lt.1.d-8)dzdn=0.05d0 -+ -+ return -+ -+ end subroutine conscan -+ -+ subroutine abortscan(key,idnode) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for controlled exit of file scan -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c********************************************************************* -+ -+ integer key,idnode -+ -+ write(nrite,'(/,/,1x,a,i5)') -+ x 'DL_POLY terminated due to error ', key -+ -+ if(key.eq.17)then -+ -+ write(nrite,'(/,/,1x,a)') -+ x 'error - strange exit from CONTROL file processing' -+ -+ else if(key.eq.52)then -+ -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of FIELD file encountered' -+ -+ else if(key.eq.24)then -+ -+ write(nrite,'(/,/,1x,a)') -+ x 'error - end of file encountered in TABLE file' -+ -+ else if(key.eq.34)then -+ -+ write(nrite,'(/,/,1x,a)') -+ x 'error - character array memory allocation failure' -+ -+ endif -+ -+ if(idnode.eq.0) then -+ close (nrite) -+ close (nhist) -+ close (nread) -+ close (nconf) -+ close (nstats) -+ close (nrest) -+ close (nfield) -+ close (ntable) -+ endif -+ -+ call gsync() -+ call exitcomms() -+ -+ return -+ end subroutine abortscan -+ -+ subroutine dcell(aaa,bbb) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to calculate the dimensional properties of -+c a simulation cell specified by the input matrix aaa. -+c the results are returned in the array bbb, with : -+c -+c bbb(1 to 3) - lengths of cell vectors -+c bbb(4 to 6) - cosines of cell angles -+c bbb(7 to 9) - perpendicular cell widths -+c bbb(10) - cell volume -+c -+c copyright daresbury laboratory 1992 -+c author - w. smith july 1992 -+c -+c*********************************************************************** -+ -+ real(8) aaa,bbb,axb1,axb2,axb3,bxc1,bxc2,bxc3,cxa1,cxa2,cxa3 -+ -+ dimension aaa(9),bbb(10) -+ -+c calculate lengths of cell vectors -+ -+ bbb(1)=sqrt(aaa(1)*aaa(1)+aaa(2)*aaa(2)+aaa(3)*aaa(3)) -+ bbb(2)=sqrt(aaa(4)*aaa(4)+aaa(5)*aaa(5)+aaa(6)*aaa(6)) -+ bbb(3)=sqrt(aaa(7)*aaa(7)+aaa(8)*aaa(8)+aaa(9)*aaa(9)) -+ -+c calculate cosines of cell angles -+ -+ bbb(4)=(aaa(1)*aaa(4)+aaa(2)*aaa(5)+aaa(3)*aaa(6))/(bbb(1)*bbb(2)) -+ bbb(5)=(aaa(1)*aaa(7)+aaa(2)*aaa(8)+aaa(3)*aaa(9))/(bbb(1)*bbb(3)) -+ bbb(6)=(aaa(4)*aaa(7)+aaa(5)*aaa(8)+aaa(6)*aaa(9))/(bbb(2)*bbb(3)) -+ -+c calculate vector products of cell vectors -+ -+ axb1=aaa(2)*aaa(6)-aaa(3)*aaa(5) -+ axb2=aaa(3)*aaa(4)-aaa(1)*aaa(6) -+ axb3=aaa(1)*aaa(5)-aaa(2)*aaa(4) -+ bxc1=aaa(5)*aaa(9)-aaa(6)*aaa(8) -+ bxc2=aaa(6)*aaa(7)-aaa(4)*aaa(9) -+ bxc3=aaa(4)*aaa(8)-aaa(5)*aaa(7) -+ cxa1=aaa(8)*aaa(3)-aaa(2)*aaa(9) -+ cxa2=aaa(1)*aaa(9)-aaa(3)*aaa(7) -+ cxa3=aaa(2)*aaa(7)-aaa(1)*aaa(8) -+ -+c calculate volume of cell -+ -+ bbb(10)=abs(aaa(1)*bxc1+aaa(2)*bxc2+aaa(3)*bxc3) -+ -+c calculate cell perpendicular widths -+ -+ bbb(7)=bbb(10)/sqrt(bxc1*bxc1+bxc2*bxc2+bxc3*bxc3) -+ bbb(8)=bbb(10)/sqrt(cxa1*cxa1+cxa2*cxa2+cxa3*cxa3) -+ bbb(9)=bbb(10)/sqrt(axb1*axb1+axb2*axb2+axb3*axb3) -+ -+ return -+ end subroutine dcell -+ -+ end module setup_module -diff -urN dl_class_1.9.orig/srcmod/shake_module.f dl_class_1.9/srcmod/shake_module.f ---- dl_class_1.9.orig/srcmod/shake_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/shake_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,152 @@ -+ module shake_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining bond shake arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use error_module -+ use parse_module -+ use setup_module -+ use site_module -+ use solvation_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmcon(:) -+ integer, allocatable :: listcon(:,:),listot(:) -+ integer, allocatable :: numcon(:),lstcon(:,:) -+ integer, allocatable :: listme(:),lishap(:),lashap(:) -+ -+ save prmcon,listcon,listot,numcon,lstcon,listme,lishap,lashap -+ -+ contains -+ -+ subroutine alloc_shake_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (prmcon(mxtcon),stat=fail(1)) -+ allocate (numcon(mxtmls),stat=fail(2)) -+ allocate (lstcon(mxtcon,2),stat=fail(3)) -+ allocate (listcon(mxcons,3),stat=fail(4)) -+ allocate (listme(mxatms),stat=fail(5)) -+ allocate (lishap(mxlshp),stat=fail(6)) -+ allocate (lashap(mxproc),stat=fail(7)) -+ allocate (listot(mxatms),stat=fail(8)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1070) -+ enddo -+ -+ do i=1,mxtmls -+ numcon(i)=0 -+ enddo -+ -+ end subroutine alloc_shake_arrays -+ -+ subroutine define_constraints -+ x (safe,lghost,idnode,itmols,nconst,nsite,natmsr) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining constraints -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c adapted - p-a cazade oct 2007, solvation, excitation etc. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lghost -+ character*1 message(80) -+ integer idnode,itmols,nconst,nsite,ntmp,icnst -+ integer icnst1,iatm1,iatm2,isite1,isite2,idum,i -+ integer isol1,isol2,natmsr -+ -+ ntmp=intstr(record,lenrec,idum) -+ numcon(itmols)=numcon(itmols)+ntmp -+ if(idnode.eq.0) then -+ write(nrite,"(/,1x,'number of bond constraints', -+ x 5x,i10)") ntmp -+ write(nrite,"(/,/,1x,'constraint bond details:', -+ x /,/,21x,5x,'index',5x,'index',2x,'bondlength',/) -+ x ") -+ endif -+ -+ icnst1 = numcon(itmols) -+ do icnst=1,icnst1 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ iatm1 = intstr(record,lenrec,idum) -+ iatm2 = intstr(record,lenrec,idum) -+ -+c test for frozen atom pairs(:) -+ -+ isite1 = nsite - numsit(itmols) + iatm1 -+ isite2 = nsite - numsit(itmols) + iatm2 -+ if(lghost)then -+ -+ isol1=natmsr+iatm1 -+ isol2=natmsr+iatm2 -+ -+ endif -+ -+ if(lfzsit(isite1)*lfzsit(isite2).ne.0) then -+ -+ numcon(itmols) = numcon(itmols) -1 -+ if(idnode.eq.0) write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ nconst=nconst+1 -+ -+ if(nconst.gt.mxtcon) call error(idnode,40) -+ -+ lstcon(nconst,1)= iatm1 -+ lstcon(nconst,2)= iatm2 -+ prmcon(nconst)=dblstr(record,lenrec,idum) -+ -+ if(lghost)then -+ -+ if((isol1.ge.ind_fre(3)).or.(isol2.ge.ind_fre(3)))then -+ -+ numcon(itmols)=numcon(itmols)-1 -+ ntcons_ghost=ntcons_ghost+1 -+ -+ endif -+ -+ endif -+ -+ if(idnode.eq.0) -+ x write(nrite,"(21x,2i10,f12.6)") -+ x lstcon(nconst,1),lstcon(nconst,2), -+ x prmcon(nconst) -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_constraints -+ -+ end module shake_module -diff -urN dl_class_1.9.orig/srcmod/site_module.f dl_class_1.9/srcmod/site_module.f ---- dl_class_1.9.orig/srcmod/site_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/site_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,233 @@ -+ module site_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining atomic/site arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use error_module -+ use parse_module -+ use setup_module -+ -+ implicit none -+ -+ character*1, allocatable :: molnam(:,:) -+ character*8, allocatable :: sitnam(:),unqatm(:) -+ real(8), allocatable :: dens(:),chgsit(:),wgtsit(:) -+ integer, allocatable :: nexsit(:),lfzsit(:),numsit(:),ltpsit(:) -+ integer, allocatable :: nugrp(:),lexsit(:,:),numgrp(:) -+ integer, allocatable :: numtyp(:),numfrz(:),nummols(:) -+ -+ save numtyp,numfrz,dens,chgsit,wgtsit,sitnam,unqatm,nexsit -+ save lfzsit,numsit,ltpsit,nugrp,lexsit,numgrp,molnam,nummols -+ -+ contains -+ -+ subroutine alloc_site_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=16 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (chgsit(mxsite),stat=fail(1)) -+ allocate (wgtsit(mxsite),stat=fail(2)) -+ allocate (nexsit(mxsite),stat=fail(3)) -+ allocate (lfzsit(mxsite),stat=fail(4)) -+ allocate (nugrp(mxsite) ,stat=fail(5)) -+ allocate (ltpsit(mxsite),stat=fail(6)) -+ allocate (numsit(mxtmls),stat=fail(7)) -+ allocate (lexsit(mxsite,mxexcl),stat=fail(8)) -+ allocate (sitnam(mxsite),stat=fail(9)) -+ allocate (unqatm(mxsite),stat=fail(10)) -+ allocate (numgrp(mxtmls),stat=fail(11)) -+ allocate (numtyp(mxatyp),stat=fail(12)) -+ allocate (numfrz(mxatyp),stat=fail(13)) -+ allocate (dens(mxatyp),stat=fail(14)) -+ allocate (nummols(mxtmls),stat=fail(15)) -+ allocate (molnam(40,mxtmls),stat=fail(16)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1090) -+ enddo -+ -+ do i=1,mxtmls -+ numsit(i)=0 -+ enddo -+ -+ end subroutine alloc_site_arrays -+ -+ subroutine define_atoms -+ x (safe,lneut,idnode,itmols,nsite,ksite,ntpatm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining atom types in system -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ character*8 atom1 -+ character*1 message(80) -+ logical lneut,safe,atmchk -+ integer idnode,itmols,nsite,ksite,ntpatm,isite,nrept -+ integer ifrz,neugp,irept,jsite,idum -+ real(8) weight,charge -+ -+ numsit(itmols)=intstr(record,lenrec,idum) -+ if(idnode.eq.0) then -+ write(nrite,"(/,1x,'number of atoms/sites', -+ x 10x,i10)") numsit(itmols) -+ if(.not.lneut) -+ x write(nrite,"(/,/,1x,'atomic characteristics:', -+ x /,/,21x,' site',5x,'name',10x,'mass',8x, -+ x 'charge',4x,'repeat',4x,'freeze'/)") -+ if(lneut) -+ x write(nrite,"(/,/,1x,'atomic characteristics:',/ -+ x /,21x,' site',5x,'name',10x,'mass',8x,'charge', -+ x 4x,'repeat',4x,'freeze',3x,'chg grp')") -+ -+ endif -+ -+ do isite=1,numsit(itmols) -+ -+ if(ksite.lt.numsit(itmols))then -+ -+c read atom name, site number, mass, charge, freeze option -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call getword(atom1,record,8,lenrec) -+ weight=dblstr(record,lenrec,idum) -+ charge=dblstr(record,lenrec,idum) -+ nrept=intstr(record,lenrec,idum) -+ ifrz =intstr(record,lenrec,idum) -+ neugp=intstr(record,lenrec,idum) -+ if(nrept.eq.0)nrept=1 -+ ksite=ksite+nrept -+ -+ if(idnode.eq.0) then -+ -+ if(.not.lneut) then -+ -+ write(nrite, -+ x "(21x,i5,5x,a8,2f12.5,2i10)") -+ x nsite+1,atom1,weight,charge,nrept, -+ x ifrz -+ -+ else -+ -+ write(nrite, -+ x "(21x,i5,5x,a8,2f12.5,3i10)") -+ x nsite+1,atom1,weight,charge,nrept, -+ x ifrz,neugp -+ -+ endif -+ -+ endif -+ -+ do irept=1,nrept -+ -+ nsite=nsite+1 -+ if(nsite.gt.mxsite) call error(idnode,20) -+ -+ sitnam(nsite)=atom1 -+ wgtsit(nsite)=weight -+ chgsit(nsite)=charge -+ lfzsit(nsite)=ifrz -+ nugrp(nsite)=neugp -+ -+ enddo -+ -+c establish list of unique atom types -+ -+ atmchk=.true. -+ -+ do jsite=1,ntpatm -+ -+ if(atom1.eq.unqatm(jsite)) then -+ -+ atmchk=.false. -+ do irept=nsite,nsite-nrept+1,-1 -+ -+ ltpsit(irept)=jsite -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ if(atmchk)then -+ -+ ntpatm=ntpatm+1 -+ if(ntpatm.gt.mxatyp)call error(idnode,14) -+ unqatm(ntpatm)=atom1 -+ -+ do irept=nsite,nsite-nrept+1,-1 -+ -+ ltpsit(irept)=ntpatm -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_atoms -+ -+ subroutine check_syschg(idnode,ntpmls,sumchg) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for checking the system charge -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,ntpmls,jsite,itmols,lsite -+ real(8) sumchg -+ -+ jsite=0 -+ do itmols=1,ntpmls -+ -+ do lsite=1,numsit(itmols) -+ -+ jsite=jsite+1 -+ sumchg=sumchg+dble(nummols(itmols))*chgsit(jsite) -+ -+ enddo -+ -+ enddo -+ -+ if(abs(sumchg).gt.1.0d-6) then -+ -+ call warning(idnode,60,sumchg,0.d0,0.d0) -+ -+ endif -+ -+ return -+ end subroutine check_syschg -+ -+ end module site_module -diff -urN dl_class_1.9.orig/srcmod/solvation_module.f dl_class_1.9/srcmod/solvation_module.f ---- dl_class_1.9.orig/srcmod/solvation_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/solvation_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,996 @@ -+ module solvation_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining decomposition of energy arrays -+c to calculate solvation energies -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ use setup_module -+ use error_module -+ use config_module -+ -+ implicit none -+ -+ logical lcomp(9) -+ -+ integer mxtmls_sol2,mxtmls_sol3,mxtmls_sol4 -+ integer ntcons_ghost,ngrp_ghost,nswitch,niswitch -+ integer mxtmls_exc2,mxtmls_exc3,mxtmls_exc4 -+ integer nfrn,ifrn,mfree,kfree,ind_fre(4) -+ -+ real(8) pfree,lambda1,lambda2,dlambda,eng_kin_fre -+ real(8) elrc2,virlrc2,engsic0,engsic2,elrc_sav,qfix_fre -+ real(8) virlrc_sav,volm_sav,elrc_fre,elrc_fre_sav,vlrc_fre -+ real(8) qchg0,qchg1,qchg2,ang_fre,bnd_fre,dih_fre -+ real(8) inv_fre,tbp_fre,fbp_fre,cou_fre,elrc2_sav -+ real(8) vdw_fre,eng_cfg_fre,shl_fre,virlrc2_sav,vlrc_fre_sav -+ real(8) qchg_sav,vir_cfg_fre,ang_vir,bnd_vir,dih_vir -+ real(8) inv_vir,tbp_vir,fbp_vir,cou_vir,vdw_vir,shl_vir -+ -+ integer, allocatable :: atm_fre(:) -+ integer, allocatable :: atmolt(:),rigid_sol(:),const_sol(:) -+ integer, allocatable :: lstgot_sol(:),natm_sol(:) -+ -+ real(8), allocatable :: elrc_sol(:),elrc_sol_sav(:),shl_sol(:) -+ real(8), allocatable :: cou_sol(:),vdw_sol(:),bnd_sol(:) -+ real(8), allocatable :: ckc_sol_sum(:),cks_sol_sum(:) -+ real(8), allocatable :: cou_sol_sic(:),ebuf_sol1(:),inv_sol(:) -+ real(8), allocatable :: ang_sol(:),dih_sol(:),en3_sol(:) -+ real(8), allocatable :: qfix_sol(:),ebuf_sol2(:),en4_sol(:) -+ real(8), allocatable :: vdw_sol_lng(:),cou_sol_lng(:) -+ real(8), allocatable :: degfre_sol(:),degrot_sol(:),temp_sol(:) -+ real(8), allocatable :: vxo_sol(:),vyo_sol(:),vzo_sol(:) -+ real(8), allocatable :: ckc1(:),cks1(:),ckc2(:),cks2(:) -+ real(8), allocatable :: ckc_fre_sum(:),cks_fre_sum(:) -+ real(8), allocatable :: ebuf_exc1(:),ebuf_exc2(:) -+ real(8), allocatable :: vxo_fre(:),vyo_fre(:),vzo_fre(:) -+ real(8), allocatable :: elrc_exc(:),elrc_exc_sav(:) -+ real(8), allocatable :: cou_exc(:),vdw_exc(:),bnd_exc(:) -+ real(8), allocatable :: ang_exc(:),dih_exc(:),en4_exc(:) -+ real(8), allocatable :: vdw_exc_lng(:),cou_exc_lng(:) -+ real(8), allocatable :: shl_exc(:),en3_exc(:),inv_exc(:) -+ real(8), allocatable :: qfix_exc(:),cou_exc_sic(:),weight_sav(:) -+ -+ save atmolt,rigid_sol,const_sol,lstgot_sol,natm_sol,elrc_sol -+ save elrc_sol_sav,cou_sol,vdw_sol,bnd_sol,ckc_sol_sum,cks_sol_sum -+ save cou_sol_sic,ebuf_sol1,en4_sol,ang_sol,dih_sol,en3_sol -+ save qfix_sol,ebuf_sol2,shl_sol,vdw_sol_lng,cou_sol_lng,degfre_sol -+ save degrot_sol,inv_sol,temp_sol,vxo_sol,vyo_sol,vzo_sol -+ save mxtmls_sol2,mxtmls_sol3,mxtmls_sol4,lcomp -+ -+ save nfrn,ifrn,mfree,kfree,pfree,lambda1,lambda2,dlambda -+ save eng_kin_fre,elrc2,virlrc2,engsic0,engsic2,cks_fre_sum -+ save virlrc_sav,volm_sav,elrc_fre,elrc_fre_sav,qchg1,qchg2 -+ save ang_fre,bnd_fre,dih_fre,inv_fre,tbp_fre,fbp_fre,qchg0 -+ save cou_fre,vdw_fre,eng_cfg_fre,elrc2_sav,elrc_sav,vlrc_fre -+ save ang_vir,bnd_vir,dih_vir,inv_vir,tbp_vir,fbp_vir,cou_vir -+ save vdw_vir,shl_vir,vir_cfg_fre,qfix_fre,virlrc2_sav -+ save ind_fre,atm_fre,ckc1,cks1,ckc2,cks2,ckc_fre_sum -+ save ebuf_exc1,ebuf_exc2,vxo_fre,vyo_fre,vzo_fre,vlrc_fre_sav -+ save weight_sav -+ -+ save ntcons_ghost,ngrp_ghost,qchg_sav,nswitch,niswitch -+ save mxtmls_exc2,mxtmls_exc3,mxtmls_exc4 -+ save cou_exc,vdw_exc,bnd_exc,ang_exc,dih_exc,en4_exc,vdw_exc_lng -+ save cou_exc_lng,shl_exc,en3_exc,inv_exc,elrc_exc,elrc_exc_sav -+ save qfix_exc,cou_exc_sic -+ -+ contains -+ -+ subroutine alloc_sol_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine for allocating solvation module arrays -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=37 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ mxtmls_sol2=((mxtmls_sol+1)*mxtmls_sol)/2 -+ mxtmls_sol3=(((mxtmls_sol+3)*mxtmls_sol+2)*mxtmls_sol)/6 -+ mxtmls_sol4=((((mxtmls_sol+6)*mxtmls_sol+11)*mxtmls_sol+6)* -+ x mxtmls_sol)/24 -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (cou_sol(mxtmls_sol2),stat=fail(1)) -+ allocate (vdw_sol(mxtmls_sol2),stat=fail(2)) -+ allocate (shl_sol(mxtmls_sol),stat=fail(3)) -+ allocate (ebuf_sol1(mxebuf_sol),stat=fail(4)) -+ allocate (cou_sol_sic(mxtmls_sol2),stat=fail(5)) -+ allocate (cks_sol_sum(mxtmls_sol),stat=fail(6)) -+ allocate (ckc_sol_sum(mxtmls_sol),stat=fail(7)) -+ allocate (bnd_sol(mxtmls_sol),stat=fail(8)) -+ allocate (ang_sol(mxtmls_sol),stat=fail(9)) -+ allocate (dih_sol(mxtmls_sol),stat=fail(10)) -+ allocate (atmolt(mxatms_sol),stat=fail(11)) -+ allocate (en3_sol(mxtmls_sol3),stat=fail(12)) -+ allocate (en4_sol(mxtmls_sol4),stat=fail(13)) -+ allocate (qfix_sol(mxtmls_sol),stat=fail(14)) -+ allocate (elrc_sol(mxtmls_sol2),stat=fail(15)) -+ allocate (elrc_sol_sav(mxtmls_sol2),stat=fail(16)) -+ allocate (ebuf_sol2(mxebuf_sol),stat=fail(23)) -+ allocate (rigid_sol(mxtmls_sol),stat=fail(24)) -+ allocate (const_sol(mxtmls_sol),stat=fail(25)) -+ allocate (degfre_sol(mxtmls_sol),stat=fail(26)) -+ allocate (degrot_sol(mxtmls_sol),stat=fail(27)) -+ allocate (natm_sol(mxtmls_sol),stat=fail(28)) -+ allocate (lstgot_sol(mxatms_sol),stat=fail(29)) -+ allocate (temp_sol(mxtmls_sol),stat=fail(30)) -+ allocate (vxo_sol(mxatms_sol),stat=fail(31)) -+ allocate (vyo_sol(mxatms_sol),stat=fail(32)) -+ allocate (vzo_sol(mxatms_sol),stat=fail(33)) -+ allocate (vdw_sol_lng(mxtmls_sol2),stat=fail(34)) -+ allocate (cou_sol_lng(mxtmls_sol2),stat=fail(35)) -+ allocate (inv_sol(mxtmls_sol),stat=fail(36)) -+ allocate (weight_sav(mxatms_fre),stat=fail(37)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1030) -+ enddo -+ -+c initialise accumulators -+ -+ lcomp(:)=.false. -+ elrc_sol(:)=0.d0 -+ cou_sol(:)=0.d0 -+ vdw_sol(:)=0.d0 -+ en3_sol(:)=0.d0 -+ en4_sol(:)=0.d0 -+ bnd_sol(:)=0.d0 -+ ang_sol(:)=0.d0 -+ dih_sol(:)=0.d0 -+ inv_sol(:)=0.d0 -+ -+ return -+ end subroutine alloc_sol_arrays -+ -+ subroutine solva_temp(idnode,mxnode,natms,keyver) -+ -+c*********************************************************************** -+c -+c dl_poly routine for solvation module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,ii,idnode,mxnode,natms,keyver -+ real(8) vvx,vvy,vvz -+ -+ temp_sol(:)=0.d0 -+ -+ do i=idnode+1,natms,mxnode -+ -+ if(keyver.eq.0)then -+ -+ vvx=0.5d0*(vxx(i)+vxo_sol(i)) -+ vvy=0.5d0*(vyy(i)+vyo_sol(i)) -+ vvz=0.5d0*(vzz(i)+vzo_sol(i)) -+ -+ else -+ -+ vvx=vxx(i) -+ vvy=vyy(i) -+ vvz=vzz(i) -+ -+ endif -+ -+ temp_sol(atmolt(i))=temp_sol(atmolt(i))+weight(i)* -+ x (vvx*vvx+vvy*vvy+vvz*vvz)/(boltz*degfre_sol(atmolt(i))) -+ -+ enddo -+ -+c global sum -+ -+ if(mxnode.gt.1)call gdsum(temp_sol,mxtmls_sol,buffer) -+ -+ return -+ end subroutine solva_temp -+ -+ subroutine alloc_free_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine to allocate free energy arrays -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w.smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (ebuf_exc1(mxebuf_fre),stat=fail(1)) -+ allocate (ckc1(mxewld_fre),stat=fail(2)) -+ allocate (cks1(mxewld_fre),stat=fail(3)) -+ allocate (ckc2(mxewld_fre),stat=fail(4)) -+ allocate (cks2(mxewld_fre),stat=fail(5)) -+ allocate (cks_fre_sum(mxtmls_fre),stat=fail(6)) -+ allocate (ckc_fre_sum(mxtmls_fre),stat=fail(7)) -+ allocate (atm_fre(mxatms_fre),stat=fail(8)) -+ allocate (ebuf_exc2(mxebuf_fre),stat=fail(9)) -+ allocate (vxo_fre(mxatms_fre),stat=fail(10)) -+ allocate (vyo_fre(mxatms_fre),stat=fail(11)) -+ allocate (vzo_fre(mxatms_fre),stat=fail(12)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1030) -+ enddo -+ -+ return -+ -+ end subroutine alloc_free_arrays -+ -+ subroutine lrcorrect_fre(lfree,volm,elrc,virlrc) -+ -+c*********************************************************************** -+c -+c dl_poly routine for free energy module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w.smith aug 2008 -+c -+c*********************************************************************** -+ -+ logical lfree -+ real(8) volm,elrc,virlrc -+ -+ elrc=elrc_sav*(volm_sav/volm) -+ elrc2=elrc2_sav*(volm_sav/volm) -+ virlrc=virlrc_sav*(volm_sav/volm) -+ virlrc2=virlrc2_sav*(volm_sav/volm) -+ if(lfree)then -+ elrc_fre=elrc_fre_sav*(volm_sav/volm) -+ vlrc_fre=vlrc_fre_sav*(volm_sav/volm) -+ endif -+ -+ end subroutine lrcorrect_fre -+ -+ subroutine free_kinetic(lfrmas,idnode,mxnode,keyver) -+ -+c*********************************************************************** -+c -+c dl_poly routine for free energy module -+c calculate kinetic energy difference between states -+c -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008: parallel version -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lfrmas -+ integer i,idnode,mxnode,keyver -+ real(8) fac -+ -+ fac=dlambda -+ eng_kin_fre=0.d0 -+ -+ if(keyver.eq.0)then -+ -+ if(lfrmas)fac=dlambda/lambda1 -+ do i=ind_fre(1)+idnode,ind_fre(2),mxnode -+ -+ eng_kin_fre=eng_kin_fre- -+ x fac*weight(i)*((vxx(i)+vxo_fre(i))**2+ -+ x (vyy(i)+vyo_fre(i))**2+(vzz(i)+vzo_fre(i))**2) -+ -+ enddo -+ -+ if(lfrmas)fac=dlambda/lambda2 -+ do i=ind_fre(3)+idnode,ind_fre(4),mxnode -+ -+ eng_kin_fre=eng_kin_fre+ -+ x fac*weight(i)*((vxx(i)+vxo_fre(i))**2+ -+ x (vyy(i)+vyo_fre(i))**2+(vzz(i)+vzo_fre(i))**2) -+ -+ enddo -+ -+ eng_kin_fre=eng_kin_fre/8.d0 -+ -+ else -+ -+ if(lfrmas)fac=dlambda/lambda1 -+ do i=ind_fre(1)+idnode,ind_fre(2),mxnode -+ -+ eng_kin_fre=eng_kin_fre-fac*weight(i)*(vxx(i)**2+ -+ x vyy(i)**2+vzz(i)**2) -+ -+ enddo -+ -+ if(lfrmas)fac=dlambda/lambda2 -+ do i=ind_fre(3)+idnode,ind_fre(4),mxnode -+ -+ eng_kin_fre=eng_kin_fre+fac*weight(i)*(vxx(i)**2+ -+ x vyy(i)**2+vzz(i)**2) -+ -+ enddo -+ -+ eng_kin_fre=eng_kin_fre/2.d0 -+ -+ endif -+ -+c global sum -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=eng_kin_fre -+ call gdsum(buffer(1),1,buffer(2)) -+ eng_kin_fre=buffer(1) -+ -+ endif -+ -+ return -+ end subroutine free_kinetic -+ -+ subroutine freegen() -+ -+c*********************************************************************** -+c -+c dl_poly routine for free energy module: select mixing scheme -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w.smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,j,fac1,fac2 -+ real(8) sigma1,sigma2,acc,arg,gss,tt,pp,a1,a2,a3,a4,a5,err -+ -+ data a1,a2,a3/0.254829592d0,-0.284496736d0,1.421413741d0/ -+ data a4,a5,pp/-1.453152027d0,1.061405429d0,0.3275911d0/ -+ -+ if(mfree.eq.1)then -+ -+c linear mixing -+ -+ lambda1=(1.d0-pfree) -+ lambda2=pfree -+ dlambda=1.d0 -+ -+ elseif(mfree.eq.2)then -+ -+c nonlinear mixing -+ -+ lambda1=(1.d0-pfree)**kfree -+ lambda2=(1.d0-(1.d0-pfree)**kfree) -+ dlambda=dble(kfree)*(1.d0-pfree)**(kfree-1) -+ -+ elseif(mfree.eq.3)then -+ -+c trigonmetric mixing -+ -+ lambda2=0.5d0*(1.d0+sin(pi*(pfree-0.5d0))) -+ lambda1=1.d0-lambda2 -+ dlambda=0.5d0*pi*cos(pi*(pfree-0.5d0)) -+ -+ elseif(mfree.eq.4)then -+ -+c error function mixing -+ -+ acc=12.d0 -+ arg=2.d0*sqrt(2.302585093*acc) -+ gss=exp(-(arg*(pfree-0.5d0))**2) -+ tt=1.d0/(1.d0+pp*arg*abs(pfree-0.5d0)) -+ err=1.d0-tt*(a1+tt*(a2+tt*(a3+tt*(a4+tt*a5))))*gss -+ lambda2=0.5d0*(1.d0+sign(err,(pfree-0.5d0))) -+ lambda1=1.d0-lambda2 -+ dlambda=gss*arg/sqrpi -+ -+ elseif(mfree.eq.5)then -+ -+c polynomial mixing -+ -+ sigma1=0.d0 -+ -+ do i=0,kfree-1 -+ -+ fac1=1 -+ fac2=1 -+ -+ do j=0,i-1 -+ -+ fac1=fac1*(kfree-1+i-j) -+ fac2=fac2*(i-j) -+ -+ enddo -+ -+ sigma1=sigma1+(dble(fac1/fac2))*pfree**i -+ -+ enddo -+ -+ lambda1=sigma1*(1.d0-pfree)**kfree -+ lambda2=1.d0-lambda1 -+ dlambda=sigma1*kfree*(1.d0-pfree)**(kfree-1) -+ -+ sigma2=0.d0 -+ -+ do i=1,kfree-1 -+ -+ fac1=1 -+ fac2=1 -+ -+ do j=0,i-1 -+ -+ fac1=fac1*(kfree-1+i-j) -+ fac2=fac2*(i-j) -+ -+ enddo -+ -+ sigma2=sigma2+(dble(fac1*i/fac2))*pfree**(i-1) -+ -+ enddo -+ -+ dlambda=dlambda-sigma2*(1.d0-pfree)**kfree -+ -+ else -+ -+c spline kernel mixing -+ -+ arg=pfree-0.5d0 -+ lambda2=2.d0*pfree-8.d0*arg**3*(1.d0-abs(arg))-0.5d0 -+ lambda1=1.d0-lambda2 -+ dlambda=2.d0+arg**2*(32.d0*abs(arg)-24.d0) -+ -+ endif -+ -+ return -+ end subroutine freegen -+ -+ subroutine free_energy_write(idnode,nstep,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing free energy file at selected -+c intervals in simulation -+c -+c copyright - daresbury laboratory -+c author - p.-a. cazade dec 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob -+ integer idnode,natms,nstep -+ real(8) engunit -+ -+ save newjob -+ data newjob/.true./ -+ -+ if(idnode.eq.0)then -+ -+c open the FREENG file if new job or file closed -+ -+ if(newjob)then -+ -+ newjob = .false. -+ open(nfrnwr,file='FREENG',position='append') -+ -+ endif -+ -+ if(nstep.eq.nfrn.or.nstep.eq.ifrn)then -+ -+ write(nfrnwr,'(80a1)')cfgname -+ -+ if(abs(engunit-9648.530821d0).le.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=electron Volts ')") -+ if(abs(engunit-418.4d0).le.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=kcal/mol ')") -+ if(abs(engunit-1.d2).le.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=kjoule/mol ')") -+ if(abs(engunit-boltz).lt.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=kelvin ')") -+ if(abs(engunit-1.d0).lt.1.d-10) write(nfrnwr, -+ x "(' ENERGY UNITS=DL_POLY Internal UNITS ')") -+ -+ write(nfrnwr,'(1p,4e16.8)')pfree,lambda1,lambda2,dlambda -+ -+ endif -+ -+ if(mod(nstep-nfrn,ifrn).eq.0)then -+ -+ write(nfrnwr,"(i10,1p,2e16.8)") -+ x nstep,eng_cfg_fre/engunit,vir_cfg_fre/engunit -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine free_energy_write -+ -+ subroutine alloc_exi_arrays(idnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine to allocate excited state arrays -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ integer, parameter :: nnn=15 -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ mxtmls_exc2=((mxtmls_exc+1)*mxtmls_exc)/2 -+ mxtmls_exc3=(((mxtmls_exc+3)*mxtmls_exc+2)*mxtmls_exc)/6 -+ mxtmls_exc4=((((mxtmls_exc+6)*mxtmls_exc+11)*mxtmls_exc+6)* -+ x mxtmls_exc)/24 -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (cou_exc(mxtmls_exc2),stat=fail(1)) -+ allocate (vdw_exc(mxtmls_exc2),stat=fail(2)) -+ allocate (bnd_exc(mxtmls_exc),stat=fail(3)) -+ allocate (ang_exc(mxtmls_exc),stat=fail(4)) -+ allocate (dih_exc(mxtmls_exc),stat=fail(5)) -+ allocate (en3_exc(mxtmls_exc3),stat=fail(6)) -+ allocate (en4_exc(mxtmls_exc4),stat=fail(7)) -+ allocate (shl_exc(mxtmls_exc),stat=fail(8)) -+ allocate (vdw_exc_lng(mxtmls_exc2),stat=fail(9)) -+ allocate (cou_exc_lng(mxtmls_exc2),stat=fail(10)) -+ allocate (inv_exc(mxtmls_exc),stat=fail(11)) -+ allocate (elrc_exc(mxtmls_exc2),stat=fail(12)) -+ allocate (elrc_exc_sav(mxtmls_exc2),stat=fail(13)) -+ allocate (qfix_exc(mxtmls_exc),stat=fail(14)) -+ allocate (cou_exc_sic(mxtmls_exc2),stat=fail(15)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1030) -+ enddo -+ -+c initialise accumulators -+ -+ bnd_exc(:)=0.d0 -+ ang_exc(:)=0.d0 -+ dih_exc(:)=0.d0 -+ inv_exc(:)=0.d0 -+ en3_exc(:)=0.d0 -+ en4_exc(:)=0.d0 -+ elrc_exc(:)=0.d0 -+ cou_exc(:)=0.d0 -+ vdw_exc(:)=0.d0 -+ -+ return -+ end subroutine alloc_exi_arrays -+ -+ subroutine update_ghost(idnode,mxnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine for excited state module -+c update the positions of ghost atoms -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,ii,idnode,mxnode -+ -+ if(ind_fre(1).lt.ind_fre(3))then -+ -+ ii=ind_fre(3) -+ -+ do i=ind_fre(1),ind_fre(2) -+ -+ xxx(ii)=xxx(i) -+ yyy(ii)=yyy(i) -+ zzz(ii)=zzz(i) -+ -+ ii=ii+1 -+ -+ enddo -+ -+ else -+ -+ ii=ind_fre(1) -+ -+ do i=ind_fre(3),ind_fre(4) -+ -+ xxx(ii)=xxx(i) -+ yyy(ii)=yyy(i) -+ zzz(ii)=zzz(i) -+ -+ ii=ii+1 -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine update_ghost -+ -+ subroutine copy_force(idnode,mxnode) -+ -+c*********************************************************************** -+c -+c dl_poly routine for excited state module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer i,ii,idnode,mxnode -+ -+ ii=ind_fre(3) -+ -+ do i=ind_fre(1),ind_fre(2) -+ -+ fxx(ii)=fxx(i) -+ fyy(ii)=fyy(i) -+ fzz(ii)=fzz(i) -+ -+ ii=ii+1 -+ -+ enddo -+ -+ return -+ end subroutine copy_force -+ -+ subroutine switch(elrc,virlrc) -+c*********************************************************************** -+c -+c dl_poly routine for switching system in excitation simulation -+c copyright - daresbury laboratory -+c author - w. smith sep 2008 -+c adapted from p.-a. cazade oct 2007 -+c -+c*********************************************************************** -+ -+ real(8) :: swap,elrc,virlrc -+ real(8), allocatable :: cou_sic_swp(:),qfix_swp(:) -+ real(8), allocatable :: elrc_swp(:) -+ -+ allocate(cou_sic_swp(mxtmls_exc2),qfix_swp(mxtmls_exc)) -+ allocate(elrc_swp(mxtmls_exc2)) -+ -+ swap=elrc -+ elrc=elrc2 -+ elrc2=swap -+ -+ swap=engsic0 -+ engsic0=engsic2 -+ engsic2=swap -+ -+ swap=virlrc -+ virlrc=virlrc2 -+ virlrc2=swap -+ -+ swap=elrc_sav -+ elrc_sav=elrc2_sav -+ elrc2_sav=swap -+ -+ swap=virlrc_sav -+ virlrc_sav=virlrc2_sav -+ virlrc2_sav=swap -+ -+ swap=qchg0 -+ qchg0=qchg2 -+ qchg2=swap -+ -+ cou_sic_swp(:)=cou_sol_sic(:) -+ cou_sol_sic(:)=cou_exc_sic(:) -+ cou_exc_sic(:)=cou_sic_swp(:) -+ -+ qfix_swp(:)=qfix_sol(:) -+ qfix_sol(:)=qfix_exc(:) -+ qfix_exc(:)=qfix_swp(:) -+ -+ elrc_swp(:)=elrc_sol(:) -+ elrc_sol(:)=elrc_exc(:) -+ elrc_exc(:)=elrc_swp(:) -+ -+ elrc_swp(:)=elrc_sol_sav(:) -+ elrc_sol_sav(:)=elrc_exc_sav(:) -+ elrc_exc_sav(:)=elrc_swp(:) -+ -+ deallocate(elrc_swp,cou_sic_swp,qfix_swp) -+ -+ return -+ -+ end subroutine switch -+ -+ subroutine lrcorrect_sol(lghost,volm) -+ -+c*********************************************************************** -+c -+c dl_poly routine for excited state module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ logical :: lghost -+ real(8) :: volm -+ -+ elrc_sol(:)=elrc_sol_sav(:)*(volm_sav/volm) -+ if(lghost)elrc_exc(:)=elrc_exc_sav(:)*(volm_sav/volm) -+ -+ return -+ end subroutine lrcorrect_sol -+ -+ subroutine switch_atm(lfrmas) -+ -+c*********************************************************************** -+c -+c dl_poly routine for excitation module -+c copyright - daresbury laboratory -+c author - p.-a. cazade oct 2007 -+c adapted - w.smith aug 2008 -+c -+c*********************************************************************** -+ -+ logical lfrmas -+ integer i,at1_swap,at2_swap -+ -+ at1_swap=ind_fre(1) -+ at2_swap=ind_fre(2) -+ ind_fre(1)=ind_fre(3) -+ ind_fre(2)=ind_fre(4) -+ ind_fre(3)=at1_swap -+ ind_fre(4)=at2_swap -+ -+ if(lfrmas)then -+ -+ do i=ind_fre(1),ind_fre(2) -+ -+ atm_fre(i)=1 -+ weight(i)=lambda1*weight_sav(i) -+ -+ enddo -+ -+ do i=ind_fre(3),ind_fre(4) -+ -+ atm_fre(i)=2 -+ weight(i)=lambda2*weight_sav(i) -+ -+ enddo -+ -+ else -+ -+ do i=ind_fre(1),ind_fre(2) -+ atm_fre(i)=1 -+ enddo -+ -+ do i=ind_fre(3),ind_fre(4) -+ atm_fre(i)=2 -+ enddo -+ -+ endif -+ -+ return -+ end subroutine switch_atm -+ -+ subroutine solvation_write -+ x (lexcite,lswitch,idnode,natms,nstep,nsolva,isolva, -+ x tstep,engunit,elrc) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing solva file at selected -+c intervals in simulation -+c -+c copyright - daresbury laboratory -+c author - p.-a. cazade jun 2007 -+c adapted - w. smith aug 2008 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob,lexcite,lswitch -+ integer idnode,natms,nstep,nsolva,isolva,i,j,k -+ integer mxtmls2,mxtmls3,mxtmls4 -+ real(8) tstep,engunit,elrc -+ character*80 aa,bb,cc,dd -+ -+ save newjob -+ data newjob/.true./ -+ -+ mxtmls2=((mxtmls+1)*mxtmls)/2 -+ mxtmls3=(((mxtmls+3)*mxtmls+2)*mxtmls)/6 -+ mxtmls4=((((mxtmls+6)*mxtmls+11)*mxtmls+6)*mxtmls)/24 -+ -+ if(idnode.eq.0)then -+ -+c open the SOLVAT file if new job or file closed -+ -+ if(newjob)then -+ -+ newjob=.false. -+ open(nsolwr,file='SOLVAT',position='append') -+ -+ endif -+ -+c write file header block -+ -+ if(nstep.eq.nsolva.or.nstep.eq.isolva)then -+ -+ write(nsolwr,'(80a1)')cfgname -+ -+ if(abs(engunit-9648.530821d0).le.1.d-10)write(nsolwr, -+ x "('ENERGY UNITS=electron Volts ')") -+ if(abs(engunit-418.4d0).le.1.d-10) write(nsolwr, -+ x "('ENERGY UNITS=kcal/mol ')") -+ if(abs(engunit-1.d2).le.1.d-10) write(nsolwr, -+ x "('ENERGY UNITS=kjoule/mol ')") -+ if(abs(engunit-boltz).lt.1.d-10) write(nsolwr, -+ x "('ENERGY UNITS=kelvin ')") -+ if(abs(engunit-1.d0).lt.1.d-10) write(nsolwr, -+ x "('ENERGY UNITS=DL_POLY Internal UNITS ')") -+ -+ write(nsolwr,'(2i10)')natms,mxtmls -+ write(nsolwr,'(1x,11a4)')' lex','lsw',' bnd',' ang', -+ x ' dih',' inv',' shl',' cou',' vdw',' 3bd',' 4bd' -+ write(nsolwr,'(11l4)')lexcite,lswitch,lcomp -+ -+ endif -+ -+c write out periodic data -+ -+ if(mod(nstep-nsolva,isolva).eq.0)then -+ -+c mark start of time step data -+ -+ if(lexcite)then -+ write(nsolwr,'("timestep",i10,f12.5,1p,2e14.6)') -+ x nstep,tstep,elrc/engunit,elrc2/engunit -+ else -+ write(nsolwr,'("timestep",i10,f12.5,1p,e14.6)') -+ x nstep,tstep,elrc/engunit -+ endif -+ -+c write intramolecular data -+ -+ write(nsolwr,'(1p,5e14.6)')temp_sol -+ if(lcomp(1))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')bnd_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')bnd_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')bnd_sol(:)/engunit -+ endif -+ endif -+ if(lcomp(2))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')ang_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')ang_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')ang_sol(:)/engunit -+ endif -+ endif -+ if(lcomp(3))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')dih_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')dih_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')dih_sol(:)/engunit -+ endif -+ endif -+ if(lcomp(4))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')inv_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')inv_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')inv_sol(:)/engunit -+ endif -+ endif -+ -+c write core-shell data -+ -+ if(lcomp(5))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')shl_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')shl_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')shl_sol(:)/engunit -+ endif -+ endif -+ -+c write coulombic data -+ -+ if(lcomp(6))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')cou_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')cou_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')cou_sol(:)/engunit -+ endif -+ endif -+ -+c write vdw data -+ -+ if(lcomp(7))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')vdw_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')vdw_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')vdw_sol(:)/engunit -+ endif -+ endif -+ -+c write 3-body data -+ -+ if(lcomp(8))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')en3_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')en3_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')en3_sol(:)/engunit -+ endif -+ endif -+ -+c write 4-body data -+ -+ if(lcomp(9))then -+ if(lexcite)then -+ write(nsolwr,'(1p,5e14.6)')en4_sol(:)/engunit -+ write(nsolwr,'(1p,5e14.6)')en4_exc(:)/engunit -+ else -+ write(nsolwr,'(1p,5e14.6)')en4_sol(:)/engunit -+ endif -+ endif -+ -+ endif -+ -+c close SOLVAT file at regular intervals -+ -+ if(.not.newjob.and.mod(nstep,ndump).eq.0)then -+ -+ close(nsolwr) -+ newjob=.true. -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine solvation_write -+ -+ end module solvation_module -diff -urN dl_class_1.9.orig/srcmod/spme_module.f dl_class_1.9/srcmod/spme_module.f ---- dl_class_1.9.orig/srcmod/spme_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/spme_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1175 @@ -+ module spme_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining spme arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use setup_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: csp(:),qqc(:,:,:),ffttable(:) -+ real(8), allocatable :: bspx(:,:), bspy(:,:), bspz(:,:) -+ real(8), allocatable :: bsdx(:,:), bsdy(:,:), bsdz(:,:) -+ integer, allocatable :: key1(:),key2(:),key3(:) -+ complex(8), allocatable :: ww1(:), ww2(:), ww3(:) -+ complex(8), allocatable :: qqq(:,:,:) -+ complex(8), allocatable :: bscx(:), bscy(:),bscz(:) -+CFFTW pointer, save :: fplan, bplan -+ -+ save csp,qqc,qqq,ww1,ww2,ww3,bscx,bscy,bscz,ffttable -+ save bspx,bspy,bspz,bsdx,bsdy,bsdz,key1,key2,key3 -+ -+ contains -+ -+ subroutine alloc_spme_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=9 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate (csp(mxspl),ffttable(mxftab),stat=fail(1)) -+ allocate (bspx(mxspme,mxspl),bspy(mxspme,mxspl),stat=fail(2)) -+ allocate (bspz(mxspme,mxspl),bsdx(mxspme,mxspl),stat=fail(3)) -+ allocate (bsdy(mxspme,mxspl),bsdz(mxspme,mxspl),stat=fail(4)) -+ allocate (bscx(kmaxd),bscy(kmaxe),bscz(kmaxf),stat=fail(5)) -+ allocate (key1(kmaxd),key2(kmaxe),key3(kmaxf),stat=fail(6)) -+ allocate (ww1(kmaxd),ww2(kmaxe),ww3(kmaxf),stat=fail(7)) -+ allocate (qqc(kmaxd,kmaxe,kmaxf),stat=fail(8)) -+ allocate (qqq(kmaxd,kmaxe,kmaxf),stat=fail(9)) -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1750) -+ enddo -+ -+ end subroutine alloc_spme_arrays -+ -+ subroutine bspcoe(nospl,kmax1,kmax2,kmax3) -+ -+c********************************************************************** -+c -+c dl_poly subroutine to calculate B-spline coefficients for -+c Euler exponential splines. -+c -+c copyright - daresbury laboratory 1998 -+c author - w. smith july 1998 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nospl,kmax1,kmax2,kmax3,k,i,j -+ complex(8) ccc -+ -+c calculate B-splines at knots -+ -+ csp(1)=0.d0 -+ csp(2)=1.d0 -+ -+ do k=3,nospl -+ -+ csp(k)=0.d0 -+ -+ do j=k,2,-1 -+ -+ csp(j)=(dble(j-1)*csp(j)+dble(k-j+1)*csp(j-1))/dble(k-1) -+ -+ enddo -+ -+ enddo -+ -+c calculate B-spline coefficients -+ -+ do i=0,kmax1-1 -+ -+ ccc=(0.d0,0.d0) -+ -+ do k=0,nospl-2 -+ -+ ccc=ccc+csp(k+2)*ww1(mod(i*k,kmax1)+1) -+ -+ enddo -+ -+ bscx(i+1)=ww1(mod(i*(nospl-1),kmax1)+1)/ccc -+ -+ enddo -+ -+ do i=0,kmax2-1 -+ -+ ccc=(0.d0,0.d0) -+ -+ do k=0,nospl-2 -+ -+ ccc=ccc+csp(k+2)*ww2(mod(i*k,kmax2)+1) -+ -+ enddo -+ -+ bscy(i+1)=ww2(mod(i*(nospl-1),kmax2)+1)/ccc -+ -+ enddo -+ -+ do i=0,kmax3-1 -+ -+ ccc=(0.d0,0.d0) -+ -+ do k=0,nospl-2 -+ -+ ccc=ccc+csp(k+2)*ww3(mod(i*k,kmax3)+1) -+ -+ enddo -+ -+ bscz(i+1)=ww3(mod(i*(nospl-1),kmax3)+1)/ccc -+ -+ enddo -+ -+ return -+ end subroutine bspcoe -+ -+ subroutine bspgen(idnode,mxnode,natms,nospl,txx,tyy,tzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to calculate B-splines for SPME method -+c -+c copyright - daresbury laboratory 1998 -+c author - w. smith july 1998 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer nospl,natms,idnode,mxnode,iatm0,iatm1,i,j,k -+ real(8) aaa,bbb,ccc,txx,tyy,tzz -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ -+c set up atoms numbers for nodes -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c construct B-splines -+ -+ do i=iatm0,iatm1 -+ -+ bsdx(i,1)=1.d0 -+ bsdy(i,1)=1.d0 -+ bsdz(i,1)=1.d0 -+ bsdx(i,2)=-1.d0 -+ bsdy(i,2)=-1.d0 -+ bsdz(i,2)=-1.d0 -+ bspx(i,1)=txx(i)-int(txx(i)) -+ bspy(i,1)=tyy(i)-int(tyy(i)) -+ bspz(i,1)=tzz(i)-int(tzz(i)) -+ bspx(i,2)=1.d0-txx(i)+int(txx(i)) -+ bspy(i,2)=1.d0-tyy(i)+int(tyy(i)) -+ bspz(i,2)=1.d0-tzz(i)+int(tzz(i)) -+ -+ enddo -+ -+ do k=3,nospl -+ -+ do i=iatm0,iatm1 -+ -+ bspx(i,k)=0.d0 -+ bspy(i,k)=0.d0 -+ bspz(i,k)=0.d0 -+ -+ enddo -+ -+ do j=k,2,-1 -+ -+ if(k.eq.nospl)then -+ -+ do i=iatm0,iatm1 -+ -+ bsdx(i,j)=bspx(i,j)-bspx(i,j-1) -+ bsdy(i,j)=bspy(i,j)-bspy(i,j-1) -+ bsdz(i,j)=bspz(i,j)-bspz(i,j-1) -+ -+ enddo -+ -+ endif -+ -+ do i=iatm0,iatm1 -+ -+ aaa=txx(i)+dble(j-1)-int(txx(i)) -+ bbb=tyy(i)+dble(j-1)-int(tyy(i)) -+ ccc=tzz(i)+dble(j-1)-int(tzz(i)) -+ bspx(i,j)=(aaa*bspx(i,j)+(dble(k)-aaa)*bspx(i,j-1))/ -+ x dble(k-1) -+ bspy(i,j)=(bbb*bspy(i,j)+(dble(k)-bbb)*bspy(i,j-1))/ -+ x dble(k-1) -+ bspz(i,j)=(ccc*bspz(i,j)+(dble(k)-ccc)*bspz(i,j-1))/ -+ x dble(k-1) -+ -+ enddo -+ -+ enddo -+ -+ if(k.eq.nospl)then -+ -+ do i=iatm0,iatm1 -+ -+ bsdx(i,1)=bspx(i,1) -+ bsdy(i,1)=bspy(i,1) -+ bsdz(i,1)=bspz(i,1) -+ -+ enddo -+ -+ endif -+ -+ do i=iatm0,iatm1 -+ -+ bspx(i,1)=(txx(i)-int(txx(i)))*bspx(i,1)/dble(k-1) -+ bspy(i,1)=(tyy(i)-int(tyy(i)))*bspy(i,1)/dble(k-1) -+ bspz(i,1)=(tzz(i)-int(tzz(i)))*bspz(i,1)/dble(k-1) -+ -+ enddo -+ -+ enddo -+ -+ return -+ end subroutine bspgen -+ -+ subroutine ewald_spme -+ x (idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl, -+ x engcpe,vircpe,alpha,volm,epsq) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces in a -+c periodic system using the smoothed particle mesh ewald method -+c due to Essmann et al J. Chem. Phys. 103 (1995) 8577. -+c -+c parallel replicated data version (part 1) -+c -+c copyright - daresbury laboratory 1998 -+c author - w. smith july 1998 -+c additional FFT code - j. geronowicz sept 1999 -+c -+c part 1 - reciprocal space terms (fourier part) -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical newjob,lconsw -+ -+ integer idnode,mxnode,natms,imcon,kmax1,kmax2,kmax3,nospl -+ integer npass,i,nnn,ipass,l,ll,k,kk,j,jj,fail,iatm0,iatm1 -+ real(8) engcpe,vircpe,alpha,volm,epsq,omg,bb1,bb2,bb3,qchg -+ real(8) twopi,engsic,rvolm,ralph,shiftx,shifty,shiftz,det,qfix -+ real(8) tx,ty,tz,rcpcut,rcpct2,rkx1,rky1,rkz1,rkx2,rky2,rkz2 -+ real(8) rkx3,rky3,rkz3,rksq,akv,eng1,den,scal1,tmp,rclprp -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+CESSL integer inc2,inc3 -+CSGIC real(8) nauxfft(4) -+ -+ dimension omg(9),rclprp(10) -+ complex(8) cpetot,vterm -+ save newjob,engsic,qchg,iatm0,iatm1 -+ -+ data newjob/.true./,fail/0/ -+CSGIC data nauxfft/3,0,0,0/ -+ -+c allocate temporary arrays -+ -+ allocate (txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1760) -+ -+ npass=1 -+ lconsw=.true. -+ twopi=2.d0*pi -+ -+ if(newjob)then -+ -+ newjob=.false. -+ -+c set up atoms numbers for nodes -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c calculate self interaction correction and net system charge -+ -+ qchg=0.d0 -+ engsic=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ qchg=qchg+chge(i) -+ engsic=engsic+chge(i)**2 -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=qchg -+ buffer(2)=engsic -+ call gdsum(buffer(1),2,buffer(3)) -+ qchg =buffer(1) -+ engsic=buffer(2) -+ -+ endif -+ -+ engsic=-r4pie0/epsq*alpha*engsic/sqrpi -+ -+c initialise the complex exponential arrays -+ -+CCRAY call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) -+CESSL call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) -+CFFTW call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) -+CSGIC call spl_cexp(kmax1,kmax2,kmax3,ww1,ww2,ww3) -+ -+c initialise the default fft routine -+ -+ call dlpfft3(1,1,kmax1,kmax2,kmax3,key1,key2,key3, -+ x ww1,ww2,ww3,qqq) -+ -+c calculate B-spline coefficients -+ -+ call bspcoe(nospl,kmax1,kmax2,kmax3) -+ -+ endif -+ -+c initialise coulombic potential energy -+ -+ engcpe=0.d0 -+ vircpe=0.d0 -+ -+c initalize stress tensor working arrays -+ -+ do i = 1,9 -+ omg(i) = 0.d0 -+ enddo -+ -+c set working parameters -+ -+ rvolm=twopi/volm -+ ralph=-0.25d0/alpha**2 -+ -+c set switch for TO, RD and HP boundary conditions -+ -+ if(imcon.eq.4.or.imcon.eq.5.or.imcon.eq.7) then -+ -+ npass=2 -+ lconsw=.false. -+ rvolm=0.5d0*rvolm -+ shiftx=0.5d0*dble(kmax1) -+ shifty=0.5d0*dble(kmax2) -+ shiftz=0.5d0*dble(kmax3) -+ if(imcon.eq.7)shiftz=0.d0 -+ -+ endif -+ -+c convert cell coordinates to fractional coordinates -+ -+ call invert(cell,rcell,det) -+ if(abs(det).lt.1.d-6)call error(idnode,120) -+ -+ do i=iatm0,iatm1 -+ -+ txx(i)=dble(kmax1)*(rcell(1)*xxx(i)+rcell(4)*yyy(i)+ -+ x rcell(7)*zzz(i)+0.5d0) -+ tyy(i)=dble(kmax2)*(rcell(2)*xxx(i)+rcell(5)*yyy(i)+ -+ x rcell(8)*zzz(i)+0.5d0) -+ tzz(i)=dble(kmax3)*(rcell(3)*xxx(i)+rcell(6)*yyy(i)+ -+ x rcell(9)*zzz(i)+0.5d0) -+ -+ enddo -+ -+c construct B-splines for atoms -+ -+ call bspgen(idnode,mxnode,natms,nospl,txx,tyy,tzz) -+ -+c zero 3D charge array -+ -+ nnn=kmaxd*kmaxe*kmaxf -+ call set_block(nnn,0.d0,qqc) -+ -+c construct 3D charge array -+ -+ do ipass=1,npass -+ -+ do i=iatm0,iatm1 -+ -+ do l=1,nospl -+ -+ ll=int(tzz(i))-l+2 -+ if(ll.gt.kmax3)ll=1 -+ if(ll.lt.1)ll=ll+kmax3 -+ do k=1,nospl -+ -+ kk=int(tyy(i))-k+2 -+ if(kk.gt.kmax2)kk=1 -+ if(kk.lt.1)kk=kk+kmax2 -+ -+ do j=1,nospl -+ -+ jj=int(txx(i))-j+2 -+ if(jj.gt.kmax1)jj=1 -+ if(jj.lt.1)jj=jj+kmax1 -+ -+ qqc(jj,kk,ll)=qqc(jj,kk,ll)+ -+ x chge(i)*bspx(i,j)*bspy(i,k)*bspz(i,l) -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ if(.not.lconsw)then -+ -+ do i=iatm0,iatm1 -+ -+ tx=txx(i)-shiftx -+ ty=tyy(i)-shifty -+ tz=tzz(i)-shiftz -+ txx(i)=txx(i)-sign(shiftx,tx) -+ tyy(i)=tyy(i)-sign(shifty,ty) -+ tzz(i)=tzz(i)-sign(shiftz,tz) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c global sum of charge array -+ -+ if(mxnode.gt.1) call gdsum(qqc,nnn,buffer) -+ -+c load charge array into complex array for FFT -+ -+ call cpy_rtc(nnn,qqc,qqq) -+ -+c calculate inverse 3D FFT of charge array (in place). -+ -+CFFTW call fftwnd_f77_one(fplan,qqq,0) -+ -+CESSL inc2=kmaxd -+CESSL inc3=kmaxd*kmaxe -+CESSL call dcft3(qqq,inc2,inc3,qqq,inc2,inc3,kmax1,kmax2,kmax3, -+CESSL x -1,1.d0,buffer,mxbuff) -+ -+CSGIC call zzfft3d( -1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, -+CSGIC x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) -+ -+CCRAY call ccfft3d( -1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, -+CCRAY x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) -+ -+ call dlpfft3(0,1,kmax1,kmax2,kmax3,key1,key2,key3, -+ x ww1,ww2,ww3,qqq) -+ -+c set reciprocal space cutoff -+ -+ call dcell(rcell,rclprp) -+ -+ rcpcut=0.5d0*min(dble(kmax1)*rclprp(7),dble(kmax2)*rclprp(8), -+ x dble(kmax3)*rclprp(9)) -+ rcpcut=rcpcut*1.05d0*twopi -+ rcpct2=rcpcut**2 -+ -+c calculate convolution of charge array with gaussian function -+ -+ do l=1,kmax3 -+ -+ ll=l-1 -+ if(l.gt.kmax3/2)ll=l-kmax3-1 -+ tmp=twopi*dble(ll) -+ rkx1=tmp*rcell(3) -+ rky1=tmp*rcell(6) -+ rkz1=tmp*rcell(9) -+ bb3=real(bscz(l)*conjg(bscz(l))) -+ -+ do k=1,kmax2 -+ -+ kk=k-1 -+ if(k.gt.kmax2/2)kk=k-kmax2-1 -+ tmp=twopi*dble(kk) -+ rkx2=rkx1+tmp*rcell(2) -+ rky2=rky1+tmp*rcell(5) -+ rkz2=rkz1+tmp*rcell(8) -+ bb2=bb3*real(bscy(k)*conjg(bscy(k))) -+ -+ do j=1,kmax1 -+ -+ jj=j-1 -+ if(j.gt.kmax1/2)jj=j-kmax1-1 -+ tmp=twopi*dble(jj) -+ rkx3=rkx2+tmp*rcell(1) -+ rky3=rky2+tmp*rcell(4) -+ rkz3=rkz2+tmp*rcell(7) -+ bb1=bb2*real(bscx(j)*conjg(bscx(j))) -+ -+ rksq=rkx3*rkx3+rky3*rky3+rkz3*rkz3 -+ -+ if(rksq.gt.1.d-6.and.rksq.le.rcpct2)then -+ -+ vterm=bb1*exp(ralph*rksq)/rksq*qqq(j,k,l) -+ akv=2.d0*(1.d0/rksq-ralph)*real(vterm*conjg(qqq(j,k,l))) -+ omg(1)=omg(1)-rkx3*rkx3*akv -+ omg(5)=omg(5)-rky3*rky3*akv -+ omg(9)=omg(9)-rkz3*rkz3*akv -+ omg(2)=omg(2)-rkx3*rky3*akv -+ omg(3)=omg(3)-rkx3*rkz3*akv -+ omg(6)=omg(6)-rky3*rkz3*akv -+ qqq(j,k,l)=vterm -+ -+ else -+ -+ qqq(j,k,l)=(0.d0,0.d0) -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+CFFTW call fftwnd_f77_one(bplan,qqq,0) -+CESSL call dcft3(qqq,inc2,inc3,qqq,inc2,inc3,kmax1,kmax2,kmax3, -+CESSL x 1,1.d0,buffer,mxbuff) -+ -+CSGIC call zzfft3d( 1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, -+CSGIC x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) -+ -+CCRAY call ccfft3d( 1,kmax1,kmax2,kmax3,1.d0,qqq,kmaxd,kmaxe, -+CCRAY x qqq,kmaxd,kmaxe,ffttable,buffer,nauxfft ) -+ -+ call dlpfft3(0,-1,kmax1,kmax2,kmax3,key1,key2,key3, -+ x ww1,ww2,ww3,qqq) -+ -+c calculate atomic forces -+ -+ call spme_for -+ x (idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,rvolm, -+ x epsq,txx,tyy,tzz) -+ -+c complete product of charge array and its gaussian convolution -+ -+ call ele_prd(nnn,qqq,qqc,qqq) -+ -+c correction for charged systems -+ -+ qfix=-(0.5d0*pi*r4pie0/epsq)*((qchg/alpha)**2/volm)/ -+ x dble(mxnode) -+ -+c calculate total energy -+ -+ call scl_csum(nnn,cpetot,qqq) -+ -+ eng1=real(cpetot) -+ den=1.d0/dble(npass) -+ engcpe=engcpe+(den*rvolm*r4pie0*eng1/epsq+engsic)/ -+ x dble(mxnode)+qfix -+ -+c calculate stress tensor (symmetrical) -+ -+ scal1=den*rvolm*r4pie0/(epsq*dble(mxnode)) -+ stress(1) = stress(1)+scal1*(omg(1)+eng1)+qfix -+ stress(2) = stress(2)+scal1*omg(2) -+ stress(3) = stress(3)+scal1*omg(3) -+ stress(4) = stress(4)+scal1*omg(2) -+ stress(5) = stress(5)+scal1*(omg(5)+eng1)+qfix -+ stress(6) = stress(6)+scal1*omg(6) -+ stress(7) = stress(7)+scal1*omg(3) -+ stress(8) = stress(8)+scal1*omg(6) -+ stress(9) = stress(9)+scal1*(omg(9)+eng1)+qfix -+ -+c virial term -+ -+ vircpe=vircpe-scal1*(omg(1)+omg(5)+omg(9)+3.d0*eng1)-3.d0*qfix -+ -+c deallocate temporary arrays -+ -+ deallocate (txx,tyy,tzz,stat=fail) -+ -+ return -+ end subroutine ewald_spme -+ -+ subroutine spme_for -+ x (idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,rvolm, -+ x epsq,txx,tyy,tzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating coulombic forces in a -+c periodic system using smoothed particle mesh ewald method -+c -+c parallel replicated data version (part 1) -+c -+c copyright - daresbury laboratory 1998 -+c author - w. smith oct 1998 -+c -+c part 1 - reciprocal space terms (fourier part) -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,nospl,natms,kmax1,kmax2,kmax3,i,ll -+ integer iatm0,iatm1,kk,k,j,jj,l -+ real(8) rvolm,epsq,txx,tyy,tzz,fff,fac,bdx,bdy,bdz -+ real(8) det,qsum -+ -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension fff(3) -+ -+ fac=-2.d0*rvolm*r4pie0/epsq -+ call invert(cell,rcell,det) -+ -+c set up atom numbers for nodes -+ -+ iatm0 = (idnode*natms)/mxnode + 1 -+ iatm1 = ((idnode+1)*natms)/mxnode -+ -+c calculate forces -+ -+ do i=iatm0,iatm1 -+ -+ fxx(i)=0.d0 -+ fyy(i)=0.d0 -+ fzz(i)=0.d0 -+ -+ do l=1,nospl -+ -+ ll=int(tzz(i))-l+2 -+ if(ll.gt.kmax3)ll=1 -+ if(ll.lt.1)ll=ll+kmax3 -+ -+ do k=1,nospl -+ -+ kk=int(tyy(i))-k+2 -+ if(kk.gt.kmax2)kk=1 -+ if(kk.lt.1)kk=kk+kmax2 -+ -+ do j=1,nospl -+ -+ jj=int(txx(i))-j+2 -+ if(jj.gt.kmax1)jj=1 -+ if(jj.lt.1)jj=jj+kmax1 -+ -+ qsum=real(qqq(jj,kk,ll)) -+ bdx=qsum*bsdx(i,j)*bspy(i,k)*bspz(i,l)*dble(kmax1) -+ bdy=qsum*bspx(i,j)*bsdy(i,k)*bspz(i,l)*dble(kmax2) -+ bdz=qsum*bspx(i,j)*bspy(i,k)*bsdz(i,l)*dble(kmax3) -+ -+ fxx(i)=fxx(i)+fac*chge(i)*(bdx*rcell(1)+bdy*rcell(2)+ -+ x bdz*rcell(3)) -+ fyy(i)=fyy(i)+fac*chge(i)*(bdx*rcell(4)+bdy*rcell(5)+ -+ x bdz*rcell(6)) -+ fzz(i)=fzz(i)+fac*chge(i)*(bdx*rcell(7)+bdy*rcell(8)+ -+ x bdz*rcell(9)) -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+ enddo -+ -+c remove COM drift arising from SPME approximations -+ -+ fff(1)=0.d0 -+ fff(2)=0.d0 -+ fff(3)=0.d0 -+ -+ do i=iatm0,iatm1 -+ -+ fff(1)=fff(1)+fxx(i) -+ fff(2)=fff(2)+fyy(i) -+ fff(3)=fff(3)+fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)call gdsum(fff,3,buffer) -+ -+ fff(1)=fff(1)/dble(natms) -+ fff(2)=fff(2)/dble(natms) -+ fff(3)=fff(3)/dble(natms) -+ -+ do i=iatm0,iatm1 -+ -+ fxx(i)=fxx(i)-fff(1) -+ fyy(i)=fyy(i)-fff(2) -+ fzz(i)=fzz(i)-fff(3) -+ -+ enddo -+ -+ return -+ end subroutine spme_for -+ -+ subroutine dlpfft3 -+ x (ind,isw,ndiv1,ndiv2,ndiv3,key1,key2,key3,ww1,ww2,ww3,aaa) -+ -+c*********************************************************************** -+c -+c dl-poly 3D fast fourier transform routine (in place) -+c -+c copyright daresbury laboratory 1998 -+c author w smith july 1998 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lkx,lky,lkz -+ integer ind,isw,ndiv1,ndiv2,ndiv3,key1,key2,key3,i,idm,kkk -+ integer nu1,nu2,nu3,iii,jjj,j,jj2,num,l,kk1,k12,k -+ real(8) tpi,arg -+ -+ dimension key1(ndiv1),key2(ndiv2),key3(ndiv3) -+ complex(8) ww1(ndiv1),ww2(ndiv2),ww3(ndiv3) -+ complex(8) ttt,aaa(ndiv1,ndiv2,ndiv3) -+ save nu1,nu2,nu3 -+ -+ data tpi/6.283185307179586d0/ -+ -+ if(ind.gt.0)then -+ -+c check FFT array dimensions -+ -+ idm=1 -+ lkx=.true. -+ lky=.true. -+ lkz=.true. -+ -+ do i=1,30 -+ -+ idm=2*idm -+ -+ if(idm.eq.ndiv1)then -+ -+ lkx=.false. -+ nu1=i -+ -+ endif -+ if(idm.eq.ndiv2)then -+ -+ lky=.false. -+ nu2=i -+ -+ endif -+ if(idm.eq.ndiv3)then -+ -+ lkz=.false. -+ nu3=i -+ -+ endif -+ -+ enddo -+ -+ if(lkx.or.lky.or.lkz)then -+ -+ write(*,*)'error - FFT array not 2**N' -+ stop -+ -+ endif -+ -+c set reverse bit address arrays -+ -+ do kkk=1,ndiv1 -+ -+ iii=0 -+ jjj=kkk-1 -+ -+ do j=1,nu1 -+ -+ jj2=jjj/2 -+ iii=2*(iii-jj2)+jjj -+ jjj=jj2 -+ -+ enddo -+ -+ key1(kkk)=iii+1 -+ -+ enddo -+ -+ do kkk=1,ndiv2 -+ -+ iii=0 -+ jjj=kkk-1 -+ -+ do j=1,nu2 -+ -+ jj2=jjj/2 -+ iii=2*(iii-jj2)+jjj -+ jjj=jj2 -+ -+ enddo -+ -+ key2(kkk)=iii+1 -+ -+ enddo -+ -+ do kkk=1,ndiv3 -+ -+ iii=0 -+ jjj=kkk-1 -+ -+ do j=1,nu3 -+ -+ jj2=jjj/2 -+ iii=2*(iii-jj2)+jjj -+ jjj=jj2 -+ -+ enddo -+ -+ key3(kkk)=iii+1 -+ -+ enddo -+ -+c initialise complex exponential factors -+ -+ ww1(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv1/2 -+ -+ arg=(tpi/dble(ndiv1))*dble(i) -+ ww1(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww1(ndiv1+1-i)=conjg(ww1(i+1)) -+ -+ enddo -+ -+ ww2(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv2/2 -+ -+ arg=(tpi/dble(ndiv2))*dble(i) -+ ww2(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww2(ndiv2+1-i)=conjg(ww2(i+1)) -+ -+ enddo -+ -+ ww3(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv3/2 -+ -+ arg=(tpi/dble(ndiv3))*dble(i) -+ ww3(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww3(ndiv3+1-i)=conjg(ww3(i+1)) -+ -+ enddo -+ -+ return -+ -+ endif -+ -+c take conjugate of exponentials if required -+ -+ if(isw.lt.0)then -+ -+ do i=1,ndiv1 -+ -+ ww1(i)=conjg(ww1(i)) -+ -+ enddo -+ -+ do i=1,ndiv2 -+ -+ ww2(i)=conjg(ww2(i)) -+ -+ enddo -+ -+ do i=1,ndiv3 -+ -+ ww3(i)=conjg(ww3(i)) -+ -+ enddo -+ -+ endif -+ -+c perform fourier transform in X direction -+ -+ kkk=0 -+ num=ndiv1/2 -+ -+ do l=1,nu1 -+ -+ do while(kkk.lt.ndiv1) -+ -+ do i=1,num -+ -+ iii=key1(kkk/num+1) -+ kk1=kkk+1 -+ k12=kk1+num -+ -+ do j=1,ndiv2 -+ -+ do k=1,ndiv3 -+ -+ ttt=aaa(k12,j,k)*ww1(iii) -+ aaa(k12,j,k)=aaa(kk1,j,k)-ttt -+ aaa(kk1,j,k)=aaa(kk1,j,k)+ttt -+ -+ enddo -+ -+ enddo -+ -+ kkk=kkk+1 -+ -+ enddo -+ -+ kkk=kkk+num -+ -+ enddo -+ -+ kkk=0 -+ num=num/2 -+ -+ enddo -+ -+c unscramble the fft using bit address array -+ -+ do kkk=1,ndiv1 -+ -+ iii=key1(kkk) -+ -+ if(iii.gt.kkk)then -+ -+ do j=1,ndiv2 -+ -+ do k=1,ndiv3 -+ -+ ttt=aaa(kkk,j,k) -+ aaa(kkk,j,k)=aaa(iii,j,k) -+ aaa(iii,j,k)=ttt -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c perform fourier transform in Y direction -+ -+ kkk=0 -+ num=ndiv2/2 -+ -+ do l=1,nu2 -+ -+ do while(kkk.lt.ndiv2) -+ -+ do i=1,num -+ -+ iii=key2(kkk/num+1) -+ kk1=kkk+1 -+ k12=kk1+num -+ -+ do j=1,ndiv1 -+ -+ do k=1,ndiv3 -+ -+ ttt=aaa(j,k12,k)*ww2(iii) -+ aaa(j,k12,k)=aaa(j,kk1,k)-ttt -+ aaa(j,kk1,k)=aaa(j,kk1,k)+ttt -+ -+ enddo -+ -+ enddo -+ -+ kkk=kkk+1 -+ -+ enddo -+ -+ kkk=kkk+num -+ -+ enddo -+ -+ kkk=0 -+ num=num/2 -+ -+ enddo -+ -+c unscramble the fft using bit address array -+ -+ do kkk=1,ndiv2 -+ -+ iii=key2(kkk) -+ -+ if(iii.gt.kkk)then -+ -+ do j=1,ndiv1 -+ -+ do k=1,ndiv3 -+ -+ ttt=aaa(j,kkk,k) -+ aaa(j,kkk,k)=aaa(j,iii,k) -+ aaa(j,iii,k)=ttt -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c perform fourier transform in Z direction -+ -+ kkk=0 -+ num=ndiv3/2 -+ -+ do l=1,nu3 -+ -+ do while(kkk.lt.ndiv3) -+ -+ do i=1,num -+ -+ iii=key3(kkk/num+1) -+ kk1=kkk+1 -+ k12=kk1+num -+ -+ do j=1,ndiv1 -+ -+ do k=1,ndiv2 -+ -+ ttt=aaa(j,k,k12)*ww3(iii) -+ aaa(j,k,k12)=aaa(j,k,kk1)-ttt -+ aaa(j,k,kk1)=aaa(j,k,kk1)+ttt -+ -+ enddo -+ -+ enddo -+ -+ kkk=kkk+1 -+ -+ enddo -+ -+ kkk=kkk+num -+ -+ enddo -+ -+ kkk=0 -+ num=num/2 -+ -+ enddo -+ -+c unscramble the fft using bit address array -+ -+ do kkk=1,ndiv3 -+ -+ iii=key3(kkk) -+ -+ if(iii.gt.kkk)then -+ -+ do j=1,ndiv1 -+ -+ do k=1,ndiv2 -+ -+ ttt=aaa(j,k,kkk) -+ aaa(j,k,kkk)=aaa(j,k,iii) -+ aaa(j,k,iii)=ttt -+ -+ enddo -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c restore exponentials to unconjugated values if necessary -+ -+ if(isw.lt.0)then -+ -+ do i=1,ndiv1 -+ -+ ww1(i)=conjg(ww1(i)) -+ -+ enddo -+ -+ do i=1,ndiv2 -+ -+ ww2(i)=conjg(ww2(i)) -+ -+ enddo -+ -+ do i=1,ndiv3 -+ -+ ww3(i)=conjg(ww3(i)) -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine dlpfft3 -+ -+ subroutine spl_cexp(ndiv1,ndiv2,ndiv3,ww1,ww2,ww3) -+ -+c*********************************************************************** -+c -+c dl-poly routine to create complex exponential arrays for -+c b-splines -+c -+c copyright daresbury laboratory 1998 -+c author w smith oct 1998 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer ndiv1,ndiv2,ndiv3,i -+ real(8) tpi,arg -+ complex(8) ww1(ndiv1),ww2(ndiv2),ww3(ndiv3) -+ -+ data tpi/6.283185307179586d0/ -+ -+c initialise complex exponential factors -+ -+ ww1(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv1/2 -+ -+ arg=(tpi/dble(ndiv1))*dble(i) -+ ww1(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww1(ndiv1+1-i)=conjg(ww1(i+1)) -+ -+ enddo -+ -+ ww2(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv2/2 -+ -+ arg=(tpi/dble(ndiv2))*dble(i) -+ ww2(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww2(ndiv2+1-i)=conjg(ww2(i+1)) -+ -+ enddo -+ -+ ww3(1)=(1.d0,0.d0) -+ -+ do i=1,ndiv3/2 -+ -+ arg=(tpi/dble(ndiv3))*dble(i) -+ ww3(i+1)=cmplx(cos(arg),sin(arg),kind=8) -+ ww3(ndiv3+1-i)=conjg(ww3(i+1)) -+ -+ enddo -+ -+ return -+ end subroutine spl_cexp -+ -+ end module spme_module -diff -urN dl_class_1.9.orig/srcmod/temp_scalers_module.f dl_class_1.9/srcmod/temp_scalers_module.f ---- dl_class_1.9.orig/srcmod/temp_scalers_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/temp_scalers_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,768 @@ -+ module temp_scalers_module -+ -+c*********************************************************************** -+c -+c dl_poly module for temperature scaling routines -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ use config_module -+ use core_shell_module -+ use error_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use utility_module -+ -+ contains -+ -+ subroutine quench(imcon,idnode,mxnode,natms,nscons,tolnce) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for quenching the bond energies in the -+c initial structure of a molecule defined by constraints -+c -+c copyright - daresbury laboratory 1992 -+c author w.smith november 1992 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical safe -+ integer imcon,idnode,mxnode,natms,nscons,i,j,k,icyc -+ integer fail -+ real(8) tolnce,ddd,esig,vvv,ww1,ww2 -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: uxx(:),uyy(:),uzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+ dimension fail(3) -+ -+ data fail/0,0,0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate (uxx(mxatms),uyy(mxatms),uzz(mxatms),stat=fail(2)) -+ allocate (dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(3)) -+ -+ do i=1,3 -+ if(fail(i).ne.0)call error(idnode,1770) -+ enddo -+ -+c calculate bond vectors -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c normalise bond vectors -+ -+ do k=1,nscons -+ -+ ddd=sqrt(dxt(k)**2+dyt(k)**2+dzt(k)**2) -+ -+ dxt(k)=dxt(k)/ddd -+ dyt(k)=dyt(k)/ddd -+ dzt(k)=dzt(k)/ddd -+ -+ enddo -+ -+c start of quenching cycle -+ -+ icyc=0 -+ safe=.false. -+ do while(.not.safe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c initialise velocity correction arrays -+ -+ do i=1,natms -+ -+ uxx(i)=0.d0 -+ uyy(i)=0.d0 -+ uzz(i)=0.d0 -+ -+ enddo -+ -+c calculate velocity corrections and error -+ -+ esig=0.d0 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ vvv=dxt(k)*(vxx(i)-vxx(j))+dyt(k)*(vyy(i)-vyy(j))+ -+ x dzt(k)*(vzz(i)-vzz(j)) -+ -+ esig=max(esig,abs(vvv)) -+ -+ ww1=weight(j)*vvv/(weight(i)+weight(j)) -+ ww2=weight(i)*vvv/(weight(i)+weight(j)) -+ uxx(i)=uxx(i)-ww1*dxt(k) -+ uyy(i)=uyy(i)-ww1*dyt(k) -+ uzz(i)=uzz(i)-ww1*dzt(k) -+ uxx(j)=uxx(j)+ww2*dxt(k) -+ uyy(j)=uyy(j)+ww2*dyt(k) -+ uzz(j)=uzz(j)+ww2*dzt(k) -+ -+ enddo -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+ if(.not.safe)then -+ -+c transport velocity adjustments to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ call shmove -+ x (idnode,mxnode,natms,lashap,lishap,uxx,uyy,uzz, -+ x xxt,yyt,zzt,buffer) -+ -+ endif -+ -+c update velocities -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ vxx(i)=vxx(i)+uxx(i)/dble(listme(i)) -+ vyy(i)=vyy(i)+uyy(i)/dble(listme(i)) -+ vzz(i)=vzz(i)+uzz(i)/dble(listme(i)) -+ vxx(j)=vxx(j)+uxx(j)/dble(listme(j)) -+ vyy(j)=vyy(j)+uyy(j)/dble(listme(j)) -+ vzz(j)=vzz(j)+uzz(j)/dble(listme(j)) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c error exit if quenching fails -+ -+ if(.not.safe)call error(idnode,70) -+ -+c splice velocity arrays across nodes -+ -+ if(mxnode.gt.1) call splice -+ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail(1)) -+ deallocate (uxx,uyy,uzz,stat=fail(2)) -+ deallocate (dxt,dyt,dzt,stat=fail(3)) -+ -+ return -+ end subroutine quench -+ -+ subroutine quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to convert atomic velocities to rigid body -+c c.o.m. and angular velocity -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1993. -+c author - t.forester nov 1993. -+c amended - t.forester dec 1994 : block data. -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,mxnode,natms,ngrp,fail,ig,jr,id -+ integer igrp1,igrp2,i,j -+ real(8) rot,wxx,wyy,wzz -+ -+ dimension rot(9) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ -+ data fail/0/ -+ -+c allocate work arrays -+ -+ allocate (xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail) -+ if(fail.ne.0)call error(idnode,1780) -+ -+c block indices for groups -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c translate atomic velocites to com velocity & angular velocity -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ gvxx(ig)=0.d0 -+ gvyy(ig)=0.d0 -+ gvzz(ig)=0.d0 -+ omx(ig)=0.d0 -+ omy(ig)=0.d0 -+ omz(ig)=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr =jr+1 -+ i =lstrgd(jr) -+ -+c centre of mass momentum -+ -+ gvxx(ig)=gvxx(ig)+weight(i)*vxx(i) -+ gvyy(ig)=gvyy(ig)+weight(i)*vyy(i) -+ gvzz(ig)=gvzz(ig)+weight(i)*vzz(i) -+ -+c distance to c.o.m of molecule -+ -+ xxt(jr)=xxx(i)-gcmx(ig) -+ yyt(jr)=yyy(i)-gcmy(ig) -+ zzt(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+c centre of mass velocity -+ -+ gvxx(ig)=gvxx(ig)/gmass(id) -+ gvyy(ig)=gvyy(ig)/gmass(id) -+ gvzz(ig)=gvzz(ig)/gmass(id) -+ -+ enddo -+ -+ call images(imcon,0,1,jr,cell,xxt,yyt,zzt) -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c rotational matrix -+ -+ rot(1)=q0(ig)**2+q1(ig)**2-q2(ig)**2-q3(ig)**2 -+ rot(2)=2.d0*(q1(ig)*q2(ig)-q0(ig)*q3(ig)) -+ rot(3)=2.d0*(q1(ig)*q3(ig)+q0(ig)*q2(ig)) -+ rot(4)=2.d0*(q1(ig)*q2(ig)+q0(ig)*q3(ig)) -+ rot(5)=q0(ig)**2-q1(ig)**2+q2(ig)**2-q3(ig)**2 -+ rot(6)=2.d0*(q2(ig)*q3(ig)-q0(ig)*q1(ig)) -+ rot(7)=2.d0*(q1(ig)*q3(ig)-q0(ig)*q2(ig)) -+ rot(8)=2.d0*(q2(ig)*q3(ig)+q0(ig)*q1(ig)) -+ rot(9)=q0(ig)**2-q1(ig)**2-q2(ig)**2+q3(ig)**2 -+ -+c angular momentum accumulators -+ -+ wxx=0.d0 -+ wyy=0.d0 -+ wzz=0.d0 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr =jr+1 -+ i =lstrgd(jr) -+ -+ wxx=wxx+weight(i)*(yyt(jr)*vzz(i)-zzt(jr)*vyy(i)) -+ wyy=wyy+weight(i)*(zzt(jr)*vxx(i)-xxt(jr)*vzz(i)) -+ wzz=wzz+weight(i)*(xxt(jr)*vyy(i)-yyt(jr)*vxx(i)) -+ -+ enddo -+ -+c angular velocity in body fixed frame -+ -+ omx(ig)=(rot(1)*wxx+rot(4)*wyy+rot(7)*wzz)*rotinx(id,2) -+ omy(ig)=(rot(2)*wxx+rot(5)*wyy+rot(8)*wzz)*rotiny(id,2) -+ omz(ig)=(rot(3)*wxx+rot(6)*wyy+rot(9)*wzz)*rotinz(id,2) -+ -+ jr=jr-numgsit(id) -+ do j=1,numgsit(id) -+ -+ jr=jr +1 -+ i=lstrgd(jr) -+ -+c site velocity in body frame -+ -+ wxx=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ wyy=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ wzz=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*wxx+rot(2)*wyy+rot(3)*wzz+gvxx(ig) -+ vyy(i)=rot(4)*wxx+rot(5)*wyy+rot(6)*wzz+gvyy(ig) -+ vzz(i)=rot(7)*wxx+rot(8)*wyy+rot(9)*wzz+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,omx,omy,omz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c deallocate work arrays -+ -+ deallocate (xxt,yyt,zzt,stat=fail) -+ -+ return -+ end subroutine quatqnch -+ -+ subroutine vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for scaling the velocity arrays to the -+c desired temperature -+c -+c zeroes angular momentum in non-periodic system. -+c -+c parallel replicated data version : block data -+c -+c copyright daresbury laboratory 1992. -+c author - w.smith july 1992 -+c amended - t.forester oct 1993 -+c amended - t.forester dec 1994 : block data -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,imcon,natms,ngrp,iatm1,iatm2,i -+ real(8) sigma,roti,rotinv,cmx,cmy,cmz,cmvx,cmvy,cmvz,sysmas -+ real(8) amx,amy,amz,det,scale,rsq,wxx,wyy,wzz,sumke -+ -+ dimension roti(9),rotinv(9) -+ -+c block indices -+ -+ iatm1=(idnode*natms)/mxnode+1 -+ iatm2=((idnode+1)*natms)/mxnode -+ -+c calculate centre of mass position and motion of the system -+ -+ cmx=0.d0 -+ cmy=0.d0 -+ cmz=0.d0 -+ cmvx=0.d0 -+ cmvy=0.d0 -+ cmvz=0.d0 -+ sysmas=0.d0 -+ -+ do i=iatm1,iatm2 -+ -+ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then -+ -+ cmx=cmx+weight(i)*xxx(i) -+ cmy=cmy+weight(i)*yyy(i) -+ cmz=cmz+weight(i)*zzz(i) -+ sysmas=sysmas+weight(i) -+ cmvx=cmvx+vxx(i)*weight(i) -+ cmvy=cmvy+vyy(i)*weight(i) -+ cmvz=cmvz+vzz(i)*weight(i) -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ buffer(8)=sysmas -+ buffer(9)=cmx -+ buffer(10)=cmy -+ buffer(11)=cmz -+ buffer(12)=cmvx -+ buffer(13)=cmvy -+ buffer(14)=cmvz -+ call gdsum(buffer(8),7,buffer(1)) -+ sysmas= buffer(8) -+ cmx=buffer(9) -+ cmy=buffer(10) -+ cmz=buffer(11) -+ cmvx=buffer(12) -+ cmvy=buffer(13) -+ cmvz=buffer(14) -+ endif -+ -+ cmx=cmx/sysmas -+ cmy=cmy/sysmas -+ cmz=cmz/sysmas -+ -+ cmvx=cmvx/sysmas -+ cmvy=cmvy/sysmas -+ cmvz=cmvz/sysmas -+ -+c remove centre of mass motion -+ -+ do i=1,natms -+ -+ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then -+ -+ vxx(i)=vxx(i)-cmvx -+ vyy(i)=vyy(i)-cmvy -+ vzz(i)=vzz(i)-cmvz -+ -+ else -+ -+ vxx(i)=0.d0 -+ vyy(i)=0.d0 -+ vzz(i)=0.d0 -+ -+ endif -+ -+ enddo -+ -+c zero angular momentum about centre of mass - non-periodic system -+ -+ if(imcon.eq.0)then -+ -+c move to centre of mass origin -+ -+ do i=1,natms -+ -+ xxx(i)=xxx(i)-cmx -+ yyy(i)=yyy(i)-cmy -+ zzz(i)=zzz(i)-cmz -+ -+ enddo -+ -+c angular momentum accumulators -+ -+ amx=0.d0 -+ amy=0.d0 -+ amz=0.d0 -+ -+c rotational inertia accumulators -+ -+ do i=1,9 -+ roti(i)=0.d0 -+ enddo -+ -+ do i=iatm1,iatm2 -+ -+ amx=amx+weight(i)*(yyy(i)*vzz(i)-zzz(i)*vyy(i)) -+ amy=amy+weight(i)*(zzz(i)*vxx(i)-xxx(i)*vzz(i)) -+ amz=amz+weight(i)*(xxx(i)*vyy(i)-yyy(i)*vxx(i)) -+ -+ rsq=xxx(i)**2+yyy(i)**2+zzz(i)**2 -+ roti(1)=roti(1)+weight(i)*(xxx(i)*xxx(i)-rsq) -+ roti(2)=roti(2)+weight(i)* xxx(i)*yyy(i) -+ roti(3)=roti(3)+weight(i)* xxx(i)*zzz(i) -+ roti(5)=roti(5)+weight(i)*(yyy(i)*yyy(i)-rsq) -+ roti(6)=roti(6)+weight(i)* yyy(i)*zzz(i) -+ roti(9)=roti(9)+weight(i)*(zzz(i)*zzz(i)-rsq) -+ -+ enddo -+ -+c complete rotational inertia matrix -+ -+ roti(4)=roti(2) -+ roti(7)=roti(3) -+ roti(8)=roti(6) -+ -+c global sum -+ -+ if(mxnode.gt.1)then -+ buffer(13)=amx -+ buffer(14)=amy -+ buffer(15)=amz -+ do i=1,9 -+ buffer(15+i)=roti(i) -+ enddo -+ call gdsum(buffer(13),12,buffer(1)) -+ amx=buffer(13) -+ amy=buffer(14) -+ amz=buffer(15) -+ do i=1,9 -+ roti(i)=buffer(15+i) -+ enddo -+ endif -+ -+c invert rotational inertia matrix -+ -+ call invert (roti,rotinv,det) -+ -+c correction to angular velocity -+ -+ wxx=rotinv(1)*amx+rotinv(2)*amy+rotinv(3)*amz -+ wyy=rotinv(4)*amx+rotinv(5)*amy+rotinv(6)*amz -+ wzz=rotinv(7)*amx+rotinv(8)*amy+rotinv(9)*amz -+ -+c correction to linear velocity -+ -+ do i=1,natms -+ -+ if(lstfrz(i).eq.0.and.weight(i).gt.1.d-6)then -+ -+ vxx(i)=vxx(i)+(wyy*zzz(i)-wzz*yyy(i)) -+ vyy(i)=vyy(i)+(wzz*xxx(i)-wxx*zzz(i)) -+ vzz(i)=vzz(i)+(wxx*yyy(i)-wyy*xxx(i)) -+ -+ endif -+ -+ enddo -+ -+c reset positions to original reference frame -+ -+ do i=1,natms -+ -+ xxx(i)=xxx(i)+cmx -+ yyy(i)=yyy(i)+cmy -+ zzz(i)=zzz(i)+cmz -+ -+ enddo -+ -+ endif -+ -+c calculate temperature -+ -+ sumke=0.d0 -+ -+ do i=iatm1,iatm2 -+ -+ sumke=sumke+weight(i)* -+ x (vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ -+ enddo -+ -+ sumke=0.5d0*sumke -+ if(mxnode.gt.1)then -+ buffer(1)=sumke -+ call gdsum(buffer(1),1,buffer(2)) -+ sumke=buffer(1) -+ endif -+ -+c apply temperature scaling -+ -+ scale=1.d0 -+ if(sumke.gt.1.d-6)scale=sqrt(sigma/sumke) -+ -+ do i=1,natms -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+ if(ngrp.gt.0)then -+ call quatqnch(idnode,imcon,mxnode,natms,ngrp) -+ -+ endif -+ -+ return -+ end subroutine vscaleg -+ -+ subroutine shlqnch(idnode,mxnode,ntshl,temp) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for quenching the internal bond energies -+c in ions defined by shell model -+c -+c copyright - daresbury laboratory 1994 -+c author w.smith july 1994 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ integer idnode,mxnode,ntshl,ishl1,ishl2,i,j,k,m -+ real(8) temp,pke,rmu,dvx,dvy,dvz,tmx,tmy,tmz,scl -+ -+c permitted core-shell internal kinetic energy -+ -+ pke=boltz*temp*1.d-4 -+ -+c block indices -+ -+ ishl1 = (idnode*ntshl)/mxnode+1 -+ ishl2 = ((idnode+1)*ntshl)/mxnode -+ -+c calculate core and shell velocities from total momentum -+ -+ m=0 -+ do k=ishl1,ishl2 -+ -+ m=m+1 -+ -+ i=listshl(m,2) -+ j=listshl(m,3) -+ -+ rmu=(weight(i)*weight(j))/(weight(i)+weight(j)) -+ -+ if(rmu.gt.0.d0)then -+ -+ dvx=vxx(j)-vxx(i) -+ dvy=vyy(j)-vyy(i) -+ dvz=vzz(j)-vzz(i) -+ -+ scl=sqrt(pke/(rmu*(dvx*dvx+dvy*dvy+dvz*dvz))) -+ -+ tmx=weight(i)*vxx(i)+weight(j)*vxx(j) -+ tmy=weight(i)*vyy(i)+weight(j)*vyy(j) -+ tmz=weight(i)*vzz(i)+weight(j)*vzz(j) -+ -+ vxx(i)=tmx/(weight(i)+weight(j))-scl*rmu*dvx/weight(i) -+ vxx(j)=tmx/(weight(i)+weight(j))+scl*rmu*dvx/weight(j) -+ vyy(i)=tmy/(weight(i)+weight(j))-scl*rmu*dvy/weight(i) -+ vyy(j)=tmy/(weight(i)+weight(j))+scl*rmu*dvy/weight(j) -+ vzz(i)=tmz/(weight(i)+weight(j))-scl*rmu*dvz/weight(i) -+ vzz(j)=tmz/(weight(i)+weight(j))+scl*rmu*dvz/weight(j) -+ -+ endif -+ -+ enddo -+ -+ if(mxnode.gt.1) call shlmerge(idnode,mxnode,ntshl) -+ -+ return -+ end subroutine shlqnch -+ -+ subroutine regauss -+ x (idnode,imcon,mxnode,natms,ngrp,nscons,ntcons, -+ x ntshl,keyshl,sigma,temp,tolnce) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for resetting the system velocities -+c -+c copyright - daresbury laboratory -+c author - w. smith may 2007 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,imcon,mxnode,natms,ngrp,nscons -+ integer ntcons,ntshl,i,k,keyshl -+ real(8) temp,tolnce,sigma,rsq -+ -+c set atomic velocities from gaussian distribution -+ -+ call gauss(natms,vxx,vyy,vzz) -+ -+ do i=1,natms -+ -+ rsq=sqrt(rmass(i)) -+ vxx(i)=vxx(i)*rsq -+ vyy(i)=vyy(i)*rsq -+ vzz(i)=vzz(i)*rsq -+ -+ enddo -+ -+ if(ntcons.gt.0)call quench -+ x (imcon,idnode,mxnode,natms,nscons,tolnce) -+ -+ if(ngrp.gt.0)call quatqnch -+ x (idnode,imcon,mxnode,natms,ngrp) -+ -+ if(keyshl.eq.1)then -+ -+ do k=1,4 -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ call shlqnch(idnode,mxnode,ntshl,temp) -+ -+ enddo -+ -+ else -+ -+ call vscaleg(idnode,mxnode,imcon,natms,ngrp,sigma) -+ -+ endif -+ -+ return -+ end subroutine regauss -+ -+ subroutine impact(khit,natms,idnode,mxnode,ehit,xhit,yhit,zhit) -+ -+c********************************************************************* -+c -+c DLPOLY routinue for impacting a selected atom with a specified -+c recoil energy -+c -+c copyright daresbury laboratory -+c author w.smith september 2007 -+c -+c********************************************************************* -+ -+ use config_module -+ use ensemble_tools_module -+ -+ implicit none -+ -+ integer i,khit,natms,idnode,mxnode,iatm0,iatm1 -+ real(8) ehit,vxo,vyo,vzo,xhit,yhit,zhit,fac,smass,vel -+ -+c store original particle velocity -+ -+ vxo=vxx(khit) -+ vyo=vyy(khit) -+ vzo=vzz(khit) -+ -+c determine recoil velocity -+ -+ vel=sqrt(2.d0*ehit/(weight(khit)*(xhit**2+yhit**2+zhit**2))) -+ -+c reassign particle velocity -+ -+ vxx(khit)=vel*xhit -+ vyy(khit)=vel*yhit -+ vzz(khit)=vel*zhit -+ -+c determine system mass -+ -+ smass=getmass(natms,idnode,mxnode) -+ -+c calculate net system velocity -+ -+ vxo=(vxx(khit)-vxo)*weight(khit)/smass -+ vyo=(vyy(khit)-vyo)*weight(khit)/smass -+ vzo=(vzz(khit)-vzo)*weight(khit)/smass -+ -+c reset system net velocity to zero -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vxo -+ vyy(i)=vyy(i)-vyo -+ vzz(i)=vzz(i)-vzo -+ -+ enddo -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ return -+ end subroutine impact -+ -+ end module temp_scalers_module -diff -urN dl_class_1.9.orig/srcmod/tersoff_module.f dl_class_1.9/srcmod/tersoff_module.f ---- dl_class_1.9.orig/srcmod/tersoff_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/tersoff_module.f 2011-04-16 16:13:06.000000000 +0200 -@@ -0,0 +1,1011 @@ -+ module tersoff_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining tersoff potential arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith dec 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use parse_module -+ use setup_module -+ use site_module -+ use utility_module -+ -+ implicit none -+ -+ logical, allocatable :: filter(:) -+ integer, allocatable :: lstter(:),ltpter(:),lattsf(:) -+ real(8), allocatable :: prmter(:,:),prmter2(:,:) -+ real(8), allocatable :: vmbp(:,:,:),gmbp(:,:,:) -+ real(8), allocatable :: xtf(:),ytf(:),ztf(:),rtf(:) -+ real(8), allocatable :: ert(:),eat(:),grt(:),gat(:) -+ real(8), allocatable :: scr(:),gcr(:),gam(:),gvr(:) -+ -+ save xtf,ytf,ztf,rtf,ert,eat,grt,gat,scr,gcr,gam,filter -+ save prmter,prmter2,lstter,ltpter,lattsf,vmbp,gmbp -+ -+ contains -+ -+ subroutine alloc_ter_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=20 -+ -+ integer i,fail,idnode,npairs -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ npairs=(mxter*(mxter+1))/2 -+ allocate (prmter(mxter,mxpter),stat=fail(1)) -+ allocate (prmter2(2,npairs),stat=fail(2)) -+ allocate (lstter(mxter),stat=fail(3)) -+ allocate (ltpter(mxter),stat=fail(4)) -+ allocate (lattsf(mxatms),stat=fail(5)) -+ allocate (xtf(mxatms),stat=fail(6)) -+ allocate (ytf(mxatms),stat=fail(7)) -+ allocate (ztf(mxatms),stat=fail(8)) -+ allocate (rtf(mxatms),stat=fail(9)) -+ allocate (ert(mxatms),stat=fail(10)) -+ allocate (eat(mxatms),stat=fail(11)) -+ allocate (grt(mxatms),stat=fail(12)) -+ allocate (gat(mxatms),stat=fail(13)) -+ allocate (scr(mxatms),stat=fail(14)) -+ allocate (gcr(mxatms),stat=fail(15)) -+ allocate (gam(mxatms),stat=fail(16)) -+ allocate (gvr(mxatms),stat=fail(17)) -+ allocate (vmbp(mxgrid,npairs,3),stat=fail(18)) -+ allocate (gmbp(mxgrid,npairs,3),stat=fail(19)) -+ allocate (filter(mxsite),stat=fail(20)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1945) -+ enddo -+ -+ end subroutine alloc_ter_arrays -+ -+ subroutine define_tersoff -+ x (safe,lunits,lmols,idnode,ntpter,ntpatm,rctter,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining tersoff potentials -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits,lmols -+ character*8 keyword -+ character*8 atom0,atom1 -+ character*1 message(80) -+ integer fail,idnode,ntpter,ntpatm,i,idum,j,itpter -+ integer keypot,jtpatm,k,katm0,katm1,icross,npairs,ktyp -+ real(8) rctter,engunit -+ real(8), allocatable :: parpot(:) -+ data fail/0/ -+ -+ allocate (parpot(mxpter),stat=fail) -+ if(fail.ne.0)call error(idnode,1955) -+ -+ ntpter=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'number of specified tersoff ', -+ x 'atom potentials',i10)") ntpter -+ write(nrite,"(/,/,16x,'atom ',3x,' key',30x, -+ x 'parameters'/,/)") -+ -+ endif -+ if(ntpter.gt.mxter) call error(idnode,88) -+ if(.not.lunits) call error(idnode,6) -+ if(.not.lmols) call error(idnode,13) -+ -+ rctter=0.d0 -+ -+ do i=1,mxter -+ lstter(i)=-1 -+ enddo -+ -+ do i=1,mxsite -+ filter(i)=.false. -+ enddo -+ -+ k=0 -+ do i=1,mxter -+ do j=1,i -+ -+ k=k+1 -+ prmter2(1,k)=0.d0 -+ prmter2(2,k)=0.d0 -+ -+ enddo -+ enddo -+ -+ do itpter=1,ntpter -+ -+ do i=1,mxpter -+ parpot(i)=0.d0 -+ enddo -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call copystring(record,message,80) -+ call getword(atom0,record,8,lenrec) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'ters') then -+ -+ keypot=1 -+ -+ else -+ -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,1972) -+ -+ endif -+ -+ parpot(1)=dblstr(record,lenrec,idum) ! A_i -+ parpot(2)=dblstr(record,lenrec,idum) ! a_i -+ parpot(3)=dblstr(record,lenrec,idum) ! B_i -+ parpot(4)=dblstr(record,lenrec,idum) ! b_i -+ parpot(5)=dblstr(record,lenrec,idum) ! R_i -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ parpot(6)=dblstr(record,lenrec,idum) ! S_i -+ parpot(7)=dblstr(record,lenrec,idum) ! beta_i -+ parpot(8)=dblstr(record,lenrec,idum) ! eta_i -+ parpot(9)=dblstr(record,lenrec,idum) ! c_i -+ parpot(10)=dblstr(record,lenrec,idum) ! d_i -+ parpot(11)=dblstr(record,lenrec,idum) ! h_i -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(16x,a8,2x,a4,2x,1p,5e13.5)") -+ x atom0,keyword(1:4),(parpot(j),j=1,5) -+ write(nrite,"(32x,1p,5e13.5)")(parpot(j),j=6,mxpter) -+ -+ endif -+ -+ katm0=0 -+ -+ do jtpatm=1,ntpatm -+ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm -+ enddo -+ -+ if(katm0.eq.0)call error(idnode,92) -+ -+ filter(katm0)=.true. -+ -+c convert parameters to internal units -+ -+ if(keypot.eq.1)then -+ -+ parpot(1)=parpot(1)*engunit -+ parpot(3)=parpot(3)*engunit -+ -+ endif -+ if(lstter(katm0).gt.-1) call error(idnode,21) -+ lstter(katm0)=itpter -+ ltpter(itpter)=keypot -+ -+c calculate max tersoff cutoff -+ -+ rctter=max(rctter,parpot(6)) -+ -+c store tersoff single atom potential parameters -+ -+ do i=1,mxpter -+ prmter(itpter,i)=parpot(i) -+ enddo -+ -+ enddo -+ -+ if(rctter.lt.1.d-6)call error(idnode,1953) -+ -+c start processing double atom potential parameters -+ -+ npairs=(ntpter*(ntpter+1))/2 -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,"(/,/,1x,'number of tersoff ', -+ x 'cross terms',i10)") npairs -+ write(nrite,"(/,/,16x,'atom ','atom ',10x, -+ x 'parameters'/,/)") -+ -+ endif -+ -+ do icross=1,npairs -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+ call getword(atom0,record,8,lenrec) -+ call getword(atom1,record,8,lenrec) -+ -+ parpot(1)=dblstr(record,lenrec,idum) ! chi_ij -+ parpot(2)=dblstr(record,lenrec,idum) ! omega_ij -+ -+ katm0=0 -+ katm1=0 -+ -+ do jtpatm=1,ntpatm -+ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ enddo -+ -+ if(katm0.eq.0.or.katm1.eq.0)call error(idnode,92) -+ -+ filter(katm0)=.true. -+ filter(katm1)=.true. -+ -+ ktyp=loc2(lstter(katm0),lstter(katm1)) -+ prmter2(1,ktyp)=parpot(1) -+ prmter2(2,ktyp)=parpot(2) -+ -+ if(idnode.eq.0)write(nrite,"(16x,a8,a8,1p,2e13.5)") -+ x atom0,atom1,(parpot(j),j=1,2) -+ -+ enddo -+ -+c generate tersoff interpolation arrays -+ -+ call tergen(ntpatm,rctter) -+ -+ return -+ end subroutine define_tersoff -+ -+ subroutine tergen(ntpatm,rctter) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for generating potential energy and -+c force arrays for tersoff forces only -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w. smith dec 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer ntpatm,katm0,katm1,ipt,jpt,kpt,i -+ real(8) dlrpot,rctter,baij,saij,bbij,sbij,rij,sij,att,arg -+ real(8) rrr,rep -+ -+c define grid resolution for potential arrays -+ -+ dlrpot=rctter/dble(mxgrid-4) -+ -+c construct arrays for all types of short ranged potential -+ -+ do katm0=1,ntpatm -+ -+ if(filter(katm0))then -+ -+ ipt=lstter(katm0) -+ -+ do katm1=1,katm0 -+ -+ if(filter(katm1))then -+ -+ jpt=lstter(katm1) -+ -+ if((ltpter(ipt).eq.1).and.(ltpter(jpt).eq.1))then -+ -+ kpt=loc2(ipt,jpt) -+ -+c define tersoff parameters -+ -+ baij=sqrt(prmter(ipt,1)*prmter(jpt,1)) -+ saij=0.5d0*(prmter(ipt,2)+prmter(jpt,2)) -+ bbij=sqrt(prmter(ipt,3)*prmter(jpt,3)) -+ sbij=0.5d0*(prmter(ipt,4)+prmter(jpt,4)) -+ rij=sqrt(prmter(ipt,5)*prmter(jpt,5)) -+ sij=sqrt(prmter(ipt,6)*prmter(jpt,6)) -+ -+c store potential cutoff -+ -+ vmbp(1,kpt,1)=sij -+ -+c calculate screening function -+ -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ -+ if(rrr.le.rij)then -+ -+ vmbp(i,kpt,1)=1.d0 -+ gmbp(i,kpt,1)=0.d0 -+ -+ else -+ -+ arg=pi*(rrr-rij)/(sij-rij) -+ vmbp(i,kpt,1)=0.5d0*(1.d0+cos(arg)) -+ gmbp(i,kpt,1)=0.5d0*pi*rrr*sin(arg)/(sij-rij) -+ -+ endif -+ -+ enddo -+ -+c calculate screened repulsion function -+ -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ -+ rep=baij*exp(-saij*rrr) -+ vmbp(i,kpt,2)=rep*vmbp(i,kpt,1) -+ gmbp(i,kpt,2)=rep*(gmbp(i,kpt,1)+ -+ x saij*rrr*vmbp(i,kpt,1)) -+ -+ enddo -+ -+c calculate screened attraction function -+ -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ -+ att=bbij*exp(-sbij*rrr) -+ vmbp(i,kpt,3)=att*vmbp(i,kpt,1) -+ gmbp(i,kpt,3)=att*(gmbp(i,kpt,1)+ -+ x sbij*rrr*vmbp(i,kpt,1)) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine tergen -+ -+ subroutine tersoff -+ x (idnode,mxnode,natms,imcon,rctter,engter,virter) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating potential and forces -+c due to a tersoff potential -+c -+c Note: the subroutine converts coordinates to reduced units -+c to avoid a call to images.f. The link cell algorithm used -+c here necessitates a parallelepiped, cubic or orthorhombic -+c cell geometry -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w.smith dec 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer idnode,mxnode,natms,imcon,nix,niy,niz,i,j,nbx -+ integer nby,nbz,ncells,l,ix,iy,iz,k,icell,kk,jx,jy,jz,jcell,iter -+ integer limit,ii,iatm -+ real(8) rctter,engter,virter,xm,ym,zm,det,cprp -+ real(8) xdc,ydc,zdc,sxx,syy,szz,strs -+ -+ dimension nix(27),niy(27),niz(27),cprp(10),strs(6) -+ -+ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, -+ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ -+ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, -+ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ -+ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ -+ -+c flag for undefined potentials -+ -+ safe=.true. -+ -+c initialise potential energy and virial -+ -+ engter=0.d0 -+ virter=0.d0 -+ -+c create mock cell vectors for non-periodic system -+ -+ if(imcon.eq.0) then -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ -+ do i=1,natms -+ -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ -+ enddo -+ -+ cell(1)=2.d0*xm+rctter -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(5)=2.d0*ym+rctter -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ cell(9)=2.d0*zm+rctter -+ -+ endif -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ -+c check for appropriate boundary conditions -+ -+ if(imcon.gt.3)call error(idnode,1974) -+ call invert(cell,rcell,det) -+ call dcell(cell,cprp) -+ -+c calculate link cell numbers -+ -+ nbx=int(cprp(7)/(rctter+1.d-6)) -+ nby=int(cprp(8)/(rctter+1.d-6)) -+ nbz=int(cprp(9)/(rctter+1.d-6)) -+ if(nbx.lt.3.or.nby.lt.3.or.nbz.lt.3)then -+ -+ if(idnode.eq.0)then -+ -+ write(nrite,'(a,3i5)') -+ x 'tersoff link cell decomposition is',nbx,nby,nbz -+ -+ endif -+ -+ call error(idnode,1977) -+ -+ endif -+ ncells=nbx*nby*nbz -+ -+ if(ncells.gt.mxcell) then -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,'(a,i6)') -+ x 'number of required link cells in tersoff.f is ',ncells -+ write(nrite,'(a,i6)') -+ x 'number of default link cells in tersoff.f is ',mxcell -+ call error(idnode,1976) -+ -+ endif -+ -+ endif -+ -+c transform atomic coordinates and construct link cells -+ -+ do l=1,ncells -+ -+ lct(l)=0 -+ lst(l)=0 -+ -+ enddo -+ -+ xdc=dble(nbx) -+ ydc=dble(nby) -+ zdc=dble(nbz) -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ xxx(i)=sxx -+ yyy(i)=syy -+ zzz(i)=szz -+ -+ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) -+ iy=min(int(ydc*(syy+0.5d0)),nby-1) -+ iz=min(int(zdc*(szz+0.5d0)),nbz-1) -+ k=1+ix+nbx*(iy+nby*iz) -+ lst(k)=lst(k)+1 -+ link(i)=lct(k) -+ lct(k)=i -+ -+ endif -+ -+ enddo -+ -+c loop over central atoms of angles -+ -+ ix=0 -+ iy=1 -+ iz=1 -+ do icell=1,ncells -+ -+ ix=ix+1 -+ if(ix.gt.nbx)then -+ ix=1 -+ iy=iy+1 -+ if(iy.gt.nby)then -+ iy=1 -+ iz=iz+1 -+ endif -+ endif -+ -+c construct mini-list of neighbour cell contents -+ -+ k=0 -+ do kk=1,27 -+ -+ jx=ix+nix(kk) -+ jy=iy+niy(kk) -+ jz=iz+niz(kk) -+ -+ if(jx.gt.nbx)jx=1 -+ if(jy.gt.nby)jy=1 -+ if(jz.gt.nbz)jz=1 -+ if(jx.lt.1)jx=jx+nbx -+ if(jy.lt.1)jy=jy+nby -+ if(jz.lt.1)jz=jz+nbz -+ -+ jcell=jx+nbx*(jy-1+nby*(jz-1)) -+ j=lct(jcell) -+ -+ do ii=1,lst(jcell) -+ -+ k=k+1 -+ lattsf(k)=j -+ j=link(j) -+ -+ enddo -+ -+ enddo -+ -+ limit=k -+ -+ do ii=1,lst(icell) -+ -+ iatm=lattsf(ii) -+ iter=lstter(ltype(iatm)) -+ -+ if(mod(iatm,mxnode).eq.idnode.and.iter.ge.0)then -+ -+c construct working arrays by interpolation -+ -+ call terint(iatm,limit,rctter) -+ -+c calculate three body (attractive) terms -+ -+ call tersoff3(ii,limit,engter,virter,strs) -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c calculate stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,1978) -+ -+c global sum of three body potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engter -+ buffer(2)=virter -+ call gdsum(buffer(1),2,buffer(3)) -+ engter=buffer(1) -+ virter=buffer(2) -+ -+ endif -+ -+c remove effect of double counting -+ -+ engter=0.5d0*engter -+ virter=0.5d0*virter -+ -+c restore coordinate array to original representation -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=xxx(i) -+ syy=yyy(i) -+ szz=zzz(i) -+ -+ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz -+ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz -+ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz -+ -+ endif -+ -+ enddo -+ -+c restore cell vector -+ -+ if(imcon.eq.0) then -+ cell(1)=0.d0 -+ cell(5)=0.d0 -+ cell(9)=0.d0 -+ endif -+ -+ return -+ end subroutine tersoff -+ -+ subroutine terint(iatm,limit,rctter) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for constructing working arrays for -+c a tersoff potential using interpolation -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w.smith dec 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer iatm,jatm,jj,limit,iter,jter,jjter,ll -+ real(8) rctter,sxij,syij,szij,ppp,t1,t2,rdr -+ real(8) vk0,vk1,vk2,gk0,gk1,gk2 -+ -+ rdr=dble(mxgrid-4)/rctter -+ iter=lstter(ltype(iatm)) -+ -+c initialise working arrays -+ -+ do jj=1,limit -+ -+ xtf(jj)=0.d0 -+ ytf(jj)=0.d0 -+ ztf(jj)=0.d0 -+ rtf(jj)=0.d0 -+ ert(jj)=0.d0 -+ eat(jj)=0.d0 -+ grt(jj)=0.d0 -+ gat(jj)=0.d0 -+ scr(jj)=0.d0 -+ gcr(jj)=0.d0 -+ -+ enddo -+ -+c construct working arrays -+ -+ do jj=1,limit -+ -+ jatm=lattsf(jj) -+ jter=lstter(ltype(jatm)) -+ -+ if(jatm.ne.iatm.and.jter.ge.0)then -+ -+ sxij=xxx(jatm)-xxx(iatm) -+ sxij=sxij-nint(sxij) -+ syij=yyy(jatm)-yyy(iatm) -+ syij=syij-nint(syij) -+ szij=zzz(jatm)-zzz(iatm) -+ szij=szij-nint(szij) -+ -+ xtf(jj)=cell(1)*sxij+cell(4)*syij+cell(7)*szij -+ ytf(jj)=cell(2)*sxij+cell(5)*syij+cell(8)*szij -+ ztf(jj)=cell(3)*sxij+cell(6)*syij+cell(9)*szij -+ rtf(jj)=sqrt(xtf(jj)**2+ytf(jj)**2+ztf(jj)**2) -+ xtf(jj)=xtf(jj)/rtf(jj) -+ ytf(jj)=ytf(jj)/rtf(jj) -+ ztf(jj)=ztf(jj)/rtf(jj) -+ -+ jjter=loc2(iter,jter) -+ if(rtf(jj).le.vmbp(1,jjter,1))then -+ -+ ll=int(rdr*rtf(jj)) -+ ppp=rtf(jj)*rdr-dble(ll) -+ -+c interpolate screening function -+ -+ vk0=vmbp(ll,jjter,1) -+ vk1=vmbp(ll+1,jjter,1) -+ vk2=vmbp(ll+2,jjter,1) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ scr(jj)=t1+(t2-t1)*ppp*0.5d0 -+ -+c interpolate derivative of screening function -+ -+ gk0=gmbp(ll,jjter,1) -+ gk1=gmbp(ll+1,jjter,1) -+ gk2=gmbp(ll+2,jjter,1) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ gcr(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) -+ -+c interpolate repulsive component of energy -+ -+ vk0=vmbp(ll,jjter,2) -+ vk1=vmbp(ll+1,jjter,2) -+ vk2=vmbp(ll+2,jjter,2) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ ert(jj)=t1+(t2-t1)*ppp*0.5d0 -+ -+c interpolate derivative of repulsive function -+ -+ gk0=gmbp(ll,jjter,2) -+ gk1=gmbp(ll+1,jjter,2) -+ gk2=gmbp(ll+2,jjter,2) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ grt(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) -+ -+c interpolate attractive component of energy -+ -+ vk0=vmbp(ll,jjter,3) -+ vk1=vmbp(ll+1,jjter,3) -+ vk2=vmbp(ll+2,jjter,3) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ eat(jj)=t1+(t2-t1)*ppp*0.5d0 -+ -+c interpolate derivative of attractive function -+ -+ gk0=gmbp(ll,jjter,3) -+ gk1=gmbp(ll+1,jjter,3) -+ gk2=gmbp(ll+2,jjter,3) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ gat(jj)=-(t1+(t2-t1)*ppp*0.5d0)/rtf(jj) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine terint -+ -+ subroutine tersoff3(ii,limit,engter,virter,strs) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating three body contributions -+c to a tersoff potential and tersoff potential, virial and -+c atomic forces -+c -+c based on potential form defined in: -+c J. Tersoff, Phys. Rev. B 39 (1989) 5566. -+c -+c copyright - daresbury laboratory -+c author - w.smith dec 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical flag -+ integer iatm,jatm,katm,limit,ii,jj,kk -+ integer iter,jter,kter,jjter,kkter -+ real(8) cost,gtheta,ci,di,hi,gamma,gam_j,gam_k,eterm,gterm,strs -+ real(8) fxa,fya,fza,fxc,fyc,fzc,engter,virter,vterm,gam_ij,bi,ei -+ -+ dimension strs(6) -+ -+ iatm=lattsf(ii) -+ iter=lstter(ltype(iatm)) -+ -+ bi=prmter(iter,7) -+ ei=prmter(iter,8) -+ ci=prmter(iter,9) -+ di=prmter(iter,10) -+ hi=prmter(iter,11) -+ -+ do jj=1,limit -+ -+ jatm=lattsf(jj) -+ jter=lstter(ltype(jatm)) -+ if(jter.ge.0.and.iatm.ne.jatm)then -+ -+ jjter=loc2(iter,jter) -+ if(rtf(jj).le.vmbp(1,jjter,1))then -+ -+ flag=.false. -+ -+c potential energy and virial terms -+ -+ vterm=0.d0 -+ eterm=0.d0 -+ -+c initialise work arrays -+ -+ do kk=1,limit -+ -+ gam(kk)=0.d0 -+ gvr(kk)=0.d0 -+ -+ enddo -+ -+c calculate bond factor -+ -+ do kk=1,limit -+ -+ katm=lattsf(kk) -+ kter=lstter(ltype(katm)) -+ if(kter.ge.0.and.iatm.ne.katm.and.jatm.ne.katm)then -+ -+ kkter=loc2(iter,kter) -+ -+ if(rtf(kk).le.vmbp(1,kkter,1))then -+ -+ cost=(xtf(jj)*xtf(kk)+ytf(jj)*ytf(kk)+ztf(jj)*ztf(kk)) -+ gtheta=1.d0+(ci/di)**2-ci**2/(di**2+(hi-cost)**2) -+ eterm=eterm+gtheta*prmter2(2,kkter)*scr(kk) -+ vterm=vterm+gtheta*prmter2(2,kkter)*gcr(kk)*rtf(kk) -+ gvr(kk)=2.d0*ci**2*(hi-cost)/(di**2+(hi-cost)**2)**2 -+ gam(kk)=gtheta -+ flag=.true. -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ if(flag)then -+ -+c tersoff energy and virial -+ -+ gam_ij=prmter2(1,jjter)*(1.d0+(bi*eterm)**ei)**(-0.5d0/ei) -+ gamma=0.5d0*prmter2(1,jjter)*bi*(bi*eterm)**(ei-1.d0)* -+ x eat(jj)*(1.d0+(bi*eterm)**ei)**(-0.5d0/ei-1.d0) -+ engter=engter+ert(jj)-gam_ij*eat(jj) -+ virter=virter+gamma*vterm+(grt(jj)-gam_ij*gat(jj))*rtf(jj) -+ -+c calculate 3-body forces -+ -+ do kk=1,limit -+ -+ katm=lattsf(kk) -+ kter=lstter(ltype(katm)) -+ if(kter.ge.0.and.iatm.ne.katm.and.jatm.ne.katm)then -+ -+ kkter=loc2(iter,kter) -+ if(rtf(kk).le.vmbp(1,kkter,1))then -+ -+ gam_j=0.5d0*gamma*prmter2(2,kkter)*scr(kk)*gvr(kk) -+ gam_k=0.5d0*gamma*prmter2(2,kkter)*gcr(kk)*gam(kk) -+ -+c calculate contribution to atomic forces -+ -+ cost=(xtf(jj)*xtf(kk)+ytf(jj)*ytf(kk)+ -+ x ztf(jj)*ztf(kk)) -+ -+ fxa=gam_j*(xtf(kk)-xtf(jj)*cost)/rtf(jj) -+ fya=gam_j*(ytf(kk)-ytf(jj)*cost)/rtf(jj) -+ fza=gam_j*(ztf(kk)-ztf(jj)*cost)/rtf(jj) -+ -+ fxc=gam_j*(xtf(jj)-xtf(kk)*cost)/rtf(kk)- -+ x gam_k*xtf(kk) -+ fyc=gam_j*(ytf(jj)-ytf(kk)*cost)/rtf(kk)- -+ x gam_k*ytf(kk) -+ fzc=gam_j*(ztf(jj)-ztf(kk)*cost)/rtf(kk)- -+ x gam_k*ztf(kk) -+ -+ fxx(jatm)=fxx(jatm)+fxa -+ fyy(jatm)=fyy(jatm)+fya -+ fzz(jatm)=fzz(jatm)+fza -+ -+ fxx(iatm)=fxx(iatm)-(fxa+fxc) -+ fyy(iatm)=fyy(iatm)-(fya+fyc) -+ fzz(iatm)=fzz(iatm)-(fza+fzc) -+ -+ fxx(katm)=fxx(katm)+fxc -+ fyy(katm)=fyy(katm)+fyc -+ fzz(katm)=fzz(katm)+fzc -+ -+c calculate contributions to stress tensor -+ -+ strs(1)=strs(1)+(fxa*xtf(jj)*rtf(jj)+ -+ x fxc*xtf(kk)*rtf(kk)) -+ strs(2)=strs(2)+(fxa*ytf(jj)*rtf(jj)+ -+ x fxc*ytf(kk)*rtf(kk)) -+ strs(3)=strs(3)+(fxa*ztf(jj)*rtf(jj)+ -+ x fxc*ztf(kk)*rtf(kk)) -+ strs(4)=strs(4)+(fya*ytf(jj)*rtf(jj)+ -+ x fyc*ytf(kk)*rtf(kk)) -+ strs(5)=strs(5)+(fya*ztf(jj)*rtf(jj)+ -+ x fyc*ztf(kk)*rtf(kk)) -+ strs(6)=strs(6)+(fza*ztf(jj)*rtf(jj)+ -+ x fzc*ztf(kk)*rtf(kk)) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ else -+ -+ gam_ij=prmter2(1,jjter) -+ engter=engter+ert(jj)-gam_ij*eat(jj) -+ virter=virter+(grt(jj)-gam_ij*gat(jj))*rtf(jj) -+ -+ endif -+ -+c calculate two body force terms -+ -+ gterm=0.5d0*(grt(jj)-gam_ij*gat(jj)) -+ fxx(iatm)=fxx(iatm)+xtf(jj)*gterm -+ fyy(iatm)=fyy(iatm)+ytf(jj)*gterm -+ fzz(iatm)=fzz(iatm)+ztf(jj)*gterm -+ fxx(jatm)=fxx(jatm)-xtf(jj)*gterm -+ fyy(jatm)=fyy(jatm)-ytf(jj)*gterm -+ fzz(jatm)=fzz(jatm)-ztf(jj)*gterm -+ -+c calculate contributions to stress tensor -+ -+ strs(1)=strs(1)-gterm*rtf(jj)*xtf(jj)*xtf(jj) -+ strs(2)=strs(2)-gterm*rtf(jj)*xtf(jj)*ytf(jj) -+ strs(3)=strs(3)-gterm*rtf(jj)*xtf(jj)*ztf(jj) -+ strs(4)=strs(4)-gterm*rtf(jj)*ytf(jj)*ytf(jj) -+ strs(5)=strs(5)-gterm*rtf(jj)*ytf(jj)*ztf(jj) -+ strs(6)=strs(6)-gterm*rtf(jj)*ztf(jj)*ztf(jj) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine tersoff3 -+ -+ end module tersoff_module -diff -urN dl_class_1.9.orig/srcmod/tether_module.f dl_class_1.9/srcmod/tether_module.f ---- dl_class_1.9.orig/srcmod/tether_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/tether_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,447 @@ -+ module tether_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining tether potential arrays -+c -+c copyright - daresbury laboratory -+c author - w. smith oct 2003 -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use parse_module -+ use setup_module -+ use site_module -+ use utility_module -+ -+ implicit none -+ -+ real(8), allocatable :: prmtet(:,:) -+ integer, allocatable :: listtet(:,:) -+ integer, allocatable :: numteth(:),keytet(:),lsttet(:) -+ real(8), allocatable :: xxs(:),yys(:),zzs(:) -+ -+ save prmtet,lsttet,listtet,numteth,keytet,xxs,yys,zzs -+ -+ contains -+ -+ subroutine alloc_tet_arrays(idnode) -+ -+ implicit none -+ -+ integer, parameter :: nnn=8 -+ -+ integer i,fail,idnode -+ dimension fail(nnn) -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate (prmtet(mxteth,mxpbnd),stat=fail(1)) -+ allocate (numteth(mxtmls),stat=fail(2)) -+ allocate (keytet(mxteth),stat=fail(3)) -+ allocate (lsttet(mxteth),stat=fail(4)) -+ allocate (listtet(msteth,2),stat=fail(5)) -+ allocate (xxs(mxatms),stat=fail(6)) -+ allocate (yys(mxatms),stat=fail(7)) -+ allocate (zzs(mxatms),stat=fail(8)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1260) -+ enddo -+ -+ do i=1,mxtmls -+ numteth(i)=0 -+ enddo -+ -+ end subroutine alloc_tet_arrays -+ -+ subroutine define_tethers -+ x (safe,idnode,itmols,nteth,nsite,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining tether bonds -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ character*8 keyword -+ character*1 message(80) -+ real(8) engunit -+ integer idnode,itmols,nteth,nsite,ntmp,iteth,iteth1,idum -+ integer iatm1,isite1,j,i -+ -+ ntmp=intstr(record,lenrec,idum) -+ numteth(itmols)=numteth(itmols)+ntmp -+ if(idnode.eq.0)then -+ write(nrite,"(/,1x,'number of tethered atoms ', -+ x 6x,i10)")ntmp -+ write(nrite,"(/,' tethered atom details:',/,/, -+ x 21x,7x,'key',6x,'atom',19x,'parameters',/) ") -+ endif -+ -+ iteth1=numteth(itmols) -+ do iteth=1,iteth1 -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ call strip(record,lenrec) -+ call copystring(record,message,80) -+ call lowcase(record,4) -+ call getword(keyword,record,4,lenrec) -+ -+ iatm1=intstr(record,lenrec,idum) -+ -+c test for frozen atom -+ -+ isite1=nsite-numsit(itmols)+iatm1 -+ -+ if(lfzsit(isite1).ne.0)then -+ -+ numteth(itmols)=numteth(itmols)-1 -+ if(idnode.eq.0)write(nrite,'(14x,a16,40a1)') -+ x '*** frozen *** ',(message(i),i=1,40) -+ -+ else -+ -+ nteth=nteth+1 -+ if(nteth.gt.mxteth)call error(idnode,62) -+ -+ if(keyword(1:4).eq.'harm')then -+ keytet(nteth)=1 -+ elseif(keyword(1:4).eq.'rhrm')then -+ keytet(nteth)=2 -+ elseif(keyword(1:4).eq.'quar')then -+ keytet(nteth)=3 -+ else -+ if(idnode.eq.0)write(nrite,*)message -+ call error(idnode,450) -+ endif -+ -+ lsttet(nteth)=iatm1 -+ prmtet(nteth,1)=dblstr(record,lenrec,idum) -+ prmtet(nteth,2)=dblstr(record,lenrec,idum) -+ prmtet(nteth,3)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(27x,a4,i10,1p,9e12.4)") -+ x keyword(1:4),lsttet(nteth), -+ x (prmtet(nteth,j),j=1,mxpbnd) -+ -+c convert energy units to internal units -+ -+ if(abs(keytet(nteth)).eq.1)then -+ prmtet(nteth,1)=prmtet(nteth,1)*engunit -+ elseif(abs(keytet(nteth)).eq.2)then -+ prmtet(nteth,1)=prmtet(nteth,1)*engunit -+ elseif(abs(keytet(nteth)).eq.3)then -+ prmtet(nteth,1)=prmtet(nteth,1)*engunit -+ prmtet(nteth,2)=prmtet(nteth,2)*engunit -+ prmtet(nteth,3)=prmtet(nteth,3)*engunit -+ endif -+ -+ endif -+ -+ enddo -+ -+ return -+ end subroutine define_tethers -+ -+ subroutine tethfrc -+ x (idnode,mxnode,imcon,natms,nstep,ntteth,engtet,virtet) -+ -+c*********************************************************************** -+c -+c dl_poly routine to tether atoms to initial positions -+c includes stress tensor -+c -+c replicated data version : block data -+c -+c copyright daresbury laboratory 1994 -+c author t.forester feb 1994 -+c amended t.forester dec 1994 : block data -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe -+ integer idnode,mxnode,imcon,natms,nstep,ntteth,i,ii,ia,kk -+ integer itet1,itet2,fail -+ -+ real(8) engtet,virtet,rab -+ real(8) rrab,omega,gamma -+ -+ real(8), allocatable :: xdab(:),ydab(:),zdab(:) -+ -+ data safe/.true./ -+ -+ allocate (xdab(msbad),ydab(msbad),zdab(msbad),stat=fail) -+ if(fail.ne.0)call error(idnode,1270) -+ -+c set up reference positions at start of job -+ -+ if(nstep.le.1)then -+ -+ do i=1,natms -+ -+ xxs(i)=xxx(i) -+ yys(i)=yyy(i) -+ zzs(i)=zzz(i) -+ -+ enddo -+ -+ endif -+ -+c check size of work arrays -+ -+ if((ntteth-mxnode+1)/mxnode.gt.msbad) call error(idnode,420) -+ -+c block indices -+ -+ itet1=(idnode*ntteth)/mxnode+1 -+ itet2=((idnode+1)*ntteth)/mxnode -+ -+ ii=0 -+ do i=itet1,itet2 -+ -+ ii=ii+1 -+ -+c atomic index -+ -+ ia= listtet(ii,2) -+ -+c tether vector -+ -+ xdab(ii)=xxx(ia)-xxs(ia) -+ ydab(ii)=yyy(ia)-yys(ia) -+ zdab(ii)=zzz(ia)-zzs(ia) -+ -+ enddo -+ -+c ignore periodic boundary condition -+ -+ call images(imcon,0,1,ii,cell,xdab,ydab,zdab) -+ -+c zero tether energy and virial accumulators -+ -+ engtet=0.d0 -+ virtet=0.d0 -+ -+c loop over all specified tethered atoms -+ -+ ii=0 -+ do i=itet1,itet2 -+ -+ ii=ii+1 -+ -+c define components of bond vector -+ -+ rab=sqrt(xdab(ii)**2+ydab(ii)**2+zdab(ii)**2) -+ -+c check for possible zero length vector -+ -+ if(rab.lt.1.d-10)then -+ -+ rrab =0.d0 -+ -+ else -+ -+ rrab=1.d0/rab -+ -+ endif -+ -+c index of potential function parameters -+ -+ kk=listtet(ii,1) -+ -+c calculate scalar constant terms -+ -+ if(keytet(kk).eq.1)then -+ -+c harmonic function -+ -+ omega=0.5d0*prmtet(kk,1)*rab**2 -+ gamma=prmtet(kk,1) -+ -+ elseif(keytet(kk).eq.2)then -+ -+c restrained harmonic: -+ -+ omega=0.5d0*prmtet(kk,1)*(min(rab,prmtet(kk,2)))**2 -+ x +prmtet(kk,1)*prmtet(kk,2)* -+ x (sign(max(rab-prmtet(kk,2),0.d0),rab)) -+ gamma=prmtet(kk,1)*(sign(min(rab,prmtet(kk,2)),rab))*rrab -+ -+ elseif(keytet(kk).eq.3)then -+ -+c quartic potential -+ -+ omega=0.5d0*prmtet(kk,1)*rab**2 + -+ x 1.d0/3.d0*prmtet(kk,2)*rab**3+ -+ x 0.25d0*prmtet(kk,3)*rab**4 -+ gamma=(prmtet(kk,1)*rab + -+ x prmtet(kk,2)*rab**2 + -+ x prmtet(kk,3)*rab**3)*rrab -+ -+ else -+ safe=.false. -+ omega=0.d0 -+ gamma=0.d0 -+ endif -+ -+ gamma=-gamma -+ -+c calculate tether energy and virial -+ -+ engtet=engtet+omega -+ virtet=virtet-gamma*rab*rab -+ -+c index of atom -+ -+ ia=listtet(ii,2) -+ -+c calculate atomic forces -+ -+ fxx(ia)=fxx(ia)+gamma*xdab(ii) -+ fyy(ia)=fyy(ia)+gamma*ydab(ii) -+ fzz(ia)=fzz(ia)+gamma*zdab(ii) -+ -+c stress tensor -+ -+ stress(1)=stress(1)+xdab(ii)*gamma*xdab(ii) -+ stress(2)=stress(2)+xdab(ii)*gamma*ydab(ii) -+ stress(3)=stress(3)+xdab(ii)*gamma*zdab(ii) -+ stress(4)=stress(4)+ydab(ii)*gamma*xdab(ii) -+ stress(5)=stress(5)+ydab(ii)*gamma*ydab(ii) -+ stress(6)=stress(6)+ydab(ii)*gamma*zdab(ii) -+ stress(7)=stress(7)+zdab(ii)*gamma*xdab(ii) -+ stress(8)=stress(8)+zdab(ii)*gamma*ydab(ii) -+ stress(9)=stress(9)+zdab(ii)*gamma*zdab(ii) -+ -+ enddo -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1)call gstate(safe) -+ if(.not.safe)call error(idnode,450) -+ -+c sum contributions to potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(3)=engtet -+ buffer(4)=virtet -+ -+ call gdsum(buffer(3),2,buffer(1)) -+ -+ engtet=buffer(3) -+ virtet=buffer(4) -+ -+ endif -+ -+ deallocate (xdab,ydab,zdab,stat=fail) -+ -+ return -+ end subroutine tethfrc -+ -+ subroutine xscale(idnode,mxnode,natms,keyens,imcon,tstep) -+ -+c*********************************************************************** -+c -+c dl_poly routine to scale positions with change in box shape -+c -+c parallel replicated data version -+c -+c copyright daresbury laboratory 1995 -+c author t.forester october 1995 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,natms,keyens,imcon,iatm0,iatm1,i -+ real(8) tstep,xa,ya,za,totmas,xcmo,ycmo,zcmo -+ -+c assign block of atoms to processor -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ if((keyens.eq.4).or.(keyens.eq.6))then -+ -+c berendsen npt/nst -+ -+ do i=iatm0,iatm1 -+ -+ xa=eta(1)*xxs(i)+eta(2)*yys(i)+eta(3)*zzs(i) -+ ya=eta(4)*xxs(i)+eta(5)*yys(i)+eta(6)*zzs(i) -+ za=eta(7)*xxs(i)+eta(8)*yys(i)+eta(9)*zzs(i) -+ -+ xxs(i)=xa -+ yys(i)=ya -+ zzs(i)=za -+ -+ enddo -+ -+ elseif(keyens.eq.5.or.keyens.eq.7)then -+ -+c hoover npt/nst -+ -+ totmas=0.d0 -+ do i=1,natms -+ if(rmass(i).gt.0.d0)totmas=totmas+weight(i) -+ enddo -+ -+ xcmo=0.d0 -+ ycmo=0.d0 -+ zcmo=0.d0 -+ -+ do i=1,natms -+ -+ if(rmass(i).gt.0.d0)then -+ -+ xcmo=xcmo+weight(i)*xxs(i) -+ ycmo=ycmo+weight(i)*yys(i) -+ zcmo=zcmo+weight(i)*zzs(i) -+ -+ endif -+ -+ enddo -+ xcmo=xcmo/totmas -+ ycmo=ycmo/totmas -+ zcmo=zcmo/totmas -+ -+ do i=iatm0,iatm1 -+ -+ xa=xxs(i)-xcmo -+ ya=yys(i)-ycmo -+ za=zzs(i)-zcmo -+ -+ xxs(i)=xxs(i)+tstep*(eta(1)*xa+eta(2)*ya+eta(3)*za) -+ yys(i)=yys(i)+tstep*(eta(2)*xa+eta(5)*ya+eta(6)*za) -+ zzs(i)=zzs(i)+tstep*(eta(3)*xa+eta(6)*ya+eta(9)*za) -+ -+ enddo -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxs,yys,zzs) -+ -+ endif -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxs,yys,zzs,buffer) -+ -+ return -+ end subroutine xscale -+ -+ end module tether_module -+ -diff -urN dl_class_1.9.orig/srcmod/three_body_module.f dl_class_1.9/srcmod/three_body_module.f ---- dl_class_1.9.orig/srcmod/three_body_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/three_body_module.f 2011-02-21 10:56:11.000000000 +0100 -@@ -0,0 +1,882 @@ -+ module three_body_module -+ -+c*********************************************************************** -+c -+c dl_poly module for defining three-body potential arrays -+c copyright - daresbury laboratory -+c author - w. smith sep 2003 -+c adapted - w. smith aug 2008 : solvation, free energy excitation -+c adapted - w. smith jan 2011 : metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use error_module -+ use metafreeze_module -+ use parse_module -+ use setup_module -+ use site_module -+ use solvation_module -+ use utility_module -+ -+ implicit none -+ -+ logical, allocatable :: filter(:) -+ real(8), allocatable :: prmtbp(:,:),rcut3b(:) -+ integer, allocatable :: lsttbp(:),ltptbp(:),lattbp(:) -+ -+ save prmtbp,rcut3b,lsttbp,ltptbp,lattbp,filter -+ -+ contains -+ -+ subroutine alloc_tbp_arrays(idnode) -+ -+ implicit none -+ -+ integer i,fail,idnode -+ dimension fail(6) -+ -+ do i=1,6 -+ fail(i)=0 -+ enddo -+ -+ allocate (prmtbp(mxtbp,mxptbp),stat=fail(1)) -+ allocate (rcut3b(mxtbp),stat=fail(2)) -+ allocate (lsttbp(mxtbp),stat=fail(3)) -+ allocate (ltptbp(mxtbp),stat=fail(4)) -+ allocate (lattbp(mxatms),stat=fail(5)) -+ allocate (filter(mxsite),stat=fail(6)) -+ -+ do i=1,6 -+ if(fail(i).gt.0)call error(idnode,1170) -+ enddo -+ -+ end subroutine alloc_tbp_arrays -+ -+ subroutine define_three_body -+ x (safe,lunits,lmols,idnode,ntptbp,ntpatm,rcuttb,engunit) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for defining three body potentials -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2003 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lunits,lmols -+ character*8 keyword -+ character*8 atom0,atom1,atom2 -+ character*1 message(80) -+ integer idnode,ntptbp,ntpatm,fail,i,itbp,itptbp,keypot -+ integer idum,katm1,katm2,katm0,j,keytbp,ktbp,jtpatm -+ real(8) rcuttb,engunit -+ real(8), allocatable :: parpot(:) -+ -+ data fail/0/ -+ -+ allocate (parpot(mxptbp),stat=fail) -+ if(fail.ne.0)call error(idnode,1180) -+ -+ ntptbp=intstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,"(/,/,1x,'number of specified three ', -+ x 'body potentials',i10)") ntptbp -+ write(nrite,"(/,/,16x,'atom 1 ','atom 2 ','atom 3 ', -+ x 3x,' key',30x,'parameters'/,/)") -+ -+ endif -+ if(ntptbp.gt.mxtbp) call error(idnode,83) -+ if(.not.lunits) call error(idnode,6) -+ if(.not.lmols) call error(idnode,13) -+ -+ do i=1,mxsite -+ filter(i)=.false. -+ enddo -+ -+ do itbp=1,mxtbp -+ lsttbp(itbp)=0 -+ enddo -+ -+ do itbp=1,mxtbp,mx2tbp -+ lsttbp(itbp)=-1 -+ enddo -+ -+ rcuttb=0.d0 -+ -+ do itptbp=1,ntptbp -+ -+ do i=1,mxptbp -+ parpot(i)=0.d0 -+ enddo -+ -+ call getrec(safe,idnode,nfield) -+ if(.not.safe)return -+ -+c Note the order!! atom0 is central -+ -+ call copystring(record,message,80) -+ call getword(atom1,record,8,lenrec) -+ call getword(atom0,record,8,lenrec) -+ call getword(atom2,record,8,lenrec) -+ call lowcase(record,lenrec) -+ call getword(keyword,record,4,lenrec) -+ -+ if(keyword(1:4).eq.'harm') then -+ keypot=0 -+ elseif(keyword(1:4).eq.'thrm') then -+ keypot=1 -+ elseif(keyword(1:4).eq.'shrm') then -+ keypot=2 -+ elseif(keyword(1:4).eq.'bvs1') then -+ keypot=3 -+ elseif(keyword(1:4).eq.'bvs2') then -+ keypot=4 -+ elseif(keyword(1:4).eq.'hbnd') then -+ keypot=5 -+ else -+ if(idnode.eq.0) write(nrite,*) message -+ call error(idnode,442) -+ endif -+ -+ parpot(1)=dblstr(record,lenrec,idum) -+ parpot(2)=dblstr(record,lenrec,idum) -+ parpot(3)=dblstr(record,lenrec,idum) -+ parpot(4)=dblstr(record,lenrec,idum) -+ parpot(5)=dblstr(record,lenrec,idum) -+ -+ if(idnode.eq.0) -+ x write(nrite,"(16x,3a8,4x,a4,1x,1p,9e13.5)") -+ x atom1,atom0,atom2,keyword(1:4),(parpot(j),j=1,mxptbp) -+ -+ katm0=0 -+ katm1=0 -+ katm2=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom0.eq.unqatm(jtpatm))katm0=jtpatm -+ if(atom1.eq.unqatm(jtpatm))katm1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katm2=jtpatm -+ -+ enddo -+ -+ if(katm0.eq.0.or.katm1.eq.0.or.katm2.eq.0) -+ x call error(idnode,84) -+ -+ filter(katm0)=.true. -+ filter(katm1)=.true. -+ filter(katm2)=.true. -+ -+ keytbp=(max(katm1,katm2)*(max(katm1,katm2)-1))/2+ -+ x min(katm1,katm2)+(katm0-1)*mx2tbp -+ -+ if(keytbp.gt.mxtbp) call error(idnode,86) -+ -+c convert parameters to internal units -+ -+ parpot(1)=parpot(1)*engunit -+ if(keypot.ne.5)parpot(2)=parpot(2)*(pi/180.d0) -+ -+ if(lsttbp(keytbp).gt.0) call error(idnode,18) -+ lsttbp(keytbp)=itptbp -+ ltptbp(itptbp)=keypot -+ ktbp=mx2tbp*((keytbp-1)/mx2tbp)+1 -+ if(lsttbp(ktbp).lt.0)lsttbp(ktbp)=0 -+ -+c calculate max three body cutoff -+ -+ rcuttb=max(rcuttb,parpot(5)) -+ rcut3b(itptbp)=parpot(5) -+ -+c store three body potential parameters -+ -+ do i=1,4 -+ prmtbp(itptbp,i)=parpot(i) -+ enddo -+ if(mxptbp.ge.6) then -+ do i=6,mxptbp -+ prmtbp(itptbp,i-1)=parpot(i-1) -+ enddo -+ endif -+ enddo -+ -+ if(rcuttb.lt.1.d-6)call error(idnode,451) -+ -+ deallocate (parpot,stat=fail) -+ -+ return -+ end subroutine define_three_body -+ -+ subroutine thbfrc -+ x (lsolva,lfree,lexcite,idnode,mxnode,natms,imcon,rcuttb, -+ x engtbp,virtbp) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating three body forces arising -+c from the included angle between three atoms -+c -+c Note: the subroutine converts coordinates to reduced units -+c to avoid a call to images.f. The link cell algorithm used -+c here necessitates a parallelepiped cell geometry -+c -+c copyright - daresbury laboratory 1994 -+c author - w.smith mar 1994 -+c adapted - w.smith aug 2008 solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lsolva,lfree,lexcite,lselect,lskip -+ logical idrive,jdrive,kdrive -+ integer idnode,mxnode,natms,imcon,nix,niy,niz -+ integer i,nbx,nby,nbz,ncells,l,ix,iy,iz,k,icell,kk,jx,jy,jz -+ integer j,jcell,ii,itbp,limit,last,ktbp,jtbp,jktbp,kktbp -+ integer ia,ib,ic,ktyp,jj,jk,kkk -+ real(8) rcuttb,engtbp,virtbp,tterm,uterm,xm,ym,zm,cprp,det -+ real(8) xdc,ydc,zdc,sxx,syy,szz,sxab,syab,szab,xab,yab,zab -+ real(8) rab,sxbc,sybc,szbc,xbc,ybc,zbc,rbc,xac,yac,zac,rac -+ real(8) rrab,rrbc,rrac,cost,sint,theta,pterm,gamma,vterm -+ real(8) gamsa,gamsb,gamsc,scrn,fxa,fya,fza,fxc,fyc,fzc,strs -+ real(8) strs_loc -+ -+ dimension nix(27),niy(27),niz(27),cprp(10),strs(6),strs_loc(9) -+ -+ data nix/ 0,-1,-1,-1, 0, 0,-1, 1,-1, 0, 1,-1, 0, 1, -+ x 1, 1, 1, 0, 0, 1,-1, 1, 0,-1, 1, 0,-1/ -+ data niy/ 0, 0,-1, 1, 1, 0, 0, 0,-1,-1,-1, 1, 1, 1, -+ x 0, 1,-1,-1, 0, 0, 0, 1, 1, 1,-1,-1,-1/ -+ data niz/ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ x 0, 0, 0, 0,-1,-1,-1,-1,-1,-1,-1,-1,-1/ -+ -+ lskip=(lfree.or.lexcite) -+ -+c flag for undefined potentials -+ -+ safe=.true. -+ -+c initialise accumulators -+ -+ engtbp=0.d0 -+ virtbp=0.d0 -+ tbp_fre=0.d0 -+ tbp_vir=0.d0 -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+ if(lsolva)then -+ -+ lcomp(8)=.true. -+ en3_sol(:)=0.d0 -+ if(lexcite)en3_exc(:)=0.d0 -+ -+ endif -+ -+c create mock cell vectors for non-periodic system -+ -+ if(imcon.eq.0) then -+ -+ xm=0.d0 -+ ym=0.d0 -+ zm=0.d0 -+ do i=1,natms -+ xm=max(xm,abs(xxx(i))) -+ ym=max(ym,abs(yyy(i))) -+ zm=max(zm,abs(zzz(i))) -+ enddo -+ -+ cell(1)=2.d0*xm+rcuttb -+ cell(2)=0.d0 -+ cell(3)=0.d0 -+ cell(4)=0.d0 -+ cell(5)=2.d0*ym+rcuttb -+ cell(6)=0.d0 -+ cell(7)=0.d0 -+ cell(8)=0.d0 -+ cell(9)=2.d0*zm+rcuttb -+ -+ endif -+ -+c check for appropriate boundary conditions -+ -+ if(imcon.gt.3)call error(idnode,67) -+ call invert(cell,rcell,det) -+ call dcell(cell,cprp) -+ -+c calculate link cell numbers -+ -+ nbx=int(cprp(7)/(rcuttb+1.d-6)) -+ nby=int(cprp(8)/(rcuttb+1.d-6)) -+ nbz=int(cprp(9)/(rcuttb+1.d-6)) -+ ncells=nbx*nby*nbz -+ if(ncells.gt.mxcell) then -+ -+ if(idnode.eq.0) then -+ -+ write(nrite,'(a,i6)') -+ x 'number of required link cells in routine thbfrc is ',ncells -+ write(nrite,'(a,i6)') -+ x 'number of default link cells in routine thbfrc is ',mxcell -+ call error(idnode,69) -+ -+ endif -+ -+ endif -+ -+c transform atomic coordinates and construct link cells -+ -+ do l=1,ncells -+ -+ lct(l)=0 -+ lst(l)=0 -+ -+ enddo -+ -+ xdc=dble(nbx) -+ ydc=dble(nby) -+ zdc=dble(nbz) -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i) -+ syy=rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i) -+ szz=rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i) -+ -+ xxx(i)=sxx -+ yyy(i)=syy -+ zzz(i)=szz -+ -+ ix=min(int(xdc*(sxx+0.5d0)),nbx-1) -+ iy=min(int(ydc*(syy+0.5d0)),nby-1) -+ iz=min(int(zdc*(szz+0.5d0)),nbz-1) -+ k=1+ix+nbx*(iy+nby*iz) -+ lst(k)=lst(k)+1 -+ link(i)=lct(k) -+ lct(k)=i -+ -+ endif -+ -+ enddo -+ -+c loop over central atoms of angles -+ -+ ix=0 -+ iy=1 -+ iz=1 -+ do icell=1,ncells -+ -+ ix=ix+1 -+ if(ix.gt.nbx)then -+ ix=1 -+ iy=iy+1 -+ if(iy.gt.nby)then -+ iy=1 -+ iz=iz+1 -+ endif -+ endif -+ -+c construct mini-list of neighbour cell contents -+ -+ k=0 -+ do kk=1,27 -+ -+ jx=ix+nix(kk) -+ jy=iy+niy(kk) -+ jz=iz+niz(kk) -+ -+ if(jx.gt.nbx)jx=1 -+ if(jy.gt.nby)jy=1 -+ if(jz.gt.nbz)jz=1 -+ if(jx.lt.1)jx=jx+nbx -+ if(jy.lt.1)jy=jy+nby -+ if(jz.lt.1)jz=jz+nbz -+ -+ jcell=jx+nbx*(jy-1+nby*(jz-1)) -+ j=lct(jcell) -+ -+ do ii=1,lst(jcell) -+ -+ k=k+1 -+ lattbp(k)=j -+ j=link(j) -+ -+ enddo -+ -+ enddo -+ -+ limit=k -+ -+ do ii=1,lst(icell) -+ -+ i=lattbp(ii) -+ itbp=mx2tbp*(ltype(i)-1) -+ if(mod(i,mxnode).eq.idnode.and.lsttbp(itbp+1).ge.0)then -+ -+ last=limit -+ -+ do kk=1,limit/2 -+ -+ if(kk.gt.(limit-1)/2)last=limit/2 -+ -+ do jj=1,last -+ -+ j=lattbp(jj) -+ jk=jj+kk -+ if(jk.gt.limit)jk=jk-limit -+ k=lattbp(jk) -+ if(i.ne.j.and.i.ne.k)then -+ -+ jtbp=max(ltype(j),ltype(k)) -+ ktbp=min(ltype(j),ltype(k)) -+ jktbp=itbp+(jtbp*(jtbp-1))/2+ktbp -+ kktbp=lsttbp(jktbp) -+ if(kktbp.gt.0)then -+ -+c make labels etc consistent with angfrc.f -+ -+ ia=j -+ ib=i -+ ic=k -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(ia)) -+ jdrive=driven(ltype(ib)) -+ kdrive=driven(ltype(ic)) -+ -+ endif -+ -+ if(lskip)then -+ -+ if((atm_fre(ia).eq.1.or.atm_fre(ib).eq.1.or. -+ x atm_fre(ic).eq.1).and.(atm_fre(ia).eq.2.or. -+ x atm_fre(ib).eq.2.or.atm_fre(ic).eq.2))cycle -+ -+ endif -+ -+ sxab=xxx(ia)-xxx(ib) -+ sxab=sxab-nint(sxab) -+ syab=yyy(ia)-yyy(ib) -+ syab=syab-nint(syab) -+ szab=zzz(ia)-zzz(ib) -+ szab=szab-nint(szab) -+ -+ xab=cell(1)*sxab+cell(4)*syab+cell(7)*szab -+ if(abs(xab).lt.rcuttb)then -+ -+ yab=cell(2)*sxab+cell(5)*syab+cell(8)*szab -+ if(abs(yab).lt.rcuttb)then -+ -+ zab=cell(3)*sxab+cell(6)*syab+cell(9)*szab -+ if(abs(zab).lt.rcuttb)then -+ -+ sxbc=xxx(ic)-xxx(ib) -+ sxbc=sxbc-nint(sxbc) -+ sybc=yyy(ic)-yyy(ib) -+ sybc=sybc-nint(sybc) -+ szbc=zzz(ic)-zzz(ib) -+ szbc=szbc-nint(szbc) -+ -+ xbc=cell(1)*sxbc+cell(4)*sybc+cell(7)*szbc -+ if(abs(xbc).lt.rcuttb)then -+ -+ ybc=cell(2)*sxbc+cell(5)*sybc+cell(8)*szbc -+ if(abs(ybc).lt.rcuttb)then -+ -+ zbc=cell(3)*sxbc+cell(6)*sybc+cell(9)*szbc -+ if(abs(zbc).lt.rcuttb)then -+ -+ ktyp=ltptbp(kktbp) -+ rab=sqrt(xab*xab+yab*yab+zab*zab) -+ rbc=sqrt(xbc*xbc+ybc*ybc+zbc*zbc) -+ -+ if(rcut3b(kktbp).ge.max(rab,rbc))then -+ -+ xac=xab-xbc -+ yac=yab-ybc -+ zac=zab-zbc -+ rac=sqrt(xac*xac+yac*yac+zac*zac) -+ -+ rrab=1.d0/rab -+ rrbc=1.d0/rbc -+ rrac=1.d0/rac -+ -+c normalise direction vectors -+ -+ xab=xab*rrab -+ yab=yab*rrab -+ zab=zab*rrab -+ -+ xbc=xbc*rrbc -+ ybc=ybc*rrbc -+ zbc=zbc*rrbc -+ -+ xac=xac*rrac -+ yac=yac*rrac -+ zac=zac*rrac -+ -+ cost=(xab*xbc+yab*ybc+zab*zbc) -+ if(abs(cost).gt.1.d0)cost=sign(1.d0,cost) -+ if(ktyp.ne.5)then -+ -+ sint=max(1.d-8,sqrt(1.d0-cost*cost)) -+ theta=acos(cost) -+ -+ endif -+ -+ if(ktyp.eq.0)then -+ -+c harmonic angle potential -+ -+ pterm=0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 -+ gamma=prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint -+ -+ vterm=0.d0 -+ gamsa=0.d0 -+ gamsc=0.d0 -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.1)then -+ -+c truncated harmonic valence angle potential -+ -+ scrn=exp(-(rab**8+rbc**8)/prmtbp(kktbp,3)**8) -+ pterm=scrn*0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 -+ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmtbp(kktbp,3)**8 -+ gamma=scrn*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint -+ gamsa=(8.d0*pterm/prmtbp(kktbp,3)**8)*rab**7 -+ gamsc=(8.d0*pterm/prmtbp(kktbp,3)**8)*rbc**7 -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.2)then -+ -+c screened harmonic valence angle potential -+ -+ scrn=exp(-(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4))) -+ pterm=scrn*0.5d0*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))**2 -+ vterm=-pterm*(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4)) -+ gamma=scrn*prmtbp(kktbp,1)*(theta-prmtbp(kktbp,2))/sint -+ gamsa=(pterm/prmtbp(kktbp,3)) -+ gamsc=(pterm/prmtbp(kktbp,4)) -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.3)then -+ -+c screened vessal potential type 1 -+ -+ scrn=exp(-(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4))) -+ pterm=scrn*prmtbp(kktbp,1)/ -+ x (8.d0*(prmtbp(kktbp,2)-pi)**2)* -+ x ((prmtbp(kktbp,2)-pi)**2-(theta-pi)**2)**2 -+ vterm=-pterm*(rab/prmtbp(kktbp,3)+rbc/prmtbp(kktbp,4)) -+ gamma=scrn*prmtbp(kktbp,1)/ -+ x (2.d0*(prmtbp(kktbp,2)-pi)**2)* -+ x ((prmtbp(kktbp,2)-pi)**2-(theta-pi)**2)*(theta-pi)/sint -+ gamsa=(pterm/prmtbp(kktbp,3)) -+ gamsc=(pterm/prmtbp(kktbp,4)) -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.4)then -+ -+c truncated vessal potential type 2 - use with sw1 -+ -+ scrn=exp(-(rab**8+rbc**8)/prmtbp(kktbp,4)**8) -+ pterm=scrn*prmtbp(kktbp,1)*(theta**prmtbp(kktbp,3)* -+ x (theta-prmtbp(kktbp,2))**2*(theta+prmtbp(kktbp,2)- -+ x 2.d0*pi)**2-0.5d0*prmtbp(kktbp,3)*pi**(prmtbp(kktbp,3) -+ x -1.d0)*(theta-prmtbp(kktbp,2))**2*(pi- -+ x prmtbp(kktbp,2))**3) -+ vterm=-8.d0*pterm*(rab**8+rbc**8)/prmtbp(kktbp,4)**8 -+ gamma=scrn*prmtbp(kktbp,1)*(theta**(prmtbp(kktbp,3)-1.d0)* -+ x (theta-prmtbp(kktbp,2))*(theta+prmtbp(kktbp,2)- -+ x 2.d0*pi)*((prmtbp(kktbp,3)+4.d0)*theta**2-2.d0*pi* -+ x (prmtbp(kktbp,3)+2.d0)*theta+prmtbp(kktbp,3)* -+ x prmtbp(kktbp,2)*(2.d0*pi-prmtbp(kktbp,2)))- -+ x prmtbp(kktbp,3)*pi**(prmtbp(kktbp,3)-1.d0)* -+ x (theta-prmtbp(kktbp,2))*(pi-prmtbp(kktbp,2))**3)/sint -+ gamsa=(8.d0*pterm/prmtbp(kktbp,4)**8)*rab**7 -+ gamsc=(8.d0*pterm/prmtbp(kktbp,4)**8)*rbc**7 -+ gamsb=0.d0 -+ -+ elseif(ktyp.eq.5)then -+ -+ if(min(rab,rbc).lt.1.5d0)then -+ -+ scrn=(5.d0*(prmtbp(kktbp,2)/rac)**2-6.d0)* -+ x (prmtbp(kktbp,2)/rac)**10 -+ tterm=prmtbp(kktbp,1)*cost**4 -+ pterm=scrn*tterm -+ uterm=60.d0*((prmtbp(kktbp,2)/rac)**2-1.d0)* -+ x (prmtbp(kktbp,2)/rac)**10 -+ vterm=tterm*uterm -+ gamma=scrn*4.d0*prmtbp(kktbp,1)*cost**3 -+ gamsb=tterm*uterm/rac -+ gamsa=0.d0 -+ gamsc=0.d0 -+ -+ endif -+ -+ else -+ -+ safe=.false. -+ pterm=0.d0 -+ vterm=0.d0 -+ gamma=0.d0 -+ gamsa=0.d0 -+ gamsb=0.d0 -+ gamsc=0.d0 -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set triple index -+ -+ if(lsolva)kkk=loc3(atmolt(ia),atmolt(ib),atmolt(ic)) -+ -+ if(lexcite)then -+ -+c selected excitation option -+ -+ if((atm_fre(ia).ne.1).and.(atm_fre(ib).ne.1) -+ x .and.(atm_fre(ic).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(ia)+atm_fre(ib)+atm_fre(ic).eq.0) -+ -+ if(lsolva)en3_exc(kkk)=en3_exc(kkk)+pterm -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(ia).eq.1).or.(atm_fre(ib).eq.1) -+ x .or.(atm_fre(ic).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ tbp_fre=tbp_fre-pterm -+ tbp_vir=tbp_vir-vterm -+ pterm=lambda1*pterm -+ vterm=lambda1*vterm -+ gamma=lambda1*gamma -+ gamsa=lambda1*gamsa -+ gamsb=lambda1*gamsb -+ gamsc=lambda1*gamsc -+ -+ elseif((atm_fre(ia).eq.2).or.(atm_fre(ib).eq.2) -+ x .or.(atm_fre(ic).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ tbp_fre=tbp_fre+pterm -+ tbp_vir=tbp_vir+vterm -+ pterm=lambda2*pterm -+ vterm=lambda2*vterm -+ gamma=lambda2*gamma -+ gamsa=lambda2*gamsa -+ gamsb=lambda2*gamsb -+ gamsc=lambda2*gamsc -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential and virial -+ -+ engtbp=engtbp+pterm -+ virtbp=virtbp+vterm -+ -+ if(lsolva)en3_sol(kkk)=en3_sol(kkk)+pterm -+ -+c calculate atomic forces -+ -+ fxa=gamma*(xbc-xab*cost)*rrab+gamsa*xab+gamsb*xac -+ fya=gamma*(ybc-yab*cost)*rrab+gamsa*yab+gamsb*yac -+ fza=gamma*(zbc-zab*cost)*rrab+gamsa*zab+gamsb*zac -+ -+ fxc=gamma*(xab-xbc*cost)*rrbc+gamsc*xbc-gamsb*xac -+ fyc=gamma*(yab-ybc*cost)*rrbc+gamsc*ybc-gamsb*yac -+ fzc=gamma*(zab-zbc*cost)*rrbc+gamsc*zbc-gamsb*zac -+ -+ fxx(ia)=fxx(ia)+fxa -+ fyy(ia)=fyy(ia)+fya -+ fzz(ia)=fzz(ia)+fza -+ -+ fxx(ib)=fxx(ib)-fxa-fxc -+ fyy(ib)=fyy(ib)-fya-fyc -+ fzz(ib)=fzz(ib)-fza-fzc -+ -+ fxx(ic)=fxx(ic)+fxc -+ fyy(ic)=fyy(ic)+fyc -+ fzz(ic)=fzz(ic)+fzc -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+rab*xab*fxa+rbc*xbc*fxc -+ strs(2)=strs(2)+rab*xab*fya+rbc*xbc*fyc -+ strs(3)=strs(3)+rab*xab*fza+rbc*xbc*fzc -+ strs(4)=strs(4)+rab*yab*fya+rbc*ybc*fyc -+ strs(5)=strs(5)+rab*yab*fza+rbc*ybc*fzc -+ strs(6)=strs(6)+rab*zab*fza+rbc*zbc*fzc -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn)then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+pterm -+ vir_loc=vir_loc+vterm -+ -+c local forces -+ -+ fxx_loc(ia)=fxx_loc(ia)+fxa -+ fyy_loc(ia)=fyy_loc(ia)+fya -+ fzz_loc(ia)=fzz_loc(ia)+fza -+ -+ fxx_loc(ib)=fxx_loc(ib)-fxa-fxc -+ fyy_loc(ib)=fyy_loc(ib)-fya-fyc -+ fzz_loc(ib)=fzz_loc(ib)-fza-fzc -+ -+ fxx_loc(ic)=fxx_loc(ic)+fxc -+ fyy_loc(ic)=fyy_loc(ic)+fyc -+ fzz_loc(ic)=fzz_loc(ic)+fzc -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+rab*xab*fxa+rbc*xbc*fxc -+ strs_loc(2)=strs_loc(2)+rab*xab*fya+rbc*xbc*fyc -+ strs_loc(3)=strs_loc(3)+rab*xab*fza+rbc*xbc*fzc -+ strs_loc(4)=strs_loc(4)+rab*yab*fya+rbc*ybc*fyc -+ strs_loc(5)=strs_loc(5)+rab*yab*fza+rbc*ybc*fzc -+ strs_loc(6)=strs_loc(6)+rab*zab*fza+rbc*zbc*fzc -+ -+ endif -+ -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ enddo -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+c check for undefined potentials -+ -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe) call error(idnode,442) -+ -+c global sum of three body potential and virial -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engtbp -+ buffer(2)=virtbp -+ buffer(3)=tbp_fre -+ buffer(4)=tbp_vir -+ call gdsum(buffer(1),4,buffer(5)) -+ engtbp=buffer(1) -+ virtbp=buffer(2) -+ tbp_fre=buffer(3) -+ tbp_vir=buffer(4) -+ -+c sum up solvation energies -+ -+ if(lsolva)then -+ -+ call gdsum(en3_sol,mxtmls_sol3,buffer(1)) -+ if(lexcite)call gdsum(en3_exc,mxtmls_exc3,buffer(1)) -+ -+ endif -+ -+ endif -+ -+c restore coordinate array to original representation -+ -+ do i=1,natms -+ -+ if(filter(ltype(i)))then -+ -+ sxx=xxx(i) -+ syy=yyy(i) -+ szz=zzz(i) -+ -+ xxx(i)=cell(1)*sxx+cell(4)*syy+cell(7)*szz -+ yyy(i)=cell(2)*sxx+cell(5)*syy+cell(8)*szz -+ zzz(i)=cell(3)*sxx+cell(6)*syy+cell(9)*szz -+ -+ endif -+ -+ enddo -+ -+c restore cell vector -+ -+ if(imcon.eq.0) then -+ cell(1)=0.d0 -+ cell(5)=0.d0 -+ cell(9)=0.d0 -+ endif -+ -+ return -+ -+ end subroutine thbfrc -+ -+ end module three_body_module -diff -urN dl_class_1.9.orig/srcmod/utility_module.f dl_class_1.9/srcmod/utility_module.f ---- dl_class_1.9.orig/srcmod/utility_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/utility_module.f 2010-12-22 13:27:23.000000000 +0100 -@@ -0,0 +1,1612 @@ -+ module utility_module -+ -+c*********************************************************************** -+c -+c dl_poly module for utility subroutines and functions -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ contains -+ -+ subroutine global_sum_forces(natms,mxnode,gxx,gyy,gzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to perform global sum of atomic forces as -+c requred by replicated data strategy -+c -+c copyright - daresbury laboratory -+c author - w.smith december 2005 -+c -+c*********************************************************************** -+ -+ use config_module -+ -+ implicit none -+ -+ integer natms,mxnode,i,j -+ real(8) gxx(*),gyy(*),gzz(*) -+ -+ if(mxnode.gt.1) then -+ -+ j=0 -+ do i=1,natms -+ -+ buffer(j+1)=gxx(i) -+ buffer(j+2)=gyy(i) -+ buffer(j+3)=gzz(i) -+ j=j+3 -+ -+ enddo -+ call gdsum(buffer(1),3*natms,buffer(3*natms+1)) -+ j=0 -+ do i=1,natms -+ -+ gxx(i)=buffer(j+1) -+ gyy(i)=buffer(j+2) -+ gzz(i)=buffer(j+3) -+ j=j+3 -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine global_sum_forces -+ -+ subroutine images -+ x (imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating the minimum image -+c of atom pairs within a specified MD cell -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992. -+c T3D optimised version. t.forester july 1994 -+c -+c for -+c imcon=0 no boundary conditions apply -+c imcon=1 standard cubic boundaries apply -+c imcon=2 orthorhombic boundaries apply -+c imcon=3 parallelepiped boundaries apply -+c imcon=4 truncated octahedron boundaries apply -+c imcon=5 rhombic dodecahedron boundaries apply -+c imcon=6 x-y parallelogram boundary conditions : no periodicity in z -+c imcon=7 hexagonal prism boundaries apply -+c -+c note: in all cases the centre of the cell is at (0,0,0) -+c warning - replicated data version: does not re-merge -+c coordinate arrays -+c -+c*********************************************************************** -+ -+ use error_module -+ -+ implicit none -+ -+ integer imcon,idnode,mxnode,natms,iatm1,iatm2,i -+ real(8) cell,xxx,yyy,zzz,aaa,bbb,ccc,det,rt2,rt3,ssx -+ real(8) ssy,ssz,ddd,xss,yss,zss,rcell -+ -+ dimension xxx(*),yyy(*),zzz(*) -+ dimension cell(9),rcell(9) -+ -+ data rt2/1.41421356623d0/,rt3/1.7320508075d0/ -+ -+ if(imcon.gt.0) then -+ -+c block indices -+ -+ iatm1 = (idnode*natms)/mxnode+1 -+ iatm2 = ((idnode+1)*natms)/mxnode -+ -+ endif -+ -+ if(imcon.eq.1)then -+ -+c standard cubic boundary conditions -+ -+ -+ aaa=1.d0/cell(1) -+ -+ do i=iatm1,iatm2 -+ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) -+ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) -+ zzz(i)=zzz(i)-cell(1)*nint(aaa*zzz(i)) -+ enddo -+ -+ else if(imcon.eq.2)then -+ -+c rectangular (slab) boundary conditions -+ -+ aaa=1.d0/cell(1) -+ bbb=1.d0/cell(5) -+ ccc=1.d0/cell(9) -+ -+ do i=iatm1,iatm2 -+ -+ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) -+ yyy(i)=yyy(i)-cell(5)*nint(bbb*yyy(i)) -+ zzz(i)=zzz(i)-cell(9)*nint(ccc*zzz(i)) -+ -+ enddo -+ -+ else if(imcon.eq.3)then -+ -+c parallelepiped boundary conditions -+ -+ call invert(cell,rcell,det) -+ -+ do i=iatm1,iatm2 -+ -+ ssx=(rcell(1)*xxx(i)+rcell(4)*yyy(i)+rcell(7)*zzz(i)) -+ ssy=(rcell(2)*xxx(i)+rcell(5)*yyy(i)+rcell(8)*zzz(i)) -+ ssz=(rcell(3)*xxx(i)+rcell(6)*yyy(i)+rcell(9)*zzz(i)) -+ -+ xss=ssx-nint(ssx) -+ yss=ssy-nint(ssy) -+ zss=ssz-nint(ssz) -+ -+ xxx(i)=(cell(1)*xss+cell(4)*yss+cell(7)*zss) -+ yyy(i)=(cell(2)*xss+cell(5)*yss+cell(8)*zss) -+ zzz(i)=(cell(3)*xss+cell(6)*yss+cell(9)*zss) -+ -+ enddo -+ -+ else if(imcon.eq.4)then -+ -+c truncated octahedral boundary conditions -+ -+ if(.not.(abs(cell(1)-cell(5)).lt.1.d-6.and. -+ x abs(cell(5)-cell(9)).lt.1.d-6)) call error(idnode,130) -+ -+ aaa=1.d0/cell(1) -+ -+ do i=iatm1,iatm2 -+ -+ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) -+ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) -+ zzz(i)=zzz(i)-cell(1)*nint(aaa*zzz(i)) -+ -+ if((abs(xxx(i))+abs(yyy(i))+abs(zzz(i))).ge. -+ x (0.75d0*cell(1)))then -+ -+ xxx(i)=xxx(i)-0.5d0*sign(cell(1),xxx(i)) -+ yyy(i)=yyy(i)-0.5d0*sign(cell(1),yyy(i)) -+ zzz(i)=zzz(i)-0.5d0*sign(cell(1),zzz(i)) -+ -+ endif -+ -+ enddo -+ -+ else if(imcon.eq.5)then -+ -+c rhombic dodecahedral boundary conditions -+ -+ if(.not.(abs(cell(1)-cell(5)).lt.1.d-6.and. -+ x abs(cell(9)-cell(1)*rt2).lt.1.d-6)) -+ x call error(idnode,140) -+ -+ aaa=1.d0/cell(1) -+ bbb=1.d0/cell(9) -+ -+ do i=iatm1,iatm2 -+ -+ xxx(i)=xxx(i)-cell(1)*nint(aaa*xxx(i)) -+ yyy(i)=yyy(i)-cell(1)*nint(aaa*yyy(i)) -+ zzz(i)=zzz(i)-cell(9)*nint(bbb*zzz(i)) -+ -+ if((abs(xxx(i))+abs(yyy(i))+abs(rt2*zzz(i))).ge. -+ x cell(1))then -+ -+ xxx(i)=xxx(i)-0.5d0*sign(cell(1),xxx(i)) -+ yyy(i)=yyy(i)-0.5d0*sign(cell(1),yyy(i)) -+ zzz(i)=zzz(i)-0.5d0*sign(cell(9),zzz(i)) -+ -+ endif -+ -+ enddo -+ -+ else if(imcon.eq.6) then -+ -+c x-y boundary conditions -+ -+ det = cell(1)*cell(5) - cell(2)*cell(4) -+ -+ if(abs(det).lt.1.d-6)call error(idnode,120) -+ -+ det = 1.d0/det -+ -+ rcell(1) = det*cell(5) -+ rcell(2) = -det*cell(2) -+ rcell(4) = -det*cell(4) -+ rcell(5) = det*cell(1) -+ -+ do i=iatm1,iatm2 -+ -+ ssx = rcell(1)*xxx(i) + rcell(4)*yyy(i) -+ ssy = rcell(2)*xxx(i) + rcell(5)*yyy(i) -+ -+ xss = ssx - nint(ssx) -+ yss = ssy - nint(ssy) -+ -+ xxx(i)=cell(1)*xss + cell(4)*yss -+ yyy(i)=cell(2)*xss + cell(5)*yss -+ -+ enddo -+ -+ else if(imcon.eq.7) then -+ -+c hexagonal prism boundary conditions -+ -+ if(abs(cell(1)-rt3*cell(5)).ge.1.d-6) -+ x call error(idnode,135) -+ -+ aaa=cell(1)/(rt3*2.d0) -+ bbb=cell(1)/rt3 -+ ccc=rt3/cell(1) -+ ddd=1.d0/cell(9) -+ -+ do i=iatm1,iatm2 -+ -+ yyy(i)=yyy(i)-bbb*nint(ccc*yyy(i)) -+ zzz(i)=zzz(i)-cell(9)*nint(ddd*zzz(i)) -+ -+ if((abs(yyy(i))+abs(rt3*xxx(i))).ge.bbb)then -+ -+ xxx(i)=xxx(i)-rt3*sign(aaa,xxx(i)) -+ yyy(i)=yyy(i)-sign(aaa,yyy(i)) -+ -+ endif -+ -+ enddo -+ -+ endif -+ -+ return -+ end subroutine images -+ -+ subroutine config_write(fname,levcfg,imcon,natms,engcfg) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for writing CONFIG files -+c -+c copyright - daresbury laboratory -+c author - w. smith aug 2007 -+c -+c*********************************************************************** -+ -+ use config_module -+ use setup_module -+ -+ implicit none -+ -+ character*6 fname -+ -+ integer i,natms,levcfg,imcon,nstep -+ real(8) engcfg -+ -+ open(nconf,file=fname,form='formatted') -+ -+ write(nconf,'(80a1)') cfgname -+ write(nconf,'(3i10,1p,g20.12)') levcfg,imcon,natms,engcfg -+ if(imcon.gt.0) write(nconf,'(3f20.12)') cell -+ -+ do i=1,natms -+ -+ write(nconf,'(a8,i10)') atmnam(i),i -+ write(nconf,'(3g20.10)') xxx(i),yyy(i),zzz(i) -+ if(levcfg.gt.0)write(nconf,'(3g20.12)') -+ x vxx(i),vyy(i),vzz(i) -+ if(levcfg.gt.1)write(nconf,'(3g20.12)') -+ x fxx(i),fyy(i),fzz(i) -+ -+ enddo -+ -+ close (nconf) -+ -+ return -+ end subroutine config_write -+ -+ subroutine bomb(idnode,nyr,nmn,ndy) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to set an expiry date in a compiled program -+c -+c copyright - daresbury laboratory -+c author - w. smith oct 2002 -+c -+c*********************************************************************** -+ -+ use setup_module -+ -+ implicit none -+ -+ logical safe -+ integer info(8) -+ character*12 dat,tim,zon -+ integer idnode,nyr,nmn,ndy -+ -+ safe=.true. -+ -+ call date_and_time(dat,tim,zon,info) -+ -+ if(info(1).gt.nyr)then -+ -+ safe=.false. -+ -+ else if(info(1).eq.nyr)then -+ -+ if(info(2).gt.nmn)then -+ -+ safe=.false. -+ -+ else if(info(2).eq.nmn)then -+ -+ if(info(3).ge.ndy)safe=.false. -+ -+ endif -+ -+ endif -+ -+ if(.not.safe)then -+ -+ if(idnode.eq.0)write(nrite,'(a,/,a)') -+ x 'THE EXPIRY DATE OF THIS EXECUTABLE HAS PASSED.', -+ X 'PLEASE CONTACT W.SMITH@DL.AC.UK FOR A NEW LICENCE' -+ -+ call exitcomms() -+ -+ endif -+ -+ return -+ end subroutine bomb -+ -+ subroutine cpy_rtc(nnn,aaa,bbb) -+ -+c********************************************************************** -+c -+c dl_poly subroutine for copying a real array into a complex array -+c of the same dimension -+c -+c copyright daresbury laboratory 1998 -+c author w.smith oct 1998 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i,nnn -+ real(8) aaa(*) -+ complex(8) bbb(*) -+ -+ do i=1,nnn -+ -+ bbb(i)=cmplx(aaa(i),0.d0,kind=8) -+ -+ enddo -+ -+ return -+ end subroutine cpy_rtc -+ -+ function duni() -+ -+c********************************************************************* -+c -+c dl_poly random number generator based on the universal -+c random number generator of marsaglia, zaman and tsang -+c (stats and prob. lett. 8 (1990) 35-39.) it must be -+c called once to initialise parameters u,c,cd,cm -+c -+c copyright daresbury laboratory 1992 -+c author - w.smith july 1992 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical new -+ integer ir,jr,i,j,k,l,m,ii,jj -+ real(4) s,t,u,c,cd,cm,uni -+ real(8) duni -+ dimension u(97) -+ save u,c,cd,cm,uni,ir,jr,new -+ data new/.true./ -+ -+ if(new)then -+ -+c initial values of i,j,k must be in range 1 to 178 (not all 1) -+c initial value of l must be in range 0 to 168. -+ -+ i=12 -+ j=34 -+ k=56 -+ l=78 -+c -+ ir=97 -+ jr=33 -+ new=.false. -+ -+ do 200 ii=1,97 -+ s=0.0 -+ t=0.5 -+ do 100 jj=1,24 -+ m=mod(mod(i*j,179)*k,179) -+ i=j -+ j=k -+ k=m -+ l=mod(53*l+1,169) -+ if(mod(l*m,64).ge.32)s=s+t -+ t=0.5*t -+ 100 continue -+ u(ii)=s -+ 200 continue -+ c = 362436.0/16777216.0 -+ cd= 7654321.0/16777216.0 -+ cm=16777213.0/16777216.0 -+ else -+ -+c calculate random number -+ uni=u(ir)-u(jr) -+ if(uni.lt.0.0)uni=uni+1.0 -+ u(ir)=uni -+ ir=ir-1 -+ if(ir.eq.0)ir=97 -+ jr=jr-1 -+ if(jr.eq.0)jr=97 -+ c=c-cd -+ if(c.lt.0.0)c=c+cm -+ uni=uni-c -+ if(uni.lt.0.0)uni=uni+1.0 -+ duni=dble(uni) -+ endif -+ -+ return -+ end function duni -+ -+ subroutine ele_prd(nnn,aaa,bbb,ccc) -+ -+c********************************************************************** -+c -+c dl_poly subroutine for element by element product of -+c a real array (bbb) and a complex array (ccc) -+c -+c copyright daresbury laboratory 1998 -+c author w.smith july 1998 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer i,nnn -+ real(8) bbb(*) -+ complex(8) aaa(*),ccc(*) -+ -+ do i=1,nnn -+ -+ aaa(i)=bbb(i)*ccc(i) -+ -+ enddo -+ -+ return -+ end subroutine ele_prd -+ -+ subroutine gauss(natms,vxx,vyy,vzz) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for constructing velocity arrays -+c with a gaussian distribution of unit variance. -+c -+c based on the Box-Muller method -+c -+c note - this version uses a universal random number -+c generator, which generates pseudo-random numbers between -+c 0 and 1. it is based on the algorithm of marsaglia, zaman -+c and tsang in: stats and prob. lett. 8 (1990) 35-39. -+c -+c copyright daresbury laboratory 2007 -+c author - w. smith nov 2007 -+c -+c********************************************************************* -+ -+ use setup_module -+ -+ implicit none -+ -+ integer natms,i -+ real(8) vxx,vyy,vzz,rrr,rr1,rr2 -+ -+ dimension vxx(natms),vyy(natms),vzz(natms) -+ -+c initialise random number generator -+ -+ rrr=duni() -+ -+c calculate gaussian random numbers -+ -+ do i=1,2*(natms/2),2 -+ -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vxx(i)=rr1*cos(rr2) -+ vxx(i+1)=rr1*sin(rr2) -+ -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vyy(i)=rr1*cos(rr2) -+ vyy(i+1)=rr1*sin(rr2) -+ -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vzz(i)=rr1*cos(rr2) -+ vzz(i+1)=rr1*sin(rr2) -+ -+ enddo -+ if(mod(natms,2).ne.0)then -+ -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vxx(natms)=rr1*cos(rr2) -+ vyy(natms)=rr1*sin(rr2) -+ rr1=sqrt(-2.d0*log(duni())) -+ rr2=2.d0*pi*duni() -+ vzz(natms)=rr1*cos(rr2) -+ -+ endif -+ -+ return -+ end subroutine gauss -+ -+ subroutine invert(a,b,d) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine to invert a 3 * 3 matrix using cofactors -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith april 1992 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ real(8) a,b,d,r -+ -+ dimension a(9),b(9) -+ -+c calculate adjoint matrix -+ b(1)=a(5)*a(9)-a(6)*a(8) -+ b(2)=a(3)*a(8)-a(2)*a(9) -+ b(3)=a(2)*a(6)-a(3)*a(5) -+ b(4)=a(6)*a(7)-a(4)*a(9) -+ b(5)=a(1)*a(9)-a(3)*a(7) -+ b(6)=a(3)*a(4)-a(1)*a(6) -+ b(7)=a(4)*a(8)-a(5)*a(7) -+ b(8)=a(2)*a(7)-a(1)*a(8) -+ b(9)=a(1)*a(5)-a(2)*a(4) -+ -+c calculate determinant -+ d=a(1)*b(1)+a(4)*b(2)+a(7)*b(3) -+ r=0.d0 -+ if(abs(d).gt.0.d0)r=1.d0/d -+ -+c complete inverse matrix -+ b(1)=r*b(1) -+ b(2)=r*b(2) -+ b(3)=r*b(3) -+ b(4)=r*b(4) -+ b(5)=r*b(5) -+ b(6)=r*b(6) -+ b(7)=r*b(7) -+ b(8)=r*b(8) -+ b(9)=r*b(9) -+ -+ return -+ end subroutine invert -+ -+ subroutine jacobi(a,v,n) -+ -+c*********************************************************************** -+c -+c diagonalisation of real symmetric matices by jacobi method -+c -+c input parameters: -+c -+c a(n,n) is the matrix to be diagonalised -+c v(n,n) is the eigenvector matrix -+c n is the dimension of the matrices -+c -+c jacobi processes lower triangle only (upper triangle unchanged) -+c -+c variable rho sets absolute tolerance on convergence -+c variable tes is a moving tolerance that diminishes -+c on each pass until at true convergence tesdlrpot) .or. (ngrid-4 /= nint(cutpot/delpot))) then -+ -+ if (idnode == 0) write(nrite,"( -+ x 'expected radial increment : ',1p,e15.7,/, -+ x 'TABLE radial increment : ',1p,e15.7,/,/, -+ x 'expected number of grid points : ',0p,i10,/, -+ x 'grid points in TABLE : ',i10)") -+ x dlrpot, delpot, mxgrid, ngrid -+ -+ call error(idnode,22) -+ -+ endif -+ -+ if(cutpot.lt.rcut) call error(idnode,504) -+ if(abs(1.d0-(delpot/dlrpot)).gt.1.0d-8) then -+ if(idnode.eq.0) write(nrite, -+ x "(/,' TABLE arrays resized for mxgrid=',i10)") mxgrid -+ endif -+ -+c read potential arrays for all pairs -+ -+ do ivdw=1,ntpvdw -+ -+c read potential arrays if potential not already defined -+ -+ if(ltpvdw(ivdw).eq.0)then -+ -+c read pair potential labels and long range corrections -+ -+ call getrec(safe,idnode,ntable) -+ if(.not.safe)call abort_table_read(idnode,ntable) -+ -+ call getword(atom1,record,8,lenrec) -+ call getword(atom2,record,8,lenrec) -+ prmvdw(ivdw,1)=dblstr(record,lenrec,idum) -+ prmvdw(ivdw,2)=dblstr(record,lenrec,idum) -+ -+ katom1=0 -+ katom2=0 -+ -+ do jtpatm=1,ntpatm -+ -+ if(atom1.eq.unqatm(jtpatm))katom1=jtpatm -+ if(atom2.eq.unqatm(jtpatm))katom2=jtpatm -+ -+ enddo -+ -+ if(katom1.eq.0.or.katom2.eq.0)then -+ if(idnode.eq.0) -+ x write(nrite,'(a)') '****',atom1,'***',atom2,'****' -+ call error(idnode,81) -+ endif -+ -+ keyvdw=loc2(katom1,katom2) -+ -+ if(lstvdw(keyvdw).ne.ivdw) call error(idnode,23) -+ -+c read potential arrays -+ -+ if(mxbuff.lt.ngrid) then -+ -+ if(idnode.eq.0) -+ x write(nrite,*) 'mxbuff must be >=',ngrid,' in fortab' -+ call error(idnode,48) -+ -+ endif -+ -+c read in potential arrays -+ -+ do i=1,(ngrid+3)/4 -+ -+ l=min(4,ngrid-(i-1)*4) -+ if (idnode == 0) then -+ read(unit=ntable, fmt=*, end=100) -+ x (buffer((i-1)*4+j),j=1,l) -+ else -+ buffer((i-1)*4+1:(i-1)*4+l)=0.0d0 -+ endif -+ -+ enddo -+ call gdsum(buffer(1:ngrid),ngrid,buffer(ngrid+1:2*ngrid)) -+ -+c reconstruct arrays using 3pt interpolation -+ -+ rdr=1.d0/delpot -+ vvv(1,ivdw)=1.d0 -+ ggg(1,ivdw)=0.d0 -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ vk0=buffer(l) -+ vk1=buffer(l+1) -+ vk2=buffer(l+2) -+ -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ vvv(i,ivdw)=t1+(t2-t1)*ppp*0.5d0 -+ -+ enddo -+ -+c read in force arrays -+ -+ do i=1,(ngrid+3)/4 -+ -+ l=min(4,ngrid-(i-1)*4) -+ if (idnode == 0) then -+ read(unit=ntable, fmt=*, end=100) -+ x (buffer((i-1)*4+j),j=1,l) -+ else -+ buffer((i-1)*4+1:(i-1)*4+l)=0.0d0 -+ endif -+ -+ enddo -+ call gdsum(buffer(1:ngrid),ngrid,buffer(ngrid+1:2*ngrid)) -+ -+c reconstruct ggg arrays using 3pt interpolation -+ -+ do i=2,mxgrid -+ -+ rrr=dble(i)*dlrpot -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ vk0=buffer(l) -+ vk1=buffer(l+1) -+ vk2=buffer(l+2) -+ -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ -+ ggg(i,ivdw)=t1+(t2-t1)*ppp*0.5d0 -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c convert to internal units -+ -+ do k=1,ntpvdw -+ -+ if(ltpvdw(k).eq.0)then -+ -+ do i=1,mxgrid -+ -+ vvv(i,k)=vvv(i,k)*engunit -+ ggg(i,k)=ggg(i,k)*engunit -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+ if(idnode.eq.0)close (ntable) -+ -+ if(idnode.eq.0)write(nrite,'(/,/,1x,a)') -+ x 'potential tables read from TABLE file' -+ -+ return -+ -+c end of file error exit -+ -+ 100 call abort_table_read(idnode,ntable) -+ -+ end subroutine fortab -+ -+ subroutine abort_table_read(idnode,ntable) -+ -+c*********************************************************************** -+c -+c dl_poly error exit subroutine for reading TABLE file -+c -+c copyright - daresbury laboratory -+c author - w. smith sept 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ integer idnode,ntable -+ -+ if(idnode.eq.0)close (ntable) -+ -+ call error(idnode,24) -+ -+ end subroutine abort_table_read -+ -+ subroutine srfrce -+ x (lsolva,lfree,lghost,iatm,ik,engsrp,virsrp,rcut,dlrpot) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating short range force and -+c potential energy terms using verlet neighbour list -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992 -+c -+c version 3 -+c author - t. forester june 1993 -+c stress tensor added t.forester may 1994 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer iatm,ik,m,jatm,k,l,kkk -+ real(8) engsrp,virsrp,rcut,dlrpot -+ real(8) ab,rrr,rsq,ppp,t1,t2,vk0,vk1,vk2,gk0,gk1,gk2,gamma -+ real(8) fi,rcsq,rdr,ai,aj,fx,fy,fz,omega -+ real(8) strs(6),strs_loc(6) -+ -+ dimension fi(3) -+ -+CDIR$ CACHE_ALIGN fi -+ -+ lskip=(lfree.or.lghost) -+ if(lmetadyn)idrive=driven(ltype(iatm)) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c interpolation spacing -+ -+ rdr=1.d0/dlrpot -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engsrp=0.d0 -+ virsrp=0.d0 -+ -+c store forces for iatm -+ -+ ai=dble(ltype(iatm)) -+ fi(1)=fxx(iatm) -+ fi(2)=fyy(iatm) -+ fi(3)=fzz(iatm) -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ jatm=ilist(m) -+ if(lmetadyn)jdrive=driven(ltype(jatm)) -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ aj=dble(ltype(jatm)) -+ -+ if(ai.gt.aj) then -+ ab=ai*(ai-1.d0)*0.5d0+aj+0.5d0 -+ else -+ ab=aj*(aj-1.d0)*0.5d0+ai+0.5d0 -+ endif -+ -+ k=lstvdw(int(ab)) -+ -+ if((ltpvdw(k).lt.100).and.(abs(vvv(1,k)).gt.1.d-10))then -+ -+c apply truncation of potential -+ -+ rsq=rsqdf(m) -+ -+ if(rcsq.gt.rsq)then -+ -+ rrr=sqrt(rsq) -+ l=int(rrr*rdr) -+ ppp=rrr*rdr-dble(l) -+ -+ if(l.eq.0)then -+ -+ omega=vvv(1,k) -+ gamma=ggg(1,k) -+ -+ else -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0=vvv(l,k) -+ vk1=vvv(l+1,k) -+ vk2=vvv(l+2,k) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ omega=t1+(t2-t1)*ppp*0.5d0 -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=ggg(l,k) -+ gk1=ggg(l+1,k) -+ gk2=ggg(l+2,k) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ gamma=(t1+(t2-t1)*ppp*0.5d0)/rsq -+ -+ endif -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+omega -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ vdw_fre=vdw_fre-omega -+ vdw_vir=vdw_vir+gamma*rsq -+ omega=lambda1*omega -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ vdw_fre=vdw_fre+omega -+ vdw_vir=vdw_vir-gamma*rsq -+ omega=lambda2*omega -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential and virial -+ -+ engsrp=engsrp+omega -+ virsrp=virsrp-gamma*rsq -+ -+ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+omega -+ -+c calculate forces -+ -+ fx=gamma*xdf(m) -+ fy=gamma*ydf(m) -+ fz=gamma*zdf(m) -+ -+ fi(1)=fi(1)+fx -+ fi(2)=fi(2)+fy -+ fi(3)=fi(3)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc-gamma*rsq -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c load temps back to fxx(iatm) etc -+ -+ fxx(iatm)=fi(1) -+ fyy(iatm)=fi(2) -+ fzz(iatm)=fi(3) -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine srfrce -+ -+ subroutine lrcorrect -+ x (lsolva,lfree,lghost,idnode,imcon,keyfce,natms, -+ x ntpatm,ntpvdw,elrc,engunit,virlrc,rcut,volm) -+ -+c************************************************************************* -+c -+c DL_POLY subroutine to evaluate long-range corrections to -+c pressure and energy in a periodic system. -+c -+c copyright daresbury laboratory 1993 -+c author - t. forester may 1993 -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*************************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=10 -+ logical lsolva,lfree,lghost -+ integer idnode,imcon,keyfce,natms,ntpatm,i,ka,ntpvdw -+ integer ivdw,j,k,it,jt,kt,fail -+ real(8) natyp,nbtyp,nctyp,ndtyp,nafrz,nbfrz,ncfrz,ndfrz -+ real(8) elrc,engunit,virlrc,rcut,volm,twopi,eadd,padd -+ real(8) denprd,aaa,bbb,ccc,ddd,eee,eps,sig,rr0,ann,amm -+ real(8) denprd1,denprd2,denprd3,denprdf -+ integer, allocatable :: numtyp_sol0(:,:),numfrz_sol0(:,:) -+ integer, allocatable :: numtyp_sol1(:,:),numfrz_sol1(:,:) -+ integer, allocatable :: numtyp_sol2(:,:),numfrz_sol2(:,:) -+ integer, allocatable :: numtyp_fre(:,:),numfrz_fre(:,:) -+ real(8), allocatable :: elrc_sol0(:),elrc_exc0(:) -+ -+ dimension fail(nnn) -+ -+ twopi=2.0d0*pi -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ if(lfree.or.lghost)then -+ -+ allocate (numtyp_fre(mxatyp,0:2),stat=fail(1)) -+ allocate (numfrz_fre(mxatyp,0:2),stat=fail(2)) -+ allocate (elrc_exc0(mxtmls_exc2),stat=fail(3)) -+ -+ endif -+ -+ if(lsolva)then -+ -+ allocate (elrc_sol0(mxtmls_sol2),stat=fail(4)) -+ allocate (numtyp_sol0(mxatyp,mxtmls),stat=fail(5)) -+ allocate (numfrz_sol0(mxatyp,mxtmls),stat=fail(6)) -+ -+ if(lghost)then -+ -+ allocate (numtyp_sol1(mxatyp,mxtmls),stat=fail(7)) -+ allocate (numfrz_sol1(mxatyp,mxtmls),stat=fail(8)) -+ allocate (numtyp_sol2(mxatyp,mxtmls),stat=fail(9)) -+ allocate (numfrz_sol2(mxatyp,mxtmls),stat=fail(10)) -+ -+ endif -+ -+ endif -+ -+ do i=1,nnn -+ if(fail(i).ne.0)call error(idnode,1015) -+ enddo -+ -+c initalise counter arrays -+ -+ do i=1,ntpatm -+ -+ numtyp(i)=0 -+ numfrz(i)=0 -+ -+ enddo -+ -+ if(lfree.or.lghost)then -+ -+ numtyp_fre(:,:)=0 -+ numfrz_fre(:,:)=0 -+ -+ endif -+ -+ if(lsolva)then -+ -+ numtyp_sol0(:,:)=0 -+ numfrz_sol0(:,:)=0 -+ -+ if(lghost)then -+ -+ numtyp_sol1(:,:)=0 -+ numfrz_sol1(:,:)=0 -+ numtyp_sol2(:,:)=0 -+ numfrz_sol2(:,:)=0 -+ -+ endif -+ -+ endif -+ -+c evaluate number density in system -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ numtyp(ka)=numtyp(ka)+1 -+ if(lstfrz(i).ne.0)numfrz(ka)=numfrz(ka)+1 -+ -+ enddo -+ -+ if(lfree.or.lghost)then -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ numtyp_fre(ka,atm_fre(i))=numtyp_fre(ka,atm_fre(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_fre(ka,atm_fre(i))=numfrz_fre(ka,atm_fre(i))+1 -+ -+ enddo -+ -+ endif -+ -+ if(lsolva)then -+ -+ if(lghost)then -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ -+ if(atm_fre(i).eq.0)then -+ -+ numtyp_sol0(ka,atmolt(i))=numtyp_sol0(ka,atmolt(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_sol0(ka,atmolt(i))=numfrz_sol0(ka,atmolt(i))+1 -+ -+ elseif(atm_fre(i).eq.1)then -+ -+ numtyp_sol1(ka,atmolt(i))=numtyp_sol1(ka,atmolt(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_sol1(ka,atmolt(i))=numfrz_sol1(ka,atmolt(i))+1 -+ -+ elseif(atm_fre(i).eq.2)then -+ -+ numtyp_sol2(ka,atmolt(i))=numtyp_sol2(ka,atmolt(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_sol2(ka,atmolt(i))=numfrz_sol2(ka,atmolt(i))+1 -+ -+ endif -+ -+ enddo -+ -+ else -+ -+ do i=1,natms -+ -+ ka=ltype(i) -+ numtyp_sol0(ka,atmolt(i))=numtyp_sol0(ka,atmolt(i))+1 -+ if(lstfrz(i).ne.0) -+ x numfrz_sol0(ka,atmolt(i))=numfrz_sol0(ka,atmolt(i))+1 -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c number densities -+ -+ do i=1,ntpatm -+ dens(i)=dble(numtyp(i))/volm -+ enddo -+ -+c long range corrections to energy and pressure -+ -+ elrc=0.d0 -+ elrc2=0.d0 -+ virlrc=0.d0 -+ virlrc2=0.d0 -+ denprdf=0.d0 -+ volm_sav=0.d0 -+ elrc_fre=0.d0 -+ vlrc_fre=0.d0 -+ -+ if(imcon.ne.0.and.imcon.ne.6.and.ntpvdw.gt.0) then -+ -+ if(mod(keyfce,2).eq.1) then -+ -+ ivdw=0 -+ -+ do i=1,ntpatm -+ -+ do j=1,i -+ -+ eadd=0.d0 -+ padd=0.d0 -+ -+ ivdw=ivdw+1 -+ k=lstvdw(ivdw) -+ -+ if(ltpvdw(k).eq.0) then -+ -+c tabulated potential -+ -+ eadd=prmvdw(k,1) -+ padd=-prmvdw(k,2) -+ -+ else if(ltpvdw(k).eq.1) then -+ -+c 12-6 potential -+ -+ aaa=prmvdw(k,1) -+ bbb=prmvdw(k,2) -+ -+ eadd=aaa/(9.d0*rcut**9)-bbb/(3.d0*rcut**3) -+ padd=12.d0*aaa/(9.d0*rcut**9)-6.d0*bbb/(3.d0*rcut**3) -+ -+ else if(ltpvdw(k).eq.2) then -+ -+c Lennard Jones potential -+ -+ eps=prmvdw(k,1) -+ sig=prmvdw(k,2) -+ -+ eadd=4.d0*eps*(sig**12/(9.d0*rcut**9)- -+ x sig**6/(3.d0*rcut**3)) -+ padd=4.d0*eps*(12.d0*sig**12/(9.d0*rcut**9)- -+ x 2.d0*sig**6/(rcut**3)) -+ -+ else if(ltpvdw(k).eq.3) then -+ -+c n - m potential -+ -+ eps=prmvdw(k,1) -+ ann=prmvdw(k,2) -+ amm=prmvdw(k,3) -+ rr0=prmvdw(k,4) -+ -+ eadd=eps/(ann-amm)*(amm*rr0**ann/((ann-3.d0)* -+ x rcut**(ann-3.d0))-ann*rr0**amm/((amm-3.0d0)* -+ x rcut**(amm-3.d0))) -+ padd=eps/(ann-amm)*ann*amm*(rr0**ann/((ann-3.d0)* -+ x rcut**(ann-3.d0))-rr0**amm/((amm-3.0d0)* -+ x rcut**(amm-3.d0))) -+ -+ else if(ltpvdw(k).eq.4) then -+ -+c buckingham exp - 6 potential -+ -+ ccc=prmvdw(k,3) -+ -+ eadd=-ccc/(3.d0*rcut**3) -+ padd=-2.d0*ccc/(rcut**3) -+ -+ else if(ltpvdw(k).eq.5) then -+ -+c born huggins meyer exp -6 - 8 potential -+ -+ ddd=prmvdw(k,4) -+ eee=prmvdw(k,5) -+ -+ eadd=-ddd/(3.d0*rcut**3)-eee/(5.d0*rcut**5) -+ padd=-2.d0*ddd/(rcut**3)-8.d0*eee/(5.d0*rcut**5) -+ -+ else if(ltpvdw(k).eq.6) then -+ -+c hydrogen bond 12 - 10 potential -+ -+ aaa=prmvdw(k,1) -+ bbb=prmvdw(k,2) -+ -+ eadd=aaa/(9.d0*rcut**9)-bbb/(7.d0*rcut**7) -+ padd=12.d0*aaa/(9.d0*rcut**9)-1.d1*bbb/(7.d0*rcut**7) -+ -+ endif -+ -+ if(i.ne.j) then -+ -+ eadd=eadd*2.d0 -+ padd=padd*2.d0 -+ -+ endif -+ -+ if(.not.(lfree.or.lghost))then -+ -+ denprd=twopi*(dble(numtyp(i))*dble(numtyp(j))- -+ x dble(numfrz(i))*dble(numfrz(j)))/volm**2 -+ -+ else -+ -+ nafrz=dble(numfrz_fre(i,0)+numfrz_fre(i,1)) -+ natyp=dble(numtyp_fre(i,0)+numtyp_fre(i,1)) -+ nbfrz=dble(numfrz_fre(j,0)+numfrz_fre(j,1)) -+ nbtyp=dble(numtyp_fre(j,0)+numtyp_fre(j,1)) -+ ncfrz=dble(numfrz_fre(i,0)+numfrz_fre(i,2)) -+ nctyp=dble(numtyp_fre(i,0)+numtyp_fre(i,2)) -+ ndfrz=dble(numfrz_fre(j,0)+numfrz_fre(j,2)) -+ ndtyp=dble(numtyp_fre(j,0)+numtyp_fre(j,2)) -+ -+ if(lghost)then -+ -+ denprd=twopi*(natyp*nbtyp-nafrz*nbfrz)/volm**2 -+ denprd3=twopi*(nctyp*ndtyp-ncfrz*ndfrz)/volm**2 -+ -+ elseif(lfree)then -+ -+ denprd1=twopi*(natyp*nbtyp-nafrz*nbfrz)/volm**2 -+ denprd2=twopi*(nctyp*ndtyp-ncfrz*ndfrz)/volm**2 -+ denprd=lambda1*denprd1+lambda2*denprd2 -+ denprd3=lambda2*denprd1+lambda1*denprd2 -+ denprdf=denprd2-denprd1 -+ -+ endif -+ -+ endif -+ -+ elrc=elrc+volm*denprd*eadd -+ virlrc=virlrc-denprd*padd*volm -+ -+ if(lfree.or.lghost)then -+ -+ elrc2=elrc2+volm*denprd3*eadd -+ virlrc2=virlrc2-denprd3*padd*volm -+ if(lfree)then -+ elrc_fre=elrc_fre+volm*denprdf*eadd -+ vlrc_fre=vlrc_fre-denprdf*padd*volm -+ endif -+ -+ endif -+ -+ if(lsolva)then -+ -+ elrc_sol0(:)=0.d0 -+ if(lghost)elrc_exc0(:)=0.d0 -+ -+ do it=1,mxtmls -+ -+ do jt=1,mxtmls -+ -+ kt=loc2(it,jt) -+ -+ if(lghost)then -+ -+ natyp=dble(numtyp_sol0(i,it)+numtyp_sol1(i,it)) -+ nbtyp=dble(numtyp_sol0(j,jt)+numtyp_sol1(j,jt)) -+ nafrz=dble(numfrz_sol0(i,it)+numfrz_sol1(i,it)) -+ nbfrz=dble(numfrz_sol0(j,jt)+numfrz_sol1(j,jt)) -+ -+ elrc_sol0(kt)=elrc_sol0(kt)+twopi*(natyp* -+ x nbtyp-nafrz*nbfrz)/volm**2 -+ -+ nctyp=dble(numtyp_sol0(i,it)+numtyp_sol2(i,it)) -+ ndtyp=dble(numtyp_sol0(j,jt)+numtyp_sol2(j,jt)) -+ ncfrz=dble(numfrz_sol0(i,it)+numfrz_sol2(i,it)) -+ ndfrz=dble(numfrz_sol0(j,jt)+numfrz_sol2(j,jt)) -+ -+ elrc_exc0(kt)=elrc_exc0(kt)+twopi*(nctyp* -+ x ndtyp-ncfrz*ndfrz)/volm**2 -+ -+ else -+ -+ natyp=dble(numtyp_sol0(i,it)) -+ nbtyp=dble(numtyp_sol0(j,jt)) -+ nafrz=dble(numfrz_sol0(i,it)) -+ nbfrz=dble(numfrz_sol0(j,jt)) -+ -+ elrc_sol0(kt)=elrc_sol0(kt)+twopi*(natyp* -+ x nbtyp-nafrz*nbfrz)/volm**2 -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ if(lghost)then -+ -+ elrc_sol(:)=elrc_sol(:)+volm*eadd*elrc_sol0(:) -+ elrc_exc(:)=elrc_exc(:)+volm*eadd*elrc_exc0(:) -+ -+ else -+ -+ elrc_sol(:)=elrc_sol(:)+volm*eadd*elrc_sol0(:) -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+ enddo -+ -+ if(lfree.or.lghost)then -+ -+ elrc_sav=elrc -+ elrc2_sav=elrc2 -+ virlrc_sav=virlrc -+ virlrc2_sav=virlrc2 -+ elrc_fre_sav=elrc_fre -+ vlrc_fre_sav=vlrc_fre -+ -+ endif -+ -+ volm_sav=volm -+ -+ if(lghost)then -+ -+ elrc_sol_sav(:)=elrc_sol(:) -+ elrc_exc_sav(:)=elrc_exc(:) -+ -+ elseif(lsolva)then -+ -+ elrc_sol_sav(:)=elrc_sol(:) -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ if(idnode.eq.0)then -+ -+ write(nrite, -+ x "(/,/,'long range correction for: vdw energy ',e15.6,/, -+ x 25x,': vdw pressure',e15.6)")elrc/engunit, -+ x prsunt*virlrc/(-3.d0*volm) -+ -+ if(lghost) -+ x write(nrite, -+ x "(/,/,'long range correction for: vdw energy ',e15.6,/, -+ x 25x,': vdw pressure',e15.6)")elrc2/engunit, -+ x prsunt*virlrc2/(-3.d0*volm) -+ -+ endif -+ -+c deallocate work arrays -+ -+ if(lfree.or.lghost) -+ x deallocate (elrc_exc0,numtyp_fre,numfrz_fre,stat=fail(1)) -+ -+ if(lsolva)then -+ -+ deallocate (elrc_sol0,numtyp_sol0,numfrz_sol0,stat=fail(2)) -+ -+ if(lghost)then -+ -+ deallocate (numtyp_sol1,numfrz_sol1,stat=fail(3)) -+ deallocate (numtyp_sol2,numfrz_sol2,stat=fail(4)) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine lrcorrect -+ -+ -+ subroutine srfrceneu -+ x (lsolva,lfree,lghost,ik,engsrp,virsrp,dlrpot,rcut) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for calculating short range force and -+c potential energy terms using verlet neighbour list -+c neutral group implementation -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory 1992 -+c author - w. smith march 1992 -+c -+c neutral groups -+c author - t. forester march 1994 -+c -+c adapted - p.-a. cazade oct 2007: solvation, free energy etc -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical lsolva,lfree,lghost,lselect,lskip,idrive,jdrive -+ integer ik,m,iatm,jatm,l,k,kkk -+ real(8) engsrp,virsrp,dlrpot,rcut,rcsq,fx,fy,fz,omega,omega_exc -+ real(8) rrr,ppp,vk0,vk1,vk2,t1,t2,gk0,gk1,gk2,rdlpot,gamma -+ real(8) ai,aj,ak,rsq,strs(6),strs_loc(6) -+ -+ lskip=(lfree.or.lghost) -+ -+c set cutoff condition for pair forces -+ -+ rcsq=rcut**2 -+ -+c reciprocal of interpolation spacing -+ -+ rdlpot=1.d0/dlrpot -+ -+c initialise stress tensor accumulators -+ -+ strs(:)=0.d0 -+ strs_loc(:)=0.d0 -+ -+c initialise potential energy and virial -+ -+ engsrp=0.d0 -+ virsrp=0.d0 -+ -+c start of primary loop for forces evaluation -+ -+ do m=1,ik -+ -+c atomic and potential function indices -+ -+ iatm=ilist(m) -+ jatm=jlist(m) -+ -+c metadynamics local definitions -+ -+ if(lmetadyn)then -+ -+ idrive=driven(ltype(iatm)) -+ jdrive=driven(ltype(jatm)) -+ -+ endif -+ -+ if(lskip)then -+ if(atm_fre(iatm)*atm_fre(jatm).eq.2)cycle -+ endif -+ -+ aj=ltype(jatm) -+ ai=ltype(iatm) -+ -+ if(ai.gt.aj) then -+ ak=(ai*(ai-1.d0)*0.5d0+aj+0.5d0) -+ else -+ ak=(aj*(aj-1.d0)*0.5d0+ai+0.5d0) -+ endif -+ k=lstvdw(int(ak)) -+ -+ if(abs(vvv(1,k)).gt.1.d-10)then -+ -+ rsq=rsqdf(m) -+ -+ if(rsq.lt.rcsq) then -+ -+ rrr=sqrt(rsq) -+ -+c determine interpolation panel for force arrays -+ -+ l=int(rrr*rdlpot) -+ ppp=rrr*rdlpot-dble(l) -+ -+c calculate interaction energy using 3-point interpolation -+ -+ vk0=vvv(l,k) -+ vk1=vvv(l+1,k) -+ vk2=vvv(l+2,k) -+ t1=vk0+(vk1-vk0)*ppp -+ t2=vk1+(vk2-vk1)*(ppp-1.0d0) -+ omega=t1+(t2-t1)*ppp*0.5d0 -+ -+c calculate forces using 3-point interpolation -+ -+ gk0=ggg(l,k) -+ gk1=ggg(l+1,k) -+ gk2=ggg(l+2,k) -+ t1=gk0+(gk1-gk0)*ppp -+ t2=gk1+(gk2-gk1)*(ppp-1.0d0) -+ gamma=(t1+(t2-t1)*ppp*0.5d0)/rsq -+ -+c set selection control -+ -+ lselect=.true. -+ -+c set double index -+ -+ if(lsolva)kkk=loc2(atmolt(iatm),atmolt(jatm)) -+ -+ if(lghost)then -+ -+c selected excitation option -+ -+ if((atm_fre(iatm).ne.1).and.(atm_fre(jatm).ne.1))then -+ -+c reset selection control -+ -+ lselect=(atm_fre(iatm)+atm_fre(jatm).eq.0) -+ -+ if(lsolva)vdw_exc(kkk)=vdw_exc(kkk)+omega -+ -+ endif -+ -+ elseif(lfree)then -+ -+c selected free energy option -+ -+ if((atm_fre(iatm).eq.1).or.(atm_fre(jatm).eq.1))then -+ -+c set hamiltonian mixing parameter -+ -+ omega=lambda1*omega -+ gamma=lambda1*gamma -+ -+ elseif((atm_fre(iatm).eq.2).or.(atm_fre(jatm).eq.2))then -+ -+c set hamiltonian mixing parameter -+ -+ omega=lambda2*omega -+ gamma=lambda2*gamma -+ -+ endif -+ -+ endif -+ -+ if(lselect)then -+ -+c calculate potential energy and virial -+ -+ engsrp=omega+engsrp -+ virsrp=virsrp-gamma*rsq -+ -+ if(lsolva)vdw_sol(kkk)=vdw_sol(kkk)+omega -+ -+ fx=gamma*xdf(m) -+ fy=gamma*ydf(m) -+ fz=gamma*zdf(m) -+ -+ fxx(iatm)=fxx(iatm)+fx -+ fyy(iatm)=fyy(iatm)+fy -+ fzz(iatm)=fzz(iatm)+fz -+ -+ fxx(jatm)=fxx(jatm)-fx -+ fyy(jatm)=fyy(jatm)-fy -+ fzz(jatm)=fzz(jatm)-fz -+ -+c calculate stress tensor -+ -+ strs(1)=strs(1)+xdf(m)*fx -+ strs(2)=strs(2)+xdf(m)*fy -+ strs(3)=strs(3)+xdf(m)*fz -+ strs(4)=strs(4)+ydf(m)*fy -+ strs(5)=strs(5)+ydf(m)*fz -+ strs(6)=strs(6)+zdf(m)*fz -+ -+ endif -+ -+c metadynamics local parameters -+ -+ if(lmetadyn.and.(idrive.or.jdrive))then -+ -+c local energy and virial -+ -+ eng_loc=eng_loc+omega -+ vir_loc=vir_loc-gamma*rsq -+ -+c local forces -+ -+ fxx_loc(iatm)=fxx_loc(iatm)+fx -+ fyy_loc(iatm)=fyy_loc(iatm)+fy -+ fzz_loc(iatm)=fzz_loc(iatm)+fz -+ -+ fxx_loc(jatm)=fxx_loc(jatm)-fx -+ fyy_loc(jatm)=fyy_loc(jatm)-fy -+ fzz_loc(jatm)=fzz_loc(jatm)-fz -+ -+c local stress tensor -+ -+ strs_loc(1)=strs_loc(1)+xdf(m)*fx -+ strs_loc(2)=strs_loc(2)+xdf(m)*fy -+ strs_loc(3)=strs_loc(3)+xdf(m)*fz -+ strs_loc(4)=strs_loc(4)+ydf(m)*fy -+ strs_loc(5)=strs_loc(5)+ydf(m)*fz -+ strs_loc(6)=strs_loc(6)+zdf(m)*fz -+ -+ endif -+ -+ endif -+ -+ endif -+ -+ enddo -+ -+c complete stress tensor -+ -+ stress(1)=stress(1)+strs(1) -+ stress(2)=stress(2)+strs(2) -+ stress(3)=stress(3)+strs(3) -+ stress(4)=stress(4)+strs(2) -+ stress(5)=stress(5)+strs(4) -+ stress(6)=stress(6)+strs(5) -+ stress(7)=stress(7)+strs(3) -+ stress(8)=stress(8)+strs(5) -+ stress(9)=stress(9)+strs(6) -+ -+ if(lmetadyn)then -+ -+ stress_loc(1)=stress_loc(1)+strs_loc(1) -+ stress_loc(2)=stress_loc(2)+strs_loc(2) -+ stress_loc(3)=stress_loc(3)+strs_loc(3) -+ stress_loc(4)=stress_loc(4)+strs_loc(2) -+ stress_loc(5)=stress_loc(5)+strs_loc(4) -+ stress_loc(6)=stress_loc(6)+strs_loc(5) -+ stress_loc(7)=stress_loc(7)+strs_loc(3) -+ stress_loc(8)=stress_loc(8)+strs_loc(5) -+ stress_loc(9)=stress_loc(9)+strs_loc(6) -+ -+ endif -+ -+ return -+ end subroutine srfrceneu -+ -+ end module vdw_module -diff -urN dl_class_1.9.orig/srcmod/vv_motion_module.f dl_class_1.9/srcmod/vv_motion_module.f ---- dl_class_1.9.orig/srcmod/vv_motion_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/vv_motion_module.f 2011-02-22 12:46:30.000000000 +0100 -@@ -0,0 +1,3031 @@ -+ module vv_motion_module -+ -+c*********************************************************************** -+c -+c dl_poly module for velocity verlet integration schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use metafreeze_module,only : lmetadyn -+ use property_module -+ use setup_module -+ use shake_module -+ use site_module -+ use utility_module -+ -+ contains -+ -+ subroutine rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,stresh) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for applying bond constraint corrections after -+c atomic integration. rattle algorithm -+c must be used in conjunction with integration algorithms -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical check,safe,lshmov -+ integer idnode,imcon,mxnode,natms,nscons,icyc,i,j,k -+ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,esig -+ real(8) txx,tyy,tzz,xxt,yyt,zzt,stresh,dx,dy,dz,dis,omega2 -+ real(8) strs1,strs2,strs3,strs5,strs6,strs9,amti,amtj,gamma -+ real(8) gammi,gammj,dli,dlj -+ -+ dimension stresh(9) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ -+c constraint virial -+ -+ vircon=0.d0 -+ -+c accumulators for stress tensor -+ -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c test size of work arrays -+ -+ check=.true. -+ if(mxxdf.lt.nscons)check=.false. -+ if(mxnode.gt.1)call gstate(check) -+ if(.not.check)call error(idnode,412) -+ -+c application of constraint (shake) algorithm -+ -+ icyc=0 -+ safe=.false. -+ -+ do while(.not.safe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate temporary bond vector -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c calculate maximum error in bondlength -+ -+ esig=0.d0 -+ -+ do k=1,nscons -+ -+c set bond parameter -+ -+ dx=dxt(k) -+ dy=dyt(k) -+ dz=dzt(k) -+ dis=prmcon(listcon(k,1)) -+ esig=max(esig,abs(dx*dx+dy*dy+dz*dz-dis*dis)/dis) -+ -+ enddo -+ -+ esig=esig*0.5d0 -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+c bypass calculations if all tolerances satisfied -+ -+ if(.not.safe)then -+ -+c initialise increment arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint forces -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c set constraint parameters -+ -+ dis=prmcon(listcon(k,1)) -+ omega2= dis*dis -+ amti= tstep*rmass(i) -+ amtj=-tstep*rmass(j) -+ -+c constraint force parameter -+ -+ dx=dxt(k) -+ dy=dyt(k) -+ dz=dzt(k) -+ -+ gamma=(omega2-(dx*dx+dy*dy+dz*dz))/ -+ x (-tstep*(amti-amtj)*(dxx(k)*dx+dyy(k)*dy+dzz(k)*dz)) -+ -+c accumulate bond virial -+ -+ vircon=vircon+gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ -+ strs1=strs1-gamma*dxx(k)*dxx(k) -+ strs2=strs2-gamma*dxx(k)*dyy(k) -+ strs3=strs3-gamma*dxx(k)*dzz(k) -+ strs5=strs5-gamma*dyy(k)*dyy(k) -+ strs6=strs6-gamma*dyy(k)*dzz(k) -+ strs9=strs9-gamma*dzz(k)*dzz(k) -+ -+c improve approximate constraint force -+ -+ gammi=-0.5d0*gamma*amti -+ xxt(i)=xxt(i)+dxx(k)*gammi -+ yyt(i)=yyt(i)+dyy(k)*gammi -+ zzt(i)=zzt(i)+dzz(k)*gammi -+ -+ gammj=-0.5d0*gamma*amtj -+ xxt(j)=xxt(j)+dxx(k)*gammj -+ yyt(j)=yyt(j)+dyy(k)*gammj -+ zzt(j)=zzt(j)+dzz(k)*gammj -+ -+ enddo -+ -+c sum up constraint forces across nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov)call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.0d0/dble(listme(i)) -+ dlj=1.0d0/dble(listme(j)) -+ -+ xxx(i)=xxx(i)+tstep*dli*xxt(i) -+ yyy(i)=yyy(i)+tstep*dli*yyt(i) -+ zzz(i)=zzz(i)+tstep*dli*zzt(i) -+ xxx(j)=xxx(j)+tstep*dlj*xxt(j) -+ yyy(j)=yyy(j)+tstep*dlj*yyt(j) -+ zzz(j)=zzz(j)+tstep*dlj*zzt(j) -+ -+ vxx(i)=vxx(i)+dli*xxt(i) -+ vzz(i)=vzz(i)+dli*zzt(i) -+ vyy(i)=vyy(i)+dli*yyt(i) -+ vxx(j)=vxx(j)+dlj*xxt(j) -+ vyy(j)=vyy(j)+dlj*yyt(j) -+ vzz(j)=vzz(j)+dlj*zzt(j) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c error exit for non-convergence -+ -+ if(.not.safe)return -+ -+c complete stress tensor -+ -+ stresh(1)=strs1 -+ stresh(2)=strs2 -+ stresh(3)=strs3 -+ stresh(4)=strs2 -+ stresh(5)=strs5 -+ stresh(6)=strs6 -+ stresh(7)=strs3 -+ stresh(8)=strs6 -+ stresh(9)=strs9 -+ -+c splice coordinate arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(stresh,9,buffer) -+ call splice -+ x (idnode,natms,listme,listot,xxx,yyy,zzz,buffer) -+ call splice -+ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+ return -+ end subroutine rdrattle_r -+ -+ subroutine rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ -+c********************************************************************* -+c -+c dl_poly subroutine for applying a bond constraints to -+c the velocities of the constrained atoms using the rattle -+c procedure (replicated data version) -+c -+c copyright - daresbury laboratory -+c author w.smith october 2002 -+c -+c********************************************************************* -+ -+ implicit none -+ -+ logical safe -+ integer idnode,mxnode,natms,nscons,icyc -+ integer i,j,k -+ real(8) tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt -+ real(8) esig,amti,amtj,gamma,gammi,gammj,dli,dlj,tolvel -+ -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ -+c constraint convergence tolerance -+ -+ tolvel=tolnce/tstep -+ -+c start of rattle cycle -+ -+ icyc=0 -+ safe=.false. -+ -+ do while(.not.safe.and.icyc.lt.mxshak) -+ -+ icyc=icyc+1 -+ -+c initialise velocity correction arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate velocity constraint corrections -+ -+ esig=0.d0 -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ amti= 0.5d0*tstep*rmass(i) -+ amtj=-0.5d0*tstep*rmass(j) -+ -+c calculate constraint force parameter -+ -+ gamma=(dxx(k)*(vxx(i)-vxx(j))+dyy(k)*(vyy(i)-vyy(j))+ -+ x dzz(k)*(vzz(i)-vzz(j)))/((amti-amtj)* -+ x (dxx(k)**2+dyy(k)**2+dzz(k)**2)) -+ esig=max(esig,abs(gamma)) -+ -+c improve approximate constraint force -+ -+ gammi=-gamma*amti -+ xxt(i)=xxt(i)+gammi*dxx(k) -+ yyt(i)=yyt(i)+gammi*dyy(k) -+ zzt(i)=zzt(i)+gammi*dzz(k) -+ gammj=-gamma*amtj -+ xxt(j)=xxt(j)+gammj*dxx(k) -+ yyt(j)=yyt(j)+gammj*dyy(k) -+ zzt(j)=zzt(j)+gammj*dzz(k) -+ -+ enddo -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolvel) -+ if(mxnode.gt.1)then -+ -+ call gstate(safe) -+ -+ endif -+ -+c terminate iteration if constraints satisfied -+ -+ if(.not.safe)then -+ -+c transport velocity adjustments to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+c update velocities -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ vxx(i)=vxx(i)+dli*xxt(i) -+ vyy(i)=vyy(i)+dli*yyt(i) -+ vzz(i)=vzz(i)+dli*zzt(i) -+ dlj=1.d0/dble(listme(j)) -+ vxx(j)=vxx(j)+dlj*xxt(j) -+ vyy(j)=vyy(j)+dlj*yyt(j) -+ vzz(j)=vzz(j)+dlj*zzt(j) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c error exit if rattle fails -+ -+ if(.not.safe)return -+ -+c splice velocity arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ call splice -+ x (idnode,natms,listme,listot,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+ return -+ end subroutine rdrattle_v -+ -+ subroutine nvevv_1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x tstep,engke,tolnce,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c nve ensemble -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=4 -+ -+ logical safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,i,j,k -+ integer iatm0,iatm1 -+ real(8) tstep,engke,tolnce,vircon -+ integer fail(nnn) -+ real(8) strkin(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+ safe=.true. -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1980) -+ enddo -+ -+ endif -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ if(ntcons.gt.0) -+ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c update velocities for first and second stages -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strkin(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) -+ -+ endif -+ -+ return -+ end subroutine nvevv_1 -+ -+ subroutine nvtvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x tstep,taut,sigma,engke,tolnce,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c nvt ensemble - Berendsen thermostat (n.b. not symplectic) -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=4 -+ -+ logical safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons -+ integer i,j,k,iatm0,iatm1 -+ real(8) tstep,taut,sigma,engke,tolnce,vircon,chit -+ integer fail(nnn) -+ real(8) strkin(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+ safe=.true. -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,1990) -+ enddo -+ -+ endif -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ if(ntcons.gt.0) -+ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c first pass of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c second pass of velocity verlet algorithm -+ -+ else -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ enddo -+ -+ engke=engke*chit**2 -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz, -+ x buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) -+ -+ endif -+ -+ return -+ end subroutine nvtvv_b1 -+ -+ subroutine nvtvv_e1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x tstep,engke,tolnce,vircon) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c nvt ensemble - evans thermostat -+c Comp. Phys. reports 1, 299, (1984) -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=4 -+ -+ logical safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons -+ integer i,j,k,iatm0,iatm1 -+ real(8) tstep,engke,tolnce,vircon,vdotf,scale,chit -+ integer fail(nnn) -+ real(8) strkin(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+ safe=.true. -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2000) -+ enddo -+ -+ endif -+ -+ if(ntcons.eq.0)safe=.true. -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ if(ntcons.gt.0) -+ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy and evans thermostat parameter -+ -+ engke=0.d0 -+ vdotf=0.d0 -+ do i=iatm0,iatm1 -+ -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ buffer(2)=vdotf -+ call gdsum(buffer(1),2,buffer(3)) -+ engke=buffer(1) -+ vdotf=buffer(2) -+ -+ endif -+ engke=0.5d0*engke -+ chit=0.5d0*vdotf/engke -+ -+c thermostat the velocities -+ -+ scale=(1.d0-0.5d0*tstep*chit) -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate kinetic energy and evans thermostat parameter -+ -+ engke=0.d0 -+ vdotf=0.d0 -+ do i=iatm0,iatm1 -+ -+ engke=engke+weight(i)*(vxx(i)**2+vyy(i)**2+vzz(i)**2) -+ vdotf=vdotf+vxx(i)*fxx(i)+vyy(i)*fyy(i)+vzz(i)*fzz(i) -+ -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+ buffer(1)=engke -+ buffer(2)=vdotf -+ call gdsum(buffer(1),2,buffer(3)) -+ engke=buffer(1) -+ vdotf=buffer(2) -+ -+ endif -+ engke=0.5d0*engke -+ chit=0.5d0*vdotf/engke -+ scale=(1.d0-0.5d0*tstep*chit) -+ -+c scale velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=scale*vxx(i) -+ vyy(i)=scale*vyy(i) -+ vzz(i)=scale*vzz(i) -+ -+ enddo -+ -+ engke=engke*scale**2 -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) -+ -+ endif -+ -+ return -+ end subroutine nvtvv_e1 -+ -+ subroutine nvtvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x ntshl,keyshl,tstep,taut,sigma,chit,consv,conint,engke, -+ x tolnce,vircon,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c nvt ensemble - nose-hoover thermostat -+c Molecular Physics 87 (1996) 1117 -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith october 2002 -+c amended - w. smith january 2005 : f90 conversion -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=4 -+ -+ logical safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons -+ integer i,j,k,iatm0,iatm1 -+ real(8) tstep,taut,sigma,chit,consv,conint,engke,tolnce,vircon -+ real(8) hstep,qmass -+ integer fail(nnn) -+ real(8) strkin(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ safe=.true. -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(1)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(2)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(3)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(4)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2010) -+ enddo -+ -+ endif -+ -+c inertia parameter for Nose-Hoover thermostat -+ -+ hstep=0.5d0*tstep -+ qmass=2.d0*sigma*taut**2 -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ if(ntcons.gt.0) -+ x call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c integrate and apply nvt thermostat -+ -+ call nvtscale -+ x (idnode,mxnode,natms,engke,sigma,hstep,qmass,taut, -+ x chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c integrate and apply nvt thermostat -+ -+ call nvtscale -+ x (idnode,mxnode,natms,engke,sigma,hstep,qmass,taut, -+ x chit,conint) -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ consv=conint+0.5d0*qmass*chit**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxt,yyt,zzt,txx,tyy,tzz,stat=fail(1)) -+ deallocate(dxx,dyy,dzz,dxt,dyt,dzt,stat=fail(2)) -+ -+ endif -+ -+ return -+ end subroutine nvtvv_h1 -+ -+ subroutine nptvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,tstep,taut,taup,sigma,engke,press,elrc, -+ x virlrc,tolnce,virtot,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c npt ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith december 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical newjob,safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm -+ integer i,j,k,iatm0,iatm1,mxiter,iter,kk -+ real(8) tstep,taut,taup,sigma,engke,press,elrc,virlrc,tolnce -+ real(8) virtot,vircon,volm,volm0,elrc0,virlrc0,psyst -+ real(8) chit,chip,scale,beta -+ -+ integer fail(nnn) -+ real(8) strkin(9),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./,beta/7.3728d-3/ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2020) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(4)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(5)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(6)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(7)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2030) -+ enddo -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy -+ -+ engke=getkin(natms,idnode,mxnode) -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ do i=iatm0,iatm1 -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+ endif -+ -+c iteration required if ntcons > 0 and isw = 1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+ scale=1.d0 -+ -+ if(iter.eq.mxiter)then -+ -+c calculate system pressure -+ -+ psyst=(2.d0*engke-virtot-vircon)/(3.d0*volm) -+ -+c apply Berendsen barostat taup is relaxation time -+ -+ chip=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip**(1.d0/3.d0) -+ volm=chip*volm -+ -+c reset cell parameters for new volume -+ -+ do i=1,9 -+ cell(i)=scale*cell(i) -+ enddo -+ -+ endif -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=scale*xxx(i)+tstep*vxx(i) -+ yyy(i)=scale*yyy(i)+tstep*vyy(i) -+ zzz(i)=scale*zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+ if(iter.lt.mxiter)then -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor for tethered bonds -+ -+ do i=1,9 -+ eta(i)=scale*uni(i) -+ enddo -+ -+c second pass of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c apply Berendsen thermostat taut is relaxation time -+ -+ engke=getkin(natms,idnode,mxnode) -+ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nptvv_b1 -+ -+ subroutine nptvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x ntpatm,ntshl,keyshl,tstep,taut,taup,sigma,temp,chip,chit, -+ x consv,conint,engke,elrc,tolnce,vircon,virtot,virlrc,volm, -+ x press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c npt ensemble - Melchionna, Ciccotti and Holian -+c Molecular Physics 78 (1993) 533 -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith november 2002 -+c amended - w. smith january 2005: f90 conversion -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ integer, parameter :: ncyc=5 -+ -+ logical safe,lshmov,newjob -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm -+ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,icyc -+ real(8) tstep,taup,taut,sigma,temp,chip,chit,consv,conint -+ real(8) engke,elrc,tolnce,vircon,virtot,virlrc,volm,press -+ real(8) volm0,elrc0,virlrc0,hstep,qstep,totmas,qmass,pmass -+ real(8) vzero,chit0,chip0,cons0,scale,fstep -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ integer fail(nnn) -+ real(8) cell0(9),com(3),vom(3),strkin(9),uni(9) -+ -+ save newjob,totmas,volm0,elrc0,virlrc0,dens0 -+ save cell0,iatm0,iatm1,hstep,qstep,fstep,pmass,qmass -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2040) -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c inertia parameter for Nose-Hoover thermostat and barostat -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2050) -+ enddo -+ -+ endif -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metdynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c store current integration variables if ntcons > 0 -+ -+ if(ntcons.gt.0)then -+ -+ vzero=volm -+ chit0=chit -+ chip0=chip -+ cons0=conint -+ do i=iatm0,iatm1 -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+ endif -+ -+c iteration necessary if ntcons > 0 and isw = 1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+c volume integration parameter -+ -+ do icyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, -+ x taut,chip,chit,conint) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptscale_p -+ x (idnode,mxnode,natms,engke,fstep,pmass,chip,chit, -+ x volm,press,vircon,virtot) -+ -+c integrate and apply npt thermostat -+ -+ call nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, -+ x taut,chip,chit,conint) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c update positions -+ -+ scale=exp(tstep*chip) -+ do i=iatm0,iatm1 -+ -+ xxx(i)=scale*(xxx(i)-com(1))+tstep*vxx(i)+com(1) -+ yyy(i)=scale*(yyy(i)-com(2))+tstep*vyy(i)+com(2) -+ zzz(i)=scale*(zzz(i)-com(3))+tstep*vzz(i)+com(3) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c restore original integration parameters if iter < mxiter -+ -+ if(iter.lt.mxiter)then -+ -+ volm=vzero -+ chit=chit0 -+ chip=chip0 -+ conint=cons0 -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+ do icyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, -+ x taut,chip,chit,conint) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptscale_p -+ x (idnode,mxnode,natms,engke,fstep,pmass,chip,chit, -+ x volm,press,vircon,virtot) -+ -+c integrate and apply npt thermostat -+ -+ call nptscale_t -+ x (idnode,mxnode,natms,engke,temp,sigma,qstep,pmass,qmass, -+ x taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ consv=conint+0.5d0*qmass*chit**2+ -+ x 0.5d0*pmass*chip**2+press*volm -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor (for tethered atoms) -+ -+ do i=1,9 -+ eta(i)=chip*uni(i) -+ enddo -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nptvv_h1 -+ -+ subroutine nstvv_b1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons, -+ x ntcons,ntpatm,mode,tstep,taut,taup,sigma,engke,press,elrc, -+ x virlrc,tolnce,vircon,volm) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c anisotropic npt ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith december 2002 -+c amended - w. smith january 2005 : f90 conversion -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ -+ logical newjob,safe,lshmov -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm -+ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,mode -+ real(8) tstep,taut,taup,sigma,engke,press,elrc,virlrc,tolnce,beta -+ real(8) vircon,volm,volm0,elrc0,virlrc0,chit -+ real(8) xtmp,ytmp,ztmp -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ integer fail(nnn) -+ real(8) uni(9),strkin(9),celp(10) -+ -+ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./,beta/7.3728d-3/ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2060) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(3)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(4)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(5)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(6)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(7)) -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2070) -+ enddo -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c extract previous constraint terms from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ do i=iatm0,iatm1 -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+ endif -+ -+c iteration required if ntcons > 0 and isw = 1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+c zero scaling matrix -+ -+ do i=1,9 -+ eta(i)=uni(i) -+ enddo -+ -+ if(iter.eq.mxiter)then -+ -+c calculate Berendsen barostat - taup is relaxation time -+ -+ do i=1,9 -+ eta(i)=tstep*beta*(stress(i)+strcns(i)- -+ x press*volm*uni(i))/(taup*volm)+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c reset cell parameters for new volume -+ -+ call mat_mul(eta,cell,cell) -+ -+c calculate new volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+ endif -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ xtmp=eta(1)*xxx(i)+eta(4)*yyy(i)+eta(7)*zzz(i) -+ ytmp=eta(2)*xxx(i)+eta(5)*yyy(i)+eta(8)*zzz(i) -+ ztmp=eta(3)*xxx(i)+eta(6)*yyy(i)+eta(9)*zzz(i) -+ xxx(i)=tstep*vxx(i)+xtmp -+ yyy(i)=tstep*vyy(i)+ytmp -+ zzz(i)=tstep*vzz(i)+ztmp -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+ if(iter.lt.mxiter)then -+ -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c second pass of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+0.5d0*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+0.5d0*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+0.5d0*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c apply Berendsen thermostat taut is relaxation time -+ -+ engke=getkin(natms,idnode,mxnode) -+ chit=sqrt(1.d0+tstep/taut*(sigma/engke-1.d0)) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ engke=0.5d0*(strkin(1)+strkin(5)+strkin(9)) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxo,yyo,zzo,stat=fail(1)) -+ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nstvv_b1 -+ -+ subroutine nstvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,nscons,ntcons, -+ x ntpatm,mode,ntshl,keyshl,tstep,taut,taup,sigma,temp,chit, -+ x consv,conint,engke,elrc,tolnce,vircon,virlrc,volm,press, -+ x chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for integrating newtonian equations of -+c motion in molecular dynamics - velocity verlet incorporating -+c bond constraints via the shake/rattle algorithm -+c -+c anisotropic npt ensemble - Melchionna, Ciccotti and Holian -+c Molecular Physics 78 (1993) 533 -+c -+c parallel replicated data version -+c -+c copyright - daresbury laboratory -+c author - w. smith november 2002 -+c amended - w. smith january 2005 : f90 conversion -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=7 -+ integer, parameter :: ncyc=5 -+ -+ logical safe,lshmov,newjob -+ integer isw,idnode,mxnode,natms,imcon,nscons,ntcons,ntpatm -+ integer i,j,k,iatm0,iatm1,mxiter,iter,kk,icyc,mode -+ real(8) tstep,taup,taut,sigma,temp,chit,consv,conint,chit0 -+ real(8) engke,elrc,tolnce,vircon,virlrc,volm,press,volm0 -+ real(8) elrc0,virlrc0,hstep,qstep,totmas,qmass,pmass -+ real(8) cons0,cxx,cyy,czz,chip2,fstep -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ -+ integer fail(nnn) -+ real(8) com(3),vom(3),czero(9),strkin(9),eta0(9),celp(10) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metdynamics shell thermostat variables -+ -+ data newjob/.true./ -+ -+ save newjob,totmas,volm0,elrc0,virlrc0,dens0 -+ save iatm0,iatm1,hstep,qstep,pmass,qmass,fstep -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2080) -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c system total mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c inertia parameter for Nose-Hoover thermostat and barostat -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2090) -+ enddo -+ -+ endif -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metdynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ chit0=chit -+ cons0=conint -+ do i=1,9 -+ -+ czero(i)=cell(i) -+ eta0(i)=eta(i) -+ -+ enddo -+ do i=iatm0,iatm1 -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+ endif -+ -+c subtract kinetic terms from stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ do i=1,9 -+ stress(i)=stress(i)-strkin(i) -+ enddo -+ -+c iteration necessary if ntcons > 0 and isw = 1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+c calculate current volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+ do icyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c metdynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstscale_p -+ x (idnode,mxnode,natms,mode,fstep,pmass,chit,press,volm) -+ -+c integrate and apply nst thermostat -+ -+ call nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c update positions -+ -+ do i=iatm0,iatm1 -+ -+ cxx=xxx(i)-com(1) -+ cyy=yyy(i)-com(2) -+ czz=zzz(i)-com(3) -+ -+ xxx(i)=xxx(i)+ -+ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ yyy(i)=yyy(i)+ -+ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ zzz(i)=zzz(i)+ -+ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c subtract old constraint terms from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+c correct constraint bonds using rattle -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+c add new constraint terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c restore original integration parameters if iter < mxiter -+ -+ if(iter.lt.mxiter)then -+ -+ chit=chit0 -+ conint=cons0 -+ do i=1,9 -+ -+ cell(i)=czero(i) -+ eta(i)=eta0(i) -+ -+ enddo -+ do i=iatm0,iatm1 -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c second stage of velocity verlet algorithm -+ -+ else -+ -+c update velocities -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+ if(ntcons.gt.0)then -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c add constraint terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i) -+ enddo -+ -+c correct constraint bond velocities using rattle -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+ do icyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstscale_p -+ x (idnode,mxnode,natms,mode,fstep,pmass,chit,press,volm) -+ -+c integrate and apply nst thermostat -+ -+ call nstscale_t -+ x (idnode,mxnode,natms,mode,engke,temp,sigma,qstep, -+ x pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=iatm0,iatm1 -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+c merge velocity data -+ -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstress(natms,idnode,mxnode,strkin) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ if(mxnode.gt.1) -+ x call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c deallocate working arrays -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(xxo,yyo,zzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(txx,tyy,tzz,dxx,dyy,dzz,stat=fail(2)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nstvv_h1 -+ -+ end module vv_motion_module -+ -diff -urN dl_class_1.9.orig/srcmod/vv_rotation1_module.f dl_class_1.9/srcmod/vv_rotation1_module.f ---- dl_class_1.9.orig/srcmod/vv_rotation1_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/vv_rotation1_module.f 2011-02-22 12:46:30.000000000 +0100 -@@ -0,0 +1,4701 @@ -+ module vv_rotation1_module -+ -+c*********************************************************************** -+c -+c dl_poly module 1 for velocity verlet rotational integration -+c schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use metafreeze_module, only : lmetadyn -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use vv_motion_module -+ use utility_module -+ -+ contains -+ -+ subroutine rotate_omega -+ x (idnode,mxnode,ngrp,tstep,p0,p1,p2,p3,dtx,dty,dtz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for updating the angular velocity and momentum -+c for rigid bodies -+c -+c copyright - daresbury laboratory -+c author - w. smith sept 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer idnode,mxnode,ngrp,i,j,jr,jrs,ig,igrp1,igrp2,id -+ real(8) ftx,fty,ftz,fmx,fmy,fmz,tstep,tqx,tqy,tqz,tq0,tq1,tq2,tq3 -+ -+ real(8) p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp) -+ real(8) dtx(mxatms),dty(mxatms),dtz(mxatms),rot(9) -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ tq1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ tq2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ tq3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=p0(ig)+tq0*tstep -+ p1(ig)=p1(ig)+tq1*tstep -+ p2(ig)=p2(ig)+tq2*tstep -+ p3(ig)=p3(ig)+tq3*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxx(ig)+fmx*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*tstep/gmass(id) -+ -+ enddo -+ -+ return -+ end subroutine rotate_omega -+ -+ subroutine nosquish(ig,tstep,qq0,qq1,qq2,qq3,pp0,pp1,pp2,pp3) -+ -+c*********************************************************************** -+c -+c dlpoly routine to implement the symplectic no_squish quaternion -+c algorithm of miller et al j.chem.phys 116 (2002) 8649 -+c -+c copyright daresbury laboratory -+c author m. leslie jan 2004 -+c amended w.smith mar 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer m,ig,id -+ real(8) zetax,zetay,zetaz,tstep,cs,sn,trstep -+ -+ integer, parameter :: mrot=10 -+ real(8), parameter :: ov4=0.25d0 -+ real(8), parameter :: ov8=0.125d0 -+ -+ real(8) qq0(*),qq1(*),qq2(*),qq3(*) -+ real(8) pp0(*),pp1(*),pp2(*),pp3(*) -+ -+ real(8) qn1(0:3),pq2(0:3),qn2(0:3),pq3(0:3) -+ real(8) qn3(0:3),pq4(0:3) -+ -+c rotational time step -+ -+ trstep=tstep/dble(mrot) -+ -+c rotation: iterate over mrot rotational time steps -+ -+ id=lstgtp(ig) -+ -+ do m=1,mrot -+ -+ zetaz=ov8*rotinz(id,2)*trstep* -+ x (-pp0(ig)*qq3(ig)+pp1(ig)*qq2(ig)- -+ x pp2(ig)*qq1(ig)+pp3(ig)*qq0(ig)) -+ cs=cos(zetaz) -+ sn=sin(zetaz) -+ qn1(0)=cs*qq0(ig)-sn*qq3(ig) -+ qn1(1)=cs*qq1(ig)+sn*qq2(ig) -+ qn1(2)=cs*qq2(ig)-sn*qq1(ig) -+ qn1(3)=cs*qq3(ig)+sn*qq0(ig) -+ pq2(0)=cs*pp0(ig)-sn*pp3(ig) -+ pq2(1)=cs*pp1(ig)+sn*pp2(ig) -+ pq2(2)=cs*pp2(ig)-sn*pp1(ig) -+ pq2(3)=cs*pp3(ig)+sn*pp0(ig) -+ -+ zetay=ov8*rotiny(id,2)*trstep* -+ x (-pq2(0)*qn1(2)-pq2(1)*qn1(3)+ -+ x pq2(2)*qn1(0)+pq2(3)*qn1(1)) -+ cs=cos(zetay) -+ sn=sin(zetay) -+ qn2(0)=cs*qn1(0)-sn*qn1(2) -+ qn2(1)=cs*qn1(1)-sn*qn1(3) -+ qn2(2)=cs*qn1(2)+sn*qn1(0) -+ qn2(3)=cs*qn1(3)+sn*qn1(1) -+ pq3(0)=cs*pq2(0)-sn*pq2(2) -+ pq3(1)=cs*pq2(1)-sn*pq2(3) -+ pq3(2)=cs*pq2(2)+sn*pq2(0) -+ pq3(3)=cs*pq2(3)+sn*pq2(1) -+ -+ zetax=ov4*rotinx(id,2)*trstep* -+ x (-pq3(0)*qn2(1)+pq3(1)*qn2(0)+ -+ x pq3(2)*qn2(3)-pq3(3)*qn2(2)) -+ cs=cos(zetax) -+ sn=sin(zetax) -+ qn3(0)=cs*qn2(0)-sn*qn2(1) -+ qn3(1)=cs*qn2(1)+sn*qn2(0) -+ qn3(2)=cs*qn2(2)+sn*qn2(3) -+ qn3(3)=cs*qn2(3)-sn*qn2(2) -+ pq4(0)=cs*pq3(0)-sn*pq3(1) -+ pq4(1)=cs*pq3(1)+sn*pq3(0) -+ pq4(2)=cs*pq3(2)+sn*pq3(3) -+ pq4(3)=cs*pq3(3)-sn*pq3(2) -+ -+ zetay=ov8*rotiny(id,2)*trstep* -+ x (-pq4(0)*qn3(2)-pq4(1)*qn3(3)+ -+ x pq4(2)*qn3(0)+pq4(3)*qn3(1)) -+ cs=cos(zetay) -+ sn=sin(zetay) -+ qn2(0)=cs*qn3(0)-sn*qn3(2) -+ qn2(1)=cs*qn3(1)-sn*qn3(3) -+ qn2(2)=cs*qn3(2)+sn*qn3(0) -+ qn2(3)=cs*qn3(3)+sn*qn3(1) -+ pq3(0)=cs*pq4(0)-sn*pq4(2) -+ pq3(1)=cs*pq4(1)-sn*pq4(3) -+ pq3(2)=cs*pq4(2)+sn*pq4(0) -+ pq3(3)=cs*pq4(3)+sn*pq4(1) -+ -+ zetaz=ov8*rotinz(id,2)*trstep* -+ x (-pq3(0)*qn2(3)+pq3(1)*qn2(2)- -+ x pq3(2)*qn2(1)+pq3(3)*qn2(0)) -+ cs=cos(zetaz) -+ sn=sin(zetaz) -+ qq0(ig)=cs*qn2(0)-sn*qn2(3) -+ qq1(ig)=cs*qn2(1)+sn*qn2(2) -+ qq2(ig)=cs*qn2(2)-sn*qn2(1) -+ qq3(ig)=cs*qn2(3)+sn*qn2(0) -+ pp0(ig)=cs*pq3(0)-sn*pq3(3) -+ pp1(ig)=cs*pq3(1)+sn*pq3(2) -+ pp2(ig)=cs*pq3(2)-sn*pq3(1) -+ pp3(ig)=cs*pq3(3)+sn*pq3(0) -+ -+ enddo -+ -+ return -+ end subroutine nosquish -+ -+ subroutine nveqvv_1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author m. leslie jan 2004 -+c amended w.smith jan 2005: f90 conversion -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr -+ integer id,ifre,jrs,idum,ig -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) tqx,tqy,tqz,ftx,fty,ftz -+ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz -+ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,engfke -+ -+ integer, parameter :: nnn=6 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ -+ save newjob,p0,p1,p2,p3 -+ -+ data newjob/.true./ -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2100) -+ enddo -+ -+ newjob=.false. -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+c operations common to first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*pt5*tstep -+ p1(ig)=p1(ig)+qt1*pt5*tstep -+ p2(ig)=p2(ig)+qt2*pt5*tstep -+ p3(ig)=p3(ig)+qt3*pt5*tstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c merge centre of mass velocities from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) -+ -+ enddo -+ -+c merge centre of mass position from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nveqvv_1 -+ -+ subroutine nvtqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, -+ x vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c nvt ensemble - Berendsen thermostat (n.b. not symplectic) -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith mar 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr -+ integer id,ifre,jrs,idum,ig,iatm0,iatm1 -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) tqx,tqy,tqz,ftx,fty,ftz -+ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz -+ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke -+ real(8) chit,engfke -+ -+ integer, parameter :: nnn=6 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ -+ save newjob,p0,p1,p2,p3 -+ -+ data newjob/.true./ -+ -+c atom block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2120) -+ enddo -+ -+ newjob=.false. -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+c operations common to first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*pt5*tstep -+ p1(ig)=p1(ig)+qt1*pt5*tstep -+ p2(ig)=p2(ig)+qt2*pt5*tstep -+ p3(ig)=p3(ig)+qt3*pt5*tstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algoritm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities -+ -+ do i=iatm0,iatm1 -+ -+ if(lstfrz(i).eq.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c exchange position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c merge group velocities from all processors -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nvtqvv_b1 -+ -+ subroutine nvtqvv_h1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke,engrot, -+ x taut,sigma,tolnce,tstep,vircom,vircon,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c nvt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith april 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=6 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr -+ integer id,ig,ifre,jrs,idum -+ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep -+ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn -+ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc -+ real(8) engfke -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newjob,p0,p1,p2,p3 -+ -+ data newjob/.true./ -+ -+c timestep parameters -+ -+ hstep=pt5*tstep -+ -+c nose-hoover inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(6)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2140) -+ enddo -+ -+ newjob=.false. -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c apply thermostat for first stage -+ -+ if(isw.eq.1)then -+ -+ call nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x hstep,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ endif -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+c operations common to first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*hstep -+ p1(ig)=p1(ig)+qt1*hstep -+ p2(ig)=p2(ig)+qt2*hstep -+ p3(ig)=p3(ig)+qt3*hstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=gcmx(ig)+tstep*gvxx(ig) -+ gcmy(ig)=gcmy(ig)+tstep*gvyy(ig) -+ gcmz(ig)=gcmz(ig)+tstep*gvzz(ig) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algoritm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxx(i)+tstep*vxx(i) -+ yyy(i)=yyy(i)+tstep*vyy(i) -+ zzz(i)=zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c apply thermostat for second stage and calculate kinetic energy -+ -+ call nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x hstep,qmass,taut,chit,conint) -+ -+ engke=engfke+engtrn -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ consv=conint+0.5d0*qmass*chit**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c merge group velocities from all processors -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ endif -+ -+ return -+ end subroutine nvtqvv_h1 -+ -+ subroutine nptqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c npt ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith april 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr,kk -+ integer id,ifre,jrs,idum,ig,iatm0,iatm1,ntpatm,iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) tqx,tqy,tqz,ftx,fty,ftz -+ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz -+ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke -+ real(8) chit,chip,beta,volm,volm0,elrc,elrc0,virlrc,virlrc0 -+ real(8) virtot,psyst,press,taup,scale,engfke -+ -+ integer, parameter :: nnn=11 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ -+ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./,beta/7.3728d-3/ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2160) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c atom block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ if(isw.eq.1)then -+ -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(6)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(7)) -+ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp),stat=fail(8)) -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(10)) -+ -+ endif -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(11)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2170) -+ enddo -+ -+ newjob=.false. -+ if(ntcons.gt.0)safe=.false. -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn -+ -+c calculate quaternion momenta at start of time step -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c rigid body motion for first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*pt5*tstep -+ p1(ig)=p1(ig)+qt1*pt5*tstep -+ p2(ig)=p2(ig)+qt2*pt5*tstep -+ p3(ig)=p3(ig)+qt3*pt5*tstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ c0(ig)=p0(ig) -+ c1(ig)=p1(ig) -+ c2(ig)=p2(ig) -+ c3(ig)=p3(ig) -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ -+ enddo -+ -+ endif -+ -+c iteration required if ntcons > 0 -+ -+ mxiter=1 -+ if(ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+ scale=1.d0 -+ -+ if(iter.eq.mxiter)then -+ -+c calculate system pressure -+ -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ -+c apply Berendsen barostat -+ -+ chip=1.d0+beta*tstep*(psyst-press)/taup -+ scale=chip**(1.d0/3.d0) -+ volm=chip*volm -+ -+c reset cell parameters for new volume -+ -+ do i=1,9 -+ cell(i)=scale*cell(i) -+ enddo -+ -+ endif -+ -+c update centre of mass position -+ -+ do ig=igrp1,igrp2 -+ -+ gcmx(ig)=scale*gcmx(ig)+tstep*gvxx(ig) -+ gcmy(ig)=scale*gcmy(ig)+tstep*gvyy(ig) -+ gcmz(ig)=scale*gcmz(ig)+tstep*gvzz(ig) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=gcmx(ig)+ -+ x rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ yyy(i)=gcmy(ig)+ -+ x rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ zzz(i)=gcmz(ig)+ -+ x rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=scale*xxx(i)+tstep*vxx(i) -+ yyy(i)=scale*yyy(i)+tstep*vyy(i) -+ zzz(i)=scale*zzz(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+ if(iter.lt.mxiter)then -+ -+ do i=1,natms -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ p0(ig)=c0(ig) -+ p1(ig)=c1(ig) -+ p2(ig)=c2(ig) -+ p3(ig)=c3(ig) -+ gcmx(ig)=gxo(ig) -+ gcmy(ig)=gyo(ig) -+ gcmz(ig)=gzo(ig) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor for tethered bonds -+ -+ do i=1,9 -+ eta(i)=scale*uni(i) -+ enddo -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities -+ -+ do i=iatm0,iatm1 -+ -+ if(lstfrz(i).eq.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c merge group velocities from all processors -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ if(isw.eq.1)then -+ -+ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,c0,c1,c2,c3,stat=fail(5)) -+ deallocate(gxo,gyo,gzo,stat=fail(6)) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine nptqvv_b1 -+ -+ subroutine nptqvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircon,virtot,virlrc,vircom,volm,press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c npt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith may 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ integer, parameter :: ncyc=5 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr -+ integer id,ig,ifre,jrs,idum,mxiter,iter,ntpatm,kk,icyc -+ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep -+ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn -+ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc -+ real(8) taup,temp,press,virtot,vzero,chit0,chip0,cons0 -+ real(8) chip,volm,elrc,elrc0,virlrc,virlrc0,qstep,pmass,totmas -+ real(8) volm0,scale,cxx,cyy,czz,engfke,fstep -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),cell0(9),com(3),vom(3),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: oxo(:),oyo(:),ozo(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newjob,hstep,qstep,fstep,pmass,qmass -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,volm0,elrc0,virlrc0 -+ save totmas,dens0,cell0 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2200) -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c nose-hoover thermostat and barostat inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ -+ if(ntcons.gt.0)then -+ -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(2)) -+ allocate(oxo(mxgrp),oyo(mxgrp),ozo(mxgrp),stat=fail(3)) -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(4)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(5)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(9)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(10)) -+ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(11)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(12)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2210) -+ enddo -+ -+ newjob=.false. -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=1,natms -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=1,ngrp -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store current integration variables if ntcons > 0 -+ -+ if(ntcons.gt.0)then -+ -+ vzero=volm -+ chit0=chit -+ chip0=chip -+ cons0=conint -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ oxo(ig)=omx(ig) -+ oyo(ig)=omy(ig) -+ ozo(ig)=omz(ig) -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ gvxo(ig)=gvxx(ig) -+ gvyo(ig)=gvyy(ig) -+ gvzo(ig)=gvzz(ig) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c iteration necessary if ntcons > 0 and isw=1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+ if(isw.eq.1)then -+ -+ do icyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+ engke=engfke+engtrn -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c calculate quaternion momenta -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*hstep -+ p1(ig)=p1(ig)+qt1*hstep -+ p2(ig)=p2(ig)+qt2*hstep -+ p3(ig)=p3(ig)+qt3*hstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ cxx=gcmx(ig)-com(1) -+ cyy=gcmy(ig)-com(2) -+ czz=gcmz(ig)-com(3) -+ gcmx(ig)=gcmx(ig)+tstep*(gvxx(ig)+chip*cxx) -+ gcmy(ig)=gcmy(ig)+tstep*(gvyy(ig)+chip*cyy) -+ gcmz(ig)=gcmz(ig)+tstep*(gvzz(ig)+chip*czz) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ cxx=xxx(i)-com(1) -+ cyy=yyy(i)-com(2) -+ czz=zzz(i)-com(3) -+ xxx(i)=xxx(i)+tstep*(vxx(i)+chip*cxx) -+ yyy(i)=yyy(i)+tstep*(vyy(i)+chip*cyy) -+ zzz(i)=zzz(i)+tstep*(vzz(i)+chip*czz) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+c restore original integration parameters if iter < mxiter -+ -+ if(iter.lt.mxiter)then -+ -+ volm=vzero -+ chit=chit0 -+ chip=chip0 -+ conint=cons0 -+ do i=1,natms -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ omx(ig)=oxo(ig) -+ omy(ig)=oyo(ig) -+ omz(ig)=ozo(ig) -+ gcmx(ig)=gxo(ig) -+ gcmy(ig)=gyo(ig) -+ gcmz(ig)=gzo(ig) -+ gvxx(ig)=gvxo(ig) -+ gvyy(ig)=gvyo(ig) -+ gvzz(ig)=gvzo(ig) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c operations for second stage only -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ do icyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+ engke=engfke+engtrn -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/volm0)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c calculate conserved variable -+ -+ consv=conint+0.5d0*qmass*chit**2+press*volm -+ x +0.5d0*pmass*chip**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c end of iteration cycle -+ -+ enddo -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor (for tethered atoms) -+ -+ do i=1,9 -+ eta(i)=chip*uni(i) -+ enddo -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,oxo,oyo,ozo,stat=fail(5)) -+ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(6)) -+ deallocate(gxo,gyo,gzo,gvxo,gvyo,gvzo,stat=fail(7)) -+ -+ endif -+ -+ return -+ end subroutine nptqvv_h1 -+ -+ subroutine nstqvv_b1 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,volm) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c nst ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith may 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr,kk,mode -+ integer id,ifre,jrs,idum,ig,iatm0,iatm1,ntpatm,iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engfke -+ real(8) tqx,tqy,tqz,ftx,fty,ftz -+ real(8) vaa,vbb,vcc,engtrn,fmx,fmy,fmz -+ real(8) qt0,qt1,qt2,qt3,opx,opy,opz,taut,sigma,engtke -+ real(8) chit,beta,volm,volm0,elrc,elrc0,virlrc,virlrc0 -+ real(8) press,taup,xtmp,ytmp,ztmp -+ -+ integer, parameter :: nnn=11 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ real(8) celp(10),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ -+ save newjob,volm0,elrc0,virlrc0,iatm0,iatm1,dens0 -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data newjob/.true./,beta/7.3728d-3/ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+ safe=.true. -+ -+ if(newjob)then -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2240) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c atom block indices -+ -+ iatm0=(idnode*natms)/mxnode+1 -+ iatm1=((idnode+1)*natms)/mxnode -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(2)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(3)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(4)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(5)) -+ -+ if(isw.eq.1)then -+ -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(6)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(7)) -+ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp),stat=fail(8)) -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(9)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(10)) -+ -+ endif -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(11)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2250) -+ enddo -+ -+ newjob=.false. -+ if(ntcons.gt.0)safe=.false. -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn -+ -+c calculate quaternion momenta at start of time step -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities 1/2 time step first and second stages -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+pt5*tstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+pt5*tstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+pt5*tstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c rigid body motion for first and second stages -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*pt5*tstep -+ p1(ig)=p1(ig)+qt1*pt5*tstep -+ p2(ig)=p2(ig)+qt2*pt5*tstep -+ p3(ig)=p3(ig)+qt3*pt5*tstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c store current integration variables -+ -+ if(ntcons.gt.0)then -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ c0(ig)=p0(ig) -+ c1(ig)=p1(ig) -+ c2(ig)=p2(ig) -+ c3(ig)=p3(ig) -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ -+ enddo -+ -+ endif -+ -+c extract previous constraint terms from stress tensor -+ -+ if(isw.eq.1)then -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+ endif -+ -+c iteration required if ntcons > 0 -+ -+ mxiter=1 -+ if(ntcons.gt.0)mxiter=2 -+ do iter=1,mxiter -+ -+c zero scaling matrix -+ -+ do i=1,9 -+ eta(i)=uni(i) -+ enddo -+ -+ if(iter.eq.mxiter)then -+ -+c calculate Berendsen barostat -+ -+ do i=1,9 -+ eta(i)=tstep*beta*(stress(i)+strcns(i)- -+ x press*volm*uni(i))/(taup*volm)+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c reset cell parameters for new volume -+ -+ call mat_mul(eta,cell,cell) -+ -+c calculate new volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+ endif -+ -+c update centre of mass position -+ -+ do ig=igrp1,igrp2 -+ -+ xtmp=eta(1)*gcmx(ig)+eta(4)*gcmy(ig)+eta(7)*gcmz(ig) -+ ytmp=eta(2)*gcmx(ig)+eta(5)*gcmy(ig)+eta(8)*gcmz(ig) -+ ztmp=eta(3)*gcmx(ig)+eta(6)*gcmy(ig)+eta(9)*gcmz(ig) -+ gcmx(ig)=tstep*gvxx(ig)+xtmp -+ gcmy(ig)=tstep*gvyy(ig)+ytmp -+ gcmz(ig)=tstep*gvzz(ig)+ztmp -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=gcmx(ig)+ -+ x rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ yyy(i)=gcmy(ig)+ -+ x rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ zzz(i)=gcmz(ig)+ -+ x rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=tstep*vxx(i)+ -+ x eta(1)*xxx(i)+eta(4)*yyy(i)+eta(7)*zzz(i) -+ yyy(i)=tstep*vyy(i)+ -+ x eta(2)*xxx(i)+eta(5)*yyy(i)+eta(8)*zzz(i) -+ zzz(i)=tstep*vzz(i)+ -+ x eta(3)*xxx(i)+eta(6)*yyy(i)+eta(9)*zzz(i) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+ endif -+ -+ if(iter.lt.mxiter)then -+ -+ do i=1,natms -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ p0(ig)=c0(ig) -+ p1(ig)=c1(ig) -+ p2(ig)=c2(ig) -+ p3(ig)=c3(ig) -+ gcmx(ig)=gxo(ig) -+ gcmy(ig)=gyo(ig) -+ gcmz(ig)=gzo(ig) -+ -+ enddo -+ -+ endif -+ -+ enddo -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c end of first stage of velocity verlet algorithm -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+ endif -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities -+ -+ do i=iatm0,iatm1 -+ -+ if(lstfrz(i).eq.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c merge group velocities from all processors -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(2)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(3)) -+ -+ if(isw.eq.1)then -+ -+ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,c0,c1,c2,c3,stat=fail(5)) -+ deallocate(gxo,gyo,gzo,stat=fail(6)) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine nstqvv_b1 -+ -+ subroutine nstqvv_h1 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, -+ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircon,virlrc,vircom,volm,press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly routine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - provided rigid body sites -+c and constraint sites do not coincide. -+c -+c nst ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith may 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ integer, parameter :: nnn=12 -+ integer, parameter :: ncyc=5 -+ real(8), parameter :: pt5=0.5d0 -+ -+ logical safe,lshmov,newjob -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons,ntfree -+ integer ifre1,ifre2,igrp1,igrp2,igrp,i,j,k,jr,mode -+ integer id,ig,ifre,jrs,idum,mxiter,iter,ntpatm,kk,icyc -+ real(8) chit,consv,conint,engke,engrot,taut,sigma,tolnce,tstep -+ real(8) vircom,vircon,hstep,qmass,opx,opy,opz,fmx,fmy,fmz,engtrn -+ real(8) ftx,fty,ftz,tqx,tqy,tqz,qt0,qt1,qt2,qt3,vaa,vbb,vcc -+ real(8) taup,temp,press,vzero,chit0,cons0 -+ real(8) chip2,volm,elrc,elrc0,virlrc,virlrc0,qstep,pmass,totmas -+ real(8) volm0,cxx,cyy,czz,engfke,fstep -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),com(3),vom(3) -+ real(8) czero(9),eta0(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: oxo(:),oyo(:),ozo(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newjob,hstep,qstep,fstep,pmass,qmass -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,volm0,elrc0,virlrc0 -+ save totmas,dens0 -+ -+ data newjob/.true./ -+ -+ safe=.true. -+ if(newjob)then -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2280) -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c nose-hoover thermostat and barostat inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ endif -+ -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(1)) -+ if(ntcons.gt.0)then -+ -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(2)) -+ allocate(oxo(mxgrp),oyo(mxgrp),ozo(mxgrp),stat=fail(3)) -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(4)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(5)) -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(6)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(7)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(8)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(9)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp),stat=fail(10)) -+ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(11)) -+ -+ endif -+ if(newjob)then -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(12)) -+ endif -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2290) -+ enddo -+ -+ newjob=.false. -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+ if(ntcons.gt.0)then -+ -+c construct current bond vectors -+ -+ do k=1,nscons -+ -+c indices of atoms in bond -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate current bond vector -+ -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition for bond vectors -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=1,natms -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=1,ngrp -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store current integration variables if ntcons > 0 -+ -+ if(ntcons.gt.0)then -+ -+ vzero=volm -+ chit0=chit -+ cons0=conint -+ do i=1,9 -+ -+ eta0(i)=eta(i) -+ czero(i)=cell(i) -+ -+ enddo -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ oxo(ig)=omx(ig) -+ oyo(ig)=omy(ig) -+ ozo(ig)=omz(ig) -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ gvxo(ig)=gvxx(ig) -+ gvyo(ig)=gvyy(ig) -+ gvzo(ig)=gvzz(ig) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c iteration necessary if ntcons > 0 and isw=1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+ if(isw.eq.1)then -+ -+ do icyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, -+ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstqscl_p -+ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit, -+ x press,volm) -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, -+ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+ engke=engfke+engtrn -+ -+c calculate quaternion momenta -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c update free atom velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vxx(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyy(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzz(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* Rigid body motion **************************** -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c calculate com force arrays -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ qt0=2.0d0*(-q1(ig)*tqx-q2(ig)*tqy-q3(ig)*tqz) -+ qt1=2.0d0*( q0(ig)*tqx-q3(ig)*tqy+q2(ig)*tqz) -+ qt2=2.0d0*( q3(ig)*tqx+q0(ig)*tqy-q1(ig)*tqz) -+ qt3=2.0d0*(-q2(ig)*tqx+q1(ig)*tqy+q0(ig)*tqz) -+ -+c update quaternion momenta by 1/2 time step -+ -+ p0(ig)=p0(ig)+qt0*hstep -+ p1(ig)=p1(ig)+qt1*hstep -+ p2(ig)=p2(ig)+qt2*hstep -+ p3(ig)=p3(ig)+qt3*hstep -+ -+c update centre of mass velocity by 1/2 time step -+ -+ gvxx(ig)=gvxx(ig)+fmx*hstep/gmass(id) -+ gvyy(ig)=gvyy(ig)+fmy*hstep/gmass(id) -+ gvzz(ig)=gvzz(ig)+fmz*hstep/gmass(id) -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c move centre of mass by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ cxx=gcmx(ig)-com(1) -+ cyy=gcmy(ig)-com(2) -+ czz=gcmz(ig)-com(3) -+ gcmx(ig)=gcmx(ig)+ -+ x tstep*(gvxx(ig)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ gcmy(ig)=gcmy(ig)+ -+ x tstep*(gvyy(ig)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ gcmz(ig)=gcmz(ig)+ -+ x tstep*(gvzz(ig)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c rotate rigid groups: nosquish algorithm -+ -+ do ig=igrp1,igrp2 -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ enddo -+ -+c new atomic positions for atoms in rigid bodies-relative to c.o.m -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+rot(3)*gzz(id,j) -+ x +gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+rot(6)*gzz(id,j) -+ x +gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+rot(9)*gzz(id,j) -+ x +gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ k=k+1 -+ i=lstfre(ifre) -+ cxx=xxx(i)-com(1) -+ cyy=yyy(i)-com(2) -+ czz=zzz(i)-com(3) -+ xxx(i)=xxx(i)+ -+ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ yyy(i)=yyy(i)+ -+ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ zzz(i)=zzz(i)+ -+ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+ enddo -+ -+c merge position data -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply shake corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c subtract old constraint terms from stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+c correct constraint bonds using rattle -+ -+ safe=.false. -+ call rdrattle_r -+ x (safe,lshmov,idnode,imcon,mxnode,natms,nscons, -+ x tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt, -+ x txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ if(.not.safe)return -+ -+c add new constraint terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c restore original integration parameters if iter < mxiter -+ -+ if(iter.lt.mxiter)then -+ -+ volm=vzero -+ chit=chit0 -+ conint=cons0 -+ do i=1,9 -+ -+ eta(i)=eta0(i) -+ cell(i)=czero(i) -+ -+ enddo -+ do i=1,natms -+ -+ xxx(i)=xxo(i) -+ yyy(i)=yyo(i) -+ zzz(i)=zzo(i) -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ do ig=1,ngrp -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ omx(ig)=oxo(ig) -+ omy(ig)=oyo(ig) -+ omz(ig)=ozo(ig) -+ gcmx(ig)=gxo(ig) -+ gcmy(ig)=gyo(ig) -+ gcmz(ig)=gzo(ig) -+ gvxx(ig)=gvxo(ig) -+ gvyy(ig)=gvyo(ig) -+ gvzz(ig)=gvzo(ig) -+ -+ enddo -+ -+ endif -+ -+ endif -+ -+c operations for second stage only -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotation matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities from all nodes -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c correct constraint bond velocities using rattle -+ -+ if(ntcons.gt.0)then -+ -+ safe=.false. -+ call rdrattle_v -+ x (safe,idnode,mxnode,natms,nscons,tolnce,tstep, -+ x dxx,dyy,dzz,txx,tyy,tzz,xxt,yyt,zzt) -+ if(.not.safe)return -+ -+c add constraint terms to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c kinetic terms for stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strkin(i)+strgrp(i)+strbod(i) -+ enddo -+ -+ do icyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, -+ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstqscl_p -+ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit, -+ x press,volm) -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot, -+ x temp,sigma,qstep,pmass,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+ engke=engfke+engtrn -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c end of second stage of velocity verlet algorithm -+ -+ endif -+ -+c end of iteration cycle -+ -+ enddo -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do kk=1,ntpatm -+ dens(kk)=dens0(kk)*(volm0/volm) -+ enddo -+ -+c deallocate working arrays -+ -+ deallocate(dtx,dty,dtz,stat=fail(1)) -+ -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(3)) -+ deallocate(xxt,yyt,zzt,dxt,dyt,dzt,stat=fail(4)) -+ deallocate(xxo,yyo,zzo,oxo,oyo,ozo,stat=fail(5)) -+ deallocate(vxo,vyo,vzo,b0,b1,b2,b3,stat=fail(6)) -+ deallocate(gxo,gyo,gzo,gvxo,gvyo,gvzo,stat=fail(7)) -+ -+ endif -+ -+ return -+ end subroutine nstqvv_h1 -+ -+ end module vv_rotation1_module -+ -diff -urN dl_class_1.9.orig/srcmod/vv_rotation2_module.f dl_class_1.9/srcmod/vv_rotation2_module.f ---- dl_class_1.9.orig/srcmod/vv_rotation2_module.f 1970-01-01 01:00:00.000000000 +0100 -+++ dl_class_1.9/srcmod/vv_rotation2_module.f 2011-02-22 12:46:30.000000000 +0100 -@@ -0,0 +1,5924 @@ -+ module vv_rotation2_module -+ -+c*********************************************************************** -+c -+c dl_poly module 2 for velocity verlet rotational integration -+c schemes -+c copyright - daresbury laboratory -+c author - w. smith aug 2006 -+c adapted - d. quigley - metadynamics -+c -+c*********************************************************************** -+ -+ use config_module -+ use ensemble_tools_module -+ use error_module -+ use metafreeze_module, only : lmetadyn -+ use property_module -+ use rigid_body_module -+ use setup_module -+ use shake_module -+ use site_module -+ use vv_rotation1_module -+ use utility_module -+ -+ contains -+ -+ subroutine qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,stresh) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for applying bond constraint corrections after -+c atomic integration in the velocity verlet scheme. assumes rigid -+c bodies connected by constraints. must be used in conjunction with -+c velocity verlet integration algorithm. note the iteration is -+c handled by the calling routine. -+c -+c copyright - daresbury laboratory -+c author - w. smith february 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newstep,newjob -+ integer fail,idnode,imcon,mxnode,natms,nscons,i,j,k,ik -+ real(8) tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt,dzt,txx,tyy -+ real(8) tzz,xxt,yyt,zzt,stresh,strs1,strs2,strs3,strs5,strs6 -+ real(8) strs9,tstep2,esig,dis2,tqa,tqb,gamma,dli,dlj -+ -+ real(8), allocatable :: esig1(:),ggx(:),ggy(:),ggz(:) -+ -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension dxt(mxcons),dyt(mxcons),dzt(mxcons) -+ dimension stresh(9),tqa(3),tqb(3) -+ -+ save newjob,esig1,ggx,ggy,ggz -+ -+ data newjob/.true./,fail/0/ -+ -+ if(newjob)then -+ -+ allocate (esig1(mxcons),ggx(mxcons),ggy(mxcons),ggz(mxcons), -+ x stat=fail) -+ if(fail.ne.0)call error(idnode,1615) -+ newjob=.false. -+ -+ endif -+ -+c accumulators for stress tensor -+ -+ strs1=0.d0 -+ strs2=0.d0 -+ strs3=0.d0 -+ strs5=0.d0 -+ strs6=0.d0 -+ strs9=0.d0 -+ -+c timestep squared -+ -+ tstep2=tstep*tstep -+ -+c constraint bond vectors are dxx,dyy,dzz (input) -+ -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+c calculate temporary bond vector -+ -+ dxt(k)=xxx(i)-xxx(j) -+ dyt(k)=yyy(i)-yyy(j) -+ dzt(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+c periodic boundary condition -+ -+ call images(imcon,0,1,nscons,cell,dxt,dyt,dzt) -+ -+c calculate maximum error in bondlength -+ -+ esig=0.d0 -+ do k=1,nscons -+ -+ dis2=prmcon(listcon(k,1))**2 -+ esig1(k)=(dis2-(dxt(k)**2+dyt(k)**2+dzt(k)**2))/dis2 -+ esig=max(esig,abs(esig1(k))) -+ -+ enddo -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolnce) -+ -+ if(mxnode.gt.1)call gstate(safe) -+ -+c continue if any tolerances unsatisfied -+ -+ if(.not.safe)then -+ -+c initialise force increment arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint forces -+ -+ ik=0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dis2=prmcon(listcon(k,1))**2 -+ -+ if(newstep)then -+ -+ call pivot(1,i,k,ik,tqa,dxx,dyy,dzz) -+ call pivot(1,j,k,ik,tqb,dxx,dyy,dzz) -+ -+ ggx(k)=tstep2*(tqa(1)+tqb(1))/dis2 -+ ggy(k)=tstep2*(tqa(2)+tqb(2))/dis2 -+ ggz(k)=tstep2*(tqa(3)+tqb(3))/dis2 -+ -+ endif -+ -+c constraint force parameter -+ -+ gamma=esig1(k)/(dxt(k)*ggx(k)+dyt(k)*ggy(k)+dzt(k)*ggz(k)) -+ -+c accumulate bond virial -+ -+ vircon=vircon-gamma*(dxx(k)**2+dyy(k)**2+dzz(k)**2) -+ -+ strs1=strs1+gamma*dxx(k)*dxx(k) -+ strs2=strs2+gamma*dxx(k)*dyy(k) -+ strs3=strs3+gamma*dxx(k)*dzz(k) -+ strs5=strs5+gamma*dyy(k)*dyy(k) -+ strs6=strs6+gamma*dyy(k)*dzz(k) -+ strs9=strs9+gamma*dzz(k)*dzz(k) -+ -+c improved atomic force -+ -+ xxt(i)=xxt(i)+dxx(k)*gamma -+ yyt(i)=yyt(i)+dyy(k)*gamma -+ zzt(i)=zzt(i)+dzz(k)*gamma -+ xxt(j)=xxt(j)-dxx(k)*gamma -+ yyt(j)=yyt(j)-dyy(k)*gamma -+ zzt(j)=zzt(j)-dzz(k)*gamma -+ -+ enddo -+ -+c transport temporary positions to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov) call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ dlj=1.d0/dble(listme(j)) -+ -+ fxx(i)=fxx(i)+xxt(i)*dli -+ fyy(i)=fyy(i)+yyt(i)*dli -+ fzz(i)=fzz(i)+zzt(i)*dli -+ fxx(j)=fxx(j)+xxt(j)*dlj -+ fyy(j)=fyy(j)+yyt(j)*dlj -+ fzz(j)=fzz(j)+zzt(j)*dlj -+ -+ enddo -+ -+c complete stress tensor -+ -+ stresh(1)=stresh(1)+strs1 -+ stresh(2)=stresh(2)+strs2 -+ stresh(3)=stresh(3)+strs3 -+ stresh(4)=stresh(4)+strs2 -+ stresh(5)=stresh(5)+strs5 -+ stresh(6)=stresh(6)+strs6 -+ stresh(7)=stresh(7)+strs3 -+ stresh(8)=stresh(8)+strs6 -+ stresh(9)=stresh(9)+strs9 -+ -+c splice force arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ call splice -+ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+ -+ endif -+ -+ return -+ end subroutine qrattle_r -+ -+ subroutine qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for applying bond constraint corrections after -+c atomic integration in the velocity verlet scheme. assumes rigid -+c bodies connected by constraints. must be used in conjunction with -+c velocity verlet integration algorithm. note the iteration is -+c handled by the calling routine. -+c -+c copyright - daresbury laboratory -+c author - w. smith february 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ logical safe,lshmov,newstep,newjob -+ integer fail,idnode,mxnode,natms,nscons,i,j,k,ik -+ real(8) tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz,tqa,tqb -+ real(8) xxt,yyt,zzt,tstep2,esig,gamma,dli,dlj -+ real(8) tolvel -+ -+ real(8), allocatable :: esig2(:),hhx(:),hhy(:),hhz(:) -+ -+ dimension xxt(mxatms),yyt(mxatms),zzt(mxatms) -+ dimension txx(mxatms),tyy(mxatms),tzz(mxatms) -+ dimension dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ dimension tqa(3),tqb(3) -+ -+ save newjob,esig2,hhx,hhy,hhz -+ -+ data newjob/.true./,fail/0/ -+ -+ if(newjob)then -+ -+ allocate (esig2(mxcons),hhx(mxcons),hhy(mxcons),hhz(mxcons), -+ x stat=fail) -+ if(fail.ne.0)call error(idnode,1625) -+ newjob=.false. -+ -+ endif -+ -+c constraint bond vectors are dxx,dyy,dzz (input) -+ -+c half timestep -+ -+ tstep2=tstep/2.d0 -+ -+c tolerance for velocity convergence -+ -+ tolvel=tolnce/tstep -+ -+c calculate maximum error in constraint -+ -+ esig=0.d0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ esig2(k)=(dxx(k)*(vxx(i)-vxx(j))+dyy(k)*(vyy(i)-vyy(j))+ -+ x dzz(k)*(vzz(i)-vzz(j))) -+ esig=max(esig,abs(esig2(k))) -+ -+ enddo -+ -+c global verification of convergence -+ -+ safe=(esig.lt.tolvel) -+ -+ if(mxnode.gt.1)then -+ call gstate(safe) -+ endif -+ -+c continue if all tolerances satisfied else return to calling routine -+ -+ if(.not.safe)then -+ -+c initialise velocity correction arrays -+ -+ do i=1,natms -+ -+ xxt(i)=0.d0 -+ yyt(i)=0.d0 -+ zzt(i)=0.d0 -+ -+ enddo -+ -+c calculate constraint correction -+ -+ ik=0 -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ if(newstep)then -+ -+ call pivot(2,i,k,ik,tqa,dxx,dyy,dzz) -+ call pivot(2,j,k,ik,tqb,dxx,dyy,dzz) -+ -+ hhx(k)=tstep2*(tqa(1)+tqb(1)) -+ hhy(k)=tstep2*(tqa(2)+tqb(2)) -+ hhz(k)=tstep2*(tqa(3)+tqb(3)) -+ -+ endif -+ -+c constraint force parameter -+ -+ gamma=esig2(k)/(dxx(k)*hhx(k)+dyy(k)*hhy(k)+dzz(k)*hhz(k)) -+ -+c improved atomic force -+ -+ xxt(i)=xxt(i)-dxx(k)*gamma -+ yyt(i)=yyt(i)-dyy(k)*gamma -+ zzt(i)=zzt(i)-dzz(k)*gamma -+ xxt(j)=xxt(j)+dxx(k)*gamma -+ yyt(j)=yyt(j)+dyy(k)*gamma -+ zzt(j)=zzt(j)+dzz(k)*gamma -+ -+ enddo -+ -+c transport temporary positions to other nodes -+ -+ if(mxnode.gt.1)then -+ -+ if(lshmov) call shmove -+ x (idnode,mxnode,natms,lashap,lishap,xxt,yyt,zzt, -+ x txx,tyy,tzz,buffer) -+ -+ endif -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ -+ dli=1.d0/dble(listme(i)) -+ dlj=1.d0/dble(listme(j)) -+ -+ fxx(i)=fxx(i)+dli*xxt(i) -+ fyy(i)=fyy(i)+dli*yyt(i) -+ fzz(i)=fzz(i)+dli*zzt(i) -+ fxx(j)=fxx(j)+dlj*xxt(j) -+ fyy(j)=fyy(j)+dlj*yyt(j) -+ fzz(j)=fzz(j)+dlj*zzt(j) -+ -+ enddo -+ -+c splice force arrays across nodes -+ -+ if(mxnode.gt.1)then -+ -+ call splice -+ x (idnode,natms,listme,listot,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine qrattle_v -+ -+ subroutine pivot(k,i,kk,ik,tqq,dxx,dyy,dzz) -+ -+c*********************************************************************** -+c -+c dl_poly subroutine for computing pivot vector for velocity -+c corrections to bonds between rigid bodies -+c must be used in conjunction with qrattle routines: -+c if k=1 - use with qrattle_r -+c if k=2 - use with qrattle_v -+c -+c copyright - daresbury laboratory -+c author - w. smith february 2005 -+c -+c*********************************************************************** -+ -+ implicit none -+ -+ integer k,i,kk,ik,ig,id,jj -+ real(8) xxa,yya,zza,tax,tay,taz,trx,try,trz,vix,viy,viz -+ real(8) rot(9),tqq(3),dxx(mxcons),dyy(mxcons),dzz(mxcons) -+ -+ ig=lstbod(i) -+ -+ if(ig.eq.0)then -+ -+c atoms in constraint bonds -+ -+ tqq(1)=dxx(kk)*rmass(i) -+ tqq(2)=dyy(kk)*rmass(i) -+ tqq(3)=dzz(kk)*rmass(i) -+ -+ else -+ -+c terms for rigid body atoms -+ -+ ik=ik+1 -+ id=lstgtp(ig) -+ -+ tqq(1)=dxx(kk)/gmass(id) -+ tqq(2)=dyy(kk)/gmass(id) -+ tqq(3)=dzz(kk)/gmass(id) -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ jj=lstcsit(ik) -+ -+c com-site vector in lab frame -+ -+ xxa=(gxx(id,jj)*rot(1)+gyy(id,jj)*rot(2)+gzz(id,jj)*rot(3)) -+ yya=(gxx(id,jj)*rot(4)+gyy(id,jj)*rot(5)+gzz(id,jj)*rot(6)) -+ zza=(gxx(id,jj)*rot(7)+gyy(id,jj)*rot(8)+gzz(id,jj)*rot(9)) -+ -+c cross product of com-site vector and interatomic vector -+ -+ tax=yya*dzz(kk)-zza*dyy(kk) -+ tay=zza*dxx(kk)-xxa*dzz(kk) -+ taz=xxa*dyy(kk)-yya*dxx(kk) -+ -+c transform to body fixed frame -+ -+ trx=(tax*rot(1)+tay*rot(4)+taz*rot(7))*rotinx(id,2) -+ try=(tax*rot(2)+tay*rot(5)+taz*rot(8))*rotiny(id,2) -+ trz=(tax*rot(3)+tay*rot(6)+taz*rot(9))*rotinz(id,2) -+ -+ if(k.eq.1)then -+ -+c direction of induced velocites in body frame -+ -+ vix=try*gzz(id,jj)-trz*gyy(id,jj) -+ viy=trz*gxx(id,jj)-trx*gzz(id,jj) -+ viz=trx*gyy(id,jj)-try*gxx(id,jj) -+ -+c transform to lab frame -+ -+ tqq(1)=tqq(1)+vix*rot(1)+viy*rot(2)+viz*rot(3) -+ tqq(2)=tqq(2)+vix*rot(4)+viy*rot(5)+viz*rot(6) -+ tqq(3)=tqq(3)+vix*rot(7)+viy*rot(8)+viz*rot(9) -+ -+ elseif(k.eq.2)then -+ -+c transform to lab frame -+ -+ tqq(1)=tqq(1)+trx*rot(1)+try*rot(2)+trz*rot(3) -+ tqq(2)=tqq(2)+trx*rot(4)+try*rot(5)+trz*rot(6) -+ tqq(3)=tqq(3)+trx*rot(7)+try*rot(8)+trz*rot(9) -+ -+ endif -+ -+ endif -+ -+ return -+ end subroutine pivot -+ -+ subroutine nveqvv_2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,tolnce,tstep,vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith jan 2005 -+c amended w.smith feb 2005: qrattle added -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,jrs,icyc,mxshk,idum,ig -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) engtrn -+ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3 -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ -+ save newstep,newjob,p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data newjob/.true./ -+ -+c set array allocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) -+ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(3)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(4)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(5)) -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) -+ if(isw.eq.2)then -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) -+ endif -+ -+c check array allocation error flags -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2110) -+ enddo -+ -+c initialise constraint virial -+ -+ if(isw.eq.1)then -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) -+ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) -+ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*pt5*tstep -+ p1(ig)=c1(jg)+tq1*pt5*tstep -+ p2(ig)=c2(jg)+tq2*pt5*tstep -+ p3(ig)=c3(jg)+tq3*pt5*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxo(i)+tstep*vxx(i) -+ yyy(i)=yyo(i)+tstep*vyy(i) -+ zzz(i)=zzo(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge free atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+ if(isw.eq.2)then -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ -+ engke=engke+engtrn -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c restore forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ if(isw.eq.2)then -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ endif -+ -+ return -+ end subroutine nveqvv_2 -+ -+ subroutine nvtqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,engke,engrot,taut,sigma,tolnce,tstep, -+ x vircom,vircon) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c nvt ensemble - Berendsen thermostat (n.b. not symplectic) -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith mar 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,jrs,icyc,mxshk,idum,ig -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke -+ real(8) engtrn -+ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,taut,sigma,chit -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ -+ save newstep,newjob,p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data newjob/.true./ -+ -+c set array alocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) -+ allocate(vxo(msatms),vyo(msatms),vzo(mxatms),stat=fail(3)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(4)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(5)) -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) -+ if(isw.eq.2)then -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) -+ endif -+ -+c check array allocation error flags -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2130) -+ enddo -+ -+c initialise constraint virial -+ -+ if(isw.eq.1)then -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) -+ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) -+ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*pt5*tstep -+ p1(ig)=c1(jg)+tq1*pt5*tstep -+ p2(ig)=c2(jg)+tq2*pt5*tstep -+ p3(ig)=c3(jg)+tq3*pt5*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxo(i)+tstep*vxx(i) -+ yyy(i)=yyo(i)+tstep*vyy(i) -+ zzz(i)=zzo(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engke+engtrn+engrot -+ engke=engke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ if(lstfrz(i).ne.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c restore forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ if(isw.eq.2)then -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ endif -+ -+ return -+ end subroutine nvtqvv_b2 -+ -+ subroutine nvtqvv_h2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntshl,keyshl,chit,consv,conint,engke,engrot, -+ x taut,sigma,tolnce,tstep,vircom,vircon,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c nvt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith april 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,jrs,icyc,mxshk,idum,ig -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) engtrn,vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,engfke -+ real(8) taut,sigma,chit,hstep,qmass,conint,consv -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9) -+ -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newstep,newjob,p0,p1,p2,p3,hstep,qmass,ifre1,ifre2 -+ save igrp1,igrp2 -+ -+ data newjob/.true./ -+ -+c set array allocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c timestep parameters -+ -+ hstep=pt5*tstep -+ -+c nose-hoover inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(2)) -+ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(3)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(4)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(5)) -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(6)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(7)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(8)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(9)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(10)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(11)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(12)) -+ if(isw.eq.2)then -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(13)) -+ endif -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2150) -+ enddo -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c initialise constraint virial -+ -+ if(isw.eq.1)then -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c apply thermostat for first stage -+ -+ if(isw.eq.1)then -+ -+ call nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x hstep,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) -+ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) -+ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*pt5*tstep -+ p1(ig)=c1(jg)+tq1*pt5*tstep -+ p2(ig)=c2(jg)+tq2*pt5*tstep -+ p3(ig)=c3(jg)+tq3*pt5*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=gxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=gyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=gzo(jg)+tstep*gvzz(ig) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=xxo(i)+tstep*vxx(i) -+ yyy(i)=yyo(i)+tstep*vyy(i) -+ zzz(i)=zzo(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ else -+ -+c second stage of velocity verlet algorithm -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c apply thermostat for second stage and calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+c rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c apply thermostat for second stage and calculate kinetic energy -+ -+ call nvtqscl -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,sigma, -+ x hstep,qmass,taut,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ engke=engfke+engtrn -+ -+c conserved quantity less kinetic and potential energy terms -+ -+ consv=conint+0.5d0*qmass*chit**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c restore forces if isw = 2 -+ -+ if(isw.eq.2)then -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ if(isw.eq.2)then -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ endif -+ -+ return -+ end subroutine nvtqvv_h2 -+ -+ subroutine nptqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,virtot,volm) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c npt ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith sep 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,jrs,icyc,mxshk,idum,ig,ntpatm -+ integer iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke,engtrn -+ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz,volm0 -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3,taut,sigma,chit -+ real(8) volm,elrc0,elrc,virlrc0,virlrc,scale,psyst,virtot,chip -+ real(8) beta,press,taup,engfke,vzero -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),cell0(9),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+ save newstep,newjob,volm0,elrc0,virlrc0,dens0 -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2 -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./,beta/7.3728d-3/ -+ -+c set array alocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2180) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(3)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ endif -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(8)) -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(9)) -+ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(11)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(12)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(13)) -+ -+c check array allocation error flags -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2190) -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c cell parameters -+ -+ vzero=volm -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engke=engfke+engtrn -+ -+ endif -+ -+c -------------- start of barostat iteration cycle ----------------- -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+ if(isw.eq.1)then -+ -+c restore cell parameters -+ -+ volm=vzero -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c calculate system pressure -+ -+ vircon=-(strcns(1)+strcns(5)+strcns(9)) -+ psyst=(2.d0*engke-virtot-vircon-vircom)/(3.d0*volm) -+ -+c apply Berendsen barostat -+ -+ chip=1.d0+beta*tstep*(psyst-press)/taup -+ chip=1.d0 -+ scale=chip**(1.d0/3.d0) -+ volm=chip*volm -+ -+c reset cell parameters for new volume -+ -+ do i=1,9 -+ cell(i)=scale*cell(i) -+ enddo -+ -+c reset constraint virial -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+(pt5*tstep*rmass(i))*fxx(i) -+ vyy(i)=vyo(j)+(pt5*tstep*rmass(i))*fyy(i) -+ vzz(i)=vzo(j)+(pt5*tstep*rmass(i))*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*pt5*tstep -+ p1(ig)=c1(jg)+tq1*pt5*tstep -+ p2(ig)=c2(jg)+tq2*pt5*tstep -+ p3(ig)=c3(jg)+tq3*pt5*tstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*pt5*tstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*pt5*tstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*pt5*tstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=scale*gxo(jg)+tstep*gvxx(ig) -+ gcmy(ig)=scale*gyo(jg)+tstep*gvyy(ig) -+ gcmz(ig)=scale*gzo(jg)+tstep*gvzz(ig) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=scale*xxo(i)+tstep*vxx(i) -+ yyy(i)=scale*yyo(i)+tstep*vyy(i) -+ zzz(i)=scale*zzo(i)+tstep*vzz(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c rigid body contribution to stress tensor -+ -+ if(isw.eq.2)call bodystress -+ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c restore forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+c -------------- end of barostat iteration cycle ---------------- -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor for tethered bonds -+ -+ do i=1,9 -+ eta(i)=uni(i)*scale -+ enddo -+ -+ endif -+ -+ if(isw.eq.2)then -+ -+c calculate kinetic energy -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ if(lstfrz(i).ne.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,fxo,fyo,fzo,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ -+ return -+ end subroutine nptqvv_b2 -+ -+ subroutine nptqvv_h2 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,ntshl,keyshl,tstep,taut,taup,sigma, -+ x temp,chip,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircom,vircon,virtot,virlrc,volm,press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c npt ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith april 2005 -+c adapted d.quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr -+ integer id,ifre,icyc,mxshk,idum,ig,ntpatm -+ integer jcyc,iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) engtrn,vaa,vbb,vcc,opx,opy,opz,engfke -+ real(8) taut,taup,sigma,chit,hstep,qmass,conint,consv -+ real(8) cxx,cyy,czz,scale,virtot,press,chip,temp -+ real(8) volm,pmass,totmas,qstep,fstep,volm0,elrc -+ real(8) virlrc,elrc0,virlrc0,chit0,chip0,vzero,cons0 -+ -+ integer, parameter :: nnn=16 -+ integer, parameter :: ncyc=5 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),cell0(9),com(3),vom(3),uni(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: vx1(:),vy1(:),vz1(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: oxo(:),oyo(:),ozo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gvx1(:),gvy1(:),gvz1(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newstep,newjob,p0,p1,p2,p3,hstep,fstep,qmass,ifre1,ifre2 -+ save igrp1,igrp2,volm0,elrc0,virlrc0,qstep,dens0,totmas -+ save pmass -+ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ data newjob/.true./ -+ -+c set array allocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2220) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c nose-hoover thermostat and barostat inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(3)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(8)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(9)) -+ allocate(vx1(mxatms),vy1(mxatms),vz1(mxatms),stat=fail(10)) -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(11)) -+ allocate(oxo(mxatms),oyo(mxatms),ozo(mxatms),stat=fail(12)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp), -+ x stat=fail(13)) -+ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp), -+ x stat=fail(14)) -+ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(15)) -+ allocate(gvx1(mxgrp),gvy1(mxgrp),gvz1(mxgrp),stat=fail(16)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2230) -+ enddo -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c store key config data at start of timestep -+ -+ vzero=volm -+ chit0=chit -+ chip0=chip -+ cons0=conint -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+ if(isw.eq.1)then -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=1,natms -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=1,ngrp -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c store rigid body positions -+ -+ do ig=1,ngrp -+ -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ do i=1,natms -+ -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+c store forces -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, angular and cartesian velocities -+ -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ oxo(ig)=omx(ig) -+ oyo(ig)=omy(ig) -+ ozo(ig)=omz(ig) -+ gvxo(ig)=gvxx(ig) -+ gvyo(ig)=gvyy(ig) -+ gvzo(ig)=gvzz(ig) -+ -+ enddo -+ -+c iteration necessary if ntcons > 0 and isw=1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+c integration of barostat and thermostat (part 1) -+ -+ if(isw.eq.1)then -+ -+c restore cell parameters -+ -+ volm=vzero -+ chit=chit0 -+ chip=chip0 -+ conint=cons0 -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c restore free atom velocities -+ -+ do i=1,natms -+ -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+c restore rigid body quaternions angular and cartesian velocities -+ -+ do ig=1,ngrp -+ -+ omx(ig)=oxo(ig) -+ omy(ig)=oyo(ig) -+ omz(ig)=ozo(ig) -+ gvxx(ig)=gvxo(ig) -+ gvyy(ig)=gvyo(ig) -+ gvzz(ig)=gvzo(ig) -+ -+ enddo -+ -+c current constraint virial -+ -+ vircon=-(strcns(1)+strcns(5)+strcns(9)) -+ -+ do jcyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engke=engfke+engtrn -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/vzero)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+c reset constraint virial and stress -+ -+ vircon=0.d0 -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+c calculate quaternion momenta -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-b1(ig)*opx-b2(ig)*opy-b3(ig)*opz) -+ p1(ig)=2.0d0*( b0(ig)*opx-b3(ig)*opy+b2(ig)*opz) -+ p2(ig)=2.0d0*( b3(ig)*opx+b0(ig)*opy-b1(ig)*opz) -+ p3(ig)=2.0d0*(-b2(ig)*opx+b1(ig)*opy+b0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store intermediate velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vx1(i)=vxx(i) -+ vy1(i)=vyy(i) -+ vz1(i)=vzz(i) -+ -+ enddo -+ do ig=igrp1,igrp2 -+ -+ c0(ig)=p0(ig) -+ c1(ig)=p1(ig) -+ c2(ig)=p2(ig) -+ c3(ig)=p3(ig) -+ gvx1(ig)=gvxx(ig) -+ gvy1(ig)=gvyy(ig) -+ gvz1(ig)=gvzz(ig) -+ -+ enddo -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vx1(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vy1(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vz1(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c restore rigid body quaternions, angular momenta and velocities -+ -+ do ig=igrp1,igrp2 -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ p0(ig)=c0(ig) -+ p1(ig)=c1(ig) -+ p2(ig)=c2(ig) -+ p3(ig)=c3(ig) -+ gvxx(ig)=gvx1(ig) -+ gvyy(ig)=gvy1(ig) -+ gvzz(ig)=gvz1(ig) -+ -+ enddo -+ -+c calculate new rigid body velocities -+ -+ call rotate_omega -+ x (idnode,mxnode,ngrp,hstep,p0,p1,p2,p3,dtx,dty,dtz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c update centre of mass position by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ cxx=gxo(ig)-com(1) -+ cyy=gyo(ig)-com(2) -+ czz=gzo(ig)-com(3) -+ gcmx(ig)=gxo(ig)+tstep*(gvxx(ig)+chip*cxx) -+ gcmy(ig)=gyo(ig)+tstep*(gvyy(ig)+chip*cyy) -+ gcmz(ig)=gzo(ig)+tstep*(gvzz(ig)+chip*czz) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ cxx=xxo(i)-com(1) -+ cyy=yyo(i)-com(2) -+ czz=zzo(i)-com(3) -+ xxx(i)=xxo(i)+tstep*(vxx(i)+chip*cxx) -+ yyy(i)=yyo(i)+tstep*(vyy(i)+chip*cyy) -+ zzz(i)=zzo(i)+tstep*(vzz(i)+chip*czz) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c integration of barostat and thermostat (part 2) -+ -+ if(isw.eq.2)then -+ -+c current constraint virial -+ -+ vircon=-(strcns(1)+strcns(5)+strcns(9)) -+ -+ do jcyc=1,ncyc -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply npt barostat -+ -+ call nptqscl_p -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,fstep,pmass, -+ x chip,chit,volm,press,vircon,virtot,vircom) -+ -+c integrate and apply npt thermostat -+ -+ call nptqscl_t -+ x (idnode,mxnode,ntfree,ngrp,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chip,chit,conint) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engke=engfke+engtrn -+ -+c scale cell vectors - isotropic -+ -+ scale=(volm/vzero)**(1.d0/3.d0) -+ do i=1,9 -+ cell(i)=cell0(i)*scale -+ enddo -+ -+ endif -+ -+c restore forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+c -------------- end of barostat iteration cycle ---------------- -+ -+ enddo -+ -+ if(isw.eq.2)then -+ -+c calculate conserved variable -+ -+ consv=conint+0.5d0*qmass*chit**2+press*volm -+ x +0.5d0*pmass*chip**2 -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c merge velocity arrays -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+c construct scaling tensor (for tethered atoms) -+ -+ do i=1,9 -+ eta(i)=chip*uni(i) -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c exchange position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(oxo,oyo,ozo,dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ -+ return -+ end subroutine nptqvv_h2 -+ -+ subroutine nstqvv_b2 -+ x (safe,lshmov,isw,imcon,idnode,mxnode,natms,ngrp,nscons, -+ x ntcons,ntfree,ntpatm,mode,engke,engrot,press,taut,taup,sigma, -+ x tolnce,tstep,vircom,vircon,elrc,virlrc,volm) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c nst ensemble - Berendsen thermostat and barostat -+c (n.b. not symplectic) -+c -+c isothermal compressibility (beta) set to that of liquid water -+c = 0.007372 dlpoly units -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith sep 2005 -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jg,jr -+ integer id,ifre,icyc,mxshk,idum,ig,ntpatm,mode -+ integer iter,mxiter,jrs -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon,engtke -+ real(8) engtrn,taut,sigma,chit -+ real(8) vaa,vbb,vcc,opx,opy,opz,ftx,fty,ftz,volm0 -+ real(8) fmx,fmy,fmz,tqx,tqy,tqz,tq0,tq1,tq2,tq3 -+ real(8) volm,elrc0,elrc,virlrc0,virlrc -+ real(8) beta,press,taup,engfke,hstep,vzero -+ -+ integer, parameter :: nnn=13 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),uni(9),celp(10) -+ real(8) cell0(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ -+ save newstep,newjob,volm0,elrc0,virlrc0,dens0 -+ save p0,p1,p2,p3,ifre1,ifre2,igrp1,igrp2,hstep -+ -+ data newjob/.true./,beta/7.3728d-3/ -+ data uni/1.d0,0.d0,0.d0,0.d0,1.d0,0.d0,0.d0,0.d0,1.d0/ -+ -+c set array alocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c timestep parameters -+ -+ hstep=pt5*tstep -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2260) -+ -+c store initial values of volume and long range corrections -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ -+ newjob=.false. -+ -+ endif -+ -+c allocate working arrays -+ -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(gxo(msgrp),gyo(msgrp),gzo(msgrp),stat=fail(3)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ endif -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(8)) -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(9)) -+ allocate(vxo(msatms),vyo(msatms),vzo(msatms),stat=fail(10)) -+ allocate(gvxo(msgrp),gvyo(msgrp),gvzo(msgrp),stat=fail(11)) -+ allocate(b0(msgrp),b1(msgrp),b2(msgrp),b3(msgrp), -+ x stat=fail(12)) -+ allocate(c0(msgrp),c1(msgrp),c2(msgrp),c3(msgrp), -+ x stat=fail(13)) -+ -+c check array allocation error flags -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2270) -+ enddo -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c calculate quaternion momenta at start of time step -+ -+ if(isw.eq.1)then -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-q1(ig)*opx-q2(ig)*opy-q3(ig)*opz) -+ p1(ig)=2.0d0*( q0(ig)*opx-q3(ig)*opy+q2(ig)*opz) -+ p2(ig)=2.0d0*( q3(ig)*opx+q0(ig)*opy-q1(ig)*opz) -+ p3(ig)=2.0d0*(-q2(ig)*opx+q1(ig)*opy+q0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store key config data at start of time step -+ -+ if(isw.eq.1)then -+ -+c cell parameters -+ -+ vzero=volm -+ do i=1,9 -+ cell0(i)=cell(i) -+ enddo -+ -+c atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c rigid body positions -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ gxo(j)=gcmx(i) -+ gyo(j)=gcmy(i) -+ gzo(j)=gcmz(i) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxo(j)=vxx(i) -+ vyo(j)=vyy(i) -+ vzo(j)=vzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, momenta and cartesian velocities -+ -+ j=0 -+ do i=igrp1,igrp2 -+ -+ j=j+1 -+ b0(j)=q0(i) -+ b1(j)=q1(i) -+ b2(j)=q2(i) -+ b3(j)=q3(i) -+ c0(j)=p0(i) -+ c1(j)=p1(i) -+ c2(j)=p2(i) -+ c3(j)=p3(i) -+ gvxo(j)=gvxx(i) -+ gvyo(j)=gvyy(i) -+ gvzo(j)=gvzz(i) -+ -+ enddo -+ -+c store forces -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+c extract previous constraint terms from stress tensor -+ -+ if(isw.eq.1)then -+ -+ do i=1,9 -+ stress(i)=stress(i)-strcns(i) -+ enddo -+ -+ endif -+ -+c -------------- start of barostat iteration cycle ----------------- -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+ do i=1,9 -+ eta(i)=uni(i) -+ enddo -+ -+ if(isw.eq.1)then -+ -+c restore cell parameters -+ -+ volm=vzero -+ do i=1,9 -+ cell(i)=cell0(i) -+ enddo -+ -+c calculate Berendsen barostat -+ -+ do i=1,9 -+ eta(i)=tstep*beta*((stress(i)+strcns(i))/volm- -+ x press*uni(i))/taup+uni(i) -+ enddo -+ if(mode.gt.0)then -+ eta(3)=0.d0 -+ eta(6)=0.d0 -+ eta(7)=0.d0 -+ eta(8)=0.d0 -+ if(mode.lt.3)then -+ eta(2)=0.d0 -+ eta(4)=0.d0 -+ if(mode.eq.2)then -+ eta(1)=0.5d0*(eta(1)+eta(5)) -+ eta(5)=eta(1) -+ endif -+ endif -+ endif -+ -+c reset cell parameters for new volume -+ -+ call mat_mul(eta,cell,cell) -+ -+c calculate new volume -+ -+ call dcell(cell,celp) -+ volm=celp(10) -+ -+c reset constraint virial -+ -+ vircon=0.d0 -+ -+ do i=1,9 -+ strcns(i)=0.d0 -+ enddo -+ -+ endif -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ j=0 -+ do ifre=ifre1,ifre2 -+ -+ j=j+1 -+ i=lstfre(ifre) -+ vxx(i)=vxo(j)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vyo(j)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vzo(j)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c operations common to first and second stages -+ -+ jg=0 -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c fmx,fmy,fmz represent force on c.o.m. -+ -+ jrs=jr -+ fmx=0.d0 -+ fmy=0.d0 -+ fmz=0.d0 -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ fmx=fmx+fxx(i) -+ fmy=fmy+fyy(i) -+ fmz=fmz+fzz(i) -+ -+ enddo -+ -+c current rotational matrix -+ -+ jg=jg+1 -+ call getrotmat(b0(jg),b1(jg),b2(jg),b3(jg),rot) -+ -+c calculate torque in principal frame -+ -+ jr=jrs -+ ftx=0.d0 -+ fty=0.d0 -+ ftz=0.d0 -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ ftx=ftx+dty(jr)*fzz(i)-dtz(jr)*fyy(i) -+ fty=fty+dtz(jr)*fxx(i)-dtx(jr)*fzz(i) -+ ftz=ftz+dtx(jr)*fyy(i)-dty(jr)*fxx(i) -+ -+ enddo -+ -+ tqx=ftx*rot(1)+fty*rot(4)+ftz*rot(7) -+ tqy=ftx*rot(2)+fty*rot(5)+ftz*rot(8) -+ tqz=ftx*rot(3)+fty*rot(6)+ftz*rot(9) -+ -+c calculate quaternion torques -+ -+ tq0=2.0d0*(-b1(jg)*tqx-b2(jg)*tqy-b3(jg)*tqz) -+ tq1=2.0d0*( b0(jg)*tqx-b3(jg)*tqy+b2(jg)*tqz) -+ tq2=2.0d0*( b3(jg)*tqx+b0(jg)*tqy-b1(jg)*tqz) -+ tq3=2.0d0*(-b2(jg)*tqx+b1(jg)*tqy+b0(jg)*tqz) -+ -+c update quaternion momentum by half timestep -+ -+ p0(ig)=c0(jg)+tq0*hstep -+ p1(ig)=c1(jg)+tq1*hstep -+ p2(ig)=c2(jg)+tq2*hstep -+ p3(ig)=c3(jg)+tq3*hstep -+ -+c update centre of mass velocity by half timestep -+ -+ gvxx(ig)=gvxo(jg)+fmx*hstep/gmass(id) -+ gvyy(ig)=gvyo(jg)+fmy*hstep/gmass(id) -+ gvzz(ig)=gvzo(jg)+fmz*hstep/gmass(id) -+ -+ enddo -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+ jg=0 -+ do ig=igrp1,igrp2 -+ -+ jg=jg+1 -+ -+c update centre of mass position by full time step -+ -+ gcmx(ig)=tstep*gvxx(ig)+ -+ x eta(1)*gxo(jg)+eta(4)*gyo(jg)+eta(7)*gzo(jg) -+ gcmy(ig)=tstep*gvyy(ig)+ -+ x eta(2)*gxo(jg)+eta(5)*gyo(jg)+eta(8)*gzo(jg) -+ gcmz(ig)=tstep*gvzz(ig)+ -+ x eta(3)*gxo(jg)+eta(6)*gyo(jg)+eta(9)*gzo(jg) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ q0(ig)=b0(jg) -+ q1(ig)=b1(jg) -+ q2(ig)=b2(jg) -+ q3(ig)=b3(jg) -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ xxx(i)=tstep*vxx(i)+ -+ x eta(1)*xxo(i)+eta(4)*yyo(i)+eta(7)*zzo(i) -+ yyy(i)=tstep*vyy(i)+ -+ x eta(2)*xxo(i)+eta(5)*yyo(i)+eta(8)*zzo(i) -+ zzz(i)=tstep*vzz(i)+ -+ x eta(3)*xxo(i)+eta(6)*yyo(i)+eta(9)*zzo(i) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c rigid body contribution to stress tensor -+ -+ if(isw.eq.2)call bodystress -+ x (idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c restore forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+c -------------- end of barostat iteration cycle ---------------- -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+ endif -+ -+c calculate kinetic energy -+ -+ if(isw.eq.2)then -+ -+ engfke=getkinf(ntfree,idnode,mxnode) -+ call getking(ngrp,idnode,mxnode,engtrn,engrot) -+ engtke=engfke+engtrn+engrot -+ engke=engfke+engtrn -+ -+c apply Berendsen thermostat - taut is the relaxation time -+ -+ chit=sqrt(1.d0+tstep/taut*(sigma/engtke-1.d0)) -+ -+ engke=engke*chit**2 -+ engtrn=engtrn*chit**2 -+ engrot=engrot*chit**2 -+ -+c thermostat velocities of free particles -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ if(lstfrz(i).ne.0)then -+ -+ vxx(i)=chit*vxx(i) -+ vyy(i)=chit*vyy(i) -+ vzz(i)=chit*vzz(i) -+ -+ endif -+ -+ enddo -+ -+c thermostat rigid body velocities -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ omx(ig)=chit*omx(ig) -+ omy(ig)=chit*omy(ig) -+ omz(ig)=chit*omz(ig) -+ gvxx(ig)=chit*gvxx(ig) -+ gvyy(ig)=chit*gvyy(ig) -+ gvzz(ig)=chit*gvzz(ig) -+ -+ enddo -+ -+c kinetic contribution to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stress(i)+strbod(i)+strcns(i)+strkin(i)+strgrp(i) -+ enddo -+ -+ endif -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,fxo,fyo,fzo,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ -+ return -+ end subroutine nstqvv_b2 -+ -+ subroutine nstqvv_h2 -+ x (safe,lshmov,isw,idnode,mxnode,natms,imcon,ngrp,nscons, -+ x ntcons,ntpatm,ntfree,mode,ntshl,keyshl,tstep,taut,taup, -+ x sigma,temp,chit,consv,conint,engke,engrot,elrc,tolnce, -+ x vircom,vircon,virlrc,volm,press,chit_shl,sigma_shl) -+ -+c*********************************************************************** -+c -+c dlpoly subroutine to integrate rigid body equations of motion -+c using the symplectic no_squish quaternion algorithm of -+c miller et al j.chem.phys 116 (2002) 8649 -+c plus bond constraints - including rigid body sites linked -+c by constraint sites (qrattle algorithm) -+c -+c nst ensemble - nose-hoover thermostat Molec Phys 87 (1996) 1117 -+c -+c parallel replicated data version : block data -+c -+c omx,omy,omz=angular velocity in body fixed frame (principal axes) -+c rotinx,y,z =rotational inertia in body fixed frame -+c -+c copyright daresbury laboratory -+c author w.smith sept 2005 -+c adapted d. quigley : metadynamics -+c -+c********************************************************************** -+ -+ implicit none -+ -+ logical newstep,safe,lshmov,newjob -+ -+ integer isw,imcon,idnode,mxnode,natms,ngrp,nscons,ntcons -+ integer ntfree,i,j,k,igrp1,igrp2,igrp,ifre1,ifre2,jr -+ integer id,ifre,icyc,mxshk,idum,ig,ntpatm,mode -+ integer jcyc,iter,mxiter -+ -+ real(8) engke,engrot,tolnce,tstep,vircom,vircon -+ real(8) engtrn,engfke -+ real(8) vaa,vbb,vcc,opx,opy,opz -+ real(8) taut,taup,sigma,chit,hstep,qmass,conint,consv -+ real(8) cxx,cyy,czz,press,chip2,temp -+ real(8) volm,pmass,totmas,qstep,fstep,volm0,elrc -+ real(8) virlrc,elrc0,virlrc0,chit0,vzero,cons0 -+ -+ integer, parameter :: nnn=16 -+ integer, parameter :: ncyc=5 -+ real(8), parameter :: pt5=0.5d0 -+ -+ integer fail(nnn) -+ real(8) rot(9),strkin(9),strgrp(9),com(3),vom(3) -+ real(8) cell0(9),eta0(9),stres0(9) -+ -+ real(8), allocatable :: dens0(:) -+ real(8), allocatable :: xxo(:),yyo(:),zzo(:) -+ real(8), allocatable :: vxo(:),vyo(:),vzo(:) -+ real(8), allocatable :: vx1(:),vy1(:),vz1(:) -+ real(8), allocatable :: fxo(:),fyo(:),fzo(:) -+ real(8), allocatable :: gxo(:),gyo(:),gzo(:) -+ real(8), allocatable :: oxo(:),oyo(:),ozo(:) -+ real(8), allocatable :: dxx(:),dyy(:),dzz(:) -+ real(8), allocatable :: txx(:),tyy(:),tzz(:) -+ real(8), allocatable :: xxt(:),yyt(:),zzt(:) -+ real(8), allocatable :: dxt(:),dyt(:),dzt(:) -+ real(8), allocatable :: dtx(:),dty(:),dtz(:) -+ real(8), allocatable :: b0(:),b1(:),b2(:),b3(:) -+ real(8), allocatable :: c0(:),c1(:),c2(:),c3(:) -+ real(8), allocatable :: p0(:),p1(:),p2(:),p3(:) -+ real(8), allocatable :: gvxo(:),gvyo(:),gvzo(:) -+ real(8), allocatable :: gvx1(:),gvy1(:),gvz1(:) -+ -+c metadynamics shell thermostat variables -+ -+ integer ntshl,keyshl -+ real(8) sigma_shl -+ -+ logical,save :: lfirst=.true. -+ real(8) :: chit_shl -+ real(8),save :: qmass_shl -+ real(8) :: shlke -+ -+c end metadynamics shell thermostat variables -+ -+ save newstep,newjob,p0,p1,p2,p3,hstep,fstep,qmass,ifre1,ifre2 -+ save igrp1,igrp2,volm0,elrc0,virlrc0,qstep,dens0,totmas -+ save pmass -+ -+ data newjob/.true./ -+ -+c set array allocation error flags -+ -+ do i=1,nnn -+ fail(i)=0 -+ enddo -+ -+c assign initial parameters -+ -+ if(newjob)then -+ -+c store intitial parameters -+ -+ volm0=volm -+ elrc0=elrc -+ virlrc0=virlrc -+ hstep=0.5d0*tstep -+ fstep=0.5d0*tstep/dble(ncyc) -+ qstep=0.25d0*tstep/dble(ncyc) -+ -+c allocate density storage array -+ -+ fail(1)=0 -+ allocate(dens0(mxatyp),stat=fail(1)) -+ if(fail(1).gt.0)call error(idnode,2220) -+ -+ do i=1,ntpatm -+ dens0(i)=dens(i) -+ enddo -+ -+c total system mass -+ -+ totmas=getmass(natms,idnode,mxnode) -+ -+c nose-hoover thermostat and barostat inertia parameter -+ -+ qmass=2.d0*sigma*taut**2 -+ pmass=2.d0*sigma*taup**2 -+ -+c free atom block indices -+ -+ ifre1=(idnode*ntfree)/mxnode+1 -+ ifre2=((idnode+1)*ntfree)/mxnode -+ -+c group block indices -+ -+ igrp1=(idnode*ngrp)/mxnode+1 -+ igrp2=((idnode+1)*ngrp)/mxnode -+ -+c check work arrays are large enough -+ -+ safe=(igrp2-igrp1+1.le.msgrp) -+ if(mxnode.gt.1) call gstate(safe) -+ if(.not.safe)then -+ igrp=igrp2-igrp1+1 -+ call gimax(igrp,1,idum) -+ if(idnode.eq.0) write(nrite,*) ' make msgrp >=',igrp -+ call error(idnode,506) -+ endif -+ -+ allocate(p0(mxgrp),p1(mxgrp),p2(mxgrp),p3(mxgrp),stat=fail(1)) -+ newjob=.false. -+ -+ endif -+ -+ if(ntcons.gt.0)safe=.false. -+ -+c allocate working arrays -+ -+ if(isw.eq.1)then -+ -+ allocate(xxo(mxatms),yyo(mxatms),zzo(mxatms),stat=fail(2)) -+ allocate(gxo(mxgrp),gyo(mxgrp),gzo(mxgrp),stat=fail(3)) -+ -+ endif -+ if(ntcons.gt.0)then -+ -+ allocate(dxx(mxcons),dyy(mxcons),dzz(mxcons),stat=fail(4)) -+ allocate(txx(mxatms),tyy(mxatms),tzz(mxatms),stat=fail(5)) -+ allocate(xxt(mxatms),yyt(mxatms),zzt(mxatms),stat=fail(6)) -+ allocate(dxt(mxcons),dyt(mxcons),dzt(mxcons),stat=fail(7)) -+ -+ endif -+ allocate(dtx(mxatms),dty(mxatms),dtz(mxatms),stat=fail(8)) -+ allocate(vxo(mxatms),vyo(mxatms),vzo(mxatms),stat=fail(9)) -+ allocate(vx1(mxatms),vy1(mxatms),vz1(mxatms),stat=fail(10)) -+ allocate(fxo(mxatms),fyo(mxatms),fzo(mxatms),stat=fail(11)) -+ allocate(oxo(mxatms),oyo(mxatms),ozo(mxatms),stat=fail(12)) -+ allocate(b0(mxgrp),b1(mxgrp),b2(mxgrp),b3(mxgrp), -+ x stat=fail(13)) -+ allocate(c0(mxgrp),c1(mxgrp),c2(mxgrp),c3(mxgrp), -+ x stat=fail(14)) -+ allocate(gvxo(mxgrp),gvyo(mxgrp),gvzo(mxgrp),stat=fail(15)) -+ allocate(gvx1(mxgrp),gvy1(mxgrp),gvz1(mxgrp),stat=fail(16)) -+ -+ do i=1,nnn -+ if(fail(i).gt.0)call error(idnode,2230) -+ enddo -+ -+ if(lmetadyn.and.lfirst.and.(ntshl>0))then -+ if(idnode.eq.0)then -+ write(*,*)"Warning - Metadynamics Modification" -+ write(*,*)"=========================" -+ write(*,*)"Coupling core-shell motion thermostat at 1 K" -+ endif -+ lfirst=.false. -+c use same relaxation time for global and core-shell? -+ qmass_shl=2.d0*sigma_shl*taut**2 -+ endif -+ -+c construct current bond vectors -+ -+ if(ntcons.gt.0)then -+ -+ do k=1,nscons -+ -+ i=listcon(k,2) -+ j=listcon(k,3) -+ dxx(k)=xxx(i)-xxx(j) -+ dyy(k)=yyy(i)-yyy(j) -+ dzz(k)=zzz(i)-zzz(j) -+ -+ enddo -+ -+ call images(imcon,0,1,nscons,cell,dxx,dyy,dzz) -+ -+ endif -+ -+c atom displacement from rigid body centre of mass -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+ dtx(jr)=xxx(i)-gcmx(ig) -+ dty(jr)=yyy(i)-gcmy(ig) -+ dtz(jr)=zzz(i)-gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c periodic boundary condition for displacement vectors -+ -+ call images(imcon,0,1,jr,cell,dtx,dty,dtz) -+ -+c store key config data at start of timestep -+ -+ vzero=volm -+ chit0=chit -+ cons0=conint -+ do i=1,9 -+ -+ cell0(i)=cell(i) -+ eta0(i)=eta(i) -+ stres0(i)=stress(i) -+ -+ enddo -+ -+ if(isw.eq.1)then -+ -+c remove system centre of mass velocity -+ -+ call getvom(natms,idnode,mxnode,totmas,vom) -+ -+ do i=1,natms -+ -+ vxx(i)=vxx(i)-vom(1) -+ vyy(i)=vyy(i)-vom(2) -+ vzz(i)=vzz(i)-vom(3) -+ -+ enddo -+ -+ do ig=1,ngrp -+ -+ gvxx(ig)=gvxx(ig)-vom(1) -+ gvyy(ig)=gvyy(ig)-vom(2) -+ gvzz(ig)=gvzz(ig)-vom(3) -+ -+ enddo -+ -+c store atom positions -+ -+ do i=1,natms -+ -+ xxo(i)=xxx(i) -+ yyo(i)=yyy(i) -+ zzo(i)=zzz(i) -+ -+ enddo -+ -+c store rigid body positions -+ -+ do ig=1,ngrp -+ -+ gxo(ig)=gcmx(ig) -+ gyo(ig)=gcmy(ig) -+ gzo(ig)=gcmz(ig) -+ -+ enddo -+ -+ endif -+ -+c store free atom velocities -+ -+ do i=1,natms -+ -+ vxo(i)=vxx(i) -+ vyo(i)=vyy(i) -+ vzo(i)=vzz(i) -+ -+ enddo -+ -+c store forces -+ -+ do i=1,natms -+ -+ fxo(i)=fxx(i) -+ fyo(i)=fyy(i) -+ fzo(i)=fzz(i) -+ -+ enddo -+ -+c store rigid body quaternions, angular and cartesian velocities -+ -+ do ig=1,ngrp -+ -+ b0(ig)=q0(ig) -+ b1(ig)=q1(ig) -+ b2(ig)=q2(ig) -+ b3(ig)=q3(ig) -+ oxo(ig)=omx(ig) -+ oyo(ig)=omy(ig) -+ ozo(ig)=omz(ig) -+ gvxo(ig)=gvxx(ig) -+ gvyo(ig)=gvyy(ig) -+ gvzo(ig)=gvzz(ig) -+ -+ enddo -+ -+c iteration necessary if ntcons > 0 and isw=1 -+ -+ mxiter=1 -+ if(isw.eq.1.and.ntcons.gt.0)mxiter=3 -+ do iter=1,mxiter -+ -+c integration of barostat and thermostat (part 1) -+ -+ if(isw.eq.1)then -+ -+c restore cell parameters -+ -+ volm=vzero -+ chit=chit0 -+ conint=cons0 -+ do i=1,9 -+ -+ cell(i)=cell0(i) -+ eta(i)=eta0(i) -+ -+ enddo -+ -+c restore free atom velocities -+ -+ do i=1,natms -+ -+ vxx(i)=vxo(i) -+ vyy(i)=vyo(i) -+ vzz(i)=vzo(i) -+ -+ enddo -+ -+c restore rigid body quaternions angular and cartesian velocities -+ -+ do ig=1,ngrp -+ -+ omx(ig)=oxo(ig) -+ omy(ig)=oyo(ig) -+ omz(ig)=ozo(ig) -+ gvxx(ig)=gvxo(ig) -+ gvyy(ig)=gvyo(ig) -+ gvzz(ig)=gvzo(ig) -+ -+ enddo -+ -+c kinetic contributions to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+ do jcyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstqscl_p2 -+ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit,press, -+ x volm,strkin,strgrp) -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engke=engfke+engtrn -+ -+c reset constraint virial and stress -+ -+ vircon=0.d0 -+ do i=1,9 -+ -+ stress(i)=stress(i)-strcns(i)-strbod(i) -+ strcns(i)=0.d0 -+ -+ enddo -+ -+c calculate quaternion momenta -+ -+ do ig=igrp1,igrp2 -+ -+ id=lstgtp(ig) -+ opx=omx(ig)*rotinx(id,1) -+ opy=omy(ig)*rotiny(id,1) -+ opz=omz(ig)*rotinz(id,1) -+ p0(ig)=2.0d0*(-b1(ig)*opx-b2(ig)*opy-b3(ig)*opz) -+ p1(ig)=2.0d0*( b0(ig)*opx-b3(ig)*opy+b2(ig)*opz) -+ p2(ig)=2.0d0*( b3(ig)*opx+b0(ig)*opy-b1(ig)*opz) -+ p3(ig)=2.0d0*(-b2(ig)*opx+b1(ig)*opy+b0(ig)*opz) -+ -+ enddo -+ -+ endif -+ -+c store intermediate velocities -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vx1(i)=vxx(i) -+ vy1(i)=vyy(i) -+ vz1(i)=vzz(i) -+ -+ enddo -+ do ig=igrp1,igrp2 -+ -+ c0(ig)=p0(ig) -+ c1(ig)=p1(ig) -+ c2(ig)=p2(ig) -+ c3(ig)=p3(ig) -+ gvx1(ig)=gvxx(ig) -+ gvy1(ig)=gvyy(ig) -+ gvz1(ig)=gvzz(ig) -+ -+ enddo -+ -+c -------------- start of shake iteration cycle ------------------- -+ -+ icyc=0 -+ mxshk=1 -+ safe=.false. -+ newstep=.true. -+ if(ntcons.gt.0)mxshk=mxshak -+ -+ do while(.not.safe.and.icyc.lt.mxshk) -+ -+ icyc=icyc+1 -+ -+c update velocities of free atoms 1/2 timestep -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ vxx(i)=vx1(i)+hstep*rmass(i)*fxx(i) -+ vyy(i)=vy1(i)+hstep*rmass(i)*fyy(i) -+ vzz(i)=vz1(i)+hstep*rmass(i)*fzz(i) -+ -+ enddo -+ -+c ************* rigid body motion **************************** -+ -+c restore rigid body quaternions, angular momenta and velocities -+ -+ do ig=igrp1,igrp2 -+ -+ q0(ig)=b0(ig) -+ q1(ig)=b1(ig) -+ q2(ig)=b2(ig) -+ q3(ig)=b3(ig) -+ p0(ig)=c0(ig) -+ p1(ig)=c1(ig) -+ p2(ig)=c2(ig) -+ p3(ig)=c3(ig) -+ gvxx(ig)=gvx1(ig) -+ gvyy(ig)=gvy1(ig) -+ gvzz(ig)=gvz1(ig) -+ -+ enddo -+ -+c calculate new rigid body velocities -+ -+ call rotate_omega -+ x (idnode,mxnode,ngrp,hstep,p0,p1,p2,p3,dtx,dty,dtz) -+ -+c first stage of velocity verlet algorithm -+ -+ if(isw.eq.1)then -+ -+c calculate system centre of mass -+ -+ call getcom(natms,idnode,mxnode,totmas,com) -+ -+c update centre of mass position by full time step -+ -+ do ig=igrp1,igrp2 -+ -+ cxx=gxo(ig)-com(1) -+ cyy=gyo(ig)-com(2) -+ czz=gzo(ig)-com(3) -+ gcmx(ig)=gxo(ig)+ -+ x tstep*(gvxx(ig)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ gcmy(ig)=gyo(ig)+ -+ x tstep*(gvyy(ig)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ gcmz(ig)=gzo(ig)+ -+ x tstep*(gvzz(ig)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+c calculate rotation of rigid groups: nosquish algorithm -+ -+ call nosquish(ig,tstep,q0,q1,q2,q3,p0,p1,p2,p3) -+ -+ enddo -+ -+c merge group coms from all nodes -+ -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+c new atomic positions for atoms in rigid bodies - relative to com -+ -+ k=0 -+ do ig=igrp1,igrp2 -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+ id=lstgtp(ig) -+ do j=1,numgsit(id) -+ -+ k=k+1 -+ i=lstme(k) -+ xxx(i)=rot(1)*gxx(id,j)+rot(2)*gyy(id,j)+ -+ x rot(3)*gzz(id,j)+gcmx(ig) -+ yyy(i)=rot(4)*gxx(id,j)+rot(5)*gyy(id,j)+ -+ x rot(6)*gzz(id,j)+gcmy(ig) -+ zzz(i)=rot(7)*gxx(id,j)+rot(8)*gyy(id,j)+ -+ x rot(9)*gzz(id,j)+gcmz(ig) -+ -+ enddo -+ -+ enddo -+ -+c update positions of free particles to full time step -+ -+ do ifre=ifre1,ifre2 -+ -+ i=lstfre(ifre) -+ cxx=xxo(i)-com(1) -+ cyy=yyo(i)-com(2) -+ czz=zzo(i)-com(3) -+ xxx(i)=xxo(i)+ -+ x tstep*(vxx(i)+eta(1)*cxx+eta(4)*cyy+eta(7)*czz) -+ yyy(i)=yyo(i)+ -+ x tstep*(vyy(i)+eta(2)*cxx+eta(5)*cyy+eta(8)*czz) -+ zzz(i)=zzo(i)+ -+ x tstep*(vzz(i)+eta(3)*cxx+eta(6)*cyy+eta(9)*czz) -+ -+ enddo -+ -+c merge atom positions -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ -+c apply rattle corrections to bond constraints -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ call qrattle_r -+ x (newstep,safe,lshmov,idnode,imcon,mxnode,natms, -+ x nscons,tolnce,tstep,vircon,dxx,dyy,dzz,dxt,dyt, -+ x dzt,txx,tyy,tzz,xxt,yyt,zzt,strcns) -+ -+ endif -+ -+c end of first stage -+ -+ endif -+ -+c second stage of velocity verlet algorithm -+ -+ if(isw.eq.2)then -+ -+ jr=0 -+ do ig=igrp1,igrp2 -+ -+c new angular momenta and velocities -+ -+ opx=pt5*(-q1(ig)*p0(ig)+q0(ig)*p1(ig)+ -+ x q3(ig)*p2(ig)-q2(ig)*p3(ig)) -+ opy=pt5*(-q2(ig)*p0(ig)-q3(ig)*p1(ig)+ -+ x q0(ig)*p2(ig)+q1(ig)*p3(ig)) -+ opz=pt5*(-q3(ig)*p0(ig)+q2(ig)*p1(ig)- -+ x q1(ig)*p2(ig)+q0(ig)*p3(ig)) -+ -+ id=lstgtp(ig) -+ -+ omx(ig)=opx*rotinx(id,2) -+ omy(ig)=opy*rotiny(id,2) -+ omz(ig)=opz*rotinz(id,2) -+ -+c new rotational matrix -+ -+ call getrotmat(q0(ig),q1(ig),q2(ig),q3(ig),rot) -+ -+c new atomic velocites -+ -+ do j=1,numgsit(id) -+ -+ jr=jr+1 -+ i=lstrgd(jr) -+ -+c new atomic velocites in body frame -+ -+ vaa=omy(ig)*gzz(id,j)-omz(ig)*gyy(id,j) -+ vbb=omz(ig)*gxx(id,j)-omx(ig)*gzz(id,j) -+ vcc=omx(ig)*gyy(id,j)-omy(ig)*gxx(id,j) -+ -+c new atomic velocites in lab frame -+ -+ vxx(i)=rot(1)*vaa+rot(2)*vbb+rot(3)*vcc+gvxx(ig) -+ vyy(i)=rot(4)*vaa+rot(5)*vbb+rot(6)*vcc+gvyy(ig) -+ vzz(i)=rot(7)*vaa+rot(8)*vbb+rot(9)*vcc+gvzz(ig) -+ -+ enddo -+ -+ enddo -+ -+c merge velocities and forces from all nodes -+ -+ if(ntcons.gt.0)then -+ -+ if(mxnode.gt.1)then -+ -+ call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ call merge1 -+ x (idnode,mxnode,natms,lstme,fxx,fyy,fzz,buffer) -+ -+ endif -+ -+c correct constraint bond velocities using rattle -+ -+ call qrattle_v -+ x (newstep,safe,lshmov,idnode,mxnode,natms, -+ x nscons,tolnce,tstep,dxx,dyy,dzz,txx,tyy,tzz, -+ x xxt,yyt,zzt) -+ -+ endif -+ -+c end of second stage -+ -+ endif -+ -+ newstep=.false. -+ -+ enddo -+ -+c check shake convergence -+ -+ if(.not.safe)call error(idnode,105) -+ -+c sum constraint virial and stress across processors -+ -+ if(mxnode.gt.1.and.isw.eq.1)then -+ -+ buffer(1)=vircon -+ call gdsum(buffer(1),1,buffer(2)) -+ vircon=buffer(1) -+ call gdsum(strcns,9,buffer) -+ -+ endif -+ -+c -------------- end of shake iteration cycle ------------------- -+ -+c calculate rigid body contribution to stress tensor -+ -+ call bodystress(idnode,mxnode,ngrp,vircom,strbod,dtx,dty,dtz) -+ -+c add new constraint terms to stress tensor -+ -+ if(isw.eq.1)then -+ -+ do i=1,9 -+ stress(i)=stress(i)+strcns(i)+strbod(i) -+ enddo -+ -+ endif -+ -+c integration of barostat and thermostat (part 2) -+ -+ if(isw.eq.2)then -+ -+c kinetic contributions to stress tensor -+ -+ call kinstressf(ntfree,idnode,mxnode,strkin) -+ call kinstressg(ngrp,idnode,mxnode,strgrp) -+ -+c add kinetic and body contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) -+ enddo -+ -+ do jcyc=1,ncyc -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+c integrate and apply nst barostat -+ -+ call nstqscl_p2 -+ x (idnode,mxnode,ntfree,ngrp,mode,fstep,pmass,chit,press, -+ x volm,strkin,strgrp) -+ -+c integrate and apply nst thermostat -+ -+ call nstqscl_t2 -+ x (idnode,mxnode,ntfree,ngrp,mode,engfke,engtrn,engrot,temp, -+ x sigma,qstep,pmass,qmass,taut,chit,conint,strkin,strgrp) -+ -+c metadynamics shell thermostat -+c ==================================================== -+c Must first merge update velocities as the core-shell -+c velocites are not distributed according to the same -+c rules. -+c ==================================================== -+ if(lmetadyn.and.keyshl.eq.1)then -+ if(mxnode.gt.1)call merge -+ x (idnode,mxnode,natms,mxbuff,vxx,vyy,vzz,buffer) -+ call nvtscale_shl -+ x (idnode,mxnode,ntshl,shlke,sigma_shl,hstep,qmass_shl, -+ x taut,chit_shl,conint) -+ endif -+ -+ enddo -+ -+c translational kinetic energy -+ -+ engke=engfke+engtrn -+ -+c sum up all contributions to stress tensor -+ -+ do i=1,9 -+ stress(i)=stres0(i)+strkin(i)+strgrp(i)+strbod(i)+strcns(i) -+ enddo -+ -+ endif -+ -+c restore forces -+ -+ do i=1,natms -+ -+ fxx(i)=fxo(i) -+ fyy(i)=fyo(i) -+ fzz(i)=fzo(i) -+ -+ enddo -+ -+c -------------- end of barostat iteration cycle ---------------- -+ -+ enddo -+ -+ if(isw.eq.2)then -+ -+c calculate conserved variable -+ -+ chip2=sdot0(9,eta,eta) -+ if(mode.eq.2)chip2=chip2-eta(1)**2 -+ consv=conint+0.5d0*qmass*chit**2+0.5d0*pmass*chip2+press*volm -+ -+c metadynamics shell thermostat -+ -+ if(lmetadyn.and.keyshl.eq.1)then -+ consv=consv+0.5d0*qmass_shl*chit_shl**2 -+ endif -+ -+c merge velocity arrays -+ -+ if(mxnode.gt.1)call merge1 -+ x (idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c adjust long range corrections and number density -+ -+ elrc=elrc0*(volm0/volm) -+ virlrc=virlrc0*(volm0/volm) -+ do k=1,ntpatm -+ dens(k)=dens0(k)*(volm0/volm) -+ enddo -+ -+ if(mxnode.gt.1)then -+ -+c merge new group coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gvxx,gvyy,gvzz,buffer) -+ -+c merge new atomic coordinates and velocities -+ -+ if(isw.eq.1) -+ x call merge1(idnode,mxnode,natms,lstme,xxx,yyy,zzz,buffer) -+ call merge1(idnode,mxnode,natms,lstme,vxx,vyy,vzz,buffer) -+ -+ endif -+ -+c periodic boundary condition -+ -+ if(isw.eq.2)then -+ -+ call images(imcon,idnode,mxnode,natms,cell,xxx,yyy,zzz) -+ call images(imcon,idnode,mxnode,ngrp,cell,gcmx,gcmy,gcmz) -+ -+c merge position data -+ -+ if(mxnode.gt.1)then -+ -+ call merge(idnode,mxnode,natms,mxbuff,xxx,yyy,zzz,buffer) -+ call merge(idnode,mxnode,ngrp,mxbuff,gcmx,gcmy,gcmz,buffer) -+ -+ endif -+ -+ endif -+ -+c deallocate working arrays -+ -+ deallocate(gvxo,gvyo,gvzo,vxo,vyo,vzo,stat=fail(1)) -+ deallocate(b0,b1,b2,b3,c0,c1,c2,c3,stat=fail(2)) -+ deallocate(dtx,dty,dtz,stat=fail(3)) -+ if(isw.eq.1)then -+ deallocate(xxo,yyo,zzo,gxo,gyo,gzo,stat=fail(4)) -+ endif -+ if(ntcons.gt.0)then -+ -+ deallocate(dxx,dyy,dzz,txx,tyy,tzz,stat=fail(5)) -+ deallocate(dxt,dyt,dzt,xxt,yyt,zzt,stat=fail(6)) -+ -+ endif -+ if(isw.eq.2)then -+ deallocate(fxo,fyo,fzo,stat=fail(7)) -+ endif -+ -+ return -+ end subroutine nstqvv_h2 -+ -+ end module vv_rotation2_module -- GitLab From 0d983d87666a1a11c3b976d1821811e428b34f97 Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Thu, 1 Dec 2016 13:45:41 +0100 Subject: [PATCH 728/741] ncview needs X11 develop libs --- easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb b/easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb index 09cf15c6d3..5320b4aa4c 100644 --- a/easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb +++ b/easybuild/easyconfigs/n/ncview/ncview-2.1.7-intel-2016b.eb @@ -33,6 +33,7 @@ dependencies = [ ('netCDF', '4.4.1'), ('netCDF-Fortran', '4.4.4'), ('UDUNITS', '2.2.20'), + ('X11', '20160819'), ] sanity_check_paths = { -- GitLab From 560712929d11edf201e1d10708aa23fdfdeed043 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Dec 2016 14:21:52 +0100 Subject: [PATCH 729/741] {bio} [intel/2016b] taco/0.5.1 --- .../taco-0.5.1-intel-2016b-Pyton-2.7.12.eb | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 easybuild/easyconfigs/t/taco/taco-0.5.1-intel-2016b-Pyton-2.7.12.eb diff --git a/easybuild/easyconfigs/t/taco/taco-0.5.1-intel-2016b-Pyton-2.7.12.eb b/easybuild/easyconfigs/t/taco/taco-0.5.1-intel-2016b-Pyton-2.7.12.eb new file mode 100644 index 0000000000..833d9ac2f4 --- /dev/null +++ b/easybuild/easyconfigs/t/taco/taco-0.5.1-intel-2016b-Pyton-2.7.12.eb @@ -0,0 +1,26 @@ +easyblock = 'PythonPackage' + +name = 'taco' +version = '0.5.1' +versionsuffix = '-Python-%(pyver)s' + +homepage = 'http://tacorna.github.io' +description = """Multi-sample transcriptome assembly from RNA-Seq""" + +toolchain = {'name': 'intel', 'version': '2016b'} + +sources = ['v%(version)s.tar.gz'] +source_urls = ['https://github.com/tacorna/taco/archive'] + +dependencies = [ + ('Python', '2.7.12'), +] + +postinstallcmds = ["mv %(installdir)s/bin/taco_run.py %(installdir)s/bin/taco_run"] + +sanity_check_paths = { + 'files': ['bin/taco_run'], + 'dirs': ['lib/python%(pyshortver)s/site-packages'], +} + +moduleclass = 'bio' -- GitLab From 4f6c474457ac4f860dad788baac039badf7b53e1 Mon Sep 17 00:00:00 2001 From: Ward Poelmans Date: Thu, 1 Dec 2016 14:28:13 +0100 Subject: [PATCH 730/741] Fix typo --- ...6b-Pyton-2.7.12.eb => taco-0.5.1-intel-2016b-Python-2.7.12.eb} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename easybuild/easyconfigs/t/taco/{taco-0.5.1-intel-2016b-Pyton-2.7.12.eb => taco-0.5.1-intel-2016b-Python-2.7.12.eb} (100%) diff --git a/easybuild/easyconfigs/t/taco/taco-0.5.1-intel-2016b-Pyton-2.7.12.eb b/easybuild/easyconfigs/t/taco/taco-0.5.1-intel-2016b-Python-2.7.12.eb similarity index 100% rename from easybuild/easyconfigs/t/taco/taco-0.5.1-intel-2016b-Pyton-2.7.12.eb rename to easybuild/easyconfigs/t/taco/taco-0.5.1-intel-2016b-Python-2.7.12.eb -- GitLab From 6d6a8541b20dfdadd81abe1b23028407544b218f Mon Sep 17 00:00:00 2001 From: Balazs Hajgato Date: Thu, 1 Dec 2016 14:31:29 +0100 Subject: [PATCH 731/741] {data}[intel/2016b] CDO 1.7.2 (REVIEW) --- .../c/CDO/CDO-1.7.2-intel-2016b.eb | 29 +++++++++++++++++++ .../y/YAXT/YAXT-0.5.1-intel-2016b.eb | 23 +++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 easybuild/easyconfigs/c/CDO/CDO-1.7.2-intel-2016b.eb create mode 100644 easybuild/easyconfigs/y/YAXT/YAXT-0.5.1-intel-2016b.eb diff --git a/easybuild/easyconfigs/c/CDO/CDO-1.7.2-intel-2016b.eb b/easybuild/easyconfigs/c/CDO/CDO-1.7.2-intel-2016b.eb new file mode 100644 index 0000000000..3af830a1e6 --- /dev/null +++ b/easybuild/easyconfigs/c/CDO/CDO-1.7.2-intel-2016b.eb @@ -0,0 +1,29 @@ +easyblock = 'ConfigureMake' + +name = 'CDO' +version = '1.7.2' + +homepage = 'https://code.zmaw.de/projects/cdo' +description = """CDO is a collection of command line Operators to manipulate and analyse Climate and NWP model Data.""" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'opt': True, 'pic': True, 'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['https://code.zmaw.de/attachments/download/12760/'] +checksums = [('md5', 'f08e4ce8739a4f2b63fc81a24db3ee31')] + +dependencies = [ + ('HDF5', '1.8.17'), + ('netCDF', '4.4.1'), + ('YAXT', '0.5.1'), +] + +configopts = "--with-hdf5=$EBROOTHDF5 --with-netcdf=$EBROOTNETCDF" + +sanity_check_paths = { + 'files': ["bin/cdo"], + 'dirs': [], +} + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/y/YAXT/YAXT-0.5.1-intel-2016b.eb b/easybuild/easyconfigs/y/YAXT/YAXT-0.5.1-intel-2016b.eb new file mode 100644 index 0000000000..e2e871aa13 --- /dev/null +++ b/easybuild/easyconfigs/y/YAXT/YAXT-0.5.1-intel-2016b.eb @@ -0,0 +1,23 @@ +easyblock = 'ConfigureMake' + +name = 'YAXT' +version = '0.5.1' + +homepage = 'https://www.dkrz.de/redmine/projects/yaxt' +description = "Yet Another eXchange Tool" + +toolchain = {'name': 'intel', 'version': '2016b'} +toolchainopts = {'usempi': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = ['https://www.dkrz.de/redmine/attachments/download/473/'] +checksums = [('md5', '2176c5b1096146e58163656b9d83c0b3')] + +sanity_check_paths = { + 'files': ["include/yaxt.h", "include/yaxt.mod", "lib/libyaxt.a", "lib/libyaxt.%s" % SHLIB_EXT], + 'dirs': ["include/xt"], +} + +configopts = 'FC="$F90" FCFLAGS="$F90FLAGS -cpp"' + +moduleclass = 'tools' -- GitLab From 41bdd846ccf8327a8d60c218fbd7148b1db1a008 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 1 Dec 2016 14:53:34 +0100 Subject: [PATCH 732/741] adding easyconfigs: netCDF-Fortran-4.4.4-foss-2016b.eb, netCDF-4.4.1.1-foss-2016b.eb --- .../netCDF-Fortran-4.4.4-foss-2016b.eb | 17 ++++++++++ .../n/netCDF/netCDF-4.4.1.1-foss-2016b.eb | 34 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb create mode 100644 easybuild/easyconfigs/n/netCDF/netCDF-4.4.1.1-foss-2016b.eb diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb new file mode 100644 index 0000000000..4298086b09 --- /dev/null +++ b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb @@ -0,0 +1,17 @@ +name = 'netCDF-Fortran' +version = '4.4.4' + +homepage = 'http://www.unidata.ucar.edu/software/netcdf/' +description = """NetCDF (network Common Data Form) is a set of software libraries + and machine-independent data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ['https://github.com/Unidata/netcdf-fortran/archive/'] +sources = ['v%(version)s.tar.gz'] + +dependencies = [('netCDF', '4.4.1.1')] + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/n/netCDF/netCDF-4.4.1.1-foss-2016b.eb b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.1.1-foss-2016b.eb new file mode 100644 index 0000000000..5da2b108a0 --- /dev/null +++ b/easybuild/easyconfigs/n/netCDF/netCDF-4.4.1.1-foss-2016b.eb @@ -0,0 +1,34 @@ +name = 'netCDF' +version = '4.4.1.1' + +homepage = 'http://www.unidata.ucar.edu/software/netcdf/' +description = """NetCDF (network Common Data Form) is a set of software libraries + and machine-independent data formats that support the creation, access, and sharing of array-oriented + scientific data.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True, 'usempi': True} + +sources = ['v%(version)s.tar.gz'] +source_urls = [ + 'https://github.com/Unidata/netcdf-c/archive/' +] + +dependencies = [ + ('HDF5', '1.8.17'), + ('cURL', '7.49.1'), + ('Szip', '2.1'), +] + +builddependencies = [ + ('CMake', '3.5.2'), + ('Doxygen', '1.8.11'), +] + +# make sure both static and shared libs are built +configopts = [ + "-DBUILD_SHARED_LIBS=OFF ", + "-DBUILD_SHARED_LIBS=ON ", +] + +moduleclass = 'data' -- GitLab From 6a87da52ab1b7eb25566f85ce4554bf44bc4ffc7 Mon Sep 17 00:00:00 2001 From: edo Date: Thu, 1 Dec 2016 16:17:14 +0100 Subject: [PATCH 733/741] adding easyconfigs: METIS-5.1.0-foss-2016b.eb --- .../m/METIS/METIS-5.1.0-foss-2016b.eb | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 easybuild/easyconfigs/m/METIS/METIS-5.1.0-foss-2016b.eb diff --git a/easybuild/easyconfigs/m/METIS/METIS-5.1.0-foss-2016b.eb b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-foss-2016b.eb new file mode 100644 index 0000000000..1510375706 --- /dev/null +++ b/easybuild/easyconfigs/m/METIS/METIS-5.1.0-foss-2016b.eb @@ -0,0 +1,22 @@ +name = 'METIS' +version = '5.1.0' + +homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview' +description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes, + and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the + multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'optarch': True, 'pic': True} + +sources = [SOURCELOWER_TAR_GZ] +source_urls = [ + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis', + 'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD', +] + +builddependencies = [('CMake', '3.6.1')] + +configopts = ['', 'shared=1'] + +moduleclass = 'math' -- GitLab From 9d745bc21549aff93a1a15db90926543354a6b60 Mon Sep 17 00:00:00 2001 From: edo Date: Thu, 1 Dec 2016 17:24:47 +0100 Subject: [PATCH 734/741] adding easyconfigs: SCOTCH-6.0.4-foss-2016b.eb --- .../s/SCOTCH/SCOTCH-6.0.4-foss-2016b.eb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.4-foss-2016b.eb diff --git a/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.4-foss-2016b.eb b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.4-foss-2016b.eb new file mode 100644 index 0000000000..9fb7233435 --- /dev/null +++ b/easybuild/easyconfigs/s/SCOTCH/SCOTCH-6.0.4-foss-2016b.eb @@ -0,0 +1,14 @@ +name = 'SCOTCH' +version = '6.0.4' + +homepage = 'http://gforge.inria.fr/projects/scotch/' +description = """Software package and libraries for sequential and parallel graph partitioning, +static mapping, and sparse matrix block ordering, and sequential mesh and hypergraph partitioning.""" + +toolchain = {'name': 'foss', 'version': '2016b'} +toolchainopts = {'pic': True} + +source_urls = ['http://gforge.inria.fr/frs/download.php/file/34618/'] +sources = ['%(namelower)s_%(version)s.tar.gz'] + +moduleclass = 'math' -- GitLab From 91a85bb702331d5584d09fe0e98901d79aa11f08 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Thu, 1 Dec 2016 22:26:05 +0100 Subject: [PATCH 735/741] stick to netCDF 4.4.1 in netCDF-Fortran 4.4.4 easyconfig --- .../n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb index 4298086b09..8da424609f 100644 --- a/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb +++ b/easybuild/easyconfigs/n/netCDF-Fortran/netCDF-Fortran-4.4.4-foss-2016b.eb @@ -12,6 +12,6 @@ toolchainopts = {'pic': True} source_urls = ['https://github.com/Unidata/netcdf-fortran/archive/'] sources = ['v%(version)s.tar.gz'] -dependencies = [('netCDF', '4.4.1.1')] +dependencies = [('netCDF', '4.4.1')] moduleclass = 'data' -- GitLab From 1ca5a3f791464ee94d8891d4a5dac6c4189a3176 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 2 Dec 2016 10:18:40 +0100 Subject: [PATCH 736/741] add checksums in DL_POLY Classic easyconfigs --- .../DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb | 1 + .../DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb | 6 ++++++ .../d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb | 1 + 3 files changed, 8 insertions(+) diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb index a5b0e16996..daa85f8912 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb @@ -10,6 +10,7 @@ toolchain = {'name': 'ictce', 'version': '5.3.0'} sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] +checksums = ['66e40eccc6d3f696c8e3654b5dd2de54'] sanity_check_paths = { 'files': ['bin/DLPOLY.X'], diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb index 9541b2f02f..0223680bc9 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b-PLUMED-2.2.3.eb @@ -15,6 +15,12 @@ sources = [ 'dlpoly2.tar.gz', ] patches = [('DL_POLY_Classic-%(version)s_fix-PLUMED-integration.patch', '..')] +checksums = [ + '66e40eccc6d3f696c8e3654b5dd2de54', # dl_class_1.9.tar.gz + '39edd8805751b3581b9a4a0147ec1c67', # dlpoly2.tar.gz + '81f2cfd95c578aabc5c87a2777b106c3', # DL_POLY_Classic-1.9_fix-PLUMED-integration.patch +] + plumedversion = '2.2.3' versionsuffix = '-PLUMED-%s' % plumedversion diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb index c4fcfd2f6b..04e4e4da9b 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-intel-2016b.eb @@ -9,6 +9,7 @@ toolchain = {'name': 'intel', 'version': '2016b'} sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] +checksums = ['66e40eccc6d3f696c8e3654b5dd2de54'] # parallel build tends to break parallel = 1 -- GitLab From c125531dd2e0682ca9db92df10d2e285956c99e4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 2 Dec 2016 10:20:03 +0100 Subject: [PATCH 737/741] add checksums in DL_POLY Classic easyconfigs --- .../DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb | 5 +++++ .../DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb | 5 +++++ .../DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb | 1 + 3 files changed, 11 insertions(+) diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb index 957737f32e..72b5773546 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.1.4.eb @@ -15,6 +15,11 @@ sources = [ 'dlpoly2.tar.gz', ] patches = [('DL_POLY_Classic-%(version)s_fix-PLUMED-integration.patch', '..')] +checksums = [ + '66e40eccc6d3f696c8e3654b5dd2de54', # dl_class_1.9.tar.gz + '39edd8805751b3581b9a4a0147ec1c67', # dlpoly2.tar.gz + '81f2cfd95c578aabc5c87a2777b106c3', # DL_POLY_Classic-1.9_fix-PLUMED-integration.patch +] plumedversion = '2.1.4' versionsuffix = '-PLUMED-%s' % plumedversion diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb index 6ccf002e66..e62d26024b 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-foss-2015b-PLUMED-2.2.0.eb @@ -15,6 +15,11 @@ sources = [ 'dlpoly2.tar.gz', ] patches = [('DL_POLY_Classic-%(version)s_fix-PLUMED-integration.patch', '..')] +checksums = [ + '66e40eccc6d3f696c8e3654b5dd2de54', # dl_class_1.9.tar.gz + '39edd8805751b3581b9a4a0147ec1c67', # dlpoly2.tar.gz + '81f2cfd95c578aabc5c87a2777b106c3', # DL_POLY_Classic-1.9_fix-PLUMED-integration.patch +] plumedversion = '2.2.0' versionsuffix = '-PLUMED-%s' % plumedversion diff --git a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb index a5b0e16996..daa85f8912 100644 --- a/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb +++ b/easybuild/easyconfigs/d/DL_POLY_Classic/DL_POLY_Classic-1.9-ictce-5.3.0-no-gui.eb @@ -10,6 +10,7 @@ toolchain = {'name': 'ictce', 'version': '5.3.0'} sources = ['dl_class_%(version)s.tar.gz'] source_urls = ['http://ccpforge.cse.rl.ac.uk/gf/download/frsrelease/255/2627/'] +checksums = ['66e40eccc6d3f696c8e3654b5dd2de54'] sanity_check_paths = { 'files': ['bin/DLPOLY.X'], -- GitLab From 0829aab1d427f180d7aa90aaa4442de298ed42ca Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 2 Dec 2016 14:00:37 +0100 Subject: [PATCH 738/741] adding easyconfigs: PGI-16.10-GCC-5.4.0-2.26.eb --- .../p/PGI/PGI-16.10-GCC-5.4.0-2.26.eb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 easybuild/easyconfigs/p/PGI/PGI-16.10-GCC-5.4.0-2.26.eb diff --git a/easybuild/easyconfigs/p/PGI/PGI-16.10-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/p/PGI/PGI-16.10-GCC-5.4.0-2.26.eb new file mode 100644 index 0000000000..c31c9c139b --- /dev/null +++ b/easybuild/easyconfigs/p/PGI/PGI-16.10-GCC-5.4.0-2.26.eb @@ -0,0 +1,25 @@ +name = 'PGI' +version = '16.10' + +homepage = 'http://www.pgroup.com/' +description = "C, C++ and Fortran compilers from The Portland Group - PGI" + +toolchain = {'name': 'dummy', 'version': ''} + +sources = ['pgilinux-20%(version_major)s-%(version_major)s%(version_minor)s-x86_64.tar.gz'] +checksums = ['9bb6bfb7b1052f9e6a45829ba7a24e47'] + +gccver = '5.4.0' +binutilsver = '2.26' +versionsuffix = '-GCC-%s-%s' % (gccver, binutilsver) + +dependencies = [ + ('GCCcore', gccver), + ('binutils', binutilsver, '', ('GCCcore', gccver)), + ('numactl', '2.0.11', '', ('GCCcore', gccver)), +] + +# license file +license_file = HOME + '/licenses/pgi/license.dat' + +moduleclass = 'compiler' -- GitLab From 41f86c6d5d362e64a797a5754d3ce4e0ad1e5fd3 Mon Sep 17 00:00:00 2001 From: Adam Huffman Date: Sat, 3 Dec 2016 09:31:31 +0100 Subject: [PATCH 739/741] adding easyconfigs: SolexaQA++-3.1.5-foss-2016b.eb --- .../SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 easybuild/easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb diff --git a/easybuild/easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb b/easybuild/easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb new file mode 100644 index 0000000000..1b16b01f26 --- /dev/null +++ b/easybuild/easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb @@ -0,0 +1,35 @@ +# This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild +# Adam Huffman +# The Francis Crick Institute +easyblock = 'MakeCp' + +name = 'SolexaQA++' +version = '3.1.5' + +homepage = 'http://solexaqa.sourceforge.net' +description = """SolexaQA calculates sequence quality statistics and creates visual representations + of data quality for second-generation sequencing data. Originally developed for the Illumina system + (historically known as “Solexa”), SolexaQA now also supports Ion Torrent and 454 data.""" + +toolchain = {'name': 'foss', 'version': '2016b'} + +sources = ['%(name)s_v%(version)s.zip'] +source_urls = ['https://sourceforge.net/projects/solexaqa/files/src/'] + +dependencies = [ + ('Boost', '1.61.0'), + ('zlib', '1.2.8'), +] + +start_dir = 'source' + +files_to_copy = [ '%(name)s' ] + +sanity_check_paths = { + 'files': ['%(name)s'], + 'dirs': ["."] +} + +modextrapaths = {'PATH': ['']} + +moduleclass = 'bio' -- GitLab From 60dbeef9a168a513b68bb3f3c3b7628b06cc0b78 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 3 Dec 2016 10:16:09 +0100 Subject: [PATCH 740/741] minor style fixes in SolexaQA++ easyconfig --- .../easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/easybuild/easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb b/easybuild/easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb index 1b16b01f26..bb975b50f8 100644 --- a/easybuild/easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb +++ b/easybuild/easyconfigs/s/SolexaQA++/SolexaQA++-3.1.5-foss-2016b.eb @@ -23,11 +23,11 @@ dependencies = [ start_dir = 'source' -files_to_copy = [ '%(name)s' ] +files_to_copy = ['%(name)s'] sanity_check_paths = { 'files': ['%(name)s'], - 'dirs': ["."] + 'dirs': [], } modextrapaths = {'PATH': ['']} -- GitLab From 9397c5b845e06ba5397c05c220fd00a03785c139 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Sat, 3 Dec 2016 12:21:42 +0100 Subject: [PATCH 741/741] fix long lines in Tcl description --- easybuild/easyconfigs/t/Tcl/Tcl-8.3.5-ictce-5.5.0.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-foss-2014b.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goolf-1.4.10.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.3.0.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.5.0.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-intel-2014b.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-goolf-1.4.10.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-ictce-5.3.0.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.15-ictce-5.3.0.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.5.16-ictce-5.5.0.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-goolf-1.4.10.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-ictce-5.3.0.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-ictce-5.5.0.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-intel-2014b.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.9.2.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015.05.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015a.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015b.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-gompi-1.5.16.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.14.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.16.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.7.20.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-intel-2015a.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2015.11.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2016.03.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GCC-4.9.3-2.25.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GNU-4.9.3-2.25.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015a.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015b.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2016a.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-gimkl-2.11.5.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.4.10.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.7.20.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-ictce-7.3.5.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015a.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015b.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016.02-GCC-4.9.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016a.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb | 3 ++- .../t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-4.9.3-2.25.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-5.4.0-2.26.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016a.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016b.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-intel-2016b.eb | 3 ++- easybuild/easyconfigs/t/Tcl/Tcl-8.6.6-GCCcore-4.9.3.eb | 3 ++- 48 files changed, 96 insertions(+), 48 deletions(-) diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.3.5-ictce-5.5.0.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.3.5-ictce-5.5.0.eb index c8585dbd41..2fb940fc61 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.3.5-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.3.5-ictce-5.5.0.eb @@ -5,7 +5,8 @@ version = '8.3.5' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '5.5.0'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-foss-2014b.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-foss-2014b.eb index 32fe48b93c..79ab065024 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-foss-2014b.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-foss-2014b.eb @@ -5,7 +5,8 @@ version = '8.5.12' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, - suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2014b'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goolf-1.4.10.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goolf-1.4.10.eb index 7c9d9e8066..dbd46e992a 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-goolf-1.4.10.eb @@ -5,7 +5,8 @@ version = '8.5.12' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'goolf', 'version': '1.4.10'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.3.0.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.3.0.eb index 19f101522b..7c87bd01fd 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.3.0.eb @@ -5,7 +5,8 @@ version = '8.5.12' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, - suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '5.3.0'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.5.0.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.5.0.eb index 35f9095bc8..a2241ff65f 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-ictce-5.5.0.eb @@ -5,7 +5,8 @@ version = '8.5.12' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, - suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '5.5.0'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-intel-2014b.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-intel-2014b.eb index ca1465be0b..e7614a7834 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-intel-2014b.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.12-intel-2014b.eb @@ -5,7 +5,8 @@ version = '8.5.12' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, - suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'intel', 'version': '2014b'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-goolf-1.4.10.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-goolf-1.4.10.eb index 3e317dec24..f339e9e06f 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-goolf-1.4.10.eb @@ -5,7 +5,8 @@ version = '8.5.14' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'goolf', 'version': '1.4.10'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-ictce-5.3.0.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-ictce-5.3.0.eb index 5e237ee834..8e3c92be6b 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.14-ictce-5.3.0.eb @@ -5,7 +5,8 @@ version = '8.5.14' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '5.3.0'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.15-ictce-5.3.0.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.15-ictce-5.3.0.eb index 78a978f384..820b74eea5 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.15-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.15-ictce-5.3.0.eb @@ -5,7 +5,8 @@ version = '8.5.15' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '5.3.0'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.16-ictce-5.5.0.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.16-ictce-5.5.0.eb index f46eebeee8..a62da8c0a0 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.5.16-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.5.16-ictce-5.5.0.eb @@ -5,7 +5,8 @@ version = '8.5.16' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '5.5.0'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-goolf-1.4.10.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-goolf-1.4.10.eb index 39ddf4b3a8..a560004738 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-goolf-1.4.10.eb @@ -5,7 +5,8 @@ version = '8.6.1' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'goolf', 'version': '1.4.10'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-ictce-5.3.0.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-ictce-5.3.0.eb index 1392ae5cc8..60d6ac83f4 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-ictce-5.3.0.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.1-ictce-5.3.0.eb @@ -5,7 +5,8 @@ version = '8.6.1' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '5.3.0'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-ictce-5.5.0.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-ictce-5.5.0.eb index 8c3980c54e..db36da55f6 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-ictce-5.5.0.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-ictce-5.5.0.eb @@ -5,7 +5,8 @@ version = '8.6.2' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '5.5.0'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-intel-2014b.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-intel-2014b.eb index 7a5ef170a5..60cb2b1b94 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-intel-2014b.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.2-intel-2014b.eb @@ -5,7 +5,8 @@ version = '8.6.2' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'intel', 'version': '2014b'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb index d3061eabd1..9b4e305153 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.8.4.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'GCC', 'version': '4.8.4'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.9.2.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.9.2.eb index b3a8beb767..c4d2010766 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.9.2.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-GCC-4.9.2.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'GCC', 'version': '4.9.2'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015.05.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015.05.eb index bd202e0e1b..bf1d499974 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015.05.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015.05.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2015.05'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015a.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015a.eb index 45613c8d4e..16e045859c 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015a.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015a.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2015a'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015b.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015b.eb index ec3f168cb0..46e9e125bb 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015b.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-foss-2015b.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2015b'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-gompi-1.5.16.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-gompi-1.5.16.eb index 5aa437f573..ee5b42935f 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-gompi-1.5.16.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-gompi-1.5.16.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'gompi', 'version': '1.5.16'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.14.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.14.eb index f169881758..1238368e89 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.14.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.14.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'goolf', 'version': '1.5.14'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.16.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.16.eb index a8f55caa25..dee69d837b 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.16.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.5.16.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'goolf', 'version': '1.5.16'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.7.20.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.7.20.eb index 41060701af..c19a00ca57 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-goolf-1.7.20.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'goolf', 'version': '1.7.20'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-intel-2015a.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-intel-2015a.eb index 945189208b..ab41f83d76 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-intel-2015a.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.3-intel-2015a.eb @@ -5,7 +5,8 @@ version = '8.6.3' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'intel', 'version': '2015a'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2015.11.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2015.11.eb index 0a0ed38e56..37cac05971 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2015.11.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2015.11.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'CrayGNU', 'version': '2015.11'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2016.03.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2016.03.eb index b72c2fc21c..8211069c61 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2016.03.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-CrayGNU-2016.03.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'CrayGNU', 'version': '2016.03'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GCC-4.9.3-2.25.eb index e7800ee700..1a1dd7dcd5 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GCC-4.9.3-2.25.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'GCC', 'version': '4.9.3-2.25'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GNU-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GNU-4.9.3-2.25.eb index b0ebdff41b..5046ee4992 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GNU-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-GNU-4.9.3-2.25.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'GNU', 'version': '4.9.3-2.25'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015a.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015a.eb index d1a6b6efb2..40a19f82a3 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015a.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015a.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2015a'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015b.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015b.eb index ba9826c847..d067d918e3 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015b.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2015b.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2015b'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2016a.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2016a.eb index 3884765bf6..c3671ebebf 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2016a.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-foss-2016a.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2016a'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-gimkl-2.11.5.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-gimkl-2.11.5.eb index 154b3e9e27..6e056f40fd 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-gimkl-2.11.5.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-gimkl-2.11.5.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'gimkl', 'version': '2.11.5'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.4.10.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.4.10.eb index fe02a2bc48..be5009eda9 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.4.10.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.4.10.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'goolf', 'version': '1.4.10'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.7.20.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.7.20.eb index e2124cc24d..ff3e6c8167 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.7.20.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-goolf-1.7.20.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'goolf', 'version': '1.7.20'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-ictce-7.3.5.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-ictce-7.3.5.eb index ab1bbc53d3..df8dfb36e7 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-ictce-7.3.5.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-ictce-7.3.5.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'ictce', 'version': '7.3.5'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015a.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015a.eb index b2673863fd..c5eceb0d1f 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015a.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015a.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'intel', 'version': '2015a'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015b.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015b.eb index ae2268790f..869c8a60db 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015b.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2015b.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'intel', 'version': '2015b'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016.02-GCC-4.9.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016.02-GCC-4.9.eb index c2af97cc03..11676da053 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016.02-GCC-4.9.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016.02-GCC-4.9.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'intel', 'version': '2016.02-GCC-4.9'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016a.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016a.eb index 20cd9eb96c..1851e0e592 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016a.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-intel-2016a.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'intel', 'version': '2016a'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb index 598c79f35a..e35e81b24e 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.07.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'iomkl', 'version': '2016.07'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb index b0142c9365..88e6740d05 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.4-iomkl-2016.09-GCC-4.9.3-2.25.eb @@ -5,7 +5,8 @@ version = '8.6.4' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'iomkl', 'version': '2016.09-GCC-4.9.3-2.25'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-4.9.3-2.25.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-4.9.3-2.25.eb index bb197b61b9..3f4c4832f3 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-4.9.3-2.25.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-4.9.3-2.25.eb @@ -5,7 +5,8 @@ version = '8.6.5' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'GCC', 'version': '4.9.3-2.25'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-5.4.0-2.26.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-5.4.0-2.26.eb index cee27f6687..0c3128d657 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-5.4.0-2.26.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-GCC-5.4.0-2.26.eb @@ -5,7 +5,8 @@ version = '8.6.5' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'GCC', 'version': '5.4.0-2.26'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb index c3516cdb44..3de0513341 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016.04.eb @@ -5,7 +5,8 @@ version = '8.6.5' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2016.04'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016a.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016a.eb index 1dc1677c34..f15e62a824 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016a.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016a.eb @@ -5,7 +5,8 @@ version = '8.6.5' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2016a'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016b.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016b.eb index d91801e33e..ee88524e1e 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016b.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-foss-2016b.eb @@ -5,7 +5,8 @@ version = '8.6.5' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'foss', 'version': '2016b'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-intel-2016b.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-intel-2016b.eb index 4691e322fe..b9bb3175fa 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-intel-2016b.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.5-intel-2016b.eb @@ -5,7 +5,8 @@ version = '8.6.5' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'intel', 'version': '2016b'} diff --git a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.6-GCCcore-4.9.3.eb b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.6-GCCcore-4.9.3.eb index 35b772ac6f..d71a52e8c4 100644 --- a/easybuild/easyconfigs/t/Tcl/Tcl-8.6.6-GCCcore-4.9.3.eb +++ b/easybuild/easyconfigs/t/Tcl/Tcl-8.6.6-GCCcore-4.9.3.eb @@ -5,7 +5,8 @@ version = '8.6.6' homepage = 'http://www.tcl.tk/' description = """Tcl (Tool Command Language) is a very powerful but easy to learn dynamic programming language, -suitable for a very wide range of uses, including web and desktop applications, networking, administration, testing and many more.""" +suitable for a very wide range of uses, including web and desktop applications, networking, administration, +testing and many more.""" toolchain = {'name': 'GCCcore', 'version': '4.9.3'} -- GitLab